Retrieves the securely stored private key.
A promise that resolves with the private key.
Retrieves the public key corresponding to the securely stored private key.
A promise that resolves with the corresponding Ed25519PublicKey.
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 the securely stored Ed25519 private key.
The hex-encoded data to be signed.
A promise that resolves with an object containing the signature and the public key.
Signs a transaction using the securely stored Ed25519 private key.
The transaction to sign, as a CBOR-encoded hex string.
A promise that resolves with the VkeyWitnessSet containing the signature.
StaticdeserializeDeserializes an encrypted Ed25519 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 Ed25519-based key handler from a raw private key and a passphrase.
The raw Ed25519 private key.
The passphrase to initially encrypt the key.
An async function called when the passphrase is needed for cryptographic operations.
A new instance of the key handler.
A software-based implementation of a secure key handler for single Ed25519 keys.
This class securely manages a single private 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.