Represents a UTXO (Unspent Transaction Output).

Implements

Implements

  • UTXOLike

Constructors

new UTXO()

new UTXO(): UTXO

Constructs a new UTXO instance with null properties.

Returns

UTXO

Source

transaction/utxo.ts:264

Accessors

address

get address(): string

Gets the address.

set address(value): void

Sets the address.

Throws

If the address is invalid.

Parameters

ParameterTypeDescription
valuestringThe address.

Returns

string

The address.

Source

transaction/utxo.ts:210


denomination

get denomination(): null | number

Gets the denomination.

set denomination(value): void

Sets the denomination.

Throws

If the denomination value is invalid.

Parameters

ParameterTypeDescription
valuenull | numberThe denomination.

Returns

null | number

The denomination.

Source

transaction/utxo.ts:230


index

get index(): null | number

Gets the index.

set index(value): void

Sets the index.

Parameters

ParameterTypeDescription
valuenull | numberThe index.

Returns

null | number

The index.

Source

transaction/utxo.ts:192


txhash

get txhash(): null | string

Gets the transaction hash.

set txhash(value): void

Sets the transaction hash.

Parameters

ParameterTypeDescription
valuenull | stringThe transaction hash.

Returns

null | string

The transaction hash.

Source

transaction/utxo.ts:174

Methods

toJSON()

toJSON(): any

Converts the UTXO instance to a JSON object.

Returns

any

A JSON representation of the UTXO instance.

Source

transaction/utxo.ts:277


from()

static from(utxo): UTXO

Creates a UTXO instance from a UTXOLike object.

Parameters

ParameterTypeDescription
utxoUTXOLikeThe UTXOLike object to convert.

Returns

UTXO

The UTXO instance.

Source

transaction/utxo.ts:292