https://github.com/jccdex/jcc-bizain-utils
Toolkit of crossing chain from Bizain chain to SWTC chain
https://github.com/jccdex/jcc-bizain-utils
bizain-chain blockchain cross-chain jccdex swtc-chain
Last synced: 3 months ago
JSON representation
Toolkit of crossing chain from Bizain chain to SWTC chain
- Host: GitHub
- URL: https://github.com/jccdex/jcc-bizain-utils
- Owner: JCCDex
- License: apache-2.0
- Created: 2019-05-31T03:48:20.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2023-01-07T07:55:58.000Z (over 2 years ago)
- Last Synced: 2025-03-21T10:02:15.806Z (3 months ago)
- Topics: bizain-chain, blockchain, cross-chain, jccdex, swtc-chain
- Language: JavaScript
- Size: 3.47 MB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 27
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# jcc-bizain-utils
Toolkit of crossing chain from [Bizain chain](http://www.bizain.org/) to [SWTC chain](http://www.swtc.top/#/)

[](https://travis-ci.com/JCCDex/jcc-bizain-utils)
[](https://coveralls.io/github/JCCDex/jcc-bizain-utils?branch=master)
[](https://david-dm.org/JCCDex/jcc-bizain-utils)
[](http://npm-stat.com/charts.html?package=jcc-bizain-utils)
[](http://makeapullrequest.com)## Description
Transfer token automatically from [BIZAIN](http://www.bizain.org/) chain to [SWTC](http://www.swtc.top/#/) chain. Support BIZ token.
e.g. you transfer 1 `BIZ` to [Bizain Fingate](https://bizain.net/bc/explorer/#!/wallet/bwtC9ARd3wo7Kx3gKQ49uVgcKxoAiV1iM2) from your bizain address if success, the contract will automatically transfer 1 `JBIZ` to your swtc address from [Jingtum Fingate](https://swtcscan.jccdex.cn/#/wallet/?wallet=jDu7umDxKxeaHoj7eNdUn8YsGWTHZSuEGL) in a few minutes.
## Installtion
```shell
npm install jcc-bizain-utils
```## CDN
`jcc_bizain_utils` as a global variable.
```javascript
```
## Usage
```javascript
// demo
import BizainFingate from "jcc-bizain-utils";const testWebsocketServer = "";
const instance = new BizainFingate(testWebsocketServer);
const testSecret = "ssySqG4BhxpngV2FjAe1SJYFD4dcm";
// Don't change it. The fingate address is it for now.
const destination = "bwtC9ARd3wo7Kx3gKQ49uVgcKxoAiV1iM2";const testMemo = {
jtaddress: "jpgWGpfHz8GxqUjz5nb6ej8eZJQtiF6KhH"
}const amount = "1";
try {
instance.init()
await instance.connect()
const hash = await instance.transfer(testSecret, destination, amount, testMemo);
console.log(hash);
} catch (error) {
console.log(error);
} finally {
instance.disconnect();
}
```## API
see [API.md](https://github.com/JCCDex/jcc-bizain-utils/blob/master/docs/API.md)