@ping-pub/chain-registry-client
TypeScript icon, indicating that this package has built-in type declarations

0.0.25 • Public • Published

@ping-pub/chain-registry-client

Chain Registry Client is a client which fetch Cosmos chain registry from https://registry.ping.pub.

Usage

import ChainRegistryClient from '@ping-pub/chain-registry-client';

const client = new ChainRegistryClient()

client.fetchChainNames().then(x => {
    expect(x.length).toBeGreaterThan(0);
})

client.fetchChainInfo('cosmoshub').then(x => {
    expect(x.chain_name).toBe('cosmoshub');
})

client.fetchIBCPaths().then(x => {
    expect(x.length).toBeGreaterThan(0);
})

client.fetchIBCPathInfo('cosmoshub-osmosis.json').then(x => {
    expect(x.chain_1.chain_name).toBe('cosmoshub');
    expect(x.chain_2.chain_name).toBe('osmosis');
    done()
})

Readme

Keywords

Package Sidebar

Install

npm i @ping-pub/chain-registry-client

Weekly Downloads

229

Version

0.0.25

License

MIT

Unpacked Size

12.2 kB

Total Files

16

Last publish

Collaborators

  • ping.pub