The transaction body encapsulates the core details of a transaction.

Hierarchy

  • TransactionBody

Constructors

Properties

#auxiliaryDataHash: undefined | Hash32ByteBase16
#collateral: undefined | TransactionInputSet
#collateralReturn: undefined | Serialization.TransactionOutput
#currentTreasuryValue: undefined | bigint
#donation: undefined | bigint
#fee: bigint
#mint: undefined | Cardano.TokenMap
#networkId: undefined | Cardano.NetworkId
#originalBytes: undefined | HexBlob = undefined
#referenceInputs: undefined | TransactionInputSet
#scriptDataHash: undefined | Hash32ByteBase16
#totalCollateral: undefined | bigint
#ttl: undefined | Cardano.Slot
#update: undefined | Serialization.Update
#validityStartInterval: undefined | Cardano.Slot
#votingProcedures: undefined | Serialization.VotingProcedures
#withdrawals: undefined | Map<Cardano.RewardAccount, bigint>

Methods

  • Return collateral allows us to specify an output with the remainder of our collateral input(s) in the event we over-collateralize our transaction. This allows us to avoid overpaying the collateral and also creates the possibility for native assets to be also present in the collateral, though they will not serve as a payment for the fee.

    Parameters

    • collateralReturn: Serialization.TransactionOutput

      A type of change output specifically for collateral. Include this if the collateral input has an excess of ADA or includes other assets.

    Returns void

  • Sets the amount of ADA designated as the fee for this transaction. Fees compensate stakeholders, including stake pool operators, for participating in the network.

    Parameters

    • fee: bigint

      The amount of ADA designated as the fee for this transaction

    Returns void

  • The total collateral field lets users write transactions whose collateral is evident by just looking at the tx body instead of requiring information in the UTxO. The specification of total collateral is optional.

    It does not change how the collateral is computed but transactions whose collateral is different from the amount specified will be invalid.

    Parameters

    • totalCollateral: bigint

      The total collateral amount.

    Returns void

Generated using TypeDoc