ShelleyTransaction constructor

ShelleyTransaction({
  1. required ShelleyTransactionBody body,
  2. ShelleyTransactionWitnessSet? witnessSet,
  3. bool? isValid = true,
  4. CBORMetadata? metadata,
})

Implementation

ShelleyTransaction(
    {required ShelleyTransactionBody body,
    this.witnessSet,
    this.isValid = true,
    this.metadata})
    : body = ShelleyTransactionBody(
        //rebuild body to include metadataHash
        inputs: body.inputs,
        outputs: body.outputs,
        fee: body.fee,
        ttl: body.ttl,
        metadataHash:
            metadata?.hash, //optionally add hash if metadata present
        validityStartInterval: body.validityStartInterval,
        mint: body.mint,
      );