Skip to main content

Class: Output

The base class for outputs.

Hierarchy

Table of contents

Constructors

Properties

Methods

Constructors

constructor

new Output(type, amount)

Parameters

NameTypeDescription
typeOutputTypeThe type of output.
amountstring | bigintThe amount of the output as big-integer or string.

Properties

amount

Readonly amount: string


type

Readonly type: OutputType

Methods

getType

getType(): OutputType

Get the type of output.

Returns

OutputType


getAmount

getAmount(): bigint

Get the amount of the output.

Returns

bigint


parse

Static parse(data): Output

Parse an output from a plain JS JSON object.

Parameters

NameType
dataany

Returns

Output