Skip to main content

Class: NftOutput

An NFT output.

Hierarchy

  • ImmutableFeaturesOutput

    NftOutput

Table of contents

Constructors

Properties

Methods

Constructors

constructor

new NftOutput(amount, nftId, unlockConditions)

Parameters

NameTypeDescription
amountbigintThe amount of the output.
nftIdstringThe NFT ID as hex-encoded string.
unlockConditionsUnlockCondition[]The unlock conditions of the output.

Overrides

ImmutableFeaturesOutput.constructor

Properties

amount

Readonly amount: string

Inherited from

ImmutableFeaturesOutput.amount


type

Readonly type: OutputType

Inherited from

ImmutableFeaturesOutput.type


unlockConditions

Readonly unlockConditions: UnlockCondition[]

Inherited from

ImmutableFeaturesOutput.unlockConditions


nativeTokens

Optional Readonly nativeTokens: INativeToken[]

Inherited from

ImmutableFeaturesOutput.nativeTokens


features

Optional Readonly features: Feature[]

Inherited from

ImmutableFeaturesOutput.features


immutableFeatures

Optional Readonly immutableFeatures: Feature[]

Inherited from

ImmutableFeaturesOutput.immutableFeatures


nftId

Readonly nftId: string

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

Methods

getType

getType(): OutputType

Get the type of output.

Returns

OutputType

Inherited from

ImmutableFeaturesOutput.getType


getAmount

getAmount(): bigint

Get the amount of the output.

Returns

bigint

Inherited from

ImmutableFeaturesOutput.getAmount


parse

Static parse(data): Output

Parse an output from a plain JS JSON object.

Parameters

NameType
dataany

Returns

Output

Inherited from

ImmutableFeaturesOutput.parse


getUnlockConditions

getUnlockConditions(): UnlockCondition[]

The unlock conditions for the output.

Returns

UnlockCondition[]

Inherited from

ImmutableFeaturesOutput.getUnlockConditions


getNativeTokens

getNativeTokens(): undefined | INativeToken[]

The native tokens held by the output.

Returns

undefined | INativeToken[]

Inherited from

ImmutableFeaturesOutput.getNativeTokens


getFeatures

getFeatures(): undefined | Feature[]

Get the features contained by the output.

Returns

undefined | Feature[]

Inherited from

ImmutableFeaturesOutput.getFeatures


getImmutableFeatures

getImmutableFeatures(): undefined | Feature[]

Immutable features contained by the output.

Returns

undefined | Feature[]

Inherited from

ImmutableFeaturesOutput.getImmutableFeatures


getNftId

getNftId(): string

Get the NFT ID of the output.

Returns

string