jcc-bizain-utils
v0.1.4
Published
Toolkit of crossing chain from Bizain chain to SWTC chain
Downloads
5
Maintainers
Readme
jcc-bizain-utils
Toolkit of crossing chain from Bizain chain to SWTC chain
Description
Transfer token automatically from BIZAIN chain to SWTC chain. Support BIZ token.
e.g. you transfer 1 BIZ
to Bizain Fingate from your bizain address if success, the contract will automatically transfer 1 JBIZ
to your swtc address from Jingtum Fingate in a few minutes.
Installtion
npm install jcc-bizain-utils
Usage
// 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();
}