0.0.4 • Published 1 year ago

@orchai-lowcode-defi/cosmos-token-info v0.0.4

Weekly downloads
-
License
ISC
Repository
github
Last release
1 year ago

Install package

yarn add @orchai-lowcode-defi/cosmos-token-info

Detail

enum ContractAddress // Address of Contract in system

To get infomation of token access:

const tokenInfo: Record<TTokenSymbol, TTokenInfo>;

To check token is native or not:

function isNativeToken(assetInfo: AssetInfo);

// use
import { isNativeToken } from '@orchai-lowcode-defi/cosmos-token-info';

To get info token from ContractAddress or denom, denom ibc:

import { mapToToken, tokenInfo } from '@orchai-lowcode-defi/cosmos-token-info';

const key = string;
const tokenSymbol = mapToToken[key] || null; // => return TTokenSymbol | null
const token = tokenSymbol ? tokenInfo[tokenSymbol] : null;
0.0.4

1 year ago

0.0.3

1 year ago