kthulu v0.1.2
const account = require('./account'); const transfer = require('./transfer'); const nft = require('./nft');
//Call the createAccount function (network (Array) = 'ethereum','cypress','polygon','bnb') account.createAccountAsync('network') .then((result) => { console.log(JSON.stringify(result)); }) .catch((error) => { console.log(JSON.stringify(error)); });
// Call the restoreAccount function (network (Array) = 'ethereum','cypress','polygon','bnb', privateKey(String), mnemonic (String)) account.restoreAccountAsync('network', 'privateKey', 'mnemonic') .then((result) => { console.log(JSON.stringify(result)); }) .catch((error) => { console.log(JSON.stringify(error)); });
// Call the getBalanceAsync function (network (String) = 'ethereum','cypress','polygon','bnb', tokenAddress (String)) account.getTokenInfoAsync('network','tokenAddress') .then((result) => { console.log(JSON.stringify(result)); }) .catch((error) => { console.log(JSON.stringify(error)); });
// Call the getBalanceAsync function (network (String) = 'ethereum','cypress','polygon','bnb', owner(String), tokenAddress (String)) account.getBalanceAsync('network', 'owner', 'tokenAddress') .then((result) => { console.log(JSON.stringify(result)); }) .catch((error) => { console.log(JSON.stringify(error)); });
// Call the sendCoinTransactionAsync function (network (String) = 'ethereum','cypress','polygon','bnb', from(String), to (String), amount (String)) transfer.sendCoinTransactionAsync('network', 'from', 'to', 'amount') .then((result) => { console.log(JSON.stringify(result)); }) .catch((error) => { console.log(JSON.stringify(error)); });
// Call the sendTokenTransactionAsync function (network (String) = 'ethereum','cypress','polygon','bnb', from(String), to (String), tokenAmount (String), amount (String)) transfer.sendTokenTransactionAsync('network', 'from', 'to', 'tokenAmount', 'amount') .then((result) => { console.log(JSON.stringify(result)); }) .catch((error) => { console.log(JSON.stringify(error)); });
// Call the bridgeErc721Async function (network (String) = 'ethereum','cypress','polygon','bnb', from(String), toNetwork (String), collectioId (String), tokenId (String), privateKey (String)) nft.bridgeErc721Async('network', 'from', 'toNetwork', 'collectioId', 'tokenId', 'privateKey') .then((result) => { console.log(JSON.stringify(result)); }) .catch((error) => { console.log(JSON.stringify(error)); });