@iota-pico/pal-nodejs
Advanced tools
Comparing version 0.9.5 to 0.9.6
# Changelog | ||
## v0.9.6 | ||
* Dependency Updates | ||
## v0.9.5 | ||
@@ -4,0 +8,0 @@ |
@@ -39,3 +39,3 @@ [@iota-pico/pal-nodejs](../README.md) > [NetworkClient](../classes/networkclient.md) | ||
*Defined in [network/networkClient.ts:23](https://github.com/iota-pico/pal-nodejs/blob/d229982/src/network/networkClient.ts#L23)* | ||
*Defined in [network/networkClient.ts:23](https://github.com/iota-pico/pal-nodejs/blob/06a33af/src/network/networkClient.ts#L23)* | ||
@@ -65,3 +65,3 @@ Create an instance of NetworkClient. | ||
*Defined in [network/networkClient.ts:139](https://github.com/iota-pico/pal-nodejs/blob/d229982/src/network/networkClient.ts#L139)* | ||
*Defined in [network/networkClient.ts:139](https://github.com/iota-pico/pal-nodejs/blob/06a33af/src/network/networkClient.ts#L139)* | ||
@@ -89,3 +89,3 @@ Perform a request asynchronously. | ||
*Defined in [network/networkClient.ts:54](https://github.com/iota-pico/pal-nodejs/blob/d229982/src/network/networkClient.ts#L54)* | ||
*Defined in [network/networkClient.ts:54](https://github.com/iota-pico/pal-nodejs/blob/06a33af/src/network/networkClient.ts#L54)* | ||
@@ -111,3 +111,3 @@ Get data asynchronously. | ||
*Defined in [network/networkClient.ts:82](https://github.com/iota-pico/pal-nodejs/blob/d229982/src/network/networkClient.ts#L82)* | ||
*Defined in [network/networkClient.ts:82](https://github.com/iota-pico/pal-nodejs/blob/06a33af/src/network/networkClient.ts#L82)* | ||
@@ -139,3 +139,3 @@ Get data as JSON asynchronously. | ||
*Defined in [network/networkClient.ts:68](https://github.com/iota-pico/pal-nodejs/blob/d229982/src/network/networkClient.ts#L68)* | ||
*Defined in [network/networkClient.ts:68](https://github.com/iota-pico/pal-nodejs/blob/06a33af/src/network/networkClient.ts#L68)* | ||
@@ -162,3 +162,3 @@ Post data asynchronously. | ||
*Defined in [network/networkClient.ts:109](https://github.com/iota-pico/pal-nodejs/blob/d229982/src/network/networkClient.ts#L109)* | ||
*Defined in [network/networkClient.ts:109](https://github.com/iota-pico/pal-nodejs/blob/06a33af/src/network/networkClient.ts#L109)* | ||
@@ -165,0 +165,0 @@ Post data as JSON asynchronously. |
@@ -27,3 +27,3 @@ [@iota-pico/pal-nodejs](../README.md) > [PAL](../classes/pal.md) | ||
*Defined in [pal.ts:21](https://github.com/iota-pico/pal-nodejs/blob/d229982/src/pal.ts#L21)* | ||
*Defined in [pal.ts:21](https://github.com/iota-pico/pal-nodejs/blob/06a33af/src/pal.ts#L21)* | ||
@@ -30,0 +30,0 @@ Perform any initialization for the PAL. |
@@ -36,3 +36,3 @@ [@iota-pico/pal-nodejs](../README.md) > [PlatformCrypto](../classes/platformcrypto.md) | ||
*Defined in [crypto/platformCrypto.ts:35](https://github.com/iota-pico/pal-nodejs/blob/d229982/src/crypto/platformCrypto.ts#L35)* | ||
*Defined in [crypto/platformCrypto.ts:35](https://github.com/iota-pico/pal-nodejs/blob/06a33af/src/crypto/platformCrypto.ts#L35)* | ||
@@ -58,3 +58,3 @@ Decrypt the given data. | ||
*Defined in [crypto/platformCrypto.ts:17](https://github.com/iota-pico/pal-nodejs/blob/d229982/src/crypto/platformCrypto.ts#L17)* | ||
*Defined in [crypto/platformCrypto.ts:17](https://github.com/iota-pico/pal-nodejs/blob/06a33af/src/crypto/platformCrypto.ts#L17)* | ||
@@ -78,5 +78,5 @@ Encrypt the given data. | ||
▸ **hash**(algo: *`string`*, data: *`any`*, dataType?: *"utf8" |"ascii" |"latin1"*, encoding?: *"latin1" |"hex" |"base64"*): `any` | ||
▸ **hash**(algo: *`string`*, data: *`any`*, dataType?: * "utf8" | "ascii" | "latin1"*, encoding?: * "latin1" | "hex" | "base64"*): `any` | ||
*Defined in [crypto/platformCrypto.ts:95](https://github.com/iota-pico/pal-nodejs/blob/d229982/src/crypto/platformCrypto.ts#L95)* | ||
*Defined in [crypto/platformCrypto.ts:95](https://github.com/iota-pico/pal-nodejs/blob/06a33af/src/crypto/platformCrypto.ts#L95)* | ||
@@ -91,10 +91,4 @@ Hash the data. | ||
| data | `any` | The data to hash. | | ||
| `Optional` dataType | "utf8" | | ||
"ascii" | | ||
"latin1" | ||
| The type of the input data utf8, ascii, latin1. | | ||
| `Optional` encoding | "latin1" | | ||
"hex" | | ||
"base64" | ||
| The encoding to return the data latin1, hex, base64. | | ||
| `Optional` dataType | "utf8" | "ascii" | "latin1"| The type of the input data utf8, ascii, latin1. | | ||
| `Optional` encoding | "latin1" | "hex" | "base64"| The encoding to return the data latin1, hex, base64. | | ||
@@ -109,5 +103,5 @@ **Returns:** `any` | ||
▸ **hmac**(algo: *`string`*, key: *`any`*, data: *`any`*, dataType?: *"utf8" |"ascii" |"latin1"*, encoding?: *"latin1" |"hex" |"base64"*): `any` | ||
▸ **hmac**(algo: *`string`*, key: *`any`*, data: *`any`*, dataType?: * "utf8" | "ascii" | "latin1"*, encoding?: * "latin1" | "hex" | "base64"*): `any` | ||
*Defined in [crypto/platformCrypto.ts:120](https://github.com/iota-pico/pal-nodejs/blob/d229982/src/crypto/platformCrypto.ts#L120)* | ||
*Defined in [crypto/platformCrypto.ts:120](https://github.com/iota-pico/pal-nodejs/blob/06a33af/src/crypto/platformCrypto.ts#L120)* | ||
@@ -123,10 +117,4 @@ HMAC the data. | ||
| data | `any` | The data to hash. | | ||
| `Optional` dataType | "utf8" | | ||
"ascii" | | ||
"latin1" | ||
| The type of the input data utf8, ascii, latin1. | | ||
| `Optional` encoding | "latin1" | | ||
"hex" | | ||
"base64" | ||
| The encoding to return the data latin1, hex, base64. | | ||
| `Optional` dataType | "utf8" | "ascii" | "latin1"| The type of the input data utf8, ascii, latin1. | | ||
| `Optional` encoding | "latin1" | "hex" | "base64"| The encoding to return the data latin1, hex, base64. | | ||
@@ -143,3 +131,3 @@ **Returns:** `any` | ||
*Defined in [crypto/platformCrypto.ts:53](https://github.com/iota-pico/pal-nodejs/blob/d229982/src/crypto/platformCrypto.ts#L53)* | ||
*Defined in [crypto/platformCrypto.ts:53](https://github.com/iota-pico/pal-nodejs/blob/06a33af/src/crypto/platformCrypto.ts#L53)* | ||
@@ -165,3 +153,3 @@ Sign the given data. | ||
*Defined in [crypto/platformCrypto.ts:72](https://github.com/iota-pico/pal-nodejs/blob/d229982/src/crypto/platformCrypto.ts#L72)* | ||
*Defined in [crypto/platformCrypto.ts:72](https://github.com/iota-pico/pal-nodejs/blob/06a33af/src/crypto/platformCrypto.ts#L72)* | ||
@@ -168,0 +156,0 @@ Verify the given data. |
@@ -31,3 +31,3 @@ [@iota-pico/pal-nodejs](../README.md) > [RngService](../classes/rngservice.md) | ||
*Defined in [services/rngService.ts:13](https://github.com/iota-pico/pal-nodejs/blob/d229982/src/services/rngService.ts#L13)* | ||
*Defined in [services/rngService.ts:13](https://github.com/iota-pico/pal-nodejs/blob/06a33af/src/services/rngService.ts#L13)* | ||
@@ -34,0 +34,0 @@ Generate an array of random numbers. |
{ | ||
"name": "@iota-pico/pal-nodejs", | ||
"version": "0.9.5", | ||
"version": "0.9.6", | ||
"description": "IOTA Pico Framework Platform Abstraction Layer for NodeJS", | ||
@@ -52,3 +52,3 @@ "typings": "dist/index.d.ts", | ||
"dependencies": { | ||
"@iota-pico/core": "^0.9.5" | ||
"@iota-pico/core": "^0.9.6" | ||
}, | ||
@@ -60,30 +60,30 @@ "devDependencies": { | ||
"@babel/runtime": "^7.0.0-beta.42", | ||
"@types/chai": "^4.1.3", | ||
"@types/chai": "^4.1.4", | ||
"@types/mocha": "^5.2.0", | ||
"@types/node": "^9.6.6", | ||
"@types/sinon": "^4.3.1", | ||
"@types/node": "^10.3.4", | ||
"@types/sinon": "^5.0.1", | ||
"babel-loader": "^8.0.0-beta.0", | ||
"babel-plugin-transform-builtin-extend": "^1.1.2", | ||
"chai": "^4.1.2", | ||
"coveralls": "^3.0.0", | ||
"cross-env": "^5.1.4", | ||
"coveralls": "^3.0.1", | ||
"cross-env": "^5.2.0", | ||
"minicat": "^1.0.0", | ||
"mocha": "^5.1.1", | ||
"npm-run-all": "^4.1.2", | ||
"npm-run-all": "^4.1.3", | ||
"nsp": "^3.2.1", | ||
"nyc": "^11.7.1", | ||
"nyc": "^12.0.2", | ||
"rimraf": "^2.6.2", | ||
"sinon": "^4.5.0", | ||
"source-map-support": "^0.5.5", | ||
"ts-node": "^6.0.1", | ||
"tslint": "^5.9.1", | ||
"tslint-eslint-rules": "^5.1.0", | ||
"sinon": "^6.0.0", | ||
"source-map-support": "^0.5.6", | ||
"ts-node": "^6.0.3", | ||
"tslint": "^5.10.0", | ||
"tslint-eslint-rules": "^5.3.1", | ||
"tslint-microsoft-contrib": "^5.0.3", | ||
"typedoc": "^0.11.1", | ||
"typedoc-plugin-markdown": "^1.1.6", | ||
"typescript": "^2.8.3", | ||
"typedoc-plugin-markdown": "^1.1.10", | ||
"typescript": "^2.9.2", | ||
"uglifyjs-webpack-plugin": "^1.2.5", | ||
"webpack": "^4.6.0", | ||
"webpack-cli": "^2.0.15" | ||
"webpack": "^4.8.3", | ||
"webpack-cli": "^3.0.8" | ||
} | ||
} |
@@ -1,1 +0,1 @@ | ||
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define("@iota-pico/pal-nodejs",[],t):"object"==typeof exports?exports["@iota-pico/pal-nodejs"]=t():e.IotaPicoPalNodejs=t()}("undefined"!=typeof self?self:this,function(){return function(e){var t={};function r(n){if(t[n])return t[n].exports;var o=t[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}return r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:n})},r.r=function(e){Object.defineProperty(e,"__esModule",{value:!0})},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r.w={},r(r.s=22)}([function(e,t,r){"use strict";function n(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}var t,r;return t=e,r=[{key:"isString",value:function(e){return null!==e&&void 0!==e&&"[object String]"===Object.prototype.toString.call(e)}},{key:"isEmpty",value:function(t){return!e.isString(t)||0===t.length}},{key:"isAscii",value:function(e){return null!==e&&void 0!==e&&/^[\x00-\xFF]*$/.test(e)}},{key:"encodeNonASCII",value:function(t){return e.isString(t)?t.replace(/[\u007F-\uFFFF]/g,function(e){return"\\u".concat("0000".concat(e.charCodeAt(0).toString(16)).substr(-4))}):void 0}},{key:"decodeNonASCII",value:function(t){return e.isString(t)?t.replace(/\\u([\d\w]{4})/gi,function(e,t){return String.fromCharCode(parseInt(t,16))}):void 0}}],null&&n(t.prototype,null),r&&n(t,r),e}();t.StringHelper=o},function(e,t,r){"use strict";function n(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this._types={}}var t,r;return t=e,(r=[{key:"register",value:function(e,t){this.getInstance()._types[e]=t}},{key:"unregister",value:function(e){delete this.getInstance()._types[e]}},{key:"exists",value:function(e){return void 0!==this.getInstance()._types[e]}},{key:"types",value:function(){return Object.keys(this.getInstance()._types)}},{key:"create",value:function(e){var t=this.getInstance();if(t._types[e]){for(var r,n=arguments.length,o=new Array(n>1?n-1:0),i=1;i<n;i++)o[i-1]=arguments[i];return(r=t._types)[e].apply(r,o)}}}])&&n(t.prototype,r),e}();t.FactoryBase=o},function(e,t,r){"use strict";function n(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}Object.defineProperty(t,"__esModule",{value:!0});var o=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(r(4)),i=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}var t,r;return t=e,(r=[{key:"generate",value:function(e){return new Uint8Array(o.randomBytes(e))}}])&&n(t.prototype,r),e}();t.RngService=i},function(e,t,r){"use strict";var n,o=(n=r(8))&&n.__esModule?n:{default:n};function i(e){return function(){var t=this,r=arguments;return new Promise(function(n,o){var i=e.apply(t,r);function u(e,t){try{var r=i[e](t),u=r.value}catch(e){return void o(e)}r.done?n(u):Promise.resolve(u).then(a,c)}function a(e){u("next",e)}function c(e){u("throw",e)}a()})}}function u(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var a=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t};Object.defineProperty(t,"__esModule",{value:!0});var c=r(13),f=r(12),s=r(5),l=r(0),p=r(11),y=a(r(10)),h=a(r(9)),v=function(){function e(t,r){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,o=arguments.length>3?arguments[3]:void 0;if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),s.ObjectHelper.isEmpty(t))throw new c.NetworkError("The networkEndPoint must be defined");if(!f.NumberHelper.isInteger(n)||n<0)throw new c.NetworkError("The timeoutMs must be >= 0");this._networkEndPoint=t,this._timeoutMs=n,this._logger=r||new p.NullLogger,this._httpClientRequest=o||("http"===t.getProtocol()?y.request:h.request),this._logger.banner("Network Client",{endPoint:this._networkEndPoint})}var t,r,n,a,v,b,d;return t=e,(r=[{key:"get",value:(d=i(o.default.mark(function e(t,r){var n;return o.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return this._logger.info("===> NetworkClient::GET Send"),e.next=3,this.doRequest("GET",void 0,t,r);case 3:return n=e.sent,this._logger.info("<=== NetworkClient::GET Received",n),e.abrupt("return",n);case 6:case"end":return e.stop()}},e,this)})),function(e,t){return d.apply(this,arguments)})},{key:"post",value:(b=i(o.default.mark(function e(t,r,n){var i;return o.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return this._logger.info("===> NetworkClient::POST Send",t),e.next=3,this.doRequest("POST",t,r,n);case 3:return i=e.sent,this._logger.info("<=== NetworkClient::POST Received",i),e.abrupt("return",i);case 6:case"end":return e.stop()}},e,this)})),function(e,t,r){return b.apply(this,arguments)})},{key:"getJson",value:(v=i(o.default.mark(function e(t,r){var n=this;return o.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return this._logger.info("===> NetworkClient::GET Send"),e.abrupt("return",this.doRequest("GET",void 0,t,r).then(function(e){try{var t=JSON.parse(e);return n._logger.info("===> NetworkClient::GET Received",t),t}catch(t){throw n._logger.info("===> NetworkClient::GET Parse Failed",e),new c.NetworkError("Failed GET request, unable to parse response",{endPoint:n._networkEndPoint.getUri(),response:e})}}));case 2:case"end":return e.stop()}},e,this)})),function(e,t){return v.apply(this,arguments)})},{key:"postJson",value:(a=i(o.default.mark(function e(t,r,n){var i,u=this;return o.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return this._logger.info("===> NetworkClient::POST Send"),(i=n||{})["Content-Type"]="application/json",e.abrupt("return",this.doRequest("POST",JSON.stringify(t),r,i).then(function(e){try{var t=JSON.parse(e);return u._logger.info("===> NetworkClient::POST Received",t),t}catch(t){throw u._logger.info("===> NetworkClient::GET Parse Failed",e),new c.NetworkError("Failed POST request, unable to parse response",{endPoint:u._networkEndPoint.getUri(),response:e})}}));case 4:case"end":return e.stop()}},e,this)})),function(e,t,r){return a.apply(this,arguments)})},{key:"doRequest",value:(n=i(o.default.mark(function e(t,r,n,i){var u=this;return o.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",new Promise(function(e,o){var a=i||{},f=u._networkEndPoint.getUri(),p=u._networkEndPoint.getRootPath();if(!l.StringHelper.isEmpty(n)){var y="/".concat(n.replace(/^\/*/,""));p+=y,f+=y}var h={protocol:"".concat(u._networkEndPoint.getProtocol(),":"),hostname:u._networkEndPoint.getHost(),port:u._networkEndPoint.getPort(),path:p,method:t,headers:a,timeout:u._timeoutMs>0?u._timeoutMs:void 0},v=u._httpClientRequest(h,function(r){var n="";r.setEncoding("utf8"),r.on("data",function(e){n+=e}),r.on("end",function(){200===r.statusCode?e(n):(u._logger.info("<=== NetworkClient::Received Fail",{code:r.statusCode,data:n}),o(new c.NetworkError("Failed ".concat(t," request"),{endPoint:f,errorResponseCode:r.statusCode,errorResponse:n||r.statusMessage})))})});v.on("error",function(e){u._logger.error("<=== NetworkClient::Errored"),o(new c.NetworkError("Failed ".concat(t," request"),{endPoint:f,errorResponse:e}))}),v.on("timeout",function(e){u._logger.error("<=== NetworkClient::Timed Out"),o(new c.NetworkError("Failed ".concat(t," request, timed out"),{endPoint:f}))}),s.ObjectHelper.isEmpty(r)||v.write(r),v.end()}));case 1:case"end":return e.stop()}},e,this)})),function(e,t,r,o){return n.apply(this,arguments)})}])&&u(t.prototype,r),e}();t.NetworkClient=v},function(e,t){e.exports=require("crypto")},function(e,t,r){"use strict";function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function o(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}var t,r;return t=e,r=[{key:"isEmpty",value:function(e){return null===e||void 0===e}},{key:"isObject",value:function(e){return null!==e&&void 0!==e&&"object"===n(e)&&!Array.isArray(e)}},{key:"isType",value:function(t,r){var n=e.getClassName(t);return void 0!==n&&n===e.getClassName(r)}},{key:"getClassName",value:function(e){if(null!==e&&void 0!==e){var t=("function"==typeof e?e.toString():e.constructor.toString()).match(/\w+/g);return t&&t.length>1?t[1]:void 0}}}],null&&o(t.prototype,null),r&&o(t,r),e}();t.ObjectHelper=i},function(e,t,r){"use strict";function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function o(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function i(e,t){return!t||"object"!==n(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}Object.defineProperty(t,"__esModule",{value:!0});var u=r(14),a=r(0),c=function(e){function t(e,r,n){var o;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(o=i(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e))).additional=r||{},o.innerError=n,o.domain="Core",o}var r,c,f;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,function(e){function t(){var t=Reflect.construct(e,Array.from(arguments));return Object.setPrototypeOf(t,Object.getPrototypeOf(this)),t}return t.prototype=Object.create(e.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e,t}(Error)),r=t,f=[{key:"isError",value:function(e){return void 0!==e&&null!==e&&"object"===n(e)&&"message"in e&&"additional"in e}}],(c=[{key:"format",value:function(){var e=this,t="";a.StringHelper.isEmpty(this.domain)||(t+="".concat(this.domain,": ")),a.StringHelper.isEmpty(this.message)||(t+="".concat(this.message));var r=Object.keys(this.additional);return r.length>0&&(t.length>0&&(t+="\n"),r.forEach(function(r){t+="\t".concat(r,": ").concat(u.JsonHelper.stringify(e.additional[r]),"\n")})),t}}])&&o(r.prototype,c),f&&o(r,f),t}();t.CoreError=c},function(e,t,r){"use strict";function n(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}Object.defineProperty(t,"__esModule",{value:!0});var o=r(15),i=r(5),u=r(0),a=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(r(4)),c=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}var t,r;return t=e,(r=[{key:"encrypt",value:function(e,t){if(u.StringHelper.isEmpty(e))throw new o.PlatformError("The privateKey must be a non empty string");if(u.StringHelper.isEmpty(t))throw new o.PlatformError("The data must be a non empty string");var r=new Buffer(t,"ascii");return a.privateEncrypt(e,r).toString("hex")}},{key:"decrypt",value:function(e,t){if(u.StringHelper.isEmpty(e))throw new o.PlatformError("The publicKey must be a non empty string");if(u.StringHelper.isEmpty(t))throw new o.PlatformError("The data must be a non empty string");var r=new Buffer(t,"hex");return a.publicDecrypt(e,r).toString("ascii")}},{key:"sign",value:function(e,t){if(u.StringHelper.isEmpty(e))throw new o.PlatformError("The privateKey must be a non empty string");if(u.StringHelper.isEmpty(t))throw new o.PlatformError("The data must be a non empty string");var r=a.createSign("RSA-SHA256");return r.update(t),r.sign(e,"hex")}},{key:"verify",value:function(e,t,r){if(u.StringHelper.isEmpty(e))throw new o.PlatformError("The publicKey must be a non empty string");if(u.StringHelper.isEmpty(t))throw new o.PlatformError("The data must be a non empty string");if(u.StringHelper.isEmpty(r))throw new o.PlatformError("The signature must be a non empty string");var n=a.createVerify("RSA-SHA256");return n.update(t),n.verify(e,r,"hex")}},{key:"hash",value:function(e,t,r,n){if(u.StringHelper.isEmpty(e))throw new o.PlatformError("The algo must be a non empty string");if(u.StringHelper.isEmpty(t))throw new o.PlatformError("The data must be a non empty string");return a.createHash(e).update(t,r).digest(n)}},{key:"hmac",value:function(e,t,r,n,c){if(u.StringHelper.isEmpty(e))throw new o.PlatformError("The algo must be a non empty string");if(i.ObjectHelper.isEmpty(t))throw new o.PlatformError("The key must be non empty");if(u.StringHelper.isEmpty(r))throw new o.PlatformError("The data must be a non empty string");return a.createHmac(e,t).update(r,n).digest(c)}}])&&n(t.prototype,r),e}();t.PlatformCrypto=c},function(e,t,r){e.exports=r(20)},function(e,t){e.exports=require("https")},function(e,t){e.exports=require("http")},function(e,t,r){"use strict";function n(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}var t,r;return t=e,(r=[{key:"banner",value:function(e){}},{key:"log",value:function(e){}},{key:"info",value:function(e){}},{key:"warning",value:function(e){}},{key:"error",value:function(e,t){}}])&&n(t.prototype,r),e}();t.NullLogger=o},function(e,t,r){"use strict";function n(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}var t,r;return t=e,r=[{key:"isInteger",value:function(e){return Number.isInteger(e)&&!Number.isNaN(e)&&Number.isFinite(e)}},{key:"isNumber",value:function(e){return void 0!==e&&null!==e&&"number"==typeof e&&!Number.isNaN(e)&&Number.isFinite(e)}},{key:"isFloatString",value:function(e){return/^-?\d*\.?\d+$/.test(e)}},{key:"isIntegerString",value:function(e){return/^-?\d+$/.test(e)}}],null&&n(t.prototype,null),r&&n(t,r),e}();t.NumberHelper=o},function(e,t,r){"use strict";function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function o(e,t){return!t||"object"!==n(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}Object.defineProperty(t,"__esModule",{value:!0});var i=r(6),u=function(e){function t(e,r,n){var i;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(i=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,r,n))).domain="Network",i}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,i.CoreError),t}();t.NetworkError=u},function(e,t,r){"use strict";function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function o(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}var t,r;return t=e,r=[{key:"stringify",value:function(e,t,r){var o=[];return JSON.stringify(e,function(r,i){if("object"===n(i)&&null!==e&&void 0!==i){if(-1!==o.indexOf(i))return;o.push(i)}return t?t(r,i):i},r)}}],null&&o(t.prototype,null),r&&o(t,r),e}();t.JsonHelper=i},function(e,t,r){"use strict";function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function o(e,t){return!t||"object"!==n(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}Object.defineProperty(t,"__esModule",{value:!0});var i=r(6),u=function(e){function t(e,r,n){var i;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(i=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,r,n))).domain="Platform",i}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,i.CoreError),t}();t.PlatformError=u},function(e,t,r){"use strict";function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function o(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function i(e,t){return!t||"object"!==n(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}Object.defineProperty(t,"__esModule",{value:!0});var u=r(1),a=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),i(this,(t.__proto__||Object.getPrototypeOf(t)).call(this))}var r,n,a;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,u.FactoryBase),r=t,a=[{key:"instance",value:function(){return t._instance||(t._instance=new t),t._instance}}],(n=[{key:"getInstance",value:function(){return t.instance()}}])&&o(r.prototype,n),a&&o(r,a),t}();t.RngServiceFactory=a},function(e,t,r){"use strict";function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function o(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function i(e,t){return!t||"object"!==n(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}Object.defineProperty(t,"__esModule",{value:!0});var u=r(1),a=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),i(this,(t.__proto__||Object.getPrototypeOf(t)).call(this))}var r,n,a;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,u.FactoryBase),r=t,a=[{key:"instance",value:function(){return t._instance||(t._instance=new t),t._instance}}],(n=[{key:"getInstance",value:function(){return t.instance()}}])&&o(r.prototype,n),a&&o(r,a),t}();t.PlatformCryptoFactory=a},function(e,t,r){"use strict";function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function o(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function i(e,t){return!t||"object"!==n(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}Object.defineProperty(t,"__esModule",{value:!0});var u=r(1),a=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),i(this,(t.__proto__||Object.getPrototypeOf(t)).call(this))}var r,n,a;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,u.FactoryBase),r=t,a=[{key:"instance",value:function(){return t._instance||(t._instance=new t),t._instance}}],(n=[{key:"getInstance",value:function(){return t.instance()}}])&&o(r.prototype,n),a&&o(r,a),t}();t.NetworkClientFactory=a},function(e,t){!function(t){"use strict";var r,n=Object.prototype,o=n.hasOwnProperty,i="function"==typeof Symbol?Symbol:{},u=i.iterator||"@@iterator",a=i.asyncIterator||"@@asyncIterator",c=i.toStringTag||"@@toStringTag",f="object"==typeof e,s=t.regeneratorRuntime;if(s)f&&(e.exports=s);else{(s=t.regeneratorRuntime=f?e.exports:{}).wrap=w;var l="suspendedStart",p="suspendedYield",y="executing",h="completed",v={},b={};b[u]=function(){return this};var d=Object.getPrototypeOf,m=d&&d(d(C([])));m&&m!==n&&o.call(m,u)&&(b=m);var g=E.prototype=O.prototype=Object.create(b);P.prototype=g.constructor=E,E.constructor=P,E[c]=P.displayName="GeneratorFunction",s.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===P||"GeneratorFunction"===(t.displayName||t.name))},s.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,E):(e.__proto__=E,c in e||(e[c]="GeneratorFunction")),e.prototype=Object.create(g),e},s.awrap=function(e){return{__await:e}},k(S.prototype),S.prototype[a]=function(){return this},s.AsyncIterator=S,s.async=function(e,t,r,n){var o=new S(w(e,t,r,n));return s.isGeneratorFunction(t)?o:o.next().then(function(e){return e.done?e.value:o.next()})},k(g),g[c]="Generator",g[u]=function(){return this},g.toString=function(){return"[object Generator]"},s.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}},s.values=C,N.prototype={constructor:N,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=r,this.done=!1,this.delegate=null,this.method="next",this.arg=r,this.tryEntries.forEach(T),!e)for(var t in this)"t"===t.charAt(0)&&o.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=r)},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(n,o){return a.type="throw",a.arg=e,t.next=n,o&&(t.method="next",t.arg=r),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var u=this.tryEntries[i],a=u.completion;if("root"===u.tryLoc)return n("end");if(u.tryLoc<=this.prev){var c=o.call(u,"catchLoc"),f=o.call(u,"finallyLoc");if(c&&f){if(this.prev<u.catchLoc)return n(u.catchLoc,!0);if(this.prev<u.finallyLoc)return n(u.finallyLoc)}else if(c){if(this.prev<u.catchLoc)return n(u.catchLoc,!0)}else{if(!f)throw new Error("try statement without catch or finally");if(this.prev<u.finallyLoc)return n(u.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&o.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var i=n;break}}i&&("break"===e||"continue"===e)&&i.tryLoc<=t&&t<=i.finallyLoc&&(i=null);var u=i?i.completion:{};return u.type=e,u.arg=t,i?(this.method="next",this.next=i.finallyLoc,v):this.complete(u)},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),v},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),T(r),v}},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;T(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:C(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=r),v}}}function w(e,t,r,n){var o=t&&t.prototype instanceof O?t:O,i=Object.create(o.prototype),u=new N(n||[]);return i._invoke=function(e,t,r){var n=l;return function(o,i){if(n===y)throw new Error("Generator is already running");if(n===h){if("throw"===o)throw i;return R()}for(r.method=o,r.arg=i;;){var u=r.delegate;if(u){var a=j(u,r);if(a){if(a===v)continue;return a}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(n===l)throw n=h,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n=y;var c=_(e,t,r);if("normal"===c.type){if(n=r.done?h:p,c.arg===v)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(n=h,r.method="throw",r.arg=c.arg)}}}(e,r,u),i}function _(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}function O(){}function P(){}function E(){}function k(e){["next","throw","return"].forEach(function(t){e[t]=function(e){return this._invoke(t,e)}})}function S(e){var t;this._invoke=function(r,n){function i(){return new Promise(function(t,i){!function t(r,n,i,u){var a=_(e[r],e,n);if("throw"!==a.type){var c=a.arg,f=c.value;return f&&"object"==typeof f&&o.call(f,"__await")?Promise.resolve(f.__await).then(function(e){t("next",e,i,u)},function(e){t("throw",e,i,u)}):Promise.resolve(f).then(function(e){c.value=e,i(c)},u)}u(a.arg)}(r,n,t,i)})}return t=t?t.then(i,i):i()}}function j(e,t){var n=e.iterator[t.method];if(n===r){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=r,j(e,t),"throw"===t.method))return v;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return v}var o=_(n,e.iterator,t.arg);if("throw"===o.type)return t.method="throw",t.arg=o.arg,t.delegate=null,v;var i=o.arg;return i?i.done?(t[e.resultName]=i.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=r),t.delegate=null,v):i:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,v)}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 T(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function N(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(x,this),this.reset(!0)}function C(e){if(e){var t=e[u];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,i=function t(){for(;++n<e.length;)if(o.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=r,t.done=!0,t};return i.next=i}}return{next:R}}function R(){return{value:r,done:!0}}}(function(){return this}()||Function("return this")())},function(e,t,r){var n=function(){return this}()||Function("return this")(),o=n.regeneratorRuntime&&Object.getOwnPropertyNames(n).indexOf("regeneratorRuntime")>=0,i=o&&n.regeneratorRuntime;if(n.regeneratorRuntime=void 0,e.exports=r(19),o)n.regeneratorRuntime=i;else try{delete n.regeneratorRuntime}catch(e){n.regeneratorRuntime=void 0}},function(e,t,r){"use strict";var n,o=(n=r(8))&&n.__esModule?n:{default:n};function i(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}Object.defineProperty(t,"__esModule",{value:!0});var u=r(18),a=r(17),c=r(16),f=r(7),s=r(3),l=r(2),p=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}var t,r,n,p;return t=e,null,(r=[{key:"initialize",value:(n=o.default.mark(function t(){return o.default.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return e._isInitialized||(e._isInitialized=!0,u.NetworkClientFactory.instance().register("default",function(e,t,r){return new s.NetworkClient(e,t,r)}),c.RngServiceFactory.instance().register("default",function(){return new l.RngService}),a.PlatformCryptoFactory.instance().register("default",function(){return new f.PlatformCrypto})),t.abrupt("return",Promise.resolve());case 2:case"end":return t.stop()}},t,this)}),p=function(){var e=this,t=arguments;return new Promise(function(r,o){var i=n.apply(e,t);function u(e,t){try{var n=i[e](t),u=n.value}catch(e){return void o(e)}n.done?r(u):Promise.resolve(u).then(a,c)}function a(e){u("next",e)}function c(e){u("throw",e)}a()})},function(){return p.apply(this,arguments)})}])&&i(t,r),e}();p._isInitialized=!1,t.PAL=p},function(e,t,r){"use strict";function n(e){for(var r in e)t.hasOwnProperty(r)||(t[r]=e[r])}Object.defineProperty(t,"__esModule",{value:!0}),n(r(21)),n(r(7)),n(r(3)),n(r(2))}])}); | ||
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define("@iota-pico/pal-nodejs",[],e):"object"==typeof exports?exports["@iota-pico/pal-nodejs"]=e():t.IotaPicoPalNodejs=e()}("undefined"!=typeof self?self:this,function(){return function(t){var e={};function r(n){if(e[n])return e[n].exports;var o=e[n]={i:n,l:!1,exports:{}};return t[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}return r.m=t,r.c=e,r.d=function(t,e,n){r.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r.t=function(t,e){if(1&e&&(t=r(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)r.d(n,o,function(e){return t[e]}.bind(null,o));return n},r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,"a",e),e},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.p="",r(r.s=22)}([function(t,e,r){"use strict";function n(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}Object.defineProperty(e,"__esModule",{value:!0});var o=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)}var e,r;return e=t,r=[{key:"isString",value:function(t){return null!==t&&void 0!==t&&"[object String]"===Object.prototype.toString.call(t)}},{key:"isEmpty",value:function(e){return!t.isString(e)||0===e.length}},{key:"isAscii",value:function(t){return null!==t&&void 0!==t&&/^[\x00-\xFF]*$/.test(t)}},{key:"encodeNonASCII",value:function(e){return t.isString(e)?e.replace(/[\u007F-\uFFFF]/g,function(t){return"\\u".concat("0000".concat(t.charCodeAt(0).toString(16)).substr(-4))}):void 0}},{key:"decodeNonASCII",value:function(e){return t.isString(e)?e.replace(/\\u([\d\w]{4})/gi,function(t,e){return String.fromCharCode(parseInt(e,16))}):void 0}}],null&&n(e.prototype,null),r&&n(e,r),t}();e.StringHelper=o},function(t,e,r){"use strict";function n(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}Object.defineProperty(e,"__esModule",{value:!0});var o=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this._types={}}var e,r;return e=t,(r=[{key:"register",value:function(t,e){this.getInstance()._types[t]=e}},{key:"unregister",value:function(t){delete this.getInstance()._types[t]}},{key:"exists",value:function(t){return void 0!==this.getInstance()._types[t]}},{key:"types",value:function(){return Object.keys(this.getInstance()._types)}},{key:"create",value:function(t){var e=this.getInstance();if(e._types[t]){for(var r,n=arguments.length,o=new Array(n>1?n-1:0),i=1;i<n;i++)o[i-1]=arguments[i];return(r=e._types)[t].apply(r,o)}}}])&&n(e.prototype,r),t}();e.FactoryBase=o},function(t,e,r){"use strict";function n(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}Object.defineProperty(e,"__esModule",{value:!0});var o=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)Object.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e.default=t,e}(r(4)),i=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)}var e,r;return e=t,(r=[{key:"generate",value:function(t){return new Uint8Array(o.randomBytes(t))}}])&&n(e.prototype,r),t}();e.RngService=i},function(t,e,r){"use strict";var n,o=(n=r(8))&&n.__esModule?n:{default:n};function i(t){return function(){var e=this,r=arguments;return new Promise(function(n,o){var i=t.apply(e,r);function u(t,e){try{var r=i[t](e),u=r.value}catch(t){return void o(t)}r.done?n(u):Promise.resolve(u).then(a,c)}function a(t){u("next",t)}function c(t){u("throw",t)}a()})}}function u(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}var a=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)Object.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e.default=t,e};Object.defineProperty(e,"__esModule",{value:!0});var c=r(13),f=r(12),l=r(5),s=r(0),p=r(11),y=a(r(10)),h=a(r(9)),v=function(){function t(e,r){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,o=arguments.length>3?arguments[3]:void 0;if(function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),l.ObjectHelper.isEmpty(e))throw new c.NetworkError("The networkEndPoint must be defined");if(!f.NumberHelper.isInteger(n)||n<0)throw new c.NetworkError("The timeoutMs must be >= 0");this._networkEndPoint=e,this._timeoutMs=n,this._logger=r||new p.NullLogger,this._httpClientRequest=o||("http"===e.getProtocol()?y.request:h.request),this._logger.banner("Network Client",{endPoint:this._networkEndPoint})}var e,r,n,a,v,b,d;return e=t,(r=[{key:"get",value:(d=i(o.default.mark(function t(e,r){var n;return o.default.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return this._logger.info("===> NetworkClient::GET Send"),t.next=3,this.doRequest("GET",void 0,e,r);case 3:return n=t.sent,this._logger.info("<=== NetworkClient::GET Received",n),t.abrupt("return",n);case 6:case"end":return t.stop()}},t,this)})),function(t,e){return d.apply(this,arguments)})},{key:"post",value:(b=i(o.default.mark(function t(e,r,n){var i;return o.default.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return this._logger.info("===> NetworkClient::POST Send",e),t.next=3,this.doRequest("POST",e,r,n);case 3:return i=t.sent,this._logger.info("<=== NetworkClient::POST Received",i),t.abrupt("return",i);case 6:case"end":return t.stop()}},t,this)})),function(t,e,r){return b.apply(this,arguments)})},{key:"getJson",value:(v=i(o.default.mark(function t(e,r){var n=this;return o.default.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return this._logger.info("===> NetworkClient::GET Send"),t.abrupt("return",this.doRequest("GET",void 0,e,r).then(function(t){try{var e=JSON.parse(t);return n._logger.info("===> NetworkClient::GET Received",e),e}catch(e){throw n._logger.info("===> NetworkClient::GET Parse Failed",t),new c.NetworkError("Failed GET request, unable to parse response",{endPoint:n._networkEndPoint.getUri(),response:t})}}));case 2:case"end":return t.stop()}},t,this)})),function(t,e){return v.apply(this,arguments)})},{key:"postJson",value:(a=i(o.default.mark(function t(e,r,n){var i,u=this;return o.default.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return this._logger.info("===> NetworkClient::POST Send"),(i=n||{})["Content-Type"]="application/json",t.abrupt("return",this.doRequest("POST",JSON.stringify(e),r,i).then(function(t){try{var e=JSON.parse(t);return u._logger.info("===> NetworkClient::POST Received",e),e}catch(e){throw u._logger.info("===> NetworkClient::GET Parse Failed",t),new c.NetworkError("Failed POST request, unable to parse response",{endPoint:u._networkEndPoint.getUri(),response:t})}}));case 4:case"end":return t.stop()}},t,this)})),function(t,e,r){return a.apply(this,arguments)})},{key:"doRequest",value:(n=i(o.default.mark(function t(e,r,n,i){var u=this;return o.default.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",new Promise(function(t,o){var a=i||{},f=u._networkEndPoint.getUri(),p=u._networkEndPoint.getRootPath();if(!s.StringHelper.isEmpty(n)){var y="/".concat(n.replace(/^\/*/,""));p+=y,f+=y}var h={protocol:"".concat(u._networkEndPoint.getProtocol(),":"),hostname:u._networkEndPoint.getHost(),port:u._networkEndPoint.getPort(),path:p,method:e,headers:a,timeout:u._timeoutMs>0?u._timeoutMs:void 0},v=u._httpClientRequest(h,function(r){var n="";r.setEncoding("utf8"),r.on("data",function(t){n+=t}),r.on("end",function(){200===r.statusCode?t(n):(u._logger.info("<=== NetworkClient::Received Fail",{code:r.statusCode,data:n}),o(new c.NetworkError("Failed ".concat(e," request"),{endPoint:f,errorResponseCode:r.statusCode,errorResponse:n||r.statusMessage})))})});v.on("error",function(t){u._logger.error("<=== NetworkClient::Errored"),o(new c.NetworkError("Failed ".concat(e," request"),{endPoint:f,errorResponse:t}))}),v.on("timeout",function(t){u._logger.error("<=== NetworkClient::Timed Out"),o(new c.NetworkError("Failed ".concat(e," request, timed out"),{endPoint:f}))}),l.ObjectHelper.isEmpty(r)||v.write(r),v.end()}));case 1:case"end":return t.stop()}},t,this)})),function(t,e,r,o){return n.apply(this,arguments)})}])&&u(e.prototype,r),t}();e.NetworkClient=v},function(t,e){t.exports=require("crypto")},function(t,e,r){"use strict";function n(t){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function o(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}Object.defineProperty(e,"__esModule",{value:!0});var i=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)}var e,r;return e=t,r=[{key:"isEmpty",value:function(t){return null===t||void 0===t}},{key:"isObject",value:function(t){return null!==t&&void 0!==t&&"object"===n(t)&&!Array.isArray(t)}},{key:"isType",value:function(e,r){var n=t.getClassName(e);return void 0!==n&&n===t.getClassName(r)}},{key:"getClassName",value:function(t){if(null!==t&&void 0!==t){var e=("function"==typeof t?t.toString():t.constructor.toString()).match(/\w+/g);return e&&e.length>1?e[1]:void 0}}}],null&&o(e.prototype,null),r&&o(e,r),t}();e.ObjectHelper=i},function(t,e,r){"use strict";function n(t){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function o(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function i(t,e){return!e||"object"!==n(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function u(t){return(u=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function a(t,e){return(a=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}Object.defineProperty(e,"__esModule",{value:!0});var c=r(14),f=r(0),l=function(t){function e(t,r,n){var o;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(o=i(this,u(e).call(this,t))).additional=r||{},o.innerError=n,o.domain="Core",o}var r,l,s;return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&a(t,e)}(e,function(t){function e(){var e=Reflect.construct(t,Array.from(arguments));return Object.setPrototypeOf(e,Object.getPrototypeOf(this)),e}return e.prototype=Object.create(t.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t,e}(Error)),r=e,s=[{key:"isError",value:function(t){return void 0!==t&&null!==t&&"object"===n(t)&&"message"in t&&"additional"in t}}],(l=[{key:"format",value:function(){var t=this,e="";f.StringHelper.isEmpty(this.domain)||(e+="".concat(this.domain,": ")),f.StringHelper.isEmpty(this.message)||(e+="".concat(this.message));var r=Object.keys(this.additional);return r.length>0&&(e.length>0&&(e+="\n"),r.forEach(function(r){e+="\t".concat(r,": ").concat(c.JsonHelper.stringify(t.additional[r]),"\n")})),e}}])&&o(r.prototype,l),s&&o(r,s),e}();e.CoreError=l},function(t,e,r){"use strict";function n(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}Object.defineProperty(e,"__esModule",{value:!0});var o=r(15),i=r(5),u=r(0),a=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)Object.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e.default=t,e}(r(4)),c=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)}var e,r;return e=t,(r=[{key:"encrypt",value:function(t,e){if(u.StringHelper.isEmpty(t))throw new o.PlatformError("The privateKey must be a non empty string");if(u.StringHelper.isEmpty(e))throw new o.PlatformError("The data must be a non empty string");var r=new Buffer(e,"ascii");return a.privateEncrypt(t,r).toString("hex")}},{key:"decrypt",value:function(t,e){if(u.StringHelper.isEmpty(t))throw new o.PlatformError("The publicKey must be a non empty string");if(u.StringHelper.isEmpty(e))throw new o.PlatformError("The data must be a non empty string");var r=new Buffer(e,"hex");return a.publicDecrypt(t,r).toString("ascii")}},{key:"sign",value:function(t,e){if(u.StringHelper.isEmpty(t))throw new o.PlatformError("The privateKey must be a non empty string");if(u.StringHelper.isEmpty(e))throw new o.PlatformError("The data must be a non empty string");var r=a.createSign("RSA-SHA256");return r.update(e),r.sign(t,"hex")}},{key:"verify",value:function(t,e,r){if(u.StringHelper.isEmpty(t))throw new o.PlatformError("The publicKey must be a non empty string");if(u.StringHelper.isEmpty(e))throw new o.PlatformError("The data must be a non empty string");if(u.StringHelper.isEmpty(r))throw new o.PlatformError("The signature must be a non empty string");var n=a.createVerify("RSA-SHA256");return n.update(e),n.verify(t,r,"hex")}},{key:"hash",value:function(t,e,r,n){if(u.StringHelper.isEmpty(t))throw new o.PlatformError("The algo must be a non empty string");if(u.StringHelper.isEmpty(e))throw new o.PlatformError("The data must be a non empty string");return a.createHash(t).update(e,r).digest(n)}},{key:"hmac",value:function(t,e,r,n,c){if(u.StringHelper.isEmpty(t))throw new o.PlatformError("The algo must be a non empty string");if(i.ObjectHelper.isEmpty(e))throw new o.PlatformError("The key must be non empty");if(u.StringHelper.isEmpty(r))throw new o.PlatformError("The data must be a non empty string");return a.createHmac(t,e).update(r,n).digest(c)}}])&&n(e.prototype,r),t}();e.PlatformCrypto=c},function(t,e,r){t.exports=r(20)},function(t,e){t.exports=require("https")},function(t,e){t.exports=require("http")},function(t,e,r){"use strict";function n(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}Object.defineProperty(e,"__esModule",{value:!0});var o=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)}var e,r;return e=t,(r=[{key:"banner",value:function(t){}},{key:"log",value:function(t){}},{key:"info",value:function(t){}},{key:"warning",value:function(t){}},{key:"error",value:function(t,e){}}])&&n(e.prototype,r),t}();e.NullLogger=o},function(t,e,r){"use strict";function n(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}Object.defineProperty(e,"__esModule",{value:!0});var o=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)}var e,r;return e=t,r=[{key:"isInteger",value:function(t){return Number.isInteger(t)&&!Number.isNaN(t)&&Number.isFinite(t)}},{key:"isNumber",value:function(t){return void 0!==t&&null!==t&&"number"==typeof t&&!Number.isNaN(t)&&Number.isFinite(t)}},{key:"isFloatString",value:function(t){return/^-?\d*\.?\d+$/.test(t)}},{key:"isIntegerString",value:function(t){return/^-?\d+$/.test(t)}}],null&&n(e.prototype,null),r&&n(e,r),t}();e.NumberHelper=o},function(t,e,r){"use strict";function n(t){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function o(t,e){return!e||"object"!==n(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function i(t){return(i=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function u(t,e){return(u=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}Object.defineProperty(e,"__esModule",{value:!0});var a=r(6),c=function(t){function e(t,r,n){var u;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(u=o(this,i(e).call(this,t,r,n))).domain="Network",u}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&u(t,e)}(e,a.CoreError),e}();e.NetworkError=c},function(t,e,r){"use strict";function n(t){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function o(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}Object.defineProperty(e,"__esModule",{value:!0});var i=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)}var e,r;return e=t,r=[{key:"stringify",value:function(t,e,r){var o=[];return JSON.stringify(t,function(r,i){if("object"===n(i)&&null!==t&&void 0!==i){if(-1!==o.indexOf(i))return;o.push(i)}return e?e(r,i):i},r)}}],null&&o(e.prototype,null),r&&o(e,r),t}();e.JsonHelper=i},function(t,e,r){"use strict";function n(t){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function o(t,e){return!e||"object"!==n(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function i(t){return(i=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function u(t,e){return(u=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}Object.defineProperty(e,"__esModule",{value:!0});var a=r(6),c=function(t){function e(t,r,n){var u;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(u=o(this,i(e).call(this,t,r,n))).domain="Platform",u}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&u(t,e)}(e,a.CoreError),e}();e.PlatformError=c},function(t,e,r){"use strict";function n(t){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function o(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function i(t,e){return!e||"object"!==n(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function u(t){return(u=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function a(t,e){return(a=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}Object.defineProperty(e,"__esModule",{value:!0});var c=r(1),f=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),i(this,u(e).call(this))}var r,n,f;return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&a(t,e)}(e,c.FactoryBase),r=e,f=[{key:"instance",value:function(){return e._instance||(e._instance=new e),e._instance}}],(n=[{key:"getInstance",value:function(){return e.instance()}}])&&o(r.prototype,n),f&&o(r,f),e}();e.RngServiceFactory=f},function(t,e,r){"use strict";function n(t){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function o(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function i(t,e){return!e||"object"!==n(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function u(t){return(u=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function a(t,e){return(a=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}Object.defineProperty(e,"__esModule",{value:!0});var c=r(1),f=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),i(this,u(e).call(this))}var r,n,f;return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&a(t,e)}(e,c.FactoryBase),r=e,f=[{key:"instance",value:function(){return e._instance||(e._instance=new e),e._instance}}],(n=[{key:"getInstance",value:function(){return e.instance()}}])&&o(r.prototype,n),f&&o(r,f),e}();e.PlatformCryptoFactory=f},function(t,e,r){"use strict";function n(t){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function o(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function i(t,e){return!e||"object"!==n(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function u(t){return(u=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function a(t,e){return(a=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}Object.defineProperty(e,"__esModule",{value:!0});var c=r(1),f=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),i(this,u(e).call(this))}var r,n,f;return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&a(t,e)}(e,c.FactoryBase),r=e,f=[{key:"instance",value:function(){return e._instance||(e._instance=new e),e._instance}}],(n=[{key:"getInstance",value:function(){return e.instance()}}])&&o(r.prototype,n),f&&o(r,f),e}();e.NetworkClientFactory=f},function(t,e){!function(e){"use strict";var r,n=Object.prototype,o=n.hasOwnProperty,i="function"==typeof Symbol?Symbol:{},u=i.iterator||"@@iterator",a=i.asyncIterator||"@@asyncIterator",c=i.toStringTag||"@@toStringTag",f="object"==typeof t,l=e.regeneratorRuntime;if(l)f&&(t.exports=l);else{(l=e.regeneratorRuntime=f?t.exports:{}).wrap=w;var s="suspendedStart",p="suspendedYield",y="executing",h="completed",v={},b={};b[u]=function(){return this};var d=Object.getPrototypeOf,m=d&&d(d(C([])));m&&m!==n&&o.call(m,u)&&(b=m);var g=E.prototype=O.prototype=Object.create(b);P.prototype=g.constructor=E,E.constructor=P,E[c]=P.displayName="GeneratorFunction",l.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===P||"GeneratorFunction"===(e.displayName||e.name))},l.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,E):(t.__proto__=E,c in t||(t[c]="GeneratorFunction")),t.prototype=Object.create(g),t},l.awrap=function(t){return{__await:t}},S(j.prototype),j.prototype[a]=function(){return this},l.AsyncIterator=j,l.async=function(t,e,r,n){var o=new j(w(t,e,r,n));return l.isGeneratorFunction(e)?o:o.next().then(function(t){return t.done?t.value:o.next()})},S(g),g[c]="Generator",g[u]=function(){return this},g.toString=function(){return"[object Generator]"},l.keys=function(t){var e=[];for(var r in t)e.push(r);return e.reverse(),function r(){for(;e.length;){var n=e.pop();if(n in t)return r.value=n,r.done=!1,r}return r.done=!0,r}},l.values=C,N.prototype={constructor:N,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=r,this.done=!1,this.delegate=null,this.method="next",this.arg=r,this.tryEntries.forEach(T),!t)for(var e in this)"t"===e.charAt(0)&&o.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=r)},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 e=this;function n(n,o){return a.type="throw",a.arg=t,e.next=n,o&&(e.method="next",e.arg=r),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var u=this.tryEntries[i],a=u.completion;if("root"===u.tryLoc)return n("end");if(u.tryLoc<=this.prev){var c=o.call(u,"catchLoc"),f=o.call(u,"finallyLoc");if(c&&f){if(this.prev<u.catchLoc)return n(u.catchLoc,!0);if(this.prev<u.finallyLoc)return n(u.finallyLoc)}else if(c){if(this.prev<u.catchLoc)return n(u.catchLoc,!0)}else{if(!f)throw new Error("try statement without catch or finally");if(this.prev<u.finallyLoc)return n(u.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&o.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var i=n;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var u=i?i.completion:{};return u.type=t,u.arg=e,i?(this.method="next",this.next=i.finallyLoc,v):this.complete(u)},complete:function(t,e){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&&e&&(this.next=e),v},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),T(r),v}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;T(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:C(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=r),v}}}function w(t,e,r,n){var o=e&&e.prototype instanceof O?e:O,i=Object.create(o.prototype),u=new N(n||[]);return i._invoke=function(t,e,r){var n=s;return function(o,i){if(n===y)throw new Error("Generator is already running");if(n===h){if("throw"===o)throw i;return R()}for(r.method=o,r.arg=i;;){var u=r.delegate;if(u){var a=k(u,r);if(a){if(a===v)continue;return a}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(n===s)throw n=h,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n=y;var c=_(t,e,r);if("normal"===c.type){if(n=r.done?h:p,c.arg===v)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(n=h,r.method="throw",r.arg=c.arg)}}}(t,r,u),i}function _(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}function O(){}function P(){}function E(){}function S(t){["next","throw","return"].forEach(function(e){t[e]=function(t){return this._invoke(e,t)}})}function j(t){var e;this._invoke=function(r,n){function i(){return new Promise(function(e,i){!function e(r,n,i,u){var a=_(t[r],t,n);if("throw"!==a.type){var c=a.arg,f=c.value;return f&&"object"==typeof f&&o.call(f,"__await")?Promise.resolve(f.__await).then(function(t){e("next",t,i,u)},function(t){e("throw",t,i,u)}):Promise.resolve(f).then(function(t){c.value=t,i(c)},u)}u(a.arg)}(r,n,e,i)})}return e=e?e.then(i,i):i()}}function k(t,e){var n=t.iterator[e.method];if(n===r){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=r,k(t,e),"throw"===e.method))return v;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return v}var o=_(n,t.iterator,e.arg);if("throw"===o.type)return e.method="throw",e.arg=o.arg,e.delegate=null,v;var i=o.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=r),e.delegate=null,v):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,v)}function x(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function T(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function N(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(x,this),this.reset(!0)}function C(t){if(t){var e=t[u];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,i=function e(){for(;++n<t.length;)if(o.call(t,n))return e.value=t[n],e.done=!1,e;return e.value=r,e.done=!0,e};return i.next=i}}return{next:R}}function R(){return{value:r,done:!0}}}(function(){return this}()||Function("return this")())},function(t,e,r){var n=function(){return this}()||Function("return this")(),o=n.regeneratorRuntime&&Object.getOwnPropertyNames(n).indexOf("regeneratorRuntime")>=0,i=o&&n.regeneratorRuntime;if(n.regeneratorRuntime=void 0,t.exports=r(19),o)n.regeneratorRuntime=i;else try{delete n.regeneratorRuntime}catch(t){n.regeneratorRuntime=void 0}},function(t,e,r){"use strict";var n,o=(n=r(8))&&n.__esModule?n:{default:n};function i(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}Object.defineProperty(e,"__esModule",{value:!0});var u=r(18),a=r(17),c=r(16),f=r(7),l=r(3),s=r(2),p=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)}var e,r,n,p;return e=t,null,(r=[{key:"initialize",value:(n=o.default.mark(function e(){return o.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return t._isInitialized||(t._isInitialized=!0,u.NetworkClientFactory.instance().register("default",function(t,e,r){return new l.NetworkClient(t,e,r)}),c.RngServiceFactory.instance().register("default",function(){return new s.RngService}),a.PlatformCryptoFactory.instance().register("default",function(){return new f.PlatformCrypto})),e.abrupt("return",Promise.resolve());case 2:case"end":return e.stop()}},e,this)}),p=function(){var t=this,e=arguments;return new Promise(function(r,o){var i=n.apply(t,e);function u(t,e){try{var n=i[t](e),u=n.value}catch(t){return void o(t)}n.done?r(u):Promise.resolve(u).then(a,c)}function a(t){u("next",t)}function c(t){u("throw",t)}a()})},function(){return p.apply(this,arguments)})}])&&i(e,r),t}();p._isInitialized=!1,e.PAL=p},function(t,e,r){"use strict";function n(t){for(var r in t)e.hasOwnProperty(r)||(e[r]=t[r])}Object.defineProperty(e,"__esModule",{value:!0}),n(r(21)),n(r(7)),n(r(3)),n(r(2))}])}); |
Sorry, the diff of this file is too big to display
331465
2778
Updated@iota-pico/core@^0.9.6