- Description:
Fetch proofs from OpenPGP notations
- Source:
Fetch proofs from OpenPGP notations
Example
import { fetcher, enums as E } from 'doipjs';
const hkpProtocol = E.OpenPgpQueryProtocol.HKP;
const hkpUrl = 'https://keys.openpgp.org/vks/v1/by-fingerprint/ABC123DEF456';
const hkpData = await fetcher.openpgp.fn({ url: hkpUrl, protocol: hkpProtocol });
const wkdProtocol = E.OpenPgpQueryProtocol.WKD;
const wkdUrl = 'https://domain.example/.well-known/openpgpkey/hu/kei1q4tipxxu1yj79k9kfukdhfy631xe?l=alice';
const wkdData = await fetcher.openpgp.fn({ url: wkdUrl, protocol: wkdProtocol });
Members
(static, constant) timeout :number
- Description:
Default timeout after which the fetch is aborted
- Source:
- Default Value:
- 5000
Default timeout after which the fetch is aborted
Type:
- number
Methods
(static) fn(data, optsopt) → {Promise.<object>}
- Description:
Execute a fetch request
- Source:
Parameters:
Name | Type | Attributes | Description | ||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
data |
object | Data used in the request Properties
|
|||||||||||||||||
opts |
module:types~VerificationConfig |
<optional> |
Options used to enable the request |
Returns:
The fetched notations from an OpenPGP key
- Type
- Promise.<object>