Helios API/ API Reference/ Classes/

AssetClass

Represents a MintingPolicyHash combined with a token name.

Hierarchy

Index

Constructors

constructor

new AssetClass(props)

Intelligently converts arguments.

The format for single argument string is ".".

Parameters

NameType
propsAssetClassProps

Overrides

HeliosData.constructor

Accessors

mintingPolicyHash

get mintingPolicyHash(): MintingPolicyHash

Returns

MintingPolicyHash

tokenName

get tokenName(): ByteArray

Returns

ByteArray

ADA

Static get ADA(): AssetClass

Returns

AssetClass

Methods

_toUplcData

_toUplcData(): ConstrData

Used when generating script contexts for running programs

Returns

ConstrData

toCbor

toCbor(): number[]

Returns

number[]

Inherited from

HeliosData.toCbor

toCborHex

toCborHex(): string

Returns

string

Inherited from

HeliosData.toCborHex

toFingerprint

toFingerprint(): string

Cip14 fingerprint This involves a hash, so you can't use a fingerprint to calculate the underlying policy/tokenName.

Returns

string

toSchemaJson

toSchemaJson(): string

Returns

string

Inherited from

HeliosData.toSchemaJson

fromCbor

Static fromCbor(bytes): AssetClass

Deserializes bytes into an AssetClass.

Parameters

NameType
bytesnumber[]

Returns

AssetClass

fromProps

Static fromProps(props): AssetClass

Parameters

NameType
propsAssetClass | AssetClassProps

Returns

AssetClass

fromUplcCbor

Static fromUplcCbor(bytes): AssetClass

Parameters

NameType
bytesstring | number[]

Returns

AssetClass

fromUplcData

Static fromUplcData(data): AssetClass

Parameters

NameType
dataUplcData

Returns

AssetClass