ZCashAccountConfig constructor

ZCashAccountConfig({
  1. bool? orchard,
  2. bool? sapling,
  3. bool? transparent,
  4. required ZCashNetwork network,
})

Implementation

factory ZCashAccountConfig({
  final bool? orchard,
  final bool? sapling,
  final bool? transparent,
  required ZCashNetwork network,
}) {
  if (orchard == false && sapling == false && transparent == false) {
    throw ArgumentException.invalidOperationArguments(
      "ZCashAccountConfig",
      reason:
          "Invalid account configuration: at least one key type must be enabled.",
    );
  }
  final conf = ZcashConf();
  return ZCashAccountConfig._(
    coinConfig: conf.fromNetwork(network),
    orchard: orchard,
    sapling: sapling,
    transparent: transparent,
  );
}