ZCashAccount.fromSaplingExtendedSpendingKey constructor

ZCashAccount.fromSaplingExtendedSpendingKey({
  1. required String extendedKey,
  2. required ZCashAccountConfig config,
  3. required ZCryptoContext context,
})

Implementation

factory ZCashAccount.fromSaplingExtendedSpendingKey({
  required String extendedKey,
  required ZCashAccountConfig config,
  required ZCryptoContext context,
}) {
  final key = ZCashEncodingUtils.decodeSaplingExtendedSpendingKey(
    extendedKey,
    config.coinConfig.hrpSaplingExtendedSpendingKey,
  );
  return ZCashAccount._(
    config: config,
    context: context,
    sapling: Zip32Sapling.fromExtendedSpendingKeyBytes(key),
    orchard: null,
    transparent: null,
  );
}