marina-provider
Advanced tools
Comparing version 1.7.2 to 1.8.0
@@ -977,7 +977,11 @@ 'use strict'; | ||
(function (TxStatusEnum) { | ||
TxStatusEnum[TxStatusEnum["Confirmed"] = 1] = "Confirmed"; | ||
TxStatusEnum[TxStatusEnum["Pending"] = 0] = "Pending"; | ||
})(exports.TxStatusEnum || (exports.TxStatusEnum = {})); | ||
function isIonioScriptDetails(script) { | ||
return script.artifact !== undefined; | ||
} | ||
(function (AccountType) { | ||
AccountType["P2WPKH"] = "p2wpkh"; | ||
AccountType["Ionio"] = "ionio"; | ||
})(exports.AccountType || (exports.AccountType = {})); | ||
exports.DetectProviderTimeoutError = DetectProviderTimeoutError; | ||
@@ -987,2 +991,3 @@ exports.detectProvider = detectProvider; | ||
exports.isDataRecipient = isDataRecipient; | ||
exports.isIonioScriptDetails = isIonioScriptDetails; | ||
//# sourceMappingURL=marina-provider.cjs.development.js.map |
@@ -1,2 +0,2 @@ | ||
"use strict";function t(t,r,e,n,o,i,a){try{var c=t[i](a),u=c.value}catch(t){return void e(t)}c.done?r(u):Promise.resolve(u).then(n,o)}function r(r){return function(){var e=this,n=arguments;return new Promise((function(o,i){var a=r.apply(e,n);function c(r){t(a,o,i,c,u,"next",r)}function u(r){t(a,o,i,c,u,"throw",r)}c(void 0)}))}}function e(t){return(e=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function n(t,r){return(n=Object.setPrototypeOf||function(t,r){return t.__proto__=r,t})(t,r)}function o(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}function i(t,r,e){return(i=o()?Reflect.construct:function(t,r,e){var o=[null];o.push.apply(o,r);var i=new(Function.bind.apply(t,o));return e&&n(i,e.prototype),i}).apply(null,arguments)}function a(t){var r="function"==typeof Map?new Map:void 0;return(a=function(t){if(null===t||-1===Function.toString.call(t).indexOf("[native code]"))return t;if("function"!=typeof t)throw new TypeError("Super expression must either be null or a function");if(void 0!==r){if(r.has(t))return r.get(t);r.set(t,o)}function o(){return i(t,arguments,e(this).constructor)}return o.prototype=Object.create(t.prototype,{constructor:{value:o,enumerable:!1,writable:!0,configurable:!0}}),n(o,t)})(t)}Object.defineProperty(exports,"__esModule",{value:!0});var c,u=(function(t){var r=function(t){var r=Object.prototype,e=r.hasOwnProperty,n="function"==typeof Symbol?Symbol:{},o=n.iterator||"@@iterator",i=n.asyncIterator||"@@asyncIterator",a=n.toStringTag||"@@toStringTag";function c(t,r,e){return Object.defineProperty(t,r,{value:e,enumerable:!0,configurable:!0,writable:!0}),t[r]}try{c({},"")}catch(t){c=function(t,r,e){return t[r]=e}}function u(t,r,e,n){var o=Object.create((r&&r.prototype instanceof l?r:l).prototype),i=new E(n||[]);return o._invoke=function(t,r,e){var n="suspendedStart";return function(o,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return{value:void 0,done:!0}}for(e.method=o,e.arg=i;;){var a=e.delegate;if(a){var c=x(a,e);if(c){if(c===s)continue;return c}}if("next"===e.method)e.sent=e._sent=e.arg;else if("throw"===e.method){if("suspendedStart"===n)throw n="completed",e.arg;e.dispatchException(e.arg)}else"return"===e.method&&e.abrupt("return",e.arg);n="executing";var u=f(t,r,e);if("normal"===u.type){if(n=e.done?"completed":"suspendedYield",u.arg===s)continue;return{value:u.arg,done:e.done}}"throw"===u.type&&(n="completed",e.method="throw",e.arg=u.arg)}}}(t,e,i),o}function f(t,r,e){try{return{type:"normal",arg:t.call(r,e)}}catch(t){return{type:"throw",arg:t}}}t.wrap=u;var s={};function l(){}function h(){}function p(){}var v={};c(v,o,(function(){return this}));var d=Object.getPrototypeOf,y=d&&d(d(O([])));y&&y!==r&&e.call(y,o)&&(v=y);var g=p.prototype=l.prototype=Object.create(v);function m(t){["next","throw","return"].forEach((function(r){c(t,r,(function(t){return this._invoke(r,t)}))}))}function w(t,r){var n;this._invoke=function(o,i){function a(){return new r((function(n,a){!function n(o,i,a,c){var u=f(t[o],t,i);if("throw"!==u.type){var s=u.arg,l=s.value;return l&&"object"==typeof l&&e.call(l,"__await")?r.resolve(l.__await).then((function(t){n("next",t,a,c)}),(function(t){n("throw",t,a,c)})):r.resolve(l).then((function(t){s.value=t,a(s)}),(function(t){return n("throw",t,a,c)}))}c(u.arg)}(o,i,n,a)}))}return n=n?n.then(a,a):a()}}function x(t,r){var e=t.iterator[r.method];if(void 0===e){if(r.delegate=null,"throw"===r.method){if(t.iterator.return&&(r.method="return",r.arg=void 0,x(t,r),"throw"===r.method))return s;r.method="throw",r.arg=new TypeError("The iterator does not provide a 'throw' method")}return s}var n=f(e,t.iterator,r.arg);if("throw"===n.type)return r.method="throw",r.arg=n.arg,r.delegate=null,s;var o=n.arg;return o?o.done?(r[t.resultName]=o.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=void 0),r.delegate=null,s):o:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,s)}function b(t){var r={tryLoc:t[0]};1 in t&&(r.catchLoc=t[1]),2 in t&&(r.finallyLoc=t[2],r.afterLoc=t[3]),this.tryEntries.push(r)}function L(t){var r=t.completion||{};r.type="normal",delete r.arg,t.completion=r}function E(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(b,this),this.reset(!0)}function O(t){if(t){var r=t[o];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,i=function r(){for(;++n<t.length;)if(e.call(t,n))return r.value=t[n],r.done=!1,r;return r.value=void 0,r.done=!0,r};return i.next=i}}return{next:_}}function _(){return{value:void 0,done:!0}}return h.prototype=p,c(g,"constructor",p),c(p,"constructor",h),h.displayName=c(p,a,"GeneratorFunction"),t.isGeneratorFunction=function(t){var r="function"==typeof t&&t.constructor;return!!r&&(r===h||"GeneratorFunction"===(r.displayName||r.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,p):(t.__proto__=p,c(t,a,"GeneratorFunction")),t.prototype=Object.create(g),t},t.awrap=function(t){return{__await:t}},m(w.prototype),c(w.prototype,i,(function(){return this})),t.AsyncIterator=w,t.async=function(r,e,n,o,i){void 0===i&&(i=Promise);var a=new w(u(r,e,n,o),i);return t.isGeneratorFunction(e)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},m(g),c(g,a,"Generator"),c(g,o,(function(){return this})),c(g,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var r=[];for(var e in t)r.push(e);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},t.values=O,E.prototype={constructor:E,reset:function(t){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(L),!t)for(var r in this)"t"===r.charAt(0)&&e.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function n(e,n){return a.type="throw",a.arg=t,r.next=e,n&&(r.method="next",r.arg=void 0),!!n}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var c=e.call(i,"catchLoc"),u=e.call(i,"finallyLoc");if(c&&u){if(this.prev<i.catchLoc)return n(i.catchLoc,!0);if(this.prev<i.finallyLoc)return n(i.finallyLoc)}else if(c){if(this.prev<i.catchLoc)return n(i.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return n(i.finallyLoc)}}}},abrupt:function(t,r){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&e.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=r&&r<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=r,i?(this.method="next",this.next=i.finallyLoc,s):this.complete(a)},complete:function(t,r){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&r&&(this.next=r),s},finish:function(t){for(var r=this.tryEntries.length-1;r>=0;--r){var e=this.tryEntries[r];if(e.finallyLoc===t)return this.complete(e.completion,e.afterLoc),L(e),s}},catch:function(t){for(var r=this.tryEntries.length-1;r>=0;--r){var e=this.tryEntries[r];if(e.tryLoc===t){var n=e.completion;if("throw"===n.type){var o=n.arg;L(e)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,e){return this.delegate={iterator:O(t),resultName:r,nextLoc:e},"next"===this.method&&(this.arg=void 0),s}},t}(t.exports);try{regeneratorRuntime=r}catch(t){"object"==typeof globalThis?globalThis.regeneratorRuntime=r:Function("r","regeneratorRuntime = r")(r)}}(c={exports:{}}),c.exports);function f(){return(f=r(u.mark((function t(r,e){var n,o;return u.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return void 0===r&&(r="marina"),void 0===e&&(e=3e3),n=!1,o=window,t.abrupt("return",new Promise((function(t,i){function a(){n||(n=!0,window.removeEventListener(r+"#initialized",a),void 0===o[r]?i(new l(r,e)):t(o[r]))}o[r]?a():(window.addEventListener(r+"#initialized",a,{once:!0}),setTimeout((function(){a()}),e))})));case 5:case"end":return t.stop()}}),t)})))).apply(this,arguments)}var s,l=function(t){var r,e;function o(r,e){var n;return(n=t.call(this,"detectProviderTimeout: detection of "+r+" timeout ("+e+" ms)")||this).provider=r,n.timeout=e,n}return e=t,(r=o).prototype=Object.create(e.prototype),r.prototype.constructor=r,n(r,e),o}(a(Error));(s=exports.TxStatusEnum||(exports.TxStatusEnum={}))[s.Confirmed=1]="Confirmed",s[s.Pending=0]="Pending",exports.DetectProviderTimeoutError=l,exports.detectProvider=function(t,r){return f.apply(this,arguments)},exports.isAddressRecipient=function(t){var r=t.address;return void 0!==r&&"string"==typeof r},exports.isDataRecipient=function(t){var r=t.data;return void 0!==r&&"string"==typeof r}; | ||
"use strict";function t(t,r,e,n,o,i,a){try{var c=t[i](a),u=c.value}catch(t){return void e(t)}c.done?r(u):Promise.resolve(u).then(n,o)}function r(r){return function(){var e=this,n=arguments;return new Promise((function(o,i){var a=r.apply(e,n);function c(r){t(a,o,i,c,u,"next",r)}function u(r){t(a,o,i,c,u,"throw",r)}c(void 0)}))}}function e(t){return(e=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function n(t,r){return(n=Object.setPrototypeOf||function(t,r){return t.__proto__=r,t})(t,r)}function o(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}function i(t,r,e){return(i=o()?Reflect.construct:function(t,r,e){var o=[null];o.push.apply(o,r);var i=new(Function.bind.apply(t,o));return e&&n(i,e.prototype),i}).apply(null,arguments)}function a(t){var r="function"==typeof Map?new Map:void 0;return(a=function(t){if(null===t||-1===Function.toString.call(t).indexOf("[native code]"))return t;if("function"!=typeof t)throw new TypeError("Super expression must either be null or a function");if(void 0!==r){if(r.has(t))return r.get(t);r.set(t,o)}function o(){return i(t,arguments,e(this).constructor)}return o.prototype=Object.create(t.prototype,{constructor:{value:o,enumerable:!1,writable:!0,configurable:!0}}),n(o,t)})(t)}Object.defineProperty(exports,"__esModule",{value:!0});var c,u=(function(t){var r=function(t){var r=Object.prototype,e=r.hasOwnProperty,n="function"==typeof Symbol?Symbol:{},o=n.iterator||"@@iterator",i=n.asyncIterator||"@@asyncIterator",a=n.toStringTag||"@@toStringTag";function c(t,r,e){return Object.defineProperty(t,r,{value:e,enumerable:!0,configurable:!0,writable:!0}),t[r]}try{c({},"")}catch(t){c=function(t,r,e){return t[r]=e}}function u(t,r,e,n){var o=Object.create((r&&r.prototype instanceof l?r:l).prototype),i=new E(n||[]);return o._invoke=function(t,r,e){var n="suspendedStart";return function(o,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return{value:void 0,done:!0}}for(e.method=o,e.arg=i;;){var a=e.delegate;if(a){var c=x(a,e);if(c){if(c===s)continue;return c}}if("next"===e.method)e.sent=e._sent=e.arg;else if("throw"===e.method){if("suspendedStart"===n)throw n="completed",e.arg;e.dispatchException(e.arg)}else"return"===e.method&&e.abrupt("return",e.arg);n="executing";var u=f(t,r,e);if("normal"===u.type){if(n=e.done?"completed":"suspendedYield",u.arg===s)continue;return{value:u.arg,done:e.done}}"throw"===u.type&&(n="completed",e.method="throw",e.arg=u.arg)}}}(t,e,i),o}function f(t,r,e){try{return{type:"normal",arg:t.call(r,e)}}catch(t){return{type:"throw",arg:t}}}t.wrap=u;var s={};function l(){}function p(){}function h(){}var v={};c(v,o,(function(){return this}));var d=Object.getPrototypeOf,y=d&&d(d(O([])));y&&y!==r&&e.call(y,o)&&(v=y);var g=h.prototype=l.prototype=Object.create(v);function m(t){["next","throw","return"].forEach((function(r){c(t,r,(function(t){return this._invoke(r,t)}))}))}function w(t,r){var n;this._invoke=function(o,i){function a(){return new r((function(n,a){!function n(o,i,a,c){var u=f(t[o],t,i);if("throw"!==u.type){var s=u.arg,l=s.value;return l&&"object"==typeof l&&e.call(l,"__await")?r.resolve(l.__await).then((function(t){n("next",t,a,c)}),(function(t){n("throw",t,a,c)})):r.resolve(l).then((function(t){s.value=t,a(s)}),(function(t){return n("throw",t,a,c)}))}c(u.arg)}(o,i,n,a)}))}return n=n?n.then(a,a):a()}}function x(t,r){var e=t.iterator[r.method];if(void 0===e){if(r.delegate=null,"throw"===r.method){if(t.iterator.return&&(r.method="return",r.arg=void 0,x(t,r),"throw"===r.method))return s;r.method="throw",r.arg=new TypeError("The iterator does not provide a 'throw' method")}return s}var n=f(e,t.iterator,r.arg);if("throw"===n.type)return r.method="throw",r.arg=n.arg,r.delegate=null,s;var o=n.arg;return o?o.done?(r[t.resultName]=o.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=void 0),r.delegate=null,s):o:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,s)}function b(t){var r={tryLoc:t[0]};1 in t&&(r.catchLoc=t[1]),2 in t&&(r.finallyLoc=t[2],r.afterLoc=t[3]),this.tryEntries.push(r)}function L(t){var r=t.completion||{};r.type="normal",delete r.arg,t.completion=r}function E(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(b,this),this.reset(!0)}function O(t){if(t){var r=t[o];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,i=function r(){for(;++n<t.length;)if(e.call(t,n))return r.value=t[n],r.done=!1,r;return r.value=void 0,r.done=!0,r};return i.next=i}}return{next:_}}function _(){return{value:void 0,done:!0}}return p.prototype=h,c(g,"constructor",h),c(h,"constructor",p),p.displayName=c(h,a,"GeneratorFunction"),t.isGeneratorFunction=function(t){var r="function"==typeof t&&t.constructor;return!!r&&(r===p||"GeneratorFunction"===(r.displayName||r.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,h):(t.__proto__=h,c(t,a,"GeneratorFunction")),t.prototype=Object.create(g),t},t.awrap=function(t){return{__await:t}},m(w.prototype),c(w.prototype,i,(function(){return this})),t.AsyncIterator=w,t.async=function(r,e,n,o,i){void 0===i&&(i=Promise);var a=new w(u(r,e,n,o),i);return t.isGeneratorFunction(e)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},m(g),c(g,a,"Generator"),c(g,o,(function(){return this})),c(g,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var r=[];for(var e in t)r.push(e);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},t.values=O,E.prototype={constructor:E,reset:function(t){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(L),!t)for(var r in this)"t"===r.charAt(0)&&e.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function n(e,n){return a.type="throw",a.arg=t,r.next=e,n&&(r.method="next",r.arg=void 0),!!n}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var c=e.call(i,"catchLoc"),u=e.call(i,"finallyLoc");if(c&&u){if(this.prev<i.catchLoc)return n(i.catchLoc,!0);if(this.prev<i.finallyLoc)return n(i.finallyLoc)}else if(c){if(this.prev<i.catchLoc)return n(i.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return n(i.finallyLoc)}}}},abrupt:function(t,r){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&e.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=r&&r<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=r,i?(this.method="next",this.next=i.finallyLoc,s):this.complete(a)},complete:function(t,r){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&r&&(this.next=r),s},finish:function(t){for(var r=this.tryEntries.length-1;r>=0;--r){var e=this.tryEntries[r];if(e.finallyLoc===t)return this.complete(e.completion,e.afterLoc),L(e),s}},catch:function(t){for(var r=this.tryEntries.length-1;r>=0;--r){var e=this.tryEntries[r];if(e.tryLoc===t){var n=e.completion;if("throw"===n.type){var o=n.arg;L(e)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,e){return this.delegate={iterator:O(t),resultName:r,nextLoc:e},"next"===this.method&&(this.arg=void 0),s}},t}(t.exports);try{regeneratorRuntime=r}catch(t){"object"==typeof globalThis?globalThis.regeneratorRuntime=r:Function("r","regeneratorRuntime = r")(r)}}(c={exports:{}}),c.exports);function f(){return(f=r(u.mark((function t(r,e){var n,o;return u.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return void 0===r&&(r="marina"),void 0===e&&(e=3e3),n=!1,o=window,t.abrupt("return",new Promise((function(t,i){function a(){n||(n=!0,window.removeEventListener(r+"#initialized",a),void 0===o[r]?i(new l(r,e)):t(o[r]))}o[r]?a():(window.addEventListener(r+"#initialized",a,{once:!0}),setTimeout((function(){a()}),e))})));case 5:case"end":return t.stop()}}),t)})))).apply(this,arguments)}var s,l=function(t){var r,e;function o(r,e){var n;return(n=t.call(this,"detectProviderTimeout: detection of "+r+" timeout ("+e+" ms)")||this).provider=r,n.timeout=e,n}return e=t,(r=o).prototype=Object.create(e.prototype),r.prototype.constructor=r,n(r,e),o}(a(Error));(s=exports.AccountType||(exports.AccountType={})).P2WPKH="p2wpkh",s.Ionio="ionio",exports.DetectProviderTimeoutError=l,exports.detectProvider=function(t,r){return f.apply(this,arguments)},exports.isAddressRecipient=function(t){var r=t.address;return void 0!==r&&"string"==typeof r},exports.isDataRecipient=function(t){var r=t.data;return void 0!==r&&"string"==typeof r},exports.isIonioScriptDetails=function(t){return void 0!==t.artifact}; | ||
//# sourceMappingURL=marina-provider.cjs.production.min.js.map |
@@ -973,10 +973,13 @@ function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { | ||
var TxStatusEnum; | ||
function isIonioScriptDetails(script) { | ||
return script.artifact !== undefined; | ||
} | ||
var AccountType; | ||
(function (TxStatusEnum) { | ||
TxStatusEnum[TxStatusEnum["Confirmed"] = 1] = "Confirmed"; | ||
TxStatusEnum[TxStatusEnum["Pending"] = 0] = "Pending"; | ||
})(TxStatusEnum || (TxStatusEnum = {})); | ||
(function (AccountType) { | ||
AccountType["P2WPKH"] = "p2wpkh"; | ||
AccountType["Ionio"] = "ionio"; | ||
})(AccountType || (AccountType = {})); | ||
export { DetectProviderTimeoutError, TxStatusEnum, detectProvider, isAddressRecipient, isDataRecipient }; | ||
export { AccountType, DetectProviderTimeoutError, detectProvider, isAddressRecipient, isDataRecipient, isIonioScriptDetails }; | ||
//# sourceMappingURL=marina-provider.esm.js.map |
@@ -1,2 +0,2 @@ | ||
import { AccountID, AccountInfo, AddressInterface, Balance, Template, EventListenerID, MarinaEventType, NetworkString, PsetBase64, RawHex, Recipient, SentTransaction, SignedMessage, Transaction, Utxo, TemplateString } from './types'; | ||
import { AccountID, AccountInfo, AccountType, Address, ArtifactWithConstructorArgs, Balance, EventListenerID, MarinaEventType, NetworkString, PsetBase64, RawHex, Recipient, SentTransaction, SignedMessage, Transaction, Utxo } from './types'; | ||
/** | ||
@@ -18,8 +18,7 @@ * Define the Marina provider methods. | ||
getAccountInfo(accountID: AccountID): Promise<AccountInfo>; | ||
createAccount(accountID: AccountID): Promise<void>; | ||
createAccount(accountID: AccountID, accountType: AccountType): Promise<void>; | ||
getBalances(accountIDs?: AccountID[]): Promise<Balance[]>; | ||
getCoins(accountIDs?: AccountID[]): Promise<Utxo[]>; | ||
getTransactions(accountIDs?: AccountID[]): Promise<Transaction[]>; | ||
getAddresses(accountIDs?: AccountID[]): Promise<AddressInterface[]>; | ||
reloadCoins(accountIDs?: AccountID[]): Promise<void>; | ||
getAddresses(accountIDs?: AccountID[]): Promise<Address[]>; | ||
sendTransaction(recipients: Recipient[], feeAsset?: string): Promise<SentTransaction>; | ||
@@ -31,6 +30,5 @@ signTransaction(pset: PsetBase64): Promise<PsetBase64>; | ||
/** all the methods above apply to the selected account **/ | ||
importTemplate(template: Template, changeTemplate?: Template): Promise<void>; | ||
getNextAddress(constructorParams?: Record<TemplateString, string | number>): Promise<AddressInterface>; | ||
getNextChangeAddress(constructorParams?: Record<TemplateString, string | number>): Promise<AddressInterface>; | ||
getNextAddress(ionioArtifact?: ArtifactWithConstructorArgs): Promise<Address>; | ||
getNextChangeAddress(ionioArtifact?: ArtifactWithConstructorArgs): Promise<Address>; | ||
signMessage(message: string): Promise<SignedMessage>; | ||
} |
@@ -1,10 +0,12 @@ | ||
/// <reference types="node" /> | ||
export interface AddressInterface { | ||
confidentialAddress: string; | ||
blindingPrivateKey: string; | ||
derivationPath?: string; | ||
publicKey?: ECPublicKey; | ||
constructorParams?: Record<string, string | number>; | ||
descriptor?: string; | ||
} | ||
import type { Argument, Artifact, Contract } from "@ionio-lang/ionio"; | ||
import type { TxOutput } from "liquidjs-lib"; | ||
export declare type TransactionID = string; | ||
export declare type PsetBase64 = string; | ||
export declare type SignatureBase64 = string; | ||
export declare type NativeSegwitAddress = string; | ||
export declare type ECPublicKey = string; | ||
export declare type EventListenerID = string; | ||
export declare type RawHex = string; | ||
export declare type AccountID = string; | ||
export declare type NetworkString = 'liquid' | 'testnet' | 'regtest'; | ||
export interface SignedMessage { | ||
@@ -15,48 +17,44 @@ signature: SignatureBase64; | ||
} | ||
export declare enum TxStatusEnum { | ||
Confirmed = 1, | ||
Pending = 0 | ||
} | ||
export interface Transaction { | ||
txId: string; | ||
status: TxStatusEnum; | ||
fee: number; | ||
transfers: Array<{ | ||
asset: string; | ||
amount: number; | ||
}>; | ||
hex?: string; | ||
height: number; | ||
explorerURL: string; | ||
blocktimeMs: number; | ||
} | ||
interface TxOutput { | ||
asset: Buffer; | ||
nonce: Buffer; | ||
script: Buffer; | ||
value: Buffer; | ||
rangeProof?: Buffer; | ||
surjectionProof?: Buffer; | ||
export interface ScriptDetails { | ||
networks: NetworkString[]; | ||
accountName: string; | ||
derivationPath?: string; | ||
blindingPrivateKey?: string; | ||
} | ||
interface UnblindOutputResult { | ||
asset: Buffer; | ||
assetBlindingFactor: Buffer; | ||
value: string; | ||
valueBlindingFactor: Buffer; | ||
export declare type ArtifactWithConstructorArgs = { | ||
artifact: Artifact; | ||
args: { | ||
[name: string]: Argument; | ||
}; | ||
}; | ||
export declare type IonioScriptDetails = ScriptDetails & { | ||
artifact: Artifact; | ||
params: Argument[]; | ||
}; | ||
export declare function isIonioScriptDetails(script: ScriptDetails): script is IonioScriptDetails; | ||
export declare type Address = { | ||
confidentialAddress: string; | ||
contract?: Contract; | ||
} & ScriptDetails; | ||
export interface UnblindingData { | ||
value: number; | ||
asset: string; | ||
assetBlindingFactor: string; | ||
valueBlindingFactor: string; | ||
} | ||
export interface Utxo { | ||
export interface UnblindedOutput { | ||
txid: string; | ||
vout: number; | ||
prevout: TxOutput; | ||
unblindData: UnblindOutputResult; | ||
asset?: string; | ||
value?: number; | ||
blindingData?: UnblindingData; | ||
} | ||
export interface Balance { | ||
asset: { | ||
assetHash: string; | ||
ticker?: string; | ||
name?: string; | ||
precision: number; | ||
}; | ||
amount: number; | ||
} | ||
export declare type Utxo = UnblindedOutput & { | ||
witnessUtxo?: TxOutput; | ||
scriptDetails?: ScriptDetails; | ||
}; | ||
export declare type DataRecipient = { | ||
@@ -68,2 +66,3 @@ data: string; | ||
} & AssetValue; | ||
export declare type Recipient = AddressRecipient | DataRecipient; | ||
interface AssetValue { | ||
@@ -73,12 +72,13 @@ value: number; | ||
} | ||
export declare type Recipient = AddressRecipient | DataRecipient; | ||
export interface Asset { | ||
assetHash: string; | ||
name: string; | ||
precision: number; | ||
ticker: string; | ||
} | ||
export interface Balance { | ||
asset: Asset; | ||
amount: number; | ||
} | ||
export declare type MarinaEventType = 'NEW_UTXO' | 'NEW_TX' | 'SPENT_UTXO' | 'ENABLED' | 'DISABLED' | 'NETWORK'; | ||
export declare type TransactionID = string; | ||
export declare type PsetBase64 = string; | ||
export declare type SignatureBase64 = string; | ||
export declare type NativeSegwitAddress = string; | ||
export declare type ECPublicKey = string; | ||
export declare type EventListenerID = string; | ||
export declare type RawHex = string; | ||
export declare type NetworkString = 'liquid' | 'testnet' | 'regtest'; | ||
export interface SentTransaction { | ||
@@ -88,15 +88,13 @@ txid: TransactionID; | ||
} | ||
export declare type TemplateString = string; | ||
export declare type TemplateType = 'ionio-artifact'; | ||
export interface Template<T = any> { | ||
type: TemplateType; | ||
template: T; | ||
export declare enum AccountType { | ||
P2WPKH = "p2wpkh", | ||
Ionio = "ionio" | ||
} | ||
export declare type AccountID = string; | ||
export interface AccountInfo { | ||
accountID: AccountID; | ||
type: AccountType; | ||
masterXPub: string; | ||
isReady: boolean; | ||
[key: string]: any; | ||
baseDerivationPath: string; | ||
accountNetworks: NetworkString[]; | ||
} | ||
export {}; |
{ | ||
"name": "marina-provider", | ||
"version": "1.7.2", | ||
"version": "1.8.0", | ||
"description": "Marina injected API", | ||
@@ -20,2 +20,4 @@ "repository": "git@github.com:vulpemventures/marina-provider.git", | ||
"devDependencies": { | ||
"@ionio-lang/ionio": "^0.3.0", | ||
"liquidjs-lib": "^6.0.2-liquid.23", | ||
"tsdx": "^0.14.1", | ||
@@ -22,0 +24,0 @@ "typescript": "^4.6.3" |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
225640
1856
4