Skip to content

Commit

Permalink
update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
babybunn committed Dec 3, 2024
1 parent 3dca55e commit 8e5d2c8
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 30 deletions.
31 changes: 2 additions & 29 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ BandChain.js is a library for interacting with BandChain in browser and Node.js

## 📦 Installation

BandChain.js is currently supported on NodeJS 16.x, and 18.x.
BandChain.js is currently supported on Node.js 16.x, >= 18.x.

### NPM

Expand All @@ -26,33 +26,6 @@ yarn add @bandprotocol/bandchain.js

## Compatibility

Band 2.2.0, Cosmos SDK 0.44.0, IBC-go 1.1.0
BandChain v3.0.0, Cosmos SDK v0.50.0, IBC-go v8.5.2

## Usage

#### Retrieving Price Data

```js
const { Client } = require('@bandprotocol/bandchain.js')

// BandChain's Proof-of-Authority REST endpoint
const endpoint = 'https://laozi-testnet6.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'],
3,
4,
)
return rate
}

;(async () => {
console.log(await exampleGetReferenceData())
})()
```

For more examples, please see [`example`](example/) folder.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@bandprotocol/bandchain.js",
"version": "2.5.0-alpha",
"version": "2.5.0",
"description": "Library for interacting with BandChain in browser and Node.js environments",
"main": "lib/index.js",
"types": "lib/index.d.ts",
Expand Down
1 change: 1 addition & 0 deletions proto/chain
Submodule chain added at 21710b
1 change: 1 addition & 0 deletions proto/cosmos-proto
Submodule cosmos-proto added at 3e5381
1 change: 1 addition & 0 deletions proto/cosmos-sdk
Submodule cosmos-sdk added at b45cf7
1 change: 1 addition & 0 deletions proto/ibc-go
Submodule ibc-go added at a766bc

0 comments on commit 8e5d2c8

Please sign in to comment.