getCoinMetadata

abstract suspend fun getCoinMetadata(type: String): Result<GetCoinMetadataQuery.Data?, SuiError>

Fetches the metadata for a specific coin type.

Metadata may include the coin's name, symbol, description, and number of decimals.

Return

A Result which is either:

  • Ok: Containing a nullable GetCoinMetadataQuery.Data object with the coin's metadata.

  • Err: Containing a SuiError object with a list of GraphQLErrors.

Parameters

type

The string representing the coin type for which to fetch metadata.