HDWallet

class HDWallet

Hierarchical Deterministic (HD) Wallet

Constructors

Link copied to clipboard
open fun HDWallet(strength: Int, passphrase: String)
Creates a new HDWallet with a new random mnemonic with the provided strength in bits.
Link copied to clipboard
open fun HDWallet(mnemonic: String, passphrase: String)
Creates an HDWallet from a valid BIP39 English mnemonic and a passphrase.
Link copied to clipboard
open fun HDWallet(mnemonic: String, passphrase: String, check: Boolean)
Creates an HDWallet from a BIP39 mnemonic, a passphrase and validation flag.
Link copied to clipboard
open fun HDWallet(entropy: Array<Byte>, passphrase: String)
Creates an HDWallet from entropy (corresponding to a mnemonic).

Functions

Link copied to clipboard
open fun entropy(): Array<Byte>
Wallet entropy
Link copied to clipboard
open fun getAddressDerivation(coin: CoinType, derivation: Derivation): String
Generates the default address for the specified coin and derivation (without exposing intermediary private key).
Link copied to clipboard
open fun getAddressForCoin(coin: CoinType): String
Generates the default address for the specified coin (without exposing intermediary private key), default derivation.
Link copied to clipboard
open fun getDerivedKey(coin: CoinType, account: Int, change: Int, address: Int): PrivateKey
Shortcut method to generate private key with the specified account/change/address (bip44 standard).
Link copied to clipboard
open fun getExtendedPrivateKey(purpose: Purpose, coin: CoinType, version: HDVersion): String
Returns the extended private key (for default 0 account).
Link copied to clipboard
open fun getExtendedPrivateKeyAccount(purpose: Purpose, coin: CoinType, derivation: Derivation, version: HDVersion, account: Int): String
Returns the extended private key, for custom account.
Link copied to clipboard
open fun getExtendedPrivateKeyDerivation(purpose: Purpose, coin: CoinType, derivation: Derivation, version: HDVersion): String
Returns the extended private key (for default 0 account with derivation).
Link copied to clipboard
open fun getExtendedPublicKey(purpose: Purpose, coin: CoinType, version: HDVersion): String
Returns the extended public key (for default 0 account).
Link copied to clipboard
open fun getExtendedPublicKeyAccount(purpose: Purpose, coin: CoinType, derivation: Derivation, version: HDVersion, account: Int): String
Returns the extended public key, for custom account.
Link copied to clipboard
open fun getExtendedPublicKeyDerivation(purpose: Purpose, coin: CoinType, derivation: Derivation, version: HDVersion): String
Returns the extended public key (for default 0 account with derivation).
Link copied to clipboard
open fun getKey(coin: CoinType, derivationPath: String): PrivateKey
Generates the private key for the specified derivation path.
Link copied to clipboard
open fun getKeyByCurve(curve: Curve, derivationPath: String): PrivateKey
Generates the private key for the specified derivation path and curve.
Link copied to clipboard
open fun getKeyDerivation(coin: CoinType, derivation: Derivation): PrivateKey
Generates the private key for the specified derivation.
Link copied to clipboard
open fun getKeyForCoin(coin: CoinType): PrivateKey
Generates the default private key for the specified coin, using default derivation.
Link copied to clipboard
open fun getMasterKey(curve: Curve): PrivateKey
Returns master key.
Link copied to clipboard
open fun getPublicKeyFromExtended(extended: String, coin: CoinType, derivationPath: String): PublicKey
Computes the public key from an extended public key representation.
Link copied to clipboard
open fun mnemonic(): String
Wallet Mnemonic
Link copied to clipboard
open fun seed(): Array<Byte>
Wallet seed.