new GpgLinkedDataKeyClass2020(options)
- Source:
Parameters:
Name | Type | Description | ||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
options |
KeyPairOptions | The options to use.
Properties
|
Members
privateKey
- Source:
Returns the JWK encoded private key.
publicKey
- Source:
Returns the JWK encoded public key.
Methods
addEncodedPublicKey(publicKeyNode) → {Object}
- Source:
Adds a public key base to a public key node.
Parameters:
Name | Type | Description | ||||||
---|---|---|---|---|---|---|---|---|
publicKeyNode |
Object | The public key node in a jsonld-signature.
Properties
|
Returns:
A PublicKeyNode in a block.
- Type
- Object
(async) fingerprint() → {string}
- Source:
Generates and returns a public key fingerprint using https://tools.ietf.org/html/rfc7638
Returns:
The fingerprint.
- Type
- string
publicNode(optionsopt) → {Object}
- Source:
Contains the public key for the KeyPair
and other information that json-ld Signatures can use to form a proof.
Parameters:
Name | Type | Attributes | Default | Description | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
options |
Object |
<optional> |
{}
|
Needs either a controller or owner.
Properties
|
Returns:
A public node with
information used in verification methods by signatures.
- Type
- Object
signer() → {Object}
- Source:
Returns a signer object for use with jsonld-signatures.
Returns:
A signer for the json-ld block.
- Type
- Object
verifier() → {Object}
- Source:
Returns a verifier object for use with jsonld-signatures.
Returns:
Used to verify jsonld-signatures.
- Type
- Object
(async) verifyFingerprint(fingerprint) → {Object}
- Source:
Tests whether the fingerprint was generated from a given key pair.
Parameters:
Name | Type | Description |
---|---|---|
fingerprint |
string | A JWK public key. |
Returns:
An object indicating valid is true or false.
- Type
- Object
(async, static) fingerprintFromPublicKey(publicKeyGpg) → {string}
- Source:
Generates and returns a public key fingerprint using https://tools.ietf.org/html/rfc7638
Parameters:
Name | Type | Description |
---|---|---|
publicKeyGpg |
string | The ascii armor encoded public key material. |
Returns:
The fingerprint.
- Type
- string
(async, static) generate(optionsopt) → {Promise.<GpgLinkedDataKeyClass2020>}
- Source:
Generates a KeyPair with an optional deterministic seed.
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
options |
KeyPairOptions |
<optional> |
{}
|
The options to use. |
Returns:
Generates a key pair.
- Type
- Promise.<GpgLinkedDataKeyClass2020>