Skip to content

Commit

Permalink
merge master
Browse files Browse the repository at this point in the history
  • Loading branch information
poomthiti committed Apr 7, 2022
2 parents a0c7d9c + d78e4b7 commit b076a44
Show file tree
Hide file tree
Showing 505 changed files with 207,160 additions and 6,494 deletions.
26 changes: 26 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
<!-- Thank you for contributing! -->

### Description

<!-- Please insert your description here and provide especially info about the "what" this PR is solving -->

### Additional context

<!-- e.g. is there anything you'd like reviewers to focus on? -->

---

### What is the purpose of this pull request? <!-- (put an "X" next to an item) -->

- [ ] Bug fix
- [ ] New Feature
- [ ] Test
- [ ] Other

### Before submitting the PR, please make sure you do the following

- [ ] All tests have passed
- [ ] Read the [Pull Request Guidelines](https://bandprotocol.atlassian.net/l/c/5u9Sza4t) and follow the [Commit Convention](https://github.com/vitejs/vite/blob/main/.github/commit-convention.md).
- [ ] Check that there isn't already a PR that solves the problem the same way to avoid creating a duplicate.
- [ ] Provide a description in this PR that addresses **what** the PR is solving, or reference the issue that it solves (e.g. `fixes #123`).
- [ ] Ideally, include relevant tests that fail without this PR but pass with it.
21 changes: 12 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# BandChain.js

BandChain.js is a ibrary for interacting with BandChain in browser and Node.js environments.
BandChain.js is a library for interacting with BandChain in browser and Node.js environments. It uses `gRPC-web` as protocol.

## ⭐️ Features

Expand All @@ -24,6 +24,10 @@ npm install --save @bandprotocol/bandchain.js
yarn add @bandprotocol/bandchain.js
```

## Compatible

Band 2.2.0, Cosmos SDK 0.44.0, IBC-go 1.1.0

## Usage

#### Retrieving Price Data
Expand All @@ -32,18 +36,17 @@ yarn add @bandprotocol/bandchain.js
const { Client } = require('@bandprotocol/bandchain.js')

// BandChain's Proof-of-Authority REST endpoint
const endpoint = 'https://api-gm-lb.bandchain.org'
const endpoint = 'https://laozi-testnet4.bandchain.org/grpc-web'
const client = new Client(endpoint)

// This example demonstrates how to query price data from
// Band's standard dataset
async function exampleGetReferenceData() {
const rate = await client.getReferenceData([
'BTC/USD',
'BTC/ETH',
'EUR/USD',
'EUR/ETH',
])
const rate = await client.getReferenceData(
['BTC/USD', 'BTC/ETH', 'EUR/USD', 'EUR/ETH'],
3,
4,
)
return rate
}

Expand All @@ -52,4 +55,4 @@ async function exampleGetReferenceData() {
})()
```

For more examples, please see [`example/index.js`](example/index.js)
For more examples, please see [`example`](example/) folder.
Loading

0 comments on commit b076a44

Please sign in to comment.