1
1
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:
2020-10-22 20:35:21 +02:00
parent 456ae2eb50
commit e1882b8fcf
2 changed files with 29 additions and 0 deletions

View File

@@ -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') {