@walletconnect/relay-auth
Advanced tools
Comparing version 1.0.3 to 1.0.4
@@ -28,3 +28,3 @@ "use strict"; | ||
return tslib_1.__awaiter(this, void 0, void 0, function* () { | ||
const { header, payload, signature } = utils_1.decodeJWT(jwt); | ||
const { header, payload, data, signature } = utils_1.decodeJWT(jwt); | ||
if (header.alg !== constants_1.JWT_IRIDIUM_ALG || header.typ !== constants_1.JWT_IRIDIUM_TYP) { | ||
@@ -34,3 +34,2 @@ throw new Error("JWT must use EdDSA algorithm"); | ||
const publicKey = utils_1.decodeIss(payload.iss); | ||
const data = utils_1.encodeData({ header, payload }); | ||
return ed25519.verify(publicKey, data, signature); | ||
@@ -37,0 +36,0 @@ }); |
@@ -19,2 +19,5 @@ export interface IridiumJWTHeader { | ||
} | ||
export interface IridiumJWTDecoded extends IridiumJWTSigned { | ||
data: Uint8Array; | ||
} | ||
//# sourceMappingURL=types.d.ts.map |
@@ -1,2 +0,2 @@ | ||
import { IridiumJWTData, IridiumJWTSigned } from "./types"; | ||
import { IridiumJWTData, IridiumJWTDecoded, IridiumJWTSigned } from "./types"; | ||
export declare function decodeJSON(str: string): any; | ||
@@ -11,3 +11,3 @@ export declare function encodeJSON(val: any): string; | ||
export declare function encodeJWT(params: IridiumJWTSigned): string; | ||
export declare function decodeJWT(jwt: string): IridiumJWTSigned; | ||
export declare function decodeJWT(jwt: string): IridiumJWTDecoded; | ||
//# sourceMappingURL=utils.d.ts.map |
@@ -77,5 +77,6 @@ "use strict"; | ||
const signature = decodeSig(params[2]); | ||
return { header, payload, signature }; | ||
const data = from_string_1.fromString(params.slice(0, 2).join(constants_1.JWT_DELIMITER), constants_1.DATA_ENCODING); | ||
return { header, payload, signature, data }; | ||
} | ||
exports.decodeJWT = decodeJWT; | ||
//# sourceMappingURL=utils.js.map |
@@ -19,3 +19,3 @@ import * as ed25519 from "@stablelib/ed25519"; | ||
export async function verifyJWT(jwt) { | ||
const { header, payload, signature } = decodeJWT(jwt); | ||
const { header, payload, data, signature } = decodeJWT(jwt); | ||
if (header.alg !== JWT_IRIDIUM_ALG || header.typ !== JWT_IRIDIUM_TYP) { | ||
@@ -25,5 +25,4 @@ throw new Error("JWT must use EdDSA algorithm"); | ||
const publicKey = decodeIss(payload.iss); | ||
const data = encodeData({ header, payload }); | ||
return ed25519.verify(publicKey, data, signature); | ||
} | ||
//# sourceMappingURL=api.js.map |
@@ -19,2 +19,5 @@ export interface IridiumJWTHeader { | ||
} | ||
export interface IridiumJWTDecoded extends IridiumJWTSigned { | ||
data: Uint8Array; | ||
} | ||
//# sourceMappingURL=types.d.ts.map |
@@ -1,2 +0,2 @@ | ||
import { IridiumJWTData, IridiumJWTSigned } from "./types"; | ||
import { IridiumJWTData, IridiumJWTDecoded, IridiumJWTSigned } from "./types"; | ||
export declare function decodeJSON(str: string): any; | ||
@@ -11,3 +11,3 @@ export declare function encodeJSON(val: any): string; | ||
export declare function encodeJWT(params: IridiumJWTSigned): string; | ||
export declare function decodeJWT(jwt: string): IridiumJWTSigned; | ||
export declare function decodeJWT(jwt: string): IridiumJWTDecoded; | ||
//# sourceMappingURL=utils.d.ts.map |
@@ -65,4 +65,5 @@ import { concat } from "uint8arrays/concat"; | ||
const signature = decodeSig(params[2]); | ||
return { header, payload, signature }; | ||
const data = fromString(params.slice(0, 2).join(JWT_DELIMITER), DATA_ENCODING); | ||
return { header, payload, signature, data }; | ||
} | ||
//# sourceMappingURL=utils.js.map |
@@ -1,2 +0,2 @@ | ||
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define("RelayAuth",[],t):"object"==typeof exports?exports.RelayAuth=t():e.RelayAuth=t()}(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,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)r.d(n,o,function(t){return e[t]}.bind(null,o));return n},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(r.s=16)}([function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(38),o=r(1);class i{constructor(e,t,r){this.name=e,this.prefix=t,this.baseEncode=r}encode(e){if(e instanceof Uint8Array)return`${this.prefix}${this.baseEncode(e)}`;throw Error("Unknown type, must be binary type")}}class a{constructor(e,t,r){this.name=e,this.prefix=t,this.baseDecode=r}decode(e){if("string"!=typeof e)throw Error("Can only multibase decode strings");switch(e[0]){case this.prefix:return this.baseDecode(e.slice(1));default:throw Error(`Unable to decode multibase string ${JSON.stringify(e)}, ${this.name} decoder only supports inputs prefixed with ${this.prefix}`)}}or(e){return u(this,e)}}class s{constructor(e){this.decoders=e}or(e){return u(this,e)}decode(e){const t=e[0],r=this.decoders[t];if(r)return r.decode(e);throw RangeError(`Unable to decode multibase string ${JSON.stringify(e)}, only inputs prefixed with ${Object.keys(this.decoders)} are supported`)}}const u=(e,t)=>new s({...e.decoders||{[e.prefix]:e},...t.decoders||{[t.prefix]:t}});class c{constructor(e,t,r,n){this.name=e,this.prefix=t,this.baseEncode=r,this.baseDecode=n,this.encoder=new i(e,t,r),this.decoder=new a(e,t,n)}encode(e){return this.encoder.encode(e)}decode(e){return this.decoder.decode(e)}}const f=({name:e,prefix:t,encode:r,decode:n})=>new c(e,t,r,n);t.Codec=c,t.baseX=({prefix:e,name:t,alphabet:r})=>{const{encode:i,decode:a}=n(r,t);return f({prefix:e,name:t,encode:i,decode:e=>o.coerce(a(e))})},t.from=f,t.or=u,t.rfc4648=({name:e,prefix:t,bitsPerChar:r,alphabet:n})=>f({prefix:t,name:e,encode:e=>((e,t,r)=>{const n="="===t[t.length-1],o=(1<<r)-1;let i="",a=0,s=0;for(let n=0;n<e.length;++n)for(s=s<<8|e[n],a+=8;a>r;)a-=r,i+=t[o&s>>a];if(a&&(i+=t[o&s<<r-a]),n)for(;i.length*r&7;)i+="=";return i})(e,n,r),decode:t=>((e,t,r,n)=>{const o={};for(let e=0;e<t.length;++e)o[t[e]]=e;let i=e.length;for(;"="===e[i-1];)--i;const a=new Uint8Array(i*r/8|0);let s=0,u=0,c=0;for(let t=0;t<i;++t){const i=o[e[t]];if(void 0===i)throw new SyntaxError(`Non-${n} character`);u=u<<r|i,s+=r,s>=8&&(s-=8,a[c++]=255&u>>s)}if(s>=r||255&u<<8-s)throw new SyntaxError("Unexpected end of data");return a})(t,n,r,e)})},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=new Uint8Array(0);t.coerce=e=>{if(e instanceof Uint8Array&&"Uint8Array"===e.constructor.name)return e;if(e instanceof ArrayBuffer)return new Uint8Array(e);if(ArrayBuffer.isView(e))return new Uint8Array(e.buffer,e.byteOffset,e.byteLength);throw new Error("Unknown type, must be binary type")},t.empty=n,t.equals=(e,t)=>{if(e===t)return!0;if(e.byteLength!==t.byteLength)return!1;for(let r=0;r<e.byteLength;r++)if(e[r]!==t[r])return!1;return!0},t.fromHex=e=>{const t=e.match(/../g);return t?new Uint8Array(t.map(e=>parseInt(e,16))):n},t.fromString=e=>(new TextEncoder).encode(e),t.isBinary=e=>e instanceof ArrayBuffer||ArrayBuffer.isView(e),t.toHex=e=>e.reduce((e,t)=>e+t.toString(16).padStart(2,"0"),""),t.toString=e=>(new TextDecoder).decode(e)},function(e,t,r){"use strict";r.r(t),r.d(t,"__extends",(function(){return o})),r.d(t,"__assign",(function(){return i})),r.d(t,"__rest",(function(){return a})),r.d(t,"__decorate",(function(){return s})),r.d(t,"__param",(function(){return u})),r.d(t,"__metadata",(function(){return c})),r.d(t,"__awaiter",(function(){return f})),r.d(t,"__generator",(function(){return d})),r.d(t,"__createBinding",(function(){return h})),r.d(t,"__exportStar",(function(){return l})),r.d(t,"__values",(function(){return b})),r.d(t,"__read",(function(){return p})),r.d(t,"__spread",(function(){return _})),r.d(t,"__spreadArrays",(function(){return y})),r.d(t,"__await",(function(){return E})),r.d(t,"__asyncGenerator",(function(){return v})),r.d(t,"__asyncDelegator",(function(){return w})),r.d(t,"__asyncValues",(function(){return g})),r.d(t,"__makeTemplateObject",(function(){return S})),r.d(t,"__importStar",(function(){return m})),r.d(t,"__importDefault",(function(){return I})),r.d(t,"__classPrivateFieldGet",(function(){return O})),r.d(t,"__classPrivateFieldSet",(function(){return D})); | ||
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define("RelayAuth",[],t):"object"==typeof exports?exports.RelayAuth=t():e.RelayAuth=t()}(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,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)r.d(n,o,function(t){return e[t]}.bind(null,o));return n},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(r.s=18)}([function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(40),o=r(1);class i{constructor(e,t,r){this.name=e,this.prefix=t,this.baseEncode=r}encode(e){if(e instanceof Uint8Array)return`${this.prefix}${this.baseEncode(e)}`;throw Error("Unknown type, must be binary type")}}class s{constructor(e,t,r){if(this.name=e,this.prefix=t,void 0===t.codePointAt(0))throw new Error("Invalid prefix character");this.prefixCodePoint=t.codePointAt(0),this.baseDecode=r}decode(e){if("string"==typeof e){if(e.codePointAt(0)!==this.prefixCodePoint)throw Error(`Unable to decode multibase string ${JSON.stringify(e)}, ${this.name} decoder only supports inputs prefixed with ${this.prefix}`);return this.baseDecode(e.slice(this.prefix.length))}throw Error("Can only multibase decode strings")}or(e){return c(this,e)}}class a{constructor(e){this.decoders=e}or(e){return c(this,e)}decode(e){const t=e[0],r=this.decoders[t];if(r)return r.decode(e);throw RangeError(`Unable to decode multibase string ${JSON.stringify(e)}, only inputs prefixed with ${Object.keys(this.decoders)} are supported`)}}const c=(e,t)=>new a({...e.decoders||{[e.prefix]:e},...t.decoders||{[t.prefix]:t}});class u{constructor(e,t,r,n){this.name=e,this.prefix=t,this.baseEncode=r,this.baseDecode=n,this.encoder=new i(e,t,r),this.decoder=new s(e,t,n)}encode(e){return this.encoder.encode(e)}decode(e){return this.decoder.decode(e)}}const f=({name:e,prefix:t,encode:r,decode:n})=>new u(e,t,r,n);t.Codec=u,t.baseX=({prefix:e,name:t,alphabet:r})=>{const{encode:i,decode:s}=n(r,t);return f({prefix:e,name:t,encode:i,decode:e=>o.coerce(s(e))})},t.from=f,t.or=c,t.rfc4648=({name:e,prefix:t,bitsPerChar:r,alphabet:n})=>f({prefix:t,name:e,encode:e=>((e,t,r)=>{const n="="===t[t.length-1],o=(1<<r)-1;let i="",s=0,a=0;for(let n=0;n<e.length;++n)for(a=a<<8|e[n],s+=8;s>r;)s-=r,i+=t[o&a>>s];if(s&&(i+=t[o&a<<r-s]),n)for(;i.length*r&7;)i+="=";return i})(e,n,r),decode:t=>((e,t,r,n)=>{const o={};for(let e=0;e<t.length;++e)o[t[e]]=e;let i=e.length;for(;"="===e[i-1];)--i;const s=new Uint8Array(i*r/8|0);let a=0,c=0,u=0;for(let t=0;t<i;++t){const i=o[e[t]];if(void 0===i)throw new SyntaxError(`Non-${n} character`);c=c<<r|i,a+=r,a>=8&&(a-=8,s[u++]=255&c>>a)}if(a>=r||255&c<<8-a)throw new SyntaxError("Unexpected end of data");return s})(t,n,r,e)})},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=new Uint8Array(0);t.coerce=e=>{if(e instanceof Uint8Array&&"Uint8Array"===e.constructor.name)return e;if(e instanceof ArrayBuffer)return new Uint8Array(e);if(ArrayBuffer.isView(e))return new Uint8Array(e.buffer,e.byteOffset,e.byteLength);throw new Error("Unknown type, must be binary type")},t.empty=n,t.equals=(e,t)=>{if(e===t)return!0;if(e.byteLength!==t.byteLength)return!1;for(let r=0;r<e.byteLength;r++)if(e[r]!==t[r])return!1;return!0},t.fromHex=e=>{const t=e.match(/../g);return t?new Uint8Array(t.map(e=>parseInt(e,16))):n},t.fromString=e=>(new TextEncoder).encode(e),t.isBinary=e=>e instanceof ArrayBuffer||ArrayBuffer.isView(e),t.toHex=e=>e.reduce((e,t)=>e+t.toString(16).padStart(2,"0"),""),t.toString=e=>(new TextDecoder).decode(e)},function(e,t,r){"use strict";r.r(t),r.d(t,"__extends",(function(){return o})),r.d(t,"__assign",(function(){return i})),r.d(t,"__rest",(function(){return s})),r.d(t,"__decorate",(function(){return a})),r.d(t,"__param",(function(){return c})),r.d(t,"__metadata",(function(){return u})),r.d(t,"__awaiter",(function(){return f})),r.d(t,"__generator",(function(){return d})),r.d(t,"__createBinding",(function(){return l})),r.d(t,"__exportStar",(function(){return h})),r.d(t,"__values",(function(){return b})),r.d(t,"__read",(function(){return _})),r.d(t,"__spread",(function(){return p})),r.d(t,"__spreadArrays",(function(){return y})),r.d(t,"__await",(function(){return E})),r.d(t,"__asyncGenerator",(function(){return w})),r.d(t,"__asyncDelegator",(function(){return v})),r.d(t,"__asyncValues",(function(){return g})),r.d(t,"__makeTemplateObject",(function(){return m})),r.d(t,"__importStar",(function(){return S})),r.d(t,"__importDefault",(function(){return I})),r.d(t,"__classPrivateFieldGet",(function(){return O})),r.d(t,"__classPrivateFieldSet",(function(){return D})); | ||
/*! ***************************************************************************** | ||
@@ -16,2 +16,2 @@ Copyright (c) Microsoft Corporation. | ||
***************************************************************************** */ | ||
var n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)};function o(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}var i=function(){return(i=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)};function a(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]])}return r}function s(e,t,r,n){var o,i=arguments.length,a=i<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,r,a):o(t,r))||a);return i>3&&a&&Object.defineProperty(t,r,a),a}function u(e,t){return function(r,n){t(r,n,e)}}function c(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}function f(e,t,r,n){return new(r||(r=Promise))((function(o,i){function a(e){try{u(n.next(e))}catch(e){i(e)}}function s(e){try{u(n.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}u((n=n.apply(e,t||[])).next())}))}function d(e,t){var r,n,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(r)throw new TypeError("Generator is already executing.");for(;a;)try{if(r=1,n&&(o=2&i[0]?n.return:i[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,i[1])).done)return o;switch(n=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,n=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],n=0}finally{r=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}}function h(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}function l(e,t){for(var r in e)"default"===r||t.hasOwnProperty(r)||(t[r]=e[r])}function b(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function p(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)a.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return a}function _(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(p(arguments[t]));return e}function y(){for(var e=0,t=0,r=arguments.length;t<r;t++)e+=arguments[t].length;var n=Array(e),o=0;for(t=0;t<r;t++)for(var i=arguments[t],a=0,s=i.length;a<s;a++,o++)n[o]=i[a];return n}function E(e){return this instanceof E?(this.v=e,this):new E(e)}function v(e,t,r){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var n,o=r.apply(e,t||[]),i=[];return n={},a("next"),a("throw"),a("return"),n[Symbol.asyncIterator]=function(){return this},n;function a(e){o[e]&&(n[e]=function(t){return new Promise((function(r,n){i.push([e,t,r,n])>1||s(e,t)}))})}function s(e,t){try{(r=o[e](t)).value instanceof E?Promise.resolve(r.value.v).then(u,c):f(i[0][2],r)}catch(e){f(i[0][3],e)}var r}function u(e){s("next",e)}function c(e){s("throw",e)}function f(e,t){e(t),i.shift(),i.length&&s(i[0][0],i[0][1])}}function w(e){var t,r;return t={},n("next"),n("throw",(function(e){throw e})),n("return"),t[Symbol.iterator]=function(){return this},t;function n(n,o){t[n]=e[n]?function(t){return(r=!r)?{value:E(e[n](t)),done:"return"===n}:o?o(t):t}:o}}function g(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,r=e[Symbol.asyncIterator];return r?r.call(e):(e=b(e),t={},n("next"),n("throw"),n("return"),t[Symbol.asyncIterator]=function(){return this},t);function n(r){t[r]=e[r]&&function(t){return new Promise((function(n,o){(function(e,t,r,n){Promise.resolve(n).then((function(t){e({value:t,done:r})}),t)})(n,o,(t=e[r](t)).done,t.value)}))}}}function S(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}function m(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}function I(e){return e&&e.__esModule?e:{default:e}}function O(e,t){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return t.get(e)}function D(e,t,r){if(!t.has(e))throw new TypeError("attempted to set private field on non-instance");return t.set(e,r),r}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(1),o=r(5);class i{constructor(e,t,r,n){this.code=e,this.size=t,this.digest=r,this.bytes=n}}t.Digest=i,t.create=(e,t)=>{const r=t.byteLength,n=o.encodingLength(e),a=n+o.encodingLength(r),s=new Uint8Array(a+r);return o.encodeTo(e,s,0),o.encodeTo(r,s,n),s.set(t,a),new i(e,r,t,s)},t.decode=e=>{const t=n.coerce(e),[r,a]=o.decode(t),[s,u]=o.decode(t.subarray(a)),c=t.subarray(a+u);if(c.byteLength!==s)throw new Error("Incorrect length");return new i(r,s,c,t)},t.equals=(e,t)=>e===t||e.code===t.code&&e.size===t.size&&n.equals(e.bytes,t.bytes)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.wipe=function(e){for(var t=0;t<e.length;t++)e[t]=0;return e}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(46);t.decode=e=>[n.decode(e),n.decode.bytes],t.encodeTo=(e,t,r=0)=>(n.encode(e,t,r),t),t.encodingLength=e=>n.encodingLength(e)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.KEY_PAIR_SEED_LENGTH=t.MULTICODEC_ED25519_LENGTH=t.MULTICODEC_ED25519_HEADER=t.MULTICODEC_ED25519_BASE=t.MULTICODEC_ED25519_ENCODING=t.DID_METHOD=t.DID_PREFIX=t.DID_DELIMITER=t.DATA_ENCODING=t.JSON_ENCODING=t.JWT_ENCODING=t.JWT_DELIMITER=t.JWT_IRIDIUM_TYP=t.JWT_IRIDIUM_ALG=void 0,t.JWT_IRIDIUM_ALG="EdDSA",t.JWT_IRIDIUM_TYP="JWT",t.JWT_DELIMITER=".",t.JWT_ENCODING="base64url",t.JSON_ENCODING="utf8",t.DATA_ENCODING="utf8",t.DID_DELIMITER=":",t.DID_PREFIX="did",t.DID_METHOD="key",t.MULTICODEC_ED25519_ENCODING="base58btc",t.MULTICODEC_ED25519_BASE="z",t.MULTICODEC_ED25519_HEADER="K36",t.MULTICODEC_ED25519_LENGTH=32,t.KEY_PAIR_SEED_LENGTH=32},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(3);class o{constructor(e,t,r){this.name=e,this.code=t,this.encode=r}digest(e){if(e instanceof Uint8Array){const t=this.encode(e);return t instanceof Uint8Array?n.create(this.code,t):t.then(e=>n.create(this.code,e))}throw Error("Unknown type, must be binary type")}}t.Hasher=o,t.from=({name:e,code:t,encode:r})=>new o(e,t,r)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(19),o=r(9),i=r(4);function a(e,r){return void 0===r&&(r=t.defaultRandomSource),r.randomBytes(e)}t.defaultRandomSource=new n.SystemRandomSource,t.randomBytes=a,t.randomUint32=function(e){void 0===e&&(e=t.defaultRandomSource);var r=a(4,e),n=o.readUint32LE(r);return i.wipe(r),n};var s="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";function u(e,r,n){if(void 0===r&&(r=s),void 0===n&&(n=t.defaultRandomSource),r.length<2)throw new Error("randomString charset is too short");if(r.length>256)throw new Error("randomString charset is too long");for(var o="",u=r.length,c=256-256%u;e>0;){for(var f=a(Math.ceil(256*e/c),n),d=0;d<f.length&&e>0;d++){var h=f[d];h<c&&(o+=r.charAt(h%u),e--)}i.wipe(f)}return o}t.randomString=u,t.randomStringForEntropy=function(e,r,n){return void 0===r&&(r=s),void 0===n&&(n=t.defaultRandomSource),u(Math.ceil(e/(Math.log(r.length)/Math.LN2)),r,n)}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(23);function o(e,t,r){return void 0===t&&(t=new Uint8Array(2)),void 0===r&&(r=0),t[r+0]=e>>>8,t[r+1]=e>>>0,t}function i(e,t,r){return void 0===t&&(t=new Uint8Array(2)),void 0===r&&(r=0),t[r+0]=e>>>0,t[r+1]=e>>>8,t}function a(e,t){return void 0===t&&(t=0),e[t]<<24|e[t+1]<<16|e[t+2]<<8|e[t+3]}function s(e,t){return void 0===t&&(t=0),(e[t]<<24|e[t+1]<<16|e[t+2]<<8|e[t+3])>>>0}function u(e,t){return void 0===t&&(t=0),e[t+3]<<24|e[t+2]<<16|e[t+1]<<8|e[t]}function c(e,t){return void 0===t&&(t=0),(e[t+3]<<24|e[t+2]<<16|e[t+1]<<8|e[t])>>>0}function f(e,t,r){return void 0===t&&(t=new Uint8Array(4)),void 0===r&&(r=0),t[r+0]=e>>>24,t[r+1]=e>>>16,t[r+2]=e>>>8,t[r+3]=e>>>0,t}function d(e,t,r){return void 0===t&&(t=new Uint8Array(4)),void 0===r&&(r=0),t[r+0]=e>>>0,t[r+1]=e>>>8,t[r+2]=e>>>16,t[r+3]=e>>>24,t}function h(e,t,r){return void 0===t&&(t=new Uint8Array(8)),void 0===r&&(r=0),f(e/4294967296>>>0,t,r),f(e>>>0,t,r+4),t}function l(e,t,r){return void 0===t&&(t=new Uint8Array(8)),void 0===r&&(r=0),d(e>>>0,t,r),d(e/4294967296>>>0,t,r+4),t}t.readInt16BE=function(e,t){return void 0===t&&(t=0),(e[t+0]<<8|e[t+1])<<16>>16},t.readUint16BE=function(e,t){return void 0===t&&(t=0),(e[t+0]<<8|e[t+1])>>>0},t.readInt16LE=function(e,t){return void 0===t&&(t=0),(e[t+1]<<8|e[t])<<16>>16},t.readUint16LE=function(e,t){return void 0===t&&(t=0),(e[t+1]<<8|e[t])>>>0},t.writeUint16BE=o,t.writeInt16BE=o,t.writeUint16LE=i,t.writeInt16LE=i,t.readInt32BE=a,t.readUint32BE=s,t.readInt32LE=u,t.readUint32LE=c,t.writeUint32BE=f,t.writeInt32BE=f,t.writeUint32LE=d,t.writeInt32LE=d,t.readInt64BE=function(e,t){void 0===t&&(t=0);var r=a(e,t),n=a(e,t+4);return 4294967296*r+n-4294967296*(n>>31)},t.readUint64BE=function(e,t){return void 0===t&&(t=0),4294967296*s(e,t)+s(e,t+4)},t.readInt64LE=function(e,t){void 0===t&&(t=0);var r=u(e,t);return 4294967296*u(e,t+4)+r-4294967296*(r>>31)},t.readUint64LE=function(e,t){void 0===t&&(t=0);var r=c(e,t);return 4294967296*c(e,t+4)+r},t.writeUint64BE=h,t.writeInt64BE=h,t.writeUint64LE=l,t.writeInt64LE=l,t.readUintBE=function(e,t,r){if(void 0===r&&(r=0),e%8!=0)throw new Error("readUintBE supports only bitLengths divisible by 8");if(e/8>t.length-r)throw new Error("readUintBE: array is too short for the given bitLength");for(var n=0,o=1,i=e/8+r-1;i>=r;i--)n+=t[i]*o,o*=256;return n},t.readUintLE=function(e,t,r){if(void 0===r&&(r=0),e%8!=0)throw new Error("readUintLE supports only bitLengths divisible by 8");if(e/8>t.length-r)throw new Error("readUintLE: array is too short for the given bitLength");for(var n=0,o=1,i=r;i<r+e/8;i++)n+=t[i]*o,o*=256;return n},t.writeUintBE=function(e,t,r,o){if(void 0===r&&(r=new Uint8Array(e/8)),void 0===o&&(o=0),e%8!=0)throw new Error("writeUintBE supports only bitLengths divisible by 8");if(!n.isSafeInteger(t))throw new Error("writeUintBE value must be an integer");for(var i=1,a=e/8+o-1;a>=o;a--)r[a]=t/i&255,i*=256;return r},t.writeUintLE=function(e,t,r,o){if(void 0===r&&(r=new Uint8Array(e/8)),void 0===o&&(o=0),e%8!=0)throw new Error("writeUintLE supports only bitLengths divisible by 8");if(!n.isSafeInteger(t))throw new Error("writeUintLE value must be an integer");for(var i=1,a=o;a<o+e/8;a++)r[a]=t/i&255,i*=256;return r},t.readFloat32BE=function(e,t){return void 0===t&&(t=0),new DataView(e.buffer,e.byteOffset,e.byteLength).getFloat32(t)},t.readFloat32LE=function(e,t){return void 0===t&&(t=0),new DataView(e.buffer,e.byteOffset,e.byteLength).getFloat32(t,!0)},t.readFloat64BE=function(e,t){return void 0===t&&(t=0),new DataView(e.buffer,e.byteOffset,e.byteLength).getFloat64(t)},t.readFloat64LE=function(e,t){return void 0===t&&(t=0),new DataView(e.buffer,e.byteOffset,e.byteLength).getFloat64(t,!0)},t.writeFloat32BE=function(e,t,r){return void 0===t&&(t=new Uint8Array(4)),void 0===r&&(r=0),new DataView(t.buffer,t.byteOffset,t.byteLength).setFloat32(r,e),t},t.writeFloat32LE=function(e,t,r){return void 0===t&&(t=new Uint8Array(4)),void 0===r&&(r=0),new DataView(t.buffer,t.byteOffset,t.byteLength).setFloat32(r,e,!0),t},t.writeFloat64BE=function(e,t,r){return void 0===t&&(t=new Uint8Array(8)),void 0===r&&(r=0),new DataView(t.buffer,t.byteOffset,t.byteLength).setFloat64(r,e),t},t.writeFloat64LE=function(e,t,r){return void 0===t&&(t=new Uint8Array(8)),void 0===r&&(r=0),new DataView(t.buffer,t.byteOffset,t.byteLength).setFloat64(r,e,!0),t}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(2);n.__exportStar(r(29),t),n.__exportStar(r(30),t)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.decodeJWT=t.encodeJWT=t.decodeData=t.encodeData=t.decodeSig=t.encodeSig=t.decodeIss=t.encodeIss=t.encodeJSON=t.decodeJSON=void 0;const n=r(34),o=r(35),i=r(51),a=r(52),s=r(6);function u(e){return a.safeJsonParse(o.toString(i.fromString(e,s.JWT_ENCODING),s.JSON_ENCODING))}function c(e){return o.toString(i.fromString(a.safeJsonStringify(e),s.JSON_ENCODING),s.JWT_ENCODING)}function f(e){return o.toString(e,s.JWT_ENCODING)}function d(e){return i.fromString(e,s.JWT_ENCODING)}t.decodeJSON=u,t.encodeJSON=c,t.encodeIss=function(e){const t=i.fromString(s.MULTICODEC_ED25519_HEADER,s.MULTICODEC_ED25519_ENCODING),r=s.MULTICODEC_ED25519_BASE+o.toString(n.concat([t,e]),s.MULTICODEC_ED25519_ENCODING);return[s.DID_PREFIX,s.DID_METHOD,r].join(s.DID_DELIMITER)},t.decodeIss=function(e){const[t,r,n]=e.split(s.DID_DELIMITER);if(t!==s.DID_PREFIX||r!==s.DID_METHOD)throw new Error('Issuer must be a DID with method "key"');if(n.slice(0,1)!==s.MULTICODEC_ED25519_BASE)throw new Error("Issuer must be a key in mulicodec format");const a=i.fromString(n.slice(1),s.MULTICODEC_ED25519_ENCODING);if(o.toString(a.slice(0,2),s.MULTICODEC_ED25519_ENCODING)!==s.MULTICODEC_ED25519_HEADER)throw new Error('Issuer must be a public key with type "Ed25519"');const u=a.slice(2);if(u.length!==s.MULTICODEC_ED25519_LENGTH)throw new Error("Issuer must be a public key with length 32 bytes");return u},t.encodeSig=f,t.decodeSig=d,t.encodeData=function(e){return i.fromString([c(e.header),c(e.payload)].join(s.JWT_DELIMITER),s.DATA_ENCODING)},t.decodeData=function(e){const t=o.toString(e,s.DATA_ENCODING).split(s.JWT_DELIMITER);return{header:u(t[0]),payload:u(t[1])}},t.encodeJWT=function(e){return[c(e.header),c(e.payload),f(e.signature)].join(s.JWT_DELIMITER)},t.decodeJWT=function(e){const t=e.split(s.JWT_DELIMITER);return{header:u(t[0]),payload:u(t[1]),signature:d(t[2])}}},function(e,t,r){"use strict";var n=r(36);function o(e,t,r,n){return{name:e,prefix:t,encoder:{name:e,prefix:t,encode:r},decoder:{decode:n}}}const i=o("utf8","u",e=>"u"+new TextDecoder("utf8").decode(e),e=>(new TextEncoder).encode(e.substring(1))),a=o("ascii","a",e=>{let t="a";for(let r=0;r<e.length;r++)t+=String.fromCharCode(e[r]);return t},e=>{e=e.substring(1);const t=new Uint8Array(e.length);for(let r=0;r<e.length;r++)t[r]=e.charCodeAt(r);return t}),s={utf8:i,"utf-8":i,hex:n.bases.base16,latin1:a,ascii:a,binary:a,...n.bases};e.exports=s},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(0);const o=n.rfc4648({prefix:"b",name:"base32",alphabet:"abcdefghijklmnopqrstuvwxyz234567",bitsPerChar:5}),i=n.rfc4648({prefix:"B",name:"base32upper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567",bitsPerChar:5}),a=n.rfc4648({prefix:"c",name:"base32pad",alphabet:"abcdefghijklmnopqrstuvwxyz234567=",bitsPerChar:5}),s=n.rfc4648({prefix:"C",name:"base32padupper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567=",bitsPerChar:5}),u=n.rfc4648({prefix:"v",name:"base32hex",alphabet:"0123456789abcdefghijklmnopqrstuv",bitsPerChar:5}),c=n.rfc4648({prefix:"V",name:"base32hexupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV",bitsPerChar:5}),f=n.rfc4648({prefix:"t",name:"base32hexpad",alphabet:"0123456789abcdefghijklmnopqrstuv=",bitsPerChar:5}),d=n.rfc4648({prefix:"T",name:"base32hexpadupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV=",bitsPerChar:5}),h=n.rfc4648({prefix:"h",name:"base32z",alphabet:"ybndrfg8ejkmcpqxot1uwisza345h769",bitsPerChar:5});t.base32=o,t.base32hex=u,t.base32hexpad=f,t.base32hexpadupper=d,t.base32hexupper=c,t.base32pad=a,t.base32padupper=s,t.base32upper=i,t.base32z=h},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(0);const o=n.baseX({name:"base58btc",prefix:"z",alphabet:"123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"}),i=n.baseX({name:"base58flickr",prefix:"Z",alphabet:"123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ"});t.base58btc=o,t.base58flickr=i},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(5),o=r(3),i=r(14),a=r(13),s=r(1);class u{constructor(e,t,r,n){this.code=t,this.version=e,this.multihash=r,this.bytes=n,this.byteOffset=n.byteOffset,this.byteLength=n.byteLength,this.asCID=this,this._baseCache=new Map,Object.defineProperties(this,{byteOffset:y,byteLength:y,code:_,version:_,multihash:_,bytes:_,_baseCache:y,asCID:y})}toV0(){switch(this.version){case 0:return this;default:{const{code:e,multihash:t}=this;if(e!==h)throw new Error("Cannot convert a non dag-pb CID to CIDv0");if(t.code!==l)throw new Error("Cannot convert non sha2-256 multihash CID to CIDv0");return u.createV0(t)}}}toV1(){switch(this.version){case 0:{const{code:e,digest:t}=this.multihash,r=o.create(e,t);return u.createV1(this.code,r)}case 1:return this;default:throw Error(`Can not convert CID version ${this.version} to version 0. This is a bug please report`)}}equals(e){return e&&this.code===e.code&&this.version===e.version&&o.equals(this.multihash,e.multihash)}toString(e){const{bytes:t,version:r,_baseCache:n}=this;switch(r){case 0:return f(t,n,e||i.base58btc.encoder);default:return d(t,n,e||a.base32.encoder)}}toJSON(){return{code:this.code,version:this.version,hash:this.multihash.bytes}}get[Symbol.toStringTag](){return"CID"}[Symbol.for("nodejs.util.inspect.custom")](){return"CID("+this.toString()+")"}static isCID(e){return E(/^0\.0/,v),!(!e||!e[p]&&e.asCID!==e)}get toBaseEncodedString(){throw new Error("Deprecated, use .toString()")}get codec(){throw new Error('"codec" property is deprecated, use integer "code" property instead')}get buffer(){throw new Error("Deprecated .buffer property, use .bytes to get Uint8Array instead")}get multibaseName(){throw new Error('"multibaseName" property is deprecated')}get prefix(){throw new Error('"prefix" property is deprecated')}static asCID(e){if(e instanceof u)return e;if(null!=e&&e.asCID===e){const{version:t,code:r,multihash:n,bytes:o}=e;return new u(t,r,n,o||b(t,r,n.bytes))}if(null!=e&&!0===e[p]){const{version:t,multihash:r,code:n}=e,i=o.decode(r);return u.create(t,n,i)}return null}static create(e,t,r){if("number"!=typeof t)throw new Error("String codecs are no longer supported");switch(e){case 0:if(t!==h)throw new Error(`Version 0 CID must use dag-pb (code: ${h}) block encoding`);return new u(e,t,r,r.bytes);case 1:{const n=b(e,t,r.bytes);return new u(e,t,r,n)}default:throw new Error("Invalid version")}}static createV0(e){return u.create(0,h,e)}static createV1(e,t){return u.create(1,e,t)}static decode(e){const[t,r]=u.decodeFirst(e);if(r.length)throw new Error("Incorrect length");return t}static decodeFirst(e){const t=u.inspectBytes(e),r=t.size-t.multihashSize,n=s.coerce(e.subarray(r,r+t.multihashSize));if(n.byteLength!==t.multihashSize)throw new Error("Incorrect length");const i=n.subarray(t.multihashSize-t.digestSize),a=new o.Digest(t.multihashCode,t.digestSize,i,n);return[0===t.version?u.createV0(a):u.createV1(t.codec,a),e.subarray(t.size)]}static inspectBytes(e){let t=0;const r=()=>{const[r,o]=n.decode(e.subarray(t));return t+=o,r};let o=r(),i=h;if(18===o?(o=0,t=0):1===o&&(i=r()),0!==o&&1!==o)throw new RangeError("Invalid CID version "+o);const a=t,s=r(),u=r(),c=t+u;return{version:o,codec:i,multihashCode:s,digestSize:u,multihashSize:c-a,size:c}}static parse(e,t){const[r,n]=c(e,t),o=u.decode(n);return o._baseCache.set(r,e),o}}const c=(e,t)=>{switch(e[0]){case"Q":{const r=t||i.base58btc;return[i.base58btc.prefix,r.decode(`${i.base58btc.prefix}${e}`)]}case i.base58btc.prefix:{const r=t||i.base58btc;return[i.base58btc.prefix,r.decode(e)]}case a.base32.prefix:{const r=t||a.base32;return[a.base32.prefix,r.decode(e)]}default:if(null==t)throw Error("To parse non base32 or base58btc encoded CID multibase decoder must be provided");return[e[0],t.decode(e)]}},f=(e,t,r)=>{const{prefix:n}=r;if(n!==i.base58btc.prefix)throw Error(`Cannot string encode V0 in ${r.name} encoding`);const o=t.get(n);if(null==o){const o=r.encode(e).slice(1);return t.set(n,o),o}return o},d=(e,t,r)=>{const{prefix:n}=r,o=t.get(n);if(null==o){const o=r.encode(e);return t.set(n,o),o}return o},h=112,l=18,b=(e,t,r)=>{const o=n.encodingLength(e),i=o+n.encodingLength(t),a=new Uint8Array(i+r.byteLength);return n.encodeTo(e,a,0),n.encodeTo(t,a,o),a.set(r,i),a},p=Symbol.for("@ipld/js-cid/CID"),_={writable:!1,configurable:!1,enumerable:!0},y={writable:!1,enumerable:!1,configurable:!1},E=(e,t)=>{if(!e.test("0.0.0-dev"))throw new Error(t);console.warn(t)},v="CID.isCID(v) is deprecated and will be removed in the next major release.\nFollowing code pattern:\n\nif (CID.isCID(value)) {\n doSomethingWithCID(value)\n}\n\nIs replaced with:\n\nconst cid = CID.asCID(value)\nif (cid) {\n // Make sure to use cid instead of value\n doSomethingWithCID(cid)\n}\n";t.CID=u},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(2);n.__exportStar(r(17),t),n.__exportStar(r(6),t),n.__exportStar(r(53),t),n.__exportStar(r(11),t)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.verifyJWT=t.signJWT=t.generateKeyPair=void 0;const n=r(2),o=n.__importStar(r(18)),i=r(8),a=r(25),s=r(6),u=r(11);t.generateKeyPair=function(e=i.randomBytes(s.KEY_PAIR_SEED_LENGTH)){return o.generateKeyPairFromSeed(e)},t.signJWT=function(e,t,r,i,c=a.fromMiliseconds(Date.now())){return n.__awaiter(this,void 0,void 0,(function*(){const n={alg:s.JWT_IRIDIUM_ALG,typ:s.JWT_IRIDIUM_TYP},a={iss:u.encodeIss(i.publicKey),sub:e,aud:t,iat:c,exp:c+r},f=u.encodeData({header:n,payload:a}),d=o.sign(i.secretKey,f);return u.encodeJWT({header:n,payload:a,signature:d})}))},t.verifyJWT=function(e){return n.__awaiter(this,void 0,void 0,(function*(){const{header:t,payload:r,signature:n}=u.decodeJWT(e);if(t.alg!==s.JWT_IRIDIUM_ALG||t.typ!==s.JWT_IRIDIUM_TYP)throw new Error("JWT must use EdDSA algorithm");const i=u.decodeIss(r.iss),a=u.encodeData({header:t,payload:r});return o.verify(i,a,n)}))}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(8),o=r(24),i=r(4);function a(e){var t=new Float64Array(16);if(e)for(var r=0;r<e.length;r++)t[r]=e[r];return t}t.SIGNATURE_LENGTH=64,t.PUBLIC_KEY_LENGTH=32,t.SECRET_KEY_LENGTH=64,t.SEED_LENGTH=32,new Uint8Array(32)[0]=9;var s=a(),u=a([1]),c=a([30883,4953,19914,30187,55467,16705,2637,112,59544,30585,16505,36039,65139,11119,27886,20995]),f=a([61785,9906,39828,60374,45398,33411,5274,224,53552,61171,33010,6542,64743,22239,55772,9222]),d=a([54554,36645,11616,51542,42930,38181,51040,26924,56412,64982,57905,49316,21502,52590,14035,8553]),h=a([26200,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214]),l=a([41136,18958,6951,50414,58488,44335,6150,12099,55207,15867,153,11085,57099,20417,9344,11139]);function b(e,t){for(var r=0;r<16;r++)e[r]=0|t[r]}function p(e){for(var t=1,r=0;r<16;r++){var n=e[r]+t+65535;t=Math.floor(n/65536),e[r]=n-65536*t}e[0]+=t-1+37*(t-1)}function _(e,t,r){for(var n=~(r-1),o=0;o<16;o++){var i=n&(e[o]^t[o]);e[o]^=i,t[o]^=i}}function y(e,t){for(var r=a(),n=a(),o=0;o<16;o++)n[o]=t[o];p(n),p(n),p(n);for(var i=0;i<2;i++){r[0]=n[0]-65517;for(o=1;o<15;o++)r[o]=n[o]-65535-(r[o-1]>>16&1),r[o-1]&=65535;r[15]=n[15]-32767-(r[14]>>16&1);var s=r[15]>>16&1;r[14]&=65535,_(n,r,1-s)}for(o=0;o<16;o++)e[2*o]=255&n[o],e[2*o+1]=n[o]>>8}function E(e,t){for(var r=0,n=0;n<32;n++)r|=e[n]^t[n];return(1&r-1>>>8)-1}function v(e,t){var r=new Uint8Array(32),n=new Uint8Array(32);return y(r,e),y(n,t),E(r,n)}function w(e){var t=new Uint8Array(32);return y(t,e),1&t[0]}function g(e,t,r){for(var n=0;n<16;n++)e[n]=t[n]+r[n]}function S(e,t,r){for(var n=0;n<16;n++)e[n]=t[n]-r[n]}function m(e,t,r){var n,o,i=0,a=0,s=0,u=0,c=0,f=0,d=0,h=0,l=0,b=0,p=0,_=0,y=0,E=0,v=0,w=0,g=0,S=0,m=0,I=0,O=0,D=0,T=0,M=0,N=0,U=0,A=0,L=0,C=0,x=0,P=0,H=r[0],R=r[1],j=r[2],B=r[3],W=r[4],G=r[5],J=r[6],F=r[7],Y=r[8],K=r[9],V=r[10],k=r[11],z=r[12],X=r[13],q=r[14],$=r[15];i+=(n=t[0])*H,a+=n*R,s+=n*j,u+=n*B,c+=n*W,f+=n*G,d+=n*J,h+=n*F,l+=n*Y,b+=n*K,p+=n*V,_+=n*k,y+=n*z,E+=n*X,v+=n*q,w+=n*$,a+=(n=t[1])*H,s+=n*R,u+=n*j,c+=n*B,f+=n*W,d+=n*G,h+=n*J,l+=n*F,b+=n*Y,p+=n*K,_+=n*V,y+=n*k,E+=n*z,v+=n*X,w+=n*q,g+=n*$,s+=(n=t[2])*H,u+=n*R,c+=n*j,f+=n*B,d+=n*W,h+=n*G,l+=n*J,b+=n*F,p+=n*Y,_+=n*K,y+=n*V,E+=n*k,v+=n*z,w+=n*X,g+=n*q,S+=n*$,u+=(n=t[3])*H,c+=n*R,f+=n*j,d+=n*B,h+=n*W,l+=n*G,b+=n*J,p+=n*F,_+=n*Y,y+=n*K,E+=n*V,v+=n*k,w+=n*z,g+=n*X,S+=n*q,m+=n*$,c+=(n=t[4])*H,f+=n*R,d+=n*j,h+=n*B,l+=n*W,b+=n*G,p+=n*J,_+=n*F,y+=n*Y,E+=n*K,v+=n*V,w+=n*k,g+=n*z,S+=n*X,m+=n*q,I+=n*$,f+=(n=t[5])*H,d+=n*R,h+=n*j,l+=n*B,b+=n*W,p+=n*G,_+=n*J,y+=n*F,E+=n*Y,v+=n*K,w+=n*V,g+=n*k,S+=n*z,m+=n*X,I+=n*q,O+=n*$,d+=(n=t[6])*H,h+=n*R,l+=n*j,b+=n*B,p+=n*W,_+=n*G,y+=n*J,E+=n*F,v+=n*Y,w+=n*K,g+=n*V,S+=n*k,m+=n*z,I+=n*X,O+=n*q,D+=n*$,h+=(n=t[7])*H,l+=n*R,b+=n*j,p+=n*B,_+=n*W,y+=n*G,E+=n*J,v+=n*F,w+=n*Y,g+=n*K,S+=n*V,m+=n*k,I+=n*z,O+=n*X,D+=n*q,T+=n*$,l+=(n=t[8])*H,b+=n*R,p+=n*j,_+=n*B,y+=n*W,E+=n*G,v+=n*J,w+=n*F,g+=n*Y,S+=n*K,m+=n*V,I+=n*k,O+=n*z,D+=n*X,T+=n*q,M+=n*$,b+=(n=t[9])*H,p+=n*R,_+=n*j,y+=n*B,E+=n*W,v+=n*G,w+=n*J,g+=n*F,S+=n*Y,m+=n*K,I+=n*V,O+=n*k,D+=n*z,T+=n*X,M+=n*q,N+=n*$,p+=(n=t[10])*H,_+=n*R,y+=n*j,E+=n*B,v+=n*W,w+=n*G,g+=n*J,S+=n*F,m+=n*Y,I+=n*K,O+=n*V,D+=n*k,T+=n*z,M+=n*X,N+=n*q,U+=n*$,_+=(n=t[11])*H,y+=n*R,E+=n*j,v+=n*B,w+=n*W,g+=n*G,S+=n*J,m+=n*F,I+=n*Y,O+=n*K,D+=n*V,T+=n*k,M+=n*z,N+=n*X,U+=n*q,A+=n*$,y+=(n=t[12])*H,E+=n*R,v+=n*j,w+=n*B,g+=n*W,S+=n*G,m+=n*J,I+=n*F,O+=n*Y,D+=n*K,T+=n*V,M+=n*k,N+=n*z,U+=n*X,A+=n*q,L+=n*$,E+=(n=t[13])*H,v+=n*R,w+=n*j,g+=n*B,S+=n*W,m+=n*G,I+=n*J,O+=n*F,D+=n*Y,T+=n*K,M+=n*V,N+=n*k,U+=n*z,A+=n*X,L+=n*q,C+=n*$,v+=(n=t[14])*H,w+=n*R,g+=n*j,S+=n*B,m+=n*W,I+=n*G,O+=n*J,D+=n*F,T+=n*Y,M+=n*K,N+=n*V,U+=n*k,A+=n*z,L+=n*X,C+=n*q,x+=n*$,w+=(n=t[15])*H,a+=38*(S+=n*j),s+=38*(m+=n*B),u+=38*(I+=n*W),c+=38*(O+=n*G),f+=38*(D+=n*J),d+=38*(T+=n*F),h+=38*(M+=n*Y),l+=38*(N+=n*K),b+=38*(U+=n*V),p+=38*(A+=n*k),_+=38*(L+=n*z),y+=38*(C+=n*X),E+=38*(x+=n*q),v+=38*(P+=n*$),i=(n=(i+=38*(g+=n*R))+(o=1)+65535)-65536*(o=Math.floor(n/65536)),a=(n=a+o+65535)-65536*(o=Math.floor(n/65536)),s=(n=s+o+65535)-65536*(o=Math.floor(n/65536)),u=(n=u+o+65535)-65536*(o=Math.floor(n/65536)),c=(n=c+o+65535)-65536*(o=Math.floor(n/65536)),f=(n=f+o+65535)-65536*(o=Math.floor(n/65536)),d=(n=d+o+65535)-65536*(o=Math.floor(n/65536)),h=(n=h+o+65535)-65536*(o=Math.floor(n/65536)),l=(n=l+o+65535)-65536*(o=Math.floor(n/65536)),b=(n=b+o+65535)-65536*(o=Math.floor(n/65536)),p=(n=p+o+65535)-65536*(o=Math.floor(n/65536)),_=(n=_+o+65535)-65536*(o=Math.floor(n/65536)),y=(n=y+o+65535)-65536*(o=Math.floor(n/65536)),E=(n=E+o+65535)-65536*(o=Math.floor(n/65536)),v=(n=v+o+65535)-65536*(o=Math.floor(n/65536)),w=(n=w+o+65535)-65536*(o=Math.floor(n/65536)),i=(n=(i+=o-1+37*(o-1))+(o=1)+65535)-65536*(o=Math.floor(n/65536)),a=(n=a+o+65535)-65536*(o=Math.floor(n/65536)),s=(n=s+o+65535)-65536*(o=Math.floor(n/65536)),u=(n=u+o+65535)-65536*(o=Math.floor(n/65536)),c=(n=c+o+65535)-65536*(o=Math.floor(n/65536)),f=(n=f+o+65535)-65536*(o=Math.floor(n/65536)),d=(n=d+o+65535)-65536*(o=Math.floor(n/65536)),h=(n=h+o+65535)-65536*(o=Math.floor(n/65536)),l=(n=l+o+65535)-65536*(o=Math.floor(n/65536)),b=(n=b+o+65535)-65536*(o=Math.floor(n/65536)),p=(n=p+o+65535)-65536*(o=Math.floor(n/65536)),_=(n=_+o+65535)-65536*(o=Math.floor(n/65536)),y=(n=y+o+65535)-65536*(o=Math.floor(n/65536)),E=(n=E+o+65535)-65536*(o=Math.floor(n/65536)),v=(n=v+o+65535)-65536*(o=Math.floor(n/65536)),w=(n=w+o+65535)-65536*(o=Math.floor(n/65536)),i+=o-1+37*(o-1),e[0]=i,e[1]=a,e[2]=s,e[3]=u,e[4]=c,e[5]=f,e[6]=d,e[7]=h,e[8]=l,e[9]=b,e[10]=p,e[11]=_,e[12]=y,e[13]=E,e[14]=v,e[15]=w}function I(e,t){m(e,t,t)}function O(e,t){var r,n=a();for(r=0;r<16;r++)n[r]=t[r];for(r=253;r>=0;r--)I(n,n),2!==r&&4!==r&&m(n,n,t);for(r=0;r<16;r++)e[r]=n[r]}function D(e,t){var r=a(),n=a(),o=a(),i=a(),s=a(),u=a(),c=a(),d=a(),h=a();S(r,e[1],e[0]),S(h,t[1],t[0]),m(r,r,h),g(n,e[0],e[1]),g(h,t[0],t[1]),m(n,n,h),m(o,e[3],t[3]),m(o,o,f),m(i,e[2],t[2]),g(i,i,i),S(s,n,r),S(u,i,o),g(c,i,o),g(d,n,r),m(e[0],s,u),m(e[1],d,c),m(e[2],c,u),m(e[3],s,d)}function T(e,t,r){for(var n=0;n<4;n++)_(e[n],t[n],r)}function M(e,t){var r=a(),n=a(),o=a();O(o,t[2]),m(r,t[0],o),m(n,t[1],o),y(e,n),e[31]^=w(r)<<7}function N(e,t,r){b(e[0],s),b(e[1],u),b(e[2],u),b(e[3],s);for(var n=255;n>=0;--n){var o=r[n/8|0]>>(7&n)&1;T(e,t,o),D(t,e),D(e,e),T(e,t,o)}}function U(e,t){var r=[a(),a(),a(),a()];b(r[0],d),b(r[1],h),b(r[2],u),m(r[3],d,h),N(e,r,t)}function A(e){if(e.length!==t.SEED_LENGTH)throw new Error("ed25519: seed must be "+t.SEED_LENGTH+" bytes");var r=o.hash(e);r[0]&=248,r[31]&=127,r[31]|=64;var n=new Uint8Array(32),i=[a(),a(),a(),a()];U(i,r),M(n,i);var s=new Uint8Array(64);return s.set(e),s.set(n,32),{publicKey:n,secretKey:s}}t.generateKeyPairFromSeed=A,t.generateKeyPair=function(e){var t=n.randomBytes(32,e),r=A(t);return i.wipe(t),r},t.extractPublicKeyFromSecretKey=function(e){if(e.length!==t.SECRET_KEY_LENGTH)throw new Error("ed25519: secret key must be "+t.SECRET_KEY_LENGTH+" bytes");return new Uint8Array(e.subarray(32))};var L=new Float64Array([237,211,245,92,26,99,18,88,214,156,247,162,222,249,222,20,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16]);function C(e,t){var r,n,o,i;for(n=63;n>=32;--n){for(r=0,o=n-32,i=n-12;o<i;++o)t[o]+=r-16*t[n]*L[o-(n-32)],r=Math.floor((t[o]+128)/256),t[o]-=256*r;t[o]+=r,t[n]=0}for(r=0,o=0;o<32;o++)t[o]+=r-(t[31]>>4)*L[o],r=t[o]>>8,t[o]&=255;for(o=0;o<32;o++)t[o]-=r*L[o];for(n=0;n<32;n++)t[n+1]+=t[n]>>8,e[n]=255&t[n]}function x(e){for(var t=new Float64Array(64),r=0;r<64;r++)t[r]=e[r];for(r=0;r<64;r++)e[r]=0;C(e,t)}function P(e,t){var r=a(),n=a(),o=a(),i=a(),f=a(),d=a(),h=a();return b(e[2],u),function(e,t){for(var r=0;r<16;r++)e[r]=t[2*r]+(t[2*r+1]<<8);e[15]&=32767}(e[1],t),I(o,e[1]),m(i,o,c),S(o,o,e[2]),g(i,e[2],i),I(f,i),I(d,f),m(h,d,f),m(r,h,o),m(r,r,i),function(e,t){var r,n=a();for(r=0;r<16;r++)n[r]=t[r];for(r=250;r>=0;r--)I(n,n),1!==r&&m(n,n,t);for(r=0;r<16;r++)e[r]=n[r]}(r,r),m(r,r,o),m(r,r,i),m(r,r,i),m(e[0],r,i),I(n,e[0]),m(n,n,i),v(n,o)&&m(e[0],e[0],l),I(n,e[0]),m(n,n,i),v(n,o)?-1:(w(e[0])===t[31]>>7&&S(e[0],s,e[0]),m(e[3],e[0],e[1]),0)}t.sign=function(e,t){var r=new Float64Array(64),n=[a(),a(),a(),a()],i=o.hash(e.subarray(0,32));i[0]&=248,i[31]&=127,i[31]|=64;var s=new Uint8Array(64);s.set(i.subarray(32),32);var u=new o.SHA512;u.update(s.subarray(32)),u.update(t);var c=u.digest();u.clean(),x(c),U(n,c),M(s,n),u.reset(),u.update(s.subarray(0,32)),u.update(e.subarray(32)),u.update(t);var f=u.digest();x(f);for(var d=0;d<32;d++)r[d]=c[d];for(d=0;d<32;d++)for(var h=0;h<32;h++)r[d+h]+=f[d]*i[h];return C(s.subarray(32),r),s},t.verify=function(e,r,n){var i=new Uint8Array(32),s=[a(),a(),a(),a()],u=[a(),a(),a(),a()];if(n.length!==t.SIGNATURE_LENGTH)throw new Error("ed25519: signature must be "+t.SIGNATURE_LENGTH+" bytes");if(P(u,e))return!1;var c=new o.SHA512;c.update(n.subarray(0,32)),c.update(e),c.update(r);var f=c.digest();return x(f),N(s,u,f),U(u,n.subarray(32)),D(s,u),M(i,s),!E(n,i)},t.convertPublicKeyToX25519=function(e){var t=[a(),a(),a(),a()];if(P(t,e))throw new Error("Ed25519: invalid public key");var r=a(),n=a(),o=t[1];g(r,u,o),S(n,u,o),O(n,n),m(r,r,n);var i=new Uint8Array(32);return y(i,r),i},t.convertSecretKeyToX25519=function(e){var t=o.hash(e.subarray(0,32));t[0]&=248,t[31]&=127,t[31]|=64;var r=new Uint8Array(t.subarray(0,32));return i.wipe(t),r}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(20),o=r(21),i=function(){function e(){return this.isAvailable=!1,this.name="",this._source=new n.BrowserRandomSource,this._source.isAvailable?(this.isAvailable=!0,void(this.name="Browser")):(this._source=new o.NodeRandomSource,this._source.isAvailable?(this.isAvailable=!0,void(this.name="Node")):void 0)}return e.prototype.randomBytes=function(e){if(!this.isAvailable)throw new Error("System random byte generator is not available.");return this._source.randomBytes(e)},e}();t.SystemRandomSource=i},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(){this.isAvailable=!1,this.isInstantiated=!1;var e="undefined"!=typeof self?self.crypto||self.msCrypto:null;e&&e.getRandomValues&&(this._crypto=e,this.isAvailable=!0,this.isInstantiated=!0)}return e.prototype.randomBytes=function(e){if(!this.isAvailable||!this._crypto)throw new Error("Browser random byte generator is not available.");for(var t=new Uint8Array(e),r=0;r<t.length;r+=65536)this._crypto.getRandomValues(t.subarray(r,r+Math.min(t.length-r,65536)));return t},e}();t.BrowserRandomSource=n},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(4),o=function(){function e(){this.isAvailable=!1,this.isInstantiated=!1;var e=r(22);e&&e.randomBytes&&(this._crypto=e,this.isAvailable=!0,this.isInstantiated=!0)}return e.prototype.randomBytes=function(e){if(!this.isAvailable||!this._crypto)throw new Error("Node.js random byte generator is not available.");var t=this._crypto.randomBytes(e);if(t.length!==e)throw new Error("NodeRandomSource: got fewer bytes than requested");for(var r=new Uint8Array(e),o=0;o<r.length;o++)r[o]=t[o];return n.wipe(t),r},e}();t.NodeRandomSource=o},function(e,t){},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.mul=Math.imul||function(e,t){var r=65535&e,n=65535&t;return r*n+((e>>>16&65535)*n+r*(t>>>16&65535)<<16>>>0)|0},t.add=function(e,t){return e+t|0},t.sub=function(e,t){return e-t|0},t.rotl=function(e,t){return e<<t|e>>>32-t},t.rotr=function(e,t){return e<<32-t|e>>>t},t.isInteger=Number.isInteger||function(e){return"number"==typeof e&&isFinite(e)&&Math.floor(e)===e},t.MAX_SAFE_INTEGER=9007199254740991,t.isSafeInteger=function(e){return t.isInteger(e)&&e>=-t.MAX_SAFE_INTEGER&&e<=t.MAX_SAFE_INTEGER}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(9),o=r(4);t.DIGEST_LENGTH=64,t.BLOCK_SIZE=128;var i=function(){function e(){this.digestLength=t.DIGEST_LENGTH,this.blockSize=t.BLOCK_SIZE,this._stateHi=new Int32Array(8),this._stateLo=new Int32Array(8),this._tempHi=new Int32Array(16),this._tempLo=new Int32Array(16),this._buffer=new Uint8Array(256),this._bufferLength=0,this._bytesHashed=0,this._finished=!1,this.reset()}return e.prototype._initState=function(){this._stateHi[0]=1779033703,this._stateHi[1]=3144134277,this._stateHi[2]=1013904242,this._stateHi[3]=2773480762,this._stateHi[4]=1359893119,this._stateHi[5]=2600822924,this._stateHi[6]=528734635,this._stateHi[7]=1541459225,this._stateLo[0]=4089235720,this._stateLo[1]=2227873595,this._stateLo[2]=4271175723,this._stateLo[3]=1595750129,this._stateLo[4]=2917565137,this._stateLo[5]=725511199,this._stateLo[6]=4215389547,this._stateLo[7]=327033209},e.prototype.reset=function(){return this._initState(),this._bufferLength=0,this._bytesHashed=0,this._finished=!1,this},e.prototype.clean=function(){o.wipe(this._buffer),o.wipe(this._tempHi),o.wipe(this._tempLo),this.reset()},e.prototype.update=function(e,r){if(void 0===r&&(r=e.length),this._finished)throw new Error("SHA512: can't update because hash was finished.");var n=0;if(this._bytesHashed+=r,this._bufferLength>0){for(;this._bufferLength<t.BLOCK_SIZE&&r>0;)this._buffer[this._bufferLength++]=e[n++],r--;this._bufferLength===this.blockSize&&(s(this._tempHi,this._tempLo,this._stateHi,this._stateLo,this._buffer,0,this.blockSize),this._bufferLength=0)}for(r>=this.blockSize&&(n=s(this._tempHi,this._tempLo,this._stateHi,this._stateLo,e,n,r),r%=this.blockSize);r>0;)this._buffer[this._bufferLength++]=e[n++],r--;return this},e.prototype.finish=function(e){if(!this._finished){var t=this._bytesHashed,r=this._bufferLength,o=t/536870912|0,i=t<<3,a=t%128<112?128:256;this._buffer[r]=128;for(var u=r+1;u<a-8;u++)this._buffer[u]=0;n.writeUint32BE(o,this._buffer,a-8),n.writeUint32BE(i,this._buffer,a-4),s(this._tempHi,this._tempLo,this._stateHi,this._stateLo,this._buffer,0,a),this._finished=!0}for(u=0;u<this.digestLength/8;u++)n.writeUint32BE(this._stateHi[u],e,8*u),n.writeUint32BE(this._stateLo[u],e,8*u+4);return this},e.prototype.digest=function(){var e=new Uint8Array(this.digestLength);return this.finish(e),e},e.prototype.saveState=function(){if(this._finished)throw new Error("SHA256: cannot save finished state");return{stateHi:new Int32Array(this._stateHi),stateLo:new Int32Array(this._stateLo),buffer:this._bufferLength>0?new Uint8Array(this._buffer):void 0,bufferLength:this._bufferLength,bytesHashed:this._bytesHashed}},e.prototype.restoreState=function(e){return this._stateHi.set(e.stateHi),this._stateLo.set(e.stateLo),this._bufferLength=e.bufferLength,e.buffer&&this._buffer.set(e.buffer),this._bytesHashed=e.bytesHashed,this._finished=!1,this},e.prototype.cleanSavedState=function(e){o.wipe(e.stateHi),o.wipe(e.stateLo),e.buffer&&o.wipe(e.buffer),e.bufferLength=0,e.bytesHashed=0},e}();t.SHA512=i;var a=new Int32Array([1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591]);function s(e,t,r,o,i,s,u){for(var c,f,d,h,l,b,p,_,y=r[0],E=r[1],v=r[2],w=r[3],g=r[4],S=r[5],m=r[6],I=r[7],O=o[0],D=o[1],T=o[2],M=o[3],N=o[4],U=o[5],A=o[6],L=o[7];u>=128;){for(var C=0;C<16;C++){var x=8*C+s;e[C]=n.readUint32BE(i,x),t[C]=n.readUint32BE(i,x+4)}for(C=0;C<80;C++){var P,H,R=y,j=E,B=v,W=w,G=g,J=S,F=m,Y=O,K=D,V=T,k=M,z=N,X=U,q=A;if(l=65535&(f=L),b=f>>>16,p=65535&(c=I),_=c>>>16,l+=65535&(f=(N>>>14|g<<18)^(N>>>18|g<<14)^(g>>>9|N<<23)),b+=f>>>16,p+=65535&(c=(g>>>14|N<<18)^(g>>>18|N<<14)^(N>>>9|g<<23)),_+=c>>>16,l+=65535&(f=N&U^~N&A),b+=f>>>16,p+=65535&(c=g&S^~g&m),_+=c>>>16,c=a[2*C],l+=65535&(f=a[2*C+1]),b+=f>>>16,p+=65535&c,_+=c>>>16,c=e[C%16],b+=(f=t[C%16])>>>16,p+=65535&c,_+=c>>>16,p+=(b+=(l+=65535&f)>>>16)>>>16,l=65535&(f=h=65535&l|b<<16),b=f>>>16,p=65535&(c=d=65535&p|(_+=p>>>16)<<16),_=c>>>16,l+=65535&(f=(O>>>28|y<<4)^(y>>>2|O<<30)^(y>>>7|O<<25)),b+=f>>>16,p+=65535&(c=(y>>>28|O<<4)^(O>>>2|y<<30)^(O>>>7|y<<25)),_+=c>>>16,b+=(f=O&D^O&T^D&T)>>>16,p+=65535&(c=y&E^y&v^E&v),_+=c>>>16,P=65535&(p+=(b+=(l+=65535&f)>>>16)>>>16)|(_+=p>>>16)<<16,H=65535&l|b<<16,l=65535&(f=k),b=f>>>16,p=65535&(c=W),_=c>>>16,b+=(f=h)>>>16,p+=65535&(c=d),_+=c>>>16,E=R,v=j,w=B,g=W=65535&(p+=(b+=(l+=65535&f)>>>16)>>>16)|(_+=p>>>16)<<16,S=G,m=J,I=F,y=P,D=Y,T=K,M=V,N=k=65535&l|b<<16,U=z,A=X,L=q,O=H,C%16==15)for(x=0;x<16;x++)c=e[x],l=65535&(f=t[x]),b=f>>>16,p=65535&c,_=c>>>16,c=e[(x+9)%16],l+=65535&(f=t[(x+9)%16]),b+=f>>>16,p+=65535&c,_+=c>>>16,d=e[(x+1)%16],l+=65535&(f=((h=t[(x+1)%16])>>>1|d<<31)^(h>>>8|d<<24)^(h>>>7|d<<25)),b+=f>>>16,p+=65535&(c=(d>>>1|h<<31)^(d>>>8|h<<24)^d>>>7),_+=c>>>16,d=e[(x+14)%16],b+=(f=((h=t[(x+14)%16])>>>19|d<<13)^(d>>>29|h<<3)^(h>>>6|d<<26))>>>16,p+=65535&(c=(d>>>19|h<<13)^(h>>>29|d<<3)^d>>>6),_+=c>>>16,_+=(p+=(b+=(l+=65535&f)>>>16)>>>16)>>>16,e[x]=65535&p|_<<16,t[x]=65535&l|b<<16}l=65535&(f=O),b=f>>>16,p=65535&(c=y),_=c>>>16,c=r[0],b+=(f=o[0])>>>16,p+=65535&c,_+=c>>>16,_+=(p+=(b+=(l+=65535&f)>>>16)>>>16)>>>16,r[0]=y=65535&p|_<<16,o[0]=O=65535&l|b<<16,l=65535&(f=D),b=f>>>16,p=65535&(c=E),_=c>>>16,c=r[1],b+=(f=o[1])>>>16,p+=65535&c,_+=c>>>16,_+=(p+=(b+=(l+=65535&f)>>>16)>>>16)>>>16,r[1]=E=65535&p|_<<16,o[1]=D=65535&l|b<<16,l=65535&(f=T),b=f>>>16,p=65535&(c=v),_=c>>>16,c=r[2],b+=(f=o[2])>>>16,p+=65535&c,_+=c>>>16,_+=(p+=(b+=(l+=65535&f)>>>16)>>>16)>>>16,r[2]=v=65535&p|_<<16,o[2]=T=65535&l|b<<16,l=65535&(f=M),b=f>>>16,p=65535&(c=w),_=c>>>16,c=r[3],b+=(f=o[3])>>>16,p+=65535&c,_+=c>>>16,_+=(p+=(b+=(l+=65535&f)>>>16)>>>16)>>>16,r[3]=w=65535&p|_<<16,o[3]=M=65535&l|b<<16,l=65535&(f=N),b=f>>>16,p=65535&(c=g),_=c>>>16,c=r[4],b+=(f=o[4])>>>16,p+=65535&c,_+=c>>>16,_+=(p+=(b+=(l+=65535&f)>>>16)>>>16)>>>16,r[4]=g=65535&p|_<<16,o[4]=N=65535&l|b<<16,l=65535&(f=U),b=f>>>16,p=65535&(c=S),_=c>>>16,c=r[5],b+=(f=o[5])>>>16,p+=65535&c,_+=c>>>16,_+=(p+=(b+=(l+=65535&f)>>>16)>>>16)>>>16,r[5]=S=65535&p|_<<16,o[5]=U=65535&l|b<<16,l=65535&(f=A),b=f>>>16,p=65535&(c=m),_=c>>>16,c=r[6],b+=(f=o[6])>>>16,p+=65535&c,_+=c>>>16,_+=(p+=(b+=(l+=65535&f)>>>16)>>>16)>>>16,r[6]=m=65535&p|_<<16,o[6]=A=65535&l|b<<16,l=65535&(f=L),b=f>>>16,p=65535&(c=I),_=c>>>16,c=r[7],b+=(f=o[7])>>>16,p+=65535&c,_+=c>>>16,_+=(p+=(b+=(l+=65535&f)>>>16)>>>16)>>>16,r[7]=I=65535&p|_<<16,o[7]=L=65535&l|b<<16,s+=128,u-=128}return s}t.hash=function(e){var t=new i;t.update(e);var r=t.digest();return t.clean(),r}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(2);n.__exportStar(r(26),t),n.__exportStar(r(31),t),n.__exportStar(r(32),t),n.__exportStar(r(10),t)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(2);n.__exportStar(r(27),t),n.__exportStar(r(28),t)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.delay=void 0,t.delay=function(e){return new Promise(t=>{setTimeout(()=>{t(!0)},e)})}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.fromMiliseconds=t.toMiliseconds=void 0;const n=r(10);t.toMiliseconds=function(e){return e*n.ONE_THOUSAND},t.fromMiliseconds=function(e){return Math.floor(e/n.ONE_THOUSAND)}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ONE_THOUSAND=t.ONE_HUNDRED=void 0,t.ONE_HUNDRED=100,t.ONE_THOUSAND=1e3},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ONE_YEAR=t.FOUR_WEEKS=t.THREE_WEEKS=t.TWO_WEEKS=t.ONE_WEEK=t.THIRTY_DAYS=t.SEVEN_DAYS=t.FIVE_DAYS=t.THREE_DAYS=t.ONE_DAY=t.TWENTY_FOUR_HOURS=t.TWELVE_HOURS=t.SIX_HOURS=t.THREE_HOURS=t.ONE_HOUR=t.SIXTY_MINUTES=t.THIRTY_MINUTES=t.TEN_MINUTES=t.FIVE_MINUTES=t.ONE_MINUTE=t.SIXTY_SECONDS=t.THIRTY_SECONDS=t.TEN_SECONDS=t.FIVE_SECONDS=t.ONE_SECOND=void 0,t.ONE_SECOND=1,t.FIVE_SECONDS=5,t.TEN_SECONDS=10,t.THIRTY_SECONDS=30,t.SIXTY_SECONDS=60,t.ONE_MINUTE=t.SIXTY_SECONDS,t.FIVE_MINUTES=5*t.ONE_MINUTE,t.TEN_MINUTES=10*t.ONE_MINUTE,t.THIRTY_MINUTES=30*t.ONE_MINUTE,t.SIXTY_MINUTES=60*t.ONE_MINUTE,t.ONE_HOUR=t.SIXTY_MINUTES,t.THREE_HOURS=3*t.ONE_HOUR,t.SIX_HOURS=6*t.ONE_HOUR,t.TWELVE_HOURS=12*t.ONE_HOUR,t.TWENTY_FOUR_HOURS=24*t.ONE_HOUR,t.ONE_DAY=t.TWENTY_FOUR_HOURS,t.THREE_DAYS=3*t.ONE_DAY,t.FIVE_DAYS=5*t.ONE_DAY,t.SEVEN_DAYS=7*t.ONE_DAY,t.THIRTY_DAYS=30*t.ONE_DAY,t.ONE_WEEK=t.SEVEN_DAYS,t.TWO_WEEKS=2*t.ONE_WEEK,t.THREE_WEEKS=3*t.ONE_WEEK,t.FOUR_WEEKS=4*t.ONE_WEEK,t.ONE_YEAR=365*t.ONE_DAY},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Watch=void 0;class n{constructor(){this.timestamps=new Map}start(e){if(this.timestamps.has(e))throw new Error("Watch already started for label: "+e);this.timestamps.set(e,{started:Date.now()})}stop(e){const t=this.get(e);if(void 0!==t.elapsed)throw new Error("Watch already stopped for label: "+e);const r=Date.now()-t.started;this.timestamps.set(e,{started:t.started,elapsed:r})}get(e){const t=this.timestamps.get(e);if(void 0===t)throw new Error("No timestamp found for label: "+e);return t}elapsed(e){const t=this.get(e);return t.elapsed||Date.now()-t.started}}t.Watch=n,t.default=n},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});r(2).__exportStar(r(33),t)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.IWatch=void 0;t.IWatch=class{}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.concat=function(e,t){t||(t=e.reduce((e,t)=>e+t.length,0));const r=new Uint8Array(t);let n=0;for(const t of e)r.set(t,n),n+=t.length;return r}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(12);t.toString=function(e,t="utf8"){const r=n[t];if(!r)throw new Error(`Unsupported encoding "${t}"`);return r.encoder.encode(e).substring(1)}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(37),o=r(39),i=r(40),a=r(41),s=r(42),u=r(13),c=r(43),f=r(14),d=r(44),h=r(45),l=r(47),b=r(48),p=r(49);r(50);var _=r(15),y=r(7),E=r(3),v=r(5),w=r(1);const g={...n,...o,...i,...a,...s,...u,...c,...f,...d},S={...h,...l},m={raw:b,json:p};t.CID=_.CID,t.hasher=y,t.digest=E,t.varint=v,t.bytes=w,t.bases=g,t.codecs=m,t.hashes=S},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(0),o=r(1);const i=n.from({prefix:"\0",name:"identity",encode:e=>o.toString(e),decode:e=>o.fromString(e)});t.identity=i},function(e,t,r){"use strict";var n=function(e,t){if(e.length>=255)throw new TypeError("Alphabet too long");for(var r=new Uint8Array(256),n=0;n<r.length;n++)r[n]=255;for(var o=0;o<e.length;o++){var i=e.charAt(o),a=i.charCodeAt(0);if(255!==r[a])throw new TypeError(i+" is ambiguous");r[a]=o}var s=e.length,u=e.charAt(0),c=Math.log(s)/Math.log(256),f=Math.log(256)/Math.log(s);function d(e){if("string"!=typeof e)throw new TypeError("Expected String");if(0===e.length)return new Uint8Array;var t=0;if(" "!==e[t]){for(var n=0,o=0;e[t]===u;)n++,t++;for(var i=(e.length-t)*c+1>>>0,a=new Uint8Array(i);e[t];){var f=r[e.charCodeAt(t)];if(255===f)return;for(var d=0,h=i-1;(0!==f||d<o)&&-1!==h;h--,d++)f+=s*a[h]>>>0,a[h]=f%256>>>0,f=f/256>>>0;if(0!==f)throw new Error("Non-zero carry");o=d,t++}if(" "!==e[t]){for(var l=i-o;l!==i&&0===a[l];)l++;for(var b=new Uint8Array(n+(i-l)),p=n;l!==i;)b[p++]=a[l++];return b}}}return{encode:function(t){if(t instanceof Uint8Array||(ArrayBuffer.isView(t)?t=new Uint8Array(t.buffer,t.byteOffset,t.byteLength):Array.isArray(t)&&(t=Uint8Array.from(t))),!(t instanceof Uint8Array))throw new TypeError("Expected Uint8Array");if(0===t.length)return"";for(var r=0,n=0,o=0,i=t.length;o!==i&&0===t[o];)o++,r++;for(var a=(i-o)*f+1>>>0,c=new Uint8Array(a);o!==i;){for(var d=t[o],h=0,l=a-1;(0!==d||h<n)&&-1!==l;l--,h++)d+=256*c[l]>>>0,c[l]=d%s>>>0,d=d/s>>>0;if(0!==d)throw new Error("Non-zero carry");n=h,o++}for(var b=a-n;b!==a&&0===c[b];)b++;for(var p=u.repeat(r);b<a;++b)p+=e.charAt(c[b]);return p},decodeUnsafe:d,decode:function(e){var r=d(e);if(r)return r;throw new Error(`Non-${t} character`)}}};e.exports=n},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(0).rfc4648({prefix:"0",name:"base2",alphabet:"01",bitsPerChar:1});t.base2=n},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(0).rfc4648({prefix:"7",name:"base8",alphabet:"01234567",bitsPerChar:3});t.base8=n},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(0).baseX({prefix:"9",name:"base10",alphabet:"0123456789"});t.base10=n},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(0);const o=n.rfc4648({prefix:"f",name:"base16",alphabet:"0123456789abcdef",bitsPerChar:4}),i=n.rfc4648({prefix:"F",name:"base16upper",alphabet:"0123456789ABCDEF",bitsPerChar:4});t.base16=o,t.base16upper=i},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(0);const o=n.baseX({prefix:"k",name:"base36",alphabet:"0123456789abcdefghijklmnopqrstuvwxyz"}),i=n.baseX({prefix:"K",name:"base36upper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"});t.base36=o,t.base36upper=i},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(0);const o=n.rfc4648({prefix:"m",name:"base64",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",bitsPerChar:6}),i=n.rfc4648({prefix:"M",name:"base64pad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",bitsPerChar:6}),a=n.rfc4648({prefix:"u",name:"base64url",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_",bitsPerChar:6}),s=n.rfc4648({prefix:"U",name:"base64urlpad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_=",bitsPerChar:6});t.base64=o,t.base64pad=i,t.base64url=a,t.base64urlpad=s},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(7);const o=e=>async t=>new Uint8Array(await crypto.subtle.digest(e,t)),i=n.from({name:"sha2-256",code:18,encode:o("SHA-256")}),a=n.from({name:"sha2-512",code:19,encode:o("SHA-512")});t.sha256=i,t.sha512=a},function(e,t,r){"use strict";var n=function e(t,r,n){r=r||[];var i=n=n||0;for(;t>=o;)r[n++]=255&t|128,t/=128;for(;-128&t;)r[n++]=255&t|128,t>>>=7;return r[n]=0|t,e.bytes=n-i+1,r},o=Math.pow(2,31);var i=function e(t,r){var n,o=0,i=0,a=r=r||0,s=t.length;do{if(a>=s)throw e.bytes=0,new RangeError("Could not decode varint");n=t[a++],o+=i<28?(127&n)<<i:(127&n)*Math.pow(2,i),i+=7}while(n>=128);return e.bytes=a-r,o};var a=Math.pow(2,7),s=Math.pow(2,14),u=Math.pow(2,21),c=Math.pow(2,28),f=Math.pow(2,35),d=Math.pow(2,42),h=Math.pow(2,49),l=Math.pow(2,56),b=Math.pow(2,63),p={encode:n,decode:i,encodingLength:function(e){return e<a?1:e<s?2:e<u?3:e<c?4:e<f?5:e<d?6:e<h?7:e<l?8:e<b?9:10}};e.exports=p},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(1),o=r(3);const i=n.coerce,a={code:0,name:"identity",encode:i,digest:e=>o.create(0,i(e))};t.identity=a},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(1);t.code=85,t.decode=e=>n.coerce(e),t.encode=e=>n.coerce(e),t.name="raw"},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=new TextEncoder,o=new TextDecoder;t.code=512,t.decode=e=>JSON.parse(o.decode(e)),t.encode=e=>n.encode(JSON.stringify(e)),t.name="json"},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(15),o=r(5),i=r(1),a=r(7),s=r(3);t.CID=n.CID,t.varint=o,t.bytes=i,t.hasher=a,t.digest=s},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(12);t.fromString=function(e,t="utf8"){const r=n[t];if(!r)throw new Error(`Unsupported encoding "${t}"`);return r.decoder.decode(`${r.prefix}${e}`)}},function(e,t,r){"use strict";function n(e){if("string"!=typeof e)throw new Error("Cannot safe json parse value of type "+typeof e);try{return JSON.parse(e)}catch(t){return e}}function o(e){return"string"==typeof e?e:JSON.stringify(e)}r.r(t),r.d(t,"safeJsonParse",(function(){return n})),r.d(t,"safeJsonStringify",(function(){return o}))},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0})}])})); | ||
var n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)};function o(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}var i=function(){return(i=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)};function s(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]])}return r}function a(e,t,r,n){var o,i=arguments.length,s=i<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(i<3?o(s):i>3?o(t,r,s):o(t,r))||s);return i>3&&s&&Object.defineProperty(t,r,s),s}function c(e,t){return function(r,n){t(r,n,e)}}function u(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}function f(e,t,r,n){return new(r||(r=Promise))((function(o,i){function s(e){try{c(n.next(e))}catch(e){i(e)}}function a(e){try{c(n.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}c((n=n.apply(e,t||[])).next())}))}function d(e,t){var r,n,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function a(i){return function(a){return function(i){if(r)throw new TypeError("Generator is already executing.");for(;s;)try{if(r=1,n&&(o=2&i[0]?n.return:i[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,i[1])).done)return o;switch(n=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,n=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!(o=s.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){s.label=i[1];break}if(6===i[0]&&s.label<o[1]){s.label=o[1],o=i;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(i);break}o[2]&&s.ops.pop(),s.trys.pop();continue}i=t.call(e,s)}catch(e){i=[6,e],n=0}finally{r=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,a])}}}function l(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}function h(e,t){for(var r in e)"default"===r||t.hasOwnProperty(r)||(t[r]=e[r])}function b(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function _(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)s.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return s}function p(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(_(arguments[t]));return e}function y(){for(var e=0,t=0,r=arguments.length;t<r;t++)e+=arguments[t].length;var n=Array(e),o=0;for(t=0;t<r;t++)for(var i=arguments[t],s=0,a=i.length;s<a;s++,o++)n[o]=i[s];return n}function E(e){return this instanceof E?(this.v=e,this):new E(e)}function w(e,t,r){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var n,o=r.apply(e,t||[]),i=[];return n={},s("next"),s("throw"),s("return"),n[Symbol.asyncIterator]=function(){return this},n;function s(e){o[e]&&(n[e]=function(t){return new Promise((function(r,n){i.push([e,t,r,n])>1||a(e,t)}))})}function a(e,t){try{(r=o[e](t)).value instanceof E?Promise.resolve(r.value.v).then(c,u):f(i[0][2],r)}catch(e){f(i[0][3],e)}var r}function c(e){a("next",e)}function u(e){a("throw",e)}function f(e,t){e(t),i.shift(),i.length&&a(i[0][0],i[0][1])}}function v(e){var t,r;return t={},n("next"),n("throw",(function(e){throw e})),n("return"),t[Symbol.iterator]=function(){return this},t;function n(n,o){t[n]=e[n]?function(t){return(r=!r)?{value:E(e[n](t)),done:"return"===n}:o?o(t):t}:o}}function g(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,r=e[Symbol.asyncIterator];return r?r.call(e):(e=b(e),t={},n("next"),n("throw"),n("return"),t[Symbol.asyncIterator]=function(){return this},t);function n(r){t[r]=e[r]&&function(t){return new Promise((function(n,o){(function(e,t,r,n){Promise.resolve(n).then((function(t){e({value:t,done:r})}),t)})(n,o,(t=e[r](t)).done,t.value)}))}}}function m(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}function S(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}function I(e){return e&&e.__esModule?e:{default:e}}function O(e,t){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return t.get(e)}function D(e,t,r){if(!t.has(e))throw new TypeError("attempted to set private field on non-instance");return t.set(e,r),r}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(1),o=r(5);class i{constructor(e,t,r,n){this.code=e,this.size=t,this.digest=r,this.bytes=n}}t.Digest=i,t.create=(e,t)=>{const r=t.byteLength,n=o.encodingLength(e),s=n+o.encodingLength(r),a=new Uint8Array(s+r);return o.encodeTo(e,a,0),o.encodeTo(r,a,n),a.set(t,s),new i(e,r,t,a)},t.decode=e=>{const t=n.coerce(e),[r,s]=o.decode(t),[a,c]=o.decode(t.subarray(s)),u=t.subarray(s+c);if(u.byteLength!==a)throw new Error("Incorrect length");return new i(r,a,u,t)},t.equals=(e,t)=>e===t||e.code===t.code&&e.size===t.size&&n.equals(e.bytes,t.bytes)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.wipe=function(e){for(var t=0;t<e.length;t++)e[t]=0;return e}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(49);t.decode=(e,t=0)=>[n.decode(e,t),n.decode.bytes],t.encodeTo=(e,t,r=0)=>(n.encode(e,t,r),t),t.encodingLength=e=>n.encodingLength(e)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.KEY_PAIR_SEED_LENGTH=t.MULTICODEC_ED25519_LENGTH=t.MULTICODEC_ED25519_HEADER=t.MULTICODEC_ED25519_BASE=t.MULTICODEC_ED25519_ENCODING=t.DID_METHOD=t.DID_PREFIX=t.DID_DELIMITER=t.DATA_ENCODING=t.JSON_ENCODING=t.JWT_ENCODING=t.JWT_DELIMITER=t.JWT_IRIDIUM_TYP=t.JWT_IRIDIUM_ALG=void 0,t.JWT_IRIDIUM_ALG="EdDSA",t.JWT_IRIDIUM_TYP="JWT",t.JWT_DELIMITER=".",t.JWT_ENCODING="base64url",t.JSON_ENCODING="utf8",t.DATA_ENCODING="utf8",t.DID_DELIMITER=":",t.DID_PREFIX="did",t.DID_METHOD="key",t.MULTICODEC_ED25519_ENCODING="base58btc",t.MULTICODEC_ED25519_BASE="z",t.MULTICODEC_ED25519_HEADER="K36",t.MULTICODEC_ED25519_LENGTH=32,t.KEY_PAIR_SEED_LENGTH=32},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.asUint8Array=function(e){return null!=globalThis.Buffer?new Uint8Array(e.buffer,e.byteOffset,e.byteLength):e}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(3);class o{constructor(e,t,r){this.name=e,this.code=t,this.encode=r}digest(e){if(e instanceof Uint8Array){const t=this.encode(e);return t instanceof Uint8Array?n.create(this.code,t):t.then(e=>n.create(this.code,e))}throw Error("Unknown type, must be binary type")}}t.Hasher=o,t.from=({name:e,code:t,encode:r})=>new o(e,t,r)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.randomStringForEntropy=t.randomString=t.randomUint32=t.randomBytes=t.defaultRandomSource=void 0;const n=r(21),o=r(10),i=r(4);function s(e,r=t.defaultRandomSource){return r.randomBytes(e)}t.defaultRandomSource=new n.SystemRandomSource,t.randomBytes=s,t.randomUint32=function(e=t.defaultRandomSource){const r=s(4,e),n=(0,o.readUint32LE)(r);return(0,i.wipe)(r),n};const a="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";function c(e,r=a,n=t.defaultRandomSource){if(r.length<2)throw new Error("randomString charset is too short");if(r.length>256)throw new Error("randomString charset is too long");let o="";const c=r.length,u=256-256%c;for(;e>0;){const t=s(Math.ceil(256*e/u),n);for(let n=0;n<t.length&&e>0;n++){const i=t[n];i<u&&(o+=r.charAt(i%c),e--)}(0,i.wipe)(t)}return o}t.randomString=c,t.randomStringForEntropy=function(e,r=a,n=t.defaultRandomSource){return c(Math.ceil(e/(Math.log(r.length)/Math.LN2)),r,n)}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(25);function o(e,t,r){return void 0===t&&(t=new Uint8Array(2)),void 0===r&&(r=0),t[r+0]=e>>>8,t[r+1]=e>>>0,t}function i(e,t,r){return void 0===t&&(t=new Uint8Array(2)),void 0===r&&(r=0),t[r+0]=e>>>0,t[r+1]=e>>>8,t}function s(e,t){return void 0===t&&(t=0),e[t]<<24|e[t+1]<<16|e[t+2]<<8|e[t+3]}function a(e,t){return void 0===t&&(t=0),(e[t]<<24|e[t+1]<<16|e[t+2]<<8|e[t+3])>>>0}function c(e,t){return void 0===t&&(t=0),e[t+3]<<24|e[t+2]<<16|e[t+1]<<8|e[t]}function u(e,t){return void 0===t&&(t=0),(e[t+3]<<24|e[t+2]<<16|e[t+1]<<8|e[t])>>>0}function f(e,t,r){return void 0===t&&(t=new Uint8Array(4)),void 0===r&&(r=0),t[r+0]=e>>>24,t[r+1]=e>>>16,t[r+2]=e>>>8,t[r+3]=e>>>0,t}function d(e,t,r){return void 0===t&&(t=new Uint8Array(4)),void 0===r&&(r=0),t[r+0]=e>>>0,t[r+1]=e>>>8,t[r+2]=e>>>16,t[r+3]=e>>>24,t}function l(e,t,r){return void 0===t&&(t=new Uint8Array(8)),void 0===r&&(r=0),f(e/4294967296>>>0,t,r),f(e>>>0,t,r+4),t}function h(e,t,r){return void 0===t&&(t=new Uint8Array(8)),void 0===r&&(r=0),d(e>>>0,t,r),d(e/4294967296>>>0,t,r+4),t}t.readInt16BE=function(e,t){return void 0===t&&(t=0),(e[t+0]<<8|e[t+1])<<16>>16},t.readUint16BE=function(e,t){return void 0===t&&(t=0),(e[t+0]<<8|e[t+1])>>>0},t.readInt16LE=function(e,t){return void 0===t&&(t=0),(e[t+1]<<8|e[t])<<16>>16},t.readUint16LE=function(e,t){return void 0===t&&(t=0),(e[t+1]<<8|e[t])>>>0},t.writeUint16BE=o,t.writeInt16BE=o,t.writeUint16LE=i,t.writeInt16LE=i,t.readInt32BE=s,t.readUint32BE=a,t.readInt32LE=c,t.readUint32LE=u,t.writeUint32BE=f,t.writeInt32BE=f,t.writeUint32LE=d,t.writeInt32LE=d,t.readInt64BE=function(e,t){void 0===t&&(t=0);var r=s(e,t),n=s(e,t+4);return 4294967296*r+n-4294967296*(n>>31)},t.readUint64BE=function(e,t){return void 0===t&&(t=0),4294967296*a(e,t)+a(e,t+4)},t.readInt64LE=function(e,t){void 0===t&&(t=0);var r=c(e,t);return 4294967296*c(e,t+4)+r-4294967296*(r>>31)},t.readUint64LE=function(e,t){void 0===t&&(t=0);var r=u(e,t);return 4294967296*u(e,t+4)+r},t.writeUint64BE=l,t.writeInt64BE=l,t.writeUint64LE=h,t.writeInt64LE=h,t.readUintBE=function(e,t,r){if(void 0===r&&(r=0),e%8!=0)throw new Error("readUintBE supports only bitLengths divisible by 8");if(e/8>t.length-r)throw new Error("readUintBE: array is too short for the given bitLength");for(var n=0,o=1,i=e/8+r-1;i>=r;i--)n+=t[i]*o,o*=256;return n},t.readUintLE=function(e,t,r){if(void 0===r&&(r=0),e%8!=0)throw new Error("readUintLE supports only bitLengths divisible by 8");if(e/8>t.length-r)throw new Error("readUintLE: array is too short for the given bitLength");for(var n=0,o=1,i=r;i<r+e/8;i++)n+=t[i]*o,o*=256;return n},t.writeUintBE=function(e,t,r,o){if(void 0===r&&(r=new Uint8Array(e/8)),void 0===o&&(o=0),e%8!=0)throw new Error("writeUintBE supports only bitLengths divisible by 8");if(!n.isSafeInteger(t))throw new Error("writeUintBE value must be an integer");for(var i=1,s=e/8+o-1;s>=o;s--)r[s]=t/i&255,i*=256;return r},t.writeUintLE=function(e,t,r,o){if(void 0===r&&(r=new Uint8Array(e/8)),void 0===o&&(o=0),e%8!=0)throw new Error("writeUintLE supports only bitLengths divisible by 8");if(!n.isSafeInteger(t))throw new Error("writeUintLE value must be an integer");for(var i=1,s=o;s<o+e/8;s++)r[s]=t/i&255,i*=256;return r},t.readFloat32BE=function(e,t){return void 0===t&&(t=0),new DataView(e.buffer,e.byteOffset,e.byteLength).getFloat32(t)},t.readFloat32LE=function(e,t){return void 0===t&&(t=0),new DataView(e.buffer,e.byteOffset,e.byteLength).getFloat32(t,!0)},t.readFloat64BE=function(e,t){return void 0===t&&(t=0),new DataView(e.buffer,e.byteOffset,e.byteLength).getFloat64(t)},t.readFloat64LE=function(e,t){return void 0===t&&(t=0),new DataView(e.buffer,e.byteOffset,e.byteLength).getFloat64(t,!0)},t.writeFloat32BE=function(e,t,r){return void 0===t&&(t=new Uint8Array(4)),void 0===r&&(r=0),new DataView(t.buffer,t.byteOffset,t.byteLength).setFloat32(r,e),t},t.writeFloat32LE=function(e,t,r){return void 0===t&&(t=new Uint8Array(4)),void 0===r&&(r=0),new DataView(t.buffer,t.byteOffset,t.byteLength).setFloat32(r,e,!0),t},t.writeFloat64BE=function(e,t,r){return void 0===t&&(t=new Uint8Array(8)),void 0===r&&(r=0),new DataView(t.buffer,t.byteOffset,t.byteLength).setFloat64(r,e),t},t.writeFloat64LE=function(e,t,r){return void 0===t&&(t=new Uint8Array(8)),void 0===r&&(r=0),new DataView(t.buffer,t.byteOffset,t.byteLength).setFloat64(r,e,!0),t}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(2);n.__exportStar(r(31),t),n.__exportStar(r(32),t)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.decodeJWT=t.encodeJWT=t.decodeData=t.encodeData=t.decodeSig=t.encodeSig=t.decodeIss=t.encodeIss=t.encodeJSON=t.decodeJSON=void 0;const n=r(36),o=r(37),i=r(54),s=r(55),a=r(6);function c(e){return s.safeJsonParse(o.toString(i.fromString(e,a.JWT_ENCODING),a.JSON_ENCODING))}function u(e){return o.toString(i.fromString(s.safeJsonStringify(e),a.JSON_ENCODING),a.JWT_ENCODING)}function f(e){return o.toString(e,a.JWT_ENCODING)}function d(e){return i.fromString(e,a.JWT_ENCODING)}t.decodeJSON=c,t.encodeJSON=u,t.encodeIss=function(e){const t=i.fromString(a.MULTICODEC_ED25519_HEADER,a.MULTICODEC_ED25519_ENCODING),r=a.MULTICODEC_ED25519_BASE+o.toString(n.concat([t,e]),a.MULTICODEC_ED25519_ENCODING);return[a.DID_PREFIX,a.DID_METHOD,r].join(a.DID_DELIMITER)},t.decodeIss=function(e){const[t,r,n]=e.split(a.DID_DELIMITER);if(t!==a.DID_PREFIX||r!==a.DID_METHOD)throw new Error('Issuer must be a DID with method "key"');if(n.slice(0,1)!==a.MULTICODEC_ED25519_BASE)throw new Error("Issuer must be a key in mulicodec format");const s=i.fromString(n.slice(1),a.MULTICODEC_ED25519_ENCODING);if(o.toString(s.slice(0,2),a.MULTICODEC_ED25519_ENCODING)!==a.MULTICODEC_ED25519_HEADER)throw new Error('Issuer must be a public key with type "Ed25519"');const c=s.slice(2);if(c.length!==a.MULTICODEC_ED25519_LENGTH)throw new Error("Issuer must be a public key with length 32 bytes");return c},t.encodeSig=f,t.decodeSig=d,t.encodeData=function(e){return i.fromString([u(e.header),u(e.payload)].join(a.JWT_DELIMITER),a.DATA_ENCODING)},t.decodeData=function(e){const t=o.toString(e,a.DATA_ENCODING).split(a.JWT_DELIMITER);return{header:c(t[0]),payload:c(t[1])}},t.encodeJWT=function(e){return[u(e.header),u(e.payload),f(e.signature)].join(a.JWT_DELIMITER)},t.decodeJWT=function(e){const t=e.split(a.JWT_DELIMITER);return{header:c(t[0]),payload:c(t[1]),signature:d(t[2]),data:i.fromString(t.slice(0,2).join(a.JWT_DELIMITER),a.DATA_ENCODING)}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(7);t.alloc=function(e=0){return null!=globalThis.Buffer&&null!=globalThis.Buffer.alloc?n.asUint8Array(globalThis.Buffer.alloc(e)):new Uint8Array(e)},t.allocUnsafe=function(e=0){return null!=globalThis.Buffer&&null!=globalThis.Buffer.allocUnsafe?n.asUint8Array(globalThis.Buffer.allocUnsafe(e)):new Uint8Array(e)}},function(e,t,r){"use strict";var n=r(38),o=r(13);function i(e,t,r,n){return{name:e,prefix:t,encoder:{name:e,prefix:t,encode:r},decoder:{decode:n}}}const s=i("utf8","u",e=>"u"+new TextDecoder("utf8").decode(e),e=>(new TextEncoder).encode(e.substring(1))),a=i("ascii","a",e=>{let t="a";for(let r=0;r<e.length;r++)t+=String.fromCharCode(e[r]);return t},e=>{e=e.substring(1);const t=o.allocUnsafe(e.length);for(let r=0;r<e.length;r++)t[r]=e.charCodeAt(r);return t}),c={utf8:s,"utf-8":s,hex:n.bases.base16,latin1:a,ascii:a,binary:a,...n.bases};e.exports=c},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(0);const o=n.rfc4648({prefix:"b",name:"base32",alphabet:"abcdefghijklmnopqrstuvwxyz234567",bitsPerChar:5}),i=n.rfc4648({prefix:"B",name:"base32upper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567",bitsPerChar:5}),s=n.rfc4648({prefix:"c",name:"base32pad",alphabet:"abcdefghijklmnopqrstuvwxyz234567=",bitsPerChar:5}),a=n.rfc4648({prefix:"C",name:"base32padupper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567=",bitsPerChar:5}),c=n.rfc4648({prefix:"v",name:"base32hex",alphabet:"0123456789abcdefghijklmnopqrstuv",bitsPerChar:5}),u=n.rfc4648({prefix:"V",name:"base32hexupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV",bitsPerChar:5}),f=n.rfc4648({prefix:"t",name:"base32hexpad",alphabet:"0123456789abcdefghijklmnopqrstuv=",bitsPerChar:5}),d=n.rfc4648({prefix:"T",name:"base32hexpadupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV=",bitsPerChar:5}),l=n.rfc4648({prefix:"h",name:"base32z",alphabet:"ybndrfg8ejkmcpqxot1uwisza345h769",bitsPerChar:5});t.base32=o,t.base32hex=c,t.base32hexpad=f,t.base32hexpadupper=d,t.base32hexupper=u,t.base32pad=s,t.base32padupper=a,t.base32upper=i,t.base32z=l},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(0);const o=n.baseX({name:"base58btc",prefix:"z",alphabet:"123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"}),i=n.baseX({name:"base58flickr",prefix:"Z",alphabet:"123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ"});t.base58btc=o,t.base58flickr=i},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(5),o=r(3),i=r(16),s=r(15),a=r(1);class c{constructor(e,t,r,n){this.code=t,this.version=e,this.multihash=r,this.bytes=n,this.byteOffset=n.byteOffset,this.byteLength=n.byteLength,this.asCID=this,this._baseCache=new Map,Object.defineProperties(this,{byteOffset:y,byteLength:y,code:p,version:p,multihash:p,bytes:p,_baseCache:y,asCID:y})}toV0(){switch(this.version){case 0:return this;default:{const{code:e,multihash:t}=this;if(e!==l)throw new Error("Cannot convert a non dag-pb CID to CIDv0");if(t.code!==h)throw new Error("Cannot convert non sha2-256 multihash CID to CIDv0");return c.createV0(t)}}}toV1(){switch(this.version){case 0:{const{code:e,digest:t}=this.multihash,r=o.create(e,t);return c.createV1(this.code,r)}case 1:return this;default:throw Error(`Can not convert CID version ${this.version} to version 0. This is a bug please report`)}}equals(e){return e&&this.code===e.code&&this.version===e.version&&o.equals(this.multihash,e.multihash)}toString(e){const{bytes:t,version:r,_baseCache:n}=this;switch(r){case 0:return f(t,n,e||i.base58btc.encoder);default:return d(t,n,e||s.base32.encoder)}}toJSON(){return{code:this.code,version:this.version,hash:this.multihash.bytes}}get[Symbol.toStringTag](){return"CID"}[Symbol.for("nodejs.util.inspect.custom")](){return"CID("+this.toString()+")"}static isCID(e){return E(/^0\.0/,w),!(!e||!e[_]&&e.asCID!==e)}get toBaseEncodedString(){throw new Error("Deprecated, use .toString()")}get codec(){throw new Error('"codec" property is deprecated, use integer "code" property instead')}get buffer(){throw new Error("Deprecated .buffer property, use .bytes to get Uint8Array instead")}get multibaseName(){throw new Error('"multibaseName" property is deprecated')}get prefix(){throw new Error('"prefix" property is deprecated')}static asCID(e){if(e instanceof c)return e;if(null!=e&&e.asCID===e){const{version:t,code:r,multihash:n,bytes:o}=e;return new c(t,r,n,o||b(t,r,n.bytes))}if(null!=e&&!0===e[_]){const{version:t,multihash:r,code:n}=e,i=o.decode(r);return c.create(t,n,i)}return null}static create(e,t,r){if("number"!=typeof t)throw new Error("String codecs are no longer supported");switch(e){case 0:if(t!==l)throw new Error(`Version 0 CID must use dag-pb (code: ${l}) block encoding`);return new c(e,t,r,r.bytes);case 1:{const n=b(e,t,r.bytes);return new c(e,t,r,n)}default:throw new Error("Invalid version")}}static createV0(e){return c.create(0,l,e)}static createV1(e,t){return c.create(1,e,t)}static decode(e){const[t,r]=c.decodeFirst(e);if(r.length)throw new Error("Incorrect length");return t}static decodeFirst(e){const t=c.inspectBytes(e),r=t.size-t.multihashSize,n=a.coerce(e.subarray(r,r+t.multihashSize));if(n.byteLength!==t.multihashSize)throw new Error("Incorrect length");const i=n.subarray(t.multihashSize-t.digestSize),s=new o.Digest(t.multihashCode,t.digestSize,i,n);return[0===t.version?c.createV0(s):c.createV1(t.codec,s),e.subarray(t.size)]}static inspectBytes(e){let t=0;const r=()=>{const[r,o]=n.decode(e.subarray(t));return t+=o,r};let o=r(),i=l;if(18===o?(o=0,t=0):1===o&&(i=r()),0!==o&&1!==o)throw new RangeError("Invalid CID version "+o);const s=t,a=r(),c=r(),u=t+c;return{version:o,codec:i,multihashCode:a,digestSize:c,multihashSize:u-s,size:u}}static parse(e,t){const[r,n]=u(e,t),o=c.decode(n);return o._baseCache.set(r,e),o}}const u=(e,t)=>{switch(e[0]){case"Q":{const r=t||i.base58btc;return[i.base58btc.prefix,r.decode(`${i.base58btc.prefix}${e}`)]}case i.base58btc.prefix:{const r=t||i.base58btc;return[i.base58btc.prefix,r.decode(e)]}case s.base32.prefix:{const r=t||s.base32;return[s.base32.prefix,r.decode(e)]}default:if(null==t)throw Error("To parse non base32 or base58btc encoded CID multibase decoder must be provided");return[e[0],t.decode(e)]}},f=(e,t,r)=>{const{prefix:n}=r;if(n!==i.base58btc.prefix)throw Error(`Cannot string encode V0 in ${r.name} encoding`);const o=t.get(n);if(null==o){const o=r.encode(e).slice(1);return t.set(n,o),o}return o},d=(e,t,r)=>{const{prefix:n}=r,o=t.get(n);if(null==o){const o=r.encode(e);return t.set(n,o),o}return o},l=112,h=18,b=(e,t,r)=>{const o=n.encodingLength(e),i=o+n.encodingLength(t),s=new Uint8Array(i+r.byteLength);return n.encodeTo(e,s,0),n.encodeTo(t,s,o),s.set(r,i),s},_=Symbol.for("@ipld/js-cid/CID"),p={writable:!1,configurable:!1,enumerable:!0},y={writable:!1,enumerable:!1,configurable:!1},E=(e,t)=>{if(!e.test("0.0.0-dev"))throw new Error(t);console.warn(t)},w="CID.isCID(v) is deprecated and will be removed in the next major release.\nFollowing code pattern:\n\nif (CID.isCID(value)) {\n doSomethingWithCID(value)\n}\n\nIs replaced with:\n\nconst cid = CID.asCID(value)\nif (cid) {\n // Make sure to use cid instead of value\n doSomethingWithCID(cid)\n}\n";t.CID=c},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(2);n.__exportStar(r(19),t),n.__exportStar(r(6),t),n.__exportStar(r(56),t),n.__exportStar(r(12),t)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.verifyJWT=t.signJWT=t.generateKeyPair=void 0;const n=r(2),o=n.__importStar(r(20)),i=r(9),s=r(27),a=r(6),c=r(12);t.generateKeyPair=function(e=i.randomBytes(a.KEY_PAIR_SEED_LENGTH)){return o.generateKeyPairFromSeed(e)},t.signJWT=function(e,t,r,i,u=s.fromMiliseconds(Date.now())){return n.__awaiter(this,void 0,void 0,(function*(){const n={alg:a.JWT_IRIDIUM_ALG,typ:a.JWT_IRIDIUM_TYP},s={iss:c.encodeIss(i.publicKey),sub:e,aud:t,iat:u,exp:u+r},f=c.encodeData({header:n,payload:s}),d=o.sign(i.secretKey,f);return c.encodeJWT({header:n,payload:s,signature:d})}))},t.verifyJWT=function(e){return n.__awaiter(this,void 0,void 0,(function*(){const{header:t,payload:r,data:n,signature:i}=c.decodeJWT(e);if(t.alg!==a.JWT_IRIDIUM_ALG||t.typ!==a.JWT_IRIDIUM_TYP)throw new Error("JWT must use EdDSA algorithm");const s=c.decodeIss(r.iss);return o.verify(s,n,i)}))}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.convertSecretKeyToX25519=t.convertPublicKeyToX25519=t.verify=t.sign=t.extractPublicKeyFromSecretKey=t.generateKeyPair=t.generateKeyPairFromSeed=t.SEED_LENGTH=t.SECRET_KEY_LENGTH=t.PUBLIC_KEY_LENGTH=t.SIGNATURE_LENGTH=void 0;const n=r(9),o=r(26),i=r(4);function s(e){const t=new Float64Array(16);if(e)for(let r=0;r<e.length;r++)t[r]=e[r];return t}t.SIGNATURE_LENGTH=64,t.PUBLIC_KEY_LENGTH=32,t.SECRET_KEY_LENGTH=64,t.SEED_LENGTH=32;new Uint8Array(32)[0]=9;const a=s(),c=s([1]),u=s([30883,4953,19914,30187,55467,16705,2637,112,59544,30585,16505,36039,65139,11119,27886,20995]),f=s([61785,9906,39828,60374,45398,33411,5274,224,53552,61171,33010,6542,64743,22239,55772,9222]),d=s([54554,36645,11616,51542,42930,38181,51040,26924,56412,64982,57905,49316,21502,52590,14035,8553]),l=s([26200,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214]),h=s([41136,18958,6951,50414,58488,44335,6150,12099,55207,15867,153,11085,57099,20417,9344,11139]);function b(e,t){for(let r=0;r<16;r++)e[r]=0|t[r]}function _(e){let t=1;for(let r=0;r<16;r++){let n=e[r]+t+65535;t=Math.floor(n/65536),e[r]=n-65536*t}e[0]+=t-1+37*(t-1)}function p(e,t,r){const n=~(r-1);for(let r=0;r<16;r++){const o=n&(e[r]^t[r]);e[r]^=o,t[r]^=o}}function y(e,t){const r=s(),n=s();for(let e=0;e<16;e++)n[e]=t[e];_(n),_(n),_(n);for(let e=0;e<2;e++){r[0]=n[0]-65517;for(let e=1;e<15;e++)r[e]=n[e]-65535-(r[e-1]>>16&1),r[e-1]&=65535;r[15]=n[15]-32767-(r[14]>>16&1);const e=r[15]>>16&1;r[14]&=65535,p(n,r,1-e)}for(let t=0;t<16;t++)e[2*t]=255&n[t],e[2*t+1]=n[t]>>8}function E(e,t){let r=0;for(let n=0;n<32;n++)r|=e[n]^t[n];return(1&r-1>>>8)-1}function w(e,t){const r=new Uint8Array(32),n=new Uint8Array(32);return y(r,e),y(n,t),E(r,n)}function v(e){const t=new Uint8Array(32);return y(t,e),1&t[0]}function g(e,t,r){for(let n=0;n<16;n++)e[n]=t[n]+r[n]}function m(e,t,r){for(let n=0;n<16;n++)e[n]=t[n]-r[n]}function S(e,t,r){let n,o,i=0,s=0,a=0,c=0,u=0,f=0,d=0,l=0,h=0,b=0,_=0,p=0,y=0,E=0,w=0,v=0,g=0,m=0,S=0,I=0,O=0,D=0,T=0,M=0,U=0,A=0,N=0,L=0,C=0,P=0,x=0,R=r[0],H=r[1],j=r[2],B=r[3],G=r[4],W=r[5],F=r[6],J=r[7],K=r[8],Y=r[9],V=r[10],k=r[11],z=r[12],X=r[13],$=r[14],q=r[15];n=t[0],i+=n*R,s+=n*H,a+=n*j,c+=n*B,u+=n*G,f+=n*W,d+=n*F,l+=n*J,h+=n*K,b+=n*Y,_+=n*V,p+=n*k,y+=n*z,E+=n*X,w+=n*$,v+=n*q,n=t[1],s+=n*R,a+=n*H,c+=n*j,u+=n*B,f+=n*G,d+=n*W,l+=n*F,h+=n*J,b+=n*K,_+=n*Y,p+=n*V,y+=n*k,E+=n*z,w+=n*X,v+=n*$,g+=n*q,n=t[2],a+=n*R,c+=n*H,u+=n*j,f+=n*B,d+=n*G,l+=n*W,h+=n*F,b+=n*J,_+=n*K,p+=n*Y,y+=n*V,E+=n*k,w+=n*z,v+=n*X,g+=n*$,m+=n*q,n=t[3],c+=n*R,u+=n*H,f+=n*j,d+=n*B,l+=n*G,h+=n*W,b+=n*F,_+=n*J,p+=n*K,y+=n*Y,E+=n*V,w+=n*k,v+=n*z,g+=n*X,m+=n*$,S+=n*q,n=t[4],u+=n*R,f+=n*H,d+=n*j,l+=n*B,h+=n*G,b+=n*W,_+=n*F,p+=n*J,y+=n*K,E+=n*Y,w+=n*V,v+=n*k,g+=n*z,m+=n*X,S+=n*$,I+=n*q,n=t[5],f+=n*R,d+=n*H,l+=n*j,h+=n*B,b+=n*G,_+=n*W,p+=n*F,y+=n*J,E+=n*K,w+=n*Y,v+=n*V,g+=n*k,m+=n*z,S+=n*X,I+=n*$,O+=n*q,n=t[6],d+=n*R,l+=n*H,h+=n*j,b+=n*B,_+=n*G,p+=n*W,y+=n*F,E+=n*J,w+=n*K,v+=n*Y,g+=n*V,m+=n*k,S+=n*z,I+=n*X,O+=n*$,D+=n*q,n=t[7],l+=n*R,h+=n*H,b+=n*j,_+=n*B,p+=n*G,y+=n*W,E+=n*F,w+=n*J,v+=n*K,g+=n*Y,m+=n*V,S+=n*k,I+=n*z,O+=n*X,D+=n*$,T+=n*q,n=t[8],h+=n*R,b+=n*H,_+=n*j,p+=n*B,y+=n*G,E+=n*W,w+=n*F,v+=n*J,g+=n*K,m+=n*Y,S+=n*V,I+=n*k,O+=n*z,D+=n*X,T+=n*$,M+=n*q,n=t[9],b+=n*R,_+=n*H,p+=n*j,y+=n*B,E+=n*G,w+=n*W,v+=n*F,g+=n*J,m+=n*K,S+=n*Y,I+=n*V,O+=n*k,D+=n*z,T+=n*X,M+=n*$,U+=n*q,n=t[10],_+=n*R,p+=n*H,y+=n*j,E+=n*B,w+=n*G,v+=n*W,g+=n*F,m+=n*J,S+=n*K,I+=n*Y,O+=n*V,D+=n*k,T+=n*z,M+=n*X,U+=n*$,A+=n*q,n=t[11],p+=n*R,y+=n*H,E+=n*j,w+=n*B,v+=n*G,g+=n*W,m+=n*F,S+=n*J,I+=n*K,O+=n*Y,D+=n*V,T+=n*k,M+=n*z,U+=n*X,A+=n*$,N+=n*q,n=t[12],y+=n*R,E+=n*H,w+=n*j,v+=n*B,g+=n*G,m+=n*W,S+=n*F,I+=n*J,O+=n*K,D+=n*Y,T+=n*V,M+=n*k,U+=n*z,A+=n*X,N+=n*$,L+=n*q,n=t[13],E+=n*R,w+=n*H,v+=n*j,g+=n*B,m+=n*G,S+=n*W,I+=n*F,O+=n*J,D+=n*K,T+=n*Y,M+=n*V,U+=n*k,A+=n*z,N+=n*X,L+=n*$,C+=n*q,n=t[14],w+=n*R,v+=n*H,g+=n*j,m+=n*B,S+=n*G,I+=n*W,O+=n*F,D+=n*J,T+=n*K,M+=n*Y,U+=n*V,A+=n*k,N+=n*z,L+=n*X,C+=n*$,P+=n*q,n=t[15],v+=n*R,g+=n*H,m+=n*j,S+=n*B,I+=n*G,O+=n*W,D+=n*F,T+=n*J,M+=n*K,U+=n*Y,A+=n*V,N+=n*k,L+=n*z,C+=n*X,P+=n*$,x+=n*q,i+=38*g,s+=38*m,a+=38*S,c+=38*I,u+=38*O,f+=38*D,d+=38*T,l+=38*M,h+=38*U,b+=38*A,_+=38*N,p+=38*L,y+=38*C,E+=38*P,w+=38*x,o=1,n=i+o+65535,o=Math.floor(n/65536),i=n-65536*o,n=s+o+65535,o=Math.floor(n/65536),s=n-65536*o,n=a+o+65535,o=Math.floor(n/65536),a=n-65536*o,n=c+o+65535,o=Math.floor(n/65536),c=n-65536*o,n=u+o+65535,o=Math.floor(n/65536),u=n-65536*o,n=f+o+65535,o=Math.floor(n/65536),f=n-65536*o,n=d+o+65535,o=Math.floor(n/65536),d=n-65536*o,n=l+o+65535,o=Math.floor(n/65536),l=n-65536*o,n=h+o+65535,o=Math.floor(n/65536),h=n-65536*o,n=b+o+65535,o=Math.floor(n/65536),b=n-65536*o,n=_+o+65535,o=Math.floor(n/65536),_=n-65536*o,n=p+o+65535,o=Math.floor(n/65536),p=n-65536*o,n=y+o+65535,o=Math.floor(n/65536),y=n-65536*o,n=E+o+65535,o=Math.floor(n/65536),E=n-65536*o,n=w+o+65535,o=Math.floor(n/65536),w=n-65536*o,n=v+o+65535,o=Math.floor(n/65536),v=n-65536*o,i+=o-1+37*(o-1),o=1,n=i+o+65535,o=Math.floor(n/65536),i=n-65536*o,n=s+o+65535,o=Math.floor(n/65536),s=n-65536*o,n=a+o+65535,o=Math.floor(n/65536),a=n-65536*o,n=c+o+65535,o=Math.floor(n/65536),c=n-65536*o,n=u+o+65535,o=Math.floor(n/65536),u=n-65536*o,n=f+o+65535,o=Math.floor(n/65536),f=n-65536*o,n=d+o+65535,o=Math.floor(n/65536),d=n-65536*o,n=l+o+65535,o=Math.floor(n/65536),l=n-65536*o,n=h+o+65535,o=Math.floor(n/65536),h=n-65536*o,n=b+o+65535,o=Math.floor(n/65536),b=n-65536*o,n=_+o+65535,o=Math.floor(n/65536),_=n-65536*o,n=p+o+65535,o=Math.floor(n/65536),p=n-65536*o,n=y+o+65535,o=Math.floor(n/65536),y=n-65536*o,n=E+o+65535,o=Math.floor(n/65536),E=n-65536*o,n=w+o+65535,o=Math.floor(n/65536),w=n-65536*o,n=v+o+65535,o=Math.floor(n/65536),v=n-65536*o,i+=o-1+37*(o-1),e[0]=i,e[1]=s,e[2]=a,e[3]=c,e[4]=u,e[5]=f,e[6]=d,e[7]=l,e[8]=h,e[9]=b,e[10]=_,e[11]=p,e[12]=y,e[13]=E,e[14]=w,e[15]=v}function I(e,t){S(e,t,t)}function O(e,t){const r=s();let n;for(n=0;n<16;n++)r[n]=t[n];for(n=253;n>=0;n--)I(r,r),2!==n&&4!==n&&S(r,r,t);for(n=0;n<16;n++)e[n]=r[n]}function D(e,t){const r=s(),n=s(),o=s(),i=s(),a=s(),c=s(),u=s(),d=s(),l=s();m(r,e[1],e[0]),m(l,t[1],t[0]),S(r,r,l),g(n,e[0],e[1]),g(l,t[0],t[1]),S(n,n,l),S(o,e[3],t[3]),S(o,o,f),S(i,e[2],t[2]),g(i,i,i),m(a,n,r),m(c,i,o),g(u,i,o),g(d,n,r),S(e[0],a,c),S(e[1],d,u),S(e[2],u,c),S(e[3],a,d)}function T(e,t,r){for(let n=0;n<4;n++)p(e[n],t[n],r)}function M(e,t){const r=s(),n=s(),o=s();O(o,t[2]),S(r,t[0],o),S(n,t[1],o),y(e,n),e[31]^=v(r)<<7}function U(e,t,r){b(e[0],a),b(e[1],c),b(e[2],c),b(e[3],a);for(let n=255;n>=0;--n){const o=r[n/8|0]>>(7&n)&1;T(e,t,o),D(t,e),D(e,e),T(e,t,o)}}function A(e,t){const r=[s(),s(),s(),s()];b(r[0],d),b(r[1],l),b(r[2],c),S(r[3],d,l),U(e,r,t)}function N(e){if(e.length!==t.SEED_LENGTH)throw new Error(`ed25519: seed must be ${t.SEED_LENGTH} bytes`);const r=(0,o.hash)(e);r[0]&=248,r[31]&=127,r[31]|=64;const n=new Uint8Array(32),i=[s(),s(),s(),s()];A(i,r),M(n,i);const a=new Uint8Array(64);return a.set(e),a.set(n,32),{publicKey:n,secretKey:a}}t.generateKeyPairFromSeed=N,t.generateKeyPair=function(e){const t=(0,n.randomBytes)(32,e),r=N(t);return(0,i.wipe)(t),r},t.extractPublicKeyFromSecretKey=function(e){if(e.length!==t.SECRET_KEY_LENGTH)throw new Error(`ed25519: secret key must be ${t.SECRET_KEY_LENGTH} bytes`);return new Uint8Array(e.subarray(32))};const L=new Float64Array([237,211,245,92,26,99,18,88,214,156,247,162,222,249,222,20,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16]);function C(e,t){let r,n,o,i;for(n=63;n>=32;--n){for(r=0,o=n-32,i=n-12;o<i;++o)t[o]+=r-16*t[n]*L[o-(n-32)],r=Math.floor((t[o]+128)/256),t[o]-=256*r;t[o]+=r,t[n]=0}for(r=0,o=0;o<32;o++)t[o]+=r-(t[31]>>4)*L[o],r=t[o]>>8,t[o]&=255;for(o=0;o<32;o++)t[o]-=r*L[o];for(n=0;n<32;n++)t[n+1]+=t[n]>>8,e[n]=255&t[n]}function P(e){const t=new Float64Array(64);for(let r=0;r<64;r++)t[r]=e[r];for(let t=0;t<64;t++)e[t]=0;C(e,t)}function x(e,t){const r=s(),n=s(),o=s(),i=s(),f=s(),d=s(),l=s();return b(e[2],c),function(e,t){for(let r=0;r<16;r++)e[r]=t[2*r]+(t[2*r+1]<<8);e[15]&=32767}(e[1],t),I(o,e[1]),S(i,o,u),m(o,o,e[2]),g(i,e[2],i),I(f,i),I(d,f),S(l,d,f),S(r,l,o),S(r,r,i),function(e,t){const r=s();let n;for(n=0;n<16;n++)r[n]=t[n];for(n=250;n>=0;n--)I(r,r),1!==n&&S(r,r,t);for(n=0;n<16;n++)e[n]=r[n]}(r,r),S(r,r,o),S(r,r,i),S(r,r,i),S(e[0],r,i),I(n,e[0]),S(n,n,i),w(n,o)&&S(e[0],e[0],h),I(n,e[0]),S(n,n,i),w(n,o)?-1:(v(e[0])===t[31]>>7&&m(e[0],a,e[0]),S(e[3],e[0],e[1]),0)}t.sign=function(e,t){const r=new Float64Array(64),n=[s(),s(),s(),s()],i=(0,o.hash)(e.subarray(0,32));i[0]&=248,i[31]&=127,i[31]|=64;const a=new Uint8Array(64);a.set(i.subarray(32),32);const c=new o.SHA512;c.update(a.subarray(32)),c.update(t);const u=c.digest();c.clean(),P(u),A(n,u),M(a,n),c.reset(),c.update(a.subarray(0,32)),c.update(e.subarray(32)),c.update(t);const f=c.digest();P(f);for(let e=0;e<32;e++)r[e]=u[e];for(let e=0;e<32;e++)for(let t=0;t<32;t++)r[e+t]+=f[e]*i[t];return C(a.subarray(32),r),a},t.verify=function(e,r,n){const i=new Uint8Array(32),a=[s(),s(),s(),s()],c=[s(),s(),s(),s()];if(n.length!==t.SIGNATURE_LENGTH)throw new Error(`ed25519: signature must be ${t.SIGNATURE_LENGTH} bytes`);if(x(c,e))return!1;const u=new o.SHA512;u.update(n.subarray(0,32)),u.update(e),u.update(r);const f=u.digest();return P(f),U(a,c,f),A(c,n.subarray(32)),D(a,c),M(i,a),!E(n,i)},t.convertPublicKeyToX25519=function(e){let t=[s(),s(),s(),s()];if(x(t,e))throw new Error("Ed25519: invalid public key");let r=s(),n=s(),o=t[1];g(r,c,o),m(n,c,o),O(n,n),S(r,r,n);let i=new Uint8Array(32);return y(i,r),i},t.convertSecretKeyToX25519=function(e){const t=(0,o.hash)(e.subarray(0,32));t[0]&=248,t[31]&=127,t[31]|=64;const r=new Uint8Array(t.subarray(0,32));return(0,i.wipe)(t),r}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SystemRandomSource=void 0;const n=r(22),o=r(23);t.SystemRandomSource=class{constructor(){return this.isAvailable=!1,this.name="",this._source=new n.BrowserRandomSource,this._source.isAvailable?(this.isAvailable=!0,void(this.name="Browser")):(this._source=new o.NodeRandomSource,this._source.isAvailable?(this.isAvailable=!0,void(this.name="Node")):void 0)}randomBytes(e){if(!this.isAvailable)throw new Error("System random byte generator is not available.");return this._source.randomBytes(e)}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BrowserRandomSource=void 0;t.BrowserRandomSource=class{constructor(){this.isAvailable=!1,this.isInstantiated=!1;const e="undefined"!=typeof self?self.crypto||self.msCrypto:null;e&&void 0!==e.getRandomValues&&(this._crypto=e,this.isAvailable=!0,this.isInstantiated=!0)}randomBytes(e){if(!this.isAvailable||!this._crypto)throw new Error("Browser random byte generator is not available.");const t=new Uint8Array(e);for(let e=0;e<t.length;e+=65536)this._crypto.getRandomValues(t.subarray(e,e+Math.min(t.length-e,65536)));return t}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NodeRandomSource=void 0;const n=r(4);t.NodeRandomSource=class{constructor(){this.isAvailable=!1,this.isInstantiated=!1;{const e=r(24);e&&e.randomBytes&&(this._crypto=e,this.isAvailable=!0,this.isInstantiated=!0)}}randomBytes(e){if(!this.isAvailable||!this._crypto)throw new Error("Node.js random byte generator is not available.");let t=this._crypto.randomBytes(e);if(t.length!==e)throw new Error("NodeRandomSource: got fewer bytes than requested");const r=new Uint8Array(e);for(let e=0;e<r.length;e++)r[e]=t[e];return(0,n.wipe)(t),r}}},function(e,t){},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.mul=Math.imul||function(e,t){var r=65535&e,n=65535&t;return r*n+((e>>>16&65535)*n+r*(t>>>16&65535)<<16>>>0)|0},t.add=function(e,t){return e+t|0},t.sub=function(e,t){return e-t|0},t.rotl=function(e,t){return e<<t|e>>>32-t},t.rotr=function(e,t){return e<<32-t|e>>>t},t.isInteger=Number.isInteger||function(e){return"number"==typeof e&&isFinite(e)&&Math.floor(e)===e},t.MAX_SAFE_INTEGER=9007199254740991,t.isSafeInteger=function(e){return t.isInteger(e)&&e>=-t.MAX_SAFE_INTEGER&&e<=t.MAX_SAFE_INTEGER}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(10),o=r(4);t.DIGEST_LENGTH=64,t.BLOCK_SIZE=128;var i=function(){function e(){this.digestLength=t.DIGEST_LENGTH,this.blockSize=t.BLOCK_SIZE,this._stateHi=new Int32Array(8),this._stateLo=new Int32Array(8),this._tempHi=new Int32Array(16),this._tempLo=new Int32Array(16),this._buffer=new Uint8Array(256),this._bufferLength=0,this._bytesHashed=0,this._finished=!1,this.reset()}return e.prototype._initState=function(){this._stateHi[0]=1779033703,this._stateHi[1]=3144134277,this._stateHi[2]=1013904242,this._stateHi[3]=2773480762,this._stateHi[4]=1359893119,this._stateHi[5]=2600822924,this._stateHi[6]=528734635,this._stateHi[7]=1541459225,this._stateLo[0]=4089235720,this._stateLo[1]=2227873595,this._stateLo[2]=4271175723,this._stateLo[3]=1595750129,this._stateLo[4]=2917565137,this._stateLo[5]=725511199,this._stateLo[6]=4215389547,this._stateLo[7]=327033209},e.prototype.reset=function(){return this._initState(),this._bufferLength=0,this._bytesHashed=0,this._finished=!1,this},e.prototype.clean=function(){o.wipe(this._buffer),o.wipe(this._tempHi),o.wipe(this._tempLo),this.reset()},e.prototype.update=function(e,r){if(void 0===r&&(r=e.length),this._finished)throw new Error("SHA512: can't update because hash was finished.");var n=0;if(this._bytesHashed+=r,this._bufferLength>0){for(;this._bufferLength<t.BLOCK_SIZE&&r>0;)this._buffer[this._bufferLength++]=e[n++],r--;this._bufferLength===this.blockSize&&(a(this._tempHi,this._tempLo,this._stateHi,this._stateLo,this._buffer,0,this.blockSize),this._bufferLength=0)}for(r>=this.blockSize&&(n=a(this._tempHi,this._tempLo,this._stateHi,this._stateLo,e,n,r),r%=this.blockSize);r>0;)this._buffer[this._bufferLength++]=e[n++],r--;return this},e.prototype.finish=function(e){if(!this._finished){var t=this._bytesHashed,r=this._bufferLength,o=t/536870912|0,i=t<<3,s=t%128<112?128:256;this._buffer[r]=128;for(var c=r+1;c<s-8;c++)this._buffer[c]=0;n.writeUint32BE(o,this._buffer,s-8),n.writeUint32BE(i,this._buffer,s-4),a(this._tempHi,this._tempLo,this._stateHi,this._stateLo,this._buffer,0,s),this._finished=!0}for(c=0;c<this.digestLength/8;c++)n.writeUint32BE(this._stateHi[c],e,8*c),n.writeUint32BE(this._stateLo[c],e,8*c+4);return this},e.prototype.digest=function(){var e=new Uint8Array(this.digestLength);return this.finish(e),e},e.prototype.saveState=function(){if(this._finished)throw new Error("SHA256: cannot save finished state");return{stateHi:new Int32Array(this._stateHi),stateLo:new Int32Array(this._stateLo),buffer:this._bufferLength>0?new Uint8Array(this._buffer):void 0,bufferLength:this._bufferLength,bytesHashed:this._bytesHashed}},e.prototype.restoreState=function(e){return this._stateHi.set(e.stateHi),this._stateLo.set(e.stateLo),this._bufferLength=e.bufferLength,e.buffer&&this._buffer.set(e.buffer),this._bytesHashed=e.bytesHashed,this._finished=!1,this},e.prototype.cleanSavedState=function(e){o.wipe(e.stateHi),o.wipe(e.stateLo),e.buffer&&o.wipe(e.buffer),e.bufferLength=0,e.bytesHashed=0},e}();t.SHA512=i;var s=new Int32Array([1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591]);function a(e,t,r,o,i,a,c){for(var u,f,d,l,h,b,_,p,y=r[0],E=r[1],w=r[2],v=r[3],g=r[4],m=r[5],S=r[6],I=r[7],O=o[0],D=o[1],T=o[2],M=o[3],U=o[4],A=o[5],N=o[6],L=o[7];c>=128;){for(var C=0;C<16;C++){var P=8*C+a;e[C]=n.readUint32BE(i,P),t[C]=n.readUint32BE(i,P+4)}for(C=0;C<80;C++){var x,R,H=y,j=E,B=w,G=v,W=g,F=m,J=S,K=O,Y=D,V=T,k=M,z=U,X=A,$=N;if(h=65535&(f=L),b=f>>>16,_=65535&(u=I),p=u>>>16,h+=65535&(f=(U>>>14|g<<18)^(U>>>18|g<<14)^(g>>>9|U<<23)),b+=f>>>16,_+=65535&(u=(g>>>14|U<<18)^(g>>>18|U<<14)^(U>>>9|g<<23)),p+=u>>>16,h+=65535&(f=U&A^~U&N),b+=f>>>16,_+=65535&(u=g&m^~g&S),p+=u>>>16,u=s[2*C],h+=65535&(f=s[2*C+1]),b+=f>>>16,_+=65535&u,p+=u>>>16,u=e[C%16],b+=(f=t[C%16])>>>16,_+=65535&u,p+=u>>>16,_+=(b+=(h+=65535&f)>>>16)>>>16,h=65535&(f=l=65535&h|b<<16),b=f>>>16,_=65535&(u=d=65535&_|(p+=_>>>16)<<16),p=u>>>16,h+=65535&(f=(O>>>28|y<<4)^(y>>>2|O<<30)^(y>>>7|O<<25)),b+=f>>>16,_+=65535&(u=(y>>>28|O<<4)^(O>>>2|y<<30)^(O>>>7|y<<25)),p+=u>>>16,b+=(f=O&D^O&T^D&T)>>>16,_+=65535&(u=y&E^y&w^E&w),p+=u>>>16,x=65535&(_+=(b+=(h+=65535&f)>>>16)>>>16)|(p+=_>>>16)<<16,R=65535&h|b<<16,h=65535&(f=k),b=f>>>16,_=65535&(u=G),p=u>>>16,b+=(f=l)>>>16,_+=65535&(u=d),p+=u>>>16,E=H,w=j,v=B,g=G=65535&(_+=(b+=(h+=65535&f)>>>16)>>>16)|(p+=_>>>16)<<16,m=W,S=F,I=J,y=x,D=K,T=Y,M=V,U=k=65535&h|b<<16,A=z,N=X,L=$,O=R,C%16==15)for(P=0;P<16;P++)u=e[P],h=65535&(f=t[P]),b=f>>>16,_=65535&u,p=u>>>16,u=e[(P+9)%16],h+=65535&(f=t[(P+9)%16]),b+=f>>>16,_+=65535&u,p+=u>>>16,d=e[(P+1)%16],h+=65535&(f=((l=t[(P+1)%16])>>>1|d<<31)^(l>>>8|d<<24)^(l>>>7|d<<25)),b+=f>>>16,_+=65535&(u=(d>>>1|l<<31)^(d>>>8|l<<24)^d>>>7),p+=u>>>16,d=e[(P+14)%16],b+=(f=((l=t[(P+14)%16])>>>19|d<<13)^(d>>>29|l<<3)^(l>>>6|d<<26))>>>16,_+=65535&(u=(d>>>19|l<<13)^(l>>>29|d<<3)^d>>>6),p+=u>>>16,p+=(_+=(b+=(h+=65535&f)>>>16)>>>16)>>>16,e[P]=65535&_|p<<16,t[P]=65535&h|b<<16}h=65535&(f=O),b=f>>>16,_=65535&(u=y),p=u>>>16,u=r[0],b+=(f=o[0])>>>16,_+=65535&u,p+=u>>>16,p+=(_+=(b+=(h+=65535&f)>>>16)>>>16)>>>16,r[0]=y=65535&_|p<<16,o[0]=O=65535&h|b<<16,h=65535&(f=D),b=f>>>16,_=65535&(u=E),p=u>>>16,u=r[1],b+=(f=o[1])>>>16,_+=65535&u,p+=u>>>16,p+=(_+=(b+=(h+=65535&f)>>>16)>>>16)>>>16,r[1]=E=65535&_|p<<16,o[1]=D=65535&h|b<<16,h=65535&(f=T),b=f>>>16,_=65535&(u=w),p=u>>>16,u=r[2],b+=(f=o[2])>>>16,_+=65535&u,p+=u>>>16,p+=(_+=(b+=(h+=65535&f)>>>16)>>>16)>>>16,r[2]=w=65535&_|p<<16,o[2]=T=65535&h|b<<16,h=65535&(f=M),b=f>>>16,_=65535&(u=v),p=u>>>16,u=r[3],b+=(f=o[3])>>>16,_+=65535&u,p+=u>>>16,p+=(_+=(b+=(h+=65535&f)>>>16)>>>16)>>>16,r[3]=v=65535&_|p<<16,o[3]=M=65535&h|b<<16,h=65535&(f=U),b=f>>>16,_=65535&(u=g),p=u>>>16,u=r[4],b+=(f=o[4])>>>16,_+=65535&u,p+=u>>>16,p+=(_+=(b+=(h+=65535&f)>>>16)>>>16)>>>16,r[4]=g=65535&_|p<<16,o[4]=U=65535&h|b<<16,h=65535&(f=A),b=f>>>16,_=65535&(u=m),p=u>>>16,u=r[5],b+=(f=o[5])>>>16,_+=65535&u,p+=u>>>16,p+=(_+=(b+=(h+=65535&f)>>>16)>>>16)>>>16,r[5]=m=65535&_|p<<16,o[5]=A=65535&h|b<<16,h=65535&(f=N),b=f>>>16,_=65535&(u=S),p=u>>>16,u=r[6],b+=(f=o[6])>>>16,_+=65535&u,p+=u>>>16,p+=(_+=(b+=(h+=65535&f)>>>16)>>>16)>>>16,r[6]=S=65535&_|p<<16,o[6]=N=65535&h|b<<16,h=65535&(f=L),b=f>>>16,_=65535&(u=I),p=u>>>16,u=r[7],b+=(f=o[7])>>>16,_+=65535&u,p+=u>>>16,p+=(_+=(b+=(h+=65535&f)>>>16)>>>16)>>>16,r[7]=I=65535&_|p<<16,o[7]=L=65535&h|b<<16,a+=128,c-=128}return a}t.hash=function(e){var t=new i;t.update(e);var r=t.digest();return t.clean(),r}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(2);n.__exportStar(r(28),t),n.__exportStar(r(33),t),n.__exportStar(r(34),t),n.__exportStar(r(11),t)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(2);n.__exportStar(r(29),t),n.__exportStar(r(30),t)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.delay=void 0,t.delay=function(e){return new Promise(t=>{setTimeout(()=>{t(!0)},e)})}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.fromMiliseconds=t.toMiliseconds=void 0;const n=r(11);t.toMiliseconds=function(e){return e*n.ONE_THOUSAND},t.fromMiliseconds=function(e){return Math.floor(e/n.ONE_THOUSAND)}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ONE_THOUSAND=t.ONE_HUNDRED=void 0,t.ONE_HUNDRED=100,t.ONE_THOUSAND=1e3},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ONE_YEAR=t.FOUR_WEEKS=t.THREE_WEEKS=t.TWO_WEEKS=t.ONE_WEEK=t.THIRTY_DAYS=t.SEVEN_DAYS=t.FIVE_DAYS=t.THREE_DAYS=t.ONE_DAY=t.TWENTY_FOUR_HOURS=t.TWELVE_HOURS=t.SIX_HOURS=t.THREE_HOURS=t.ONE_HOUR=t.SIXTY_MINUTES=t.THIRTY_MINUTES=t.TEN_MINUTES=t.FIVE_MINUTES=t.ONE_MINUTE=t.SIXTY_SECONDS=t.THIRTY_SECONDS=t.TEN_SECONDS=t.FIVE_SECONDS=t.ONE_SECOND=void 0,t.ONE_SECOND=1,t.FIVE_SECONDS=5,t.TEN_SECONDS=10,t.THIRTY_SECONDS=30,t.SIXTY_SECONDS=60,t.ONE_MINUTE=t.SIXTY_SECONDS,t.FIVE_MINUTES=5*t.ONE_MINUTE,t.TEN_MINUTES=10*t.ONE_MINUTE,t.THIRTY_MINUTES=30*t.ONE_MINUTE,t.SIXTY_MINUTES=60*t.ONE_MINUTE,t.ONE_HOUR=t.SIXTY_MINUTES,t.THREE_HOURS=3*t.ONE_HOUR,t.SIX_HOURS=6*t.ONE_HOUR,t.TWELVE_HOURS=12*t.ONE_HOUR,t.TWENTY_FOUR_HOURS=24*t.ONE_HOUR,t.ONE_DAY=t.TWENTY_FOUR_HOURS,t.THREE_DAYS=3*t.ONE_DAY,t.FIVE_DAYS=5*t.ONE_DAY,t.SEVEN_DAYS=7*t.ONE_DAY,t.THIRTY_DAYS=30*t.ONE_DAY,t.ONE_WEEK=t.SEVEN_DAYS,t.TWO_WEEKS=2*t.ONE_WEEK,t.THREE_WEEKS=3*t.ONE_WEEK,t.FOUR_WEEKS=4*t.ONE_WEEK,t.ONE_YEAR=365*t.ONE_DAY},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Watch=void 0;class n{constructor(){this.timestamps=new Map}start(e){if(this.timestamps.has(e))throw new Error("Watch already started for label: "+e);this.timestamps.set(e,{started:Date.now()})}stop(e){const t=this.get(e);if(void 0!==t.elapsed)throw new Error("Watch already stopped for label: "+e);const r=Date.now()-t.started;this.timestamps.set(e,{started:t.started,elapsed:r})}get(e){const t=this.timestamps.get(e);if(void 0===t)throw new Error("No timestamp found for label: "+e);return t}elapsed(e){const t=this.get(e);return t.elapsed||Date.now()-t.started}}t.Watch=n,t.default=n},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});r(2).__exportStar(r(35),t)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.IWatch=void 0;t.IWatch=class{}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(13),o=r(7);t.concat=function(e,t){t||(t=e.reduce((e,t)=>e+t.length,0));const r=n.allocUnsafe(t);let i=0;for(const t of e)r.set(t,i),i+=t.length;return o.asUint8Array(r)}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(14);t.toString=function(e,t="utf8"){const r=n[t];if(!r)throw new Error(`Unsupported encoding "${t}"`);return"utf8"!==t&&"utf-8"!==t||null==globalThis.Buffer||null==globalThis.Buffer.from?r.encoder.encode(e).substring(1):globalThis.Buffer.from(e.buffer,e.byteOffset,e.byteLength).toString("utf8")}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(39),o=r(41),i=r(42),s=r(43),a=r(44),c=r(15),u=r(45),f=r(16),d=r(46),l=r(47),h=r(48),b=r(50),_=r(51),p=r(52);r(53);var y=r(17),E=r(8),w=r(3),v=r(5),g=r(1);const m={...n,...o,...i,...s,...a,...c,...u,...f,...d,...l},S={...h,...b},I={raw:_,json:p};t.CID=y.CID,t.hasher=E,t.digest=w,t.varint=v,t.bytes=g,t.bases=m,t.codecs=I,t.hashes=S},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(0),o=r(1);const i=n.from({prefix:"\0",name:"identity",encode:e=>o.toString(e),decode:e=>o.fromString(e)});t.identity=i},function(e,t,r){"use strict";var n=function(e,t){if(e.length>=255)throw new TypeError("Alphabet too long");for(var r=new Uint8Array(256),n=0;n<r.length;n++)r[n]=255;for(var o=0;o<e.length;o++){var i=e.charAt(o),s=i.charCodeAt(0);if(255!==r[s])throw new TypeError(i+" is ambiguous");r[s]=o}var a=e.length,c=e.charAt(0),u=Math.log(a)/Math.log(256),f=Math.log(256)/Math.log(a);function d(e){if("string"!=typeof e)throw new TypeError("Expected String");if(0===e.length)return new Uint8Array;var t=0;if(" "!==e[t]){for(var n=0,o=0;e[t]===c;)n++,t++;for(var i=(e.length-t)*u+1>>>0,s=new Uint8Array(i);e[t];){var f=r[e.charCodeAt(t)];if(255===f)return;for(var d=0,l=i-1;(0!==f||d<o)&&-1!==l;l--,d++)f+=a*s[l]>>>0,s[l]=f%256>>>0,f=f/256>>>0;if(0!==f)throw new Error("Non-zero carry");o=d,t++}if(" "!==e[t]){for(var h=i-o;h!==i&&0===s[h];)h++;for(var b=new Uint8Array(n+(i-h)),_=n;h!==i;)b[_++]=s[h++];return b}}}return{encode:function(t){if(t instanceof Uint8Array||(ArrayBuffer.isView(t)?t=new Uint8Array(t.buffer,t.byteOffset,t.byteLength):Array.isArray(t)&&(t=Uint8Array.from(t))),!(t instanceof Uint8Array))throw new TypeError("Expected Uint8Array");if(0===t.length)return"";for(var r=0,n=0,o=0,i=t.length;o!==i&&0===t[o];)o++,r++;for(var s=(i-o)*f+1>>>0,u=new Uint8Array(s);o!==i;){for(var d=t[o],l=0,h=s-1;(0!==d||l<n)&&-1!==h;h--,l++)d+=256*u[h]>>>0,u[h]=d%a>>>0,d=d/a>>>0;if(0!==d)throw new Error("Non-zero carry");n=l,o++}for(var b=s-n;b!==s&&0===u[b];)b++;for(var _=c.repeat(r);b<s;++b)_+=e.charAt(u[b]);return _},decodeUnsafe:d,decode:function(e){var r=d(e);if(r)return r;throw new Error(`Non-${t} character`)}}};e.exports=n},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(0).rfc4648({prefix:"0",name:"base2",alphabet:"01",bitsPerChar:1});t.base2=n},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(0).rfc4648({prefix:"7",name:"base8",alphabet:"01234567",bitsPerChar:3});t.base8=n},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(0).baseX({prefix:"9",name:"base10",alphabet:"0123456789"});t.base10=n},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(0);const o=n.rfc4648({prefix:"f",name:"base16",alphabet:"0123456789abcdef",bitsPerChar:4}),i=n.rfc4648({prefix:"F",name:"base16upper",alphabet:"0123456789ABCDEF",bitsPerChar:4});t.base16=o,t.base16upper=i},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(0);const o=n.baseX({prefix:"k",name:"base36",alphabet:"0123456789abcdefghijklmnopqrstuvwxyz"}),i=n.baseX({prefix:"K",name:"base36upper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"});t.base36=o,t.base36upper=i},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(0);const o=n.rfc4648({prefix:"m",name:"base64",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",bitsPerChar:6}),i=n.rfc4648({prefix:"M",name:"base64pad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",bitsPerChar:6}),s=n.rfc4648({prefix:"u",name:"base64url",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_",bitsPerChar:6}),a=n.rfc4648({prefix:"U",name:"base64urlpad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_=",bitsPerChar:6});t.base64=o,t.base64pad=i,t.base64url=s,t.base64urlpad=a},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(0);const o=Array.from("๐๐ชโ๐ฐ๐๐๐๐๐๐๐๐๐๐๐๐๐โ๐ป๐ฅ๐พ๐ฟ๐โค๐๐คฃ๐๐๐๐ญ๐๐๐ ๐๐๐ฅ๐ฅฐ๐๐๐๐ข๐ค๐๐๐ช๐โบ๐๐ค๐๐๐๐๐น๐คฆ๐๐โโจ๐คท๐ฑ๐๐ธ๐๐๐๐๐๐๐๐๐คฉ๐๐๐ค๐๐ฏ๐๐๐ถ๐๐คญโฃ๐๐๐๐ช๐๐ฅ๐๐๐ฉ๐ก๐คช๐๐ฅณ๐ฅ๐คค๐๐๐ณโ๐๐๐ด๐๐ฌ๐๐๐ท๐ป๐โญโ ๐ฅบ๐๐๐ค๐ฆโ๐ฃ๐๐โน๐๐๐ โ๐๐บ๐๐ป๐๐๐๐๐น๐ฃ๐ซ๐๐๐ต๐ค๐๐ด๐ค๐ผ๐ซโฝ๐คโ๐๐คซ๐๐ฎ๐๐ป๐๐ถ๐๐ฒ๐ฟ๐งก๐โก๐๐โโ๐๐ฐ๐คจ๐ถ๐ค๐ถ๐ฐ๐๐ข๐ค๐๐จ๐จ๐คฌโ๐๐บ๐ค๐๐๐ฑ๐๐ถ๐ฅดโถโกโ๐๐ธโฌ๐จ๐๐ฆ๐ท๐บโ ๐ ๐๐ต๐๐คฒ๐ค ๐คง๐๐ต๐ ๐ง๐พ๐๐๐ค๐๐คฏ๐ทโ๐ง๐ฏ๐๐๐ค๐๐โ๐ด๐ฃ๐ธ๐๐๐ฅ๐คข๐ ๐ก๐ฉ๐๐ธ๐ป๐ค๐คฎ๐ผ๐ฅต๐ฉ๐๐๐ผ๐๐ฃ๐ฅ"),i=o.reduce((e,t,r)=>(e[r]=t,e),[]),s=o.reduce((e,t,r)=>(e[t.codePointAt(0)]=r,e),[]);const a=n.from({prefix:"๐",name:"base256emoji",encode:function(e){return e.reduce((e,t)=>e+=i[t],"")},decode:function(e){const t=[];for(const r of e){const e=s[r.codePointAt(0)];if(void 0===e)throw new Error("Non-base256emoji character: "+r);t.push(e)}return new Uint8Array(t)}});t.base256emoji=a},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(8);const o=e=>async t=>new Uint8Array(await crypto.subtle.digest(e,t)),i=n.from({name:"sha2-256",code:18,encode:o("SHA-256")}),s=n.from({name:"sha2-512",code:19,encode:o("SHA-512")});t.sha256=i,t.sha512=s},function(e,t,r){"use strict";var n=function e(t,r,n){r=r||[];var i=n=n||0;for(;t>=o;)r[n++]=255&t|128,t/=128;for(;-128&t;)r[n++]=255&t|128,t>>>=7;return r[n]=0|t,e.bytes=n-i+1,r},o=Math.pow(2,31);var i=function e(t,r){var n,o=0,i=0,s=r=r||0,a=t.length;do{if(s>=a)throw e.bytes=0,new RangeError("Could not decode varint");n=t[s++],o+=i<28?(127&n)<<i:(127&n)*Math.pow(2,i),i+=7}while(n>=128);return e.bytes=s-r,o};var s=Math.pow(2,7),a=Math.pow(2,14),c=Math.pow(2,21),u=Math.pow(2,28),f=Math.pow(2,35),d=Math.pow(2,42),l=Math.pow(2,49),h=Math.pow(2,56),b=Math.pow(2,63),_={encode:n,decode:i,encodingLength:function(e){return e<s?1:e<a?2:e<c?3:e<u?4:e<f?5:e<d?6:e<l?7:e<h?8:e<b?9:10}};e.exports=_},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(1),o=r(3);const i=n.coerce,s={code:0,name:"identity",encode:i,digest:e=>o.create(0,i(e))};t.identity=s},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(1);t.code=85,t.decode=e=>n.coerce(e),t.encode=e=>n.coerce(e),t.name="raw"},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=new TextEncoder,o=new TextDecoder;t.code=512,t.decode=e=>JSON.parse(o.decode(e)),t.encode=e=>n.encode(JSON.stringify(e)),t.name="json"},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(17),o=r(5),i=r(1),s=r(8),a=r(3);t.CID=n.CID,t.varint=o,t.bytes=i,t.hasher=s,t.digest=a},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(14),o=r(7);t.fromString=function(e,t="utf8"){const r=n[t];if(!r)throw new Error(`Unsupported encoding "${t}"`);return"utf8"!==t&&"utf-8"!==t||null==globalThis.Buffer||null==globalThis.Buffer.from?r.decoder.decode(`${r.prefix}${e}`):o.asUint8Array(globalThis.Buffer.from(e,"utf-8"))}},function(e,t,r){"use strict";function n(e){if("string"!=typeof e)throw new Error("Cannot safe json parse value of type "+typeof e);try{return JSON.parse(e)}catch(t){return e}}function o(e){return"string"==typeof e?e:JSON.stringify(e)}r.r(t),r.d(t,"safeJsonParse",(function(){return n})),r.d(t,"safeJsonStringify",(function(){return o}))},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0})}])})); |
{ | ||
"name": "@walletconnect/relay-auth", | ||
"description": "Relay Client Authentication", | ||
"version": "1.0.3", | ||
"version": "1.0.4", | ||
"author": "WalletConnect, Inc. <walletconnect.com>", | ||
@@ -45,5 +45,4 @@ "license": "MIT", | ||
"did-resolver": "^3.2.2", | ||
"husky": "^4.3.0", | ||
"key-did-resolver": "^2.0.4", | ||
"husky": "^4.3.0", | ||
"tslib": "^1.10.0", | ||
"typescript": "^3.7.5", | ||
@@ -67,6 +66,7 @@ "webpack": "^4.41.6", | ||
"@stablelib/random": "^1.0.1", | ||
"@walletconnect/safe-json": "^1.0.0", | ||
"@walletconnect/time": "^1.0.1", | ||
"@walletconnect/safe-json": "^1.0.1", | ||
"@walletconnect/time": "^1.0.2", | ||
"tslib": "1.14.1", | ||
"uint8arrays": "^3.0.0" | ||
} | ||
} |
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
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
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
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
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
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
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
330555
9
396
6
2
+ Addedtslib@1.14.1
Updated@walletconnect/time@^1.0.2