SDKs@solio/coreContractsMixedTokengetMetadata

getMetadata()

function getMetadata(client, props): Promise<string>

Reads the metadata of a mixed token.

Parameters

ParameterTypeDescription
clientReadClientReadClient The read client to use.
propsMixedTokenGetMetadataPropsMixedTokenGetMetadataProps The properties to use.
type MixedTokenGetMetadataProps: {
  address: Address;
};

Returns

Promise<string>

The metadata string of the mixed token.

Example

mixed-token.ts
import { mixedToken } from '@solio/core';
import { createClient, http } from 'viem';
import { sepolia } from 'viem/chains';
const readClient = createClient({
 chain: sepolia,
 transport: http(),
});
const metadataUrl = await mixedToken.read.getMetadata(readClient, {
 address: '0x...' // mixed token address
});
console.log(metadataUrl);