Derives and returns an extended account public key.
The derivation path for the account.
A promise that resolves with the extended account public key.
Retrieves the securely stored private key.
The derivation path specifying which key to retrieve.
A promise that resolves with the private key.
Serializes the encrypted key data for secure storage into a binary format.
The binary format is:
[ 4-byte magic | 1-byte version | 1-byte type | 4-byte data_len | data | 4-byte crc32 checksum ]
A promise that resolves with the serialized and encrypted key data.
Signs arbitrary data using a BIP32-derived key.
The hex-encoded data to be signed.
The derivation path specifying which key to use for signing.
A promise that resolves with an object containing the signature and the public key.
Signs a transaction using BIP32-derived keys.
The transaction to sign, as a CBOR-encoded hex string.
The paths to the keys needed for signing.
A promise that resolves with the set of witnesses containing the signatures.
StaticdeserializeDeserializes an encrypted key handler from a byte array.
The binary format is:
[ 4-byte magic | 1-byte version | 1-byte type | 4-byte data_len | data | 4-byte crc32 checksum ]
The serialized and encrypted key data.
An async function called when the passphrase is needed.
A new instance of the key handler.
StaticfromCreates a new BIP32-based key handler from entropy and a passphrase.
The entropy bytes for the root key.
The passphrase to initially encrypt the key.
An async function that will be called whenever the passphrase is needed for cryptographic operations.
A new instance of the key handler.
A software-based implementation of a secure key handler for BIP32 hierarchical deterministic keys.
This class securely manages a root key by encrypting it with a passphrase. The passphrase is provided on-demand via an asynchronous callback, and the decrypted key material only exists in memory for the brief moment it's needed for an operation, after which it is securely wiped.