0.5.5 • Published 10 days ago

@xchainjs/xchain-midgard v0.5.5

Weekly downloads
-
License
MIT
Repository
github
Last release
10 days ago

@xchainjs/xchain-midgard

Midgard Module for XChainJS Clients

Modules

Midgard module has been created using openapi-generator-cli auto-generation reading from "https://midgard.thorchain.info/v2/swagger.json" This library exposes all the midgard api functions defined in the swagger doc "https://midgard.thorchain.info/v2/swagger.json"

Installation

yarn add @xchainjs/xchain-midgard

Examples

Request data from midgardApi

import { MidgardApi } from '@xchainjs/xchain-midgard'

const midgardApi = new MidgardApi()
const data = midgardApi.getPool('BTC.BTC')

Documentation

Midgard Thorchain endpoint Midgard NineRelms endpoint

Setting Headers for Nine Realms endpoints

If you plan on using the publically accessible endpoints provided by Nine Realms(listed below), ensure that you add a valid 'x-client-id' to all requests

Example

import cosmosclient from '@cosmos-client/core'
import axios from 'axios'
import { register9Rheader } from '@xchainjs/xchain-util'

register9Rheader(axios)
register9Rheader(cosmosclient.config.globalAxios)

For a complete example please see this test

0.5.5

10 days ago

0.5.4

1 month ago

0.5.3

6 months ago

0.5.2

7 months ago

0.5.1

9 months ago

0.5.0

1 year ago

0.4.3

1 year ago

0.4.2

1 year ago

0.4.1

1 year ago

0.4.0

1 year ago

0.3.0

1 year ago

0.2.0

2 years ago

0.1.0

2 years ago

0.1.0-alpha2

2 years ago

0.1.0-alpha

2 years ago