feat: HodlInvoices (Rebase) (#2869)
Co-authored-by: pseudozach <git@pseudozach.com> Co-authored-by: dni ⚡ <office@dnilabs.com> Co-authored-by: Vlad Stan <stan.v.vlad@gmail.com>
This commit is contained in:
co-authored by
pseudozach
dni ⚡
Vlad Stan
parent
6e9f451419
commit
f91c933919
@@ -21,7 +21,8 @@ window.LNbits = {
|
||||
unit = 'sat',
|
||||
lnurlCallback = null,
|
||||
fiatProvider = null,
|
||||
internalMemo = null
|
||||
internalMemo = null,
|
||||
payment_hash = null
|
||||
) {
|
||||
const data = {
|
||||
out: false,
|
||||
@@ -29,7 +30,8 @@ window.LNbits = {
|
||||
memo: memo,
|
||||
unit: unit,
|
||||
lnurl_callback: lnurlCallback,
|
||||
fiat_provider: fiatProvider
|
||||
fiat_provider: fiatProvider,
|
||||
payment_hash: payment_hash
|
||||
}
|
||||
if (internalMemo) {
|
||||
data.extra = {
|
||||
@@ -80,6 +82,16 @@ window.LNbits = {
|
||||
data
|
||||
)
|
||||
},
|
||||
cancelInvoice(wallet, paymentHash) {
|
||||
return this.request('post', '/api/v1/payments/cancel', wallet.adminkey, {
|
||||
payment_hash: paymentHash
|
||||
})
|
||||
},
|
||||
settleInvoice(wallet, preimage) {
|
||||
return this.request('post', `/api/v1/payments/settle`, wallet.adminkey, {
|
||||
preimage: preimage
|
||||
})
|
||||
},
|
||||
authLnurl(wallet, callback) {
|
||||
return this.request('post', '/api/v1/lnurlauth', wallet.adminkey, {
|
||||
callback
|
||||
|
||||
Reference in New Issue
Block a user