Skip to main content

Class: AliasOutput

An Alias output.

Hierarchy

  • StateMetadataOutput

    AliasOutput

Table of contents

Constructors

Properties

Methods

Constructors

constructor

new AliasOutput(unlockConditions, amount, aliasId, stateIndex, foundryCounter)

Parameters

NameTypeDescription
unlockConditionsUnlockCondition[]The unlock conditions of the output.
amountbigintThe amount of the output.
aliasIdstringThe Alias ID as hex-encoded string.
stateIndexnumberA counter that must increase by 1 every time the alias is state transitioned.
foundryCounternumberA counter that denotes the number of foundries created by this alias account.

Overrides

StateMetadataOutput.constructor

Properties

amount

Readonly amount: string

Inherited from

StateMetadataOutput.amount


type

Readonly type: OutputType

Inherited from

StateMetadataOutput.type


unlockConditions

Readonly unlockConditions: UnlockCondition[]

Inherited from

StateMetadataOutput.unlockConditions


nativeTokens

Optional Readonly nativeTokens: INativeToken[]

Inherited from

StateMetadataOutput.nativeTokens


features

Optional Readonly features: Feature[]

Inherited from

StateMetadataOutput.features


immutableFeatures

Optional Readonly immutableFeatures: Feature[]

Inherited from

StateMetadataOutput.immutableFeatures


stateMetadata

Optional Readonly stateMetadata: string

Inherited from

StateMetadataOutput.stateMetadata


aliasId

Readonly aliasId: string

Unique identifier of the alias, which is the BLAKE2b-256 hash of the Output ID that created it. Unless its a newly created alias, then the id is zeroed.


stateIndex

Readonly stateIndex: number

A counter that must increase by 1 every time the alias is state transitioned.


foundryCounter

Readonly foundryCounter: number

A counter that denotes the number of foundries created by this alias account.

Methods

getType

getType(): OutputType

Get the type of output.

Returns

OutputType

Inherited from

StateMetadataOutput.getType


getAmount

getAmount(): bigint

Get the amount of the output.

Returns

bigint

Inherited from

StateMetadataOutput.getAmount


parse

Static parse(data): Output

Parse an output from a plain JS JSON object.

Parameters

NameType
dataany

Returns

Output

Inherited from

StateMetadataOutput.parse


getUnlockConditions

getUnlockConditions(): UnlockCondition[]

The unlock conditions for the output.

Returns

UnlockCondition[]

Inherited from

StateMetadataOutput.getUnlockConditions


getNativeTokens

getNativeTokens(): undefined | INativeToken[]

The native tokens held by the output.

Returns

undefined | INativeToken[]

Inherited from

StateMetadataOutput.getNativeTokens


getFeatures

getFeatures(): undefined | Feature[]

Get the features contained by the output.

Returns

undefined | Feature[]

Inherited from

StateMetadataOutput.getFeatures


getImmutableFeatures

getImmutableFeatures(): undefined | Feature[]

Immutable features contained by the output.

Returns

undefined | Feature[]

Inherited from

StateMetadataOutput.getImmutableFeatures


getStateMetadata

getStateMetadata(): undefined | string

Metadata that can only be changed by the state controller.

Returns

undefined | string

Inherited from

StateMetadataOutput.getStateMetadata


getAliasId

getAliasId(): string

Get the Alias ID of the output.

Returns

string


getStateIndex

getStateIndex(): number

Get the state index of the output.

Returns

number


getFoundryCounter

getFoundryCounter(): number

Get the Foundry counter of the output.

Returns

number