ShieldedTransferContract constructor

ShieldedTransferContract({
  1. List<int>? transparentFromAddress,
  2. BigInt? fromAmount,
  3. List<SpendDescription>? spendDescription,
  4. List<ReceiveDescription>? receiveDescription,
  5. List<int>? bindingSignature,
  6. List<int>? transparentToAddress,
  7. BigInt? toAmount,
})

Create a new ShieldedTransferContract instance with specified parameters.

Implementation

ShieldedTransferContract(
    {List<int>? transparentFromAddress,
    this.fromAmount,
    List<SpendDescription>? spendDescription,
    List<ReceiveDescription>? receiveDescription,
    List<int>? bindingSignature,
    List<int>? transparentToAddress,
    this.toAmount})
    : transparentFromAddress =
          BytesUtils.tryToBytes(transparentFromAddress, unmodifiable: true),
      bindingSignature =
          BytesUtils.tryToBytes(bindingSignature, unmodifiable: true),
      transparentToAddress =
          BytesUtils.tryToBytes(transparentToAddress, unmodifiable: true),
      spendDescription = spendDescription == null
          ? null
          : List<SpendDescription>.unmodifiable(spendDescription),
      receiveDescription = receiveDescription == null
          ? null
          : List<ReceiveDescription>.unmodifiable(receiveDescription);