BIP32HWallet class
Constructors
- BIP32HWallet.fromMnemonic(String mnemonic, {String passphrase = "", String key = _bitcoinKey})
-
Factory constructor to create a BIP32 hierarchical wallet from a mnemonic.
factory
- BIP32HWallet.fromSecretStorage(String encryptedWallet, String password)
-
Factory constructor to create a BIP32 hierarchical wallet from secret storage.
factory
- BIP32HWallet.fromXPrivateKey(String xPrivateKey, {bool? foreRootKey, CurrencySymbol currencySymbol = CurrencySymbol.btc})
-
Creates a BIP32 hierarchical wallet from an extended private key.
factory
- BIP32HWallet.fromXpublicKey(String xPublicKey, {CurrencySymbol currencySymbol = CurrencySymbol.btc, bool? forceRootKey})
-
Creates a BIP32 hierarchical wallet from an extended public key (xPub).
factory
Properties
- chainCode → Uint8List
-
Override to get the chain code associated with this BIP32 hierarchical wallet.
no setteroverride
- depth → int
-
Gets the depth of this BIP32 hierarchical wallet in the hierarchical structure.
no setteroverride
- fingerPrint → Uint8List
-
The fingerprint of the wallet.
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
- index → int
-
Gets the index of this BIP32 hierarchical wallet in the hierarchical structure.
no setteroverride
- isPublicKeyWallet → bool
-
Indicates whether this is a public key wallet.
no setter
- isRoot → bool
-
Indicates whether this BIP32 hierarchical wallet is the root wallet.
latefinal
- privateKey → Uint8List
-
The private key associated with this wallet.
no setteroverride
- publicKey → Uint8List
-
The public key associated with this wallet.
no setteroverride
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toSecretStorage(
String password, {ExtendedKeyType semantic = ExtendedKeyType.p2pkh, CurrencySymbol currencySymbol = CurrencySymbol.btc, SecretWalletEncoding encoding = SecretWalletEncoding.json}) → String - Converts the BIP32 hierarchical wallet data into a secure JSON representation for secret storage.
-
toString(
) → String -
A string representation of this object.
inherited
-
toXpriveKey(
{ExtendedKeyType semantic = ExtendedKeyType.p2pkh, CurrencySymbol currencySymbol = CurrencySymbol.btc}) → String - Generates an extended private key (xPrv) string for this hierarchical wallet.
-
toXpublicKey(
{ExtendedKeyType semantic = ExtendedKeyType.p2pkh, CurrencySymbol currencySymbol = CurrencySymbol.btc}) → String - Converts the BIP32 hierarchical wallet to its extended public key representation.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
drivePath(
BIP32HWallet masterWallet, String path) → BIP32HWallet - Drives and returns a hierarchical wallet (BIP32HWallet) along the specified BIP32 derivation path.
-
isRootKey(
String xPrivateKey, Cryptocurrency cryptocurrency, {bool isPublicKey = false}) → (bool, Uint8List) - Determines whether a given extended private or public key is a root key.
-
isValidPath(
String path) → bool - Checks if a given BIP32 derivation path is valid.