# @mayaprotocol/xchain-thornode

> Thornode module that exposes all thornode functions using openapi-generator-cli

Latest version **0.1.4** (published 2022-12-17) · MIT license · 0 weekly downloads

## Install

```sh
npm install @mayaprotocol/xchain-thornode
pnpm add @mayaprotocol/xchain-thornode
yarn add @mayaprotocol/xchain-thornode
bun add @mayaprotocol/xchain-thornode
```

## Health

**Score 45/100 (D)** — status: abandoned.

Positive: has types; esm support; no vulnerabilities; high maintenance score; high quality score.

Warnings: low downloads; pre 1.0.

Negative: abandoned.

## Facts

| | |
|---|---|
| Version | 0.1.4 |
| Published | 2022-12-17 |
| First published | 2022-12-17 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 0 |
| Unpacked size | 428.5 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 133 |
| Author | THORChain |
| Maintainers | kukulkan, itzamnamaya |
| Keywords | XChain, Thornode |

## Links

- npm: https://www.npmjs.com/package/@mayaprotocol/xchain-thornode
- Repository: https://github.com/xchainjs/xchainjs-lib
- Issues: https://github.com/xchainjs/xchainjs-lib/issues
- npm.io page: https://npm.io/package/@mayaprotocol/xchain-thornode

## Recent versions

- 0.1.4 (latest) — 2022-12-17

## README

# `@mayaprotocol/xchain-thornode`

Thornode Module for XChainJS Clients

## Modules

Thornode module has been created using openapi-generator-cli to auto-generate rest api reading from "https://gitlab.com/thorchain/thornode/-/raw/release-{version}/openapi/openapi.yaml"
This library exposes all the Api's outlined in the swagger doc "https://thornode.ninerealms.com/thorchain/doc"

## Installation

```
yarn add @mayaprotocol/xchain-thornode
```

## Examples

Request data from MimirApi

```
// THORNODE_API_9R_URL - default exported URL
// import { MimirApi, THORNODE_API_9R_URL, Configuration } from '@mayaprotocol/xchain-thornode'

  const baseUrl = THORNODE_API_9R_URL
  const apiconfig = new Configuration({ basePath: baseUrl })
  const mimirApi = new MimirApi(apiconfig)
  const mimirResponse = await mimirApi.mimir()
  console.log(mimirResponse.data)

```
## Example - set custom header

Request data from MimirApi

```
// THORNODE_API_9R_URL - default exported URL
// import { MimirApi, THORNODE_API_9R_URL, Configuration } from '@mayaprotocol/xchain-thornode'

  const baseUrl = THORNODE_API_9R_URL
  const headers = {"x-client-id": "my-custom-val"}
  const baseOptions = { headers }
  const apiconfig = new Configuration({ basePath: baseUrl , baseOptions })
  const mimirApi = new MimirApi(apiconfig)
  const mimirResponse = await mimirApi.mimir()
  console.log(mimirResponse.data)

```

## Documentation

[`Thornode NineRelms endpoint`](https://thornode.ninerealms.com/)

---
_Source: https://npm.io/package/@mayaprotocol/xchain-thornode · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
