mirror of
https://github.com/bumi/lntip
synced 2026-02-14 21:27:48 +00:00
Add support to get an onchain Address
This commit is contained in:
@@ -155,6 +155,19 @@ class LnMe {
|
||||
});
|
||||
}
|
||||
|
||||
newAddress() {
|
||||
let args = {
|
||||
method: 'POST',
|
||||
mode: 'cors',
|
||||
header: { 'Content-Type': 'application/json' }
|
||||
};
|
||||
return this._fetch(`${this.baseURL}/v1/newaddress`, args)
|
||||
.then(address => {
|
||||
this.address = address;
|
||||
return address;
|
||||
});
|
||||
}
|
||||
|
||||
requestPayment() {
|
||||
return this.addInvoice().then((invoice) => {
|
||||
if (typeof webln !== 'undefined') {
|
||||
|
||||
Reference in New Issue
Block a user