tbtc.js

0.6.3 • Public • Published

tbtc.js

tbtc.js provides JS bindings to the tBTC system. The https://tbtc.network[tBTC system] is a bonded, multi-federated peg made up of many deposits backed by single-use BTC wallets to enable their value's corresponding usage on the Ethereum chain, primarily through the minting of a TBTC ERC20 token whose supply is guaranteed to be backed by at least 1 BTC per TBTC in circulation.

Depending or Installing

tbtc.js is still prerelease software, and is aimed at the current testnet deployment of the tBTC system on Ropsten. This package and repo are in flux and will increase in version number until hitting 1.0; minor version bumps currently will aim at different versions of Ropsten contracts. Older versions of Ropsten contracts will not be maintained, so in case of issues, make sure there hasn't been a release.

API stability is not guaranteed, but the API is likely ~90% complete.

Usage

For now, see example.js for usage. Note that currently the example is fully functional. All tBTC contracts (in @truffle/contract form) are exposed through the wrappers for the system; deposits expose their per-deposit contract at deposit.contract, while the DepositFactory exposes all system contracts at DepositFactory.systemContract, Deposit.tokenContract, DepositFactory.depositTokenContract, Deposit.feeRebateTokenContract, DepositFactory.factoryTokenContract, and Deposit.vendingMachineContract.

If you are running in Node, depending on your Node version, you may need to add the --experimental-modules and/or --experimental-json-modules flags to your node invocation..

License

This code is published under the MIT license. See the LICENSE file in this repository for more details.

Readme

Keywords

none

Package Sidebar

Install

npm i tbtc.js

Weekly Downloads

0

Version

0.6.3

License

MIT

Unpacked Size

108 kB

Total Files

18

Last publish

Collaborators

  • shadowfiend