0.0.36 • Published 5 years ago

lib-client-gg-wallet v0.0.36

Weekly downloads
3
License
ISC
Repository
github
Last release
5 years ago

lib-client-gg-wallet-js

a collection of utilities to facilitate a universal cryptocurrency wallet. This library should not be used directly. Instead the lib-client-gg library exposes the same functionality packaged with other related utility.

Contributing

Please look over the contribution details. Remember to add contributions by making pull requests against the project's contribute branch.

Transaction-Builder

If you don't want to compose your own functions from scratch we have a few functions in place that can take a parameter called Transaction-Builder.

  • createTransaction
  • signTransaction
  • sendTransaction

The functions above will create either BTC or Ethereum or RSK transactions based on their sole parameter, TransactionBuilder.

transactionBuilder { 
    id: {
        network: "RSK",
        coin-type: "GGToken"
    },
    mnemonic: 'truly boss ranch moment elder auction truly acid matrix coach guilt retreat' optional //if you wish to sign the tx using a mnemonic otherwise it will look for hardware,
    from: {
        address: "0xec63509f4da75b85bb8bf90d90a4c92ff139f5b1",
        derivePath: 'm/44'/0/0/0/0'
    },
    sendAmount: "1",
    destinationAddress: "0x758448d21eac51a7749d341d43418cfa105c1fda",
    balance: "898000",
    nonce: (hex),
    gasPrice: optional //defaults to 50wei,
    gasLimit: optional // defaults to 21000 gas,
    transaction: {} 
}

Install

git clone git@github.com:cbtnuggets/lib-client-gg-wallet-js.git lib-client-gg-wallet-js
cd lib-client-gg-wallet-js
git checkout -b <yourbranch>
npm install
npm test

or

npm install lib-client-gg-wallet-js

Sponsored by

CBT Nuggets: https://www.cbtnuggets.com/