payment-tokenator v0.2.40
payment-tokenator
Overview
PaymentTokenator makes sending Bitcoin payments peer-to-peer between Babbage users a breeze!
Example Usage
This example demonstrates sending and receiving payments with payment-tokenator
const PaymentTokenator = require('payment-tokenator')
const johnSmith = '022600d2ef37d123fdcac7d25d7a464ada7acd3fb65a0daf85412140ee20884311'
const init = async () => {
// Create a new instance of the PaymentTokenator class
// Optionally configure a custom peerServHost
const tokenator = new PaymentTokenator({
peerServHost: 'https://staging-peerserv.babbage.systems'
})
// Send a payment using Babbage
await tokenator.sendPayment({
recipient: johnSmith,
amount: 1033 // satoshis
})
// List Incoming Payments
const payments = await tokenator.listIncomingPayments()
// Accept the first payment received (for example)
await tokenator.acceptPayment(payments[0])
}
init()
API
Table of Contents
PaymentTokenator
Extends Tokenator
Extends the Tokenator class to enable peer-to-peer Bitcoin payments
Parameters
obj
object All parameters are given in an object. (optional, default{}
)
sendPayment
Sends Bitcoin to a PeerServ recipient
Parameters
payment
Object The payment object
acceptPayment
Accepts a payment into the default basket
Parameters
payment
Object The payment object
listIncomingPayments
Lists incoming Bitcoin payments
Returns Array of payments to receive
PaymentTokenator
Extends Tokenator
Extends the Tokenator class to enable peer-to-peer Bitcoin payments
Parameters
obj
object All parameters are given in an object. (optional, default{}
)
sendPayment
Sends Bitcoin to a PeerServ recipient
Parameters
payment
Object The payment object
acceptPayment
Accepts a payment into the default basket
Parameters
payment
Object The payment object
listIncomingPayments
Lists incoming Bitcoin payments
Returns Array of payments to receive
9 months ago
9 months ago
10 months ago
11 months ago
11 months ago
11 months ago
12 months ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
2 years ago
2 years ago
2 years ago
2 years ago