1.0.10-beta23 • Published 2 years ago

@bitdaoio/sdk v1.0.10-beta23

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

codecov

@bitdaoio/sdk

The @bitdaoio/sdk package provides a set of tools for interacting with Bitnetwork.

Installation

npm install @bitdaoio/sdk

Docs

You can find auto-generated API documentation over at sdk.bitnetwork.io.

Using the SDK

CrossChainMessenger

The CrossChainMessenger class simplifies the process of moving assets and data between Ethereum and Bitnetwork. You can use this class to, for example, initiate a withdrawal of ERC20 tokens from Bitnetwork back to Ethereum, accurately track when the withdrawal is ready to be finalized on Ethereum, and execute the finalization transaction after the challenge period has elapsed. The CrossChainMessenger can handle deposits and withdrawals of ETH and any ERC20-compatible token. Detailed API descriptions can be found at sdk.bitnetwork.io. The CrossChainMessenger automatically connects to all relevant contracts so complex configuration is not necessary.

L2Provider and related utilities

The Bitnetwork SDK includes various utilities for handling Bitnetwork's transaction fee model. For instance, estimateTotalGasCost will estimate the total cost (in wei) to send at transaction on bitnetwork including both the L2 execution cost and the L1 data cost. You can also use the asL2Provider function to wrap an ethers Provider object into an L2Provider which will have all of these helper functions attached.

Other utilities

The SDK contains other useful helper functions and constants. For a complete list, refer to the auto-generated SDK documentation

1.0.10-beta20

2 years ago

1.0.10-beta5

2 years ago

1.0.10-beta6

2 years ago

1.0.10-beta22

2 years ago

1.0.10-beta3

2 years ago

1.0.10-beta21

2 years ago

1.0.10-beta4

2 years ago

1.0.10-beta9

2 years ago

1.0.10-beta23

2 years ago

1.0.10-beta7

2 years ago

1.0.10-beta8

2 years ago

1.0.9

2 years ago

1.0.8

2 years ago

1.0.7

2 years ago

1.0.6

2 years ago

1.0.5

2 years ago

1.0.10-beta1

2 years ago

1.0.10-beta2

2 years ago

1.0.10-beta11

2 years ago

1.0.10-beta13

2 years ago

1.0.10-beta12

2 years ago

1.0.10-beta15

2 years ago

1.0.10-beta14

2 years ago

1.0.10-beta17

2 years ago

1.0.10-beta16

2 years ago

1.0.10-beta19

2 years ago

1.0.10-beta18

2 years ago

1.0.10-beta

2 years ago

1.0.4

2 years ago

1.0.3

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago