@orchai-lowcode-defi/cosmos-token-info
v0.0.4
Published
Config for cosmos token infomation.
Downloads
5
Readme
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;