JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 138
  • Score
    100M100P100Q85662F
  • License MIT

Cosmos Blockchain Registry Client

Package Exports

  • @ping-pub/chain-registry-client
  • @ping-pub/chain-registry-client/dist/index.js

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@ping-pub/chain-registry-client) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

@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()
})