Class: Metadata
api/entities/Asset/Base/Metadata.Metadata
Handles all Asset Metadata related functionality
Hierarchy
-
Namespace
<BaseAsset
>↳
Metadata
Methods
get
▸ get(): Promise
<MetadataEntry
[]>
Retrieve all the MetadataEntry for this Asset
Returns
Promise
<MetadataEntry
[]>
Defined in
api/entities/Asset/Base/Metadata/index.ts:51
getOne
▸ getOne(args
): Promise
<MetadataEntry
>
Retrieve a single MetadataEntry by its ID and type
Parameters
Name | Type |
---|---|
args | Object |
args.id | BigNumber |
args.type | MetadataType |
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:97
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
Name | Type |
---|---|
args | RegisterMetadataParams |
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