actually paying and withdrawing with lnurl.
This commit is contained in:
@@ -16,11 +16,12 @@ var LNbits = {
|
||||
data: data
|
||||
})
|
||||
},
|
||||
createInvoice: function (wallet, amount, memo) {
|
||||
createInvoice: function (wallet, amount, memo, lnurlCallback = null) {
|
||||
return this.request('post', '/api/v1/payments', wallet.inkey, {
|
||||
out: false,
|
||||
amount: amount,
|
||||
memo: memo
|
||||
memo: memo,
|
||||
lnurl_callback: lnurlCallback
|
||||
})
|
||||
},
|
||||
payInvoice: function (wallet, bolt11) {
|
||||
@@ -29,6 +30,20 @@ var LNbits = {
|
||||
bolt11: bolt11
|
||||
})
|
||||
},
|
||||
payLnurl: function (
|
||||
wallet,
|
||||
callback,
|
||||
description_hash,
|
||||
amount,
|
||||
description = ''
|
||||
) {
|
||||
return this.request('post', '/api/v1/payments/lnurl', wallet.adminkey, {
|
||||
callback,
|
||||
description_hash,
|
||||
amount,
|
||||
description
|
||||
})
|
||||
},
|
||||
getWallet: function (wallet) {
|
||||
return this.request('get', '/api/v1/wallet', wallet.inkey)
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user