Skip to main content

TxChain

export interface TxChain {
  collectInputs(
    includeRefInputs: boolean,
    includeCollateral: boolean
  ): TxInput[]
  collectOutputs(): TxInput[]
  txs: Tx[]
}

Properties

collectInputs

Returns all the inputs that aren't spent by the chain itself (i.e. these inputs must exist before the chain is submitted)

txChain.collectInputs satisfies (
  includeRefInputs: boolean,
  includeCollateral: boolean
) => TxInput[]

collectOutputs

Collects all outputs that are spent by the chain itself (i.e. these outputs will be available as UTxOs once the chain is submitted)

Returns as TxInput instead of TxOutput so that TxOutputId is included

txChain.collectOutputs satisfies () => TxInput[]

txs

txChain.txs satisfies Tx[]