btcpay-greenfield-node-client
Version:
## Installation
1 lines • 57.6 kB
JavaScript
"use strict";function e(e){return e&&"object"==typeof e&&"default"in e?e.default:e}Object.defineProperty(exports,"__esModule",{value:!0});var t=e(require("form-data")),r=require("node-fetch"),n=e(r),o=require("util");function a(e,t,r,n,o,a,i){try{var s=e[a](i),u=s.value}catch(e){return void r(e)}s.done?t(u):Promise.resolve(u).then(n,o)}function i(e){return function(){var t=this,r=arguments;return new Promise((function(n,o){var i=e.apply(t,r);function s(e){a(i,n,o,s,u,"next",e)}function u(e){a(i,n,o,s,u,"throw",e)}s(void 0)}))}}function s(){return(s=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}function u(e){return(u=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function c(e,t){return(c=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function p(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}function d(e,t,r){return(d=p()?Reflect.construct:function(e,t,r){var n=[null];n.push.apply(n,t);var o=new(Function.bind.apply(e,n));return r&&c(o,r.prototype),o}).apply(null,arguments)}function h(e){var t="function"==typeof Map?new Map:void 0;return(h=function(e){if(null===e||-1===Function.toString.call(e).indexOf("[native code]"))return e;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,r)}function r(){return d(e,arguments,u(this).constructor)}return r.prototype=Object.create(e.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),c(r,e)})(e)}var f,v,y,l,m,b,w,g,x=function(e){var t,r;function n(t,r){var n;return(n=e.call(this,r)||this).url=t.url,n.status=t.status,n.statusText=t.statusText,n.body=t.body,n}return r=e,(t=n).prototype=Object.create(r.prototype),t.prototype.constructor=t,c(t,r),n}(h(Error)),k={BASE:"",VERSION:"1",WITH_CREDENTIALS:!1,TOKEN:void 0,USERNAME:void 0,PASSWORD:void 0,HEADERS:void 0};(f=exports.InvoiceAdditionalStatus||(exports.InvoiceAdditionalStatus={})).NONE="None",f.PAID_LATE="PaidLate",f.PAID_PARTIAL="PaidPartial",f.MARKED="Marked",f.INVALID="Invalid",f.PAID_OVER="PaidOver",(v=exports.InvoiceStatus||(exports.InvoiceStatus={})).NEW="New",v.PROCESSING="Processing",v.EXPIRED="Expired",v.INVALID="Invalid",v.SETTLED="Settled",(y=exports.InvoiceStatusMark||(exports.InvoiceStatusMark={})).INVALID="Invalid",y.COMPLETE="Complete",(l=exports.LightningInvoiceStatus||(exports.LightningInvoiceStatus={})).UNPAID="Unpaid",l.PAID="Paid",l.EXPIRED="Expired",(m=exports.NetworkFeeMode||(exports.NetworkFeeMode={})).MULTIPLE_PAYMENTS_ONLY="MultiplePaymentsOnly",m.ALWAYS="Always",m.NEVER="Never",(b=exports.PaymentStatus||(exports.PaymentStatus={})).INVALID="Invalid",b.PROCESSING="Processing",b.SETTLED="Settled",(w=exports.SpeedPolicy||(exports.SpeedPolicy={})).HIGH_SPEED="HighSpeed",w.MEDIUM_SPEED="MediumSpeed",w.LOW_SPEED="LowSpeed",w.LOW_MEDIUM_SPEED="LowMediumSpeed",(g=exports.TransactionStatus||(exports.TransactionStatus={})).UNCONFIRMED="Unconfirmed",g.CONFIRMED="Confirmed",g.REPLACED="Replaced";var I,T=(function(e){var t=function(e){var t=Object.prototype,r=t.hasOwnProperty,n="function"==typeof Symbol?Symbol:{},o=n.iterator||"@@iterator",a=n.asyncIterator||"@@asyncIterator",i=n.toStringTag||"@@toStringTag";function s(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{s({},"")}catch(e){s=function(e,t,r){return e[t]=r}}function u(e,t,r,n){var o=Object.create((t&&t.prototype instanceof d?t:d).prototype),a=new I(n||[]);return o._invoke=function(e,t,r){var n="suspendedStart";return function(o,a){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw a;return{value:void 0,done:!0}}for(r.method=o,r.arg=a;;){var i=r.delegate;if(i){var s=g(i,r);if(s){if(s===p)continue;return s}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var u=c(e,t,r);if("normal"===u.type){if(n=r.done?"completed":"suspendedYield",u.arg===p)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(n="completed",r.method="throw",r.arg=u.arg)}}}(e,r,a),o}function c(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}e.wrap=u;var p={};function d(){}function h(){}function f(){}var v={};v[o]=function(){return this};var y=Object.getPrototypeOf,l=y&&y(y(T([])));l&&l!==t&&r.call(l,o)&&(v=l);var m=f.prototype=d.prototype=Object.create(v);function b(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function w(e,t){var n;this._invoke=function(o,a){function i(){return new t((function(n,i){!function n(o,a,i,s){var u=c(e[o],e,a);if("throw"!==u.type){var p=u.arg,d=p.value;return d&&"object"==typeof d&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,i,s)}),(function(e){n("throw",e,i,s)})):t.resolve(d).then((function(e){p.value=e,i(p)}),(function(e){return n("throw",e,i,s)}))}s(u.arg)}(o,a,n,i)}))}return n=n?n.then(i,i):i()}}function g(e,t){var r=e.iterator[t.method];if(void 0===r){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=void 0,g(e,t),"throw"===t.method))return p;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return p}var n=c(r,e.iterator,t.arg);if("throw"===n.type)return t.method="throw",t.arg=n.arg,t.delegate=null,p;var o=n.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,p):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,p)}function x(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function k(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function I(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(x,this),this.reset(!0)}function T(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,a=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return a.next=a}}return{next:E}}function E(){return{value:void 0,done:!0}}return h.prototype=m.constructor=f,f.constructor=h,h.displayName=s(f,i,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===h||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,f):(e.__proto__=f,s(e,i,"GeneratorFunction")),e.prototype=Object.create(m),e},e.awrap=function(e){return{__await:e}},b(w.prototype),w.prototype[a]=function(){return this},e.AsyncIterator=w,e.async=function(t,r,n,o,a){void 0===a&&(a=Promise);var i=new w(u(t,r,n,o),a);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},b(m),s(m,i,"Generator"),m[o]=function(){return this},m.toString=function(){return"[object Generator]"},e.keys=function(e){var t=[];for(var r in e)t.push(r);return t.reverse(),function r(){for(;t.length;){var n=t.pop();if(n in e)return r.value=n,r.done=!1,r}return r.done=!0,r}},e.values=T,I.prototype={constructor:I,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(k),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],i=a.completion;if("root"===a.tryLoc)return n("end");if(a.tryLoc<=this.prev){var s=r.call(a,"catchLoc"),u=r.call(a,"finallyLoc");if(s&&u){if(this.prev<a.catchLoc)return n(a.catchLoc,!0);if(this.prev<a.finallyLoc)return n(a.finallyLoc)}else if(s){if(this.prev<a.catchLoc)return n(a.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return n(a.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var a=o;break}}a&&("break"===e||"continue"===e)&&a.tryLoc<=t&&t<=a.finallyLoc&&(a=null);var i=a?a.completion:{};return i.type=e,i.arg=t,a?(this.method="next",this.next=a.finallyLoc,p):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),p},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),k(r),p}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;k(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:T(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),p}},e}(e.exports);try{regeneratorRuntime=t}catch(e){Function("r","regeneratorRuntime = r")(t)}}(I={exports:{}}),I.exports);function E(e){return null!=e}function S(e){return"string"==typeof e}function P(e){return S(e)&&""!==e}function O(e){var t=Buffer.isBuffer(e),r=o.types.isArrayBuffer(e),n=o.types.isArrayBufferView(e);return t||r||n}function C(e){var t,r,n=e.path.replace(/[:]/g,"_"),o=""+k.BASE+n;return e.query?o+(t=e.query,r=[],Object.keys(t).forEach((function(e){var n=t[e];E(n)&&(Array.isArray(n)?n.forEach((function(t){r.push(encodeURIComponent(e)+"="+encodeURIComponent(String(t)))})):r.push(encodeURIComponent(e)+"="+encodeURIComponent(String(n))))})),r.length>0?"?"+r.join("&"):""):o}function A(e){return L.apply(this,arguments)}function L(){return(L=i(T.mark((function e(t){return T.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if("function"!=typeof t){e.next=2;break}return e.abrupt("return",t());case 2:return e.abrupt("return",t);case 3:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function G(e){return q.apply(this,arguments)}function q(){return(q=i(T.mark((function e(t){var n,o,a,i,u;return T.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=new r.Headers(s({Accept:"application/json"},k.HEADERS,t.headers)),e.next=3,A(k.TOKEN);case 3:return o=e.sent,e.next=6,A(k.USERNAME);case 6:return a=e.sent,e.next=9,A(k.PASSWORD);case 9:return i=e.sent,P(o)&&n.append("Authorization","token "+o),P(a)&&P(i)&&(u=Buffer.from(a+":"+i).toString("base64"),n.append("Authorization","Basic "+u)),t.body&&(O(t.body)?n.append("Content-Type","application/octet-stream"):S(t.body)?n.append("Content-Type","text/plain"):n.append("Content-Type","application/json")),e.abrupt("return",n);case 14:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function N(e){return e.formData?(r=e.formData,n=new t,Object.keys(r).forEach((function(e){var t=r[e];E(t)&&n.append(e,t)})),n):e.body?S(e.body)||O(e.body)?e.body:JSON.stringify(e.body):void 0;var r,n}function U(e,t){return D.apply(this,arguments)}function D(){return(D=i(T.mark((function e(t,r){var o;return T.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.t0=t.method,e.next=3,G(t);case 3:return e.t1=e.sent,e.t2=N(t),o={method:e.t0,headers:e.t1,body:e.t2},e.next=8,n(r,o);case 8:return e.abrupt("return",e.sent);case 9:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function R(e,t){if(t){var r=e.headers.get(t);if(S(r))return r}return null}function M(e){return W.apply(this,arguments)}function W(){return(W=i(T.mark((function e(t){var r;return T.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,!(r=t.headers.get("Content-Type"))){e.next=13;break}if(!r.toLowerCase().startsWith("application/json")){e.next=10;break}return e.next=7,t.json();case 7:return e.abrupt("return",e.sent);case 10:return e.next=12,t.text();case 12:return e.abrupt("return",e.sent);case 13:e.next=18;break;case 15:e.prev=15,e.t0=e.catch(0),console.error(e.t0);case 18:return e.abrupt("return",null);case 19:case"end":return e.stop()}}),e,null,[[0,15]])})))).apply(this,arguments)}function B(e,t){var r=s({400:"Bad Request",401:"Unauthorized",403:"Forbidden",404:"Not Found",500:"Internal Server Error",502:"Bad Gateway",503:"Service Unavailable"},e.errors)[t.status];if(r)throw new x(t,r);if(!t.ok)throw new x(t,"Generic Error")}function _(e){return j.apply(this,arguments)}function j(){return(j=i(T.mark((function e(t){var r,n,o,a,i;return T.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=C(t),e.next=3,U(t,r);case 3:return n=e.sent,e.next=6,M(n);case 6:return o=e.sent,a=R(n,t.responseHeader),B(t,i={url:r,ok:n.ok,status:n.status,statusText:n.statusText,body:a||o}),e.abrupt("return",i);case 11:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var F=function(){function e(){}return e.deleteApiKeysService=function(){var e=i(T.mark((function e(t){var r;return T.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.apikey,e.next=3,_({method:"DELETE",path:"/api/v1/api-keys/"+r,errors:{404:"The key is not found for this user"}});case 3:return e.abrupt("return",e.sent.body);case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),e.getApiKeysService=function(){var e=i(T.mark((function e(){return T.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,_({method:"GET",path:"/api/v1/api-keys/current"});case 2:return e.abrupt("return",e.sent.body);case 4:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),e.deleteApiKeysService1=function(){var e=i(T.mark((function e(){return T.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,_({method:"DELETE",path:"/api/v1/api-keys/current"});case 2:return e.abrupt("return",e.sent.body);case 4:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),e.postApiKeysService=function(){var e=i(T.mark((function e(t){var r;return T.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.requestBody,e.next=3,_({method:"POST",path:"/api/v1/api-keys",body:r});case 3:return e.abrupt("return",e.sent.body);case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),e}(),H=function(){function e(){}return e.getAuthorizationService=function(){var e=i(T.mark((function e(t){var r,n,o,a,i,s,u,c;return T.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.permissions,n=t.applicationName,a=void 0===(o=t.strict)||o,s=void 0!==(i=t.selectiveStores)&&i,u=t.redirect,c=t.applicationIdentifier,e.next=3,_({method:"GET",path:"/api-keys/authorize",query:{permissions:r,applicationName:n,strict:a,selectiveStores:s,redirect:u,applicationIdentifier:c},errors:{307:"Makes browser do an HTTP POST request to the specified url in `redirect` with a JSON body consisting of `apiKey` (the api key created or matched), `permissions` (the permissions the user consented to), and `userId` (the id of the user that consented) upon consent"}});case 3:return e.abrupt("return",e.sent.body);case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),e}(),K=function(){function e(){}return e.healthGetHealth=function(){var e=i(T.mark((function e(){return T.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,_({method:"GET",path:"/api/v1/health"});case 2:return e.abrupt("return",e.sent.body);case 4:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),e}(),V=function(){function e(){}return e.invoicesGetInvoices=function(){var e=i(T.mark((function e(t){var r;return T.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.storeId,e.next=3,_({method:"GET",path:"/api/v1/stores/"+r+"/invoices"});case 3:return e.abrupt("return",e.sent.body);case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),e.invoicesCreateInvoice=function(){var e=i(T.mark((function e(t){var r,n;return T.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.storeId,n=t.requestBody,e.next=3,_({method:"POST",path:"/api/v1/stores/"+r+"/invoices",body:n,errors:{400:"A list of errors that occurred when creating the invoice",403:"If you are authenticated but forbidden to add new invoices"}});case 3:return e.abrupt("return",e.sent.body);case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),e.invoicesGetInvoice=function(){var e=i(T.mark((function e(t){var r,n;return T.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.storeId,n=t.invoiceId,e.next=3,_({method:"GET",path:"/api/v1/stores/"+r+"/invoices/"+n,errors:{403:"If you are authenticated but forbidden to view the specified invoie",404:"The key is not found for this invoice"}});case 3:return e.abrupt("return",e.sent.body);case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),e.invoicesArchiveInvoice=function(){var e=i(T.mark((function e(t){var r,n;return T.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.storeId,n=t.invoiceId,e.next=3,_({method:"DELETE",path:"/api/v1/stores/"+r+"/invoices/"+n,errors:{400:"A list of errors that occurred when archiving the invoice",403:"If you are authenticated but forbidden to archive the specified invoice",404:"The key is not found for this invoice"}});case 3:return e.abrupt("return",e.sent.body);case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),e.invoicesUpdateInvoice=function(){var e=i(T.mark((function e(t){var r,n,o;return T.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.storeId,n=t.invoiceId,o=t.requestBody,e.next=3,_({method:"PUT",path:"/api/v1/stores/"+r+"/invoices/"+n,body:o,errors:{400:"A list of errors that occurred when updating the invoice",403:"If you are authenticated but forbidden to update the specified invoice",404:"The key is not found for this invoice"}});case 3:return e.abrupt("return",e.sent.body);case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),e.invoicesGetInvoicePaymentMethods=function(){var e=i(T.mark((function e(t){var r,n;return T.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.storeId,n=t.invoiceId,e.next=3,_({method:"GET",path:"/api/v1/stores/"+r+"/invoices/"+n+"/payment-methods",errors:{403:"If you are authenticated but forbidden to view the specified invoie",404:"The key is not found for this invoice"}});case 3:return e.abrupt("return",e.sent.body);case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),e.invoicesArchiveInvoice1=function(){var e=i(T.mark((function e(t){var r,n;return T.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.storeId,n=t.invoiceId,e.next=3,_({method:"DELETE",path:"/api/v1/stores/"+r+"/invoices/"+n+"/payment-methods",errors:{400:"A list of errors that occurred when archiving the invoice",403:"If you are authenticated but forbidden to archive the specified invoice",404:"The key is not found for this invoice"}});case 3:return e.abrupt("return",e.sent.body);case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),e.invoicesMarkInvoiceStatus=function(){var e=i(T.mark((function e(t){var r,n,o;return T.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.storeId,n=t.invoiceId,o=t.requestBody,e.next=3,_({method:"POST",path:"/api/v1/stores/"+r+"/invoices/"+n+"/status",body:o,errors:{400:"A list of errors that occurred when updating the invoice",403:"If you are authenticated but forbidden to update the invoice"}});case 3:return e.abrupt("return",e.sent.body);case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),e.invoicesUnarchiveInvoice=function(){var e=i(T.mark((function e(t){var r,n;return T.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.storeId,n=t.invoiceId,e.next=3,_({method:"POST",path:"/api/v1/stores/"+r+"/invoices/"+n+"/unarchive",errors:{400:"A list of errors that occurred when updating the invoice",403:"If you are authenticated but forbidden to update the invoice"}});case 3:return e.abrupt("return",e.sent.body);case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),e}(),z=function(){function e(){}return e.internalLightningNodeApiGetInfo=function(){var e=i(T.mark((function e(t){var r;return T.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.cryptoCode,e.next=3,_({method:"GET",path:"/api/v1/server/lightning/"+r+"/info",errors:{404:"The lightning node configuration was not found",503:"Unable to access the lightning node"}});case 3:return e.abrupt("return",e.sent.body);case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),e.internalLightningNodeApiConnectToNode=function(){var e=i(T.mark((function e(t){var r,n;return T.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.cryptoCode,n=t.requestBody,e.next=3,_({method:"POST",path:"/api/v1/server/lightning/"+r+"/connect",body:n,errors:{400:"Wellknown error codes are: `could-not-connect`",404:"The lightning node configuration was not found",422:"Unable to validate the request",503:"Unable to access the lightning node"}});case 3:return e.abrupt("return",e.sent.body);case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),e.internalLightningNodeApiGetChannels=function(){var e=i(T.mark((function e(t){var r;return T.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.cryptoCode,e.next=3,_({method:"GET",path:"/api/v1/server/lightning/"+r+"/channels",errors:{404:"The lightning node configuration was not found"}});case 3:return e.abrupt("return",e.sent.body);case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),e.internalLightningNodeApiOpenChannel=function(){var e=i(T.mark((function e(t){var r,n;return T.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.cryptoCode,n=t.requestBody,e.next=3,_({method:"POST",path:"/api/v1/server/lightning/"+r+"/channels",body:n,errors:{400:"Wellknown error codes are: `channel-already-exists`, `cannot-afford-funding`, `need-more-confirmations`, `peer-not-connected`",404:"The lightning node configuration was not found",422:"Unable to validate the request"}});case 3:return e.abrupt("return",e.sent.body);case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),e.internalLightningNodeApiGetDepositAddress=function(){var e=i(T.mark((function e(t){var r;return T.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.cryptoCode,e.next=3,_({method:"POST",path:"/api/v1/server/lightning/"+r+"/address",errors:{404:"The lightning node configuration was not found",503:"Unable to access the lightning node"}});case 3:return e.abrupt("return",e.sent.body);case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),e.internalLightningNodeApiGetInvoice=function(){var e=i(T.mark((function e(t){var r,n;return T.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.cryptoCode,n=t.id,e.next=3,_({method:"GET",path:"/api/v1/server/lightning/"+r+"/invoices/"+n,errors:{404:"The lightning node configuration or the specified invoice was not found ",503:"Unable to access the lightning node"}});case 3:return e.abrupt("return",e.sent.body);case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),e.internalLightningNodeApiPayInvoice=function(){var e=i(T.mark((function e(t){var r,n;return T.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.cryptoCode,n=t.requestBody,e.next=3,_({method:"POST",path:"/api/v1/server/lightning/"+r+"/invoices/pay",body:n,errors:{400:"Wellknown error codes are: `could-not-find-route`, `generic-error`",404:"The lightning node configuration was not found",422:"Unable to validate the request",503:"Unable to access the lightning node"}});case 3:return e.abrupt("return",e.sent.body);case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),e.internalLightningNodeApiCreateInvoice=function(){var e=i(T.mark((function e(t){var r,n;return T.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.cryptoCode,n=t.requestBody,e.next=3,_({method:"POST",path:"/api/v1/server/lightning/"+r+"/invoices",body:n,errors:{400:"Wellknown error codes are: `invoice-error`",404:"The lightning node configuration was not found",503:"Unable to access the lightning node"}});case 3:return e.abrupt("return",e.sent.body);case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),e}(),Y=function(){function e(){}return e.storeLightningNodeApiGetInfo=function(){var e=i(T.mark((function e(t){var r,n;return T.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.cryptoCode,n=t.storeId,e.next=3,_({method:"GET",path:"/api/v1/stores/"+n+"/lightning/"+r+"/info",errors:{404:"The lightning node configuration was not found",503:"Unable to access the lightning node"}});case 3:return e.abrupt("return",e.sent.body);case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),e.storeLightningNodeApiConnectToNode=function(){var e=i(T.mark((function e(t){var r,n,o;return T.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.cryptoCode,n=t.storeId,o=t.requestBody,e.next=3,_({method:"POST",path:"/api/v1/stores/"+n+"/lightning/"+r+"/connect",body:o,errors:{400:"Wellknown error codes are: `could-not-connect`",404:"The lightning node configuration was not found",422:"Unable to validate the request",503:"Unable to access the lightning node"}});case 3:return e.abrupt("return",e.sent.body);case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),e.storeLightningNodeApiGetChannels=function(){var e=i(T.mark((function e(t){var r,n;return T.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.cryptoCode,n=t.storeId,e.next=3,_({method:"GET",path:"/api/v1/stores/"+n+"/lightning/"+r+"/channels",errors:{404:"The lightning node configuration was not found"}});case 3:return e.abrupt("return",e.sent.body);case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),e.storeLightningNodeApiOpenChannel=function(){var e=i(T.mark((function e(t){var r,n,o;return T.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.cryptoCode,n=t.storeId,o=t.requestBody,e.next=3,_({method:"POST",path:"/api/v1/stores/"+n+"/lightning/"+r+"/channels",body:o,errors:{400:"Wellknown error codes are: `channel-already-exists`, `cannot-afford-funding`, `need-more-confirmations`, `peer-not-connected`",404:"The lightning node configuration was not found",422:"Unable to validate the request",503:"Unable to access the lightning node"}});case 3:return e.abrupt("return",e.sent.body);case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),e.storeLightningNodeApiGetDepositAddress=function(){var e=i(T.mark((function e(t){var r,n;return T.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.cryptoCode,n=t.storeId,e.next=3,_({method:"POST",path:"/api/v1/stores/"+n+"/lightning/"+r+"/address",errors:{404:"The lightning node configuration was not found",503:"Unable to access the lightning node"}});case 3:return e.abrupt("return",e.sent.body);case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),e.storeLightningNodeApiGetInvoice=function(){var e=i(T.mark((function e(t){var r,n,o;return T.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.cryptoCode,n=t.storeId,o=t.id,e.next=3,_({method:"GET",path:"/api/v1/stores/"+n+"/lightning/"+r+"/invoices/"+o,errors:{404:"The lightning node configuration or the specified invoice was not found ",503:"Unable to access the lightning node"}});case 3:return e.abrupt("return",e.sent.body);case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),e.storeLightningNodeApiPayInvoice=function(){var e=i(T.mark((function e(t){var r,n,o;return T.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.cryptoCode,n=t.storeId,o=t.requestBody,e.next=3,_({method:"POST",path:"/api/v1/stores/"+n+"/lightning/"+r+"/invoices/pay",body:o,errors:{400:"Wellknown error codes are: `could-not-find-route`, `generic-error`",404:"The lightning node configuration was not found",422:"Unable to validate the request",503:"Unable to access the lightning node"}});case 3:return e.abrupt("return",e.sent.body);case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),e.storeLightningNodeApiCreateInvoice=function(){var e=i(T.mark((function e(t){var r,n,o;return T.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.cryptoCode,n=t.storeId,o=t.requestBody,e.next=3,_({method:"POST",path:"/api/v1/stores/"+n+"/lightning/"+r+"/invoices",body:o,errors:{400:"Wellknown error codes are: `invoice-error`",404:"The lightning node configuration was not found",503:"Unable to access the lightning node"}});case 3:return e.abrupt("return",e.sent.body);case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),e}(),J=function(){function e(){}return e.langCodes=function(){var e=i(T.mark((function e(){return T.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,_({method:"GET",path:"/misc/lang"});case 2:return e.abrupt("return",e.sent.body);case 4:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),e.getMiscalleneousService=function(){var e=i(T.mark((function e(t){var r,n;return T.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.invoiceId,n=t.lang,e.next=3,_({method:"GET",path:"/i/"+r,query:{lang:n}});case 3:return e.abrupt("return",e.sent.body);case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),e}(),X=function(){function e(){}return e.notificationsGetNotifications=function(){var e=i(T.mark((function e(t){var r;return T.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.seen,e.next=3,_({method:"GET",path:"/api/v1/users/me/notifications",query:{seen:r}});case 3:return e.abrupt("return",e.sent.body);case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),e.notificationsGetInvoice=function(){var e=i(T.mark((function e(t){var r;return T.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.id,e.next=3,_({method:"GET",path:"/api/v1/users/me/notifications/"+r,errors:{403:"If you are authenticated but forbidden to view the specified notification",404:"The key is not found for this notification"}});case 3:return e.abrupt("return",e.sent.body);case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),e.notificationsUpdateNotification=function(){var e=i(T.mark((function e(t){var r,n;return T.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.id,n=t.requestBody,e.next=3,_({method:"PUT",path:"/api/v1/users/me/notifications/"+r,body:n,errors:{403:"If you are authenticated but forbidden to update the specified notification",404:"The key is not found for this notification"}});case 3:return e.abrupt("return",e.sent.body);case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),e.notificationsDeleteNotification=function(){var e=i(T.mark((function e(t){var r;return T.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.id,e.next=3,_({method:"DELETE",path:"/api/v1/users/me/notifications/"+r,errors:{403:"If you are authenticated but forbidden to remove the specified notification",404:"The key is not found for this notification"}});case 3:return e.abrupt("return",e.sent.body);case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),e}(),Q=function(){function e(){}return e.paymentRequestsGetPaymentRequests=function(){var e=i(T.mark((function e(t){var r;return T.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.storeId,e.next=3,_({method:"GET",path:"/api/v1/stores/"+r+"/payment-requests"});case 3:return e.abrupt("return",e.sent.body);case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),e.paymentRequestsCreatePaymentRequest=function(){var e=i(T.mark((function e(t){var r,n;return T.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.storeId,n=t.requestBody,e.next=3,_({method:"POST",path:"/api/v1/stores/"+r+"/payment-requests",body:n,errors:{400:"A list of errors that occurred when creating the payment request",403:"If you are authenticated but forbidden to add new payment requests"}});case 3:return e.abrupt("return",e.sent.body);case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),e.paymentRequestsGetPaymentRequest=function(){var e=i(T.mark((function e(t){var r,n;return T.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.storeId,n=t.paymentRequestId,e.next=3,_({method:"GET",path:"/api/v1/stores/"+r+"/payment-requests/"+n,errors:{403:"If you are authenticated but forbidden to view the specified payment request",404:"The key is not found for this payment request"}});case 3:return e.abrupt("return",e.sent.body);case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),e.paymentRequestsArchivePaymentRequest=function(){var e=i(T.mark((function e(t){var r,n;return T.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.storeId,n=t.paymentRequestId,e.next=3,_({method:"DELETE",path:"/api/v1/stores/"+r+"/payment-requests/"+n,errors:{400:"A list of errors that occurred when archiving the payment request",403:"If you are authenticated but forbidden to archive the specified payment request",404:"The key is not found for this payment request"}});case 3:return e.abrupt("return",e.sent.body);case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),e.paymentRequestsUpdatePaymentRequest=function(){var e=i(T.mark((function e(t){var r,n,o;return T.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.storeId,n=t.paymentRequestId,o=t.requestBody,e.next=3,_({method:"PUT",path:"/api/v1/stores/"+r+"/payment-requests/"+n,body:o,errors:{400:"A list of errors that occurred when updating the payment request",403:"If you are authenticated but forbidden to update the payment request"}});case 3:return e.abrupt("return",e.sent.body);case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),e}(),Z=function(){function e(){}return e.pullPaymentsGetPullPayments=function(){var e=i(T.mark((function e(t){var r,n,o;return T.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.storeId,o=void 0!==(n=t.includeArchived)&&n,e.next=3,_({method:"GET",path:"/api/v1/stores/"+r+"/pull-payments",query:{includeArchived:o}});case 3:return e.abrupt("return",e.sent.body);case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),e.pullPaymentsCreatePullPayment=function(){var e=i(T.mark((function e(t){var r,n;return T.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.storeId,n=t.requestBody,e.next=3,_({method:"POST",path:"/api/v1/stores/"+r+"/pull-payments",body:n,errors:{422:"Unable to validate the request"}});case 3:return e.abrupt("return",e.sent.body);case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),e.pullPaymentsArchivePullPayment=function(){var e=i(T.mark((function e(t){var r,n;return T.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.storeId,n=t.pullPaymentId,e.next=3,_({method:"DELETE",path:"/api/v1/stores/"+r+"/pull-payments/"+n,errors:{404:"The pull payment has not been found, or does not belong to this store"}});case 3:return e.abrupt("return",e.sent.body);case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),e.pullPaymentsApprovePayout=function(){var e=i(T.mark((function e(t){var r,n,o;return T.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.storeId,n=t.payoutId,o=t.requestBody,e.next=3,_({method:"POST",path:"/api/v1/stores/"+r+"/payouts/"+n,body:o,errors:{400:"Wellknown error codes are: `rate-unavailable`, `invalid-state`, `amount-too-low`, `old-revision`",404:"The payout is not found",422:"Unable to validate the request"}});case 3:return e.abrupt("return",e.sent.body);case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),e.pullPaymentsCancelPayout=function(){var e=i(T.mark((function e(t){var r,n;return T.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.storeId,n=t.payoutId,e.next=3,_({method:"DELETE",path:"/api/v1/stores/"+r+"/payouts/"+n,errors:{404:"The payout is not found"}});case 3:return e.abrupt("return",e.sent.body);case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),e}(),$=function(){function e(){}return e.pullPaymentsGetPullPayment=function(){var e=i(T.mark((function e(t){var r;return T.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.pullPaymentId,e.next=3,_({method:"GET",path:"/api/v1/pull-payments/"+r,errors:{404:"Pull payment not found"}});case 3:return e.abrupt("return",e.sent.body);case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),e.pullPaymentsGetPayouts=function(){var e=i(T.mark((function e(t){var r,n,o;return T.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.pullPaymentId,o=void 0!==(n=t.includeCancelled)&&n,e.next=3,_({method:"GET",path:"/api/v1/pull-payments/"+r+"/payouts",query:{includeCancelled:o},errors:{404:"Pull payment not found"}});case 3:return e.abrupt("return",e.sent.body);case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),e.pullPaymentsCreatePayout=function(){var e=i(T.mark((function e(t){var r,n;return T.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.pullPaymentId,n=t.requestBody,e.next=3,_({method:"POST",path:"/api/v1/pull-payments/"+r+"/payouts",body:n,errors:{400:"Wellknown error codes are: `duplicate-destination`, `expired`, `not-started`, `archived`, `overdraft`, `amount-too-low`, `payment-method-not-supported`",404:"Pull payment not found",422:"Unable to validate the request"}});case 3:return e.abrupt("return",e.sent.body);case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),e}(),ee=function(){function e(){}return e.serverInfoGetServerInfo=function(){var e=i(T.mark((function e(){return T.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,_({method:"GET",path:"/api/v1/server/info"});case 2:return e.abrupt("return",e.sent.body);case 4:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),e}(),te=function(){function e(){}return e.storeLightningNetworkPaymentMethodsGetLightningNetworkPaymentMethod=function(){var e=i(T.mark((function e(t){var r,n;return T.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.storeId,n=t.cryptoCode,e.next=3,_({method:"GET",path:"/api/v1/stores/"+r+"/payment-methods/LightningNetwork/"+n,errors:{403:"If you are authenticated but forbidden to view the specified store",404:"The key is not found for this store/payment method"}});case 3:return e.abrupt("return",e.sent.body);case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),e.storeLightningNetworkPaymentMethodsUpdateLightningNetworkPaymentMethod=function(){var e=i(T.mark((function e(t){var r,n,o;return T.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.storeId,n=t.cryptoCode,o=t.requestBody,e.next=3,_({method:"PUT",path:"/api/v1/stores/"+r+"/payment-methods/LightningNetwork/"+n,body:o,errors:{400:"A list of errors that occurred when updating the store payment method",403:"If you are authenticated but forbidden to update the specified store",404:"The key is not found for this store"}});case 3:return e.abrupt("return",e.sent.body);case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),e.deleteStorePaymentMethodsLightningNetworkService=function(){var e=i(T.mark((function e(t){var r,n;return T.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.storeId,n=t.cryptoCode,e.next=3,_({method:"DELETE",path:"/api/v1/stores/"+r+"/payment-methods/LightningNetwork/"+n,errors:{400:"A list of errors that occurred when removing the payment method",403:"If you are authenticated but forbidden to remove the specified payment method",404:"The key is not found for this store/payment-method"}});case 3:return e.abrupt("return",e.sent.body);case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),e}(),re=function(){function e(){}return e.storeOnChainPaymentMethodsGetOnChainPaymentMethod=function(){var e=i(T.mark((function e(t){var r,n;return T.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.storeId,n=t.cryptoCode,e.next=3,_({method:"GET",path:"/api/v1/stores/"+r+"/payment-methods/OnChain/"+n,errors:{403:"If you are authenticated but forbidden to view the specified store",404:"The key is not found for this store/payment method"}});case 3:return e.abrupt("return",e.sent.body);case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),e.storeOnChainPaymentMethodsUpdateOnChainPaymentMethod=function(){var e=i(T.mark((function e(t){var r,n,o;return T.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.storeId,n=t.cryptoCode,o=t.requestBody,e.next=3,_({method:"PUT",path:"/api/v1/stores/"+r+"/payment-methods/OnChain/"+n,body:o,errors:{400:"A list of errors that occurred when updating the store payment method",403:"If you are authenticated but forbidden to update the specified store",404:"The key is not found for this store"}});case 3:return e.abrupt("return",e.sent.body);case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),e.deleteStorePaymentMethodsOnChainService=function(){var e=i(T.mark((function e(t){var r,n;return T.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.storeId,n=t.cryptoCode,e.next=3,_({method:"DELETE",path:"/api/v1/stores/"+r+"/payment-methods/OnChain/"+n,errors:{400:"A list of errors that occurred when removing the payment method",403:"If you are authenticated but forbidden to remove the specified payment method",404:"The key is not found for this store/payment-method"}});case 3:return e.abrupt("return",e.sent.body);case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),e.storeOnChainPaymentMethodsGetOnChainPaymentMethodPreview=function(){var e=i(T.mark((function e(t){var r,n,o,a;return T.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.storeId,n=t.cryptoCode,o=t.offset,a=t.amount,e.next=3,_({method:"GET",path:"/api/v1/stores/"+r+"/payment-methods/OnChain/"+n+"/preview",query:{offset:o,amount:a},errors:{403:"If you are authenticated but forbidden to view the specified store",404:"The key is not found for this store/payment method"}});case 3:return e.abrupt("return",e.sent.body);case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),e.storeOnChainPaymentMethodsGetOnChainPaymentMethodPreview1=function(){var e=i(T.mark((function e(t){var r,n,o,a,i;return T.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.storeId,n=t.cryptoCode,o=t.requestBody,a=t.offset,i=t.amount,e.next=3,_({method:"POST",path:"/api/v1/stores/"+r+"/payment-methods/OnChain/"+n+"/preview",query:{offset:a,amount:i},body:o,errors:{403:"If you are authenticated but forbidden to view the specified store",404:"The key is not found for this store"}});case 3:return e.abrupt("return",e.sent.body);case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),e}(),ne=function(){function e(){}return e.storesGetStores=function(){var e=i(T.mark((function e(){return T.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,_({method:"GET",path:"/api/v1/stores"});case 2:return e.abrupt("return",e.sent.body);case 4:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),e.postStoresService=function(){var e=i(T.mark((function e(t){var r;return T.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.requestBody,e.next=3,_({method:"POST",path:"/api/v1/stores",body:r,errors:{400:"A list of errors that occurred when creating the store",403:"If you are authenticated but forbidden to add new stores"}});case 3:return e.abrupt("return",e.sent.body);case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),e.storesGetStore=function(){var e=i(T.mark((function e(t){var r;return T.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.storeId,e.next=3,_({method:"GET",path:"/api/v1/stores/"+r,errors:{403:"If you are authenticated but forbidden to view the specified store",404:"The key is not found for this store"}});case 3:return e.abrupt("return",e.sent.body);case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),e.storesUpdateStore=function(){var e=i(T.mark((function e(t){var r,n;return T.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.storeId,n=t.requestBody,e.next=3,_({method:"PUT",path:"/api/v1/stores/"+r,body:n,errors:{400:"A list of errors that occurred when updating the store",403:"If you are authenticated but forbidden to update the specified store",404:"The key is not found for this store"}});case 3:return e.abrupt("return",e.sent.body);case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),e.deleteStoresService=function(){var e=i(T.mark((function e(t){var r;return T.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.storeId,e.next=3,_({method:"DELETE",path:"/api/v1/stores/"+r,errors:{400:"A list of errors that occurred when removing the store",403:"If you are authenticated but forbidden to remove the specified store",404:"The key is not found for this store"}});case 3:return e.abrupt("return",e.sent.body);case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),e}(),oe=function(){function e(){}return e.storeOnChainWalletsShowOnChainWalletOverview=function(){var e=i(T.mark((function e(t){var r,n;return T.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.storeId,n=t.cryptoCode,e.next=3,_({method:"GET",path:"/api/v1/stores/"+r+"/payment-methods/OnChain/"+n+"/wallet",errors:{403:"If you are authenticated but forbidden to view the specified store",404:"The key is not found for this store/wallet"}});case 3:return e.abrupt("return",e.sent.body);case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),e.storeOnChainWalletsGetOnChainWalletReceiveAddress=function(){var e=i(T.mark((function e(t){var r,n,o;return T.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.storeId,n=t.cryptoCode,o=t.forceGenerate,e.next=3,_({method:"GET",path:"/api/v1/stores/"+r+"/payment-methods/OnChain/"+n+"/wallet/address",query:{forceGenerate:o},errors:{403:"If you are authenticated but forbidden to view the specified store",404:"The key is not found for this store/wallet"}});case 3:return e.abrupt("return",e.sent.body);case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),e.storeOnChainWalletsUnReserveOnChainWalletReceiveAddress=function(){var e=i(T.mark((function e(t){var r,n;return T.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.storeId,n=t.cryptoCode,e.next=3,_({method:"DELETE",path:"/api/v1/stores/"+r+"/payment-methods/OnChain/"+n+"/wallet/address",errors:{403:"If you are authenticated but forbidden to view the specified store",404:"The key is not found for this store/wallet or there was no address reserved"}});case 3:return e.abrupt("return",e.sent.body);case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),e.storeOnChainWalletsShowOnChainWalletTransactions=function(){var e=i(T.mark((function e(t){var r,n,o;return T.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.storeId,n=t.cryptoCode,o=t.statusFilter,e.next=3,_({method:"GET",path:"/api/v1/stores/"+r+"/payment-methods/OnChain/"+n+"/wallet/transactions",query:{statusFilter:o},errors:{403:"If you are authenticated but forbidden to view the specified store",404:"The key is not found for this store/wallet"}});case 3:return e.abrupt("return",e.sent.body);case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),e.storeOnChainWalletsCreateOnChainTransaction=function(){var e=i(T.mark((function e(t){var r,n,o;return T.wrap((functi