@tangle-js/ld-proofs
Version:
Linked Data Proofs on the Tangle. Powered by IOTA Identity & IOTA Streams
2 lines • 1.66 MB
JavaScript
/*! For license information please see ld-proofs-web.js.LICENSE.txt */
var t={8581:(t,e,i)=>{let r;i.r(e),i.d(e,{Account:()=>P,AccountBuilder:()=>U,AutoSave:()=>J,ChainState:()=>Z,Client:()=>H,Credential:()=>$,CredentialValidationOptions:()=>X,CredentialValidator:()=>Y,DID:()=>tt,DIDMessageEncoding:()=>C,DIDUrl:()=>it,DiffChainHistory:()=>nt,DiffMessage:()=>st,Document:()=>ht,DocumentHistory:()=>ft,DocumentMetadata:()=>lt,Duration:()=>pt,Ed25519:()=>_t,ExplorerUrl:()=>bt,FailFast:()=>L,IntegrationChainHistory:()=>yt,KeyLocation:()=>Mt,KeyPair:()=>kt,KeyType:()=>j,MethodContent:()=>At,MethodData:()=>It,MethodRelationship:()=>O,MethodScope:()=>Nt,MethodType:()=>Ot,Network:()=>Lt,Presentation:()=>Ct,PresentationValidationOptions:()=>Pt,PresentationValidator:()=>Ut,Proof:()=>Jt,ProofOptions:()=>Zt,ProofPurpose:()=>Ht,Receipt:()=>$t,ResolvedDocument:()=>Xt,Resolver:()=>Yt,ResolverBuilder:()=>te,Service:()=>ie,Signature:()=>ne,SubjectHolderRelationship:()=>T,Timestamp:()=>se,VerificationMethod:()=>he,VerifierOptions:()=>fe,X25519:()=>le,init:()=>me,start:()=>N});let n=new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0});n.decode();let o=null;function s(){return null!==o&&o.buffer===r.memory.buffer||(o=new Uint8Array(r.memory.buffer)),o}function a(t,e){return n.decode(s().subarray(t,t+e))}const h=new Array(32).fill(void 0);h.push(void 0,null,!0,!1);let u=h.length;function f(t){u===h.length&&h.push(h.length+1);const e=u;return u=h[e],h[e]=t,e}function d(t){return h[t]}function l(t){const e=d(t);return function(t){t<36||(h[t]=u,u=t)}(t),e}let c=0,p=new TextEncoder("utf-8");const m="function"==typeof p.encodeInto?function(t,e){return p.encodeInto(t,e)}:function(t,e){const i=p.encode(t);return e.set(i),{read:t.length,written:i.length}};function _(t,e,i){if(void 0===i){const i=p.encode(t),r=e(i.length);return s().subarray(r,r+i.length).set(i),c=i.length,r}let r=t.length,n=e(r);const o=s();let a=0;for(;a<r;a++){const e=t.charCodeAt(a);if(e>127)break;o[n+a]=e}if(a!==r){0!==a&&(t=t.slice(a)),n=i(n,r,r=a+3*t.length);const e=s().subarray(n+a,n+r);a+=m(t,e).written}return c=a,n}let g=null;function b(){return null!==g&&g.buffer===r.memory.buffer||(g=new Int32Array(r.memory.buffer)),g}function w(t){return null==t}function y(t){const e=typeof t;if("number"==e||"boolean"==e||null==t)return`${t}`;if("string"==e)return`"${t}"`;if("symbol"==e){const e=t.description;return null==e?"Symbol":`Symbol(${e})`}if("function"==e){const e=t.name;return"string"==typeof e&&e.length>0?`Function(${e})`:"Function"}if(Array.isArray(t)){const e=t.length;let i="[";e>0&&(i+=y(t[0]));for(let r=1;r<e;r++)i+=", "+y(t[r]);return i+="]",i}const i=/\[object ([^\]]+)\]/.exec(toString.call(t));let r;if(!(i.length>1))return toString.call(t);if(r=i[1],"Object"==r)try{return"Object("+JSON.stringify(t)+")"}catch(t){return"Object"}return t instanceof Error?`${t.name}: ${t.message}\n${t.stack}`:r}const v=new FinalizationRegistry((t=>{r.__wbindgen_export_2.get(t.dtor)(t.a,t.b)}));function M(t,e,i,n){const o={a:t,b:e,cnt:1,dtor:i},s=(...t)=>{o.cnt++;const e=o.a;o.a=0;try{return n(e,o.b,...t)}finally{0==--o.cnt?(r.__wbindgen_export_2.get(o.dtor)(e,o.b),v.unregister(o)):o.a=e}};return s.original=o,v.register(s,o,o),s}function S(t,e,i){r._dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h00e7142c523eafb6(t,e,f(i))}function k(t,e){r._dyn_core__ops__function__FnMut_____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h1c90929447c4b7fc(t,e)}function x(t,e){const i=e(1*t.length);return s().set(t,i/1),c=t.length,i}function A(t,e){if(!(t instanceof e))throw new Error(`expected instance of ${e.name}`);return t.ptr}let E=32;function I(t){if(1==E)throw new Error("out of js stack");return h[--E]=t,E}function R(t,e){return s().subarray(t/1,t/1+e)}function N(){r.start()}function B(t,e){try{return t.apply(this,e)}catch(t){r.__wbindgen_exn_store(f(t))}}const O=Object.freeze({Authentication:0,0:"Authentication",AssertionMethod:1,1:"AssertionMethod",KeyAgreement:2,2:"KeyAgreement",CapabilityDelegation:3,3:"CapabilityDelegation",CapabilityInvocation:4,4:"CapabilityInvocation"}),T=Object.freeze({AlwaysSubject:0,0:"AlwaysSubject",SubjectOnNonTransferable:1,1:"SubjectOnNonTransferable",Any:2,2:"Any"}),L=Object.freeze({AllErrors:0,0:"AllErrors",FirstError:1,1:"FirstError"}),j=Object.freeze({Ed25519:1,1:"Ed25519",X25519:2,2:"X25519"}),C=Object.freeze({Json:0,0:"Json",JsonBrotli:1,1:"JsonBrotli"}),D=new FinalizationRegistry((t=>r.__wbg_account_free(t)));class P{static __wrap(t){const e=Object.create(P.prototype);return e.ptr=t,D.register(e,e.ptr,e),e}__destroy_into_raw(){const t=this.ptr;return this.ptr=0,D.unregister(this),t}free(){const t=this.__destroy_into_raw();r.__wbg_account_free(t)}deleteService(t){try{const n=r.__wbindgen_add_to_stack_pointer(-16);r.account_deleteService(n,this.ptr,I(t));var e=b()[n/4+0],i=b()[n/4+1];if(b()[n/4+2])throw l(i);return l(e)}finally{r.__wbindgen_add_to_stack_pointer(16),h[E++]=void 0}}setAlsoKnownAs(t){try{const n=r.__wbindgen_add_to_stack_pointer(-16);r.account_setAlsoKnownAs(n,this.ptr,I(t));var e=b()[n/4+0],i=b()[n/4+1];if(b()[n/4+2])throw l(i);return l(e)}finally{r.__wbindgen_add_to_stack_pointer(16),h[E++]=void 0}}did(){var t=r.account_did(this.ptr);return tt.__wrap(t)}autopublish(){return 0!==r.account_autopublish(this.ptr)}autosave(){var t=r.account_autosave(this.ptr);return J.__wrap(t)}document(){var t=r.account_document(this.ptr);return ht.__wrap(t)}resolveIdentity(){return l(r.account_resolveIdentity(this.ptr))}deleteIdentity(){const t=this.__destroy_into_raw();return l(r.account_deleteIdentity(t))}publish(t){return l(r.account_publish(this.ptr,w(t)?0:f(t)))}createSignedCredential(t,e,i){var n=_(t,r.__wbindgen_malloc,r.__wbindgen_realloc),o=c;return A(e,$),A(i,Zt),l(r.account_createSignedCredential(this.ptr,n,o,e.ptr,i.ptr))}createSignedDocument(t,e,i){var n=_(t,r.__wbindgen_malloc,r.__wbindgen_realloc),o=c;return A(e,ht),A(i,Zt),l(r.account_createSignedDocument(this.ptr,n,o,e.ptr,i.ptr))}createSignedPresentation(t,e,i){var n=_(t,r.__wbindgen_malloc,r.__wbindgen_realloc),o=c;return A(e,Ct),A(i,Zt),l(r.account_createSignedPresentation(this.ptr,n,o,e.ptr,i.ptr))}createSignedData(t,e,i){try{const u=r.__wbindgen_add_to_stack_pointer(-16);var n=_(t,r.__wbindgen_malloc,r.__wbindgen_realloc),o=c;A(i,Zt),r.account_createSignedData(u,this.ptr,n,o,I(e),i.ptr);var s=b()[u/4+0],a=b()[u/4+1];if(b()[u/4+2])throw l(a);return l(s)}finally{r.__wbindgen_add_to_stack_pointer(16),h[E++]=void 0}}updateDocumentUnchecked(t){return A(t,ht),l(r.account_updateDocumentUnchecked(this.ptr,t.ptr))}fetchDocument(){return l(r.account_fetchDocument(this.ptr))}deleteMethod(t){try{const n=r.__wbindgen_add_to_stack_pointer(-16);r.account_deleteMethod(n,this.ptr,I(t));var e=b()[n/4+0],i=b()[n/4+1];if(b()[n/4+2])throw l(i);return l(e)}finally{r.__wbindgen_add_to_stack_pointer(16),h[E++]=void 0}}setController(t){try{const n=r.__wbindgen_add_to_stack_pointer(-16);r.account_setController(n,this.ptr,I(t));var e=b()[n/4+0],i=b()[n/4+1];if(b()[n/4+2])throw l(i);return l(e)}finally{r.__wbindgen_add_to_stack_pointer(16),h[E++]=void 0}}createService(t){try{const n=r.__wbindgen_add_to_stack_pointer(-16);r.account_createService(n,this.ptr,I(t));var e=b()[n/4+0],i=b()[n/4+1];if(b()[n/4+2])throw l(i);return l(e)}finally{r.__wbindgen_add_to_stack_pointer(16),h[E++]=void 0}}attachMethodRelationships(t){try{const n=r.__wbindgen_add_to_stack_pointer(-16);r.account_attachMethodRelationships(n,this.ptr,I(t));var e=b()[n/4+0],i=b()[n/4+1];if(b()[n/4+2])throw l(i);return l(e)}finally{r.__wbindgen_add_to_stack_pointer(16),h[E++]=void 0}}createMethod(t){try{const n=r.__wbindgen_add_to_stack_pointer(-16);r.account_createMethod(n,this.ptr,I(t));var e=b()[n/4+0],i=b()[n/4+1];if(b()[n/4+2])throw l(i);return l(e)}finally{r.__wbindgen_add_to_stack_pointer(16),h[E++]=void 0}}detachMethodRelationships(t){try{const n=r.__wbindgen_add_to_stack_pointer(-16);r.account_detachMethodRelationships(n,this.ptr,I(t));var e=b()[n/4+0],i=b()[n/4+1];if(b()[n/4+2])throw l(i);return l(e)}finally{r.__wbindgen_add_to_stack_pointer(16),h[E++]=void 0}}}const q=new FinalizationRegistry((t=>r.__wbg_accountbuilder_free(t)));class U{static __wrap(t){const e=Object.create(U.prototype);return e.ptr=t,q.register(e,e.ptr,e),e}__destroy_into_raw(){const t=this.ptr;return this.ptr=0,q.unregister(this),t}free(){const t=this.__destroy_into_raw();r.__wbg_accountbuilder_free(t)}constructor(t){try{const n=r.__wbindgen_add_to_stack_pointer(-16);r.accountbuilder_new(n,w(t)?0:f(t));var e=b()[n/4+0],i=b()[n/4+1];if(b()[n/4+2])throw l(i);return U.__wrap(e)}finally{r.__wbindgen_add_to_stack_pointer(16)}}loadIdentity(t){try{const n=r.__wbindgen_add_to_stack_pointer(-16);A(t,tt),r.accountbuilder_loadIdentity(n,this.ptr,t.ptr);var e=b()[n/4+0],i=b()[n/4+1];if(b()[n/4+2])throw l(i);return l(e)}finally{r.__wbindgen_add_to_stack_pointer(16)}}createIdentity(t){try{const n=r.__wbindgen_add_to_stack_pointer(-16);r.accountbuilder_createIdentity(n,this.ptr,w(t)?0:f(t));var e=b()[n/4+0],i=b()[n/4+1];if(b()[n/4+2])throw l(i);return l(e)}finally{r.__wbindgen_add_to_stack_pointer(16)}}}const z=new FinalizationRegistry((t=>r.__wbg_autosave_free(t)));class J{static __wrap(t){const e=Object.create(J.prototype);return e.ptr=t,z.register(e,e.ptr,e),e}toJSON(){return{}}toString(){return JSON.stringify(this)}__destroy_into_raw(){const t=this.ptr;return this.ptr=0,z.unregister(this),t}free(){const t=this.__destroy_into_raw();r.__wbg_autosave_free(t)}static never(){var t=r.autosave_never();return J.__wrap(t)}static every(){var t=r.autosave_every();return J.__wrap(t)}static batch(t){var e=r.autosave_batch(t);return J.__wrap(e)}toJSON(){try{const i=r.__wbindgen_add_to_stack_pointer(-16);r.autosave_toJSON(i,this.ptr);var t=b()[i/4+0],e=b()[i/4+1];if(b()[i/4+2])throw l(e);return l(t)}finally{r.__wbindgen_add_to_stack_pointer(16)}}static fromJSON(t){try{const n=r.__wbindgen_add_to_stack_pointer(-16);r.autosave_fromJSON(n,f(t));var e=b()[n/4+0],i=b()[n/4+1];if(b()[n/4+2])throw l(i);return J.__wrap(e)}finally{r.__wbindgen_add_to_stack_pointer(16)}}}const F=new FinalizationRegistry((t=>r.__wbg_chainstate_free(t)));class Z{static __wrap(t){const e=Object.create(Z.prototype);return e.ptr=t,F.register(e,e.ptr,e),e}toJSON(){return{}}toString(){return JSON.stringify(this)}__destroy_into_raw(){const t=this.ptr;return this.ptr=0,F.unregister(this),t}free(){const t=this.__destroy_into_raw();r.__wbg_chainstate_free(t)}toJSON(){try{const i=r.__wbindgen_add_to_stack_pointer(-16);r.chainstate_toJSON(i,this.ptr);var t=b()[i/4+0],e=b()[i/4+1];if(b()[i/4+2])throw l(e);return l(t)}finally{r.__wbindgen_add_to_stack_pointer(16)}}static fromJSON(t){try{const n=r.__wbindgen_add_to_stack_pointer(-16);r.chainstate_fromJSON(n,f(t));var e=b()[n/4+0],i=b()[n/4+1];if(b()[n/4+2])throw l(i);return Z.__wrap(e)}finally{r.__wbindgen_add_to_stack_pointer(16)}}}const K=new FinalizationRegistry((t=>r.__wbg_client_free(t)));class H{static __wrap(t){const e=Object.create(H.prototype);return e.ptr=t,K.register(e,e.ptr,e),e}__destroy_into_raw(){const t=this.ptr;return this.ptr=0,K.unregister(this),t}free(){const t=this.__destroy_into_raw();r.__wbg_client_free(t)}constructor(){try{const i=r.__wbindgen_add_to_stack_pointer(-16);r.client_new(i);var t=b()[i/4+0],e=b()[i/4+1];if(b()[i/4+2])throw l(e);return H.__wrap(t)}finally{r.__wbindgen_add_to_stack_pointer(16)}}static fromConfig(t){try{const n=r.__wbindgen_add_to_stack_pointer(-16);r.client_fromConfig(n,f(t));var e=b()[n/4+0],i=b()[n/4+1];if(b()[n/4+2])throw l(i);return l(e)}finally{r.__wbindgen_add_to_stack_pointer(16)}}network(){var t=r.client_network(this.ptr);return Lt.__wrap(t)}publishDocument(t){try{const n=r.__wbindgen_add_to_stack_pointer(-16);A(t,ht),r.client_publishDocument(n,this.ptr,t.ptr);var e=b()[n/4+0],i=b()[n/4+1];if(b()[n/4+2])throw l(i);return l(e)}finally{r.__wbindgen_add_to_stack_pointer(16)}}publishDiff(t,e){try{const a=r.__wbindgen_add_to_stack_pointer(-16);var i=_(t,r.__wbindgen_malloc,r.__wbindgen_realloc),n=c;A(e,st),r.client_publishDiff(a,this.ptr,i,n,e.ptr);var o=b()[a/4+0],s=b()[a/4+1];if(b()[a/4+2])throw l(s);return l(o)}finally{r.__wbindgen_add_to_stack_pointer(16)}}publishJSON(t,e){try{const a=r.__wbindgen_add_to_stack_pointer(-16);var i=_(t,r.__wbindgen_malloc,r.__wbindgen_realloc),n=c;r.client_publishJSON(a,this.ptr,i,n,I(e));var o=b()[a/4+0],s=b()[a/4+1];if(b()[a/4+2])throw l(s);return l(o)}finally{r.__wbindgen_add_to_stack_pointer(16),h[E++]=void 0}}publishJsonWithRetry(t,e,i,n){try{const f=r.__wbindgen_add_to_stack_pointer(-16);var o=_(t,r.__wbindgen_malloc,r.__wbindgen_realloc),s=c;r.client_publishJsonWithRetry(f,this.ptr,o,s,I(e),!w(i),w(i)?0:i,!w(n),w(n)?0:n);var a=b()[f/4+0],u=b()[f/4+1];if(b()[f/4+2])throw l(u);return l(a)}finally{r.__wbindgen_add_to_stack_pointer(16),h[E++]=void 0}}resolve(t){try{const n=r.__wbindgen_add_to_stack_pointer(-16);r.client_resolve(n,this.ptr,f(t));var e=b()[n/4+0],i=b()[n/4+1];if(b()[n/4+2])throw l(i);return l(e)}finally{r.__wbindgen_add_to_stack_pointer(16)}}resolveHistory(t){try{const n=r.__wbindgen_add_to_stack_pointer(-16);r.client_resolveHistory(n,this.ptr,f(t));var e=b()[n/4+0],i=b()[n/4+1];if(b()[n/4+2])throw l(i);return l(e)}finally{r.__wbindgen_add_to_stack_pointer(16)}}resolveDiffHistory(t){try{const n=r.__wbindgen_add_to_stack_pointer(-16);A(t,Xt),r.client_resolveDiffHistory(n,this.ptr,t.ptr);var e=b()[n/4+0],i=b()[n/4+1];if(b()[n/4+2])throw l(i);return l(e)}finally{r.__wbindgen_add_to_stack_pointer(16)}}}const V=new FinalizationRegistry((t=>r.__wbg_credential_free(t)));class ${static __wrap(t){const e=Object.create($.prototype);return e.ptr=t,V.register(e,e.ptr,e),e}toJSON(){return{}}toString(){return JSON.stringify(this)}__destroy_into_raw(){const t=this.ptr;return this.ptr=0,V.unregister(this),t}free(){const t=this.__destroy_into_raw();r.__wbg_credential_free(t)}static extend(t){try{const n=r.__wbindgen_add_to_stack_pointer(-16);r.credential_extend(n,I(t));var e=b()[n/4+0],i=b()[n/4+1];if(b()[n/4+2])throw l(i);return $.__wrap(e)}finally{r.__wbindgen_add_to_stack_pointer(16),h[E++]=void 0}}static issue(t,e,i,n){try{const p=r.__wbindgen_add_to_stack_pointer(-16);A(t,ht);var o=w(i)?0:_(i,r.__wbindgen_malloc,r.__wbindgen_realloc),s=c,a=w(n)?0:_(n,r.__wbindgen_malloc,r.__wbindgen_realloc),u=c;r.credential_issue(p,t.ptr,I(e),o,s,a,u);var f=b()[p/4+0],d=b()[p/4+1];if(b()[p/4+2])throw l(d);return $.__wrap(f)}finally{r.__wbindgen_add_to_stack_pointer(16),h[E++]=void 0}}toJSON(){try{const i=r.__wbindgen_add_to_stack_pointer(-16);r.credential_toJSON(i,this.ptr);var t=b()[i/4+0],e=b()[i/4+1];if(b()[i/4+2])throw l(e);return l(t)}finally{r.__wbindgen_add_to_stack_pointer(16)}}static fromJSON(t){try{const n=r.__wbindgen_add_to_stack_pointer(-16);r.credential_fromJSON(n,I(t));var e=b()[n/4+0],i=b()[n/4+1];if(b()[n/4+2])throw l(i);return $.__wrap(e)}finally{r.__wbindgen_add_to_stack_pointer(16),h[E++]=void 0}}clone(){var t=r.credential_clone(this.ptr);return $.__wrap(t)}}const G=new FinalizationRegistry((t=>r.__wbg_credentialvalidationoptions_free(t)));class X{static __wrap(t){const e=Object.create(X.prototype);return e.ptr=t,G.register(e,e.ptr,e),e}__destroy_into_raw(){const t=this.ptr;return this.ptr=0,G.unregister(this),t}free(){const t=this.__destroy_into_raw();r.__wbg_credentialvalidationoptions_free(t)}constructor(t){try{const n=r.__wbindgen_add_to_stack_pointer(-16);r.credentialvalidationoptions_new(n,f(t));var e=b()[n/4+0],i=b()[n/4+1];if(b()[n/4+2])throw l(i);return X.__wrap(e)}finally{r.__wbindgen_add_to_stack_pointer(16)}}static default(){var t=r.credentialvalidationoptions_default();return X.__wrap(t)}toJSON(){try{const i=r.__wbindgen_add_to_stack_pointer(-16);r.credentialvalidationoptions_toJSON(i,this.ptr);var t=b()[i/4+0],e=b()[i/4+1];if(b()[i/4+2])throw l(e);return l(t)}finally{r.__wbindgen_add_to_stack_pointer(16)}}static fromJSON(t){try{const n=r.__wbindgen_add_to_stack_pointer(-16);r.credentialvalidationoptions_fromJSON(n,I(t));var e=b()[n/4+0],i=b()[n/4+1];if(b()[n/4+2])throw l(i);return X.__wrap(e)}finally{r.__wbindgen_add_to_stack_pointer(16),h[E++]=void 0}}clone(){var t=r.credentialvalidationoptions_clone(this.ptr);return X.__wrap(t)}}const W=new FinalizationRegistry((t=>r.__wbg_credentialvalidator_free(t)));class Y{toJSON(){return{}}toString(){return JSON.stringify(this)}__destroy_into_raw(){const t=this.ptr;return this.ptr=0,W.unregister(this),t}free(){const t=this.__destroy_into_raw();r.__wbg_credentialvalidator_free(t)}static validate(t,e,i,n){try{const s=r.__wbindgen_add_to_stack_pointer(-16);A(t,$),A(i,X),r.credentialvalidator_validate(s,t.ptr,I(e),i.ptr,n);var o=b()[s/4+0];if(b()[s/4+1])throw l(o)}finally{r.__wbindgen_add_to_stack_pointer(16),h[E++]=void 0}}static checkStructure(t){try{const i=r.__wbindgen_add_to_stack_pointer(-16);A(t,$),r.credentialvalidator_checkStructure(i,t.ptr);var e=b()[i/4+0];if(b()[i/4+1])throw l(e)}finally{r.__wbindgen_add_to_stack_pointer(16)}}static checkExpiresOnOrAfter(t,e){try{const n=r.__wbindgen_add_to_stack_pointer(-16);A(t,$),A(e,se),r.credentialvalidator_checkExpiresOnOrAfter(n,t.ptr,e.ptr);var i=b()[n/4+0];if(b()[n/4+1])throw l(i)}finally{r.__wbindgen_add_to_stack_pointer(16)}}static checkIssuedOnOrBefore(t,e){try{const n=r.__wbindgen_add_to_stack_pointer(-16);A(t,$),A(e,se),r.credentialvalidator_checkIssuedOnOrBefore(n,t.ptr,e.ptr);var i=b()[n/4+0];if(b()[n/4+1])throw l(i)}finally{r.__wbindgen_add_to_stack_pointer(16)}}static verifySignature(t,e,i){try{const o=r.__wbindgen_add_to_stack_pointer(-16);A(t,$),A(i,fe),r.credentialvalidator_verifySignature(o,t.ptr,I(e),i.ptr);var n=b()[o/4+0];if(b()[o/4+1])throw l(n)}finally{r.__wbindgen_add_to_stack_pointer(16),h[E++]=void 0}}static check_subject_holder_relationship(t,e,i){try{const a=r.__wbindgen_add_to_stack_pointer(-16);A(t,$);var n=_(e,r.__wbindgen_malloc,r.__wbindgen_realloc),o=c;r.credentialvalidator_check_subject_holder_relationship(a,t.ptr,n,o,i);var s=b()[a/4+0];if(b()[a/4+1])throw l(s)}finally{r.__wbindgen_add_to_stack_pointer(16)}}}const Q=new FinalizationRegistry((t=>r.__wbg_did_free(t)));class tt{static __wrap(t){const e=Object.create(tt.prototype);return e.ptr=t,Q.register(e,e.ptr,e),e}toJSON(){return{networkName:this.networkName}}toString(){return JSON.stringify(this)}__destroy_into_raw(){const t=this.ptr;return this.ptr=0,Q.unregister(this),t}free(){const t=this.__destroy_into_raw();r.__wbg_did_free(t)}constructor(t,e){try{const u=r.__wbindgen_add_to_stack_pointer(-16);var i=x(t,r.__wbindgen_malloc),n=c,o=w(e)?0:_(e,r.__wbindgen_malloc,r.__wbindgen_realloc),s=c;r.did_new(u,i,n,o,s);var a=b()[u/4+0],h=b()[u/4+1];if(b()[u/4+2])throw l(h);return tt.__wrap(a)}finally{r.__wbindgen_add_to_stack_pointer(16)}}static parse(t){try{const s=r.__wbindgen_add_to_stack_pointer(-16);var e=_(t,r.__wbindgen_malloc,r.__wbindgen_realloc),i=c;r.did_parse(s,e,i);var n=b()[s/4+0],o=b()[s/4+1];if(b()[s/4+2])throw l(o);return tt.__wrap(n)}finally{r.__wbindgen_add_to_stack_pointer(16)}}network(){try{const i=r.__wbindgen_add_to_stack_pointer(-16);r.did_network(i,this.ptr);var t=b()[i/4+0],e=b()[i/4+1];if(b()[i/4+2])throw l(e);return Lt.__wrap(t)}finally{r.__wbindgen_add_to_stack_pointer(16)}}get networkName(){try{const i=r.__wbindgen_add_to_stack_pointer(-16);r.did_network_name(i,this.ptr);var t=b()[i/4+0],e=b()[i/4+1];return a(t,e)}finally{r.__wbindgen_add_to_stack_pointer(16),r.__wbindgen_free(t,e)}}tag(){try{const i=r.__wbindgen_add_to_stack_pointer(-16);r.did_tag(i,this.ptr);var t=b()[i/4+0],e=b()[i/4+1];return a(t,e)}finally{r.__wbindgen_add_to_stack_pointer(16),r.__wbindgen_free(t,e)}}join(t){try{const s=this.__destroy_into_raw(),a=r.__wbindgen_add_to_stack_pointer(-16);var e=_(t,r.__wbindgen_malloc,r.__wbindgen_realloc),i=c;r.did_join(a,s,e,i);var n=b()[a/4+0],o=b()[a/4+1];if(b()[a/4+2])throw l(o);return it.__wrap(n)}finally{r.__wbindgen_add_to_stack_pointer(16)}}toUrl(){var t=r.did_toUrl(this.ptr);return it.__wrap(t)}intoUrl(){const t=this.__destroy_into_raw();var e=r.did_intoUrl(t);return it.__wrap(e)}toString(){try{const i=r.__wbindgen_add_to_stack_pointer(-16);r.did_toString(i,this.ptr);var t=b()[i/4+0],e=b()[i/4+1];return a(t,e)}finally{r.__wbindgen_add_to_stack_pointer(16),r.__wbindgen_free(t,e)}}static fromJSON(t){try{const n=r.__wbindgen_add_to_stack_pointer(-16);r.did_fromJSON(n,f(t));var e=b()[n/4+0],i=b()[n/4+1];if(b()[n/4+2])throw l(i);return tt.__wrap(e)}finally{r.__wbindgen_add_to_stack_pointer(16)}}toJSON(){return l(r.did_toJSON(this.ptr))}clone(){var t=r.did_clone(this.ptr);return tt.__wrap(t)}}const et=new FinalizationRegistry((t=>r.__wbg_didurl_free(t)));class it{static __wrap(t){const e=Object.create(it.prototype);return e.ptr=t,et.register(e,e.ptr,e),e}toJSON(){return{}}toString(){return JSON.stringify(this)}__destroy_into_raw(){const t=this.ptr;return this.ptr=0,et.unregister(this),t}free(){const t=this.__destroy_into_raw();r.__wbg_didurl_free(t)}static parse(t){try{const s=r.__wbindgen_add_to_stack_pointer(-16);var e=_(t,r.__wbindgen_malloc,r.__wbindgen_realloc),i=c;r.didurl_parse(s,e,i);var n=b()[s/4+0],o=b()[s/4+1];if(b()[s/4+2])throw l(o);return it.__wrap(n)}finally{r.__wbindgen_add_to_stack_pointer(16)}}did(){var t=r.didurl_did(this.ptr);return tt.__wrap(t)}urlStr(){try{const i=r.__wbindgen_add_to_stack_pointer(-16);r.didurl_urlStr(i,this.ptr);var t=b()[i/4+0],e=b()[i/4+1];return a(t,e)}finally{r.__wbindgen_add_to_stack_pointer(16),r.__wbindgen_free(t,e)}}fragment(){try{const i=r.__wbindgen_add_to_stack_pointer(-16);r.didurl_fragment(i,this.ptr);var t=b()[i/4+0],e=b()[i/4+1];let n;return 0!==t&&(n=a(t,e).slice(),r.__wbindgen_free(t,1*e)),n}finally{r.__wbindgen_add_to_stack_pointer(16)}}setFragment(t){try{const o=r.__wbindgen_add_to_stack_pointer(-16);var e=w(t)?0:_(t,r.__wbindgen_malloc,r.__wbindgen_realloc),i=c;r.didurl_setFragment(o,this.ptr,e,i);var n=b()[o/4+0];if(b()[o/4+1])throw l(n)}finally{r.__wbindgen_add_to_stack_pointer(16)}}path(){try{const i=r.__wbindgen_add_to_stack_pointer(-16);r.didurl_path(i,this.ptr);var t=b()[i/4+0],e=b()[i/4+1];let n;return 0!==t&&(n=a(t,e).slice(),r.__wbindgen_free(t,1*e)),n}finally{r.__wbindgen_add_to_stack_pointer(16)}}setPath(t){try{const o=r.__wbindgen_add_to_stack_pointer(-16);var e=w(t)?0:_(t,r.__wbindgen_malloc,r.__wbindgen_realloc),i=c;r.didurl_setPath(o,this.ptr,e,i);var n=b()[o/4+0];if(b()[o/4+1])throw l(n)}finally{r.__wbindgen_add_to_stack_pointer(16)}}query(){try{const i=r.__wbindgen_add_to_stack_pointer(-16);r.didurl_query(i,this.ptr);var t=b()[i/4+0],e=b()[i/4+1];let n;return 0!==t&&(n=a(t,e).slice(),r.__wbindgen_free(t,1*e)),n}finally{r.__wbindgen_add_to_stack_pointer(16)}}setQuery(t){try{const o=r.__wbindgen_add_to_stack_pointer(-16);var e=w(t)?0:_(t,r.__wbindgen_malloc,r.__wbindgen_realloc),i=c;r.didurl_setQuery(o,this.ptr,e,i);var n=b()[o/4+0];if(b()[o/4+1])throw l(n)}finally{r.__wbindgen_add_to_stack_pointer(16)}}join(t){try{const s=this.__destroy_into_raw(),a=r.__wbindgen_add_to_stack_pointer(-16);var e=_(t,r.__wbindgen_malloc,r.__wbindgen_realloc),i=c;r.didurl_join(a,s,e,i);var n=b()[a/4+0],o=b()[a/4+1];if(b()[a/4+2])throw l(o);return it.__wrap(n)}finally{r.__wbindgen_add_to_stack_pointer(16)}}toString(){try{const i=r.__wbindgen_add_to_stack_pointer(-16);r.didurl_toString(i,this.ptr);var t=b()[i/4+0],e=b()[i/4+1];return a(t,e)}finally{r.__wbindgen_add_to_stack_pointer(16),r.__wbindgen_free(t,e)}}toJSON(){try{const i=r.__wbindgen_add_to_stack_pointer(-16);r.didurl_toJSON(i,this.ptr);var t=b()[i/4+0],e=b()[i/4+1];if(b()[i/4+2])throw l(e);return l(t)}finally{r.__wbindgen_add_to_stack_pointer(16)}}clone(){var t=r.didurl_clone(this.ptr);return it.__wrap(t)}}const rt=new FinalizationRegistry((t=>r.__wbg_diffchainhistory_free(t)));class nt{static __wrap(t){const e=Object.create(nt.prototype);return e.ptr=t,rt.register(e,e.ptr,e),e}toJSON(){return{}}toString(){return JSON.stringify(this)}__destroy_into_raw(){const t=this.ptr;return this.ptr=0,rt.unregister(this),t}free(){const t=this.__destroy_into_raw();r.__wbg_diffchainhistory_free(t)}chainData(){return l(r.diffchainhistory_chainData(this.ptr))}spam(){return l(r.diffchainhistory_spam(this.ptr))}toJSON(){try{const i=r.__wbindgen_add_to_stack_pointer(-16);r.diffchainhistory_toJSON(i,this.ptr);var t=b()[i/4+0],e=b()[i/4+1];if(b()[i/4+2])throw l(e);return l(t)}finally{r.__wbindgen_add_to_stack_pointer(16)}}static fromJSON(t){try{const n=r.__wbindgen_add_to_stack_pointer(-16);r.diffchainhistory_fromJSON(n,I(t));var e=b()[n/4+0],i=b()[n/4+1];if(b()[n/4+2])throw l(i);return nt.__wrap(e)}finally{r.__wbindgen_add_to_stack_pointer(16),h[E++]=void 0}}}const ot=new FinalizationRegistry((t=>r.__wbg_diffmessage_free(t)));class st{static __wrap(t){const e=Object.create(st.prototype);return e.ptr=t,ot.register(e,e.ptr,e),e}toJSON(){return{}}toString(){return JSON.stringify(this)}__destroy_into_raw(){const t=this.ptr;return this.ptr=0,ot.unregister(this),t}free(){const t=this.__destroy_into_raw();r.__wbg_diffmessage_free(t)}id(){var t=r.diffmessage_id(this.ptr);return tt.__wrap(t)}did(){var t=r.diffmessage_did(this.ptr);return tt.__wrap(t)}diff(){try{const h=r.__wbindgen_add_to_stack_pointer(-16);r.diffmessage_diff(h,this.ptr);var t=b()[h/4+0],e=b()[h/4+1],i=b()[h/4+2],n=b()[h/4+3],o=t,s=e;if(n)throw o=0,s=0,l(i);return a(o,s)}finally{r.__wbindgen_add_to_stack_pointer(16),r.__wbindgen_free(o,s)}}messageId(){try{const i=r.__wbindgen_add_to_stack_pointer(-16);r.diffmessage_messageId(i,this.ptr);var t=b()[i/4+0],e=b()[i/4+1];return a(t,e)}finally{r.__wbindgen_add_to_stack_pointer(16),r.__wbindgen_free(t,e)}}setMessageId(t){try{const o=r.__wbindgen_add_to_stack_pointer(-16);var e=_(t,r.__wbindgen_malloc,r.__wbindgen_realloc),i=c;r.diffmessage_setMessageId(o,this.ptr,e,i);var n=b()[o/4+0];if(b()[o/4+1])throw l(n)}finally{r.__wbindgen_add_to_stack_pointer(16)}}previousMessageId(){try{const i=r.__wbindgen_add_to_stack_pointer(-16);r.diffmessage_previousMessageId(i,this.ptr);var t=b()[i/4+0],e=b()[i/4+1];return a(t,e)}finally{r.__wbindgen_add_to_stack_pointer(16),r.__wbindgen_free(t,e)}}setPreviousMessageId(t){try{const o=r.__wbindgen_add_to_stack_pointer(-16);var e=_(t,r.__wbindgen_malloc,r.__wbindgen_realloc),i=c;r.diffmessage_setPreviousMessageId(o,this.ptr,e,i);var n=b()[o/4+0];if(b()[o/4+1])throw l(n)}finally{r.__wbindgen_add_to_stack_pointer(16)}}proof(){var t=r.diffmessage_proof(this.ptr);return 0===t?void 0:Jt.__wrap(t)}merge(t){try{const n=r.__wbindgen_add_to_stack_pointer(-16);A(t,ht),r.diffmessage_merge(n,this.ptr,t.ptr);var e=b()[n/4+0],i=b()[n/4+1];if(b()[n/4+2])throw l(i);return ht.__wrap(e)}finally{r.__wbindgen_add_to_stack_pointer(16)}}toJSON(){try{const i=r.__wbindgen_add_to_stack_pointer(-16);r.diffmessage_toJSON(i,this.ptr);var t=b()[i/4+0],e=b()[i/4+1];if(b()[i/4+2])throw l(e);return l(t)}finally{r.__wbindgen_add_to_stack_pointer(16)}}static fromJSON(t){try{const n=r.__wbindgen_add_to_stack_pointer(-16);r.diffmessage_fromJSON(n,I(t));var e=b()[n/4+0],i=b()[n/4+1];if(b()[n/4+2])throw l(i);return st.__wrap(e)}finally{r.__wbindgen_add_to_stack_pointer(16),h[E++]=void 0}}clone(){var t=r.diffmessage_clone(this.ptr);return st.__wrap(t)}}const at=new FinalizationRegistry((t=>r.__wbg_document_free(t)));class ht{static __wrap(t){const e=Object.create(ht.prototype);return e.ptr=t,at.register(e,e.ptr,e),e}toJSON(){return{}}toString(){return JSON.stringify(this)}__destroy_into_raw(){const t=this.ptr;return this.ptr=0,at.unregister(this),t}free(){const t=this.__destroy_into_raw();r.__wbg_document_free(t)}constructor(t,e,i){try{const f=r.__wbindgen_add_to_stack_pointer(-16);A(t,kt);var n=w(e)?0:_(e,r.__wbindgen_malloc,r.__wbindgen_realloc),o=c,s=w(i)?0:_(i,r.__wbindgen_malloc,r.__wbindgen_realloc),a=c;r.document_new(f,t.ptr,n,o,s,a);var h=b()[f/4+0],u=b()[f/4+1];if(b()[f/4+2])throw l(u);return ht.__wrap(h)}finally{r.__wbindgen_add_to_stack_pointer(16)}}static fromVerificationMethod(t){try{const n=r.__wbindgen_add_to_stack_pointer(-16);A(t,he),r.document_fromVerificationMethod(n,t.ptr);var e=b()[n/4+0],i=b()[n/4+1];if(b()[n/4+2])throw l(i);return ht.__wrap(e)}finally{r.__wbindgen_add_to_stack_pointer(16)}}static isSigningMethodType(t){return A(t,Ot),0!==r.document_isSigningMethodType(t.ptr)}id(){var t=r.document_id(this.ptr);return tt.__wrap(t)}setController(t){try{const i=r.__wbindgen_add_to_stack_pointer(-16);r.document_setController(i,this.ptr,I(t));var e=b()[i/4+0];if(b()[i/4+1])throw l(e)}finally{r.__wbindgen_add_to_stack_pointer(16),h[E++]=void 0}}controller(){return l(r.document_controller(this.ptr))}setAlsoKnownAs(t){try{const i=r.__wbindgen_add_to_stack_pointer(-16);r.document_setAlsoKnownAs(i,this.ptr,I(t));var e=b()[i/4+0];if(b()[i/4+1])throw l(e)}finally{r.__wbindgen_add_to_stack_pointer(16),h[E++]=void 0}}alsoKnownAs(){return l(r.document_alsoKnownAs(this.ptr))}setPropertyUnchecked(t,e){try{const s=r.__wbindgen_add_to_stack_pointer(-16);var i=_(t,r.__wbindgen_malloc,r.__wbindgen_realloc),n=c;r.document_setPropertyUnchecked(s,this.ptr,i,n,I(e));var o=b()[s/4+0];if(b()[s/4+1])throw l(o)}finally{r.__wbindgen_add_to_stack_pointer(16),h[E++]=void 0}}properties(){try{const i=r.__wbindgen_add_to_stack_pointer(-16);r.document_properties(i,this.ptr);var t=b()[i/4+0],e=b()[i/4+1];if(b()[i/4+2])throw l(e);return l(t)}finally{r.__wbindgen_add_to_stack_pointer(16)}}service(){return l(r.document_service(this.ptr))}insertService(t){try{const n=r.__wbindgen_add_to_stack_pointer(-16);A(t,ie),r.document_insertService(n,this.ptr,t.ptr);var e=b()[n/4+0],i=b()[n/4+1];if(b()[n/4+2])throw l(i);return 0!==e}finally{r.__wbindgen_add_to_stack_pointer(16)}}removeService(t){try{const i=r.__wbindgen_add_to_stack_pointer(-16);A(t,it),r.document_removeService(i,this.ptr,t.ptr);var e=b()[i/4+0];if(b()[i/4+1])throw l(e)}finally{r.__wbindgen_add_to_stack_pointer(16)}}methods(){return l(r.document_methods(this.ptr))}insertMethod(t,e){try{const n=r.__wbindgen_add_to_stack_pointer(-16);A(t,he),A(e,Nt),r.document_insertMethod(n,this.ptr,t.ptr,e.ptr);var i=b()[n/4+0];if(b()[n/4+1])throw l(i)}finally{r.__wbindgen_add_to_stack_pointer(16)}}removeMethod(t){try{const i=r.__wbindgen_add_to_stack_pointer(-16);A(t,it),r.document_removeMethod(i,this.ptr,t.ptr);var e=b()[i/4+0];if(b()[i/4+1])throw l(e)}finally{r.__wbindgen_add_to_stack_pointer(16)}}defaultSigningMethod(){try{const i=r.__wbindgen_add_to_stack_pointer(-16);r.document_defaultSigningMethod(i,this.ptr);var t=b()[i/4+0],e=b()[i/4+1];if(b()[i/4+2])throw l(e);return he.__wrap(t)}finally{r.__wbindgen_add_to_stack_pointer(16)}}resolveMethod(t,e){try{const o=r.__wbindgen_add_to_stack_pointer(-16);r.document_resolveMethod(o,this.ptr,I(t),f(e));var i=b()[o/4+0],n=b()[o/4+1];if(b()[o/4+2])throw l(n);return 0===i?void 0:he.__wrap(i)}finally{r.__wbindgen_add_to_stack_pointer(16),h[E++]=void 0}}resolveSigningMethod(t){try{const n=r.__wbindgen_add_to_stack_pointer(-16);r.document_resolveSigningMethod(n,this.ptr,I(t));var e=b()[n/4+0],i=b()[n/4+1];if(b()[n/4+2])throw l(i);return he.__wrap(e)}finally{r.__wbindgen_add_to_stack_pointer(16),h[E++]=void 0}}attachMethodRelationship(t,e){try{const o=r.__wbindgen_add_to_stack_pointer(-16);A(t,it),r.document_attachMethodRelationship(o,this.ptr,t.ptr,e);var i=b()[o/4+0],n=b()[o/4+1];if(b()[o/4+2])throw l(n);return 0!==i}finally{r.__wbindgen_add_to_stack_pointer(16)}}detachMethodRelationship(t,e){try{const o=r.__wbindgen_add_to_stack_pointer(-16);A(t,it),r.document_detachMethodRelationship(o,this.ptr,t.ptr,e);var i=b()[o/4+0],n=b()[o/4+1];if(b()[o/4+2])throw l(n);return 0!==i}finally{r.__wbindgen_add_to_stack_pointer(16)}}signSelf(t,e){try{const n=r.__wbindgen_add_to_stack_pointer(-16);A(t,kt),r.document_signSelf(n,this.ptr,t.ptr,I(e));var i=b()[n/4+0];if(b()[n/4+1])throw l(i)}finally{r.__wbindgen_add_to_stack_pointer(16),h[E++]=void 0}}signDocument(t,e,i){try{const o=r.__wbindgen_add_to_stack_pointer(-16);A(t,ht),A(e,kt),r.document_signDocument(o,this.ptr,t.ptr,e.ptr,I(i));var n=b()[o/4+0];if(b()[o/4+1])throw l(n)}finally{r.__wbindgen_add_to_stack_pointer(16),h[E++]=void 0}}signCredential(t,e,i,n){try{const f=r.__wbindgen_add_to_stack_pointer(-16);var o=x(e,r.__wbindgen_malloc),s=c;A(n,Zt),r.document_signCredential(f,this.ptr,I(t),o,s,I(i),n.ptr);var a=b()[f/4+0],u=b()[f/4+1];if(b()[f/4+2])throw l(u);return $.__wrap(a)}finally{r.__wbindgen_add_to_stack_pointer(16),h[E++]=void 0,h[E++]=void 0}}signPresentation(t,e,i,n){try{const f=r.__wbindgen_add_to_stack_pointer(-16);var o=x(e,r.__wbindgen_malloc),s=c;A(n,Zt),r.document_signPresentation(f,this.ptr,I(t),o,s,I(i),n.ptr);var a=b()[f/4+0],u=b()[f/4+1];if(b()[f/4+2])throw l(u);return Ct.__wrap(a)}finally{r.__wbindgen_add_to_stack_pointer(16),h[E++]=void 0,h[E++]=void 0}}signData(t,e,i,n){try{const f=r.__wbindgen_add_to_stack_pointer(-16);var o=x(e,r.__wbindgen_malloc),s=c;A(n,Zt),r.document_signData(f,this.ptr,I(t),o,s,I(i),n.ptr);var a=b()[f/4+0],u=b()[f/4+1];if(b()[f/4+2])throw l(u);return l(a)}finally{r.__wbindgen_add_to_stack_pointer(16),h[E++]=void 0,h[E++]=void 0}}verifyData(t,e){try{const o=r.__wbindgen_add_to_stack_pointer(-16);A(e,fe),r.document_verifyData(o,this.ptr,I(t),e.ptr);var i=b()[o/4+0],n=b()[o/4+1];if(b()[o/4+2])throw l(n);return 0!==i}finally{r.__wbindgen_add_to_stack_pointer(16),h[E++]=void 0}}verifyDocument(t){try{const i=r.__wbindgen_add_to_stack_pointer(-16);A(t,ht),r.document_verifyDocument(i,this.ptr,t.ptr);var e=b()[i/4+0];if(b()[i/4+1])throw l(e)}finally{r.__wbindgen_add_to_stack_pointer(16)}}static verifyRootDocument(t){try{const i=r.__wbindgen_add_to_stack_pointer(-16);A(t,ht),r.document_verifyRootDocument(i,t.ptr);var e=b()[i/4+0];if(b()[i/4+1])throw l(e)}finally{r.__wbindgen_add_to_stack_pointer(16)}}diff(t,e,i,n){try{const f=r.__wbindgen_add_to_stack_pointer(-16);A(t,ht);var o=_(e,r.__wbindgen_malloc,r.__wbindgen_realloc),s=c;A(i,kt),r.document_diff(f,this.ptr,t.ptr,o,s,i.ptr,I(n));var a=b()[f/4+0],u=b()[f/4+1];if(b()[f/4+2])throw l(u);return st.__wrap(a)}finally{r.__wbindgen_add_to_stack_pointer(16),h[E++]=void 0}}verifyDiff(t){try{const i=r.__wbindgen_add_to_stack_pointer(-16);A(t,st),r.document_verifyDiff(i,this.ptr,t.ptr);var e=b()[i/4+0];if(b()[i/4+1])throw l(e)}finally{r.__wbindgen_add_to_stack_pointer(16)}}mergeDiff(t){try{const i=r.__wbindgen_add_to_stack_pointer(-16);A(t,st),r.document_mergeDiff(i,this.ptr,t.ptr);var e=b()[i/4+0];if(b()[i/4+1])throw l(e)}finally{r.__wbindgen_add_to_stack_pointer(16)}}integrationIndex(){try{const i=r.__wbindgen_add_to_stack_pointer(-16);r.document_integrationIndex(i,this.ptr);var t=b()[i/4+0],e=b()[i/4+1];return a(t,e)}finally{r.__wbindgen_add_to_stack_pointer(16),r.__wbindgen_free(t,e)}}static diffIndex(t){try{const d=r.__wbindgen_add_to_stack_pointer(-16);var e=_(t,r.__wbindgen_malloc,r.__wbindgen_realloc),i=c;r.document_diffIndex(d,e,i);var n=b()[d/4+0],o=b()[d/4+1],s=b()[d/4+2],h=b()[d/4+3],u=n,f=o;if(h)throw u=0,f=0,l(s);return a(u,f)}finally{r.__wbindgen_add_to_stack_pointer(16),r.__wbindgen_free(u,f)}}metadata(){var t=r.document_metadata(this.ptr);return lt.__wrap(t)}metadataCreated(){var t=r.document_metadataCreated(this.ptr);return 0===t?void 0:se.__wrap(t)}setMetadataCreated(t){try{const i=r.__wbindgen_add_to_stack_pointer(-16);r.document_setMetadataCreated(i,this.ptr,f(t));var e=b()[i/4+0];if(b()[i/4+1])throw l(e)}finally{r.__wbindgen_add_to_stack_pointer(16)}}metadataUpdated(){var t=r.document_metadataUpdated(this.ptr);return 0===t?void 0:se.__wrap(t)}setMetadataUpdated(t){try{const i=r.__wbindgen_add_to_stack_pointer(-16);r.document_setMetadataUpdated(i,this.ptr,f(t));var e=b()[i/4+0];if(b()[i/4+1])throw l(e)}finally{r.__wbindgen_add_to_stack_pointer(16)}}metadataPreviousMessageId(){try{const i=r.__wbindgen_add_to_stack_pointer(-16);r.document_metadataPreviousMessageId(i,this.ptr);var t=b()[i/4+0],e=b()[i/4+1];return a(t,e)}finally{r.__wbindgen_add_to_stack_pointer(16),r.__wbindgen_free(t,e)}}setMetadataPreviousMessageId(t){try{const o=r.__wbindgen_add_to_stack_pointer(-16);var e=_(t,r.__wbindgen_malloc,r.__wbindgen_realloc),i=c;r.document_setMetadataPreviousMessageId(o,this.ptr,e,i);var n=b()[o/4+0];if(b()[o/4+1])throw l(n)}finally{r.__wbindgen_add_to_stack_pointer(16)}}proof(){var t=r.document_proof(this.ptr);return 0===t?void 0:Jt.__wrap(t)}toJSON(){try{const i=r.__wbindgen_add_to_stack_pointer(-16);r.document_toJSON(i,this.ptr);var t=b()[i/4+0],e=b()[i/4+1];if(b()[i/4+2])throw l(e);return l(t)}finally{r.__wbindgen_add_to_stack_pointer(16)}}static fromJSON(t){try{const n=r.__wbindgen_add_to_stack_pointer(-16);r.document_fromJSON(n,I(t));var e=b()[n/4+0],i=b()[n/4+1];if(b()[n/4+2])throw l(i);return ht.__wrap(e)}finally{r.__wbindgen_add_to_stack_pointer(16),h[E++]=void 0}}clone(){var t=r.document_clone(this.ptr);return ht.__wrap(t)}}const ut=new FinalizationRegistry((t=>r.__wbg_documenthistory_free(t)));class ft{static __wrap(t){const e=Object.create(ft.prototype);return e.ptr=t,ut.register(e,e.ptr,e),e}toJSON(){return{}}toString(){return JSON.stringify(this)}__destroy_into_raw(){const t=this.ptr;return this.ptr=0,ut.unregister(this),t}free(){const t=this.__destroy_into_raw();r.__wbg_documenthistory_free(t)}integrationChainData(){return l(r.documenthistory_integrationChainData(this.ptr))}integrationChainSpam(){return l(r.documenthistory_integrationChainSpam(this.ptr))}diffChainData(){return l(r.documenthistory_diffChainData(this.ptr))}diffChainSpam(){return l(r.documenthistory_diffChainSpam(this.ptr))}toJSON(){try{const i=r.__wbindgen_add_to_stack_pointer(-16);r.documenthistory_toJSON(i,this.ptr);var t=b()[i/4+0],e=b()[i/4+1];if(b()[i/4+2])throw l(e);return l(t)}finally{r.__wbindgen_add_to_stack_pointer(16)}}static fromJSON(t){try{const n=r.__wbindgen_add_to_stack_pointer(-16);r.documenthistory_fromJSON(n,I(t));var e=b()[n/4+0],i=b()[n/4+1];if(b()[n/4+2])throw l(i);return ft.__wrap(e)}finally{r.__wbindgen_add_to_stack_pointer(16),h[E++]=void 0}}clone(){var t=r.documenthistory_clone(this.ptr);return ft.__wrap(t)}}const dt=new FinalizationRegistry((t=>r.__wbg_documentmetadata_free(t)));class lt{static __wrap(t){const e=Object.create(lt.prototype);return e.ptr=t,dt.register(e,e.ptr,e),e}toJSON(){return{previousMessageId:this.previousMessageId}}toString(){return JSON.stringify(this)}__destroy_into_raw(){const t=this.ptr;return this.ptr=0,dt.unregister(this),t}free(){const t=this.__destroy_into_raw();r.__wbg_documentmetadata_free(t)}created(){var t=r.documentmetadata_created(this.ptr);return 0===t?void 0:se.__wrap(t)}updated(){var t=r.documentmetadata_updated(this.ptr);return 0===t?void 0:se.__wrap(t)}get previousMessageId(){try{const i=r.__wbindgen_add_to_stack_pointer(-16);r.documentmetadata_previous_message_id(i,this.ptr);var t=b()[i/4+0],e=b()[i/4+1];return a(t,e)}finally{r.__wbindgen_add_to_stack_pointer(16),r.__wbindgen_free(t,e)}}clone(){var t=r.documentmetadata_clone(this.ptr);return lt.__wrap(t)}}const ct=new FinalizationRegistry((t=>r.__wbg_duration_free(t)));class pt{static __wrap(t){const e=Object.create(pt.prototype);return e.ptr=t,ct.register(e,e.ptr,e),e}toJSON(){return{}}toString(){return JSON.stringify(this)}__destroy_into_raw(){const t=this.ptr;return this.ptr=0,ct.unregister(this),t}free(){const t=this.__destroy_into_raw();r.__wbg_duration_free(t)}static seconds(t){var e=r.duration_seconds(t);return pt.__wrap(e)}static minutes(t){var e=r.duration_minutes(t);return pt.__wrap(e)}static hours(t){var e=r.duration_hours(t);return pt.__wrap(e)}static days(t){var e=r.duration_days(t);return pt.__wrap(e)}static weeks(t){var e=r.duration_weeks(t);return pt.__wrap(e)}toJSON(){try{const i=r.__wbindgen_add_to_stack_pointer(-16);r.duration_toJSON(i,this.ptr);var t=b()[i/4+0],e=b()[i/4+1];if(b()[i/4+2])throw l(e);return l(t)}finally{r.__wbindgen_add_to_stack_pointer(16)}}static fromJSON(t){try{const n=r.__wbindgen_add_to_stack_pointer(-16);r.duration_fromJSON(n,I(t));var e=b()[n/4+0],i=b()[n/4+1];if(b()[n/4+2])throw l(i);return pt.__wrap(e)}finally{r.__wbindgen_add_to_stack_pointer(16),h[E++]=void 0}}}const mt=new FinalizationRegistry((t=>r.__wbg_ed25519_free(t)));class _t{toJSON(){return{}}toString(){return JSON.stringify(this)}__destroy_into_raw(){const t=this.ptr;return this.ptr=0,mt.unregister(this),t}free(){const t=this.__destroy_into_raw();r.__wbg_ed25519_free(t)}static PRIVATE_KEY_LENGTH(){return r.ed25519_PRIVATE_KEY_LENGTH()>>>0}static PUBLIC_KEY_LENGTH(){return r.ed25519_PUBLIC_KEY_LENGTH()>>>0}static SIGNATURE_LENGTH(){return r.ed25519_SIGNATURE_LENGTH()>>>0}static sign(t,e){try{const d=r.__wbindgen_add_to_stack_pointer(-16);var i=x(t,r.__wbindgen_malloc),n=c,o=x(e,r.__wbindgen_malloc),s=c;r.ed25519_sign(d,i,n,o,s);var a=b()[d/4+0],h=b()[d/4+1],u=b()[d/4+2];if(b()[d/4+3])throw l(u);var f=R(a,h).slice();return r.__wbindgen_free(a,1*h),f}finally{r.__wbindgen_add_to_stack_pointer(16)}}static verify(t,e,i){try{const d=r.__wbindgen_add_to_stack_pointer(-16);var n=x(t,r.__wbindgen_malloc),o=c,s=x(e,r.__wbindgen_malloc),a=c,h=x(i,r.__wbindgen_malloc),u=c;r.ed25519_verify(d,n,o,s,a,h,u);var f=b()[d/4+0];if(b()[d/4+1])throw l(f)}finally{r.__wbindgen_add_to_stack_pointer(16)}}}const gt=new FinalizationRegistry((t=>r.__wbg_explorerurl_free(t)));class bt{static __wrap(t){const e=Object.create(bt.prototype);return e.ptr=t,gt.register(e,e.ptr,e),e}__destroy_into_raw(){const t=this.ptr;return this.ptr=0,gt.unregister(this),t}free(){const t=this.__destroy_into_raw();r.__wbg_explorerurl_free(t)}static parse(t){try{const s=r.__wbindgen_add_to_stack_pointer(-16);var e=_(t,r.__wbindgen_malloc,r.__wbindgen_realloc),i=c;r.explorerurl_parse(s,e,i);var n=b()[s/4+0],o=b()[s/4+1];if(b()[s/4+2])throw l(o);return bt.__wrap(n)}finally{r.__wbindgen_add_to_stack_pointer(16)}}static mainnet(){var t=r.explorerurl_mainnet();return bt.__wrap(t)}static devnet(){var t=r.explorerurl_devnet();return bt.__wrap(t)}messageUrl(t){try{const d=r.__wbindgen_add_to_stack_pointer(-16);var e=_(t,r.__wbindgen_malloc,r.__wbindgen_realloc),i=c;r.explorerurl_messageUrl(d,this.ptr,e,i);var n=b()[d/4+0],o=b()[d/4+1],s=b()[d/4+2],h=b()[d/4+3],u=n,f=o;if(h)throw u=0,f=0,l(s);return a(u,f)}finally{r.__wbindgen_add_to_stack_pointer(16),r.__wbindgen_free(u,f)}}resolverUrl(t){try{const u=r.__wbindgen_add_to_stack_pointer(-16);r.explorerurl_resolverUrl(u,this.ptr,f(t));var e=b()[u/4+0],i=b()[u/4+1],n=b()[u/4+2],o=b()[u/4+3],s=e,h=i;if(o)throw s=0,h=0,l(n);return a(s,h)}finally{r.__wbindgen_add_to_stack_pointer(16),r.__wbindgen_free(s,h)}}toString(){try{const i=r.__wbindgen_add_to_stack_pointer(-16);r.explorerurl_toString(i,this.ptr);var t=b()[i/4+0],e=b()[i/4+1];return a(t,e)}finally{r.__wbindgen_add_to_stack_pointer(16),r.__wbindgen_free(t,e)}}}const wt=new FinalizationRegistry((t=>r.__wbg_integrationchainhistory_free(t)));class yt{static __wrap(t){const e=Object.create(yt.prototype);return e.ptr=t,wt.register(e,e.ptr,e),e}toJSON(){return{}}toString(){return JSON.stringify(this)}__destroy_into_raw(){const t=this.ptr;return this.ptr=0,wt.unregister(this),t}free(){const t=this.__destroy_into_raw();r.__wbg_integrationchainhistory_free(t)}chainData(){return l(r.integrationchainhistory_chainData(this.ptr))}spam(){return l(r.integrationchainhistory_spam(this.ptr))}toJSON(){try{const i=r.__wbindgen_add_to_stack_pointer(-16);r.integrationchainhistory_toJSON(i,this.ptr);var t=b()[i/4+0],e=b()[i/4+1];if(b()[i/4+2])throw l(e);return l(t)}finally{r.__wbindgen_add_to_stack_pointer(16)}}static fromJSON(t){try{const n=r.__wbindgen_add_to_stack_pointer(-16);r.integrationchainhistory_fromJSON(n,I(t));var e=b()[n/4+0],i=b()[n/4+1];if(b()[n/4+2])throw l(i);return yt.__wrap(e)}finally{r.__wbindgen_add_to_stack_pointer(16),h[E++]=void 0}}}const vt=new FinalizationRegistry((t=>r.__wbg_keylocation_free(t)));class Mt{static __wrap(t){const e=Object.create(Mt.prototype);return e.ptr=t,vt.register(e,e.ptr,e),e}toJSON(){return{}}toString(){return JSON.stringify(this)}__destroy_into_raw(){const t=this.ptr;return this.ptr=0,vt.unregister(this),t}free(){const t=this.__destroy_into_raw();r.__wbg_keylocation_free(t)}constructor(t,e,i){var n=_(e,r.__wbindgen_malloc,r.__wbindgen_realloc),o=c,s=x(i,r.__wbindgen_malloc),a=c,h=r.keylocation_new(t,n,o,s,a);return Mt.__wrap(h)}static fromVerificationMethod(t){try{const n=r.__wbindgen_add_to_stack_pointer(-16);A(t,he),r.keylocation_fromVerificationMethod(n,t.ptr);var e=b()[n/4+0],i=b()[n/4+1];if(b()[n/4+2])throw l(i);return Mt.__wrap(e)}finally{r.__wbindgen_add_to_stack_pointer(16)}}canonical(){try{const i=r.__wbindgen_add_to_stack_pointer(-16);r.keylocation_canonical(i,this.ptr);var t=b()[i/4+0],e=b()[i/4+1];return a(t,e)}finally{r.__wbindgen_add_to_stack_pointer(16),r.__wbindgen_free(t,e)}}keyType(){return r.keylocation_keyType(this.ptr)>>>0}toJSON(){try{const i=r.__wbindgen_add_to_stack_pointer(-16);r.keylocation_toJSON(i,this.ptr);var t=b()[i/4+0],e=b()[i/4+1];if(b()[i/4+2])throw l(e);return l(t)}finally{r.__wbindgen_add_to_stack_pointer(16)}}static fromJSON(t){try{const n=r.__wbindgen_add_to_stack_pointer(-16);r.keylocation_fromJSON(n,f(t));var e=b()[n/4+0],i=b()[n/4+1];if(b()[n/4+2])throw l(i);return Mt.__wrap(e)}finally{r.__wbindgen_add_to_stack_pointer(16)}}toString(){try{const i=r.__wbindgen_add_to_stack_pointer(-16);r.keylocation_toString(i,this.ptr);var t=b()[i/4+0],e=b()[i/4+1];return a(t,e)}finally{r.__wbindgen_add_to_stack_pointer(16),r.__wbindgen_free(t,e)}}}const St=new FinalizationRegistry((t=>r.__wbg_keypair_free(t)));class kt{static __wrap(t){const e=Object.create(kt.prototype);return e.ptr=t,St.register(e,e.ptr,e),e}toJSON(){return{}}toString(){return JSON.stringify(this)}__destroy_into_raw(){const t=this.ptr;return this.ptr=0,St.unregister(this),t}free(){const t=this.__destroy_into_raw();r.__wbg_keypair_free(t)}constructor(t){try{const n=r.__wbindgen_add_to_stack_pointer(-16);r.keypair_new(n,t);var e=b()[n/4+0],i=b()[n/4+1];if(b()[n/4+2])throw l(i);return kt.__wrap(e)}finally{r.__wbindgen_add_to_stack_pointer(16)}}static fromKeys(t,e,i){try{const f=r.__wbindgen_add_to_stack_pointer(-16);var n=x(e,r.__wbindgen_malloc),o=c,s=x(i,r.__wbindgen_malloc),a=c;r.keypair_fromKeys(f,t,n,o,s,a);var h=b()[f/4+0],u=b()[f/4+1];if(b()[f/4+2])throw l(u);return kt.__wrap(h)}finally{r.__wbindgen_add_to_stack_pointer(16)}}static tryFromPrivateKeyBytes(t,e){try{const a=r.__wbindgen_add_to_stack_pointer(-16);var i=x(e,r.__wbindgen_malloc),n=c;r.keypair_tryFromPrivateKeyBytes(a,t,i,n);var o=b()[a/4+0],s=b()[a/4+1];if(b()[a/4+2])throw l(s);return kt.__wrap(o)}finally{r.__wbindgen_add_to_stack_pointer(16)}}type(){return r.keypair_type(this.ptr)>>>0}public(){try{const n=r.__wbindgen_add_to_stack_pointer(-16);r.keypair_public(n,this.ptr);var t=b()[n/4+0],e=b()[n/4+1],i=R(t,e).slice();return r.__wbindgen_free(t,1*e),i}finally{r.__wbindgen_add_to_stack_pointer(16)}}private(){try{const n=r.__wbindgen_add_to_stack_pointer(-16);r.keypair_private(n,this.ptr);var t=b()[n/4+0],e=b()[n/4+1],i=R(t,e).slice();return r.__wbindgen_free(t,1*e),i}finally{r.__wbindgen_add_to_stack_pointer(16)}}toJSON(){try{const i=r.__wbindgen_add_to_stack_pointer(-16);r.keypair_toJSON(i,this.ptr);var t=b()[i/4+0],e=b()[i/4+1];if(b()[i/4+2])throw l(e);return l(t)}finally{r.__wbindgen_add_to_stack_pointer(16)}}static fromJSON(t){try{const n=r.__wbindgen_add_to_stack_pointer(-16);r.keypair_fromJSON(n,I(t));var e=b()[n/4+0],i=b()[n/4+1];if(b()[n/4+2])throw l(i);return kt.__wrap(e)}finally{r.__wbindgen_add_to_stack_pointer(16),h[E++]=void 0}}clone(){var t=r.keypair_clone(this.ptr);return kt.__wrap(t)}}const xt=new FinalizationRegistry((t=>r.__wbg_methodcontent_free(t)));class At{static __wrap(t){const e=Object.create(At.prototype);return e.ptr=t,xt.register(e,e.ptr,e),e}toJSON(){return{}}toString(){return JSON.stringify(this)}__destroy_into_raw(){const t=this.ptr;return this.ptr=0,xt.unregister(this),t}free(){const t=this.__destroy_into_raw();r.__wbg_methodcontent_free(t)}static GenerateEd25519(){var t=r.methodcontent_GenerateEd25519();return At.__wrap(t)}static PrivateEd25519(t){var e=x(t,r.__wbindgen_malloc),i=c,n=r.methodcontent_PrivateEd25519(e,i);return At.__wrap(n)}static PublicEd25519(t){var e=x(t,r.__wbindgen_malloc),i=c,n=r.methodcontent_PublicEd25519(e,i);return At.__wrap(n)}static GenerateX25519(){var t=r.methodcontent_GenerateX25519();return At.__wrap(t)}static PrivateX25519(t){var e=x(t,r.__wbindgen_malloc),i=c,n=r.methodcontent_PrivateX25519(e,i);return At.__wrap(n)}static PublicX25519(t){var e=x(t,r.__wbindgen_malloc),i=c,n=r.methodcontent_PublicX25519(e,i);return At.__wrap(n)}toJSON(){try{const i=r.__wbindgen_add_to_stack_pointer(-16);r.methodcontent_toJSON(i,this.ptr);var t=b()[i/4+0],e=b()[i/4+1];if(b()[i/4+2])throw l(e);return l(t)}finally{r.__wbindgen_add_to_stack_pointer(16)}}static fromJSON(t){try{const n=r.__wbindgen_add_to_stack_pointer(-16);r.methodcontent_fromJSON(n,f(t));var e=b()[n/4+0],i=b()[n/4+1];if(b()[n/4+2])throw l(i);return At.__wrap(e)}finally{r.__wbindgen_add_to_stack_pointer(16)}}}const Et=new FinalizationRegistry((t=>r.__wbg_methoddata_free(t)));class It{static __wrap(t){const e=Object.create(It.prototype);return e.ptr=t,Et.register(e,e.ptr,e),e}toJSON(){return{}}toString(){return JSON.stringify(this)}__destroy_into_raw(){const t=this.ptr;return this.ptr=0,Et.unregister(this),t}free(){const t=this.__destroy_into_raw();r.__wbg_methoddata_free(t)}static newBase58(t){var e=x(t,r.__wbindgen_malloc),i=c,n=r.methoddata_newBase58(e,i);return It.__wrap(n)}static newMultibase(t){var e=x(t,r.__wbindgen_malloc),i=c,n=r.methoddata_newMultibase(e,i);return It.__wrap(n)}tryDecode(){try{const o=r.__wbindgen_add_to_stack_pointer(-16);r.methoddata_tryDecode(o,this.ptr);var t=b()[o/4+0],e=b()[o/4+1],i=b()[o/4+2];if(b()[o/4+3])throw l(i);var n=R(t,e).slice();return r.__wbindgen_free(t,1*e),n}finally{r.__wbindgen_add_to_stack_pointer(16)}}toJSON(){try{const i=r.__wbindgen_add_to_stack_pointer(-16);r.methoddata_toJSON(i,this.ptr);var t=b()[i/4+0],e=b()[i/4+1];if(b()[i/4+2])throw l(e);return l(t)}finally{r.__wbindgen_add_to_stack_pointer(16)}}static fromJSON(t){try{const n=r.__wbindgen_add_to_stack_pointer(-16