0.1.0 • Published 4 years ago

@namnh270/g8c-sdk-test v0.1.0

Weekly downloads
10
License
ISC
Repository
gitlab
Last release
4 years ago

SDK

SDK for G8C Blockchain

Documents

Installation

npm install G8C-sdk

Usage

const G8CSdk = require('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)

License

MIT

0.1.0

4 years ago

0.0.9

4 years ago

0.0.8

4 years ago

0.0.7

4 years ago

0.0.6

4 years ago

0.0.5

4 years ago

0.0.4

4 years ago

0.0.3

4 years ago

0.0.2

4 years ago

0.0.1

4 years ago