@chalabi/cosmostation
v1.28.1
Published
Chain Registry to Cosmostation
Downloads
3
Readme
@chain-registry/cosmostation
Cosmostation integration for the chain-registry returning cosmostation's AddChainParams
type from @chain-registry/types
Chain
type.
npm install @chain-registry/cosmostation
import { assets, chains } from 'chain-registry';
import { chainRegistryChainToCosmostation } from '@chain-registry/cosmostation';
import { AddChainParams } from '@cosmostation/extension-client/types/message';
const chain = chains.find(({chain_name})=>chain_name==='osmosis');
const config: AddChainParams = chainRegistryChainToCosmostation(chain, assets);
// you can add options as well to choose endpoints
const config: AddChainParams = chainRegistryChainToCosmostation(chain, assets, {
getRestEndpoint: (chain) => chain.apis?.rest[1]?.address
});
Credits
🛠 Built by Cosmology — if you like our tools, please consider delegating to our validator ⚛️