ZCashAccount.fromUnifiedSpendKeyBytes constructor
ZCashAccount.fromUnifiedSpendKeyBytes({
- required List<
int> uskBytes, - required ZCashAccountConfig config,
- required ZCryptoContext context,
Implementation
factory ZCashAccount.fromUnifiedSpendKeyBytes({
required List<int> uskBytes,
required ZCashAccountConfig config,
required ZCryptoContext context,
}) {
final decode = ZCashEncodingUtils.decodeUnifiedSpendKey(uskBytes);
return ZCashAccount._(
config: config,
context: context,
sapling: Zip32Sapling.fromExtendedSpendingKeyBytes(
decode.firstWhere((e) => e.type == Typecode.sapling).data,
),
orchard: Zip32Orchard.fromSpendKey(
context: context,
sk: decode.firstWhere((e) => e.type == Typecode.orchard).data,
),
transparent: Bip32Slip10Secp256k1.fromExtendedPrivateKeyBytes(
decode.firstWhere((e) => e.type == Typecode.p2pkh).data,
),
);
}