Helios API/ API Reference/ Classes/

TxId

Represents the hash of a transaction.

This is also used to identify an UTxO (along with the index of the UTxO in the list of UTxOs created by the transaction).

Hierarchy

Index

Constructors

constructor

new TxId(props)

Parameters

NameType
propsHashProps

Inherited from

Hash.constructor

Properties

bytes

Readonly bytes: number[]

Inherited from

Hash.bytes

Accessors

hex

get hex(): string

Hexadecimal representation.

Returns

string

Inherited from

Hash.hex

Methods

eq

eq(other): boolean

Parameters

NameType
otherHash

Returns

boolean

Inherited from

Hash.eq

toCbor

toCbor(): number[]

Returns

number[]

Inherited from

Hash.toCbor

toCborHex

toCborHex(): string

Returns

string

Inherited from

Hash.toCborHex

toSchemaJson

toSchemaJson(): string

Returns

string

Inherited from

Hash.toSchemaJson

compare

Static compare(a, b): number

Parameters

NameType
aHash
bHash

Returns

number

Inherited from

Hash.compare

dummy

Static dummy(fill?): TxId

Filled with 255 so that the internal show() function has max execution budget cost

Parameters

NameType
fill?number

Returns

TxId

fromCbor

Static fromCbor(bytes): Hash

Used internally for metadataHash and scriptDataHash

Parameters

NameType
bytesnumber[]

Returns

Hash

Inherited from

Hash.fromCbor

fromHex

Static fromHex(str): Hash

Might be needed for internal use

Parameters

NameType
strstring

Returns

Hash

Inherited from

Hash.fromHex

fromProps

Static fromProps(props): Hash

Parameters

NameType
propsHash | HashProps

Returns

Hash

Inherited from

Hash.fromProps

fromUplcCbor

Static fromUplcCbor(bytes): TxId

Parameters

NameType
bytesstring | number[]

Returns

TxId

fromUplcData

Static fromUplcData(data): TxId

Parameters

NameType
dataUplcData

Returns

TxId