@xchainjs/xchain-cosmos
Version:
Custom Cosmos client and utilities used by XChainJS clients
45 lines (44 loc) • 1.85 kB
TypeScript
import { Network, RootDerivationPaths } from '@xchainjs/xchain-client';
import { CompatibleAsset } from './types';
/**
* Function to retrieve default RPC client URLs for different networks.
* Returns a mapping of network to its corresponding RPC client URL.
*
* @returns {Record<Network, string>} Default RPC client URLs for different networks.
*/
export declare const getDefaultClientUrls: () => Record<Network, string[]>;
/**
* Function to retrieve default root derivation paths for different networks.
* Returns a mapping of network to its corresponding root derivation path.
*
* @returns {RootDerivationPaths} Default root derivation paths for different networks.
*/
export declare const getDefaultRootDerivationPaths: () => RootDerivationPaths;
/**
* Function to retrieve default explorer URLs for different networks.
* Returns a mapping of network to its corresponding explorer URL.
*
* @returns {Record<Network, string>} Default explorer URLs for different networks.
*/
export declare const getDefaultExplorers: () => Record<Network, string>;
/**
* Function to get the denomination of a given asset.
* Currently only supports 'ATOM'.
*
* @param {CompatibleAsset} asset The asset for which denomination is requested.
* @returns {string} The denomination of the given asset, or null if not supported.
*/
export declare const getDenom: (asset: CompatibleAsset) => string | null;
/**
* Asynchronously fetches the chain ID from a node URL using an Axios HTTP GET request.
*
* @param {string} url The URL of the node.
* @returns {string} A Promise that resolves to the chain ID.
*/
export declare const getChainId: (url: string) => Promise<string>;
/**
* Function to get the address prefix based on the network.
*
* @returns {string} The address prefix based on the network.
*/
export declare const getPrefix: () => string;