Skip to main content
Version: 27.0.x

Class: Metadata

api/entities/Asset/Base/Metadata.Metadata

Handles all Asset Metadata related functionality

Hierarchy

Methods

get

get(): Promise<MetadataEntry[]>

Retrieve all (global + local) the MetadataEntry for this Asset

Returns

Promise<MetadataEntry[]>

Note

this returns all available metadata entries for this Asset, with or without any value being associated with the metadata

Defined in

api/entities/Asset/Base/Metadata/index.ts:69


getDetails

getDetails(): Promise<MetadataWithValue[]>

Retrieve all (local + global) the MetadataEntry details whose value is set for this Asset

Returns

Promise<MetadataWithValue[]>

Defined in

api/entities/Asset/Base/Metadata/index.ts:183


getOne

getOne(args): Promise<MetadataEntry>

Retrieve a single MetadataEntry by its ID and type

Parameters

NameType
argsObject
args.idBigNumber
args.typeMetadataType

Returns

Promise<MetadataEntry>

Throws

if there is no MetadataEntry with the passed ID and specified type

Defined in

api/entities/Asset/Base/Metadata/index.ts:115


register

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

Register a metadata for this Asset and optionally set its value. The metadata value can be set by passing value parameter and specifying other optional details about the value

Parameters

NameType
argsRegisterMetadataParams
opts?ProcedureOpts

Returns

Promise<GenericPolymeshTransaction<MetadataEntry, MetadataEntry>>

Note

This registers a metadata of type Local

Note

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

Defined in

api/entities/Asset/Base/Metadata/index.ts:60