wallbox-sdk

0.1.3 • Public • Published

wallbox-sdk

Wallet SDK for Bitcoin Cash

A tool for creating and managing a BCH wallet

This library is in early stages of development. It will have bugs, it will be unstable. Use at your own risk.

Example

Wallet

let SLPSDK = require('slp-sdk');
var SLP = new SLPSDK({
  restURL: "https://trest.bitcoin.com/v2/"
});
let wallbox = require("wallbox-sdk")(SLP, "testnet");
 
(async () => {
  try{
    let hdNode = await wallbox.Seed.getNode()
    let Wallet = new wallbox.Wallet(hdNode);
    let address = await Wallet.getfreshAddress()
 
    let options = {message: "Hello BCH Blockchain!", feePerByte: 1}
    await Wallet.send(address, 100000, options)
    let balance = await Wallet.getWalletBalance()
    console.log("Balance = " + balance + " BCH")
  }catch(error){
    console.error(error);
  }
})()

LICENSE MIT

Package Sidebar

Install

npm i wallbox-sdk

Weekly Downloads

1

Version

0.1.3

License

MIT

Unpacked Size

18.6 kB

Total Files

16

Last publish

Collaborators

  • max-hastings