Helios API/ API Reference/ Classes/

TxBody

inputs, minted assets, and withdrawals need to be sorted in order to form a valid transaction

Hierarchy

Index

Constructors

constructor

new TxBody()

Inherited from

CborData.constructor

Accessors

collateral

get collateral(): TxInput[]

Returns

TxInput[]

dcerts

get dcerts(): DCert[]

Returns

DCert[]

fee

get fee(): bigint

Returns

bigint

firstValidSlot

get firstValidSlot(): null | bigint

Returns

null | bigint

inputs

get inputs(): TxInput[]

Returns

TxInput[]

lastValidSlot

get lastValidSlot(): null | bigint

Returns

null | bigint

minted

get minted(): Assets

Returns

Assets

outputs

get outputs(): TxOutput[]

Returns

TxOutput[]

refInputs

get refInputs(): TxInput[]

Returns

TxInput[]

signers

get signers(): PubKeyHash[]

Returns

PubKeyHash[]

Methods

dump

dump(): any

Returns

any

sumInputAndMintedAssets

sumInputAndMintedAssets(): Assets

Returns

Assets

sumInputAndMintedValue

sumInputAndMintedValue(): Value

Throws error if any part of the sum is negative (i.e. more is burned than input)

Returns

Value

sumInputValue

sumInputValue(): Value

Returns

Value

sumOutputAssets

sumOutputAssets(): Assets

Returns

Assets

sumOutputValue

sumOutputValue(): Value

Returns

Value

toCbor

toCbor(): number[]

Returns

number[]

Inherited from

CborData.toCbor

toCborHex

toCborHex(): string

Returns

string

Inherited from

CborData.toCborHex

fromCbor

Static fromCbor(bytes): TxBody

Parameters

NameType
bytesnumber[]

Returns

TxBody