node-g8c-sdk
v1.0.1
Published
SDK for G8C blockchain
Downloads
4
Maintainers
Readme
SDK
SDK for G8C Blockchain
Installation
npm i node-g8c-sdk
Usage
const G8CSdk = require('node-g8c-sdk');
API
SDK
createSendTx (from, to, amount, privateKey)
Utils
validateAddress(address)
validateBlock(height)
validateTxHash(hash)
isInt(n)
isUint(n)
fromG8C(G8C)
toG8C(amount)
subtraction(a,b)
bigNumToString(val,base)
encodeUtf8(text)
decode(buf)
API
getBlock (height)
getTransaction (txHash)
getAccountDetail (address)
getGetHistoryTransaction ({address, page, limit})
sendTransaction (tx)
Wallet
generateWallet(walletName, password)
verifyTransaction(tx)
encryptWallet(privateKey, password)
decryptWallet(cipherText, password)
restoreWallet(mnemonic, walletName, password)
getAddressFromPublicKey(publicKey)
createTx(from, to, amount, sequence, CHAINID)