Skip to main content
Version: 23.0.x

Class: MetadataEntry

api/entities/MetadataEntry.MetadataEntry

Represents an Asset MetadataEntry in the Polymesh blockchain

Hierarchy

Properties

asset

asset: BaseAsset

Asset for which this is the metadata

Defined in

api/entities/MetadataEntry/index.ts:37


id

id: BigNumber

identifier number of the MetadataEntry

Defined in

api/entities/MetadataEntry/index.ts:47


type

type: MetadataType

Type of metadata represented by this instance

Defined in

api/entities/MetadataEntry/index.ts:42


uuid

uuid: string

Inherited from

Entity.uuid

Defined in

api/entities/Entity.ts:46

Methods

details

details(): Promise<MetadataDetails>

Retrieve name and specs for this MetadataEntry

Returns

Promise<MetadataDetails>


exists

exists(): Promise<boolean>

Determine whether this MetadataEntry exists on chain

Returns

Promise<boolean>

Overrides

Entity.exists


isEqual

isEqual(entity): boolean

Determine whether this Entity is the same as another one

Parameters

NameType
entityEntity<unknown, unknown>

Returns

boolean

Inherited from

Entity.isEqual


set

set(args, opts?): Promise<GenericPolymeshTransaction<MetadataEntry, MetadataEntry>>

Assign new value for the MetadataEntry along with its details or optionally only set the details (expiry + lock status) of any Metadata value

Note

  • Value or the details can only be set if the MetadataEntry is not locked

Note

this method is of type ProcedureMethod, which means you can call set.checkAuthorization on it to see whether the signing Account and Identity have the required roles and permissions to run it

Parameters

NameType
argsSetMetadataParams
opts?ProcedureOpts

Returns

Promise<GenericPolymeshTransaction<MetadataEntry, MetadataEntry>>


toHuman

toHuman(): HumanReadable

Return the MetadataEntry's ID, Asset ticker and Metadata type

Returns

HumanReadable

Overrides

Entity.toHuman


value

value(): Promise<null | MetadataValue>

Retrieve the value and details (expiry + lock status) for this MetadataEntry

Note

  • This returns null if no value is yet specified for this MetadataEntry

Returns

Promise<null | MetadataValue>


generateUuid

Static generateUuid<Identifiers>(identifiers): string

Generate the Entity's UUID from its identifying properties

Type parameters

Name
Identifiers

Parameters

NameType
identifiersIdentifiers

Returns

string

Inherited from

Entity.generateUuid


unserialize

Static unserialize<Identifiers>(serialized): Identifiers

Unserialize a UUID into its Unique Identifiers

Type parameters

Name
Identifiers

Parameters

NameTypeDescription
serializedstringUUID to unserialize

Returns

Identifiers

Inherited from

Entity.unserialize