biggybank
v0.0.6
Published
refill a bitcoin address from console
Downloads
3
Readme
biggybank
biggybank is a drop-in library that lets you refill a Bitcoin address from console using:
- Raw address
- QRCode
- MoneyButton (Through ButtonPage
- Send a PR if you have another method
How it works
It displays the address and its QR code in the terminal:
It also gives you a link to ButtonPage which lets you refill the address using Moneybutton.
Install
Install both bsv and biggybank
npm install --save bsv
npm install --save biggybank
Usage
Biggybank returns a string which includes the QRCode and other messages
const biggybank = require('biggybank')
biggybank({ address: "19HxigV4QyBv3tHpQVcUEQyq1pzZVdoAut" }, function(err, str) {
console.log(str)
})
Add a simple message to the header:
const biggybank = require('biggybank')
biggybank({
address: "19HxigV4QyBv3tHpQVcUEQyq1pzZVdoAut",
message: "Send money to b.bitdb.network"
}, function(err, str) {
console.log(str)
})
Specifying Insight endpoint
const biggybank = require('biggybank')
biggybank({ endpoint: "https://bchsvexplorer.com" }, function(err, str) {
console.log(str)
})
Advanced Usage for Moneybutton
You can also manually construct moneybutton payload:
const biggybank = require('biggybank')
biggybank({
payload: {
to: "19HxigV4QyBv3tHpQVcUEQyq1pzZVdoAut",
editable: true,
currency: "USD",
type: "tip"
},
message: "Send money to b.bitdb.network"
}, function(err, str) {
console.log(str)
})