diff --git a/README.md b/README.md index 566d44c4..55d45dff 100644 --- a/README.md +++ b/README.md @@ -6,9 +6,6 @@

- - -

@@ -26,7 +23,6 @@ npm install @bandprotocol/bandchain.js - [Usage](#usage) - [RPC Clients](#rpc-clients) - [Composing Messages](#composing-messages) - - [CosmWasm Messages](#cosmwasm-messages) - [IBC Messages](#ibc-messages) - [Cosmos Messages](#cosmos-messages) - [Connecting with Wallets and Signing Messages](#connecting-with-wallets-and-signing-messages) @@ -59,7 +55,9 @@ const balance = await client.cosmos.bank.v1beta1.allBalances({ }); // you can also query the band modules -const balances = await client.band.exchange.v1beta1.exchangeBalances(); +const oracleScript = await client.band.oracle.v1.oracleScript({ + oracleScriptId: BigInt(37), +}); ``` ### Composing Messages @@ -69,23 +67,8 @@ Import the `band` object from `@bandprotocol/bandchain.js`. ```js import { band } from "@bandprotocol/bandchain.js"; -const { createSpotLimitOrder, createSpotMarketOrder, deposit } = - band.exchange.v1beta1.MessageComposer.withTypeUrl; -``` - -#### CosmWasm Messages - -```js -import { cosmwasm } from "@bandprotocol/bandchain.js"; - -const { - clearAdmin, - executeContract, - instantiateContract, - migrateContract, - storeCode, - updateAdmin, -} = cosmwasm.wasm.v1.MessageComposer.withTypeUrl; +const { requestData, reportData, createDataSource } = + band.oracle.v1.MessageComposer.withTypeUrl; ``` #### IBC Messages diff --git a/example/with-next-js/package.json b/example/with-next-js/package.json index 93307e0e..09349e31 100644 --- a/example/with-next-js/package.json +++ b/example/with-next-js/package.json @@ -9,12 +9,13 @@ "lint": "next lint" }, "dependencies": { + "@bandprotocol/bandchain.js": "^3.0.3", + "@bandprotocol/obi-ts": "^1.0.0", "chain-registry": "^1.69.15", "cosmjs-utils": "^0.1.0", - "next": "15.0.1", - "react": "19.0.0-rc-69d4b800-20241021", - "react-dom": "19.0.0-rc-69d4b800-20241021", - "@bandprotocol/bandchain.js": "link:../../../../packages/bandchainjs/dist" + "next": "15.4.6", + "react": "19.1.0", + "react-dom": "19.1.0" }, "devDependencies": { "@types/node": "^20", diff --git a/example/with-next-js/src/app/favicon.ico b/example/with-next-js/src/app/favicon.ico index 718d6fea..da14ff8e 100644 Binary files a/example/with-next-js/src/app/favicon.ico and b/example/with-next-js/src/app/favicon.ico differ diff --git a/example/with-next-js/src/app/layout.tsx b/example/with-next-js/src/app/layout.tsx index 7f007fec..4546d6e1 100644 --- a/example/with-next-js/src/app/layout.tsx +++ b/example/with-next-js/src/app/layout.tsx @@ -15,8 +15,8 @@ const geistMono = localFont({ }); export const metadata: Metadata = { - title: "Create Next App", - description: "Generated by create next app", + title: "BandChain.js Example", + description: "example for bandchain.js library by Band", }; export default function RootLayout({ diff --git a/example/with-next-js/src/components/AllBalanceExample.tsx b/example/with-next-js/src/components/AllBalanceExample.tsx index 01ea3c04..3cb3300d 100644 --- a/example/with-next-js/src/components/AllBalanceExample.tsx +++ b/example/with-next-js/src/components/AllBalanceExample.tsx @@ -15,7 +15,6 @@ const getAllBalances = async (address: string) => { const res = await client.cosmos.bank.v1beta1.allBalances({ address, - resolveDenom: false, }); return JSON.parse( diff --git a/example/with-next-js/src/components/SendTokenExample.tsx b/example/with-next-js/src/components/SendTokenExample.tsx index 159ca9d4..75f593aa 100644 --- a/example/with-next-js/src/components/SendTokenExample.tsx +++ b/example/with-next-js/src/components/SendTokenExample.tsx @@ -1,6 +1,6 @@ "use client"; -import { cosmos } from "@bandprotocol/bandchain.js/dist"; +import { cosmos } from "@bandprotocol/bandchain.js"; import { useState } from "react"; import { getSignerClient } from "@/utils"; diff --git a/example/with-next-js/src/components/Sidebar.tsx b/example/with-next-js/src/components/Sidebar.tsx index bab57f64..99ea47e9 100644 --- a/example/with-next-js/src/components/Sidebar.tsx +++ b/example/with-next-js/src/components/Sidebar.tsx @@ -4,7 +4,7 @@ export const Sidebar = () => { return (
-

Cosmos SDK

+

Cosmos SDK

-

BandChain

+

BandChain