ZCashAccount class

Represents a ZCash account, optionally holding Sapling, Orchard, and Transparent keys.

Constructors

ZCashAccount({Zip32Sapling? sapling, Zip32Orchard? orchard, Bip32Slip10Secp256k1? transparent, required ZCashAccountConfig config, required ZCryptoContext context})
factory
ZCashAccount.fromOrchardFullViewKey({required List<int> fullViewKeyBytes, required ZCashAccountConfig config, required ZCryptoContext context})
factory
ZCashAccount.fromSaplingExtendedFullViewKey({required String uskBytes, required ZCashAccountConfig config, required ZCryptoContext context})
factory
ZCashAccount.fromSaplingExtendedSpendingKey({required String extendedKey, required ZCashAccountConfig config, required ZCryptoContext context})
factory
ZCashAccount.fromSeed({required List<int> seedBytes, required ZCashAccountConfig config, required ZCryptoContext context, Bip32KeyIndex? accountIndex})
factory
ZCashAccount.fromUnifiedFullViewKey({required String ufvk, required ZCashAccountConfig config, required ZCryptoContext context})
factory
ZCashAccount.fromUnifiedSpendKeyBytes({required List<int> uskBytes, required ZCashAccountConfig config, required ZCryptoContext context})
factory

Properties

config ZCashAccountConfig
Configuration specifying which key types are enabled/required.
final
context ZCryptoContext
Crypto context used for derivations and encoding.
final
hashCode int
The hash code for this object.
no setterinherited
orchard Zip32Orchard?
Orchard extended key.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
sapling Zip32Sapling?
Sapling extended key.
final
transparent Bip32Slip10Secp256k1?
Transparent extended key.
final

Methods

address({required DiversifierIndex index, UnifiedAddressRequest? request, Bip44Changes scope = Bip44Changes.chainExt}) UnifiedDerivedAddress
Returns the unified address at the given index, using the specified address request configuration.
defaultAddress({UnifiedAddressRequest? request, Bip44Changes scope = Bip44Changes.chainExt}) UnifiedDerivedAddress
Returns the default unified address for this account using the specified request configuration.
defaultTransparentAddress({Bip44Changes scope = Bip44Changes.chainExt, PubKeyModes pubKeyMode = PubKeyModes.compressed, List<int>? transparentScriptHash, TransparentAddressRequestType transparentAddressType = TransparentAddressRequestType.p2pkh}) TransparentDerivedAddress
Returns the default transparent-derived address with the specified pubkey mode and address type.
encodeOrchardFullViewKey() List<int>
Encodes the Orchard full viewing key as raw bytes.
encodeSaplingExtendedFullViewKey() String
Encodes the Sapling extended full viewing key as a Bech32 string.
encodeSaplingExtendedSpendKey() String
Encodes the Sapling extended spending key as a Bech32 string.
encodeTransparentFullViewKey() String
Encodes the Transparent full viewing key as a string.
encodeUnifiedFullViewKey() String
Encodes this unified full viewing key (UFVK) as a unified string.
encodeUnifiedIncomingViewKey() String
Encodes this unified incoming viewing key (UIVK) as a unified string.
encodeUnifiedSpeningKeyBytes() List<int>
Encodes this unified spending key (USK) into unified bytes.
findAddress({required DiversifierIndex from, Bip44Changes scope = Bip44Changes.chainExt, UnifiedAddressRequest? request}) UnifiedDerivedAddress
Finds the first unified address starting from the given index that matches the specified request.
findSaplingAddressFrom(DiversifierIndex from, {Bip44Changes scope = Bip44Changes.chainExt}) SaplingDerivedAddress?
Finds the first Sapling-derived address starting from the given diversifier index within the specified scope.
getOrchard() Zip32Orchard
Returns the Orchard ZIP32 component, or throws if missing.
getSapling() Zip32Sapling
Returns the Sapling ZIP32 component, or throws if missing.
getTransparent() Bip32Base<Bip32Base>
Returns the Transparent BIP32 component, or throws if missing.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
saplingAddressAt(DiversifierIndex index, {Bip44Changes scope = Bip44Changes.chainExt}) SaplingDerivedAddress
Returns the Sapling-derived address at the given diversifier index.
toString() String
A string representation of this object.
inherited
toUnifiedFullViewingKey() UnifiedFullViewingKey
Converts this object into a unified full viewing key (UFVK), caches the result.
toUnifiedIncomingViewingKey({Bip44Changes scope = Bip44Changes.chainExt}) UnifiedIncomingViewingKey
Converts this object into a unified incoming viewing key (UIVK).
toUnifiedSpendKey() UnifiedSpendingKey
Converts this object into a unified spending key (USK), requires all components.
transparentAddress(DiversifierIndex index, {Bip44Changes scope = Bip44Changes.chainExt, PubKeyModes pubKeyMode = PubKeyModes.compressed, List<int>? transparentScriptHash, TransparentAddressRequestType transparentAddressType = TransparentAddressRequestType.p2pkh}) TransparentDerivedAddress
Returns the transparent-derived address at the given index with specified pubkey mode and address type.

Operators

operator ==(Object other) bool
The equality operator.
inherited