SaplingExtendedFullViewKey.fromBytes constructor
SaplingExtendedFullViewKey.fromBytes(
- List<int> bytes
)
Implementation
factory SaplingExtendedFullViewKey.fromBytes(List<int> bytes) {
bytes = bytes.exc(
operation: "SaplingExtendedFullViewKey",
name: "bytes",
reason: "Invalid sapling extended full view key bytes length.",
length: 169,
);
return SaplingExtendedFullViewKey(
fvk: SaplingFullViewingKey.fromBytes(bytes.sublist(9 + 32, 9 + 32 + 96)),
keyData: SaplingZip32KeyData(
depth: Bip32Depth(bytes[0]),
fingerPrint: Bip32FingerPrint(bytes.sublist(1, 5)),
index: Bip32KeyIndex.fromBytes(bytes.sublist(5, 9)),
chainCode: Bip32ChainCode(bytes.sublist(9, 9 + 32)),
dk: SaplingDiversifierKey(bytes.sublist(9 + 32 + 96)),
),
);
}