2020-10-24 08:19:33 -06:00
# doip.js
Decentralized OpenPGP Identity Proofs library in node
## Technical specifications
### Service provider data structure
The object returned by a service provider consists of:
```
- serviceprovider (object)
- type (string: the service provider's type [web, communication])
- name (string: the service provider's name)
- profile (object)
- display (string: the profile's identifier for display)
- uri (string: the profile's URI)
- proof (object)
- uri (string: the URI containing the proof to be by humans and machines)
- fetch (string: see below)
2020-10-24 08:40:11 -06:00
- useProxy (boolean: should the request be sent using a proxy)
2020-10-24 08:19:33 -06:00
- claim (object)
- fingerprint (string: the fingerprint that verifies the claim if found in the proof)
- format (string: see below [uri, message, fingerprint])
- path (string: the path to the claim inside the proof JSON (comma-separated))
2020-10-24 08:40:11 -06:00
- relation (string: how the claim format relates to the proof format [contains, equals])
2020-10-24 08:19:33 -06:00
- qr (string: a URI to be displayed as QR code if the claim is verified)
```
### proof.fetch
2020-10-24 08:40:11 -06:00
Sometimes, the URI used by humans to verify a claim is inadequate for use by machines. This is needed when the JSON is served by a different endpoint. In this case, machines will use a different URI than the one shown to humans.
2020-10-24 08:19:33 -06:00
### claim.format
2020-10-24 08:40:11 -06:00
There are three claim formats:
2020-10-24 08:19:33 -06:00
- uri: the claim is formulated as `openpgp4fpr:FINGEPRPRINT`
- message: the claim is formulated as `[Verifying my OpenPGP key: openpgp4fpr:FINGEPRPRINT]`
- fingerprint: the claim is formulated as `FINGEPRPRINT`