@tangle-js/anchors
Version:
Anchoring messages to the Tangle. Powered by IOTA Streams
2 lines • 865 kB
JavaScript
/*! For license information please see anchors-web.js.LICENSE.txt */
var t={9116:(t,e,i)=>{let r;i.r(e),i.d(e,{Address:()=>O,AddressGetter:()=>P,Author:()=>U,BalanceGetter:()=>q,ChannelAddress:()=>C,ChannelType:()=>L,Client:()=>j,ClientBuilder:()=>D,Cursor:()=>z,Details:()=>Z,GetAddressBuilder:()=>H,LedgerInclusionState:()=>N,Message:()=>K,MessageBuilder:()=>F,MessageGetter:()=>$,MessageMetadata:()=>X,MilestoneResponse:()=>J,MsgId:()=>G,NextMsgAddress:()=>Y,PskIds:()=>V,PublicKeys:()=>W,SendOptions:()=>Q,StreamsClient:()=>tt,Subscriber:()=>et,UnspentAddressGetter:()=>it,UserResponse:()=>rt,UserState:()=>nt,default:()=>st,set_panic_hook:()=>I,start:()=>B});const n=new Array(32).fill(void 0);function s(t){return n[t]}n.push(void 0,null,!0,!1);let o=n.length;function a(t){const e=s(t);return function(t){t<36||(n[t]=o,o=t)}(t),e}const h=new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0});h.decode();let u=null;function f(){return null!==u&&u.buffer===r.memory.buffer||(u=new Uint8Array(r.memory.buffer)),u}function d(t,e){return h.decode(f().subarray(t,t+e))}function l(t){o===n.length&&n.push(n.length+1);const e=o;return o=n[e],n[e]=t,e}let c=0;const p=new TextEncoder("utf-8"),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 f().subarray(r,r+i.length).set(i),c=i.length,r}let r=t.length,n=e(r);const s=f();let o=0;for(;o<r;o++){const e=t.charCodeAt(o);if(e>127)break;s[n+o]=e}if(o!==r){0!==o&&(t=t.slice(o)),n=i(n,r,r=o+3*t.length);const e=f().subarray(n+o,n+r);o+=m(t,e).written}return c=o,n}let g=null;function w(){return null!==g&&g.buffer===r.memory.buffer||(g=new Int32Array(r.memory.buffer)),g}function b(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}function v(t,e,i,n){const s={a:t,b:e,cnt:1,dtor:i},o=(...t)=>{s.cnt++;const e=s.a;s.a=0;try{return n(e,s.b,...t)}finally{0==--s.cnt?r.__wbindgen_export_2.get(s.dtor)(e,s.b):s.a=e}};return o.original=s,o}function M(t,e,i){r._dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h45c87d7cad3bb951(t,e,l(i))}function S(t,e){r._dyn_core__ops__function__FnMut_____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__hd67b012b38ff8c15(t,e)}function k(t,e){if(!(t instanceof e))throw new Error(`expected instance of ${e.name}`);return t.ptr}function A(t,e){const i=e(1*t.length);return f().set(t,i/1),c=t.length,i}function E(t,e){return f().subarray(t/1,t/1+e)}const R=new Uint32Array(2),x=new BigUint64Array(R.buffer);function I(){r.set_panic_hook()}function B(){r.start()}function T(t,e){try{return t.apply(this,e)}catch(t){r.__wbindgen_exn_store(l(t))}}const L=Object.freeze({SingleBranch:0,0:"SingleBranch",MultiBranch:1,1:"MultiBranch",SingleDepth:2,2:"SingleDepth"}),N=Object.freeze({Conflicting:0,0:"Conflicting",Included:1,1:"Included",NoTransaction:2,2:"NoTransaction"});class O{static __wrap(t){const e=Object.create(O.prototype);return e.ptr=t,e}__destroy_into_raw(){const t=this.ptr;return this.ptr=0,t}free(){const t=this.__destroy_into_raw();r.__wbg_address_free(t)}constructor(t,e){k(t,C);var i=t.ptr;t.ptr=0,k(e,G);var n=e.ptr;e.ptr=0;const s=r.address_new(i,n);return O.__wrap(s)}get channelAddress(){const t=r.address_channelAddress(this.ptr);return C.__wrap(t)}get msgId(){const t=r.address_msgId(this.ptr);return G.__wrap(t)}toMsgIndex(){try{const n=r.__wbindgen_add_to_stack_pointer(-16);r.address_toMsgIndex(n,this.ptr);var t=w()[n/4+0],e=w()[n/4+1],i=E(t,e).slice();return r.__wbindgen_free(t,1*e),i}finally{r.__wbindgen_add_to_stack_pointer(16)}}toMsgIndexHex(){try{const i=r.__wbindgen_add_to_stack_pointer(-16);r.address_toMsgIndexHex(i,this.ptr);var t=w()[i/4+0],e=w()[i/4+1];return d(t,e)}finally{r.__wbindgen_add_to_stack_pointer(16),r.__wbindgen_free(t,e)}}toString(){try{const i=r.__wbindgen_add_to_stack_pointer(-16);r.address_toString(i,this.ptr);var t=w()[i/4+0],e=w()[i/4+1];return d(t,e)}finally{r.__wbindgen_add_to_stack_pointer(16),r.__wbindgen_free(t,e)}}static parse(t){try{const n=r.__wbindgen_add_to_stack_pointer(-16),s=_(t,r.__wbindgen_malloc,r.__wbindgen_realloc),o=c;r.address_parse(n,s,o);var e=w()[n/4+0],i=w()[n/4+1];if(w()[n/4+2])throw a(i);return O.__wrap(e)}finally{r.__wbindgen_add_to_stack_pointer(16)}}copy(){const t=r.address_copy(this.ptr);return O.__wrap(t)}}class P{static __wrap(t){const e=Object.create(P.prototype);return e.ptr=t,e}__destroy_into_raw(){const t=this.ptr;return this.ptr=0,t}free(){const t=this.__destroy_into_raw();r.__wbg_addressgetter_free(t)}static new(t,e){k(t,j);var i=t.ptr;t.ptr=0;const n=_(e,r.__wbindgen_malloc,r.__wbindgen_realloc),s=c,o=r.addressgetter_new(i,n,s);return P.__wrap(o)}accountIndex(t){try{const n=r.__wbindgen_add_to_stack_pointer(-16);r.addressgetter_accountIndex(n,this.ptr,t);var e=w()[n/4+0],i=w()[n/4+1];if(w()[n/4+2])throw a(i);return P.__wrap(e)}finally{r.__wbindgen_add_to_stack_pointer(16)}}range(t,e){try{const s=r.__wbindgen_add_to_stack_pointer(-16);r.addressgetter_range(s,this.ptr,t,e);var i=w()[s/4+0],n=w()[s/4+1];if(w()[s/4+2])throw a(n);return P.__wrap(i)}finally{r.__wbindgen_add_to_stack_pointer(16)}}bech32Hrp(t){try{const n=r.__wbindgen_add_to_stack_pointer(-16),s=_(t,r.__wbindgen_malloc,r.__wbindgen_realloc),o=c;r.addressgetter_bech32Hrp(n,this.ptr,s,o);var e=w()[n/4+0],i=w()[n/4+1];if(w()[n/4+2])throw a(i);return P.__wrap(e)}finally{r.__wbindgen_add_to_stack_pointer(16)}}includeInternal(){try{const i=r.__wbindgen_add_to_stack_pointer(-16);r.addressgetter_includeInternal(i,this.ptr);var t=w()[i/4+0],e=w()[i/4+1];if(w()[i/4+2])throw a(e);return P.__wrap(t)}finally{r.__wbindgen_add_to_stack_pointer(16)}}get(){try{const i=r.__wbindgen_add_to_stack_pointer(-16);r.addressgetter_get(i,this.ptr);var t=w()[i/4+0],e=w()[i/4+1];if(w()[i/4+2])throw a(e);return a(t)}finally{r.__wbindgen_add_to_stack_pointer(16)}}}class U{static __wrap(t){const e=Object.create(U.prototype);return e.ptr=t,e}__destroy_into_raw(){const t=this.ptr;return this.ptr=0,t}free(){const t=this.__destroy_into_raw();r.__wbg_author_free(t)}constructor(t,e,i){const n=_(t,r.__wbindgen_malloc,r.__wbindgen_realloc),s=c;k(e,Q);var o=e.ptr;e.ptr=0;const a=r.author_new(n,s,o,i);return U.__wrap(a)}static fromClient(t,e,i){k(t,tt);var n=t.ptr;t.ptr=0;const s=_(e,r.__wbindgen_malloc,r.__wbindgen_realloc),o=c,a=r.author_fromClient(n,s,o,i);return U.__wrap(a)}static import(t,e,i){try{const h=r.__wbindgen_add_to_stack_pointer(-16);k(t,tt);var n=t.ptr;t.ptr=0;const u=A(e,r.__wbindgen_malloc),f=c,d=_(i,r.__wbindgen_malloc,r.__wbindgen_realloc),l=c;r.author_import(h,n,u,f,d,l);var s=w()[h/4+0],o=w()[h/4+1];if(w()[h/4+2])throw a(o);return U.__wrap(s)}finally{r.__wbindgen_add_to_stack_pointer(16)}}export(t){try{const o=r.__wbindgen_add_to_stack_pointer(-16),h=_(t,r.__wbindgen_malloc,r.__wbindgen_realloc),u=c;r.author_export(o,this.ptr,h,u);var e=w()[o/4+0],i=w()[o/4+1],n=w()[o/4+2];if(w()[o/4+3])throw a(n);var s=E(e,i).slice();return r.__wbindgen_free(e,1*i),s}finally{r.__wbindgen_add_to_stack_pointer(16)}}static recover(t,e,i,n){const s=_(t,r.__wbindgen_malloc,r.__wbindgen_realloc),o=c;k(e,O);var h=e.ptr;e.ptr=0,k(n,Q);var u=n.ptr;return n.ptr=0,a(r.author_recover(s,o,h,i,u))}clone(){const t=r.author_clone(this.ptr);return U.__wrap(t)}channel_address(){try{const h=r.__wbindgen_add_to_stack_pointer(-16);r.author_channel_address(h,this.ptr);var t=w()[h/4+0],e=w()[h/4+1],i=w()[h/4+2],n=w()[h/4+3],s=t,o=e;if(n)throw s=0,o=0,a(i);return d(s,o)}finally{r.__wbindgen_add_to_stack_pointer(16),r.__wbindgen_free(s,o)}}announcementLink(){try{const i=r.__wbindgen_add_to_stack_pointer(-16);r.author_announcementLink(i,this.ptr);var t=w()[i/4+0],e=w()[i/4+1];let n;return 0!==t&&(n=d(t,e).slice(),r.__wbindgen_free(t,1*e)),n}finally{r.__wbindgen_add_to_stack_pointer(16)}}is_multi_branching(){try{const i=r.__wbindgen_add_to_stack_pointer(-16);r.author_is_multi_branching(i,this.ptr);var t=w()[i/4+0],e=w()[i/4+1];if(w()[i/4+2])throw a(e);return 0!==t}finally{r.__wbindgen_add_to_stack_pointer(16)}}get_client(){const t=r.author_get_client(this.ptr);return tt.__wrap(t)}store_psk(t){try{const u=r.__wbindgen_add_to_stack_pointer(-16),f=_(t,r.__wbindgen_malloc,r.__wbindgen_realloc),l=c;r.author_store_psk(u,this.ptr,f,l);var e=w()[u/4+0],i=w()[u/4+1],n=w()[u/4+2],s=w()[u/4+3],o=e,h=i;if(s)throw o=0,h=0,a(n);return d(o,h)}finally{r.__wbindgen_add_to_stack_pointer(16),r.__wbindgen_free(o,h)}}get_public_key(){try{const h=r.__wbindgen_add_to_stack_pointer(-16);r.author_get_public_key(h,this.ptr);var t=w()[h/4+0],e=w()[h/4+1],i=w()[h/4+2],n=w()[h/4+3],s=t,o=e;if(n)throw s=0,o=0,a(i);return d(s,o)}finally{r.__wbindgen_add_to_stack_pointer(16),r.__wbindgen_free(s,o)}}send_announce(){const t=this.__destroy_into_raw();return a(r.author_send_announce(t))}send_keyload_for_everyone(t){const e=this.__destroy_into_raw();k(t,O);var i=t.ptr;return t.ptr=0,a(r.author_send_keyload_for_everyone(e,i))}send_keyload(t,e,i){const n=this.__destroy_into_raw();k(t,O);var s=t.ptr;t.ptr=0,k(e,V);var o=e.ptr;e.ptr=0,k(i,W);var h=i.ptr;return i.ptr=0,a(r.author_send_keyload(n,s,o,h))}send_tagged_packet(t,e,i){const n=this.__destroy_into_raw();k(t,O);var s=t.ptr;t.ptr=0;const o=A(e,r.__wbindgen_malloc),h=c,u=A(i,r.__wbindgen_malloc),f=c;return a(r.author_send_tagged_packet(n,s,o,h,u,f))}send_signed_packet(t,e,i){const n=this.__destroy_into_raw();k(t,O);var s=t.ptr;t.ptr=0;const o=A(e,r.__wbindgen_malloc),h=c,u=A(i,r.__wbindgen_malloc),f=c;return a(r.author_send_signed_packet(n,s,o,h,u,f))}receive_subscribe(t){const e=this.__destroy_into_raw();k(t,O);var i=t.ptr;return t.ptr=0,a(r.author_receive_subscribe(e,i))}receive_unsubscribe(t){const e=this.__destroy_into_raw();k(t,O);var i=t.ptr;return t.ptr=0,a(r.author_receive_unsubscribe(e,i))}receive_tagged_packet(t){const e=this.__destroy_into_raw();k(t,O);var i=t.ptr;return t.ptr=0,a(r.author_receive_tagged_packet(e,i))}receive_signed_packet(t){const e=this.__destroy_into_raw();k(t,O);var i=t.ptr;return t.ptr=0,a(r.author_receive_signed_packet(e,i))}receive_sequence(t){const e=this.__destroy_into_raw();k(t,O);var i=t.ptr;return t.ptr=0,a(r.author_receive_sequence(e,i))}receive_msg(t){const e=this.__destroy_into_raw();k(t,O);var i=t.ptr;return t.ptr=0,a(r.author_receive_msg(e,i))}receive_msg_by_sequence_number(t,e){const i=this.__destroy_into_raw();k(t,O);var n=t.ptr;return t.ptr=0,a(r.author_receive_msg_by_sequence_number(i,n,e))}syncState(){const t=this.__destroy_into_raw();return a(r.author_syncState(t))}fetchNextMsgs(){const t=this.__destroy_into_raw();return a(r.author_fetchNextMsgs(t))}fetchNextMsg(){const t=this.__destroy_into_raw();return a(r.author_fetchNextMsg(t))}fetch_prev_msg(t){const e=this.__destroy_into_raw();k(t,O);var i=t.ptr;return t.ptr=0,a(r.author_fetch_prev_msg(e,i))}fetch_prev_msgs(t,e){const i=this.__destroy_into_raw();k(t,O);var n=t.ptr;return t.ptr=0,a(r.author_fetch_prev_msgs(i,n,e))}genNextMsgAddresses(){return a(r.author_genNextMsgAddresses(this.ptr))}fetch_state(){try{const i=r.__wbindgen_add_to_stack_pointer(-16);r.author_fetch_state(i,this.ptr);var t=w()[i/4+0],e=w()[i/4+1];if(w()[i/4+2])throw a(e);return a(t)}finally{r.__wbindgen_add_to_stack_pointer(16)}}reset_state(){try{const e=this.__destroy_into_raw(),i=r.__wbindgen_add_to_stack_pointer(-16);r.author_reset_state(i,e);var t=w()[i/4+0];if(w()[i/4+1])throw a(t)}finally{r.__wbindgen_add_to_stack_pointer(16)}}store_new_subscriber(t){try{const i=r.__wbindgen_add_to_stack_pointer(-16),n=_(t,r.__wbindgen_malloc,r.__wbindgen_realloc),s=c;r.author_store_new_subscriber(i,this.ptr,n,s);var e=w()[i/4+0];if(w()[i/4+1])throw a(e)}finally{r.__wbindgen_add_to_stack_pointer(16)}}remove_subscriber(t){try{const i=r.__wbindgen_add_to_stack_pointer(-16),n=_(t,r.__wbindgen_malloc,r.__wbindgen_realloc),s=c;r.author_remove_subscriber(i,this.ptr,n,s);var e=w()[i/4+0];if(w()[i/4+1])throw a(e)}finally{r.__wbindgen_add_to_stack_pointer(16)}}remove_psk(t){try{const i=r.__wbindgen_add_to_stack_pointer(-16),n=_(t,r.__wbindgen_malloc,r.__wbindgen_realloc),s=c;r.author_remove_psk(i,this.ptr,n,s);var e=w()[i/4+0];if(w()[i/4+1])throw a(e)}finally{r.__wbindgen_add_to_stack_pointer(16)}}}class q{static __wrap(t){const e=Object.create(q.prototype);return e.ptr=t,e}__destroy_into_raw(){const t=this.ptr;return this.ptr=0,t}free(){const t=this.__destroy_into_raw();r.__wbg_balancegetter_free(t)}static new(t,e){k(t,j);var i=t.ptr;t.ptr=0;const n=_(e,r.__wbindgen_malloc,r.__wbindgen_realloc),s=c,o=r.balancegetter_new(i,n,s);return q.__wrap(o)}accountIndex(t){try{const n=r.__wbindgen_add_to_stack_pointer(-16);r.balancegetter_accountIndex(n,this.ptr,t);var e=w()[n/4+0],i=w()[n/4+1];if(w()[n/4+2])throw a(i);return q.__wrap(e)}finally{r.__wbindgen_add_to_stack_pointer(16)}}initialAddressIndex(t){try{const n=r.__wbindgen_add_to_stack_pointer(-16);r.balancegetter_initialAddressIndex(n,this.ptr,t);var e=w()[n/4+0],i=w()[n/4+1];if(w()[n/4+2])throw a(i);return q.__wrap(e)}finally{r.__wbindgen_add_to_stack_pointer(16)}}gap_limit(t){try{const n=r.__wbindgen_add_to_stack_pointer(-16);r.balancegetter_gap_limit(n,this.ptr,t);var e=w()[n/4+0],i=w()[n/4+1];if(w()[n/4+2])throw a(i);return q.__wrap(e)}finally{r.__wbindgen_add_to_stack_pointer(16)}}get(){try{const i=r.__wbindgen_add_to_stack_pointer(-16);r.balancegetter_get(i,this.ptr);var t=w()[i/4+0],e=w()[i/4+1];if(w()[i/4+2])throw a(e);return a(t)}finally{r.__wbindgen_add_to_stack_pointer(16)}}}class C{static __wrap(t){const e=Object.create(C.prototype);return e.ptr=t,e}__destroy_into_raw(){const t=this.ptr;return this.ptr=0,t}free(){const t=this.__destroy_into_raw();r.__wbg_channeladdress_free(t)}bytes(){try{const n=r.__wbindgen_add_to_stack_pointer(-16);r.channeladdress_bytes(n,this.ptr);var t=w()[n/4+0],e=w()[n/4+1],i=E(t,e).slice();return r.__wbindgen_free(t,1*e),i}finally{r.__wbindgen_add_to_stack_pointer(16)}}hex(){try{const i=r.__wbindgen_add_to_stack_pointer(-16);r.channeladdress_hex(i,this.ptr);var t=w()[i/4+0],e=w()[i/4+1];return d(t,e)}finally{r.__wbindgen_add_to_stack_pointer(16),r.__wbindgen_free(t,e)}}toString(){try{const i=r.__wbindgen_add_to_stack_pointer(-16);r.channeladdress_toString(i,this.ptr);var t=w()[i/4+0],e=w()[i/4+1];return d(t,e)}finally{r.__wbindgen_add_to_stack_pointer(16),r.__wbindgen_free(t,e)}}static parse(t){try{const n=r.__wbindgen_add_to_stack_pointer(-16),s=_(t,r.__wbindgen_malloc,r.__wbindgen_realloc),o=c;r.channeladdress_parse(n,s,o);var e=w()[n/4+0],i=w()[n/4+1];if(w()[n/4+2])throw a(i);return C.__wrap(e)}finally{r.__wbindgen_add_to_stack_pointer(16)}}copy(){const t=r.address_channelAddress(this.ptr);return C.__wrap(t)}}class j{static __wrap(t){const e=Object.create(j.prototype);return e.ptr=t,e}__destroy_into_raw(){const t=this.ptr;return this.ptr=0,t}free(){const t=this.__destroy_into_raw();r.__wbg_client_free(t)}message(){const t=r.client_message(this.ptr);return F.__wrap(t)}getMessage(){const t=r.client_getAddress(this.ptr);return $.__wrap(t)}getAddresses(t){const e=_(t,r.__wbindgen_malloc,r.__wbindgen_realloc),i=c,n=r.client_getAddresses(this.ptr,e,i);return P.__wrap(n)}getUnspentAddress(t){const e=_(t,r.__wbindgen_malloc,r.__wbindgen_realloc),i=c,n=r.client_getUnspentAddress(this.ptr,e,i);return it.__wrap(n)}getBalance(t){const e=_(t,r.__wbindgen_malloc,r.__wbindgen_realloc),i=c,n=r.client_getBalance(this.ptr,e,i);return q.__wrap(n)}getAddress(){const t=r.client_getAddress(this.ptr);return H.__wrap(t)}getInfo(){try{const i=r.__wbindgen_add_to_stack_pointer(-16);r.client_getInfo(i,this.ptr);var t=w()[i/4+0],e=w()[i/4+1];if(w()[i/4+2])throw a(e);return a(t)}finally{r.__wbindgen_add_to_stack_pointer(16)}}getNodeInfo(t,e,i,n){try{const m=r.__wbindgen_add_to_stack_pointer(-16),g=_(t,r.__wbindgen_malloc,r.__wbindgen_realloc),y=c;var s=b(e)?0:_(e,r.__wbindgen_malloc,r.__wbindgen_realloc),o=c,h=b(i)?0:_(i,r.__wbindgen_malloc,r.__wbindgen_realloc),u=c,f=b(n)?0:_(n,r.__wbindgen_malloc,r.__wbindgen_realloc),d=c;r.client_getNodeInfo(m,this.ptr,g,y,s,o,h,u,f,d);var l=w()[m/4+0],p=w()[m/4+1];if(w()[m/4+2])throw a(p);return a(l)}finally{r.__wbindgen_add_to_stack_pointer(16)}}networkInfo(){try{const i=r.__wbindgen_add_to_stack_pointer(-16);r.client_networkInfo(i,this.ptr);var t=w()[i/4+0],e=w()[i/4+1];if(w()[i/4+2])throw a(e);return a(t)}finally{r.__wbindgen_add_to_stack_pointer(16)}}getNetworkId(){try{const i=r.__wbindgen_add_to_stack_pointer(-16);r.client_getNetworkId(i,this.ptr);var t=w()[i/4+0],e=w()[i/4+1];if(w()[i/4+2])throw a(e);return a(t)}finally{r.__wbindgen_add_to_stack_pointer(16)}}getBech32Hrp(){try{const i=r.__wbindgen_add_to_stack_pointer(-16);r.client_getBech32Hrp(i,this.ptr);var t=w()[i/4+0],e=w()[i/4+1];if(w()[i/4+2])throw a(e);return a(t)}finally{r.__wbindgen_add_to_stack_pointer(16)}}getMinPowScore(){try{const i=r.__wbindgen_add_to_stack_pointer(-16);r.client_getMinPowScore(i,this.ptr);var t=w()[i/4+0],e=w()[i/4+1];if(w()[i/4+2])throw a(e);return a(t)}finally{r.__wbindgen_add_to_stack_pointer(16)}}getHealth(){try{const i=r.__wbindgen_add_to_stack_pointer(-16);r.client_getHealth(i,this.ptr);var t=w()[i/4+0],e=w()[i/4+1];if(w()[i/4+2])throw a(e);return a(t)}finally{r.__wbindgen_add_to_stack_pointer(16)}}getTips(){try{const i=r.__wbindgen_add_to_stack_pointer(-16);r.client_getTips(i,this.ptr);var t=w()[i/4+0],e=w()[i/4+1];if(w()[i/4+2])throw a(e);return a(t)}finally{r.__wbindgen_add_to_stack_pointer(16)}}getPeers(){try{const i=r.__wbindgen_add_to_stack_pointer(-16);r.client_getPeers(i,this.ptr);var t=w()[i/4+0],e=w()[i/4+1];if(w()[i/4+2])throw a(e);return a(t)}finally{r.__wbindgen_add_to_stack_pointer(16)}}getOutput(t){try{const n=r.__wbindgen_add_to_stack_pointer(-16),s=_(t,r.__wbindgen_malloc,r.__wbindgen_realloc),o=c;r.client_getOutput(n,this.ptr,s,o);var e=w()[n/4+0],i=w()[n/4+1];if(w()[n/4+2])throw a(i);return a(e)}finally{r.__wbindgen_add_to_stack_pointer(16)}}findMessages(t,e){try{const s=r.__wbindgen_add_to_stack_pointer(-16);r.client_findMessages(s,this.ptr,l(t),l(e));var i=w()[s/4+0],n=w()[s/4+1];if(w()[s/4+2])throw a(n);return a(i)}finally{r.__wbindgen_add_to_stack_pointer(16)}}findInputs(t,e){try{const s=r.__wbindgen_add_to_stack_pointer(-16);x[0]=e;const o=R[0],h=R[1];r.client_findInputs(s,this.ptr,l(t),o,h);var i=w()[s/4+0],n=w()[s/4+1];if(w()[s/4+2])throw a(n);return a(i)}finally{r.__wbindgen_add_to_stack_pointer(16)}}findOutputs(t,e){try{const s=r.__wbindgen_add_to_stack_pointer(-16);r.client_findOutputs(s,this.ptr,l(t),l(e));var i=w()[s/4+0],n=w()[s/4+1];if(w()[s/4+2])throw a(n);return a(i)}finally{r.__wbindgen_add_to_stack_pointer(16)}}getAddressBalances(t){try{const n=r.__wbindgen_add_to_stack_pointer(-16);r.client_getAddressBalances(n,this.ptr,l(t));var e=w()[n/4+0],i=w()[n/4+1];if(w()[n/4+2])throw a(i);return a(e)}finally{r.__wbindgen_add_to_stack_pointer(16)}}getMilestone(t){try{const n=r.__wbindgen_add_to_stack_pointer(-16);r.client_getMilestone(n,this.ptr,t);var e=w()[n/4+0],i=w()[n/4+1];if(w()[n/4+2])throw a(i);return a(e)}finally{r.__wbindgen_add_to_stack_pointer(16)}}getMilestoneUtxoChanges(t){try{const n=r.__wbindgen_add_to_stack_pointer(-16);r.client_getMilestoneUtxoChanges(n,this.ptr,t);var e=w()[n/4+0],i=w()[n/4+1];if(w()[n/4+2])throw a(i);return a(e)}finally{r.__wbindgen_add_to_stack_pointer(16)}}getReceipts(){try{const i=r.__wbindgen_add_to_stack_pointer(-16);r.client_getReceipts(i,this.ptr);var t=w()[i/4+0],e=w()[i/4+1];if(w()[i/4+2])throw a(e);return a(t)}finally{r.__wbindgen_add_to_stack_pointer(16)}}getReceiptsMigratedAt(t){try{const n=r.__wbindgen_add_to_stack_pointer(-16);r.client_getReceiptsMigratedAt(n,this.ptr,t);var e=w()[n/4+0],i=w()[n/4+1];if(w()[n/4+2])throw a(i);return a(e)}finally{r.__wbindgen_add_to_stack_pointer(16)}}getTreasury(){try{const i=r.__wbindgen_add_to_stack_pointer(-16);r.client_getTreasury(i,this.ptr);var t=w()[i/4+0],e=w()[i/4+1];if(w()[i/4+2])throw a(e);return a(t)}finally{r.__wbindgen_add_to_stack_pointer(16)}}getIncludedMessage(t){try{const n=r.__wbindgen_add_to_stack_pointer(-16),s=_(t,r.__wbindgen_malloc,r.__wbindgen_realloc),o=c;r.client_getIncludedMessage(n,this.ptr,s,o);var e=w()[n/4+0],i=w()[n/4+1];if(w()[n/4+2])throw a(i);return a(e)}finally{r.__wbindgen_add_to_stack_pointer(16)}}postMessage(t){try{const n=r.__wbindgen_add_to_stack_pointer(-16);r.client_postMessage(n,this.ptr,l(t));var e=w()[n/4+0],i=w()[n/4+1];if(w()[n/4+2])throw a(i);return a(e)}finally{r.__wbindgen_add_to_stack_pointer(16)}}retry(t){try{const n=r.__wbindgen_add_to_stack_pointer(-16),s=_(t,r.__wbindgen_malloc,r.__wbindgen_realloc),o=c;r.client_retry(n,this.ptr,s,o);var e=w()[n/4+0],i=w()[n/4+1];if(w()[n/4+2])throw a(i);return a(e)}finally{r.__wbindgen_add_to_stack_pointer(16)}}retryUntilIncluded(t,e,i){try{const o=r.__wbindgen_add_to_stack_pointer(-16),h=_(t,r.__wbindgen_malloc,r.__wbindgen_realloc),u=c;x[0]=b(e)?BigInt(0):e;const f=R[0],d=R[1];x[0]=b(i)?BigInt(0):i;const l=R[0],p=R[1];r.client_retryUntilIncluded(o,this.ptr,h,u,!b(e),f,d,!b(i),l,p);var n=w()[o/4+0],s=w()[o/4+1];if(w()[o/4+2])throw a(s);return a(n)}finally{r.__wbindgen_add_to_stack_pointer(16)}}reattach(t){try{const n=r.__wbindgen_add_to_stack_pointer(-16),s=_(t,r.__wbindgen_malloc,r.__wbindgen_realloc),o=c;r.client_reattach(n,this.ptr,s,o);var e=w()[n/4+0],i=w()[n/4+1];if(w()[n/4+2])throw a(i);return a(e)}finally{r.__wbindgen_add_to_stack_pointer(16)}}promote(t){try{const n=r.__wbindgen_add_to_stack_pointer(-16),s=_(t,r.__wbindgen_malloc,r.__wbindgen_realloc),o=c;r.client_promote(n,this.ptr,s,o);var e=w()[n/4+0],i=w()[n/4+1];if(w()[n/4+2])throw a(i);return a(e)}finally{r.__wbindgen_add_to_stack_pointer(16)}}consolidateFunds(t,e,i,n){try{const h=r.__wbindgen_add_to_stack_pointer(-16),u=_(t,r.__wbindgen_malloc,r.__wbindgen_realloc),f=c;r.client_consolidateFunds(h,this.ptr,u,f,e,i,n);var s=w()[h/4+0],o=w()[h/4+1];if(w()[h/4+2])throw a(o);return a(s)}finally{r.__wbindgen_add_to_stack_pointer(16)}}bech32ToHex(t){try{const u=r.__wbindgen_add_to_stack_pointer(-16),f=_(t,r.__wbindgen_malloc,r.__wbindgen_realloc),l=c;r.client_bech32ToHex(u,this.ptr,f,l);var e=w()[u/4+0],i=w()[u/4+1],n=w()[u/4+2],s=w()[u/4+3],o=e,h=i;if(s)throw o=0,h=0,a(n);return d(o,h)}finally{r.__wbindgen_add_to_stack_pointer(16),r.__wbindgen_free(o,h)}}hexToBech32(t,e){try{const h=r.__wbindgen_add_to_stack_pointer(-16),u=_(t,r.__wbindgen_malloc,r.__wbindgen_realloc),f=c;var i=b(e)?0:_(e,r.__wbindgen_malloc,r.__wbindgen_realloc),n=c;r.client_hexToBech32(h,this.ptr,u,f,i,n);var s=w()[h/4+0],o=w()[h/4+1];if(w()[h/4+2])throw a(o);return a(s)}finally{r.__wbindgen_add_to_stack_pointer(16)}}hexPublicKeyToBech32Address(t,e){try{const h=r.__wbindgen_add_to_stack_pointer(-16),u=_(t,r.__wbindgen_malloc,r.__wbindgen_realloc),f=c;var i=b(e)?0:_(e,r.__wbindgen_malloc,r.__wbindgen_realloc),n=c;r.client_hexPublicKeyToBech32Address(h,this.ptr,u,f,i,n);var s=w()[h/4+0],o=w()[h/4+1];if(w()[h/4+2])throw a(o);return a(s)}finally{r.__wbindgen_add_to_stack_pointer(16)}}isAddressValid(t){const e=_(t,r.__wbindgen_malloc,r.__wbindgen_realloc),i=c;return 0!==r.client_isAddressValid(this.ptr,e,i)}generateMnemonic(){try{const h=r.__wbindgen_add_to_stack_pointer(-16);r.client_generateMnemonic(h,this.ptr);var t=w()[h/4+0],e=w()[h/4+1],i=w()[h/4+2],n=w()[h/4+3],s=t,o=e;if(n)throw s=0,o=0,a(i);return d(s,o)}finally{r.__wbindgen_add_to_stack_pointer(16),r.__wbindgen_free(s,o)}}mnemonicToHexSeed(t){try{const u=r.__wbindgen_add_to_stack_pointer(-16),f=_(t,r.__wbindgen_malloc,r.__wbindgen_realloc),l=c;r.client_mnemonicToHexSeed(u,this.ptr,f,l);var e=w()[u/4+0],i=w()[u/4+1],n=w()[u/4+2],s=w()[u/4+3],o=e,h=i;if(s)throw o=0,h=0,a(n);return d(o,h)}finally{r.__wbindgen_add_to_stack_pointer(16),r.__wbindgen_free(o,h)}}getMessageId(t){try{const u=r.__wbindgen_add_to_stack_pointer(-16),f=_(t,r.__wbindgen_malloc,r.__wbindgen_realloc),l=c;r.client_getMessageId(u,this.ptr,f,l);var e=w()[u/4+0],i=w()[u/4+1],n=w()[u/4+2],s=w()[u/4+3],o=e,h=i;if(s)throw o=0,h=0,a(n);return d(o,h)}finally{r.__wbindgen_add_to_stack_pointer(16),r.__wbindgen_free(o,h)}}getTransactionId(t){try{const u=r.__wbindgen_add_to_stack_pointer(-16),f=_(t,r.__wbindgen_malloc,r.__wbindgen_realloc),l=c;r.client_getTransactionId(u,this.ptr,f,l);var e=w()[u/4+0],i=w()[u/4+1],n=w()[u/4+2],s=w()[u/4+3],o=e,h=i;if(s)throw o=0,h=0,a(n);return d(o,h)}finally{r.__wbindgen_add_to_stack_pointer(16),r.__wbindgen_free(o,h)}}}class D{static __wrap(t){const e=Object.create(D.prototype);return e.ptr=t,e}__destroy_into_raw(){const t=this.ptr;return this.ptr=0,t}free(){const t=this.__destroy_into_raw();r.__wbg_clientbuilder_free(t)}constructor(){const t=r.clientbuilder_new();return D.__wrap(t)}node(t){try{const n=this.__destroy_into_raw(),s=r.__wbindgen_add_to_stack_pointer(-16),o=_(t,r.__wbindgen_malloc,r.__wbindgen_realloc),h=c;r.clientbuilder_node(s,n,o,h);var e=w()[s/4+0],i=w()[s/4+1];if(w()[s/4+2])throw a(i);return D.__wrap(e)}finally{r.__wbindgen_add_to_stack_pointer(16)}}primaryNode(t,e,i,n){try{const m=this.__destroy_into_raw(),g=r.__wbindgen_add_to_stack_pointer(-16),y=_(t,r.__wbindgen_malloc,r.__wbindgen_realloc),v=c;var s=b(e)?0:_(e,r.__wbindgen_malloc,r.__wbindgen_realloc),o=c,h=b(i)?0:_(i,r.__wbindgen_malloc,r.__wbindgen_realloc),u=c,f=b(n)?0:_(n,r.__wbindgen_malloc,r.__wbindgen_realloc),d=c;r.clientbuilder_primaryNode(g,m,y,v,s,o,h,u,f,d);var l=w()[g/4+0],p=w()[g/4+1];if(w()[g/4+2])throw a(p);return D.__wrap(l)}finally{r.__wbindgen_add_to_stack_pointer(16)}}primaryPowNode(t,e,i,n){try{const m=this.__destroy_into_raw(),g=r.__wbindgen_add_to_stack_pointer(-16),y=_(t,r.__wbindgen_malloc,r.__wbindgen_realloc),v=c;var s=b(e)?0:_(e,r.__wbindgen_malloc,r.__wbindgen_realloc),o=c,h=b(i)?0:_(i,r.__wbindgen_malloc,r.__wbindgen_realloc),u=c,f=b(n)?0:_(n,r.__wbindgen_malloc,r.__wbindgen_realloc),d=c;r.clientbuilder_primaryPowNode(g,m,y,v,s,o,h,u,f,d);var l=w()[g/4+0],p=w()[g/4+1];if(w()[g/4+2])throw a(p);return D.__wrap(l)}finally{r.__wbindgen_add_to_stack_pointer(16)}}permanode(t,e,i,n){try{const m=this.__destroy_into_raw(),g=r.__wbindgen_add_to_stack_pointer(-16),y=_(t,r.__wbindgen_malloc,r.__wbindgen_realloc),v=c;var s=b(e)?0:_(e,r.__wbindgen_malloc,r.__wbindgen_realloc),o=c,h=b(i)?0:_(i,r.__wbindgen_malloc,r.__wbindgen_realloc),u=c,f=b(n)?0:_(n,r.__wbindgen_malloc,r.__wbindgen_realloc),d=c;r.clientbuilder_permanode(g,m,y,v,s,o,h,u,f,d);var l=w()[g/4+0],p=w()[g/4+1];if(w()[g/4+2])throw a(p);return D.__wrap(l)}finally{r.__wbindgen_add_to_stack_pointer(16)}}nodeAuth(t,e,i,n){try{const m=this.__destroy_into_raw(),g=r.__wbindgen_add_to_stack_pointer(-16),y=_(t,r.__wbindgen_malloc,r.__wbindgen_realloc),v=c;var s=b(e)?0:_(e,r.__wbindgen_malloc,r.__wbindgen_realloc),o=c,h=b(i)?0:_(i,r.__wbindgen_malloc,r.__wbindgen_realloc),u=c,f=b(n)?0:_(n,r.__wbindgen_malloc,r.__wbindgen_realloc),d=c;r.clientbuilder_nodeAuth(g,m,y,v,s,o,h,u,f,d);var l=w()[g/4+0],p=w()[g/4+1];if(w()[g/4+2])throw a(p);return D.__wrap(l)}finally{r.__wbindgen_add_to_stack_pointer(16)}}nodes(t){try{const n=this.__destroy_into_raw(),s=r.__wbindgen_add_to_stack_pointer(-16);r.clientbuilder_nodes(s,n,l(t));var e=w()[s/4+0],i=w()[s/4+1];if(w()[s/4+2])throw a(i);return D.__wrap(e)}finally{r.__wbindgen_add_to_stack_pointer(16)}}nodeSyncInterval(t){try{const n=this.__destroy_into_raw(),s=r.__wbindgen_add_to_stack_pointer(-16);r.clientbuilder_nodeSyncInterval(s,n,t);var e=w()[s/4+0],i=w()[s/4+1];if(w()[s/4+2])throw a(i);return D.__wrap(e)}finally{r.__wbindgen_add_to_stack_pointer(16)}}nodeSyncDisabled(){try{const i=this.__destroy_into_raw(),n=r.__wbindgen_add_to_stack_pointer(-16);r.clientbuilder_nodeSyncDisabled(n,i);var t=w()[n/4+0],e=w()[n/4+1];if(w()[n/4+2])throw a(e);return D.__wrap(t)}finally{r.__wbindgen_add_to_stack_pointer(16)}}offlineMode(){try{const i=this.__destroy_into_raw(),n=r.__wbindgen_add_to_stack_pointer(-16);r.clientbuilder_offlineMode(n,i);var t=w()[n/4+0],e=w()[n/4+1];if(w()[n/4+2])throw a(e);return D.__wrap(t)}finally{r.__wbindgen_add_to_stack_pointer(16)}}nodePoolUrls(t){try{const n=this.__destroy_into_raw(),s=r.__wbindgen_add_to_stack_pointer(-16);r.clientbuilder_nodePoolUrls(s,n,l(t));var e=w()[s/4+0],i=w()[s/4+1];if(w()[s/4+2])throw a(i);return a(e)}finally{r.__wbindgen_add_to_stack_pointer(16)}}quorum(t){try{const n=this.__destroy_into_raw(),s=r.__wbindgen_add_to_stack_pointer(-16);r.clientbuilder_quorum(s,n,t);var e=w()[s/4+0],i=w()[s/4+1];if(w()[s/4+2])throw a(i);return D.__wrap(e)}finally{r.__wbindgen_add_to_stack_pointer(16)}}quorumSize(t){try{const n=this.__destroy_into_raw(),s=r.__wbindgen_add_to_stack_pointer(-16);r.clientbuilder_quorumSize(s,n,t);var e=w()[s/4+0],i=w()[s/4+1];if(w()[s/4+2])throw a(i);return D.__wrap(e)}finally{r.__wbindgen_add_to_stack_pointer(16)}}quorumThreshold(t){try{const n=this.__destroy_into_raw(),s=r.__wbindgen_add_to_stack_pointer(-16);r.clientbuilder_quorumThreshold(s,n,t);var e=w()[s/4+0],i=w()[s/4+1];if(w()[s/4+2])throw a(i);return D.__wrap(e)}finally{r.__wbindgen_add_to_stack_pointer(16)}}network(t){try{const n=this.__destroy_into_raw(),s=r.__wbindgen_add_to_stack_pointer(-16),o=_(t,r.__wbindgen_malloc,r.__wbindgen_realloc),h=c;r.clientbuilder_network(s,n,o,h);var e=w()[s/4+0],i=w()[s/4+1];if(w()[s/4+2])throw a(i);return D.__wrap(e)}finally{r.__wbindgen_add_to_stack_pointer(16)}}localPow(t){try{const n=this.__destroy_into_raw(),s=r.__wbindgen_add_to_stack_pointer(-16);r.clientbuilder_localPow(s,n,t);var e=w()[s/4+0],i=w()[s/4+1];if(w()[s/4+2])throw a(i);return D.__wrap(e)}finally{r.__wbindgen_add_to_stack_pointer(16)}}tipsInterval(t){try{const n=this.__destroy_into_raw(),s=r.__wbindgen_add_to_stack_pointer(-16);r.clientbuilder_tipsInterval(s,n,t);var e=w()[s/4+0],i=w()[s/4+1];if(w()[s/4+2])throw a(i);return D.__wrap(e)}finally{r.__wbindgen_add_to_stack_pointer(16)}}requestTimeout(t){try{const n=this.__destroy_into_raw(),s=r.__wbindgen_add_to_stack_pointer(-16);r.clientbuilder_requestTimeout(s,n,t);var e=w()[s/4+0],i=w()[s/4+1];if(w()[s/4+2])throw a(i);return D.__wrap(e)}finally{r.__wbindgen_add_to_stack_pointer(16)}}apiTimeout(t,e){try{const s=this.__destroy_into_raw(),o=r.__wbindgen_add_to_stack_pointer(-16),h=_(t,r.__wbindgen_malloc,r.__wbindgen_realloc),u=c;r.clientbuilder_apiTimeout(o,s,h,u,e);var i=w()[o/4+0],n=w()[o/4+1];if(w()[o/4+2])throw a(n);return D.__wrap(i)}finally{r.__wbindgen_add_to_stack_pointer(16)}}build(){try{const i=this.__destroy_into_raw(),n=r.__wbindgen_add_to_stack_pointer(-16);r.clientbuilder_build(n,i);var t=w()[n/4+0],e=w()[n/4+1];if(w()[n/4+2])throw a(e);return a(t)}finally{r.__wbindgen_add_to_stack_pointer(16)}}}class z{__destroy_into_raw(){const t=this.ptr;return this.ptr=0,t}free(){const t=this.__destroy_into_raw();r.__wbg_cursor_free(t)}}class Z{static __wrap(t){const e=Object.create(Z.prototype);return e.ptr=t,e}__destroy_into_raw(){const t=this.ptr;return this.ptr=0,t}free(){const t=this.__destroy_into_raw();r.__wbg_details_free(t)}get_metadata(){const t=r.details_get_metadata(this.ptr);return X.__wrap(t)}get_milestone(){const t=r.details_get_milestone(this.ptr);return 0===t?void 0:J.__wrap(t)}}class H{static __wrap(t){const e=Object.create(H.prototype);return e.ptr=t,e}__destroy_into_raw(){const t=this.ptr;return this.ptr=0,t}free(){const t=this.__destroy_into_raw();r.__wbg_getaddressbuilder_free(t)}static new(t){k(t,j);var e=t.ptr;t.ptr=0;const i=r.getaddressbuilder_new(e);return H.__wrap(i)}balance(t){try{const n=r.__wbindgen_add_to_stack_pointer(-16),s=_(t,r.__wbindgen_malloc,r.__wbindgen_realloc),o=c;r.getaddressbuilder_balance(n,this.ptr,s,o);var e=w()[n/4+0],i=w()[n/4+1];if(w()[n/4+2])throw a(i);return a(e)}finally{r.__wbindgen_add_to_stack_pointer(16)}}outputs(t,e){try{const s=r.__wbindgen_add_to_stack_pointer(-16),o=_(t,r.__wbindgen_malloc,r.__wbindgen_realloc),h=c;r.getaddressbuilder_outputs(s,this.ptr,o,h,l(e));var i=w()[s/4+0],n=w()[s/4+1];if(w()[s/4+2])throw a(n);return a(i)}finally{r.__wbindgen_add_to_stack_pointer(16)}}}class K{static __wrap(t){const e=Object.create(K.prototype);return e.ptr=t,e}__destroy_into_raw(){const t=this.ptr;return this.ptr=0,t}free(){const t=this.__destroy_into_raw();r.__wbg_message_free(t)}static default(){const t=r.message_default();return K.__wrap(t)}static new(t,e,i){var n=b(t)?0:_(t,r.__wbindgen_malloc,r.__wbindgen_realloc),s=c;const o=A(e,r.__wbindgen_malloc),a=c,h=A(i,r.__wbindgen_malloc),u=c,f=r.message_new(n,s,o,a,h,u);return K.__wrap(f)}get_identifier(){try{const i=r.__wbindgen_add_to_stack_pointer(-16);r.message_get_identifier(i,this.ptr);var t=w()[i/4+0],e=w()[i/4+1];return d(t,e)}finally{r.__wbindgen_add_to_stack_pointer(16),r.__wbindgen_free(t,e)}}get_public_payload(){return a(r.message_get_public_payload(this.ptr))}get_masked_payload(){return a(r.message_get_masked_payload(this.ptr))}}class F{static __wrap(t){const e=Object.create(F.prototype);return e.ptr=t,e}__destroy_into_raw(){const t=this.ptr;return this.ptr=0,t}free(){const t=this.__destroy_into_raw();r.__wbg_messagebuilder_free(t)}static new(t){k(t,j);var e=t.ptr;t.ptr=0;const i=r.messagebuilder_new(e);return F.__wrap(i)}index(t){try{const n=r.__wbindgen_add_to_stack_pointer(-16),s=A(t,r.__wbindgen_malloc),o=c;r.messagebuilder_index(n,this.ptr,s,o);var e=w()[n/4+0],i=w()[n/4+1];if(w()[n/4+2])throw a(i);return F.__wrap(e)}finally{r.__wbindgen_add_to_stack_pointer(16)}}data(t){try{const n=r.__wbindgen_add_to_stack_pointer(-16),s=A(t,r.__wbindgen_malloc),o=c;r.messagebuilder_data(n,this.ptr,s,o);var e=w()[n/4+0],i=w()[n/4+1];if(w()[n/4+2])throw a(i);return F.__wrap(e)}finally{r.__wbindgen_add_to_stack_pointer(16)}}seed(t){try{const n=r.__wbindgen_add_to_stack_pointer(-16),s=_(t,r.__wbindgen_malloc,r.__wbindgen_realloc),o=c;r.messagebuilder_seed(n,this.ptr,s,o);var e=w()[n/4+0],i=w()[n/4+1];if(w()[n/4+2])throw a(i);return F.__wrap(e)}finally{r.__wbindgen_add_to_stack_pointer(16)}}accountIndex(t){try{const n=r.__wbindgen_add_to_stack_pointer(-16);r.messagebuilder_accountIndex(n,this.ptr,t);var e=w()[n/4+0],i=w()[n/4+1];if(w()[n/4+2])throw a(i);return F.__wrap(e)}finally{r.__wbindgen_add_to_stack_pointer(16)}}initialAddressIndex(t){try{const n=r.__wbindgen_add_to_stack_pointer(-16);r.messagebuilder_initialAddressIndex(n,this.ptr,t);var e=w()[n/4+0],i=w()[n/4+1];if(w()[n/4+2])throw a(i);return F.__wrap(e)}finally{r.__wbindgen_add_to_stack_pointer(16)}}parents(t){try{const n=r.__wbindgen_add_to_stack_pointer(-16);r.messagebuilder_parents(n,this.ptr,l(t));var e=w()[n/4+0],i=w()[n/4+1];if(w()[n/4+2])throw a(i);return F.__wrap(e)}finally{r.__wbindgen_add_to_stack_pointer(16)}}input(t){try{const n=r.__wbindgen_add_to_stack_pointer(-16),s=_(t,r.__wbindgen_malloc,r.__wbindgen_realloc),o=c;r.messagebuilder_input(n,this.ptr,s,o);var e=w()[n/4+0],i=w()[n/4+1];if(w()[n/4+2])throw a(i);return F.__wrap(e)}finally{r.__wbindgen_add_to_stack_pointer(16)}}inputRange(t,e){try{const s=r.__wbindgen_add_to_stack_pointer(-16);r.messagebuilder_inputRange(s,this.ptr,t,e);var i=w()[s/4+0],n=w()[s/4+1];if(w()[s/4+2])throw a(n);return F.__wrap(i)}finally{r.__wbindgen_add_to_stack_pointer(16)}}output(t,e){try{const s=r.__wbindgen_add_to_stack_pointer(-16),o=_(t,r.__wbindgen_malloc,r.__wbindgen_realloc),h=c;x[0]=e;const u=R[0],f=R[1];r.messagebuilder_output(s,this.ptr,o,h,u,f);var i=w()[s/4+0],n=w()[s/4+1];if(w()[s/4+2])throw a(n);return F.__wrap(i)}finally{r.__wbindgen_add_to_stack_pointer(16)}}dustAllowanceOutput(t,e){try{const s=r.__wbindgen_add_to_stack_pointer(-16),o=_(t,r.__wbindgen_malloc,r.__wbindgen_realloc),h=c;x[0]=e;const u=R[0],f=R[1];r.messagebuilder_dustAllowanceOutput(s,this.ptr,o,h,u,f);var i=w()[s/4+0],n=w()[s/4+1];if(w()[s/4+2])throw a(n);return F.__wrap(i)}finally{r.__wbindgen_add_to_stack_pointer(16)}}prepareTransaction(){try{const i=r.__wbindgen_add_to_stack_pointer(-16);r.messagebuilder_prepareTransaction(i,this.ptr);var t=w()[i/4+0],e=w()[i/4+1];if(w()[i/4+2])throw a(e);return a(t)}finally{r.__wbindgen_add_to_stack_pointer(16)}}signTransaction(t,e,i,n){try{const h=r.__wbindgen_add_to_stack_pointer(-16),u=_(e,r.__wbindgen_malloc,r.__wbindgen_realloc),f=c;r.messagebuilder_signTransaction(h,this.ptr,l(t),u,f,!b(i),b(i)?0:i,!b(n),b(n)?0:n);var s=w()[h/4+0],o=w()[h/4+1];if(w()[h/4+2])throw a(o);return a(s)}finally{r.__wbindgen_add_to_stack_pointer(16)}}finishMessage(t){try{const n=r.__wbindgen_add_to_stack_pointer(-16);r.messagebuilder_finishMessage(n,this.ptr,l(t));var e=w()[n/4+0],i=w()[n/4+1];if(w()[n/4+2])throw a(i);return a(e)}finally{r.__wbindgen_add_to_stack_pointer(16)}}submit(){try{const i=r.__wbindgen_add_to_stack_pointer(-16);r.messagebuilder_submit(i,this.ptr);var t=w()[i/4+0],e=w()[i/4+1];if(w()[i/4+2])throw a(e);return a(t)}finally{r.__wbindgen_add_to_stack_pointer(16)}}}class ${static __wrap(t){const e=Object.create($.prototype);return e.ptr=t,e}__destroy_into_raw(){const t=this.ptr;return this.ptr=0,t}free(){const t=this.__destroy_into_raw();r.__wbg_messagegetter_free(t)}static new(t){k(t,j);var e=t.ptr;t.ptr=0;const i=r.messagegetter_new(e);return $.__wrap(i)}index(t){try{const n=r.__wbindgen_add_to_stack_pointer(-16),s=A(t,r.__wbindgen_malloc),o=c;r.messagegetter_index(n,this.ptr,s,o);var e=w()[n/4+0],i=w()[n/4+1];if(w()[n/4+2])throw a(i);return a(e)}finally{r.__wbindgen_add_to_stack_pointer(16)}}data(t){try{const n=r.__wbindgen_add_to_stack_pointer(-16),s=_(t,r.__wbindgen_malloc,r.__wbindgen_realloc),o=c;r.messagegetter_data(n,this.ptr,s,o);var e=w()[n/4+0],i=w()[n/4+1];if(w()[n/4+2])throw a(i);return a(e)}finally{r.__wbindgen_add_to_stack_pointer(16)}}raw(t){try{const n=r.__wbindgen_add_to_stack_pointer(-16),s=_(t,r.__wbindgen_malloc,r.__wbindgen_realloc),o=c;r.messagegetter_raw(n,this.ptr,s,o);var e=w()[n/4+0],i=w()[n/4+1];if(w()[n/4+2])throw a(i);return a(e)}finally{r.__wbindgen_add_to_stack_pointer(16)}}children(t){try{const n=r.__wbindgen_add_to_stack_pointer(-16),s=_(t,r.__wbindgen_malloc,r.__wbindgen_realloc),o=c;r.messagegetter_children(n,this.ptr,s,o);var e=w()[n/4+0],i=w()[n/4+1];if(w()[n/4+2])throw a(i);return a(e)}finally{r.__wbindgen_add_to_stack_pointer(16)}}metadata(t){try{const n=r.__wbindgen_add_to_stack_pointer(-16),s=_(t,r.__wbindgen_malloc,r.__wbindgen_realloc),o=c;r.messagegetter_metadata(n,this.ptr,s,o);var e=w()[n/4+0],i=w()[n/4+1];if(w()[n/4+2])throw a(i);return a(e)}finally{r.__wbindgen_add_to_stack_pointer(16)}}}class X{static __wrap(t){const e=Object.create(X.prototype);return e.ptr=t,e}__destroy_into_raw(){const t=this.ptr;return this.ptr=0,t}free(){const t=this.__destroy_into_raw();r.__wbg_messagemetadata_free(t)}get is_solid(){return 0!==r.__wbg_get_messagemetadata_is_solid(this.ptr)}set is_solid(t){r.__wbg_set_messagemetadata_is_solid(this.ptr,t)}get referenced_by_milestone_index(){try{const i=r.__wbindgen_add_to_stack_pointer(-16);r.__wbg_get_messagemetadata_referenced_by_milestone_index(i,this.ptr);var t=w()[i/4+0],e=w()[i/4+1];return 0===t?void 0:e>>>0}finally{r.__wbindgen_add_to_stack_pointer(16)}}set referenced_by_milestone_index(t){r.__wbg_set_messagemetadata_referenced_by_milestone_index(this.ptr,!b(t),b(t)?0:t)}get milestone_index(){try{const i=r.__wbindgen_add_to_stack_pointer(-16);r.__wbg_get_messagemetadata_milestone_index(i,this.ptr);var t=w()[i/4+0],e=w()[i/4+1];return 0===t?void 0:e>>>0}finally{r.__wbindgen_add_to_stack_pointer(16)}}set milestone_index(t){r.__wbg_set_messagemetadata_milestone_index(this.ptr,!b(t),b(t)?0:t)}get ledger_inclusion_state(){const t=r.__wbg_get_messagemetadata_ledger_inclusion_state(this.ptr);return 3===t?void 0:t}set ledger_inclusion_state(t){r.__wbg_set_messagemetadata_ledger_inclusion_state(this.ptr,b(t)?3:t)}get conflict_reason(){const t=r.__wbg_get_messagemetadata_conflict_reason(this.ptr);return 16777215===t?void 0:t}set conflict_reason(t){r.__wbg_set_messagemetadata_conflict_reason(this.ptr,b(t)?16777215:t)}get should_promote(){const t=r.__wbg_get_messagemetadata_should_promote(this.ptr);return 16777215===t?void 0:0!==t}set should_promote(t){r.__wbg_set_messagemetadata_should_promote(this.ptr,b(t)?16777215:t?1:0)}get should_reattach(){const t=r.__wbg_get_messagemetadata_should_reattach(this.ptr);return 16777215===t?void 0:0!==t}set should_reattach(t){r.__wbg_set_messagemetadata_should_reattach(this.ptr,b(t)?16777215:t?1:0)}get message_id(){try{const i=r.__wbindgen_add_to_stack_pointer(-16);r.messagemetadata_message_id(i,this.ptr);var t=w()[i/4+0],e=w()[i/4+1];return d(t,e)}finally{r.__wbindgen_add_to_stack_pointer(16),r.__wbindgen_free(t,e)}}get get_parent_message_ids(){return a(r.messagemetadata_get_parent_message_ids(this.ptr))}}class J{static __wrap(t){const e=Object.create(J.prototype);return e.ptr=t,e}__destroy_into_raw(){const t=this.ptr;return this.ptr=0,t}free(){const t=this.__destroy_into_raw();r.__wbg_milestoneresponse_free(t)}get index(){return r.__wbg_get_milestoneresponse_index(this.ptr)>>>0}set index(t){r.__wbg_set_milestoneresponse_index(this.ptr,t)}get timestamp(){try{const i=r.__wbindgen_add_to_stack_pointer(-16);r.__wbg_get_milestoneresponse_timestamp(i,this.ptr);var t=w()[i/4+0],e=w()[i/4+1];return R[0]=t,R[1]=e,x[0]}finally{r.__wbindgen_add_to_stack_pointer(16)}}set timestamp(t){x[0]=t;const e=R[0],i=R[1];r.__wbg_set_milestoneresponse_timestamp(this.ptr,e,i)}get message_id(){try{const i=r.__wbindgen_add_to_stack_pointer(-16);r.milestoneresponse_message_id(i,this.ptr);var t=w()[i/4+0],e=w()[i/4+1];return d(t,e)}finally{r.__wbindgen_add_to_stack_pointer(16),r.__wbindgen_free(t,e)}}}class G{static __wrap(t){const e=Object.create(G.prototype);return e.ptr=t,e}__destroy_into_raw(){const t=this.ptr;return this.ptr=0,t}free(){const t=this.__destroy_into_raw();r.__wbg_msgid_free(t)}bytes(){try{const n=r.__wbindgen_add_to_stack_pointer(-16);r.msgid_bytes(n,this.ptr);var t=w()[n/4+0],e=w()[n/4+1],i=E(t,e).slice();return r.__wbindgen_free(t,1*e),i}finally{r.__wbindgen_add_to_stack_pointer(16)}}hex(){try{const i=r.__wbindgen_add_to_stack_pointer(-16);r.msgid_hex(i,this.ptr);var t=w()[i/4+0],e=w()[i/4+1];return d(t,e)}finally{r.__wbindgen_add_to_stack_pointer(16),r.__wbindgen_free(t,e)}}toString(){try{const i=r.__wbindgen_add_to_stack_pointer(-16);r.msgid_toString(i,this.ptr);var t=w()[i/4+0],e=w()[i/4+1];return d(t,e)}finally{r.__wbindgen_add_to_stack_pointer(16),r.__wbindgen_free(t,e)}}static parse(t){try{const n=r.__wbindgen_add_to_stack_pointer(-16),s=_(t,r.__wbindgen_malloc,r.__wbindgen_realloc),o=c;r.msgid_parse(n,s,o);var e=w()[n/4+0],i=w()[n/4+1];if(w()[n/4+2])throw a(i);return G.__wrap(e)}finally{r.__wbindgen_add_to_stack_pointer(16)}}copy(){const t=r.msgid_copy(this.ptr);return G.__wrap(t)}}class Y{static __wrap(t){const e=Object.create(Y.prototype);return e.ptr=t,e}__destroy_into_raw(){const t=this.ptr;return this.ptr=0,t}free(){const t=this.__destroy_into_raw();r.__wbg_nextmsgaddress_free(t)}get identifier(){try{const i=r.__wbindgen_add_to_stack_pointer(-16);r.__wbg_get_nextmsgaddress_identifier(i,this.ptr);var t=w()[i/4+0],e=w()[i/4+1];return d(t,e)}finally{r.__wbindgen_add_to_stack_pointer(16),r.__wbindgen_free(t,e)}}set identifier(t){const e=_(t,r.__wbindgen_malloc,r.__wbindgen_realloc),i=c;r.__wbg_set_nextmsgaddress_identifier(this.ptr,e,i)}get address(){const t=r.__wbg_get_nextmsgaddress_address(this.ptr);return O.__wrap(t)}set address(t){k(t,O);var e=t.ptr;t.ptr=0,r.__wbg_set_nextmsgaddress_address(this.ptr,e)}static new(t,e){const i=_(t,r.__wbindgen_malloc,r.__wbindgen_realloc),n=c;k(e,O);var s=e.ptr;e.ptr=0;const o=r.nextmsgaddress_new(i,n,s);return Y.__wrap(o)}}class V{static __wrap(t){const e=Object.create(V.prototype);return e.ptr=t,e}__destroy_into_raw(){const t=this.ptr;return this.ptr=0,t}free(){const t=this.__destroy_into_raw();r.__wbg_pskids_free(t)}static new(){const t=r.pskids_new();return V.__wrap(t)}add(t){try{const i=r.__wbindgen_add_to_stack_pointer(-16),n=_(t,r.__wbindgen_malloc,r.__wbindgen_realloc),s=c;r.pskids_add(i,this.ptr,n,s);var e=w()[i/4+0];if(w()[i/4+1])throw a(e)}finally{r.__wbindgen_add_to_stack_pointer(16)}}get_ids(){return a(r.pskids_get_ids(this.ptr))}}class W{static __wrap(t){const e=Object.create(W.prototype);return e.ptr=t,e}__destroy_into_raw(){const t=this.ptr;return this.ptr=0,t}free(){const t=this.__destroy_into_raw();r.__wbg_publickeys_free(t)}constructor(){const t=r.publickeys_new();return W.__wrap(t)}add(t){try{const i=r.__wbindgen_add_to_stack_pointer(-16),n=_(t,r.__wbindgen_malloc,r.__wbindgen_realloc),s=c;r.publickeys_add(i,this.ptr,n,s);var e=w()[i/4+0];if(w()[i/4+1])throw a(e)}finally{r.__wbindgen_add_to_stack_pointer(16)}}get_pks(){return a(r.publickeys_get_pks(this.ptr))}}class Q{static __wrap(t){const e=Object.create(Q.prototype);return e.ptr=t,e}__destroy_into_raw(){const t=this.ptr;return this.ptr=0,t}free(){const t=this.__destroy_into_raw();r.__wbg_sendoptions_free(t)}get local_pow(){return 0!==r.__wbg_get_sendoptions_local_pow(this.ptr)}set local_pow(t){r.__wbg_set_sendoptions_local_pow(this.ptr,t)}constructor(t,e){const i=_(t,r.__wbindgen_malloc,r.__wbindgen_realloc),n=c,s=r.sendoptions_new(i,n,e);return Q.__wrap(s)}set url(t){const e=_(t,r.__wbindgen_malloc,r.__wbindgen_realloc),i=c;r.sendoptions_set_url(this.ptr,e,i)}get url(){try{const i=r.__wbindgen_add_to_stack_pointer(-16);r.messagemetadata_message_id(i,this.ptr);var t=w()[i/4+0],e=w()[i/4+1];return d(t,e)}finally{r.__wbindgen_add_to_stack_pointer(16),r.__wbindgen_free(t,e)}}clone(){const t=r.sendoptions_clone(this.ptr);return Q.__wrap(t)}}class tt{static __wrap(t){const e=Object.create(tt.prototype);return e.ptr=t,e}__destroy_into_raw(){const t=this.ptr;return this.ptr=0,t}free(){const t=this.__destroy_into_raw();r.__wbg_streamsclient_free(t)}constructor(t,e){const i=_(t,r.__wbindgen_malloc,r.__wbindgen_realloc),n=c;k(e,Q);var s=e.ptr;e.ptr=0;const o=r.streamsclient_new(i,n,s);return tt.__wrap(o)}static fromClient(t){k(t,j);const e=r.streamsclient_fromClient(t.ptr);return tt.__wrap(e)}get_link_details(t){const e=this.__destroy_into_raw();return k(t,O),a(r.streamsclient_get_link_details(e,t.ptr))}}class et{static __wrap(t){const e=Object.create(et.prototype);return e.ptr=t,e}__destroy_into_raw(){const t=this.ptr;return this.ptr=0,t}free(){const t=this.__destroy_into_raw();r.__wbg_subscriber_free(t)}constructor(t,e){const i=_(t,r.__wbindgen_malloc,r.__wbindgen_realloc),n=c;k(e,Q);var s=e.ptr;e.ptr=0;const o=r.subscriber_new(i,n,s);return et.__wrap(o)}static fromClient(t,e){k(t,tt);var i=t.ptr;t.ptr=0;const n=_(e,r.__wbindgen_malloc,r.__wbindgen_realloc),s=c,o=r.subscriber_fromClient(i,n,s);return et.__wrap(o)}static import(t,e,i){try{const h=r.__wbindgen_add_to_stack_pointer(-16);k(t,tt);var n=t.ptr;t.ptr=0;const u=A(e,r.__wbindgen_malloc),f=c,d=_(i,r.__wbindgen_malloc,r.__wbindgen_realloc),l=c;r.subscriber_import(h,n,u,f,d,l);var s=w()[h/4+0],o=w()[h/4+1];if(w()[h/4+2])throw a(o);return et.__wrap(s)}finally{r.__wbindgen_add_to_stack_pointer(16)}}clone(){const t=r.subscriber_clone(this.ptr);return et.__wrap(t)}channel_address(){try{const h=r.__wbindgen_add_to_stack_pointer(-16);r.subscriber_channel_address(h,this.ptr);var t=w()[h/4+0],e=w()[h/4+1],i=w()[h/4+2],n=w()[h/4+3],s=t,o=e;if(n)throw s=0,o=0,a(i);return d(s,o)}finally{r.__wbindgen_add_to_stack_pointer(16),r.__wbindgen_free(s,o)}}announcementLink(){try{const i=r.__wbindgen_add_to_stack_pointer(-16);r.subscriber_announcementLink(i,this.ptr);var t=w()[i/4+0],e=w()[i/4+1];let n;return 0!==t&&(n=d(t,e).slice(),r.__wbindgen_free(t,1*e)),n}finally{r.__wbindgen_add_to_stack_pointer(16)}}get_client(){const t=r.subscriber_get_client(this.ptr);return tt.__wrap(t)}is_multi_branching(){try{const i=r.__wbindgen_add_to_stack_pointer(-16);r.subscriber_is_multi_branching(i,this.ptr);var t=w()[i/4+0],e=w()[i/4+1];if(w()[i/4+2])throw a(e);return 0!==t}finally{r.__wbindgen_add_to_stack_pointer(16)}}store_psk(t){try{const u=r.__wbindgen_add_to_stack_pointer(-16),f=_(t,r.__wbindgen_malloc,r.__wbindgen_realloc),l=c;r.subscriber_store_psk(u,this.ptr,f,l);var e=w()[u/4+0],i=w()[u/4+1],n=w()[u/4+2],s=w()[u/4+3],o=e,h=i;if(s)throw o=0,h=0,a(n);return d(o,h)}finally{r.__wbindgen_add_to_stack_pointer(16),r.__wbindgen_free(o,h)}}get_public_key(){try{const h=r.__wbindgen_add_to_stack_pointer(-16);r.subscriber_get_public_key(h,this.ptr);var t=w()[h/4+0],e=w()[h/4+1],i=w()[h/4+2],n=w()[h/4+3],s=t,o=e;if(n)throw s=0,o=0,a(i);return d(s,o)}finally{r.__wbindgen_add_to_stack_pointer(16),r.__wbindgen_free(s,o)}}author_public_key(){try{const h=r.__wbindgen_add_to_stack_pointer(-16);r.subscriber_author_public_key(h,this.ptr);var t=w()[h/4+0],e=w()[h/4+1],i=w()[h/4+2],n=w()[h/4+3],s=t,o=e;if(n)throw s=0,o=0,a(i);return d(s,o)}finally{r.__wbindgen_add_to_stack_pointer(16),r.__wbindgen_free(s,o)}}is_registered(){try{const i=r.__wbindgen_add_to_stack_pointer(-16);r.subscriber_is_registered(i,this.ptr);var t=w()[i/4+0],e=w()[i/4+1];if(w()[i/4+2])throw a(e);return 0!==t}finally{r.__wbindgen_add_to_stack_pointer(16)}}unregister(){try{const e=r.__wbindgen_add_to_stack_pointer(-16);r.subscriber_unregister(e,this.ptr);var t=w()[e/4+0];if(w()[e/4+1])throw a(t)}finally{r.__wbindgen_add_to_stack_pointer(16)}}export(t){try{const o=r.__wbindgen_add_to_stack_pointer(-16),h=_(t,r.__wbindgen_malloc,r.__wbindgen_realloc),u=c;r.subscriber_export(o,this.ptr,h,u);var e=w()[o/4+0],i=w()[o/4+1],n=w()[o/4+2];if(w()[o/4+3])throw a(n);var s=E(e,i).slice();return r.__wbindgen_free(e,1*i),s}finally{r.__wbindgen_add_to_stack_pointer(16)}}receive_announcement(t){const e=this.__destroy_into_raw();k(t,O);var i=t.ptr;return t.ptr=0,a(r.subscriber_receive_announcement(e,i))}receive_keylo