Skip to main content

TxOutput

export interface TxOutput<SC extends SpendingCredential = SpendingCredential> {
  address: Address<SC>
  calcDeposit(params: NetworkParams): bigint
  copy(): TxOutput<SC>
  correctLovelace(
    params: NetworkParams,
    updater?: (output: TxOutput<SC>) => void
  ): void
  datum: undefined | TxOutputDatum
  dump(): any
  encodingConfig: TxOutputEncodingConfig
  kind: "TxOutput"
  refScript: undefined | UplcProgram
  toCbor(): number[]
  toUplcData(): ConstrData
  value: Value
}
Represents a transaction output that is used when building a transaction.

Properties​

address​

address: Address<SC>

calcDeposit​

calcDeposit(params: NetworkParams): bigint

copy​

copy(): TxOutput<SC>
Deep copy of the TxOnput so that Network interfaces don't allow accidental mutation of the underlying data

correctLovelace​

correctLovelace(
  params: NetworkParams,
  updater?: (output: TxOutput<SC>) => void
): void

datum​

datum: undefined | TxOutputDatum

dump​

dump(): any

encodingConfig​

encodingConfig: TxOutputEncodingConfig

kind​

kind: "TxOutput"

refScript​

refScript: undefined | UplcProgram

toCbor​

toCbor(): number[]

toUplcData​

toUplcData(): ConstrData

value​

value: Value