• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

bnb-chain/javascript-sdk: Javascript SDK to communicate with BNB Beacon Chain.

原作者: [db:作者] 来自: 网络 收藏 邀请

开源软件名称:

bnb-chain/javascript-sdk

开源软件地址:

https://github.com/bnb-chain/javascript-sdk

开源编程语言:

TypeScript 91.1%

开源软件介绍:

The Binance Chain JavaScript SDK allows browsers and Node.js clients to interact with Binance Chain. It includes the following core components.

  • crypto - core cryptographic functions.
  • amino - amino (protobuf-like) encoding and decoding of transactions.
  • client - implementations of Binance Chain transaction types, such as for transfers and trading.
  • accounts - management of "accounts" and wallets, including seed and encrypted mnemonic generation.
  • ledger - Ledger Nano S/X support via HID, U2F and Web BLE (Bluetooth).
  • rpc - Node RPC client.
  • transaction - Transaction Class, build and sign.

You can find more detailed documentation and examples in our Documentation pages.

Installation

If you do not need Ledger support with Node.js:

$ npm i @binance-chain/javascript-sdk --no-optional
# Or:
$ yarn add @binance-chain/javascript-sdk --no-optional

If you need Ledger support with Node.js:

$ npm i @binance-chain/javascript-sdk
# Or:
$ yarn add @binance-chain/javascript-sdk

Prerequisites

  • Windows users: Please install windows-build-tools first.

  • Mac users: Make sure XCode Command Line Tools are installed: xcode-select --install.

  • Linux users: Note that Ubuntu Xenial and newer distributions are recommended, especially when using Travis or other CI systems. You may need some dev packages to be installed on your system for USB support. On Debian-based distributions (like Ubuntu) you should install them with this command:

    $ sudo apt-get install libudev-dev libusb-dev usbutils

Use with Webpack

We often see Webpack builds failing with the SDK due to the usb dependency, but adding this to your Webpack config should fix that:

module.exports = {
  plugins: [new webpack.IgnorePlugin(/^usb$/)],
}

Testing

All new code changes should be covered with unit tests. You can run the tests with the following command:

$ yarn test

Tests for the Ledger hardware wallet integration have their own suite that runs in both node and in the browser:

$ yarn test:ledger
$ yarn test:ledger:browser

Contributing

Contributions to the Binance Chain JavaScript SDK are welcome. Please ensure that you have tested the changes with a local client and have added unit test coverage for your code.




鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
aerospike/aerospike-client-java: Aerospike Java Client Library发布时间:2022-06-23
下一篇:
PingPlusPlus/pingpp-java发布时间:2022-06-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap