A prefix to use for every key of this map
Add metadata of a token
Basic usage example:
Assume we need add the metadata object TM1
to the token with token id = jenny911038
,
const persistent_tokens_metadata = new PeristentTokenMetadata('ptm')
const metadata = persistent_tokens_metadata.add('jenny911038' , TM1 );
Id of the token that need to save metadata
Metadata object to be saved
Saved token metadata object
Get token metadata for a given token ID
Basic usage example:
Assume we need to get the metadata of the token with token id = jenny911038
,
const persistent_tokens_metadata = new PeristentTokenMetadata('ptm')
const metadata = persistent_tokens_metadata.get("jenny911038");
ID of token to retrieve metadata
Token Metadata object
Get the IDs of tokens saved in the provided range
Basic usage example:
Assume we need the IDs of first 5 tokens,
const persistent_tokens_metadata = new PeristentTokenMetadata('ptm')
const token_ids = persistent_tokens_metadata.keys(0, 5);
Start index
End index
An array of tokenIds
Generated using TypeDoc