diff --git a/files/assets/lnme.js b/files/assets/lnme.js index bbebe0b..f19743e 100644 --- a/files/assets/lnme.js +++ b/files/assets/lnme.js @@ -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') { diff --git a/files/root/index.html b/files/root/index.html index 62b2a2c..e807922 100644 --- a/files/root/index.html +++ b/files/root/index.html @@ -24,6 +24,9 @@ margin: 1em auto; text-align: center; } + .note { + font-size: 0.2em; + } .wrapper h1 { font-weight: 700; } @@ -107,6 +110,10 @@ +
+