Constructs an instance of the RailgunWallet class.
The mnemonic phrase used to derive wallet nodes.
The derivation index for the wallet nodes (default is 0).
Initializes the key pairs and related cryptographic keys for the wallet node.
This method retrieves the spending key pair, nullifying key, and viewing key pair
from the respective nodes, and computes the master public key using the spending
public key and nullifying key. The keys are then stored in the keystore property.
spendingKeyPair is used for signing transactions.nullifyingKey is used for nullifying commitments.viewingKeyPair is used for viewing encrypted data.masterPublicKey is derived from the spending public key and nullifying key.Retrieves the spending public key from the keystore.
The spending public key associated with the keystore.
The
RailgunWalletclass provides functionality for managing cryptographic keys and interacting with wallet nodes in a blockchain network. It encapsulates operations related to key management, including spending, viewing, and nullifying keys, as well as deriving master public keys.Features:
Usage:
Example:
The
RailgunWalletclass assumes that the wallet nodes and keystore are properly initialized. Attempting to access keys without initialization will result in errors.Throws
If the keystore is not initialized when accessing keys.