@blockcerts/blockcerts-verifier 1.62.2 → 1.63.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (45) hide show
  1. package/bundle-stats.html +1 -1
  2. package/dist/{EcdsaSd2023-jnIXPui8-Ecil79Z6.js → EcdsaSd2023-DZGap3SM-mPG0cLDm.js} +7 -7
  3. package/dist/EcdsaSecp256k1Signature2019-n7E_p_GN-CK56BVKZ.js +1 -0
  4. package/dist/Ed25519Signature2020-_cT8vvaO-DsdBcpgb.js +52 -0
  5. package/dist/HashlinkVerifier-DgB7rgX8-dg5WNZnc.js +11 -0
  6. package/dist/{MerkleProof2017-Cy_nkz4C-gnoFFWMW.js → MerkleProof2017-C7joZBSg-D3Ose_hz.js} +1 -1
  7. package/dist/MerkleProof2019-B6RcT8nL-CW7PatZk.js +3 -0
  8. package/dist/checkCredentialSchemaConformity-BFdwoe1d-SeiEjHaf.js +1 -0
  9. package/dist/{controlVerificationMethod-BxseSDWK-Ghg2o_Hj.js → controlVerificationMethod-DZMPBpH4-DAL92l4K.js} +1 -1
  10. package/dist/did-key-common.esm-Dpr3yDzE-TRogf7i4.js +9 -0
  11. package/dist/did-key-ed25519.esm-Cds5njOI-zlZoO68S.js +1 -0
  12. package/dist/did-key-secp256k1.esm-D1IImaHL-CTenolkL.js +1 -0
  13. package/dist/elliptic-Bf4jfo3V-BRLTdj5Y.js +1 -0
  14. package/dist/{ensureValidIssuingKey-C7MTkDyV-frafTbMl.js → ensureValidIssuingKey-DVA5iNXJ-wu9SdYxL.js} +1 -1
  15. package/dist/index-ByRXJxEU-CtZ_5kyD.js +22 -0
  16. package/dist/index-CAl7T2GU-LqbKlBZ6.js +1 -0
  17. package/dist/index-Chj6rFU_-DwRdQV-L.js +60 -0
  18. package/dist/index-DsWS3N1O-C0eXpZGn.js +1 -0
  19. package/dist/jsonld-CkyvX_Vg-C61cS9xX.js +33 -0
  20. package/dist/main.js +110 -111
  21. package/dist/{retrieveVerificationMethodPublicKey-fVSjg83n-B4VhVtVk.js → retrieveVerificationMethodPublicKey-Dz3Z2B9t-C2YmGxIc.js} +1 -1
  22. package/dist/sha256-Dr-8c5iF-C1PUWFZm.js +1 -0
  23. package/dist/webcrypto.es-InUVnvpc-B87Lqr9a.js +40 -0
  24. package/dist/x25519-KEey2Qx1-NSl6svWQ.js +1 -0
  25. package/package.json +2 -2
  26. package/dist/EcdsaSecp256k1Signature2019-CBV4BwnM-C2qGlq2W.js +0 -4
  27. package/dist/Ed25519Signature2020-MQoWd113-PNuci9U2.js +0 -52
  28. package/dist/HashlinkVerifier-DykIKn5i-CYewU55u.js +0 -11
  29. package/dist/MerkleProof2019-DpwH-snR-ClzVR6uC.js +0 -3
  30. package/dist/checkCredentialSchemaConformity-DOGmtCq0-CnEpCN-s.js +0 -1
  31. package/dist/did-key-common.esm-C42sQiXe-DN5hgDGM.js +0 -9
  32. package/dist/did-key-ed25519.esm-CO7qImeZ-BR5JRBUU.js +0 -1
  33. package/dist/did-key-secp256k1.esm-BblZ1xRe-4Ak_uTKC.js +0 -1
  34. package/dist/elliptic-6eMlPaPZ-CGOSt2J1.js +0 -1
  35. package/dist/index-BZds3Ljo-CHN5LgUq.js +0 -1
  36. package/dist/index-Dzjg2qbR-DK7tzt5T.js +0 -22
  37. package/dist/index-VOqA2-xz-CKqwdkuf.js +0 -70
  38. package/dist/index-WN144sZ6-DKm58evR.js +0 -3
  39. package/dist/jsonld-BpvX3DRL-qZrjsUmJ.js +0 -75
  40. package/dist/sha256-D_qJpPFT-BYFBxJ7m.js +0 -1
  41. package/dist/webcrypto.es-DQnPRx8R-BJSH271h.js +0 -41
  42. package/dist/x25519-Dm-l65ld-DcUk09rC.js +0 -1
  43. /package/dist/{checkRevocationStatusList2021-CNtaPjVp-XCu3zkCJ.js → checkRevocationStatusList2021-BEXdT3FD-XCu3zkCJ.js} +0 -0
  44. /package/dist/{ensureNotRevoked-D9_PlMpD-DvMIgM4L.js → ensureNotRevoked-zJYOGU17-DvMIgM4L.js} +0 -0
  45. /package/dist/{index-CWugL4dz-Dgus2xdV.js → index-CgNQmXGo-Dgus2xdV.js} +0 -0
@@ -0,0 +1 @@
1
+ import{r}from"./index-DsWS3N1O-C0eXpZGn.js";import{D as a,V as o,A as e,b as t}from"./main.js";var s=r();async function i(r,i){Array.isArray(i)||(i=[i]);for(const c of i){const i=await a({url:c.id});let n;try{n=JSON.parse(i)}catch(r){throw console.error(r),new Error(`Specified schema at url: ${c.id} could not be parsed`)}if(!s.validator(n)(r))throw new o(e.checkCredentialSchemaConformity,t("errors","checkCredentialSchemaConformity"))}}export{i as default};
@@ -1 +1 @@
1
- import{V as o,A as t,d as i}from"./main.js";import{b as r}from"./index-CWugL4dz-Dgus2xdV.js";function n(n,e=""){const s=function(o){return o.id}(n);if(s!==e.split("#")[0])throw new o(t.controlVerificationMethod,`${r} - ${i.i18n.getText("errors","controlVerificationMethod")}`)}export{n as default};
1
+ import{V as o,A as t,d as i}from"./main.js";import{b as r}from"./index-CgNQmXGo-Dgus2xdV.js";function n(n,e=""){const s=function(o){return o.id}(n);if(s!==e.split("#")[0])throw new o(t.controlVerificationMethod,`${r} - ${i.i18n.getText("errors","controlVerificationMethod")}`)}export{n as default};
@@ -0,0 +1,9 @@
1
+ import{p as t,B as e}from"./main.js";import{j as r}from"./jsonld-CkyvX_Vg-C61cS9xX.js";var i,o={},n={},c={};function s(){if(i)return c;function t(t){const e=[];for(const r of t)e.indexOf(r)<0&&e.push(r);return e}return i=1,Object.defineProperty(c,"__esModule",{value:!0}),c.uniq=c.recursivePartialOverride=void 0,c.recursivePartialOverride=function e(r,i){if(null==i)return r;const o=Object.getPrototypeOf({});if(Object.getPrototypeOf(i)!=o)return i;let n=Object.assign({},r),c=Object.keys(i);const s=t(Object.keys(n).concat(c));for(const t of s)if(c.indexOf(t)>=0){const r=i[t];if(null!=r&&"object"==typeof r){const i=n[t];n[t]=e(i,r)}else n[t]=r}return n},c.uniq=t,c}var a,d,p,u,y,h,l,g,w,f,v,m,b={};function x(){if(d)return a;d=1;var t=Object.prototype.toString;function e(t){return"function"==typeof t.constructor?t.constructor.name:null}return a=function(r){if(void 0===r)return"undefined";if(null===r)return"null";var i=typeof r;if("boolean"===i)return"boolean";if("string"===i)return"string";if("number"===i)return"number";if("symbol"===i)return"symbol";if("function"===i)return"GeneratorFunction"===e(r)?"generatorfunction":"function";if(function(t){return Array.isArray?Array.isArray(t):t instanceof Array}(r))return"array";if(function(t){if(t.constructor&&"function"==typeof t.constructor.isBuffer)return t.constructor.isBuffer(t);return!1}(r))return"buffer";if(function(t){try{if("number"==typeof t.length&&"function"==typeof t.callee)return!0}catch(t){if(-1!==t.message.indexOf("callee"))return!0}return!1}(r))return"arguments";if(function(t){return t instanceof Date||"function"==typeof t.toDateString&&"function"==typeof t.getDate&&"function"==typeof t.setDate}(r))return"date";if(function(t){return t instanceof Error||"string"==typeof t.message&&t.constructor&&"number"==typeof t.constructor.stackTraceLimit}(r))return"error";if(function(t){return t instanceof RegExp||"string"==typeof t.flags&&"boolean"==typeof t.ignoreCase&&"boolean"==typeof t.multiline&&"boolean"==typeof t.global}(r))return"regexp";switch(e(r)){case"Symbol":return"symbol";case"Promise":return"promise";case"WeakMap":return"weakmap";case"WeakSet":return"weakset";case"Map":return"map";case"Set":return"set";case"Int8Array":return"int8array";case"Uint8Array":return"uint8array";case"Uint8ClampedArray":return"uint8clampedarray";case"Int16Array":return"int16array";case"Uint16Array":return"uint16array";case"Int32Array":return"int32array";case"Uint32Array":return"uint32array";case"Float32Array":return"float32array";case"Float64Array":return"float64array"}if(function(t){return"function"==typeof t.throw&&"function"==typeof t.return&&"function"==typeof t.next}(r))return"generator";switch(i=t.call(r)){case"[object Object]":return"object";case"[object Map Iterator]":return"mapiterator";case"[object Set Iterator]":return"setiterator";case"[object String Iterator]":return"stringiterator";case"[object Array Iterator]":return"arrayiterator"}return i.slice(8,-1).toLowerCase().replace(/\s/g,"")}}function _(){if(u)return p;u=1;const t=Symbol.prototype.valueOf,r=x();return p=function(i,o){switch(r(i)){case"array":return i.slice();case"object":return Object.assign({},i);case"date":return new i.constructor(Number(i));case"map":return new Map(i);case"set":return new Set(i);case"buffer":return function(t){const r=t.length,i=e.allocUnsafe?e.allocUnsafe(r):e.from(r);return t.copy(i),i}(i);case"symbol":return function(e){return t?Object(t.call(e)):{}}(i);case"arraybuffer":return function(t){const e=new t.constructor(t.byteLength);return new Uint8Array(e).set(new Uint8Array(t)),e}(i);case"float32array":case"float64array":case"int16array":case"int32array":case"int8array":case"uint16array":case"uint32array":case"uint8clampedarray":case"uint8array":return function(t){return new t.constructor(t.buffer,t.byteOffset,t.length)}(i);case"regexp":return function(t){const e=void 0!==t.flags?t.flags:/\w+$/.exec(t)||void 0,r=new t.constructor(t.source,e);return r.lastIndex=t.lastIndex,r}(i);case"error":return Object.create(i);default:return i}}}
2
+ /*!
3
+ * isobject <https://github.com/jonschlinkert/isobject>
4
+ *
5
+ * Copyright (c) 2014-2017, Jon Schlinkert.
6
+ * Released under the MIT License.
7
+ */function M(){if(g)return l;g=1;var t=h?y:(h=1,y=function(t){return null!=t&&"object"==typeof t&&!1===Array.isArray(t)});function e(e){return!0===t(e)&&"[object Object]"===Object.prototype.toString.call(e)}return l=function(t){var r,i;return!1!==e(t)&&("function"==typeof(r=t.constructor)&&(!1!==e(i=r.prototype)&&!1!==i.hasOwnProperty("isPrototypeOf")))}}function K(){if(f)return w;f=1;const t=_(),e=x(),r=M();function i(o,n){switch(e(o)){case"object":return function(t,e){if("function"==typeof e)return e(t);if(e||r(t)){const r=new t.constructor;for(let o in t)r[o]=i(t[o],e);return r}return t}(o,n);case"array":return function(t,e){const r=new t.constructor(t.length);for(let o=0;o<t.length;o++)r[o]=i(t[o],e);return r}(o,n);default:return t(o)}}return w=i}function E(){if(v)return b;v=1,Object.defineProperty(b,"__esModule",{value:!0}),b.makeFactoryWithRequired=b.makeFactory=b.each=b.val=b.Factory=b.Derived=b.Generator=void 0;const t=s(),e=K();class r{constructor(t){this.func=t}build(t){return this.func(t)}}b.Generator=r;class i{constructor(t){this.func=t}build(t,e){return this.func(t,e)}}b.Derived=i;class o{constructor(o,n){this.builder=o,this.config=n,this.getStartingSequenceNumber=()=>this.config&&this.config.startingSequenceNumber||0,this.build=o=>{const n=this.seqNum;this.seqNum++;const c=function(t,o){const n={},c=Object.getOwnPropertyNames(o),s=[];for(const a of c){const c=o[a];let d=c;c&&"object"==typeof c&&(c.constructor===r?d=c.build(t):c.constructor==i?s.push({key:a,derived:c}):d=e(c)),n[a]=d}return{value:n,derived:s}}(n,this.builder);let s=Object.assign({},c.value);o&&(s=t.recursivePartialOverride(s,o));const a=Object.keys(o||{});for(const t of c.derived)a.indexOf(t.key)<0&&(s[t.key]=t.derived.build(s,n));return s},this.buildList=(t,e)=>{const r=Array(t);for(let i=0;i<t;i++)r[i]=this.build(e);return r},this.seqNum=this.getStartingSequenceNumber()}resetSequenceNumber(){this.seqNum=this.getStartingSequenceNumber()}extend(t){const e=Object.assign({},this.builder,t);return new o(e,this.config)}combine(t){const e=Object.assign({},this.builder,t.builder);return new o(e,this.config)}withDerivation(t,e){const r={};return r[t]=new i(e),this.extend(r)}withDerivation1(t,e,r){const o={};return o[e]=new i(((e,i)=>r(e[t[0]],i))),this.extend(o)}withDerivation2(t,e,r){const o={};return o[e]=new i(((e,i)=>r(e[t[0]],e[t[1]],i))),this.extend(o)}withDerivation3(t,e,r){const o={};return o[e]=new i(((e,i)=>r(e[t[0]],e[t[1]],e[t[2]],i))),this.extend(o)}withDerivation4(t,e,r){const o={};return o[e]=new i(((e,i)=>r(e[t[0]],e[t[1]],e[t[2]],e[t[3]],i))),this.extend(o)}withDerivation5(t,e,r){const o={};return o[e]=new i(((e,i)=>r(e[t[0]],e[t[1]],e[t[2]],e[t[3]],e[t[4]],i))),this.extend(o)}}return b.Factory=o,b.val=function(t){return new r((()=>t))},b.each=function(t){return new r(t)},b.makeFactory=function(t,e){return new o(t,e)},b.makeFactoryWithRequired=function(t,e){return new o(t,e)},b}function S(){if(m)return n;m=1;var t=n&&n.__awaiter||function(t,e,r,i){return new(r||(r=Promise))((function(o,n){function c(t){try{a(i.next(t))}catch(t){n(t)}}function s(t){try{a(i.throw(t))}catch(t){n(t)}}function a(t){var e;t.done?o(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(c,s)}a((i=i.apply(t,e||[])).next())}))};Object.defineProperty(n,"__esModule",{value:!0}),n.makeFactoryFromSync=n.makeFactoryWithRequired=n.makeFactory=n.each=n.val=n.TransformFactory=n.Factory=n.Derived=n.Generator=n.lift=void 0;const e=s(),r=E(),i=K();function o(t){return"function"==typeof t.then}function c(t){return o(t)?t:Promise.resolve(t)}n.lift=c;class a{constructor(t){this.func=t}build(t){return c(this.func(t))}}n.Generator=a;class d{constructor(t){this.func=t}build(t,e){return c(this.func(t,e))}}n.Derived=d;class p{constructor(n,s){this.builder=n,this.config=s,this.getStartingSequenceNumber=()=>this.config&&this.config.startingSequenceNumber||0,this.build=n=>t(this,void 0,void 0,(function*(){const s=this.seqNum;this.seqNum++;const p=yield function(e,n){return t(this,void 0,void 0,(function*(){const t={},c=Object.getOwnPropertyNames(n),s=[];for(const p of c){const c=n[p];let u=c;c&&"object"==typeof c&&(o(c)?u=yield c:c.constructor===a?u=yield c.build(e):c.constructor==d?s.push({key:p,derived:c}):c.constructor===r.Generator?u=c.build(e):c.constructor==r.Derived?s.push({key:p,derived:new d(c.func)}):u=i(c)),t[p]=u}return{value:t,derived:s}}))}(s,this.builder);let u=Object.assign({},p.value);n&&(u=e.recursivePartialOverride(u,n));const y=Object.keys(n||{});for(const t of p.derived)y.indexOf(t.key)<0&&(u[t.key]=yield t.derived.build(u,s));return c(u)})),this.buildList=(e,r)=>t(this,void 0,void 0,(function*(){const t=Array(e);for(let i=0;i<e;i++)t[i]=yield this.build(r);return t})),this.seqNum=this.getStartingSequenceNumber()}resetSequenceNumber(){this.seqNum=this.getStartingSequenceNumber()}extend(t){const e=Object.assign({},this.builder,t);return new p(e,this.config)}combine(t){const e=Object.assign({},this.builder,t.builder);return new p(e,this.config)}transform(t){return new u(this,t)}withDerivation(t,e){const r={};return r[t]=new d(e),this.extend(r)}withDerivation1(t,e,r){const i={};return i[e]=new d(((e,i)=>r(e[t[0]],i))),this.extend(i)}withDerivation2(t,e,r){const i={};return i[e]=new d(((e,i)=>r(e[t[0]],e[t[1]],i))),this.extend(i)}withDerivation3(t,e,r){const i={};return i[e]=new d(((e,i)=>r(e[t[0]],e[t[1]],e[t[2]],i))),this.extend(i)}withDerivation4(t,e,r){const i={};return i[e]=new d(((e,i)=>r(e[t[0]],e[t[1]],e[t[2]],e[t[3]],i))),this.extend(i)}withDerivation5(t,e,r){const i={};return i[e]=new d(((e,i)=>r(e[t[0]],e[t[1]],e[t[2]],e[t[3]],e[t[4]],i))),this.extend(i)}}n.Factory=p;class u{constructor(e,r){this.inner=e,this.transform=r,this.build=e=>t(this,void 0,void 0,(function*(){const t=yield this.inner.build(e);return yield c(this.transform(t))})),this.buildList=(e,r)=>t(this,void 0,void 0,(function*(){const t=yield this.inner.buildList(e,r);return Promise.all(t.map(this.transform).map(c))}))}}return n.TransformFactory=u,n.val=function(t){return new a((()=>t))},n.each=function(t){return new a(t)},n.makeFactory=function(t,e){return new p(t,e)},n.makeFactoryWithRequired=function(t,e){return new p(t,e)},n.makeFactoryFromSync=function(t,e){return new p(t,e)},n}var L,k,T={};function P(){if(L)return T;L=1;var t=T&&T.__awaiter||function(t,e,r,i){return new(r||(r=Promise))((function(o,n){function c(t){try{a(i.next(t))}catch(t){n(t)}}function s(t){try{a(i.throw(t))}catch(t){n(t)}}function a(t){var e;t.done?o(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(c,s)}a((i=i.apply(t,e||[])).next())}))};Object.defineProperty(T,"__esModule",{value:!0}),T.Pipeline=void 0;const e=S();class r{constructor(t){this.current=t}static start(){return new r(Promise.resolve({}))}addValues(i){return new r(this.current.then((r=>t(this,void 0,void 0,(function*(){const t="function"==typeof i?yield e.lift(i(r)):i;return Object.assign(Object.assign({},r),t)})))))}addFactoryFunc(i,o,n){return new r(this.current.then((r=>t(this,void 0,void 0,(function*(){const t="function"==typeof n?yield e.lift(n(r)):n,c=yield i(t),s={};return s[o]=c,Object.assign(Object.assign({},r),s)})))))}addFactory(t,e,r){return this.addFactoryFunc((e=>t.build(e)),e,r)}addTxFactory(t,e,r){return this.addFactoryFunc((e=>t.build(e)),e,r)}then(t,e){return this.current.then(t,e)}}return T.Pipeline=r,T}var O=(k||(k=1,function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.makeFactory=t.each=t.val=t.Factory=t.Derived=t.Generator=t.Pipeline=t.Sync=t.Async=void 0;const e=S();t.Async=e;const r=E();t.Sync=r;const i=P();t.Pipeline=i;var o=E();Object.defineProperty(t,"Generator",{enumerable:!0,get:function(){return o.Generator}}),Object.defineProperty(t,"Derived",{enumerable:!0,get:function(){return o.Derived}}),Object.defineProperty(t,"Factory",{enumerable:!0,get:function(){return o.Factory}}),Object.defineProperty(t,"val",{enumerable:!0,get:function(){return o.val}}),Object.defineProperty(t,"each",{enumerable:!0,get:function(){return o.each}}),Object.defineProperty(t,"makeFactory",{enumerable:!0,get:function(){return o.makeFactory}})}(o)),o);function D(t,e,r,i,o,n,c){try{var s=t[n](c),a=s.value}catch(t){return void r(t)}s.done?e(a):Promise.resolve(a).then(i,o)}function A(t){return function(){var e=this,r=arguments;return new Promise((function(i,o){var n=t.apply(e,r);function c(t){D(n,i,o,c,s,"next",t)}function s(t){D(n,i,o,c,s,"throw",t)}c(void 0)}))}}function j(){return j=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(t[i]=r[i])}return t},j.apply(this,arguments)}var X,N,V,R,I=(X=function(t){var e=function(t){var e,r=Object.prototype,i=r.hasOwnProperty,o="function"==typeof Symbol?Symbol:{},n=o.iterator||"@@iterator",c=o.asyncIterator||"@@asyncIterator",s=o.toStringTag||"@@toStringTag";function a(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{a({},"")}catch(t){a=function(t,e,r){return t[e]=r}}function d(t,e,r,i){var o=e&&e.prototype instanceof w?e:w,n=Object.create(o.prototype),c=new k(i||[]);return n._invoke=function(t,e,r){var i=u;return function(o,n){if(i===h)throw new Error("Generator is already running");if(i===l){if("throw"===o)throw n;return P()}for(r.method=o,r.arg=n;;){var c=r.delegate;if(c){var s=E(c,r);if(s){if(s===g)continue;return s}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(i===u)throw i=l,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);i=h;var a=p(t,e,r);if("normal"===a.type){if(i=r.done?l:y,a.arg===g)continue;return{value:a.arg,done:r.done}}"throw"===a.type&&(i=l,r.method="throw",r.arg=a.arg)}}}(t,r,c),n}function p(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=d;var u="suspendedStart",y="suspendedYield",h="executing",l="completed",g={};function w(){}function f(){}function v(){}var m={};m[n]=function(){return this};var b=Object.getPrototypeOf,x=b&&b(b(T([])));x&&x!==r&&i.call(x,n)&&(m=x);var _=v.prototype=w.prototype=Object.create(m);function M(t){["next","throw","return"].forEach((function(e){a(t,e,(function(t){return this._invoke(e,t)}))}))}function K(t,e){function r(o,n,c,s){var a=p(t[o],t,n);if("throw"!==a.type){var d=a.arg,u=d.value;return u&&"object"==typeof u&&i.call(u,"__await")?e.resolve(u.__await).then((function(t){r("next",t,c,s)}),(function(t){r("throw",t,c,s)})):e.resolve(u).then((function(t){d.value=t,c(d)}),(function(t){return r("throw",t,c,s)}))}s(a.arg)}var o;this._invoke=function(t,i){function n(){return new e((function(e,o){r(t,i,e,o)}))}return o=o?o.then(n,n):n()}}function E(t,r){var i=t.iterator[r.method];if(i===e){if(r.delegate=null,"throw"===r.method){if(t.iterator.return&&(r.method="return",r.arg=e,E(t,r),"throw"===r.method))return g;r.method="throw",r.arg=new TypeError("The iterator does not provide a 'throw' method")}return g}var o=p(i,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,g;var n=o.arg;return n?n.done?(r[t.resultName]=n.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,g):n:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function S(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function L(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function k(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(S,this),this.reset(!0)}function T(t){if(t){var r=t[n];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,c=function r(){for(;++o<t.length;)if(i.call(t,o))return r.value=t[o],r.done=!1,r;return r.value=e,r.done=!0,r};return c.next=c}}return{next:P}}function P(){return{value:e,done:!0}}return f.prototype=_.constructor=v,v.constructor=f,f.displayName=a(v,s,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===f||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,v):(t.__proto__=v,a(t,s,"GeneratorFunction")),t.prototype=Object.create(_),t},t.awrap=function(t){return{__await:t}},M(K.prototype),K.prototype[c]=function(){return this},t.AsyncIterator=K,t.async=function(e,r,i,o,n){void 0===n&&(n=Promise);var c=new K(d(e,r,i,o),n);return t.isGeneratorFunction(r)?c:c.next().then((function(t){return t.done?t.value:c.next()}))},M(_),a(_,s,"Generator"),_[n]=function(){return this},_.toString=function(){return"[object Generator]"},t.keys=function(t){var e=[];for(var r in t)e.push(r);return e.reverse(),function r(){for(;e.length;){var i=e.pop();if(i in t)return r.value=i,r.done=!1,r}return r.done=!0,r}},t.values=T,k.prototype={constructor:k,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(L),!t)for(var r in this)"t"===r.charAt(0)&&i.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function o(i,o){return s.type="throw",s.arg=t,r.next=i,o&&(r.method="next",r.arg=e),!!o}for(var n=this.tryEntries.length-1;n>=0;--n){var c=this.tryEntries[n],s=c.completion;if("root"===c.tryLoc)return o("end");if(c.tryLoc<=this.prev){var a=i.call(c,"catchLoc"),d=i.call(c,"finallyLoc");if(a&&d){if(this.prev<c.catchLoc)return o(c.catchLoc,!0);if(this.prev<c.finallyLoc)return o(c.finallyLoc)}else if(a){if(this.prev<c.catchLoc)return o(c.catchLoc,!0)}else{if(!d)throw new Error("try statement without catch or finally");if(this.prev<c.finallyLoc)return o(c.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&i.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var n=o;break}}n&&("break"===t||"continue"===t)&&n.tryLoc<=e&&e<=n.finallyLoc&&(n=null);var c=n?n.completion:{};return c.type=t,c.arg=e,n?(this.method="next",this.next=n.finallyLoc,g):this.complete(c)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),g},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),L(r),g}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var i=r.completion;if("throw"===i.type){var o=i.arg;L(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,i){return this.delegate={iterator:T(t),resultName:r,nextLoc:i},"next"===this.method&&(this.arg=e),g}},t}(t.exports);try{regeneratorRuntime=e}catch(t){Function("r","regeneratorRuntime = r")(e)}},X(N={exports:{}},N.exports),N.exports),U={representations:{},addRepresentation:function(t){return this.representations=j({},this.representations,t),this},entries:{},assign:function(t){return this.entries=j({},this.entries,t),this},produce:function(){var t=A(I.mark((function t(e,r){return I.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!this.representations[e]){t.next=2;break}return t.abrupt("return",this.representations[e].produce(this.entries,r));case 2:throw new Error("Cannot produce unsupported content type: "+e);case 3:case"end":return t.stop()}}),t,this)})));return function(e,r){return t.apply(this,arguments)}}(),consume:function(){var t=A(I.mark((function t(e,r,i){return I.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!this.representations[e]){t.next=5;break}return t.next=3,this.representations[e].consume(r,i);case 3:return this.entries=t.sent,t.abrupt("return",this);case 5:throw new Error("Cannot consume unsupported content type: "+e);case 6:case"end":return t.stop()}}),t,this)})));return function(e,r,i){return t.apply(this,arguments)}}()},B=O.Sync.makeFactory(U);function G(){if(R)return V;R=1;return V={DID_CONTEXT_V1_URL:"https://www.w3.org/ns/did/v1",DID_CONTEXT_TRANSMUTE_V1_URL:"https://ns.did.ai/transmute/v1",DID_CONTEXT_TRANSMUTE_PGP_2021_V1_URL:"https://ns.did.ai/suites/pgp-2021/v1",DID_CONTEXT_TRANSMUTE_JWS_2020_V1_URL:"https://ns.did.ai/suites/jws-2020/v1",DID_CONTEXT_TRANSMUTE_SECP256K1_2020_V1_URL:"https://ns.did.ai/suites/secp256k1-2020/v1",DID_CONTEXT_TRANSMUTE_BLS12381_2020_V1_URL:"https://ns.did.ai/suites/bls12381-2020/v1",DID_CONTEXT_TRANSMUTE_ED25519_2020_V1_URL:"https://ns.did.ai/suites/ed25519-2020/v1",DID_CONTEXT_TRANSMUTE_X25519_2020_V1_URL:"https://ns.did.ai/suites/x25519-2020/v1",DID_CONTEXT_TRANSMUTE_SECP256K1_2019_V1_URL:"https://ns.did.ai/suites/secp256k1-2019/v1",DID_CONTEXT_TRANSMUTE_ED25519_2018_V1_URL:"https://ns.did.ai/suites/ed25519-2018/v1",DID_CONTEXT_TRANSMUTE_X25519_2018_V1_URL:"https://ns.did.ai/suites/x25519-2018/v1"}}var C,F,J={"@context":{"@protected":!0,id:"@id",type:"@type",alsoKnownAs:{"@id":"https://www.w3.org/ns/activitystreams#alsoKnownAs","@type":"@id"},assertionMethod:{"@id":"https://w3id.org/security#assertionMethod","@type":"@id","@container":"@set"},authentication:{"@id":"https://w3id.org/security#authenticationMethod","@type":"@id","@container":"@set"},capabilityDelegation:{"@id":"https://w3id.org/security#capabilityDelegationMethod","@type":"@id","@container":"@set"},capabilityInvocation:{"@id":"https://w3id.org/security#capabilityInvocationMethod","@type":"@id","@container":"@set"},controller:{"@id":"https://w3id.org/security#controller","@type":"@id"},keyAgreement:{"@id":"https://w3id.org/security#keyAgreementMethod","@type":"@id","@container":"@set"},service:{"@id":"https://www.w3.org/ns/did#service","@type":"@id","@context":{"@protected":!0,id:"@id",type:"@type",serviceEndpoint:{"@id":"https://www.w3.org/ns/did#serviceEndpoint","@type":"@id"}}},verificationMethod:{"@id":"https://w3id.org/security#verificationMethod","@type":"@id"}}},W={"@context":[{"@version":1.1},"https://www.w3.org/ns/did/v1",{JsonWebKey2020:"https://w3id.org/security#JsonWebKey2020",Ed25519VerificationKey2018:"https://w3id.org/security#Ed25519VerificationKey2018",X25519KeyAgreementKey2019:"https://w3id.org/security#X25519KeyAgreementKey2019",publicKeyJwk:{"@id":"https://w3id.org/security#publicKeyJwk","@type":"@json"},publicKeyBase58:{"@id":"https://w3id.org/security#publicKeyBase58"}}]},q={"@context":[{"@protected":!0,privateKeyPgp:"https://w3id.org/security#privateKeyPgp",proof:{"@id":"https://w3id.org/security#proof","@type":"@id","@container":"@graph"},PgpVerificationKey2021:{"@id":"https://w3id.org/security#PgpVerificationKey2021","@context":{"@protected":!0,id:"@id",type:"@type",publicKeyPgp:"https://w3id.org/security#publicKeyPgp"}},PgpSignature2021:{"@id":"https://w3id.org/security#PgpSignature2021","@context":{"@protected":!0,id:"@id",type:"@type",challenge:"https://w3id.org/security#challenge",created:{"@id":"http://purl.org/dc/terms/created","@type":"http://www.w3.org/2001/XMLSchema#dateTime"},domain:"https://w3id.org/security#domain",expires:{"@id":"https://w3id.org/security#expiration","@type":"http://www.w3.org/2001/XMLSchema#dateTime"},nonce:"https://w3id.org/security#nonce",proofPurpose:{"@id":"https://w3id.org/security#proofPurpose","@type":"@vocab","@context":{"@version":1.1,"@protected":!0,id:"@id",type:"@type",assertionMethod:{"@id":"https://w3id.org/security#assertionMethod","@type":"@id","@container":"@set"},authentication:{"@id":"https://w3id.org/security#authenticationMethod","@type":"@id","@container":"@set"},capabilityInvocation:{"@id":"https://w3id.org/security#capabilityInvocationMethod","@type":"@id","@container":"@set"},capabilityDelegation:{"@id":"https://w3id.org/security#capabilityDelegationMethod","@type":"@id","@container":"@set"},keyAgreement:{"@id":"https://w3id.org/security#keyAgreementMethod","@type":"@id","@container":"@set"}}},proofValue:{"@id":"https://w3id.org/security#proofValue"},verificationMethod:{"@id":"https://w3id.org/security#verificationMethod","@type":"@id"}}}}]},Y={"@context":{id:"@id",type:"@type","@protected":!0,proof:{"@id":"https://w3id.org/security#proof","@type":"@id","@container":"@graph"},JsonWebKey2020:{"@id":"https://w3id.org/security#JsonWebKey2020","@context":{"@protected":!0,id:"@id",type:"@type",controller:{"@id":"https://w3id.org/security#controller","@type":"@id"},revoked:{"@id":"https://w3id.org/security#revoked","@type":"http://www.w3.org/2001/XMLSchema#dateTime"},publicKeyJwk:{"@id":"https://w3id.org/security#publicKeyJwk","@type":"@json"}}},JsonWebSignature2020:{"@id":"https://w3id.org/security#JsonWebSignature2020","@context":{"@protected":!0,id:"@id",type:"@type",challenge:"https://w3id.org/security#challenge",created:{"@id":"http://purl.org/dc/terms/created","@type":"http://www.w3.org/2001/XMLSchema#dateTime"},domain:"https://w3id.org/security#domain",expires:{"@id":"https://w3id.org/security#expiration","@type":"http://www.w3.org/2001/XMLSchema#dateTime"},nonce:"https://w3id.org/security#nonce",proofPurpose:{"@id":"https://w3id.org/security#proofPurpose","@type":"@vocab","@context":{"@protected":!0,id:"@id",type:"@type",assertionMethod:{"@id":"https://w3id.org/security#assertionMethod","@type":"@id","@container":"@set"},authentication:{"@id":"https://w3id.org/security#authenticationMethod","@type":"@id","@container":"@set"},capabilityInvocation:{"@id":"https://w3id.org/security#capabilityInvocationMethod","@type":"@id","@container":"@set"},capabilityDelegation:{"@id":"https://w3id.org/security#capabilityDelegationMethod","@type":"@id","@container":"@set"},keyAgreement:{"@id":"https://w3id.org/security#keyAgreementMethod","@type":"@id","@container":"@set"}}},jws:{"@id":"https://w3id.org/security#jws"},verificationMethod:{"@id":"https://w3id.org/security#verificationMethod","@type":"@id"}}}}},z={"@context":{"@version":1.1,id:"@id",type:"@type",privateKeyJwk:{"@id":"https://w3id.org/security/#privateKeyJwk","@type":"@json"},proof:{"@id":"https://w3id.org/security#proof","@type":"@id","@container":"@graph"},EcdsaSecp256k1RecoveryMethod2020:{"@id":"https://w3id.org/security#EcdsaSecp256k1RecoveryMethod2020","@context":{"@protected":!0,id:"@id",type:"@type",controller:{"@id":"https://w3id.org/security#controller","@type":"@id"},revoked:{"@id":"https://w3id.org/security#revoked","@type":"http://www.w3.org/2001/XMLSchema#dateTime"},blockchainAccountId:{"@id":"https://w3id.org/security#blockchainAccountId"},ethereumAddress:{"@id":"https://w3id.org/security#ethereumAddress"},publicKeyJwk:{"@id":"https://w3id.org/security#publicKeyJwk","@type":"@json"},publicKeyBase58:{"@id":"https://w3id.org/security#publicKeyBase58"},publicKeyHex:{"@id":"https://w3id.org/security#publicKeyHex"},publicKeyMultibase:{"@id":"https://w3id.org/security#publicKeyMultibase","@type":"https://w3id.org/security#multibase"}}},EcdsaSecp256k1RecoverySignature2020:{"@id":"https://w3id.org/security#EcdsaSecp256k1RecoverySignature2020","@context":{"@protected":!0,id:"@id",type:"@type",challenge:"https://w3id.org/security#challenge",created:{"@id":"http://purl.org/dc/terms/created","@type":"http://www.w3.org/2001/XMLSchema#dateTime"},domain:"https://w3id.org/security#domain",expires:{"@id":"https://w3id.org/security#expiration","@type":"http://www.w3.org/2001/XMLSchema#dateTime"},nonce:"https://w3id.org/security#nonce",proofPurpose:{"@id":"https://w3id.org/security#proofPurpose","@type":"@vocab","@context":{"@protected":!0,id:"@id",type:"@type",assertionMethod:{"@id":"https://w3id.org/security#assertionMethod","@type":"@id","@container":"@set"},authentication:{"@id":"https://w3id.org/security#authenticationMethod","@type":"@id","@container":"@set"},capabilityInvocation:{"@id":"https://w3id.org/security#capabilityInvocationMethod","@type":"@id","@container":"@set"},capabilityDelegation:{"@id":"https://w3id.org/security#capabilityDelegationMethod","@type":"@id","@container":"@set"},keyAgreement:{"@id":"https://w3id.org/security#keyAgreementMethod","@type":"@id","@container":"@set"}}},jws:{"@id":"https://w3id.org/security#jws"},verificationMethod:{"@id":"https://w3id.org/security#verificationMethod","@type":"@id"}}}}},H={"@context":{"@version":1.1,id:"@id",type:"@type",proof:{"@id":"https://w3id.org/security#proof","@type":"@id","@container":"@graph"},BbsBlsSignature2020:{"@id":"https://w3id.org/security#BbsBlsSignature2020","@context":{"@version":1.1,"@protected":!0,id:"@id",type:"@type",challenge:"https://w3id.org/security#challenge",created:{"@id":"http://purl.org/dc/terms/created","@type":"http://www.w3.org/2001/XMLSchema#dateTime"},domain:"https://w3id.org/security#domain",proofValue:"https://w3id.org/security#proofValue",nonce:"https://w3id.org/security#nonce",proofPurpose:{"@id":"https://w3id.org/security#proofPurpose","@type":"@vocab","@context":{"@version":1.1,"@protected":!0,id:"@id",type:"@type",assertionMethod:{"@id":"https://w3id.org/security#assertionMethod","@type":"@id","@container":"@set"},authentication:{"@id":"https://w3id.org/security#authenticationMethod","@type":"@id","@container":"@set"}}},verificationMethod:{"@id":"https://w3id.org/security#verificationMethod","@type":"@id"}}},BbsBlsSignatureProof2020:{"@id":"https://w3id.org/security#BbsBlsSignatureProof2020","@context":{"@version":1.1,"@protected":!0,id:"@id",type:"@type",challenge:"https://w3id.org/security#challenge",created:{"@id":"http://purl.org/dc/terms/created","@type":"http://www.w3.org/2001/XMLSchema#dateTime"},domain:"https://w3id.org/security#domain",nonce:"https://w3id.org/security#nonce",proofPurpose:{"@id":"https://w3id.org/security#proofPurpose","@type":"@vocab","@context":{"@version":1.1,"@protected":!0,id:"@id",type:"@type",sec:"https://w3id.org/security#",assertionMethod:{"@id":"https://w3id.org/security#assertionMethod","@type":"@id","@container":"@set"},authentication:{"@id":"https://w3id.org/security#authenticationMethod","@type":"@id","@container":"@set"}}},proofValue:"https://w3id.org/security#proofValue",verificationMethod:{"@id":"https://w3id.org/security#verificationMethod","@type":"@id"}}},Bls12381G1Key2020:{"@id":"https://w3id.org/security#Bls12381G1Key2020","@context":{"@protected":!0,id:"@id",type:"@type",controller:{"@id":"https://w3id.org/security#controller","@type":"@id"},revoked:{"@id":"https://w3id.org/security#revoked","@type":"http://www.w3.org/2001/XMLSchema#dateTime"},publicKeyJwk:{"@id":"https://w3id.org/security#publicKeyJwk","@type":"@json"},publicKeyBase58:{"@id":"https://w3id.org/security#publicKeyBase58"},publicKeyMultibase:{"@id":"https://w3id.org/security#publicKeyMultibase","@type":"https://w3id.org/security#multibase"}}},Bls12381G2Key2020:{"@id":"https://w3id.org/security#Bls12381G2Key2020","@context":{"@protected":!0,id:"@id",type:"@type",controller:{"@id":"https://w3id.org/security#controller","@type":"@id"},revoked:{"@id":"https://w3id.org/security#revoked","@type":"http://www.w3.org/2001/XMLSchema#dateTime"},publicKeyJwk:{"@id":"https://w3id.org/security#publicKeyJwk","@type":"@json"},publicKeyBase58:{"@id":"https://w3id.org/security#publicKeyBase58"},publicKeyMultibase:{"@id":"https://w3id.org/security#publicKeyMultibase","@type":"https://w3id.org/security#multibase"}}}}},$={"@context":{id:"@id",type:"@type","@protected":!0,proof:{"@id":"https://w3id.org/security#proof","@type":"@id","@container":"@graph"},Ed25519VerificationKey2020:{"@id":"https://w3id.org/security#Ed25519VerificationKey2020","@context":{"@protected":!0,id:"@id",type:"@type",controller:{"@id":"https://w3id.org/security#controller","@type":"@id"},revoked:{"@id":"https://w3id.org/security#revoked","@type":"http://www.w3.org/2001/XMLSchema#dateTime"},publicKeyMultibase:{"@id":"https://w3id.org/security#publicKeyMultibase","@type":"https://w3id.org/security#multibase"}}},Ed25519Signature2020:{"@id":"https://w3id.org/security#Ed25519Signature2020","@context":{"@protected":!0,id:"@id",type:"@type",challenge:"https://w3id.org/security#challenge",created:{"@id":"http://purl.org/dc/terms/created","@type":"http://www.w3.org/2001/XMLSchema#dateTime"},domain:"https://w3id.org/security#domain",expires:{"@id":"https://w3id.org/security#expiration","@type":"http://www.w3.org/2001/XMLSchema#dateTime"},nonce:"https://w3id.org/security#nonce",proofPurpose:{"@id":"https://w3id.org/security#proofPurpose","@type":"@vocab","@context":{"@protected":!0,id:"@id",type:"@type",assertionMethod:{"@id":"https://w3id.org/security#assertionMethod","@type":"@id","@container":"@set"},authentication:{"@id":"https://w3id.org/security#authenticationMethod","@type":"@id","@container":"@set"},capabilityInvocation:{"@id":"https://w3id.org/security#capabilityInvocationMethod","@type":"@id","@container":"@set"},capabilityDelegation:{"@id":"https://w3id.org/security#capabilityDelegationMethod","@type":"@id","@container":"@set"},keyAgreement:{"@id":"https://w3id.org/security#keyAgreementMethod","@type":"@id","@container":"@set"}}},proofValue:{"@id":"https://w3id.org/security#proofValue","@type":"https://w3id.org/security#multibase"},verificationMethod:{"@id":"https://w3id.org/security#verificationMethod","@type":"@id"}}}}},Q={"@context":{id:"@id",type:"@type","@protected":!0,X25519KeyAgreementKey2020:{"@id":"https://w3id.org/security#X25519KeyAgreementKey2020","@context":{"@protected":!0,id:"@id",type:"@type",controller:{"@id":"https://w3id.org/security#controller","@type":"@id"},revoked:{"@id":"https://w3id.org/security#revoked","@type":"http://www.w3.org/2001/XMLSchema#dateTime"},publicKeyMultibase:{"@id":"https://w3id.org/security#publicKeyMultibase","@type":"https://w3id.org/security#multibase"}}}}},Z={"@context":{id:"@id",type:"@type","@protected":!0,proof:{"@id":"https://w3id.org/security#proof","@type":"@id","@container":"@graph"},EcdsaSecp256k1VerificationKey2019:{"@id":"https://w3id.org/security#EcdsaSecp256k1VerificationKey2019","@context":{"@protected":!0,id:"@id",type:"@type",controller:{"@id":"https://w3id.org/security#controller","@type":"@id"},revoked:{"@id":"https://w3id.org/security#revoked","@type":"http://www.w3.org/2001/XMLSchema#dateTime"},blockchainAccountId:{"@id":"https://w3id.org/security#blockchainAccountId"},publicKeyJwk:{"@id":"https://w3id.org/security#publicKeyJwk","@type":"@json"},publicKeyBase58:{"@id":"https://w3id.org/security#publicKeyBase58"},publicKeyMultibase:{"@id":"https://w3id.org/security#publicKeyMultibase","@type":"https://w3id.org/security#multibase"}}},EcdsaSecp256k1Signature2019:{"@id":"https://w3id.org/security#EcdsaSecp256k1Signature2019","@context":{"@protected":!0,id:"@id",type:"@type",challenge:"https://w3id.org/security#challenge",created:{"@id":"http://purl.org/dc/terms/created","@type":"http://www.w3.org/2001/XMLSchema#dateTime"},domain:"https://w3id.org/security#domain",expires:{"@id":"https://w3id.org/security#expiration","@type":"http://www.w3.org/2001/XMLSchema#dateTime"},nonce:"https://w3id.org/security#nonce",proofPurpose:{"@id":"https://w3id.org/security#proofPurpose","@type":"@vocab","@context":{"@protected":!0,id:"@id",type:"@type",assertionMethod:{"@id":"https://w3id.org/security#assertionMethod","@type":"@id","@container":"@set"},authentication:{"@id":"https://w3id.org/security#authenticationMethod","@type":"@id","@container":"@set"},capabilityInvocation:{"@id":"https://w3id.org/security#capabilityInvocationMethod","@type":"@id","@container":"@set"},capabilityDelegation:{"@id":"https://w3id.org/security#capabilityDelegationMethod","@type":"@id","@container":"@set"},keyAgreement:{"@id":"https://w3id.org/security#keyAgreementMethod","@type":"@id","@container":"@set"}}},jws:{"@id":"https://w3id.org/security#jws"},verificationMethod:{"@id":"https://w3id.org/security#verificationMethod","@type":"@id"}}}}},tt={"@context":{id:"@id",type:"@type","@protected":!0,proof:{"@id":"https://w3id.org/security#proof","@type":"@id","@container":"@graph"},Ed25519VerificationKey2018:{"@id":"https://w3id.org/security#Ed25519VerificationKey2018","@context":{"@protected":!0,id:"@id",type:"@type",controller:{"@id":"https://w3id.org/security#controller","@type":"@id"},revoked:{"@id":"https://w3id.org/security#revoked","@type":"http://www.w3.org/2001/XMLSchema#dateTime"},publicKeyBase58:{"@id":"https://w3id.org/security#publicKeyBase58"}}},Ed25519Signature2018:{"@id":"https://w3id.org/security#Ed25519Signature2018","@context":{"@protected":!0,id:"@id",type:"@type",challenge:"https://w3id.org/security#challenge",created:{"@id":"http://purl.org/dc/terms/created","@type":"http://www.w3.org/2001/XMLSchema#dateTime"},domain:"https://w3id.org/security#domain",expires:{"@id":"https://w3id.org/security#expiration","@type":"http://www.w3.org/2001/XMLSchema#dateTime"},nonce:"https://w3id.org/security#nonce",proofPurpose:{"@id":"https://w3id.org/security#proofPurpose","@type":"@vocab","@context":{"@protected":!0,id:"@id",type:"@type",assertionMethod:{"@id":"https://w3id.org/security#assertionMethod","@type":"@id","@container":"@set"},authentication:{"@id":"https://w3id.org/security#authenticationMethod","@type":"@id","@container":"@set"},capabilityInvocation:{"@id":"https://w3id.org/security#capabilityInvocationMethod","@type":"@id","@container":"@set"},capabilityDelegation:{"@id":"https://w3id.org/security#capabilityDelegationMethod","@type":"@id","@container":"@set"},keyAgreement:{"@id":"https://w3id.org/security#keyAgreementMethod","@type":"@id","@container":"@set"}}},jws:{"@id":"https://w3id.org/security#jws"},verificationMethod:{"@id":"https://w3id.org/security#verificationMethod","@type":"@id"}}}}},et={"@context":{id:"@id",type:"@type","@protected":!0,X25519KeyAgreementKey2019:{"@id":"https://w3id.org/security#X25519KeyAgreementKey2019","@context":{"@protected":!0,id:"@id",type:"@type",controller:{"@id":"https://w3id.org/security#controller","@type":"@id"},revoked:{"@id":"https://w3id.org/security#revoked","@type":"http://www.w3.org/2001/XMLSchema#dateTime"},publicKeyBase58:{"@id":"https://w3id.org/security#publicKeyBase58"}}}}};var rt=function(){if(F)return C;F=1;const t=G(),e=new Map;return e.set(t.DID_CONTEXT_V1_URL,J),e.set(t.DID_CONTEXT_TRANSMUTE_V1_URL,W),e.set(t.DID_CONTEXT_TRANSMUTE_PGP_2021_V1_URL,q),e.set(t.DID_CONTEXT_TRANSMUTE_JWS_2020_V1_URL,Y),e.set(t.DID_CONTEXT_TRANSMUTE_SECP256K1_2020_V1_URL,z),e.set(t.DID_CONTEXT_TRANSMUTE_BLS12381_2020_V1_URL,H),e.set(t.DID_CONTEXT_TRANSMUTE_ED25519_2020_V1_URL,$),e.set(t.DID_CONTEXT_TRANSMUTE_X25519_2020_V1_URL,Q),e.set(t.DID_CONTEXT_TRANSMUTE_SECP256K1_2019_V1_URL,Z),e.set(t.DID_CONTEXT_TRANSMUTE_ED25519_2018_V1_URL,tt),e.set(t.DID_CONTEXT_TRANSMUTE_X25519_2018_V1_URL,et),C={constants:t,contexts:e}}(),it=function(t,e,r,i){void 0===e&&(e=""),void 0===r&&(r=""),void 0===i&&(i={}),this.ok=t,this.error={type:e,message:r,event:i}};function ot(){
8
+ /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */
9
+ ot=function(){return t};var t={},e=Object.prototype,r=e.hasOwnProperty,i="function"==typeof Symbol?Symbol:{},o=i.iterator||"@@iterator",n=i.asyncIterator||"@@asyncIterator",c=i.toStringTag||"@@toStringTag";function s(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(t){s=function(t,e,r){return t[e]=r}}function a(t,e,r,i){var o=e&&e.prototype instanceof u?e:u,n=Object.create(o.prototype),c=new M(i||[]);return n._invoke=function(t,e,r){var i="suspendedStart";return function(o,n){if("executing"===i)throw new Error("Generator is already running");if("completed"===i){if("throw"===o)throw n;return E()}for(r.method=o,r.arg=n;;){var c=r.delegate;if(c){var s=b(c,r);if(s){if(s===p)continue;return s}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===i)throw i="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);i="executing";var a=d(t,e,r);if("normal"===a.type){if(i=r.done?"completed":"suspendedYield",a.arg===p)continue;return{value:a.arg,done:r.done}}"throw"===a.type&&(i="completed",r.method="throw",r.arg=a.arg)}}}(t,r,c),n}function d(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=a;var p={};function u(){}function y(){}function h(){}var l={};s(l,o,(function(){return this}));var g=Object.getPrototypeOf,w=g&&g(g(K([])));w&&w!==e&&r.call(w,o)&&(l=w);var f=h.prototype=u.prototype=Object.create(l);function v(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function m(t,e){function i(o,n,c,s){var a=d(t[o],t,n);if("throw"!==a.type){var p=a.arg,u=p.value;return u&&"object"==typeof u&&r.call(u,"__await")?e.resolve(u.__await).then((function(t){i("next",t,c,s)}),(function(t){i("throw",t,c,s)})):e.resolve(u).then((function(t){p.value=t,c(p)}),(function(t){return i("throw",t,c,s)}))}s(a.arg)}var o;this._invoke=function(t,r){function n(){return new e((function(e,o){i(t,r,e,o)}))}return o=o?o.then(n,n):n()}}function b(t,e){var r=t.iterator[e.method];if(void 0===r){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,b(t,e),"throw"===e.method))return p;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return p}var i=d(r,t.iterator,e.arg);if("throw"===i.type)return e.method="throw",e.arg=i.arg,e.delegate=null,p;var o=i.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,p):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,p)}function x(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function _(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function M(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(x,this),this.reset(!0)}function K(t){if(t){var e=t[o];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var i=-1,n=function e(){for(;++i<t.length;)if(r.call(t,i))return e.value=t[i],e.done=!1,e;return e.value=void 0,e.done=!0,e};return n.next=n}}return{next:E}}function E(){return{value:void 0,done:!0}}return y.prototype=h,s(f,"constructor",h),s(h,"constructor",y),y.displayName=s(h,c,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===y||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,h):(t.__proto__=h,s(t,c,"GeneratorFunction")),t.prototype=Object.create(f),t},t.awrap=function(t){return{__await:t}},v(m.prototype),s(m.prototype,n,(function(){return this})),t.AsyncIterator=m,t.async=function(e,r,i,o,n){void 0===n&&(n=Promise);var c=new m(a(e,r,i,o),n);return t.isGeneratorFunction(r)?c:c.next().then((function(t){return t.done?t.value:c.next()}))},v(f),s(f,c,"Generator"),s(f,o,(function(){return this})),s(f,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var r in t)e.push(r);return e.reverse(),function r(){for(;e.length;){var i=e.pop();if(i in t)return r.value=i,r.done=!1,r}return r.done=!0,r}},t.values=K,M.prototype={constructor:M,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(_),!t)for(var e in this)"t"===e.charAt(0)&&r.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function i(r,i){return c.type="throw",c.arg=t,e.next=r,i&&(e.method="next",e.arg=void 0),!!i}for(var o=this.tryEntries.length-1;o>=0;--o){var n=this.tryEntries[o],c=n.completion;if("root"===n.tryLoc)return i("end");if(n.tryLoc<=this.prev){var s=r.call(n,"catchLoc"),a=r.call(n,"finallyLoc");if(s&&a){if(this.prev<n.catchLoc)return i(n.catchLoc,!0);if(this.prev<n.finallyLoc)return i(n.finallyLoc)}else if(s){if(this.prev<n.catchLoc)return i(n.catchLoc,!0)}else{if(!a)throw new Error("try statement without catch or finally");if(this.prev<n.finallyLoc)return i(n.finallyLoc)}}}},abrupt:function(t,e){for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var n=o;break}}n&&("break"===t||"continue"===t)&&n.tryLoc<=e&&e<=n.finallyLoc&&(n=null);var c=n?n.completion:{};return c.type=t,c.arg=e,n?(this.method="next",this.next=n.finallyLoc,p):this.complete(c)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),p},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),_(r),p}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var i=r.completion;if("throw"===i.type){var o=i.arg;_(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:K(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),p}},t}function nt(t,e,r,i,o,n,c){try{var s=t[n](c),a=s.value}catch(t){return void r(t)}s.done?e(a):Promise.resolve(a).then(i,o)}function ct(t){return function(){var e=this,r=arguments;return new Promise((function(i,o){var n=t.apply(e,r);function c(t){nt(n,i,o,c,s,"next",t)}function s(t){nt(n,i,o,c,s,"throw",t)}c(void 0)}))}}var st,at={},dt=void 0!==t&&null!=t.versions&&null!=t.versions.node?r.documentLoaders.node():r.documentLoaders.xhr(),pt=function(){var t=ct(ot().mark((function t(e){var r;return ot().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!(e in at)){t.next=2;break}return t.abrupt("return",{contextUrl:null,document:at[e],documentUrl:e});case 2:return t.next=4,dt(e);case 4:return r=t.sent,at[e]=r.document,t.abrupt("return",r);case 7:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),ut=function(){var t=ct(ot().mark((function t(e,i,o){var n,c,s,a;return ot().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return void 0===i&&(i=pt),void 0===o&&(o=!1),t.prev=2,n="string"==typeof e?JSON.parse(e):e,c=[],t.next=7,r.expand(n,{documentLoader:i,safe:o});case 7:return s=t.sent,t.next=10,r.compact(s,n["@context"],{documentLoader:i});case 10:if(0!==c.length){t.next=12;break}return t.abrupt("return",new it(!0));case 12:return t.abrupt("return",new it(!1,"MISSING_PROPERTIES_IN_CONTEXT",JSON.stringify(c)));case 15:return t.prev=15,t.t0=t.catch(2),t.abrupt("return",new it(!1,t.t0.name,t.t0.message,null==(a=t.t0.details)?void 0:a.event));case 18:case"end":return t.stop()}}),t,null,[[2,15]])})));return function(e,r,i){return t.apply(this,arguments)}}();function yt(){yt=function(){return e};var t,e={},r=Object.prototype,i=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},n="function"==typeof Symbol?Symbol:{},c=n.iterator||"@@iterator",s=n.asyncIterator||"@@asyncIterator",a=n.toStringTag||"@@toStringTag";function d(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{d({},"")}catch(t){d=function(t,e,r){return t[e]=r}}function p(t,e,r,i){var n=e&&e.prototype instanceof f?e:f,c=Object.create(n.prototype),s=new P(i||[]);return o(c,"_invoke",{value:S(t,r,s)}),c}function u(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=p;var y="suspendedStart",h="suspendedYield",l="executing",g="completed",w={};function f(){}function v(){}function m(){}var b={};d(b,c,(function(){return this}));var x=Object.getPrototypeOf,_=x&&x(x(O([])));_&&_!==r&&i.call(_,c)&&(b=_);var M=m.prototype=f.prototype=Object.create(b);function K(t){["next","throw","return"].forEach((function(e){d(t,e,(function(t){return this._invoke(e,t)}))}))}function E(t,e){function r(o,n,c,s){var a=u(t[o],t,n);if("throw"!==a.type){var d=a.arg,p=d.value;return p&&"object"==typeof p&&i.call(p,"__await")?e.resolve(p.__await).then((function(t){r("next",t,c,s)}),(function(t){r("throw",t,c,s)})):e.resolve(p).then((function(t){d.value=t,c(d)}),(function(t){return r("throw",t,c,s)}))}s(a.arg)}var n;o(this,"_invoke",{value:function(t,i){function o(){return new e((function(e,o){r(t,i,e,o)}))}return n=n?n.then(o,o):o()}})}function S(e,r,i){var o=y;return function(n,c){if(o===l)throw new Error("Generator is already running");if(o===g){if("throw"===n)throw c;return{value:t,done:!0}}for(i.method=n,i.arg=c;;){var s=i.delegate;if(s){var a=L(s,i);if(a){if(a===w)continue;return a}}if("next"===i.method)i.sent=i._sent=i.arg;else if("throw"===i.method){if(o===y)throw o=g,i.arg;i.dispatchException(i.arg)}else"return"===i.method&&i.abrupt("return",i.arg);o=l;var d=u(e,r,i);if("normal"===d.type){if(o=i.done?g:h,d.arg===w)continue;return{value:d.arg,done:i.done}}"throw"===d.type&&(o=g,i.method="throw",i.arg=d.arg)}}}function L(e,r){var i=r.method,o=e.iterator[i];if(o===t)return r.delegate=null,"throw"===i&&e.iterator.return&&(r.method="return",r.arg=t,L(e,r),"throw"===r.method)||"return"!==i&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+i+"' method")),w;var n=u(o,e.iterator,r.arg);if("throw"===n.type)return r.method="throw",r.arg=n.arg,r.delegate=null,w;var c=n.arg;return c?c.done?(r[e.resultName]=c.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,w):c:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,w)}function k(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function T(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function P(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(k,this),this.reset(!0)}function O(e){if(e||""===e){var r=e[c];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,n=function r(){for(;++o<e.length;)if(i.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return n.next=n}}throw new TypeError(typeof e+" is not iterable")}return v.prototype=m,o(M,"constructor",{value:m,configurable:!0}),o(m,"constructor",{value:v,configurable:!0}),v.displayName=d(m,a,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===v||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,m):(t.__proto__=m,d(t,a,"GeneratorFunction")),t.prototype=Object.create(M),t},e.awrap=function(t){return{__await:t}},K(E.prototype),d(E.prototype,s,(function(){return this})),e.AsyncIterator=E,e.async=function(t,r,i,o,n){void 0===n&&(n=Promise);var c=new E(p(t,r,i,o),n);return e.isGeneratorFunction(r)?c:c.next().then((function(t){return t.done?t.value:c.next()}))},K(M),d(M,a,"Generator"),d(M,c,(function(){return this})),d(M,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var i in e)r.push(i);return r.reverse(),function t(){for(;r.length;){var i=r.pop();if(i in e)return t.value=i,t.done=!1,t}return t.done=!0,t}},e.values=O,P.prototype={constructor:P,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(T),!e)for(var r in this)"t"===r.charAt(0)&&i.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(i,o){return s.type="throw",s.arg=e,r.next=i,o&&(r.method="next",r.arg=t),!!o}for(var n=this.tryEntries.length-1;n>=0;--n){var c=this.tryEntries[n],s=c.completion;if("root"===c.tryLoc)return o("end");if(c.tryLoc<=this.prev){var a=i.call(c,"catchLoc"),d=i.call(c,"finallyLoc");if(a&&d){if(this.prev<c.catchLoc)return o(c.catchLoc,!0);if(this.prev<c.finallyLoc)return o(c.finallyLoc)}else if(a){if(this.prev<c.catchLoc)return o(c.catchLoc,!0)}else{if(!d)throw new Error("try statement without catch or finally");if(this.prev<c.finallyLoc)return o(c.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&i.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var n=o;break}}n&&("break"===t||"continue"===t)&&n.tryLoc<=e&&e<=n.finallyLoc&&(n=null);var c=n?n.completion:{};return c.type=t,c.arg=e,n?(this.method="next",this.next=n.finallyLoc,w):this.complete(c)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),w},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),T(r),w}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var i=r.completion;if("throw"===i.type){var o=i.arg;T(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,r,i){return this.delegate={iterator:O(e),resultName:r,nextLoc:i},"next"===this.method&&(this.arg=t),w}},e}function ht(t,e,r,i,o,n,c){try{var s=t[n](c),a=s.value}catch(t){return void r(t)}s.done?e(a):Promise.resolve(a).then(i,o)}function lt(t){return function(){var e=this,r=arguments;return new Promise((function(i,o){var n=t.apply(e,r);function c(t){ht(n,i,o,c,s,"next",t)}function s(t){ht(n,i,o,c,s,"throw",t)}c(void 0)}))}}var gt,wt,ft=["constructor","__proto__"],vt=function(t,e){if(ft.includes(t))throw new Error("Unsafe json detected.");return e},mt=((st={})[rt.constants.DID_CONTEXT_V1_URL]=rt.contexts.get(rt.constants.DID_CONTEXT_V1_URL),st[rt.constants.DID_CONTEXT_TRANSMUTE_V1_URL]=rt.contexts.get(rt.constants.DID_CONTEXT_TRANSMUTE_V1_URL),st[rt.constants.DID_CONTEXT_TRANSMUTE_BLS12381_2020_V1_URL]=rt.contexts.get(rt.constants.DID_CONTEXT_TRANSMUTE_BLS12381_2020_V1_URL),st[rt.constants.DID_CONTEXT_TRANSMUTE_JWS_2020_V1_URL]=rt.contexts.get(rt.constants.DID_CONTEXT_TRANSMUTE_JWS_2020_V1_URL),st[rt.constants.DID_CONTEXT_TRANSMUTE_ED25519_2018_V1_URL]=rt.contexts.get(rt.constants.DID_CONTEXT_TRANSMUTE_ED25519_2018_V1_URL),st[rt.constants.DID_CONTEXT_TRANSMUTE_X25519_2018_V1_URL]=rt.contexts.get(rt.constants.DID_CONTEXT_TRANSMUTE_X25519_2018_V1_URL),st),bt=function(){var t=lt(yt().mark((function t(e){return yt().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!mt[e]){t.next=2;break}return t.abrupt("return",{documentUrl:e,document:mt[e]});case 2:throw console.error("Unsupported iri: "+e),new Error("Unsupported iri: "+e);case 4:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),xt=function(){var t=lt(yt().mark((function t(e,r){var i,o,n,c;return yt().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(void 0!==(i=JSON.parse(e.toString(),vt))["@context"]){t.next=3;break}throw new Error('"@context" is required and not present.');case 3:if(void 0!==i.id){t.next=5;break}throw new Error('"id" is required and not present.');case 5:return t.next=7,ut(i,r,!0);case 7:if(o=t.sent,n=o.error,!(c=null==n?void 0:n.event.details)||""===c.property){t.next=12;break}throw new Error('"@context" does not define: '+c.property);case 12:case"end":return t.stop()}}),t)})));return function(e,r){return t.apply(this,arguments)}}(),_t=function(){var t=lt(yt().mark((function t(r,i){var o;return yt().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return void 0===i&&(i=bt),o=e.from(JSON.stringify(r)),t.next=4,xt(o,i);case 4:return t.abrupt("return",o);case 5:case"end":return t.stop()}}),t)})));return function(e,r){return t.apply(this,arguments)}}(),Mt=function(){var t=lt(yt().mark((function t(e,r){var i;return yt().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return void 0===r&&(r=bt),t.next=3,xt(e,r);case 3:return i=JSON.parse(e.toString()),t.abrupt("return",i);case 5:case"end":return t.stop()}}),t)})));return function(e,r){return t.apply(this,arguments)}}(),Kt={contentType:"application/did+ld+json",produce:_t,consume:Mt},Et={"@context":{id:"@id",type:"@type",dc:"http://purl.org/dc/terms/",sec:"https://w3id.org/security#",xsd:"http://www.w3.org/2001/XMLSchema#",EcdsaKoblitzSignature2016:"sec:EcdsaKoblitzSignature2016",Ed25519Signature2018:"sec:Ed25519Signature2018",EncryptedMessage:"sec:EncryptedMessage",GraphSignature2012:"sec:GraphSignature2012",LinkedDataSignature2015:"sec:LinkedDataSignature2015",LinkedDataSignature2016:"sec:LinkedDataSignature2016",CryptographicKey:"sec:Key",authenticationTag:"sec:authenticationTag",canonicalizationAlgorithm:"sec:canonicalizationAlgorithm",cipherAlgorithm:"sec:cipherAlgorithm",cipherData:"sec:cipherData",cipherKey:"sec:cipherKey",created:{"@id":"dc:created","@type":"xsd:dateTime"},creator:{"@id":"dc:creator","@type":"@id"},digestAlgorithm:"sec:digestAlgorithm",digestValue:"sec:digestValue",domain:"sec:domain",encryptionKey:"sec:encryptionKey",expiration:{"@id":"sec:expiration","@type":"xsd:dateTime"},expires:{"@id":"sec:expiration","@type":"xsd:dateTime"},initializationVector:"sec:initializationVector",iterationCount:"sec:iterationCount",nonce:"sec:nonce",normalizationAlgorithm:"sec:normalizationAlgorithm",owner:{"@id":"sec:owner","@type":"@id"},password:"sec:password",privateKey:{"@id":"sec:privateKey","@type":"@id"},privateKeyPem:"sec:privateKeyPem",publicKey:{"@id":"sec:publicKey","@type":"@id"},publicKeyBase58:"sec:publicKeyBase58",publicKeyPem:"sec:publicKeyPem",publicKeyWif:"sec:publicKeyWif",publicKeyService:{"@id":"sec:publicKeyService","@type":"@id"},revoked:{"@id":"sec:revoked","@type":"xsd:dateTime"},salt:"sec:salt",signature:"sec:signature",signatureAlgorithm:"sec:signingAlgorithm",signatureValue:"sec:signatureValue"}},St={"@context":[{"@version":1.1},"https://w3id.org/security/v1",{AesKeyWrappingKey2019:"sec:AesKeyWrappingKey2019",DeleteKeyOperation:"sec:DeleteKeyOperation",DeriveSecretOperation:"sec:DeriveSecretOperation",EcdsaSecp256k1Signature2019:"sec:EcdsaSecp256k1Signature2019",EcdsaSecp256r1Signature2019:"sec:EcdsaSecp256r1Signature2019",EcdsaSecp256k1VerificationKey2019:"sec:EcdsaSecp256k1VerificationKey2019",EcdsaSecp256r1VerificationKey2019:"sec:EcdsaSecp256r1VerificationKey2019",Ed25519Signature2018:"sec:Ed25519Signature2018",Ed25519VerificationKey2018:"sec:Ed25519VerificationKey2018",EquihashProof2018:"sec:EquihashProof2018",ExportKeyOperation:"sec:ExportKeyOperation",GenerateKeyOperation:"sec:GenerateKeyOperation",KmsOperation:"sec:KmsOperation",RevokeKeyOperation:"sec:RevokeKeyOperation",RsaSignature2018:"sec:RsaSignature2018",RsaVerificationKey2018:"sec:RsaVerificationKey2018",Sha256HmacKey2019:"sec:Sha256HmacKey2019",SignOperation:"sec:SignOperation",UnwrapKeyOperation:"sec:UnwrapKeyOperation",VerifyOperation:"sec:VerifyOperation",WrapKeyOperation:"sec:WrapKeyOperation",X25519KeyAgreementKey2019:"sec:X25519KeyAgreementKey2019",allowedAction:"sec:allowedAction",assertionMethod:{"@id":"sec:assertionMethod","@type":"@id","@container":"@set"},authentication:{"@id":"sec:authenticationMethod","@type":"@id","@container":"@set"},capability:{"@id":"sec:capability","@type":"@id"},capabilityAction:"sec:capabilityAction",capabilityChain:{"@id":"sec:capabilityChain","@type":"@id","@container":"@list"},capabilityDelegation:{"@id":"sec:capabilityDelegationMethod","@type":"@id","@container":"@set"},capabilityInvocation:{"@id":"sec:capabilityInvocationMethod","@type":"@id","@container":"@set"},caveat:{"@id":"sec:caveat","@type":"@id","@container":"@set"},challenge:"sec:challenge",ciphertext:"sec:ciphertext",controller:{"@id":"sec:controller","@type":"@id"},delegator:{"@id":"sec:delegator","@type":"@id"},equihashParameterK:{"@id":"sec:equihashParameterK","@type":"xsd:integer"},equihashParameterN:{"@id":"sec:equihashParameterN","@type":"xsd:integer"},invocationTarget:{"@id":"sec:invocationTarget","@type":"@id"},invoker:{"@id":"sec:invoker","@type":"@id"},jws:"sec:jws",keyAgreement:{"@id":"sec:keyAgreementMethod","@type":"@id","@container":"@set"},kmsModule:{"@id":"sec:kmsModule"},parentCapability:{"@id":"sec:parentCapability","@type":"@id"},plaintext:"sec:plaintext",proof:{"@id":"sec:proof","@type":"@id","@container":"@graph"},proofPurpose:{"@id":"sec:proofPurpose","@type":"@vocab"},proofValue:"sec:proofValue",referenceId:"sec:referenceId",unwrappedKey:"sec:unwrappedKey",verificationMethod:{"@id":"sec:verificationMethod","@type":"@id"},verifyData:"sec:verifyData",wrappedKey:"sec:wrappedKey"}]},Lt={"@context":[{"@protected":!0,privateKeyPgp:"https://w3id.org/security#privateKeyPgp",proof:{"@id":"https://w3id.org/security#proof","@type":"@id","@container":"@graph"},PgpVerificationKey2021:{"@id":"https://w3id.org/security#PgpVerificationKey2021","@context":{"@protected":!0,id:"@id",type:"@type",publicKeyPgp:"https://w3id.org/security#publicKeyPgp"}},PgpSignature2021:{"@id":"https://w3id.org/security#PgpSignature2021","@context":{"@protected":!0,id:"@id",type:"@type",challenge:"https://w3id.org/security#challenge",created:{"@id":"http://purl.org/dc/terms/created","@type":"http://www.w3.org/2001/XMLSchema#dateTime"},domain:"https://w3id.org/security#domain",expires:{"@id":"https://w3id.org/security#expiration","@type":"http://www.w3.org/2001/XMLSchema#dateTime"},nonce:"https://w3id.org/security#nonce",proofPurpose:{"@id":"https://w3id.org/security#proofPurpose","@type":"@vocab","@context":{"@version":1.1,"@protected":!0,id:"@id",type:"@type",assertionMethod:{"@id":"https://w3id.org/security#assertionMethod","@type":"@id","@container":"@set"},authentication:{"@id":"https://w3id.org/security#authenticationMethod","@type":"@id","@container":"@set"},capabilityInvocation:{"@id":"https://w3id.org/security#capabilityInvocationMethod","@type":"@id","@container":"@set"},capabilityDelegation:{"@id":"https://w3id.org/security#capabilityDelegationMethod","@type":"@id","@container":"@set"},keyAgreement:{"@id":"https://w3id.org/security#keyAgreementMethod","@type":"@id","@container":"@set"}}},proofValue:{"@id":"https://w3id.org/security#proofValue"},verificationMethod:{"@id":"https://w3id.org/security#verificationMethod","@type":"@id"}}}}]},kt={"@context":{id:"@id",type:"@type","@protected":!0,proof:{"@id":"https://w3id.org/security#proof","@type":"@id","@container":"@graph"},privateKeyBase58:{"@id":"https://w3id.org/security#privateKeyBase58"},privateKeyMultibase:{"@id":"https://w3id.org/security#privateKeyMultibase"},P256Key2021:{"@id":"https://w3id.org/security#P256Key2021","@context":{"@protected":!0,id:"@id",type:"@type",controller:{"@id":"https://w3id.org/security#controller","@type":"@id"},revoked:{"@id":"https://w3id.org/security#revoked","@type":"http://www.w3.org/2001/XMLSchema#dateTime"},publicKeyBase58:{"@id":"https://w3id.org/security#publicKeyBase58"},publicKeyMultibase:{"@id":"https://w3id.org/security#publicKeyMultibase"}}},P384Key2021:{"@id":"https://w3id.org/security#P384Key2021","@context":{"@protected":!0,id:"@id",type:"@type",controller:{"@id":"https://w3id.org/security#controller","@type":"@id"},revoked:{"@id":"https://w3id.org/security#revoked","@type":"http://www.w3.org/2001/XMLSchema#dateTime"},publicKeyBase58:{"@id":"https://w3id.org/security#publicKeyBase58"},publicKeyMultibase:{"@id":"https://w3id.org/security#publicKeyMultibase"}}},P521Key2021:{"@id":"https://w3id.org/security#P521Key2021","@context":{"@protected":!0,id:"@id",type:"@type",controller:{"@id":"https://w3id.org/security#controller","@type":"@id"},revoked:{"@id":"https://w3id.org/security#revoked","@type":"http://www.w3.org/2001/XMLSchema#dateTime"},publicKeyBase58:{"@id":"https://w3id.org/security#publicKeyBase58"},publicKeyMultibase:{"@id":"https://w3id.org/security#publicKeyMultibase"}}},Ed25519Key2021:{"@id":"https://w3id.org/security#Ed25519Key2021","@context":{"@protected":!0,id:"@id",type:"@type",controller:{"@id":"https://w3id.org/security#controller","@type":"@id"},revoked:{"@id":"https://w3id.org/security#revoked","@type":"http://www.w3.org/2001/XMLSchema#dateTime"},publicKeyBase58:{"@id":"https://w3id.org/security#publicKeyBase58"},publicKeyMultibase:{"@id":"https://w3id.org/security#publicKeyMultibase"}}},X25519Key2021:{"@id":"https://w3id.org/security#X25519Key2021","@context":{"@protected":!0,id:"@id",type:"@type",controller:{"@id":"https://w3id.org/security#controller","@type":"@id"},revoked:{"@id":"https://w3id.org/security#revoked","@type":"http://www.w3.org/2001/XMLSchema#dateTime"},publicKeyBase58:{"@id":"https://w3id.org/security#publicKeyBase58"},publicKeyMultibase:{"@id":"https://w3id.org/security#publicKeyMultibase"}}},Secp256k1Key2021:{"@id":"https://w3id.org/security#Secp256k1Key2021","@context":{"@protected":!0,id:"@id",type:"@type",controller:{"@id":"https://w3id.org/security#controller","@type":"@id"},revoked:{"@id":"https://w3id.org/security#revoked","@type":"http://www.w3.org/2001/XMLSchema#dateTime"},publicKeyBase58:{"@id":"https://w3id.org/security#publicKeyBase58"},publicKeyMultibase:{"@id":"https://w3id.org/security#publicKeyMultibase"}}},Bls12381G1Key2021:{"@id":"https://w3id.org/security#Bls12381G1Key2021","@context":{"@protected":!0,id:"@id",type:"@type",controller:{"@id":"https://w3id.org/security#controller","@type":"@id"},revoked:{"@id":"https://w3id.org/security#revoked","@type":"http://www.w3.org/2001/XMLSchema#dateTime"},publicKeyBase58:{"@id":"https://w3id.org/security#publicKeyBase58"},publicKeyMultibase:{"@id":"https://w3id.org/security#publicKeyMultibase"}}},Bls12381G2Key2021:{"@id":"https://w3id.org/security#Bls12381G2Key2021","@context":{"@protected":!0,id:"@id",type:"@type",controller:{"@id":"https://w3id.org/security#controller","@type":"@id"},revoked:{"@id":"https://w3id.org/security#revoked","@type":"http://www.w3.org/2001/XMLSchema#dateTime"},publicKeyBase58:{"@id":"https://w3id.org/security#publicKeyBase58"},publicKeyMultibase:{"@id":"https://w3id.org/security#publicKeyMultibase"}}},P256EcdsaSignature2021:{"@id":"https://w3id.org/security#P256EcdsaSignature2021","@context":{"@protected":!0,id:"@id",type:"@type",challenge:"https://w3id.org/security#challenge",created:{"@id":"http://purl.org/dc/terms/created","@type":"http://www.w3.org/2001/XMLSchema#dateTime"},domain:"https://w3id.org/security#domain",expires:{"@id":"https://w3id.org/security#expiration","@type":"http://www.w3.org/2001/XMLSchema#dateTime"},nonce:"https://w3id.org/security#nonce",proofPurpose:{"@id":"https://w3id.org/security#proofPurpose","@type":"@vocab","@context":{"@protected":!0,id:"@id",type:"@type",assertionMethod:{"@id":"https://w3id.org/security#assertionMethod","@type":"@id","@container":"@set"},authentication:{"@id":"https://w3id.org/security#authenticationMethod","@type":"@id","@container":"@set"},capabilityInvocation:{"@id":"https://w3id.org/security#capabilityInvocationMethod","@type":"@id","@container":"@set"},capabilityDelegation:{"@id":"https://w3id.org/security#capabilityDelegationMethod","@type":"@id","@container":"@set"},keyAgreement:{"@id":"https://w3id.org/security#keyAgreementMethod","@type":"@id","@container":"@set"}}},proofValue:{"@id":"https://w3id.org/security#proofValue","@type":"https://w3id.org/security#multibase"},verificationMethod:{"@id":"https://w3id.org/security#verificationMethod","@type":"@id"}}},P384EcdsaSignature2021:{"@id":"https://w3id.org/security#P384EcdsaSignature2021","@context":{"@protected":!0,id:"@id",type:"@type",challenge:"https://w3id.org/security#challenge",created:{"@id":"http://purl.org/dc/terms/created","@type":"http://www.w3.org/2001/XMLSchema#dateTime"},domain:"https://w3id.org/security#domain",expires:{"@id":"https://w3id.org/security#expiration","@type":"http://www.w3.org/2001/XMLSchema#dateTime"},nonce:"https://w3id.org/security#nonce",proofPurpose:{"@id":"https://w3id.org/security#proofPurpose","@type":"@vocab","@context":{"@protected":!0,id:"@id",type:"@type",assertionMethod:{"@id":"https://w3id.org/security#assertionMethod","@type":"@id","@container":"@set"},authentication:{"@id":"https://w3id.org/security#authenticationMethod","@type":"@id","@container":"@set"},capabilityInvocation:{"@id":"https://w3id.org/security#capabilityInvocationMethod","@type":"@id","@container":"@set"},capabilityDelegation:{"@id":"https://w3id.org/security#capabilityDelegationMethod","@type":"@id","@container":"@set"},keyAgreement:{"@id":"https://w3id.org/security#keyAgreementMethod","@type":"@id","@container":"@set"}}},proofValue:{"@id":"https://w3id.org/security#proofValue","@type":"https://w3id.org/security#multibase"},verificationMethod:{"@id":"https://w3id.org/security#verificationMethod","@type":"@id"}}},P521EcdsaSignature2021:{"@id":"https://w3id.org/security#P521EcdsaSignature2021","@context":{"@protected":!0,id:"@id",type:"@type",challenge:"https://w3id.org/security#challenge",created:{"@id":"http://purl.org/dc/terms/created","@type":"http://www.w3.org/2001/XMLSchema#dateTime"},domain:"https://w3id.org/security#domain",expires:{"@id":"https://w3id.org/security#expiration","@type":"http://www.w3.org/2001/XMLSchema#dateTime"},nonce:"https://w3id.org/security#nonce",proofPurpose:{"@id":"https://w3id.org/security#proofPurpose","@type":"@vocab","@context":{"@protected":!0,id:"@id",type:"@type",assertionMethod:{"@id":"https://w3id.org/security#assertionMethod","@type":"@id","@container":"@set"},authentication:{"@id":"https://w3id.org/security#authenticationMethod","@type":"@id","@container":"@set"},capabilityInvocation:{"@id":"https://w3id.org/security#capabilityInvocationMethod","@type":"@id","@container":"@set"},capabilityDelegation:{"@id":"https://w3id.org/security#capabilityDelegationMethod","@type":"@id","@container":"@set"},keyAgreement:{"@id":"https://w3id.org/security#keyAgreementMethod","@type":"@id","@container":"@set"}}},proofValue:{"@id":"https://w3id.org/security#proofValue","@type":"https://w3id.org/security#multibase"},verificationMethod:{"@id":"https://w3id.org/security#verificationMethod","@type":"@id"}}},Secp256k1EcdsaSignature2021:{"@id":"https://w3id.org/security#Secp256k1EcdsaSignature2021","@context":{"@protected":!0,id:"@id",type:"@type",challenge:"https://w3id.org/security#challenge",created:{"@id":"http://purl.org/dc/terms/created","@type":"http://www.w3.org/2001/XMLSchema#dateTime"},domain:"https://w3id.org/security#domain",expires:{"@id":"https://w3id.org/security#expiration","@type":"http://www.w3.org/2001/XMLSchema#dateTime"},nonce:"https://w3id.org/security#nonce",proofPurpose:{"@id":"https://w3id.org/security#proofPurpose","@type":"@vocab","@context":{"@protected":!0,id:"@id",type:"@type",assertionMethod:{"@id":"https://w3id.org/security#assertionMethod","@type":"@id","@container":"@set"},authentication:{"@id":"https://w3id.org/security#authenticationMethod","@type":"@id","@container":"@set"},capabilityInvocation:{"@id":"https://w3id.org/security#capabilityInvocationMethod","@type":"@id","@container":"@set"},capabilityDelegation:{"@id":"https://w3id.org/security#capabilityDelegationMethod","@type":"@id","@container":"@set"},keyAgreement:{"@id":"https://w3id.org/security#keyAgreementMethod","@type":"@id","@container":"@set"}}},proofValue:{"@id":"https://w3id.org/security#proofValue","@type":"https://w3id.org/security#multibase"},verificationMethod:{"@id":"https://w3id.org/security#verificationMethod","@type":"@id"}}},Ed25519EdDsaSignature2021:{"@id":"https://w3id.org/security#Ed25519EdDsaSignature2021","@context":{"@protected":!0,id:"@id",type:"@type",challenge:"https://w3id.org/security#challenge",created:{"@id":"http://purl.org/dc/terms/created","@type":"http://www.w3.org/2001/XMLSchema#dateTime"},domain:"https://w3id.org/security#domain",expires:{"@id":"https://w3id.org/security#expiration","@type":"http://www.w3.org/2001/XMLSchema#dateTime"},nonce:"https://w3id.org/security#nonce",proofPurpose:{"@id":"https://w3id.org/security#proofPurpose","@type":"@vocab","@context":{"@protected":!0,id:"@id",type:"@type",assertionMethod:{"@id":"https://w3id.org/security#assertionMethod","@type":"@id","@container":"@set"},authentication:{"@id":"https://w3id.org/security#authenticationMethod","@type":"@id","@container":"@set"},capabilityInvocation:{"@id":"https://w3id.org/security#capabilityInvocationMethod","@type":"@id","@container":"@set"},capabilityDelegation:{"@id":"https://w3id.org/security#capabilityDelegationMethod","@type":"@id","@container":"@set"},keyAgreement:{"@id":"https://w3id.org/security#keyAgreementMethod","@type":"@id","@container":"@set"}}},proofValue:{"@id":"https://w3id.org/security#proofValue","@type":"https://w3id.org/security#multibase"},verificationMethod:{"@id":"https://w3id.org/security#verificationMethod","@type":"@id"}}},Bls12381G1EcdsaSignature2021:{"@id":"https://w3id.org/security#Bls12381G1EcdsaSignature2021","@context":{"@protected":!0,id:"@id",type:"@type",challenge:"https://w3id.org/security#challenge",created:{"@id":"http://purl.org/dc/terms/created","@type":"http://www.w3.org/2001/XMLSchema#dateTime"},domain:"https://w3id.org/security#domain",expires:{"@id":"https://w3id.org/security#expiration","@type":"http://www.w3.org/2001/XMLSchema#dateTime"},nonce:"https://w3id.org/security#nonce",proofPurpose:{"@id":"https://w3id.org/security#proofPurpose","@type":"@vocab","@context":{"@protected":!0,id:"@id",type:"@type",assertionMethod:{"@id":"https://w3id.org/security#assertionMethod","@type":"@id","@container":"@set"},authentication:{"@id":"https://w3id.org/security#authenticationMethod","@type":"@id","@container":"@set"},capabilityInvocation:{"@id":"https://w3id.org/security#capabilityInvocationMethod","@type":"@id","@container":"@set"},capabilityDelegation:{"@id":"https://w3id.org/security#capabilityDelegationMethod","@type":"@id","@container":"@set"},keyAgreement:{"@id":"https://w3id.org/security#keyAgreementMethod","@type":"@id","@container":"@set"}}},proofValue:{"@id":"https://w3id.org/security#proofValue","@type":"https://w3id.org/security#multibase"},verificationMethod:{"@id":"https://w3id.org/security#verificationMethod","@type":"@id"}}},Bls12381G2EcdsaSignature2021:{"@id":"https://w3id.org/security#Bls12381G2EcdsaSignature2021","@context":{"@protected":!0,id:"@id",type:"@type",challenge:"https://w3id.org/security#challenge",created:{"@id":"http://purl.org/dc/terms/created","@type":"http://www.w3.org/2001/XMLSchema#dateTime"},domain:"https://w3id.org/security#domain",expires:{"@id":"https://w3id.org/security#expiration","@type":"http://www.w3.org/2001/XMLSchema#dateTime"},nonce:"https://w3id.org/security#nonce",proofPurpose:{"@id":"https://w3id.org/security#proofPurpose","@type":"@vocab","@context":{"@protected":!0,id:"@id",type:"@type",assertionMethod:{"@id":"https://w3id.org/security#assertionMethod","@type":"@id","@container":"@set"},authentication:{"@id":"https://w3id.org/security#authenticationMethod","@type":"@id","@container":"@set"},capabilityInvocation:{"@id":"https://w3id.org/security#capabilityInvocationMethod","@type":"@id","@container":"@set"},capabilityDelegation:{"@id":"https://w3id.org/security#capabilityDelegationMethod","@type":"@id","@container":"@set"},keyAgreement:{"@id":"https://w3id.org/security#keyAgreementMethod","@type":"@id","@container":"@set"}}},proofValue:{"@id":"https://w3id.org/security#proofValue","@type":"https://w3id.org/security#multibase"},verificationMethod:{"@id":"https://w3id.org/security#verificationMethod","@type":"@id"}}}}},Tt={"@context":{privateKeyJwk:{"@id":"https://w3id.org/security#privateKeyJwk","@type":"@json"},JsonWebKey2020:{"@id":"https://w3id.org/security#JsonWebKey2020","@context":{"@protected":!0,id:"@id",type:"@type",publicKeyJwk:{"@id":"https://w3id.org/security#publicKeyJwk","@type":"@json"}}},JsonWebSignature2020:{"@id":"https://w3id.org/security#JsonWebSignature2020","@context":{"@protected":!0,id:"@id",type:"@type",challenge:"https://w3id.org/security#challenge",created:{"@id":"http://purl.org/dc/terms/created","@type":"http://www.w3.org/2001/XMLSchema#dateTime"},domain:"https://w3id.org/security#domain",expires:{"@id":"https://w3id.org/security#expiration","@type":"http://www.w3.org/2001/XMLSchema#dateTime"},jws:"https://w3id.org/security#jws",nonce:"https://w3id.org/security#nonce",proofPurpose:{"@id":"https://w3id.org/security#proofPurpose","@type":"@vocab","@context":{"@protected":!0,id:"@id",type:"@type",assertionMethod:{"@id":"https://w3id.org/security#assertionMethod","@type":"@id","@container":"@set"},authentication:{"@id":"https://w3id.org/security#authenticationMethod","@type":"@id","@container":"@set"},capabilityInvocation:{"@id":"https://w3id.org/security#capabilityInvocationMethod","@type":"@id","@container":"@set"},capabilityDelegation:{"@id":"https://w3id.org/security#capabilityDelegationMethod","@type":"@id","@container":"@set"},keyAgreement:{"@id":"https://w3id.org/security#keyAgreementMethod","@type":"@id","@container":"@set"}}},verificationMethod:{"@id":"https://w3id.org/security#verificationMethod","@type":"@id"}}}}},Pt={"@context":{id:"@id",type:"@type","@protected":!0,proof:{"@id":"https://w3id.org/security#proof","@type":"@id","@container":"@graph"},Ed25519VerificationKey2020:{"@id":"https://w3id.org/security#Ed25519VerificationKey2020","@context":{"@protected":!0,id:"@id",type:"@type",controller:{"@id":"https://w3id.org/security#controller","@type":"@id"},revoked:{"@id":"https://w3id.org/security#revoked","@type":"http://www.w3.org/2001/XMLSchema#dateTime"},publicKeyMultibase:{"@id":"https://w3id.org/security#publicKeyMultibase","@type":"https://w3id.org/security#multibase"}}},Ed25519Signature2020:{"@id":"https://w3id.org/security#Ed25519Signature2020","@context":{"@protected":!0,id:"@id",type:"@type",challenge:"https://w3id.org/security#challenge",created:{"@id":"http://purl.org/dc/terms/created","@type":"http://www.w3.org/2001/XMLSchema#dateTime"},domain:"https://w3id.org/security#domain",expires:{"@id":"https://w3id.org/security#expiration","@type":"http://www.w3.org/2001/XMLSchema#dateTime"},nonce:"https://w3id.org/security#nonce",proofPurpose:{"@id":"https://w3id.org/security#proofPurpose","@type":"@vocab","@context":{"@protected":!0,id:"@id",type:"@type",assertionMethod:{"@id":"https://w3id.org/security#assertionMethod","@type":"@id","@container":"@set"},authentication:{"@id":"https://w3id.org/security#authenticationMethod","@type":"@id","@container":"@set"},capabilityInvocation:{"@id":"https://w3id.org/security#capabilityInvocationMethod","@type":"@id","@container":"@set"},capabilityDelegation:{"@id":"https://w3id.org/security#capabilityDelegationMethod","@type":"@id","@container":"@set"},keyAgreement:{"@id":"https://w3id.org/security#keyAgreementMethod","@type":"@id","@container":"@set"}}},proofValue:{"@id":"https://w3id.org/security#proofValue","@type":"https://w3id.org/security#multibase"},verificationMethod:{"@id":"https://w3id.org/security#verificationMethod","@type":"@id"}}}}},Ot={"@context":{id:"@id",type:"@type","@protected":!0,X25519KeyAgreementKey2020:{"@id":"https://w3id.org/security#X25519KeyAgreementKey2020","@context":{"@protected":!0,id:"@id",type:"@type",controller:{"@id":"https://w3id.org/security#controller","@type":"@id"},revoked:{"@id":"https://w3id.org/security#revoked","@type":"http://www.w3.org/2001/XMLSchema#dateTime"},publicKeyMultibase:{"@id":"https://w3id.org/security#publicKeyMultibase","@type":"https://w3id.org/security#multibase"}}}}},Dt={"@context":{"@version":1.1,id:"@id",type:"@type",BbsBlsSignature2020:{"@id":"https://w3id.org/security#BbsBlsSignature2020","@context":{"@version":1.1,"@protected":!0,id:"@id",type:"@type",challenge:"https://w3id.org/security#challenge",created:{"@id":"http://purl.org/dc/terms/created","@type":"http://www.w3.org/2001/XMLSchema#dateTime"},domain:"https://w3id.org/security#domain",proofValue:"https://w3id.org/security#proofValue",nonce:"https://w3id.org/security#nonce",proofPurpose:{"@id":"https://w3id.org/security#proofPurpose","@type":"@vocab","@context":{"@version":1.1,"@protected":!0,id:"@id",type:"@type",assertionMethod:{"@id":"https://w3id.org/security#assertionMethod","@type":"@id","@container":"@set"},authentication:{"@id":"https://w3id.org/security#authenticationMethod","@type":"@id","@container":"@set"}}},verificationMethod:{"@id":"https://w3id.org/security#verificationMethod","@type":"@id"}}},BbsBlsSignatureProof2020:{"@id":"https://w3id.org/security#BbsBlsSignatureProof2020","@context":{"@version":1.1,"@protected":!0,id:"@id",type:"@type",challenge:"https://w3id.org/security#challenge",created:{"@id":"http://purl.org/dc/terms/created","@type":"http://www.w3.org/2001/XMLSchema#dateTime"},domain:"https://w3id.org/security#domain",nonce:"https://w3id.org/security#nonce",proofPurpose:{"@id":"https://w3id.org/security#proofPurpose","@type":"@vocab","@context":{"@version":1.1,"@protected":!0,id:"@id",type:"@type",sec:"https://w3id.org/security#",assertionMethod:{"@id":"https://w3id.org/security#assertionMethod","@type":"@id","@container":"@set"},authentication:{"@id":"https://w3id.org/security#authenticationMethod","@type":"@id","@container":"@set"}}},proofValue:"https://w3id.org/security#proofValue",verificationMethod:{"@id":"https://w3id.org/security#verificationMethod","@type":"@id"}}},Bls12381G1Key2020:{"@id":"https://w3id.org/security#Bls12381G1Key2020","@context":{"@protected":!0,id:"@id",type:"@type",controller:{"@id":"https://w3id.org/security#controller","@type":"@id"},revoked:{"@id":"https://w3id.org/security#revoked","@type":"http://www.w3.org/2001/XMLSchema#dateTime"},publicKeyBase58:{"@id":"https://w3id.org/security#publicKeyBase58"}}},Bls12381G2Key2020:{"@id":"https://w3id.org/security#Bls12381G2Key2020","@context":{"@protected":!0,id:"@id",type:"@type",controller:{"@id":"https://w3id.org/security#controller","@type":"@id"},revoked:{"@id":"https://w3id.org/security#revoked","@type":"http://www.w3.org/2001/XMLSchema#dateTime"},publicKeyBase58:{"@id":"https://w3id.org/security#publicKeyBase58"}}}}},At={"@context":{"@version":1.1,id:"@id",type:"@type",privateKeyJwk:{"@id":"https://w3id.org/security/#privateKeyJwk","@type":"@json"},privateKeyMultibase:{"@id":"https://w3id.org/security/#privateKeyMultibase","@type":"https://w3id.org/security#multibase"},proof:{"@id":"https://w3id.org/security#proof","@type":"@id","@container":"@graph"},EcdsaSecp256k1VerificationKey2020:{"@id":"https://w3id.org/security#EcdsaSecp256k1VerificationKey2020","@context":{"@protected":!0,id:"@id",type:"@type",controller:{"@id":"https://w3id.org/security#controller","@type":"@id"},revoked:{"@id":"https://w3id.org/security#revoked","@type":"http://www.w3.org/2001/XMLSchema#dateTime"},publicKeyMultibase:{"@id":"https://w3id.org/security#publicKeyMultibase","@type":"https://w3id.org/security#multibase"}}},EcdsaSecp256k1Signature2020:{"@id":"https://w3id.org/security#EcdsaSecp256k1Signature2020","@context":{"@protected":!0,id:"@id",type:"@type",challenge:"https://w3id.org/security#challenge",created:{"@id":"http://purl.org/dc/terms/created","@type":"http://www.w3.org/2001/XMLSchema#dateTime"},domain:"https://w3id.org/security#domain",expires:{"@id":"https://w3id.org/security#expiration","@type":"http://www.w3.org/2001/XMLSchema#dateTime"},nonce:"https://w3id.org/security#nonce",proofPurpose:{"@id":"https://w3id.org/security#proofPurpose","@type":"@vocab","@context":{"@protected":!0,id:"@id",type:"@type",assertionMethod:{"@id":"https://w3id.org/security#assertionMethod","@type":"@id","@container":"@set"},authentication:{"@id":"https://w3id.org/security#authenticationMethod","@type":"@id","@container":"@set"},capabilityInvocation:{"@id":"https://w3id.org/security#capabilityInvocationMethod","@type":"@id","@container":"@set"},capabilityDelegation:{"@id":"https://w3id.org/security#capabilityDelegationMethod","@type":"@id","@container":"@set"},keyAgreement:{"@id":"https://w3id.org/security#keyAgreementMethod","@type":"@id","@container":"@set"}}},proofValue:{"@id":"https://w3id.org/security#proofValue","@type":"https://w3id.org/security#multibase"},verificationMethod:{"@id":"https://w3id.org/security#verificationMethod","@type":"@id"}}},EcdsaSecp256k1RecoveryMethod2020:{"@id":"https://w3id.org/security#EcdsaSecp256k1RecoveryMethod2020","@context":{"@protected":!0,id:"@id",type:"@type",controller:{"@id":"https://w3id.org/security#controller","@type":"@id"},revoked:{"@id":"https://w3id.org/security#revoked","@type":"http://www.w3.org/2001/XMLSchema#dateTime"},blockchainAccountId:{"@id":"https://w3id.org/security#blockchainAccountId"},ethereumAddress:{"@id":"https://w3id.org/security#ethereumAddress"},publicKeyJwk:{"@id":"https://w3id.org/security#publicKeyJwk","@type":"@json"},publicKeyBase58:{"@id":"https://w3id.org/security#publicKeyBase58"},publicKeyHex:{"@id":"https://w3id.org/security#publicKeyHex"},publicKeyMultibase:{"@id":"https://w3id.org/security#publicKeyMultibase","@type":"https://w3id.org/security#multibase"}}},EcdsaSecp256k1RecoverySignature2020:{"@id":"https://w3id.org/security#EcdsaSecp256k1RecoverySignature2020","@context":{"@protected":!0,id:"@id",type:"@type",challenge:"https://w3id.org/security#challenge",created:{"@id":"http://purl.org/dc/terms/created","@type":"http://www.w3.org/2001/XMLSchema#dateTime"},domain:"https://w3id.org/security#domain",expires:{"@id":"https://w3id.org/security#expiration","@type":"http://www.w3.org/2001/XMLSchema#dateTime"},nonce:"https://w3id.org/security#nonce",proofPurpose:{"@id":"https://w3id.org/security#proofPurpose","@type":"@vocab","@context":{"@protected":!0,id:"@id",type:"@type",assertionMethod:{"@id":"https://w3id.org/security#assertionMethod","@type":"@id","@container":"@set"},authentication:{"@id":"https://w3id.org/security#authenticationMethod","@type":"@id","@container":"@set"},capabilityInvocation:{"@id":"https://w3id.org/security#capabilityInvocationMethod","@type":"@id","@container":"@set"},capabilityDelegation:{"@id":"https://w3id.org/security#capabilityDelegationMethod","@type":"@id","@container":"@set"},keyAgreement:{"@id":"https://w3id.org/security#keyAgreementMethod","@type":"@id","@container":"@set"}}},jws:{"@id":"https://w3id.org/security#jws"},verificationMethod:{"@id":"https://w3id.org/security#verificationMethod","@type":"@id"}}}}},jt={"@context":{id:"@id",type:"@type","@protected":!0,proof:{"@id":"https://w3id.org/security#proof","@type":"@id","@container":"@graph"},EcdsaSecp256k1VerificationKey2019:{"@id":"https://w3id.org/security#EcdsaSecp256k1VerificationKey2019","@context":{"@protected":!0,id:"@id",type:"@type",controller:{"@id":"https://w3id.org/security#controller","@type":"@id"},revoked:{"@id":"https://w3id.org/security#revoked","@type":"http://www.w3.org/2001/XMLSchema#dateTime"},blockchainAccountId:{"@id":"https://w3id.org/security#blockchainAccountId"},publicKeyJwk:{"@id":"https://w3id.org/security#publicKeyJwk","@type":"@json"},publicKeyBase58:{"@id":"https://w3id.org/security#publicKeyBase58"},publicKeyMultibase:{"@id":"https://w3id.org/security#publicKeyMultibase","@type":"https://w3id.org/security#multibase"}}},EcdsaSecp256k1Signature2019:{"@id":"https://w3id.org/security#EcdsaSecp256k1Signature2019","@context":{"@protected":!0,id:"@id",type:"@type",challenge:"https://w3id.org/security#challenge",created:{"@id":"http://purl.org/dc/terms/created","@type":"http://www.w3.org/2001/XMLSchema#dateTime"},domain:"https://w3id.org/security#domain",expires:{"@id":"https://w3id.org/security#expiration","@type":"http://www.w3.org/2001/XMLSchema#dateTime"},nonce:"https://w3id.org/security#nonce",proofPurpose:{"@id":"https://w3id.org/security#proofPurpose","@type":"@vocab","@context":{"@protected":!0,id:"@id",type:"@type",assertionMethod:{"@id":"https://w3id.org/security#assertionMethod","@type":"@id","@container":"@set"},authentication:{"@id":"https://w3id.org/security#authenticationMethod","@type":"@id","@container":"@set"},capabilityInvocation:{"@id":"https://w3id.org/security#capabilityInvocationMethod","@type":"@id","@container":"@set"},capabilityDelegation:{"@id":"https://w3id.org/security#capabilityDelegationMethod","@type":"@id","@container":"@set"},keyAgreement:{"@id":"https://w3id.org/security#keyAgreementMethod","@type":"@id","@container":"@set"}}},jws:{"@id":"https://w3id.org/security#jws"},verificationMethod:{"@id":"https://w3id.org/security#verificationMethod","@type":"@id"}}}}},Xt={"@context":{id:"@id",type:"@type","@protected":!0,X25519KeyAgreementKey2019:{"@id":"https://w3id.org/security#X25519KeyAgreementKey2019","@context":{"@protected":!0,id:"@id",type:"@type",controller:{"@id":"https://w3id.org/security#controller","@type":"@id"},revoked:{"@id":"https://w3id.org/security#revoked","@type":"http://www.w3.org/2001/XMLSchema#dateTime"},publicKeyBase58:{"@id":"https://w3id.org/security#publicKeyBase58"}}}}},Nt={"@context":{id:"@id",type:"@type","@protected":!0,proof:{"@id":"https://w3id.org/security#proof","@type":"@id","@container":"@graph"},Ed25519VerificationKey2018:{"@id":"https://w3id.org/security#Ed25519VerificationKey2018","@context":{"@protected":!0,id:"@id",type:"@type",controller:{"@id":"https://w3id.org/security#controller","@type":"@id"},revoked:{"@id":"https://w3id.org/security#revoked","@type":"http://www.w3.org/2001/XMLSchema#dateTime"},publicKeyBase58:{"@id":"https://w3id.org/security#publicKeyBase58"}}},Ed25519Signature2018:{"@id":"https://w3id.org/security#Ed25519Signature2018","@context":{"@protected":!0,id:"@id",type:"@type",challenge:"https://w3id.org/security#challenge",created:{"@id":"http://purl.org/dc/terms/created","@type":"http://www.w3.org/2001/XMLSchema#dateTime"},domain:"https://w3id.org/security#domain",expires:{"@id":"https://w3id.org/security#expiration","@type":"http://www.w3.org/2001/XMLSchema#dateTime"},nonce:"https://w3id.org/security#nonce",proofPurpose:{"@id":"https://w3id.org/security#proofPurpose","@type":"@vocab","@context":{"@protected":!0,id:"@id",type:"@type",assertionMethod:{"@id":"https://w3id.org/security#assertionMethod","@type":"@id","@container":"@set"},authentication:{"@id":"https://w3id.org/security#authenticationMethod","@type":"@id","@container":"@set"},capabilityInvocation:{"@id":"https://w3id.org/security#capabilityInvocationMethod","@type":"@id","@container":"@set"},capabilityDelegation:{"@id":"https://w3id.org/security#capabilityDelegationMethod","@type":"@id","@container":"@set"},keyAgreement:{"@id":"https://w3id.org/security#keyAgreementMethod","@type":"@id","@container":"@set"}}},jws:{"@id":"https://w3id.org/security#jws"},verificationMethod:{"@id":"https://w3id.org/security#verificationMethod","@type":"@id"}}}}};var Vt=function(){if(wt)return gt;wt=1;const t=new Map,e="https://w3id.org/security/v1";t.set(e,Et);const r="https://w3id.org/security/v2";t.set(r,St);const i="https://w3id.org/security/suites/pgp-2021/v1";t.set(i,Lt);const o="https://w3id.org/security/suites/multikey-2021/v1";t.set(o,kt);const n="https://w3id.org/security/suites/jws-2020/v1";t.set(n,Tt);const c="https://w3id.org/security/suites/ed25519-2020/v1";t.set(c,Pt);const s="https://w3id.org/security/suites/x25519-2020/v1";t.set(s,Ot);const a="https://w3id.org/security/suites/bls12381-2020/v1";t.set(a,Dt);const d="https://w3id.org/security/suites/secp256k1-2020/v1";t.set(d,At);const p="https://w3id.org/security/suites/secp256k1-2019/v1";t.set(p,jt);const u="https://w3id.org/security/suites/x25519-2019/v1";t.set(u,Xt);const y="https://w3id.org/security/suites/ed25519-2018/v1";return t.set(y,Nt),gt={constants:{SECURITY_CONTEXT_V1_URL:e,SECURITY_CONTEXT_V2_URL:r,MULTIKEY_2021_V1_URL:o,PGP_2021_V1_URL:i,JSON_WEB_SIGNATURE_2020_V1_URL:n,ED25519_2020_V1_URL:c,X25519_2020_V1_URL:s,BLS12381_2020_V1_URL:a,SECP256K1_2020_V1_URL:d,SECP256k1_2019_v1_URL:p,X25519_2019_v1_URL:u,ED25519_2018_v1_URL:y},contexts:t}}();function Rt(t,e,r,i,o,n,c){try{var s=t[n](c),a=s.value}catch(t){return void r(t)}s.done?e(a):Promise.resolve(a).then(i,o)}function It(t){return function(){var e=this,r=arguments;return new Promise((function(i,o){var n=t.apply(e,r);function c(t){Rt(n,i,o,c,s,"next",t)}function s(t){Rt(n,i,o,c,s,"throw",t)}c(void 0)}))}}function Ut(){return Ut=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(t[i]=r[i])}return t},Ut.apply(this,arguments)}var Bt,Gt=function(t,e){return t(e={exports:{}},e.exports),e.exports}((function(t){var e=function(t){var e,r=Object.prototype,i=r.hasOwnProperty,o="function"==typeof Symbol?Symbol:{},n=o.iterator||"@@iterator",c=o.asyncIterator||"@@asyncIterator",s=o.toStringTag||"@@toStringTag";function a(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{a({},"")}catch(t){a=function(t,e,r){return t[e]=r}}function d(t,e,r,i){var o=e&&e.prototype instanceof w?e:w,n=Object.create(o.prototype),c=new k(i||[]);return n._invoke=function(t,e,r){var i=u;return function(o,n){if(i===h)throw new Error("Generator is already running");if(i===l){if("throw"===o)throw n;return P()}for(r.method=o,r.arg=n;;){var c=r.delegate;if(c){var s=E(c,r);if(s){if(s===g)continue;return s}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(i===u)throw i=l,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);i=h;var a=p(t,e,r);if("normal"===a.type){if(i=r.done?l:y,a.arg===g)continue;return{value:a.arg,done:r.done}}"throw"===a.type&&(i=l,r.method="throw",r.arg=a.arg)}}}(t,r,c),n}function p(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=d;var u="suspendedStart",y="suspendedYield",h="executing",l="completed",g={};function w(){}function f(){}function v(){}var m={};m[n]=function(){return this};var b=Object.getPrototypeOf,x=b&&b(b(T([])));x&&x!==r&&i.call(x,n)&&(m=x);var _=v.prototype=w.prototype=Object.create(m);function M(t){["next","throw","return"].forEach((function(e){a(t,e,(function(t){return this._invoke(e,t)}))}))}function K(t,e){function r(o,n,c,s){var a=p(t[o],t,n);if("throw"!==a.type){var d=a.arg,u=d.value;return u&&"object"==typeof u&&i.call(u,"__await")?e.resolve(u.__await).then((function(t){r("next",t,c,s)}),(function(t){r("throw",t,c,s)})):e.resolve(u).then((function(t){d.value=t,c(d)}),(function(t){return r("throw",t,c,s)}))}s(a.arg)}var o;this._invoke=function(t,i){function n(){return new e((function(e,o){r(t,i,e,o)}))}return o=o?o.then(n,n):n()}}function E(t,r){var i=t.iterator[r.method];if(i===e){if(r.delegate=null,"throw"===r.method){if(t.iterator.return&&(r.method="return",r.arg=e,E(t,r),"throw"===r.method))return g;r.method="throw",r.arg=new TypeError("The iterator does not provide a 'throw' method")}return g}var o=p(i,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,g;var n=o.arg;return n?n.done?(r[t.resultName]=n.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,g):n:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function S(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function L(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function k(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(S,this),this.reset(!0)}function T(t){if(t){var r=t[n];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,c=function r(){for(;++o<t.length;)if(i.call(t,o))return r.value=t[o],r.done=!1,r;return r.value=e,r.done=!0,r};return c.next=c}}return{next:P}}function P(){return{value:e,done:!0}}return f.prototype=_.constructor=v,v.constructor=f,f.displayName=a(v,s,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===f||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,v):(t.__proto__=v,a(t,s,"GeneratorFunction")),t.prototype=Object.create(_),t},t.awrap=function(t){return{__await:t}},M(K.prototype),K.prototype[c]=function(){return this},t.AsyncIterator=K,t.async=function(e,r,i,o,n){void 0===n&&(n=Promise);var c=new K(d(e,r,i,o),n);return t.isGeneratorFunction(r)?c:c.next().then((function(t){return t.done?t.value:c.next()}))},M(_),a(_,s,"Generator"),_[n]=function(){return this},_.toString=function(){return"[object Generator]"},t.keys=function(t){var e=[];for(var r in t)e.push(r);return e.reverse(),function r(){for(;e.length;){var i=e.pop();if(i in t)return r.value=i,r.done=!1,r}return r.done=!0,r}},t.values=T,k.prototype={constructor:k,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(L),!t)for(var r in this)"t"===r.charAt(0)&&i.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function o(i,o){return s.type="throw",s.arg=t,r.next=i,o&&(r.method="next",r.arg=e),!!o}for(var n=this.tryEntries.length-1;n>=0;--n){var c=this.tryEntries[n],s=c.completion;if("root"===c.tryLoc)return o("end");if(c.tryLoc<=this.prev){var a=i.call(c,"catchLoc"),d=i.call(c,"finallyLoc");if(a&&d){if(this.prev<c.catchLoc)return o(c.catchLoc,!0);if(this.prev<c.finallyLoc)return o(c.finallyLoc)}else if(a){if(this.prev<c.catchLoc)return o(c.catchLoc,!0)}else{if(!d)throw new Error("try statement without catch or finally");if(this.prev<c.finallyLoc)return o(c.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&i.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var n=o;break}}n&&("break"===t||"continue"===t)&&n.tryLoc<=e&&e<=n.finallyLoc&&(n=null);var c=n?n.completion:{};return c.type=t,c.arg=e,n?(this.method="next",this.next=n.finallyLoc,g):this.complete(c)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),g},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),L(r),g}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var i=r.completion;if("throw"===i.type){var o=i.arg;L(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,i){return this.delegate={iterator:T(t),resultName:r,nextLoc:i},"next"===this.method&&(this.arg=e),g}},t}(t.exports);try{regeneratorRuntime=e}catch(t){Function("r","regeneratorRuntime = r")(e)}})),Ct=["assertionMethod","authentication","capabilityInvocation","capabilityDelegation"],Ft=["keyAgreement"],Jt={"OKP Ed25519":[].concat(Ct),"OKP X25519":[].concat(Ft),Ed25519VerificationKey2018:[].concat(Ct),X25519KeyAgreementKey2019:[].concat(Ft),"EC BLS12381_G1":[].concat(Ct),"EC BLS12381_G2":[].concat(Ct),Bls12381G1Key2020:[].concat(Ct),Bls12381G2Key2020:[].concat(Ct),"EC P-256":[].concat(Ct,Ft),"EC P-384":[].concat(Ct,Ft),"EC P-521":[].concat(Ct,Ft),P256Key2021:[].concat(Ct,Ft),P384Key2021:[].concat(Ct,Ft),P521Key2021:[].concat(Ct,Ft),"EC secp256k1":[].concat(Ct,Ft),EcdsaSecp256k1VerificationKey2019:[].concat(Ct,Ft)},Wt=function(t){var e="JsonWebKey2020"===t.type?t.publicKeyJwk.kty+" "+t.publicKeyJwk.crv:t.type;return[].concat(Jt[e]||[])},qt={"OKP Ed25519":"Ed25519VerificationKey2018","OKP X25519":"X25519KeyAgreementKey2019","EC BLS12381_G1":"Bls12381G1Key2020","EC BLS12381_G2":"Bls12381G2Key2020","EC P-256":"P256Key2021","EC P-384":"P384Key2021","EC P-521":"P521Key2021","EC secp256k1":"EcdsaSecp256k1VerificationKey2019"},Yt=function(t){var e=qt[t.kty+" "+t.crv];if(!e)throw new Error("Could not map publicKeyJwk to latest security vocab type: "+t.kty+" "+t.crv);return e},zt=function(){var t=It(Gt.mark((function t(e,r,i){var o;return Gt.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return void 0===i&&(i=!1),t.next=3,Promise.all(e.map(function(){var t=It(Gt.mark((function t(e){var o,n;return Gt.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,e.export({type:"JsonWebKey2020",privateKey:i});case 2:if(o=t.sent,"application/did+json"!==r){t.next=5;break}return t.abrupt("return",o);case 5:return n=Yt(o.publicKeyJwk),t.next=8,e.export({type:n,privateKey:i});case 8:return t.abrupt("return",t.sent);case 9:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()));case 3:return o=t.sent,t.abrupt("return",o);case 5:case"end":return t.stop()}}),t)})));return function(e,r,i){return t.apply(this,arguments)}}(),Ht=function(){var t=It(Gt.mark((function t(e,r,i){var o;return Gt.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,e.fromFingerprint({fingerprint:r});case 2:if(o=t.sent,!i||!o.getDerivedKeyPairs){t.next=7;break}return t.next=6,o.getDerivedKeyPairs();case 6:case 10:return t.abrupt("return",t.sent);case 7:if(!o.getPairedKeyPairs){t.next=11;break}return t.next=10,o.getPairedKeyPairs();case 11:return t.abrupt("return",[o]);case 12:case"end":return t.stop()}}),t)})));return function(e,r,i){return t.apply(this,arguments)}}(),$t=function(t){var e={};return t.forEach((function(t){Wt(t).forEach((function(r){e[r]=e[r]?[].concat(e[r],[t.id]):[t.id]}))})),e},Qt=function(){var t=It(Gt.mark((function t(e,r,i){var o,n,c,s;return Gt.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return o=e.split(":")[2].split("#")[0],t.next=3,Ht(r,o,i.enableEncryptionKeyDerivation);case 3:return n=t.sent,t.next=6,zt(n,i.accept,!1);case 6:return c=t.sent,s=$t(c),t.abrupt("return",Ut({id:e,verificationMethod:c},s));case 9:case"end":return t.stop()}}),t)})));return function(e,r,i){return t.apply(this,arguments)}}(),Zt={JsonWebKey2020:Vt.constants.JSON_WEB_SIGNATURE_2020_V1_URL,Ed25519VerificationKey2018:Vt.constants.ED25519_2018_v1_URL,X25519KeyAgreementKey2019:Vt.constants.X25519_2019_v1_URL,Bls12381G1Key2020:Vt.constants.BLS12381_2020_V1_URL,Bls12381G2Key2020:Vt.constants.BLS12381_2020_V1_URL,P256Key2021:Vt.constants.MULTIKEY_2021_V1_URL,P384Key2021:Vt.constants.MULTIKEY_2021_V1_URL,P521Key2021:Vt.constants.MULTIKEY_2021_V1_URL,EcdsaSecp256k1VerificationKey2019:Vt.constants.SECP256k1_2019_v1_URL},te=function(t){var e,r=[rt.constants.DID_CONTEXT_V1_URL];return null==(e=t.verificationMethod)||e.forEach((function(t){if(!Zt[t.type])throw new Error("Cannot generate context for unregistered verification method type: "+t.type);var e=Zt[t.type];r.includes(e)||r.push(e)})),r},ee=((Bt={})[rt.constants.DID_CONTEXT_V1_URL]=rt.contexts.get(rt.constants.DID_CONTEXT_V1_URL),Bt[Vt.constants.JSON_WEB_SIGNATURE_2020_V1_URL]=Vt.contexts.get(Vt.constants.JSON_WEB_SIGNATURE_2020_V1_URL),Bt[Vt.constants.ED25519_2018_v1_URL]=Vt.contexts.get(Vt.constants.ED25519_2018_v1_URL),Bt[Vt.constants.X25519_2019_v1_URL]=Vt.contexts.get(Vt.constants.X25519_2019_v1_URL),Bt[Vt.constants.BLS12381_2020_V1_URL]=Vt.contexts.get(Vt.constants.BLS12381_2020_V1_URL),Bt[Vt.constants.MULTIKEY_2021_V1_URL]=Vt.contexts.get(Vt.constants.MULTIKEY_2021_V1_URL),Bt[Vt.constants.SECP256k1_2019_v1_URL]=Vt.contexts.get(Vt.constants.SECP256k1_2019_v1_URL),Bt),re=function(t){if(ee[t])return{documentUrl:t,document:ee[t]};throw console.error("unsupported iri"+t),new Error("unsupported iri"+t)},ie=function(t){return function(){var e=It(Gt.mark((function e(r,i){var o,n,c,s;return Gt.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return void 0===i&&(i={accept:"application/did+ld+json",enableEncryptionKeyDerivation:!1}),e.next=3,Qt(r,t,i);case 3:return o=e.sent,n=te(o),c=B.build({entries:Ut({"@context":n},o)}),e.next=8,c.addRepresentation({"application/did+json":Kt}).addRepresentation({"application/did+ld+json":Kt}).produce(i.accept,re);case 8:return s=e.sent,e.abrupt("return",{didDocument:JSON.parse(s.toString("utf-8"))});case 10:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}()},oe=function(){var t=It(Gt.mark((function t(e,r){return Gt.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!r.enableEncryptionKeyDerivation||!e.getDerivedKeyPairs){t.next=4;break}return t.next=3,e.getDerivedKeyPairs();case 3:case 7:return t.abrupt("return",t.sent);case 4:if(!e.getPairedKeyPairs){t.next=8;break}return t.next=7,e.getPairedKeyPairs();case 8:return t.abrupt("return",[e]);case 9:case"end":return t.stop()}}),t)})));return function(e,r){return t.apply(this,arguments)}}(),ne=function(t){var e=ie(t);return function(){var r=It(Gt.mark((function r(i,o){var n,c,s,a;return Gt.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return void 0===o&&(o={accept:"application/did+json",enableEncryptionKeyDerivation:!1}),r.next=3,t.generate(i);case 3:return n=r.sent,r.next=6,oe(n,o);case 6:return c=r.sent,r.next=9,e(n.controller,o);case 9:return s=r.sent,a=s.didDocument,r.t0=a,r.next=15,zt(c,o.accept,true);case 15:return r.t1=r.sent,r.abrupt("return",{didDocument:r.t0,keys:r.t1});case 17:case"end":return r.stop()}}),r)})));return function(t,e){return r.apply(this,arguments)}}()};export{ie as a,ne as g};
@@ -0,0 +1 @@
1
+ import{g as r,a as t}from"./did-key-common.esm-Dpr3yDzE-TRogf7i4.js";import{B as e,i as n}from"./main.js";import{_ as o}from"./tslib.es6-CNEFicEt-CmLYFWVC.js";import{x as i,e as a}from"./x25519-KEey2Qx1-NSl6svWQ.js";import"./jsonld-CkyvX_Vg-C61cS9xX.js";import"./_commonjs-dynamic-modules-COweQ1RR-BHR_E30J.js";var c,u,s={exports:{}},f={};var p,l=(u||(u=1,s.exports=(c||(c=1,p=f,Object.defineProperty(p,"__esModule",{value:!0}),p.staticImplements=function(){return function(r){}}),f)),s.exports);function h(r,t,e,n,o,i,a){try{var c=r[i](a),u=c.value}catch(r){return void e(r)}c.done?t(u):Promise.resolve(u).then(n,o)}function y(r){return function(){var t=this,e=arguments;return new Promise((function(n,o){var i=r.apply(t,e);function a(r){h(i,n,o,a,c,"next",r)}function c(r){h(i,n,o,a,c,"throw",r)}a(void 0)}))}}function v(){return v=Object.assign||function(r){for(var t=1;t<arguments.length;t++){var e=arguments[t];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(r[n]=e[n])}return r},v.apply(this,arguments)}var d,w,g=(d=function(r){var t=function(r){var t,e=Object.prototype,n=e.hasOwnProperty,o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",c=o.toStringTag||"@@toStringTag";function u(r,t,e){return Object.defineProperty(r,t,{value:e,enumerable:!0,configurable:!0,writable:!0}),r[t]}try{u({},"")}catch(r){u=function(r,t,e){return r[t]=e}}function s(r,t,e,n){var o=t&&t.prototype instanceof d?t:d,i=Object.create(o.prototype),a=new O(n||[]);return i._invoke=function(r,t,e){var n=p;return function(o,i){if(n===h)throw new Error("Generator is already running");if(n===y){if("throw"===o)throw i;return J()}for(e.method=o,e.arg=i;;){var a=e.delegate;if(a){var c=L(a,e);if(c){if(c===v)continue;return c}}if("next"===e.method)e.sent=e._sent=e.arg;else if("throw"===e.method){if(n===p)throw n=y,e.arg;e.dispatchException(e.arg)}else"return"===e.method&&e.abrupt("return",e.arg);n=h;var u=f(r,t,e);if("normal"===u.type){if(n=e.done?y:l,u.arg===v)continue;return{value:u.arg,done:e.done}}"throw"===u.type&&(n=y,e.method="throw",e.arg=u.arg)}}}(r,e,a),i}function f(r,t,e){try{return{type:"normal",arg:r.call(t,e)}}catch(r){return{type:"throw",arg:r}}}r.wrap=s;var p="suspendedStart",l="suspendedYield",h="executing",y="completed",v={};function d(){}function w(){}function g(){}var m={};m[i]=function(){return this};var b=Object.getPrototypeOf,K=b&&b(b(j([])));K&&K!==e&&n.call(K,i)&&(m=K);var x=g.prototype=d.prototype=Object.create(m);function E(r){["next","throw","return"].forEach((function(t){u(r,t,(function(r){return this._invoke(t,r)}))}))}function k(r,t){function e(o,i,a,c){var u=f(r[o],r,i);if("throw"!==u.type){var s=u.arg,p=s.value;return p&&"object"==typeof p&&n.call(p,"__await")?t.resolve(p.__await).then((function(r){e("next",r,a,c)}),(function(r){e("throw",r,a,c)})):t.resolve(p).then((function(r){s.value=r,a(s)}),(function(r){return e("throw",r,a,c)}))}c(u.arg)}var o;this._invoke=function(r,n){function i(){return new t((function(t,o){e(r,n,t,o)}))}return o=o?o.then(i,i):i()}}function L(r,e){var n=r.iterator[e.method];if(n===t){if(e.delegate=null,"throw"===e.method){if(r.iterator.return&&(e.method="return",e.arg=t,L(r,e),"throw"===e.method))return v;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return v}var o=f(n,r.iterator,e.arg);if("throw"===o.type)return e.method="throw",e.arg=o.arg,e.delegate=null,v;var i=o.arg;return i?i.done?(e[r.resultName]=i.value,e.next=r.nextLoc,"return"!==e.method&&(e.method="next",e.arg=t),e.delegate=null,v):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,v)}function A(r){var t={tryLoc:r[0]};1 in r&&(t.catchLoc=r[1]),2 in r&&(t.finallyLoc=r[2],t.afterLoc=r[3]),this.tryEntries.push(t)}function _(r){var t=r.completion||{};t.type="normal",delete t.arg,r.completion=t}function O(r){this.tryEntries=[{tryLoc:"root"}],r.forEach(A,this),this.reset(!0)}function j(r){if(r){var e=r[i];if(e)return e.call(r);if("function"==typeof r.next)return r;if(!isNaN(r.length)){var o=-1,a=function e(){for(;++o<r.length;)if(n.call(r,o))return e.value=r[o],e.done=!1,e;return e.value=t,e.done=!0,e};return a.next=a}}return{next:J}}function J(){return{value:t,done:!0}}return w.prototype=x.constructor=g,g.constructor=w,w.displayName=u(g,c,"GeneratorFunction"),r.isGeneratorFunction=function(r){var t="function"==typeof r&&r.constructor;return!!t&&(t===w||"GeneratorFunction"===(t.displayName||t.name))},r.mark=function(r){return Object.setPrototypeOf?Object.setPrototypeOf(r,g):(r.__proto__=g,u(r,c,"GeneratorFunction")),r.prototype=Object.create(x),r},r.awrap=function(r){return{__await:r}},E(k.prototype),k.prototype[a]=function(){return this},r.AsyncIterator=k,r.async=function(t,e,n,o,i){void 0===i&&(i=Promise);var a=new k(s(t,e,n,o),i);return r.isGeneratorFunction(e)?a:a.next().then((function(r){return r.done?r.value:a.next()}))},E(x),u(x,c,"Generator"),x[i]=function(){return this},x.toString=function(){return"[object Generator]"},r.keys=function(r){var t=[];for(var e in r)t.push(e);return t.reverse(),function e(){for(;t.length;){var n=t.pop();if(n in r)return e.value=n,e.done=!1,e}return e.done=!0,e}},r.values=j,O.prototype={constructor:O,reset:function(r){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(_),!r)for(var e in this)"t"===e.charAt(0)&&n.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=t)},stop:function(){this.done=!0;var r=this.tryEntries[0].completion;if("throw"===r.type)throw r.arg;return this.rval},dispatchException:function(r){if(this.done)throw r;var e=this;function o(n,o){return c.type="throw",c.arg=r,e.next=n,o&&(e.method="next",e.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],c=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var u=n.call(a,"catchLoc"),s=n.call(a,"finallyLoc");if(u&&s){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(u){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(r,t){for(var e=this.tryEntries.length-1;e>=0;--e){var o=this.tryEntries[e];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===r||"continue"===r)&&i.tryLoc<=t&&t<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=r,a.arg=t,i?(this.method="next",this.next=i.finallyLoc,v):this.complete(a)},complete:function(r,t){if("throw"===r.type)throw r.arg;return"break"===r.type||"continue"===r.type?this.next=r.arg:"return"===r.type?(this.rval=this.arg=r.arg,this.method="return",this.next="end"):"normal"===r.type&&t&&(this.next=t),v},finish:function(r){for(var t=this.tryEntries.length-1;t>=0;--t){var e=this.tryEntries[t];if(e.finallyLoc===r)return this.complete(e.completion,e.afterLoc),_(e),v}},catch:function(r){for(var t=this.tryEntries.length-1;t>=0;--t){var e=this.tryEntries[t];if(e.tryLoc===r){var n=e.completion;if("throw"===n.type){var o=n.arg;_(e)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(r,e,n){return this.delegate={iterator:j(r),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=t),v}},r}(r.exports);try{regeneratorRuntime=t}catch(r){Function("r","regeneratorRuntime = r")(t)}},d(w={exports:{}},w.exports),w.exports);function m(r){if(r.length>=255)throw new TypeError("Alphabet too long");for(var t=new Uint8Array(256),o=0;o<t.length;o++)t[o]=255;for(var i=0;i<r.length;i++){var a=r.charAt(i),c=a.charCodeAt(0);if(255!==t[c])throw new TypeError(a+" is ambiguous");t[c]=i}var u=r.length,s=r.charAt(0),f=Math.log(u)/Math.log(256),p=Math.log(256)/Math.log(u);function l(r){if("string"!=typeof r)throw new TypeError("Expected String");if(0===r.length)return e.alloc(0);var n=0;if(" "!==r[n]){for(var o=0,i=0;r[n]===s;)o++,n++;for(var a=(r.length-n)*f+1>>>0,c=new Uint8Array(a);r[n];){var p=t[r.charCodeAt(n)];if(255===p)return;for(var l=0,h=a-1;(0!==p||l<i)&&-1!==h;h--,l++)p+=u*c[h]>>>0,c[h]=p%256>>>0,p=p/256>>>0;if(0!==p)throw new Error("Non-zero carry");i=l,n++}if(" "!==r[n]){for(var y=a-i;y!==a&&0===c[y];)y++;var v=e.allocUnsafe(o+(a-y));v.fill(0,0,o);for(var d=o;y!==a;)v[d++]=c[y++];return v}}}return{encode:function(t){if((Array.isArray(t)||t instanceof Uint8Array)&&(t=e.from(t)),!n(t))throw new TypeError("Expected Buffer");if(0===t.length)return"";for(var o=0,i=0,a=0,c=t.length;a!==c&&0===t[a];)a++,o++;for(var f=(c-a)*p+1>>>0,l=new Uint8Array(f);a!==c;){for(var h=t[a],y=0,v=f-1;(0!==h||y<i)&&-1!==v;v--,y++)h+=256*l[v]>>>0,l[v]=h%u>>>0,h=h/u>>>0;if(0!==h)throw new Error("Non-zero carry");i=y,a++}for(var d=f-i;d!==f&&0===l[d];)d++;for(var w=s.repeat(o);d<f;++d)w+=r.charAt(l[d]);return w},decodeUnsafe:l,decode:function(r){var t=l(r);if(t)return t;throw new Error("Non-base"+u+" character")}}}var b,K=m("123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"),x=function(r){return e.from(r||"").toString("base64")},E=function(r){return x(r).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/g,"")},k=function(r,t){void 0===t&&(t="base58btc");var e=new Uint8Array(2+r.length);if(e[0]=236,e[1]=1,e.set(r,2),"base58btc"===t)return"z"+K.encode(e);if("base64url"===t)return"u"+E(e);throw new Error("Unsupported encoding: "+t)},L=function(r){return Uint8Array.from(e.from(r.x,"base64"))},A={JsonWebKey2020:function(r){var t,n=L(r.publicKeyJwk),o=void 0;r.privateKeyJwk&&(o=(t=r.privateKeyJwk,{publicKey:L(t),privateKey:Uint8Array.from(e.from(t.d,"base64"))}).privateKey);return{publicKey:n,privateKey:o}},X25519KeyAgreementKey2019:function(r){var t=K.decode(r.publicKeyBase58),e=void 0;return r.privateKeyBase58&&(e=Uint8Array.from(K.decode(r.privateKeyBase58))),{publicKey:t,privateKey:e}}},_={JsonWebKey2020:function(r,t,e,n){var o={kty:"OKP",crv:"X25519",x:E(e)},i={id:r,type:"JsonWebKey2020",controller:t,publicKeyJwk:o};return n&&(i.privateKeyJwk=v({},o,{d:E(n)})),i},X25519KeyAgreementKey2019:function(r,t,e,n){var o={id:r,type:"X25519KeyAgreementKey2019",controller:t,publicKeyBase58:K.encode(e)};return n&&(o.privateKeyBase58=K.encode(n)),o}},O=b=function(){function r(r){this.type="JsonWebKey2020",this.id=r.id,this.type=r.type||"JsonWebKey2020",this.controller=r.controller,this.publicKey=r.publicKey,this.privateKey=r.privateKey}r.fingerprintFromPublicKey=function(){var r=y(g.mark((function r(t){var e,n;return g.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,b.from(t);case 2:return e=r.sent,n=e.publicKey,r.abrupt("return",k(n));case 5:case"end":return r.stop()}}),r)})));return function(t){return r.apply(this,arguments)}}(),r.fromFingerprint=function(){var r=y(g.mark((function r(t){var e,n,o,i;return g.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(e=t.fingerprint,236!==(n=K.decode(e.substring(1)))[0]||1!==n[1]){r.next=12;break}return r.next=5,b.from({id:"",controller:"",type:"X25519KeyAgreementKey2019",publicKeyBase58:K.encode(n.slice(2))});case 5:return o=r.sent,r.next=8,o.fingerprint();case 8:return i=r.sent,o.id="did:key:"+i+"#"+i,o.controller="did:key:"+i,r.abrupt("return",o);case 12:throw new Error("Unsupported fingerprint type: "+e);case 13:case"end":return r.stop()}}),r)})));return function(t){return r.apply(this,arguments)}}();var t=r.prototype;return t.fingerprint=function(){var r=y(g.mark((function r(){return g.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.abrupt("return",k(this.publicKey));case 1:case"end":return r.stop()}}),r,this)})));return function(){return r.apply(this,arguments)}}(),t.export=function(){var r=y(g.mark((function r(t){return g.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(void 0===t&&(t={privateKey:!1,type:"JsonWebKey2020"}),!_[t.type]){r.next=3;break}return r.abrupt("return",_[t.type](this.id,this.controller,this.publicKey,t.privateKey?this.privateKey:void 0));case 3:throw new Error("Unsupported export options: "+JSON.stringify(t));case 4:case"end":return r.stop()}}),r,this)})));return function(t){return r.apply(this,arguments)}}(),t.deriveSecret=function(){var r=y(g.mark((function r(t){var e,n,o;return g.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return e=t.publicKey,r.next=3,b.from(e);case 3:if(n=r.sent,this.privateKey){r.next=6;break}throw new Error("No private key available for deriveSecret");case 6:return o=i.sharedKey(this.privateKey,n.publicKey,!0),r.abrupt("return",o);case 8:case"end":return r.stop()}}),r,this)})));return function(t){return r.apply(this,arguments)}}(),t.toJsonWebKeyPair=function(){var r=y(g.mark((function r(t){return g.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return void 0===t&&(t=!1),console.warn("DEPRECATION WARNING: .toJsonWebKeyPair should be replaced with .export({type:'JsonWebKey2020'})."),r.abrupt("return",_.JsonWebKey2020(this.id,this.controller,this.publicKey,t?this.privateKey:void 0));case 3:case"end":return r.stop()}}),r,this)})));return function(t){return r.apply(this,arguments)}}(),r}();function j(r,t,e,n,o,i,a){try{var c=r[i](a),u=c.value}catch(r){return void e(r)}c.done?t(u):Promise.resolve(u).then(n,o)}function J(r){return function(){var t=this,e=arguments;return new Promise((function(n,o){var i=r.apply(t,e);function a(r){j(i,n,o,a,c,"next",r)}function c(r){j(i,n,o,a,c,"throw",r)}a(void 0)}))}}function N(){return N=Object.assign||function(r){for(var t=1;t<arguments.length;t++){var e=arguments[t];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(r[n]=e[n])}return r},N.apply(this,arguments)}O.generate=function(){var r=y(g.mark((function r(t){var e,n,o,a,c;return g.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return e=t.secureRandom,n=i.generateKeyPair({isAvailable:!0,randomBytes:e}),o=k(n.publicKey),c=(a="did:key:"+o)+"#"+o,r.abrupt("return",new b({id:c,type:"JsonWebKey2020",controller:a,publicKey:n.publicKey,privateKey:n.secretKey}));case 6:case"end":return r.stop()}}),r)})));return function(t){return r.apply(this,arguments)}}(),O.from=function(){var r=y(g.mark((function r(t){var e,n,o;return g.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return e=A[t.type](t),n=e.publicKey,o=e.privateKey,r.abrupt("return",new b({id:t.id,type:t.type,controller:t.controller,publicKey:n,privateKey:o}));case 2:case"end":return r.stop()}}),r)})));return function(t){return r.apply(this,arguments)}}(),O=b=o([l.staticImplements()],O);var P=function(r,t){return r(t={exports:{}},t.exports),t.exports}((function(r){var t=function(r){var t,e=Object.prototype,n=e.hasOwnProperty,o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",c=o.toStringTag||"@@toStringTag";function u(r,t,e){return Object.defineProperty(r,t,{value:e,enumerable:!0,configurable:!0,writable:!0}),r[t]}try{u({},"")}catch(r){u=function(r,t,e){return r[t]=e}}function s(r,t,e,n){var o=t&&t.prototype instanceof d?t:d,i=Object.create(o.prototype),a=new O(n||[]);return i._invoke=function(r,t,e){var n=p;return function(o,i){if(n===h)throw new Error("Generator is already running");if(n===y){if("throw"===o)throw i;return J()}for(e.method=o,e.arg=i;;){var a=e.delegate;if(a){var c=L(a,e);if(c){if(c===v)continue;return c}}if("next"===e.method)e.sent=e._sent=e.arg;else if("throw"===e.method){if(n===p)throw n=y,e.arg;e.dispatchException(e.arg)}else"return"===e.method&&e.abrupt("return",e.arg);n=h;var u=f(r,t,e);if("normal"===u.type){if(n=e.done?y:l,u.arg===v)continue;return{value:u.arg,done:e.done}}"throw"===u.type&&(n=y,e.method="throw",e.arg=u.arg)}}}(r,e,a),i}function f(r,t,e){try{return{type:"normal",arg:r.call(t,e)}}catch(r){return{type:"throw",arg:r}}}r.wrap=s;var p="suspendedStart",l="suspendedYield",h="executing",y="completed",v={};function d(){}function w(){}function g(){}var m={};m[i]=function(){return this};var b=Object.getPrototypeOf,K=b&&b(b(j([])));K&&K!==e&&n.call(K,i)&&(m=K);var x=g.prototype=d.prototype=Object.create(m);function E(r){["next","throw","return"].forEach((function(t){u(r,t,(function(r){return this._invoke(t,r)}))}))}function k(r,t){function e(o,i,a,c){var u=f(r[o],r,i);if("throw"!==u.type){var s=u.arg,p=s.value;return p&&"object"==typeof p&&n.call(p,"__await")?t.resolve(p.__await).then((function(r){e("next",r,a,c)}),(function(r){e("throw",r,a,c)})):t.resolve(p).then((function(r){s.value=r,a(s)}),(function(r){return e("throw",r,a,c)}))}c(u.arg)}var o;this._invoke=function(r,n){function i(){return new t((function(t,o){e(r,n,t,o)}))}return o=o?o.then(i,i):i()}}function L(r,e){var n=r.iterator[e.method];if(n===t){if(e.delegate=null,"throw"===e.method){if(r.iterator.return&&(e.method="return",e.arg=t,L(r,e),"throw"===e.method))return v;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return v}var o=f(n,r.iterator,e.arg);if("throw"===o.type)return e.method="throw",e.arg=o.arg,e.delegate=null,v;var i=o.arg;return i?i.done?(e[r.resultName]=i.value,e.next=r.nextLoc,"return"!==e.method&&(e.method="next",e.arg=t),e.delegate=null,v):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,v)}function A(r){var t={tryLoc:r[0]};1 in r&&(t.catchLoc=r[1]),2 in r&&(t.finallyLoc=r[2],t.afterLoc=r[3]),this.tryEntries.push(t)}function _(r){var t=r.completion||{};t.type="normal",delete t.arg,r.completion=t}function O(r){this.tryEntries=[{tryLoc:"root"}],r.forEach(A,this),this.reset(!0)}function j(r){if(r){var e=r[i];if(e)return e.call(r);if("function"==typeof r.next)return r;if(!isNaN(r.length)){var o=-1,a=function e(){for(;++o<r.length;)if(n.call(r,o))return e.value=r[o],e.done=!1,e;return e.value=t,e.done=!0,e};return a.next=a}}return{next:J}}function J(){return{value:t,done:!0}}return w.prototype=x.constructor=g,g.constructor=w,w.displayName=u(g,c,"GeneratorFunction"),r.isGeneratorFunction=function(r){var t="function"==typeof r&&r.constructor;return!!t&&(t===w||"GeneratorFunction"===(t.displayName||t.name))},r.mark=function(r){return Object.setPrototypeOf?Object.setPrototypeOf(r,g):(r.__proto__=g,u(r,c,"GeneratorFunction")),r.prototype=Object.create(x),r},r.awrap=function(r){return{__await:r}},E(k.prototype),k.prototype[a]=function(){return this},r.AsyncIterator=k,r.async=function(t,e,n,o,i){void 0===i&&(i=Promise);var a=new k(s(t,e,n,o),i);return r.isGeneratorFunction(e)?a:a.next().then((function(r){return r.done?r.value:a.next()}))},E(x),u(x,c,"Generator"),x[i]=function(){return this},x.toString=function(){return"[object Generator]"},r.keys=function(r){var t=[];for(var e in r)t.push(e);return t.reverse(),function e(){for(;t.length;){var n=t.pop();if(n in r)return e.value=n,e.done=!1,e}return e.done=!0,e}},r.values=j,O.prototype={constructor:O,reset:function(r){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(_),!r)for(var e in this)"t"===e.charAt(0)&&n.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=t)},stop:function(){this.done=!0;var r=this.tryEntries[0].completion;if("throw"===r.type)throw r.arg;return this.rval},dispatchException:function(r){if(this.done)throw r;var e=this;function o(n,o){return c.type="throw",c.arg=r,e.next=n,o&&(e.method="next",e.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],c=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var u=n.call(a,"catchLoc"),s=n.call(a,"finallyLoc");if(u&&s){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(u){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(r,t){for(var e=this.tryEntries.length-1;e>=0;--e){var o=this.tryEntries[e];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===r||"continue"===r)&&i.tryLoc<=t&&t<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=r,a.arg=t,i?(this.method="next",this.next=i.finallyLoc,v):this.complete(a)},complete:function(r,t){if("throw"===r.type)throw r.arg;return"break"===r.type||"continue"===r.type?this.next=r.arg:"return"===r.type?(this.rval=this.arg=r.arg,this.method="return",this.next="end"):"normal"===r.type&&t&&(this.next=t),v},finish:function(r){for(var t=this.tryEntries.length-1;t>=0;--t){var e=this.tryEntries[t];if(e.finallyLoc===r)return this.complete(e.completion,e.afterLoc),_(e),v}},catch:function(r){for(var t=this.tryEntries.length-1;t>=0;--t){var e=this.tryEntries[t];if(e.tryLoc===r){var n=e.completion;if("throw"===n.type){var o=n.arg;_(e)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(r,e,n){return this.delegate={iterator:j(r),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=t),v}},r}(r.exports);try{regeneratorRuntime=t}catch(r){Function("r","regeneratorRuntime = r")(t)}}));function U(r){if(r.length>=255)throw new TypeError("Alphabet too long");for(var t=new Uint8Array(256),o=0;o<t.length;o++)t[o]=255;for(var i=0;i<r.length;i++){var a=r.charAt(i),c=a.charCodeAt(0);if(255!==t[c])throw new TypeError(a+" is ambiguous");t[c]=i}var u=r.length,s=r.charAt(0),f=Math.log(u)/Math.log(256),p=Math.log(256)/Math.log(u);function l(r){if("string"!=typeof r)throw new TypeError("Expected String");if(0===r.length)return e.alloc(0);var n=0;if(" "!==r[n]){for(var o=0,i=0;r[n]===s;)o++,n++;for(var a=(r.length-n)*f+1>>>0,c=new Uint8Array(a);r[n];){var p=t[r.charCodeAt(n)];if(255===p)return;for(var l=0,h=a-1;(0!==p||l<i)&&-1!==h;h--,l++)p+=u*c[h]>>>0,c[h]=p%256>>>0,p=p/256>>>0;if(0!==p)throw new Error("Non-zero carry");i=l,n++}if(" "!==r[n]){for(var y=a-i;y!==a&&0===c[y];)y++;var v=e.allocUnsafe(o+(a-y));v.fill(0,0,o);for(var d=o;y!==a;)v[d++]=c[y++];return v}}}return{encode:function(t){if((Array.isArray(t)||t instanceof Uint8Array)&&(t=e.from(t)),!n(t))throw new TypeError("Expected Buffer");if(0===t.length)return"";for(var o=0,i=0,a=0,c=t.length;a!==c&&0===t[a];)a++,o++;for(var f=(c-a)*p+1>>>0,l=new Uint8Array(f);a!==c;){for(var h=t[a],y=0,v=f-1;(0!==h||y<i)&&-1!==v;v--,y++)h+=256*l[v]>>>0,l[v]=h%u>>>0,h=h/u>>>0;if(0!==h)throw new Error("Non-zero carry");i=y,a++}for(var d=f-i;d!==f&&0===l[d];)d++;for(var w=s.repeat(o);d<f;++d)w+=r.charAt(l[d]);return w},decodeUnsafe:l,decode:function(r){var t=l(r);if(t)return t;throw new Error("Non-base"+u+" character")}}}var W,S=U("123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"),T=function(r){return e.from(r||"").toString("base64")},G=function(r){return T(r).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/g,"")},B=function(r,t){void 0===t&&(t="base58btc");var e=new Uint8Array(2+r.length);if(e[0]=237,e[1]=1,e.set(r,2),"base58btc"===t)return"z"+S.encode(e);if("base64url"===t)return"u"+G(e);throw new Error("Unsupported encoding: "+t)},F=function(r){return Uint8Array.from(e.from(r.x,"base64"))},R={JsonWebKey2020:function(r){var t,n=F(r.publicKeyJwk),o=void 0;r.privateKeyJwk&&(o=(t=r.privateKeyJwk,{publicKey:F(t),privateKey:Uint8Array.from(e.concat([e.from(t.d,"base64"),e.from(t.x,"base64")]))}).privateKey);return{publicKey:n,privateKey:o}},Ed25519VerificationKey2018:function(r){var t=S.decode(r.publicKeyBase58),e=void 0;return r.privateKeyBase58&&(e=Uint8Array.from(S.decode(r.privateKeyBase58))),{publicKey:t,privateKey:e}}},I=function(r){if(!R[r.type])throw new Error("Cannot import from unsupported type: "+JSON.stringify(r,null,2));return R[r.type](r)},X={JsonWebKey2020:function(r,t,e,n){var o={kty:"OKP",crv:"Ed25519",x:G(e)},i={id:r,type:"JsonWebKey2020",controller:t,publicKeyJwk:o};return n&&(i.privateKeyJwk=N({},o,{d:G(n.slice(0,n.length/2))})),i},Ed25519VerificationKey2018:function(r,t,e,n){var o={id:r,type:"Ed25519VerificationKey2018",controller:t,publicKeyBase58:S.encode(e)};return n&&(o.privateKeyBase58=S.encode(n)),o}},C={EdDsa:{__proto__:null,signer:function(r){return{sign:function(t){return J(P.mark((function e(){var n;return P.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.data,e.abrupt("return",a.sign(r,n));case 2:case"end":return e.stop()}}),e)})))()}}},verifier:function(r){return{verify:function(t){return J(P.mark((function e(){var n,o,i;return P.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n=t.data,o=t.signature,i=!1;try{i=a.verify(r,n,o)}catch(r){}return e.abrupt("return",i);case 4:case"end":return e.stop()}}),e)})))()}}}}},M=W=function(){function r(r){this.type="JsonWebKey2020",this.id=r.id,this.type=r.type||"JsonWebKey2020",this.controller=r.controller,this.publicKey=r.publicKey,this.privateKey=r.privateKey}r.fingerprintFromPublicKey=function(){var r=J(P.mark((function r(t){var e,n;return P.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,W.from(t);case 2:return e=r.sent,n=e.publicKey,r.abrupt("return",B(n));case 5:case"end":return r.stop()}}),r)})));return function(t){return r.apply(this,arguments)}}(),r.toX25519KeyPair=function(){var r=J(P.mark((function r(t){var e,n,o;return P.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return e=a.convertPublicKeyToX25519(t.publicKey),n=void 0,t.privateKey&&(n=a.convertSecretKeyToX25519(t.privateKey)),o=new O({id:"",type:"X25519KeyAgreementKey2019",controller:t.controller,publicKey:e,privateKey:n}),r.t0=t.controller+"#",r.next=7,o.fingerprint();case 7:return r.t1=r.sent,o.id=r.t0+r.t1,r.abrupt("return",o);case 10:case"end":return r.stop()}}),r)})));return function(t){return r.apply(this,arguments)}}(),r.fromFingerprint=function(){var r=J(P.mark((function r(t){var e,n,o,i;return P.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(e=t.fingerprint,237!==(n=S.decode(e.substring(1)))[0]||1!==n[1]){r.next=12;break}return r.next=5,W.from({id:"",controller:"",type:"Ed25519VerificationKey2018",publicKeyBase58:S.encode(n.slice(2))});case 5:return o=r.sent,r.next=8,o.fingerprint();case 8:return i=r.sent,o.id="did:key:"+i+"#"+i,o.controller="did:key:"+i,r.abrupt("return",o);case 12:throw new Error("Unsupported fingerprint type: "+e);case 13:case"end":return r.stop()}}),r)})));return function(t){return r.apply(this,arguments)}}();var t=r.prototype;return t.fingerprint=function(){var r=J(P.mark((function r(){return P.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.abrupt("return",B(this.publicKey));case 1:case"end":return r.stop()}}),r,this)})));return function(){return r.apply(this,arguments)}}(),t.export=function(){var r=J(P.mark((function r(t){return P.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(void 0===t&&(t={privateKey:!1,type:"JsonWebKey2020"}),!X[t.type]){r.next=3;break}return r.abrupt("return",X[t.type](this.id,this.controller,this.publicKey,t.privateKey?this.privateKey:void 0));case 3:throw new Error("Unsupported export options: "+JSON.stringify(t));case 4:case"end":return r.stop()}}),r,this)})));return function(t){return r.apply(this,arguments)}}(),t.signer=function(r){if(void 0===r&&(r="EdDsa"),!this.privateKey)throw new Error("No private key to sign with.");if(C[r])return C[r].signer(this.privateKey);throw new Error("Unsupported suite type "+r)},t.verifier=function(r){if(void 0===r&&(r="EdDsa"),!this.publicKey)throw new Error("No public key to verify with.");if(C[r])return C[r].verifier(this.publicKey);throw new Error("Unsupported suite type "+r)},t.getDerivedKeyPairs=function(){var r=J(P.mark((function r(){return P.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.t0=this,r.next=3,W.toX25519KeyPair(this);case 3:return r.t1=r.sent,r.abrupt("return",[r.t0,r.t1]);case 5:case"end":return r.stop()}}),r,this)})));return function(){return r.apply(this,arguments)}}(),t.toJsonWebKeyPair=function(){var r=J(P.mark((function r(t){return P.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return void 0===t&&(t=!1),console.warn("DEPRECATION WARNING: .toJsonWebKeyPair should be replaced with .export({type:'JsonWebKey2020'})."),r.abrupt("return",X.JsonWebKey2020(this.id,this.controller,this.publicKey,t?this.privateKey:void 0));case 3:case"end":return r.stop()}}),r,this)})));return function(t){return r.apply(this,arguments)}}(),r}();M.generate=function(){var r=J(P.mark((function r(t){var e,n,o,i,c;return P.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return e=t.secureRandom,n=a.generateKeyPair({isAvailable:!0,randomBytes:e}),o=B(n.publicKey),c=(i="did:key:"+o)+"#"+o,r.abrupt("return",new W({id:c,type:"JsonWebKey2020",controller:i,publicKey:n.publicKey,privateKey:n.secretKey}));case 6:case"end":return r.stop()}}),r)})));return function(t){return r.apply(this,arguments)}}(),M.from=function(){var r=J(P.mark((function r(t){var e,n,o;return P.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return e=I(t),n=e.publicKey,o=e.privateKey,r.abrupt("return",new W({id:t.id,type:t.type,controller:t.controller,publicKey:n,privateKey:o}));case 2:case"end":return r.stop()}}),r)})));return function(t){return r.apply(this,arguments)}}();var D=r(M=W=o([l.staticImplements()],M)),z=t(M);export{M as Ed25519KeyPair,D as generate,z as resolve};