@chain-registry/keplr
Keplr integration for the chain-registry returning keplr's ChainInfo
type from @chain-registry/types
Chain
type.
npm install @chain-registry/keplr
import { assets, chains } from 'chain-registry';
import { chainRegistryChainToKeplr } from '@chain-registry/keplr';
import { ChainInfo } from '@keplr-wallet/types';
const chain = chains.find(({chain_name})=>chain_name==='osmosis');
const config: ChainInfo = chainRegistryChainToKeplr(chain, assets);
const config: ChainInfo = chainRegistryChainToKeplr(chain, assets, {
getExplorer: () => 'https://myexplorer.com',
getRestEndpoint: (chain) => chain.apis?.rest[1]?.address
getRpcEndpoint: (chain) => chain.apis?.rpc[1]?.address
});
Credits
🛠 Built by Cosmology — if you like our tools, please consider delegating to our validator ⚛️