Class: KeyPair
utils/key_pair.KeyPair
Hierarchy
KeyPair
Constructors
constructor
new KeyPair()
Methods
getPublicKey
Abstract getPublicKey(): PublicKey
Returns
Defined in
sign
Abstract sign(message): Signature
Parameters
| Name | Type |
|---|---|
message | Uint8Array |
Returns
Defined in
toString
Abstract toString(): string
Returns
string
Defined in
verify
Abstract verify(message, signature): boolean
Parameters
| Name | Type |
|---|---|
message | Uint8Array |
signature | Uint8Array |
Returns
boolean
Defined in
fromRandom
Static fromRandom(curve): KeyPair
Parameters
| Name | Type | Description |
|---|---|---|
curve | string | Name of elliptical curve, case-insensitive |
Returns
Random KeyPair based on the curve
Defined in
fromString
Static fromString(encodedKey): KeyPair
Parameters
| Name | Type |
|---|---|
encodedKey | string |