Skip to main content

Class: CommonOutput

The base class for common outputs.

Hierarchy

Table of contents

Constructors

Properties

Methods

Constructors

constructor

new CommonOutput(type, amount, unlockConditions)

Parameters

NameTypeDescription
typeOutputTypeThe type of output.
amountbigintThe amount of the output.
unlockConditionsUnlockCondition[]Conditions to unlock the output.

Overrides

Output.constructor

Properties

amount

Readonly amount: string

Inherited from

Output.amount


type

Readonly type: OutputType

Inherited from

Output.type


unlockConditions

Readonly unlockConditions: UnlockCondition[]


nativeTokens

Optional Readonly nativeTokens: INativeToken[]


features

Optional Readonly features: Feature[]

Methods

getType

getType(): OutputType

Get the type of output.

Returns

OutputType

Inherited from

Output.getType


getAmount

getAmount(): bigint

Get the amount of the output.

Returns

bigint

Inherited from

Output.getAmount


parse

Static parse(data): Output

Parse an output from a plain JS JSON object.

Parameters

NameType
dataany

Returns

Output

Inherited from

Output.parse


getUnlockConditions

getUnlockConditions(): UnlockCondition[]

The unlock conditions for the output.

Returns

UnlockCondition[]


getNativeTokens

getNativeTokens(): undefined | INativeToken[]

The native tokens held by the output.

Returns

undefined | INativeToken[]


getFeatures

getFeatures(): undefined | Feature[]

Get the features contained by the output.

Returns

undefined | Feature[]