Constructor
new DidKeypair(keyPair, keyIdnullable)
Wraps supplied keypair into a `DidKeypair`.
Parameters:
Name |
Type |
Attributes |
Description |
keyPair |
*
|
|
|
keyId |
number
|
<nullable>
|
|
- Source:
Classes
- DidKeypair
Methods
(static) fromApi(dockApi, seed, keypairType, meta, keyId) → {DidKeypair}
Create a new keypair from a DockAPI object.
Parameters:
Name |
Type |
Description |
dockApi |
DockAPI
|
|
seed |
|
Generates 32-byte random seed if not provided |
keypairType |
|
Defaults to ed25519. |
meta |
|
|
keyId |
|
Defaults to 1 |
- Source:
Returns:
-
Type
-
DidKeypair
(static) randomSecp256k1(paramsnullable) → {this}
Generates random `Secp256k1` keypair.
Parameters:
Name |
Type |
Attributes |
Description |
params |
Object
|
<nullable>
|
|
Properties:
Name |
Type |
Attributes |
Description |
keyId |
number
|
<nullable>
|
optional keypair identifier |
- Source:
Returns:
-
Type
-
this