getCoinTypeDetails
Retrieves detailed information about a specific cryptocurrency coin type from the supported coin types.
Usage
import { getCoinTypeDetails } from '@justaname.id/sdk'
// Basic usage
const ethDetails = getCoinTypeDetails('60')
console.log(ethDetails)
// {
// coin: 'Ethereum',
// symbol: 'eth',
// coinType: '60'
// }
const btcDetails = getCoinTypeDetails('0')
console.log(btcDetails)
// {
// coin: 'Bitcoin',
// symbol: 'btc',
// coinType: '0'
// }Supported Coin Types
The SDK supports all coin types from the ENS address-encoder supported cryptocurrencies list. For unsupported coin types, returns { coin: 'NON', symbol: 'NON', coinType: '-1' }.
Returns
CoinType - An object containing:
coin: The full name of the cryptocurrencysymbol: The symbol of the cryptocurrencycoinType: The coin type identifier
Parameters
cointype:
string- The coin type identifier string
Defined in
packages/@justaname.id/sdk/src/lib/utils/cointypes/index.ts:34
Last updated
Was this helpful?