@did-btc1/keypair / ISecretKey
Interface: ISecretKey
Defined in: secret.ts:24
Interface for the SecretKey class. ISecretKey
Properties
bytes
> readonly
bytes: Bytes
Defined in: secret.ts:29
Get the secret key bytes.
hex
> readonly
hex: Hex
Defined in: secret.ts:42
Get the secret key as a hex string.
seed
> seed: bigint
Defined in: secret.ts:36
Getter returns the secret key bytes in bigint format. Setter allows alternative method of using a bigint seed for the entropy.
Methods
computePublicKey()
> computePublicKey(): Bytes
Defined in: secret.ts:55
Uses the secret key to compute the corresponding public key.
Returns
Bytes
A new PublicKey object.
equals()
> equals(other
): boolean
Defined in: secret.ts:49
Checks if this secret key is equal to another secret key.
Parameters
other
Returns
boolean
True if the private keys are equal.
isValid()
> isValid(): boolean
Defined in: secret.ts:61
Checks if the secret key is valid.
Returns
boolean
Whether the secret key is valid.
json()
> json(): SecretKeyObject
Defined in: secret.ts:68
JSON representation of a SecretKey object.
Returns
SecretKeyObject
The SecretKey as a JSON object.