From 468757437fa229f2af84fd08fe407c032d41fcf3 Mon Sep 17 00:00:00 2001 From: robot-ux Date: Fri, 1 Dec 2023 10:48:06 +0800 Subject: [PATCH] feat: Rebanding binance-chain to bnb-chain (#402) --- README.md | 8 ++++---- docs/README.md | 4 ++-- docs/api-docs/README.md | 2 +- docs/examples.md | 8 ++++---- package.json | 2 +- 5 files changed, 12 insertions(+), 12 deletions(-) diff --git a/README.md b/README.md index 76496df7..7fe34122 100644 --- a/README.md +++ b/README.md @@ -22,17 +22,17 @@ pages. If you **do not** need Ledger support with Node.js: ```bash -$ npm i @binance-chain/javascript-sdk --no-optional +$ npm i @bnb-chain/javascript-sdk --no-optional # Or: -$ yarn add @binance-chain/javascript-sdk --no-optional +$ yarn add @bnb-chain/javascript-sdk --no-optional ``` If you **need** Ledger support with Node.js: ```bash -$ npm i @binance-chain/javascript-sdk +$ npm i @bnb-chain/javascript-sdk # Or: -$ yarn add @binance-chain/javascript-sdk +$ yarn add @bnb-chain/javascript-sdk ``` ### Prerequisites diff --git a/docs/README.md b/docs/README.md index 1714faf4..25623780 100644 --- a/docs/README.md +++ b/docs/README.md @@ -12,10 +12,10 @@ ```js //common -const { BncClient } = require("@binance-chain/javascript-sdk") +const { BncClient } = require("@bnb-chain/javascript-sdk") //es6 -import { BncClient } from "@binance-chain/javascript-sdk" +import { BncClient } from "@bnb-chain/javascript-sdk" const client = new BncClient("https://xxx.api.com/") client.initChain() diff --git a/docs/api-docs/README.md b/docs/api-docs/README.md index 62cba05d..e0a9da6f 100644 --- a/docs/api-docs/README.md +++ b/docs/api-docs/README.md @@ -1,5 +1,5 @@ -# @binance-chain/javascript-sdk +# @bnb-chain/javascript-sdk ## Index diff --git a/docs/examples.md b/docs/examples.md index 1027d6b8..f9e6ac1f 100644 --- a/docs/examples.md +++ b/docs/examples.md @@ -5,7 +5,7 @@ ### Example of a wallet-to-wallet transfer ```js -const { BncClient } = require("@binance-chain/javascript-sdk") +const { BncClient } = require("@bnb-chain/javascript-sdk") const axios = require("axios") const asset = "BNB" // asset string @@ -55,7 +55,7 @@ httpClient ### Example of token issuance ```js -const { BncClient, crypto, utils } = require("@binance-chain/javascript-sdk") +const { BncClient, crypto, utils } = require("@bnb-chain/javascript-sdk") // Token params const tokenName = "Your Token Name" @@ -91,7 +91,7 @@ main() ### RPC example (getAccount) ```js -const { rpc } = require("@binance-chain/javascript-sdk") +const { rpc } = require("@bnb-chain/javascript-sdk") new rpc("https://dataseed1.binance.org:443") .getAccount("bnb1qfmufc2q30cgw82ykjlpfeyauhcf5mad6p5y8t") .then((x) => console.log("", JSON.stringify(x))) @@ -149,7 +149,7 @@ amino.marshalBinaryBare(data) The following code is an example of what you can do with the Ledger support: ```js -const { ledger } = require("@binance-chain/javascript-sdk") +const { ledger } = require("@bnb-chain/javascript-sdk") ledger(async () => { // check environment (web, node) console.log("node?", await ledger.transports.node.isSupported()) // => true if node diff --git a/package.json b/package.json index 54fd496e..3fdb3161 100644 --- a/package.json +++ b/package.json @@ -1,5 +1,5 @@ { - "name": "@binance-chain/javascript-sdk", + "name": "@bnb-chain/javascript-sdk", "version": "0.0.0-development", "license": "Apache-2.0", "main": "lib/index.js",