0.0.2 • Published 4 years ago

test-connect-hb v0.0.2

Weekly downloads
-
License
ISC
Repository
-
Last release
4 years ago

CONNECT CHROME EXTENSION

import { HuobiChain, HuobiExtension } from 'test-connect-hb';

enable

const account = await HuobiChain.enable()

getBalance

const huobichain = new HuobiChain('http://35.201.196.131:10303',165102)
huobichain.getBalance(account.address).then(res => {

})

logout

HuobiChain.logout()

sendTransaction

const params = {
        from: '0x3592C04Bd04a26377b1559A1Bb42683Bc83C583f',
        to: '0xef4106dEa75C03e3820AaB76BfaB67564cA8B2aD',
        value: 1222200000000000,
        gasLimit: 25000,
        gasPrice: 100000000000,
        data: '0x',
        meta: true // optional
      }
const huobichain = new HuobiChain('http://35.201.196.131:10303',165102)
const txs = await huobichain.sendTransaction(params)