@meshsdk/core 1.6.0-alpha.1 → 1.6.0-alpha.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/core.cjs +14 -14
- package/dist/core.js +3550 -3466
- package/package.json +1 -1
- package/dist/common/data/index.d.ts +0 -2
- package/dist/common/data/mesh.d.ts +0 -8
- package/dist/common/data/plutus.d.ts +0 -72
package/dist/core.cjs
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const Yn=require("nanoid"),Oa=require("axios"),tn=require("bip39"),jt=require("@emurgo/cardano-message-signing-nodejs"),Da=c=>c&&typeof c=="object"&&"default"in c?c:{default:c},Ve=Da(Oa),Ta=(c,d)=>({alternative:c,fields:d}),pr=c=>({alternative:0,fields:c}),Gn=c=>({alternative:1,fields:c}),Na=c=>({alternative:2,fields:c}),cn=c=>c===""?Gn([]):pr([pr([pr([c])])]),Ua=(c,d)=>pr([{alternative:0,fields:[c]},cn(d||"")]),Pa=(c,d)=>pr([{alternative:1,fields:[c]},cn(d||"")]),Yr=(c,d)=>({constructor:c,fields:d}),y_=c=>Yr(0,c),Gr=c=>Yr(1,c),Fa=c=>Yr(2,c),Ma=c=>c?Gr([]):y_([]),Oe=c=>({bytes:c}),pn=c=>({int:c}),Ka=c=>({list:c}),wn=c=>Oe(c),ln=c=>Oe(c),gn=c=>c===""?Gr([]):y_([y_([y_([Oe(c)])])]),Ha=(c,d)=>y_([y_([Oe(c)]),gn(d||"")]),qa=(c,d)=>y_([Gr([Oe(c)]),gn(d||"")]),Ra=(c,d)=>y_([wn(c),ln(d)]),za=(c,d)=>y_([y_([Oe(c)]),pn(d)]),Va=c=>Oe(c),La=c=>Oe(c),Ya=c=>({int:c}),_n=c=>({map:c.map(([d,t])=>({k:d,v:t}))}),Ga=c=>({map:c.map(([d,t])=>({k:d,v:t}))}),$a=(c,d)=>y_([c,d]),Ja=c=>{const d=[],t={};return c.forEach(w=>{const b=w.unit.replace("lovelace",""),h=b.slice(0,56)||"",k=b.slice(56)||"";t[h]||(t[h]={}),t[h][k]?t[h][k]+=Number(w.quantity):t[h][k]=Number(w.quantity)}),Object.keys(t).forEach(w=>{const b=wn(w),h=Object.keys(t[w]).map(j=>[ln(j),pn(t[w][j])]),k=_n(h);d.push([b,k])}),_n(d)},Wa=c=>{const d=[];return c.map.forEach(t=>{const w=t.k.bytes;t.v.map.forEach(b=>{const h=b.k.bytes,k=b.v.int.toString(),j=w+h,P=j===""?"lovelace":j;d.push({unit:P,quantity:k})})}),d};var qr=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Xa(c){var d=c.default;if(typeof d=="function"){var t=function(){return d.apply(this,arguments)};t.prototype=d.prototype}else t={};return Object.defineProperty(t,"__esModule",{value:!0}),Object.keys(c).forEach(function(w){var b=Object.getOwnPropertyDescriptor(c,w);Object.defineProperty(t,w,b.get?b:{enumerable:!0,get:function(){return c[w]}})}),t}function en(c){throw new Error('Could not dynamically require "'+c+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var y={exports:{}},$n={},Za=function(d){return d&&typeof d=="object"&&typeof d.copy=="function"&&typeof d.fill=="function"&&typeof d.readUInt8=="function"},rn={exports:{}};typeof Object.create=="function"?rn.exports=function(d,t){d.super_=t,d.prototype=Object.create(t.prototype,{constructor:{value:d,enumerable:!1,writable:!0,configurable:!0}})}:rn.exports=function(d,t){d.super_=t;var w=function(){};w.prototype=t.prototype,d.prototype=new w,d.prototype.constructor=d};(function(c){var d=Object.getOwnPropertyDescriptors||function(R){for(var L=Object.keys(R),I={},wt=0;wt<L.length;wt++)I[L[wt]]=Object.getOwnPropertyDescriptor(R,L[wt]);return I},t=/%[sdj%]/g;c.format=function(K){if(!yt(K)){for(var R=[],L=0;L<arguments.length;L++)R.push(h(arguments[L]));return R.join(" ")}for(var L=1,I=arguments,wt=I.length,ut=String(K).replace(t,function(et){if(et==="%%")return"%";if(L>=wt)return et;switch(et){case"%s":return String(I[L++]);case"%d":return Number(I[L++]);case"%j":try{return JSON.stringify(I[L++])}catch{return"[Circular]"}default:return et}}),st=I[L];L<wt;st=I[++L])X(st)||!D(st)?ut+=" "+st:ut+=" "+h(st);return ut},c.deprecate=function(K,R){if(typeof process<"u"&&process.noDeprecation===!0)return K;if(typeof process>"u")return function(){return c.deprecate(K,R).apply(this,arguments)};var L=!1;function I(){if(!L){if(process.throwDeprecation)throw new Error(R);process.traceDeprecation?console.trace(R):console.error(R),L=!0}return K.apply(this,arguments)}return I};var w={},b;c.debuglog=function(K){if(_t(b)&&(b=process.env.NODE_DEBUG||""),K=K.toUpperCase(),!w[K])if(new RegExp("\\b"+K+"\\b","i").test(b)){var R=process.pid;w[K]=function(){var L=c.format.apply(c,arguments);console.error("%s %d: %s",K,R,L)}}else w[K]=function(){};return w[K]};function h(K,R){var L={seen:[],stylize:j};return arguments.length>=3&&(L.depth=arguments[2]),arguments.length>=4&&(L.colors=arguments[3]),tt(R)?L.showHidden=R:R&&c._extend(L,R),_t(L.showHidden)&&(L.showHidden=!1),_t(L.depth)&&(L.depth=2),_t(L.colors)&&(L.colors=!1),_t(L.customInspect)&&(L.customInspect=!0),L.colors&&(L.stylize=k),p(L,K,L.depth)}c.inspect=h,h.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},h.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};function k(K,R){var L=h.styles[R];return L?"\x1B["+h.colors[L][0]+"m"+K+"\x1B["+h.colors[L][1]+"m":K}function j(K,R){return K}function P(K){var R={};return K.forEach(function(L,I){R[L]=!0}),R}function p(K,R,L){if(K.customInspect&&R&&ct(R.inspect)&&R.inspect!==c.inspect&&!(R.constructor&&R.constructor.prototype===R)){var I=R.inspect(L,K);return yt(I)||(I=p(K,I,L)),I}var wt=z(K,R);if(wt)return wt;var ut=Object.keys(R),st=P(ut);if(K.showHidden&&(ut=Object.getOwnPropertyNames(R)),J(R)&&(ut.indexOf("message")>=0||ut.indexOf("description")>=0))return Y(R);if(ut.length===0){if(ct(R)){var et=R.name?": "+R.name:"";return K.stylize("[Function"+et+"]","special")}if(g(R))return K.stylize(RegExp.prototype.toString.call(R),"regexp");if(Q(R))return K.stylize(Date.prototype.toString.call(R),"date");if(J(R))return Y(R)}var ot="",x=!1,A=["{","}"];if(u(R)&&(x=!0,A=["[","]"]),ct(R)){var B=R.name?": "+R.name:"";ot=" [Function"+B+"]"}if(g(R)&&(ot=" "+RegExp.prototype.toString.call(R)),Q(R)&&(ot=" "+Date.prototype.toUTCString.call(R)),J(R)&&(ot=" "+Y(R)),ut.length===0&&(!x||R.length==0))return A[0]+ot+A[1];if(L<0)return g(R)?K.stylize(RegExp.prototype.toString.call(R),"regexp"):K.stylize("[Object]","special");K.seen.push(R);var N;return x?N=q(K,R,L,st,ut):N=ut.map(function(S){return m(K,R,L,st,S,x)}),K.seen.pop(),G(N,ot,A)}function z(K,R){if(_t(R))return K.stylize("undefined","undefined");if(yt(R)){var L="'"+JSON.stringify(R).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return K.stylize(L,"string")}if(nt(R))return K.stylize(""+R,"number");if(tt(R))return K.stylize(""+R,"boolean");if(X(R))return K.stylize("null","null")}function Y(K){return"["+Error.prototype.toString.call(K)+"]"}function q(K,R,L,I,wt){for(var ut=[],st=0,et=R.length;st<et;++st)Ut(R,String(st))?ut.push(m(K,R,L,I,String(st),!0)):ut.push("");return wt.forEach(function(ot){ot.match(/^\d+$/)||ut.push(m(K,R,L,I,ot,!0))}),ut}function m(K,R,L,I,wt,ut){var st,et,ot;if(ot=Object.getOwnPropertyDescriptor(R,wt)||{value:R[wt]},ot.get?ot.set?et=K.stylize("[Getter/Setter]","special"):et=K.stylize("[Getter]","special"):ot.set&&(et=K.stylize("[Setter]","special")),Ut(I,wt)||(st="["+wt+"]"),et||(K.seen.indexOf(ot.value)<0?(X(L)?et=p(K,ot.value,null):et=p(K,ot.value,L-1),et.indexOf(`
|
|
2
2
|
`)>-1&&(ut?et=et.split(`
|
|
3
|
-
`).map(function(
|
|
3
|
+
`).map(function(x){return" "+x}).join(`
|
|
4
4
|
`).substr(2):et=`
|
|
5
5
|
`+et.split(`
|
|
6
|
-
`).map(function(
|
|
7
|
-
`))):et=K.stylize("[Circular]","special")),_t(st)){if(ut&&wt.match(/^\d+$/))return et;st=JSON.stringify(""+wt),st.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(st=st.substr(1,st.length-2),st=K.stylize(st,"name")):(st=st.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),st=K.stylize(st,"string"))}return st+": "+et}function G(K,R,
|
|
8
|
-
`)>=0,wt+ut.replace(/\u001b\[\d\d?m/g,"").length+1},0);return I>60?
|
|
6
|
+
`).map(function(x){return" "+x}).join(`
|
|
7
|
+
`))):et=K.stylize("[Circular]","special")),_t(st)){if(ut&&wt.match(/^\d+$/))return et;st=JSON.stringify(""+wt),st.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(st=st.substr(1,st.length-2),st=K.stylize(st,"name")):(st=st.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),st=K.stylize(st,"string"))}return st+": "+et}function G(K,R,L){var I=K.reduce(function(wt,ut){return ut.indexOf(`
|
|
8
|
+
`)>=0,wt+ut.replace(/\u001b\[\d\d?m/g,"").length+1},0);return I>60?L[0]+(R===""?"":R+`
|
|
9
9
|
`)+" "+K.join(`,
|
|
10
|
-
`)+" "+
|
|
11
|
-
${C.stack}`:s}p.exports.script_to_address=function(C,_,e){let s,n;try{const l=t.__wbindgen_add_to_stack_pointer(-16),H=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),rt=b;var r=nt(e)?0:v(e,t.__wbindgen_malloc,t.__wbindgen_realloc),i=b;t.script_to_address(l,C,H,rt,r,i);var o=a()[l/4+0],f=a()[l/4+1];return s=o,n=f,m(o,f)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(s,n,1)}},p.exports.serialize_bech32_address=function(C){const _=v(C,t.__wbindgen_malloc,t.__wbindgen_realloc),e=b,s=t.serialize_bech32_address(_,e);return fr.__wrap(s)};function g(C,_){if(!(C instanceof _))throw new Error(`expected instance of ${_.name}`);return C.ptr}p.exports.apply_params_to_script=function(C,_){let e,s;try{const rt=t.__wbindgen_add_to_stack_pointer(-16);g(C,Ze);var n=C.__destroy_into_raw();const dt=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),Je=b;t.apply_params_to_script(rt,n,dt,Je);var r=a()[rt/4+0],i=a()[rt/4+1],o=a()[rt/4+2],f=a()[rt/4+3],l=r,H=i;if(f)throw l=0,H=0,c(o);return e=l,s=H,m(l,H)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(e,s,1)}},p.exports.get_v2_script_hash=function(C){let _,e;try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(C,t.__wbindgen_malloc,t.__wbindgen_realloc),o=b;t.get_v2_script_hash(r,i,o);var s=a()[r/4+0],n=a()[r/4+1];return _=s,e=n,m(s,n)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}},p.exports.calculate_tx_hash=function(C){let _,e;try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(C,t.__wbindgen_malloc,t.__wbindgen_realloc),o=b;t.calculate_tx_hash(r,i,o);var s=a()[r/4+0],n=a()[r/4+1];return _=s,e=n,m(s,n)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}},p.exports.sign_transaction=function(C,_){let e,s;try{const o=t.__wbindgen_add_to_stack_pointer(-16),f=v(C,t.__wbindgen_malloc,t.__wbindgen_realloc),l=b;g(_,Ze);var n=_.__destroy_into_raw();t.sign_transaction(o,f,l,n);var r=a()[o/4+0],i=a()[o/4+1];return e=r,s=i,m(r,i)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(e,s,1)}};function D(C,_){return C=C>>>0,q().subarray(C/1,C/1+_)}function Q(C,_){const e=_(C.length*1,1)>>>0;return q().set(C,e/1),b=C.length,e}p.exports.encrypt_with_password=function(C,_,e,s){let n,r;try{const dt=t.__wbindgen_add_to_stack_pointer(-16),Je=v(C,t.__wbindgen_malloc,t.__wbindgen_realloc),hr=b,ga=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),ba=b,ua=v(e,t.__wbindgen_malloc,t.__wbindgen_realloc),fa=b,ha=v(s,t.__wbindgen_malloc,t.__wbindgen_realloc),ya=b;t.encrypt_with_password(dt,Je,hr,ga,ba,ua,fa,ha,ya);var i=a()[dt/4+0],o=a()[dt/4+1],f=a()[dt/4+2],l=a()[dt/4+3],H=i,rt=o;if(l)throw H=0,rt=0,c(f);return n=H,r=rt,m(H,rt)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(n,r,1)}},p.exports.decrypt_with_password=function(C,_){let e,s;try{const H=t.__wbindgen_add_to_stack_pointer(-16),rt=v(C,t.__wbindgen_malloc,t.__wbindgen_realloc),dt=b,Je=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),hr=b;t.decrypt_with_password(H,rt,dt,Je,hr);var n=a()[H/4+0],r=a()[H/4+1],i=a()[H/4+2],o=a()[H/4+3],f=n,l=r;if(o)throw f=0,l=0,c(i);return e=f,s=l,m(f,l)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(e,s,1)}},p.exports.min_fee=function(C,_){try{const r=t.__wbindgen_add_to_stack_pointer(-16);g(C,b_),g(_,_r),t.min_fee(r,C.__wbg_ptr,_.__wbg_ptr);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw c(s);return I.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}},p.exports.calculate_ex_units_ceil_cost=function(C,_){try{const r=t.__wbindgen_add_to_stack_pointer(-16);g(C,at),g(_,vt),t.calculate_ex_units_ceil_cost(r,C.__wbg_ptr,_.__wbg_ptr);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw c(s);return I.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}},p.exports.min_script_fee=function(C,_){try{const r=t.__wbindgen_add_to_stack_pointer(-16);g(C,b_),g(_,vt),t.min_script_fee(r,C.__wbg_ptr,_.__wbg_ptr);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw c(s);return I.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}},p.exports.encode_arbitrary_bytes_as_metadatum=function(C){const _=Q(C,t.__wbindgen_malloc),e=b,s=t.encode_arbitrary_bytes_as_metadatum(_,e);return mt.__wrap(s)},p.exports.decode_arbitrary_bytes_from_metadatum=function(C){try{const i=t.__wbindgen_add_to_stack_pointer(-16);g(C,mt),t.decode_arbitrary_bytes_from_metadatum(i,C.__wbg_ptr);var _=a()[i/4+0],e=a()[i/4+1],s=a()[i/4+2],n=a()[i/4+3];if(n)throw c(s);var r=D(_,e).slice();return t.__wbindgen_free(_,e*1),r}finally{t.__wbindgen_add_to_stack_pointer(16)}},p.exports.encode_json_str_to_metadatum=function(C,_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(C,t.__wbindgen_malloc,t.__wbindgen_realloc),o=b;t.encode_json_str_to_metadatum(r,i,o,_);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw c(s);return mt.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}},p.exports.decode_metadatum_to_json_str=function(C,_){let e,s;try{const H=t.__wbindgen_add_to_stack_pointer(-16);g(C,mt),t.decode_metadatum_to_json_str(H,C.__wbg_ptr,_);var n=a()[H/4+0],r=a()[H/4+1],i=a()[H/4+2],o=a()[H/4+3],f=n,l=r;if(o)throw f=0,l=0,c(i);return e=f,s=l,m(f,l)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(e,s,1)}},p.exports.encode_json_str_to_plutus_datum=function(C,_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(C,t.__wbindgen_malloc,t.__wbindgen_realloc),o=b;t.encode_json_str_to_plutus_datum(r,i,o,_);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw c(s);return ht.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}},p.exports.decode_plutus_datum_to_json_str=function(C,_){let e,s;try{const H=t.__wbindgen_add_to_stack_pointer(-16);g(C,ht),t.decode_plutus_datum_to_json_str(H,C.__wbg_ptr,_);var n=a()[H/4+0],r=a()[H/4+1],i=a()[H/4+2],o=a()[H/4+3],f=n,l=r;if(o)throw f=0,l=0,c(i);return e=f,s=l,m(f,l)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(e,s,1)}},p.exports.create_send_all=function(C,_,e){try{const i=t.__wbindgen_add_to_stack_pointer(-16);g(C,pt),g(_,$e),g(e,nr),t.create_send_all(i,C.__wbg_ptr,_.__wbg_ptr,e.__wbg_ptr);var s=a()[i/4+0],n=a()[i/4+1],r=a()[i/4+2];if(r)throw c(n);return Br.__wrap(s)}finally{t.__wbindgen_add_to_stack_pointer(16)}};let J=null;function ct(){return(J===null||J.byteLength===0)&&(J=new Uint32Array(t.memory.buffer)),J}function bt(C,_){return C=C>>>0,ct().subarray(C/4,C/4+_)}p.exports.make_daedalus_bootstrap_witness=function(C,_,e){g(C,u_),g(_,A),g(e,br);const s=t.make_daedalus_bootstrap_witness(C.__wbg_ptr,_.__wbg_ptr,e.__wbg_ptr);return ot.__wrap(s)},p.exports.make_icarus_bootstrap_witness=function(C,_,e){g(C,u_),g(_,A),g(e,wt);const s=t.make_icarus_bootstrap_witness(C.__wbg_ptr,_.__wbg_ptr,e.__wbg_ptr);return ot.__wrap(s)},p.exports.make_vkey_witness=function(C,_){g(C,u_),g(_,k_);const e=t.make_vkey_witness(C.__wbg_ptr,_.__wbg_ptr);return K_.__wrap(e)},p.exports.hash_auxiliary_data=function(C){g(C,Pt);const _=t.hash_auxiliary_data(C.__wbg_ptr);return qt.__wrap(_)},p.exports.hash_transaction=function(C){g(C,Wt);const _=t.hash_transaction(C.__wbg_ptr);return u_.__wrap(_)},p.exports.hash_plutus_data=function(C){g(C,ht);const _=t.hash_plutus_data(C.__wbg_ptr);return U.__wrap(_)},p.exports.hash_script_data=function(C,_,e){g(C,x_),g(_,F);let s=0;nt(e)||(g(e,n_),s=e.__destroy_into_raw());const n=t.hash_script_data(C.__wbg_ptr,_.__wbg_ptr,s);return N_.__wrap(n)},p.exports.get_implicit_input=function(C,_,e){try{const i=t.__wbindgen_add_to_stack_pointer(-16);g(C,Wt),g(_,I),g(e,I),t.get_implicit_input(i,C.__wbg_ptr,_.__wbg_ptr,e.__wbg_ptr);var s=a()[i/4+0],n=a()[i/4+1],r=a()[i/4+2];if(r)throw c(n);return gt.__wrap(s)}finally{t.__wbindgen_add_to_stack_pointer(16)}},p.exports.get_deposit=function(C,_,e){try{const i=t.__wbindgen_add_to_stack_pointer(-16);g(C,Wt),g(_,I),g(e,I),t.get_deposit(i,C.__wbg_ptr,_.__wbg_ptr,e.__wbg_ptr);var s=a()[i/4+0],n=a()[i/4+1],r=a()[i/4+2];if(r)throw c(n);return I.__wrap(s)}finally{t.__wbindgen_add_to_stack_pointer(16)}},p.exports.min_ada_for_output=function(C,_){try{const r=t.__wbindgen_add_to_stack_pointer(-16);g(C,Yt),g(_,M),t.min_ada_for_output(r,C.__wbg_ptr,_.__wbg_ptr);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw c(s);return I.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}},p.exports.min_ada_required=function(C,_,e){try{const i=t.__wbindgen_add_to_stack_pointer(-16);g(C,gt),g(e,I),t.min_ada_required(i,C.__wbg_ptr,_,e.__wbg_ptr);var s=a()[i/4+0],n=a()[i/4+1],r=a()[i/4+2];if(r)throw c(n);return I.__wrap(s)}finally{t.__wbindgen_add_to_stack_pointer(16)}},p.exports.encode_json_str_to_native_script=function(C,_,e){try{const i=t.__wbindgen_add_to_stack_pointer(-16),o=v(C,t.__wbindgen_malloc,t.__wbindgen_realloc),f=b,l=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),H=b;t.encode_json_str_to_native_script(i,o,f,l,H,e);var s=a()[i/4+0],n=a()[i/4+1],r=a()[i/4+2];if(r)throw c(n);return Nt.__wrap(s)}finally{t.__wbindgen_add_to_stack_pointer(16)}};function xt(C,_){const e=_(C.length*4,4)>>>0;return ct().set(C,e/4),b=C.length,e}function At(C,_){try{return C.apply(this,_)}catch(e){t.__wbindgen_exn_store(G(e))}}p.exports.StakeCredKind=Object.freeze({Key:0,0:"Key",Script:1,1:"Script"}),p.exports.TransactionMetadatumKind=Object.freeze({MetadataMap:0,0:"MetadataMap",MetadataList:1,1:"MetadataList",Int:2,2:"Int",Bytes:3,3:"Bytes",Text:4,4:"Text"}),p.exports.MetadataJsonSchema=Object.freeze({NoConversions:0,0:"NoConversions",BasicConversions:1,1:"BasicConversions",DetailedSchema:2,2:"DetailedSchema"}),p.exports.LanguageKind=Object.freeze({PlutusV1:0,0:"PlutusV1",PlutusV2:1,1:"PlutusV2"}),p.exports.PlutusDataKind=Object.freeze({ConstrPlutusData:0,0:"ConstrPlutusData",Map:1,1:"Map",List:2,2:"List",Integer:3,3:"Integer",Bytes:4,4:"Bytes"}),p.exports.RedeemerTagKind=Object.freeze({Spend:0,0:"Spend",Mint:1,1:"Mint",Cert:2,2:"Cert",Reward:3,3:"Reward"}),p.exports.PlutusDatumSchema=Object.freeze({BasicConversions:0,0:"BasicConversions",DetailedSchema:1,1:"DetailedSchema"}),p.exports.CoinSelectionStrategyCIP2=Object.freeze({LargestFirst:0,0:"LargestFirst",RandomImprove:1,1:"RandomImprove",LargestFirstMultiAsset:2,2:"LargestFirstMultiAsset",RandomImproveMultiAsset:3,3:"RandomImproveMultiAsset"}),p.exports.CborContainerType=Object.freeze({Array:0,0:"Array",Map:1,1:"Map"}),p.exports.ScriptSchema=Object.freeze({Wallet:0,0:"Wallet",Node:1,1:"Node"}),p.exports.CertificateKind=Object.freeze({StakeRegistration:0,0:"StakeRegistration",StakeDeregistration:1,1:"StakeDeregistration",StakeDelegation:2,2:"StakeDelegation",PoolRegistration:3,3:"PoolRegistration",PoolRetirement:4,4:"PoolRetirement",GenesisKeyDelegation:5,5:"GenesisKeyDelegation",MoveInstantaneousRewardsCert:6,6:"MoveInstantaneousRewardsCert"}),p.exports.MIRPot=Object.freeze({Reserves:0,0:"Reserves",Treasury:1,1:"Treasury"}),p.exports.MIRKind=Object.freeze({ToOtherPot:0,0:"ToOtherPot",ToStakeCredentials:1,1:"ToStakeCredentials"}),p.exports.RelayKind=Object.freeze({SingleHostAddr:0,0:"SingleHostAddr",SingleHostName:1,1:"SingleHostName",MultiHostName:2,2:"MultiHostName"}),p.exports.NativeScriptKind=Object.freeze({ScriptPubkey:0,0:"ScriptPubkey",ScriptAll:1,1:"ScriptAll",ScriptAny:2,2:"ScriptAny",ScriptNOfK:3,3:"ScriptNOfK",TimelockStart:4,4:"TimelockStart",TimelockExpiry:5,5:"TimelockExpiry"}),p.exports.ScriptHashNamespace=Object.freeze({NativeScript:0,0:"NativeScript",PlutusScript:1,1:"PlutusScript",PlutusScriptV2:2,2:"PlutusScriptV2"}),p.exports.NetworkIdKind=Object.freeze({Testnet:0,0:"Testnet",Mainnet:1,1:"Mainnet"});class pt{static __wrap(_){_=_>>>0;const e=Object.create(pt.prototype);return e.__wbg_ptr=_,e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,_}free(){const _=this.__destroy_into_raw();t.__wbg_address_free(_)}static from_bytes(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=Q(_,t.__wbindgen_malloc),o=b;t.address_from_bytes(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw c(s);return pt.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_json(){let _,e;try{const l=t.__wbindgen_add_to_stack_pointer(-16);t.address_to_json(l,this.__wbg_ptr);var s=a()[l/4+0],n=a()[l/4+1],r=a()[l/4+2],i=a()[l/4+3],o=s,f=n;if(i)throw o=0,f=0,c(r);return _=o,e=f,m(o,f)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}to_js_value(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.address_to_js_value(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=a()[n/4+2];if(s)throw c(e);return c(_)}finally{t.__wbindgen_add_to_stack_pointer(16)}}static from_json(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=b;t.address_from_json(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw c(s);return pt.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_hex(){let _,e;try{const r=t.__wbindgen_add_to_stack_pointer(-16);t.address_to_hex(r,this.__wbg_ptr);var s=a()[r/4+0],n=a()[r/4+1];return _=s,e=n,m(s,n)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}static from_hex(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=b;t.address_from_hex(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw c(s);return pt.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_bytes(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.address_to_bytes(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=D(_,e).slice();return t.__wbindgen_free(_,e*1),s}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_bech32(_){let e,s;try{const dt=t.__wbindgen_add_to_stack_pointer(-16);var n=nt(_)?0:v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),r=b;t.address_to_bech32(dt,this.__wbg_ptr,n,r);var i=a()[dt/4+0],o=a()[dt/4+1],f=a()[dt/4+2],l=a()[dt/4+3],H=i,rt=o;if(l)throw H=0,rt=0,c(f);return e=H,s=rt,m(H,rt)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(e,s,1)}}static from_bech32(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=b;t.address_from_bech32(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw c(s);return pt.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}network_id(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.address_network_id(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=a()[n/4+2];if(s)throw c(e);return _}finally{t.__wbindgen_add_to_stack_pointer(16)}}}p.exports.Address=pt;class It{static __wrap(_){_=_>>>0;const e=Object.create(It.prototype);return e.__wbg_ptr=_,e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,_}free(){const _=this.__destroy_into_raw();t.__wbg_assetname_free(_)}to_bytes(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.assetname_to_bytes(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=D(_,e).slice();return t.__wbindgen_free(_,e*1),s}finally{t.__wbindgen_add_to_stack_pointer(16)}}static from_bytes(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=Q(_,t.__wbindgen_malloc),o=b;t.assetname_from_bytes(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw c(s);return It.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_hex(){let _,e;try{const r=t.__wbindgen_add_to_stack_pointer(-16);t.assetname_to_hex(r,this.__wbg_ptr);var s=a()[r/4+0],n=a()[r/4+1];return _=s,e=n,m(s,n)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}static from_hex(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=b;t.assetname_from_hex(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw c(s);return It.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_json(){let _,e;try{const l=t.__wbindgen_add_to_stack_pointer(-16);t.assetname_to_json(l,this.__wbg_ptr);var s=a()[l/4+0],n=a()[l/4+1],r=a()[l/4+2],i=a()[l/4+3],o=s,f=n;if(i)throw o=0,f=0,c(r);return _=o,e=f,m(o,f)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}to_js_value(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.assetname_to_js_value(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=a()[n/4+2];if(s)throw c(e);return c(_)}finally{t.__wbindgen_add_to_stack_pointer(16)}}static from_json(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=b;t.assetname_from_json(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw c(s);return It.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}static new(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=Q(_,t.__wbindgen_malloc),o=b;t.assetname_new(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw c(s);return It.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}name(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.assetname_name(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=D(_,e).slice();return t.__wbindgen_free(_,e*1),s}finally{t.__wbindgen_add_to_stack_pointer(16)}}}p.exports.AssetName=It;class Ut{static __wrap(_){_=_>>>0;const e=Object.create(Ut.prototype);return e.__wbg_ptr=_,e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,_}free(){const _=this.__destroy_into_raw();t.__wbg_assetnames_free(_)}to_bytes(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.assetnames_to_bytes(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=D(_,e).slice();return t.__wbindgen_free(_,e*1),s}finally{t.__wbindgen_add_to_stack_pointer(16)}}static from_bytes(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=Q(_,t.__wbindgen_malloc),o=b;t.assetnames_from_bytes(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw c(s);return Ut.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_hex(){let _,e;try{const r=t.__wbindgen_add_to_stack_pointer(-16);t.assetnames_to_hex(r,this.__wbg_ptr);var s=a()[r/4+0],n=a()[r/4+1];return _=s,e=n,m(s,n)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}static from_hex(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=b;t.assetnames_from_hex(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw c(s);return Ut.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_json(){let _,e;try{const l=t.__wbindgen_add_to_stack_pointer(-16);t.assetnames_to_json(l,this.__wbg_ptr);var s=a()[l/4+0],n=a()[l/4+1],r=a()[l/4+2],i=a()[l/4+3],o=s,f=n;if(i)throw o=0,f=0,c(r);return _=o,e=f,m(o,f)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}to_js_value(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.assetnames_to_js_value(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=a()[n/4+2];if(s)throw c(e);return c(_)}finally{t.__wbindgen_add_to_stack_pointer(16)}}static from_json(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=b;t.assetnames_from_json(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw c(s);return Ut.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}static new(){const _=t.assetnames_new();return Ut.__wrap(_)}len(){return t.assetnames_len(this.__wbg_ptr)>>>0}get(_){const e=t.assetnames_get(this.__wbg_ptr,_);return It.__wrap(e)}add(_){g(_,It),t.assetnames_add(this.__wbg_ptr,_.__wbg_ptr)}}p.exports.AssetNames=Ut;class Dt{static __wrap(_){_=_>>>0;const e=Object.create(Dt.prototype);return e.__wbg_ptr=_,e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,_}free(){const _=this.__destroy_into_raw();t.__wbg_assets_free(_)}to_bytes(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.assets_to_bytes(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=D(_,e).slice();return t.__wbindgen_free(_,e*1),s}finally{t.__wbindgen_add_to_stack_pointer(16)}}static from_bytes(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=Q(_,t.__wbindgen_malloc),o=b;t.assets_from_bytes(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw c(s);return Dt.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_hex(){let _,e;try{const r=t.__wbindgen_add_to_stack_pointer(-16);t.assets_to_hex(r,this.__wbg_ptr);var s=a()[r/4+0],n=a()[r/4+1];return _=s,e=n,m(s,n)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}static from_hex(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=b;t.assets_from_hex(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw c(s);return Dt.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_json(){let _,e;try{const l=t.__wbindgen_add_to_stack_pointer(-16);t.assets_to_json(l,this.__wbg_ptr);var s=a()[l/4+0],n=a()[l/4+1],r=a()[l/4+2],i=a()[l/4+3],o=s,f=n;if(i)throw o=0,f=0,c(r);return _=o,e=f,m(o,f)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}to_js_value(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.assets_to_js_value(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=a()[n/4+2];if(s)throw c(e);return c(_)}finally{t.__wbindgen_add_to_stack_pointer(16)}}static from_json(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=b;t.assets_from_json(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw c(s);return Dt.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}static new(){const _=t.assets_new();return Dt.__wrap(_)}len(){return t.assetnames_len(this.__wbg_ptr)>>>0}insert(_,e){g(_,It),g(e,I);const s=t.assets_insert(this.__wbg_ptr,_.__wbg_ptr,e.__wbg_ptr);return s===0?void 0:I.__wrap(s)}get(_){g(_,It);const e=t.assets_get(this.__wbg_ptr,_.__wbg_ptr);return e===0?void 0:I.__wrap(e)}keys(){const _=t.assets_keys(this.__wbg_ptr);return Ut.__wrap(_)}}p.exports.Assets=Dt;class Pt{static __wrap(_){_=_>>>0;const e=Object.create(Pt.prototype);return e.__wbg_ptr=_,e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,_}free(){const _=this.__destroy_into_raw();t.__wbg_auxiliarydata_free(_)}to_bytes(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.auxiliarydata_to_bytes(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=D(_,e).slice();return t.__wbindgen_free(_,e*1),s}finally{t.__wbindgen_add_to_stack_pointer(16)}}static from_bytes(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=Q(_,t.__wbindgen_malloc),o=b;t.auxiliarydata_from_bytes(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw c(s);return Pt.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_hex(){let _,e;try{const r=t.__wbindgen_add_to_stack_pointer(-16);t.auxiliarydata_to_hex(r,this.__wbg_ptr);var s=a()[r/4+0],n=a()[r/4+1];return _=s,e=n,m(s,n)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}static from_hex(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=b;t.auxiliarydata_from_hex(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw c(s);return Pt.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_json(){let _,e;try{const l=t.__wbindgen_add_to_stack_pointer(-16);t.auxiliarydata_to_json(l,this.__wbg_ptr);var s=a()[l/4+0],n=a()[l/4+1],r=a()[l/4+2],i=a()[l/4+3],o=s,f=n;if(i)throw o=0,f=0,c(r);return _=o,e=f,m(o,f)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}to_js_value(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.auxiliarydata_to_js_value(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=a()[n/4+2];if(s)throw c(e);return c(_)}finally{t.__wbindgen_add_to_stack_pointer(16)}}static from_json(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=b;t.auxiliarydata_from_json(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw c(s);return Pt.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}static new(){const _=t.auxiliarydata_new();return Pt.__wrap(_)}metadata(){const _=t.auxiliarydata_metadata(this.__wbg_ptr);return _===0?void 0:Ot.__wrap(_)}set_metadata(_){g(_,Ot),t.auxiliarydata_set_metadata(this.__wbg_ptr,_.__wbg_ptr)}native_scripts(){const _=t.auxiliarydata_native_scripts(this.__wbg_ptr);return _===0?void 0:Ht.__wrap(_)}set_native_scripts(_){g(_,Ht),t.auxiliarydata_set_native_scripts(this.__wbg_ptr,_.__wbg_ptr)}plutus_scripts(){const _=t.auxiliarydata_plutus_scripts(this.__wbg_ptr);return _===0?void 0:m_.__wrap(_)}set_plutus_scripts(_){g(_,m_),t.auxiliarydata_set_plutus_scripts(this.__wbg_ptr,_.__wbg_ptr)}prefer_alonzo_format(){return t.auxiliarydata_prefer_alonzo_format(this.__wbg_ptr)!==0}set_prefer_alonzo_format(_){t.auxiliarydata_set_prefer_alonzo_format(this.__wbg_ptr,_)}}p.exports.AuxiliaryData=Pt;class qt{static __wrap(_){_=_>>>0;const e=Object.create(qt.prototype);return e.__wbg_ptr=_,e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,_}free(){const _=this.__destroy_into_raw();t.__wbg_auxiliarydatahash_free(_)}static from_bytes(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=Q(_,t.__wbindgen_malloc),o=b;t.auxiliarydatahash_from_bytes(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw c(s);return qt.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_bytes(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.auxiliarydatahash_to_bytes(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=D(_,e).slice();return t.__wbindgen_free(_,e*1),s}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_bech32(_){let e,s;try{const H=t.__wbindgen_add_to_stack_pointer(-16),rt=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),dt=b;t.auxiliarydatahash_to_bech32(H,this.__wbg_ptr,rt,dt);var n=a()[H/4+0],r=a()[H/4+1],i=a()[H/4+2],o=a()[H/4+3],f=n,l=r;if(o)throw f=0,l=0,c(i);return e=f,s=l,m(f,l)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(e,s,1)}}static from_bech32(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=b;t.auxiliarydatahash_from_bech32(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw c(s);return qt.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_hex(){let _,e;try{const r=t.__wbindgen_add_to_stack_pointer(-16);t.auxiliarydatahash_to_hex(r,this.__wbg_ptr);var s=a()[r/4+0],n=a()[r/4+1];return _=s,e=n,m(s,n)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}static from_hex(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=b;t.auxiliarydatahash_from_hex(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw c(s);return qt.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}}p.exports.AuxiliaryDataHash=qt;class K{static __wrap(_){_=_>>>0;const e=Object.create(K.prototype);return e.__wbg_ptr=_,e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,_}free(){const _=this.__destroy_into_raw();t.__wbg_auxiliarydataset_free(_)}static new(){const _=t.auxiliarydataset_new();return K.__wrap(_)}len(){return t.auxiliarydataset_len(this.__wbg_ptr)>>>0}insert(_,e){g(e,Pt);const s=t.auxiliarydataset_insert(this.__wbg_ptr,_,e.__wbg_ptr);return s===0?void 0:Pt.__wrap(s)}get(_){const e=t.auxiliarydataset_get(this.__wbg_ptr,_);return e===0?void 0:Pt.__wrap(e)}indices(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.auxiliarydataset_indices(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=bt(_,e).slice();return t.__wbindgen_free(_,e*4),s}finally{t.__wbindgen_add_to_stack_pointer(16)}}}p.exports.AuxiliaryDataSet=K;class R{static __wrap(_){_=_>>>0;const e=Object.create(R.prototype);return e.__wbg_ptr=_,e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,_}free(){const _=this.__destroy_into_raw();t.__wbg_baseaddress_free(_)}static new(_,e,s){g(e,Qt),g(s,Qt);const n=t.baseaddress_new(_,e.__wbg_ptr,s.__wbg_ptr);return R.__wrap(n)}payment_cred(){const _=t.baseaddress_payment_cred(this.__wbg_ptr);return Qt.__wrap(_)}stake_cred(){const _=t.baseaddress_stake_cred(this.__wbg_ptr);return Qt.__wrap(_)}to_address(){const _=t.baseaddress_to_address(this.__wbg_ptr);return pt.__wrap(_)}static from_address(_){g(_,pt);const e=t.baseaddress_from_address(_.__wbg_ptr);return e===0?void 0:R.__wrap(e)}}p.exports.BaseAddress=R;class V{static __wrap(_){_=_>>>0;const e=Object.create(V.prototype);return e.__wbg_ptr=_,e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,_}free(){const _=this.__destroy_into_raw();t.__wbg_bigint_free(_)}to_bytes(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.bigint_to_bytes(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=D(_,e).slice();return t.__wbindgen_free(_,e*1),s}finally{t.__wbindgen_add_to_stack_pointer(16)}}static from_bytes(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=Q(_,t.__wbindgen_malloc),o=b;t.bigint_from_bytes(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw c(s);return V.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_hex(){let _,e;try{const r=t.__wbindgen_add_to_stack_pointer(-16);t.bigint_to_hex(r,this.__wbg_ptr);var s=a()[r/4+0],n=a()[r/4+1];return _=s,e=n,m(s,n)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}static from_hex(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=b;t.bigint_from_hex(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw c(s);return V.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_json(){let _,e;try{const l=t.__wbindgen_add_to_stack_pointer(-16);t.bigint_to_json(l,this.__wbg_ptr);var s=a()[l/4+0],n=a()[l/4+1],r=a()[l/4+2],i=a()[l/4+3],o=s,f=n;if(i)throw o=0,f=0,c(r);return _=o,e=f,m(o,f)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}to_js_value(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.bigint_to_js_value(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=a()[n/4+2];if(s)throw c(e);return c(_)}finally{t.__wbindgen_add_to_stack_pointer(16)}}static from_json(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=b;t.bigint_from_json(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw c(s);return V.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}is_zero(){return t.bigint_is_zero(this.__wbg_ptr)!==0}as_u64(){const _=t.bigint_as_u64(this.__wbg_ptr);return _===0?void 0:I.__wrap(_)}as_int(){const _=t.bigint_as_int(this.__wbg_ptr);return _===0?void 0:St.__wrap(_)}static from_str(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=b;t.bigint_from_str(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw c(s);return V.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_str(){let _,e;try{const r=t.__wbindgen_add_to_stack_pointer(-16);t.bigint_to_str(r,this.__wbg_ptr);var s=a()[r/4+0],n=a()[r/4+1];return _=s,e=n,m(s,n)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}add(_){g(_,V);const e=t.bigint_add(this.__wbg_ptr,_.__wbg_ptr);return V.__wrap(e)}mul(_){g(_,V);const e=t.bigint_mul(this.__wbg_ptr,_.__wbg_ptr);return V.__wrap(e)}static one(){const _=t.bigint_one();return V.__wrap(_)}increment(){const _=t.bigint_increment(this.__wbg_ptr);return V.__wrap(_)}div_ceil(_){g(_,V);const e=t.bigint_div_ceil(this.__wbg_ptr,_.__wbg_ptr);return V.__wrap(e)}}p.exports.BigInt=V;class I{static __wrap(_){_=_>>>0;const e=Object.create(I.prototype);return e.__wbg_ptr=_,e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,_}free(){const _=this.__destroy_into_raw();t.__wbg_bignum_free(_)}to_bytes(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.bignum_to_bytes(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=D(_,e).slice();return t.__wbindgen_free(_,e*1),s}finally{t.__wbindgen_add_to_stack_pointer(16)}}static from_bytes(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=Q(_,t.__wbindgen_malloc),o=b;t.bignum_from_bytes(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw c(s);return I.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_hex(){let _,e;try{const r=t.__wbindgen_add_to_stack_pointer(-16);t.bignum_to_hex(r,this.__wbg_ptr);var s=a()[r/4+0],n=a()[r/4+1];return _=s,e=n,m(s,n)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}static from_hex(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=b;t.bignum_from_hex(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw c(s);return I.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_json(){let _,e;try{const l=t.__wbindgen_add_to_stack_pointer(-16);t.bignum_to_json(l,this.__wbg_ptr);var s=a()[l/4+0],n=a()[l/4+1],r=a()[l/4+2],i=a()[l/4+3],o=s,f=n;if(i)throw o=0,f=0,c(r);return _=o,e=f,m(o,f)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}to_js_value(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.bignum_to_js_value(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=a()[n/4+2];if(s)throw c(e);return c(_)}finally{t.__wbindgen_add_to_stack_pointer(16)}}static from_json(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=b;t.bignum_from_json(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw c(s);return I.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}static from_str(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=b;t.bignum_from_str(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw c(s);return I.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_str(){let _,e;try{const r=t.__wbindgen_add_to_stack_pointer(-16);t.bignum_to_str(r,this.__wbg_ptr);var s=a()[r/4+0],n=a()[r/4+1];return _=s,e=n,m(s,n)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}static zero(){const _=t.bignum_zero();return I.__wrap(_)}static one(){const _=t.bignum_one();return I.__wrap(_)}is_zero(){return t.bignum_is_zero(this.__wbg_ptr)!==0}div_floor(_){g(_,I);const e=t.bignum_div_floor(this.__wbg_ptr,_.__wbg_ptr);return I.__wrap(e)}checked_mul(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16);g(_,I),t.bignum_checked_mul(r,this.__wbg_ptr,_.__wbg_ptr);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw c(s);return I.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}checked_add(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16);g(_,I),t.bignum_checked_add(r,this.__wbg_ptr,_.__wbg_ptr);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw c(s);return I.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}checked_sub(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16);g(_,I),t.bignum_checked_sub(r,this.__wbg_ptr,_.__wbg_ptr);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw c(s);return I.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}clamped_sub(_){g(_,I);const e=t.bignum_clamped_sub(this.__wbg_ptr,_.__wbg_ptr);return I.__wrap(e)}compare(_){return g(_,I),t.bignum_compare(this.__wbg_ptr,_.__wbg_ptr)}less_than(_){return g(_,I),t.bignum_less_than(this.__wbg_ptr,_.__wbg_ptr)!==0}static max_value(){const _=t.bignum_max_value();return I.__wrap(_)}static max(_,e){g(_,I),g(e,I);const s=t.bignum_max(_.__wbg_ptr,e.__wbg_ptr);return I.__wrap(s)}}p.exports.BigNum=I;class wt{static __wrap(_){_=_>>>0;const e=Object.create(wt.prototype);return e.__wbg_ptr=_,e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,_}free(){const _=this.__destroy_into_raw();t.__wbg_bip32privatekey_free(_)}derive(_){const e=t.bip32privatekey_derive(this.__wbg_ptr,_);return wt.__wrap(e)}static from_128_xprv(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=Q(_,t.__wbindgen_malloc),o=b;t.bip32privatekey_from_128_xprv(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw c(s);return wt.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_128_xprv(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.bip32privatekey_to_128_xprv(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=D(_,e).slice();return t.__wbindgen_free(_,e*1),s}finally{t.__wbindgen_add_to_stack_pointer(16)}}static generate_ed25519_bip32(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.bip32privatekey_generate_ed25519_bip32(n);var _=a()[n/4+0],e=a()[n/4+1],s=a()[n/4+2];if(s)throw c(e);return wt.__wrap(_)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_raw_key(){const _=t.bip32privatekey_to_raw_key(this.__wbg_ptr);return k_.__wrap(_)}to_public(){const _=t.bip32privatekey_to_public(this.__wbg_ptr);return ut.__wrap(_)}static from_bytes(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=Q(_,t.__wbindgen_malloc),o=b;t.bip32privatekey_from_bytes(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw c(s);return wt.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}as_bytes(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.bip32privatekey_as_bytes(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=D(_,e).slice();return t.__wbindgen_free(_,e*1),s}finally{t.__wbindgen_add_to_stack_pointer(16)}}static from_bech32(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=b;t.bip32privatekey_from_bech32(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw c(s);return wt.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_bech32(){let _,e;try{const r=t.__wbindgen_add_to_stack_pointer(-16);t.bip32privatekey_to_bech32(r,this.__wbg_ptr);var s=a()[r/4+0],n=a()[r/4+1];return _=s,e=n,m(s,n)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}static from_bip39_entropy(_,e){const s=Q(_,t.__wbindgen_malloc),n=b,r=Q(e,t.__wbindgen_malloc),i=b,o=t.bip32privatekey_from_bip39_entropy(s,n,r,i);return wt.__wrap(o)}chaincode(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.bip32privatekey_chaincode(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=D(_,e).slice();return t.__wbindgen_free(_,e*1),s}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_hex(){let _,e;try{const r=t.__wbindgen_add_to_stack_pointer(-16);t.bip32privatekey_to_hex(r,this.__wbg_ptr);var s=a()[r/4+0],n=a()[r/4+1];return _=s,e=n,m(s,n)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}static from_hex(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=b;t.bip32privatekey_from_hex(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw c(s);return wt.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}}p.exports.Bip32PrivateKey=wt;class ut{static __wrap(_){_=_>>>0;const e=Object.create(ut.prototype);return e.__wbg_ptr=_,e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,_}free(){const _=this.__destroy_into_raw();t.__wbg_bip32publickey_free(_)}derive(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16);t.bip32publickey_derive(r,this.__wbg_ptr,_);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw c(s);return ut.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_raw_key(){const _=t.bip32publickey_to_raw_key(this.__wbg_ptr);return l_.__wrap(_)}static from_bytes(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=Q(_,t.__wbindgen_malloc),o=b;t.bip32publickey_from_bytes(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw c(s);return ut.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}as_bytes(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.bip32publickey_as_bytes(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=D(_,e).slice();return t.__wbindgen_free(_,e*1),s}finally{t.__wbindgen_add_to_stack_pointer(16)}}static from_bech32(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=b;t.bip32publickey_from_bech32(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw c(s);return ut.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_bech32(){let _,e;try{const r=t.__wbindgen_add_to_stack_pointer(-16);t.bip32publickey_to_bech32(r,this.__wbg_ptr);var s=a()[r/4+0],n=a()[r/4+1];return _=s,e=n,m(s,n)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}chaincode(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.bip32publickey_chaincode(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=D(_,e).slice();return t.__wbindgen_free(_,e*1),s}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_hex(){let _,e;try{const r=t.__wbindgen_add_to_stack_pointer(-16);t.bip32publickey_to_hex(r,this.__wbg_ptr);var s=a()[r/4+0],n=a()[r/4+1];return _=s,e=n,m(s,n)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}static from_hex(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=b;t.bip32publickey_from_hex(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw c(s);return ut.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}}p.exports.Bip32PublicKey=ut;class st{static __wrap(_){_=_>>>0;const e=Object.create(st.prototype);return e.__wbg_ptr=_,e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,_}free(){const _=this.__destroy_into_raw();t.__wbg_block_free(_)}to_bytes(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.block_to_bytes(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=D(_,e).slice();return t.__wbindgen_free(_,e*1),s}finally{t.__wbindgen_add_to_stack_pointer(16)}}static from_bytes(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=Q(_,t.__wbindgen_malloc),o=b;t.block_from_bytes(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw c(s);return st.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_hex(){let _,e;try{const r=t.__wbindgen_add_to_stack_pointer(-16);t.block_to_hex(r,this.__wbg_ptr);var s=a()[r/4+0],n=a()[r/4+1];return _=s,e=n,m(s,n)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}static from_hex(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=b;t.block_from_hex(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw c(s);return st.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_json(){let _,e;try{const l=t.__wbindgen_add_to_stack_pointer(-16);t.block_to_json(l,this.__wbg_ptr);var s=a()[l/4+0],n=a()[l/4+1],r=a()[l/4+2],i=a()[l/4+3],o=s,f=n;if(i)throw o=0,f=0,c(r);return _=o,e=f,m(o,f)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}to_js_value(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.block_to_js_value(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=a()[n/4+2];if(s)throw c(e);return c(_)}finally{t.__wbindgen_add_to_stack_pointer(16)}}static from_json(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=b;t.block_from_json(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw c(s);return st.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}header(){const _=t.block_header(this.__wbg_ptr);return __.__wrap(_)}transaction_bodies(){const _=t.block_transaction_bodies(this.__wbg_ptr);return ye.__wrap(_)}transaction_witness_sets(){const _=t.block_transaction_witness_sets(this.__wbg_ptr);return me.__wrap(_)}auxiliary_data_set(){const _=t.block_auxiliary_data_set(this.__wbg_ptr);return K.__wrap(_)}invalid_transactions(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.block_invalid_transactions(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=bt(_,e).slice();return t.__wbindgen_free(_,e*4),s}finally{t.__wbindgen_add_to_stack_pointer(16)}}static new(_,e,s,n,r){g(_,__),g(e,ye),g(s,me),g(n,K);const i=xt(r,t.__wbindgen_malloc),o=b,f=t.block_new(_.__wbg_ptr,e.__wbg_ptr,s.__wbg_ptr,n.__wbg_ptr,i,o);return st.__wrap(f)}}p.exports.Block=st;class et{static __wrap(_){_=_>>>0;const e=Object.create(et.prototype);return e.__wbg_ptr=_,e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,_}free(){const _=this.__destroy_into_raw();t.__wbg_blockhash_free(_)}static from_bytes(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=Q(_,t.__wbindgen_malloc),o=b;t.blockhash_from_bytes(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw c(s);return et.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_bytes(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.auxiliarydatahash_to_bytes(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=D(_,e).slice();return t.__wbindgen_free(_,e*1),s}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_bech32(_){let e,s;try{const H=t.__wbindgen_add_to_stack_pointer(-16),rt=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),dt=b;t.auxiliarydatahash_to_bech32(H,this.__wbg_ptr,rt,dt);var n=a()[H/4+0],r=a()[H/4+1],i=a()[H/4+2],o=a()[H/4+3],f=n,l=r;if(o)throw f=0,l=0,c(i);return e=f,s=l,m(f,l)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(e,s,1)}}static from_bech32(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=b;t.blockhash_from_bech32(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw c(s);return et.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_hex(){let _,e;try{const r=t.__wbindgen_add_to_stack_pointer(-16);t.auxiliarydatahash_to_hex(r,this.__wbg_ptr);var s=a()[r/4+0],n=a()[r/4+1];return _=s,e=n,m(s,n)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}static from_hex(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=b;t.blockhash_from_hex(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw c(s);return et.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}}p.exports.BlockHash=et;class ot{static __wrap(_){_=_>>>0;const e=Object.create(ot.prototype);return e.__wbg_ptr=_,e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,_}free(){const _=this.__destroy_into_raw();t.__wbg_bootstrapwitness_free(_)}to_bytes(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.bootstrapwitness_to_bytes(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=D(_,e).slice();return t.__wbindgen_free(_,e*1),s}finally{t.__wbindgen_add_to_stack_pointer(16)}}static from_bytes(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=Q(_,t.__wbindgen_malloc),o=b;t.bootstrapwitness_from_bytes(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw c(s);return ot.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_hex(){let _,e;try{const r=t.__wbindgen_add_to_stack_pointer(-16);t.bootstrapwitness_to_hex(r,this.__wbg_ptr);var s=a()[r/4+0],n=a()[r/4+1];return _=s,e=n,m(s,n)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}static from_hex(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=b;t.bootstrapwitness_from_hex(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw c(s);return ot.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_json(){let _,e;try{const l=t.__wbindgen_add_to_stack_pointer(-16);t.bootstrapwitness_to_json(l,this.__wbg_ptr);var s=a()[l/4+0],n=a()[l/4+1],r=a()[l/4+2],i=a()[l/4+3],o=s,f=n;if(i)throw o=0,f=0,c(r);return _=o,e=f,m(o,f)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}to_js_value(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.bootstrapwitness_to_js_value(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=a()[n/4+2];if(s)throw c(e);return c(_)}finally{t.__wbindgen_add_to_stack_pointer(16)}}static from_json(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=b;t.bootstrapwitness_from_json(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw c(s);return ot.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}vkey(){const _=t.bootstrapwitness_vkey(this.__wbg_ptr);return Zt.__wrap(_)}signature(){const _=t.bootstrapwitness_signature(this.__wbg_ptr);return it.__wrap(_)}chain_code(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.assetname_name(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=D(_,e).slice();return t.__wbindgen_free(_,e*1),s}finally{t.__wbindgen_add_to_stack_pointer(16)}}attributes(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.bootstrapwitness_attributes(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=D(_,e).slice();return t.__wbindgen_free(_,e*1),s}finally{t.__wbindgen_add_to_stack_pointer(16)}}static new(_,e,s,n){g(_,Zt),g(e,it);const r=Q(s,t.__wbindgen_malloc),i=b,o=Q(n,t.__wbindgen_malloc),f=b,l=t.bootstrapwitness_new(_.__wbg_ptr,e.__wbg_ptr,r,i,o,f);return ot.__wrap(l)}}p.exports.BootstrapWitness=ot;class k{static __wrap(_){_=_>>>0;const e=Object.create(k.prototype);return e.__wbg_ptr=_,e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,_}free(){const _=this.__destroy_into_raw();t.__wbg_bootstrapwitnesses_free(_)}static new(){const _=t.assetnames_new();return k.__wrap(_)}len(){return t.assetnames_len(this.__wbg_ptr)>>>0}get(_){const e=t.bootstrapwitnesses_get(this.__wbg_ptr,_);return ot.__wrap(e)}add(_){g(_,ot),t.bootstrapwitnesses_add(this.__wbg_ptr,_.__wbg_ptr)}}p.exports.BootstrapWitnesses=k;class A{static __wrap(_){_=_>>>0;const e=Object.create(A.prototype);return e.__wbg_ptr=_,e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,_}free(){const _=this.__destroy_into_raw();t.__wbg_byronaddress_free(_)}to_base58(){let _,e;try{const r=t.__wbindgen_add_to_stack_pointer(-16);t.byronaddress_to_base58(r,this.__wbg_ptr);var s=a()[r/4+0],n=a()[r/4+1];return _=s,e=n,m(s,n)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}to_bytes(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.byronaddress_to_bytes(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=D(_,e).slice();return t.__wbindgen_free(_,e*1),s}finally{t.__wbindgen_add_to_stack_pointer(16)}}static from_bytes(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=Q(_,t.__wbindgen_malloc),o=b;t.byronaddress_from_bytes(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw c(s);return A.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}byron_protocol_magic(){return t.byronaddress_byron_protocol_magic(this.__wbg_ptr)>>>0}attributes(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.byronaddress_attributes(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=D(_,e).slice();return t.__wbindgen_free(_,e*1),s}finally{t.__wbindgen_add_to_stack_pointer(16)}}network_id(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.byronaddress_network_id(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=a()[n/4+2];if(s)throw c(e);return _}finally{t.__wbindgen_add_to_stack_pointer(16)}}static from_base58(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=b;t.byronaddress_from_base58(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw c(s);return A.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}static icarus_from_key(_,e){g(_,ut);const s=t.byronaddress_icarus_from_key(_.__wbg_ptr,e);return A.__wrap(s)}static is_valid(_){const e=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),s=b;return t.byronaddress_is_valid(e,s)!==0}to_address(){const _=t.byronaddress_to_address(this.__wbg_ptr);return pt.__wrap(_)}static from_address(_){g(_,pt);const e=t.byronaddress_from_address(_.__wbg_ptr);return e===0?void 0:A.__wrap(e)}}p.exports.ByronAddress=A;class j{static __wrap(_){_=_>>>0;const e=Object.create(j.prototype);return e.__wbg_ptr=_,e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,_}free(){const _=this.__destroy_into_raw();t.__wbg_certificate_free(_)}to_bytes(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.certificate_to_bytes(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=D(_,e).slice();return t.__wbindgen_free(_,e*1),s}finally{t.__wbindgen_add_to_stack_pointer(16)}}static from_bytes(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=Q(_,t.__wbindgen_malloc),o=b;t.certificate_from_bytes(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw c(s);return j.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_hex(){let _,e;try{const r=t.__wbindgen_add_to_stack_pointer(-16);t.certificate_to_hex(r,this.__wbg_ptr);var s=a()[r/4+0],n=a()[r/4+1];return _=s,e=n,m(s,n)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}static from_hex(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=b;t.certificate_from_hex(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw c(s);return j.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_json(){let _,e;try{const l=t.__wbindgen_add_to_stack_pointer(-16);t.certificate_to_json(l,this.__wbg_ptr);var s=a()[l/4+0],n=a()[l/4+1],r=a()[l/4+2],i=a()[l/4+3],o=s,f=n;if(i)throw o=0,f=0,c(r);return _=o,e=f,m(o,f)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}to_js_value(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.certificate_to_js_value(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=a()[n/4+2];if(s)throw c(e);return c(_)}finally{t.__wbindgen_add_to_stack_pointer(16)}}static from_json(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=b;t.certificate_from_json(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw c(s);return j.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}static new_stake_registration(_){g(_,he);const e=t.certificate_new_stake_registration(_.__wbg_ptr);return j.__wrap(e)}static new_stake_deregistration(_){g(_,fe);const e=t.certificate_new_stake_deregistration(_.__wbg_ptr);return j.__wrap(e)}static new_stake_delegation(_){g(_,ue);const e=t.certificate_new_stake_delegation(_.__wbg_ptr);return j.__wrap(e)}static new_pool_registration(_){g(_,ae);const e=t.certificate_new_pool_registration(_.__wbg_ptr);return j.__wrap(e)}static new_pool_retirement(_){g(_,se);const e=t.certificate_new_pool_retirement(_.__wbg_ptr);return j.__wrap(e)}static new_genesis_key_delegation(_){g(_,Rt);const e=t.certificate_new_genesis_key_delegation(_.__wbg_ptr);return j.__wrap(e)}static new_move_instantaneous_rewards_cert(_){g(_,X_);const e=t.certificate_new_move_instantaneous_rewards_cert(_.__wbg_ptr);return j.__wrap(e)}kind(){return t.certificate_kind(this.__wbg_ptr)>>>0}as_stake_registration(){const _=t.certificate_as_stake_registration(this.__wbg_ptr);return _===0?void 0:he.__wrap(_)}as_stake_deregistration(){const _=t.certificate_as_stake_deregistration(this.__wbg_ptr);return _===0?void 0:fe.__wrap(_)}as_stake_delegation(){const _=t.certificate_as_stake_delegation(this.__wbg_ptr);return _===0?void 0:ue.__wrap(_)}as_pool_registration(){const _=t.certificate_as_pool_registration(this.__wbg_ptr);return _===0?void 0:ae.__wrap(_)}as_pool_retirement(){const _=t.certificate_as_pool_retirement(this.__wbg_ptr);return _===0?void 0:se.__wrap(_)}as_genesis_key_delegation(){const _=t.certificate_as_genesis_key_delegation(this.__wbg_ptr);return _===0?void 0:Rt.__wrap(_)}as_move_instantaneous_rewards_cert(){const _=t.certificate_as_move_instantaneous_rewards_cert(this.__wbg_ptr);return _===0?void 0:X_.__wrap(_)}}p.exports.Certificate=j;class N{static __wrap(_){_=_>>>0;const e=Object.create(N.prototype);return e.__wbg_ptr=_,e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,_}free(){const _=this.__destroy_into_raw();t.__wbg_certificates_free(_)}to_bytes(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.certificates_to_bytes(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=D(_,e).slice();return t.__wbindgen_free(_,e*1),s}finally{t.__wbindgen_add_to_stack_pointer(16)}}static from_bytes(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=Q(_,t.__wbindgen_malloc),o=b;t.certificates_from_bytes(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw c(s);return N.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_hex(){let _,e;try{const r=t.__wbindgen_add_to_stack_pointer(-16);t.certificates_to_hex(r,this.__wbg_ptr);var s=a()[r/4+0],n=a()[r/4+1];return _=s,e=n,m(s,n)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}static from_hex(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=b;t.certificates_from_hex(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw c(s);return N.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_json(){let _,e;try{const l=t.__wbindgen_add_to_stack_pointer(-16);t.certificates_to_json(l,this.__wbg_ptr);var s=a()[l/4+0],n=a()[l/4+1],r=a()[l/4+2],i=a()[l/4+3],o=s,f=n;if(i)throw o=0,f=0,c(r);return _=o,e=f,m(o,f)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}to_js_value(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.certificates_to_js_value(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=a()[n/4+2];if(s)throw c(e);return c(_)}finally{t.__wbindgen_add_to_stack_pointer(16)}}static from_json(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=b;t.certificates_from_json(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw c(s);return N.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}static new(){const _=t.certificates_new();return N.__wrap(_)}len(){return t.assetnames_len(this.__wbg_ptr)>>>0}get(_){const e=t.certificates_get(this.__wbg_ptr,_);return j.__wrap(e)}add(_){g(_,j),t.certificates_add(this.__wbg_ptr,_.__wbg_ptr)}}p.exports.Certificates=N;class S{static __wrap(_){_=_>>>0;const e=Object.create(S.prototype);return e.__wbg_ptr=_,e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,_}free(){const _=this.__destroy_into_raw();t.__wbg_constrplutusdata_free(_)}to_bytes(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.constrplutusdata_to_bytes(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=D(_,e).slice();return t.__wbindgen_free(_,e*1),s}finally{t.__wbindgen_add_to_stack_pointer(16)}}static from_bytes(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=Q(_,t.__wbindgen_malloc),o=b;t.constrplutusdata_from_bytes(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw c(s);return S.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_hex(){let _,e;try{const r=t.__wbindgen_add_to_stack_pointer(-16);t.constrplutusdata_to_hex(r,this.__wbg_ptr);var s=a()[r/4+0],n=a()[r/4+1];return _=s,e=n,m(s,n)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}static from_hex(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=b;t.constrplutusdata_from_hex(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw c(s);return S.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}alternative(){const _=t.constrplutusdata_alternative(this.__wbg_ptr);return I.__wrap(_)}data(){const _=t.constrplutusdata_data(this.__wbg_ptr);return n_.__wrap(_)}static new(_,e){g(_,I),g(e,n_);const s=t.constrplutusdata_new(_.__wbg_ptr,e.__wbg_ptr);return S.__wrap(s)}}p.exports.ConstrPlutusData=S;class T{static __wrap(_){_=_>>>0;const e=Object.create(T.prototype);return e.__wbg_ptr=_,e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,_}free(){const _=this.__destroy_into_raw();t.__wbg_costmodel_free(_)}to_bytes(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.costmodel_to_bytes(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=D(_,e).slice();return t.__wbindgen_free(_,e*1),s}finally{t.__wbindgen_add_to_stack_pointer(16)}}static from_bytes(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=Q(_,t.__wbindgen_malloc),o=b;t.costmodel_from_bytes(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw c(s);return T.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_hex(){let _,e;try{const r=t.__wbindgen_add_to_stack_pointer(-16);t.costmodel_to_hex(r,this.__wbg_ptr);var s=a()[r/4+0],n=a()[r/4+1];return _=s,e=n,m(s,n)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}static from_hex(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=b;t.costmodel_from_hex(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw c(s);return T.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_json(){let _,e;try{const l=t.__wbindgen_add_to_stack_pointer(-16);t.costmodel_to_json(l,this.__wbg_ptr);var s=a()[l/4+0],n=a()[l/4+1],r=a()[l/4+2],i=a()[l/4+3],o=s,f=n;if(i)throw o=0,f=0,c(r);return _=o,e=f,m(o,f)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}to_js_value(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.costmodel_to_js_value(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=a()[n/4+2];if(s)throw c(e);return c(_)}finally{t.__wbindgen_add_to_stack_pointer(16)}}static from_json(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=b;t.costmodel_from_json(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw c(s);return T.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}static new(){const _=t.certificates_new();return T.__wrap(_)}set(_,e){try{const i=t.__wbindgen_add_to_stack_pointer(-16);g(e,St),t.costmodel_set(i,this.__wbg_ptr,_,e.__wbg_ptr);var s=a()[i/4+0],n=a()[i/4+1],r=a()[i/4+2];if(r)throw c(n);return St.__wrap(s)}finally{t.__wbindgen_add_to_stack_pointer(16)}}get(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16);t.costmodel_get(r,this.__wbg_ptr,_);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw c(s);return St.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}len(){return t.assetnames_len(this.__wbg_ptr)>>>0}}p.exports.CostModel=T;class F{static __wrap(_){_=_>>>0;const e=Object.create(F.prototype);return e.__wbg_ptr=_,e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,_}free(){const _=this.__destroy_into_raw();t.__wbg_costmdls_free(_)}to_bytes(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.costmdls_to_bytes(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=D(_,e).slice();return t.__wbindgen_free(_,e*1),s}finally{t.__wbindgen_add_to_stack_pointer(16)}}static from_bytes(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=Q(_,t.__wbindgen_malloc),o=b;t.costmdls_from_bytes(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw c(s);return F.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_hex(){let _,e;try{const r=t.__wbindgen_add_to_stack_pointer(-16);t.costmdls_to_hex(r,this.__wbg_ptr);var s=a()[r/4+0],n=a()[r/4+1];return _=s,e=n,m(s,n)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}static from_hex(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=b;t.costmdls_from_hex(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw c(s);return F.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_json(){let _,e;try{const l=t.__wbindgen_add_to_stack_pointer(-16);t.costmdls_to_json(l,this.__wbg_ptr);var s=a()[l/4+0],n=a()[l/4+1],r=a()[l/4+2],i=a()[l/4+3],o=s,f=n;if(i)throw o=0,f=0,c(r);return _=o,e=f,m(o,f)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}to_js_value(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.costmdls_to_js_value(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=a()[n/4+2];if(s)throw c(e);return c(_)}finally{t.__wbindgen_add_to_stack_pointer(16)}}static from_json(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=b;t.costmdls_from_json(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw c(s);return F.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}static new(){const _=t.assets_new();return F.__wrap(_)}len(){return t.assetnames_len(this.__wbg_ptr)>>>0}insert(_,e){g(_,Jt),g(e,T);const s=t.costmdls_insert(this.__wbg_ptr,_.__wbg_ptr,e.__wbg_ptr);return s===0?void 0:T.__wrap(s)}get(_){g(_,Jt);const e=t.costmdls_get(this.__wbg_ptr,_.__wbg_ptr);return e===0?void 0:T.__wrap(e)}keys(){const _=t.costmdls_keys(this.__wbg_ptr);return Le.__wrap(_)}retain_language_versions(_){g(_,Le);const e=t.costmdls_retain_language_versions(this.__wbg_ptr,_.__wbg_ptr);return F.__wrap(e)}}p.exports.Costmdls=F;class E{static __wrap(_){_=_>>>0;const e=Object.create(E.prototype);return e.__wbg_ptr=_,e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,_}free(){const _=this.__destroy_into_raw();t.__wbg_dnsrecordaoraaaa_free(_)}to_bytes(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.dnsrecordaoraaaa_to_bytes(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=D(_,e).slice();return t.__wbindgen_free(_,e*1),s}finally{t.__wbindgen_add_to_stack_pointer(16)}}static from_bytes(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=Q(_,t.__wbindgen_malloc),o=b;t.dnsrecordaoraaaa_from_bytes(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw c(s);return E.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_hex(){let _,e;try{const r=t.__wbindgen_add_to_stack_pointer(-16);t.dnsrecordaoraaaa_to_hex(r,this.__wbg_ptr);var s=a()[r/4+0],n=a()[r/4+1];return _=s,e=n,m(s,n)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}static from_hex(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=b;t.dnsrecordaoraaaa_from_hex(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw c(s);return E.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_json(){let _,e;try{const l=t.__wbindgen_add_to_stack_pointer(-16);t.dnsrecordaoraaaa_to_json(l,this.__wbg_ptr);var s=a()[l/4+0],n=a()[l/4+1],r=a()[l/4+2],i=a()[l/4+3],o=s,f=n;if(i)throw o=0,f=0,c(r);return _=o,e=f,m(o,f)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}to_js_value(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.dnsrecordaoraaaa_to_js_value(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=a()[n/4+2];if(s)throw c(e);return c(_)}finally{t.__wbindgen_add_to_stack_pointer(16)}}static from_json(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=b;t.dnsrecordaoraaaa_from_json(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw c(s);return E.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}static new(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=b;t.dnsrecordaoraaaa_new(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw c(s);return E.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}record(){let _,e;try{const r=t.__wbindgen_add_to_stack_pointer(-16);t.dnsrecordaoraaaa_record(r,this.__wbg_ptr);var s=a()[r/4+0],n=a()[r/4+1];return _=s,e=n,m(s,n)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}}p.exports.DNSRecordAorAAAA=E;class O{static __wrap(_){_=_>>>0;const e=Object.create(O.prototype);return e.__wbg_ptr=_,e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,_}free(){const _=this.__destroy_into_raw();t.__wbg_dnsrecordsrv_free(_)}to_bytes(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.dnsrecordsrv_to_bytes(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=D(_,e).slice();return t.__wbindgen_free(_,e*1),s}finally{t.__wbindgen_add_to_stack_pointer(16)}}static from_bytes(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=Q(_,t.__wbindgen_malloc),o=b;t.dnsrecordsrv_from_bytes(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw c(s);return O.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_hex(){let _,e;try{const r=t.__wbindgen_add_to_stack_pointer(-16);t.dnsrecordsrv_to_hex(r,this.__wbg_ptr);var s=a()[r/4+0],n=a()[r/4+1];return _=s,e=n,m(s,n)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}static from_hex(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=b;t.dnsrecordsrv_from_hex(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw c(s);return O.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_json(){let _,e;try{const l=t.__wbindgen_add_to_stack_pointer(-16);t.dnsrecordaoraaaa_to_json(l,this.__wbg_ptr);var s=a()[l/4+0],n=a()[l/4+1],r=a()[l/4+2],i=a()[l/4+3],o=s,f=n;if(i)throw o=0,f=0,c(r);return _=o,e=f,m(o,f)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}to_js_value(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.dnsrecordaoraaaa_to_js_value(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=a()[n/4+2];if(s)throw c(e);return c(_)}finally{t.__wbindgen_add_to_stack_pointer(16)}}static from_json(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=b;t.dnsrecordaoraaaa_from_json(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw c(s);return O.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}static new(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=b;t.dnsrecordsrv_new(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw c(s);return O.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}record(){let _,e;try{const r=t.__wbindgen_add_to_stack_pointer(-16);t.dnsrecordaoraaaa_record(r,this.__wbg_ptr);var s=a()[r/4+0],n=a()[r/4+1];return _=s,e=n,m(s,n)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}}p.exports.DNSRecordSRV=O;class M{static __wrap(_){_=_>>>0;const e=Object.create(M.prototype);return e.__wbg_ptr=_,e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,_}free(){const _=this.__destroy_into_raw();t.__wbg_datacost_free(_)}static new_coins_per_word(_){g(_,I);const e=t.datacost_new_coins_per_word(_.__wbg_ptr);return M.__wrap(e)}static new_coins_per_byte(_){g(_,I);const e=t.datacost_new_coins_per_byte(_.__wbg_ptr);return M.__wrap(e)}coins_per_byte(){const _=t.datacost_coins_per_byte(this.__wbg_ptr);return I.__wrap(_)}}p.exports.DataCost=M;class U{static __wrap(_){_=_>>>0;const e=Object.create(U.prototype);return e.__wbg_ptr=_,e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,_}free(){const _=this.__destroy_into_raw();t.__wbg_datahash_free(_)}static from_bytes(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=Q(_,t.__wbindgen_malloc),o=b;t.datahash_from_bytes(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw c(s);return U.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_bytes(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.auxiliarydatahash_to_bytes(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=D(_,e).slice();return t.__wbindgen_free(_,e*1),s}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_bech32(_){let e,s;try{const H=t.__wbindgen_add_to_stack_pointer(-16),rt=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),dt=b;t.auxiliarydatahash_to_bech32(H,this.__wbg_ptr,rt,dt);var n=a()[H/4+0],r=a()[H/4+1],i=a()[H/4+2],o=a()[H/4+3],f=n,l=r;if(o)throw f=0,l=0,c(i);return e=f,s=l,m(f,l)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(e,s,1)}}static from_bech32(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=b;t.datahash_from_bech32(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw c(s);return U.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_hex(){let _,e;try{const r=t.__wbindgen_add_to_stack_pointer(-16);t.auxiliarydatahash_to_hex(r,this.__wbg_ptr);var s=a()[r/4+0],n=a()[r/4+1];return _=s,e=n,m(s,n)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}static from_hex(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=b;t.datahash_from_hex(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw c(s);return U.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}}p.exports.DataHash=U;class L{static __wrap(_){_=_>>>0;const e=Object.create(L.prototype);return e.__wbg_ptr=_,e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,_}free(){const _=this.__destroy_into_raw();t.__wbg_datumsource_free(_)}static new(_){g(_,ht);const e=t.datumsource_new(_.__wbg_ptr);return L.__wrap(e)}static new_ref_input(_){g(_,Ct);const e=t.datumsource_new_ref_input(_.__wbg_ptr);return L.__wrap(e)}}p.exports.DatumSource=L;class W{static __wrap(_){_=_>>>0;const e=Object.create(W.prototype);return e.__wbg_ptr=_,e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,_}free(){const _=this.__destroy_into_raw();t.__wbg_ed25519keyhash_free(_)}static from_bytes(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=Q(_,t.__wbindgen_malloc),o=b;t.ed25519keyhash_from_bytes(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw c(s);return W.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_bytes(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.ed25519keyhash_to_bytes(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=D(_,e).slice();return t.__wbindgen_free(_,e*1),s}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_bech32(_){let e,s;try{const H=t.__wbindgen_add_to_stack_pointer(-16),rt=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),dt=b;t.ed25519keyhash_to_bech32(H,this.__wbg_ptr,rt,dt);var n=a()[H/4+0],r=a()[H/4+1],i=a()[H/4+2],o=a()[H/4+3],f=n,l=r;if(o)throw f=0,l=0,c(i);return e=f,s=l,m(f,l)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(e,s,1)}}static from_bech32(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=b;t.ed25519keyhash_from_bech32(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw c(s);return W.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_hex(){let _,e;try{const r=t.__wbindgen_add_to_stack_pointer(-16);t.ed25519keyhash_to_hex(r,this.__wbg_ptr);var s=a()[r/4+0],n=a()[r/4+1];return _=s,e=n,m(s,n)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}static from_hex(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=b;t.ed25519keyhash_from_hex(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw c(s);return W.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}}p.exports.Ed25519KeyHash=W;class Z{static __wrap(_){_=_>>>0;const e=Object.create(Z.prototype);return e.__wbg_ptr=_,e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,_}free(){const _=this.__destroy_into_raw();t.__wbg_ed25519keyhashes_free(_)}to_bytes(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.ed25519keyhashes_to_bytes(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=D(_,e).slice();return t.__wbindgen_free(_,e*1),s}finally{t.__wbindgen_add_to_stack_pointer(16)}}static from_bytes(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=Q(_,t.__wbindgen_malloc),o=b;t.ed25519keyhashes_from_bytes(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw c(s);return Z.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_hex(){let _,e;try{const r=t.__wbindgen_add_to_stack_pointer(-16);t.ed25519keyhashes_to_hex(r,this.__wbg_ptr);var s=a()[r/4+0],n=a()[r/4+1];return _=s,e=n,m(s,n)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}static from_hex(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=b;t.ed25519keyhashes_from_hex(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw c(s);return Z.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_json(){let _,e;try{const l=t.__wbindgen_add_to_stack_pointer(-16);t.ed25519keyhashes_to_json(l,this.__wbg_ptr);var s=a()[l/4+0],n=a()[l/4+1],r=a()[l/4+2],i=a()[l/4+3],o=s,f=n;if(i)throw o=0,f=0,c(r);return _=o,e=f,m(o,f)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}to_js_value(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.ed25519keyhashes_to_js_value(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=a()[n/4+2];if(s)throw c(e);return c(_)}finally{t.__wbindgen_add_to_stack_pointer(16)}}static from_json(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=b;t.ed25519keyhashes_from_json(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw c(s);return Z.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}static new(){const _=t.ed25519keyhashes_new();return Z.__wrap(_)}len(){return t.assetnames_len(this.__wbg_ptr)>>>0}get(_){const e=t.ed25519keyhashes_get(this.__wbg_ptr,_);return W.__wrap(e)}add(_){g(_,W),t.ed25519keyhashes_add(this.__wbg_ptr,_.__wbg_ptr)}to_option(){const _=t.ed25519keyhashes_to_option(this.__wbg_ptr);return _===0?void 0:Z.__wrap(_)}}p.exports.Ed25519KeyHashes=Z;class it{static __wrap(_){_=_>>>0;const e=Object.create(it.prototype);return e.__wbg_ptr=_,e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,_}free(){const _=this.__destroy_into_raw();t.__wbg_ed25519signature_free(_)}to_bytes(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.bip32publickey_as_bytes(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=D(_,e).slice();return t.__wbindgen_free(_,e*1),s}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_bech32(){let _,e;try{const r=t.__wbindgen_add_to_stack_pointer(-16);t.ed25519signature_to_bech32(r,this.__wbg_ptr);var s=a()[r/4+0],n=a()[r/4+1];return _=s,e=n,m(s,n)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}to_hex(){let _,e;try{const r=t.__wbindgen_add_to_stack_pointer(-16);t.ed25519signature_to_hex(r,this.__wbg_ptr);var s=a()[r/4+0],n=a()[r/4+1];return _=s,e=n,m(s,n)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}static from_bech32(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=b;t.ed25519signature_from_bech32(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw c(s);return it.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}static from_hex(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=b;t.ed25519signature_from_hex(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw c(s);return it.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}static from_bytes(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=Q(_,t.__wbindgen_malloc),o=b;t.ed25519signature_from_bytes(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw c(s);return it.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}}p.exports.Ed25519Signature=it;class Bt{static __wrap(_){_=_>>>0;const e=Object.create(Bt.prototype);return e.__wbg_ptr=_,e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,_}free(){const _=this.__destroy_into_raw();t.__wbg_enterpriseaddress_free(_)}static new(_,e){g(e,Qt);const s=t.enterpriseaddress_new(_,e.__wbg_ptr);return Bt.__wrap(s)}payment_cred(){const _=t.baseaddress_payment_cred(this.__wbg_ptr);return Qt.__wrap(_)}to_address(){const _=t.enterpriseaddress_to_address(this.__wbg_ptr);return pt.__wrap(_)}static from_address(_){g(_,pt);const e=t.enterpriseaddress_from_address(_.__wbg_ptr);return e===0?void 0:Bt.__wrap(e)}}p.exports.EnterpriseAddress=Bt;class vt{static __wrap(_){_=_>>>0;const e=Object.create(vt.prototype);return e.__wbg_ptr=_,e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,_}free(){const _=this.__destroy_into_raw();t.__wbg_exunitprices_free(_)}to_bytes(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.exunitprices_to_bytes(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=D(_,e).slice();return t.__wbindgen_free(_,e*1),s}finally{t.__wbindgen_add_to_stack_pointer(16)}}static from_bytes(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=Q(_,t.__wbindgen_malloc),o=b;t.exunitprices_from_bytes(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw c(s);return vt.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_hex(){let _,e;try{const r=t.__wbindgen_add_to_stack_pointer(-16);t.exunitprices_to_hex(r,this.__wbg_ptr);var s=a()[r/4+0],n=a()[r/4+1];return _=s,e=n,m(s,n)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}static from_hex(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=b;t.exunitprices_from_hex(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw c(s);return vt.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_json(){let _,e;try{const l=t.__wbindgen_add_to_stack_pointer(-16);t.exunitprices_to_json(l,this.__wbg_ptr);var s=a()[l/4+0],n=a()[l/4+1],r=a()[l/4+2],i=a()[l/4+3],o=s,f=n;if(i)throw o=0,f=0,c(r);return _=o,e=f,m(o,f)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}to_js_value(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.exunitprices_to_js_value(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=a()[n/4+2];if(s)throw c(e);return c(_)}finally{t.__wbindgen_add_to_stack_pointer(16)}}static from_json(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=b;t.exunitprices_from_json(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw c(s);return vt.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}mem_price(){const _=t.exunitprices_mem_price(this.__wbg_ptr);return Lt.__wrap(_)}step_price(){const _=t.exunitprices_step_price(this.__wbg_ptr);return Lt.__wrap(_)}static new(_,e){g(_,Lt),g(e,Lt);const s=t.exunitprices_new(_.__wbg_ptr,e.__wbg_ptr);return vt.__wrap(s)}}p.exports.ExUnitPrices=vt;class at{static __wrap(_){_=_>>>0;const e=Object.create(at.prototype);return e.__wbg_ptr=_,e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,_}free(){const _=this.__destroy_into_raw();t.__wbg_exunits_free(_)}to_bytes(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.exunits_to_bytes(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=D(_,e).slice();return t.__wbindgen_free(_,e*1),s}finally{t.__wbindgen_add_to_stack_pointer(16)}}static from_bytes(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=Q(_,t.__wbindgen_malloc),o=b;t.exunits_from_bytes(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw c(s);return at.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_hex(){let _,e;try{const r=t.__wbindgen_add_to_stack_pointer(-16);t.exunits_to_hex(r,this.__wbg_ptr);var s=a()[r/4+0],n=a()[r/4+1];return _=s,e=n,m(s,n)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}static from_hex(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=b;t.exunits_from_hex(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw c(s);return at.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_json(){let _,e;try{const l=t.__wbindgen_add_to_stack_pointer(-16);t.exunits_to_json(l,this.__wbg_ptr);var s=a()[l/4+0],n=a()[l/4+1],r=a()[l/4+2],i=a()[l/4+3],o=s,f=n;if(i)throw o=0,f=0,c(r);return _=o,e=f,m(o,f)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}to_js_value(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.exunits_to_js_value(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=a()[n/4+2];if(s)throw c(e);return c(_)}finally{t.__wbindgen_add_to_stack_pointer(16)}}static from_json(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=b;t.exunits_from_json(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw c(s);return at.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}mem(){const _=t.exunits_mem(this.__wbg_ptr);return I.__wrap(_)}steps(){const _=t.exunits_steps(this.__wbg_ptr);return I.__wrap(_)}static new(_,e){g(_,I),g(e,I);const s=t.exunits_new(_.__wbg_ptr,e.__wbg_ptr);return at.__wrap(s)}}p.exports.ExUnits=at;class ft{static __wrap(_){_=_>>>0;const e=Object.create(ft.prototype);return e.__wbg_ptr=_,e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,_}free(){const _=this.__destroy_into_raw();t.__wbg_fixedtransaction_free(_)}to_bytes(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.fixedtransaction_to_bytes(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=D(_,e).slice();return t.__wbindgen_free(_,e*1),s}finally{t.__wbindgen_add_to_stack_pointer(16)}}static from_bytes(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=Q(_,t.__wbindgen_malloc),o=b;t.fixedtransaction_from_bytes(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw c(s);return ft.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_hex(){let _,e;try{const r=t.__wbindgen_add_to_stack_pointer(-16);t.fixedtransaction_to_hex(r,this.__wbg_ptr);var s=a()[r/4+0],n=a()[r/4+1];return _=s,e=n,m(s,n)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}static from_hex(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=b;t.fixedtransaction_from_hex(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw c(s);return ft.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}static new(_,e,s){try{const o=t.__wbindgen_add_to_stack_pointer(-16),f=Q(_,t.__wbindgen_malloc),l=b,H=Q(e,t.__wbindgen_malloc),rt=b;t.fixedtransaction_new(o,f,l,H,rt,s);var n=a()[o/4+0],r=a()[o/4+1],i=a()[o/4+2];if(i)throw c(r);return ft.__wrap(n)}finally{t.__wbindgen_add_to_stack_pointer(16)}}static new_with_auxiliary(_,e,s,n){try{const f=t.__wbindgen_add_to_stack_pointer(-16),l=Q(_,t.__wbindgen_malloc),H=b,rt=Q(e,t.__wbindgen_malloc),dt=b,Je=Q(s,t.__wbindgen_malloc),hr=b;t.fixedtransaction_new_with_auxiliary(f,l,H,rt,dt,Je,hr,n);var r=a()[f/4+0],i=a()[f/4+1],o=a()[f/4+2];if(o)throw c(i);return ft.__wrap(r)}finally{t.__wbindgen_add_to_stack_pointer(16)}}body(){const _=t.fixedtransaction_body(this.__wbg_ptr);return Wt.__wrap(_)}raw_body(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.fixedtransaction_raw_body(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=D(_,e).slice();return t.__wbindgen_free(_,e*1),s}finally{t.__wbindgen_add_to_stack_pointer(16)}}set_body(_){try{const n=t.__wbindgen_add_to_stack_pointer(-16),r=Q(_,t.__wbindgen_malloc),i=b;t.fixedtransaction_set_body(n,this.__wbg_ptr,r,i);var e=a()[n/4+0],s=a()[n/4+1];if(s)throw c(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}set_witness_set(_){try{const n=t.__wbindgen_add_to_stack_pointer(-16),r=Q(_,t.__wbindgen_malloc),i=b;t.fixedtransaction_set_witness_set(n,this.__wbg_ptr,r,i);var e=a()[n/4+0],s=a()[n/4+1];if(s)throw c(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}witness_set(){const _=t.fixedtransaction_witness_set(this.__wbg_ptr);return f_.__wrap(_)}raw_witness_set(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.fixedtransaction_raw_witness_set(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=D(_,e).slice();return t.__wbindgen_free(_,e*1),s}finally{t.__wbindgen_add_to_stack_pointer(16)}}set_is_valid(_){t.fixedtransaction_set_is_valid(this.__wbg_ptr,_)}is_valid(){return t.fixedtransaction_is_valid(this.__wbg_ptr)!==0}set_auxiliary_data(_){try{const n=t.__wbindgen_add_to_stack_pointer(-16),r=Q(_,t.__wbindgen_malloc),i=b;t.fixedtransaction_set_auxiliary_data(n,this.__wbg_ptr,r,i);var e=a()[n/4+0],s=a()[n/4+1];if(s)throw c(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}auxiliary_data(){const _=t.fixedtransaction_auxiliary_data(this.__wbg_ptr);return _===0?void 0:Pt.__wrap(_)}raw_auxiliary_data(){try{const s=t.__wbindgen_add_to_stack_pointer(-16);t.fixedtransaction_raw_auxiliary_data(s,this.__wbg_ptr);var _=a()[s/4+0],e=a()[s/4+1];let n;return _!==0&&(n=D(_,e).slice(),t.__wbindgen_free(_,e*1)),n}finally{t.__wbindgen_add_to_stack_pointer(16)}}}p.exports.FixedTransaction=ft;class Ot{static __wrap(_){_=_>>>0;const e=Object.create(Ot.prototype);return e.__wbg_ptr=_,e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,_}free(){const _=this.__destroy_into_raw();t.__wbg_generaltransactionmetadata_free(_)}to_bytes(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.generaltransactionmetadata_to_bytes(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=D(_,e).slice();return t.__wbindgen_free(_,e*1),s}finally{t.__wbindgen_add_to_stack_pointer(16)}}static from_bytes(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=Q(_,t.__wbindgen_malloc),o=b;t.generaltransactionmetadata_from_bytes(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw c(s);return Ot.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_hex(){let _,e;try{const r=t.__wbindgen_add_to_stack_pointer(-16);t.generaltransactionmetadata_to_hex(r,this.__wbg_ptr);var s=a()[r/4+0],n=a()[r/4+1];return _=s,e=n,m(s,n)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}static from_hex(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=b;t.generaltransactionmetadata_from_hex(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw c(s);return Ot.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_json(){let _,e;try{const l=t.__wbindgen_add_to_stack_pointer(-16);t.generaltransactionmetadata_to_json(l,this.__wbg_ptr);var s=a()[l/4+0],n=a()[l/4+1],r=a()[l/4+2],i=a()[l/4+3],o=s,f=n;if(i)throw o=0,f=0,c(r);return _=o,e=f,m(o,f)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}to_js_value(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.generaltransactionmetadata_to_js_value(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=a()[n/4+2];if(s)throw c(e);return c(_)}finally{t.__wbindgen_add_to_stack_pointer(16)}}static from_json(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=b;t.generaltransactionmetadata_from_json(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw c(s);return Ot.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}static new(){const _=t.auxiliarydataset_new();return Ot.__wrap(_)}len(){return t.auxiliarydataset_len(this.__wbg_ptr)>>>0}insert(_,e){g(_,I),g(e,mt);const s=t.generaltransactionmetadata_insert(this.__wbg_ptr,_.__wbg_ptr,e.__wbg_ptr);return s===0?void 0:mt.__wrap(s)}get(_){g(_,I);const e=t.generaltransactionmetadata_get(this.__wbg_ptr,_.__wbg_ptr);return e===0?void 0:mt.__wrap(e)}keys(){const _=t.generaltransactionmetadata_keys(this.__wbg_ptr);return Ge.__wrap(_)}}p.exports.GeneralTransactionMetadata=Ot;class o_{static __wrap(_){_=_>>>0;const e=Object.create(o_.prototype);return e.__wbg_ptr=_,e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,_}free(){const _=this.__destroy_into_raw();t.__wbg_genesisdelegatehash_free(_)}static from_bytes(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=Q(_,t.__wbindgen_malloc),o=b;t.genesisdelegatehash_from_bytes(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw c(s);return o_.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_bytes(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.ed25519keyhash_to_bytes(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=D(_,e).slice();return t.__wbindgen_free(_,e*1),s}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_bech32(_){let e,s;try{const H=t.__wbindgen_add_to_stack_pointer(-16),rt=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),dt=b;t.ed25519keyhash_to_bech32(H,this.__wbg_ptr,rt,dt);var n=a()[H/4+0],r=a()[H/4+1],i=a()[H/4+2],o=a()[H/4+3],f=n,l=r;if(o)throw f=0,l=0,c(i);return e=f,s=l,m(f,l)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(e,s,1)}}static from_bech32(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=b;t.genesisdelegatehash_from_bech32(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw c(s);return o_.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_hex(){let _,e;try{const r=t.__wbindgen_add_to_stack_pointer(-16);t.ed25519keyhash_to_hex(r,this.__wbg_ptr);var s=a()[r/4+0],n=a()[r/4+1];return _=s,e=n,m(s,n)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}static from_hex(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=b;t.genesisdelegatehash_from_hex(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw c(s);return o_.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}}p.exports.GenesisDelegateHash=o_;class Xt{static __wrap(_){_=_>>>0;const e=Object.create(Xt.prototype);return e.__wbg_ptr=_,e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,_}free(){const _=this.__destroy_into_raw();t.__wbg_genesishash_free(_)}static from_bytes(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=Q(_,t.__wbindgen_malloc),o=b;t.genesishash_from_bytes(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw c(s);return Xt.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_bytes(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.ed25519keyhash_to_bytes(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=D(_,e).slice();return t.__wbindgen_free(_,e*1),s}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_bech32(_){let e,s;try{const H=t.__wbindgen_add_to_stack_pointer(-16),rt=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),dt=b;t.ed25519keyhash_to_bech32(H,this.__wbg_ptr,rt,dt);var n=a()[H/4+0],r=a()[H/4+1],i=a()[H/4+2],o=a()[H/4+3],f=n,l=r;if(o)throw f=0,l=0,c(i);return e=f,s=l,m(f,l)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(e,s,1)}}static from_bech32(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=b;t.genesishash_from_bech32(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw c(s);return Xt.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_hex(){let _,e;try{const r=t.__wbindgen_add_to_stack_pointer(-16);t.ed25519keyhash_to_hex(r,this.__wbg_ptr);var s=a()[r/4+0],n=a()[r/4+1];return _=s,e=n,m(s,n)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}static from_hex(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=b;t.genesishash_from_hex(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw c(s);return Xt.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}}p.exports.GenesisHash=Xt;class c_{static __wrap(_){_=_>>>0;const e=Object.create(c_.prototype);return e.__wbg_ptr=_,e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,_}free(){const _=this.__destroy_into_raw();t.__wbg_genesishashes_free(_)}to_bytes(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.genesishashes_to_bytes(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=D(_,e).slice();return t.__wbindgen_free(_,e*1),s}finally{t.__wbindgen_add_to_stack_pointer(16)}}static from_bytes(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=Q(_,t.__wbindgen_malloc),o=b;t.genesishashes_from_bytes(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw c(s);return c_.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_hex(){let _,e;try{const r=t.__wbindgen_add_to_stack_pointer(-16);t.genesishashes_to_hex(r,this.__wbg_ptr);var s=a()[r/4+0],n=a()[r/4+1];return _=s,e=n,m(s,n)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}static from_hex(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=b;t.genesishashes_from_hex(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw c(s);return c_.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_json(){let _,e;try{const l=t.__wbindgen_add_to_stack_pointer(-16);t.ed25519keyhashes_to_json(l,this.__wbg_ptr);var s=a()[l/4+0],n=a()[l/4+1],r=a()[l/4+2],i=a()[l/4+3],o=s,f=n;if(i)throw o=0,f=0,c(r);return _=o,e=f,m(o,f)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}to_js_value(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.ed25519keyhashes_to_js_value(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=a()[n/4+2];if(s)throw c(e);return c(_)}finally{t.__wbindgen_add_to_stack_pointer(16)}}static from_json(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=b;t.genesishashes_from_json(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw c(s);return c_.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}static new(){const _=t.ed25519keyhashes_new();return c_.__wrap(_)}len(){return t.assetnames_len(this.__wbg_ptr)>>>0}get(_){const e=t.genesishashes_get(this.__wbg_ptr,_);return Xt.__wrap(e)}add(_){g(_,Xt),t.ed25519keyhashes_add(this.__wbg_ptr,_.__wbg_ptr)}}p.exports.GenesisHashes=c_;class Rt{static __wrap(_){_=_>>>0;const e=Object.create(Rt.prototype);return e.__wbg_ptr=_,e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,_}free(){const _=this.__destroy_into_raw();t.__wbg_genesiskeydelegation_free(_)}to_bytes(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.genesiskeydelegation_to_bytes(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=D(_,e).slice();return t.__wbindgen_free(_,e*1),s}finally{t.__wbindgen_add_to_stack_pointer(16)}}static from_bytes(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=Q(_,t.__wbindgen_malloc),o=b;t.genesiskeydelegation_from_bytes(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw c(s);return Rt.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_hex(){let _,e;try{const r=t.__wbindgen_add_to_stack_pointer(-16);t.genesiskeydelegation_to_hex(r,this.__wbg_ptr);var s=a()[r/4+0],n=a()[r/4+1];return _=s,e=n,m(s,n)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}static from_hex(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=b;t.genesiskeydelegation_from_hex(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw c(s);return Rt.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_json(){let _,e;try{const l=t.__wbindgen_add_to_stack_pointer(-16);t.genesiskeydelegation_to_json(l,this.__wbg_ptr);var s=a()[l/4+0],n=a()[l/4+1],r=a()[l/4+2],i=a()[l/4+3],o=s,f=n;if(i)throw o=0,f=0,c(r);return _=o,e=f,m(o,f)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}to_js_value(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.genesiskeydelegation_to_js_value(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=a()[n/4+2];if(s)throw c(e);return c(_)}finally{t.__wbindgen_add_to_stack_pointer(16)}}static from_json(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=b;t.genesiskeydelegation_from_json(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw c(s);return Rt.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}genesishash(){const _=t.genesiskeydelegation_genesishash(this.__wbg_ptr);return Xt.__wrap(_)}genesis_delegate_hash(){const _=t.genesiskeydelegation_genesis_delegate_hash(this.__wbg_ptr);return o_.__wrap(_)}vrf_keyhash(){const _=t.genesiskeydelegation_vrf_keyhash(this.__wbg_ptr);return M_.__wrap(_)}static new(_,e,s){g(_,Xt),g(e,o_),g(s,M_);const n=t.genesiskeydelegation_new(_.__wbg_ptr,e.__wbg_ptr,s.__wbg_ptr);return Rt.__wrap(n)}}p.exports.GenesisKeyDelegation=Rt;class __{static __wrap(_){_=_>>>0;const e=Object.create(__.prototype);return e.__wbg_ptr=_,e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,_}free(){const _=this.__destroy_into_raw();t.__wbg_header_free(_)}to_bytes(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.header_to_bytes(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=D(_,e).slice();return t.__wbindgen_free(_,e*1),s}finally{t.__wbindgen_add_to_stack_pointer(16)}}static from_bytes(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=Q(_,t.__wbindgen_malloc),o=b;t.header_from_bytes(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw c(s);return __.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_hex(){let _,e;try{const r=t.__wbindgen_add_to_stack_pointer(-16);t.header_to_hex(r,this.__wbg_ptr);var s=a()[r/4+0],n=a()[r/4+1];return _=s,e=n,m(s,n)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}static from_hex(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=b;t.header_from_hex(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw c(s);return __.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_json(){let _,e;try{const l=t.__wbindgen_add_to_stack_pointer(-16);t.header_to_json(l,this.__wbg_ptr);var s=a()[l/4+0],n=a()[l/4+1],r=a()[l/4+2],i=a()[l/4+3],o=s,f=n;if(i)throw o=0,f=0,c(r);return _=o,e=f,m(o,f)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}to_js_value(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.header_to_js_value(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=a()[n/4+2];if(s)throw c(e);return c(_)}finally{t.__wbindgen_add_to_stack_pointer(16)}}static from_json(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=b;t.header_from_json(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw c(s);return __.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}header_body(){const _=t.header_header_body(this.__wbg_ptr);return Mt.__wrap(_)}body_signature(){const _=t.header_body_signature(this.__wbg_ptr);return tr.__wrap(_)}static new(_,e){g(_,Mt),g(e,tr);const s=t.header_new(_.__wbg_ptr,e.__wbg_ptr);return __.__wrap(s)}}p.exports.Header=__;class Mt{static __wrap(_){_=_>>>0;const e=Object.create(Mt.prototype);return e.__wbg_ptr=_,e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,_}free(){const _=this.__destroy_into_raw();t.__wbg_headerbody_free(_)}to_bytes(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.headerbody_to_bytes(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=D(_,e).slice();return t.__wbindgen_free(_,e*1),s}finally{t.__wbindgen_add_to_stack_pointer(16)}}static from_bytes(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=Q(_,t.__wbindgen_malloc),o=b;t.headerbody_from_bytes(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw c(s);return Mt.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_hex(){let _,e;try{const r=t.__wbindgen_add_to_stack_pointer(-16);t.headerbody_to_hex(r,this.__wbg_ptr);var s=a()[r/4+0],n=a()[r/4+1];return _=s,e=n,m(s,n)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}static from_hex(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=b;t.headerbody_from_hex(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw c(s);return Mt.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_json(){let _,e;try{const l=t.__wbindgen_add_to_stack_pointer(-16);t.headerbody_to_json(l,this.__wbg_ptr);var s=a()[l/4+0],n=a()[l/4+1],r=a()[l/4+2],i=a()[l/4+3],o=s,f=n;if(i)throw o=0,f=0,c(r);return _=o,e=f,m(o,f)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}to_js_value(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.headerbody_to_js_value(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=a()[n/4+2];if(s)throw c(e);return c(_)}finally{t.__wbindgen_add_to_stack_pointer(16)}}static from_json(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=b;t.headerbody_from_json(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw c(s);return Mt.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}block_number(){return t.headerbody_block_number(this.__wbg_ptr)>>>0}slot(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.headerbody_slot(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=a()[n/4+2];if(s)throw c(e);return _>>>0}finally{t.__wbindgen_add_to_stack_pointer(16)}}slot_bignum(){const _=t.headerbody_slot_bignum(this.__wbg_ptr);return I.__wrap(_)}prev_hash(){const _=t.headerbody_prev_hash(this.__wbg_ptr);return _===0?void 0:et.__wrap(_)}issuer_vkey(){const _=t.headerbody_issuer_vkey(this.__wbg_ptr);return Zt.__wrap(_)}vrf_vkey(){const _=t.headerbody_vrf_vkey(this.__wbg_ptr);return Ae.__wrap(_)}has_nonce_and_leader_vrf(){return t.headerbody_has_nonce_and_leader_vrf(this.__wbg_ptr)!==0}nonce_vrf_or_nothing(){const _=t.headerbody_nonce_vrf_or_nothing(this.__wbg_ptr);return _===0?void 0:h_.__wrap(_)}leader_vrf_or_nothing(){const _=t.headerbody_leader_vrf_or_nothing(this.__wbg_ptr);return _===0?void 0:h_.__wrap(_)}has_vrf_result(){return t.headerbody_has_vrf_result(this.__wbg_ptr)!==0}vrf_result_or_nothing(){const _=t.headerbody_vrf_result_or_nothing(this.__wbg_ptr);return _===0?void 0:h_.__wrap(_)}block_body_size(){return t.headerbody_block_body_size(this.__wbg_ptr)>>>0}block_body_hash(){const _=t.headerbody_block_body_hash(this.__wbg_ptr);return et.__wrap(_)}operational_cert(){const _=t.headerbody_operational_cert(this.__wbg_ptr);return D_.__wrap(_)}protocol_version(){const _=t.headerbody_protocol_version(this.__wbg_ptr);return w_.__wrap(_)}static new(_,e,s,n,r,i,o,f,l,H){let rt=0;nt(s)||(g(s,et),rt=s.__destroy_into_raw()),g(n,Zt),g(r,Ae),g(i,h_),g(f,et),g(l,D_),g(H,w_);const dt=t.headerbody_new(_,e,rt,n.__wbg_ptr,r.__wbg_ptr,i.__wbg_ptr,o,f.__wbg_ptr,l.__wbg_ptr,H.__wbg_ptr);return Mt.__wrap(dt)}static new_headerbody(_,e,s,n,r,i,o,f,l,H){g(e,I);let rt=0;nt(s)||(g(s,et),rt=s.__destroy_into_raw()),g(n,Zt),g(r,Ae),g(i,h_),g(f,et),g(l,D_),g(H,w_);const dt=t.headerbody_new_headerbody(_,e.__wbg_ptr,rt,n.__wbg_ptr,r.__wbg_ptr,i.__wbg_ptr,o,f.__wbg_ptr,l.__wbg_ptr,H.__wbg_ptr);return Mt.__wrap(dt)}}p.exports.HeaderBody=Mt;class Kt{static __wrap(_){_=_>>>0;const e=Object.create(Kt.prototype);return e.__wbg_ptr=_,e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,_}free(){const _=this.__destroy_into_raw();t.__wbg_inputwithscriptwitness_free(_)}static new_with_native_script_witness(_,e){g(_,Ct),g(e,Nt);const s=t.inputwithscriptwitness_new_with_native_script_witness(_.__wbg_ptr,e.__wbg_ptr);return Kt.__wrap(s)}static new_with_plutus_witness(_,e){g(_,Ct),g(e,p_);const s=t.inputwithscriptwitness_new_with_plutus_witness(_.__wbg_ptr,e.__wbg_ptr);return Kt.__wrap(s)}input(){const _=t.inputwithscriptwitness_input(this.__wbg_ptr);return Ct.__wrap(_)}}p.exports.InputWithScriptWitness=Kt;class Et{static __wrap(_){_=_>>>0;const e=Object.create(Et.prototype);return e.__wbg_ptr=_,e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,_}free(){const _=this.__destroy_into_raw();t.__wbg_inputswithscriptwitness_free(_)}static new(){const _=t.certificates_new();return Et.__wrap(_)}add(_){g(_,Kt),t.inputswithscriptwitness_add(this.__wbg_ptr,_.__wbg_ptr)}get(_){const e=t.inputswithscriptwitness_get(this.__wbg_ptr,_);return Kt.__wrap(e)}len(){return t.assetnames_len(this.__wbg_ptr)>>>0}}p.exports.InputsWithScriptWitness=Et;class St{static __wrap(_){_=_>>>0;const e=Object.create(St.prototype);return e.__wbg_ptr=_,e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,_}free(){const _=this.__destroy_into_raw();t.__wbg_int_free(_)}to_bytes(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.int_to_bytes(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=D(_,e).slice();return t.__wbindgen_free(_,e*1),s}finally{t.__wbindgen_add_to_stack_pointer(16)}}static from_bytes(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=Q(_,t.__wbindgen_malloc),o=b;t.int_from_bytes(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw c(s);return St.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_hex(){let _,e;try{const r=t.__wbindgen_add_to_stack_pointer(-16);t.int_to_hex(r,this.__wbg_ptr);var s=a()[r/4+0],n=a()[r/4+1];return _=s,e=n,m(s,n)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}static from_hex(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=b;t.int_from_hex(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw c(s);return St.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_json(){let _,e;try{const l=t.__wbindgen_add_to_stack_pointer(-16);t.int_to_json(l,this.__wbg_ptr);var s=a()[l/4+0],n=a()[l/4+1],r=a()[l/4+2],i=a()[l/4+3],o=s,f=n;if(i)throw o=0,f=0,c(r);return _=o,e=f,m(o,f)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}to_js_value(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.int_to_js_value(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=a()[n/4+2];if(s)throw c(e);return c(_)}finally{t.__wbindgen_add_to_stack_pointer(16)}}static from_json(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=b;t.int_from_json(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw c(s);return St.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}static new(_){g(_,I);const e=t.int_new(_.__wbg_ptr);return St.__wrap(e)}static new_negative(_){g(_,I);const e=t.int_new_negative(_.__wbg_ptr);return St.__wrap(e)}static new_i32(_){const e=t.int_new_i32(_);return St.__wrap(e)}is_positive(){return t.int_is_positive(this.__wbg_ptr)!==0}as_positive(){const _=t.int_as_positive(this.__wbg_ptr);return _===0?void 0:I.__wrap(_)}as_negative(){const _=t.int_as_negative(this.__wbg_ptr);return _===0?void 0:I.__wrap(_)}as_i32(){try{const s=t.__wbindgen_add_to_stack_pointer(-16);t.int_as_i32(s,this.__wbg_ptr);var _=a()[s/4+0],e=a()[s/4+1];return _===0?void 0:e}finally{t.__wbindgen_add_to_stack_pointer(16)}}as_i32_or_nothing(){try{const s=t.__wbindgen_add_to_stack_pointer(-16);t.int_as_i32_or_nothing(s,this.__wbg_ptr);var _=a()[s/4+0],e=a()[s/4+1];return _===0?void 0:e}finally{t.__wbindgen_add_to_stack_pointer(16)}}as_i32_or_fail(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.int_as_i32_or_fail(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=a()[n/4+2];if(s)throw c(e);return _}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_str(){let _,e;try{const r=t.__wbindgen_add_to_stack_pointer(-16);t.int_to_str(r,this.__wbg_ptr);var s=a()[r/4+0],n=a()[r/4+1];return _=s,e=n,m(s,n)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}static from_str(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=b;t.int_from_str(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw c(s);return St.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}}p.exports.Int=St;class G_{static __wrap(_){_=_>>>0;const e=Object.create(G_.prototype);return e.__wbg_ptr=_,e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,_}free(){const _=this.__destroy_into_raw();t.__wbg_ipv4_free(_)}to_bytes(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.ipv4_to_bytes(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=D(_,e).slice();return t.__wbindgen_free(_,e*1),s}finally{t.__wbindgen_add_to_stack_pointer(16)}}static from_bytes(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=Q(_,t.__wbindgen_malloc),o=b;t.ipv4_from_bytes(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw c(s);return G_.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_hex(){let _,e;try{const r=t.__wbindgen_add_to_stack_pointer(-16);t.ipv4_to_hex(r,this.__wbg_ptr);var s=a()[r/4+0],n=a()[r/4+1];return _=s,e=n,m(s,n)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}static from_hex(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=b;t.ipv4_from_hex(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw c(s);return G_.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_json(){let _,e;try{const l=t.__wbindgen_add_to_stack_pointer(-16);t.ipv4_to_json(l,this.__wbg_ptr);var s=a()[l/4+0],n=a()[l/4+1],r=a()[l/4+2],i=a()[l/4+3],o=s,f=n;if(i)throw o=0,f=0,c(r);return _=o,e=f,m(o,f)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}to_js_value(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.ipv4_to_js_value(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=a()[n/4+2];if(s)throw c(e);return c(_)}finally{t.__wbindgen_add_to_stack_pointer(16)}}static from_json(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=b;t.ipv4_from_json(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw c(s);return G_.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}static new(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=Q(_,t.__wbindgen_malloc),o=b;t.ipv4_new(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw c(s);return G_.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}ip(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.ipv4_ip(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=D(_,e).slice();return t.__wbindgen_free(_,e*1),s}finally{t.__wbindgen_add_to_stack_pointer(16)}}}p.exports.Ipv4=G_;class $_{static __wrap(_){_=_>>>0;const e=Object.create($_.prototype);return e.__wbg_ptr=_,e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,_}free(){const _=this.__destroy_into_raw();t.__wbg_ipv6_free(_)}to_bytes(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.ipv6_to_bytes(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=D(_,e).slice();return t.__wbindgen_free(_,e*1),s}finally{t.__wbindgen_add_to_stack_pointer(16)}}static from_bytes(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=Q(_,t.__wbindgen_malloc),o=b;t.ipv6_from_bytes(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw c(s);return $_.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_hex(){let _,e;try{const r=t.__wbindgen_add_to_stack_pointer(-16);t.ipv6_to_hex(r,this.__wbg_ptr);var s=a()[r/4+0],n=a()[r/4+1];return _=s,e=n,m(s,n)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}static from_hex(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=b;t.ipv6_from_hex(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw c(s);return $_.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_json(){let _,e;try{const l=t.__wbindgen_add_to_stack_pointer(-16);t.ipv6_to_json(l,this.__wbg_ptr);var s=a()[l/4+0],n=a()[l/4+1],r=a()[l/4+2],i=a()[l/4+3],o=s,f=n;if(i)throw o=0,f=0,c(r);return _=o,e=f,m(o,f)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}to_js_value(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.ipv6_to_js_value(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=a()[n/4+2];if(s)throw c(e);return c(_)}finally{t.__wbindgen_add_to_stack_pointer(16)}}static from_json(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=b;t.ipv6_from_json(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw c(s);return $_.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}static new(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=Q(_,t.__wbindgen_malloc),o=b;t.ipv6_new(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw c(s);return $_.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}ip(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.ipv6_ip(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=D(_,e).slice();return t.__wbindgen_free(_,e*1),s}finally{t.__wbindgen_add_to_stack_pointer(16)}}}p.exports.Ipv6=$_;class Ze{static __wrap(_){_=_>>>0;const e=Object.create(Ze.prototype);return e.__wbg_ptr=_,e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,_}free(){const _=this.__destroy_into_raw();t.__wbg_jsvecstring_free(_)}static new(){const _=t.jsvecstring_new();return Ze.__wrap(_)}len(){return t.jsvecstring_len(this.__wbg_ptr)>>>0}is_empty(){return t.jsvecstring_is_empty(this.__wbg_ptr)!==0}get(_){let e,s;try{const i=t.__wbindgen_add_to_stack_pointer(-16);t.jsvecstring_get(i,this.__wbg_ptr,_);var n=a()[i/4+0],r=a()[i/4+1];return e=n,s=r,m(n,r)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(e,s,1)}}add(_){const e=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),s=b;t.jsvecstring_add(this.__wbg_ptr,e,s)}}p.exports.JsVecString=Ze;class tr{static __wrap(_){_=_>>>0;const e=Object.create(tr.prototype);return e.__wbg_ptr=_,e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,_}free(){const _=this.__destroy_into_raw();t.__wbg_kessignature_free(_)}to_bytes(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.assetname_name(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=D(_,e).slice();return t.__wbindgen_free(_,e*1),s}finally{t.__wbindgen_add_to_stack_pointer(16)}}static from_bytes(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=Q(_,t.__wbindgen_malloc),o=b;t.kessignature_from_bytes(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw c(s);return tr.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}}p.exports.KESSignature=tr;class Qe{static __wrap(_){_=_>>>0;const e=Object.create(Qe.prototype);return e.__wbg_ptr=_,e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,_}free(){const _=this.__destroy_into_raw();t.__wbg_kesvkey_free(_)}static from_bytes(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=Q(_,t.__wbindgen_malloc),o=b;t.kesvkey_from_bytes(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw c(s);return Qe.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_bytes(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.auxiliarydatahash_to_bytes(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=D(_,e).slice();return t.__wbindgen_free(_,e*1),s}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_bech32(_){let e,s;try{const H=t.__wbindgen_add_to_stack_pointer(-16),rt=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),dt=b;t.auxiliarydatahash_to_bech32(H,this.__wbg_ptr,rt,dt);var n=a()[H/4+0],r=a()[H/4+1],i=a()[H/4+2],o=a()[H/4+3],f=n,l=r;if(o)throw f=0,l=0,c(i);return e=f,s=l,m(f,l)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(e,s,1)}}static from_bech32(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=b;t.kesvkey_from_bech32(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw c(s);return Qe.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_hex(){let _,e;try{const r=t.__wbindgen_add_to_stack_pointer(-16);t.auxiliarydatahash_to_hex(r,this.__wbg_ptr);var s=a()[r/4+0],n=a()[r/4+1];return _=s,e=n,m(s,n)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}static from_hex(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=b;t.kesvkey_from_hex(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw c(s);return Qe.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}}p.exports.KESVKey=Qe;class Jt{static __wrap(_){_=_>>>0;const e=Object.create(Jt.prototype);return e.__wbg_ptr=_,e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,_}free(){const _=this.__destroy_into_raw();t.__wbg_language_free(_)}to_bytes(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.language_to_bytes(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=D(_,e).slice();return t.__wbindgen_free(_,e*1),s}finally{t.__wbindgen_add_to_stack_pointer(16)}}static from_bytes(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=Q(_,t.__wbindgen_malloc),o=b;t.language_from_bytes(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw c(s);return Jt.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_hex(){let _,e;try{const r=t.__wbindgen_add_to_stack_pointer(-16);t.language_to_hex(r,this.__wbg_ptr);var s=a()[r/4+0],n=a()[r/4+1];return _=s,e=n,m(s,n)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}static from_hex(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=b;t.language_from_hex(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw c(s);return Jt.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_json(){let _,e;try{const l=t.__wbindgen_add_to_stack_pointer(-16);t.language_to_json(l,this.__wbg_ptr);var s=a()[l/4+0],n=a()[l/4+1],r=a()[l/4+2],i=a()[l/4+3],o=s,f=n;if(i)throw o=0,f=0,c(r);return _=o,e=f,m(o,f)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}to_js_value(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.language_to_js_value(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=a()[n/4+2];if(s)throw c(e);return c(_)}finally{t.__wbindgen_add_to_stack_pointer(16)}}static from_json(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=b;t.language_from_json(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw c(s);return Jt.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}static new_plutus_v1(){const _=t.language_new_plutus_v1();return Jt.__wrap(_)}static new_plutus_v2(){const _=t.language_new_plutus_v2();return Jt.__wrap(_)}kind(){return t.language_kind(this.__wbg_ptr)>>>0}}p.exports.Language=Jt;class Le{static __wrap(_){_=_>>>0;const e=Object.create(Le.prototype);return e.__wbg_ptr=_,e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,_}free(){const _=this.__destroy_into_raw();t.__wbg_languages_free(_)}static new(){const _=t.ed25519keyhashes_new();return Le.__wrap(_)}len(){return t.assetnames_len(this.__wbg_ptr)>>>0}get(_){const e=t.languages_get(this.__wbg_ptr,_);return Jt.__wrap(e)}add(_){g(_,Jt);var e=_.__destroy_into_raw();t.languages_add(this.__wbg_ptr,e)}static list(){const _=t.languages_list();return Le.__wrap(_)}}p.exports.Languages=Le;class br{static __wrap(_){_=_>>>0;const e=Object.create(br.prototype);return e.__wbg_ptr=_,e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,_}free(){const _=this.__destroy_into_raw();t.__wbg_legacydaedalusprivatekey_free(_)}static from_bytes(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=Q(_,t.__wbindgen_malloc),o=b;t.legacydaedalusprivatekey_from_bytes(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw c(s);return br.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}as_bytes(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.bip32privatekey_as_bytes(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=D(_,e).slice();return t.__wbindgen_free(_,e*1),s}finally{t.__wbindgen_add_to_stack_pointer(16)}}chaincode(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.bip32privatekey_chaincode(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=D(_,e).slice();return t.__wbindgen_free(_,e*1),s}finally{t.__wbindgen_add_to_stack_pointer(16)}}}p.exports.LegacyDaedalusPrivateKey=br;class _r{static __wrap(_){_=_>>>0;const e=Object.create(_r.prototype);return e.__wbg_ptr=_,e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,_}free(){const _=this.__destroy_into_raw();t.__wbg_linearfee_free(_)}constant(){const _=t.linearfee_constant(this.__wbg_ptr);return I.__wrap(_)}coefficient(){const _=t.linearfee_coefficient(this.__wbg_ptr);return I.__wrap(_)}static new(_,e){g(_,I),g(e,I);const s=t.linearfee_new(_.__wbg_ptr,e.__wbg_ptr);return _r.__wrap(s)}}p.exports.LinearFee=_r;class J_{static __wrap(_){_=_>>>0;const e=Object.create(J_.prototype);return e.__wbg_ptr=_,e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,_}free(){const _=this.__destroy_into_raw();t.__wbg_mirtostakecredentials_free(_)}to_bytes(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.mirtostakecredentials_to_bytes(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=D(_,e).slice();return t.__wbindgen_free(_,e*1),s}finally{t.__wbindgen_add_to_stack_pointer(16)}}static from_bytes(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=Q(_,t.__wbindgen_malloc),o=b;t.mirtostakecredentials_from_bytes(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw c(s);return J_.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_hex(){let _,e;try{const r=t.__wbindgen_add_to_stack_pointer(-16);t.mirtostakecredentials_to_hex(r,this.__wbg_ptr);var s=a()[r/4+0],n=a()[r/4+1];return _=s,e=n,m(s,n)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}static from_hex(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=b;t.mirtostakecredentials_from_hex(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw c(s);return J_.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_json(){let _,e;try{const l=t.__wbindgen_add_to_stack_pointer(-16);t.mirtostakecredentials_to_json(l,this.__wbg_ptr);var s=a()[l/4+0],n=a()[l/4+1],r=a()[l/4+2],i=a()[l/4+3],o=s,f=n;if(i)throw o=0,f=0,c(r);return _=o,e=f,m(o,f)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}to_js_value(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.mirtostakecredentials_to_js_value(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=a()[n/4+2];if(s)throw c(e);return c(_)}finally{t.__wbindgen_add_to_stack_pointer(16)}}static from_json(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=b;t.mirtostakecredentials_from_json(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw c(s);return J_.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}static new(){const _=t.auxiliarydataset_new();return J_.__wrap(_)}len(){return t.auxiliarydataset_len(this.__wbg_ptr)>>>0}insert(_,e){g(_,Qt),g(e,St);const s=t.mirtostakecredentials_insert(this.__wbg_ptr,_.__wbg_ptr,e.__wbg_ptr);return s===0?void 0:St.__wrap(s)}get(_){g(_,Qt);const e=t.mirtostakecredentials_get(this.__wbg_ptr,_.__wbg_ptr);return e===0?void 0:St.__wrap(e)}keys(){const _=t.mirtostakecredentials_keys(this.__wbg_ptr);return Pe.__wrap(_)}}p.exports.MIRToStakeCredentials=J_;class W_{static __wrap(_){_=_>>>0;const e=Object.create(W_.prototype);return e.__wbg_ptr=_,e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,_}free(){const _=this.__destroy_into_raw();t.__wbg_metadatalist_free(_)}to_bytes(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.metadatalist_to_bytes(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=D(_,e).slice();return t.__wbindgen_free(_,e*1),s}finally{t.__wbindgen_add_to_stack_pointer(16)}}static from_bytes(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=Q(_,t.__wbindgen_malloc),o=b;t.metadatalist_from_bytes(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw c(s);return W_.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_hex(){let _,e;try{const r=t.__wbindgen_add_to_stack_pointer(-16);t.metadatalist_to_hex(r,this.__wbg_ptr);var s=a()[r/4+0],n=a()[r/4+1];return _=s,e=n,m(s,n)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}static from_hex(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=b;t.metadatalist_from_hex(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw c(s);return W_.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}static new(){const _=t.certificates_new();return W_.__wrap(_)}len(){return t.assetnames_len(this.__wbg_ptr)>>>0}get(_){const e=t.metadatalist_get(this.__wbg_ptr,_);return mt.__wrap(e)}add(_){g(_,mt),t.metadatalist_add(this.__wbg_ptr,_.__wbg_ptr)}}p.exports.MetadataList=W_;class Oe{static __wrap(_){_=_>>>0;const e=Object.create(Oe.prototype);return e.__wbg_ptr=_,e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,_}free(){const _=this.__destroy_into_raw();t.__wbg_metadatamap_free(_)}to_bytes(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.metadatamap_to_bytes(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=D(_,e).slice();return t.__wbindgen_free(_,e*1),s}finally{t.__wbindgen_add_to_stack_pointer(16)}}static from_bytes(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=Q(_,t.__wbindgen_malloc),o=b;t.metadatamap_from_bytes(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw c(s);return Oe.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_hex(){let _,e;try{const r=t.__wbindgen_add_to_stack_pointer(-16);t.metadatamap_to_hex(r,this.__wbg_ptr);var s=a()[r/4+0],n=a()[r/4+1];return _=s,e=n,m(s,n)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}static from_hex(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=b;t.metadatamap_from_hex(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw c(s);return Oe.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}static new(){const _=t.auxiliarydataset_new();return Oe.__wrap(_)}len(){return t.auxiliarydataset_len(this.__wbg_ptr)>>>0}insert(_,e){g(_,mt),g(e,mt);const s=t.metadatamap_insert(this.__wbg_ptr,_.__wbg_ptr,e.__wbg_ptr);return s===0?void 0:mt.__wrap(s)}insert_str(_,e){try{const i=t.__wbindgen_add_to_stack_pointer(-16),o=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),f=b;g(e,mt),t.metadatamap_insert_str(i,this.__wbg_ptr,o,f,e.__wbg_ptr);var s=a()[i/4+0],n=a()[i/4+1],r=a()[i/4+2];if(r)throw c(n);return s===0?void 0:mt.__wrap(s)}finally{t.__wbindgen_add_to_stack_pointer(16)}}insert_i32(_,e){g(e,mt);const s=t.metadatamap_insert_i32(this.__wbg_ptr,_,e.__wbg_ptr);return s===0?void 0:mt.__wrap(s)}get(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16);g(_,mt),t.metadatamap_get(r,this.__wbg_ptr,_.__wbg_ptr);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw c(s);return mt.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}get_str(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=b;t.metadatamap_get_str(r,this.__wbg_ptr,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw c(s);return mt.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}get_i32(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16);t.metadatamap_get_i32(r,this.__wbg_ptr,_);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw c(s);return mt.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}has(_){return g(_,mt),t.metadatamap_has(this.__wbg_ptr,_.__wbg_ptr)!==0}keys(){const _=t.metadatamap_keys(this.__wbg_ptr);return W_.__wrap(_)}}p.exports.MetadataMap=Oe;class r_{static __wrap(_){_=_>>>0;const e=Object.create(r_.prototype);return e.__wbg_ptr=_,e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,_}free(){const _=this.__destroy_into_raw();t.__wbg_mint_free(_)}to_bytes(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.mint_to_bytes(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=D(_,e).slice();return t.__wbindgen_free(_,e*1),s}finally{t.__wbindgen_add_to_stack_pointer(16)}}static from_bytes(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=Q(_,t.__wbindgen_malloc),o=b;t.mint_from_bytes(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw c(s);return r_.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_hex(){let _,e;try{const r=t.__wbindgen_add_to_stack_pointer(-16);t.mint_to_hex(r,this.__wbg_ptr);var s=a()[r/4+0],n=a()[r/4+1];return _=s,e=n,m(s,n)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}static from_hex(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=b;t.mint_from_hex(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw c(s);return r_.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_json(){let _,e;try{const l=t.__wbindgen_add_to_stack_pointer(-16);t.mint_to_json(l,this.__wbg_ptr);var s=a()[l/4+0],n=a()[l/4+1],r=a()[l/4+2],i=a()[l/4+3],o=s,f=n;if(i)throw o=0,f=0,c(r);return _=o,e=f,m(o,f)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}to_js_value(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.mint_to_js_value(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=a()[n/4+2];if(s)throw c(e);return c(_)}finally{t.__wbindgen_add_to_stack_pointer(16)}}static from_json(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=b;t.mint_from_json(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw c(s);return r_.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}static new(){const _=t.assetnames_new();return r_.__wrap(_)}static new_from_entry(_,e){g(_,Ft),g(e,S_);const s=t.mint_new_from_entry(_.__wbg_ptr,e.__wbg_ptr);return r_.__wrap(s)}len(){return t.assetnames_len(this.__wbg_ptr)>>>0}insert(_,e){g(_,Ft),g(e,S_);const s=t.mint_insert(this.__wbg_ptr,_.__wbg_ptr,e.__wbg_ptr);return s===0?void 0:S_.__wrap(s)}get(_){g(_,Ft);const e=t.mint_get(this.__wbg_ptr,_.__wbg_ptr);return e===0?void 0:S_.__wrap(e)}get_all(_){g(_,Ft);const e=t.mint_get_all(this.__wbg_ptr,_.__wbg_ptr);return e===0?void 0:Ar.__wrap(e)}keys(){const _=t.mint_keys(this.__wbg_ptr);return pe.__wrap(_)}as_positive_multiasset(){const _=t.mint_as_positive_multiasset(this.__wbg_ptr);return $t.__wrap(_)}as_negative_multiasset(){const _=t.mint_as_negative_multiasset(this.__wbg_ptr);return $t.__wrap(_)}}p.exports.Mint=r_;class S_{static __wrap(_){_=_>>>0;const e=Object.create(S_.prototype);return e.__wbg_ptr=_,e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,_}free(){const _=this.__destroy_into_raw();t.__wbg_mintassets_free(_)}static new(){const _=t.assets_new();return S_.__wrap(_)}static new_from_entry(_,e){g(_,It),g(e,St);var s=e.__destroy_into_raw();const n=t.mintassets_new_from_entry(_.__wbg_ptr,s);return S_.__wrap(n)}len(){return t.assetnames_len(this.__wbg_ptr)>>>0}insert(_,e){g(_,It),g(e,St);var s=e.__destroy_into_raw();const n=t.mintassets_insert(this.__wbg_ptr,_.__wbg_ptr,s);return n===0?void 0:St.__wrap(n)}get(_){g(_,It);const e=t.mintassets_get(this.__wbg_ptr,_.__wbg_ptr);return e===0?void 0:St.__wrap(e)}keys(){const _=t.mintassets_keys(this.__wbg_ptr);return Ut.__wrap(_)}}p.exports.MintAssets=S_;class er{static __wrap(_){_=_>>>0;const e=Object.create(er.prototype);return e.__wbg_ptr=_,e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,_}free(){const _=this.__destroy_into_raw();t.__wbg_mintbuilder_free(_)}static new(){const _=t.assets_new();return er.__wrap(_)}add_asset(_,e,s){g(_,Ve),g(e,It),g(s,St),t.mintbuilder_add_asset(this.__wbg_ptr,_.__wbg_ptr,e.__wbg_ptr,s.__wbg_ptr)}set_asset(_,e,s){g(_,Ve),g(e,It),g(s,St),t.mintbuilder_set_asset(this.__wbg_ptr,_.__wbg_ptr,e.__wbg_ptr,s.__wbg_ptr)}build(){const _=t.mintbuilder_build(this.__wbg_ptr);return r_.__wrap(_)}get_native_scripts(){const _=t.mintbuilder_get_native_scripts(this.__wbg_ptr);return Ht.__wrap(_)}get_plutus_witnesses(){const _=t.mintbuilder_get_plutus_witnesses(this.__wbg_ptr);return ee.__wrap(_)}get_ref_inputs(){const _=t.mintbuilder_get_ref_inputs(this.__wbg_ptr);return zt.__wrap(_)}get_redeeemers(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.mintbuilder_get_redeeemers(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=a()[n/4+2];if(s)throw c(e);return x_.__wrap(_)}finally{t.__wbindgen_add_to_stack_pointer(16)}}has_plutus_scripts(){return t.mintbuilder_has_plutus_scripts(this.__wbg_ptr)!==0}has_native_scripts(){return t.mintbuilder_has_native_scripts(this.__wbg_ptr)!==0}}p.exports.MintBuilder=er;class Ve{static __wrap(_){_=_>>>0;const e=Object.create(Ve.prototype);return e.__wbg_ptr=_,e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,_}free(){const _=this.__destroy_into_raw();t.__wbg_mintwitness_free(_)}static new_native_script(_){g(_,Nt);const e=t.mintwitness_new_native_script(_.__wbg_ptr);return Ve.__wrap(e)}static new_plutus_script(_,e){g(_,_e),g(e,e_);const s=t.mintwitness_new_plutus_script(_.__wbg_ptr,e.__wbg_ptr);return Ve.__wrap(s)}}p.exports.MintWitness=Ve;class Ar{static __wrap(_){_=_>>>0;const e=Object.create(Ar.prototype);return e.__wbg_ptr=_,e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,_}free(){const _=this.__destroy_into_raw();t.__wbg_mintsassets_free(_)}}p.exports.MintsAssets=Ar;class Q_{static __wrap(_){_=_>>>0;const e=Object.create(Q_.prototype);return e.__wbg_ptr=_,e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,_}free(){const _=this.__destroy_into_raw();t.__wbg_moveinstantaneousreward_free(_)}to_bytes(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.moveinstantaneousreward_to_bytes(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=D(_,e).slice();return t.__wbindgen_free(_,e*1),s}finally{t.__wbindgen_add_to_stack_pointer(16)}}static from_bytes(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=Q(_,t.__wbindgen_malloc),o=b;t.moveinstantaneousreward_from_bytes(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw c(s);return Q_.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_hex(){let _,e;try{const r=t.__wbindgen_add_to_stack_pointer(-16);t.moveinstantaneousreward_to_hex(r,this.__wbg_ptr);var s=a()[r/4+0],n=a()[r/4+1];return _=s,e=n,m(s,n)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}static from_hex(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=b;t.moveinstantaneousreward_from_hex(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw c(s);return Q_.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_json(){let _,e;try{const l=t.__wbindgen_add_to_stack_pointer(-16);t.moveinstantaneousreward_to_json(l,this.__wbg_ptr);var s=a()[l/4+0],n=a()[l/4+1],r=a()[l/4+2],i=a()[l/4+3],o=s,f=n;if(i)throw o=0,f=0,c(r);return _=o,e=f,m(o,f)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}to_js_value(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.moveinstantaneousreward_to_js_value(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=a()[n/4+2];if(s)throw c(e);return c(_)}finally{t.__wbindgen_add_to_stack_pointer(16)}}static from_json(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=b;t.moveinstantaneousreward_from_json(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw c(s);return Q_.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}static new_to_other_pot(_,e){g(e,I);const s=t.moveinstantaneousreward_new_to_other_pot(_,e.__wbg_ptr);return Q_.__wrap(s)}static new_to_stake_creds(_,e){g(e,J_);const s=t.moveinstantaneousreward_new_to_stake_creds(_,e.__wbg_ptr);return Q_.__wrap(s)}pot(){return t.moveinstantaneousreward_pot(this.__wbg_ptr)>>>0}kind(){return t.moveinstantaneousreward_kind(this.__wbg_ptr)>>>0}as_to_other_pot(){const _=t.moveinstantaneousreward_as_to_other_pot(this.__wbg_ptr);return _===0?void 0:I.__wrap(_)}as_to_stake_creds(){const _=t.moveinstantaneousreward_as_to_stake_creds(this.__wbg_ptr);return _===0?void 0:J_.__wrap(_)}}p.exports.MoveInstantaneousReward=Q_;class X_{static __wrap(_){_=_>>>0;const e=Object.create(X_.prototype);return e.__wbg_ptr=_,e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,_}free(){const _=this.__destroy_into_raw();t.__wbg_moveinstantaneousrewardscert_free(_)}to_bytes(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.moveinstantaneousrewardscert_to_bytes(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=D(_,e).slice();return t.__wbindgen_free(_,e*1),s}finally{t.__wbindgen_add_to_stack_pointer(16)}}static from_bytes(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=Q(_,t.__wbindgen_malloc),o=b;t.moveinstantaneousrewardscert_from_bytes(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw c(s);return X_.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_hex(){let _,e;try{const r=t.__wbindgen_add_to_stack_pointer(-16);t.moveinstantaneousrewardscert_to_hex(r,this.__wbg_ptr);var s=a()[r/4+0],n=a()[r/4+1];return _=s,e=n,m(s,n)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}static from_hex(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=b;t.moveinstantaneousrewardscert_from_hex(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw c(s);return X_.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_json(){let _,e;try{const l=t.__wbindgen_add_to_stack_pointer(-16);t.moveinstantaneousrewardscert_to_json(l,this.__wbg_ptr);var s=a()[l/4+0],n=a()[l/4+1],r=a()[l/4+2],i=a()[l/4+3],o=s,f=n;if(i)throw o=0,f=0,c(r);return _=o,e=f,m(o,f)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}to_js_value(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.moveinstantaneousrewardscert_to_js_value(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=a()[n/4+2];if(s)throw c(e);return c(_)}finally{t.__wbindgen_add_to_stack_pointer(16)}}static from_json(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=b;t.moveinstantaneousrewardscert_from_json(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw c(s);return X_.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}move_instantaneous_reward(){const _=t.moveinstantaneousrewardscert_move_instantaneous_reward(this.__wbg_ptr);return Q_.__wrap(_)}static new(_){g(_,Q_);const e=t.moveinstantaneousrewardscert_new(_.__wbg_ptr);return X_.__wrap(e)}}p.exports.MoveInstantaneousRewardsCert=X_;class $t{static __wrap(_){_=_>>>0;const e=Object.create($t.prototype);return e.__wbg_ptr=_,e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,_}free(){const _=this.__destroy_into_raw();t.__wbg_multiasset_free(_)}to_bytes(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.multiasset_to_bytes(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=D(_,e).slice();return t.__wbindgen_free(_,e*1),s}finally{t.__wbindgen_add_to_stack_pointer(16)}}static from_bytes(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=Q(_,t.__wbindgen_malloc),o=b;t.multiasset_from_bytes(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw c(s);return $t.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_hex(){let _,e;try{const r=t.__wbindgen_add_to_stack_pointer(-16);t.multiasset_to_hex(r,this.__wbg_ptr);var s=a()[r/4+0],n=a()[r/4+1];return _=s,e=n,m(s,n)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}static from_hex(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=b;t.multiasset_from_hex(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw c(s);return $t.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_json(){let _,e;try{const l=t.__wbindgen_add_to_stack_pointer(-16);t.multiasset_to_json(l,this.__wbg_ptr);var s=a()[l/4+0],n=a()[l/4+1],r=a()[l/4+2],i=a()[l/4+3],o=s,f=n;if(i)throw o=0,f=0,c(r);return _=o,e=f,m(o,f)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}to_js_value(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.multiasset_to_js_value(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=a()[n/4+2];if(s)throw c(e);return c(_)}finally{t.__wbindgen_add_to_stack_pointer(16)}}static from_json(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=b;t.multiasset_from_json(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw c(s);return $t.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}static new(){const _=t.assets_new();return $t.__wrap(_)}len(){return t.assetnames_len(this.__wbg_ptr)>>>0}insert(_,e){g(_,Ft),g(e,Dt);const s=t.multiasset_insert(this.__wbg_ptr,_.__wbg_ptr,e.__wbg_ptr);return s===0?void 0:Dt.__wrap(s)}get(_){g(_,Ft);const e=t.multiasset_get(this.__wbg_ptr,_.__wbg_ptr);return e===0?void 0:Dt.__wrap(e)}set_asset(_,e,s){g(_,Ft),g(e,It),g(s,I);var n=s.__destroy_into_raw();const r=t.multiasset_set_asset(this.__wbg_ptr,_.__wbg_ptr,e.__wbg_ptr,n);return r===0?void 0:I.__wrap(r)}get_asset(_,e){g(_,Ft),g(e,It);const s=t.multiasset_get_asset(this.__wbg_ptr,_.__wbg_ptr,e.__wbg_ptr);return I.__wrap(s)}keys(){const _=t.multiasset_keys(this.__wbg_ptr);return pe.__wrap(_)}sub(_){g(_,$t);const e=t.multiasset_sub(this.__wbg_ptr,_.__wbg_ptr);return $t.__wrap(e)}}p.exports.MultiAsset=$t;class Z_{static __wrap(_){_=_>>>0;const e=Object.create(Z_.prototype);return e.__wbg_ptr=_,e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,_}free(){const _=this.__destroy_into_raw();t.__wbg_multihostname_free(_)}to_bytes(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.multihostname_to_bytes(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=D(_,e).slice();return t.__wbindgen_free(_,e*1),s}finally{t.__wbindgen_add_to_stack_pointer(16)}}static from_bytes(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=Q(_,t.__wbindgen_malloc),o=b;t.multihostname_from_bytes(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw c(s);return Z_.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_hex(){let _,e;try{const r=t.__wbindgen_add_to_stack_pointer(-16);t.multihostname_to_hex(r,this.__wbg_ptr);var s=a()[r/4+0],n=a()[r/4+1];return _=s,e=n,m(s,n)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}static from_hex(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=b;t.multihostname_from_hex(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw c(s);return Z_.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_json(){let _,e;try{const l=t.__wbindgen_add_to_stack_pointer(-16);t.multihostname_to_json(l,this.__wbg_ptr);var s=a()[l/4+0],n=a()[l/4+1],r=a()[l/4+2],i=a()[l/4+3],o=s,f=n;if(i)throw o=0,f=0,c(r);return _=o,e=f,m(o,f)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}to_js_value(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.multihostname_to_js_value(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=a()[n/4+2];if(s)throw c(e);return c(_)}finally{t.__wbindgen_add_to_stack_pointer(16)}}static from_json(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=b;t.multihostname_from_json(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw c(s);return Z_.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}dns_name(){const _=t.multihostname_dns_name(this.__wbg_ptr);return O.__wrap(_)}static new(_){g(_,O);const e=t.multihostname_new(_.__wbg_ptr);return Z_.__wrap(e)}}p.exports.MultiHostName=Z_;class Nt{static __wrap(_){_=_>>>0;const e=Object.create(Nt.prototype);return e.__wbg_ptr=_,e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,_}free(){const _=this.__destroy_into_raw();t.__wbg_nativescript_free(_)}to_bytes(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.nativescript_to_bytes(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=D(_,e).slice();return t.__wbindgen_free(_,e*1),s}finally{t.__wbindgen_add_to_stack_pointer(16)}}static from_bytes(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=Q(_,t.__wbindgen_malloc),o=b;t.nativescript_from_bytes(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw c(s);return Nt.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_hex(){let _,e;try{const r=t.__wbindgen_add_to_stack_pointer(-16);t.nativescript_to_hex(r,this.__wbg_ptr);var s=a()[r/4+0],n=a()[r/4+1];return _=s,e=n,m(s,n)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}static from_hex(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=b;t.nativescript_from_hex(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw c(s);return Nt.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_json(){let _,e;try{const l=t.__wbindgen_add_to_stack_pointer(-16);t.nativescript_to_json(l,this.__wbg_ptr);var s=a()[l/4+0],n=a()[l/4+1],r=a()[l/4+2],i=a()[l/4+3],o=s,f=n;if(i)throw o=0,f=0,c(r);return _=o,e=f,m(o,f)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}to_js_value(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.nativescript_to_js_value(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=a()[n/4+2];if(s)throw c(e);return c(_)}finally{t.__wbindgen_add_to_stack_pointer(16)}}static from_json(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=b;t.nativescript_from_json(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw c(s);return Nt.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}hash(){const _=t.nativescript_hash(this.__wbg_ptr);return Ft.__wrap(_)}static new_script_pubkey(_){g(_,le);const e=t.nativescript_new_script_pubkey(_.__wbg_ptr);return Nt.__wrap(e)}static new_script_all(_){g(_,de);const e=t.nativescript_new_script_all(_.__wbg_ptr);return Nt.__wrap(e)}static new_script_any(_){g(_,ce);const e=t.nativescript_new_script_any(_.__wbg_ptr);return Nt.__wrap(e)}static new_script_n_of_k(_){g(_,we);const e=t.nativescript_new_script_n_of_k(_.__wbg_ptr);return Nt.__wrap(e)}static new_timelock_start(_){g(_,P_);const e=t.nativescript_new_timelock_start(_.__wbg_ptr);return Nt.__wrap(e)}static new_timelock_expiry(_){g(_,U_);const e=t.nativescript_new_timelock_expiry(_.__wbg_ptr);return Nt.__wrap(e)}kind(){return t.nativescript_kind(this.__wbg_ptr)>>>0}as_script_pubkey(){const _=t.nativescript_as_script_pubkey(this.__wbg_ptr);return _===0?void 0:le.__wrap(_)}as_script_all(){const _=t.nativescript_as_script_all(this.__wbg_ptr);return _===0?void 0:de.__wrap(_)}as_script_any(){const _=t.nativescript_as_script_any(this.__wbg_ptr);return _===0?void 0:ce.__wrap(_)}as_script_n_of_k(){const _=t.nativescript_as_script_n_of_k(this.__wbg_ptr);return _===0?void 0:we.__wrap(_)}as_timelock_start(){const _=t.nativescript_as_timelock_start(this.__wbg_ptr);return _===0?void 0:P_.__wrap(_)}as_timelock_expiry(){const _=t.nativescript_as_timelock_expiry(this.__wbg_ptr);return _===0?void 0:U_.__wrap(_)}get_required_signers(){const _=t.nativescript_get_required_signers(this.__wbg_ptr);return Z.__wrap(_)}}p.exports.NativeScript=Nt;class Ht{static __wrap(_){_=_>>>0;const e=Object.create(Ht.prototype);return e.__wbg_ptr=_,e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,_}free(){const _=this.__destroy_into_raw();t.__wbg_nativescripts_free(_)}static new(){const _=t.certificates_new();return Ht.__wrap(_)}len(){return t.assetnames_len(this.__wbg_ptr)>>>0}get(_){const e=t.nativescripts_get(this.__wbg_ptr,_);return Nt.__wrap(e)}add(_){g(_,Nt),t.nativescripts_add(this.__wbg_ptr,_.__wbg_ptr)}}p.exports.NativeScripts=Ht;class O_{static __wrap(_){_=_>>>0;const e=Object.create(O_.prototype);return e.__wbg_ptr=_,e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,_}free(){const _=this.__destroy_into_raw();t.__wbg_networkid_free(_)}to_bytes(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.networkid_to_bytes(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=D(_,e).slice();return t.__wbindgen_free(_,e*1),s}finally{t.__wbindgen_add_to_stack_pointer(16)}}static from_bytes(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=Q(_,t.__wbindgen_malloc),o=b;t.networkid_from_bytes(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw c(s);return O_.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_hex(){let _,e;try{const r=t.__wbindgen_add_to_stack_pointer(-16);t.networkid_to_hex(r,this.__wbg_ptr);var s=a()[r/4+0],n=a()[r/4+1];return _=s,e=n,m(s,n)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}static from_hex(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=b;t.networkid_from_hex(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw c(s);return O_.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_json(){let _,e;try{const l=t.__wbindgen_add_to_stack_pointer(-16);t.networkid_to_json(l,this.__wbg_ptr);var s=a()[l/4+0],n=a()[l/4+1],r=a()[l/4+2],i=a()[l/4+3],o=s,f=n;if(i)throw o=0,f=0,c(r);return _=o,e=f,m(o,f)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}to_js_value(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.networkid_to_js_value(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=a()[n/4+2];if(s)throw c(e);return c(_)}finally{t.__wbindgen_add_to_stack_pointer(16)}}static from_json(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=b;t.networkid_from_json(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw c(s);return O_.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}static testnet(){const _=t.language_new_plutus_v1();return O_.__wrap(_)}static mainnet(){const _=t.language_new_plutus_v2();return O_.__wrap(_)}kind(){return t.networkid_kind(this.__wbg_ptr)>>>0}}p.exports.NetworkId=O_;class De{static __wrap(_){_=_>>>0;const e=Object.create(De.prototype);return e.__wbg_ptr=_,e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,_}free(){const _=this.__destroy_into_raw();t.__wbg_networkinfo_free(_)}static new(_,e){const s=t.networkinfo_new(_,e);return De.__wrap(s)}network_id(){return t.networkinfo_network_id(this.__wbg_ptr)}protocol_magic(){return t.networkinfo_protocol_magic(this.__wbg_ptr)>>>0}static testnet_preview(){const _=t.networkinfo_testnet_preview();return De.__wrap(_)}static testnet_preprod(){const _=t.networkinfo_testnet_preprod();return De.__wrap(_)}static testnet(){const _=t.networkinfo_testnet();return De.__wrap(_)}static mainnet(){const _=t.networkinfo_mainnet();return De.__wrap(_)}}p.exports.NetworkInfo=De;class te{static __wrap(_){_=_>>>0;const e=Object.create(te.prototype);return e.__wbg_ptr=_,e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,_}free(){const _=this.__destroy_into_raw();t.__wbg_nonce_free(_)}to_bytes(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.nonce_to_bytes(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=D(_,e).slice();return t.__wbindgen_free(_,e*1),s}finally{t.__wbindgen_add_to_stack_pointer(16)}}static from_bytes(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=Q(_,t.__wbindgen_malloc),o=b;t.nonce_from_bytes(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw c(s);return te.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_hex(){let _,e;try{const r=t.__wbindgen_add_to_stack_pointer(-16);t.nonce_to_hex(r,this.__wbg_ptr);var s=a()[r/4+0],n=a()[r/4+1];return _=s,e=n,m(s,n)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}static from_hex(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=b;t.nonce_from_hex(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw c(s);return te.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_json(){let _,e;try{const l=t.__wbindgen_add_to_stack_pointer(-16);t.nonce_to_json(l,this.__wbg_ptr);var s=a()[l/4+0],n=a()[l/4+1],r=a()[l/4+2],i=a()[l/4+3],o=s,f=n;if(i)throw o=0,f=0,c(r);return _=o,e=f,m(o,f)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}to_js_value(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.nonce_to_js_value(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=a()[n/4+2];if(s)throw c(e);return c(_)}finally{t.__wbindgen_add_to_stack_pointer(16)}}static from_json(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=b;t.nonce_from_json(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw c(s);return te.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}static new_identity(){const _=t.nonce_new_identity();return te.__wrap(_)}static new_from_hash(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=Q(_,t.__wbindgen_malloc),o=b;t.nonce_new_from_hash(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw c(s);return te.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}get_hash(){try{const s=t.__wbindgen_add_to_stack_pointer(-16);t.nonce_get_hash(s,this.__wbg_ptr);var _=a()[s/4+0],e=a()[s/4+1];let n;return _!==0&&(n=D(_,e).slice(),t.__wbindgen_free(_,e*1)),n}finally{t.__wbindgen_add_to_stack_pointer(16)}}}p.exports.Nonce=te;class D_{static __wrap(_){_=_>>>0;const e=Object.create(D_.prototype);return e.__wbg_ptr=_,e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,_}free(){const _=this.__destroy_into_raw();t.__wbg_operationalcert_free(_)}to_bytes(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.operationalcert_to_bytes(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=D(_,e).slice();return t.__wbindgen_free(_,e*1),s}finally{t.__wbindgen_add_to_stack_pointer(16)}}static from_bytes(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=Q(_,t.__wbindgen_malloc),o=b;t.operationalcert_from_bytes(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw c(s);return D_.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_hex(){let _,e;try{const r=t.__wbindgen_add_to_stack_pointer(-16);t.operationalcert_to_hex(r,this.__wbg_ptr);var s=a()[r/4+0],n=a()[r/4+1];return _=s,e=n,m(s,n)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}static from_hex(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=b;t.operationalcert_from_hex(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw c(s);return D_.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_json(){let _,e;try{const l=t.__wbindgen_add_to_stack_pointer(-16);t.operationalcert_to_json(l,this.__wbg_ptr);var s=a()[l/4+0],n=a()[l/4+1],r=a()[l/4+2],i=a()[l/4+3],o=s,f=n;if(i)throw o=0,f=0,c(r);return _=o,e=f,m(o,f)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}to_js_value(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.operationalcert_to_js_value(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=a()[n/4+2];if(s)throw c(e);return c(_)}finally{t.__wbindgen_add_to_stack_pointer(16)}}static from_json(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=b;t.operationalcert_from_json(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw c(s);return D_.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}hot_vkey(){const _=t.operationalcert_hot_vkey(this.__wbg_ptr);return Qe.__wrap(_)}sequence_number(){return t.operationalcert_sequence_number(this.__wbg_ptr)>>>0}kes_period(){return t.operationalcert_kes_period(this.__wbg_ptr)>>>0}sigma(){const _=t.operationalcert_sigma(this.__wbg_ptr);return it.__wrap(_)}static new(_,e,s,n){g(_,Qe),g(n,it);const r=t.operationalcert_new(_.__wbg_ptr,e,s,n.__wbg_ptr);return D_.__wrap(r)}}p.exports.OperationalCert=D_;class rr{static __wrap(_){_=_>>>0;const e=Object.create(rr.prototype);return e.__wbg_ptr=_,e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,_}free(){const _=this.__destroy_into_raw();t.__wbg_outputdatum_free(_)}static new_data_hash(_){g(_,U);const e=t.outputdatum_new_data_hash(_.__wbg_ptr);return rr.__wrap(e)}static new_data(_){g(_,ht);const e=t.datumsource_new(_.__wbg_ptr);return rr.__wrap(e)}data_hash(){const _=t.outputdatum_data_hash(this.__wbg_ptr);return _===0?void 0:U.__wrap(_)}data(){const _=t.outputdatum_data(this.__wbg_ptr);return _===0?void 0:ht.__wrap(_)}}p.exports.OutputDatum=rr;class ht{static __wrap(_){_=_>>>0;const e=Object.create(ht.prototype);return e.__wbg_ptr=_,e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,_}free(){const _=this.__destroy_into_raw();t.__wbg_plutusdata_free(_)}to_bytes(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.plutusdata_to_bytes(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=D(_,e).slice();return t.__wbindgen_free(_,e*1),s}finally{t.__wbindgen_add_to_stack_pointer(16)}}static from_bytes(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=Q(_,t.__wbindgen_malloc),o=b;t.plutusdata_from_bytes(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw c(s);return ht.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_hex(){let _,e;try{const r=t.__wbindgen_add_to_stack_pointer(-16);t.plutusdata_to_hex(r,this.__wbg_ptr);var s=a()[r/4+0],n=a()[r/4+1];return _=s,e=n,m(s,n)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}static from_hex(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=b;t.plutusdata_from_hex(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw c(s);return ht.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}static new_constr_plutus_data(_){g(_,S);const e=t.plutusdata_new_constr_plutus_data(_.__wbg_ptr);return ht.__wrap(e)}static new_empty_constr_plutus_data(_){g(_,I);const e=t.plutusdata_new_empty_constr_plutus_data(_.__wbg_ptr);return ht.__wrap(e)}static new_single_value_constr_plutus_data(_,e){g(_,I),g(e,ht);const s=t.plutusdata_new_single_value_constr_plutus_data(_.__wbg_ptr,e.__wbg_ptr);return ht.__wrap(s)}static new_map(_){g(_,Te);const e=t.plutusdata_new_map(_.__wbg_ptr);return ht.__wrap(e)}static new_list(_){g(_,n_);const e=t.plutusdata_new_list(_.__wbg_ptr);return ht.__wrap(e)}static new_integer(_){g(_,V);const e=t.plutusdata_new_integer(_.__wbg_ptr);return ht.__wrap(e)}static new_bytes(_){const e=Q(_,t.__wbindgen_malloc),s=b,n=t.plutusdata_new_bytes(e,s);return ht.__wrap(n)}kind(){return t.plutusdata_kind(this.__wbg_ptr)>>>0}as_constr_plutus_data(){const _=t.plutusdata_as_constr_plutus_data(this.__wbg_ptr);return _===0?void 0:S.__wrap(_)}as_map(){const _=t.plutusdata_as_map(this.__wbg_ptr);return _===0?void 0:Te.__wrap(_)}as_list(){const _=t.plutusdata_as_list(this.__wbg_ptr);return _===0?void 0:n_.__wrap(_)}as_integer(){const _=t.plutusdata_as_integer(this.__wbg_ptr);return _===0?void 0:V.__wrap(_)}as_bytes(){try{const s=t.__wbindgen_add_to_stack_pointer(-16);t.plutusdata_as_bytes(s,this.__wbg_ptr);var _=a()[s/4+0],e=a()[s/4+1];let n;return _!==0&&(n=D(_,e).slice(),t.__wbindgen_free(_,e*1)),n}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_json(_){let e,s;try{const H=t.__wbindgen_add_to_stack_pointer(-16);t.decode_plutus_datum_to_json_str(H,this.__wbg_ptr,_);var n=a()[H/4+0],r=a()[H/4+1],i=a()[H/4+2],o=a()[H/4+3],f=n,l=r;if(o)throw f=0,l=0,c(i);return e=f,s=l,m(f,l)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(e,s,1)}}static from_json(_,e){try{const i=t.__wbindgen_add_to_stack_pointer(-16),o=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),f=b;t.encode_json_str_to_plutus_datum(i,o,f,e);var s=a()[i/4+0],n=a()[i/4+1],r=a()[i/4+2];if(r)throw c(n);return ht.__wrap(s)}finally{t.__wbindgen_add_to_stack_pointer(16)}}static from_address(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16);g(_,pt),t.plutusdata_from_address(r,_.__wbg_ptr);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw c(s);return ht.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}}p.exports.PlutusData=ht;class n_{static __wrap(_){_=_>>>0;const e=Object.create(n_.prototype);return e.__wbg_ptr=_,e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,_}free(){const _=this.__destroy_into_raw();t.__wbg_plutuslist_free(_)}to_bytes(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.plutuslist_to_bytes(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=D(_,e).slice();return t.__wbindgen_free(_,e*1),s}finally{t.__wbindgen_add_to_stack_pointer(16)}}static from_bytes(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=Q(_,t.__wbindgen_malloc),o=b;t.plutuslist_from_bytes(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw c(s);return n_.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_hex(){let _,e;try{const r=t.__wbindgen_add_to_stack_pointer(-16);t.plutuslist_to_hex(r,this.__wbg_ptr);var s=a()[r/4+0],n=a()[r/4+1];return _=s,e=n,m(s,n)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}static from_hex(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=b;t.plutuslist_from_hex(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw c(s);return n_.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}static new(){const _=t.plutuslist_new();return n_.__wrap(_)}len(){return t.assetnames_len(this.__wbg_ptr)>>>0}get(_){const e=t.plutuslist_get(this.__wbg_ptr,_);return ht.__wrap(e)}add(_){g(_,ht),t.plutuslist_add(this.__wbg_ptr,_.__wbg_ptr)}}p.exports.PlutusList=n_;class Te{static __wrap(_){_=_>>>0;const e=Object.create(Te.prototype);return e.__wbg_ptr=_,e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,_}free(){const _=this.__destroy_into_raw();t.__wbg_plutusmap_free(_)}to_bytes(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.plutusmap_to_bytes(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=D(_,e).slice();return t.__wbindgen_free(_,e*1),s}finally{t.__wbindgen_add_to_stack_pointer(16)}}static from_bytes(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=Q(_,t.__wbindgen_malloc),o=b;t.plutusmap_from_bytes(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw c(s);return Te.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_hex(){let _,e;try{const r=t.__wbindgen_add_to_stack_pointer(-16);t.plutusmap_to_hex(r,this.__wbg_ptr);var s=a()[r/4+0],n=a()[r/4+1];return _=s,e=n,m(s,n)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}static from_hex(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=b;t.plutusmap_from_hex(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw c(s);return Te.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}static new(){const _=t.auxiliarydataset_new();return Te.__wrap(_)}len(){return t.auxiliarydataset_len(this.__wbg_ptr)>>>0}insert(_,e){g(_,ht),g(e,ht);const s=t.plutusmap_insert(this.__wbg_ptr,_.__wbg_ptr,e.__wbg_ptr);return s===0?void 0:ht.__wrap(s)}get(_){g(_,ht);const e=t.plutusmap_get(this.__wbg_ptr,_.__wbg_ptr);return e===0?void 0:ht.__wrap(e)}keys(){const _=t.plutusmap_keys(this.__wbg_ptr);return n_.__wrap(_)}}p.exports.PlutusMap=Te;class Vt{static __wrap(_){_=_>>>0;const e=Object.create(Vt.prototype);return e.__wbg_ptr=_,e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,_}free(){const _=this.__destroy_into_raw();t.__wbg_plutusscript_free(_)}to_bytes(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.plutusscript_to_bytes(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=D(_,e).slice();return t.__wbindgen_free(_,e*1),s}finally{t.__wbindgen_add_to_stack_pointer(16)}}static from_bytes(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=Q(_,t.__wbindgen_malloc),o=b;t.plutusscript_from_bytes(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw c(s);return Vt.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_hex(){let _,e;try{const r=t.__wbindgen_add_to_stack_pointer(-16);t.plutusscript_to_hex(r,this.__wbg_ptr);var s=a()[r/4+0],n=a()[r/4+1];return _=s,e=n,m(s,n)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}static from_hex(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=b;t.plutusscript_from_hex(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw c(s);return Vt.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}static new(_){const e=Q(_,t.__wbindgen_malloc),s=b,n=t.plutusscript_new(e,s);return Vt.__wrap(n)}static new_v2(_){const e=Q(_,t.__wbindgen_malloc),s=b,n=t.plutusscript_new_v2(e,s);return Vt.__wrap(n)}static new_with_version(_,e){const s=Q(_,t.__wbindgen_malloc),n=b;g(e,Jt);const r=t.plutusscript_new_with_version(s,n,e.__wbg_ptr);return Vt.__wrap(r)}bytes(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.assetname_name(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=D(_,e).slice();return t.__wbindgen_free(_,e*1),s}finally{t.__wbindgen_add_to_stack_pointer(16)}}static from_bytes_v2(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=Q(_,t.__wbindgen_malloc),o=b;t.plutusscript_from_bytes_v2(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw c(s);return Vt.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}static from_bytes_with_version(_,e){try{const i=t.__wbindgen_add_to_stack_pointer(-16),o=Q(_,t.__wbindgen_malloc),f=b;g(e,Jt),t.plutusscript_from_bytes_with_version(i,o,f,e.__wbg_ptr);var s=a()[i/4+0],n=a()[i/4+1],r=a()[i/4+2];if(r)throw c(n);return Vt.__wrap(s)}finally{t.__wbindgen_add_to_stack_pointer(16)}}static from_hex_with_version(_,e){try{const i=t.__wbindgen_add_to_stack_pointer(-16),o=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),f=b;g(e,Jt),t.plutusscript_from_hex_with_version(i,o,f,e.__wbg_ptr);var s=a()[i/4+0],n=a()[i/4+1],r=a()[i/4+2];if(r)throw c(n);return Vt.__wrap(s)}finally{t.__wbindgen_add_to_stack_pointer(16)}}hash(){const _=t.plutusscript_hash(this.__wbg_ptr);return Ft.__wrap(_)}language_version(){const _=t.plutusscript_language_version(this.__wbg_ptr);return Jt.__wrap(_)}}p.exports.PlutusScript=Vt;class _e{static __wrap(_){_=_>>>0;const e=Object.create(_e.prototype);return e.__wbg_ptr=_,e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,_}free(){const _=this.__destroy_into_raw();t.__wbg_plutusscriptsource_free(_)}static new(_){g(_,Vt);const e=t.plutusscriptsource_new(_.__wbg_ptr);return _e.__wrap(e)}static new_ref_input(_,e){g(_,Ft),g(e,Ct);const s=t.plutusscriptsource_new_ref_input(_.__wbg_ptr,e.__wbg_ptr);return _e.__wrap(s)}static new_ref_input_with_lang_ver(_,e,s){g(_,Ft),g(e,Ct),g(s,Jt);const n=t.plutusscriptsource_new_ref_input_with_lang_ver(_.__wbg_ptr,e.__wbg_ptr,s.__wbg_ptr);return _e.__wrap(n)}}p.exports.PlutusScriptSource=_e;class m_{static __wrap(_){_=_>>>0;const e=Object.create(m_.prototype);return e.__wbg_ptr=_,e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,_}free(){const _=this.__destroy_into_raw();t.__wbg_plutusscripts_free(_)}to_bytes(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.plutusscripts_to_bytes(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=D(_,e).slice();return t.__wbindgen_free(_,e*1),s}finally{t.__wbindgen_add_to_stack_pointer(16)}}static from_bytes(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=Q(_,t.__wbindgen_malloc),o=b;t.plutusscripts_from_bytes(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw c(s);return m_.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_hex(){let _,e;try{const r=t.__wbindgen_add_to_stack_pointer(-16);t.plutusscripts_to_hex(r,this.__wbg_ptr);var s=a()[r/4+0],n=a()[r/4+1];return _=s,e=n,m(s,n)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}static from_hex(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=b;t.plutusscripts_from_hex(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw c(s);return m_.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_json(){let _,e;try{const l=t.__wbindgen_add_to_stack_pointer(-16);t.plutusscripts_to_json(l,this.__wbg_ptr);var s=a()[l/4+0],n=a()[l/4+1],r=a()[l/4+2],i=a()[l/4+3],o=s,f=n;if(i)throw o=0,f=0,c(r);return _=o,e=f,m(o,f)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}to_js_value(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.plutusscripts_to_js_value(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=a()[n/4+2];if(s)throw c(e);return c(_)}finally{t.__wbindgen_add_to_stack_pointer(16)}}static from_json(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=b;t.plutusscripts_from_json(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw c(s);return m_.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}static new(){const _=t.assetnames_new();return m_.__wrap(_)}len(){return t.assetnames_len(this.__wbg_ptr)>>>0}get(_){const e=t.plutusscripts_get(this.__wbg_ptr,_);return Vt.__wrap(e)}add(_){g(_,Vt),t.plutusscripts_add(this.__wbg_ptr,_.__wbg_ptr)}}p.exports.PlutusScripts=m_;class p_{static __wrap(_){_=_>>>0;const e=Object.create(p_.prototype);return e.__wbg_ptr=_,e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,_}free(){const _=this.__destroy_into_raw();t.__wbg_plutuswitness_free(_)}static new(_,e,s){g(_,Vt),g(e,ht),g(s,e_);const n=t.plutuswitness_new(_.__wbg_ptr,e.__wbg_ptr,s.__wbg_ptr);return p_.__wrap(n)}static new_with_ref(_,e,s){g(_,_e),g(e,L),g(s,e_);const n=t.plutuswitness_new_with_ref(_.__wbg_ptr,e.__wbg_ptr,s.__wbg_ptr);return p_.__wrap(n)}static new_without_datum(_,e){g(_,Vt),g(e,e_);const s=t.plutuswitness_new_without_datum(_.__wbg_ptr,e.__wbg_ptr);return p_.__wrap(s)}static new_with_ref_without_datum(_,e){g(_,_e),g(e,e_);const s=t.plutuswitness_new_with_ref_without_datum(_.__wbg_ptr,e.__wbg_ptr);return p_.__wrap(s)}script(){const _=t.plutuswitness_script(this.__wbg_ptr);return _===0?void 0:Vt.__wrap(_)}datum(){const _=t.plutuswitness_datum(this.__wbg_ptr);return _===0?void 0:ht.__wrap(_)}redeemer(){const _=t.plutuswitness_redeemer(this.__wbg_ptr);return e_.__wrap(_)}}p.exports.PlutusWitness=p_;class ee{static __wrap(_){_=_>>>0;const e=Object.create(ee.prototype);return e.__wbg_ptr=_,e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,_}free(){const _=this.__destroy_into_raw();t.__wbg_plutuswitnesses_free(_)}static new(){const _=t.certificates_new();return ee.__wrap(_)}len(){return t.assetnames_len(this.__wbg_ptr)>>>0}get(_){const e=t.plutuswitnesses_get(this.__wbg_ptr,_);return p_.__wrap(e)}add(_){g(_,p_),t.plutuswitnesses_add(this.__wbg_ptr,_.__wbg_ptr)}}p.exports.PlutusWitnesses=ee;class Ye{static __wrap(_){_=_>>>0;const e=Object.create(Ye.prototype);return e.__wbg_ptr=_,e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,_}free(){const _=this.__destroy_into_raw();t.__wbg_pointer_free(_)}static new(_,e,s){const n=t.pointer_new(_,e,s);return Ye.__wrap(n)}static new_pointer(_,e,s){g(_,I),g(e,I),g(s,I);const n=t.pointer_new_pointer(_.__wbg_ptr,e.__wbg_ptr,s.__wbg_ptr);return Ye.__wrap(n)}slot(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.pointer_slot(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=a()[n/4+2];if(s)throw c(e);return _>>>0}finally{t.__wbindgen_add_to_stack_pointer(16)}}tx_index(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.pointer_tx_index(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=a()[n/4+2];if(s)throw c(e);return _>>>0}finally{t.__wbindgen_add_to_stack_pointer(16)}}cert_index(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.pointer_cert_index(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=a()[n/4+2];if(s)throw c(e);return _>>>0}finally{t.__wbindgen_add_to_stack_pointer(16)}}slot_bignum(){const _=t.exunits_mem(this.__wbg_ptr);return I.__wrap(_)}tx_index_bignum(){const _=t.exunits_steps(this.__wbg_ptr);return I.__wrap(_)}cert_index_bignum(){const _=t.constrplutusdata_alternative(this.__wbg_ptr);return I.__wrap(_)}}p.exports.Pointer=Ye;class ur{static __wrap(_){_=_>>>0;const e=Object.create(ur.prototype);return e.__wbg_ptr=_,e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,_}free(){const _=this.__destroy_into_raw();t.__wbg_pointeraddress_free(_)}static new(_,e,s){g(e,Qt),g(s,Ye);const n=t.pointeraddress_new(_,e.__wbg_ptr,s.__wbg_ptr);return ur.__wrap(n)}payment_cred(){const _=t.pointeraddress_payment_cred(this.__wbg_ptr);return Qt.__wrap(_)}stake_pointer(){const _=t.pointeraddress_stake_pointer(this.__wbg_ptr);return Ye.__wrap(_)}to_address(){const _=t.pointeraddress_to_address(this.__wbg_ptr);return pt.__wrap(_)}static from_address(_){g(_,pt);const e=t.pointeraddress_from_address(_.__wbg_ptr);return e===0?void 0:ur.__wrap(e)}}p.exports.PointerAddress=ur;class re{static __wrap(_){_=_>>>0;const e=Object.create(re.prototype);return e.__wbg_ptr=_,e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,_}free(){const _=this.__destroy_into_raw();t.__wbg_poolmetadata_free(_)}to_bytes(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.poolmetadata_to_bytes(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=D(_,e).slice();return t.__wbindgen_free(_,e*1),s}finally{t.__wbindgen_add_to_stack_pointer(16)}}static from_bytes(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=Q(_,t.__wbindgen_malloc),o=b;t.poolmetadata_from_bytes(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw c(s);return re.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_hex(){let _,e;try{const r=t.__wbindgen_add_to_stack_pointer(-16);t.poolmetadata_to_hex(r,this.__wbg_ptr);var s=a()[r/4+0],n=a()[r/4+1];return _=s,e=n,m(s,n)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}static from_hex(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=b;t.poolmetadata_from_hex(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw c(s);return re.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_json(){let _,e;try{const l=t.__wbindgen_add_to_stack_pointer(-16);t.poolmetadata_to_json(l,this.__wbg_ptr);var s=a()[l/4+0],n=a()[l/4+1],r=a()[l/4+2],i=a()[l/4+3],o=s,f=n;if(i)throw o=0,f=0,c(r);return _=o,e=f,m(o,f)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}to_js_value(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.poolmetadata_to_js_value(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=a()[n/4+2];if(s)throw c(e);return c(_)}finally{t.__wbindgen_add_to_stack_pointer(16)}}static from_json(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=b;t.poolmetadata_from_json(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw c(s);return re.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}url(){const _=t.multihostname_dns_name(this.__wbg_ptr);return ke.__wrap(_)}pool_metadata_hash(){const _=t.poolmetadata_pool_metadata_hash(this.__wbg_ptr);return Ne.__wrap(_)}static new(_,e){g(_,ke),g(e,Ne);const s=t.poolmetadata_new(_.__wbg_ptr,e.__wbg_ptr);return re.__wrap(s)}}p.exports.PoolMetadata=re;class Ne{static __wrap(_){_=_>>>0;const e=Object.create(Ne.prototype);return e.__wbg_ptr=_,e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,_}free(){const _=this.__destroy_into_raw();t.__wbg_poolmetadatahash_free(_)}static from_bytes(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=Q(_,t.__wbindgen_malloc),o=b;t.poolmetadatahash_from_bytes(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw c(s);return Ne.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_bytes(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.auxiliarydatahash_to_bytes(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=D(_,e).slice();return t.__wbindgen_free(_,e*1),s}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_bech32(_){let e,s;try{const H=t.__wbindgen_add_to_stack_pointer(-16),rt=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),dt=b;t.auxiliarydatahash_to_bech32(H,this.__wbg_ptr,rt,dt);var n=a()[H/4+0],r=a()[H/4+1],i=a()[H/4+2],o=a()[H/4+3],f=n,l=r;if(o)throw f=0,l=0,c(i);return e=f,s=l,m(f,l)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(e,s,1)}}static from_bech32(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=b;t.poolmetadatahash_from_bech32(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw c(s);return Ne.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_hex(){let _,e;try{const r=t.__wbindgen_add_to_stack_pointer(-16);t.auxiliarydatahash_to_hex(r,this.__wbg_ptr);var s=a()[r/4+0],n=a()[r/4+1];return _=s,e=n,m(s,n)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}static from_hex(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=b;t.poolmetadatahash_from_hex(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw c(s);return Ne.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}}p.exports.PoolMetadataHash=Ne;class ne{static __wrap(_){_=_>>>0;const e=Object.create(ne.prototype);return e.__wbg_ptr=_,e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,_}free(){const _=this.__destroy_into_raw();t.__wbg_poolparams_free(_)}to_bytes(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.poolparams_to_bytes(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=D(_,e).slice();return t.__wbindgen_free(_,e*1),s}finally{t.__wbindgen_add_to_stack_pointer(16)}}static from_bytes(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=Q(_,t.__wbindgen_malloc),o=b;t.poolparams_from_bytes(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw c(s);return ne.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_hex(){let _,e;try{const r=t.__wbindgen_add_to_stack_pointer(-16);t.poolparams_to_hex(r,this.__wbg_ptr);var s=a()[r/4+0],n=a()[r/4+1];return _=s,e=n,m(s,n)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}static from_hex(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=b;t.poolparams_from_hex(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw c(s);return ne.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_json(){let _,e;try{const l=t.__wbindgen_add_to_stack_pointer(-16);t.poolparams_to_json(l,this.__wbg_ptr);var s=a()[l/4+0],n=a()[l/4+1],r=a()[l/4+2],i=a()[l/4+3],o=s,f=n;if(i)throw o=0,f=0,c(r);return _=o,e=f,m(o,f)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}to_js_value(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.poolparams_to_js_value(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=a()[n/4+2];if(s)throw c(e);return c(_)}finally{t.__wbindgen_add_to_stack_pointer(16)}}static from_json(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=b;t.poolparams_from_json(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw c(s);return ne.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}operator(){const _=t.poolparams_operator(this.__wbg_ptr);return W.__wrap(_)}vrf_keyhash(){const _=t.poolparams_vrf_keyhash(this.__wbg_ptr);return M_.__wrap(_)}pledge(){const _=t.headerbody_slot_bignum(this.__wbg_ptr);return I.__wrap(_)}cost(){const _=t.poolparams_cost(this.__wbg_ptr);return I.__wrap(_)}margin(){const _=t.poolparams_margin(this.__wbg_ptr);return Lt.__wrap(_)}reward_account(){const _=t.poolparams_reward_account(this.__wbg_ptr);return I_.__wrap(_)}pool_owners(){const _=t.poolparams_pool_owners(this.__wbg_ptr);return Z.__wrap(_)}relays(){const _=t.poolparams_relays(this.__wbg_ptr);return ie.__wrap(_)}pool_metadata(){const _=t.poolparams_pool_metadata(this.__wbg_ptr);return _===0?void 0:re.__wrap(_)}static new(_,e,s,n,r,i,o,f,l){g(_,W),g(e,M_),g(s,I),g(n,I),g(r,Lt),g(i,I_),g(o,Z),g(f,ie);let H=0;nt(l)||(g(l,re),H=l.__destroy_into_raw());const rt=t.poolparams_new(_.__wbg_ptr,e.__wbg_ptr,s.__wbg_ptr,n.__wbg_ptr,r.__wbg_ptr,i.__wbg_ptr,o.__wbg_ptr,f.__wbg_ptr,H);return ne.__wrap(rt)}}p.exports.PoolParams=ne;class ae{static __wrap(_){_=_>>>0;const e=Object.create(ae.prototype);return e.__wbg_ptr=_,e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,_}free(){const _=this.__destroy_into_raw();t.__wbg_poolregistration_free(_)}to_bytes(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.poolregistration_to_bytes(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=D(_,e).slice();return t.__wbindgen_free(_,e*1),s}finally{t.__wbindgen_add_to_stack_pointer(16)}}static from_bytes(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=Q(_,t.__wbindgen_malloc),o=b;t.poolregistration_from_bytes(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw c(s);return ae.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_hex(){let _,e;try{const r=t.__wbindgen_add_to_stack_pointer(-16);t.poolregistration_to_hex(r,this.__wbg_ptr);var s=a()[r/4+0],n=a()[r/4+1];return _=s,e=n,m(s,n)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}static from_hex(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=b;t.poolregistration_from_hex(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw c(s);return ae.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_json(){let _,e;try{const l=t.__wbindgen_add_to_stack_pointer(-16);t.poolregistration_to_json(l,this.__wbg_ptr);var s=a()[l/4+0],n=a()[l/4+1],r=a()[l/4+2],i=a()[l/4+3],o=s,f=n;if(i)throw o=0,f=0,c(r);return _=o,e=f,m(o,f)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}to_js_value(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.poolregistration_to_js_value(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=a()[n/4+2];if(s)throw c(e);return c(_)}finally{t.__wbindgen_add_to_stack_pointer(16)}}static from_json(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=b;t.poolregistration_from_json(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw c(s);return ae.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}pool_params(){const _=t.poolregistration_pool_params(this.__wbg_ptr);return ne.__wrap(_)}static new(_){g(_,ne);const e=t.poolregistration_new(_.__wbg_ptr);return ae.__wrap(e)}}p.exports.PoolRegistration=ae;class se{static __wrap(_){_=_>>>0;const e=Object.create(se.prototype);return e.__wbg_ptr=_,e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,_}free(){const _=this.__destroy_into_raw();t.__wbg_poolretirement_free(_)}to_bytes(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.poolretirement_to_bytes(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=D(_,e).slice();return t.__wbindgen_free(_,e*1),s}finally{t.__wbindgen_add_to_stack_pointer(16)}}static from_bytes(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=Q(_,t.__wbindgen_malloc),o=b;t.poolretirement_from_bytes(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw c(s);return se.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_hex(){let _,e;try{const r=t.__wbindgen_add_to_stack_pointer(-16);t.poolretirement_to_hex(r,this.__wbg_ptr);var s=a()[r/4+0],n=a()[r/4+1];return _=s,e=n,m(s,n)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}static from_hex(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=b;t.poolretirement_from_hex(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw c(s);return se.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_json(){let _,e;try{const l=t.__wbindgen_add_to_stack_pointer(-16);t.poolretirement_to_json(l,this.__wbg_ptr);var s=a()[l/4+0],n=a()[l/4+1],r=a()[l/4+2],i=a()[l/4+3],o=s,f=n;if(i)throw o=0,f=0,c(r);return _=o,e=f,m(o,f)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}to_js_value(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.poolretirement_to_js_value(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=a()[n/4+2];if(s)throw c(e);return c(_)}finally{t.__wbindgen_add_to_stack_pointer(16)}}static from_json(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=b;t.poolretirement_from_json(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw c(s);return se.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}pool_keyhash(){const _=t.poolretirement_pool_keyhash(this.__wbg_ptr);return W.__wrap(_)}epoch(){return t.poolretirement_epoch(this.__wbg_ptr)>>>0}static new(_,e){g(_,W);const s=t.poolretirement_new(_.__wbg_ptr,e);return se.__wrap(s)}}p.exports.PoolRetirement=se;class k_{static __wrap(_){_=_>>>0;const e=Object.create(k_.prototype);return e.__wbg_ptr=_,e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,_}free(){const _=this.__destroy_into_raw();t.__wbg_privatekey_free(_)}to_public(){const _=t.privatekey_to_public(this.__wbg_ptr);return l_.__wrap(_)}static generate_ed25519(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.privatekey_generate_ed25519(n);var _=a()[n/4+0],e=a()[n/4+1],s=a()[n/4+2];if(s)throw c(e);return k_.__wrap(_)}finally{t.__wbindgen_add_to_stack_pointer(16)}}static generate_ed25519extended(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.privatekey_generate_ed25519extended(n);var _=a()[n/4+0],e=a()[n/4+1],s=a()[n/4+2];if(s)throw c(e);return k_.__wrap(_)}finally{t.__wbindgen_add_to_stack_pointer(16)}}static from_bech32(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=b;t.privatekey_from_bech32(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw c(s);return k_.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_bech32(){let _,e;try{const r=t.__wbindgen_add_to_stack_pointer(-16);t.privatekey_to_bech32(r,this.__wbg_ptr);var s=a()[r/4+0],n=a()[r/4+1];return _=s,e=n,m(s,n)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}as_bytes(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.privatekey_as_bytes(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=D(_,e).slice();return t.__wbindgen_free(_,e*1),s}finally{t.__wbindgen_add_to_stack_pointer(16)}}static from_extended_bytes(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=Q(_,t.__wbindgen_malloc),o=b;t.privatekey_from_extended_bytes(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw c(s);return k_.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}static from_normal_bytes(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=Q(_,t.__wbindgen_malloc),o=b;t.privatekey_from_normal_bytes(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw c(s);return k_.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}sign(_){const e=Q(_,t.__wbindgen_malloc),s=b,n=t.privatekey_sign(this.__wbg_ptr,e,s);return it.__wrap(n)}to_hex(){let _,e;try{const r=t.__wbindgen_add_to_stack_pointer(-16);t.privatekey_to_hex(r,this.__wbg_ptr);var s=a()[r/4+0],n=a()[r/4+1];return _=s,e=n,m(s,n)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}static from_hex(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=b;t.privatekey_from_hex(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw c(s);return k_.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}}p.exports.PrivateKey=k_;class oe{static __wrap(_){_=_>>>0;const e=Object.create(oe.prototype);return e.__wbg_ptr=_,e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,_}free(){const _=this.__destroy_into_raw();t.__wbg_proposedprotocolparameterupdates_free(_)}to_bytes(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.proposedprotocolparameterupdates_to_bytes(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=D(_,e).slice();return t.__wbindgen_free(_,e*1),s}finally{t.__wbindgen_add_to_stack_pointer(16)}}static from_bytes(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=Q(_,t.__wbindgen_malloc),o=b;t.proposedprotocolparameterupdates_from_bytes(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw c(s);return oe.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_hex(){let _,e;try{const r=t.__wbindgen_add_to_stack_pointer(-16);t.proposedprotocolparameterupdates_to_hex(r,this.__wbg_ptr);var s=a()[r/4+0],n=a()[r/4+1];return _=s,e=n,m(s,n)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}static from_hex(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=b;t.proposedprotocolparameterupdates_from_hex(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw c(s);return oe.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_json(){let _,e;try{const l=t.__wbindgen_add_to_stack_pointer(-16);t.proposedprotocolparameterupdates_to_json(l,this.__wbg_ptr);var s=a()[l/4+0],n=a()[l/4+1],r=a()[l/4+2],i=a()[l/4+3],o=s,f=n;if(i)throw o=0,f=0,c(r);return _=o,e=f,m(o,f)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}to_js_value(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.proposedprotocolparameterupdates_to_js_value(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=a()[n/4+2];if(s)throw c(e);return c(_)}finally{t.__wbindgen_add_to_stack_pointer(16)}}static from_json(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=b;t.proposedprotocolparameterupdates_from_json(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw c(s);return oe.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}static new(){const _=t.auxiliarydataset_new();return oe.__wrap(_)}len(){return t.auxiliarydataset_len(this.__wbg_ptr)>>>0}insert(_,e){g(_,Xt),g(e,T_);const s=t.proposedprotocolparameterupdates_insert(this.__wbg_ptr,_.__wbg_ptr,e.__wbg_ptr);return s===0?void 0:T_.__wrap(s)}get(_){g(_,Xt);const e=t.proposedprotocolparameterupdates_get(this.__wbg_ptr,_.__wbg_ptr);return e===0?void 0:T_.__wrap(e)}keys(){const _=t.proposedprotocolparameterupdates_keys(this.__wbg_ptr);return c_.__wrap(_)}}p.exports.ProposedProtocolParameterUpdates=oe;class T_{static __wrap(_){_=_>>>0;const e=Object.create(T_.prototype);return e.__wbg_ptr=_,e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,_}free(){const _=this.__destroy_into_raw();t.__wbg_protocolparamupdate_free(_)}to_bytes(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.protocolparamupdate_to_bytes(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=D(_,e).slice();return t.__wbindgen_free(_,e*1),s}finally{t.__wbindgen_add_to_stack_pointer(16)}}static from_bytes(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=Q(_,t.__wbindgen_malloc),o=b;t.protocolparamupdate_from_bytes(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw c(s);return T_.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_hex(){let _,e;try{const r=t.__wbindgen_add_to_stack_pointer(-16);t.protocolparamupdate_to_hex(r,this.__wbg_ptr);var s=a()[r/4+0],n=a()[r/4+1];return _=s,e=n,m(s,n)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}static from_hex(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=b;t.protocolparamupdate_from_hex(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw c(s);return T_.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_json(){let _,e;try{const l=t.__wbindgen_add_to_stack_pointer(-16);t.protocolparamupdate_to_json(l,this.__wbg_ptr);var s=a()[l/4+0],n=a()[l/4+1],r=a()[l/4+2],i=a()[l/4+3],o=s,f=n;if(i)throw o=0,f=0,c(r);return _=o,e=f,m(o,f)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}to_js_value(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.protocolparamupdate_to_js_value(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=a()[n/4+2];if(s)throw c(e);return c(_)}finally{t.__wbindgen_add_to_stack_pointer(16)}}static from_json(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=b;t.protocolparamupdate_from_json(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw c(s);return T_.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}set_minfee_a(_){g(_,I),t.protocolparamupdate_set_minfee_a(this.__wbg_ptr,_.__wbg_ptr)}minfee_a(){const _=t.protocolparamupdate_minfee_a(this.__wbg_ptr);return _===0?void 0:I.__wrap(_)}set_minfee_b(_){g(_,I),t.protocolparamupdate_set_minfee_b(this.__wbg_ptr,_.__wbg_ptr)}minfee_b(){const _=t.protocolparamupdate_minfee_b(this.__wbg_ptr);return _===0?void 0:I.__wrap(_)}set_max_block_body_size(_){t.protocolparamupdate_set_max_block_body_size(this.__wbg_ptr,_)}max_block_body_size(){try{const s=t.__wbindgen_add_to_stack_pointer(-16);t.protocolparamupdate_max_block_body_size(s,this.__wbg_ptr);var _=a()[s/4+0],e=a()[s/4+1];return _===0?void 0:e>>>0}finally{t.__wbindgen_add_to_stack_pointer(16)}}set_max_tx_size(_){t.protocolparamupdate_set_max_tx_size(this.__wbg_ptr,_)}max_tx_size(){try{const s=t.__wbindgen_add_to_stack_pointer(-16);t.protocolparamupdate_max_tx_size(s,this.__wbg_ptr);var _=a()[s/4+0],e=a()[s/4+1];return _===0?void 0:e>>>0}finally{t.__wbindgen_add_to_stack_pointer(16)}}set_max_block_header_size(_){t.protocolparamupdate_set_max_block_header_size(this.__wbg_ptr,_)}max_block_header_size(){try{const s=t.__wbindgen_add_to_stack_pointer(-16);t.protocolparamupdate_max_block_header_size(s,this.__wbg_ptr);var _=a()[s/4+0],e=a()[s/4+1];return _===0?void 0:e>>>0}finally{t.__wbindgen_add_to_stack_pointer(16)}}set_key_deposit(_){g(_,I),t.protocolparamupdate_set_key_deposit(this.__wbg_ptr,_.__wbg_ptr)}key_deposit(){const _=t.protocolparamupdate_key_deposit(this.__wbg_ptr);return _===0?void 0:I.__wrap(_)}set_pool_deposit(_){g(_,I),t.protocolparamupdate_set_pool_deposit(this.__wbg_ptr,_.__wbg_ptr)}pool_deposit(){const _=t.protocolparamupdate_pool_deposit(this.__wbg_ptr);return _===0?void 0:I.__wrap(_)}set_max_epoch(_){t.protocolparamupdate_set_max_epoch(this.__wbg_ptr,_)}max_epoch(){try{const s=t.__wbindgen_add_to_stack_pointer(-16);t.protocolparamupdate_max_epoch(s,this.__wbg_ptr);var _=a()[s/4+0],e=a()[s/4+1];return _===0?void 0:e>>>0}finally{t.__wbindgen_add_to_stack_pointer(16)}}set_n_opt(_){t.protocolparamupdate_set_n_opt(this.__wbg_ptr,_)}n_opt(){try{const s=t.__wbindgen_add_to_stack_pointer(-16);t.protocolparamupdate_n_opt(s,this.__wbg_ptr);var _=a()[s/4+0],e=a()[s/4+1];return _===0?void 0:e>>>0}finally{t.__wbindgen_add_to_stack_pointer(16)}}set_pool_pledge_influence(_){g(_,Lt),t.protocolparamupdate_set_pool_pledge_influence(this.__wbg_ptr,_.__wbg_ptr)}pool_pledge_influence(){const _=t.protocolparamupdate_pool_pledge_influence(this.__wbg_ptr);return _===0?void 0:Lt.__wrap(_)}set_expansion_rate(_){g(_,Lt),t.protocolparamupdate_set_expansion_rate(this.__wbg_ptr,_.__wbg_ptr)}expansion_rate(){const _=t.protocolparamupdate_expansion_rate(this.__wbg_ptr);return _===0?void 0:Lt.__wrap(_)}set_treasury_growth_rate(_){g(_,Lt),t.protocolparamupdate_set_treasury_growth_rate(this.__wbg_ptr,_.__wbg_ptr)}treasury_growth_rate(){const _=t.protocolparamupdate_treasury_growth_rate(this.__wbg_ptr);return _===0?void 0:Lt.__wrap(_)}d(){const _=t.protocolparamupdate_d(this.__wbg_ptr);return _===0?void 0:Lt.__wrap(_)}extra_entropy(){const _=t.protocolparamupdate_extra_entropy(this.__wbg_ptr);return _===0?void 0:te.__wrap(_)}set_protocol_version(_){g(_,w_),t.protocolparamupdate_set_protocol_version(this.__wbg_ptr,_.__wbg_ptr)}protocol_version(){const _=t.protocolparamupdate_protocol_version(this.__wbg_ptr);return _===0?void 0:w_.__wrap(_)}set_min_pool_cost(_){g(_,I),t.protocolparamupdate_set_min_pool_cost(this.__wbg_ptr,_.__wbg_ptr)}min_pool_cost(){const _=t.protocolparamupdate_min_pool_cost(this.__wbg_ptr);return _===0?void 0:I.__wrap(_)}set_ada_per_utxo_byte(_){g(_,I),t.protocolparamupdate_set_ada_per_utxo_byte(this.__wbg_ptr,_.__wbg_ptr)}ada_per_utxo_byte(){const _=t.protocolparamupdate_ada_per_utxo_byte(this.__wbg_ptr);return _===0?void 0:I.__wrap(_)}set_cost_models(_){g(_,F),t.protocolparamupdate_set_cost_models(this.__wbg_ptr,_.__wbg_ptr)}cost_models(){const _=t.protocolparamupdate_cost_models(this.__wbg_ptr);return _===0?void 0:F.__wrap(_)}set_execution_costs(_){g(_,vt),t.protocolparamupdate_set_execution_costs(this.__wbg_ptr,_.__wbg_ptr)}execution_costs(){const _=t.protocolparamupdate_execution_costs(this.__wbg_ptr);return _===0?void 0:vt.__wrap(_)}set_max_tx_ex_units(_){g(_,at),t.protocolparamupdate_set_max_tx_ex_units(this.__wbg_ptr,_.__wbg_ptr)}max_tx_ex_units(){const _=t.protocolparamupdate_max_tx_ex_units(this.__wbg_ptr);return _===0?void 0:at.__wrap(_)}set_max_block_ex_units(_){g(_,at),t.protocolparamupdate_set_max_block_ex_units(this.__wbg_ptr,_.__wbg_ptr)}max_block_ex_units(){const _=t.protocolparamupdate_max_block_ex_units(this.__wbg_ptr);return _===0?void 0:at.__wrap(_)}set_max_value_size(_){t.protocolparamupdate_set_max_value_size(this.__wbg_ptr,_)}max_value_size(){try{const s=t.__wbindgen_add_to_stack_pointer(-16);t.protocolparamupdate_max_value_size(s,this.__wbg_ptr);var _=a()[s/4+0],e=a()[s/4+1];return _===0?void 0:e>>>0}finally{t.__wbindgen_add_to_stack_pointer(16)}}set_collateral_percentage(_){t.protocolparamupdate_set_collateral_percentage(this.__wbg_ptr,_)}collateral_percentage(){try{const s=t.__wbindgen_add_to_stack_pointer(-16);t.protocolparamupdate_collateral_percentage(s,this.__wbg_ptr);var _=a()[s/4+0],e=a()[s/4+1];return _===0?void 0:e>>>0}finally{t.__wbindgen_add_to_stack_pointer(16)}}set_max_collateral_inputs(_){t.protocolparamupdate_set_max_collateral_inputs(this.__wbg_ptr,_)}max_collateral_inputs(){try{const s=t.__wbindgen_add_to_stack_pointer(-16);t.protocolparamupdate_max_collateral_inputs(s,this.__wbg_ptr);var _=a()[s/4+0],e=a()[s/4+1];return _===0?void 0:e>>>0}finally{t.__wbindgen_add_to_stack_pointer(16)}}static new(){const _=t.protocolparamupdate_new();return T_.__wrap(_)}}p.exports.ProtocolParamUpdate=T_;class w_{static __wrap(_){_=_>>>0;const e=Object.create(w_.prototype);return e.__wbg_ptr=_,e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,_}free(){const _=this.__destroy_into_raw();t.__wbg_protocolversion_free(_)}to_bytes(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.protocolversion_to_bytes(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=D(_,e).slice();return t.__wbindgen_free(_,e*1),s}finally{t.__wbindgen_add_to_stack_pointer(16)}}static from_bytes(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=Q(_,t.__wbindgen_malloc),o=b;t.protocolversion_from_bytes(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw c(s);return w_.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_hex(){let _,e;try{const r=t.__wbindgen_add_to_stack_pointer(-16);t.protocolversion_to_hex(r,this.__wbg_ptr);var s=a()[r/4+0],n=a()[r/4+1];return _=s,e=n,m(s,n)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}static from_hex(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=b;t.protocolversion_from_hex(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw c(s);return w_.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_json(){let _,e;try{const l=t.__wbindgen_add_to_stack_pointer(-16);t.protocolversion_to_json(l,this.__wbg_ptr);var s=a()[l/4+0],n=a()[l/4+1],r=a()[l/4+2],i=a()[l/4+3],o=s,f=n;if(i)throw o=0,f=0,c(r);return _=o,e=f,m(o,f)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}to_js_value(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.protocolversion_to_js_value(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=a()[n/4+2];if(s)throw c(e);return c(_)}finally{t.__wbindgen_add_to_stack_pointer(16)}}static from_json(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=b;t.protocolversion_from_json(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw c(s);return w_.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}major(){return t.networkinfo_protocol_magic(this.__wbg_ptr)>>>0}minor(){return t.protocolversion_minor(this.__wbg_ptr)>>>0}static new(_,e){const s=t.protocolversion_new(_,e);return w_.__wrap(s)}}p.exports.ProtocolVersion=w_;class l_{static __wrap(_){_=_>>>0;const e=Object.create(l_.prototype);return e.__wbg_ptr=_,e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,_}free(){const _=this.__destroy_into_raw();t.__wbg_publickey_free(_)}static from_bech32(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=b;t.publickey_from_bech32(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw c(s);return l_.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_bech32(){let _,e;try{const r=t.__wbindgen_add_to_stack_pointer(-16);t.publickey_to_bech32(r,this.__wbg_ptr);var s=a()[r/4+0],n=a()[r/4+1];return _=s,e=n,m(s,n)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}as_bytes(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.auxiliarydatahash_to_bytes(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=D(_,e).slice();return t.__wbindgen_free(_,e*1),s}finally{t.__wbindgen_add_to_stack_pointer(16)}}static from_bytes(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=Q(_,t.__wbindgen_malloc),o=b;t.publickey_from_bytes(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw c(s);return l_.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}verify(_,e){const s=Q(_,t.__wbindgen_malloc),n=b;return g(e,it),t.publickey_verify(this.__wbg_ptr,s,n,e.__wbg_ptr)!==0}hash(){const _=t.publickey_hash(this.__wbg_ptr);return W.__wrap(_)}to_hex(){let _,e;try{const r=t.__wbindgen_add_to_stack_pointer(-16);t.publickey_to_hex(r,this.__wbg_ptr);var s=a()[r/4+0],n=a()[r/4+1];return _=s,e=n,m(s,n)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}static from_hex(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=b;t.publickey_from_hex(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw c(s);return l_.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}}p.exports.PublicKey=l_;class Ir{static __wrap(_){_=_>>>0;const e=Object.create(Ir.prototype);return e.__wbg_ptr=_,e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,_}free(){const _=this.__destroy_into_raw();t.__wbg_publickeys_free(_)}constructor(){const _=t.ed25519keyhashes_new();return Ir.__wrap(_)}size(){return t.assetnames_len(this.__wbg_ptr)>>>0}get(_){const e=t.publickeys_get(this.__wbg_ptr,_);return l_.__wrap(e)}add(_){g(_,l_),t.publickeys_add(this.__wbg_ptr,_.__wbg_ptr)}}p.exports.PublicKeys=Ir;class e_{static __wrap(_){_=_>>>0;const e=Object.create(e_.prototype);return e.__wbg_ptr=_,e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,_}free(){const _=this.__destroy_into_raw();t.__wbg_redeemer_free(_)}to_bytes(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.redeemer_to_bytes(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=D(_,e).slice();return t.__wbindgen_free(_,e*1),s}finally{t.__wbindgen_add_to_stack_pointer(16)}}static from_bytes(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=Q(_,t.__wbindgen_malloc),o=b;t.redeemer_from_bytes(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw c(s);return e_.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_hex(){let _,e;try{const r=t.__wbindgen_add_to_stack_pointer(-16);t.redeemer_to_hex(r,this.__wbg_ptr);var s=a()[r/4+0],n=a()[r/4+1];return _=s,e=n,m(s,n)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}static from_hex(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=b;t.redeemer_from_hex(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw c(s);return e_.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_json(){let _,e;try{const l=t.__wbindgen_add_to_stack_pointer(-16);t.redeemer_to_json(l,this.__wbg_ptr);var s=a()[l/4+0],n=a()[l/4+1],r=a()[l/4+2],i=a()[l/4+3],o=s,f=n;if(i)throw o=0,f=0,c(r);return _=o,e=f,m(o,f)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}to_js_value(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.redeemer_to_js_value(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=a()[n/4+2];if(s)throw c(e);return c(_)}finally{t.__wbindgen_add_to_stack_pointer(16)}}static from_json(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=b;t.redeemer_from_json(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw c(s);return e_.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}tag(){const _=t.redeemer_tag(this.__wbg_ptr);return g_.__wrap(_)}index(){const _=t.redeemer_index(this.__wbg_ptr);return I.__wrap(_)}data(){const _=t.redeemer_data(this.__wbg_ptr);return ht.__wrap(_)}ex_units(){const _=t.redeemer_ex_units(this.__wbg_ptr);return at.__wrap(_)}static new(_,e,s,n){g(_,g_),g(e,I),g(s,ht),g(n,at);const r=t.redeemer_new(_.__wbg_ptr,e.__wbg_ptr,s.__wbg_ptr,n.__wbg_ptr);return e_.__wrap(r)}}p.exports.Redeemer=e_;class g_{static __wrap(_){_=_>>>0;const e=Object.create(g_.prototype);return e.__wbg_ptr=_,e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,_}free(){const _=this.__destroy_into_raw();t.__wbg_redeemertag_free(_)}to_bytes(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.redeemertag_to_bytes(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=D(_,e).slice();return t.__wbindgen_free(_,e*1),s}finally{t.__wbindgen_add_to_stack_pointer(16)}}static from_bytes(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=Q(_,t.__wbindgen_malloc),o=b;t.redeemertag_from_bytes(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw c(s);return g_.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_hex(){let _,e;try{const r=t.__wbindgen_add_to_stack_pointer(-16);t.redeemertag_to_hex(r,this.__wbg_ptr);var s=a()[r/4+0],n=a()[r/4+1];return _=s,e=n,m(s,n)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}static from_hex(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=b;t.redeemertag_from_hex(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw c(s);return g_.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_json(){let _,e;try{const l=t.__wbindgen_add_to_stack_pointer(-16);t.redeemertag_to_json(l,this.__wbg_ptr);var s=a()[l/4+0],n=a()[l/4+1],r=a()[l/4+2],i=a()[l/4+3],o=s,f=n;if(i)throw o=0,f=0,c(r);return _=o,e=f,m(o,f)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}to_js_value(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.redeemertag_to_js_value(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=a()[n/4+2];if(s)throw c(e);return c(_)}finally{t.__wbindgen_add_to_stack_pointer(16)}}static from_json(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=b;t.redeemertag_from_json(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw c(s);return g_.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}static new_spend(){const _=t.redeemertag_new_spend();return g_.__wrap(_)}static new_mint(){const _=t.redeemertag_new_mint();return g_.__wrap(_)}static new_cert(){const _=t.redeemertag_new_cert();return g_.__wrap(_)}static new_reward(){const _=t.redeemertag_new_reward();return g_.__wrap(_)}kind(){return t.redeemertag_kind(this.__wbg_ptr)>>>0}}p.exports.RedeemerTag=g_;class x_{static __wrap(_){_=_>>>0;const e=Object.create(x_.prototype);return e.__wbg_ptr=_,e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,_}free(){const _=this.__destroy_into_raw();t.__wbg_redeemers_free(_)}to_bytes(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.redeemers_to_bytes(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=D(_,e).slice();return t.__wbindgen_free(_,e*1),s}finally{t.__wbindgen_add_to_stack_pointer(16)}}static from_bytes(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=Q(_,t.__wbindgen_malloc),o=b;t.redeemers_from_bytes(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw c(s);return x_.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_hex(){let _,e;try{const r=t.__wbindgen_add_to_stack_pointer(-16);t.redeemers_to_hex(r,this.__wbg_ptr);var s=a()[r/4+0],n=a()[r/4+1];return _=s,e=n,m(s,n)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}static from_hex(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=b;t.redeemers_from_hex(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw c(s);return x_.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_json(){let _,e;try{const l=t.__wbindgen_add_to_stack_pointer(-16);t.redeemers_to_json(l,this.__wbg_ptr);var s=a()[l/4+0],n=a()[l/4+1],r=a()[l/4+2],i=a()[l/4+3],o=s,f=n;if(i)throw o=0,f=0,c(r);return _=o,e=f,m(o,f)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}to_js_value(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.redeemers_to_js_value(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=a()[n/4+2];if(s)throw c(e);return c(_)}finally{t.__wbindgen_add_to_stack_pointer(16)}}static from_json(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=b;t.redeemers_from_json(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw c(s);return x_.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}static new(){const _=t.certificates_new();return x_.__wrap(_)}len(){return t.assetnames_len(this.__wbg_ptr)>>>0}get(_){const e=t.redeemers_get(this.__wbg_ptr,_);return e_.__wrap(e)}add(_){g(_,e_),t.redeemers_add(this.__wbg_ptr,_.__wbg_ptr)}total_ex_units(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.redeemers_total_ex_units(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=a()[n/4+2];if(s)throw c(e);return at.__wrap(_)}finally{t.__wbindgen_add_to_stack_pointer(16)}}}p.exports.Redeemers=x_;class A_{static __wrap(_){_=_>>>0;const e=Object.create(A_.prototype);return e.__wbg_ptr=_,e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,_}free(){const _=this.__destroy_into_raw();t.__wbg_relay_free(_)}to_bytes(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.relay_to_bytes(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=D(_,e).slice();return t.__wbindgen_free(_,e*1),s}finally{t.__wbindgen_add_to_stack_pointer(16)}}static from_bytes(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=Q(_,t.__wbindgen_malloc),o=b;t.relay_from_bytes(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw c(s);return A_.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_hex(){let _,e;try{const r=t.__wbindgen_add_to_stack_pointer(-16);t.relay_to_hex(r,this.__wbg_ptr);var s=a()[r/4+0],n=a()[r/4+1];return _=s,e=n,m(s,n)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}static from_hex(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=b;t.relay_from_hex(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw c(s);return A_.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_json(){let _,e;try{const l=t.__wbindgen_add_to_stack_pointer(-16);t.relay_to_json(l,this.__wbg_ptr);var s=a()[l/4+0],n=a()[l/4+1],r=a()[l/4+2],i=a()[l/4+3],o=s,f=n;if(i)throw o=0,f=0,c(r);return _=o,e=f,m(o,f)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}to_js_value(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.relay_to_js_value(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=a()[n/4+2];if(s)throw c(e);return c(_)}finally{t.__wbindgen_add_to_stack_pointer(16)}}static from_json(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=b;t.relay_from_json(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw c(s);return A_.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}static new_single_host_addr(_){g(_,ge);const e=t.relay_new_single_host_addr(_.__wbg_ptr);return A_.__wrap(e)}static new_single_host_name(_){g(_,be);const e=t.relay_new_single_host_name(_.__wbg_ptr);return A_.__wrap(e)}static new_multi_host_name(_){g(_,Z_);const e=t.relay_new_multi_host_name(_.__wbg_ptr);return A_.__wrap(e)}kind(){return t.relay_kind(this.__wbg_ptr)>>>0}as_single_host_addr(){const _=t.relay_as_single_host_addr(this.__wbg_ptr);return _===0?void 0:ge.__wrap(_)}as_single_host_name(){const _=t.relay_as_single_host_name(this.__wbg_ptr);return _===0?void 0:be.__wrap(_)}as_multi_host_name(){const _=t.relay_as_multi_host_name(this.__wbg_ptr);return _===0?void 0:Z_.__wrap(_)}}p.exports.Relay=A_;class ie{static __wrap(_){_=_>>>0;const e=Object.create(ie.prototype);return e.__wbg_ptr=_,e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,_}free(){const _=this.__destroy_into_raw();t.__wbg_relays_free(_)}to_bytes(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.relays_to_bytes(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=D(_,e).slice();return t.__wbindgen_free(_,e*1),s}finally{t.__wbindgen_add_to_stack_pointer(16)}}static from_bytes(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=Q(_,t.__wbindgen_malloc),o=b;t.relays_from_bytes(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw c(s);return ie.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_hex(){let _,e;try{const r=t.__wbindgen_add_to_stack_pointer(-16);t.relays_to_hex(r,this.__wbg_ptr);var s=a()[r/4+0],n=a()[r/4+1];return _=s,e=n,m(s,n)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}static from_hex(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=b;t.relays_from_hex(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw c(s);return ie.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_json(){let _,e;try{const l=t.__wbindgen_add_to_stack_pointer(-16);t.relays_to_json(l,this.__wbg_ptr);var s=a()[l/4+0],n=a()[l/4+1],r=a()[l/4+2],i=a()[l/4+3],o=s,f=n;if(i)throw o=0,f=0,c(r);return _=o,e=f,m(o,f)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}to_js_value(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.relays_to_js_value(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=a()[n/4+2];if(s)throw c(e);return c(_)}finally{t.__wbindgen_add_to_stack_pointer(16)}}static from_json(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=b;t.relays_from_json(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw c(s);return ie.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}static new(){const _=t.assetnames_new();return ie.__wrap(_)}len(){return t.assetnames_len(this.__wbg_ptr)>>>0}get(_){const e=t.relays_get(this.__wbg_ptr,_);return A_.__wrap(e)}add(_){g(_,A_),t.relays_add(this.__wbg_ptr,_.__wbg_ptr)}}p.exports.Relays=ie;class I_{static __wrap(_){_=_>>>0;const e=Object.create(I_.prototype);return e.__wbg_ptr=_,e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,_}free(){const _=this.__destroy_into_raw();t.__wbg_rewardaddress_free(_)}static new(_,e){g(e,Qt);const s=t.enterpriseaddress_new(_,e.__wbg_ptr);return I_.__wrap(s)}payment_cred(){const _=t.baseaddress_payment_cred(this.__wbg_ptr);return Qt.__wrap(_)}to_address(){const _=t.rewardaddress_to_address(this.__wbg_ptr);return pt.__wrap(_)}static from_address(_){g(_,pt);const e=t.rewardaddress_from_address(_.__wbg_ptr);return e===0?void 0:I_.__wrap(e)}}p.exports.RewardAddress=I_;class Ue{static __wrap(_){_=_>>>0;const e=Object.create(Ue.prototype);return e.__wbg_ptr=_,e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,_}free(){const _=this.__destroy_into_raw();t.__wbg_rewardaddresses_free(_)}to_bytes(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.rewardaddresses_to_bytes(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=D(_,e).slice();return t.__wbindgen_free(_,e*1),s}finally{t.__wbindgen_add_to_stack_pointer(16)}}static from_bytes(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=Q(_,t.__wbindgen_malloc),o=b;t.rewardaddresses_from_bytes(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw c(s);return Ue.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_hex(){let _,e;try{const r=t.__wbindgen_add_to_stack_pointer(-16);t.rewardaddresses_to_hex(r,this.__wbg_ptr);var s=a()[r/4+0],n=a()[r/4+1];return _=s,e=n,m(s,n)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}static from_hex(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=b;t.rewardaddresses_from_hex(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw c(s);return Ue.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_json(){let _,e;try{const l=t.__wbindgen_add_to_stack_pointer(-16);t.rewardaddresses_to_json(l,this.__wbg_ptr);var s=a()[l/4+0],n=a()[l/4+1],r=a()[l/4+2],i=a()[l/4+3],o=s,f=n;if(i)throw o=0,f=0,c(r);return _=o,e=f,m(o,f)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}to_js_value(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.rewardaddresses_to_js_value(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=a()[n/4+2];if(s)throw c(e);return c(_)}finally{t.__wbindgen_add_to_stack_pointer(16)}}static from_json(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=b;t.rewardaddresses_from_json(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw c(s);return Ue.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}static new(){const _=t.ed25519keyhashes_new();return Ue.__wrap(_)}len(){return t.assetnames_len(this.__wbg_ptr)>>>0}get(_){const e=t.rewardaddresses_get(this.__wbg_ptr,_);return I_.__wrap(e)}add(_){g(_,I_),t.rewardaddresses_add(this.__wbg_ptr,_.__wbg_ptr)}}p.exports.RewardAddresses=Ue;class de{static __wrap(_){_=_>>>0;const e=Object.create(de.prototype);return e.__wbg_ptr=_,e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,_}free(){const _=this.__destroy_into_raw();t.__wbg_scriptall_free(_)}to_bytes(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.scriptall_to_bytes(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=D(_,e).slice();return t.__wbindgen_free(_,e*1),s}finally{t.__wbindgen_add_to_stack_pointer(16)}}static from_bytes(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=Q(_,t.__wbindgen_malloc),o=b;t.scriptall_from_bytes(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw c(s);return de.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_hex(){let _,e;try{const r=t.__wbindgen_add_to_stack_pointer(-16);t.scriptall_to_hex(r,this.__wbg_ptr);var s=a()[r/4+0],n=a()[r/4+1];return _=s,e=n,m(s,n)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}static from_hex(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=b;t.scriptall_from_hex(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw c(s);return de.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_json(){let _,e;try{const l=t.__wbindgen_add_to_stack_pointer(-16);t.scriptall_to_json(l,this.__wbg_ptr);var s=a()[l/4+0],n=a()[l/4+1],r=a()[l/4+2],i=a()[l/4+3],o=s,f=n;if(i)throw o=0,f=0,c(r);return _=o,e=f,m(o,f)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}to_js_value(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.scriptall_to_js_value(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=a()[n/4+2];if(s)throw c(e);return c(_)}finally{t.__wbindgen_add_to_stack_pointer(16)}}static from_json(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=b;t.scriptall_from_json(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw c(s);return de.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}native_scripts(){const _=t.scriptall_native_scripts(this.__wbg_ptr);return Ht.__wrap(_)}static new(_){g(_,Ht);const e=t.scriptall_new(_.__wbg_ptr);return de.__wrap(e)}}p.exports.ScriptAll=de;class ce{static __wrap(_){_=_>>>0;const e=Object.create(ce.prototype);return e.__wbg_ptr=_,e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,_}free(){const _=this.__destroy_into_raw();t.__wbg_scriptany_free(_)}to_bytes(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.scriptany_to_bytes(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=D(_,e).slice();return t.__wbindgen_free(_,e*1),s}finally{t.__wbindgen_add_to_stack_pointer(16)}}static from_bytes(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=Q(_,t.__wbindgen_malloc),o=b;t.scriptany_from_bytes(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw c(s);return ce.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_hex(){let _,e;try{const r=t.__wbindgen_add_to_stack_pointer(-16);t.scriptany_to_hex(r,this.__wbg_ptr);var s=a()[r/4+0],n=a()[r/4+1];return _=s,e=n,m(s,n)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}static from_hex(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=b;t.scriptany_from_hex(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw c(s);return ce.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_json(){let _,e;try{const l=t.__wbindgen_add_to_stack_pointer(-16);t.scriptall_to_json(l,this.__wbg_ptr);var s=a()[l/4+0],n=a()[l/4+1],r=a()[l/4+2],i=a()[l/4+3],o=s,f=n;if(i)throw o=0,f=0,c(r);return _=o,e=f,m(o,f)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}to_js_value(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.scriptany_to_js_value(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=a()[n/4+2];if(s)throw c(e);return c(_)}finally{t.__wbindgen_add_to_stack_pointer(16)}}static from_json(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=b;t.scriptany_from_json(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw c(s);return ce.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}native_scripts(){const _=t.scriptall_native_scripts(this.__wbg_ptr);return Ht.__wrap(_)}static new(_){g(_,Ht);const e=t.scriptall_new(_.__wbg_ptr);return ce.__wrap(e)}}p.exports.ScriptAny=ce;class N_{static __wrap(_){_=_>>>0;const e=Object.create(N_.prototype);return e.__wbg_ptr=_,e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,_}free(){const _=this.__destroy_into_raw();t.__wbg_scriptdatahash_free(_)}static from_bytes(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=Q(_,t.__wbindgen_malloc),o=b;t.scriptdatahash_from_bytes(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw c(s);return N_.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_bytes(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.auxiliarydatahash_to_bytes(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=D(_,e).slice();return t.__wbindgen_free(_,e*1),s}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_bech32(_){let e,s;try{const H=t.__wbindgen_add_to_stack_pointer(-16),rt=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),dt=b;t.auxiliarydatahash_to_bech32(H,this.__wbg_ptr,rt,dt);var n=a()[H/4+0],r=a()[H/4+1],i=a()[H/4+2],o=a()[H/4+3],f=n,l=r;if(o)throw f=0,l=0,c(i);return e=f,s=l,m(f,l)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(e,s,1)}}static from_bech32(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=b;t.scriptdatahash_from_bech32(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw c(s);return N_.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_hex(){let _,e;try{const r=t.__wbindgen_add_to_stack_pointer(-16);t.auxiliarydatahash_to_hex(r,this.__wbg_ptr);var s=a()[r/4+0],n=a()[r/4+1];return _=s,e=n,m(s,n)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}static from_hex(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=b;t.scriptdatahash_from_hex(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw c(s);return N_.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}}p.exports.ScriptDataHash=N_;class Ft{static __wrap(_){_=_>>>0;const e=Object.create(Ft.prototype);return e.__wbg_ptr=_,e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,_}free(){const _=this.__destroy_into_raw();t.__wbg_scripthash_free(_)}static from_bytes(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=Q(_,t.__wbindgen_malloc),o=b;t.scripthash_from_bytes(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw c(s);return Ft.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_bytes(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.ed25519keyhash_to_bytes(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=D(_,e).slice();return t.__wbindgen_free(_,e*1),s}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_bech32(_){let e,s;try{const H=t.__wbindgen_add_to_stack_pointer(-16),rt=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),dt=b;t.ed25519keyhash_to_bech32(H,this.__wbg_ptr,rt,dt);var n=a()[H/4+0],r=a()[H/4+1],i=a()[H/4+2],o=a()[H/4+3],f=n,l=r;if(o)throw f=0,l=0,c(i);return e=f,s=l,m(f,l)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(e,s,1)}}static from_bech32(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=b;t.scripthash_from_bech32(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw c(s);return Ft.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_hex(){let _,e;try{const r=t.__wbindgen_add_to_stack_pointer(-16);t.ed25519keyhash_to_hex(r,this.__wbg_ptr);var s=a()[r/4+0],n=a()[r/4+1];return _=s,e=n,m(s,n)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}static from_hex(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=b;t.scripthash_from_hex(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw c(s);return Ft.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}}p.exports.ScriptHash=Ft;class pe{static __wrap(_){_=_>>>0;const e=Object.create(pe.prototype);return e.__wbg_ptr=_,e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,_}free(){const _=this.__destroy_into_raw();t.__wbg_scripthashes_free(_)}to_bytes(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.scripthashes_to_bytes(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=D(_,e).slice();return t.__wbindgen_free(_,e*1),s}finally{t.__wbindgen_add_to_stack_pointer(16)}}static from_bytes(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=Q(_,t.__wbindgen_malloc),o=b;t.scripthashes_from_bytes(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw c(s);return pe.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_hex(){let _,e;try{const r=t.__wbindgen_add_to_stack_pointer(-16);t.scripthashes_to_hex(r,this.__wbg_ptr);var s=a()[r/4+0],n=a()[r/4+1];return _=s,e=n,m(s,n)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}static from_hex(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=b;t.scripthashes_from_hex(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw c(s);return pe.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_json(){let _,e;try{const l=t.__wbindgen_add_to_stack_pointer(-16);t.ed25519keyhashes_to_json(l,this.__wbg_ptr);var s=a()[l/4+0],n=a()[l/4+1],r=a()[l/4+2],i=a()[l/4+3],o=s,f=n;if(i)throw o=0,f=0,c(r);return _=o,e=f,m(o,f)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}to_js_value(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.ed25519keyhashes_to_js_value(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=a()[n/4+2];if(s)throw c(e);return c(_)}finally{t.__wbindgen_add_to_stack_pointer(16)}}static from_json(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=b;t.scripthashes_from_json(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw c(s);return pe.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}static new(){const _=t.ed25519keyhashes_new();return pe.__wrap(_)}len(){return t.assetnames_len(this.__wbg_ptr)>>>0}get(_){const e=t.scripthashes_get(this.__wbg_ptr,_);return Ft.__wrap(e)}add(_){g(_,Ft),t.ed25519keyhashes_add(this.__wbg_ptr,_.__wbg_ptr)}}p.exports.ScriptHashes=pe;class we{static __wrap(_){_=_>>>0;const e=Object.create(we.prototype);return e.__wbg_ptr=_,e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,_}free(){const _=this.__destroy_into_raw();t.__wbg_scriptnofk_free(_)}to_bytes(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.scriptnofk_to_bytes(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=D(_,e).slice();return t.__wbindgen_free(_,e*1),s}finally{t.__wbindgen_add_to_stack_pointer(16)}}static from_bytes(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=Q(_,t.__wbindgen_malloc),o=b;t.scriptnofk_from_bytes(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw c(s);return we.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_hex(){let _,e;try{const r=t.__wbindgen_add_to_stack_pointer(-16);t.scriptnofk_to_hex(r,this.__wbg_ptr);var s=a()[r/4+0],n=a()[r/4+1];return _=s,e=n,m(s,n)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}static from_hex(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=b;t.scriptnofk_from_hex(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw c(s);return we.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_json(){let _,e;try{const l=t.__wbindgen_add_to_stack_pointer(-16);t.scriptnofk_to_json(l,this.__wbg_ptr);var s=a()[l/4+0],n=a()[l/4+1],r=a()[l/4+2],i=a()[l/4+3],o=s,f=n;if(i)throw o=0,f=0,c(r);return _=o,e=f,m(o,f)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}to_js_value(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.scriptnofk_to_js_value(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=a()[n/4+2];if(s)throw c(e);return c(_)}finally{t.__wbindgen_add_to_stack_pointer(16)}}static from_json(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=b;t.scriptnofk_from_json(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw c(s);return we.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}n(){return t.scriptnofk_n(this.__wbg_ptr)>>>0}native_scripts(){const _=t.scriptall_native_scripts(this.__wbg_ptr);return Ht.__wrap(_)}static new(_,e){g(e,Ht);const s=t.scriptnofk_new(_,e.__wbg_ptr);return we.__wrap(s)}}p.exports.ScriptNOfK=we;class le{static __wrap(_){_=_>>>0;const e=Object.create(le.prototype);return e.__wbg_ptr=_,e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,_}free(){const _=this.__destroy_into_raw();t.__wbg_scriptpubkey_free(_)}to_bytes(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.scriptpubkey_to_bytes(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=D(_,e).slice();return t.__wbindgen_free(_,e*1),s}finally{t.__wbindgen_add_to_stack_pointer(16)}}static from_bytes(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=Q(_,t.__wbindgen_malloc),o=b;t.scriptpubkey_from_bytes(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw c(s);return le.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_hex(){let _,e;try{const r=t.__wbindgen_add_to_stack_pointer(-16);t.scriptpubkey_to_hex(r,this.__wbg_ptr);var s=a()[r/4+0],n=a()[r/4+1];return _=s,e=n,m(s,n)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}static from_hex(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=b;t.scriptpubkey_from_hex(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw c(s);return le.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_json(){let _,e;try{const l=t.__wbindgen_add_to_stack_pointer(-16);t.scriptpubkey_to_json(l,this.__wbg_ptr);var s=a()[l/4+0],n=a()[l/4+1],r=a()[l/4+2],i=a()[l/4+3],o=s,f=n;if(i)throw o=0,f=0,c(r);return _=o,e=f,m(o,f)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}to_js_value(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.scriptpubkey_to_js_value(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=a()[n/4+2];if(s)throw c(e);return c(_)}finally{t.__wbindgen_add_to_stack_pointer(16)}}static from_json(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=b;t.scriptpubkey_from_json(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw c(s);return le.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}addr_keyhash(){const _=t.scriptpubkey_addr_keyhash(this.__wbg_ptr);return W.__wrap(_)}static new(_){g(_,W);const e=t.scriptpubkey_new(_.__wbg_ptr);return le.__wrap(e)}}p.exports.ScriptPubkey=le;class C_{static __wrap(_){_=_>>>0;const e=Object.create(C_.prototype);return e.__wbg_ptr=_,e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,_}free(){const _=this.__destroy_into_raw();t.__wbg_scriptref_free(_)}to_bytes(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.scriptref_to_bytes(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=D(_,e).slice();return t.__wbindgen_free(_,e*1),s}finally{t.__wbindgen_add_to_stack_pointer(16)}}static from_bytes(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=Q(_,t.__wbindgen_malloc),o=b;t.scriptref_from_bytes(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw c(s);return C_.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_hex(){let _,e;try{const r=t.__wbindgen_add_to_stack_pointer(-16);t.scriptref_to_hex(r,this.__wbg_ptr);var s=a()[r/4+0],n=a()[r/4+1];return _=s,e=n,m(s,n)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}static from_hex(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=b;t.scriptref_from_hex(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw c(s);return C_.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_json(){let _,e;try{const l=t.__wbindgen_add_to_stack_pointer(-16);t.scriptref_to_json(l,this.__wbg_ptr);var s=a()[l/4+0],n=a()[l/4+1],r=a()[l/4+2],i=a()[l/4+3],o=s,f=n;if(i)throw o=0,f=0,c(r);return _=o,e=f,m(o,f)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}to_js_value(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.scriptref_to_js_value(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=a()[n/4+2];if(s)throw c(e);return c(_)}finally{t.__wbindgen_add_to_stack_pointer(16)}}static from_json(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=b;t.scriptref_from_json(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw c(s);return C_.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}static new_native_script(_){g(_,Nt);const e=t.scriptref_new_native_script(_.__wbg_ptr);return C_.__wrap(e)}static new_plutus_script(_){g(_,Vt);const e=t.scriptref_new_plutus_script(_.__wbg_ptr);return C_.__wrap(e)}is_native_script(){return t.scriptref_is_native_script(this.__wbg_ptr)!==0}is_plutus_script(){return t.scriptref_is_plutus_script(this.__wbg_ptr)!==0}native_script(){const _=t.scriptref_native_script(this.__wbg_ptr);return _===0?void 0:Nt.__wrap(_)}plutus_script(){const _=t.scriptref_plutus_script(this.__wbg_ptr);return _===0?void 0:Vt.__wrap(_)}}p.exports.ScriptRef=C_;class fr{static __wrap(_){_=_>>>0;const e=Object.create(fr.prototype);return e.__wbg_ptr=_,e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,_}free(){const _=this.__destroy_into_raw();t.__wbg_serializedaddress_free(_)}static new(_,e,s){const n=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),r=b,i=v(e,t.__wbindgen_malloc,t.__wbindgen_realloc),o=b,f=v(s,t.__wbindgen_malloc,t.__wbindgen_realloc),l=b,H=t.serializedaddress_new(n,r,i,o,f,l);return fr.__wrap(H)}get_pub_key_hash(){let _,e;try{const r=t.__wbindgen_add_to_stack_pointer(-16);t.serializedaddress_get_pub_key_hash(r,this.__wbg_ptr);var s=a()[r/4+0],n=a()[r/4+1];return _=s,e=n,m(s,n)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}get_script_hash(){let _,e;try{const r=t.__wbindgen_add_to_stack_pointer(-16);t.serializedaddress_get_script_hash(r,this.__wbg_ptr);var s=a()[r/4+0],n=a()[r/4+1];return _=s,e=n,m(s,n)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}get_stake_key_hash(){let _,e;try{const r=t.__wbindgen_add_to_stack_pointer(-16);t.serializedaddress_get_stake_key_hash(r,this.__wbg_ptr);var s=a()[r/4+0],n=a()[r/4+1];return _=s,e=n,m(s,n)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}}p.exports.SerializedAddress=fr;class ge{static __wrap(_){_=_>>>0;const e=Object.create(ge.prototype);return e.__wbg_ptr=_,e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,_}free(){const _=this.__destroy_into_raw();t.__wbg_singlehostaddr_free(_)}to_bytes(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.singlehostaddr_to_bytes(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=D(_,e).slice();return t.__wbindgen_free(_,e*1),s}finally{t.__wbindgen_add_to_stack_pointer(16)}}static from_bytes(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=Q(_,t.__wbindgen_malloc),o=b;t.singlehostaddr_from_bytes(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw c(s);return ge.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_hex(){let _,e;try{const r=t.__wbindgen_add_to_stack_pointer(-16);t.singlehostaddr_to_hex(r,this.__wbg_ptr);var s=a()[r/4+0],n=a()[r/4+1];return _=s,e=n,m(s,n)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}static from_hex(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=b;t.singlehostaddr_from_hex(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw c(s);return ge.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_json(){let _,e;try{const l=t.__wbindgen_add_to_stack_pointer(-16);t.singlehostaddr_to_json(l,this.__wbg_ptr);var s=a()[l/4+0],n=a()[l/4+1],r=a()[l/4+2],i=a()[l/4+3],o=s,f=n;if(i)throw o=0,f=0,c(r);return _=o,e=f,m(o,f)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}to_js_value(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.singlehostaddr_to_js_value(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=a()[n/4+2];if(s)throw c(e);return c(_)}finally{t.__wbindgen_add_to_stack_pointer(16)}}static from_json(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=b;t.singlehostaddr_from_json(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw c(s);return ge.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}port(){const _=t.singlehostaddr_port(this.__wbg_ptr);return _===16777215?void 0:_}ipv4(){const _=t.singlehostaddr_ipv4(this.__wbg_ptr);return _===0?void 0:G_.__wrap(_)}ipv6(){const _=t.singlehostaddr_ipv6(this.__wbg_ptr);return _===0?void 0:$_.__wrap(_)}static new(_,e,s){let n=0;nt(e)||(g(e,G_),n=e.__destroy_into_raw());let r=0;nt(s)||(g(s,$_),r=s.__destroy_into_raw());const i=t.singlehostaddr_new(nt(_)?16777215:_,n,r);return ge.__wrap(i)}}p.exports.SingleHostAddr=ge;class be{static __wrap(_){_=_>>>0;const e=Object.create(be.prototype);return e.__wbg_ptr=_,e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,_}free(){const _=this.__destroy_into_raw();t.__wbg_singlehostname_free(_)}to_bytes(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.singlehostname_to_bytes(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=D(_,e).slice();return t.__wbindgen_free(_,e*1),s}finally{t.__wbindgen_add_to_stack_pointer(16)}}static from_bytes(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=Q(_,t.__wbindgen_malloc),o=b;t.singlehostname_from_bytes(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw c(s);return be.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_hex(){let _,e;try{const r=t.__wbindgen_add_to_stack_pointer(-16);t.singlehostname_to_hex(r,this.__wbg_ptr);var s=a()[r/4+0],n=a()[r/4+1];return _=s,e=n,m(s,n)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}static from_hex(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=b;t.singlehostname_from_hex(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw c(s);return be.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_json(){let _,e;try{const l=t.__wbindgen_add_to_stack_pointer(-16);t.singlehostname_to_json(l,this.__wbg_ptr);var s=a()[l/4+0],n=a()[l/4+1],r=a()[l/4+2],i=a()[l/4+3],o=s,f=n;if(i)throw o=0,f=0,c(r);return _=o,e=f,m(o,f)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}to_js_value(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.singlehostname_to_js_value(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=a()[n/4+2];if(s)throw c(e);return c(_)}finally{t.__wbindgen_add_to_stack_pointer(16)}}static from_json(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=b;t.singlehostname_from_json(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw c(s);return be.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}port(){const _=t.singlehostname_port(this.__wbg_ptr);return _===16777215?void 0:_}dns_name(){const _=t.multihostname_dns_name(this.__wbg_ptr);return E.__wrap(_)}static new(_,e){g(e,E);const s=t.singlehostname_new(nt(_)?16777215:_,e.__wbg_ptr);return be.__wrap(s)}}p.exports.SingleHostName=be;class Qt{static __wrap(_){_=_>>>0;const e=Object.create(Qt.prototype);return e.__wbg_ptr=_,e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,_}free(){const _=this.__destroy_into_raw();t.__wbg_stakecredential_free(_)}static from_keyhash(_){g(_,W);const e=t.stakecredential_from_keyhash(_.__wbg_ptr);return Qt.__wrap(e)}static from_scripthash(_){g(_,Ft);const e=t.stakecredential_from_scripthash(_.__wbg_ptr);return Qt.__wrap(e)}to_keyhash(){const _=t.stakecredential_to_keyhash(this.__wbg_ptr);return _===0?void 0:W.__wrap(_)}to_scripthash(){const _=t.stakecredential_to_scripthash(this.__wbg_ptr);return _===0?void 0:Ft.__wrap(_)}kind(){return t.networkid_kind(this.__wbg_ptr)>>>0}to_bytes(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.stakecredential_to_bytes(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=D(_,e).slice();return t.__wbindgen_free(_,e*1),s}finally{t.__wbindgen_add_to_stack_pointer(16)}}static from_bytes(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=Q(_,t.__wbindgen_malloc),o=b;t.stakecredential_from_bytes(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw c(s);return Qt.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_hex(){let _,e;try{const r=t.__wbindgen_add_to_stack_pointer(-16);t.stakecredential_to_hex(r,this.__wbg_ptr);var s=a()[r/4+0],n=a()[r/4+1];return _=s,e=n,m(s,n)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}static from_hex(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=b;t.stakecredential_from_hex(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw c(s);return Qt.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_json(){let _,e;try{const l=t.__wbindgen_add_to_stack_pointer(-16);t.stakecredential_to_json(l,this.__wbg_ptr);var s=a()[l/4+0],n=a()[l/4+1],r=a()[l/4+2],i=a()[l/4+3],o=s,f=n;if(i)throw o=0,f=0,c(r);return _=o,e=f,m(o,f)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}to_js_value(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.stakecredential_to_js_value(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=a()[n/4+2];if(s)throw c(e);return c(_)}finally{t.__wbindgen_add_to_stack_pointer(16)}}static from_json(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=b;t.stakecredential_from_json(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw c(s);return Qt.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}}p.exports.StakeCredential=Qt;class Pe{static __wrap(_){_=_>>>0;const e=Object.create(Pe.prototype);return e.__wbg_ptr=_,e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,_}free(){const _=this.__destroy_into_raw();t.__wbg_stakecredentials_free(_)}to_bytes(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.stakecredentials_to_bytes(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=D(_,e).slice();return t.__wbindgen_free(_,e*1),s}finally{t.__wbindgen_add_to_stack_pointer(16)}}static from_bytes(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=Q(_,t.__wbindgen_malloc),o=b;t.stakecredentials_from_bytes(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw c(s);return Pe.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_hex(){let _,e;try{const r=t.__wbindgen_add_to_stack_pointer(-16);t.stakecredentials_to_hex(r,this.__wbg_ptr);var s=a()[r/4+0],n=a()[r/4+1];return _=s,e=n,m(s,n)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}static from_hex(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=b;t.stakecredentials_from_hex(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw c(s);return Pe.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_json(){let _,e;try{const l=t.__wbindgen_add_to_stack_pointer(-16);t.stakecredentials_to_json(l,this.__wbg_ptr);var s=a()[l/4+0],n=a()[l/4+1],r=a()[l/4+2],i=a()[l/4+3],o=s,f=n;if(i)throw o=0,f=0,c(r);return _=o,e=f,m(o,f)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}to_js_value(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.stakecredentials_to_js_value(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=a()[n/4+2];if(s)throw c(e);return c(_)}finally{t.__wbindgen_add_to_stack_pointer(16)}}static from_json(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=b;t.stakecredentials_from_json(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw c(s);return Pe.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}static new(){const _=t.ed25519keyhashes_new();return Pe.__wrap(_)}len(){return t.assetnames_len(this.__wbg_ptr)>>>0}get(_){const e=t.stakecredentials_get(this.__wbg_ptr,_);return Qt.__wrap(e)}add(_){g(_,Qt),t.stakecredentials_add(this.__wbg_ptr,_.__wbg_ptr)}}p.exports.StakeCredentials=Pe;class ue{static __wrap(_){_=_>>>0;const e=Object.create(ue.prototype);return e.__wbg_ptr=_,e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,_}free(){const _=this.__destroy_into_raw();t.__wbg_stakedelegation_free(_)}to_bytes(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.stakedelegation_to_bytes(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=D(_,e).slice();return t.__wbindgen_free(_,e*1),s}finally{t.__wbindgen_add_to_stack_pointer(16)}}static from_bytes(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=Q(_,t.__wbindgen_malloc),o=b;t.stakedelegation_from_bytes(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw c(s);return ue.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_hex(){let _,e;try{const r=t.__wbindgen_add_to_stack_pointer(-16);t.stakedelegation_to_hex(r,this.__wbg_ptr);var s=a()[r/4+0],n=a()[r/4+1];return _=s,e=n,m(s,n)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}static from_hex(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=b;t.stakedelegation_from_hex(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw c(s);return ue.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_json(){let _,e;try{const l=t.__wbindgen_add_to_stack_pointer(-16);t.stakedelegation_to_json(l,this.__wbg_ptr);var s=a()[l/4+0],n=a()[l/4+1],r=a()[l/4+2],i=a()[l/4+3],o=s,f=n;if(i)throw o=0,f=0,c(r);return _=o,e=f,m(o,f)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}to_js_value(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.stakedelegation_to_js_value(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=a()[n/4+2];if(s)throw c(e);return c(_)}finally{t.__wbindgen_add_to_stack_pointer(16)}}static from_json(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=b;t.stakedelegation_from_json(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw c(s);return ue.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}stake_credential(){const _=t.baseaddress_payment_cred(this.__wbg_ptr);return Qt.__wrap(_)}pool_keyhash(){const _=t.stakedelegation_pool_keyhash(this.__wbg_ptr);return W.__wrap(_)}static new(_,e){g(_,Qt),g(e,W);const s=t.stakedelegation_new(_.__wbg_ptr,e.__wbg_ptr);return ue.__wrap(s)}}p.exports.StakeDelegation=ue;class fe{static __wrap(_){_=_>>>0;const e=Object.create(fe.prototype);return e.__wbg_ptr=_,e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,_}free(){const _=this.__destroy_into_raw();t.__wbg_stakederegistration_free(_)}to_bytes(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.stakederegistration_to_bytes(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=D(_,e).slice();return t.__wbindgen_free(_,e*1),s}finally{t.__wbindgen_add_to_stack_pointer(16)}}static from_bytes(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=Q(_,t.__wbindgen_malloc),o=b;t.stakederegistration_from_bytes(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw c(s);return fe.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_hex(){let _,e;try{const r=t.__wbindgen_add_to_stack_pointer(-16);t.stakederegistration_to_hex(r,this.__wbg_ptr);var s=a()[r/4+0],n=a()[r/4+1];return _=s,e=n,m(s,n)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}static from_hex(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=b;t.stakederegistration_from_hex(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw c(s);return fe.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_json(){let _,e;try{const l=t.__wbindgen_add_to_stack_pointer(-16);t.stakederegistration_to_json(l,this.__wbg_ptr);var s=a()[l/4+0],n=a()[l/4+1],r=a()[l/4+2],i=a()[l/4+3],o=s,f=n;if(i)throw o=0,f=0,c(r);return _=o,e=f,m(o,f)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}to_js_value(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.stakederegistration_to_js_value(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=a()[n/4+2];if(s)throw c(e);return c(_)}finally{t.__wbindgen_add_to_stack_pointer(16)}}static from_json(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=b;t.stakederegistration_from_json(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw c(s);return fe.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}stake_credential(){const _=t.baseaddress_payment_cred(this.__wbg_ptr);return Qt.__wrap(_)}static new(_){g(_,Qt);const e=t.stakederegistration_new(_.__wbg_ptr);return fe.__wrap(e)}}p.exports.StakeDeregistration=fe;class he{static __wrap(_){_=_>>>0;const e=Object.create(he.prototype);return e.__wbg_ptr=_,e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,_}free(){const _=this.__destroy_into_raw();t.__wbg_stakeregistration_free(_)}to_bytes(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.stakeregistration_to_bytes(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=D(_,e).slice();return t.__wbindgen_free(_,e*1),s}finally{t.__wbindgen_add_to_stack_pointer(16)}}static from_bytes(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=Q(_,t.__wbindgen_malloc),o=b;t.stakeregistration_from_bytes(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw c(s);return he.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_hex(){let _,e;try{const r=t.__wbindgen_add_to_stack_pointer(-16);t.stakeregistration_to_hex(r,this.__wbg_ptr);var s=a()[r/4+0],n=a()[r/4+1];return _=s,e=n,m(s,n)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}static from_hex(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=b;t.stakeregistration_from_hex(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw c(s);return he.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_json(){let _,e;try{const l=t.__wbindgen_add_to_stack_pointer(-16);t.stakederegistration_to_json(l,this.__wbg_ptr);var s=a()[l/4+0],n=a()[l/4+1],r=a()[l/4+2],i=a()[l/4+3],o=s,f=n;if(i)throw o=0,f=0,c(r);return _=o,e=f,m(o,f)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}to_js_value(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.stakeregistration_to_js_value(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=a()[n/4+2];if(s)throw c(e);return c(_)}finally{t.__wbindgen_add_to_stack_pointer(16)}}static from_json(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=b;t.stakeregistration_from_json(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw c(s);return he.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}stake_credential(){const _=t.baseaddress_payment_cred(this.__wbg_ptr);return Qt.__wrap(_)}static new(_){g(_,Qt);const e=t.stakederegistration_new(_.__wbg_ptr);return he.__wrap(e)}}p.exports.StakeRegistration=he;class Cr{static __wrap(_){_=_>>>0;const e=Object.create(Cr.prototype);return e.__wbg_ptr=_,e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,_}free(){const _=this.__destroy_into_raw();t.__wbg_strings_free(_)}static new(){const _=t.assetnames_new();return Cr.__wrap(_)}len(){return t.assetnames_len(this.__wbg_ptr)>>>0}get(_){let e,s;try{const i=t.__wbindgen_add_to_stack_pointer(-16);t.strings_get(i,this.__wbg_ptr,_);var n=a()[i/4+0],r=a()[i/4+1];return e=n,s=r,m(n,r)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(e,s,1)}}add(_){const e=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),s=b;t.strings_add(this.__wbg_ptr,e,s)}}p.exports.Strings=Cr;class U_{static __wrap(_){_=_>>>0;const e=Object.create(U_.prototype);return e.__wbg_ptr=_,e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,_}free(){const _=this.__destroy_into_raw();t.__wbg_timelockexpiry_free(_)}to_bytes(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.timelockexpiry_to_bytes(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=D(_,e).slice();return t.__wbindgen_free(_,e*1),s}finally{t.__wbindgen_add_to_stack_pointer(16)}}static from_bytes(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=Q(_,t.__wbindgen_malloc),o=b;t.timelockexpiry_from_bytes(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw c(s);return U_.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_hex(){let _,e;try{const r=t.__wbindgen_add_to_stack_pointer(-16);t.timelockexpiry_to_hex(r,this.__wbg_ptr);var s=a()[r/4+0],n=a()[r/4+1];return _=s,e=n,m(s,n)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}static from_hex(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=b;t.timelockexpiry_from_hex(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw c(s);return U_.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_json(){let _,e;try{const l=t.__wbindgen_add_to_stack_pointer(-16);t.timelockexpiry_to_json(l,this.__wbg_ptr);var s=a()[l/4+0],n=a()[l/4+1],r=a()[l/4+2],i=a()[l/4+3],o=s,f=n;if(i)throw o=0,f=0,c(r);return _=o,e=f,m(o,f)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}to_js_value(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.timelockexpiry_to_js_value(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=a()[n/4+2];if(s)throw c(e);return c(_)}finally{t.__wbindgen_add_to_stack_pointer(16)}}static from_json(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=b;t.timelockexpiry_from_json(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw c(s);return U_.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}slot(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.timelockexpiry_slot(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=a()[n/4+2];if(s)throw c(e);return _>>>0}finally{t.__wbindgen_add_to_stack_pointer(16)}}slot_bignum(){const _=t.linearfee_constant(this.__wbg_ptr);return I.__wrap(_)}static new(_){const e=t.timelockexpiry_new(_);return U_.__wrap(e)}static new_timelockexpiry(_){g(_,I);const e=t.exunits_mem(_.__wbg_ptr);return U_.__wrap(e)}}p.exports.TimelockExpiry=U_;class P_{static __wrap(_){_=_>>>0;const e=Object.create(P_.prototype);return e.__wbg_ptr=_,e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,_}free(){const _=this.__destroy_into_raw();t.__wbg_timelockstart_free(_)}to_bytes(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.timelockstart_to_bytes(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=D(_,e).slice();return t.__wbindgen_free(_,e*1),s}finally{t.__wbindgen_add_to_stack_pointer(16)}}static from_bytes(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=Q(_,t.__wbindgen_malloc),o=b;t.timelockstart_from_bytes(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw c(s);return P_.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_hex(){let _,e;try{const r=t.__wbindgen_add_to_stack_pointer(-16);t.timelockstart_to_hex(r,this.__wbg_ptr);var s=a()[r/4+0],n=a()[r/4+1];return _=s,e=n,m(s,n)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}static from_hex(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=b;t.timelockstart_from_hex(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw c(s);return P_.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_json(){let _,e;try{const l=t.__wbindgen_add_to_stack_pointer(-16);t.timelockexpiry_to_json(l,this.__wbg_ptr);var s=a()[l/4+0],n=a()[l/4+1],r=a()[l/4+2],i=a()[l/4+3],o=s,f=n;if(i)throw o=0,f=0,c(r);return _=o,e=f,m(o,f)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}to_js_value(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.timelockstart_to_js_value(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=a()[n/4+2];if(s)throw c(e);return c(_)}finally{t.__wbindgen_add_to_stack_pointer(16)}}static from_json(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=b;t.timelockstart_from_json(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw c(s);return P_.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}slot(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.timelockexpiry_slot(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=a()[n/4+2];if(s)throw c(e);return _>>>0}finally{t.__wbindgen_add_to_stack_pointer(16)}}slot_bignum(){const _=t.linearfee_constant(this.__wbg_ptr);return I.__wrap(_)}static new(_){const e=t.timelockexpiry_new(_);return P_.__wrap(e)}static new_timelockstart(_){g(_,I);const e=t.exunits_mem(_.__wbg_ptr);return P_.__wrap(e)}}p.exports.TimelockStart=P_;class b_{static __wrap(_){_=_>>>0;const e=Object.create(b_.prototype);return e.__wbg_ptr=_,e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,_}free(){const _=this.__destroy_into_raw();t.__wbg_transaction_free(_)}to_bytes(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.transaction_to_bytes(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=D(_,e).slice();return t.__wbindgen_free(_,e*1),s}finally{t.__wbindgen_add_to_stack_pointer(16)}}static from_bytes(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=Q(_,t.__wbindgen_malloc),o=b;t.transaction_from_bytes(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw c(s);return b_.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_hex(){let _,e;try{const r=t.__wbindgen_add_to_stack_pointer(-16);t.transaction_to_hex(r,this.__wbg_ptr);var s=a()[r/4+0],n=a()[r/4+1];return _=s,e=n,m(s,n)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}static from_hex(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=b;t.transaction_from_hex(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw c(s);return b_.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_json(){let _,e;try{const l=t.__wbindgen_add_to_stack_pointer(-16);t.transaction_to_json(l,this.__wbg_ptr);var s=a()[l/4+0],n=a()[l/4+1],r=a()[l/4+2],i=a()[l/4+3],o=s,f=n;if(i)throw o=0,f=0,c(r);return _=o,e=f,m(o,f)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}to_js_value(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.transaction_to_js_value(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=a()[n/4+2];if(s)throw c(e);return c(_)}finally{t.__wbindgen_add_to_stack_pointer(16)}}static from_json(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=b;t.transaction_from_json(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw c(s);return b_.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}body(){const _=t.fixedtransaction_body(this.__wbg_ptr);return Wt.__wrap(_)}witness_set(){const _=t.transaction_witness_set(this.__wbg_ptr);return f_.__wrap(_)}is_valid(){return t.transaction_is_valid(this.__wbg_ptr)!==0}auxiliary_data(){const _=t.transaction_auxiliary_data(this.__wbg_ptr);return _===0?void 0:Pt.__wrap(_)}set_is_valid(_){t.transaction_set_is_valid(this.__wbg_ptr,_)}static new(_,e,s){g(_,Wt),g(e,f_);let n=0;nt(s)||(g(s,Pt),n=s.__destroy_into_raw());const r=t.transaction_new(_.__wbg_ptr,e.__wbg_ptr,n);return b_.__wrap(r)}}p.exports.Transaction=b_;class jr{static __wrap(_){_=_>>>0;const e=Object.create(jr.prototype);return e.__wbg_ptr=_,e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,_}free(){const _=this.__destroy_into_raw();t.__wbg_transactionbatch_free(_)}len(){return t.assetnames_len(this.__wbg_ptr)>>>0}get(_){const e=t.transactionbatch_get(this.__wbg_ptr,_);return b_.__wrap(e)}}p.exports.TransactionBatch=jr;class Br{static __wrap(_){_=_>>>0;const e=Object.create(Br.prototype);return e.__wbg_ptr=_,e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,_}free(){const _=this.__destroy_into_raw();t.__wbg_transactionbatchlist_free(_)}len(){return t.assetnames_len(this.__wbg_ptr)>>>0}get(_){const e=t.transactionbatchlist_get(this.__wbg_ptr,_);return jr.__wrap(e)}}p.exports.TransactionBatchList=Br;class ye{static __wrap(_){_=_>>>0;const e=Object.create(ye.prototype);return e.__wbg_ptr=_,e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,_}free(){const _=this.__destroy_into_raw();t.__wbg_transactionbodies_free(_)}to_bytes(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.transactionbodies_to_bytes(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=D(_,e).slice();return t.__wbindgen_free(_,e*1),s}finally{t.__wbindgen_add_to_stack_pointer(16)}}static from_bytes(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=Q(_,t.__wbindgen_malloc),o=b;t.transactionbodies_from_bytes(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw c(s);return ye.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_hex(){let _,e;try{const r=t.__wbindgen_add_to_stack_pointer(-16);t.transactionbodies_to_hex(r,this.__wbg_ptr);var s=a()[r/4+0],n=a()[r/4+1];return _=s,e=n,m(s,n)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}static from_hex(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=b;t.transactionbodies_from_hex(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw c(s);return ye.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_json(){let _,e;try{const l=t.__wbindgen_add_to_stack_pointer(-16);t.transactionbodies_to_json(l,this.__wbg_ptr);var s=a()[l/4+0],n=a()[l/4+1],r=a()[l/4+2],i=a()[l/4+3],o=s,f=n;if(i)throw o=0,f=0,c(r);return _=o,e=f,m(o,f)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}to_js_value(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.transactionbodies_to_js_value(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=a()[n/4+2];if(s)throw c(e);return c(_)}finally{t.__wbindgen_add_to_stack_pointer(16)}}static from_json(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=b;t.transactionbodies_from_json(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw c(s);return ye.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}static new(){const _=t.certificates_new();return ye.__wrap(_)}len(){return t.assetnames_len(this.__wbg_ptr)>>>0}get(_){const e=t.transactionbodies_get(this.__wbg_ptr,_);return Wt.__wrap(e)}add(_){g(_,Wt),t.transactionbodies_add(this.__wbg_ptr,_.__wbg_ptr)}}p.exports.TransactionBodies=ye;class Wt{static __wrap(_){_=_>>>0;const e=Object.create(Wt.prototype);return e.__wbg_ptr=_,e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,_}free(){const _=this.__destroy_into_raw();t.__wbg_transactionbody_free(_)}to_bytes(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.transactionbody_to_bytes(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=D(_,e).slice();return t.__wbindgen_free(_,e*1),s}finally{t.__wbindgen_add_to_stack_pointer(16)}}static from_bytes(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=Q(_,t.__wbindgen_malloc),o=b;t.transactionbody_from_bytes(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw c(s);return Wt.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_hex(){let _,e;try{const r=t.__wbindgen_add_to_stack_pointer(-16);t.transactionbody_to_hex(r,this.__wbg_ptr);var s=a()[r/4+0],n=a()[r/4+1];return _=s,e=n,m(s,n)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}static from_hex(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=b;t.transactionbody_from_hex(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw c(s);return Wt.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_json(){let _,e;try{const l=t.__wbindgen_add_to_stack_pointer(-16);t.transactionbody_to_json(l,this.__wbg_ptr);var s=a()[l/4+0],n=a()[l/4+1],r=a()[l/4+2],i=a()[l/4+3],o=s,f=n;if(i)throw o=0,f=0,c(r);return _=o,e=f,m(o,f)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}to_js_value(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.transactionbody_to_js_value(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=a()[n/4+2];if(s)throw c(e);return c(_)}finally{t.__wbindgen_add_to_stack_pointer(16)}}static from_json(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=b;t.transactionbody_from_json(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw c(s);return Wt.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}inputs(){const _=t.transactionbody_inputs(this.__wbg_ptr);return zt.__wrap(_)}outputs(){const _=t.transactionbody_outputs(this.__wbg_ptr);return F_.__wrap(_)}fee(){const _=t.transactionbody_fee(this.__wbg_ptr);return I.__wrap(_)}ttl(){try{const r=t.__wbindgen_add_to_stack_pointer(-16);t.transactionbody_ttl(r,this.__wbg_ptr);var _=a()[r/4+0],e=a()[r/4+1],s=a()[r/4+2],n=a()[r/4+3];if(n)throw c(s);return _===0?void 0:e>>>0}finally{t.__wbindgen_add_to_stack_pointer(16)}}ttl_bignum(){const _=t.transactionbody_ttl_bignum(this.__wbg_ptr);return _===0?void 0:I.__wrap(_)}set_ttl(_){g(_,I),t.protocolparamupdate_set_minfee_a(this.__wbg_ptr,_.__wbg_ptr)}remove_ttl(){t.transactionbody_remove_ttl(this.__wbg_ptr)}set_certs(_){g(_,N),t.transactionbody_set_certs(this.__wbg_ptr,_.__wbg_ptr)}certs(){const _=t.transactionbody_certs(this.__wbg_ptr);return _===0?void 0:N.__wrap(_)}set_withdrawals(_){g(_,H_),t.transactionbody_set_withdrawals(this.__wbg_ptr,_.__wbg_ptr)}withdrawals(){const _=t.transactionbody_withdrawals(this.__wbg_ptr);return _===0?void 0:H_.__wrap(_)}set_update(_){g(_,xe),t.transactionbody_set_update(this.__wbg_ptr,_.__wbg_ptr)}update(){const _=t.transactionbody_update(this.__wbg_ptr);return _===0?void 0:xe.__wrap(_)}set_auxiliary_data_hash(_){g(_,qt),t.transactionbody_set_auxiliary_data_hash(this.__wbg_ptr,_.__wbg_ptr)}auxiliary_data_hash(){const _=t.transactionbody_auxiliary_data_hash(this.__wbg_ptr);return _===0?void 0:qt.__wrap(_)}set_validity_start_interval(_){t.transactionbody_set_validity_start_interval(this.__wbg_ptr,_)}set_validity_start_interval_bignum(_){g(_,I);var e=_.__destroy_into_raw();t.transactionbody_set_validity_start_interval_bignum(this.__wbg_ptr,e)}validity_start_interval_bignum(){const _=t.protocolparamupdate_minfee_b(this.__wbg_ptr);return _===0?void 0:I.__wrap(_)}validity_start_interval(){try{const r=t.__wbindgen_add_to_stack_pointer(-16);t.transactionbody_validity_start_interval(r,this.__wbg_ptr);var _=a()[r/4+0],e=a()[r/4+1],s=a()[r/4+2],n=a()[r/4+3];if(n)throw c(s);return _===0?void 0:e>>>0}finally{t.__wbindgen_add_to_stack_pointer(16)}}set_mint(_){g(_,r_),t.transactionbody_set_mint(this.__wbg_ptr,_.__wbg_ptr)}mint(){const _=t.transactionbody_mint(this.__wbg_ptr);return _===0?void 0:r_.__wrap(_)}multiassets(){const _=t.transactionbody_multiassets(this.__wbg_ptr);return _===0?void 0:r_.__wrap(_)}set_reference_inputs(_){g(_,zt),t.transactionbody_set_reference_inputs(this.__wbg_ptr,_.__wbg_ptr)}reference_inputs(){const _=t.transactionbody_reference_inputs(this.__wbg_ptr);return _===0?void 0:zt.__wrap(_)}set_script_data_hash(_){g(_,N_),t.transactionbody_set_script_data_hash(this.__wbg_ptr,_.__wbg_ptr)}script_data_hash(){const _=t.transactionbody_script_data_hash(this.__wbg_ptr);return _===0?void 0:N_.__wrap(_)}set_collateral(_){g(_,zt),t.transactionbody_set_collateral(this.__wbg_ptr,_.__wbg_ptr)}collateral(){const _=t.transactionbody_collateral(this.__wbg_ptr);return _===0?void 0:zt.__wrap(_)}set_required_signers(_){g(_,Z),t.transactionbody_set_required_signers(this.__wbg_ptr,_.__wbg_ptr)}required_signers(){const _=t.transactionbody_required_signers(this.__wbg_ptr);return _===0?void 0:Z.__wrap(_)}set_network_id(_){g(_,O_),t.transactionbody_set_network_id(this.__wbg_ptr,_.__wbg_ptr)}network_id(){const _=t.transactionbody_network_id(this.__wbg_ptr);return _===0?void 0:O_.__wrap(_)}set_collateral_return(_){g(_,Yt),t.transactionbody_set_collateral_return(this.__wbg_ptr,_.__wbg_ptr)}collateral_return(){const _=t.transactionbody_collateral_return(this.__wbg_ptr);return _===0?void 0:Yt.__wrap(_)}set_total_collateral(_){g(_,I),t.protocolparamupdate_set_key_deposit(this.__wbg_ptr,_.__wbg_ptr)}total_collateral(){const _=t.protocolparamupdate_key_deposit(this.__wbg_ptr);return _===0?void 0:I.__wrap(_)}static new(_,e,s,n){g(_,zt),g(e,F_),g(s,I);const r=t.transactionbody_new(_.__wbg_ptr,e.__wbg_ptr,s.__wbg_ptr,!nt(n),nt(n)?0:n);return Wt.__wrap(r)}static new_tx_body(_,e,s){g(_,zt),g(e,F_),g(s,I);const n=t.transactionbody_new_tx_body(_.__wbg_ptr,e.__wbg_ptr,s.__wbg_ptr);return Wt.__wrap(n)}}p.exports.TransactionBody=Wt;class Er{static __wrap(_){_=_>>>0;const e=Object.create(Er.prototype);return e.__wbg_ptr=_,e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,_}free(){const _=this.__destroy_into_raw();t.__wbg_transactionbuilder_free(_)}add_inputs_from(_,e){try{const r=t.__wbindgen_add_to_stack_pointer(-16);g(_,$e),t.transactionbuilder_add_inputs_from(r,this.__wbg_ptr,_.__wbg_ptr,e);var s=a()[r/4+0],n=a()[r/4+1];if(n)throw c(s)}finally{t.__wbindgen_add_to_stack_pointer(16)}}set_inputs(_){g(_,ar),t.transactionbuilder_set_inputs(this.__wbg_ptr,_.__wbg_ptr)}set_collateral(_){g(_,ar),t.transactionbuilder_set_collateral(this.__wbg_ptr,_.__wbg_ptr)}set_collateral_return(_){g(_,Yt),t.transactionbuilder_set_collateral_return(this.__wbg_ptr,_.__wbg_ptr)}set_collateral_return_and_total(_){try{const n=t.__wbindgen_add_to_stack_pointer(-16);g(_,Yt),t.transactionbuilder_set_collateral_return_and_total(n,this.__wbg_ptr,_.__wbg_ptr);var e=a()[n/4+0],s=a()[n/4+1];if(s)throw c(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}set_total_collateral(_){g(_,I),t.transactionbuilder_set_total_collateral(this.__wbg_ptr,_.__wbg_ptr)}set_total_collateral_and_return(_,e){try{const r=t.__wbindgen_add_to_stack_pointer(-16);g(_,I),g(e,pt),t.transactionbuilder_set_total_collateral_and_return(r,this.__wbg_ptr,_.__wbg_ptr,e.__wbg_ptr);var s=a()[r/4+0],n=a()[r/4+1];if(n)throw c(s)}finally{t.__wbindgen_add_to_stack_pointer(16)}}add_reference_input(_){g(_,Ct),t.transactionbuilder_add_reference_input(this.__wbg_ptr,_.__wbg_ptr)}add_key_input(_,e,s){g(_,W),g(e,Ct),g(s,gt),t.transactionbuilder_add_key_input(this.__wbg_ptr,_.__wbg_ptr,e.__wbg_ptr,s.__wbg_ptr)}add_script_input(_,e,s){g(_,Ft),g(e,Ct),g(s,gt),t.transactionbuilder_add_script_input(this.__wbg_ptr,_.__wbg_ptr,e.__wbg_ptr,s.__wbg_ptr)}add_native_script_input(_,e,s){g(_,Nt),g(e,Ct),g(s,gt),t.transactionbuilder_add_native_script_input(this.__wbg_ptr,_.__wbg_ptr,e.__wbg_ptr,s.__wbg_ptr)}add_plutus_script_input(_,e,s){g(_,p_),g(e,Ct),g(s,gt),t.transactionbuilder_add_plutus_script_input(this.__wbg_ptr,_.__wbg_ptr,e.__wbg_ptr,s.__wbg_ptr)}add_bootstrap_input(_,e,s){g(_,A),g(e,Ct),g(s,gt),t.transactionbuilder_add_bootstrap_input(this.__wbg_ptr,_.__wbg_ptr,e.__wbg_ptr,s.__wbg_ptr)}add_input(_,e,s){g(_,pt),g(e,Ct),g(s,gt),t.transactionbuilder_add_input(this.__wbg_ptr,_.__wbg_ptr,e.__wbg_ptr,s.__wbg_ptr)}count_missing_input_scripts(){return t.transactionbuilder_count_missing_input_scripts(this.__wbg_ptr)>>>0}add_required_native_input_scripts(_){return g(_,Ht),t.transactionbuilder_add_required_native_input_scripts(this.__wbg_ptr,_.__wbg_ptr)>>>0}add_required_plutus_input_scripts(_){return g(_,ee),t.transactionbuilder_add_required_plutus_input_scripts(this.__wbg_ptr,_.__wbg_ptr)>>>0}get_native_input_scripts(){const _=t.transactionbuilder_get_native_input_scripts(this.__wbg_ptr);return _===0?void 0:Ht.__wrap(_)}get_plutus_input_scripts(){const _=t.transactionbuilder_get_plutus_input_scripts(this.__wbg_ptr);return _===0?void 0:ee.__wrap(_)}fee_for_input(_,e,s){try{const o=t.__wbindgen_add_to_stack_pointer(-16);g(_,pt),g(e,Ct),g(s,gt),t.transactionbuilder_fee_for_input(o,this.__wbg_ptr,_.__wbg_ptr,e.__wbg_ptr,s.__wbg_ptr);var n=a()[o/4+0],r=a()[o/4+1],i=a()[o/4+2];if(i)throw c(r);return I.__wrap(n)}finally{t.__wbindgen_add_to_stack_pointer(16)}}add_output(_){try{const n=t.__wbindgen_add_to_stack_pointer(-16);g(_,Yt),t.transactionbuilder_add_output(n,this.__wbg_ptr,_.__wbg_ptr);var e=a()[n/4+0],s=a()[n/4+1];if(s)throw c(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}fee_for_output(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16);g(_,Yt),t.transactionbuilder_fee_for_output(r,this.__wbg_ptr,_.__wbg_ptr);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw c(s);return I.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}set_fee(_){g(_,I),t.transactionbuilder_set_fee(this.__wbg_ptr,_.__wbg_ptr)}set_ttl(_){t.transactionbuilder_set_ttl(this.__wbg_ptr,_)}set_ttl_bignum(_){g(_,I),t.transactionbuilder_set_ttl_bignum(this.__wbg_ptr,_.__wbg_ptr)}set_validity_start_interval(_){t.transactionbuilder_set_validity_start_interval(this.__wbg_ptr,_)}set_validity_start_interval_bignum(_){g(_,I);var e=_.__destroy_into_raw();t.transactionbuilder_set_validity_start_interval_bignum(this.__wbg_ptr,e)}set_certs(_){g(_,N),t.transactionbuilder_set_certs(this.__wbg_ptr,_.__wbg_ptr)}set_withdrawals(_){g(_,H_),t.transactionbuilder_set_withdrawals(this.__wbg_ptr,_.__wbg_ptr)}get_auxiliary_data(){const _=t.transactionbuilder_get_auxiliary_data(this.__wbg_ptr);return _===0?void 0:Pt.__wrap(_)}set_auxiliary_data(_){g(_,Pt),t.transactionbuilder_set_auxiliary_data(this.__wbg_ptr,_.__wbg_ptr)}set_metadata(_){g(_,Ot),t.transactionbuilder_set_metadata(this.__wbg_ptr,_.__wbg_ptr)}add_metadatum(_,e){g(_,I),g(e,mt),t.transactionbuilder_add_metadatum(this.__wbg_ptr,_.__wbg_ptr,e.__wbg_ptr)}add_json_metadatum(_,e){try{const r=t.__wbindgen_add_to_stack_pointer(-16);g(_,I);const i=v(e,t.__wbindgen_malloc,t.__wbindgen_realloc),o=b;t.transactionbuilder_add_json_metadatum(r,this.__wbg_ptr,_.__wbg_ptr,i,o);var s=a()[r/4+0],n=a()[r/4+1];if(n)throw c(s)}finally{t.__wbindgen_add_to_stack_pointer(16)}}add_json_metadatum_with_schema(_,e,s){try{const i=t.__wbindgen_add_to_stack_pointer(-16);g(_,I);const o=v(e,t.__wbindgen_malloc,t.__wbindgen_realloc),f=b;t.transactionbuilder_add_json_metadatum_with_schema(i,this.__wbg_ptr,_.__wbg_ptr,o,f,s);var n=a()[i/4+0],r=a()[i/4+1];if(r)throw c(n)}finally{t.__wbindgen_add_to_stack_pointer(16)}}set_mint_builder(_){g(_,er),t.transactionbuilder_set_mint_builder(this.__wbg_ptr,_.__wbg_ptr)}get_mint_builder(){const _=t.transactionbuilder_get_mint_builder(this.__wbg_ptr);return _===0?void 0:er.__wrap(_)}set_mint(_,e){try{const r=t.__wbindgen_add_to_stack_pointer(-16);g(_,r_),g(e,Ht),t.transactionbuilder_set_mint(r,this.__wbg_ptr,_.__wbg_ptr,e.__wbg_ptr);var s=a()[r/4+0],n=a()[r/4+1];if(n)throw c(s)}finally{t.__wbindgen_add_to_stack_pointer(16)}}get_mint(){const _=t.transactionbuilder_get_mint(this.__wbg_ptr);return _===0?void 0:r_.__wrap(_)}get_mint_scripts(){const _=t.transactionbuilder_get_mint_scripts(this.__wbg_ptr);return _===0?void 0:Ht.__wrap(_)}set_mint_asset(_,e){g(_,Nt),g(e,S_),t.transactionbuilder_set_mint_asset(this.__wbg_ptr,_.__wbg_ptr,e.__wbg_ptr)}add_mint_asset(_,e,s){g(_,Nt),g(e,It),g(s,St);var n=s.__destroy_into_raw();t.transactionbuilder_add_mint_asset(this.__wbg_ptr,_.__wbg_ptr,e.__wbg_ptr,n)}add_mint_asset_and_output(_,e,s,n,r){try{const l=t.__wbindgen_add_to_stack_pointer(-16);g(_,Nt),g(e,It),g(s,St);var i=s.__destroy_into_raw();g(n,j_),g(r,I),t.transactionbuilder_add_mint_asset_and_output(l,this.__wbg_ptr,_.__wbg_ptr,e.__wbg_ptr,i,n.__wbg_ptr,r.__wbg_ptr);var o=a()[l/4+0],f=a()[l/4+1];if(f)throw c(o)}finally{t.__wbindgen_add_to_stack_pointer(16)}}add_mint_asset_and_output_min_required_coin(_,e,s,n){try{const f=t.__wbindgen_add_to_stack_pointer(-16);g(_,Nt),g(e,It),g(s,St);var r=s.__destroy_into_raw();g(n,j_),t.transactionbuilder_add_mint_asset_and_output_min_required_coin(f,this.__wbg_ptr,_.__wbg_ptr,e.__wbg_ptr,r,n.__wbg_ptr);var i=a()[f/4+0],o=a()[f/4+1];if(o)throw c(i)}finally{t.__wbindgen_add_to_stack_pointer(16)}}static new(_){g(_,nr);const e=t.transactionbuilder_new(_.__wbg_ptr);return Er.__wrap(e)}get_reference_inputs(){const _=t.transactionbuilder_get_reference_inputs(this.__wbg_ptr);return zt.__wrap(_)}get_explicit_input(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.transactionbuilder_get_explicit_input(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=a()[n/4+2];if(s)throw c(e);return gt.__wrap(_)}finally{t.__wbindgen_add_to_stack_pointer(16)}}get_implicit_input(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.transactionbuilder_get_implicit_input(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=a()[n/4+2];if(s)throw c(e);return gt.__wrap(_)}finally{t.__wbindgen_add_to_stack_pointer(16)}}get_total_input(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.transactionbuilder_get_total_input(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=a()[n/4+2];if(s)throw c(e);return gt.__wrap(_)}finally{t.__wbindgen_add_to_stack_pointer(16)}}get_total_output(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.transactionbuilder_get_total_output(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=a()[n/4+2];if(s)throw c(e);return gt.__wrap(_)}finally{t.__wbindgen_add_to_stack_pointer(16)}}get_explicit_output(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.transactionbuilder_get_explicit_output(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=a()[n/4+2];if(s)throw c(e);return gt.__wrap(_)}finally{t.__wbindgen_add_to_stack_pointer(16)}}get_deposit(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.transactionbuilder_get_deposit(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=a()[n/4+2];if(s)throw c(e);return I.__wrap(_)}finally{t.__wbindgen_add_to_stack_pointer(16)}}get_fee_if_set(){const _=t.transactionbuilder_get_fee_if_set(this.__wbg_ptr);return _===0?void 0:I.__wrap(_)}add_change_if_needed(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16);g(_,pt),t.transactionbuilder_add_change_if_needed(r,this.__wbg_ptr,_.__wbg_ptr);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw c(s);return e!==0}finally{t.__wbindgen_add_to_stack_pointer(16)}}add_change_if_needed_with_datum(_,e){try{const i=t.__wbindgen_add_to_stack_pointer(-16);g(_,pt),g(e,rr),t.transactionbuilder_add_change_if_needed_with_datum(i,this.__wbg_ptr,_.__wbg_ptr,e.__wbg_ptr);var s=a()[i/4+0],n=a()[i/4+1],r=a()[i/4+2];if(r)throw c(n);return s!==0}finally{t.__wbindgen_add_to_stack_pointer(16)}}calc_script_data_hash(_){try{const n=t.__wbindgen_add_to_stack_pointer(-16);g(_,F),t.transactionbuilder_calc_script_data_hash(n,this.__wbg_ptr,_.__wbg_ptr);var e=a()[n/4+0],s=a()[n/4+1];if(s)throw c(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}set_script_data_hash(_){g(_,N_),t.transactionbuilder_set_script_data_hash(this.__wbg_ptr,_.__wbg_ptr)}remove_script_data_hash(){t.transactionbuilder_remove_script_data_hash(this.__wbg_ptr)}add_required_signer(_){g(_,W),t.transactionbuilder_add_required_signer(this.__wbg_ptr,_.__wbg_ptr)}full_size(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.transactionbuilder_full_size(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=a()[n/4+2];if(s)throw c(e);return _>>>0}finally{t.__wbindgen_add_to_stack_pointer(16)}}output_sizes(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.transactionbuilder_output_sizes(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=bt(_,e).slice();return t.__wbindgen_free(_,e*4),s}finally{t.__wbindgen_add_to_stack_pointer(16)}}build(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.transactionbuilder_build(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=a()[n/4+2];if(s)throw c(e);return Wt.__wrap(_)}finally{t.__wbindgen_add_to_stack_pointer(16)}}build_tx(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.transactionbuilder_build_tx(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=a()[n/4+2];if(s)throw c(e);return b_.__wrap(_)}finally{t.__wbindgen_add_to_stack_pointer(16)}}build_tx_unsafe(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.transactionbuilder_build_tx_unsafe(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=a()[n/4+2];if(s)throw c(e);return b_.__wrap(_)}finally{t.__wbindgen_add_to_stack_pointer(16)}}min_fee(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.transactionbuilder_min_fee(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=a()[n/4+2];if(s)throw c(e);return I.__wrap(_)}finally{t.__wbindgen_add_to_stack_pointer(16)}}}p.exports.TransactionBuilder=Er;class nr{static __wrap(_){_=_>>>0;const e=Object.create(nr.prototype);return e.__wbg_ptr=_,e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,_}free(){const _=this.__destroy_into_raw();t.__wbg_transactionbuilderconfig_free(_)}}p.exports.TransactionBuilderConfig=nr;class i_{static __wrap(_){_=_>>>0;const e=Object.create(i_.prototype);return e.__wbg_ptr=_,e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,_}free(){const _=this.__destroy_into_raw();t.__wbg_transactionbuilderconfigbuilder_free(_)}static new(){const _=t.transactionbuilderconfigbuilder_new();return i_.__wrap(_)}fee_algo(_){g(_,_r);const e=t.transactionbuilderconfigbuilder_fee_algo(this.__wbg_ptr,_.__wbg_ptr);return i_.__wrap(e)}coins_per_utxo_word(_){g(_,I);const e=t.transactionbuilderconfigbuilder_coins_per_utxo_word(this.__wbg_ptr,_.__wbg_ptr);return i_.__wrap(e)}coins_per_utxo_byte(_){g(_,I);const e=t.transactionbuilderconfigbuilder_coins_per_utxo_byte(this.__wbg_ptr,_.__wbg_ptr);return i_.__wrap(e)}ex_unit_prices(_){g(_,vt);const e=t.transactionbuilderconfigbuilder_ex_unit_prices(this.__wbg_ptr,_.__wbg_ptr);return i_.__wrap(e)}pool_deposit(_){g(_,I);const e=t.transactionbuilderconfigbuilder_pool_deposit(this.__wbg_ptr,_.__wbg_ptr);return i_.__wrap(e)}key_deposit(_){g(_,I);const e=t.transactionbuilderconfigbuilder_key_deposit(this.__wbg_ptr,_.__wbg_ptr);return i_.__wrap(e)}max_value_size(_){const e=t.transactionbuilderconfigbuilder_max_value_size(this.__wbg_ptr,_);return i_.__wrap(e)}max_tx_size(_){const e=t.transactionbuilderconfigbuilder_max_tx_size(this.__wbg_ptr,_);return i_.__wrap(e)}prefer_pure_change(_){const e=t.transactionbuilderconfigbuilder_prefer_pure_change(this.__wbg_ptr,_);return i_.__wrap(e)}build(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.transactionbuilderconfigbuilder_build(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=a()[n/4+2];if(s)throw c(e);return nr.__wrap(_)}finally{t.__wbindgen_add_to_stack_pointer(16)}}}p.exports.TransactionBuilderConfigBuilder=i_;class u_{static __wrap(_){_=_>>>0;const e=Object.create(u_.prototype);return e.__wbg_ptr=_,e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,_}free(){const _=this.__destroy_into_raw();t.__wbg_transactionhash_free(_)}static from_bytes(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=Q(_,t.__wbindgen_malloc),o=b;t.transactionhash_from_bytes(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw c(s);return u_.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_bytes(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.auxiliarydatahash_to_bytes(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=D(_,e).slice();return t.__wbindgen_free(_,e*1),s}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_bech32(_){let e,s;try{const H=t.__wbindgen_add_to_stack_pointer(-16),rt=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),dt=b;t.auxiliarydatahash_to_bech32(H,this.__wbg_ptr,rt,dt);var n=a()[H/4+0],r=a()[H/4+1],i=a()[H/4+2],o=a()[H/4+3],f=n,l=r;if(o)throw f=0,l=0,c(i);return e=f,s=l,m(f,l)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(e,s,1)}}static from_bech32(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=b;t.transactionhash_from_bech32(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw c(s);return u_.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_hex(){let _,e;try{const r=t.__wbindgen_add_to_stack_pointer(-16);t.auxiliarydatahash_to_hex(r,this.__wbg_ptr);var s=a()[r/4+0],n=a()[r/4+1];return _=s,e=n,m(s,n)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}static from_hex(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=b;t.transactionhash_from_hex(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw c(s);return u_.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}}p.exports.TransactionHash=u_;class Ct{static __wrap(_){_=_>>>0;const e=Object.create(Ct.prototype);return e.__wbg_ptr=_,e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,_}free(){const _=this.__destroy_into_raw();t.__wbg_transactioninput_free(_)}to_bytes(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.transactioninput_to_bytes(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=D(_,e).slice();return t.__wbindgen_free(_,e*1),s}finally{t.__wbindgen_add_to_stack_pointer(16)}}static from_bytes(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=Q(_,t.__wbindgen_malloc),o=b;t.transactioninput_from_bytes(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw c(s);return Ct.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_hex(){let _,e;try{const r=t.__wbindgen_add_to_stack_pointer(-16);t.transactioninput_to_hex(r,this.__wbg_ptr);var s=a()[r/4+0],n=a()[r/4+1];return _=s,e=n,m(s,n)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}static from_hex(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=b;t.transactioninput_from_hex(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw c(s);return Ct.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_json(){let _,e;try{const l=t.__wbindgen_add_to_stack_pointer(-16);t.transactioninput_to_json(l,this.__wbg_ptr);var s=a()[l/4+0],n=a()[l/4+1],r=a()[l/4+2],i=a()[l/4+3],o=s,f=n;if(i)throw o=0,f=0,c(r);return _=o,e=f,m(o,f)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}to_js_value(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.transactioninput_to_js_value(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=a()[n/4+2];if(s)throw c(e);return c(_)}finally{t.__wbindgen_add_to_stack_pointer(16)}}static from_json(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=b;t.transactioninput_from_json(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw c(s);return Ct.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}transaction_id(){const _=t.transactioninput_transaction_id(this.__wbg_ptr);return u_.__wrap(_)}index(){return t.transactioninput_index(this.__wbg_ptr)>>>0}static new(_,e){g(_,u_);const s=t.transactioninput_new(_.__wbg_ptr,e);return Ct.__wrap(s)}}p.exports.TransactionInput=Ct;class zt{static __wrap(_){_=_>>>0;const e=Object.create(zt.prototype);return e.__wbg_ptr=_,e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,_}free(){const _=this.__destroy_into_raw();t.__wbg_transactioninputs_free(_)}to_bytes(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.transactioninputs_to_bytes(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=D(_,e).slice();return t.__wbindgen_free(_,e*1),s}finally{t.__wbindgen_add_to_stack_pointer(16)}}static from_bytes(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=Q(_,t.__wbindgen_malloc),o=b;t.transactioninputs_from_bytes(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw c(s);return zt.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_hex(){let _,e;try{const r=t.__wbindgen_add_to_stack_pointer(-16);t.transactioninputs_to_hex(r,this.__wbg_ptr);var s=a()[r/4+0],n=a()[r/4+1];return _=s,e=n,m(s,n)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}static from_hex(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=b;t.transactioninputs_from_hex(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw c(s);return zt.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_json(){let _,e;try{const l=t.__wbindgen_add_to_stack_pointer(-16);t.transactioninputs_to_json(l,this.__wbg_ptr);var s=a()[l/4+0],n=a()[l/4+1],r=a()[l/4+2],i=a()[l/4+3],o=s,f=n;if(i)throw o=0,f=0,c(r);return _=o,e=f,m(o,f)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}to_js_value(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.transactioninputs_to_js_value(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=a()[n/4+2];if(s)throw c(e);return c(_)}finally{t.__wbindgen_add_to_stack_pointer(16)}}static from_json(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=b;t.transactioninputs_from_json(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw c(s);return zt.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}static new(){const _=t.assetnames_new();return zt.__wrap(_)}len(){return t.assetnames_len(this.__wbg_ptr)>>>0}get(_){const e=t.transactioninputs_get(this.__wbg_ptr,_);return Ct.__wrap(e)}add(_){g(_,Ct),t.transactioninputs_add(this.__wbg_ptr,_.__wbg_ptr)}to_option(){const _=t.transactioninputs_to_option(this.__wbg_ptr);return _===0?void 0:zt.__wrap(_)}}p.exports.TransactionInputs=zt;class mt{static __wrap(_){_=_>>>0;const e=Object.create(mt.prototype);return e.__wbg_ptr=_,e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,_}free(){const _=this.__destroy_into_raw();t.__wbg_transactionmetadatum_free(_)}to_bytes(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.transactionmetadatum_to_bytes(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=D(_,e).slice();return t.__wbindgen_free(_,e*1),s}finally{t.__wbindgen_add_to_stack_pointer(16)}}static from_bytes(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=Q(_,t.__wbindgen_malloc),o=b;t.transactionmetadatum_from_bytes(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw c(s);return mt.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_hex(){let _,e;try{const r=t.__wbindgen_add_to_stack_pointer(-16);t.transactionmetadatum_to_hex(r,this.__wbg_ptr);var s=a()[r/4+0],n=a()[r/4+1];return _=s,e=n,m(s,n)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}static from_hex(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=b;t.transactionmetadatum_from_hex(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw c(s);return mt.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}static new_map(_){g(_,Oe);const e=t.transactionmetadatum_new_map(_.__wbg_ptr);return mt.__wrap(e)}static new_list(_){g(_,W_);const e=t.transactionmetadatum_new_list(_.__wbg_ptr);return mt.__wrap(e)}static new_int(_){g(_,St);const e=t.transactionmetadatum_new_int(_.__wbg_ptr);return mt.__wrap(e)}static new_bytes(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=Q(_,t.__wbindgen_malloc),o=b;t.transactionmetadatum_new_bytes(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw c(s);return mt.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}static new_text(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=b;t.transactionmetadatum_new_text(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw c(s);return mt.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}kind(){return t.plutusdata_kind(this.__wbg_ptr)>>>0}as_map(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.transactionmetadatum_as_map(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=a()[n/4+2];if(s)throw c(e);return Oe.__wrap(_)}finally{t.__wbindgen_add_to_stack_pointer(16)}}as_list(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.transactionmetadatum_as_list(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=a()[n/4+2];if(s)throw c(e);return W_.__wrap(_)}finally{t.__wbindgen_add_to_stack_pointer(16)}}as_int(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.transactionmetadatum_as_int(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=a()[n/4+2];if(s)throw c(e);return St.__wrap(_)}finally{t.__wbindgen_add_to_stack_pointer(16)}}as_bytes(){try{const i=t.__wbindgen_add_to_stack_pointer(-16);t.transactionmetadatum_as_bytes(i,this.__wbg_ptr);var _=a()[i/4+0],e=a()[i/4+1],s=a()[i/4+2],n=a()[i/4+3];if(n)throw c(s);var r=D(_,e).slice();return t.__wbindgen_free(_,e*1),r}finally{t.__wbindgen_add_to_stack_pointer(16)}}as_text(){let _,e;try{const l=t.__wbindgen_add_to_stack_pointer(-16);t.transactionmetadatum_as_text(l,this.__wbg_ptr);var s=a()[l/4+0],n=a()[l/4+1],r=a()[l/4+2],i=a()[l/4+3],o=s,f=n;if(i)throw o=0,f=0,c(r);return _=o,e=f,m(o,f)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}}p.exports.TransactionMetadatum=mt;class Ge{static __wrap(_){_=_>>>0;const e=Object.create(Ge.prototype);return e.__wbg_ptr=_,e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,_}free(){const _=this.__destroy_into_raw();t.__wbg_transactionmetadatumlabels_free(_)}to_bytes(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.transactionmetadatumlabels_to_bytes(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=D(_,e).slice();return t.__wbindgen_free(_,e*1),s}finally{t.__wbindgen_add_to_stack_pointer(16)}}static from_bytes(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=Q(_,t.__wbindgen_malloc),o=b;t.transactionmetadatumlabels_from_bytes(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw c(s);return Ge.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_hex(){let _,e;try{const r=t.__wbindgen_add_to_stack_pointer(-16);t.transactionmetadatumlabels_to_hex(r,this.__wbg_ptr);var s=a()[r/4+0],n=a()[r/4+1];return _=s,e=n,m(s,n)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}static from_hex(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=b;t.transactionmetadatumlabels_from_hex(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw c(s);return Ge.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}static new(){const _=t.certificates_new();return Ge.__wrap(_)}len(){return t.assetnames_len(this.__wbg_ptr)>>>0}get(_){const e=t.transactionmetadatumlabels_get(this.__wbg_ptr,_);return I.__wrap(e)}add(_){g(_,I),t.transactionmetadatumlabels_add(this.__wbg_ptr,_.__wbg_ptr)}}p.exports.TransactionMetadatumLabels=Ge;class Yt{static __wrap(_){_=_>>>0;const e=Object.create(Yt.prototype);return e.__wbg_ptr=_,e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,_}free(){const _=this.__destroy_into_raw();t.__wbg_transactionoutput_free(_)}to_bytes(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.transactionoutput_to_bytes(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=D(_,e).slice();return t.__wbindgen_free(_,e*1),s}finally{t.__wbindgen_add_to_stack_pointer(16)}}static from_bytes(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=Q(_,t.__wbindgen_malloc),o=b;t.transactionoutput_from_bytes(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw c(s);return Yt.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_hex(){let _,e;try{const r=t.__wbindgen_add_to_stack_pointer(-16);t.transactionoutput_to_hex(r,this.__wbg_ptr);var s=a()[r/4+0],n=a()[r/4+1];return _=s,e=n,m(s,n)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}static from_hex(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=b;t.transactionoutput_from_hex(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw c(s);return Yt.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_json(){let _,e;try{const l=t.__wbindgen_add_to_stack_pointer(-16);t.transactionoutput_to_json(l,this.__wbg_ptr);var s=a()[l/4+0],n=a()[l/4+1],r=a()[l/4+2],i=a()[l/4+3],o=s,f=n;if(i)throw o=0,f=0,c(r);return _=o,e=f,m(o,f)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}to_js_value(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.transactionoutput_to_js_value(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=a()[n/4+2];if(s)throw c(e);return c(_)}finally{t.__wbindgen_add_to_stack_pointer(16)}}static from_json(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=b;t.transactionoutput_from_json(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw c(s);return Yt.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}address(){const _=t.transactionoutput_address(this.__wbg_ptr);return pt.__wrap(_)}amount(){const _=t.transactionoutput_amount(this.__wbg_ptr);return gt.__wrap(_)}data_hash(){const _=t.transactionoutput_data_hash(this.__wbg_ptr);return _===0?void 0:U.__wrap(_)}plutus_data(){const _=t.transactionoutput_plutus_data(this.__wbg_ptr);return _===0?void 0:ht.__wrap(_)}script_ref(){const _=t.transactionoutput_script_ref(this.__wbg_ptr);return _===0?void 0:C_.__wrap(_)}set_script_ref(_){g(_,C_),t.transactionoutput_set_script_ref(this.__wbg_ptr,_.__wbg_ptr)}set_plutus_data(_){g(_,ht),t.transactionoutput_set_plutus_data(this.__wbg_ptr,_.__wbg_ptr)}set_data_hash(_){g(_,U),t.transactionoutput_set_data_hash(this.__wbg_ptr,_.__wbg_ptr)}has_plutus_data(){return t.transactionoutput_has_plutus_data(this.__wbg_ptr)!==0}has_data_hash(){return t.transactionoutput_has_data_hash(this.__wbg_ptr)!==0}has_script_ref(){return t.transactionoutput_has_script_ref(this.__wbg_ptr)!==0}static new(_,e){g(_,pt),g(e,gt);const s=t.transactionoutput_new(_.__wbg_ptr,e.__wbg_ptr);return Yt.__wrap(s)}serialization_format(){const _=t.transactionoutput_serialization_format(this.__wbg_ptr);return _===2?void 0:_}}p.exports.TransactionOutput=Yt;class j_{static __wrap(_){_=_>>>0;const e=Object.create(j_.prototype);return e.__wbg_ptr=_,e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,_}free(){const _=this.__destroy_into_raw();t.__wbg_transactionoutputamountbuilder_free(_)}with_value(_){g(_,gt);const e=t.transactionoutputamountbuilder_with_value(this.__wbg_ptr,_.__wbg_ptr);return j_.__wrap(e)}with_coin(_){g(_,I);const e=t.transactionoutputamountbuilder_with_coin(this.__wbg_ptr,_.__wbg_ptr);return j_.__wrap(e)}with_coin_and_asset(_,e){g(_,I),g(e,$t);const s=t.transactionoutputamountbuilder_with_coin_and_asset(this.__wbg_ptr,_.__wbg_ptr,e.__wbg_ptr);return j_.__wrap(s)}with_asset_and_min_required_coin(_,e){try{const i=t.__wbindgen_add_to_stack_pointer(-16);g(_,$t),g(e,I),t.transactionoutputamountbuilder_with_asset_and_min_required_coin(i,this.__wbg_ptr,_.__wbg_ptr,e.__wbg_ptr);var s=a()[i/4+0],n=a()[i/4+1],r=a()[i/4+2];if(r)throw c(n);return j_.__wrap(s)}finally{t.__wbindgen_add_to_stack_pointer(16)}}with_asset_and_min_required_coin_by_utxo_cost(_,e){try{const i=t.__wbindgen_add_to_stack_pointer(-16);g(_,$t),g(e,M),t.transactionoutputamountbuilder_with_asset_and_min_required_coin_by_utxo_cost(i,this.__wbg_ptr,_.__wbg_ptr,e.__wbg_ptr);var s=a()[i/4+0],n=a()[i/4+1],r=a()[i/4+2];if(r)throw c(n);return j_.__wrap(s)}finally{t.__wbindgen_add_to_stack_pointer(16)}}build(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.transactionoutputamountbuilder_build(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=a()[n/4+2];if(s)throw c(e);return Yt.__wrap(_)}finally{t.__wbindgen_add_to_stack_pointer(16)}}}p.exports.TransactionOutputAmountBuilder=j_;class Fe{static __wrap(_){_=_>>>0;const e=Object.create(Fe.prototype);return e.__wbg_ptr=_,e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,_}free(){const _=this.__destroy_into_raw();t.__wbg_transactionoutputbuilder_free(_)}static new(){const _=t.transactionoutputbuilder_new();return Fe.__wrap(_)}with_address(_){g(_,pt);const e=t.transactionoutputbuilder_with_address(this.__wbg_ptr,_.__wbg_ptr);return Fe.__wrap(e)}with_data_hash(_){g(_,U);const e=t.transactionoutputbuilder_with_data_hash(this.__wbg_ptr,_.__wbg_ptr);return Fe.__wrap(e)}with_plutus_data(_){g(_,ht);const e=t.transactionoutputbuilder_with_plutus_data(this.__wbg_ptr,_.__wbg_ptr);return Fe.__wrap(e)}with_script_ref(_){g(_,C_);const e=t.transactionoutputbuilder_with_script_ref(this.__wbg_ptr,_.__wbg_ptr);return Fe.__wrap(e)}next(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.transactionoutputbuilder_next(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=a()[n/4+2];if(s)throw c(e);return j_.__wrap(_)}finally{t.__wbindgen_add_to_stack_pointer(16)}}}p.exports.TransactionOutputBuilder=Fe;class F_{static __wrap(_){_=_>>>0;const e=Object.create(F_.prototype);return e.__wbg_ptr=_,e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,_}free(){const _=this.__destroy_into_raw();t.__wbg_transactionoutputs_free(_)}to_bytes(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.transactionoutputs_to_bytes(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=D(_,e).slice();return t.__wbindgen_free(_,e*1),s}finally{t.__wbindgen_add_to_stack_pointer(16)}}static from_bytes(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=Q(_,t.__wbindgen_malloc),o=b;t.transactionoutputs_from_bytes(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw c(s);return F_.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_hex(){let _,e;try{const r=t.__wbindgen_add_to_stack_pointer(-16);t.transactionoutputs_to_hex(r,this.__wbg_ptr);var s=a()[r/4+0],n=a()[r/4+1];return _=s,e=n,m(s,n)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}static from_hex(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=b;t.transactionoutputs_from_hex(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw c(s);return F_.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_json(){let _,e;try{const l=t.__wbindgen_add_to_stack_pointer(-16);t.transactionoutputs_to_json(l,this.__wbg_ptr);var s=a()[l/4+0],n=a()[l/4+1],r=a()[l/4+2],i=a()[l/4+3],o=s,f=n;if(i)throw o=0,f=0,c(r);return _=o,e=f,m(o,f)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}to_js_value(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.transactionoutputs_to_js_value(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=a()[n/4+2];if(s)throw c(e);return c(_)}finally{t.__wbindgen_add_to_stack_pointer(16)}}static from_json(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=b;t.transactionoutputs_from_json(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw c(s);return F_.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}static new(){const _=t.certificates_new();return F_.__wrap(_)}len(){return t.assetnames_len(this.__wbg_ptr)>>>0}get(_){const e=t.transactionoutputs_get(this.__wbg_ptr,_);return Yt.__wrap(e)}add(_){g(_,Yt),t.transactionoutputs_add(this.__wbg_ptr,_.__wbg_ptr)}}p.exports.TransactionOutputs=F_;class ve{static __wrap(_){_=_>>>0;const e=Object.create(ve.prototype);return e.__wbg_ptr=_,e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,_}free(){const _=this.__destroy_into_raw();t.__wbg_transactionunspentoutput_free(_)}to_bytes(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.transactionunspentoutput_to_bytes(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=D(_,e).slice();return t.__wbindgen_free(_,e*1),s}finally{t.__wbindgen_add_to_stack_pointer(16)}}static from_bytes(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=Q(_,t.__wbindgen_malloc),o=b;t.transactionunspentoutput_from_bytes(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw c(s);return ve.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_hex(){let _,e;try{const r=t.__wbindgen_add_to_stack_pointer(-16);t.transactionunspentoutput_to_hex(r,this.__wbg_ptr);var s=a()[r/4+0],n=a()[r/4+1];return _=s,e=n,m(s,n)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}static from_hex(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=b;t.transactionunspentoutput_from_hex(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw c(s);return ve.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_json(){let _,e;try{const l=t.__wbindgen_add_to_stack_pointer(-16);t.transactionunspentoutput_to_json(l,this.__wbg_ptr);var s=a()[l/4+0],n=a()[l/4+1],r=a()[l/4+2],i=a()[l/4+3],o=s,f=n;if(i)throw o=0,f=0,c(r);return _=o,e=f,m(o,f)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}to_js_value(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.transactionunspentoutput_to_js_value(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=a()[n/4+2];if(s)throw c(e);return c(_)}finally{t.__wbindgen_add_to_stack_pointer(16)}}static from_json(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=b;t.transactionunspentoutput_from_json(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw c(s);return ve.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}static new(_,e){g(_,Ct),g(e,Yt);const s=t.transactionunspentoutput_new(_.__wbg_ptr,e.__wbg_ptr);return ve.__wrap(s)}input(){const _=t.transactionunspentoutput_input(this.__wbg_ptr);return Ct.__wrap(_)}output(){const _=t.transactionunspentoutput_output(this.__wbg_ptr);return Yt.__wrap(_)}}p.exports.TransactionUnspentOutput=ve;class $e{static __wrap(_){_=_>>>0;const e=Object.create($e.prototype);return e.__wbg_ptr=_,e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,_}free(){const _=this.__destroy_into_raw();t.__wbg_transactionunspentoutputs_free(_)}to_json(){let _,e;try{const l=t.__wbindgen_add_to_stack_pointer(-16);t.transactionunspentoutputs_to_json(l,this.__wbg_ptr);var s=a()[l/4+0],n=a()[l/4+1],r=a()[l/4+2],i=a()[l/4+3],o=s,f=n;if(i)throw o=0,f=0,c(r);return _=o,e=f,m(o,f)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}to_js_value(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.transactionunspentoutputs_to_js_value(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=a()[n/4+2];if(s)throw c(e);return c(_)}finally{t.__wbindgen_add_to_stack_pointer(16)}}static from_json(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=b;t.transactionunspentoutputs_from_json(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw c(s);return $e.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}static new(){const _=t.certificates_new();return $e.__wrap(_)}len(){return t.assetnames_len(this.__wbg_ptr)>>>0}get(_){const e=t.transactionunspentoutputs_get(this.__wbg_ptr,_);return ve.__wrap(e)}add(_){g(_,ve),t.transactionunspentoutputs_add(this.__wbg_ptr,_.__wbg_ptr)}}p.exports.TransactionUnspentOutputs=$e;class f_{static __wrap(_){_=_>>>0;const e=Object.create(f_.prototype);return e.__wbg_ptr=_,e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,_}free(){const _=this.__destroy_into_raw();t.__wbg_transactionwitnessset_free(_)}to_bytes(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.transactionwitnessset_to_bytes(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=D(_,e).slice();return t.__wbindgen_free(_,e*1),s}finally{t.__wbindgen_add_to_stack_pointer(16)}}static from_bytes(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=Q(_,t.__wbindgen_malloc),o=b;t.transactionwitnessset_from_bytes(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw c(s);return f_.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_hex(){let _,e;try{const r=t.__wbindgen_add_to_stack_pointer(-16);t.transactionwitnessset_to_hex(r,this.__wbg_ptr);var s=a()[r/4+0],n=a()[r/4+1];return _=s,e=n,m(s,n)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}static from_hex(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=b;t.transactionwitnessset_from_hex(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw c(s);return f_.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_json(){let _,e;try{const l=t.__wbindgen_add_to_stack_pointer(-16);t.transactionwitnessset_to_json(l,this.__wbg_ptr);var s=a()[l/4+0],n=a()[l/4+1],r=a()[l/4+2],i=a()[l/4+3],o=s,f=n;if(i)throw o=0,f=0,c(r);return _=o,e=f,m(o,f)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}to_js_value(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.transactionwitnessset_to_js_value(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=a()[n/4+2];if(s)throw c(e);return c(_)}finally{t.__wbindgen_add_to_stack_pointer(16)}}static from_json(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=b;t.transactionwitnessset_from_json(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw c(s);return f_.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}set_vkeys(_){g(_,Ie),t.transactionwitnessset_set_vkeys(this.__wbg_ptr,_.__wbg_ptr)}vkeys(){const _=t.transactionwitnessset_vkeys(this.__wbg_ptr);return _===0?void 0:Ie.__wrap(_)}set_native_scripts(_){g(_,Ht),t.transactionwitnessset_set_native_scripts(this.__wbg_ptr,_.__wbg_ptr)}native_scripts(){const _=t.transactionwitnessset_native_scripts(this.__wbg_ptr);return _===0?void 0:Ht.__wrap(_)}set_bootstraps(_){g(_,k),t.transactionwitnessset_set_bootstraps(this.__wbg_ptr,_.__wbg_ptr)}bootstraps(){const _=t.transactionwitnessset_bootstraps(this.__wbg_ptr);return _===0?void 0:k.__wrap(_)}set_plutus_scripts(_){g(_,m_),t.transactionwitnessset_set_plutus_scripts(this.__wbg_ptr,_.__wbg_ptr)}plutus_scripts(){const _=t.transactionwitnessset_plutus_scripts(this.__wbg_ptr);return _===0?void 0:m_.__wrap(_)}set_plutus_data(_){g(_,n_),t.transactionwitnessset_set_plutus_data(this.__wbg_ptr,_.__wbg_ptr)}plutus_data(){const _=t.transactionwitnessset_plutus_data(this.__wbg_ptr);return _===0?void 0:n_.__wrap(_)}set_redeemers(_){g(_,x_),t.transactionwitnessset_set_redeemers(this.__wbg_ptr,_.__wbg_ptr)}redeemers(){const _=t.transactionwitnessset_redeemers(this.__wbg_ptr);return _===0?void 0:x_.__wrap(_)}static new(){const _=t.transactionwitnessset_new();return f_.__wrap(_)}}p.exports.TransactionWitnessSet=f_;class me{static __wrap(_){_=_>>>0;const e=Object.create(me.prototype);return e.__wbg_ptr=_,e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,_}free(){const _=this.__destroy_into_raw();t.__wbg_transactionwitnesssets_free(_)}to_bytes(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.transactionwitnesssets_to_bytes(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=D(_,e).slice();return t.__wbindgen_free(_,e*1),s}finally{t.__wbindgen_add_to_stack_pointer(16)}}static from_bytes(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=Q(_,t.__wbindgen_malloc),o=b;t.transactionwitnesssets_from_bytes(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw c(s);return me.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_hex(){let _,e;try{const r=t.__wbindgen_add_to_stack_pointer(-16);t.transactionwitnesssets_to_hex(r,this.__wbg_ptr);var s=a()[r/4+0],n=a()[r/4+1];return _=s,e=n,m(s,n)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}static from_hex(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=b;t.transactionwitnesssets_from_hex(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw c(s);return me.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_json(){let _,e;try{const l=t.__wbindgen_add_to_stack_pointer(-16);t.transactionwitnesssets_to_json(l,this.__wbg_ptr);var s=a()[l/4+0],n=a()[l/4+1],r=a()[l/4+2],i=a()[l/4+3],o=s,f=n;if(i)throw o=0,f=0,c(r);return _=o,e=f,m(o,f)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}to_js_value(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.transactionwitnesssets_to_js_value(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=a()[n/4+2];if(s)throw c(e);return c(_)}finally{t.__wbindgen_add_to_stack_pointer(16)}}static from_json(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=b;t.transactionwitnesssets_from_json(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw c(s);return me.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}static new(){const _=t.assetnames_new();return me.__wrap(_)}len(){return t.assetnames_len(this.__wbg_ptr)>>>0}get(_){const e=t.transactionwitnesssets_get(this.__wbg_ptr,_);return f_.__wrap(e)}add(_){g(_,f_),t.transactionwitnesssets_add(this.__wbg_ptr,_.__wbg_ptr)}}p.exports.TransactionWitnessSets=me;class ca{__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,_}free(){const _=this.__destroy_into_raw();t.__wbg_txbuilderconstants_free(_)}static plutus_default_cost_models(){const _=t.txbuilderconstants_plutus_default_cost_models();return F.__wrap(_)}static plutus_alonzo_cost_models(){const _=t.txbuilderconstants_plutus_alonzo_cost_models();return F.__wrap(_)}static plutus_vasil_cost_models(){const _=t.txbuilderconstants_plutus_default_cost_models();return F.__wrap(_)}}p.exports.TxBuilderConstants=ca;class ar{static __wrap(_){_=_>>>0;const e=Object.create(ar.prototype);return e.__wbg_ptr=_,e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,_}free(){const _=this.__destroy_into_raw();t.__wbg_txinputsbuilder_free(_)}static new(){const _=t.txinputsbuilder_new();return ar.__wrap(_)}add_key_input(_,e,s){g(_,W),g(e,Ct),g(s,gt),t.txinputsbuilder_add_key_input(this.__wbg_ptr,_.__wbg_ptr,e.__wbg_ptr,s.__wbg_ptr)}add_script_input(_,e,s){g(_,Ft),g(e,Ct),g(s,gt),t.txinputsbuilder_add_script_input(this.__wbg_ptr,_.__wbg_ptr,e.__wbg_ptr,s.__wbg_ptr)}add_native_script_input(_,e,s){g(_,Nt),g(e,Ct),g(s,gt),t.txinputsbuilder_add_native_script_input(this.__wbg_ptr,_.__wbg_ptr,e.__wbg_ptr,s.__wbg_ptr)}add_plutus_script_input(_,e,s){g(_,p_),g(e,Ct),g(s,gt),t.txinputsbuilder_add_plutus_script_input(this.__wbg_ptr,_.__wbg_ptr,e.__wbg_ptr,s.__wbg_ptr)}add_bootstrap_input(_,e,s){g(_,A),g(e,Ct),g(s,gt),t.txinputsbuilder_add_bootstrap_input(this.__wbg_ptr,_.__wbg_ptr,e.__wbg_ptr,s.__wbg_ptr)}add_input(_,e,s){g(_,pt),g(e,Ct),g(s,gt),t.txinputsbuilder_add_input(this.__wbg_ptr,_.__wbg_ptr,e.__wbg_ptr,s.__wbg_ptr)}count_missing_input_scripts(){return t.txinputsbuilder_count_missing_input_scripts(this.__wbg_ptr)>>>0}add_required_native_input_scripts(_){return g(_,Ht),t.txinputsbuilder_add_required_native_input_scripts(this.__wbg_ptr,_.__wbg_ptr)>>>0}add_required_plutus_input_scripts(_){return g(_,ee),t.txinputsbuilder_add_required_plutus_input_scripts(this.__wbg_ptr,_.__wbg_ptr)>>>0}add_required_script_input_witnesses(_){return g(_,Et),t.txinputsbuilder_add_required_script_input_witnesses(this.__wbg_ptr,_.__wbg_ptr)>>>0}get_ref_inputs(){const _=t.txinputsbuilder_get_ref_inputs(this.__wbg_ptr);return zt.__wrap(_)}get_native_input_scripts(){const _=t.txinputsbuilder_get_native_input_scripts(this.__wbg_ptr);return _===0?void 0:Ht.__wrap(_)}get_plutus_input_scripts(){const _=t.txinputsbuilder_get_plutus_input_scripts(this.__wbg_ptr);return _===0?void 0:ee.__wrap(_)}len(){return t.txinputsbuilder_len(this.__wbg_ptr)>>>0}add_required_signer(_){g(_,W),t.txinputsbuilder_add_required_signer(this.__wbg_ptr,_.__wbg_ptr)}add_required_signers(_){g(_,Z),t.txinputsbuilder_add_required_signers(this.__wbg_ptr,_.__wbg_ptr)}total_value(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.txinputsbuilder_total_value(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=a()[n/4+2];if(s)throw c(e);return gt.__wrap(_)}finally{t.__wbindgen_add_to_stack_pointer(16)}}inputs(){const _=t.txinputsbuilder_inputs(this.__wbg_ptr);return zt.__wrap(_)}inputs_option(){const _=t.txinputsbuilder_inputs_option(this.__wbg_ptr);return _===0?void 0:zt.__wrap(_)}}p.exports.TxInputsBuilder=ar;class ke{static __wrap(_){_=_>>>0;const e=Object.create(ke.prototype);return e.__wbg_ptr=_,e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,_}free(){const _=this.__destroy_into_raw();t.__wbg_url_free(_)}to_bytes(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.url_to_bytes(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=D(_,e).slice();return t.__wbindgen_free(_,e*1),s}finally{t.__wbindgen_add_to_stack_pointer(16)}}static from_bytes(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=Q(_,t.__wbindgen_malloc),o=b;t.url_from_bytes(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw c(s);return ke.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_hex(){let _,e;try{const r=t.__wbindgen_add_to_stack_pointer(-16);t.url_to_hex(r,this.__wbg_ptr);var s=a()[r/4+0],n=a()[r/4+1];return _=s,e=n,m(s,n)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}static from_hex(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=b;t.url_from_hex(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw c(s);return ke.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_json(){let _,e;try{const l=t.__wbindgen_add_to_stack_pointer(-16);t.dnsrecordaoraaaa_to_json(l,this.__wbg_ptr);var s=a()[l/4+0],n=a()[l/4+1],r=a()[l/4+2],i=a()[l/4+3],o=s,f=n;if(i)throw o=0,f=0,c(r);return _=o,e=f,m(o,f)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}to_js_value(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.dnsrecordaoraaaa_to_js_value(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=a()[n/4+2];if(s)throw c(e);return c(_)}finally{t.__wbindgen_add_to_stack_pointer(16)}}static from_json(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=b;t.dnsrecordaoraaaa_from_json(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw c(s);return ke.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}static new(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=b;t.url_new(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw c(s);return ke.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}url(){let _,e;try{const r=t.__wbindgen_add_to_stack_pointer(-16);t.dnsrecordaoraaaa_record(r,this.__wbg_ptr);var s=a()[r/4+0],n=a()[r/4+1];return _=s,e=n,m(s,n)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}}p.exports.URL=ke;class Lt{static __wrap(_){_=_>>>0;const e=Object.create(Lt.prototype);return e.__wbg_ptr=_,e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,_}free(){const _=this.__destroy_into_raw();t.__wbg_unitinterval_free(_)}to_bytes(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.unitinterval_to_bytes(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=D(_,e).slice();return t.__wbindgen_free(_,e*1),s}finally{t.__wbindgen_add_to_stack_pointer(16)}}static from_bytes(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=Q(_,t.__wbindgen_malloc),o=b;t.unitinterval_from_bytes(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw c(s);return Lt.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_hex(){let _,e;try{const r=t.__wbindgen_add_to_stack_pointer(-16);t.unitinterval_to_hex(r,this.__wbg_ptr);var s=a()[r/4+0],n=a()[r/4+1];return _=s,e=n,m(s,n)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}static from_hex(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=b;t.unitinterval_from_hex(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw c(s);return Lt.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_json(){let _,e;try{const l=t.__wbindgen_add_to_stack_pointer(-16);t.unitinterval_to_json(l,this.__wbg_ptr);var s=a()[l/4+0],n=a()[l/4+1],r=a()[l/4+2],i=a()[l/4+3],o=s,f=n;if(i)throw o=0,f=0,c(r);return _=o,e=f,m(o,f)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}to_js_value(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.unitinterval_to_js_value(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=a()[n/4+2];if(s)throw c(e);return c(_)}finally{t.__wbindgen_add_to_stack_pointer(16)}}static from_json(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=b;t.unitinterval_from_json(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw c(s);return Lt.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}numerator(){const _=t.exunits_mem(this.__wbg_ptr);return I.__wrap(_)}denominator(){const _=t.exunits_steps(this.__wbg_ptr);return I.__wrap(_)}static new(_,e){g(_,I),g(e,I);const s=t.exunits_new(_.__wbg_ptr,e.__wbg_ptr);return Lt.__wrap(s)}}p.exports.UnitInterval=Lt;class xe{static __wrap(_){_=_>>>0;const e=Object.create(xe.prototype);return e.__wbg_ptr=_,e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,_}free(){const _=this.__destroy_into_raw();t.__wbg_update_free(_)}to_bytes(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.update_to_bytes(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=D(_,e).slice();return t.__wbindgen_free(_,e*1),s}finally{t.__wbindgen_add_to_stack_pointer(16)}}static from_bytes(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=Q(_,t.__wbindgen_malloc),o=b;t.update_from_bytes(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw c(s);return xe.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_hex(){let _,e;try{const r=t.__wbindgen_add_to_stack_pointer(-16);t.update_to_hex(r,this.__wbg_ptr);var s=a()[r/4+0],n=a()[r/4+1];return _=s,e=n,m(s,n)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}static from_hex(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=b;t.update_from_hex(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw c(s);return xe.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_json(){let _,e;try{const l=t.__wbindgen_add_to_stack_pointer(-16);t.update_to_json(l,this.__wbg_ptr);var s=a()[l/4+0],n=a()[l/4+1],r=a()[l/4+2],i=a()[l/4+3],o=s,f=n;if(i)throw o=0,f=0,c(r);return _=o,e=f,m(o,f)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}to_js_value(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.update_to_js_value(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=a()[n/4+2];if(s)throw c(e);return c(_)}finally{t.__wbindgen_add_to_stack_pointer(16)}}static from_json(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=b;t.update_from_json(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw c(s);return xe.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}proposed_protocol_parameter_updates(){const _=t.update_proposed_protocol_parameter_updates(this.__wbg_ptr);return oe.__wrap(_)}epoch(){return t.update_epoch(this.__wbg_ptr)>>>0}static new(_,e){g(_,oe);const s=t.update_new(_.__wbg_ptr,e);return xe.__wrap(s)}}p.exports.Update=xe;class h_{static __wrap(_){_=_>>>0;const e=Object.create(h_.prototype);return e.__wbg_ptr=_,e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,_}free(){const _=this.__destroy_into_raw();t.__wbg_vrfcert_free(_)}to_bytes(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.vrfcert_to_bytes(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=D(_,e).slice();return t.__wbindgen_free(_,e*1),s}finally{t.__wbindgen_add_to_stack_pointer(16)}}static from_bytes(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=Q(_,t.__wbindgen_malloc),o=b;t.vrfcert_from_bytes(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw c(s);return h_.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_hex(){let _,e;try{const r=t.__wbindgen_add_to_stack_pointer(-16);t.vrfcert_to_hex(r,this.__wbg_ptr);var s=a()[r/4+0],n=a()[r/4+1];return _=s,e=n,m(s,n)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}static from_hex(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=b;t.vrfcert_from_hex(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw c(s);return h_.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_json(){let _,e;try{const l=t.__wbindgen_add_to_stack_pointer(-16);t.vrfcert_to_json(l,this.__wbg_ptr);var s=a()[l/4+0],n=a()[l/4+1],r=a()[l/4+2],i=a()[l/4+3],o=s,f=n;if(i)throw o=0,f=0,c(r);return _=o,e=f,m(o,f)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}to_js_value(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.vrfcert_to_js_value(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=a()[n/4+2];if(s)throw c(e);return c(_)}finally{t.__wbindgen_add_to_stack_pointer(16)}}static from_json(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=b;t.vrfcert_from_json(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw c(s);return h_.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}output(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.assetname_name(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=D(_,e).slice();return t.__wbindgen_free(_,e*1),s}finally{t.__wbindgen_add_to_stack_pointer(16)}}proof(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.bootstrapwitness_attributes(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=D(_,e).slice();return t.__wbindgen_free(_,e*1),s}finally{t.__wbindgen_add_to_stack_pointer(16)}}static new(_,e){try{const i=t.__wbindgen_add_to_stack_pointer(-16),o=Q(_,t.__wbindgen_malloc),f=b,l=Q(e,t.__wbindgen_malloc),H=b;t.vrfcert_new(i,o,f,l,H);var s=a()[i/4+0],n=a()[i/4+1],r=a()[i/4+2];if(r)throw c(n);return h_.__wrap(s)}finally{t.__wbindgen_add_to_stack_pointer(16)}}}p.exports.VRFCert=h_;class M_{static __wrap(_){_=_>>>0;const e=Object.create(M_.prototype);return e.__wbg_ptr=_,e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,_}free(){const _=this.__destroy_into_raw();t.__wbg_vrfkeyhash_free(_)}static from_bytes(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=Q(_,t.__wbindgen_malloc),o=b;t.vrfkeyhash_from_bytes(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw c(s);return M_.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_bytes(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.auxiliarydatahash_to_bytes(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=D(_,e).slice();return t.__wbindgen_free(_,e*1),s}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_bech32(_){let e,s;try{const H=t.__wbindgen_add_to_stack_pointer(-16),rt=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),dt=b;t.auxiliarydatahash_to_bech32(H,this.__wbg_ptr,rt,dt);var n=a()[H/4+0],r=a()[H/4+1],i=a()[H/4+2],o=a()[H/4+3],f=n,l=r;if(o)throw f=0,l=0,c(i);return e=f,s=l,m(f,l)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(e,s,1)}}static from_bech32(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=b;t.vrfkeyhash_from_bech32(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw c(s);return M_.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_hex(){let _,e;try{const r=t.__wbindgen_add_to_stack_pointer(-16);t.auxiliarydatahash_to_hex(r,this.__wbg_ptr);var s=a()[r/4+0],n=a()[r/4+1];return _=s,e=n,m(s,n)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}static from_hex(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=b;t.vrfkeyhash_from_hex(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw c(s);return M_.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}}p.exports.VRFKeyHash=M_;class Ae{static __wrap(_){_=_>>>0;const e=Object.create(Ae.prototype);return e.__wbg_ptr=_,e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,_}free(){const _=this.__destroy_into_raw();t.__wbg_vrfvkey_free(_)}static from_bytes(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=Q(_,t.__wbindgen_malloc),o=b;t.vrfvkey_from_bytes(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw c(s);return Ae.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_bytes(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.auxiliarydatahash_to_bytes(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=D(_,e).slice();return t.__wbindgen_free(_,e*1),s}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_bech32(_){let e,s;try{const H=t.__wbindgen_add_to_stack_pointer(-16),rt=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),dt=b;t.auxiliarydatahash_to_bech32(H,this.__wbg_ptr,rt,dt);var n=a()[H/4+0],r=a()[H/4+1],i=a()[H/4+2],o=a()[H/4+3],f=n,l=r;if(o)throw f=0,l=0,c(i);return e=f,s=l,m(f,l)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(e,s,1)}}static from_bech32(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=b;t.vrfvkey_from_bech32(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw c(s);return Ae.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_hex(){let _,e;try{const r=t.__wbindgen_add_to_stack_pointer(-16);t.auxiliarydatahash_to_hex(r,this.__wbg_ptr);var s=a()[r/4+0],n=a()[r/4+1];return _=s,e=n,m(s,n)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}static from_hex(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=b;t.vrfvkey_from_hex(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw c(s);return Ae.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}}p.exports.VRFVKey=Ae;class gt{static __wrap(_){_=_>>>0;const e=Object.create(gt.prototype);return e.__wbg_ptr=_,e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,_}free(){const _=this.__destroy_into_raw();t.__wbg_value_free(_)}to_bytes(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.value_to_bytes(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=D(_,e).slice();return t.__wbindgen_free(_,e*1),s}finally{t.__wbindgen_add_to_stack_pointer(16)}}static from_bytes(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=Q(_,t.__wbindgen_malloc),o=b;t.value_from_bytes(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw c(s);return gt.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_hex(){let _,e;try{const r=t.__wbindgen_add_to_stack_pointer(-16);t.value_to_hex(r,this.__wbg_ptr);var s=a()[r/4+0],n=a()[r/4+1];return _=s,e=n,m(s,n)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}static from_hex(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=b;t.value_from_hex(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw c(s);return gt.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_json(){let _,e;try{const l=t.__wbindgen_add_to_stack_pointer(-16);t.value_to_json(l,this.__wbg_ptr);var s=a()[l/4+0],n=a()[l/4+1],r=a()[l/4+2],i=a()[l/4+3],o=s,f=n;if(i)throw o=0,f=0,c(r);return _=o,e=f,m(o,f)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}to_js_value(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.value_to_js_value(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=a()[n/4+2];if(s)throw c(e);return c(_)}finally{t.__wbindgen_add_to_stack_pointer(16)}}static from_json(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=b;t.value_from_json(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw c(s);return gt.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}static new(_){g(_,I);const e=t.value_new(_.__wbg_ptr);return gt.__wrap(e)}static new_from_assets(_){g(_,$t);const e=t.value_new_from_assets(_.__wbg_ptr);return gt.__wrap(e)}static new_with_assets(_,e){g(_,I),g(e,$t);const s=t.value_new_with_assets(_.__wbg_ptr,e.__wbg_ptr);return gt.__wrap(s)}static zero(){const _=t.value_zero();return gt.__wrap(_)}is_zero(){return t.value_is_zero(this.__wbg_ptr)!==0}coin(){const _=t.value_coin(this.__wbg_ptr);return I.__wrap(_)}set_coin(_){g(_,I),t.value_set_coin(this.__wbg_ptr,_.__wbg_ptr)}multiasset(){const _=t.value_multiasset(this.__wbg_ptr);return _===0?void 0:$t.__wrap(_)}set_multiasset(_){g(_,$t),t.value_set_multiasset(this.__wbg_ptr,_.__wbg_ptr)}checked_add(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16);g(_,gt),t.value_checked_add(r,this.__wbg_ptr,_.__wbg_ptr);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw c(s);return gt.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}checked_sub(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16);g(_,gt),t.value_checked_sub(r,this.__wbg_ptr,_.__wbg_ptr);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw c(s);return gt.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}clamped_sub(_){g(_,gt);const e=t.value_clamped_sub(this.__wbg_ptr,_.__wbg_ptr);return gt.__wrap(e)}compare(_){g(_,gt);const e=t.value_compare(this.__wbg_ptr,_.__wbg_ptr);return e===16777215?void 0:e}}p.exports.Value=gt;class Zt{static __wrap(_){_=_>>>0;const e=Object.create(Zt.prototype);return e.__wbg_ptr=_,e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,_}free(){const _=this.__destroy_into_raw();t.__wbg_vkey_free(_)}to_bytes(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.vkey_to_bytes(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=D(_,e).slice();return t.__wbindgen_free(_,e*1),s}finally{t.__wbindgen_add_to_stack_pointer(16)}}static from_bytes(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=Q(_,t.__wbindgen_malloc),o=b;t.vkey_from_bytes(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw c(s);return Zt.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_hex(){let _,e;try{const r=t.__wbindgen_add_to_stack_pointer(-16);t.vkey_to_hex(r,this.__wbg_ptr);var s=a()[r/4+0],n=a()[r/4+1];return _=s,e=n,m(s,n)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}static from_hex(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=b;t.vkey_from_hex(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw c(s);return Zt.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_json(){let _,e;try{const l=t.__wbindgen_add_to_stack_pointer(-16);t.vkey_to_json(l,this.__wbg_ptr);var s=a()[l/4+0],n=a()[l/4+1],r=a()[l/4+2],i=a()[l/4+3],o=s,f=n;if(i)throw o=0,f=0,c(r);return _=o,e=f,m(o,f)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}to_js_value(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.vkey_to_js_value(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=a()[n/4+2];if(s)throw c(e);return c(_)}finally{t.__wbindgen_add_to_stack_pointer(16)}}static from_json(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=b;t.vkey_from_json(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw c(s);return Zt.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}static new(_){g(_,l_);const e=t.vkey_new(_.__wbg_ptr);return Zt.__wrap(e)}public_key(){const _=t.vkey_public_key(this.__wbg_ptr);return l_.__wrap(_)}}p.exports.Vkey=Zt;class Sr{static __wrap(_){_=_>>>0;const e=Object.create(Sr.prototype);return e.__wbg_ptr=_,e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,_}free(){const _=this.__destroy_into_raw();t.__wbg_vkeys_free(_)}static new(){const _=t.ed25519keyhashes_new();return Sr.__wrap(_)}len(){return t.assetnames_len(this.__wbg_ptr)>>>0}get(_){const e=t.vkeys_get(this.__wbg_ptr,_);return Zt.__wrap(e)}add(_){g(_,Zt),t.vkeys_add(this.__wbg_ptr,_.__wbg_ptr)}}p.exports.Vkeys=Sr;class K_{static __wrap(_){_=_>>>0;const e=Object.create(K_.prototype);return e.__wbg_ptr=_,e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,_}free(){const _=this.__destroy_into_raw();t.__wbg_vkeywitness_free(_)}to_bytes(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.vkeywitness_to_bytes(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=D(_,e).slice();return t.__wbindgen_free(_,e*1),s}finally{t.__wbindgen_add_to_stack_pointer(16)}}static from_bytes(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=Q(_,t.__wbindgen_malloc),o=b;t.vkeywitness_from_bytes(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw c(s);return K_.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_hex(){let _,e;try{const r=t.__wbindgen_add_to_stack_pointer(-16);t.vkeywitness_to_hex(r,this.__wbg_ptr);var s=a()[r/4+0],n=a()[r/4+1];return _=s,e=n,m(s,n)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}static from_hex(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=b;t.vkeywitness_from_hex(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw c(s);return K_.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_json(){let _,e;try{const l=t.__wbindgen_add_to_stack_pointer(-16);t.vkeywitness_to_json(l,this.__wbg_ptr);var s=a()[l/4+0],n=a()[l/4+1],r=a()[l/4+2],i=a()[l/4+3],o=s,f=n;if(i)throw o=0,f=0,c(r);return _=o,e=f,m(o,f)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}to_js_value(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.vkeywitness_to_js_value(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=a()[n/4+2];if(s)throw c(e);return c(_)}finally{t.__wbindgen_add_to_stack_pointer(16)}}static from_json(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=b;t.vkeywitness_from_json(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw c(s);return K_.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}static new(_,e){g(_,Zt),g(e,it);const s=t.vkeywitness_new(_.__wbg_ptr,e.__wbg_ptr);return K_.__wrap(s)}vkey(){const _=t.vkeywitness_vkey(this.__wbg_ptr);return Zt.__wrap(_)}signature(){const _=t.vkeywitness_signature(this.__wbg_ptr);return it.__wrap(_)}}p.exports.Vkeywitness=K_;class Ie{static __wrap(_){_=_>>>0;const e=Object.create(Ie.prototype);return e.__wbg_ptr=_,e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,_}free(){const _=this.__destroy_into_raw();t.__wbg_vkeywitnesses_free(_)}to_bytes(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.vkeywitnesses_to_bytes(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=D(_,e).slice();return t.__wbindgen_free(_,e*1),s}finally{t.__wbindgen_add_to_stack_pointer(16)}}static from_bytes(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=Q(_,t.__wbindgen_malloc),o=b;t.vkeywitnesses_from_bytes(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw c(s);return Ie.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_hex(){let _,e;try{const r=t.__wbindgen_add_to_stack_pointer(-16);t.vkeywitnesses_to_hex(r,this.__wbg_ptr);var s=a()[r/4+0],n=a()[r/4+1];return _=s,e=n,m(s,n)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}static from_hex(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=b;t.vkeywitnesses_from_hex(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw c(s);return Ie.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_json(){let _,e;try{const l=t.__wbindgen_add_to_stack_pointer(-16);t.vkeywitnesses_to_json(l,this.__wbg_ptr);var s=a()[l/4+0],n=a()[l/4+1],r=a()[l/4+2],i=a()[l/4+3],o=s,f=n;if(i)throw o=0,f=0,c(r);return _=o,e=f,m(o,f)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}to_js_value(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.vkeywitnesses_to_js_value(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=a()[n/4+2];if(s)throw c(e);return c(_)}finally{t.__wbindgen_add_to_stack_pointer(16)}}static from_json(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=b;t.vkeywitnesses_from_json(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw c(s);return Ie.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}static new(){const _=t.ed25519keyhashes_new();return Ie.__wrap(_)}len(){return t.assetnames_len(this.__wbg_ptr)>>>0}get(_){const e=t.vkeywitnesses_get(this.__wbg_ptr,_);return K_.__wrap(e)}add(_){g(_,K_),t.vkeywitnesses_add(this.__wbg_ptr,_.__wbg_ptr)}}p.exports.Vkeywitnesses=Ie;class H_{static __wrap(_){_=_>>>0;const e=Object.create(H_.prototype);return e.__wbg_ptr=_,e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,_}free(){const _=this.__destroy_into_raw();t.__wbg_withdrawals_free(_)}to_bytes(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.withdrawals_to_bytes(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=D(_,e).slice();return t.__wbindgen_free(_,e*1),s}finally{t.__wbindgen_add_to_stack_pointer(16)}}static from_bytes(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=Q(_,t.__wbindgen_malloc),o=b;t.withdrawals_from_bytes(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw c(s);return H_.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_hex(){let _,e;try{const r=t.__wbindgen_add_to_stack_pointer(-16);t.withdrawals_to_hex(r,this.__wbg_ptr);var s=a()[r/4+0],n=a()[r/4+1];return _=s,e=n,m(s,n)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}static from_hex(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=b;t.withdrawals_from_hex(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw c(s);return H_.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_json(){let _,e;try{const l=t.__wbindgen_add_to_stack_pointer(-16);t.withdrawals_to_json(l,this.__wbg_ptr);var s=a()[l/4+0],n=a()[l/4+1],r=a()[l/4+2],i=a()[l/4+3],o=s,f=n;if(i)throw o=0,f=0,c(r);return _=o,e=f,m(o,f)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}to_js_value(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.withdrawals_to_js_value(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=a()[n/4+2];if(s)throw c(e);return c(_)}finally{t.__wbindgen_add_to_stack_pointer(16)}}static from_json(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=b;t.withdrawals_from_json(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw c(s);return H_.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}static new(){const _=t.auxiliarydataset_new();return H_.__wrap(_)}len(){return t.auxiliarydataset_len(this.__wbg_ptr)>>>0}insert(_,e){g(_,I_),g(e,I);const s=t.withdrawals_insert(this.__wbg_ptr,_.__wbg_ptr,e.__wbg_ptr);return s===0?void 0:I.__wrap(s)}get(_){g(_,I_);const e=t.withdrawals_get(this.__wbg_ptr,_.__wbg_ptr);return e===0?void 0:I.__wrap(e)}keys(){const _=t.withdrawals_keys(this.__wbg_ptr);return Ue.__wrap(_)}}p.exports.Withdrawals=H_,p.exports.__wbindgen_object_drop_ref=function(C){c(C)},p.exports.__wbindgen_string_new=function(C,_){const e=m(C,_);return G(e)},p.exports.__wbindgen_error_new=function(C,_){const e=new Error(m(C,_));return G(e)},p.exports.__wbindgen_string_get=function(C,_){const e=x(_),s=typeof e=="string"?e:void 0;var n=nt(s)?0:v(s,t.__wbindgen_malloc,t.__wbindgen_realloc),r=b;a()[C/4+1]=r,a()[C/4+0]=n},p.exports.__wbindgen_object_clone_ref=function(C){const _=x(C);return G(_)},p.exports.__wbindgen_is_object=function(C){const _=x(C);return typeof _=="object"&&_!==null},p.exports.__wbg_String_91fba7ded13ba54c=function(C,_){const e=String(x(_)),s=v(e,t.__wbindgen_malloc,t.__wbindgen_realloc),n=b;a()[C/4+1]=n,a()[C/4+0]=s},p.exports.__wbindgen_number_new=function(C){return G(C)},p.exports.__wbg_set_20cbc34131e76824=function(C,_,e){x(C)[c(_)]=c(e)},p.exports.__wbg_crypto_566d7465cdbb6b7a=function(C){const _=x(C).crypto;return G(_)},p.exports.__wbg_process_dc09a8c7d59982f6=function(C){const _=x(C).process;return G(_)},p.exports.__wbg_versions_d98c6400c6ca2bd8=function(C){const _=x(C).versions;return G(_)},p.exports.__wbg_node_caaf83d002149bd5=function(C){const _=x(C).node;return G(_)},p.exports.__wbindgen_is_string=function(C){return typeof x(C)=="string"},p.exports.__wbg_require_94a9da52636aacbf=function(){return At(function(){return G(Jr)},arguments)},p.exports.__wbg_msCrypto_0b84745e9245cdf6=function(C){const _=x(C).msCrypto;return G(_)},p.exports.__wbg_randomFillSync_290977693942bf03=function(){return At(function(C,_){x(C).randomFillSync(c(_))},arguments)},p.exports.__wbg_getRandomValues_260cc23a41afad9a=function(){return At(function(C,_){x(C).getRandomValues(x(_))},arguments)},p.exports.__wbindgen_is_function=function(C){return typeof x(C)=="function"},p.exports.__wbg_self_e7c1f827057f6584=function(){return At(function(){const C=self.self;return G(C)},arguments)},p.exports.__wbg_window_a09ec664e14b1b81=function(){return At(function(){const C=window.window;return G(C)},arguments)},p.exports.__wbg_globalThis_87cbb8506fecf3a9=function(){return At(function(){const C=globalThis.globalThis;return G(C)},arguments)},p.exports.__wbg_global_c85a9259e621f3db=function(){return At(function(){const C=Mr.global;return G(C)},arguments)},p.exports.__wbindgen_is_undefined=function(C){return x(C)===void 0},p.exports.__wbg_newnoargs_2b8b6bd7753c76ba=function(C,_){const e=new Function(m(C,_));return G(e)},p.exports.__wbg_call_95d1ea488d03e4e8=function(){return At(function(C,_){const e=x(C).call(x(_));return G(e)},arguments)},p.exports.__wbg_new_b525de17f44a8943=function(){const C=new Array;return G(C)},p.exports.__wbg_new_f841cc6f2098f4b5=function(){return G(new Map)},p.exports.__wbg_new_f9876326328f45ed=function(){const C=new Object;return G(C)},p.exports.__wbg_set_17224bc548dd1d7b=function(C,_,e){x(C)[_>>>0]=c(e)},p.exports.__wbg_call_9495de66fdbe016b=function(){return At(function(C,_,e){const s=x(C).call(x(_),x(e));return G(s)},arguments)},p.exports.__wbg_set_388c4c6422704173=function(C,_,e){const s=x(C).set(x(_),x(e));return G(s)},p.exports.__wbg_buffer_cf65c07de34b9a08=function(C){const _=x(C).buffer;return G(_)},p.exports.__wbg_newwithbyteoffsetandlength_9fb2f11355ecadf5=function(C,_,e){const s=new Uint8Array(x(C),_>>>0,e>>>0);return G(s)},p.exports.__wbg_new_537b7341ce90bb31=function(C){const _=new Uint8Array(x(C));return G(_)},p.exports.__wbg_set_17499e8aa4003ebd=function(C,_,e){x(C).set(x(_),e>>>0)},p.exports.__wbg_newwithlength_b56c882b57805732=function(C){const _=new Uint8Array(C>>>0);return G(_)},p.exports.__wbg_subarray_7526649b91a252a6=function(C,_,e){const s=x(C).subarray(_>>>0,e>>>0);return G(s)},p.exports.__wbg_new_d87f272aec784ec0=function(C,_){const e=new Function(m(C,_));return G(e)},p.exports.__wbg_call_eae29933372a39be=function(C,_){const e=x(C).call(x(_));return G(e)},p.exports.__wbindgen_jsval_eq=function(C,_){return x(C)===x(_)},p.exports.__wbg_self_e0b3266d2d9eba1a=function(C){const _=x(C).self;return G(_)},p.exports.__wbg_require_0993fe224bf8e202=function(C,_){const e=Jr(m(C,_));return G(e)},p.exports.__wbg_crypto_e95a6e54c5c2e37f=function(C){const _=x(C).crypto;return G(_)},p.exports.__wbg_getRandomValues_dc67302a7bd1aec5=function(C){const _=x(C).getRandomValues;return G(_)},p.exports.__wbg_randomFillSync_dd2297de5917c74e=function(C,_,e){x(C).randomFillSync(D(_,e))},p.exports.__wbg_getRandomValues_02639197c8166a96=function(C,_,e){x(C).getRandomValues(D(_,e))},p.exports.__wbindgen_debug_string=function(C,_){const e=_t(x(_)),s=v(e,t.__wbindgen_malloc,t.__wbindgen_realloc),n=b;a()[C/4+1]=n,a()[C/4+0]=s},p.exports.__wbindgen_throw=function(C,_){throw new Error(m(C,_))},p.exports.__wbindgen_memory=function(){const C=t.memory;return G(C)};const pa=wn.join(__dirname,"sidan_csl_rs_bg.wasm"),wa=wn.readFileSync(pa),la=new WebAssembly.Module(wa);t=new WebAssembly.Instance(la,d).exports,p.exports.__wasm=t})(y);const or={mem:7e6,steps:3e9},y_={epoch:0,coinsPerUTxOSize:"4310",priceMem:.0577,priceStep:721e-7,minFeeA:44,minFeeB:155381,keyDeposit:"2000000",maxTxSize:16384,maxValSize:"5000",poolDeposit:"500000000",maxCollateralInputs:3,decentralisation:0,maxBlockSize:98304,collateralPercent:150,maxBlockHeaderSize:1100,minPoolCost:"340000000",maxTxExMem:"16000000",maxTxExSteps:"10000000000",maxBlockExMem:"80000000",maxBlockExSteps:"40000000000"},Yr=2147483648,Ce={V1:y.exports.Language.new_plutus_v1(),V2:y.exports.Language.new_plutus_v2()},V_=56,ja={CERT:y.exports.RedeemerTag.new_cert(),MINT:y.exports.RedeemerTag.new_mint(),REWARD:y.exports.RedeemerTag.new_reward(),SPEND:y.exports.RedeemerTag.new_spend()},Kr={testnet:["74","1598400","1595967616","432000"],preview:["183","15811222","1682467200","86400"],preprod:["65","26438400","1682121600","432000"],mainnet:["208","4492800","1596059091","432000"]},ln={ALONZO:y.exports.TxBuilderConstants.plutus_alonzo_cost_models(),BABBAGE:(()=>{const p=y.exports.Costmdls.new(),d=y.exports.CostModel.new();Object.values({"addInteger-cpu-arguments-intercept":205665,"addInteger-cpu-arguments-slope":812,"addInteger-memory-arguments-intercept":1,"addInteger-memory-arguments-slope":1,"appendByteString-cpu-arguments-intercept":1e3,"appendByteString-cpu-arguments-slope":571,"appendByteString-memory-arguments-intercept":0,"appendByteString-memory-arguments-slope":1,"appendString-cpu-arguments-intercept":1e3,"appendString-cpu-arguments-slope":24177,"appendString-memory-arguments-intercept":4,"appendString-memory-arguments-slope":1,"bData-cpu-arguments":1e3,"bData-memory-arguments":32,"blake2b_256-cpu-arguments-intercept":117366,"blake2b_256-cpu-arguments-slope":10475,"blake2b_256-memory-arguments":4,"cekApplyCost-exBudgetCPU":23e3,"cekApplyCost-exBudgetMemory":100,"cekBuiltinCost-exBudgetCPU":23e3,"cekBuiltinCost-exBudgetMemory":100,"cekConstCost-exBudgetCPU":23e3,"cekConstCost-exBudgetMemory":100,"cekDelayCost-exBudgetCPU":23e3,"cekDelayCost-exBudgetMemory":100,"cekForceCost-exBudgetCPU":23e3,"cekForceCost-exBudgetMemory":100,"cekLamCost-exBudgetCPU":23e3,"cekLamCost-exBudgetMemory":100,"cekStartupCost-exBudgetCPU":100,"cekStartupCost-exBudgetMemory":100,"cekVarCost-exBudgetCPU":23e3,"cekVarCost-exBudgetMemory":100,"chooseData-cpu-arguments":19537,"chooseData-memory-arguments":32,"chooseList-cpu-arguments":175354,"chooseList-memory-arguments":32,"chooseUnit-cpu-arguments":46417,"chooseUnit-memory-arguments":4,"consByteString-cpu-arguments-intercept":221973,"consByteString-cpu-arguments-slope":511,"consByteString-memory-arguments-intercept":0,"consByteString-memory-arguments-slope":1,"constrData-cpu-arguments":89141,"constrData-memory-arguments":32,"decodeUtf8-cpu-arguments-intercept":497525,"decodeUtf8-cpu-arguments-slope":14068,"decodeUtf8-memory-arguments-intercept":4,"decodeUtf8-memory-arguments-slope":2,"divideInteger-cpu-arguments-constant":196500,"divideInteger-cpu-arguments-model-arguments-intercept":453240,"divideInteger-cpu-arguments-model-arguments-slope":220,"divideInteger-memory-arguments-intercept":0,"divideInteger-memory-arguments-minimum":1,"divideInteger-memory-arguments-slope":1,"encodeUtf8-cpu-arguments-intercept":1e3,"encodeUtf8-cpu-arguments-slope":28662,"encodeUtf8-memory-arguments-intercept":4,"encodeUtf8-memory-arguments-slope":2,"equalsByteString-cpu-arguments-constant":245e3,"equalsByteString-cpu-arguments-intercept":216773,"equalsByteString-cpu-arguments-slope":62,"equalsByteString-memory-arguments":1,"equalsData-cpu-arguments-intercept":1060367,"equalsData-cpu-arguments-slope":12586,"equalsData-memory-arguments":1,"equalsInteger-cpu-arguments-intercept":208512,"equalsInteger-cpu-arguments-slope":421,"equalsInteger-memory-arguments":1,"equalsString-cpu-arguments-constant":187e3,"equalsString-cpu-arguments-intercept":1e3,"equalsString-cpu-arguments-slope":52998,"equalsString-memory-arguments":1,"fstPair-cpu-arguments":80436,"fstPair-memory-arguments":32,"headList-cpu-arguments":43249,"headList-memory-arguments":32,"iData-cpu-arguments":1e3,"iData-memory-arguments":32,"ifThenElse-cpu-arguments":80556,"ifThenElse-memory-arguments":1,"indexByteString-cpu-arguments":57667,"indexByteString-memory-arguments":4,"lengthOfByteString-cpu-arguments":1e3,"lengthOfByteString-memory-arguments":10,"lessThanByteString-cpu-arguments-intercept":197145,"lessThanByteString-cpu-arguments-slope":156,"lessThanByteString-memory-arguments":1,"lessThanEqualsByteString-cpu-arguments-intercept":197145,"lessThanEqualsByteString-cpu-arguments-slope":156,"lessThanEqualsByteString-memory-arguments":1,"lessThanEqualsInteger-cpu-arguments-intercept":204924,"lessThanEqualsInteger-cpu-arguments-slope":473,"lessThanEqualsInteger-memory-arguments":1,"lessThanInteger-cpu-arguments-intercept":208896,"lessThanInteger-cpu-arguments-slope":511,"lessThanInteger-memory-arguments":1,"listData-cpu-arguments":52467,"listData-memory-arguments":32,"mapData-cpu-arguments":64832,"mapData-memory-arguments":32,"mkCons-cpu-arguments":65493,"mkCons-memory-arguments":32,"mkNilData-cpu-arguments":22558,"mkNilData-memory-arguments":32,"mkNilPairData-cpu-arguments":16563,"mkNilPairData-memory-arguments":32,"mkPairData-cpu-arguments":76511,"mkPairData-memory-arguments":32,"modInteger-cpu-arguments-constant":196500,"modInteger-cpu-arguments-model-arguments-intercept":453240,"modInteger-cpu-arguments-model-arguments-slope":220,"modInteger-memory-arguments-intercept":0,"modInteger-memory-arguments-minimum":1,"modInteger-memory-arguments-slope":1,"multiplyInteger-cpu-arguments-intercept":69522,"multiplyInteger-cpu-arguments-slope":11687,"multiplyInteger-memory-arguments-intercept":0,"multiplyInteger-memory-arguments-slope":1,"nullList-cpu-arguments":60091,"nullList-memory-arguments":32,"quotientInteger-cpu-arguments-constant":196500,"quotientInteger-cpu-arguments-model-arguments-intercept":453240,"quotientInteger-cpu-arguments-model-arguments-slope":220,"quotientInteger-memory-arguments-intercept":0,"quotientInteger-memory-arguments-minimum":1,"quotientInteger-memory-arguments-slope":1,"remainderInteger-cpu-arguments-constant":196500,"remainderInteger-cpu-arguments-model-arguments-intercept":453240,"remainderInteger-cpu-arguments-model-arguments-slope":220,"remainderInteger-memory-arguments-intercept":0,"remainderInteger-memory-arguments-minimum":1,"remainderInteger-memory-arguments-slope":1,"sha2_256-cpu-arguments-intercept":806990,"sha2_256-cpu-arguments-slope":30482,"sha2_256-memory-arguments":4,"sha3_256-cpu-arguments-intercept":1927926,"sha3_256-cpu-arguments-slope":82523,"sha3_256-memory-arguments":4,"sliceByteString-cpu-arguments-intercept":265318,"sliceByteString-cpu-arguments-slope":0,"sliceByteString-memory-arguments-intercept":4,"sliceByteString-memory-arguments-slope":0,"sndPair-cpu-arguments":85931,"sndPair-memory-arguments":32,"subtractInteger-cpu-arguments-intercept":205665,"subtractInteger-cpu-arguments-slope":812,"subtractInteger-memory-arguments-intercept":1,"subtractInteger-memory-arguments-slope":1,"tailList-cpu-arguments":41182,"tailList-memory-arguments":32,"trace-cpu-arguments":212342,"trace-memory-arguments":32,"unBData-cpu-arguments":31220,"unBData-memory-arguments":32,"unConstrData-cpu-arguments":32696,"unConstrData-memory-arguments":32,"unIData-cpu-arguments":43357,"unIData-memory-arguments":32,"unListData-cpu-arguments":32247,"unListData-memory-arguments":32,"unMapData-cpu-arguments":38314,"unMapData-memory-arguments":32,"verifyEd25519Signature-cpu-arguments-intercept":57996947,"verifyEd25519Signature-cpu-arguments-slope":18975,"verifyEd25519Signature-memory-arguments":10}).forEach((w,u)=>d.set(u,y.exports.Int.new_i32(w)));const t=y.exports.CostModel.new();return Object.values({"addInteger-cpu-arguments-intercept":205665,"addInteger-cpu-arguments-slope":812,"addInteger-memory-arguments-intercept":1,"addInteger-memory-arguments-slope":1,"appendByteString-cpu-arguments-intercept":1e3,"appendByteString-cpu-arguments-slope":571,"appendByteString-memory-arguments-intercept":0,"appendByteString-memory-arguments-slope":1,"appendString-cpu-arguments-intercept":1e3,"appendString-cpu-arguments-slope":24177,"appendString-memory-arguments-intercept":4,"appendString-memory-arguments-slope":1,"bData-cpu-arguments":1e3,"bData-memory-arguments":32,"blake2b_256-cpu-arguments-intercept":117366,"blake2b_256-cpu-arguments-slope":10475,"blake2b_256-memory-arguments":4,"cekApplyCost-exBudgetCPU":23e3,"cekApplyCost-exBudgetMemory":100,"cekBuiltinCost-exBudgetCPU":23e3,"cekBuiltinCost-exBudgetMemory":100,"cekConstCost-exBudgetCPU":23e3,"cekConstCost-exBudgetMemory":100,"cekDelayCost-exBudgetCPU":23e3,"cekDelayCost-exBudgetMemory":100,"cekForceCost-exBudgetCPU":23e3,"cekForceCost-exBudgetMemory":100,"cekLamCost-exBudgetCPU":23e3,"cekLamCost-exBudgetMemory":100,"cekStartupCost-exBudgetCPU":100,"cekStartupCost-exBudgetMemory":100,"cekVarCost-exBudgetCPU":23e3,"cekVarCost-exBudgetMemory":100,"chooseData-cpu-arguments":19537,"chooseData-memory-arguments":32,"chooseList-cpu-arguments":175354,"chooseList-memory-arguments":32,"chooseUnit-cpu-arguments":46417,"chooseUnit-memory-arguments":4,"consByteString-cpu-arguments-intercept":221973,"consByteString-cpu-arguments-slope":511,"consByteString-memory-arguments-intercept":0,"consByteString-memory-arguments-slope":1,"constrData-cpu-arguments":89141,"constrData-memory-arguments":32,"decodeUtf8-cpu-arguments-intercept":497525,"decodeUtf8-cpu-arguments-slope":14068,"decodeUtf8-memory-arguments-intercept":4,"decodeUtf8-memory-arguments-slope":2,"divideInteger-cpu-arguments-constant":196500,"divideInteger-cpu-arguments-model-arguments-intercept":453240,"divideInteger-cpu-arguments-model-arguments-slope":220,"divideInteger-memory-arguments-intercept":0,"divideInteger-memory-arguments-minimum":1,"divideInteger-memory-arguments-slope":1,"encodeUtf8-cpu-arguments-intercept":1e3,"encodeUtf8-cpu-arguments-slope":28662,"encodeUtf8-memory-arguments-intercept":4,"encodeUtf8-memory-arguments-slope":2,"equalsByteString-cpu-arguments-constant":245e3,"equalsByteString-cpu-arguments-intercept":216773,"equalsByteString-cpu-arguments-slope":62,"equalsByteString-memory-arguments":1,"equalsData-cpu-arguments-intercept":1060367,"equalsData-cpu-arguments-slope":12586,"equalsData-memory-arguments":1,"equalsInteger-cpu-arguments-intercept":208512,"equalsInteger-cpu-arguments-slope":421,"equalsInteger-memory-arguments":1,"equalsString-cpu-arguments-constant":187e3,"equalsString-cpu-arguments-intercept":1e3,"equalsString-cpu-arguments-slope":52998,"equalsString-memory-arguments":1,"fstPair-cpu-arguments":80436,"fstPair-memory-arguments":32,"headList-cpu-arguments":43249,"headList-memory-arguments":32,"iData-cpu-arguments":1e3,"iData-memory-arguments":32,"ifThenElse-cpu-arguments":80556,"ifThenElse-memory-arguments":1,"indexByteString-cpu-arguments":57667,"indexByteString-memory-arguments":4,"lengthOfByteString-cpu-arguments":1e3,"lengthOfByteString-memory-arguments":10,"lessThanByteString-cpu-arguments-intercept":197145,"lessThanByteString-cpu-arguments-slope":156,"lessThanByteString-memory-arguments":1,"lessThanEqualsByteString-cpu-arguments-intercept":197145,"lessThanEqualsByteString-cpu-arguments-slope":156,"lessThanEqualsByteString-memory-arguments":1,"lessThanEqualsInteger-cpu-arguments-intercept":204924,"lessThanEqualsInteger-cpu-arguments-slope":473,"lessThanEqualsInteger-memory-arguments":1,"lessThanInteger-cpu-arguments-intercept":208896,"lessThanInteger-cpu-arguments-slope":511,"lessThanInteger-memory-arguments":1,"listData-cpu-arguments":52467,"listData-memory-arguments":32,"mapData-cpu-arguments":64832,"mapData-memory-arguments":32,"mkCons-cpu-arguments":65493,"mkCons-memory-arguments":32,"mkNilData-cpu-arguments":22558,"mkNilData-memory-arguments":32,"mkNilPairData-cpu-arguments":16563,"mkNilPairData-memory-arguments":32,"mkPairData-cpu-arguments":76511,"mkPairData-memory-arguments":32,"modInteger-cpu-arguments-constant":196500,"modInteger-cpu-arguments-model-arguments-intercept":453240,"modInteger-cpu-arguments-model-arguments-slope":220,"modInteger-memory-arguments-intercept":0,"modInteger-memory-arguments-minimum":1,"modInteger-memory-arguments-slope":1,"multiplyInteger-cpu-arguments-intercept":69522,"multiplyInteger-cpu-arguments-slope":11687,"multiplyInteger-memory-arguments-intercept":0,"multiplyInteger-memory-arguments-slope":1,"nullList-cpu-arguments":60091,"nullList-memory-arguments":32,"quotientInteger-cpu-arguments-constant":196500,"quotientInteger-cpu-arguments-model-arguments-intercept":453240,"quotientInteger-cpu-arguments-model-arguments-slope":220,"quotientInteger-memory-arguments-intercept":0,"quotientInteger-memory-arguments-minimum":1,"quotientInteger-memory-arguments-slope":1,"remainderInteger-cpu-arguments-constant":196500,"remainderInteger-cpu-arguments-model-arguments-intercept":453240,"remainderInteger-cpu-arguments-model-arguments-slope":220,"remainderInteger-memory-arguments-intercept":0,"remainderInteger-memory-arguments-minimum":1,"remainderInteger-memory-arguments-slope":1,"serialiseData-cpu-arguments-intercept":1159724,"serialiseData-cpu-arguments-slope":392670,"serialiseData-memory-arguments-intercept":0,"serialiseData-memory-arguments-slope":2,"sha2_256-cpu-arguments-intercept":806990,"sha2_256-cpu-arguments-slope":30482,"sha2_256-memory-arguments":4,"sha3_256-cpu-arguments-intercept":1927926,"sha3_256-cpu-arguments-slope":82523,"sha3_256-memory-arguments":4,"sliceByteString-cpu-arguments-intercept":265318,"sliceByteString-cpu-arguments-slope":0,"sliceByteString-memory-arguments-intercept":4,"sliceByteString-memory-arguments-slope":0,"sndPair-cpu-arguments":85931,"sndPair-memory-arguments":32,"subtractInteger-cpu-arguments-intercept":205665,"subtractInteger-cpu-arguments-slope":812,"subtractInteger-memory-arguments-intercept":1,"subtractInteger-memory-arguments-slope":1,"tailList-cpu-arguments":41182,"tailList-memory-arguments":32,"trace-cpu-arguments":212342,"trace-memory-arguments":32,"unBData-cpu-arguments":31220,"unBData-memory-arguments":32,"unConstrData-cpu-arguments":32696,"unConstrData-memory-arguments":32,"unIData-cpu-arguments":43357,"unIData-memory-arguments":32,"unListData-cpu-arguments":32247,"unListData-memory-arguments":32,"unMapData-cpu-arguments":38314,"unMapData-memory-arguments":32,"verifyEcdsaSecp256k1Signature-cpu-arguments":35892428,"verifyEcdsaSecp256k1Signature-memory-arguments":10,"verifyEd25519Signature-cpu-arguments-intercept":57996947,"verifyEd25519Signature-cpu-arguments-slope":18975,"verifyEd25519Signature-memory-arguments":10,"verifySchnorrSecp256k1Signature-cpu-arguments-intercept":38887044,"verifySchnorrSecp256k1Signature-cpu-arguments-slope":32947,"verifySchnorrSecp256k1Signature-memory-arguments":10}).forEach((w,u)=>t.set(u,y.exports.Int.new_i32(w))),p.insert(y.exports.Language.new_plutus_v1(),d),p.insert(y.exports.Language.new_plutus_v2(),t),p})()},Ba={ALONZO:{V1:"a141005901d59f1a000302590001011a00060bc719026d00011a000249f01903e800011a000249f018201a0025cea81971f70419744d186419744d186419744d186419744d186419744d186419744d18641864186419744d18641a000249f018201a000249f018201a000249f018201a000249f01903e800011a000249f018201a000249f01903e800081a000242201a00067e2318760001011a000249f01903e800081a000249f01a0001b79818f7011a000249f0192710011a0002155e19052e011903e81a000249f01903e8011a000249f018201a000249f018201a000249f0182001011a000249f0011a000249f0041a000194af18f8011a000194af18f8011a0002377c190556011a0002bdea1901f1011a000249f018201a000249f018201a000249f018201a000249f018201a000249f018201a000249f018201a000242201a00067e23187600010119f04c192bd200011a000249f018201a000242201a00067e2318760001011a000242201a00067e2318760001011a0025cea81971f704001a000141bb041a000249f019138800011a000249f018201a000302590001011a000249f018201a000249f018201a000249f018201a000249f018201a000249f018201a000249f018201a000249f018201a00330da70101ff"},BABBAGE:{V1:"a141005901b69f1a0003236119032c01011903e819023b00011903e8195e7104011903e818201a0001ca761928eb041959d818641959d818641959d818641959d818641959d818641959d81864186418641959d81864194c5118201a0002acfa182019b551041a000363151901ff00011a00015c3518201a000797751936f404021a0002ff941a0006ea7818dc0001011903e8196ff604021a0003bd081a00034ec5183e011a00102e0f19312a011a00032e801901a5011a0002da781903e819cf06011a00013a34182019a8f118201903e818201a00013aac0119e143041903e80a1a00030219189c011a00030219189c011a0003207c1901d9011a000330001901ff0119ccf3182019fd40182019ffd5182019581e18201940b318201a00012adf18201a0002ff941a0006ea7818dc0001011a00010f92192da7000119eabb18201a0002ff941a0006ea7818dc0001011a0002ff941a0006ea7818dc0001011a000c504e197712041a001d6af61a0001425b041a00040c660004001a00014fab18201a0003236119032c010119a0de18201a00033d7618201979f41820197fb8182019a95d1820197df718201995aa18201a009063b91903fd0aff",V2:"a20198af1a0003236119032c01011903e819023b00011903e8195e7104011903e818201a0001ca761928eb041959d818641959d818641959d818641959d818641959d818641959d81864186418641959d81864194c5118201a0002acfa182019b551041a000363151901ff00011a00015c3518201a000797751936f404021a0002ff941a0006ea7818dc0001011903e8196ff604021a0003bd081a00034ec5183e011a00102e0f19312a011a00032e801901a5011a0002da781903e819cf06011a00013a34182019a8f118201903e818201a00013aac0119e143041903e80a1a00030219189c011a00030219189c011a0003207c1901d9011a000330001901ff0119ccf3182019fd40182019ffd5182019581e18201940b318201a00012adf18201a0002ff941a0006ea7818dc0001011a00010f92192da7000119eabb18201a0002ff941a0006ea7818dc0001011a0002ff941a0006ea7818dc0001011a0011b22c1a0005fdde00021a000c504e197712041a001d6af61a0001425b041a00040c660004001a00014fab18201a0003236119032c010119a0de18201a00033d7618201979f41820197fb8182019a95d1820197df718201995aa18201b00000004a817c8001b00000004a817c8001a009063b91903fd0a1b00000004a817c800001b00000004a817c80041005901b69f1a0003236119032c01011903e819023b00011903e8195e7104011903e818201a0001ca761928eb041959d818641959d818641959d818641959d818641959d818641959d81864186418641959d81864194c5118201a0002acfa182019b551041a000363151901ff00011a00015c3518201a000797751936f404021a0002ff941a0006ea7818dc0001011903e8196ff604021a0003bd081a00034ec5183e011a00102e0f19312a011a00032e801901a5011a0002da781903e819cf06011a00013a34182019a8f118201903e818201a00013aac0119e143041903e80a1a00030219189c011a00030219189c011a0003207c1901d9011a000330001901ff0119ccf3182019fd40182019ffd5182019581e18201940b318201a00012adf18201a0002ff941a0006ea7818dc0001011a00010f92192da7000119eabb18201a0002ff941a0006ea7818dc0001011a0002ff941a0006ea7818dc0001011a000c504e197712041a001d6af61a0001425b041a00040c660004001a00014fab18201a0003236119032c010119a0de18201a00033d7618201979f41820197fb8182019a95d1820197df718201995aa18201a009063b91903fd0aff"}},rn={[y.exports.NetworkInfo.testnet().network_id()]:"8d18d786e92776c824607fd8e193ec535c79dc61ea2405ddf3b09fe3",[y.exports.NetworkInfo.mainnet().network_id()]:"f0ff48bbb7bbe9d59a40f1ce90e9e9d0ff5002ec48f232b49ca0fb9a"},Ea={mainnet:"wss://ogmios-api.mainnet.dandelion.link",preprod:"wss://ogmios-api.iohk-preprod.dandelion.link",preview:"__TBD_SOON_TM__",testnet:"wss://ogmios-api.testnet.dandelion.link"},Sa={LQ:"da8c30857834c6ae7203935b89278c532b3995245295456f993e1d244c51",MIN:"29d222ce763455e3d7a09a665ce554f00ac89d2e99a1a83d267170c64d494e",NTX:"edfd7a1d77bcb8b884c474bdc92a16002d1fb720e454fa6e993444794e5458",iBTC:"f66d78b4a3cb3d37afa0ec36461e51ecbde00f26c8f0a68f94b6988069425443",iETH:"f66d78b4a3cb3d37afa0ec36461e51ecbde00f26c8f0a68f94b6988069455448",iUSD:"f66d78b4a3cb3d37afa0ec36461e51ecbde00f26c8f0a68f94b6988069555344",MILK:"8a1cfae21368b8bebbbed9800fec304e95cce39a2a57dc35e2e3ebaa4d494c4b",AGIX:"f43a62fdc3965df486de8a0d32fe800963589c41b38946602a0dc53541474958",MELD:"6ac8ef33b510ec004fe11585f7c5a9f0c07f0c23428ab4f29c1d7d104d454c44",INDY:"533bb94a8850ee3ccbe483106489399112b74c905342cb1792a797a0494e4459",CLAY:"38ad9dc3aec6a2f38e220142b9aa6ade63ebe71f65e7cc2b7d8a8535434c4159",MCOS:"6f46e1304b16d884c85c62fb0eef35028facdc41aaa0fd319a152ed64d434f53",DING:"ce5b9e0f8a88255b65f2e4d065c6e716e9fa9a8a86dfb86423dd1ac044494e47",GERO:"10a49b996e2402269af553a8a96fb8eb90d79e9eca79e2b4223057b64745524f",NMKR:"5dac8536653edc12f6f5e1045d8164b9f59998d3bdc300fc928434894e4d4b52",PAVIA:"884892bcdc360bcef87d6b3f806e7f9cd5ac30d999d49970e7a903ae5041564941",HOSKY:"a0028f350aaabe0545fdcb56b039bfb08e4bb4d8c4d7c3c7d481c235484f534b59",YUMMI:"078eafce5cd7edafdf63900edef2c1ea759e77f30ca81d6bbdeec92479756d6d69",C3:"8e51398904a5d3fc129fbf4f1589701de23c7824d5c90fdb9490e15a434841524c4933",GIMBAL:"2b0a04a7b60132b1805b296c7fcb3b217ff14413991bf76f72663c3067696d62616c",SUNDAE:"9a9693a9a37912a5097918f97918d15240c92ab729a0b7c4aa144d7753554e444145",GREENS:"4623ab311b7d982d8d26fcbe1a9439ca56661aafcdcd8d8a0ef31fd6475245454e53",GENS:"dda5fdb1002f7389b33e036b6afee82a8189becb6cba852e8b79b4fb0014df1047454e53",SOCIETY:"25f0fc240e91bd95dcdaebd2ba7713fc5168ac77234a3d79449fc20c534f4349455459",DJED:"8db269c3ec630e06ae29f74bc39edd1f87c819f1056206e879a1cd61446a65644d6963726f555344",SHEN:"8db269c3ec630e06ae29f74bc39edd1f87c819f1056206e879a1cd615368656e4d6963726f555344",WMT:"1d7f33bd23d85e1a25d87d86fac4f199c3197a2f7afeb662a0f34e1e776f726c646d6f62696c65746f6b656e",COPI:"b6a7467ea1deb012808ef4e87b5ff371e85f7142d7b356a40d9b42a0436f726e75636f70696173205b76696120436861696e506f72742e696f5d"},gn=["begin","eternl","flint","lace","nami","nufi","gerowallet","typhoncip30","vespr","yoroi"],Mn=(p,d,t="5000000")=>{const w=y.exports.BigNum.from_str(p.get("lovelace")??"0").checked_add(y.exports.BigNum.from_str(t)),u=d.filter(B=>B.output.amount.filter(P=>P.unit!=="lovelace").some(P=>p.has(P.unit))),h=Ta(u);return[...h.less_than(w)?Na(w.clamped_sub(h).to_str(),d.filter(B=>!u.some(P=>P.input.txHash===B.input.txHash&&P.input.outputIndex===B.input.outputIndex))):[],...u]},Qa=(p,d,t=!1,{maxTxSize:w,minFeeA:u,minFeeB:h}=y_)=>{const x=d.filter(Y=>Hn(Y)===!1).sort(nn),B=y.exports.BigNum.from_str(cn(w,u,h)),P=t?y.exports.BigNum.from_str(p).checked_add(B).to_str():p;return mr(x,new Map([["lovelace",P]]))},Kn=(p,d,t=!1,w=y_)=>{const u=d.filter(Hn).sort(nn),h=Da(w),x=p.get("lovelace")??"0",B=t?y.exports.BigNum.from_str(x).checked_add(h).to_str():x;return p.set("lovelace",B),mr(u,p)},Oa=(p,d)=>Array.from(d,t=>({unit:t[0],quantity:y.exports.BigNum.from_str(t[1])})).every(t=>p.filter(w=>w.output.amount.find(u=>u.unit===t.unit)!==void 0).reduce((w,u)=>{const h=u.output.amount.reduce((x,B)=>x.checked_add(y.exports.BigNum.from_str(t.unit===B.unit?B.quantity:"0")),y.exports.BigNum.from_str("0"));return w.checked_add(h)},y.exports.BigNum.from_str("0")).less_than(t.quantity)===!1),nn=(p,d)=>{var u,h;const t=y.exports.BigNum.from_str(((u=p.output.amount.find(x=>x.unit==="lovelace"))==null?void 0:u.quantity)??"0");return y.exports.BigNum.from_str(((h=d.output.amount.find(x=>x.unit==="lovelace"))==null?void 0:h.quantity)??"0").compare(t)},Da=p=>{const{maxTxSize:d,minFeeA:t,minFeeB:w}=p;return y.exports.BigNum.from_str(cn(d,t,w))},Hn=p=>p.output.amount.length>1,Ta=p=>p.reduce((d,t)=>{var u;const w=((u=t.output.amount.find(h=>h.unit==="lovelace"))==null?void 0:u.quantity)??"0";return d.checked_add(y.exports.BigNum.from_str(w))},y.exports.BigNum.from_str("0")),Na=(p,d)=>{const t=d.sort(nn);return mr(t,new Map([["lovelace",p]]))},mr=(p,d,t=[])=>p.length===0||Oa(t,d)?t:Ua(p[0],d)?mr(p.slice(1),d,[...t,p[0]]):mr(p.slice(1),d,t),Ua=(p,d)=>Array.from(d.keys()).some(t=>p.output.amount.find(w=>w.unit===t)!==void 0),Pa=(p,d)=>{const t=Ka(d),w=Ha(p,d);return{coseKey:d_(t.to_bytes()),coseSign1:d_(w.to_bytes())}},Fa=(p,d,{key:t,signature:w})=>{var x,B;const u=jt.COSEKey.from_bytes(kt(t)),h=jt.COSESign1.from_bytes(kt(w));if((p==null?void 0:p.length)>0){const P=d_(h.payload()??new Uint8Array);if(a_(p)!==P)return!1}if((d==null?void 0:d.length)>0){const c=(x=h.headers().protected().deserialized_headers().header(jt.Label.new_text("address")))==null?void 0:x.as_bytes();if(c===void 0)throw new Error("Couldn't find a signer address in signature");const z=(B=u.header(jt.Label.new_int(jt.Int.new_negative(jt.BigNum.from_str("2")))))==null?void 0:B.as_bytes();if(z===void 0)throw new Error("Couldn't find a signer key in signature");const Y=sr(d_(c)),q=gs(d_(z));if(Ma(d,Y,q)===!1)throw new Error("Couldn't check signature because of address mismatch");const m=ls(d_(h.signature())),G=h.signed_data().to_bytes();return q.verify(G,m)}return!1},Ma=(p,d,t)=>{if(p!==d.to_bech32())return!1;try{return ir(p)===t.hash().to_hex()}catch{return!1}},Ka=p=>{const d=jt.COSEKey.new(jt.Label.from_key_type(jt.KeyType.OKP));return d.set_algorithm_id(jt.Label.from_algorithm_id(jt.AlgorithmId.EdDSA)),d.set_header(jt.Label.new_int(jt.Int.new_negative(jt.BigNum.from_str("1"))),jt.CBORValue.new_int(jt.Int.new_i32(6))),d.set_header(jt.Label.new_int(jt.Int.new_negative(jt.BigNum.from_str("2"))),jt.CBORValue.new_bytes(p.key.to_public().as_bytes())),d},Ha=(p,d)=>{const t=jt.HeaderMap.new(),w=jt.HeaderMap.new();t.set_algorithm_id(jt.Label.from_algorithm_id(jt.AlgorithmId.EdDSA)),t.set_header(jt.Label.new_text("address"),jt.CBORValue.new_bytes(d.address.to_bytes()));const u=jt.Headers.new(jt.ProtectedHeaderMap.new(t),w),h=jt.COSESign1Builder.new(u,kt(p.payload),!1);p.externalAAD!==void 0&&h.set_external_aad(kt(p.externalAAD));const x=h.make_data_to_sign(),B=d.key.sign(x.to_bytes());return h.build(B.to_bytes())};var qn={},s_={exports:{}};Ee.notEqual=Ra;Ee.notOk=za;Ee.equal=qa;Ee.ok=Ee;var Rn=Ee;function qa(p,d,t){Ee(p==d,t)}function Ra(p,d,t){Ee(p!=d,t)}function za(p,d){Ee(!p,d)}function Ee(p,d){if(!p)throw new Error(d||"AssertionError")}var Y_={exports:{}},La=an;an.supported=typeof WebAssembly<"u";function an(p){if(!an.supported)return null;var d=p&&p.imports,t=Va("AGFzbQEAAAABEANgAn9/AGADf39/AGABfwADBQQAAQICBQUBAQroBwdNBQZtZW1vcnkCAAxibGFrZTJiX2luaXQAAA5ibGFrZTJiX3VwZGF0ZQABDWJsYWtlMmJfZmluYWwAAhBibGFrZTJiX2NvbXByZXNzAAMK00AElgMAIABCADcDACAAQQhqQgA3AwAgAEEQakIANwMAIABBGGpCADcDACAAQSBqQgA3AwAgAEEoakIANwMAIABBMGpCADcDACAAQThqQgA3AwAgAEHAAGpCADcDACAAQcgAakIANwMAIABB0ABqQgA3AwAgAEHYAGpCADcDACAAQeAAakIANwMAIABB6ABqQgA3AwAgAEHwAGpCADcDACAAQfgAakIANwMAIABBgAFqQoiS853/zPmE6gBBACkDAIU3AwAgAEGIAWpCu86qptjQ67O7f0EIKQMAhTcDACAAQZABakKr8NP0r+68tzxBECkDAIU3AwAgAEGYAWpC8e30+KWn/aelf0EYKQMAhTcDACAAQaABakLRhZrv+s+Uh9EAQSApAwCFNwMAIABBqAFqQp/Y+dnCkdqCm39BKCkDAIU3AwAgAEGwAWpC6/qG2r+19sEfQTApAwCFNwMAIABBuAFqQvnC+JuRo7Pw2wBBOCkDAIU3AwAgAEHAAWpCADcDACAAQcgBakIANwMAIABB0AFqQgA3AwALbQEDfyAAQcABaiEDIABByAFqIQQgBCkDAKchBQJAA0AgASACRg0BIAVBgAFGBEAgAyADKQMAIAWtfDcDAEEAIQUgABADCyAAIAVqIAEtAAA6AAAgBUEBaiEFIAFBAWohAQwACwsgBCAFrTcDAAtkAQN/IABBwAFqIQEgAEHIAWohAiABIAEpAwAgAikDAHw3AwAgAEHQAWpCfzcDACACKQMApyEDAkADQCADQYABRg0BIAAgA2pBADoAACADQQFqIQMMAAsLIAIgA603AwAgABADC+U7AiB+CX8gAEGAAWohISAAQYgBaiEiIABBkAFqISMgAEGYAWohJCAAQaABaiElIABBqAFqISYgAEGwAWohJyAAQbgBaiEoICEpAwAhASAiKQMAIQIgIykDACEDICQpAwAhBCAlKQMAIQUgJikDACEGICcpAwAhByAoKQMAIQhCiJLznf/M+YTqACEJQrvOqqbY0Ouzu38hCkKr8NP0r+68tzwhC0Lx7fT4paf9p6V/IQxC0YWa7/rPlIfRACENQp/Y+dnCkdqCm38hDkLr+obav7X2wR8hD0L5wvibkaOz8NsAIRAgACkDACERIABBCGopAwAhEiAAQRBqKQMAIRMgAEEYaikDACEUIABBIGopAwAhFSAAQShqKQMAIRYgAEEwaikDACEXIABBOGopAwAhGCAAQcAAaikDACEZIABByABqKQMAIRogAEHQAGopAwAhGyAAQdgAaikDACEcIABB4ABqKQMAIR0gAEHoAGopAwAhHiAAQfAAaikDACEfIABB+ABqKQMAISAgDSAAQcABaikDAIUhDSAPIABB0AFqKQMAhSEPIAEgBSARfHwhASANIAGFQiCKIQ0gCSANfCEJIAUgCYVCGIohBSABIAUgEnx8IQEgDSABhUIQiiENIAkgDXwhCSAFIAmFQj+KIQUgAiAGIBN8fCECIA4gAoVCIIohDiAKIA58IQogBiAKhUIYiiEGIAIgBiAUfHwhAiAOIAKFQhCKIQ4gCiAOfCEKIAYgCoVCP4ohBiADIAcgFXx8IQMgDyADhUIgiiEPIAsgD3whCyAHIAuFQhiKIQcgAyAHIBZ8fCEDIA8gA4VCEIohDyALIA98IQsgByALhUI/iiEHIAQgCCAXfHwhBCAQIASFQiCKIRAgDCAQfCEMIAggDIVCGIohCCAEIAggGHx8IQQgECAEhUIQiiEQIAwgEHwhDCAIIAyFQj+KIQggASAGIBl8fCEBIBAgAYVCIIohECALIBB8IQsgBiALhUIYiiEGIAEgBiAafHwhASAQIAGFQhCKIRAgCyAQfCELIAYgC4VCP4ohBiACIAcgG3x8IQIgDSAChUIgiiENIAwgDXwhDCAHIAyFQhiKIQcgAiAHIBx8fCECIA0gAoVCEIohDSAMIA18IQwgByAMhUI/iiEHIAMgCCAdfHwhAyAOIAOFQiCKIQ4gCSAOfCEJIAggCYVCGIohCCADIAggHnx8IQMgDiADhUIQiiEOIAkgDnwhCSAIIAmFQj+KIQggBCAFIB98fCEEIA8gBIVCIIohDyAKIA98IQogBSAKhUIYiiEFIAQgBSAgfHwhBCAPIASFQhCKIQ8gCiAPfCEKIAUgCoVCP4ohBSABIAUgH3x8IQEgDSABhUIgiiENIAkgDXwhCSAFIAmFQhiKIQUgASAFIBt8fCEBIA0gAYVCEIohDSAJIA18IQkgBSAJhUI/iiEFIAIgBiAVfHwhAiAOIAKFQiCKIQ4gCiAOfCEKIAYgCoVCGIohBiACIAYgGXx8IQIgDiAChUIQiiEOIAogDnwhCiAGIAqFQj+KIQYgAyAHIBp8fCEDIA8gA4VCIIohDyALIA98IQsgByALhUIYiiEHIAMgByAgfHwhAyAPIAOFQhCKIQ8gCyAPfCELIAcgC4VCP4ohByAEIAggHnx8IQQgECAEhUIgiiEQIAwgEHwhDCAIIAyFQhiKIQggBCAIIBd8fCEEIBAgBIVCEIohECAMIBB8IQwgCCAMhUI/iiEIIAEgBiASfHwhASAQIAGFQiCKIRAgCyAQfCELIAYgC4VCGIohBiABIAYgHXx8IQEgECABhUIQiiEQIAsgEHwhCyAGIAuFQj+KIQYgAiAHIBF8fCECIA0gAoVCIIohDSAMIA18IQwgByAMhUIYiiEHIAIgByATfHwhAiANIAKFQhCKIQ0gDCANfCEMIAcgDIVCP4ohByADIAggHHx8IQMgDiADhUIgiiEOIAkgDnwhCSAIIAmFQhiKIQggAyAIIBh8fCEDIA4gA4VCEIohDiAJIA58IQkgCCAJhUI/iiEIIAQgBSAWfHwhBCAPIASFQiCKIQ8gCiAPfCEKIAUgCoVCGIohBSAEIAUgFHx8IQQgDyAEhUIQiiEPIAogD3whCiAFIAqFQj+KIQUgASAFIBx8fCEBIA0gAYVCIIohDSAJIA18IQkgBSAJhUIYiiEFIAEgBSAZfHwhASANIAGFQhCKIQ0gCSANfCEJIAUgCYVCP4ohBSACIAYgHXx8IQIgDiAChUIgiiEOIAogDnwhCiAGIAqFQhiKIQYgAiAGIBF8fCECIA4gAoVCEIohDiAKIA58IQogBiAKhUI/iiEGIAMgByAWfHwhAyAPIAOFQiCKIQ8gCyAPfCELIAcgC4VCGIohByADIAcgE3x8IQMgDyADhUIQiiEPIAsgD3whCyAHIAuFQj+KIQcgBCAIICB8fCEEIBAgBIVCIIohECAMIBB8IQwgCCAMhUIYiiEIIAQgCCAefHwhBCAQIASFQhCKIRAgDCAQfCEMIAggDIVCP4ohCCABIAYgG3x8IQEgECABhUIgiiEQIAsgEHwhCyAGIAuFQhiKIQYgASAGIB98fCEBIBAgAYVCEIohECALIBB8IQsgBiALhUI/iiEGIAIgByAUfHwhAiANIAKFQiCKIQ0gDCANfCEMIAcgDIVCGIohByACIAcgF3x8IQIgDSAChUIQiiENIAwgDXwhDCAHIAyFQj+KIQcgAyAIIBh8fCEDIA4gA4VCIIohDiAJIA58IQkgCCAJhUIYiiEIIAMgCCASfHwhAyAOIAOFQhCKIQ4gCSAOfCEJIAggCYVCP4ohCCAEIAUgGnx8IQQgDyAEhUIgiiEPIAogD3whCiAFIAqFQhiKIQUgBCAFIBV8fCEEIA8gBIVCEIohDyAKIA98IQogBSAKhUI/iiEFIAEgBSAYfHwhASANIAGFQiCKIQ0gCSANfCEJIAUgCYVCGIohBSABIAUgGnx8IQEgDSABhUIQiiENIAkgDXwhCSAFIAmFQj+KIQUgAiAGIBR8fCECIA4gAoVCIIohDiAKIA58IQogBiAKhUIYiiEGIAIgBiASfHwhAiAOIAKFQhCKIQ4gCiAOfCEKIAYgCoVCP4ohBiADIAcgHnx8IQMgDyADhUIgiiEPIAsgD3whCyAHIAuFQhiKIQcgAyAHIB18fCEDIA8gA4VCEIohDyALIA98IQsgByALhUI/iiEHIAQgCCAcfHwhBCAQIASFQiCKIRAgDCAQfCEMIAggDIVCGIohCCAEIAggH3x8IQQgECAEhUIQiiEQIAwgEHwhDCAIIAyFQj+KIQggASAGIBN8fCEBIBAgAYVCIIohECALIBB8IQsgBiALhUIYiiEGIAEgBiAXfHwhASAQIAGFQhCKIRAgCyAQfCELIAYgC4VCP4ohBiACIAcgFnx8IQIgDSAChUIgiiENIAwgDXwhDCAHIAyFQhiKIQcgAiAHIBt8fCECIA0gAoVCEIohDSAMIA18IQwgByAMhUI/iiEHIAMgCCAVfHwhAyAOIAOFQiCKIQ4gCSAOfCEJIAggCYVCGIohCCADIAggEXx8IQMgDiADhUIQiiEOIAkgDnwhCSAIIAmFQj+KIQggBCAFICB8fCEEIA8gBIVCIIohDyAKIA98IQogBSAKhUIYiiEFIAQgBSAZfHwhBCAPIASFQhCKIQ8gCiAPfCEKIAUgCoVCP4ohBSABIAUgGnx8IQEgDSABhUIgiiENIAkgDXwhCSAFIAmFQhiKIQUgASAFIBF8fCEBIA0gAYVCEIohDSAJIA18IQkgBSAJhUI/iiEFIAIgBiAWfHwhAiAOIAKFQiCKIQ4gCiAOfCEKIAYgCoVCGIohBiACIAYgGHx8IQIgDiAChUIQiiEOIAogDnwhCiAGIAqFQj+KIQYgAyAHIBN8fCEDIA8gA4VCIIohDyALIA98IQsgByALhUIYiiEHIAMgByAVfHwhAyAPIAOFQhCKIQ8gCyAPfCELIAcgC4VCP4ohByAEIAggG3x8IQQgECAEhUIgiiEQIAwgEHwhDCAIIAyFQhiKIQggBCAIICB8fCEEIBAgBIVCEIohECAMIBB8IQwgCCAMhUI/iiEIIAEgBiAffHwhASAQIAGFQiCKIRAgCyAQfCELIAYgC4VCGIohBiABIAYgEnx8IQEgECABhUIQiiEQIAsgEHwhCyAGIAuFQj+KIQYgAiAHIBx8fCECIA0gAoVCIIohDSAMIA18IQwgByAMhUIYiiEHIAIgByAdfHwhAiANIAKFQhCKIQ0gDCANfCEMIAcgDIVCP4ohByADIAggF3x8IQMgDiADhUIgiiEOIAkgDnwhCSAIIAmFQhiKIQggAyAIIBl8fCEDIA4gA4VCEIohDiAJIA58IQkgCCAJhUI/iiEIIAQgBSAUfHwhBCAPIASFQiCKIQ8gCiAPfCEKIAUgCoVCGIohBSAEIAUgHnx8IQQgDyAEhUIQiiEPIAogD3whCiAFIAqFQj+KIQUgASAFIBN8fCEBIA0gAYVCIIohDSAJIA18IQkgBSAJhUIYiiEFIAEgBSAdfHwhASANIAGFQhCKIQ0gCSANfCEJIAUgCYVCP4ohBSACIAYgF3x8IQIgDiAChUIgiiEOIAogDnwhCiAGIAqFQhiKIQYgAiAGIBt8fCECIA4gAoVCEIohDiAKIA58IQogBiAKhUI/iiEGIAMgByARfHwhAyAPIAOFQiCKIQ8gCyAPfCELIAcgC4VCGIohByADIAcgHHx8IQMgDyADhUIQiiEPIAsgD3whCyAHIAuFQj+KIQcgBCAIIBl8fCEEIBAgBIVCIIohECAMIBB8IQwgCCAMhUIYiiEIIAQgCCAUfHwhBCAQIASFQhCKIRAgDCAQfCEMIAggDIVCP4ohCCABIAYgFXx8IQEgECABhUIgiiEQIAsgEHwhCyAGIAuFQhiKIQYgASAGIB58fCEBIBAgAYVCEIohECALIBB8IQsgBiALhUI/iiEGIAIgByAYfHwhAiANIAKFQiCKIQ0gDCANfCEMIAcgDIVCGIohByACIAcgFnx8IQIgDSAChUIQiiENIAwgDXwhDCAHIAyFQj+KIQcgAyAIICB8fCEDIA4gA4VCIIohDiAJIA58IQkgCCAJhUIYiiEIIAMgCCAffHwhAyAOIAOFQhCKIQ4gCSAOfCEJIAggCYVCP4ohCCAEIAUgEnx8IQQgDyAEhUIgiiEPIAogD3whCiAFIAqFQhiKIQUgBCAFIBp8fCEEIA8gBIVCEIohDyAKIA98IQogBSAKhUI/iiEFIAEgBSAdfHwhASANIAGFQiCKIQ0gCSANfCEJIAUgCYVCGIohBSABIAUgFnx8IQEgDSABhUIQiiENIAkgDXwhCSAFIAmFQj+KIQUgAiAGIBJ8fCECIA4gAoVCIIohDiAKIA58IQogBiAKhUIYiiEGIAIgBiAgfHwhAiAOIAKFQhCKIQ4gCiAOfCEKIAYgCoVCP4ohBiADIAcgH3x8IQMgDyADhUIgiiEPIAsgD3whCyAHIAuFQhiKIQcgAyAHIB58fCEDIA8gA4VCEIohDyALIA98IQsgByALhUI/iiEHIAQgCCAVfHwhBCAQIASFQiCKIRAgDCAQfCEMIAggDIVCGIohCCAEIAggG3x8IQQgECAEhUIQiiEQIAwgEHwhDCAIIAyFQj+KIQggASAGIBF8fCEBIBAgAYVCIIohECALIBB8IQsgBiALhUIYiiEGIAEgBiAYfHwhASAQIAGFQhCKIRAgCyAQfCELIAYgC4VCP4ohBiACIAcgF3x8IQIgDSAChUIgiiENIAwgDXwhDCAHIAyFQhiKIQcgAiAHIBR8fCECIA0gAoVCEIohDSAMIA18IQwgByAMhUI/iiEHIAMgCCAafHwhAyAOIAOFQiCKIQ4gCSAOfCEJIAggCYVCGIohCCADIAggE3x8IQMgDiADhUIQiiEOIAkgDnwhCSAIIAmFQj+KIQggBCAFIBl8fCEEIA8gBIVCIIohDyAKIA98IQogBSAKhUIYiiEFIAQgBSAcfHwhBCAPIASFQhCKIQ8gCiAPfCEKIAUgCoVCP4ohBSABIAUgHnx8IQEgDSABhUIgiiENIAkgDXwhCSAFIAmFQhiKIQUgASAFIBx8fCEBIA0gAYVCEIohDSAJIA18IQkgBSAJhUI/iiEFIAIgBiAYfHwhAiAOIAKFQiCKIQ4gCiAOfCEKIAYgCoVCGIohBiACIAYgH3x8IQIgDiAChUIQiiEOIAogDnwhCiAGIAqFQj+KIQYgAyAHIB18fCEDIA8gA4VCIIohDyALIA98IQsgByALhUIYiiEHIAMgByASfHwhAyAPIAOFQhCKIQ8gCyAPfCELIAcgC4VCP4ohByAEIAggFHx8IQQgECAEhUIgiiEQIAwgEHwhDCAIIAyFQhiKIQggBCAIIBp8fCEEIBAgBIVCEIohECAMIBB8IQwgCCAMhUI/iiEIIAEgBiAWfHwhASAQIAGFQiCKIRAgCyAQfCELIAYgC4VCGIohBiABIAYgEXx8IQEgECABhUIQiiEQIAsgEHwhCyAGIAuFQj+KIQYgAiAHICB8fCECIA0gAoVCIIohDSAMIA18IQwgByAMhUIYiiEHIAIgByAVfHwhAiANIAKFQhCKIQ0gDCANfCEMIAcgDIVCP4ohByADIAggGXx8IQMgDiADhUIgiiEOIAkgDnwhCSAIIAmFQhiKIQggAyAIIBd8fCEDIA4gA4VCEIohDiAJIA58IQkgCCAJhUI/iiEIIAQgBSATfHwhBCAPIASFQiCKIQ8gCiAPfCEKIAUgCoVCGIohBSAEIAUgG3x8IQQgDyAEhUIQiiEPIAogD3whCiAFIAqFQj+KIQUgASAFIBd8fCEBIA0gAYVCIIohDSAJIA18IQkgBSAJhUIYiiEFIAEgBSAgfHwhASANIAGFQhCKIQ0gCSANfCEJIAUgCYVCP4ohBSACIAYgH3x8IQIgDiAChUIgiiEOIAogDnwhCiAGIAqFQhiKIQYgAiAGIBp8fCECIA4gAoVCEIohDiAKIA58IQogBiAKhUI/iiEGIAMgByAcfHwhAyAPIAOFQiCKIQ8gCyAPfCELIAcgC4VCGIohByADIAcgFHx8IQMgDyADhUIQiiEPIAsgD3whCyAHIAuFQj+KIQcgBCAIIBF8fCEEIBAgBIVCIIohECAMIBB8IQwgCCAMhUIYiiEIIAQgCCAZfHwhBCAQIASFQhCKIRAgDCAQfCEMIAggDIVCP4ohCCABIAYgHXx8IQEgECABhUIgiiEQIAsgEHwhCyAGIAuFQhiKIQYgASAGIBN8fCEBIBAgAYVCEIohECALIBB8IQsgBiALhUI/iiEGIAIgByAefHwhAiANIAKFQiCKIQ0gDCANfCEMIAcgDIVCGIohByACIAcgGHx8IQIgDSAChUIQiiENIAwgDXwhDCAHIAyFQj+KIQcgAyAIIBJ8fCEDIA4gA4VCIIohDiAJIA58IQkgCCAJhUIYiiEIIAMgCCAVfHwhAyAOIAOFQhCKIQ4gCSAOfCEJIAggCYVCP4ohCCAEIAUgG3x8IQQgDyAEhUIgiiEPIAogD3whCiAFIAqFQhiKIQUgBCAFIBZ8fCEEIA8gBIVCEIohDyAKIA98IQogBSAKhUI/iiEFIAEgBSAbfHwhASANIAGFQiCKIQ0gCSANfCEJIAUgCYVCGIohBSABIAUgE3x8IQEgDSABhUIQiiENIAkgDXwhCSAFIAmFQj+KIQUgAiAGIBl8fCECIA4gAoVCIIohDiAKIA58IQogBiAKhUIYiiEGIAIgBiAVfHwhAiAOIAKFQhCKIQ4gCiAOfCEKIAYgCoVCP4ohBiADIAcgGHx8IQMgDyADhUIgiiEPIAsgD3whCyAHIAuFQhiKIQcgAyAHIBd8fCEDIA8gA4VCEIohDyALIA98IQsgByALhUI/iiEHIAQgCCASfHwhBCAQIASFQiCKIRAgDCAQfCEMIAggDIVCGIohCCAEIAggFnx8IQQgECAEhUIQiiEQIAwgEHwhDCAIIAyFQj+KIQggASAGICB8fCEBIBAgAYVCIIohECALIBB8IQsgBiALhUIYiiEGIAEgBiAcfHwhASAQIAGFQhCKIRAgCyAQfCELIAYgC4VCP4ohBiACIAcgGnx8IQIgDSAChUIgiiENIAwgDXwhDCAHIAyFQhiKIQcgAiAHIB98fCECIA0gAoVCEIohDSAMIA18IQwgByAMhUI/iiEHIAMgCCAUfHwhAyAOIAOFQiCKIQ4gCSAOfCEJIAggCYVCGIohCCADIAggHXx8IQMgDiADhUIQiiEOIAkgDnwhCSAIIAmFQj+KIQggBCAFIB58fCEEIA8gBIVCIIohDyAKIA98IQogBSAKhUIYiiEFIAQgBSARfHwhBCAPIASFQhCKIQ8gCiAPfCEKIAUgCoVCP4ohBSABIAUgEXx8IQEgDSABhUIgiiENIAkgDXwhCSAFIAmFQhiKIQUgASAFIBJ8fCEBIA0gAYVCEIohDSAJIA18IQkgBSAJhUI/iiEFIAIgBiATfHwhAiAOIAKFQiCKIQ4gCiAOfCEKIAYgCoVCGIohBiACIAYgFHx8IQIgDiAChUIQiiEOIAogDnwhCiAGIAqFQj+KIQYgAyAHIBV8fCEDIA8gA4VCIIohDyALIA98IQsgByALhUIYiiEHIAMgByAWfHwhAyAPIAOFQhCKIQ8gCyAPfCELIAcgC4VCP4ohByAEIAggF3x8IQQgECAEhUIgiiEQIAwgEHwhDCAIIAyFQhiKIQggBCAIIBh8fCEEIBAgBIVCEIohECAMIBB8IQwgCCAMhUI/iiEIIAEgBiAZfHwhASAQIAGFQiCKIRAgCyAQfCELIAYgC4VCGIohBiABIAYgGnx8IQEgECABhUIQiiEQIAsgEHwhCyAGIAuFQj+KIQYgAiAHIBt8fCECIA0gAoVCIIohDSAMIA18IQwgByAMhUIYiiEHIAIgByAcfHwhAiANIAKFQhCKIQ0gDCANfCEMIAcgDIVCP4ohByADIAggHXx8IQMgDiADhUIgiiEOIAkgDnwhCSAIIAmFQhiKIQggAyAIIB58fCEDIA4gA4VCEIohDiAJIA58IQkgCCAJhUI/iiEIIAQgBSAffHwhBCAPIASFQiCKIQ8gCiAPfCEKIAUgCoVCGIohBSAEIAUgIHx8IQQgDyAEhUIQiiEPIAogD3whCiAFIAqFQj+KIQUgASAFIB98fCEBIA0gAYVCIIohDSAJIA18IQkgBSAJhUIYiiEFIAEgBSAbfHwhASANIAGFQhCKIQ0gCSANfCEJIAUgCYVCP4ohBSACIAYgFXx8IQIgDiAChUIgiiEOIAogDnwhCiAGIAqFQhiKIQYgAiAGIBl8fCECIA4gAoVCEIohDiAKIA58IQogBiAKhUI/iiEGIAMgByAafHwhAyAPIAOFQiCKIQ8gCyAPfCELIAcgC4VCGIohByADIAcgIHx8IQMgDyADhUIQiiEPIAsgD3whCyAHIAuFQj+KIQcgBCAIIB58fCEEIBAgBIVCIIohECAMIBB8IQwgCCAMhUIYiiEIIAQgCCAXfHwhBCAQIASFQhCKIRAgDCAQfCEMIAggDIVCP4ohCCABIAYgEnx8IQEgECABhUIgiiEQIAsgEHwhCyAGIAuFQhiKIQYgASAGIB18fCEBIBAgAYVCEIohECALIBB8IQsgBiALhUI/iiEGIAIgByARfHwhAiANIAKFQiCKIQ0gDCANfCEMIAcgDIVCGIohByACIAcgE3x8IQIgDSAChUIQiiENIAwgDXwhDCAHIAyFQj+KIQcgAyAIIBx8fCEDIA4gA4VCIIohDiAJIA58IQkgCCAJhUIYiiEIIAMgCCAYfHwhAyAOIAOFQhCKIQ4gCSAOfCEJIAggCYVCP4ohCCAEIAUgFnx8IQQgDyAEhUIgiiEPIAogD3whCiAFIAqFQhiKIQUgBCAFIBR8fCEEIA8gBIVCEIohDyAKIA98IQogBSAKhUI/iiEFICEgISkDACABIAmFhTcDACAiICIpAwAgAiAKhYU3AwAgIyAjKQMAIAMgC4WFNwMAICQgJCkDACAEIAyFhTcDACAlICUpAwAgBSANhYU3AwAgJiAmKQMAIAYgDoWFNwMAICcgJykDACAHIA+FhTcDACAoICgpAwAgCCAQhYU3AwAL"),w=null,u={buffer:t,memory:null,exports:null,realloc:h,onload:x};return x(function(){}),u;function h(P){u.exports.memory.grow(Math.ceil(Math.abs(P-u.memory.length)/65536)),u.memory=new Uint8Array(u.exports.memory.buffer)}function x(P){if(u.exports)return P();if(w){w.then(P.bind(null,null)).catch(P);return}try{if(p&&p.async)throw new Error("async");B({instance:new WebAssembly.Instance(new WebAssembly.Module(t),d)})}catch{w=WebAssembly.instantiate(t,d).then(B)}x(P)}function B(P){u.exports=P.instance.exports,u.memory=u.exports.memory&&u.exports.memory.buffer&&new Uint8Array(u.exports.memory.buffer)}}function Va(p){return typeof atob=="function"?new Uint8Array(atob(p).split("").map(Ya)):new(Jr("buffer")).Buffer(p,"base64")}function Ya(p){return p.charCodeAt(0)}var q_=Rn,Tt=La(),je=64,Ur=[];Y_.exports=v_;var bn=Y_.exports.BYTES_MIN=16,un=Y_.exports.BYTES_MAX=64;Y_.exports.BYTES=32;var fn=Y_.exports.KEYBYTES_MIN=16,hn=Y_.exports.KEYBYTES_MAX=64;Y_.exports.KEYBYTES=32;var yn=Y_.exports.SALTBYTES=16,vn=Y_.exports.PERSONALBYTES=16;function v_(p,d,t,w,u){if(!(this instanceof v_))return new v_(p,d,t,w,u);if(!(Tt&&Tt.exports))throw new Error("WASM not loaded. Wait for Blake2b.ready(cb)");p||(p=32),u!==!0&&(q_(p>=bn,"digestLength must be at least "+bn+", was given "+p),q_(p<=un,"digestLength must be at most "+un+", was given "+p),d!=null&&q_(d.length>=fn,"key must be at least "+fn+", was given "+d.length),d!=null&&q_(d.length<=hn,"key must be at least "+hn+", was given "+d.length),t!=null&&q_(t.length===yn,"salt must be exactly "+yn+", was given "+t.length),w!=null&&q_(w.length===vn,"personal must be exactly "+vn+", was given "+w.length)),Ur.length||(Ur.push(je),je+=216),this.digestLength=p,this.finalized=!1,this.pointer=Ur.pop(),Tt.memory.fill(0,0,64),Tt.memory[0]=this.digestLength,Tt.memory[1]=d?d.length:0,Tt.memory[2]=1,Tt.memory[3]=1,t&&Tt.memory.set(t,32),w&&Tt.memory.set(w,48),this.pointer+216>Tt.memory.length&&Tt.realloc(this.pointer+216),Tt.exports.blake2b_init(this.pointer,this.digestLength),d&&(this.update(d),Tt.memory.fill(0,je,je+d.length),Tt.memory[this.pointer+200]=128)}v_.prototype.update=function(p){return q_(this.finalized===!1,"Hash instance finalized"),q_(p,"input must be TypedArray or Buffer"),je+p.length>Tt.memory.length&&Tt.realloc(je+p.length),Tt.memory.set(p,je),Tt.exports.blake2b_update(this.pointer,je,je+p.length),this};v_.prototype.digest=function(p){if(q_(this.finalized===!1,"Hash instance finalized"),this.finalized=!0,Ur.push(this.pointer),Tt.exports.blake2b_final(this.pointer),!p||p==="binary")return Tt.memory.slice(this.pointer+128,this.pointer+128+this.digestLength);if(p==="hex")return $a(Tt.memory,this.pointer+128,this.digestLength);q_(p.length>=this.digestLength,"input must be TypedArray or Buffer");for(var d=0;d<this.digestLength;d++)p[d]=Tt.memory[this.pointer+128+d];return p};v_.prototype.final=v_.prototype.digest;v_.WASM=Tt&&Tt.buffer;v_.SUPPORTED=typeof WebAssembly<"u";v_.ready=function(p){if(p||(p=Ga),!Tt)return p(new Error("WebAssembly not supported"));var d=new Promise(function(t,w){Tt.onload(function(u){u?w():t(),p(u)})});return d};v_.prototype.ready=v_.ready;function Ga(){}function $a(p,d,t){for(var w="",u=0;u<t;u++)w+=Ja(p[d+u]);return w}function Ja(p){return p<16?"0"+p.toString(16):p.toString(16)}var He=Rn,kr=Y_.exports;function Qr(p,d,t){var w=p[d]+p[t],u=p[d+1]+p[t+1];w>=4294967296&&u++,p[d]=w,p[d+1]=u}function mn(p,d,t,w){var u=p[d]+t;t<0&&(u+=4294967296);var h=p[d+1]+w;u>=4294967296&&h++,p[d]=u,p[d+1]=h}function zn(p,d){return p[d]^p[d+1]<<8^p[d+2]<<16^p[d+3]<<24}function Me(p,d,t,w,u,h){var x=yr[u],B=yr[u+1],P=yr[h],c=yr[h+1];Qr(lt,p,d),mn(lt,p,x,B);var z=lt[w]^lt[p],Y=lt[w+1]^lt[p+1];lt[w]=Y,lt[w+1]=z,Qr(lt,t,w),z=lt[d]^lt[t],Y=lt[d+1]^lt[t+1],lt[d]=z>>>24^Y<<8,lt[d+1]=Y>>>24^z<<8,Qr(lt,p,d),mn(lt,p,P,c),z=lt[w]^lt[p],Y=lt[w+1]^lt[p+1],lt[w]=z>>>16^Y<<16,lt[w+1]=Y>>>16^z<<16,Qr(lt,t,w),z=lt[d]^lt[t],Y=lt[d+1]^lt[t+1],lt[d]=Y>>>31^z<<1,lt[d+1]=z>>>31^Y<<1}var Ln=new Uint32Array([4089235720,1779033703,2227873595,3144134277,4271175723,1013904242,1595750129,2773480762,2917565137,1359893119,725511199,2600822924,4215389547,528734635,327033209,1541459225]),Wa=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,14,10,4,8,9,15,13,6,1,12,0,2,11,7,5,3,11,8,12,0,5,2,15,13,10,14,3,6,7,1,9,4,7,9,3,1,13,12,11,14,2,6,5,10,4,0,15,8,9,0,5,7,2,4,10,15,14,1,11,12,6,8,3,13,2,12,6,10,0,11,8,3,4,13,7,5,15,14,1,9,12,5,1,15,14,13,4,10,0,7,6,3,9,2,8,11,13,11,7,14,12,1,3,9,5,0,15,4,8,6,2,10,6,15,14,9,11,3,0,8,12,2,13,7,1,4,10,5,10,2,8,4,7,6,1,5,15,11,9,14,3,12,13,0,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,14,10,4,8,9,15,13,6,1,12,0,2,11,7,5,3],t_=new Uint8Array(Wa.map(function(p){return p*2})),lt=new Uint32Array(32),yr=new Uint32Array(32);function Vn(p,d){var t=0;for(t=0;t<16;t++)lt[t]=p.h[t],lt[t+16]=Ln[t];for(lt[24]=lt[24]^p.t,lt[25]=lt[25]^p.t/4294967296,d&&(lt[28]=~lt[28],lt[29]=~lt[29]),t=0;t<32;t++)yr[t]=zn(p.b,4*t);for(t=0;t<12;t++)Me(0,8,16,24,t_[t*16+0],t_[t*16+1]),Me(2,10,18,26,t_[t*16+2],t_[t*16+3]),Me(4,12,20,28,t_[t*16+4],t_[t*16+5]),Me(6,14,22,30,t_[t*16+6],t_[t*16+7]),Me(0,10,20,30,t_[t*16+8],t_[t*16+9]),Me(2,12,22,24,t_[t*16+10],t_[t*16+11]),Me(4,14,16,26,t_[t*16+12],t_[t*16+13]),Me(6,8,18,28,t_[t*16+14],t_[t*16+15]);for(t=0;t<16;t++)p.h[t]=p.h[t]^lt[t]^lt[t+16]}var Ke=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]);function pr(p,d,t,w){Ke.fill(0),this.b=new Uint8Array(128),this.h=new Uint32Array(16),this.t=0,this.c=0,this.outlen=p,Ke[0]=p,d&&(Ke[1]=d.length),Ke[2]=1,Ke[3]=1,t&&Ke.set(t,32),w&&Ke.set(w,48);for(var u=0;u<16;u++)this.h[u]=Ln[u]^zn(Ke,u*4);d&&(Yn(this,d),this.c=128)}pr.prototype.update=function(p){return He(p!=null,"input must be Uint8Array or Buffer"),Yn(this,p),this};pr.prototype.digest=function(p){var d=!p||p==="binary"||p==="hex"?new Uint8Array(this.outlen):p;return He(d.length>=this.outlen,"out must have at least outlen bytes of space"),Xa(this,d),p==="hex"?Za(d):d};pr.prototype.final=pr.prototype.digest;pr.ready=function(p){kr.ready(function(){p()})};function Yn(p,d){for(var t=0;t<d.length;t++)p.c===128&&(p.t+=p.c,Vn(p,!1),p.c=0),p.b[p.c++]=d[t]}function Xa(p,d){for(p.t+=p.c;p.c<128;)p.b[p.c++]=0;Vn(p,!0);for(var t=0;t<p.outlen;t++)d[t]=p.h[t>>2]>>8*(t&3);return d}function Za(p){for(var d="",t=0;t<p.length;t++)d+=ts(p[t]);return d}function ts(p){return p<16?"0"+p.toString(16):p.toString(16)}var Gn=pr;s_.exports=function(d,t,w,u,h){return h!==!0&&(He(d>=kn,"outlen must be at least "+kn+", was given "+d),He(d<=xn,"outlen must be at most "+xn+", was given "+d),t!=null&&He(t.length>=An,"key must be at least "+An+", was given "+t.length),t!=null&&He(t.length<=In,"key must be at most "+In+", was given "+t.length),w!=null&&He(w.length===Cn,"salt must be exactly "+Cn+", was given "+w.length),u!=null&&He(u.length===jn,"personal must be exactly "+jn+", was given "+u.length)),new Gn(d,t,w,u)};s_.exports.ready=function(p){kr.ready(function(){p()})};s_.exports.WASM_SUPPORTED=kr.SUPPORTED;s_.exports.WASM_LOADED=!1;var kn=s_.exports.BYTES_MIN=16,xn=s_.exports.BYTES_MAX=64;s_.exports.BYTES=32;var An=s_.exports.KEYBYTES_MIN=16,In=s_.exports.KEYBYTES_MAX=64;s_.exports.KEYBYTES=32;var Cn=s_.exports.SALTBYTES=16,jn=s_.exports.PERSONALBYTES=16;kr.ready(function(p){p||(s_.exports.WASM_LOADED=!0,Gn=kr)});var wr={};Object.defineProperty(wr,"__esModule",{value:!0});wr.bech32m=wr.bech32=void 0;const Hr="qpzry9x8gf2tvdw0s3jn54khce6mua7l",$n={};for(let p=0;p<Hr.length;p++){const d=Hr.charAt(p);$n[d]=p}function dr(p){const d=p>>25;return(p&33554431)<<5^-(d>>0&1)&996825010^-(d>>1&1)&642813549^-(d>>2&1)&513874426^-(d>>3&1)&1027748829^-(d>>4&1)&705979059}function Bn(p){let d=1;for(let t=0;t<p.length;++t){const w=p.charCodeAt(t);if(w<33||w>126)return"Invalid prefix ("+p+")";d=dr(d)^w>>5}d=dr(d);for(let t=0;t<p.length;++t){const w=p.charCodeAt(t);d=dr(d)^w&31}return d}function sn(p,d,t,w){let u=0,h=0;const x=(1<<t)-1,B=[];for(let P=0;P<p.length;++P)for(u=u<<d|p[P],h+=d;h>=t;)h-=t,B.push(u>>h&x);if(w)h>0&&B.push(u<<t-h&x);else{if(h>=d)return"Excess padding";if(u<<t-h&x)return"Non-zero padding"}return B}function _s(p){return sn(p,8,5,!0)}function es(p){const d=sn(p,5,8,!1);if(Array.isArray(d))return d}function rs(p){const d=sn(p,5,8,!1);if(Array.isArray(d))return d;throw new Error(d)}function Jn(p){let d;p==="bech32"?d=1:d=734539939;function t(x,B,P){if(P=P||90,x.length+7+B.length>P)throw new TypeError("Exceeds length limit");x=x.toLowerCase();let c=Bn(x);if(typeof c=="string")throw new Error(c);let z=x+"1";for(let Y=0;Y<B.length;++Y){const q=B[Y];if(q>>5!==0)throw new Error("Non 5-bit word");c=dr(c)^q,z+=Hr.charAt(q)}for(let Y=0;Y<6;++Y)c=dr(c);c^=d;for(let Y=0;Y<6;++Y){const q=c>>(5-Y)*5&31;z+=Hr.charAt(q)}return z}function w(x,B){if(B=B||90,x.length<8)return x+" too short";if(x.length>B)return"Exceeds length limit";const P=x.toLowerCase(),c=x.toUpperCase();if(x!==P&&x!==c)return"Mixed-case string "+x;x=P;const z=x.lastIndexOf("1");if(z===-1)return"No separator character for "+x;if(z===0)return"Missing prefix for "+x;const Y=x.slice(0,z),q=x.slice(z+1);if(q.length<6)return"Data too short";let m=Bn(Y);if(typeof m=="string")return m;const G=[];for(let b=0;b<q.length;++b){const tt=q.charAt(b),X=$n[tt];if(X===void 0)return"Unknown character "+tt;m=dr(m)^X,!(b+6>=q.length)&&G.push(X)}return m!==d?"Invalid checksum for "+x:{prefix:Y,words:G}}function u(x,B){const P=w(x,B);if(typeof P=="object")return P}function h(x,B){const P=w(x,B);if(typeof P=="object")return P;throw new Error(P)}return{decodeUnsafe:u,decode:h,encode:t,toWords:_s,fromWordsUnsafe:es,fromWords:rs}}wr.bech32=Jn("bech32");wr.bech32m=Jn("bech32m");var ns=Mr&&Mr.__importDefault||function(p){return p&&p.__esModule?p:{default:p}};Object.defineProperty(qn,"__esModule",{value:!0});const as=ns(s_.exports),Or=wr,Gr="asset";class vr{constructor(d){this.hashBuf=d}static fromHash(d){return new vr(d)}static fromParts(d,t){const w=(0,as.default)(20).update(new Uint8Array([...d,...t])).digest("binary");return vr.fromHash(w)}static fromBech32(d){const{prefix:t,words:w}=Or.bech32.decode(d);if(t!==Gr)throw new Error("Invalid asset fingerprint");const u=Buffer.from(Or.bech32.fromWords(w));return vr.fromHash(u)}fingerprint(){const d=Or.bech32.toWords(this.hashBuf);return Or.bech32.encode(Gr,d)}hash(){return Buffer.from(this.hashBuf).toString("hex")}prefix(){return Gr}checksum(){return this.fingerprint().slice(-6)}}var ss=qn.default=vr;const os=ss,is=(p,d)=>{const t=ps(p),w=t.derive(Yr+1852).derive(Yr+1815).derive(Yr+d),u=w.derive(0).derive(0).to_raw_key(),h=w.derive(2).derive(0).to_raw_key();return w.free(),t.free(),{paymentKey:u,stakeKey:h}},ds=(p,d,t)=>{const w=new Map(d);w.set("lovelace",String(Number(w.get("lovelace"))+Number(t)));const u=new Map;for(let q=0;q<p.length;q++)u.set(q,p[q]);const h=new Set,x=new Set,B=new Set,P=new Set,c=new Set;for(let q=0;q<p.length;q++)switch(p[q].output.amount.length){case 1:{x.add(q);break}case 2:{B.add(q);break}case 3:{P.add(q);break}default:{c.add(q);break}}const z=(q,m,G)=>{const b=u.get(q);if(!b)return;const tt=cs(b,m);if(Number(tt)>0){h.add(q),G.delete(q);for(const X of b.output.amount)w.set(X.unit,String(Number(w.get(X.unit))-Number(X.quantity)))}};for(const q of w.keys())if(q!="lovelace"){for(const m of B){const G=w.get(q);if(!G||Number(G)<=0)break;z(m,q,B)}for(const m of P){const G=w.get(q);if(!G||Number(G)<=0)break;z(m,q,P)}for(const m of c){const G=w.get(q);if(!G||Number(G)<=0)break;z(m,q,c)}}for(const q of x){const m=w.get("lovelace");if(!m||Number(m)<=0)break;z(q,"lovelace",x)}for(const q of B){const m=w.get("lovelace");if(!m||Number(m)<=0)break;z(q,"lovelace",B)}for(const q of P){const m=w.get("lovelace");if(!m||Number(m)<=0)break;z(q,"lovelace",P)}for(const q of c){const m=w.get("lovelace");if(!m||Number(m)<=0)break;z(q,"lovelace",c)}for(const q of w.keys())if(Number(w.get(q))>0)return[];const Y=[];for(const q of h){const m=u.get(q);m&&Y.push(m)}return Y},cs=(p,d)=>{for(const t of p.output.amount)if(t.unit==d)return t.quantity;return"0"},sr=p=>y.exports.Address.from_bytes(kt(p)),ps=p=>y.exports.Bip32PrivateKey.from_bytes(kt(p)),ws=p=>y.exports.DataHash.from_bytes(kt(p)),z_=p=>y.exports.Ed25519KeyHash.from_bytes(kt(p)),ls=p=>y.exports.Ed25519Signature.from_bytes(kt(p)),zr=p=>y.exports.NativeScript.from_bytes(kt(p)),gs=p=>y.exports.PublicKey.from_bytes(kt(p)),Wn=p=>y.exports.PlutusData.from_bytes(kt(p)),lr=(p,d)=>y.exports.PlutusScript.from_bytes_with_version(kt(p),Ce[d]),bs=p=>y.exports.ScriptRef.from_bytes(kt(p)),us=p=>y.exports.ScriptHash.from_bytes(kt(p)),L_=p=>y.exports.Transaction.from_bytes(kt(p)),Xn=p=>y.exports.TransactionHash.from_bytes(kt(p)),En=p=>y.exports.TransactionUnspentOutput.from_bytes(kt(p)),Sn=p=>y.exports.TransactionWitnessSet.from_bytes(kt(p)),fs=p=>y.exports.Value.from_bytes(kt(p)),E_=p=>y.exports.Address.from_bech32(p),on=p=>y.exports.BaseAddress.from_address(E_(p)),Zn=p=>y.exports.EnterpriseAddress.from_address(E_(p)),ta=p=>y.exports.RewardAddress.from_address(E_(p)),d_=p=>Buffer.from(p).toString("hex"),kt=p=>p.length%2===0&&/^[0-9A-F]*$/i.test(p)?Buffer.from(p,"hex"):Buffer.from(p,"utf-8"),Lr=p=>{const d=t=>{const w=new Array;for(let u=0;u<t.len();u+=1)w.push(Lr(t.get(u)));return w};switch(p.kind()){case y.exports.NativeScriptKind.ScriptAll:{const t=p.as_script_all();return{type:"all",scripts:d(t.native_scripts())}}case y.exports.NativeScriptKind.ScriptAny:{const t=p.as_script_any();return{type:"any",scripts:d(t.native_scripts())}}case y.exports.NativeScriptKind.ScriptNOfK:{const t=p.as_script_n_of_k();return{type:"atLeast",required:t.n(),scripts:d(t.native_scripts())}}case y.exports.NativeScriptKind.TimelockStart:return{type:"after",slot:p.as_timelock_start().slot_bignum().to_str()};case y.exports.NativeScriptKind.TimelockExpiry:return{type:"before",slot:p.as_timelock_expiry().slot_bignum().to_str()};case y.exports.NativeScriptKind.ScriptPubkey:return{type:"sig",keyHash:p.as_script_pubkey().addr_keyhash().to_hex()};default:throw new Error(`Script Kind: ${p.kind()}, is not supported`)}},Vr=p=>{const d=t=>{const w=y.exports.NativeScripts.new();return t.forEach(u=>{w.add(Vr(u))}),w};switch(p.type){case"all":return y.exports.NativeScript.new_script_all(y.exports.ScriptAll.new(d(p.scripts)));case"any":return y.exports.NativeScript.new_script_any(y.exports.ScriptAny.new(d(p.scripts)));case"atLeast":return y.exports.NativeScript.new_script_n_of_k(y.exports.ScriptNOfK.new(p.required,d(p.scripts)));case"after":return y.exports.NativeScript.new_timelock_start(y.exports.TimelockStart.new_timelockstart(y.exports.BigNum.from_str(p.slot)));case"before":return y.exports.NativeScript.new_timelock_expiry(y.exports.TimelockExpiry.new_timelockexpiry(y.exports.BigNum.from_str(p.slot)));case"sig":return y.exports.NativeScript.new_script_pubkey(y.exports.ScriptPubkey.new(z_(p.keyHash)))}},Pr=p=>{var w,u,h;const d=x=>{const B=[];for(let P=0;P<x.len();P+=1)B.push(Pr(x.get(P)));return B},t=x=>{const B=new Map;for(let P=0;P<x.len();P+=1){const c=x.keys().get(P),z=x.get(c)??y.exports.PlutusData.from_hex(a_("NO_ITEM_FOUND_INSIDE_GOLD_ROOM"));B.set(Pr(c),Pr(z))}return B};switch(p.kind()){case y.exports.PlutusDataKind.Bytes:return d_(p.as_bytes()??new Uint8Array);case y.exports.PlutusDataKind.Integer:return parseInt(((w=p.as_integer())==null?void 0:w.to_str())??"0",10);case y.exports.PlutusDataKind.List:return d(p.as_list()??y.exports.PlutusList.new());case y.exports.PlutusDataKind.Map:return t(p.as_map()??y.exports.PlutusMap.new());case y.exports.PlutusDataKind.ConstrPlutusData:return{alternative:parseInt(((u=p.as_constr_plutus_data())==null?void 0:u.alternative().to_str())??"0",10),fields:d(((h=p.as_constr_plutus_data())==null?void 0:h.data())??y.exports.PlutusList.new())};default:throw new Error(`PlutusData Kind: ${p.kind()}, is not supported`)}},qe=p=>{const d=t=>{const w=y.exports.PlutusList.new();return t.forEach(u=>{w.add(qe(u))}),w};switch(typeof p){case"string":return y.exports.PlutusData.new_bytes(kt(p));case"number":return y.exports.PlutusData.new_integer(y.exports.BigInt.from_str(p.toString()));case"bigint":return y.exports.PlutusData.new_integer(y.exports.BigInt.from_str(p.toString()));case"object":if(p instanceof Array){const t=d(p);return y.exports.PlutusData.new_list(t)}else if(p instanceof Map){const t=y.exports.PlutusMap.new();return p.forEach((w,u)=>{t.insert(qe(u),qe(w))}),y.exports.PlutusData.new_map(t)}else return y.exports.PlutusData.new_constr_plutus_data(y.exports.ConstrPlutusData.new(y.exports.BigNum.from_str(p.alternative.toString()),d(p.fields)))}},hs=p=>{const d=y.exports.Relays.new();throw p.relays.forEach(t=>{d.add(_a(t))}),new Error("toPoolParams not implemented.")},Xr=p=>{const d=t=>ja[t];return y.exports.Redeemer.new(d(p.tag),y.exports.BigNum.from_str(p.index.toString()),qe(p.data),y.exports.ExUnits.new(y.exports.BigNum.from_str(p.budget.mem.toString()),y.exports.BigNum.from_str(p.budget.steps.toString())))},_a=p=>{switch(p.type){case"SingleHostAddr":{const d=p.IPV4?y.exports.Ipv4.new(new Uint8Array(p.IPV4.split(".").map(w=>parseInt(w)))):void 0,t=p.IPV6?y.exports.Ipv6.new(kt(p.IPV6.replaceAll(":",""))):void 0;return y.exports.Relay.new_single_host_addr(y.exports.SingleHostAddr.new(p.port,d,t))}case"SingleHostName":return y.exports.Relay.new_single_host_name(y.exports.SingleHostName.new(p.port,y.exports.DNSRecordAorAAAA.new(p.domainName)));case"MultiHostName":return y.exports.Relay.new_multi_host_name(y.exports.MultiHostName.new(y.exports.DNSRecordSRV.new(p.domainName)))}},ea=p=>{if(p.is_plutus_script()){const t=p.plutus_script();return{code:t.to_hex(),version:Object.keys(Ce).find(w=>Ce[w].to_hex()===t.language_version().to_hex())}}const d=p.native_script();return Lr(d)},gr=p=>{if("code"in p){const d=lr(p.code,p.version);return y.exports.ScriptRef.new_plutus_script(d)}return y.exports.ScriptRef.new_native_script(Vr(p))},qr=p=>{var u,h,x;const d=p.output().has_data_hash()?(u=p.output().data_hash())==null?void 0:u.to_hex():void 0,t=p.output().has_plutus_data()?(h=p.output().plutus_data())==null?void 0:h.to_hex():void 0,w=p.output().has_script_ref()?(x=p.output().script_ref())==null?void 0:x.to_hex():void 0;return{input:{outputIndex:p.input().index(),txHash:p.input().transaction_id().to_hex()},output:{address:p.output().address().to_bech32(),amount:ra(p.output().amount()),dataHash:d,plutusData:t,scriptRef:w}}},R_=p=>{const d=y.exports.TransactionInput.new(Xn(p.input.txHash),p.input.outputIndex),t=y.exports.TransactionOutput.new(E_(p.output.address),Be(p.output.amount));return p.output.dataHash!==void 0&&t.set_data_hash(ws(p.output.dataHash)),p.output.plutusData!==void 0&&t.set_plutus_data(Wn(p.output.plutusData)),p.output.scriptRef!==void 0&&t.set_script_ref(bs(p.output.scriptRef)),y.exports.TransactionUnspentOutput.new(d,t)},Qn=p=>{const d=p.split(".")[1]??"0",t=`${parseInt(d,10)}`,w="1"+"0".repeat(d.length);return y.exports.UnitInterval.new(y.exports.BigNum.from_str(t),y.exports.BigNum.from_str(w))},a_=p=>p.length%2===0&&/^[0-9A-F]*$/i.test(p)?p:d_(Buffer.from(p,"utf-8")),dn=p=>Buffer.from(p,"hex").toString("utf-8"),ra=p=>{const d=[{unit:"lovelace",quantity:p.coin().to_str()}],t=p.multiasset();if(t!==void 0){const w=t.keys();for(let u=0;u<w.len();u+=1){const h=w.get(u),x=t.get(h);if(x!==void 0){const B=x.keys();for(let P=0;P<B.len();P+=1){const c=B.get(P),z=x.get(c)??y.exports.BigNum.from_str("0"),Y=h.to_hex()+d_(c.name());d.push({unit:Y,quantity:z.to_str()})}}}}return d},Be=p=>{const d=p.find(h=>h.unit==="lovelace"),t=Array.from(new Set(p.filter(h=>h.unit!=="lovelace").map(h=>h.unit.slice(0,V_)))),w=y.exports.MultiAsset.new();t.forEach(h=>{const x=y.exports.Assets.new();p.filter(B=>B.unit.slice(0,V_)===h).forEach(B=>{x.insert(y.exports.AssetName.new(kt(B.unit.slice(V_))),y.exports.BigNum.from_str(B.quantity))}),w.insert(us(h),x)});const u=y.exports.Value.new(y.exports.BigNum.from_str(d?d.quantity:"0"));return(p.length>1||!d)&&u.set_multiasset(w),u},On=(p,d,t)=>y.exports.BaseAddress.new(p,y.exports.StakeCredential.from_keyhash(d),y.exports.StakeCredential.from_keyhash(t)),na=(p,d="")=>y.exports.Bip32PrivateKey.from_bip39_entropy(kt(p),kt(a_(d))),Zr=p=>y.exports.DataCost.new_coins_per_byte(y.exports.BigNum.from_str(p)),ys=p=>{if(typeof p!="object"||!("input"in p))return y.exports.DatumSource.new(qe(p));const d=R_(p);if(d.output().has_plutus_data())return y.exports.DatumSource.new_ref_input(d.input());throw new Error(`No inline datum found in UTxO: ${d.input().transaction_id().to_hex()}`)},Dn=(p,d)=>y.exports.EnterpriseAddress.new(p,y.exports.StakeCredential.from_keyhash(d)),Tn=(p,d)=>{if(typeof p=="string")return y.exports.MintWitness.new_native_script(zr(p));if(d===void 0)throw new Error("Minting with plutus requires a redeemer to be defined");if(d.tag!=="MINT")throw new Error("Minting redeemer's tag must be defined as 'MINT'");return y.exports.MintWitness.new_plutus_script(_n(p),Xr({tag:"MINT",index:0,budget:or,data:{alternative:0,fields:[]},...d}))},tn=(p,d)=>y.exports.RewardAddress.new(p,y.exports.StakeCredential.from_keyhash(d)),_n=p=>{if("code"in p)return y.exports.PlutusScriptSource.new(lr(p.code,p.version));const d=R_(p);if(d.output().has_script_ref()){const t=d.output().script_ref();if(t.is_plutus_script()){const w=ea(t),u=lr(w.code,w.version).hash();return y.exports.PlutusScriptSource.new_ref_input_with_lang_ver(u,d.input(),Ce[w.version])}}throw new Error(`No plutus script reference found in UTxO: ${d.input().transaction_id().to_hex()}`)},Dr=p=>{const d=y.exports.ScriptPubkey.new(p);return y.exports.NativeScript.new_script_pubkey(d)},Fr=(p=y_)=>{const d=y.exports.TransactionBuilderConfigBuilder.new().coins_per_utxo_byte(y.exports.BigNum.from_str(p.coinsPerUTxOSize)).ex_unit_prices(y.exports.ExUnitPrices.new(Qn(p.priceMem.toString()),Qn(p.priceStep.toString()))).fee_algo(y.exports.LinearFee.new(y.exports.BigNum.from_str(p.minFeeA.toString()),y.exports.BigNum.from_str(p.minFeeB.toString()))).key_deposit(y.exports.BigNum.from_str(p.keyDeposit)).max_tx_size(p.maxTxSize).max_value_size(parseInt(p.maxValSize,10)).pool_deposit(y.exports.BigNum.from_str(p.poolDeposit)).build();return y.exports.TransactionBuilder.new(d)},Nn=p=>{const d=y.exports.TxInputsBuilder.new();return p.map(t=>t instanceof y.exports.TransactionUnspentOutput?t:R_(t)).forEach(t=>{d.add_input(t.output().address(),t.input(),t.output().amount())}),d},Tr=p=>{if(typeof p=="string")return y.exports.TransactionOutputBuilder.new().with_address(E_(p));let d=y.exports.TransactionOutputBuilder.new().with_address(E_(p.address));if(p.datum){const{value:t,inline:w}=p.datum,u=qe(t);d=d.with_data_hash(y.exports.hash_plutus_data(u)),w&&(d=d.with_plutus_data(u))}if(p.script){const t=gr(p.script);d=d.with_script_ref(t)}return d},Se=p=>{const d=p.slice(0,V_),t=p.includes(".")?a_(p.split(".")[1]):p.slice(V_);return{policyId:d,assetName:t}},$=p=>Re.default.isAxiosError(p)?p.response?JSON.stringify({data:p.response.data,headers:p.response.headers,status:p.response.status}):p.request?JSON.stringify(p.request):p.message:JSON.stringify(p),vs=p=>{const d=qe(p);return y.exports.hash_plutus_data(d).to_hex()},ms=(p,d=Date.now())=>{if(Kr[p]){const[t,w,u,h]=Kr[p];return parseInt(y.exports.BigNum.from_str(d.toString()).div_floor(y.exports.BigNum.from_str("1000")).checked_sub(y.exports.BigNum.from_str(u)).div_floor(y.exports.BigNum.from_str(h)).checked_add(y.exports.BigNum.from_str(t)).to_str(),10)}throw new Error(`Couldn't resolve EpochNo for network: ${p}`)},aa=(p,d)=>os.fromParts(kt(p),kt(d)).fingerprint(),ks=(p,d)=>Ba[p][d],xs=p=>Vr(p).hash().to_hex(),We=p=>{var d,t;try{const w=[(d=on(p))==null?void 0:d.payment_cred().to_keyhash(),(t=Zn(p))==null?void 0:t.payment_cred().to_keyhash()].find(u=>u!==void 0);if(w!==void 0)return w.to_hex();throw new Error(`Couldn't resolve payment key hash from address: ${p}`)}catch(w){throw new Error(`An error occurred during resolvePaymentKeyHash: ${w}.`)}},As=(p,d=0)=>{const t=lr(p.code,p.version);return y.exports.EnterpriseAddress.new(d,y.exports.StakeCredential.from_scripthash(t.hash())).to_address().to_bech32()},Is=p=>{try{const d=Zn(p),t=d==null?void 0:d.payment_cred().to_scripthash();if(t!==void 0)return t.to_hex();throw new Error(`Couldn't resolve script hash from address: ${p}`)}catch(d){throw new Error(`An error occurred during resolveScriptHash: ${d}.`)}},Cs=p=>y.exports.Ed25519KeyHash.from_hex(p).to_bech32("pool1"),js=p=>{const d=$r.mnemonicToEntropy(p.join(" ")),t=na(d),w=t.to_bech32();return t.free(),w},Bs=p=>gr(p).to_hex(),Es=(p,d=Date.now())=>{if(Kr[p]){const[t,w,u]=Kr[p];return y.exports.BigNum.from_str(d.toString()).div_floor(y.exports.BigNum.from_str("1000")).checked_sub(y.exports.BigNum.from_str(u)).checked_add(y.exports.BigNum.from_str(w)).to_str()}throw new Error(`Couldn't resolve SlotNo for network: ${p}`)},xr=p=>{try{const d=E_(p),t=on(p),w=t==null?void 0:t.stake_cred().to_keyhash();if(w!==void 0)return tn(d.network_id(),w).to_address().to_bech32();throw new Error(`Couldn't resolve reward address from address: ${p}`)}catch(d){throw new Error(`An error occurred during resolveRewardAddress: ${d}.`)}},ir=p=>{var d,t;try{const w=[(d=on(p))==null?void 0:d.stake_cred().to_keyhash(),(t=ta(p))==null?void 0:t.payment_cred().to_keyhash()].find(u=>u!==void 0);if(w!==void 0)return w.to_hex();throw new Error(`Couldn't resolve stake key hash from address: ${p}`)}catch(w){throw new Error(`An error occurred during resolveStakeKeyHash: ${w}.`)}},cn=(p,d=y_.minFeeA,t=y_.minFeeB)=>(BigInt(d)*BigInt(p)+BigInt(t)).toString(),sa=p=>{const d=L_(p).body();return y.exports.hash_transaction(d).to_hex()},Ss=(p="",d=32)=>{if(d<=0||d>2048)throw new Error("Length must be bewteen 1 and 2048");const w=Un.customAlphabet("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789")(d);return a_(`${p}${w}`)},Qs=p=>Pr(Wn(p));class Os{_axiosInstance;constructor(...d){if(typeof d[0]=="string"&&d[0].startsWith("http"))this._axiosInstance=Re.default.create({baseURL:d[0]});else{const t=d[0],w=t.slice(0,7);this._axiosInstance=Re.default.create({baseURL:`https://cardano-${w}.blockfrost.io/api/v${d[1]??0}`,headers:{project_id:t}})}}async fetchAccountInfo(d){const t=d.startsWith("addr")?xr(d):d;try{const{data:w,status:u}=await this._axiosInstance.get(`accounts/${t}`);if(u===200)return{poolId:w.pool_id,active:w.active||w.active_epoch!==null,balance:w.controlled_amount,rewards:w.withdrawable_amount,withdrawals:w.withdrawals_sum};throw $(w)}catch(w){throw $(w)}}resolveScriptRef=async d=>{if(d){const{data:t,status:w}=await this._axiosInstance.get(`scripts/${d}`);if(w===200){const u=t.type.startsWith("plutus")?{code:await this.fetchPlutusScriptCBOR(d),version:t.type.replace("plutus","")}:await this.fetchNativeScriptJSON(d);return gr(u).to_hex()}throw $(t)}};toUTxO=async(d,t)=>({input:{outputIndex:d.output_index,txHash:t},output:{address:d.address,amount:d.amount,dataHash:d.data_hash??void 0,plutusData:d.inline_datum??void 0,scriptRef:await this.resolveScriptRef(d.reference_script_hash),scriptHash:d.reference_script_hash}});async fetchAddressUTxOs(d,t){const w=t!==void 0?`/${t}`:"",u=`addresses/${d}/utxos`+w,h=async(x=1,B=[])=>{const{data:P,status:c}=await this._axiosInstance.get(`${u}?page=${x}`);if(c===200)return P.length>0?h(x+1,[...B,...await Promise.all(P.map(z=>this.toUTxO(z,z.tx_hash)))]):B;throw $(P)};try{return await h()}catch{return[]}}async fetchAssetAddresses(d){const t=async(w=1,u=[])=>{const{policyId:h,assetName:x}=Se(d),{data:B,status:P}=await this._axiosInstance.get(`assets/${h}${x}/addresses?page=${w}`);if(P===200)return B.length>0?t(w+1,[...u,...B]):u;throw $(B)};try{return await t()}catch{return[]}}async fetchAssetMetadata(d){try{const{policyId:t,assetName:w}=Se(d),{data:u,status:h}=await this._axiosInstance.get(`assets/${t}${w}`);if(h===200)return{...u.onchain_metadata};throw $(u)}catch(t){throw $(t)}}async fetchBlockInfo(d){try{const{data:t,status:w}=await this._axiosInstance.get(`blocks/${d}`);if(w===200)return{confirmations:t.confirmations,epoch:t.epoch,epochSlot:t.epoch_slot.toString(),fees:t.fees,hash:t.hash,nextBlock:t.next_block??"",operationalCertificate:t.op_cert,output:t.output??"0",previousBlock:t.previous_block,size:t.size,slot:t.slot.toString(),slotLeader:t.slot_leader??"",time:t.time,txCount:t.tx_count,VRFKey:t.block_vrf};throw $(t)}catch(t){throw $(t)}}async fetchCollectionAssets(d,t=1){try{const{data:w,status:u}=await this._axiosInstance.get(`assets/policy/${d}?page=${t}`);if(u===200)return{assets:w.map(h=>({unit:h.asset,quantity:h.quantity})),next:w.length===100?t+1:null};throw $(w)}catch{return{assets:[],next:null}}}async fetchHandleAddress(d){try{const t=a_(d.replace("$","")),{data:w,status:u}=await this._axiosInstance.get(`assets/${rn[1]}${t}/addresses`);if(u===200)return w[0].address;throw $(w)}catch(t){throw $(t)}}async fetchProtocolParameters(d=Number.NaN){try{const{data:t,status:w}=await this._axiosInstance.get(`epochs/${isNaN(d)?"latest":d}/parameters`);if(w===200)return{coinsPerUTxOSize:t.coins_per_utxo_word,collateralPercent:t.collateral_percent,decentralisation:t.decentralisation_param,epoch:t.epoch,keyDeposit:t.key_deposit,maxBlockExMem:t.max_block_ex_mem,maxBlockExSteps:t.max_block_ex_steps,maxBlockHeaderSize:t.max_block_header_size,maxBlockSize:t.max_block_size,maxCollateralInputs:t.max_collateral_inputs,maxTxExMem:t.max_tx_ex_mem,maxTxExSteps:t.max_tx_ex_steps,maxTxSize:t.max_tx_size,maxValSize:t.max_val_size,minFeeA:t.min_fee_a,minFeeB:t.min_fee_b,minPoolCost:t.min_pool_cost,poolDeposit:t.pool_deposit,priceMem:t.price_mem,priceStep:t.price_step};throw $(t)}catch(t){throw $(t)}}async fetchTxInfo(d){try{const{data:t,status:w}=await this._axiosInstance.get(`txs/${d}`);if(w===200)return{block:t.block,deposit:t.deposit,fees:t.fees,hash:t.hash,index:t.index,invalidAfter:t.invalid_hereafter??"",invalidBefore:t.invalid_before??"",slot:t.slot.toString(),size:t.size};throw $(t)}catch(t){throw $(t)}}async fetchUTxOs(d){try{const{data:t,status:w}=await this._axiosInstance.get(`txs/${d}/utxos`);if(w===200){const u=t.outputs,h=[];return u.forEach(B=>{h.push(this.toUTxO(B,d))}),await Promise.all(h)}throw $(t)}catch(t){throw $(t)}}onTxConfirmed(d,t,w=100){let u=0;const h=setInterval(()=>{u>=w&&clearInterval(h),this.fetchTxInfo(d).then(x=>{this.fetchBlockInfo(x.block).then(B=>{(B==null?void 0:B.confirmations)>0&&(clearInterval(h),t())}).catch(()=>{u+=1})}).catch(()=>{u+=1})},5e3)}async submitTx(d){try{const t={"Content-Type":"application/cbor"},{data:w,status:u}=await this._axiosInstance.post("tx/submit",kt(d),{headers:t});if(u===200)return w;throw $(w)}catch(t){throw $(t)}}async fetchPlutusScriptCBOR(d){const{data:t,status:w}=await this._axiosInstance.get(`scripts/${d}/cbor`);if(w===200)return t.cbor;throw $(t)}async fetchNativeScriptJSON(d){const{data:t,status:w}=await this._axiosInstance.get(`scripts/${d}/json`);if(w===200)return t.json;throw $(t)}}class Ds{_axiosInstance;constructor(d,t,w){const u=w.host??"ipfs.infura.io",h=w.port??5001,x=w.version??0;this._axiosInstance=Re.default.create({baseURL:`https://${u}:${h}/api/v${x}`,auth:{username:d,password:t}})}async uploadContent(d,t=!1){try{const w={"Content-Type":"multipart/form-data"},{data:u,status:h}=await this._axiosInstance.post(`add?recursive=${t}`,d,{headers:w});if(h===200)return u;throw $(u)}catch(w){throw $(w)}}}class Ts{_axiosInstance;constructor(...d){if(typeof d[0]=="string"&&d[0].startsWith("http"))this._axiosInstance=Re.default.create({baseURL:d[0],headers:{Authorization:`Bearer ${d[1]}`}});else{let t=1;typeof d[2]=="number"&&(t=d[2]);const w={baseURL:`https://${d[0]}.koios.rest/api/v${t}`};typeof d[1]=="string"&&(w.headers={Authorization:`Bearer ${d[1]}`}),this._axiosInstance=Re.default.create(w)}}async fetchAccountInfo(d){try{const t=d.startsWith("addr")?xr(d):d,{data:w,status:u}=await this._axiosInstance.post("account_info",{_stake_addresses:[t]});if(u===200)return{poolId:w[0].delegated_pool,active:w[0].status==="registered",balance:w[0].total_balance.toString(),rewards:w[0].rewards_available,withdrawals:w[0].withdrawals};throw $(w)}catch(t){throw $(t)}}async fetchAddressUTxOs(d,t){try{const{data:w,status:u}=await this._axiosInstance.post("address_info",{_addresses:[d]});if(u===200){const h=w.flatMap(x=>x.utxo_set).map(x=>this.toUTxO(x,d));return t!==void 0?h.filter(x=>x.output.amount.find(B=>B.unit===t)!==void 0):h}throw $(w)}catch{return[]}}async fetchAssetAddresses(d){try{const{policyId:t,assetName:w}=Se(d),{data:u,status:h}=await this._axiosInstance.get(`asset_address_list?_asset_policy=${t}&_asset_name=${w}`);if(h===200)return u.map(x=>({address:x.payment_address,quantity:x.quantity}));throw $(u)}catch(t){throw $(t)}}async fetchAssetMetadata(d){try{const{policyId:t,assetName:w}=Se(d),{data:u,status:h}=await this._axiosInstance.get(`asset_info?_asset_policy=${t}&_asset_name=${w}`);if(h===200)return{...u[0].minting_tx_metadata[721][t][dn(w)]};throw $(u)}catch(t){throw $(t)}}async fetchBlockInfo(d){try{const{data:t,status:w}=await this._axiosInstance.post("block_info",{_block_hashes:[d]});if(w===200)return{confirmations:t[0].num_confirmations,epoch:t[0].epoch_no,epochSlot:t[0].epoch_slot.toString(),fees:t[0].total_fees??"",hash:t[0].hash,nextBlock:t[0].child_hash??"",operationalCertificate:t[0].op_cert,output:t[0].total_output??"0",previousBlock:t[0].parent_hash,size:t[0].block_size,slot:t[0].abs_slot.toString(),slotLeader:t[0].pool??"",time:t[0].block_time,txCount:t[0].tx_count,VRFKey:t[0].vrf_key};throw $(t)}catch(t){throw $(t)}}async fetchCollectionAssets(d,t=0){try{const{data:w,status:u}=await this._axiosInstance.get(`asset_policy_info?_asset_policy=${d}&limit=100&offset=${t}`);if(u===200)return{assets:w.map(h=>({unit:`${d}${h.asset_name}`,quantity:h.total_supply})),next:w.length===100?t+100:null};throw $(w)}catch(w){throw $(w)}}async fetchHandleAddress(d){try{const t=a_(d.replace("$","")),{data:w,status:u}=await this._axiosInstance.get(`asset_address_list?_asset_policy=${rn[1]}&_asset_name=${t}`);if(u===200)return w[0].payment_address;throw $(w)}catch(t){throw $(t)}}async fetchProtocolParameters(d){try{const{data:t,status:w}=await this._axiosInstance.get(`epoch_params?_epoch_no=${d}`);if(w===200)return{coinsPerUTxOSize:t[0].coins_per_utxo_size,collateralPercent:t[0].collateral_percent,decentralisation:t[0].decentralisation,epoch:t[0].epoch_no,keyDeposit:t[0].key_deposit,maxBlockExMem:t[0].max_block_ex_mem.toString(),maxBlockExSteps:t[0].max_block_ex_steps.toString(),maxBlockHeaderSize:t[0].max_bh_size,maxBlockSize:t[0].max_block_size,maxCollateralInputs:t[0].max_collateral_inputs,maxTxExMem:t[0].max_tx_ex_mem.toString(),maxTxExSteps:t[0].max_tx_ex_steps.toString(),maxTxSize:t[0].max_tx_size,maxValSize:t[0].max_val_size.toString(),minFeeA:t[0].min_fee_a,minFeeB:t[0].min_fee_b,minPoolCost:t[0].min_pool_cost,poolDeposit:t[0].pool_deposit,priceMem:t[0].price_mem,priceStep:t[0].price_step};throw $(t)}catch(t){throw $(t)}}async fetchTxInfo(d){var t,w;try{const{data:u,status:h}=await this._axiosInstance.post("tx_info",{_tx_hashes:[d]});if(h===200)return{block:u[0].block_hash,deposit:u[0].deposit,fees:u[0].fee,hash:u[0].tx_hash,index:u[0].tx_block_index,invalidAfter:((t=u[0].invalid_after)==null?void 0:t.toString())??"",invalidBefore:((w=u[0].invalid_before)==null?void 0:w.toString())??"",slot:u[0].absolute_slot.toString(),size:u[0].tx_size};throw $(u)}catch(u){throw $(u)}}async fetchUTxOs(d){try{const{data:t,status:w}=await this._axiosInstance.post("tx_info",{_tx_hashes:[d]});if(w===200)return t[0].outputs.map(h=>this.toUTxO(h,h.payment_addr.bech32));throw $(t)}catch(t){throw $(t)}}onTxConfirmed(d,t,w=100){let u=0;const h=setInterval(()=>{u>=w&&clearInterval(h),this.fetchTxInfo(d).then(x=>{this.fetchBlockInfo(x.block).then(B=>{(B==null?void 0:B.confirmations)>0&&(clearInterval(h),t())}).catch(()=>{u+=1})}).catch(()=>{u+=1})},5e3)}async submitTx(d){try{const t={"Content-Type":"application/cbor"},{data:w,status:u}=await this._axiosInstance.post("submittx",kt(d),{headers:t});if(u===202)return w;throw $(w)}catch(t){throw $(t)}}toUTxO(d,t){var w,u;return{input:{outputIndex:d.tx_index,txHash:d.tx_hash},output:{address:t,amount:[{unit:"lovelace",quantity:d.value},...d.asset_list.map(h=>({unit:`${h.policy_id}${h.asset_name}`,quantity:`${h.quantity}`}))],dataHash:d.datum_hash??void 0,plutusData:((w=d.inline_datum)==null?void 0:w.bytes)??void 0,scriptRef:this.resolveScriptRef(d.reference_script),scriptHash:((u=d.reference_script)==null?void 0:u.hash)??void 0}}}resolveScriptRef=d=>{if(d){const t=d.type.startsWith("plutus")?{code:d.bytes,version:d.type.replace("plutus","")}:Lr(zr(d.bytes));return gr(t).to_hex()}}}class Ns{_baseUrl;constructor(...d){this._baseUrl=Pn(d[0])?Ea[d[0]]:d[0]}async evaluateTx(d){const t=await this.open();return this.send(t,"EvaluateTx",{evaluate:d}),new Promise((w,u)=>{t.addEventListener("message",h=>{try{const{result:x}=JSON.parse(h.data);x.EvaluationResult?w(Object.keys(x.EvaluationResult).map(B=>({index:parseInt(B.split(":")[1],10),tag:B.split(":")[0].toUpperCase(),budget:{mem:x.EvaluationResult[B].memory,steps:x.EvaluationResult[B].steps}}))):u(x.EvaluationFailure),t.close()}catch(x){u(x)}},{once:!0})})}async onNextTx(d){const t=await this.open();return this.send(t,"AwaitAcquire",{}),t.addEventListener("message",w=>{const{result:u}=JSON.parse(w.data);if(u===null)return this.send(t,"AwaitAcquire",{});u.AwaitAcquired===void 0&&d(u),this.send(t,"NextTx",{})}),()=>t.close()}async submitTx(d){const t=await this.open();return this.send(t,"SubmitTx",{submit:d}),new Promise((w,u)=>{t.addEventListener("message",h=>{try{const{result:x}=JSON.parse(h.data);x.SubmitSuccess?w(x.SubmitSuccess.txId):u(x.SubmitFail),t.close()}catch(x){u(x)}},{once:!0})})}async open(){const d=new WebSocket(this._baseUrl);return await new Promise(t=>{d.addEventListener("open",()=>t(!0),{once:!0})}),d}send(d,t,w){d.send(JSON.stringify({version:"1.0",type:"jsonwsp/request",servicename:"ogmios",methodname:t,args:w}))}}class Us{_axiosInstance;constructor(d,t,w,u=1){this._axiosInstance=Re.default.create({baseURL:`https://cardano-${d}.tangocrypto.com/${t}/v${u}`,headers:{"x-api-key":w}})}async evaluateTx(d){try{const{data:t,status:w}=await this._axiosInstance.post("transactions/evaluate",{tx:d,utxos:[]});if(w===200)return t.redeemers.map(u=>({index:u.index,tag:u.purpose.toUpperCase(),budget:{mem:u.unit_mem,steps:u.unit_steps}}));throw $(t)}catch(t){throw $(t)}}async fetchAccountInfo(d){try{const t=d.startsWith("addr")?xr(d):d,{data:w,status:u}=await this._axiosInstance.get(`wallets/${t}`);if(u===200)return{poolId:w.pool_id,active:w.active,balance:w.controlled_total_stake,rewards:w.rewards_sum,withdrawals:w.withdrawals_sum};throw $(w)}catch(t){throw $(t)}}async fetchAddressUTxOs(d,t){const w=t!==void 0?`/assets/${t}`:"",u=`addresses/${d}${w}/utxos?size=50`,h=async(c="",z=[])=>{var m;const{data:Y,status:q}=await this._axiosInstance.get(`${u}&cursor=${c}`);if(q===200)return Y.cursor!==null&&((m=Y.cursor)==null?void 0:m.length)>0?h(Y.cursor,[...z,...Y.data.map(P)]):Y.data.map(P);throw $(Y)},x=(c,z)=>{const Y=[{unit:"lovelace",quantity:c.toString()}];return z.forEach(q=>{const m=a_(q.asset_name);Y.push({unit:`${q.policy_id}${m}`,quantity:q.quantity.toString()})}),Y},B=c=>{if(c){const z=c.type.startsWith("plutus")?{code:c.code,version:c.type.replace("plutus","")}:Lr(zr(c.json));return gr(z).to_hex()}},P=c=>{var z;return{input:{outputIndex:c.index,txHash:c.hash},output:{address:d,amount:x(c.value,c.assets),dataHash:void 0,plutusData:((z=c.inline_datum)==null?void 0:z.value_raw)??void 0,scriptRef:B(c.reference_script)}}};try{return await h()}catch{return[]}}async fetchAssetAddresses(d){const t=u=>({address:u.address,quantity:u.quantity.toString()}),w=async(u="",h=[])=>{var z;const{policyId:x,assetName:B}=Se(d),{data:P,status:c}=await this._axiosInstance.get(`assets/${x}${B}/addresses?size=100&cursor=${u}`);if(c===200)return P.cursor!==null&&((z=P.cursor)==null?void 0:z.length)>0?w(P.cursor,[...h,...P.data.map(t)]):P.data.map(t);throw $(P)};try{return await w()}catch{return[]}}async fetchAssetMetadata(d){var t;try{const{policyId:w,assetName:u}=Se(d),{data:h,status:x}=await this._axiosInstance.get(`assets/${w}${u}`);if(x===200)return{...(t=h.metadata.find(B=>B.label===721))==null?void 0:t.json[w][dn(u)]};throw $(h)}catch(w){throw $(w)}}async fetchBlockInfo(d){try{const{data:t,status:w}=await this._axiosInstance.get(`blocks/${d}`);if(w===200)return{confirmations:t.confirmations,epoch:t.epoch_no,epochSlot:t.epoch_slot_no.toString(),fees:t.fees.toString(),hash:t.hash,nextBlock:t.next_block.toString()??"",operationalCertificate:t.op_cert,output:t.out_sum.toString()??"0",previousBlock:t.previous_block.toString(),size:t.size,slot:t.slot_no.toString(),slotLeader:t.slot_leader??"",time:Date.parse(t.time),txCount:t.tx_count,VRFKey:t.vrf_key};throw $(t)}catch(t){throw $(t)}}async fetchCollectionAssets(d,t=""){try{const{data:w,status:u}=await this._axiosInstance.get(`policies/${d}/assets?size=100&cursor=${t}`);if(u===200)return{assets:w.data.map(h=>({unit:`${h.policy_id}${h.asset_name}`,quantity:h.quantity})),next:w.cursor};throw $(w)}catch{return{assets:[],next:null}}}async fetchHandleAddress(d){try{const t=a_(d.replace("$","")),{data:w,status:u}=await this._axiosInstance.get(`assets/${rn[1]}${t}/addresses`);if(u===200)return w.data[0].address;throw $(w)}catch(t){throw $(t)}}async fetchProtocolParameters(d){try{const{data:t,status:w}=await this._axiosInstance.get(`epochs/${d}/parameters`);if(w===200)return{coinsPerUTxOSize:t.coins_per_utxo_size.toString(),collateralPercent:t.collateral_percent,decentralisation:t.decentralisation,epoch:t.epoch_no,keyDeposit:t.key_deposit.toString(),maxBlockExMem:t.max_block_ex_mem.toString(),maxBlockExSteps:t.max_block_ex_steps.toString(),maxBlockHeaderSize:t.max_block_header_size,maxBlockSize:t.max_block_size,maxCollateralInputs:t.max_collateral_inputs,maxTxExMem:t.max_tx_ex_mem.toString(),maxTxExSteps:t.max_tx_ex_steps.toString(),maxTxSize:t.max_tx_size,maxValSize:t.max_val_size.toString(),minFeeA:t.min_fee_a,minFeeB:t.min_fee_b,minPoolCost:t.min_pool_cost.toString(),poolDeposit:t.pool_deposit.toString(),priceMem:t.price_mem,priceStep:t.price_step};throw $(t)}catch(t){throw $(t)}}async fetchTxInfo(d){try{const{data:t,status:w}=await this._axiosInstance.get(`transactions/${d}`);if(w===200)return{block:t.block.hash,deposit:t.deposit,fees:t.fee,hash:t.hash,index:t.block_index,invalidAfter:t.invalid_hereafter??"",invalidBefore:t.invalid_before??"",slot:t.block.slot_no.toString(),size:t.size};throw $(t)}catch(t){throw $(t)}}async fetchUTxOs(d){try{return console.log(d),[]}catch(t){throw $(t)}}onTxConfirmed(d,t,w=100){let u=0;const h=setInterval(()=>{u>=w&&clearInterval(h),this.fetchTxInfo(d).then(x=>{this.fetchBlockInfo(x.block).then(B=>{(B==null?void 0:B.confirmations)>0&&(clearInterval(h),t())}).catch(()=>{u+=1})}).catch(()=>{u+=1})},5e3)}async submitTx(d){try{const t={"Content-Type":"application/json"},{data:w,status:u}=await this._axiosInstance.post("transactions/submit",{tx:d},{headers:t});if(u===200)return w.tx_id;throw $(w)}catch(t){throw $(t)}}}class Ps{_axiosInstance;_amountsAsStrings={headers:{"amounts-as-strings":"true"}};submitUrl;constructor({network:d,apiKey:t,turboSubmit:w=!1}){this._axiosInstance=Re.default.create({baseURL:`https://${d}.gomaestro-api.org/v1`,headers:{"api-key":t}}),this.submitUrl=w?"txmanager/turbosubmit":"txmanager"}async evaluateTx(d){try{const{data:t,status:w}=await this._axiosInstance.post("transactions/evaluate",{cbor:d});if(w===200){const u={spend:"SPEND",mint:"MINT",cert:"CERT",wdrl:"REWARD"};return t.map(x=>{const B=x.ex_units,P=x.redeemer_index,c=u[x.redeemer_tag];return{budget:B,index:P,tag:c}})}throw $(t)}catch(t){throw $(t)}}async fetchAccountInfo(d){const t=d.startsWith("addr")?xr(d):d;try{const{data:w,status:u}=await this._axiosInstance.get(`accounts/${t}`,this._amountsAsStrings);if(u===200){const h=w.data;return{poolId:h.delegated_pool,active:h.registered,balance:h.total_balance,rewards:h.rewards_available,withdrawals:h.total_withdrawn}}throw $(w)}catch(w){throw $(w)}}async fetchAddressUTxOs(d,t){const w=(()=>d.startsWith("addr_vkh")||d.startsWith("addr_shared_vkh")?`addresses/cred/${d}`:`addresses/${d}`)(),u=t?`&asset=${t}`:"",h=async(x=null,B=[])=>{const P=x===null?"":`&cursor=${x}`,{data:c,status:z}=await this._axiosInstance.get(`${w}/utxos?count=100${u}${P}`,this._amountsAsStrings);if(z===200){const q=c.data.map(this.toUTxO),m=[...B,...q],G=c.next_cursor;return G==null?m:h(G,m)}throw $(c)};try{return await h()}catch{return[]}}async fetchAssetAddresses(d){const{policyId:t,assetName:w}=Se(d),u=async(h=null,x=[])=>{const B=h===null?"":`&cursor=${h}`,{data:P,status:c}=await this._axiosInstance.get(`assets/${t}${w}/addresses?count=100${B}`,this._amountsAsStrings);if(c===200){const Y=P.data.map(G=>({address:G.address,quantity:G.amount})),q=P.next_cursor,m=[...x,...Y];return q==null?m:u(q,m)}throw $(P)};try{return await u()}catch{return[]}}async fetchAssetMetadata(d){try{const{policyId:t,assetName:w}=Se(d),{data:u,status:h}=await this._axiosInstance.get(`assets/${t}${w}`);if(h===200){const x=u.data;return{...x.asset_standards.cip25_metadata,...x.asset_standards.cip68_metadata}}throw $(u)}catch(t){throw $(t)}}async fetchBlockInfo(d){var t;try{const{data:w,status:u}=await this._axiosInstance.get(`blocks/${d}`,this._amountsAsStrings);if(u===200){const h=w.data;return{confirmations:h.confirmations,epoch:h.epoch,epochSlot:h.epoch_slot.toString(),fees:h.total_fees,hash:h.hash,nextBlock:h.next_block??"",operationalCertificate:(t=h.operational_certificate)==null?void 0:t.hot_vkey,output:h.total_output_lovelace??"0",previousBlock:h.previous_block,size:h.size,slot:h.absolute_slot.toString(),slotLeader:h.block_producer??"",time:Date.parse(h.timestamp)/1e3,txCount:h.tx_hashes.length,VRFKey:y.exports.VRFVKey.from_hex(h.vrf_key).to_bech32("vrf_vk")}}throw $(w)}catch(w){throw $(w)}}async fetchCollectionAssets(d,t){try{const{data:w,status:u}=await this._axiosInstance.get(`policy/${d}/assets?count=100${t?`&cursor=${t}`:""}`);if(u===200)return{assets:w.data.map(x=>({unit:d+x.asset_name,quantity:x.total_supply})),next:w.next_cursor};throw $(w)}catch{return{assets:[],next:null}}}async fetchHandleAddress(d){try{const t=d.charAt(0)==="$"?d.substring(1):d,{data:w,status:u}=await this._axiosInstance.get(`ecosystem/adahandle/${t}`);if(u===200)return w.data;throw $(w)}catch(t){throw $(t)}}async fetchProtocolParameters(d=Number.NaN){if(!isNaN(d))throw new Error("Maestro only supports fetching Protocol parameters of the latest completed epoch.");const t=w=>{const u=w.indexOf("/");return parseInt(w.slice(0,u))/parseInt(w.slice(u+1))};try{const{data:w,status:u}=await this._axiosInstance.get("protocol-params");if(u===200){const h=w.data;try{const{data:x,status:B}=await this._axiosInstance.get("epochs/current");if(B===200){const P=x.data;return{coinsPerUTxOSize:h.coins_per_utxo_byte.toString(),collateralPercent:parseInt(h.collateral_percentage),decentralisation:0,epoch:parseInt(P.epoch_no),keyDeposit:h.stake_key_deposit.toString(),maxBlockExMem:h.max_execution_units_per_block.memory.toString(),maxBlockExSteps:h.max_execution_units_per_block.steps.toString(),maxBlockHeaderSize:parseInt(h.max_block_header_size),maxBlockSize:parseInt(h.max_block_body_size),maxCollateralInputs:parseInt(h.max_collateral_inputs),maxTxExMem:h.max_execution_units_per_transaction.memory.toString(),maxTxExSteps:h.max_execution_units_per_transaction.steps.toString(),maxTxSize:parseInt(h.max_tx_size),maxValSize:h.max_value_size.toString(),minFeeA:h.min_fee_coefficient,minFeeB:h.min_fee_constant,minPoolCost:h.min_pool_cost.toString(),poolDeposit:h.pool_deposit.toString(),priceMem:t(h.prices.memory),priceStep:t(h.prices.steps)}}throw $(x)}catch(x){throw $(x)}}throw $(w)}catch(w){throw $(w)}}async fetchTxInfo(d){try{const{data:t,status:w}=await this._axiosInstance.get(`transactions/${d}`);if(w===200){const u=t.data;return{block:u.block_hash,deposit:u.deposit.toString(),fees:u.fee.toString(),hash:u.tx_hash,index:u.block_tx_index,invalidAfter:u.invalid_hereafter??"",invalidBefore:u.invalid_before??"",slot:u.block_absolute_slot.toString(),size:u.size-1}}throw $(t)}catch(t){throw $(t)}}async fetchUTxOs(d){try{const{data:t,status:w}=await this._axiosInstance.get(`transactions/${d}`,this._amountsAsStrings);if(w===200)return t.data.outputs.map(this.toUTxO);throw $(t)}catch(t){throw $(t)}}onTxConfirmed(d,t,w=100){let u=0;const h=setInterval(()=>{u>=w&&clearInterval(h),this.fetchTxInfo(d).then(x=>{this.fetchBlockInfo(x.block).then(B=>{(B==null?void 0:B.confirmations)>0&&(clearInterval(h),t())}).catch(()=>{u+=1})}).catch(()=>{u+=1})},5e3)}async submitTx(d){try{const t={"Content-Type":"application/cbor"},{data:w,status:u}=await this._axiosInstance.post(this.submitUrl,kt(d),{headers:t});if(u===202)return w;throw $(w)}catch(t){throw $(t)}}toUTxO=d=>{var t,w,u;return{input:{outputIndex:d.index,txHash:d.tx_hash},output:{address:d.address,amount:d.assets.map(h=>({unit:h.unit,quantity:h.amount})),dataHash:(t=d.datum)==null?void 0:t.hash,plutusData:(w=d.datum)==null?void 0:w.bytes,scriptRef:this.resolveScript(d),scriptHash:(u=d.reference_script)==null?void 0:u.hash}}};resolveScript=d=>{if(d.reference_script){const t=d.reference_script.type==="native"?d.reference_script.json:{code:d.reference_script.bytes,version:d.reference_script.type.replace("plutusv","V")};return gr(t).to_hex()}else return}}class Fs{static withOneSignature(d){const t=z_(We(d));return Dr(t).to_hex()}static withAtLeastNSignatures(d,t){const w=y.exports.NativeScripts.new();d.forEach(h=>{const x=z_(We(h));w.add(Dr(x))});const u=y.exports.ScriptNOfK.new(t,w);return y.exports.NativeScript.new_script_any(u).to_hex()}static withAnySignature(d){const t=y.exports.NativeScripts.new();d.forEach(u=>{const h=z_(We(u));t.add(Dr(h))});const w=y.exports.ScriptAny.new(t);return y.exports.NativeScript.new_script_any(w).to_hex()}static withAllSignatures(d){const t=y.exports.NativeScripts.new();d.forEach(u=>{const h=z_(We(u));t.add(Dr(h))});const w=y.exports.ScriptAll.new(t);return y.exports.NativeScript.new_script_any(w).to_hex()}static fromNativeScript(d){return Vr(d).to_hex()}}function ze(p,d,t,w){var u=arguments.length,h=u<3?d:w===null?w=Object.getOwnPropertyDescriptor(d,t):w,x;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")h=Reflect.decorate(p,d,t,w);else for(var B=p.length-1;B>=0;B--)(x=p[B])&&(h=(u<3?x(h):u>3?x(d,t,h):x(d,t))||h);return u>3&&h&&Object.defineProperty(d,t,h),h}const Ms=p=>class extends p{__visits=[]},Xe=()=>function(p,d,t){const w=t.value;t.value=function(...u){const h=w.call(this,...u);return this.__visits&&this.__visits.push(d),h}};exports.Transaction=class{_changeAddress;_txOutputs=new Map;_recipients=new Map;_totalBurns=new Map;_totalMints=new Map;_era;_initiator;_mintBuilder;_protocolParameters;_txBuilder;_txCertificates;_txInputsBuilder;_txWithdrawals;constructor(d={}){this._era=d.era,this._initiator=d.initiator,this._mintBuilder=y.exports.MintBuilder.new(),this._protocolParameters=d.parameters??y_,this._txBuilder=Fr(d.parameters),this._txCertificates=y.exports.Certificates.new(),this._txInputsBuilder=y.exports.TxInputsBuilder.new(),this._txWithdrawals=y.exports.Withdrawals.new()}static attachMetadata(d,t,w="BABBAGE"){var x;const u=L_(d),h=u.auxiliary_data()??y.exports.AuxiliaryData.new();if(h.set_metadata(y.exports.GeneralTransactionMetadata.from_hex(t)),h.set_prefer_alonzo_format(w==="ALONZO"),y.exports.hash_auxiliary_data(h).to_hex()!==((x=u.body().auxiliary_data_hash())==null?void 0:x.to_hex()))throw new Error("[Transaction] attachMetadata: The metadata hash does not match the auxiliary data hash.");return y.exports.Transaction.new(u.body(),u.witness_set(),h).to_hex()}static deattachMetadata(d){const t=L_(d);return y.exports.Transaction.new(t.body(),t.witness_set(),void 0).to_hex()}static maskMetadata(d,t="BABBAGE"){var h;const w=L_(d),u=(h=w.auxiliary_data())==null?void 0:h.metadata();if(u!==void 0){const x=y.exports.GeneralTransactionMetadata.new();for(let P=0;P<u.len();P+=1){const c=u.keys().get(P),z=u.get(c);x.insert(c,y.exports.TransactionMetadatum.from_hex("0".repeat(((z==null?void 0:z.to_hex())??"").length)))}const B=w.auxiliary_data();return B!==void 0&&(B.set_metadata(x),B.set_prefer_alonzo_format(t==="ALONZO")),y.exports.Transaction.new(w.body(),w.witness_set(),B).to_hex()}return d}static readMetadata(d){var w,u;return((u=(w=L_(d).auxiliary_data())==null?void 0:w.metadata())==null?void 0:u.to_hex())??""}static writeMetadata(d,t,w="BABBAGE"){const u=L_(d),h=u.auxiliary_data()??y.exports.AuxiliaryData.new();return h.set_metadata(y.exports.GeneralTransactionMetadata.from_hex(t)),h.set_prefer_alonzo_format(w==="ALONZO"),y.exports.Transaction.new(u.body(),u.witness_set(),h).to_hex()}get size(){return this._txBuilder.full_size()}async build(){try{return(this._mintBuilder.has_plutus_scripts()||this.notVisited("redeemValue")===!1)&&(await this.addRequiredSignersIfNeeded(),await this.addCollateralIfNeeded()),await this.forgeAssetsIfNeeded(),await this.addTxInputsAsNeeded(),await this.addChangeAddress(),this._txBuilder.build_tx().to_hex()}catch(d){throw new Error(`[Transaction] An error occurred during build: ${d}.`)}}burnAsset(d,t,w){const u=this._totalBurns.has(t.unit)?y.exports.BigNum.from_str(this._totalBurns.get(t.unit)??"0").checked_add(y.exports.BigNum.from_str(t.quantity)).to_str():t.quantity;return this._mintBuilder.add_asset(Tn(d,w),y.exports.AssetName.new(kt(t.unit.slice(V_))),y.exports.Int.new_negative(y.exports.BigNum.from_str(t.quantity))),this._totalBurns.set(t.unit,u),this}delegateStake(d,t){const w=y.exports.Certificate.new_stake_delegation(y.exports.StakeDelegation.new(y.exports.StakeCredential.from_keyhash(z_(ir(d))),y.exports.Ed25519KeyHash.from_bech32(t)));return this._txCertificates.add(w),this}deregisterStake(d){const t=y.exports.Certificate.new_stake_deregistration(y.exports.StakeDeregistration.new(y.exports.StakeCredential.from_keyhash(z_(ir(d)))));return this._txCertificates.add(t),this}mintAsset(d,t,w){var c,z;const u=(Y,q)=>{const m=typeof Y=="string"?zr(Y).hash().to_hex():h(Y).hash().to_hex(),G=a_(q.assetName);return{unit:`${m}${G}`,quantity:q.assetQuantity}},h=Y=>{if("code"in Y)return lr(Y.code,Y.version);const q=R_(Y);if(q.output().has_script_ref()){const m=q.output().script_ref();if(m.is_plutus_script()){const G=ea(m);return lr(G.code,G.version)}}throw new Error(`[Transaction] No plutus script reference found in UTxO: ${q.input().transaction_id().to_hex()}`)},x=u(d,t),P=y.exports.BigNum.from_str(((c=this._totalMints.get(x.unit))==null?void 0:c.assetQuantity)??"0").checked_add(y.exports.BigNum.from_str(x.quantity));return this._mintBuilder.add_asset(Tn(d,w),y.exports.AssetName.new(kt(a_(t.assetName))),y.exports.Int.new(y.exports.BigNum.from_str(x.quantity))),this._recipients.has(t.recipient)?(z=this._recipients.get(t.recipient))==null||z.push(x):this._recipients.set(t.recipient,[x]),this._totalMints.set(x.unit,{...t,assetQuantity:P.to_str()}),this}redeemValue(d){const t={tag:"SPEND",budget:or,index:this._txInputsBuilder.inputs().len(),data:{alternative:0,fields:[]},...d.redeemer},w=R_(d.value),u=d.datum?y.exports.PlutusWitness.new_with_ref(_n(d.script),ys(d.datum),Xr(t)):y.exports.PlutusWitness.new_with_ref_without_datum(_n(d.script),Xr(t));return this._txInputsBuilder.add_plutus_script_input(u,w.input(),w.output().amount()),this}registerStake(d){const t=y.exports.Certificate.new_stake_registration(y.exports.StakeRegistration.new(y.exports.StakeCredential.from_keyhash(z_(ir(d)))));return this._txCertificates.add(t),this}registerPool(d){const t=y.exports.Certificate.new_pool_registration(y.exports.PoolRegistration.new(hs(d)));return this._txCertificates.add(t),this}retirePool(d,t){const w=y.exports.Certificate.new_pool_retirement(y.exports.PoolRetirement.new(y.exports.Ed25519KeyHash.from_bech32(d),t));return this._txCertificates.add(w),this}sendAssets(d,t){const w=Be(t),u=w.multiasset();if(w.is_zero()||u===void 0)return this;const h=Tr(d).next(),x=w.coin().is_zero()?h.with_asset_and_min_required_coin_by_utxo_cost(u,Zr(this._protocolParameters.coinsPerUTxOSize)).build():h.with_coin_and_asset(w.coin(),u).build();return t.forEach(B=>{this.setTxOutput(B)}),this._txBuilder.add_output(x),this}sendLovelace(d,t){const u=Tr(d).next().with_coin(y.exports.BigNum.from_str(t)).build();return this.setTxOutput({unit:"lovelace",quantity:t}),this._txBuilder.add_output(u),this}sendToken(d,t,w){return this.sendAssets(d,[{quantity:w,unit:Sa[t]}]),this}sendValue(d,t){const w=Be(t.output.amount),h=Tr(d).next().with_value(w).build();return t.output.amount.forEach(x=>{this.setTxOutput(x)}),this._txBuilder.add_output(h),this}setChangeAddress(d){return this._changeAddress=E_(d),this}setCollateral(d){const t=Nn(d);return this._txBuilder.set_collateral(t),this}setMetadata(d,t){return this._txBuilder.add_json_metadatum_with_schema(y.exports.BigNum.from_str(d.toString()),JSON.stringify(t),y.exports.MetadataJsonSchema.NoConversions),this}setRequiredSigners(d){return Array.from(new Set(d.map(w=>w.startsWith("addr")?We(w):ir(w)).map(w=>z_(w)))).forEach(w=>{this._txBuilder.add_required_signer(w)}),this}setTimeToStart(d){return this._txBuilder.set_validity_start_interval_bignum(y.exports.BigNum.from_str(d)),this}setTimeToExpire(d){return this._txBuilder.set_ttl_bignum(y.exports.BigNum.from_str(d)),this}setTxInputs(d){return d.map(t=>R_(t)).forEach(t=>{this._txInputsBuilder.add_input(t.output().address(),t.input(),t.output().amount())}),this}setTxRefInputs(d){return d.map(t=>R_(t)).forEach(t=>{this._txBuilder.add_reference_input(t.input())}),this}withdrawRewards(d,t){const w=ta(d);return w!==void 0&&this._txWithdrawals.insert(w,y.exports.BigNum.from_str(t)),this}async addBurnInputsIfNeeded(){if(this._initiator&&this._totalBurns.size>0&&this.notVisited("setTxInputs")){const d=await this._initiator.getUsedUTxOs();Kn(this._totalBurns,d.map(w=>qr(w))).map(w=>R_(w)).forEach(w=>{this._txInputsBuilder.add_input(w.output().address(),w.input(),w.output().amount())})}}async addChangeAddress(){if(this._initiator&&this._changeAddress===void 0){const d=await this._initiator.getUsedAddress();this._txBuilder.add_change_if_needed(d)}else this._changeAddress!==void 0&&this._txBuilder.add_change_if_needed(this._changeAddress)}async addCollateralIfNeeded(){if(this._initiator&&this.notVisited("setCollateral")){const d=await this._initiator.getUsedCollateral();this._txBuilder.set_collateral(Nn(d))}}async addRequiredSignersIfNeeded(){if(this._initiator&&this.notVisited("setRequiredSigners")){const d=await this._initiator.getUsedAddress(),t=We(d.to_bech32());this._txBuilder.add_required_signer(z_(t))}}async addTxInputsAsNeeded(){if(this.notVisited("setTxInputs")){const d=await this.filterAvailableUTxOs();Mn(this._txOutputs,d.map(w=>qr(w))).map(w=>R_(w)).forEach(w=>{this._txInputsBuilder.add_input(w.output().address(),w.input(),w.output().amount())})}if(this._txBuilder.set_inputs(this._txInputsBuilder),(this._mintBuilder.has_native_scripts()||this._mintBuilder.has_plutus_scripts())&&this._txBuilder.set_mint_builder(this._mintBuilder),this._txCertificates.len()>0&&this._txBuilder.set_certs(this._txCertificates),this._txWithdrawals.len()>0&&this._txBuilder.set_withdrawals(this._txWithdrawals),this._txBuilder.get_mint_builder()||this.notVisited("redeemValue")===!1){const d=this._era!==void 0?ln[this._era]:ln.BABBAGE;this._txBuilder.calc_script_data_hash(d)}}async forgeAssetsIfNeeded(){const d=(t,w)=>{const u=t.data.assetName,h=t.data.metadata,x=t.unit.slice(0,V_);if(t.data.label==="777")return h;if(w&&w[x]){const{[x]:B,...P}=w,c={[u]:h,...B};return{[x]:{...c},...P}}return w!==void 0?{[x]:{[u]:h},...w}:{[x]:{[u]:h}}};await this.addBurnInputsIfNeeded(),Array.from(this._totalMints,t=>({unit:t[0],data:t[1]})).reduce((t,w)=>t.set(w.data.label,d(w,t.get(w.data.label))),new Map).forEach((t,w)=>{this._txBuilder.add_json_metadatum(y.exports.BigNum.from_str(w),JSON.stringify(t))}),this.addMintOutputs()}async filterAvailableUTxOs(d=[]){return this._initiator===void 0?[]:(await this._initiator.getUsedUTxOs()).filter(w=>d.find(u=>u.input.txHash===w.input().transaction_id().to_hex())===void 0)}addMintOutputs(){this._recipients.forEach((d,t)=>{const u=Be(d).multiasset();if(u!==void 0){const x=Tr(t).next().with_asset_and_min_required_coin_by_utxo_cost(u,Zr(this._protocolParameters.coinsPerUTxOSize)).build();this._txBuilder.add_output(x)}})}notVisited(d){return this.__visits.includes(d)===!1}setTxOutput(d){const w=y.exports.BigNum.from_str(this._txOutputs.get(d.unit)??"0").checked_add(y.exports.BigNum.from_str(d.quantity)).to_str();this._txOutputs.set(d.unit,w)}};ze([Xe()],exports.Transaction.prototype,"mintAsset",null);ze([Xe()],exports.Transaction.prototype,"redeemValue",null);ze([Xe()],exports.Transaction.prototype,"sendAssets",null);ze([Xe()],exports.Transaction.prototype,"sendValue",null);ze([Xe()],exports.Transaction.prototype,"setCollateral",null);ze([Xe()],exports.Transaction.prototype,"setRequiredSigners",null);ze([Xe()],exports.Transaction.prototype,"setTxInputs",null);exports.Transaction=ze([Ms],exports.Transaction);var cr={exports:{}},oa={exports:{}},pn={exports:{}};(function(p){(function(d){var t,w=/^-?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?$/i,u=Math.ceil,h=Math.floor,x="[BigNumber Error] ",B=x+"Number primitive has more than 15 significant digits: ",P=1e14,c=14,z=9007199254740991,Y=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8,1e9,1e10,1e11,1e12,1e13],q=1e7,m=1e9;function G(_t){var g,D,Q,J=I.prototype={constructor:I,toString:null,valueOf:null},ct=new I(1),bt=20,xt=4,At=-7,pt=21,It=-1e7,Ut=1e7,Dt=!1,Pt=1,qt=0,K={prefix:"",groupSize:3,secondaryGroupSize:0,groupSeparator:",",decimalSeparator:".",fractionGroupSize:0,fractionGroupSeparator:"\xA0",suffix:""},R="0123456789abcdefghijklmnopqrstuvwxyz",V=!0;function I(k,A){var j,N,S,T,F,E,O,M,U=this;if(!(U instanceof I))return new I(k,A);if(A==null){if(k&&k._isBigNumber===!0){U.s=k.s,!k.c||k.e>Ut?U.c=U.e=null:k.e<It?U.c=[U.e=0]:(U.e=k.e,U.c=k.c.slice());return}if((E=typeof k=="number")&&k*0==0){if(U.s=1/k<0?(k=-k,-1):1,k===~~k){for(T=0,F=k;F>=10;F/=10,T++);T>Ut?U.c=U.e=null:(U.e=T,U.c=[k]);return}M=String(k)}else{if(!w.test(M=String(k)))return Q(U,M,E);U.s=M.charCodeAt(0)==45?(M=M.slice(1),-1):1}(T=M.indexOf("."))>-1&&(M=M.replace(".","")),(F=M.search(/e/i))>0?(T<0&&(T=F),T+=+M.slice(F+1),M=M.substring(0,F)):T<0&&(T=M.length)}else{if(v(A,2,R.length,"Base"),A==10&&V)return U=new I(k),et(U,bt+U.e+1,xt);if(M=String(k),E=typeof k=="number"){if(k*0!=0)return Q(U,M,E,A);if(U.s=1/k<0?(M=M.slice(1),-1):1,I.DEBUG&&M.replace(/^0\.0*|\./,"").length>15)throw Error(B+k)}else U.s=M.charCodeAt(0)===45?(M=M.slice(1),-1):1;for(j=R.slice(0,A),T=F=0,O=M.length;F<O;F++)if(j.indexOf(N=M.charAt(F))<0){if(N=="."){if(F>T){T=O;continue}}else if(!S&&(M==M.toUpperCase()&&(M=M.toLowerCase())||M==M.toLowerCase()&&(M=M.toUpperCase()))){S=!0,F=-1,T=0;continue}return Q(U,String(k),E,A)}E=!1,M=D(M,A,10,U.s),(T=M.indexOf("."))>-1?M=M.replace(".",""):T=M.length}for(F=0;M.charCodeAt(F)===48;F++);for(O=M.length;M.charCodeAt(--O)===48;);if(M=M.slice(F,++O)){if(O-=F,E&&I.DEBUG&&O>15&&(k>z||k!==h(k)))throw Error(B+U.s*k);if((T=T-F-1)>Ut)U.c=U.e=null;else if(T<It)U.c=[U.e=0];else{if(U.e=T,U.c=[],F=(T+1)%c,T<0&&(F+=c),F<O){for(F&&U.c.push(+M.slice(0,F)),O-=c;F<O;)U.c.push(+M.slice(F,F+=c));F=c-(M=M.slice(F)).length}else F-=O;for(;F--;M+="0");U.c.push(+M)}}else U.c=[U.e=0]}I.clone=G,I.ROUND_UP=0,I.ROUND_DOWN=1,I.ROUND_CEIL=2,I.ROUND_FLOOR=3,I.ROUND_HALF_UP=4,I.ROUND_HALF_DOWN=5,I.ROUND_HALF_EVEN=6,I.ROUND_HALF_CEIL=7,I.ROUND_HALF_FLOOR=8,I.EUCLID=9,I.config=I.set=function(k){var A,j;if(k!=null)if(typeof k=="object"){if(k.hasOwnProperty(A="DECIMAL_PLACES")&&(j=k[A],v(j,0,m,A),bt=j),k.hasOwnProperty(A="ROUNDING_MODE")&&(j=k[A],v(j,0,8,A),xt=j),k.hasOwnProperty(A="EXPONENTIAL_AT")&&(j=k[A],j&&j.pop?(v(j[0],-m,0,A),v(j[1],0,m,A),At=j[0],pt=j[1]):(v(j,-m,m,A),At=-(pt=j<0?-j:j))),k.hasOwnProperty(A="RANGE"))if(j=k[A],j&&j.pop)v(j[0],-m,-1,A),v(j[1],1,m,A),It=j[0],Ut=j[1];else if(v(j,-m,m,A),j)It=-(Ut=j<0?-j:j);else throw Error(x+A+" cannot be zero: "+j);if(k.hasOwnProperty(A="CRYPTO"))if(j=k[A],j===!!j)if(j)if(typeof crypto<"u"&&crypto&&(crypto.getRandomValues||crypto.randomBytes))Dt=j;else throw Dt=!j,Error(x+"crypto unavailable");else Dt=j;else throw Error(x+A+" not true or false: "+j);if(k.hasOwnProperty(A="MODULO_MODE")&&(j=k[A],v(j,0,9,A),Pt=j),k.hasOwnProperty(A="POW_PRECISION")&&(j=k[A],v(j,0,m,A),qt=j),k.hasOwnProperty(A="FORMAT"))if(j=k[A],typeof j=="object")K=j;else throw Error(x+A+" not an object: "+j);if(k.hasOwnProperty(A="ALPHABET"))if(j=k[A],typeof j=="string"&&!/^.?$|[+\-.\s]|(.).*\1/.test(j))V=j.slice(0,10)=="0123456789",R=j;else throw Error(x+A+" invalid: "+j)}else throw Error(x+"Object expected: "+k);return{DECIMAL_PLACES:bt,ROUNDING_MODE:xt,EXPONENTIAL_AT:[At,pt],RANGE:[It,Ut],CRYPTO:Dt,MODULO_MODE:Pt,POW_PRECISION:qt,FORMAT:K,ALPHABET:R}},I.isBigNumber=function(k){if(!k||k._isBigNumber!==!0)return!1;if(!I.DEBUG)return!0;var A,j,N=k.c,S=k.e,T=k.s;t:if({}.toString.call(N)=="[object Array]"){if((T===1||T===-1)&&S>=-m&&S<=m&&S===h(S)){if(N[0]===0){if(S===0&&N.length===1)return!0;break t}if(A=(S+1)%c,A<1&&(A+=c),String(N[0]).length==A){for(A=0;A<N.length;A++)if(j=N[A],j<0||j>=P||j!==h(j))break t;if(j!==0)return!0}}}else if(N===null&&S===null&&(T===null||T===1||T===-1))return!0;throw Error(x+"Invalid BigNumber: "+k)},I.maximum=I.max=function(){return ut(arguments,-1)},I.minimum=I.min=function(){return ut(arguments,1)},I.random=function(){var k=9007199254740992,A=Math.random()*k&2097151?function(){return h(Math.random()*k)}:function(){return(Math.random()*1073741824|0)*8388608+(Math.random()*8388608|0)};return function(j){var N,S,T,F,E,O=0,M=[],U=new I(ct);if(j==null?j=bt:v(j,0,m),F=u(j/c),Dt)if(crypto.getRandomValues){for(N=crypto.getRandomValues(new Uint32Array(F*=2));O<F;)E=N[O]*131072+(N[O+1]>>>11),E>=9e15?(S=crypto.getRandomValues(new Uint32Array(2)),N[O]=S[0],N[O+1]=S[1]):(M.push(E%1e14),O+=2);O=F/2}else if(crypto.randomBytes){for(N=crypto.randomBytes(F*=7);O<F;)E=(N[O]&31)*281474976710656+N[O+1]*1099511627776+N[O+2]*4294967296+N[O+3]*16777216+(N[O+4]<<16)+(N[O+5]<<8)+N[O+6],E>=9e15?crypto.randomBytes(7).copy(N,O):(M.push(E%1e14),O+=7);O=F/7}else throw Dt=!1,Error(x+"crypto unavailable");if(!Dt)for(;O<F;)E=A(),E<9e15&&(M[O++]=E%1e14);for(F=M[--O],j%=c,F&&j&&(E=Y[c-j],M[O]=h(F/E)*E);M[O]===0;M.pop(),O--);if(O<0)M=[T=0];else{for(T=-1;M[0]===0;M.splice(0,1),T-=c);for(O=1,E=M[0];E>=10;E/=10,O++);O<c&&(T-=c-O)}return U.e=T,U.c=M,U}}(),I.sum=function(){for(var k=1,A=arguments,j=new I(A[0]);k<A.length;)j=j.plus(A[k++]);return j},D=function(){var k="0123456789";function A(j,N,S,T){for(var F,E=[0],O,M=0,U=j.length;M<U;){for(O=E.length;O--;E[O]*=N);for(E[0]+=T.indexOf(j.charAt(M++)),F=0;F<E.length;F++)E[F]>S-1&&(E[F+1]==null&&(E[F+1]=0),E[F+1]+=E[F]/S|0,E[F]%=S)}return E.reverse()}return function(j,N,S,T,F){var E,O,M,U,L,W,Z,it,Bt=j.indexOf("."),vt=bt,at=xt;for(Bt>=0&&(U=qt,qt=0,j=j.replace(".",""),it=new I(N),W=it.pow(j.length-Bt),qt=U,it.c=A(a(tt(W.c),W.e,"0"),10,S,k),it.e=it.c.length),Z=A(j,N,S,F?(E=R,k):(E=k,R)),M=U=Z.length;Z[--U]==0;Z.pop());if(!Z[0])return E.charAt(0);if(Bt<0?--M:(W.c=Z,W.e=M,W.s=T,W=g(W,it,vt,at,S),Z=W.c,L=W.r,M=W.e),O=M+vt+1,Bt=Z[O],U=S/2,L=L||O<0||Z[O+1]!=null,L=at<4?(Bt!=null||L)&&(at==0||at==(W.s<0?3:2)):Bt>U||Bt==U&&(at==4||L||at==6&&Z[O-1]&1||at==(W.s<0?8:7)),O<1||!Z[0])j=L?a(E.charAt(1),-vt,E.charAt(0)):E.charAt(0);else{if(Z.length=O,L)for(--S;++Z[--O]>S;)Z[O]=0,O||(++M,Z=[1].concat(Z));for(U=Z.length;!Z[--U];);for(Bt=0,j="";Bt<=U;j+=E.charAt(Z[Bt++]));j=a(j,M,E.charAt(0))}return j}}(),g=function(){function k(N,S,T){var F,E,O,M,U=0,L=N.length,W=S%q,Z=S/q|0;for(N=N.slice();L--;)O=N[L]%q,M=N[L]/q|0,F=Z*O+M*W,E=W*O+F%q*q+U,U=(E/T|0)+(F/q|0)+Z*M,N[L]=E%T;return U&&(N=[U].concat(N)),N}function A(N,S,T,F){var E,O;if(T!=F)O=T>F?1:-1;else for(E=O=0;E<T;E++)if(N[E]!=S[E]){O=N[E]>S[E]?1:-1;break}return O}function j(N,S,T,F){for(var E=0;T--;)N[T]-=E,E=N[T]<S[T]?1:0,N[T]=E*F+N[T]-S[T];for(;!N[0]&&N.length>1;N.splice(0,1));}return function(N,S,T,F,E){var O,M,U,L,W,Z,it,Bt,vt,at,ft,Ot,o_,Xt,c_,Rt,__,Mt=N.s==S.s?1:-1,Kt=N.c,Et=S.c;if(!Kt||!Kt[0]||!Et||!Et[0])return new I(!N.s||!S.s||(Kt?Et&&Kt[0]==Et[0]:!Et)?NaN:Kt&&Kt[0]==0||!Et?Mt*0:Mt/0);for(Bt=new I(Mt),vt=Bt.c=[],M=N.e-S.e,Mt=T+M+1,E||(E=P,M=b(N.e/c)-b(S.e/c),Mt=Mt/c|0),U=0;Et[U]==(Kt[U]||0);U++);if(Et[U]>(Kt[U]||0)&&M--,Mt<0)vt.push(1),L=!0;else{for(Xt=Kt.length,Rt=Et.length,U=0,Mt+=2,W=h(E/(Et[0]+1)),W>1&&(Et=k(Et,W,E),Kt=k(Kt,W,E),Rt=Et.length,Xt=Kt.length),o_=Rt,at=Kt.slice(0,Rt),ft=at.length;ft<Rt;at[ft++]=0);__=Et.slice(),__=[0].concat(__),c_=Et[0],Et[1]>=E/2&&c_++;do{if(W=0,O=A(Et,at,Rt,ft),O<0){if(Ot=at[0],Rt!=ft&&(Ot=Ot*E+(at[1]||0)),W=h(Ot/c_),W>1)for(W>=E&&(W=E-1),Z=k(Et,W,E),it=Z.length,ft=at.length;A(Z,at,it,ft)==1;)W--,j(Z,Rt<it?__:Et,it,E),it=Z.length,O=1;else W==0&&(O=W=1),Z=Et.slice(),it=Z.length;if(it<ft&&(Z=[0].concat(Z)),j(at,Z,ft,E),ft=at.length,O==-1)for(;A(Et,at,Rt,ft)<1;)W++,j(at,Rt<ft?__:Et,ft,E),ft=at.length}else O===0&&(W++,at=[0]);vt[U++]=W,at[0]?at[ft++]=Kt[o_]||0:(at=[Kt[o_]],ft=1)}while((o_++<Xt||at[0]!=null)&&Mt--);L=at[0]!=null,vt[0]||vt.splice(0,1)}if(E==P){for(U=1,Mt=vt[0];Mt>=10;Mt/=10,U++);et(Bt,T+(Bt.e=U+M*c-1)+1,F,L)}else Bt.e=M,Bt.r=+L;return Bt}}();function wt(k,A,j,N){var S,T,F,E,O;if(j==null?j=xt:v(j,0,8),!k.c)return k.toString();if(S=k.c[0],F=k.e,A==null)O=tt(k.c),O=N==1||N==2&&(F<=At||F>=pt)?yt(O,F):a(O,F,"0");else if(k=et(new I(k),A,j),T=k.e,O=tt(k.c),E=O.length,N==1||N==2&&(A<=T||T<=At)){for(;E<A;O+="0",E++);O=yt(O,T)}else if(A-=F,O=a(O,T,"0"),T+1>E){if(--A>0)for(O+=".";A--;O+="0");}else if(A+=T-E,A>0)for(T+1==E&&(O+=".");A--;O+="0");return k.s<0&&S?"-"+O:O}function ut(k,A){for(var j,N,S=1,T=new I(k[0]);S<k.length;S++)N=new I(k[S]),(!N.s||(j=X(T,N))===A||j===0&&T.s===A)&&(T=N);return T}function st(k,A,j){for(var N=1,S=A.length;!A[--S];A.pop());for(S=A[0];S>=10;S/=10,N++);return(j=N+j*c-1)>Ut?k.c=k.e=null:j<It?k.c=[k.e=0]:(k.e=j,k.c=A),k}Q=function(){var k=/^(-?)0([xbo])(?=\w[\w.]*$)/i,A=/^([^.]+)\.$/,j=/^\.([^.]+)$/,N=/^-?(Infinity|NaN)$/,S=/^\s*\+(?=[\w.])|^\s+|\s+$/g;return function(T,F,E,O){var M,U=E?F:F.replace(S,"");if(N.test(U))T.s=isNaN(U)?null:U<0?-1:1;else{if(!E&&(U=U.replace(k,function(L,W,Z){return M=(Z=Z.toLowerCase())=="x"?16:Z=="b"?2:8,!O||O==M?W:L}),O&&(M=O,U=U.replace(A,"$1").replace(j,"0.$1")),F!=U))return new I(U,M);if(I.DEBUG)throw Error(x+"Not a"+(O?" base "+O:"")+" number: "+F);T.s=null}T.c=T.e=null}}();function et(k,A,j,N){var S,T,F,E,O,M,U,L=k.c,W=Y;if(L){t:{for(S=1,E=L[0];E>=10;E/=10,S++);if(T=A-S,T<0)T+=c,F=A,O=L[M=0],U=h(O/W[S-F-1]%10);else if(M=u((T+1)/c),M>=L.length)if(N){for(;L.length<=M;L.push(0));O=U=0,S=1,T%=c,F=T-c+1}else break t;else{for(O=E=L[M],S=1;E>=10;E/=10,S++);T%=c,F=T-c+S,U=F<0?0:h(O/W[S-F-1]%10)}if(N=N||A<0||L[M+1]!=null||(F<0?O:O%W[S-F-1]),N=j<4?(U||N)&&(j==0||j==(k.s<0?3:2)):U>5||U==5&&(j==4||N||j==6&&(T>0?F>0?O/W[S-F]:0:L[M-1])%10&1||j==(k.s<0?8:7)),A<1||!L[0])return L.length=0,N?(A-=k.e+1,L[0]=W[(c-A%c)%c],k.e=-A||0):L[0]=k.e=0,k;if(T==0?(L.length=M,E=1,M--):(L.length=M+1,E=W[c-T],L[M]=F>0?h(O/W[S-F]%W[F])*E:0),N)for(;;)if(M==0){for(T=1,F=L[0];F>=10;F/=10,T++);for(F=L[0]+=E,E=1;F>=10;F/=10,E++);T!=E&&(k.e++,L[0]==P&&(L[0]=1));break}else{if(L[M]+=E,L[M]!=P)break;L[M--]=0,E=1}for(T=L.length;L[--T]===0;L.pop());}k.e>Ut?k.c=k.e=null:k.e<It&&(k.c=[k.e=0])}return k}function ot(k){var A,j=k.e;return j===null?k.toString():(A=tt(k.c),A=j<=At||j>=pt?yt(A,j):a(A,j,"0"),k.s<0?"-"+A:A)}return J.absoluteValue=J.abs=function(){var k=new I(this);return k.s<0&&(k.s=1),k},J.comparedTo=function(k,A){return X(this,new I(k,A))},J.decimalPlaces=J.dp=function(k,A){var j,N,S,T=this;if(k!=null)return v(k,0,m),A==null?A=xt:v(A,0,8),et(new I(T),k+T.e+1,A);if(!(j=T.c))return null;if(N=((S=j.length-1)-b(this.e/c))*c,S=j[S])for(;S%10==0;S/=10,N--);return N<0&&(N=0),N},J.dividedBy=J.div=function(k,A){return g(this,new I(k,A),bt,xt)},J.dividedToIntegerBy=J.idiv=function(k,A){return g(this,new I(k,A),0,1)},J.exponentiatedBy=J.pow=function(k,A){var j,N,S,T,F,E,O,M,U,L=this;if(k=new I(k),k.c&&!k.isInteger())throw Error(x+"Exponent not an integer: "+ot(k));if(A!=null&&(A=new I(A)),E=k.e>14,!L.c||!L.c[0]||L.c[0]==1&&!L.e&&L.c.length==1||!k.c||!k.c[0])return U=new I(Math.pow(+ot(L),E?k.s*(2-nt(k)):+ot(k))),A?U.mod(A):U;if(O=k.s<0,A){if(A.c?!A.c[0]:!A.s)return new I(NaN);N=!O&&L.isInteger()&&A.isInteger(),N&&(L=L.mod(A))}else{if(k.e>9&&(L.e>0||L.e<-1||(L.e==0?L.c[0]>1||E&&L.c[1]>=24e7:L.c[0]<8e13||E&&L.c[0]<=9999975e7)))return T=L.s<0&&nt(k)?-0:0,L.e>-1&&(T=1/T),new I(O?1/T:T);qt&&(T=u(qt/c+2))}for(E?(j=new I(.5),O&&(k.s=1),M=nt(k)):(S=Math.abs(+ot(k)),M=S%2),U=new I(ct);;){if(M){if(U=U.times(L),!U.c)break;T?U.c.length>T&&(U.c.length=T):N&&(U=U.mod(A))}if(S){if(S=h(S/2),S===0)break;M=S%2}else if(k=k.times(j),et(k,k.e+1,1),k.e>14)M=nt(k);else{if(S=+ot(k),S===0)break;M=S%2}L=L.times(L),T?L.c&&L.c.length>T&&(L.c.length=T):N&&(L=L.mod(A))}return N?U:(O&&(U=ct.div(U)),A?U.mod(A):T?et(U,qt,xt,F):U)},J.integerValue=function(k){var A=new I(this);return k==null?k=xt:v(k,0,8),et(A,A.e+1,k)},J.isEqualTo=J.eq=function(k,A){return X(this,new I(k,A))===0},J.isFinite=function(){return!!this.c},J.isGreaterThan=J.gt=function(k,A){return X(this,new I(k,A))>0},J.isGreaterThanOrEqualTo=J.gte=function(k,A){return(A=X(this,new I(k,A)))===1||A===0},J.isInteger=function(){return!!this.c&&b(this.e/c)>this.c.length-2},J.isLessThan=J.lt=function(k,A){return X(this,new I(k,A))<0},J.isLessThanOrEqualTo=J.lte=function(k,A){return(A=X(this,new I(k,A)))===-1||A===0},J.isNaN=function(){return!this.s},J.isNegative=function(){return this.s<0},J.isPositive=function(){return this.s>0},J.isZero=function(){return!!this.c&&this.c[0]==0},J.minus=function(k,A){var j,N,S,T,F=this,E=F.s;if(k=new I(k,A),A=k.s,!E||!A)return new I(NaN);if(E!=A)return k.s=-A,F.plus(k);var O=F.e/c,M=k.e/c,U=F.c,L=k.c;if(!O||!M){if(!U||!L)return U?(k.s=-A,k):new I(L?F:NaN);if(!U[0]||!L[0])return L[0]?(k.s=-A,k):new I(U[0]?F:xt==3?-0:0)}if(O=b(O),M=b(M),U=U.slice(),E=O-M){for((T=E<0)?(E=-E,S=U):(M=O,S=L),S.reverse(),A=E;A--;S.push(0));S.reverse()}else for(N=(T=(E=U.length)<(A=L.length))?E:A,E=A=0;A<N;A++)if(U[A]!=L[A]){T=U[A]<L[A];break}if(T&&(S=U,U=L,L=S,k.s=-k.s),A=(N=L.length)-(j=U.length),A>0)for(;A--;U[j++]=0);for(A=P-1;N>E;){if(U[--N]<L[N]){for(j=N;j&&!U[--j];U[j]=A);--U[j],U[N]+=P}U[N]-=L[N]}for(;U[0]==0;U.splice(0,1),--M);return U[0]?st(k,U,M):(k.s=xt==3?-1:1,k.c=[k.e=0],k)},J.modulo=J.mod=function(k,A){var j,N,S=this;return k=new I(k,A),!S.c||!k.s||k.c&&!k.c[0]?new I(NaN):!k.c||S.c&&!S.c[0]?new I(S):(Pt==9?(N=k.s,k.s=1,j=g(S,k,0,3),k.s=N,j.s*=N):j=g(S,k,0,Pt),k=S.minus(j.times(k)),!k.c[0]&&Pt==1&&(k.s=S.s),k)},J.multipliedBy=J.times=function(k,A){var j,N,S,T,F,E,O,M,U,L,W,Z,it,Bt,vt,at=this,ft=at.c,Ot=(k=new I(k,A)).c;if(!ft||!Ot||!ft[0]||!Ot[0])return!at.s||!k.s||ft&&!ft[0]&&!Ot||Ot&&!Ot[0]&&!ft?k.c=k.e=k.s=null:(k.s*=at.s,!ft||!Ot?k.c=k.e=null:(k.c=[0],k.e=0)),k;for(N=b(at.e/c)+b(k.e/c),k.s*=at.s,O=ft.length,L=Ot.length,O<L&&(it=ft,ft=Ot,Ot=it,S=O,O=L,L=S),S=O+L,it=[];S--;it.push(0));for(Bt=P,vt=q,S=L;--S>=0;){for(j=0,W=Ot[S]%vt,Z=Ot[S]/vt|0,F=O,T=S+F;T>S;)M=ft[--F]%vt,U=ft[F]/vt|0,E=Z*M+U*W,M=W*M+E%vt*vt+it[T]+j,j=(M/Bt|0)+(E/vt|0)+Z*U,it[T--]=M%Bt;it[T]=j}return j?++N:it.splice(0,1),st(k,it,N)},J.negated=function(){var k=new I(this);return k.s=-k.s||null,k},J.plus=function(k,A){var j,N=this,S=N.s;if(k=new I(k,A),A=k.s,!S||!A)return new I(NaN);if(S!=A)return k.s=-A,N.minus(k);var T=N.e/c,F=k.e/c,E=N.c,O=k.c;if(!T||!F){if(!E||!O)return new I(S/0);if(!E[0]||!O[0])return O[0]?k:new I(E[0]?N:S*0)}if(T=b(T),F=b(F),E=E.slice(),S=T-F){for(S>0?(F=T,j=O):(S=-S,j=E),j.reverse();S--;j.push(0));j.reverse()}for(S=E.length,A=O.length,S-A<0&&(j=O,O=E,E=j,A=S),S=0;A;)S=(E[--A]=E[A]+O[A]+S)/P|0,E[A]=P===E[A]?0:E[A]%P;return S&&(E=[S].concat(E),++F),st(k,E,F)},J.precision=J.sd=function(k,A){var j,N,S,T=this;if(k!=null&&k!==!!k)return v(k,1,m),A==null?A=xt:v(A,0,8),et(new I(T),k,A);if(!(j=T.c))return null;if(S=j.length-1,N=S*c+1,S=j[S]){for(;S%10==0;S/=10,N--);for(S=j[0];S>=10;S/=10,N++);}return k&&T.e+1>N&&(N=T.e+1),N},J.shiftedBy=function(k){return v(k,-z,z),this.times("1e"+k)},J.squareRoot=J.sqrt=function(){var k,A,j,N,S,T=this,F=T.c,E=T.s,O=T.e,M=bt+4,U=new I("0.5");if(E!==1||!F||!F[0])return new I(!E||E<0&&(!F||F[0])?NaN:F?T:1/0);if(E=Math.sqrt(+ot(T)),E==0||E==1/0?(A=tt(F),(A.length+O)%2==0&&(A+="0"),E=Math.sqrt(+A),O=b((O+1)/2)-(O<0||O%2),E==1/0?A="5e"+O:(A=E.toExponential(),A=A.slice(0,A.indexOf("e")+1)+O),j=new I(A)):j=new I(E+""),j.c[0]){for(O=j.e,E=O+M,E<3&&(E=0);;)if(S=j,j=U.times(S.plus(g(T,S,M,1))),tt(S.c).slice(0,E)===(A=tt(j.c)).slice(0,E))if(j.e<O&&--E,A=A.slice(E-3,E+1),A=="9999"||!N&&A=="4999"){if(!N&&(et(S,S.e+bt+2,0),S.times(S).eq(T))){j=S;break}M+=4,E+=4,N=1}else{(!+A||!+A.slice(1)&&A.charAt(0)=="5")&&(et(j,j.e+bt+2,1),k=!j.times(j).eq(T));break}}return et(j,j.e+bt+1,xt,k)},J.toExponential=function(k,A){return k!=null&&(v(k,0,m),k++),wt(this,k,A,1)},J.toFixed=function(k,A){return k!=null&&(v(k,0,m),k=k+this.e+1),wt(this,k,A)},J.toFormat=function(k,A,j){var N,S=this;if(j==null)k!=null&&A&&typeof A=="object"?(j=A,A=null):k&&typeof k=="object"?(j=k,k=A=null):j=K;else if(typeof j!="object")throw Error(x+"Argument not an object: "+j);if(N=S.toFixed(k,A),S.c){var T,F=N.split("."),E=+j.groupSize,O=+j.secondaryGroupSize,M=j.groupSeparator||"",U=F[0],L=F[1],W=S.s<0,Z=W?U.slice(1):U,it=Z.length;if(O&&(T=E,E=O,O=T,it-=T),E>0&&it>0){for(T=it%E||E,U=Z.substr(0,T);T<it;T+=E)U+=M+Z.substr(T,E);O>0&&(U+=M+Z.slice(T)),W&&(U="-"+U)}N=L?U+(j.decimalSeparator||"")+((O=+j.fractionGroupSize)?L.replace(new RegExp("\\d{"+O+"}\\B","g"),"$&"+(j.fractionGroupSeparator||"")):L):U}return(j.prefix||"")+N+(j.suffix||"")},J.toFraction=function(k){var A,j,N,S,T,F,E,O,M,U,L,W,Z=this,it=Z.c;if(k!=null&&(E=new I(k),!E.isInteger()&&(E.c||E.s!==1)||E.lt(ct)))throw Error(x+"Argument "+(E.isInteger()?"out of range: ":"not an integer: ")+ot(E));if(!it)return new I(Z);for(A=new I(ct),M=j=new I(ct),N=O=new I(ct),W=tt(it),T=A.e=W.length-Z.e-1,A.c[0]=Y[(F=T%c)<0?c+F:F],k=!k||E.comparedTo(A)>0?T>0?A:M:E,F=Ut,Ut=1/0,E=new I(W),O.c[0]=0;U=g(E,A,0,1),S=j.plus(U.times(N)),S.comparedTo(k)!=1;)j=N,N=S,M=O.plus(U.times(S=M)),O=S,A=E.minus(U.times(S=A)),E=S;return S=g(k.minus(j),N,0,1),O=O.plus(S.times(M)),j=j.plus(S.times(N)),O.s=M.s=Z.s,T=T*2,L=g(M,N,T,xt).minus(Z).abs().comparedTo(g(O,j,T,xt).minus(Z).abs())<1?[M,N]:[O,j],Ut=F,L},J.toNumber=function(){return+ot(this)},J.toPrecision=function(k,A){return k!=null&&v(k,1,m),wt(this,k,A,2)},J.toString=function(k){var A,j=this,N=j.s,S=j.e;return S===null?N?(A="Infinity",N<0&&(A="-"+A)):A="NaN":(k==null?A=S<=At||S>=pt?yt(tt(j.c),S):a(tt(j.c),S,"0"):k===10&&V?(j=et(new I(j),bt+S+1,xt),A=a(tt(j.c),j.e,"0")):(v(k,2,R.length,"Base"),A=D(a(tt(j.c),S,"0"),10,k,N,!0)),N<0&&j.c[0]&&(A="-"+A)),A},J.valueOf=J.toJSON=function(){return ot(this)},J._isBigNumber=!0,_t!=null&&I.set(_t),I}function b(_t){var g=_t|0;return _t>0||_t===g?g:g-1}function tt(_t){for(var g,D,Q=1,J=_t.length,ct=_t[0]+"";Q<J;){for(g=_t[Q++]+"",D=c-g.length;D--;g="0"+g);ct+=g}for(J=ct.length;ct.charCodeAt(--J)===48;);return ct.slice(0,J+1||1)}function X(_t,g){var D,Q,J=_t.c,ct=g.c,bt=_t.s,xt=g.s,At=_t.e,pt=g.e;if(!bt||!xt)return null;if(D=J&&!J[0],Q=ct&&!ct[0],D||Q)return D?Q?0:-xt:bt;if(bt!=xt)return bt;if(D=bt<0,Q=At==pt,!J||!ct)return Q?0:!J^D?1:-1;if(!Q)return At>pt^D?1:-1;for(xt=(At=J.length)<(pt=ct.length)?At:pt,bt=0;bt<xt;bt++)if(J[bt]!=ct[bt])return J[bt]>ct[bt]^D?1:-1;return At==pt?0:At>pt^D?1:-1}function v(_t,g,D,Q){if(_t<g||_t>D||_t!==h(_t))throw Error(x+(Q||"Argument")+(typeof _t=="number"?_t<g||_t>D?" out of range: ":" not an integer: ":" not a primitive number: ")+String(_t))}function nt(_t){var g=_t.c.length-1;return b(_t.e/c)==g&&_t.c[g]%2!=0}function yt(_t,g){return(_t.length>1?_t.charAt(0)+"."+_t.slice(1):_t)+(g<0?"e":"e+")+g}function a(_t,g,D){var Q,J;if(g<0){for(J=D+".";++g;J+=D);_t=J+_t}else if(Q=_t.length,++g>Q){for(J=D,g-=Q;--g;J+=D);_t+=J}else g<Q&&(_t=_t.slice(0,g)+"."+_t.slice(g));return _t}t=G(),t.default=t.BigNumber=t,p.exports?p.exports=t:(d||(d=typeof self<"u"&&self?self:window),d.BigNumber=t)})(Mr)})(pn);(function(p){var d=pn.exports,t=p.exports;(function(){var w=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,u,h,x={"\b":"\\b"," ":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},B;function P(z){return w.lastIndex=0,w.test(z)?'"'+z.replace(w,function(Y){var q=x[Y];return typeof q=="string"?q:"\\u"+("0000"+Y.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+z+'"'}function c(z,Y){var q,m,G,b,tt=u,X,v=Y[z],nt=v!=null&&(v instanceof d||d.isBigNumber(v));switch(v&&typeof v=="object"&&typeof v.toJSON=="function"&&(v=v.toJSON(z)),typeof B=="function"&&(v=B.call(Y,z,v)),typeof v){case"string":return nt?v:P(v);case"number":return isFinite(v)?String(v):"null";case"boolean":case"null":case"bigint":return String(v);case"object":if(!v)return"null";if(u+=h,X=[],Object.prototype.toString.apply(v)==="[object Array]"){for(b=v.length,q=0;q<b;q+=1)X[q]=c(q,v)||"null";return G=X.length===0?"[]":u?`[
|
|
12
|
-
`+
|
|
13
|
-
`+
|
|
14
|
-
`+tt+"]":"["+X.join(",")+"]",
|
|
15
|
-
`+
|
|
16
|
-
`+
|
|
17
|
-
`+tt+"}":"{"+X.join(",")+"}",
|
|
18
|
-
`,r:"\r",t:" "},h,x=function(b){throw{name:"SyntaxError",message:b,at:t,text:h}},B=function(b){return b&&b!==w&&x("Expected '"+b+"' instead of '"+w+"'"),w=h.charAt(t),t+=1,w},P=function(){var b,tt="";for(w==="-"&&(tt="-",B("-"));w>="0"&&w<="9";)tt+=w,B();if(w===".")for(tt+=".";B()&&w>="0"&&w<="9";)tt+=w;if(w==="e"||w==="E")for(tt+=w,B(),(w==="-"||w==="+")&&(tt+=w,B());w>="0"&&w<="9";)tt+=w,B();if(b=+tt,!isFinite(b))x("Bad number");else return Nr==null&&(Nr=pn.exports),tt.length>15?d.storeAsString?tt:d.useNativeBigInt?BigInt(tt):new Nr(tt):d.alwaysParseAsBig?d.useNativeBigInt?BigInt(b):new Nr(b):b},c=function(){var b,tt,X="",v;if(w==='"')for(var nt=t;B();){if(w==='"')return t-1>nt&&(X+=h.substring(nt,t-1)),B(),X;if(w==="\\"){if(t-1>nt&&(X+=h.substring(nt,t-1)),B(),w==="u"){for(v=0,tt=0;tt<4&&(b=parseInt(B(),16),!!isFinite(b));tt+=1)v=v*16+b;X+=String.fromCharCode(v)}else if(typeof u[w]=="string")X+=u[w];else break;nt=t}}x("Bad string")},z=function(){for(;w&&w<=" ";)B()},Y=function(){switch(w){case"t":return B("t"),B("r"),B("u"),B("e"),!0;case"f":return B("f"),B("a"),B("l"),B("s"),B("e"),!1;case"n":return B("n"),B("u"),B("l"),B("l"),null}x("Unexpected '"+w+"'")},q,m=function(){var b=[];if(w==="["){if(B("["),z(),w==="]")return B("]"),b;for(;w;){if(b.push(q()),z(),w==="]")return B("]"),b;B(","),z()}}x("Bad array")},G=function(){var b,tt=Object.create(null);if(w==="{"){if(B("{"),z(),w==="}")return B("}"),tt;for(;w;){if(b=c(),z(),B(":"),d.strict===!0&&Object.hasOwnProperty.call(tt,b)&&x('Duplicate key "'+b+'"'),Ks.test(b)===!0?d.protoAction==="error"?x("Object contains forbidden prototype property"):d.protoAction==="ignore"?q():tt[b]=q():Hs.test(b)===!0?d.constructorAction==="error"?x("Object contains forbidden constructor property"):d.constructorAction==="ignore"?q():tt[b]=q():tt[b]=q(),z(),w==="}")return B("}"),tt;B(","),z()}}x("Bad object")};return q=function(){switch(z(),w){case"{":return G();case"[":return m();case'"':return c();case"-":return P();default:return w>="0"&&w<="9"?P():Y()}},function(b,tt){var X;return h=b+"",t=0,w=" ",X=q(),z(),w&&x("Syntax error"),typeof tt=="function"?function v(nt,yt){var a,_t=nt[yt];return _t&&typeof _t=="object"&&Object.keys(_t).forEach(function(g){a=v(_t,g),a!==void 0?_t[g]=a:delete _t[g]}),tt.call(nt,yt,_t)}({"":X},""):X}},Rs=qs,ia=oa.exports.stringify,da=Rs;cr.exports=function(p){return{parse:da(p),stringify:ia}};cr.exports.parse=da();cr.exports.stringify=ia;class zs{txHex="";txBuilder=Fr();txEvaluationMultiplier=1.1;_protocolParams=y_;txOutput;addingScriptInput=!1;addingPlutusMint=!1;isHydra=!1;meshTxBuilderBody;mintItem;txInQueueItem;collateralQueueItem;refScriptTxInQueueItem;reset=()=>(this.txHex="",this.txBuilder=Fr(),this.txEvaluationMultiplier=1.1,this._protocolParams=y_,this.txOutput=void 0,this.addingScriptInput=!1,this.addingPlutusMint=!1,this.mintItem=void 0,this.txInQueueItem=void 0,this.collateralQueueItem=void 0,this.refScriptTxInQueueItem=void 0,this.meshTxBuilderBody=this.emptyTxBuilderBody(),this);emptyTxBuilderBody=()=>({inputs:[],outputs:[],extraInputs:[],selectionThreshold:0,collaterals:[],requiredSignatures:[],referenceInputs:[],mints:[],changeAddress:"",metadata:[],validityRange:{},certificates:[],signingKey:[]});constructor(){this.meshTxBuilderBody=this.emptyTxBuilderBody()}completeSync=d=>(d?this.meshTxBuilderBody=d:this.queueAllLastItem(),this.serializeTxBody(this.meshTxBuilderBody));completeSigning=()=>{const{signingKey:d}=this.meshTxBuilderBody;return d.length>0&&this.addAllSigningKeys(d),this.txHex};serializeTxBody=d=>{const{inputs:t,outputs:w,extraInputs:u,selectionThreshold:h,collaterals:x,referenceInputs:B,mints:P,changeAddress:c,certificates:z,validityRange:Y,requiredSignatures:q,metadata:m}=d;if(this.isHydra?this.protocolParams({minFeeA:0,minFeeB:0,priceMem:0,priceStep:0,collateralPercent:0,coinsPerUTxOSize:"0"}):this.protocolParams({}),u.length>0&&this.addUtxosFrom(u,String(h)),this.removeDuplicateInputs(),this.meshTxBuilderBody.mints.sort((G,b)=>G.policyId.localeCompare(b.policyId)),this.meshTxBuilderBody.inputs.sort((G,b)=>G.txIn.txHash===b.txIn.txHash?G.txIn.txIndex-b.txIn.txIndex:G.txIn.txHash.localeCompare(b.txIn.txHash)),this.addAllInputs(t),this.addAllOutputs(w),this.addAllCollaterals(x),this.addAllReferenceInputs(B),this.addAllMints(P),this.addAllCertificates(z),this.addValidityRange(Y),this.addAllRequiredSignatures(q),this.addAllMetadata(m),this.addCostModels(),c){const G=this.meshTxBuilderBody.collaterals.map(X=>{var v,nt;return((nt=(v=X.txIn.amount)==null?void 0:v.find(yt=>yt.unit==="lovelace"))==null?void 0:nt.quantity)||"0"}).reduce((X,v)=>X+parseInt(v),0),b=Math.ceil(this._protocolParams.collateralPercent*Number(Number(this.txBuilder.min_fee().checked_add(y.exports.BigNum.from_str("10000")).to_js_value()))/100);let tt=!1;if(G-b>0){const X=y.exports.TransactionOutput.new(y.exports.Address.from_bech32(c),y.exports.Value.new(y.exports.BigNum.from_str(String(b))));G-b>Number(y.exports.min_ada_for_output(X,y.exports.DataCost.new_coins_per_byte(y.exports.BigNum.from_str(this._protocolParams.coinsPerUTxOSize))).to_js_value())&&(this.txBuilder.set_collateral_return(y.exports.TransactionOutput.new(y.exports.Address.from_bech32(c),y.exports.Value.new(y.exports.BigNum.from_str(String(G))))),this.txBuilder.set_total_collateral(y.exports.BigNum.from_str(String(G))),tt=!0)}this.addChange(c),tt&&this.addCollateralReturn(c)}return this.buildTx(),this};txIn=(d,t,w,u)=>(this.txInQueueItem&&this.queueInput(),this.addingScriptInput?this.txInQueueItem={type:"Script",txIn:{txHash:d,txIndex:t,amount:w,address:u},scriptTxIn:{}}:this.txInQueueItem={type:"PubKey",txIn:{txHash:d,txIndex:t,amount:w,address:u}},this.addingScriptInput=!1,this);txInScript=(d,t="V2")=>{if(!this.txInQueueItem)throw Error("Undefined input");if(this.txInQueueItem.type==="PubKey")throw Error("Datum value attempted to be called a non script input");return this.txInQueueItem.scriptTxIn.scriptSource={type:"Provided",script:{code:d,version:t}},this};txInDatumValue=(d,t="Mesh")=>{if(!this.txInQueueItem)throw Error("Undefined input");if(this.txInQueueItem.type==="PubKey")throw Error("Datum value attempted to be called a non script input");let w=d;return t==="JSON"&&(w=this.castRawDataToJsonString(d)),t==="Mesh"?(this.txInQueueItem.scriptTxIn.datumSource={type:"Provided",data:{type:t,content:d}},this):(this.txInQueueItem.scriptTxIn.datumSource={type:"Provided",data:{type:t,content:w}},this)};txInInlineDatumPresent=()=>{if(!this.txInQueueItem)throw Error("Undefined input");if(this.txInQueueItem.type==="PubKey")throw Error("Inline datum present attempted to be called a non script input");const{txHash:d,txIndex:t}=this.txInQueueItem.txIn;return d&&t.toString()&&(this.txInQueueItem.scriptTxIn.datumSource={type:"Inline",txHash:d,txIndex:t}),this};txInRedeemerValue=(d,t={...or},w="Mesh")=>{if(!this.txInQueueItem)throw Error("Undefined input");if(this.txInQueueItem.type==="PubKey")throw Error("Spending tx in reference redeemer attempted to be called a non script input");let u=d;return w==="Mesh"?(this.txInQueueItem.scriptTxIn.redeemer={data:{type:w,content:d},exUnits:t},this):(w==="JSON"&&(u=this.castRawDataToJsonString(d)),this.txInQueueItem.scriptTxIn.redeemer={data:{type:w,content:u},exUnits:t},this)};txOut=(d,t)=>(this.txOutput&&(this.meshTxBuilderBody.outputs.push(this.txOutput),this.txOutput=void 0),this.txOutput={address:d,amount:t},this);txOutDatumHashValue=(d,t="Mesh")=>{let w=d;if(this.txOutput){if(t==="Mesh")return this.txOutput.datum={type:"Hash",data:{type:t,content:w}},this;t==="JSON"&&(w=this.castRawDataToJsonString(d)),this.txOutput.datum={type:"Hash",data:{type:t,content:w}}}return this};txOutInlineDatumValue=(d,t="Mesh")=>{let w=d;if(this.txOutput){if(t==="Mesh")return this.txOutput.datum={type:"Inline",data:{type:t,content:w}},this;t==="JSON"&&(w=this.castRawDataToJsonString(d)),this.txOutput.datum={type:"Inline",data:{type:t,content:w}}}return this};txOutReferenceScript=(d,t="V2")=>(this.txOutput&&(this.txOutput.referenceScript={code:d,version:t}),this);spendingPlutusScriptV2=()=>(this.addingScriptInput=!0,this);spendingTxInReference=(d,t,w,u="V2")=>{if(!this.txInQueueItem)throw Error("Undefined input");if(this.txInQueueItem.type==="PubKey")throw Error("Spending tx in reference attempted to be called a non script input");return this.txInQueueItem.scriptTxIn.scriptSource={type:"Inline",txInInfo:{txHash:d,txIndex:t,spendingScriptHash:w,version:u}},this};spendingReferenceTxInInlineDatumPresent=()=>(this.txInInlineDatumPresent(),this);spendingReferenceTxInRedeemerValue=(d,t={...or},w="Mesh")=>(this.txInRedeemerValue(d,t,w),this);readOnlyTxInReference=(d,t)=>(this.meshTxBuilderBody.referenceInputs.push({txHash:d,txIndex:t}),this);mintPlutusScriptV2=()=>(this.addingPlutusMint=!0,this);mint=(d,t,w)=>(this.mintItem&&this.queueMint(),this.mintItem={type:this.addingPlutusMint?"Plutus":"Native",policyId:t,assetName:w,amount:d},this.addingPlutusMint=!1,this);mintingScript=(d,t="V2")=>{if(!this.mintItem)throw Error("Undefined mint");if(!this.mintItem.type)throw Error("Mint information missing");return this.mintItem.scriptSource={type:"Provided",script:{code:d,version:t}},this};mintTxInReference=(d,t,w="V2")=>{if(!this.mintItem)throw Error("Undefined mint");if(!this.mintItem.type)throw Error("Mint information missing");if(this.mintItem.type=="Native")throw Error("Mint tx in reference can only be used on plutus script tokens");if(!this.mintItem.policyId)throw Error("PolicyId information missing from mint asset");return this.mintItem.scriptSource={type:"Reference Script",txHash:d,txIndex:t,version:w},this};mintReferenceTxInRedeemerValue=(d,t={...or},w="Mesh")=>{if(!this.mintItem)throw Error("Undefined mint");if(this.mintItem.type=="Native")throw Error("Mint tx in reference can only be used on plutus script tokens");if(this.mintItem.type=="Plutus"){if(!this.mintItem.policyId)throw Error("PolicyId information missing from mint asset");let u=d;if(w==="Mesh")return this.mintItem.redeemer={data:{type:w,content:u},exUnits:t},this;w==="JSON"&&(u=this.castRawDataToJsonString(d)),this.mintItem.redeemer={data:{type:w,content:u},exUnits:t}}return this};mintRedeemerValue=(d,t={...or},w="Mesh")=>(this.mintReferenceTxInRedeemerValue(d,t,w),this);requiredSignerHash=d=>(this.meshTxBuilderBody.requiredSignatures.push(d),this);txInCollateral=(d,t,w,u)=>(this.collateralQueueItem&&this.meshTxBuilderBody.collaterals.push(this.collateralQueueItem),this.collateralQueueItem={type:"PubKey",txIn:{txHash:d,txIndex:t,amount:w,address:u}},this);registerPoolCertificate=d=>(this.meshTxBuilderBody.certificates.push({type:"RegisterPool",poolParams:d}),this);registerStakeCertificate=d=>(this.meshTxBuilderBody.certificates.push({type:"RegisterStake",stakeKeyHash:d}),this);delegateStakeCertificate=(d,t)=>(this.meshTxBuilderBody.certificates.push({type:"DelegateStake",stakeKeyHash:d,poolId:t}),this);deregisterStakeCertificate=d=>(this.meshTxBuilderBody.certificates.push({type:"DeregisterStake",stakeKeyHash:d}),this);retirePoolCertificate=(d,t)=>(this.meshTxBuilderBody.certificates.push({type:"RetirePool",poolId:d,epoch:t}),this);changeAddress=d=>(this.meshTxBuilderBody.changeAddress=d,this);invalidBefore=d=>(this.meshTxBuilderBody.validityRange.invalidBefore=d,this);invalidHereafter=d=>(this.meshTxBuilderBody.validityRange.invalidHereafter=d,this);metadataValue=(d,t)=>(this.meshTxBuilderBody.metadata.push({tag:d,metadata:t}),this);protocolParams=d=>{const t={...y_,...d};return this._protocolParams=t,this.txBuilder=Fr(t),this};signingKey=d=>(this.meshTxBuilderBody.signingKey.push(d),this);selectUtxosFrom=(d,t=5e6)=>(this.meshTxBuilderBody.extraInputs=d,this.meshTxBuilderBody.selectionThreshold=t,this);addUtxosFrom=(d,t)=>{const w=this.meshTxBuilderBody.outputs.reduce((h,x)=>(x.amount.forEach(P=>{const{unit:c,quantity:z}=P,Y=Number(h.get(c))||0;h.set(c,String(Y+Number(z)))}),h),new Map);this.meshTxBuilderBody.inputs.reduce((h,x)=>{const B=x.txIn.amount;return B==null||B.forEach(P=>{const{unit:c,quantity:z}=P,Y=Number(h.get(c))||0;h.set(c,String(Y-Number(z)))}),h},w),this.meshTxBuilderBody.mints.reduce((h,x)=>{const B={unit:x.policyId+x.assetName,quantity:String(x.amount)},P=Number(h.get(B.unit))||0;return h.set(B.unit,String(P-Number(B.quantity))),h},w),ds(d,w,t).forEach(h=>{this.addTxIn({type:"PubKey",txIn:{txHash:h.input.txHash,txIndex:h.input.outputIndex,amount:h.output.amount,address:h.output.address}})})};addAllSigningKeys=d=>{if(d.length>0){const t=y.exports.Vkeywitnesses.new(),w=y.exports.Transaction.from_hex(this.txHex),u=w.body();d.forEach(B=>{const P=B.slice(0,4)==="5820"?B.slice(4):B,c=y.exports.PrivateKey.from_hex(P),z=y.exports.make_vkey_witness(y.exports.hash_transaction(u),c);t.add(z)});const h=w.witness_set();h.set_vkeys(t);const x=y.exports.Transaction.new(u,h,w.auxiliary_data());this.txHex=x.to_hex()}};buildTx=()=>{const d=this.txBuilder.build_tx();this.txHex=d.to_hex()};queueInput=()=>{if(!this.txInQueueItem)throw Error("Undefined input");if(this.txInQueueItem.type==="Script")if(this.txInQueueItem.scriptTxIn){if(!this.txInQueueItem.scriptTxIn.datumSource)throw Error("Script input does not contain datum information");if(!this.txInQueueItem.scriptTxIn.redeemer)throw Error("Script input does not contain redeemer information");if(!this.txInQueueItem.scriptTxIn.scriptSource)throw Error("Script input does not contain script information")}else throw Error("Script input does not contain script, datum, or redeemer information");this.meshTxBuilderBody.inputs.push(this.txInQueueItem),this.txInQueueItem=void 0};queueMint=()=>{if(!this.mintItem)throw Error("Undefined mint");if(!this.mintItem.scriptSource)throw Error("Missing mint script information");this.meshTxBuilderBody.mints.push(this.mintItem),this.mintItem=void 0};makePlutusScriptSource=d=>{const t=y.exports.ScriptHash.from_hex(d.spendingScriptHash),w=y.exports.TransactionInput.new(y.exports.TransactionHash.from_hex(d.txHash),d.txIndex);return y.exports.PlutusScriptSource.new_ref_input_with_lang_ver(t,w,Ce[d.version])};removeDuplicateInputs=()=>{const d=this.meshTxBuilderBody.inputs,t=u=>`${u.txHash}#${u.txIndex}`,w=[];for(let u=0;u<d.length;u++){const h=t(d[u].txIn);w.includes(h)?(d.splice(u,1),u--):w.push(h)}};addAllInputs=d=>{for(let t=0;t<d.length;t++){const w=d[t];switch(w.type){case"PubKey":this.addTxIn(w);break;case"Script":this.addScriptTxIn(w);break}}};addTxIn=d=>{this.txBuilder.add_input(y.exports.Address.from_bech32(d.txIn.address),y.exports.TransactionInput.new(y.exports.TransactionHash.from_hex(d.txIn.txHash),d.txIn.txIndex),Be(d.txIn.amount))};addScriptTxIn=({scriptTxIn:d,txIn:t})=>{let w;const{datumSource:u,scriptSource:h,redeemer:x}=d;if(u.type==="Provided")w=y.exports.DatumSource.new(this.castDataToPlutusData(u.data));else{const c=y.exports.TransactionInput.new(y.exports.TransactionHash.from_hex(u.txHash),u.txIndex);w=y.exports.DatumSource.new_ref_input(c)}let B;h.type=="Inline"?B=this.makePlutusScriptSource(h.txInInfo):B=y.exports.PlutusScriptSource.new(y.exports.PlutusScript.from_hex_with_version(h.script.code,Ce[h.script.version]));const P=y.exports.Redeemer.new(y.exports.RedeemerTag.new_spend(),y.exports.BigNum.from_str("0"),this.castDataToPlutusData(x.data),y.exports.ExUnits.new(y.exports.BigNum.from_str(String(x.exUnits.mem)),y.exports.BigNum.from_str(String(x.exUnits.steps))));this.txBuilder.add_plutus_script_input(y.exports.PlutusWitness.new_with_ref(B,w,P),y.exports.TransactionInput.new(y.exports.TransactionHash.from_hex(t.txHash),t.txIndex),Be(t.amount))};addAllOutputs=d=>{for(let t=0;t<d.length;t++){const w=d[t];this.addOutput(w)}};addOutput=({amount:d,address:t,datum:w,referenceScript:u})=>{const h=Be(d),x=h.multiasset();if(h.is_zero()&&x===void 0)throw Error("Invalid output amount");let B=y.exports.TransactionOutputBuilder.new().with_address(E_(t));w&&w.type==="Hash"&&(B=B.with_data_hash(y.exports.hash_plutus_data(this.castDataToPlutusData(w.data)))),w&&w.type==="Inline"&&(B=B.with_plutus_data(this.castDataToPlutusData(w.data))),u&&(B=B.with_script_ref(y.exports.ScriptRef.new_plutus_script(y.exports.PlutusScript.from_hex_with_version(u.code,Ce[u.version]))));const P=B.next();if(x){const c=h.coin().is_zero()?P.with_asset_and_min_required_coin_by_utxo_cost(x,Zr(this._protocolParams.coinsPerUTxOSize)).build():P.with_coin_and_asset(h.coin(),x).build();this.txBuilder.add_output(c)}else{const c=P.with_coin(h.coin()).build();this.txBuilder.add_output(c)}};addAllCollaterals=d=>{const t=y.exports.TxInputsBuilder.new();for(let w=0;w<d.length;w++){const u=d[w];this.addCollateral(t,u)}this.txBuilder.set_collateral(t)};addCollateral=(d,t)=>{d.add_input(y.exports.Address.from_bech32(t.txIn.address),y.exports.TransactionInput.new(y.exports.TransactionHash.from_hex(t.txIn.txHash),t.txIn.txIndex),Be(t.txIn.amount))};addCollateralReturn=d=>{var w;const t=(w=this.txBuilder.get_fee_if_set())==null?void 0:w.to_js_value();if(t){const u=Math.ceil(this._protocolParams.collateralPercent*Number(t)/100);this.txBuilder.set_total_collateral_and_return(y.exports.BigNum.from_str(String(u)),y.exports.Address.from_bech32(d))}};addAllReferenceInputs=d=>{d.forEach(t=>{this.addReferenceInput(t)})};addReferenceInput=({txHash:d,txIndex:t})=>{const w=y.exports.TransactionInput.new(y.exports.TransactionHash.from_hex(d),t);this.txBuilder.add_reference_input(w)};addAllMints=d=>{const t=y.exports.MintBuilder.new();let w=0;for(let u=0;u<d.length;u++){const h=d[u];if(!h.scriptSource)throw Error("Mint script is expected to be provided");if(h.type==="Plutus"){if(!h.redeemer)throw Error("Missing mint redeemer information");this.addPlutusMint(t,h,w),w++}else h.type==="Native"&&this.addNativeMint(t,h)}this.txBuilder.set_mint_builder(t)};addPlutusMint=(d,{redeemer:t,policyId:w,scriptSource:u,assetName:h,amount:x},B)=>{const P=y.exports.Redeemer.new(y.exports.RedeemerTag.new_mint(),y.exports.BigNum.from_str(String(B)),this.castDataToPlutusData(t.data),y.exports.ExUnits.new(y.exports.BigNum.from_str(String(t.exUnits.mem)),y.exports.BigNum.from_str(String(t.exUnits.steps)))),c=u.type==="Reference Script"?y.exports.PlutusScriptSource.new_ref_input_with_lang_ver(y.exports.ScriptHash.from_hex(w),y.exports.TransactionInput.new(y.exports.TransactionHash.from_hex(u.txHash),u.txIndex),Ce[u.version]):y.exports.PlutusScriptSource.new(y.exports.PlutusScript.from_hex_with_version(u.script.code,Ce[u.script.version]));d.add_asset(y.exports.MintWitness.new_plutus_script(c,P),y.exports.AssetName.new(Buffer.from(h,"hex")),y.exports.Int.from_str(x))};addNativeMint=(d,{scriptSource:t,assetName:w,amount:u})=>{if(t.type==="Reference Script")throw Error("Native mint cannot have reference script");d.add_asset(y.exports.MintWitness.new_native_script(y.exports.NativeScript.from_hex(t.script.code)),y.exports.AssetName.new(Buffer.from(w,"hex")),y.exports.Int.from_str(u))};decimalToFraction(d){const t=10**d.toString().split(".")[1].length;return[d*t,t]}toPoolParams=d=>{const t=this.decimalToFraction(d.margin),w=y.exports.Relays.new();d.relays.forEach(x=>{w.add(_a(x))});const u=y.exports.RewardAddress.from_address(y.exports.Address.from_bech32(d.rewardAddress));if(u===void 0)throw new Error("Reward address is invalid");const h=y.exports.Ed25519KeyHashes.new();return d.owners.forEach(x=>{h.add(y.exports.Ed25519KeyHash.from_hex(x))}),y.exports.PoolParams.new(y.exports.Ed25519KeyHash.from_hex(d.operator),y.exports.VRFKeyHash.from_hex(d.VRFKeyHash),y.exports.BigNum.from_str(d.pledge),y.exports.BigNum.from_str(d.cost),y.exports.UnitInterval.new(y.exports.BigNum.from_str(t[0].toString()),y.exports.BigNum.from_str(t[1].toString())),u,h,w,d.metadata?y.exports.PoolMetadata.from_json(cr.exports.stringify(d.metadata)):void 0)};addCertificate=(d,t)=>{switch(t.type){case"RegisterPool":d.add(y.exports.Certificate.new_pool_registration(y.exports.PoolRegistration.new(this.toPoolParams(t.poolParams))));break;case"RegisterStake":d.add(y.exports.Certificate.new_stake_registration(y.exports.StakeRegistration.new(y.exports.StakeCredential.from_keyhash(y.exports.Ed25519KeyHash.from_hex(t.stakeKeyHash)))));break;case"DelegateStake":d.add(y.exports.Certificate.new_stake_delegation(y.exports.StakeDelegation.new(y.exports.StakeCredential.from_keyhash(y.exports.Ed25519KeyHash.from_hex(t.stakeKeyHash)),t.poolId.startsWith("pool")?y.exports.Ed25519KeyHash.from_bech32(t.poolId):y.exports.Ed25519KeyHash.from_hex(t.poolId))));break;case"DeregisterStake":d.add(y.exports.Certificate.new_stake_deregistration(y.exports.StakeDeregistration.new(y.exports.StakeCredential.from_keyhash(y.exports.Ed25519KeyHash.from_hex(t.stakeKeyHash)))));break;case"RetirePool":d.add(y.exports.Certificate.new_pool_retirement(y.exports.PoolRetirement.new(t.poolId.startsWith("pool")?y.exports.Ed25519KeyHash.from_bech32(t.poolId):y.exports.Ed25519KeyHash.from_hex(t.poolId),t.epoch)))}};queueAllLastItem=()=>{this.txOutput&&(this.meshTxBuilderBody.outputs.push(this.txOutput),this.txOutput=void 0),this.txInQueueItem&&this.queueInput(),this.collateralQueueItem&&(this.meshTxBuilderBody.collaterals.push(this.collateralQueueItem),this.collateralQueueItem=void 0),this.mintItem&&this.queueMint()};addAllCertificates=d=>{const t=y.exports.Certificates.new();d.forEach(w=>{this.addCertificate(t,w)}),this.txBuilder.set_certs(t)};addCostModels=()=>{this.txBuilder.calc_script_data_hash(y.exports.TxBuilderConstants.plutus_vasil_cost_models())};addChange=d=>{this.txBuilder.add_change_if_needed(y.exports.Address.from_bech32(d))};addValidityRange=({invalidBefore:d,invalidHereafter:t})=>{d&&this.txBuilder.set_validity_start_interval_bignum(y.exports.BigNum.from_str(d.toString())),t&&this.txBuilder.set_ttl_bignum(y.exports.BigNum.from_str(t.toString()))};addAllRequiredSignatures=d=>{d.forEach(t=>{this.txBuilder.add_required_signer(y.exports.Ed25519KeyHash.from_hex(t))})};addAllMetadata=d=>{d.forEach(({tag:t,metadata:w})=>{this.txBuilder.add_json_metadatum(y.exports.BigNum.from_str(t),cr.exports.stringify(w))})};updateRedeemer=(d,t)=>{t.forEach(w=>{switch(w.tag){case"SPEND":{const u=d.inputs[w.index];u.type=="Script"&&u.scriptTxIn.redeemer&&(u.scriptTxIn.redeemer.exUnits.mem=Math.floor(w.budget.mem*this.txEvaluationMultiplier),u.scriptTxIn.redeemer.exUnits.steps=Math.floor(w.budget.steps*this.txEvaluationMultiplier));break}case"MINT":{const u=d.mints[w.index];u.type=="Plutus"&&u.redeemer&&(u.redeemer.exUnits.mem=Math.floor(w.budget.mem*this.txEvaluationMultiplier),u.redeemer.exUnits.steps=Math.floor(w.budget.steps*this.txEvaluationMultiplier));break}}})};castRawDataToJsonString=d=>typeof d=="object"?cr.exports.stringify(d):d;castDataToPlutusData=({type:d,content:t})=>d==="Mesh"?qe(t):d==="CBOR"?y.exports.PlutusData.from_hex(t):y.exports.PlutusData.from_json(t,y.exports.PlutusDatumSchema.DetailedSchema)}class Ls extends zs{_fetcher;_submitter;_evaluator;queriedTxHashes=new Set;queriedUTxOs={};constructor({fetcher:d,submitter:t,evaluator:w,isHydra:u=!1}){super(),d&&(this._fetcher=d),t&&(this._submitter=t),w&&(this._evaluator=w),u&&(this.isHydra=!0)}complete=async d=>{d?this.meshTxBuilderBody=d:this.queueAllLastItem();const{inputs:t,collaterals:w}=this.meshTxBuilderBody,u=[...t,...w].filter(h=>!this.isInputComplete(h));if(console.log("Incomplete UTxO",u),await this.queryAllTxInfo(u),console.log("Incomplete UTxO",u),u.forEach(h=>{this.completeTxInformation(h)}),this.completeSync(d),this._evaluator){const h=await this._evaluator.evaluateTx(this.txHex);this.updateRedeemer(this.meshTxBuilderBody,h),this.completeSync(d)}return this};submitTx=async d=>{var w;return await((w=this._submitter)==null?void 0:w.submitTx(d))};getUTxOInfo=async d=>{var w;let t=[];this.queriedTxHashes.has(d)||(console.log("Query",d),this.queriedTxHashes.add(d),t=await((w=this._fetcher)==null?void 0:w.fetchUTxOs(d))||[],this.queriedUTxOs[d]=t)};queryAllTxInfo=d=>{var w;const t=[];if(d.length>0&&!this._fetcher)throw Error("Transaction information is incomplete while no fetcher instance is provided");for(let u=0;u<d.length;u++){const h=d[u];this.isInputInfoComplete(h)||t.push(this.getUTxOInfo(h.txIn.txHash)),h.type==="Script"&&((w=h.scriptTxIn.scriptSource)==null?void 0:w.type)==="Inline"&&!this.isRefScriptInfoComplete(h)&&t.push(this.getUTxOInfo(h.scriptTxIn.scriptSource.txInInfo.txHash))}return Promise.all(t)};completeTxInformation=d=>{var t;if(!this.isInputInfoComplete(d)){const w=this.queriedUTxOs[d.txIn.txHash],u=w==null?void 0:w.find(B=>B.input.outputIndex===d.txIn.txIndex),h=u==null?void 0:u.output.amount,x=u==null?void 0:u.output.address;if(!h||h.length===0)throw Error(`Couldn't find value information for ${d.txIn.txHash}#${d.txIn.txIndex}`);if(d.txIn.amount=h,d.type==="PubKey"){if(!x||x==="")throw Error(`Couldn't find address information for ${d.txIn.txHash}#${d.txIn.txIndex}`);d.txIn.address=x}}if(d.type==="Script"&&((t=d.scriptTxIn.scriptSource)==null?void 0:t.type)=="Inline"&&!this.isRefScriptInfoComplete(d)){const w=d.scriptTxIn.scriptSource.txInInfo,h=this.queriedUTxOs[w.txHash].find(x=>x.input.outputIndex===w.txIndex);if(!h)throw Error(`Couldn't find script reference utxo for ${w.txHash}#${w.txIndex}`);w.spendingScriptHash=h==null?void 0:h.output.scriptHash}};isInputComplete=d=>d.type==="PubKey"?this.isInputInfoComplete(d):d.type==="Script"?this.isInputInfoComplete(d)&&this.isRefScriptInfoComplete(d):!0;isInputInfoComplete=d=>{const{amount:t,address:w}=d.txIn;return!(d.type==="PubKey"&&(!t||!w)||d.type==="Script"&&!t)};isRefScriptInfoComplete=d=>{var w;const{scriptSource:t}=d.scriptTxIn;return!((t==null?void 0:t.type)==="Inline"&&!((w=t.txInInfo)!=null&&w.spendingScriptHash))}}const en=(p,d)=>{const t=p.vkeys();if(t!==void 0){const w=new Set;for(let h=0;h<t.len();h+=1)w.add(t.get(h).to_hex());for(let h=0;h<d.len();h+=1)w.add(d.get(h).to_hex());const u=y.exports.Vkeywitnesses.new();return w.forEach(h=>{u.add(y.exports.Vkeywitness.from_hex(h))}),u}return d};class Gt{_networkId;_encryptedSecret;constructor(d,t){this._networkId=d,this._encryptedSecret=t}getAccount(d,t){return this.accountContext(d,t,(w,u)=>{const h=On(this._networkId,w.to_public().hash(),u.to_public().hash()).to_address().to_bech32(),x=Dn(this._networkId,w.to_public().hash()).to_address().to_bech32(),B=tn(this._networkId,u.to_public().hash()).to_address().to_bech32();return{baseAddress:h,enterpriseAddress:x,rewardAddress:B}})}signData(d,t,w,u){try{return this.accountContext(d,t,(h,x)=>{const B={payload:u},P={address:Gt.resolveAddress(this._networkId,w,h,x),key:w.startsWith("stake")?x:h},{coseSign1:c,coseKey:z}=Pa(B,P);return{signature:c,key:z}})}catch(h){throw new Error(`An error occurred during signData: ${h}.`)}}signTx(d,t,w,u,h){try{const x=Xn(sa(u));return this.accountContext(d,t,(B,P)=>{const c=y.exports.Vkeywitnesses.new();return Gt.resolveSigners(u,w,B.to_public().hash().to_hex()).forEach(Y=>{if(Y===B.to_public().hash().to_hex())c.add(y.exports.make_vkey_witness(x,B));else if(Y===P.to_public().hash().to_hex())c.add(y.exports.make_vkey_witness(x,P));else if(h===!1)throw new Error(`Missing key witness for: ${Y}`)}),c})}catch(x){throw new Error(`An error occurred during signTx: ${x}.`)}}static encryptMnemonic(d,t){const w=$r.mnemonicToEntropy(d.join(" ")),u=na(w),h=d_(u.as_bytes());return u.free(),Gt.encrypt(h,t)}static encryptPrivateKey(d,t){const w=y.exports.Bip32PrivateKey.from_bech32(d),u=d_(w.as_bytes());return w.free(),Gt.encrypt(u,t)}static encryptSigningKeys(d,t,w){const u=Gt.encrypt(d.slice(4),w),h=Gt.encrypt(t.slice(4),w);return[u,h]}static generateMnemonic(d=256){return $r.generateMnemonic(d).split(" ")}accountContext(d,t,w){const{paymentKey:u,stakeKey:h}=Gt.resolveKeys(d,t,this._encryptedSecret),x=w(u,h);return u.free(),h.free(),x}static decrypt(d,t){try{return y.exports.decrypt_with_password(a_(t),d)}catch{throw new Error("The password is incorrect.")}}static encrypt(d,t){const w=Un.customAlphabet("0123456789abcdef"),u=w(64),h=w(24);return y.exports.encrypt_with_password(a_(t),u,h,d)}static resolveAddress(d,t,w,u){const h=[On(d,w.to_public().hash(),u.to_public().hash()),Dn(d,w.to_public().hash()),tn(d,u.to_public().hash())].find(x=>x.to_address().to_bech32()===t);if(h!==void 0)return h.to_address();throw new Error(`Address: ${t} doesn't belong to this account.`)}static resolveKeys(d,t,w){if(typeof w=="string"){const x=Gt.decrypt(w,t);return is(x,d)}const u=Gt.decrypt(w[0],t),h=Gt.decrypt(w[1],t);return{paymentKey:y.exports.PrivateKey.from_hex(u),stakeKey:y.exports.PrivateKey.from_hex(h)}}static resolveSigners(d,t,w){const u=B=>{const P=(X,v=[],nt=0)=>{var _t,g,D,Q,J;if(X===void 0||nt>=X.len())return v;const yt=X.get(nt),a=new Array;switch(yt.kind()){case y.exports.CertificateKind.StakeDeregistration:{const ct=(_t=yt.as_stake_deregistration())==null?void 0:_t.stake_credential(),bt=(ct==null?void 0:ct.kind())===y.exports.StakeCredKind.Key?ct.to_keyhash():void 0;bt&&a.push(bt.to_hex());break}case y.exports.CertificateKind.StakeDelegation:{const ct=(g=yt.as_stake_delegation())==null?void 0:g.stake_credential(),bt=(ct==null?void 0:ct.kind())===y.exports.StakeCredKind.Key?ct.to_keyhash():void 0;bt&&a.push(bt.to_hex());break}case y.exports.CertificateKind.PoolRegistration:{const ct=(D=yt.as_pool_registration())==null?void 0:D.pool_params().pool_owners();a.push(...z(ct));break}case y.exports.CertificateKind.PoolRetirement:{const ct=(Q=yt.as_pool_retirement())==null?void 0:Q.pool_keyhash();ct&&a.push(ct.to_hex());break}case y.exports.CertificateKind.MoveInstantaneousRewardsCert:{const ct=(J=yt.as_move_instantaneous_rewards_cert())==null?void 0:J.move_instantaneous_reward().as_to_stake_creds();if(ct)for(let bt=0;bt<ct.len();bt+=1){const xt=ct.keys().get(bt),At=xt.kind()===y.exports.StakeCredKind.Key?xt.to_keyhash():void 0;At&&a.push(At.to_hex())}break}}return P(X,[...v,...a],nt+1)},c=(X,v=[],nt=0)=>{if(X===void 0||nt>=X.len())return v;const yt=X.get(nt).index(),a=X.get(nt).transaction_id(),_t=t.find(g=>g.input.outputIndex===yt&&g.input.txHash===a.to_hex())!==void 0?w:"OUR_PRINCESS_IS_IN_ANOTHER_CASTLE";return c(X,[...v,_t],nt+1)},z=(X,v=[],nt=0)=>X===void 0||nt>=X.len()?v:z(X,[...v,X.get(nt).to_hex()],nt+1),Y=(X,v=[],nt=0)=>{if(X===void 0||nt>=X.len())return v;const yt=X.keys().get(nt).payment_cred(),a=yt.kind()===y.exports.StakeCredKind.Key?yt.to_keyhash():void 0;return Y(X,a?[...v,a.to_hex()]:v,nt+1)},q=B.certs(),m=B.collateral(),G=B.inputs(),b=B.required_signers(),tt=B.withdrawals();return[...P(q),...c(m),...c(G),...z(b),...Y(tt)]},h=B=>{const P=(z,Y=[])=>{var q,m,G,b;if(z)for(let tt=0;tt<z.len();tt+=1){const X=z.get(tt);switch(X.kind()){case y.exports.NativeScriptKind.ScriptPubkey:{const v=(q=X.as_script_pubkey())==null?void 0:q.addr_keyhash().to_hex();return v?[...Y,v]:Y}case y.exports.NativeScriptKind.ScriptAll:return P((m=X.as_script_all())==null?void 0:m.native_scripts(),Y);case y.exports.NativeScriptKind.ScriptAny:return P((G=X.as_script_any())==null?void 0:G.native_scripts(),Y);case y.exports.NativeScriptKind.ScriptNOfK:return P((b=X.as_script_n_of_k())==null?void 0:b.native_scripts(),Y)}}return Y},c=B.native_scripts();return[...P(c)]},x=L_(d);return new Set([...u(x.body()),...h(x.witness_set())])}}const B_="MARI0TIME";class Vs{_fetcher;_submitter;_wallet;constructor(d){switch(this._fetcher=d.fetcher,this._submitter=d.submitter,d.key.type){case"mnemonic":this._wallet=new Gt(d.networkId,Gt.encryptMnemonic(d.key.words,B_));break;case"root":this._wallet=new Gt(d.networkId,Gt.encryptPrivateKey(d.key.bech32,B_));break;case"cli":this._wallet=new Gt(d.networkId,Gt.encryptSigningKeys(d.key.payment,d.key.stake??"f0".repeat(34),B_))}}getBaseAddress(d=0){return this._wallet.getAccount(d,B_).baseAddress}getPaymentAddress(d=0){return this._wallet.getAccount(d,B_).enterpriseAddress}getRewardAddress(d=0){return this._wallet.getAccount(d,B_).rewardAddress}getUsedAddress(d=0){const t=this._wallet.getAccount(d,B_);return E_(t.enterpriseAddress)}getUsedCollateral(d=y_.maxCollateralInputs){throw new Error("getUsedCollateral not implemented.")}async getUsedUTxOs(d=0){const t=this._wallet.getAccount(d,B_);return(await this._fetcher.fetchAddressUTxOs(t.enterpriseAddress)).map(u=>R_(u))}signData(d,t,w=0){try{return this._wallet.signData(w,B_,d,t)}catch(u){throw new Error(`[AppWallet] An error occurred during signData: ${u}.`)}}async signTx(d,t=!1,w=0){try{const u=this._wallet.getAccount(w,B_),h=await this._fetcher.fetchAddressUTxOs(u.enterpriseAddress),x=this._wallet.signTx(w,B_,h,d,t),B=L_(d),P=B.witness_set(),c=en(P,x);return P.set_vkeys(c),y.exports.Transaction.new(B.body(),P,B.auxiliary_data()).to_hex()}catch(u){throw new Error(`[AppWallet] An error occurred during signTx: ${u}.`)}}async signTxs(d,t){return console.log("unimplemented",d,t),[]}submitTx(d){return this._submitter.submitTx(d)}static brew(d=256){return Gt.generateMnemonic(d)}}class Rr{_walletInstance;_walletName;walletInstance;constructor(d,t){this._walletInstance=d,this._walletName=t,this.walletInstance={...d}}static getInstalledWallets(){return window.cardano===void 0?[]:gn.filter(d=>window.cardano[d]!==void 0).map(d=>({name:window.cardano[d].name,icon:window.cardano[d].icon,version:window.cardano[d].apiVersion}))}static async enable(d){try{const t=await Rr.resolveInstance(d);if(t!==void 0)return new Rr(t,d);throw new Error(`Couldn't create an instance of wallet: ${d}`)}catch(t){throw new Error(`[BrowserWallet] An error occurred during enable: ${JSON.stringify(t)}.`)}}async getBalance(){const d=await this._walletInstance.getBalance();return ra(fs(d))}async getChangeAddress(){const d=await this._walletInstance.getChangeAddress();return sr(d).to_bech32()}async getCollateral(d=y_.maxCollateralInputs){return(await this.getUsedCollateral(d)).map(w=>qr(w))}getNetworkId(){return this._walletInstance.getNetworkId()}async getRewardAddresses(){return(await this._walletInstance.getRewardAddresses()).map(t=>sr(t).to_bech32())}async getUnusedAddresses(){return(await this._walletInstance.getUnusedAddresses()).map(t=>sr(t).to_bech32())}async getUsedAddresses(){return(await this._walletInstance.getUsedAddresses()).map(t=>sr(t).to_bech32())}async getUtxos(d=void 0){return(await this.getUsedUTxOs(d)).map(w=>qr(w))}signData(d,t){const w=E_(d).to_hex();return this._walletInstance.signData(w,a_(t))}async signTx(d,t=!1){try{const w=L_(d),u=w.witness_set(),h=await this._walletInstance.signTx(d,t),x=Sn(h).vkeys()??y.exports.Vkeywitnesses.new(),B=en(u,x);return u.set_vkeys(B),d_(y.exports.Transaction.new(w.body(),u,w.auxiliary_data()).to_bytes())}catch(w){throw new Error(`[BrowserWallet] An error occurred during signTx: ${JSON.stringify(w)}.`)}}async signTxs(d,t=!1){let w;switch(this._walletName){case"Typhon Wallet":this._walletInstance.signTxs&&(w=await this._walletInstance.signTxs(d,t));break;default:this._walletInstance.signTxs?w=await this._walletInstance.signTxs(d.map(h=>({cbor:h,partialSign:t}))):this._walletInstance.experimental.signTxs&&(w=await this._walletInstance.experimental.signTxs(d.map(h=>({cbor:h,partialSign:t}))));break}if(!w)throw new Error("Wallet does not support signTxs");const u=[];for(let h=0;h<w.length;h++){const x=L_(d[h]),B=x.witness_set(),P=Sn(w[h]).vkeys()??y.exports.Vkeywitnesses.new(),c=en(B,P);B.set_vkeys(c);const z=d_(y.exports.Transaction.new(x.body(),B,x.auxiliary_data()).to_bytes());u.push(z)}return u}submitTx(d){return this._walletInstance.submitTx(d)}async getUsedAddress(){const d=await this._walletInstance.getUsedAddresses();return sr(d[0])}async getUsedCollateral(d=y_.maxCollateralInputs){return(await this._walletInstance.experimental.getCollateral()??[]).map(w=>En(w)).slice(0,d)}async getUsedUTxOs(d=void 0){const t=d?Be(d).to_hex():void 0;return(await this._walletInstance.getUtxos(t)??[]).map(u=>En(u))}async getAssets(){return(await this.getBalance()).filter(t=>t.unit!=="lovelace").map(t=>{const w=t.unit.slice(0,V_),u=t.unit.slice(V_),h=aa(w,u);return{unit:t.unit,policyId:w,assetName:dn(u),fingerprint:h,quantity:t.quantity}})}async getLovelace(){const t=(await this.getBalance()).find(w=>w.unit==="lovelace");return t!==void 0?t.quantity:"0"}async getPolicyIdAssets(d){return(await this.getAssets()).filter(w=>w.policyId===d)}async getPolicyIds(){const d=await this.getBalance();return Array.from(new Set(d.map(t=>t.unit.slice(0,V_)))).filter(t=>t!=="lovelace")}static resolveInstance(d){if(window.cardano===void 0)return;const t=gn.map(w=>window.cardano[w]).filter(w=>w!==void 0).find(w=>w.name.toLowerCase()===d.toLowerCase());return t==null?void 0:t.enable()}}exports.AppWallet=Vs;exports.BlockfrostProvider=Os;exports.BrowserWallet=Rr;exports.EmbeddedWallet=Gt;exports.ForgeScript=Fs;exports.InfuraProvider=Ds;exports.KoiosProvider=Ts;exports.MaestroProvider=Ps;exports.MeshTxBuilder=Ls;exports.OgmiosProvider=Ns;exports.TangoProvider=Us;exports.checkSignature=Fa;exports.generateNonce=Ss;exports.isNetwork=Pn;exports.keepRelevant=Mn;exports.largestFirst=Qa;exports.largestFirstMultiAsset=Kn;exports.parseAssetUnit=Se;exports.parseHttpError=$;exports.readPlutusData=Qs;exports.resolveDataHash=vs;exports.resolveEpochNo=ms;exports.resolveFingerprint=aa;exports.resolveLanguageView=ks;exports.resolveNativeScriptHash=xs;exports.resolvePaymentKeyHash=We;exports.resolvePlutusScriptAddress=As;exports.resolvePlutusScriptHash=Is;exports.resolvePoolId=Cs;exports.resolvePrivateKey=js;exports.resolveRewardAddress=xr;exports.resolveScriptRef=Bs;exports.resolveSlotNo=Es;exports.resolveStakeKeyHash=ir;exports.resolveTxFees=cn;exports.resolveTxHash=sa;
|
|
10
|
+
`)+" "+L[1]:L[0]+R+" "+K.join(", ")+" "+L[1]}function u(K){return Array.isArray(K)}c.isArray=u;function tt(K){return typeof K=="boolean"}c.isBoolean=tt;function X(K){return K===null}c.isNull=X;function v(K){return K==null}c.isNullOrUndefined=v;function nt(K){return typeof K=="number"}c.isNumber=nt;function yt(K){return typeof K=="string"}c.isString=yt;function a(K){return typeof K=="symbol"}c.isSymbol=a;function _t(K){return K===void 0}c.isUndefined=_t;function g(K){return D(K)&&xt(K)==="[object RegExp]"}c.isRegExp=g;function D(K){return typeof K=="object"&&K!==null}c.isObject=D;function Q(K){return D(K)&&xt(K)==="[object Date]"}c.isDate=Q;function J(K){return D(K)&&(xt(K)==="[object Error]"||K instanceof Error)}c.isError=J;function ct(K){return typeof K=="function"}c.isFunction=ct;function bt(K){return K===null||typeof K=="boolean"||typeof K=="number"||typeof K=="string"||typeof K=="symbol"||typeof K>"u"}c.isPrimitive=bt,c.isBuffer=Za;function xt(K){return Object.prototype.toString.call(K)}function At(K){return K<10?"0"+K.toString(10):K.toString(10)}var pt=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function It(){var K=new Date,R=[At(K.getHours()),At(K.getMinutes()),At(K.getSeconds())].join(":");return[K.getDate(),pt[K.getMonth()],R].join(" ")}c.log=function(){console.log("%s - %s",It(),c.format.apply(c,arguments))},c.inherits=rn.exports,c._extend=function(K,R){if(!R||!D(R))return K;for(var L=Object.keys(R),I=L.length;I--;)K[L[I]]=R[L[I]];return K};function Ut(K,R){return Object.prototype.hasOwnProperty.call(K,R)}var Dt=typeof Symbol<"u"?Symbol("util.promisify.custom"):void 0;c.promisify=function(R){if(typeof R!="function")throw new TypeError('The "original" argument must be of type Function');if(Dt&&R[Dt]){var L=R[Dt];if(typeof L!="function")throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(L,Dt,{value:L,enumerable:!1,writable:!1,configurable:!0}),L}function L(){for(var I,wt,ut=new Promise(function(ot,x){I=ot,wt=x}),st=[],et=0;et<arguments.length;et++)st.push(arguments[et]);st.push(function(ot,x){ot?wt(ot):I(x)});try{R.apply(this,st)}catch(ot){wt(ot)}return ut}return Object.setPrototypeOf(L,Object.getPrototypeOf(R)),Dt&&Object.defineProperty(L,Dt,{value:L,enumerable:!1,writable:!1,configurable:!0}),Object.defineProperties(L,d(R))},c.promisify.custom=Dt;function Pt(K,R){if(!K){var L=new Error("Promise was rejected with a falsy value");L.reason=K,K=L}return R(K)}function qt(K){if(typeof K!="function")throw new TypeError('The "original" argument must be of type Function');function R(){for(var L=[],I=0;I<arguments.length;I++)L.push(arguments[I]);var wt=L.pop();if(typeof wt!="function")throw new TypeError("The last argument must be of type Function");var ut=this,st=function(){return wt.apply(ut,arguments)};K.apply(this,L).then(function(et){process.nextTick(st,null,et)},function(et){process.nextTick(Pt,et,st)})}return Object.setPrototypeOf(R,Object.getPrototypeOf(K)),Object.defineProperties(R,d(K)),R}c.callbackify=qt})($n);const ts={},_s=Object.freeze(Object.defineProperty({__proto__:null,default:ts},Symbol.toStringTag,{value:"Module"})),xn=Xa(_s);(function(c){let d={};d.__wbindgen_placeholder__=c.exports;let t;const{TextDecoder:w,TextEncoder:b}=$n,h=new Array(128).fill(void 0);h.push(void 0,null,!0,!1);function k(C){return h[C]}let j=h.length;function P(C){C<132||(h[C]=j,j=C)}function p(C){const _=k(C);return P(C),_}let z=new w("utf-8",{ignoreBOM:!0,fatal:!0});z.decode();let Y=null;function q(){return(Y===null||Y.byteLength===0)&&(Y=new Uint8Array(t.memory.buffer)),Y}function m(C,_){return C=C>>>0,z.decode(q().subarray(C,C+_))}function G(C){j===h.length&&h.push(h.length+1);const _=j;return j=h[_],h[_]=C,_}let u=0,tt=new b("utf-8");const X=typeof tt.encodeInto=="function"?function(C,_){return tt.encodeInto(C,_)}:function(C,_){const e=tt.encode(C);return _.set(e),{read:C.length,written:e.length}};function v(C,_,e){if(e===void 0){const o=tt.encode(C),f=_(o.length,1)>>>0;return q().subarray(f,f+o.length).set(o),u=o.length,f}let s=C.length,n=_(s,1)>>>0;const r=q();let i=0;for(;i<s;i++){const o=C.charCodeAt(i);if(o>127)break;r[n+i]=o}if(i!==s){i!==0&&(C=C.slice(i)),n=e(n,s,s=i+C.length*3,1)>>>0;const o=q().subarray(n+i,n+s),f=X(C,o);i+=f.written}return u=i,n}function nt(C){return C==null}let yt=null;function a(){return(yt===null||yt.byteLength===0)&&(yt=new Int32Array(t.memory.buffer)),yt}function _t(C){const _=typeof C;if(_=="number"||_=="boolean"||C==null)return`${C}`;if(_=="string")return`"${C}"`;if(_=="symbol"){const n=C.description;return n==null?"Symbol":`Symbol(${n})`}if(_=="function"){const n=C.name;return typeof n=="string"&&n.length>0?`Function(${n})`:"Function"}if(Array.isArray(C)){const n=C.length;let r="[";n>0&&(r+=_t(C[0]));for(let i=1;i<n;i++)r+=", "+_t(C[i]);return r+="]",r}const e=/\[object ([^\]]+)\]/.exec(toString.call(C));let s;if(e.length>1)s=e[1];else return toString.call(C);if(s=="Object")try{return"Object("+JSON.stringify(C)+")"}catch{return"Object"}return C instanceof Error?`${C.name}: ${C.message}
|
|
11
|
+
${C.stack}`:s}c.exports.script_to_address=function(C,_,e){let s,n;try{const l=t.__wbindgen_add_to_stack_pointer(-16),H=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),rt=u;var r=nt(e)?0:v(e,t.__wbindgen_malloc,t.__wbindgen_realloc),i=u;t.script_to_address(l,C,H,rt,r,i);var o=a()[l/4+0],f=a()[l/4+1];return s=o,n=f,m(o,f)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(s,n,1)}},c.exports.serialize_bech32_address=function(C){const _=v(C,t.__wbindgen_malloc,t.__wbindgen_realloc),e=u,s=t.serialize_bech32_address(_,e);return vr.__wrap(s)};function g(C,_){if(!(C instanceof _))throw new Error(`expected instance of ${_.name}`);return C.ptr}c.exports.apply_params_to_script=function(C,_){let e,s;try{const rt=t.__wbindgen_add_to_stack_pointer(-16);g(C,_r);var n=C.__destroy_into_raw();const dt=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),Xe=u;t.apply_params_to_script(rt,n,dt,Xe);var r=a()[rt/4+0],i=a()[rt/4+1],o=a()[rt/4+2],f=a()[rt/4+3],l=r,H=i;if(f)throw l=0,H=0,p(o);return e=l,s=H,m(l,H)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(e,s,1)}},c.exports.get_v2_script_hash=function(C){let _,e;try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(C,t.__wbindgen_malloc,t.__wbindgen_realloc),o=u;t.get_v2_script_hash(r,i,o);var s=a()[r/4+0],n=a()[r/4+1];return _=s,e=n,m(s,n)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}},c.exports.calculate_tx_hash=function(C){let _,e;try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(C,t.__wbindgen_malloc,t.__wbindgen_realloc),o=u;t.calculate_tx_hash(r,i,o);var s=a()[r/4+0],n=a()[r/4+1];return _=s,e=n,m(s,n)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}},c.exports.sign_transaction=function(C,_){let e,s;try{const o=t.__wbindgen_add_to_stack_pointer(-16),f=v(C,t.__wbindgen_malloc,t.__wbindgen_realloc),l=u;g(_,_r);var n=_.__destroy_into_raw();t.sign_transaction(o,f,l,n);var r=a()[o/4+0],i=a()[o/4+1];return e=r,s=i,m(r,i)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(e,s,1)}};function D(C,_){return C=C>>>0,q().subarray(C/1,C/1+_)}function Q(C,_){const e=_(C.length*1,1)>>>0;return q().set(C,e/1),u=C.length,e}c.exports.encrypt_with_password=function(C,_,e,s){let n,r;try{const dt=t.__wbindgen_add_to_stack_pointer(-16),Xe=v(C,t.__wbindgen_malloc,t.__wbindgen_realloc),mr=u,Ca=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),ja=u,Ba=v(e,t.__wbindgen_malloc,t.__wbindgen_realloc),Ea=u,Sa=v(s,t.__wbindgen_malloc,t.__wbindgen_realloc),Qa=u;t.encrypt_with_password(dt,Xe,mr,Ca,ja,Ba,Ea,Sa,Qa);var i=a()[dt/4+0],o=a()[dt/4+1],f=a()[dt/4+2],l=a()[dt/4+3],H=i,rt=o;if(l)throw H=0,rt=0,p(f);return n=H,r=rt,m(H,rt)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(n,r,1)}},c.exports.decrypt_with_password=function(C,_){let e,s;try{const H=t.__wbindgen_add_to_stack_pointer(-16),rt=v(C,t.__wbindgen_malloc,t.__wbindgen_realloc),dt=u,Xe=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),mr=u;t.decrypt_with_password(H,rt,dt,Xe,mr);var n=a()[H/4+0],r=a()[H/4+1],i=a()[H/4+2],o=a()[H/4+3],f=n,l=r;if(o)throw f=0,l=0,p(i);return e=f,s=l,m(f,l)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(e,s,1)}},c.exports.min_fee=function(C,_){try{const r=t.__wbindgen_add_to_stack_pointer(-16);g(C,b_),g(_,rr),t.min_fee(r,C.__wbg_ptr,_.__wbg_ptr);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw p(s);return I.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}},c.exports.calculate_ex_units_ceil_cost=function(C,_){try{const r=t.__wbindgen_add_to_stack_pointer(-16);g(C,at),g(_,vt),t.calculate_ex_units_ceil_cost(r,C.__wbg_ptr,_.__wbg_ptr);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw p(s);return I.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}},c.exports.min_script_fee=function(C,_){try{const r=t.__wbindgen_add_to_stack_pointer(-16);g(C,b_),g(_,vt),t.min_script_fee(r,C.__wbg_ptr,_.__wbg_ptr);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw p(s);return I.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}},c.exports.encode_arbitrary_bytes_as_metadatum=function(C){const _=Q(C,t.__wbindgen_malloc),e=u,s=t.encode_arbitrary_bytes_as_metadatum(_,e);return mt.__wrap(s)},c.exports.decode_arbitrary_bytes_from_metadatum=function(C){try{const i=t.__wbindgen_add_to_stack_pointer(-16);g(C,mt),t.decode_arbitrary_bytes_from_metadatum(i,C.__wbg_ptr);var _=a()[i/4+0],e=a()[i/4+1],s=a()[i/4+2],n=a()[i/4+3];if(n)throw p(s);var r=D(_,e).slice();return t.__wbindgen_free(_,e*1),r}finally{t.__wbindgen_add_to_stack_pointer(16)}},c.exports.encode_json_str_to_metadatum=function(C,_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(C,t.__wbindgen_malloc,t.__wbindgen_realloc),o=u;t.encode_json_str_to_metadatum(r,i,o,_);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw p(s);return mt.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}},c.exports.decode_metadatum_to_json_str=function(C,_){let e,s;try{const H=t.__wbindgen_add_to_stack_pointer(-16);g(C,mt),t.decode_metadatum_to_json_str(H,C.__wbg_ptr,_);var n=a()[H/4+0],r=a()[H/4+1],i=a()[H/4+2],o=a()[H/4+3],f=n,l=r;if(o)throw f=0,l=0,p(i);return e=f,s=l,m(f,l)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(e,s,1)}},c.exports.encode_json_str_to_plutus_datum=function(C,_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(C,t.__wbindgen_malloc,t.__wbindgen_realloc),o=u;t.encode_json_str_to_plutus_datum(r,i,o,_);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw p(s);return ht.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}},c.exports.decode_plutus_datum_to_json_str=function(C,_){let e,s;try{const H=t.__wbindgen_add_to_stack_pointer(-16);g(C,ht),t.decode_plutus_datum_to_json_str(H,C.__wbg_ptr,_);var n=a()[H/4+0],r=a()[H/4+1],i=a()[H/4+2],o=a()[H/4+3],f=n,l=r;if(o)throw f=0,l=0,p(i);return e=f,s=l,m(f,l)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(e,s,1)}},c.exports.create_send_all=function(C,_,e){try{const i=t.__wbindgen_add_to_stack_pointer(-16);g(C,pt),g(_,We),g(e,sr),t.create_send_all(i,C.__wbg_ptr,_.__wbg_ptr,e.__wbg_ptr);var s=a()[i/4+0],n=a()[i/4+1],r=a()[i/4+2];if(r)throw p(n);return Qr.__wrap(s)}finally{t.__wbindgen_add_to_stack_pointer(16)}};let J=null;function ct(){return(J===null||J.byteLength===0)&&(J=new Uint32Array(t.memory.buffer)),J}function bt(C,_){return C=C>>>0,ct().subarray(C/4,C/4+_)}c.exports.make_daedalus_bootstrap_witness=function(C,_,e){g(C,u_),g(_,A),g(e,hr);const s=t.make_daedalus_bootstrap_witness(C.__wbg_ptr,_.__wbg_ptr,e.__wbg_ptr);return ot.__wrap(s)},c.exports.make_icarus_bootstrap_witness=function(C,_,e){g(C,u_),g(_,A),g(e,wt);const s=t.make_icarus_bootstrap_witness(C.__wbg_ptr,_.__wbg_ptr,e.__wbg_ptr);return ot.__wrap(s)},c.exports.make_vkey_witness=function(C,_){g(C,u_),g(_,x_);const e=t.make_vkey_witness(C.__wbg_ptr,_.__wbg_ptr);return H_.__wrap(e)},c.exports.hash_auxiliary_data=function(C){g(C,Pt);const _=t.hash_auxiliary_data(C.__wbg_ptr);return qt.__wrap(_)},c.exports.hash_transaction=function(C){g(C,Wt);const _=t.hash_transaction(C.__wbg_ptr);return u_.__wrap(_)},c.exports.hash_plutus_data=function(C){g(C,ht);const _=t.hash_plutus_data(C.__wbg_ptr);return U.__wrap(_)},c.exports.hash_script_data=function(C,_,e){g(C,A_),g(_,F);let s=0;nt(e)||(g(e,n_),s=e.__destroy_into_raw());const n=t.hash_script_data(C.__wbg_ptr,_.__wbg_ptr,s);return U_.__wrap(n)},c.exports.get_implicit_input=function(C,_,e){try{const i=t.__wbindgen_add_to_stack_pointer(-16);g(C,Wt),g(_,I),g(e,I),t.get_implicit_input(i,C.__wbg_ptr,_.__wbg_ptr,e.__wbg_ptr);var s=a()[i/4+0],n=a()[i/4+1],r=a()[i/4+2];if(r)throw p(n);return gt.__wrap(s)}finally{t.__wbindgen_add_to_stack_pointer(16)}},c.exports.get_deposit=function(C,_,e){try{const i=t.__wbindgen_add_to_stack_pointer(-16);g(C,Wt),g(_,I),g(e,I),t.get_deposit(i,C.__wbg_ptr,_.__wbg_ptr,e.__wbg_ptr);var s=a()[i/4+0],n=a()[i/4+1],r=a()[i/4+2];if(r)throw p(n);return I.__wrap(s)}finally{t.__wbindgen_add_to_stack_pointer(16)}},c.exports.min_ada_for_output=function(C,_){try{const r=t.__wbindgen_add_to_stack_pointer(-16);g(C,Yt),g(_,M),t.min_ada_for_output(r,C.__wbg_ptr,_.__wbg_ptr);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw p(s);return I.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}},c.exports.min_ada_required=function(C,_,e){try{const i=t.__wbindgen_add_to_stack_pointer(-16);g(C,gt),g(e,I),t.min_ada_required(i,C.__wbg_ptr,_,e.__wbg_ptr);var s=a()[i/4+0],n=a()[i/4+1],r=a()[i/4+2];if(r)throw p(n);return I.__wrap(s)}finally{t.__wbindgen_add_to_stack_pointer(16)}},c.exports.encode_json_str_to_native_script=function(C,_,e){try{const i=t.__wbindgen_add_to_stack_pointer(-16),o=v(C,t.__wbindgen_malloc,t.__wbindgen_realloc),f=u,l=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),H=u;t.encode_json_str_to_native_script(i,o,f,l,H,e);var s=a()[i/4+0],n=a()[i/4+1],r=a()[i/4+2];if(r)throw p(n);return Nt.__wrap(s)}finally{t.__wbindgen_add_to_stack_pointer(16)}};function xt(C,_){const e=_(C.length*4,4)>>>0;return ct().set(C,e/4),u=C.length,e}function At(C,_){try{return C.apply(this,_)}catch(e){t.__wbindgen_exn_store(G(e))}}c.exports.StakeCredKind=Object.freeze({Key:0,0:"Key",Script:1,1:"Script"}),c.exports.TransactionMetadatumKind=Object.freeze({MetadataMap:0,0:"MetadataMap",MetadataList:1,1:"MetadataList",Int:2,2:"Int",Bytes:3,3:"Bytes",Text:4,4:"Text"}),c.exports.MetadataJsonSchema=Object.freeze({NoConversions:0,0:"NoConversions",BasicConversions:1,1:"BasicConversions",DetailedSchema:2,2:"DetailedSchema"}),c.exports.LanguageKind=Object.freeze({PlutusV1:0,0:"PlutusV1",PlutusV2:1,1:"PlutusV2"}),c.exports.PlutusDataKind=Object.freeze({ConstrPlutusData:0,0:"ConstrPlutusData",Map:1,1:"Map",List:2,2:"List",Integer:3,3:"Integer",Bytes:4,4:"Bytes"}),c.exports.RedeemerTagKind=Object.freeze({Spend:0,0:"Spend",Mint:1,1:"Mint",Cert:2,2:"Cert",Reward:3,3:"Reward"}),c.exports.PlutusDatumSchema=Object.freeze({BasicConversions:0,0:"BasicConversions",DetailedSchema:1,1:"DetailedSchema"}),c.exports.CoinSelectionStrategyCIP2=Object.freeze({LargestFirst:0,0:"LargestFirst",RandomImprove:1,1:"RandomImprove",LargestFirstMultiAsset:2,2:"LargestFirstMultiAsset",RandomImproveMultiAsset:3,3:"RandomImproveMultiAsset"}),c.exports.CborContainerType=Object.freeze({Array:0,0:"Array",Map:1,1:"Map"}),c.exports.ScriptSchema=Object.freeze({Wallet:0,0:"Wallet",Node:1,1:"Node"}),c.exports.CertificateKind=Object.freeze({StakeRegistration:0,0:"StakeRegistration",StakeDeregistration:1,1:"StakeDeregistration",StakeDelegation:2,2:"StakeDelegation",PoolRegistration:3,3:"PoolRegistration",PoolRetirement:4,4:"PoolRetirement",GenesisKeyDelegation:5,5:"GenesisKeyDelegation",MoveInstantaneousRewardsCert:6,6:"MoveInstantaneousRewardsCert"}),c.exports.MIRPot=Object.freeze({Reserves:0,0:"Reserves",Treasury:1,1:"Treasury"}),c.exports.MIRKind=Object.freeze({ToOtherPot:0,0:"ToOtherPot",ToStakeCredentials:1,1:"ToStakeCredentials"}),c.exports.RelayKind=Object.freeze({SingleHostAddr:0,0:"SingleHostAddr",SingleHostName:1,1:"SingleHostName",MultiHostName:2,2:"MultiHostName"}),c.exports.NativeScriptKind=Object.freeze({ScriptPubkey:0,0:"ScriptPubkey",ScriptAll:1,1:"ScriptAll",ScriptAny:2,2:"ScriptAny",ScriptNOfK:3,3:"ScriptNOfK",TimelockStart:4,4:"TimelockStart",TimelockExpiry:5,5:"TimelockExpiry"}),c.exports.ScriptHashNamespace=Object.freeze({NativeScript:0,0:"NativeScript",PlutusScript:1,1:"PlutusScript",PlutusScriptV2:2,2:"PlutusScriptV2"}),c.exports.NetworkIdKind=Object.freeze({Testnet:0,0:"Testnet",Mainnet:1,1:"Mainnet"});class pt{static __wrap(_){_=_>>>0;const e=Object.create(pt.prototype);return e.__wbg_ptr=_,e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,_}free(){const _=this.__destroy_into_raw();t.__wbg_address_free(_)}static from_bytes(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=Q(_,t.__wbindgen_malloc),o=u;t.address_from_bytes(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw p(s);return pt.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_json(){let _,e;try{const l=t.__wbindgen_add_to_stack_pointer(-16);t.address_to_json(l,this.__wbg_ptr);var s=a()[l/4+0],n=a()[l/4+1],r=a()[l/4+2],i=a()[l/4+3],o=s,f=n;if(i)throw o=0,f=0,p(r);return _=o,e=f,m(o,f)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}to_js_value(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.address_to_js_value(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=a()[n/4+2];if(s)throw p(e);return p(_)}finally{t.__wbindgen_add_to_stack_pointer(16)}}static from_json(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=u;t.address_from_json(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw p(s);return pt.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_hex(){let _,e;try{const r=t.__wbindgen_add_to_stack_pointer(-16);t.address_to_hex(r,this.__wbg_ptr);var s=a()[r/4+0],n=a()[r/4+1];return _=s,e=n,m(s,n)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}static from_hex(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=u;t.address_from_hex(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw p(s);return pt.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_bytes(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.address_to_bytes(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=D(_,e).slice();return t.__wbindgen_free(_,e*1),s}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_bech32(_){let e,s;try{const dt=t.__wbindgen_add_to_stack_pointer(-16);var n=nt(_)?0:v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),r=u;t.address_to_bech32(dt,this.__wbg_ptr,n,r);var i=a()[dt/4+0],o=a()[dt/4+1],f=a()[dt/4+2],l=a()[dt/4+3],H=i,rt=o;if(l)throw H=0,rt=0,p(f);return e=H,s=rt,m(H,rt)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(e,s,1)}}static from_bech32(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=u;t.address_from_bech32(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw p(s);return pt.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}network_id(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.address_network_id(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=a()[n/4+2];if(s)throw p(e);return _}finally{t.__wbindgen_add_to_stack_pointer(16)}}}c.exports.Address=pt;class It{static __wrap(_){_=_>>>0;const e=Object.create(It.prototype);return e.__wbg_ptr=_,e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,_}free(){const _=this.__destroy_into_raw();t.__wbg_assetname_free(_)}to_bytes(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.assetname_to_bytes(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=D(_,e).slice();return t.__wbindgen_free(_,e*1),s}finally{t.__wbindgen_add_to_stack_pointer(16)}}static from_bytes(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=Q(_,t.__wbindgen_malloc),o=u;t.assetname_from_bytes(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw p(s);return It.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_hex(){let _,e;try{const r=t.__wbindgen_add_to_stack_pointer(-16);t.assetname_to_hex(r,this.__wbg_ptr);var s=a()[r/4+0],n=a()[r/4+1];return _=s,e=n,m(s,n)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}static from_hex(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=u;t.assetname_from_hex(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw p(s);return It.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_json(){let _,e;try{const l=t.__wbindgen_add_to_stack_pointer(-16);t.assetname_to_json(l,this.__wbg_ptr);var s=a()[l/4+0],n=a()[l/4+1],r=a()[l/4+2],i=a()[l/4+3],o=s,f=n;if(i)throw o=0,f=0,p(r);return _=o,e=f,m(o,f)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}to_js_value(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.assetname_to_js_value(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=a()[n/4+2];if(s)throw p(e);return p(_)}finally{t.__wbindgen_add_to_stack_pointer(16)}}static from_json(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=u;t.assetname_from_json(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw p(s);return It.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}static new(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=Q(_,t.__wbindgen_malloc),o=u;t.assetname_new(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw p(s);return It.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}name(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.assetname_name(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=D(_,e).slice();return t.__wbindgen_free(_,e*1),s}finally{t.__wbindgen_add_to_stack_pointer(16)}}}c.exports.AssetName=It;class Ut{static __wrap(_){_=_>>>0;const e=Object.create(Ut.prototype);return e.__wbg_ptr=_,e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,_}free(){const _=this.__destroy_into_raw();t.__wbg_assetnames_free(_)}to_bytes(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.assetnames_to_bytes(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=D(_,e).slice();return t.__wbindgen_free(_,e*1),s}finally{t.__wbindgen_add_to_stack_pointer(16)}}static from_bytes(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=Q(_,t.__wbindgen_malloc),o=u;t.assetnames_from_bytes(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw p(s);return Ut.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_hex(){let _,e;try{const r=t.__wbindgen_add_to_stack_pointer(-16);t.assetnames_to_hex(r,this.__wbg_ptr);var s=a()[r/4+0],n=a()[r/4+1];return _=s,e=n,m(s,n)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}static from_hex(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=u;t.assetnames_from_hex(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw p(s);return Ut.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_json(){let _,e;try{const l=t.__wbindgen_add_to_stack_pointer(-16);t.assetnames_to_json(l,this.__wbg_ptr);var s=a()[l/4+0],n=a()[l/4+1],r=a()[l/4+2],i=a()[l/4+3],o=s,f=n;if(i)throw o=0,f=0,p(r);return _=o,e=f,m(o,f)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}to_js_value(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.assetnames_to_js_value(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=a()[n/4+2];if(s)throw p(e);return p(_)}finally{t.__wbindgen_add_to_stack_pointer(16)}}static from_json(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=u;t.assetnames_from_json(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw p(s);return Ut.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}static new(){const _=t.assetnames_new();return Ut.__wrap(_)}len(){return t.assetnames_len(this.__wbg_ptr)>>>0}get(_){const e=t.assetnames_get(this.__wbg_ptr,_);return It.__wrap(e)}add(_){g(_,It),t.assetnames_add(this.__wbg_ptr,_.__wbg_ptr)}}c.exports.AssetNames=Ut;class Dt{static __wrap(_){_=_>>>0;const e=Object.create(Dt.prototype);return e.__wbg_ptr=_,e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,_}free(){const _=this.__destroy_into_raw();t.__wbg_assets_free(_)}to_bytes(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.assets_to_bytes(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=D(_,e).slice();return t.__wbindgen_free(_,e*1),s}finally{t.__wbindgen_add_to_stack_pointer(16)}}static from_bytes(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=Q(_,t.__wbindgen_malloc),o=u;t.assets_from_bytes(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw p(s);return Dt.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_hex(){let _,e;try{const r=t.__wbindgen_add_to_stack_pointer(-16);t.assets_to_hex(r,this.__wbg_ptr);var s=a()[r/4+0],n=a()[r/4+1];return _=s,e=n,m(s,n)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}static from_hex(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=u;t.assets_from_hex(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw p(s);return Dt.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_json(){let _,e;try{const l=t.__wbindgen_add_to_stack_pointer(-16);t.assets_to_json(l,this.__wbg_ptr);var s=a()[l/4+0],n=a()[l/4+1],r=a()[l/4+2],i=a()[l/4+3],o=s,f=n;if(i)throw o=0,f=0,p(r);return _=o,e=f,m(o,f)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}to_js_value(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.assets_to_js_value(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=a()[n/4+2];if(s)throw p(e);return p(_)}finally{t.__wbindgen_add_to_stack_pointer(16)}}static from_json(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=u;t.assets_from_json(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw p(s);return Dt.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}static new(){const _=t.assets_new();return Dt.__wrap(_)}len(){return t.assetnames_len(this.__wbg_ptr)>>>0}insert(_,e){g(_,It),g(e,I);const s=t.assets_insert(this.__wbg_ptr,_.__wbg_ptr,e.__wbg_ptr);return s===0?void 0:I.__wrap(s)}get(_){g(_,It);const e=t.assets_get(this.__wbg_ptr,_.__wbg_ptr);return e===0?void 0:I.__wrap(e)}keys(){const _=t.assets_keys(this.__wbg_ptr);return Ut.__wrap(_)}}c.exports.Assets=Dt;class Pt{static __wrap(_){_=_>>>0;const e=Object.create(Pt.prototype);return e.__wbg_ptr=_,e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,_}free(){const _=this.__destroy_into_raw();t.__wbg_auxiliarydata_free(_)}to_bytes(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.auxiliarydata_to_bytes(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=D(_,e).slice();return t.__wbindgen_free(_,e*1),s}finally{t.__wbindgen_add_to_stack_pointer(16)}}static from_bytes(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=Q(_,t.__wbindgen_malloc),o=u;t.auxiliarydata_from_bytes(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw p(s);return Pt.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_hex(){let _,e;try{const r=t.__wbindgen_add_to_stack_pointer(-16);t.auxiliarydata_to_hex(r,this.__wbg_ptr);var s=a()[r/4+0],n=a()[r/4+1];return _=s,e=n,m(s,n)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}static from_hex(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=u;t.auxiliarydata_from_hex(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw p(s);return Pt.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_json(){let _,e;try{const l=t.__wbindgen_add_to_stack_pointer(-16);t.auxiliarydata_to_json(l,this.__wbg_ptr);var s=a()[l/4+0],n=a()[l/4+1],r=a()[l/4+2],i=a()[l/4+3],o=s,f=n;if(i)throw o=0,f=0,p(r);return _=o,e=f,m(o,f)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}to_js_value(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.auxiliarydata_to_js_value(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=a()[n/4+2];if(s)throw p(e);return p(_)}finally{t.__wbindgen_add_to_stack_pointer(16)}}static from_json(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=u;t.auxiliarydata_from_json(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw p(s);return Pt.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}static new(){const _=t.auxiliarydata_new();return Pt.__wrap(_)}metadata(){const _=t.auxiliarydata_metadata(this.__wbg_ptr);return _===0?void 0:Ot.__wrap(_)}set_metadata(_){g(_,Ot),t.auxiliarydata_set_metadata(this.__wbg_ptr,_.__wbg_ptr)}native_scripts(){const _=t.auxiliarydata_native_scripts(this.__wbg_ptr);return _===0?void 0:Ht.__wrap(_)}set_native_scripts(_){g(_,Ht),t.auxiliarydata_set_native_scripts(this.__wbg_ptr,_.__wbg_ptr)}plutus_scripts(){const _=t.auxiliarydata_plutus_scripts(this.__wbg_ptr);return _===0?void 0:k_.__wrap(_)}set_plutus_scripts(_){g(_,k_),t.auxiliarydata_set_plutus_scripts(this.__wbg_ptr,_.__wbg_ptr)}prefer_alonzo_format(){return t.auxiliarydata_prefer_alonzo_format(this.__wbg_ptr)!==0}set_prefer_alonzo_format(_){t.auxiliarydata_set_prefer_alonzo_format(this.__wbg_ptr,_)}}c.exports.AuxiliaryData=Pt;class qt{static __wrap(_){_=_>>>0;const e=Object.create(qt.prototype);return e.__wbg_ptr=_,e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,_}free(){const _=this.__destroy_into_raw();t.__wbg_auxiliarydatahash_free(_)}static from_bytes(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=Q(_,t.__wbindgen_malloc),o=u;t.auxiliarydatahash_from_bytes(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw p(s);return qt.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_bytes(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.auxiliarydatahash_to_bytes(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=D(_,e).slice();return t.__wbindgen_free(_,e*1),s}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_bech32(_){let e,s;try{const H=t.__wbindgen_add_to_stack_pointer(-16),rt=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),dt=u;t.auxiliarydatahash_to_bech32(H,this.__wbg_ptr,rt,dt);var n=a()[H/4+0],r=a()[H/4+1],i=a()[H/4+2],o=a()[H/4+3],f=n,l=r;if(o)throw f=0,l=0,p(i);return e=f,s=l,m(f,l)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(e,s,1)}}static from_bech32(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=u;t.auxiliarydatahash_from_bech32(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw p(s);return qt.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_hex(){let _,e;try{const r=t.__wbindgen_add_to_stack_pointer(-16);t.auxiliarydatahash_to_hex(r,this.__wbg_ptr);var s=a()[r/4+0],n=a()[r/4+1];return _=s,e=n,m(s,n)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}static from_hex(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=u;t.auxiliarydatahash_from_hex(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw p(s);return qt.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}}c.exports.AuxiliaryDataHash=qt;class K{static __wrap(_){_=_>>>0;const e=Object.create(K.prototype);return e.__wbg_ptr=_,e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,_}free(){const _=this.__destroy_into_raw();t.__wbg_auxiliarydataset_free(_)}static new(){const _=t.auxiliarydataset_new();return K.__wrap(_)}len(){return t.auxiliarydataset_len(this.__wbg_ptr)>>>0}insert(_,e){g(e,Pt);const s=t.auxiliarydataset_insert(this.__wbg_ptr,_,e.__wbg_ptr);return s===0?void 0:Pt.__wrap(s)}get(_){const e=t.auxiliarydataset_get(this.__wbg_ptr,_);return e===0?void 0:Pt.__wrap(e)}indices(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.auxiliarydataset_indices(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=bt(_,e).slice();return t.__wbindgen_free(_,e*4),s}finally{t.__wbindgen_add_to_stack_pointer(16)}}}c.exports.AuxiliaryDataSet=K;class R{static __wrap(_){_=_>>>0;const e=Object.create(R.prototype);return e.__wbg_ptr=_,e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,_}free(){const _=this.__destroy_into_raw();t.__wbg_baseaddress_free(_)}static new(_,e,s){g(e,Qt),g(s,Qt);const n=t.baseaddress_new(_,e.__wbg_ptr,s.__wbg_ptr);return R.__wrap(n)}payment_cred(){const _=t.baseaddress_payment_cred(this.__wbg_ptr);return Qt.__wrap(_)}stake_cred(){const _=t.baseaddress_stake_cred(this.__wbg_ptr);return Qt.__wrap(_)}to_address(){const _=t.baseaddress_to_address(this.__wbg_ptr);return pt.__wrap(_)}static from_address(_){g(_,pt);const e=t.baseaddress_from_address(_.__wbg_ptr);return e===0?void 0:R.__wrap(e)}}c.exports.BaseAddress=R;class L{static __wrap(_){_=_>>>0;const e=Object.create(L.prototype);return e.__wbg_ptr=_,e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,_}free(){const _=this.__destroy_into_raw();t.__wbg_bigint_free(_)}to_bytes(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.bigint_to_bytes(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=D(_,e).slice();return t.__wbindgen_free(_,e*1),s}finally{t.__wbindgen_add_to_stack_pointer(16)}}static from_bytes(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=Q(_,t.__wbindgen_malloc),o=u;t.bigint_from_bytes(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw p(s);return L.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_hex(){let _,e;try{const r=t.__wbindgen_add_to_stack_pointer(-16);t.bigint_to_hex(r,this.__wbg_ptr);var s=a()[r/4+0],n=a()[r/4+1];return _=s,e=n,m(s,n)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}static from_hex(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=u;t.bigint_from_hex(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw p(s);return L.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_json(){let _,e;try{const l=t.__wbindgen_add_to_stack_pointer(-16);t.bigint_to_json(l,this.__wbg_ptr);var s=a()[l/4+0],n=a()[l/4+1],r=a()[l/4+2],i=a()[l/4+3],o=s,f=n;if(i)throw o=0,f=0,p(r);return _=o,e=f,m(o,f)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}to_js_value(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.bigint_to_js_value(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=a()[n/4+2];if(s)throw p(e);return p(_)}finally{t.__wbindgen_add_to_stack_pointer(16)}}static from_json(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=u;t.bigint_from_json(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw p(s);return L.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}is_zero(){return t.bigint_is_zero(this.__wbg_ptr)!==0}as_u64(){const _=t.bigint_as_u64(this.__wbg_ptr);return _===0?void 0:I.__wrap(_)}as_int(){const _=t.bigint_as_int(this.__wbg_ptr);return _===0?void 0:St.__wrap(_)}static from_str(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=u;t.bigint_from_str(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw p(s);return L.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_str(){let _,e;try{const r=t.__wbindgen_add_to_stack_pointer(-16);t.bigint_to_str(r,this.__wbg_ptr);var s=a()[r/4+0],n=a()[r/4+1];return _=s,e=n,m(s,n)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}add(_){g(_,L);const e=t.bigint_add(this.__wbg_ptr,_.__wbg_ptr);return L.__wrap(e)}mul(_){g(_,L);const e=t.bigint_mul(this.__wbg_ptr,_.__wbg_ptr);return L.__wrap(e)}static one(){const _=t.bigint_one();return L.__wrap(_)}increment(){const _=t.bigint_increment(this.__wbg_ptr);return L.__wrap(_)}div_ceil(_){g(_,L);const e=t.bigint_div_ceil(this.__wbg_ptr,_.__wbg_ptr);return L.__wrap(e)}}c.exports.BigInt=L;class I{static __wrap(_){_=_>>>0;const e=Object.create(I.prototype);return e.__wbg_ptr=_,e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,_}free(){const _=this.__destroy_into_raw();t.__wbg_bignum_free(_)}to_bytes(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.bignum_to_bytes(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=D(_,e).slice();return t.__wbindgen_free(_,e*1),s}finally{t.__wbindgen_add_to_stack_pointer(16)}}static from_bytes(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=Q(_,t.__wbindgen_malloc),o=u;t.bignum_from_bytes(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw p(s);return I.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_hex(){let _,e;try{const r=t.__wbindgen_add_to_stack_pointer(-16);t.bignum_to_hex(r,this.__wbg_ptr);var s=a()[r/4+0],n=a()[r/4+1];return _=s,e=n,m(s,n)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}static from_hex(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=u;t.bignum_from_hex(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw p(s);return I.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_json(){let _,e;try{const l=t.__wbindgen_add_to_stack_pointer(-16);t.bignum_to_json(l,this.__wbg_ptr);var s=a()[l/4+0],n=a()[l/4+1],r=a()[l/4+2],i=a()[l/4+3],o=s,f=n;if(i)throw o=0,f=0,p(r);return _=o,e=f,m(o,f)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}to_js_value(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.bignum_to_js_value(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=a()[n/4+2];if(s)throw p(e);return p(_)}finally{t.__wbindgen_add_to_stack_pointer(16)}}static from_json(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=u;t.bignum_from_json(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw p(s);return I.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}static from_str(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=u;t.bignum_from_str(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw p(s);return I.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_str(){let _,e;try{const r=t.__wbindgen_add_to_stack_pointer(-16);t.bignum_to_str(r,this.__wbg_ptr);var s=a()[r/4+0],n=a()[r/4+1];return _=s,e=n,m(s,n)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}static zero(){const _=t.bignum_zero();return I.__wrap(_)}static one(){const _=t.bignum_one();return I.__wrap(_)}is_zero(){return t.bignum_is_zero(this.__wbg_ptr)!==0}div_floor(_){g(_,I);const e=t.bignum_div_floor(this.__wbg_ptr,_.__wbg_ptr);return I.__wrap(e)}checked_mul(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16);g(_,I),t.bignum_checked_mul(r,this.__wbg_ptr,_.__wbg_ptr);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw p(s);return I.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}checked_add(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16);g(_,I),t.bignum_checked_add(r,this.__wbg_ptr,_.__wbg_ptr);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw p(s);return I.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}checked_sub(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16);g(_,I),t.bignum_checked_sub(r,this.__wbg_ptr,_.__wbg_ptr);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw p(s);return I.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}clamped_sub(_){g(_,I);const e=t.bignum_clamped_sub(this.__wbg_ptr,_.__wbg_ptr);return I.__wrap(e)}compare(_){return g(_,I),t.bignum_compare(this.__wbg_ptr,_.__wbg_ptr)}less_than(_){return g(_,I),t.bignum_less_than(this.__wbg_ptr,_.__wbg_ptr)!==0}static max_value(){const _=t.bignum_max_value();return I.__wrap(_)}static max(_,e){g(_,I),g(e,I);const s=t.bignum_max(_.__wbg_ptr,e.__wbg_ptr);return I.__wrap(s)}}c.exports.BigNum=I;class wt{static __wrap(_){_=_>>>0;const e=Object.create(wt.prototype);return e.__wbg_ptr=_,e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,_}free(){const _=this.__destroy_into_raw();t.__wbg_bip32privatekey_free(_)}derive(_){const e=t.bip32privatekey_derive(this.__wbg_ptr,_);return wt.__wrap(e)}static from_128_xprv(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=Q(_,t.__wbindgen_malloc),o=u;t.bip32privatekey_from_128_xprv(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw p(s);return wt.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_128_xprv(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.bip32privatekey_to_128_xprv(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=D(_,e).slice();return t.__wbindgen_free(_,e*1),s}finally{t.__wbindgen_add_to_stack_pointer(16)}}static generate_ed25519_bip32(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.bip32privatekey_generate_ed25519_bip32(n);var _=a()[n/4+0],e=a()[n/4+1],s=a()[n/4+2];if(s)throw p(e);return wt.__wrap(_)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_raw_key(){const _=t.bip32privatekey_to_raw_key(this.__wbg_ptr);return x_.__wrap(_)}to_public(){const _=t.bip32privatekey_to_public(this.__wbg_ptr);return ut.__wrap(_)}static from_bytes(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=Q(_,t.__wbindgen_malloc),o=u;t.bip32privatekey_from_bytes(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw p(s);return wt.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}as_bytes(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.bip32privatekey_as_bytes(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=D(_,e).slice();return t.__wbindgen_free(_,e*1),s}finally{t.__wbindgen_add_to_stack_pointer(16)}}static from_bech32(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=u;t.bip32privatekey_from_bech32(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw p(s);return wt.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_bech32(){let _,e;try{const r=t.__wbindgen_add_to_stack_pointer(-16);t.bip32privatekey_to_bech32(r,this.__wbg_ptr);var s=a()[r/4+0],n=a()[r/4+1];return _=s,e=n,m(s,n)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}static from_bip39_entropy(_,e){const s=Q(_,t.__wbindgen_malloc),n=u,r=Q(e,t.__wbindgen_malloc),i=u,o=t.bip32privatekey_from_bip39_entropy(s,n,r,i);return wt.__wrap(o)}chaincode(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.bip32privatekey_chaincode(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=D(_,e).slice();return t.__wbindgen_free(_,e*1),s}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_hex(){let _,e;try{const r=t.__wbindgen_add_to_stack_pointer(-16);t.bip32privatekey_to_hex(r,this.__wbg_ptr);var s=a()[r/4+0],n=a()[r/4+1];return _=s,e=n,m(s,n)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}static from_hex(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=u;t.bip32privatekey_from_hex(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw p(s);return wt.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}}c.exports.Bip32PrivateKey=wt;class ut{static __wrap(_){_=_>>>0;const e=Object.create(ut.prototype);return e.__wbg_ptr=_,e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,_}free(){const _=this.__destroy_into_raw();t.__wbg_bip32publickey_free(_)}derive(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16);t.bip32publickey_derive(r,this.__wbg_ptr,_);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw p(s);return ut.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_raw_key(){const _=t.bip32publickey_to_raw_key(this.__wbg_ptr);return l_.__wrap(_)}static from_bytes(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=Q(_,t.__wbindgen_malloc),o=u;t.bip32publickey_from_bytes(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw p(s);return ut.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}as_bytes(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.bip32publickey_as_bytes(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=D(_,e).slice();return t.__wbindgen_free(_,e*1),s}finally{t.__wbindgen_add_to_stack_pointer(16)}}static from_bech32(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=u;t.bip32publickey_from_bech32(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw p(s);return ut.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_bech32(){let _,e;try{const r=t.__wbindgen_add_to_stack_pointer(-16);t.bip32publickey_to_bech32(r,this.__wbg_ptr);var s=a()[r/4+0],n=a()[r/4+1];return _=s,e=n,m(s,n)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}chaincode(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.bip32publickey_chaincode(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=D(_,e).slice();return t.__wbindgen_free(_,e*1),s}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_hex(){let _,e;try{const r=t.__wbindgen_add_to_stack_pointer(-16);t.bip32publickey_to_hex(r,this.__wbg_ptr);var s=a()[r/4+0],n=a()[r/4+1];return _=s,e=n,m(s,n)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}static from_hex(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=u;t.bip32publickey_from_hex(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw p(s);return ut.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}}c.exports.Bip32PublicKey=ut;class st{static __wrap(_){_=_>>>0;const e=Object.create(st.prototype);return e.__wbg_ptr=_,e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,_}free(){const _=this.__destroy_into_raw();t.__wbg_block_free(_)}to_bytes(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.block_to_bytes(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=D(_,e).slice();return t.__wbindgen_free(_,e*1),s}finally{t.__wbindgen_add_to_stack_pointer(16)}}static from_bytes(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=Q(_,t.__wbindgen_malloc),o=u;t.block_from_bytes(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw p(s);return st.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_hex(){let _,e;try{const r=t.__wbindgen_add_to_stack_pointer(-16);t.block_to_hex(r,this.__wbg_ptr);var s=a()[r/4+0],n=a()[r/4+1];return _=s,e=n,m(s,n)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}static from_hex(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=u;t.block_from_hex(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw p(s);return st.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_json(){let _,e;try{const l=t.__wbindgen_add_to_stack_pointer(-16);t.block_to_json(l,this.__wbg_ptr);var s=a()[l/4+0],n=a()[l/4+1],r=a()[l/4+2],i=a()[l/4+3],o=s,f=n;if(i)throw o=0,f=0,p(r);return _=o,e=f,m(o,f)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}to_js_value(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.block_to_js_value(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=a()[n/4+2];if(s)throw p(e);return p(_)}finally{t.__wbindgen_add_to_stack_pointer(16)}}static from_json(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=u;t.block_from_json(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw p(s);return st.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}header(){const _=t.block_header(this.__wbg_ptr);return __.__wrap(_)}transaction_bodies(){const _=t.block_transaction_bodies(this.__wbg_ptr);return ve.__wrap(_)}transaction_witness_sets(){const _=t.block_transaction_witness_sets(this.__wbg_ptr);return ke.__wrap(_)}auxiliary_data_set(){const _=t.block_auxiliary_data_set(this.__wbg_ptr);return K.__wrap(_)}invalid_transactions(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.block_invalid_transactions(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=bt(_,e).slice();return t.__wbindgen_free(_,e*4),s}finally{t.__wbindgen_add_to_stack_pointer(16)}}static new(_,e,s,n,r){g(_,__),g(e,ve),g(s,ke),g(n,K);const i=xt(r,t.__wbindgen_malloc),o=u,f=t.block_new(_.__wbg_ptr,e.__wbg_ptr,s.__wbg_ptr,n.__wbg_ptr,i,o);return st.__wrap(f)}}c.exports.Block=st;class et{static __wrap(_){_=_>>>0;const e=Object.create(et.prototype);return e.__wbg_ptr=_,e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,_}free(){const _=this.__destroy_into_raw();t.__wbg_blockhash_free(_)}static from_bytes(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=Q(_,t.__wbindgen_malloc),o=u;t.blockhash_from_bytes(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw p(s);return et.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_bytes(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.auxiliarydatahash_to_bytes(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=D(_,e).slice();return t.__wbindgen_free(_,e*1),s}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_bech32(_){let e,s;try{const H=t.__wbindgen_add_to_stack_pointer(-16),rt=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),dt=u;t.auxiliarydatahash_to_bech32(H,this.__wbg_ptr,rt,dt);var n=a()[H/4+0],r=a()[H/4+1],i=a()[H/4+2],o=a()[H/4+3],f=n,l=r;if(o)throw f=0,l=0,p(i);return e=f,s=l,m(f,l)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(e,s,1)}}static from_bech32(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=u;t.blockhash_from_bech32(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw p(s);return et.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_hex(){let _,e;try{const r=t.__wbindgen_add_to_stack_pointer(-16);t.auxiliarydatahash_to_hex(r,this.__wbg_ptr);var s=a()[r/4+0],n=a()[r/4+1];return _=s,e=n,m(s,n)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}static from_hex(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=u;t.blockhash_from_hex(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw p(s);return et.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}}c.exports.BlockHash=et;class ot{static __wrap(_){_=_>>>0;const e=Object.create(ot.prototype);return e.__wbg_ptr=_,e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,_}free(){const _=this.__destroy_into_raw();t.__wbg_bootstrapwitness_free(_)}to_bytes(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.bootstrapwitness_to_bytes(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=D(_,e).slice();return t.__wbindgen_free(_,e*1),s}finally{t.__wbindgen_add_to_stack_pointer(16)}}static from_bytes(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=Q(_,t.__wbindgen_malloc),o=u;t.bootstrapwitness_from_bytes(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw p(s);return ot.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_hex(){let _,e;try{const r=t.__wbindgen_add_to_stack_pointer(-16);t.bootstrapwitness_to_hex(r,this.__wbg_ptr);var s=a()[r/4+0],n=a()[r/4+1];return _=s,e=n,m(s,n)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}static from_hex(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=u;t.bootstrapwitness_from_hex(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw p(s);return ot.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_json(){let _,e;try{const l=t.__wbindgen_add_to_stack_pointer(-16);t.bootstrapwitness_to_json(l,this.__wbg_ptr);var s=a()[l/4+0],n=a()[l/4+1],r=a()[l/4+2],i=a()[l/4+3],o=s,f=n;if(i)throw o=0,f=0,p(r);return _=o,e=f,m(o,f)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}to_js_value(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.bootstrapwitness_to_js_value(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=a()[n/4+2];if(s)throw p(e);return p(_)}finally{t.__wbindgen_add_to_stack_pointer(16)}}static from_json(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=u;t.bootstrapwitness_from_json(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw p(s);return ot.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}vkey(){const _=t.bootstrapwitness_vkey(this.__wbg_ptr);return Zt.__wrap(_)}signature(){const _=t.bootstrapwitness_signature(this.__wbg_ptr);return it.__wrap(_)}chain_code(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.assetname_name(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=D(_,e).slice();return t.__wbindgen_free(_,e*1),s}finally{t.__wbindgen_add_to_stack_pointer(16)}}attributes(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.bootstrapwitness_attributes(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=D(_,e).slice();return t.__wbindgen_free(_,e*1),s}finally{t.__wbindgen_add_to_stack_pointer(16)}}static new(_,e,s,n){g(_,Zt),g(e,it);const r=Q(s,t.__wbindgen_malloc),i=u,o=Q(n,t.__wbindgen_malloc),f=u,l=t.bootstrapwitness_new(_.__wbg_ptr,e.__wbg_ptr,r,i,o,f);return ot.__wrap(l)}}c.exports.BootstrapWitness=ot;class x{static __wrap(_){_=_>>>0;const e=Object.create(x.prototype);return e.__wbg_ptr=_,e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,_}free(){const _=this.__destroy_into_raw();t.__wbg_bootstrapwitnesses_free(_)}static new(){const _=t.assetnames_new();return x.__wrap(_)}len(){return t.assetnames_len(this.__wbg_ptr)>>>0}get(_){const e=t.bootstrapwitnesses_get(this.__wbg_ptr,_);return ot.__wrap(e)}add(_){g(_,ot),t.bootstrapwitnesses_add(this.__wbg_ptr,_.__wbg_ptr)}}c.exports.BootstrapWitnesses=x;class A{static __wrap(_){_=_>>>0;const e=Object.create(A.prototype);return e.__wbg_ptr=_,e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,_}free(){const _=this.__destroy_into_raw();t.__wbg_byronaddress_free(_)}to_base58(){let _,e;try{const r=t.__wbindgen_add_to_stack_pointer(-16);t.byronaddress_to_base58(r,this.__wbg_ptr);var s=a()[r/4+0],n=a()[r/4+1];return _=s,e=n,m(s,n)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}to_bytes(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.byronaddress_to_bytes(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=D(_,e).slice();return t.__wbindgen_free(_,e*1),s}finally{t.__wbindgen_add_to_stack_pointer(16)}}static from_bytes(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=Q(_,t.__wbindgen_malloc),o=u;t.byronaddress_from_bytes(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw p(s);return A.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}byron_protocol_magic(){return t.byronaddress_byron_protocol_magic(this.__wbg_ptr)>>>0}attributes(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.byronaddress_attributes(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=D(_,e).slice();return t.__wbindgen_free(_,e*1),s}finally{t.__wbindgen_add_to_stack_pointer(16)}}network_id(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.byronaddress_network_id(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=a()[n/4+2];if(s)throw p(e);return _}finally{t.__wbindgen_add_to_stack_pointer(16)}}static from_base58(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=u;t.byronaddress_from_base58(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw p(s);return A.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}static icarus_from_key(_,e){g(_,ut);const s=t.byronaddress_icarus_from_key(_.__wbg_ptr,e);return A.__wrap(s)}static is_valid(_){const e=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),s=u;return t.byronaddress_is_valid(e,s)!==0}to_address(){const _=t.byronaddress_to_address(this.__wbg_ptr);return pt.__wrap(_)}static from_address(_){g(_,pt);const e=t.byronaddress_from_address(_.__wbg_ptr);return e===0?void 0:A.__wrap(e)}}c.exports.ByronAddress=A;class B{static __wrap(_){_=_>>>0;const e=Object.create(B.prototype);return e.__wbg_ptr=_,e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,_}free(){const _=this.__destroy_into_raw();t.__wbg_certificate_free(_)}to_bytes(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.certificate_to_bytes(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=D(_,e).slice();return t.__wbindgen_free(_,e*1),s}finally{t.__wbindgen_add_to_stack_pointer(16)}}static from_bytes(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=Q(_,t.__wbindgen_malloc),o=u;t.certificate_from_bytes(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw p(s);return B.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_hex(){let _,e;try{const r=t.__wbindgen_add_to_stack_pointer(-16);t.certificate_to_hex(r,this.__wbg_ptr);var s=a()[r/4+0],n=a()[r/4+1];return _=s,e=n,m(s,n)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}static from_hex(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=u;t.certificate_from_hex(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw p(s);return B.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_json(){let _,e;try{const l=t.__wbindgen_add_to_stack_pointer(-16);t.certificate_to_json(l,this.__wbg_ptr);var s=a()[l/4+0],n=a()[l/4+1],r=a()[l/4+2],i=a()[l/4+3],o=s,f=n;if(i)throw o=0,f=0,p(r);return _=o,e=f,m(o,f)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}to_js_value(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.certificate_to_js_value(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=a()[n/4+2];if(s)throw p(e);return p(_)}finally{t.__wbindgen_add_to_stack_pointer(16)}}static from_json(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=u;t.certificate_from_json(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw p(s);return B.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}static new_stake_registration(_){g(_,ye);const e=t.certificate_new_stake_registration(_.__wbg_ptr);return B.__wrap(e)}static new_stake_deregistration(_){g(_,he);const e=t.certificate_new_stake_deregistration(_.__wbg_ptr);return B.__wrap(e)}static new_stake_delegation(_){g(_,fe);const e=t.certificate_new_stake_delegation(_.__wbg_ptr);return B.__wrap(e)}static new_pool_registration(_){g(_,se);const e=t.certificate_new_pool_registration(_.__wbg_ptr);return B.__wrap(e)}static new_pool_retirement(_){g(_,oe);const e=t.certificate_new_pool_retirement(_.__wbg_ptr);return B.__wrap(e)}static new_genesis_key_delegation(_){g(_,Rt);const e=t.certificate_new_genesis_key_delegation(_.__wbg_ptr);return B.__wrap(e)}static new_move_instantaneous_rewards_cert(_){g(_,Z_);const e=t.certificate_new_move_instantaneous_rewards_cert(_.__wbg_ptr);return B.__wrap(e)}kind(){return t.certificate_kind(this.__wbg_ptr)>>>0}as_stake_registration(){const _=t.certificate_as_stake_registration(this.__wbg_ptr);return _===0?void 0:ye.__wrap(_)}as_stake_deregistration(){const _=t.certificate_as_stake_deregistration(this.__wbg_ptr);return _===0?void 0:he.__wrap(_)}as_stake_delegation(){const _=t.certificate_as_stake_delegation(this.__wbg_ptr);return _===0?void 0:fe.__wrap(_)}as_pool_registration(){const _=t.certificate_as_pool_registration(this.__wbg_ptr);return _===0?void 0:se.__wrap(_)}as_pool_retirement(){const _=t.certificate_as_pool_retirement(this.__wbg_ptr);return _===0?void 0:oe.__wrap(_)}as_genesis_key_delegation(){const _=t.certificate_as_genesis_key_delegation(this.__wbg_ptr);return _===0?void 0:Rt.__wrap(_)}as_move_instantaneous_rewards_cert(){const _=t.certificate_as_move_instantaneous_rewards_cert(this.__wbg_ptr);return _===0?void 0:Z_.__wrap(_)}}c.exports.Certificate=B;class N{static __wrap(_){_=_>>>0;const e=Object.create(N.prototype);return e.__wbg_ptr=_,e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,_}free(){const _=this.__destroy_into_raw();t.__wbg_certificates_free(_)}to_bytes(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.certificates_to_bytes(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=D(_,e).slice();return t.__wbindgen_free(_,e*1),s}finally{t.__wbindgen_add_to_stack_pointer(16)}}static from_bytes(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=Q(_,t.__wbindgen_malloc),o=u;t.certificates_from_bytes(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw p(s);return N.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_hex(){let _,e;try{const r=t.__wbindgen_add_to_stack_pointer(-16);t.certificates_to_hex(r,this.__wbg_ptr);var s=a()[r/4+0],n=a()[r/4+1];return _=s,e=n,m(s,n)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}static from_hex(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=u;t.certificates_from_hex(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw p(s);return N.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_json(){let _,e;try{const l=t.__wbindgen_add_to_stack_pointer(-16);t.certificates_to_json(l,this.__wbg_ptr);var s=a()[l/4+0],n=a()[l/4+1],r=a()[l/4+2],i=a()[l/4+3],o=s,f=n;if(i)throw o=0,f=0,p(r);return _=o,e=f,m(o,f)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}to_js_value(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.certificates_to_js_value(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=a()[n/4+2];if(s)throw p(e);return p(_)}finally{t.__wbindgen_add_to_stack_pointer(16)}}static from_json(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=u;t.certificates_from_json(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw p(s);return N.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}static new(){const _=t.certificates_new();return N.__wrap(_)}len(){return t.assetnames_len(this.__wbg_ptr)>>>0}get(_){const e=t.certificates_get(this.__wbg_ptr,_);return B.__wrap(e)}add(_){g(_,B),t.certificates_add(this.__wbg_ptr,_.__wbg_ptr)}}c.exports.Certificates=N;class S{static __wrap(_){_=_>>>0;const e=Object.create(S.prototype);return e.__wbg_ptr=_,e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,_}free(){const _=this.__destroy_into_raw();t.__wbg_constrplutusdata_free(_)}to_bytes(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.constrplutusdata_to_bytes(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=D(_,e).slice();return t.__wbindgen_free(_,e*1),s}finally{t.__wbindgen_add_to_stack_pointer(16)}}static from_bytes(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=Q(_,t.__wbindgen_malloc),o=u;t.constrplutusdata_from_bytes(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw p(s);return S.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_hex(){let _,e;try{const r=t.__wbindgen_add_to_stack_pointer(-16);t.constrplutusdata_to_hex(r,this.__wbg_ptr);var s=a()[r/4+0],n=a()[r/4+1];return _=s,e=n,m(s,n)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}static from_hex(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=u;t.constrplutusdata_from_hex(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw p(s);return S.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}alternative(){const _=t.constrplutusdata_alternative(this.__wbg_ptr);return I.__wrap(_)}data(){const _=t.constrplutusdata_data(this.__wbg_ptr);return n_.__wrap(_)}static new(_,e){g(_,I),g(e,n_);const s=t.constrplutusdata_new(_.__wbg_ptr,e.__wbg_ptr);return S.__wrap(s)}}c.exports.ConstrPlutusData=S;class T{static __wrap(_){_=_>>>0;const e=Object.create(T.prototype);return e.__wbg_ptr=_,e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,_}free(){const _=this.__destroy_into_raw();t.__wbg_costmodel_free(_)}to_bytes(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.costmodel_to_bytes(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=D(_,e).slice();return t.__wbindgen_free(_,e*1),s}finally{t.__wbindgen_add_to_stack_pointer(16)}}static from_bytes(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=Q(_,t.__wbindgen_malloc),o=u;t.costmodel_from_bytes(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw p(s);return T.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_hex(){let _,e;try{const r=t.__wbindgen_add_to_stack_pointer(-16);t.costmodel_to_hex(r,this.__wbg_ptr);var s=a()[r/4+0],n=a()[r/4+1];return _=s,e=n,m(s,n)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}static from_hex(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=u;t.costmodel_from_hex(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw p(s);return T.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_json(){let _,e;try{const l=t.__wbindgen_add_to_stack_pointer(-16);t.costmodel_to_json(l,this.__wbg_ptr);var s=a()[l/4+0],n=a()[l/4+1],r=a()[l/4+2],i=a()[l/4+3],o=s,f=n;if(i)throw o=0,f=0,p(r);return _=o,e=f,m(o,f)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}to_js_value(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.costmodel_to_js_value(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=a()[n/4+2];if(s)throw p(e);return p(_)}finally{t.__wbindgen_add_to_stack_pointer(16)}}static from_json(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=u;t.costmodel_from_json(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw p(s);return T.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}static new(){const _=t.certificates_new();return T.__wrap(_)}set(_,e){try{const i=t.__wbindgen_add_to_stack_pointer(-16);g(e,St),t.costmodel_set(i,this.__wbg_ptr,_,e.__wbg_ptr);var s=a()[i/4+0],n=a()[i/4+1],r=a()[i/4+2];if(r)throw p(n);return St.__wrap(s)}finally{t.__wbindgen_add_to_stack_pointer(16)}}get(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16);t.costmodel_get(r,this.__wbg_ptr,_);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw p(s);return St.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}len(){return t.assetnames_len(this.__wbg_ptr)>>>0}}c.exports.CostModel=T;class F{static __wrap(_){_=_>>>0;const e=Object.create(F.prototype);return e.__wbg_ptr=_,e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,_}free(){const _=this.__destroy_into_raw();t.__wbg_costmdls_free(_)}to_bytes(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.costmdls_to_bytes(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=D(_,e).slice();return t.__wbindgen_free(_,e*1),s}finally{t.__wbindgen_add_to_stack_pointer(16)}}static from_bytes(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=Q(_,t.__wbindgen_malloc),o=u;t.costmdls_from_bytes(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw p(s);return F.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_hex(){let _,e;try{const r=t.__wbindgen_add_to_stack_pointer(-16);t.costmdls_to_hex(r,this.__wbg_ptr);var s=a()[r/4+0],n=a()[r/4+1];return _=s,e=n,m(s,n)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}static from_hex(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=u;t.costmdls_from_hex(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw p(s);return F.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_json(){let _,e;try{const l=t.__wbindgen_add_to_stack_pointer(-16);t.costmdls_to_json(l,this.__wbg_ptr);var s=a()[l/4+0],n=a()[l/4+1],r=a()[l/4+2],i=a()[l/4+3],o=s,f=n;if(i)throw o=0,f=0,p(r);return _=o,e=f,m(o,f)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}to_js_value(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.costmdls_to_js_value(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=a()[n/4+2];if(s)throw p(e);return p(_)}finally{t.__wbindgen_add_to_stack_pointer(16)}}static from_json(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=u;t.costmdls_from_json(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw p(s);return F.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}static new(){const _=t.assets_new();return F.__wrap(_)}len(){return t.assetnames_len(this.__wbg_ptr)>>>0}insert(_,e){g(_,Jt),g(e,T);const s=t.costmdls_insert(this.__wbg_ptr,_.__wbg_ptr,e.__wbg_ptr);return s===0?void 0:T.__wrap(s)}get(_){g(_,Jt);const e=t.costmdls_get(this.__wbg_ptr,_.__wbg_ptr);return e===0?void 0:T.__wrap(e)}keys(){const _=t.costmdls_keys(this.__wbg_ptr);return Ye.__wrap(_)}retain_language_versions(_){g(_,Ye);const e=t.costmdls_retain_language_versions(this.__wbg_ptr,_.__wbg_ptr);return F.__wrap(e)}}c.exports.Costmdls=F;class E{static __wrap(_){_=_>>>0;const e=Object.create(E.prototype);return e.__wbg_ptr=_,e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,_}free(){const _=this.__destroy_into_raw();t.__wbg_dnsrecordaoraaaa_free(_)}to_bytes(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.dnsrecordaoraaaa_to_bytes(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=D(_,e).slice();return t.__wbindgen_free(_,e*1),s}finally{t.__wbindgen_add_to_stack_pointer(16)}}static from_bytes(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=Q(_,t.__wbindgen_malloc),o=u;t.dnsrecordaoraaaa_from_bytes(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw p(s);return E.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_hex(){let _,e;try{const r=t.__wbindgen_add_to_stack_pointer(-16);t.dnsrecordaoraaaa_to_hex(r,this.__wbg_ptr);var s=a()[r/4+0],n=a()[r/4+1];return _=s,e=n,m(s,n)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}static from_hex(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=u;t.dnsrecordaoraaaa_from_hex(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw p(s);return E.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_json(){let _,e;try{const l=t.__wbindgen_add_to_stack_pointer(-16);t.dnsrecordaoraaaa_to_json(l,this.__wbg_ptr);var s=a()[l/4+0],n=a()[l/4+1],r=a()[l/4+2],i=a()[l/4+3],o=s,f=n;if(i)throw o=0,f=0,p(r);return _=o,e=f,m(o,f)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}to_js_value(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.dnsrecordaoraaaa_to_js_value(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=a()[n/4+2];if(s)throw p(e);return p(_)}finally{t.__wbindgen_add_to_stack_pointer(16)}}static from_json(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=u;t.dnsrecordaoraaaa_from_json(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw p(s);return E.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}static new(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=u;t.dnsrecordaoraaaa_new(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw p(s);return E.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}record(){let _,e;try{const r=t.__wbindgen_add_to_stack_pointer(-16);t.dnsrecordaoraaaa_record(r,this.__wbg_ptr);var s=a()[r/4+0],n=a()[r/4+1];return _=s,e=n,m(s,n)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}}c.exports.DNSRecordAorAAAA=E;class O{static __wrap(_){_=_>>>0;const e=Object.create(O.prototype);return e.__wbg_ptr=_,e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,_}free(){const _=this.__destroy_into_raw();t.__wbg_dnsrecordsrv_free(_)}to_bytes(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.dnsrecordsrv_to_bytes(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=D(_,e).slice();return t.__wbindgen_free(_,e*1),s}finally{t.__wbindgen_add_to_stack_pointer(16)}}static from_bytes(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=Q(_,t.__wbindgen_malloc),o=u;t.dnsrecordsrv_from_bytes(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw p(s);return O.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_hex(){let _,e;try{const r=t.__wbindgen_add_to_stack_pointer(-16);t.dnsrecordsrv_to_hex(r,this.__wbg_ptr);var s=a()[r/4+0],n=a()[r/4+1];return _=s,e=n,m(s,n)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}static from_hex(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=u;t.dnsrecordsrv_from_hex(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw p(s);return O.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_json(){let _,e;try{const l=t.__wbindgen_add_to_stack_pointer(-16);t.dnsrecordaoraaaa_to_json(l,this.__wbg_ptr);var s=a()[l/4+0],n=a()[l/4+1],r=a()[l/4+2],i=a()[l/4+3],o=s,f=n;if(i)throw o=0,f=0,p(r);return _=o,e=f,m(o,f)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}to_js_value(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.dnsrecordaoraaaa_to_js_value(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=a()[n/4+2];if(s)throw p(e);return p(_)}finally{t.__wbindgen_add_to_stack_pointer(16)}}static from_json(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=u;t.dnsrecordaoraaaa_from_json(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw p(s);return O.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}static new(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=u;t.dnsrecordsrv_new(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw p(s);return O.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}record(){let _,e;try{const r=t.__wbindgen_add_to_stack_pointer(-16);t.dnsrecordaoraaaa_record(r,this.__wbg_ptr);var s=a()[r/4+0],n=a()[r/4+1];return _=s,e=n,m(s,n)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}}c.exports.DNSRecordSRV=O;class M{static __wrap(_){_=_>>>0;const e=Object.create(M.prototype);return e.__wbg_ptr=_,e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,_}free(){const _=this.__destroy_into_raw();t.__wbg_datacost_free(_)}static new_coins_per_word(_){g(_,I);const e=t.datacost_new_coins_per_word(_.__wbg_ptr);return M.__wrap(e)}static new_coins_per_byte(_){g(_,I);const e=t.datacost_new_coins_per_byte(_.__wbg_ptr);return M.__wrap(e)}coins_per_byte(){const _=t.datacost_coins_per_byte(this.__wbg_ptr);return I.__wrap(_)}}c.exports.DataCost=M;class U{static __wrap(_){_=_>>>0;const e=Object.create(U.prototype);return e.__wbg_ptr=_,e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,_}free(){const _=this.__destroy_into_raw();t.__wbg_datahash_free(_)}static from_bytes(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=Q(_,t.__wbindgen_malloc),o=u;t.datahash_from_bytes(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw p(s);return U.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_bytes(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.auxiliarydatahash_to_bytes(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=D(_,e).slice();return t.__wbindgen_free(_,e*1),s}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_bech32(_){let e,s;try{const H=t.__wbindgen_add_to_stack_pointer(-16),rt=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),dt=u;t.auxiliarydatahash_to_bech32(H,this.__wbg_ptr,rt,dt);var n=a()[H/4+0],r=a()[H/4+1],i=a()[H/4+2],o=a()[H/4+3],f=n,l=r;if(o)throw f=0,l=0,p(i);return e=f,s=l,m(f,l)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(e,s,1)}}static from_bech32(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=u;t.datahash_from_bech32(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw p(s);return U.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_hex(){let _,e;try{const r=t.__wbindgen_add_to_stack_pointer(-16);t.auxiliarydatahash_to_hex(r,this.__wbg_ptr);var s=a()[r/4+0],n=a()[r/4+1];return _=s,e=n,m(s,n)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}static from_hex(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=u;t.datahash_from_hex(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw p(s);return U.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}}c.exports.DataHash=U;class V{static __wrap(_){_=_>>>0;const e=Object.create(V.prototype);return e.__wbg_ptr=_,e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,_}free(){const _=this.__destroy_into_raw();t.__wbg_datumsource_free(_)}static new(_){g(_,ht);const e=t.datumsource_new(_.__wbg_ptr);return V.__wrap(e)}static new_ref_input(_){g(_,Ct);const e=t.datumsource_new_ref_input(_.__wbg_ptr);return V.__wrap(e)}}c.exports.DatumSource=V;class W{static __wrap(_){_=_>>>0;const e=Object.create(W.prototype);return e.__wbg_ptr=_,e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,_}free(){const _=this.__destroy_into_raw();t.__wbg_ed25519keyhash_free(_)}static from_bytes(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=Q(_,t.__wbindgen_malloc),o=u;t.ed25519keyhash_from_bytes(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw p(s);return W.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_bytes(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.ed25519keyhash_to_bytes(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=D(_,e).slice();return t.__wbindgen_free(_,e*1),s}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_bech32(_){let e,s;try{const H=t.__wbindgen_add_to_stack_pointer(-16),rt=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),dt=u;t.ed25519keyhash_to_bech32(H,this.__wbg_ptr,rt,dt);var n=a()[H/4+0],r=a()[H/4+1],i=a()[H/4+2],o=a()[H/4+3],f=n,l=r;if(o)throw f=0,l=0,p(i);return e=f,s=l,m(f,l)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(e,s,1)}}static from_bech32(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=u;t.ed25519keyhash_from_bech32(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw p(s);return W.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_hex(){let _,e;try{const r=t.__wbindgen_add_to_stack_pointer(-16);t.ed25519keyhash_to_hex(r,this.__wbg_ptr);var s=a()[r/4+0],n=a()[r/4+1];return _=s,e=n,m(s,n)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}static from_hex(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=u;t.ed25519keyhash_from_hex(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw p(s);return W.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}}c.exports.Ed25519KeyHash=W;class Z{static __wrap(_){_=_>>>0;const e=Object.create(Z.prototype);return e.__wbg_ptr=_,e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,_}free(){const _=this.__destroy_into_raw();t.__wbg_ed25519keyhashes_free(_)}to_bytes(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.ed25519keyhashes_to_bytes(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=D(_,e).slice();return t.__wbindgen_free(_,e*1),s}finally{t.__wbindgen_add_to_stack_pointer(16)}}static from_bytes(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=Q(_,t.__wbindgen_malloc),o=u;t.ed25519keyhashes_from_bytes(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw p(s);return Z.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_hex(){let _,e;try{const r=t.__wbindgen_add_to_stack_pointer(-16);t.ed25519keyhashes_to_hex(r,this.__wbg_ptr);var s=a()[r/4+0],n=a()[r/4+1];return _=s,e=n,m(s,n)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}static from_hex(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=u;t.ed25519keyhashes_from_hex(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw p(s);return Z.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_json(){let _,e;try{const l=t.__wbindgen_add_to_stack_pointer(-16);t.ed25519keyhashes_to_json(l,this.__wbg_ptr);var s=a()[l/4+0],n=a()[l/4+1],r=a()[l/4+2],i=a()[l/4+3],o=s,f=n;if(i)throw o=0,f=0,p(r);return _=o,e=f,m(o,f)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}to_js_value(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.ed25519keyhashes_to_js_value(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=a()[n/4+2];if(s)throw p(e);return p(_)}finally{t.__wbindgen_add_to_stack_pointer(16)}}static from_json(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=u;t.ed25519keyhashes_from_json(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw p(s);return Z.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}static new(){const _=t.ed25519keyhashes_new();return Z.__wrap(_)}len(){return t.assetnames_len(this.__wbg_ptr)>>>0}get(_){const e=t.ed25519keyhashes_get(this.__wbg_ptr,_);return W.__wrap(e)}add(_){g(_,W),t.ed25519keyhashes_add(this.__wbg_ptr,_.__wbg_ptr)}to_option(){const _=t.ed25519keyhashes_to_option(this.__wbg_ptr);return _===0?void 0:Z.__wrap(_)}}c.exports.Ed25519KeyHashes=Z;class it{static __wrap(_){_=_>>>0;const e=Object.create(it.prototype);return e.__wbg_ptr=_,e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,_}free(){const _=this.__destroy_into_raw();t.__wbg_ed25519signature_free(_)}to_bytes(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.bip32publickey_as_bytes(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=D(_,e).slice();return t.__wbindgen_free(_,e*1),s}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_bech32(){let _,e;try{const r=t.__wbindgen_add_to_stack_pointer(-16);t.ed25519signature_to_bech32(r,this.__wbg_ptr);var s=a()[r/4+0],n=a()[r/4+1];return _=s,e=n,m(s,n)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}to_hex(){let _,e;try{const r=t.__wbindgen_add_to_stack_pointer(-16);t.ed25519signature_to_hex(r,this.__wbg_ptr);var s=a()[r/4+0],n=a()[r/4+1];return _=s,e=n,m(s,n)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}static from_bech32(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=u;t.ed25519signature_from_bech32(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw p(s);return it.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}static from_hex(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=u;t.ed25519signature_from_hex(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw p(s);return it.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}static from_bytes(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=Q(_,t.__wbindgen_malloc),o=u;t.ed25519signature_from_bytes(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw p(s);return it.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}}c.exports.Ed25519Signature=it;class Bt{static __wrap(_){_=_>>>0;const e=Object.create(Bt.prototype);return e.__wbg_ptr=_,e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,_}free(){const _=this.__destroy_into_raw();t.__wbg_enterpriseaddress_free(_)}static new(_,e){g(e,Qt);const s=t.enterpriseaddress_new(_,e.__wbg_ptr);return Bt.__wrap(s)}payment_cred(){const _=t.baseaddress_payment_cred(this.__wbg_ptr);return Qt.__wrap(_)}to_address(){const _=t.enterpriseaddress_to_address(this.__wbg_ptr);return pt.__wrap(_)}static from_address(_){g(_,pt);const e=t.enterpriseaddress_from_address(_.__wbg_ptr);return e===0?void 0:Bt.__wrap(e)}}c.exports.EnterpriseAddress=Bt;class vt{static __wrap(_){_=_>>>0;const e=Object.create(vt.prototype);return e.__wbg_ptr=_,e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,_}free(){const _=this.__destroy_into_raw();t.__wbg_exunitprices_free(_)}to_bytes(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.exunitprices_to_bytes(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=D(_,e).slice();return t.__wbindgen_free(_,e*1),s}finally{t.__wbindgen_add_to_stack_pointer(16)}}static from_bytes(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=Q(_,t.__wbindgen_malloc),o=u;t.exunitprices_from_bytes(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw p(s);return vt.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_hex(){let _,e;try{const r=t.__wbindgen_add_to_stack_pointer(-16);t.exunitprices_to_hex(r,this.__wbg_ptr);var s=a()[r/4+0],n=a()[r/4+1];return _=s,e=n,m(s,n)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}static from_hex(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=u;t.exunitprices_from_hex(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw p(s);return vt.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_json(){let _,e;try{const l=t.__wbindgen_add_to_stack_pointer(-16);t.exunitprices_to_json(l,this.__wbg_ptr);var s=a()[l/4+0],n=a()[l/4+1],r=a()[l/4+2],i=a()[l/4+3],o=s,f=n;if(i)throw o=0,f=0,p(r);return _=o,e=f,m(o,f)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}to_js_value(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.exunitprices_to_js_value(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=a()[n/4+2];if(s)throw p(e);return p(_)}finally{t.__wbindgen_add_to_stack_pointer(16)}}static from_json(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=u;t.exunitprices_from_json(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw p(s);return vt.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}mem_price(){const _=t.exunitprices_mem_price(this.__wbg_ptr);return Vt.__wrap(_)}step_price(){const _=t.exunitprices_step_price(this.__wbg_ptr);return Vt.__wrap(_)}static new(_,e){g(_,Vt),g(e,Vt);const s=t.exunitprices_new(_.__wbg_ptr,e.__wbg_ptr);return vt.__wrap(s)}}c.exports.ExUnitPrices=vt;class at{static __wrap(_){_=_>>>0;const e=Object.create(at.prototype);return e.__wbg_ptr=_,e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,_}free(){const _=this.__destroy_into_raw();t.__wbg_exunits_free(_)}to_bytes(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.exunits_to_bytes(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=D(_,e).slice();return t.__wbindgen_free(_,e*1),s}finally{t.__wbindgen_add_to_stack_pointer(16)}}static from_bytes(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=Q(_,t.__wbindgen_malloc),o=u;t.exunits_from_bytes(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw p(s);return at.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_hex(){let _,e;try{const r=t.__wbindgen_add_to_stack_pointer(-16);t.exunits_to_hex(r,this.__wbg_ptr);var s=a()[r/4+0],n=a()[r/4+1];return _=s,e=n,m(s,n)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}static from_hex(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=u;t.exunits_from_hex(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw p(s);return at.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_json(){let _,e;try{const l=t.__wbindgen_add_to_stack_pointer(-16);t.exunits_to_json(l,this.__wbg_ptr);var s=a()[l/4+0],n=a()[l/4+1],r=a()[l/4+2],i=a()[l/4+3],o=s,f=n;if(i)throw o=0,f=0,p(r);return _=o,e=f,m(o,f)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}to_js_value(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.exunits_to_js_value(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=a()[n/4+2];if(s)throw p(e);return p(_)}finally{t.__wbindgen_add_to_stack_pointer(16)}}static from_json(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=u;t.exunits_from_json(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw p(s);return at.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}mem(){const _=t.exunits_mem(this.__wbg_ptr);return I.__wrap(_)}steps(){const _=t.exunits_steps(this.__wbg_ptr);return I.__wrap(_)}static new(_,e){g(_,I),g(e,I);const s=t.exunits_new(_.__wbg_ptr,e.__wbg_ptr);return at.__wrap(s)}}c.exports.ExUnits=at;class ft{static __wrap(_){_=_>>>0;const e=Object.create(ft.prototype);return e.__wbg_ptr=_,e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,_}free(){const _=this.__destroy_into_raw();t.__wbg_fixedtransaction_free(_)}to_bytes(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.fixedtransaction_to_bytes(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=D(_,e).slice();return t.__wbindgen_free(_,e*1),s}finally{t.__wbindgen_add_to_stack_pointer(16)}}static from_bytes(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=Q(_,t.__wbindgen_malloc),o=u;t.fixedtransaction_from_bytes(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw p(s);return ft.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_hex(){let _,e;try{const r=t.__wbindgen_add_to_stack_pointer(-16);t.fixedtransaction_to_hex(r,this.__wbg_ptr);var s=a()[r/4+0],n=a()[r/4+1];return _=s,e=n,m(s,n)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}static from_hex(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=u;t.fixedtransaction_from_hex(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw p(s);return ft.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}static new(_,e,s){try{const o=t.__wbindgen_add_to_stack_pointer(-16),f=Q(_,t.__wbindgen_malloc),l=u,H=Q(e,t.__wbindgen_malloc),rt=u;t.fixedtransaction_new(o,f,l,H,rt,s);var n=a()[o/4+0],r=a()[o/4+1],i=a()[o/4+2];if(i)throw p(r);return ft.__wrap(n)}finally{t.__wbindgen_add_to_stack_pointer(16)}}static new_with_auxiliary(_,e,s,n){try{const f=t.__wbindgen_add_to_stack_pointer(-16),l=Q(_,t.__wbindgen_malloc),H=u,rt=Q(e,t.__wbindgen_malloc),dt=u,Xe=Q(s,t.__wbindgen_malloc),mr=u;t.fixedtransaction_new_with_auxiliary(f,l,H,rt,dt,Xe,mr,n);var r=a()[f/4+0],i=a()[f/4+1],o=a()[f/4+2];if(o)throw p(i);return ft.__wrap(r)}finally{t.__wbindgen_add_to_stack_pointer(16)}}body(){const _=t.fixedtransaction_body(this.__wbg_ptr);return Wt.__wrap(_)}raw_body(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.fixedtransaction_raw_body(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=D(_,e).slice();return t.__wbindgen_free(_,e*1),s}finally{t.__wbindgen_add_to_stack_pointer(16)}}set_body(_){try{const n=t.__wbindgen_add_to_stack_pointer(-16),r=Q(_,t.__wbindgen_malloc),i=u;t.fixedtransaction_set_body(n,this.__wbg_ptr,r,i);var e=a()[n/4+0],s=a()[n/4+1];if(s)throw p(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}set_witness_set(_){try{const n=t.__wbindgen_add_to_stack_pointer(-16),r=Q(_,t.__wbindgen_malloc),i=u;t.fixedtransaction_set_witness_set(n,this.__wbg_ptr,r,i);var e=a()[n/4+0],s=a()[n/4+1];if(s)throw p(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}witness_set(){const _=t.fixedtransaction_witness_set(this.__wbg_ptr);return f_.__wrap(_)}raw_witness_set(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.fixedtransaction_raw_witness_set(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=D(_,e).slice();return t.__wbindgen_free(_,e*1),s}finally{t.__wbindgen_add_to_stack_pointer(16)}}set_is_valid(_){t.fixedtransaction_set_is_valid(this.__wbg_ptr,_)}is_valid(){return t.fixedtransaction_is_valid(this.__wbg_ptr)!==0}set_auxiliary_data(_){try{const n=t.__wbindgen_add_to_stack_pointer(-16),r=Q(_,t.__wbindgen_malloc),i=u;t.fixedtransaction_set_auxiliary_data(n,this.__wbg_ptr,r,i);var e=a()[n/4+0],s=a()[n/4+1];if(s)throw p(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}auxiliary_data(){const _=t.fixedtransaction_auxiliary_data(this.__wbg_ptr);return _===0?void 0:Pt.__wrap(_)}raw_auxiliary_data(){try{const s=t.__wbindgen_add_to_stack_pointer(-16);t.fixedtransaction_raw_auxiliary_data(s,this.__wbg_ptr);var _=a()[s/4+0],e=a()[s/4+1];let n;return _!==0&&(n=D(_,e).slice(),t.__wbindgen_free(_,e*1)),n}finally{t.__wbindgen_add_to_stack_pointer(16)}}}c.exports.FixedTransaction=ft;class Ot{static __wrap(_){_=_>>>0;const e=Object.create(Ot.prototype);return e.__wbg_ptr=_,e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,_}free(){const _=this.__destroy_into_raw();t.__wbg_generaltransactionmetadata_free(_)}to_bytes(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.generaltransactionmetadata_to_bytes(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=D(_,e).slice();return t.__wbindgen_free(_,e*1),s}finally{t.__wbindgen_add_to_stack_pointer(16)}}static from_bytes(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=Q(_,t.__wbindgen_malloc),o=u;t.generaltransactionmetadata_from_bytes(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw p(s);return Ot.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_hex(){let _,e;try{const r=t.__wbindgen_add_to_stack_pointer(-16);t.generaltransactionmetadata_to_hex(r,this.__wbg_ptr);var s=a()[r/4+0],n=a()[r/4+1];return _=s,e=n,m(s,n)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}static from_hex(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=u;t.generaltransactionmetadata_from_hex(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw p(s);return Ot.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_json(){let _,e;try{const l=t.__wbindgen_add_to_stack_pointer(-16);t.generaltransactionmetadata_to_json(l,this.__wbg_ptr);var s=a()[l/4+0],n=a()[l/4+1],r=a()[l/4+2],i=a()[l/4+3],o=s,f=n;if(i)throw o=0,f=0,p(r);return _=o,e=f,m(o,f)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}to_js_value(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.generaltransactionmetadata_to_js_value(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=a()[n/4+2];if(s)throw p(e);return p(_)}finally{t.__wbindgen_add_to_stack_pointer(16)}}static from_json(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=u;t.generaltransactionmetadata_from_json(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw p(s);return Ot.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}static new(){const _=t.auxiliarydataset_new();return Ot.__wrap(_)}len(){return t.auxiliarydataset_len(this.__wbg_ptr)>>>0}insert(_,e){g(_,I),g(e,mt);const s=t.generaltransactionmetadata_insert(this.__wbg_ptr,_.__wbg_ptr,e.__wbg_ptr);return s===0?void 0:mt.__wrap(s)}get(_){g(_,I);const e=t.generaltransactionmetadata_get(this.__wbg_ptr,_.__wbg_ptr);return e===0?void 0:mt.__wrap(e)}keys(){const _=t.generaltransactionmetadata_keys(this.__wbg_ptr);return Je.__wrap(_)}}c.exports.GeneralTransactionMetadata=Ot;class o_{static __wrap(_){_=_>>>0;const e=Object.create(o_.prototype);return e.__wbg_ptr=_,e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,_}free(){const _=this.__destroy_into_raw();t.__wbg_genesisdelegatehash_free(_)}static from_bytes(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=Q(_,t.__wbindgen_malloc),o=u;t.genesisdelegatehash_from_bytes(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw p(s);return o_.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_bytes(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.ed25519keyhash_to_bytes(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=D(_,e).slice();return t.__wbindgen_free(_,e*1),s}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_bech32(_){let e,s;try{const H=t.__wbindgen_add_to_stack_pointer(-16),rt=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),dt=u;t.ed25519keyhash_to_bech32(H,this.__wbg_ptr,rt,dt);var n=a()[H/4+0],r=a()[H/4+1],i=a()[H/4+2],o=a()[H/4+3],f=n,l=r;if(o)throw f=0,l=0,p(i);return e=f,s=l,m(f,l)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(e,s,1)}}static from_bech32(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=u;t.genesisdelegatehash_from_bech32(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw p(s);return o_.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_hex(){let _,e;try{const r=t.__wbindgen_add_to_stack_pointer(-16);t.ed25519keyhash_to_hex(r,this.__wbg_ptr);var s=a()[r/4+0],n=a()[r/4+1];return _=s,e=n,m(s,n)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}static from_hex(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=u;t.genesisdelegatehash_from_hex(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw p(s);return o_.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}}c.exports.GenesisDelegateHash=o_;class Xt{static __wrap(_){_=_>>>0;const e=Object.create(Xt.prototype);return e.__wbg_ptr=_,e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,_}free(){const _=this.__destroy_into_raw();t.__wbg_genesishash_free(_)}static from_bytes(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=Q(_,t.__wbindgen_malloc),o=u;t.genesishash_from_bytes(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw p(s);return Xt.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_bytes(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.ed25519keyhash_to_bytes(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=D(_,e).slice();return t.__wbindgen_free(_,e*1),s}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_bech32(_){let e,s;try{const H=t.__wbindgen_add_to_stack_pointer(-16),rt=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),dt=u;t.ed25519keyhash_to_bech32(H,this.__wbg_ptr,rt,dt);var n=a()[H/4+0],r=a()[H/4+1],i=a()[H/4+2],o=a()[H/4+3],f=n,l=r;if(o)throw f=0,l=0,p(i);return e=f,s=l,m(f,l)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(e,s,1)}}static from_bech32(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=u;t.genesishash_from_bech32(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw p(s);return Xt.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_hex(){let _,e;try{const r=t.__wbindgen_add_to_stack_pointer(-16);t.ed25519keyhash_to_hex(r,this.__wbg_ptr);var s=a()[r/4+0],n=a()[r/4+1];return _=s,e=n,m(s,n)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}static from_hex(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=u;t.genesishash_from_hex(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw p(s);return Xt.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}}c.exports.GenesisHash=Xt;class c_{static __wrap(_){_=_>>>0;const e=Object.create(c_.prototype);return e.__wbg_ptr=_,e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,_}free(){const _=this.__destroy_into_raw();t.__wbg_genesishashes_free(_)}to_bytes(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.genesishashes_to_bytes(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=D(_,e).slice();return t.__wbindgen_free(_,e*1),s}finally{t.__wbindgen_add_to_stack_pointer(16)}}static from_bytes(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=Q(_,t.__wbindgen_malloc),o=u;t.genesishashes_from_bytes(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw p(s);return c_.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_hex(){let _,e;try{const r=t.__wbindgen_add_to_stack_pointer(-16);t.genesishashes_to_hex(r,this.__wbg_ptr);var s=a()[r/4+0],n=a()[r/4+1];return _=s,e=n,m(s,n)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}static from_hex(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=u;t.genesishashes_from_hex(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw p(s);return c_.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_json(){let _,e;try{const l=t.__wbindgen_add_to_stack_pointer(-16);t.ed25519keyhashes_to_json(l,this.__wbg_ptr);var s=a()[l/4+0],n=a()[l/4+1],r=a()[l/4+2],i=a()[l/4+3],o=s,f=n;if(i)throw o=0,f=0,p(r);return _=o,e=f,m(o,f)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}to_js_value(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.ed25519keyhashes_to_js_value(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=a()[n/4+2];if(s)throw p(e);return p(_)}finally{t.__wbindgen_add_to_stack_pointer(16)}}static from_json(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=u;t.genesishashes_from_json(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw p(s);return c_.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}static new(){const _=t.ed25519keyhashes_new();return c_.__wrap(_)}len(){return t.assetnames_len(this.__wbg_ptr)>>>0}get(_){const e=t.genesishashes_get(this.__wbg_ptr,_);return Xt.__wrap(e)}add(_){g(_,Xt),t.ed25519keyhashes_add(this.__wbg_ptr,_.__wbg_ptr)}}c.exports.GenesisHashes=c_;class Rt{static __wrap(_){_=_>>>0;const e=Object.create(Rt.prototype);return e.__wbg_ptr=_,e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,_}free(){const _=this.__destroy_into_raw();t.__wbg_genesiskeydelegation_free(_)}to_bytes(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.genesiskeydelegation_to_bytes(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=D(_,e).slice();return t.__wbindgen_free(_,e*1),s}finally{t.__wbindgen_add_to_stack_pointer(16)}}static from_bytes(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=Q(_,t.__wbindgen_malloc),o=u;t.genesiskeydelegation_from_bytes(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw p(s);return Rt.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_hex(){let _,e;try{const r=t.__wbindgen_add_to_stack_pointer(-16);t.genesiskeydelegation_to_hex(r,this.__wbg_ptr);var s=a()[r/4+0],n=a()[r/4+1];return _=s,e=n,m(s,n)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}static from_hex(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=u;t.genesiskeydelegation_from_hex(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw p(s);return Rt.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_json(){let _,e;try{const l=t.__wbindgen_add_to_stack_pointer(-16);t.genesiskeydelegation_to_json(l,this.__wbg_ptr);var s=a()[l/4+0],n=a()[l/4+1],r=a()[l/4+2],i=a()[l/4+3],o=s,f=n;if(i)throw o=0,f=0,p(r);return _=o,e=f,m(o,f)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}to_js_value(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.genesiskeydelegation_to_js_value(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=a()[n/4+2];if(s)throw p(e);return p(_)}finally{t.__wbindgen_add_to_stack_pointer(16)}}static from_json(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=u;t.genesiskeydelegation_from_json(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw p(s);return Rt.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}genesishash(){const _=t.genesiskeydelegation_genesishash(this.__wbg_ptr);return Xt.__wrap(_)}genesis_delegate_hash(){const _=t.genesiskeydelegation_genesis_delegate_hash(this.__wbg_ptr);return o_.__wrap(_)}vrf_keyhash(){const _=t.genesiskeydelegation_vrf_keyhash(this.__wbg_ptr);return K_.__wrap(_)}static new(_,e,s){g(_,Xt),g(e,o_),g(s,K_);const n=t.genesiskeydelegation_new(_.__wbg_ptr,e.__wbg_ptr,s.__wbg_ptr);return Rt.__wrap(n)}}c.exports.GenesisKeyDelegation=Rt;class __{static __wrap(_){_=_>>>0;const e=Object.create(__.prototype);return e.__wbg_ptr=_,e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,_}free(){const _=this.__destroy_into_raw();t.__wbg_header_free(_)}to_bytes(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.header_to_bytes(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=D(_,e).slice();return t.__wbindgen_free(_,e*1),s}finally{t.__wbindgen_add_to_stack_pointer(16)}}static from_bytes(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=Q(_,t.__wbindgen_malloc),o=u;t.header_from_bytes(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw p(s);return __.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_hex(){let _,e;try{const r=t.__wbindgen_add_to_stack_pointer(-16);t.header_to_hex(r,this.__wbg_ptr);var s=a()[r/4+0],n=a()[r/4+1];return _=s,e=n,m(s,n)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}static from_hex(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=u;t.header_from_hex(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw p(s);return __.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_json(){let _,e;try{const l=t.__wbindgen_add_to_stack_pointer(-16);t.header_to_json(l,this.__wbg_ptr);var s=a()[l/4+0],n=a()[l/4+1],r=a()[l/4+2],i=a()[l/4+3],o=s,f=n;if(i)throw o=0,f=0,p(r);return _=o,e=f,m(o,f)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}to_js_value(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.header_to_js_value(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=a()[n/4+2];if(s)throw p(e);return p(_)}finally{t.__wbindgen_add_to_stack_pointer(16)}}static from_json(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=u;t.header_from_json(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw p(s);return __.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}header_body(){const _=t.header_header_body(this.__wbg_ptr);return Mt.__wrap(_)}body_signature(){const _=t.header_body_signature(this.__wbg_ptr);return er.__wrap(_)}static new(_,e){g(_,Mt),g(e,er);const s=t.header_new(_.__wbg_ptr,e.__wbg_ptr);return __.__wrap(s)}}c.exports.Header=__;class Mt{static __wrap(_){_=_>>>0;const e=Object.create(Mt.prototype);return e.__wbg_ptr=_,e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,_}free(){const _=this.__destroy_into_raw();t.__wbg_headerbody_free(_)}to_bytes(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.headerbody_to_bytes(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=D(_,e).slice();return t.__wbindgen_free(_,e*1),s}finally{t.__wbindgen_add_to_stack_pointer(16)}}static from_bytes(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=Q(_,t.__wbindgen_malloc),o=u;t.headerbody_from_bytes(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw p(s);return Mt.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_hex(){let _,e;try{const r=t.__wbindgen_add_to_stack_pointer(-16);t.headerbody_to_hex(r,this.__wbg_ptr);var s=a()[r/4+0],n=a()[r/4+1];return _=s,e=n,m(s,n)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}static from_hex(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=u;t.headerbody_from_hex(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw p(s);return Mt.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_json(){let _,e;try{const l=t.__wbindgen_add_to_stack_pointer(-16);t.headerbody_to_json(l,this.__wbg_ptr);var s=a()[l/4+0],n=a()[l/4+1],r=a()[l/4+2],i=a()[l/4+3],o=s,f=n;if(i)throw o=0,f=0,p(r);return _=o,e=f,m(o,f)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}to_js_value(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.headerbody_to_js_value(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=a()[n/4+2];if(s)throw p(e);return p(_)}finally{t.__wbindgen_add_to_stack_pointer(16)}}static from_json(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=u;t.headerbody_from_json(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw p(s);return Mt.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}block_number(){return t.headerbody_block_number(this.__wbg_ptr)>>>0}slot(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.headerbody_slot(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=a()[n/4+2];if(s)throw p(e);return _>>>0}finally{t.__wbindgen_add_to_stack_pointer(16)}}slot_bignum(){const _=t.headerbody_slot_bignum(this.__wbg_ptr);return I.__wrap(_)}prev_hash(){const _=t.headerbody_prev_hash(this.__wbg_ptr);return _===0?void 0:et.__wrap(_)}issuer_vkey(){const _=t.headerbody_issuer_vkey(this.__wbg_ptr);return Zt.__wrap(_)}vrf_vkey(){const _=t.headerbody_vrf_vkey(this.__wbg_ptr);return Ie.__wrap(_)}has_nonce_and_leader_vrf(){return t.headerbody_has_nonce_and_leader_vrf(this.__wbg_ptr)!==0}nonce_vrf_or_nothing(){const _=t.headerbody_nonce_vrf_or_nothing(this.__wbg_ptr);return _===0?void 0:h_.__wrap(_)}leader_vrf_or_nothing(){const _=t.headerbody_leader_vrf_or_nothing(this.__wbg_ptr);return _===0?void 0:h_.__wrap(_)}has_vrf_result(){return t.headerbody_has_vrf_result(this.__wbg_ptr)!==0}vrf_result_or_nothing(){const _=t.headerbody_vrf_result_or_nothing(this.__wbg_ptr);return _===0?void 0:h_.__wrap(_)}block_body_size(){return t.headerbody_block_body_size(this.__wbg_ptr)>>>0}block_body_hash(){const _=t.headerbody_block_body_hash(this.__wbg_ptr);return et.__wrap(_)}operational_cert(){const _=t.headerbody_operational_cert(this.__wbg_ptr);return T_.__wrap(_)}protocol_version(){const _=t.headerbody_protocol_version(this.__wbg_ptr);return w_.__wrap(_)}static new(_,e,s,n,r,i,o,f,l,H){let rt=0;nt(s)||(g(s,et),rt=s.__destroy_into_raw()),g(n,Zt),g(r,Ie),g(i,h_),g(f,et),g(l,T_),g(H,w_);const dt=t.headerbody_new(_,e,rt,n.__wbg_ptr,r.__wbg_ptr,i.__wbg_ptr,o,f.__wbg_ptr,l.__wbg_ptr,H.__wbg_ptr);return Mt.__wrap(dt)}static new_headerbody(_,e,s,n,r,i,o,f,l,H){g(e,I);let rt=0;nt(s)||(g(s,et),rt=s.__destroy_into_raw()),g(n,Zt),g(r,Ie),g(i,h_),g(f,et),g(l,T_),g(H,w_);const dt=t.headerbody_new_headerbody(_,e.__wbg_ptr,rt,n.__wbg_ptr,r.__wbg_ptr,i.__wbg_ptr,o,f.__wbg_ptr,l.__wbg_ptr,H.__wbg_ptr);return Mt.__wrap(dt)}}c.exports.HeaderBody=Mt;class Kt{static __wrap(_){_=_>>>0;const e=Object.create(Kt.prototype);return e.__wbg_ptr=_,e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,_}free(){const _=this.__destroy_into_raw();t.__wbg_inputwithscriptwitness_free(_)}static new_with_native_script_witness(_,e){g(_,Ct),g(e,Nt);const s=t.inputwithscriptwitness_new_with_native_script_witness(_.__wbg_ptr,e.__wbg_ptr);return Kt.__wrap(s)}static new_with_plutus_witness(_,e){g(_,Ct),g(e,p_);const s=t.inputwithscriptwitness_new_with_plutus_witness(_.__wbg_ptr,e.__wbg_ptr);return Kt.__wrap(s)}input(){const _=t.inputwithscriptwitness_input(this.__wbg_ptr);return Ct.__wrap(_)}}c.exports.InputWithScriptWitness=Kt;class Et{static __wrap(_){_=_>>>0;const e=Object.create(Et.prototype);return e.__wbg_ptr=_,e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,_}free(){const _=this.__destroy_into_raw();t.__wbg_inputswithscriptwitness_free(_)}static new(){const _=t.certificates_new();return Et.__wrap(_)}add(_){g(_,Kt),t.inputswithscriptwitness_add(this.__wbg_ptr,_.__wbg_ptr)}get(_){const e=t.inputswithscriptwitness_get(this.__wbg_ptr,_);return Kt.__wrap(e)}len(){return t.assetnames_len(this.__wbg_ptr)>>>0}}c.exports.InputsWithScriptWitness=Et;class St{static __wrap(_){_=_>>>0;const e=Object.create(St.prototype);return e.__wbg_ptr=_,e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,_}free(){const _=this.__destroy_into_raw();t.__wbg_int_free(_)}to_bytes(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.int_to_bytes(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=D(_,e).slice();return t.__wbindgen_free(_,e*1),s}finally{t.__wbindgen_add_to_stack_pointer(16)}}static from_bytes(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=Q(_,t.__wbindgen_malloc),o=u;t.int_from_bytes(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw p(s);return St.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_hex(){let _,e;try{const r=t.__wbindgen_add_to_stack_pointer(-16);t.int_to_hex(r,this.__wbg_ptr);var s=a()[r/4+0],n=a()[r/4+1];return _=s,e=n,m(s,n)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}static from_hex(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=u;t.int_from_hex(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw p(s);return St.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_json(){let _,e;try{const l=t.__wbindgen_add_to_stack_pointer(-16);t.int_to_json(l,this.__wbg_ptr);var s=a()[l/4+0],n=a()[l/4+1],r=a()[l/4+2],i=a()[l/4+3],o=s,f=n;if(i)throw o=0,f=0,p(r);return _=o,e=f,m(o,f)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}to_js_value(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.int_to_js_value(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=a()[n/4+2];if(s)throw p(e);return p(_)}finally{t.__wbindgen_add_to_stack_pointer(16)}}static from_json(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=u;t.int_from_json(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw p(s);return St.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}static new(_){g(_,I);const e=t.int_new(_.__wbg_ptr);return St.__wrap(e)}static new_negative(_){g(_,I);const e=t.int_new_negative(_.__wbg_ptr);return St.__wrap(e)}static new_i32(_){const e=t.int_new_i32(_);return St.__wrap(e)}is_positive(){return t.int_is_positive(this.__wbg_ptr)!==0}as_positive(){const _=t.int_as_positive(this.__wbg_ptr);return _===0?void 0:I.__wrap(_)}as_negative(){const _=t.int_as_negative(this.__wbg_ptr);return _===0?void 0:I.__wrap(_)}as_i32(){try{const s=t.__wbindgen_add_to_stack_pointer(-16);t.int_as_i32(s,this.__wbg_ptr);var _=a()[s/4+0],e=a()[s/4+1];return _===0?void 0:e}finally{t.__wbindgen_add_to_stack_pointer(16)}}as_i32_or_nothing(){try{const s=t.__wbindgen_add_to_stack_pointer(-16);t.int_as_i32_or_nothing(s,this.__wbg_ptr);var _=a()[s/4+0],e=a()[s/4+1];return _===0?void 0:e}finally{t.__wbindgen_add_to_stack_pointer(16)}}as_i32_or_fail(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.int_as_i32_or_fail(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=a()[n/4+2];if(s)throw p(e);return _}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_str(){let _,e;try{const r=t.__wbindgen_add_to_stack_pointer(-16);t.int_to_str(r,this.__wbg_ptr);var s=a()[r/4+0],n=a()[r/4+1];return _=s,e=n,m(s,n)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}static from_str(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=u;t.int_from_str(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw p(s);return St.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}}c.exports.Int=St;class $_{static __wrap(_){_=_>>>0;const e=Object.create($_.prototype);return e.__wbg_ptr=_,e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,_}free(){const _=this.__destroy_into_raw();t.__wbg_ipv4_free(_)}to_bytes(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.ipv4_to_bytes(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=D(_,e).slice();return t.__wbindgen_free(_,e*1),s}finally{t.__wbindgen_add_to_stack_pointer(16)}}static from_bytes(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=Q(_,t.__wbindgen_malloc),o=u;t.ipv4_from_bytes(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw p(s);return $_.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_hex(){let _,e;try{const r=t.__wbindgen_add_to_stack_pointer(-16);t.ipv4_to_hex(r,this.__wbg_ptr);var s=a()[r/4+0],n=a()[r/4+1];return _=s,e=n,m(s,n)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}static from_hex(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=u;t.ipv4_from_hex(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw p(s);return $_.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_json(){let _,e;try{const l=t.__wbindgen_add_to_stack_pointer(-16);t.ipv4_to_json(l,this.__wbg_ptr);var s=a()[l/4+0],n=a()[l/4+1],r=a()[l/4+2],i=a()[l/4+3],o=s,f=n;if(i)throw o=0,f=0,p(r);return _=o,e=f,m(o,f)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}to_js_value(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.ipv4_to_js_value(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=a()[n/4+2];if(s)throw p(e);return p(_)}finally{t.__wbindgen_add_to_stack_pointer(16)}}static from_json(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=u;t.ipv4_from_json(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw p(s);return $_.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}static new(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=Q(_,t.__wbindgen_malloc),o=u;t.ipv4_new(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw p(s);return $_.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}ip(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.ipv4_ip(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=D(_,e).slice();return t.__wbindgen_free(_,e*1),s}finally{t.__wbindgen_add_to_stack_pointer(16)}}}c.exports.Ipv4=$_;class J_{static __wrap(_){_=_>>>0;const e=Object.create(J_.prototype);return e.__wbg_ptr=_,e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,_}free(){const _=this.__destroy_into_raw();t.__wbg_ipv6_free(_)}to_bytes(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.ipv6_to_bytes(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=D(_,e).slice();return t.__wbindgen_free(_,e*1),s}finally{t.__wbindgen_add_to_stack_pointer(16)}}static from_bytes(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=Q(_,t.__wbindgen_malloc),o=u;t.ipv6_from_bytes(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw p(s);return J_.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_hex(){let _,e;try{const r=t.__wbindgen_add_to_stack_pointer(-16);t.ipv6_to_hex(r,this.__wbg_ptr);var s=a()[r/4+0],n=a()[r/4+1];return _=s,e=n,m(s,n)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}static from_hex(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=u;t.ipv6_from_hex(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw p(s);return J_.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_json(){let _,e;try{const l=t.__wbindgen_add_to_stack_pointer(-16);t.ipv6_to_json(l,this.__wbg_ptr);var s=a()[l/4+0],n=a()[l/4+1],r=a()[l/4+2],i=a()[l/4+3],o=s,f=n;if(i)throw o=0,f=0,p(r);return _=o,e=f,m(o,f)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}to_js_value(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.ipv6_to_js_value(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=a()[n/4+2];if(s)throw p(e);return p(_)}finally{t.__wbindgen_add_to_stack_pointer(16)}}static from_json(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=u;t.ipv6_from_json(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw p(s);return J_.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}static new(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=Q(_,t.__wbindgen_malloc),o=u;t.ipv6_new(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw p(s);return J_.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}ip(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.ipv6_ip(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=D(_,e).slice();return t.__wbindgen_free(_,e*1),s}finally{t.__wbindgen_add_to_stack_pointer(16)}}}c.exports.Ipv6=J_;class _r{static __wrap(_){_=_>>>0;const e=Object.create(_r.prototype);return e.__wbg_ptr=_,e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,_}free(){const _=this.__destroy_into_raw();t.__wbg_jsvecstring_free(_)}static new(){const _=t.jsvecstring_new();return _r.__wrap(_)}len(){return t.jsvecstring_len(this.__wbg_ptr)>>>0}is_empty(){return t.jsvecstring_is_empty(this.__wbg_ptr)!==0}get(_){let e,s;try{const i=t.__wbindgen_add_to_stack_pointer(-16);t.jsvecstring_get(i,this.__wbg_ptr,_);var n=a()[i/4+0],r=a()[i/4+1];return e=n,s=r,m(n,r)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(e,s,1)}}add(_){const e=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),s=u;t.jsvecstring_add(this.__wbg_ptr,e,s)}}c.exports.JsVecString=_r;class er{static __wrap(_){_=_>>>0;const e=Object.create(er.prototype);return e.__wbg_ptr=_,e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,_}free(){const _=this.__destroy_into_raw();t.__wbg_kessignature_free(_)}to_bytes(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.assetname_name(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=D(_,e).slice();return t.__wbindgen_free(_,e*1),s}finally{t.__wbindgen_add_to_stack_pointer(16)}}static from_bytes(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=Q(_,t.__wbindgen_malloc),o=u;t.kessignature_from_bytes(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw p(s);return er.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}}c.exports.KESSignature=er;class De{static __wrap(_){_=_>>>0;const e=Object.create(De.prototype);return e.__wbg_ptr=_,e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,_}free(){const _=this.__destroy_into_raw();t.__wbg_kesvkey_free(_)}static from_bytes(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=Q(_,t.__wbindgen_malloc),o=u;t.kesvkey_from_bytes(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw p(s);return De.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_bytes(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.auxiliarydatahash_to_bytes(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=D(_,e).slice();return t.__wbindgen_free(_,e*1),s}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_bech32(_){let e,s;try{const H=t.__wbindgen_add_to_stack_pointer(-16),rt=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),dt=u;t.auxiliarydatahash_to_bech32(H,this.__wbg_ptr,rt,dt);var n=a()[H/4+0],r=a()[H/4+1],i=a()[H/4+2],o=a()[H/4+3],f=n,l=r;if(o)throw f=0,l=0,p(i);return e=f,s=l,m(f,l)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(e,s,1)}}static from_bech32(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=u;t.kesvkey_from_bech32(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw p(s);return De.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_hex(){let _,e;try{const r=t.__wbindgen_add_to_stack_pointer(-16);t.auxiliarydatahash_to_hex(r,this.__wbg_ptr);var s=a()[r/4+0],n=a()[r/4+1];return _=s,e=n,m(s,n)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}static from_hex(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=u;t.kesvkey_from_hex(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw p(s);return De.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}}c.exports.KESVKey=De;class Jt{static __wrap(_){_=_>>>0;const e=Object.create(Jt.prototype);return e.__wbg_ptr=_,e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,_}free(){const _=this.__destroy_into_raw();t.__wbg_language_free(_)}to_bytes(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.language_to_bytes(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=D(_,e).slice();return t.__wbindgen_free(_,e*1),s}finally{t.__wbindgen_add_to_stack_pointer(16)}}static from_bytes(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=Q(_,t.__wbindgen_malloc),o=u;t.language_from_bytes(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw p(s);return Jt.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_hex(){let _,e;try{const r=t.__wbindgen_add_to_stack_pointer(-16);t.language_to_hex(r,this.__wbg_ptr);var s=a()[r/4+0],n=a()[r/4+1];return _=s,e=n,m(s,n)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}static from_hex(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=u;t.language_from_hex(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw p(s);return Jt.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_json(){let _,e;try{const l=t.__wbindgen_add_to_stack_pointer(-16);t.language_to_json(l,this.__wbg_ptr);var s=a()[l/4+0],n=a()[l/4+1],r=a()[l/4+2],i=a()[l/4+3],o=s,f=n;if(i)throw o=0,f=0,p(r);return _=o,e=f,m(o,f)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}to_js_value(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.language_to_js_value(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=a()[n/4+2];if(s)throw p(e);return p(_)}finally{t.__wbindgen_add_to_stack_pointer(16)}}static from_json(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=u;t.language_from_json(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw p(s);return Jt.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}static new_plutus_v1(){const _=t.language_new_plutus_v1();return Jt.__wrap(_)}static new_plutus_v2(){const _=t.language_new_plutus_v2();return Jt.__wrap(_)}kind(){return t.language_kind(this.__wbg_ptr)>>>0}}c.exports.Language=Jt;class Ye{static __wrap(_){_=_>>>0;const e=Object.create(Ye.prototype);return e.__wbg_ptr=_,e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,_}free(){const _=this.__destroy_into_raw();t.__wbg_languages_free(_)}static new(){const _=t.ed25519keyhashes_new();return Ye.__wrap(_)}len(){return t.assetnames_len(this.__wbg_ptr)>>>0}get(_){const e=t.languages_get(this.__wbg_ptr,_);return Jt.__wrap(e)}add(_){g(_,Jt);var e=_.__destroy_into_raw();t.languages_add(this.__wbg_ptr,e)}static list(){const _=t.languages_list();return Ye.__wrap(_)}}c.exports.Languages=Ye;class hr{static __wrap(_){_=_>>>0;const e=Object.create(hr.prototype);return e.__wbg_ptr=_,e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,_}free(){const _=this.__destroy_into_raw();t.__wbg_legacydaedalusprivatekey_free(_)}static from_bytes(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=Q(_,t.__wbindgen_malloc),o=u;t.legacydaedalusprivatekey_from_bytes(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw p(s);return hr.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}as_bytes(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.bip32privatekey_as_bytes(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=D(_,e).slice();return t.__wbindgen_free(_,e*1),s}finally{t.__wbindgen_add_to_stack_pointer(16)}}chaincode(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.bip32privatekey_chaincode(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=D(_,e).slice();return t.__wbindgen_free(_,e*1),s}finally{t.__wbindgen_add_to_stack_pointer(16)}}}c.exports.LegacyDaedalusPrivateKey=hr;class rr{static __wrap(_){_=_>>>0;const e=Object.create(rr.prototype);return e.__wbg_ptr=_,e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,_}free(){const _=this.__destroy_into_raw();t.__wbg_linearfee_free(_)}constant(){const _=t.linearfee_constant(this.__wbg_ptr);return I.__wrap(_)}coefficient(){const _=t.linearfee_coefficient(this.__wbg_ptr);return I.__wrap(_)}static new(_,e){g(_,I),g(e,I);const s=t.linearfee_new(_.__wbg_ptr,e.__wbg_ptr);return rr.__wrap(s)}}c.exports.LinearFee=rr;class W_{static __wrap(_){_=_>>>0;const e=Object.create(W_.prototype);return e.__wbg_ptr=_,e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,_}free(){const _=this.__destroy_into_raw();t.__wbg_mirtostakecredentials_free(_)}to_bytes(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.mirtostakecredentials_to_bytes(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=D(_,e).slice();return t.__wbindgen_free(_,e*1),s}finally{t.__wbindgen_add_to_stack_pointer(16)}}static from_bytes(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=Q(_,t.__wbindgen_malloc),o=u;t.mirtostakecredentials_from_bytes(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw p(s);return W_.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_hex(){let _,e;try{const r=t.__wbindgen_add_to_stack_pointer(-16);t.mirtostakecredentials_to_hex(r,this.__wbg_ptr);var s=a()[r/4+0],n=a()[r/4+1];return _=s,e=n,m(s,n)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}static from_hex(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=u;t.mirtostakecredentials_from_hex(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw p(s);return W_.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_json(){let _,e;try{const l=t.__wbindgen_add_to_stack_pointer(-16);t.mirtostakecredentials_to_json(l,this.__wbg_ptr);var s=a()[l/4+0],n=a()[l/4+1],r=a()[l/4+2],i=a()[l/4+3],o=s,f=n;if(i)throw o=0,f=0,p(r);return _=o,e=f,m(o,f)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}to_js_value(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.mirtostakecredentials_to_js_value(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=a()[n/4+2];if(s)throw p(e);return p(_)}finally{t.__wbindgen_add_to_stack_pointer(16)}}static from_json(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=u;t.mirtostakecredentials_from_json(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw p(s);return W_.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}static new(){const _=t.auxiliarydataset_new();return W_.__wrap(_)}len(){return t.auxiliarydataset_len(this.__wbg_ptr)>>>0}insert(_,e){g(_,Qt),g(e,St);const s=t.mirtostakecredentials_insert(this.__wbg_ptr,_.__wbg_ptr,e.__wbg_ptr);return s===0?void 0:St.__wrap(s)}get(_){g(_,Qt);const e=t.mirtostakecredentials_get(this.__wbg_ptr,_.__wbg_ptr);return e===0?void 0:St.__wrap(e)}keys(){const _=t.mirtostakecredentials_keys(this.__wbg_ptr);return Me.__wrap(_)}}c.exports.MIRToStakeCredentials=W_;class X_{static __wrap(_){_=_>>>0;const e=Object.create(X_.prototype);return e.__wbg_ptr=_,e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,_}free(){const _=this.__destroy_into_raw();t.__wbg_metadatalist_free(_)}to_bytes(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.metadatalist_to_bytes(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=D(_,e).slice();return t.__wbindgen_free(_,e*1),s}finally{t.__wbindgen_add_to_stack_pointer(16)}}static from_bytes(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=Q(_,t.__wbindgen_malloc),o=u;t.metadatalist_from_bytes(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw p(s);return X_.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_hex(){let _,e;try{const r=t.__wbindgen_add_to_stack_pointer(-16);t.metadatalist_to_hex(r,this.__wbg_ptr);var s=a()[r/4+0],n=a()[r/4+1];return _=s,e=n,m(s,n)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}static from_hex(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=u;t.metadatalist_from_hex(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw p(s);return X_.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}static new(){const _=t.certificates_new();return X_.__wrap(_)}len(){return t.assetnames_len(this.__wbg_ptr)>>>0}get(_){const e=t.metadatalist_get(this.__wbg_ptr,_);return mt.__wrap(e)}add(_){g(_,mt),t.metadatalist_add(this.__wbg_ptr,_.__wbg_ptr)}}c.exports.MetadataList=X_;class Te{static __wrap(_){_=_>>>0;const e=Object.create(Te.prototype);return e.__wbg_ptr=_,e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,_}free(){const _=this.__destroy_into_raw();t.__wbg_metadatamap_free(_)}to_bytes(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.metadatamap_to_bytes(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=D(_,e).slice();return t.__wbindgen_free(_,e*1),s}finally{t.__wbindgen_add_to_stack_pointer(16)}}static from_bytes(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=Q(_,t.__wbindgen_malloc),o=u;t.metadatamap_from_bytes(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw p(s);return Te.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_hex(){let _,e;try{const r=t.__wbindgen_add_to_stack_pointer(-16);t.metadatamap_to_hex(r,this.__wbg_ptr);var s=a()[r/4+0],n=a()[r/4+1];return _=s,e=n,m(s,n)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}static from_hex(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=u;t.metadatamap_from_hex(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw p(s);return Te.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}static new(){const _=t.auxiliarydataset_new();return Te.__wrap(_)}len(){return t.auxiliarydataset_len(this.__wbg_ptr)>>>0}insert(_,e){g(_,mt),g(e,mt);const s=t.metadatamap_insert(this.__wbg_ptr,_.__wbg_ptr,e.__wbg_ptr);return s===0?void 0:mt.__wrap(s)}insert_str(_,e){try{const i=t.__wbindgen_add_to_stack_pointer(-16),o=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),f=u;g(e,mt),t.metadatamap_insert_str(i,this.__wbg_ptr,o,f,e.__wbg_ptr);var s=a()[i/4+0],n=a()[i/4+1],r=a()[i/4+2];if(r)throw p(n);return s===0?void 0:mt.__wrap(s)}finally{t.__wbindgen_add_to_stack_pointer(16)}}insert_i32(_,e){g(e,mt);const s=t.metadatamap_insert_i32(this.__wbg_ptr,_,e.__wbg_ptr);return s===0?void 0:mt.__wrap(s)}get(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16);g(_,mt),t.metadatamap_get(r,this.__wbg_ptr,_.__wbg_ptr);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw p(s);return mt.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}get_str(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=u;t.metadatamap_get_str(r,this.__wbg_ptr,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw p(s);return mt.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}get_i32(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16);t.metadatamap_get_i32(r,this.__wbg_ptr,_);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw p(s);return mt.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}has(_){return g(_,mt),t.metadatamap_has(this.__wbg_ptr,_.__wbg_ptr)!==0}keys(){const _=t.metadatamap_keys(this.__wbg_ptr);return X_.__wrap(_)}}c.exports.MetadataMap=Te;class r_{static __wrap(_){_=_>>>0;const e=Object.create(r_.prototype);return e.__wbg_ptr=_,e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,_}free(){const _=this.__destroy_into_raw();t.__wbg_mint_free(_)}to_bytes(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.mint_to_bytes(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=D(_,e).slice();return t.__wbindgen_free(_,e*1),s}finally{t.__wbindgen_add_to_stack_pointer(16)}}static from_bytes(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=Q(_,t.__wbindgen_malloc),o=u;t.mint_from_bytes(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw p(s);return r_.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_hex(){let _,e;try{const r=t.__wbindgen_add_to_stack_pointer(-16);t.mint_to_hex(r,this.__wbg_ptr);var s=a()[r/4+0],n=a()[r/4+1];return _=s,e=n,m(s,n)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}static from_hex(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=u;t.mint_from_hex(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw p(s);return r_.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_json(){let _,e;try{const l=t.__wbindgen_add_to_stack_pointer(-16);t.mint_to_json(l,this.__wbg_ptr);var s=a()[l/4+0],n=a()[l/4+1],r=a()[l/4+2],i=a()[l/4+3],o=s,f=n;if(i)throw o=0,f=0,p(r);return _=o,e=f,m(o,f)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}to_js_value(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.mint_to_js_value(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=a()[n/4+2];if(s)throw p(e);return p(_)}finally{t.__wbindgen_add_to_stack_pointer(16)}}static from_json(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=u;t.mint_from_json(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw p(s);return r_.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}static new(){const _=t.assetnames_new();return r_.__wrap(_)}static new_from_entry(_,e){g(_,Ft),g(e,Q_);const s=t.mint_new_from_entry(_.__wbg_ptr,e.__wbg_ptr);return r_.__wrap(s)}len(){return t.assetnames_len(this.__wbg_ptr)>>>0}insert(_,e){g(_,Ft),g(e,Q_);const s=t.mint_insert(this.__wbg_ptr,_.__wbg_ptr,e.__wbg_ptr);return s===0?void 0:Q_.__wrap(s)}get(_){g(_,Ft);const e=t.mint_get(this.__wbg_ptr,_.__wbg_ptr);return e===0?void 0:Q_.__wrap(e)}get_all(_){g(_,Ft);const e=t.mint_get_all(this.__wbg_ptr,_.__wbg_ptr);return e===0?void 0:jr.__wrap(e)}keys(){const _=t.mint_keys(this.__wbg_ptr);return we.__wrap(_)}as_positive_multiasset(){const _=t.mint_as_positive_multiasset(this.__wbg_ptr);return $t.__wrap(_)}as_negative_multiasset(){const _=t.mint_as_negative_multiasset(this.__wbg_ptr);return $t.__wrap(_)}}c.exports.Mint=r_;class Q_{static __wrap(_){_=_>>>0;const e=Object.create(Q_.prototype);return e.__wbg_ptr=_,e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,_}free(){const _=this.__destroy_into_raw();t.__wbg_mintassets_free(_)}static new(){const _=t.assets_new();return Q_.__wrap(_)}static new_from_entry(_,e){g(_,It),g(e,St);var s=e.__destroy_into_raw();const n=t.mintassets_new_from_entry(_.__wbg_ptr,s);return Q_.__wrap(n)}len(){return t.assetnames_len(this.__wbg_ptr)>>>0}insert(_,e){g(_,It),g(e,St);var s=e.__destroy_into_raw();const n=t.mintassets_insert(this.__wbg_ptr,_.__wbg_ptr,s);return n===0?void 0:St.__wrap(n)}get(_){g(_,It);const e=t.mintassets_get(this.__wbg_ptr,_.__wbg_ptr);return e===0?void 0:St.__wrap(e)}keys(){const _=t.mintassets_keys(this.__wbg_ptr);return Ut.__wrap(_)}}c.exports.MintAssets=Q_;class nr{static __wrap(_){_=_>>>0;const e=Object.create(nr.prototype);return e.__wbg_ptr=_,e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,_}free(){const _=this.__destroy_into_raw();t.__wbg_mintbuilder_free(_)}static new(){const _=t.assets_new();return nr.__wrap(_)}add_asset(_,e,s){g(_,Ge),g(e,It),g(s,St),t.mintbuilder_add_asset(this.__wbg_ptr,_.__wbg_ptr,e.__wbg_ptr,s.__wbg_ptr)}set_asset(_,e,s){g(_,Ge),g(e,It),g(s,St),t.mintbuilder_set_asset(this.__wbg_ptr,_.__wbg_ptr,e.__wbg_ptr,s.__wbg_ptr)}build(){const _=t.mintbuilder_build(this.__wbg_ptr);return r_.__wrap(_)}get_native_scripts(){const _=t.mintbuilder_get_native_scripts(this.__wbg_ptr);return Ht.__wrap(_)}get_plutus_witnesses(){const _=t.mintbuilder_get_plutus_witnesses(this.__wbg_ptr);return re.__wrap(_)}get_ref_inputs(){const _=t.mintbuilder_get_ref_inputs(this.__wbg_ptr);return zt.__wrap(_)}get_redeeemers(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.mintbuilder_get_redeeemers(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=a()[n/4+2];if(s)throw p(e);return A_.__wrap(_)}finally{t.__wbindgen_add_to_stack_pointer(16)}}has_plutus_scripts(){return t.mintbuilder_has_plutus_scripts(this.__wbg_ptr)!==0}has_native_scripts(){return t.mintbuilder_has_native_scripts(this.__wbg_ptr)!==0}}c.exports.MintBuilder=nr;class Ge{static __wrap(_){_=_>>>0;const e=Object.create(Ge.prototype);return e.__wbg_ptr=_,e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,_}free(){const _=this.__destroy_into_raw();t.__wbg_mintwitness_free(_)}static new_native_script(_){g(_,Nt);const e=t.mintwitness_new_native_script(_.__wbg_ptr);return Ge.__wrap(e)}static new_plutus_script(_,e){g(_,ee),g(e,e_);const s=t.mintwitness_new_plutus_script(_.__wbg_ptr,e.__wbg_ptr);return Ge.__wrap(s)}}c.exports.MintWitness=Ge;class jr{static __wrap(_){_=_>>>0;const e=Object.create(jr.prototype);return e.__wbg_ptr=_,e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,_}free(){const _=this.__destroy_into_raw();t.__wbg_mintsassets_free(_)}}c.exports.MintsAssets=jr;class O_{static __wrap(_){_=_>>>0;const e=Object.create(O_.prototype);return e.__wbg_ptr=_,e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,_}free(){const _=this.__destroy_into_raw();t.__wbg_moveinstantaneousreward_free(_)}to_bytes(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.moveinstantaneousreward_to_bytes(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=D(_,e).slice();return t.__wbindgen_free(_,e*1),s}finally{t.__wbindgen_add_to_stack_pointer(16)}}static from_bytes(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=Q(_,t.__wbindgen_malloc),o=u;t.moveinstantaneousreward_from_bytes(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw p(s);return O_.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_hex(){let _,e;try{const r=t.__wbindgen_add_to_stack_pointer(-16);t.moveinstantaneousreward_to_hex(r,this.__wbg_ptr);var s=a()[r/4+0],n=a()[r/4+1];return _=s,e=n,m(s,n)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}static from_hex(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=u;t.moveinstantaneousreward_from_hex(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw p(s);return O_.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_json(){let _,e;try{const l=t.__wbindgen_add_to_stack_pointer(-16);t.moveinstantaneousreward_to_json(l,this.__wbg_ptr);var s=a()[l/4+0],n=a()[l/4+1],r=a()[l/4+2],i=a()[l/4+3],o=s,f=n;if(i)throw o=0,f=0,p(r);return _=o,e=f,m(o,f)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}to_js_value(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.moveinstantaneousreward_to_js_value(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=a()[n/4+2];if(s)throw p(e);return p(_)}finally{t.__wbindgen_add_to_stack_pointer(16)}}static from_json(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=u;t.moveinstantaneousreward_from_json(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw p(s);return O_.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}static new_to_other_pot(_,e){g(e,I);const s=t.moveinstantaneousreward_new_to_other_pot(_,e.__wbg_ptr);return O_.__wrap(s)}static new_to_stake_creds(_,e){g(e,W_);const s=t.moveinstantaneousreward_new_to_stake_creds(_,e.__wbg_ptr);return O_.__wrap(s)}pot(){return t.moveinstantaneousreward_pot(this.__wbg_ptr)>>>0}kind(){return t.moveinstantaneousreward_kind(this.__wbg_ptr)>>>0}as_to_other_pot(){const _=t.moveinstantaneousreward_as_to_other_pot(this.__wbg_ptr);return _===0?void 0:I.__wrap(_)}as_to_stake_creds(){const _=t.moveinstantaneousreward_as_to_stake_creds(this.__wbg_ptr);return _===0?void 0:W_.__wrap(_)}}c.exports.MoveInstantaneousReward=O_;class Z_{static __wrap(_){_=_>>>0;const e=Object.create(Z_.prototype);return e.__wbg_ptr=_,e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,_}free(){const _=this.__destroy_into_raw();t.__wbg_moveinstantaneousrewardscert_free(_)}to_bytes(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.moveinstantaneousrewardscert_to_bytes(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=D(_,e).slice();return t.__wbindgen_free(_,e*1),s}finally{t.__wbindgen_add_to_stack_pointer(16)}}static from_bytes(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=Q(_,t.__wbindgen_malloc),o=u;t.moveinstantaneousrewardscert_from_bytes(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw p(s);return Z_.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_hex(){let _,e;try{const r=t.__wbindgen_add_to_stack_pointer(-16);t.moveinstantaneousrewardscert_to_hex(r,this.__wbg_ptr);var s=a()[r/4+0],n=a()[r/4+1];return _=s,e=n,m(s,n)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}static from_hex(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=u;t.moveinstantaneousrewardscert_from_hex(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw p(s);return Z_.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_json(){let _,e;try{const l=t.__wbindgen_add_to_stack_pointer(-16);t.moveinstantaneousrewardscert_to_json(l,this.__wbg_ptr);var s=a()[l/4+0],n=a()[l/4+1],r=a()[l/4+2],i=a()[l/4+3],o=s,f=n;if(i)throw o=0,f=0,p(r);return _=o,e=f,m(o,f)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}to_js_value(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.moveinstantaneousrewardscert_to_js_value(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=a()[n/4+2];if(s)throw p(e);return p(_)}finally{t.__wbindgen_add_to_stack_pointer(16)}}static from_json(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=u;t.moveinstantaneousrewardscert_from_json(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw p(s);return Z_.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}move_instantaneous_reward(){const _=t.moveinstantaneousrewardscert_move_instantaneous_reward(this.__wbg_ptr);return O_.__wrap(_)}static new(_){g(_,O_);const e=t.moveinstantaneousrewardscert_new(_.__wbg_ptr);return Z_.__wrap(e)}}c.exports.MoveInstantaneousRewardsCert=Z_;class $t{static __wrap(_){_=_>>>0;const e=Object.create($t.prototype);return e.__wbg_ptr=_,e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,_}free(){const _=this.__destroy_into_raw();t.__wbg_multiasset_free(_)}to_bytes(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.multiasset_to_bytes(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=D(_,e).slice();return t.__wbindgen_free(_,e*1),s}finally{t.__wbindgen_add_to_stack_pointer(16)}}static from_bytes(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=Q(_,t.__wbindgen_malloc),o=u;t.multiasset_from_bytes(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw p(s);return $t.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_hex(){let _,e;try{const r=t.__wbindgen_add_to_stack_pointer(-16);t.multiasset_to_hex(r,this.__wbg_ptr);var s=a()[r/4+0],n=a()[r/4+1];return _=s,e=n,m(s,n)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}static from_hex(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=u;t.multiasset_from_hex(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw p(s);return $t.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_json(){let _,e;try{const l=t.__wbindgen_add_to_stack_pointer(-16);t.multiasset_to_json(l,this.__wbg_ptr);var s=a()[l/4+0],n=a()[l/4+1],r=a()[l/4+2],i=a()[l/4+3],o=s,f=n;if(i)throw o=0,f=0,p(r);return _=o,e=f,m(o,f)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}to_js_value(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.multiasset_to_js_value(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=a()[n/4+2];if(s)throw p(e);return p(_)}finally{t.__wbindgen_add_to_stack_pointer(16)}}static from_json(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=u;t.multiasset_from_json(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw p(s);return $t.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}static new(){const _=t.assets_new();return $t.__wrap(_)}len(){return t.assetnames_len(this.__wbg_ptr)>>>0}insert(_,e){g(_,Ft),g(e,Dt);const s=t.multiasset_insert(this.__wbg_ptr,_.__wbg_ptr,e.__wbg_ptr);return s===0?void 0:Dt.__wrap(s)}get(_){g(_,Ft);const e=t.multiasset_get(this.__wbg_ptr,_.__wbg_ptr);return e===0?void 0:Dt.__wrap(e)}set_asset(_,e,s){g(_,Ft),g(e,It),g(s,I);var n=s.__destroy_into_raw();const r=t.multiasset_set_asset(this.__wbg_ptr,_.__wbg_ptr,e.__wbg_ptr,n);return r===0?void 0:I.__wrap(r)}get_asset(_,e){g(_,Ft),g(e,It);const s=t.multiasset_get_asset(this.__wbg_ptr,_.__wbg_ptr,e.__wbg_ptr);return I.__wrap(s)}keys(){const _=t.multiasset_keys(this.__wbg_ptr);return we.__wrap(_)}sub(_){g(_,$t);const e=t.multiasset_sub(this.__wbg_ptr,_.__wbg_ptr);return $t.__wrap(e)}}c.exports.MultiAsset=$t;class te{static __wrap(_){_=_>>>0;const e=Object.create(te.prototype);return e.__wbg_ptr=_,e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,_}free(){const _=this.__destroy_into_raw();t.__wbg_multihostname_free(_)}to_bytes(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.multihostname_to_bytes(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=D(_,e).slice();return t.__wbindgen_free(_,e*1),s}finally{t.__wbindgen_add_to_stack_pointer(16)}}static from_bytes(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=Q(_,t.__wbindgen_malloc),o=u;t.multihostname_from_bytes(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw p(s);return te.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_hex(){let _,e;try{const r=t.__wbindgen_add_to_stack_pointer(-16);t.multihostname_to_hex(r,this.__wbg_ptr);var s=a()[r/4+0],n=a()[r/4+1];return _=s,e=n,m(s,n)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}static from_hex(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=u;t.multihostname_from_hex(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw p(s);return te.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_json(){let _,e;try{const l=t.__wbindgen_add_to_stack_pointer(-16);t.multihostname_to_json(l,this.__wbg_ptr);var s=a()[l/4+0],n=a()[l/4+1],r=a()[l/4+2],i=a()[l/4+3],o=s,f=n;if(i)throw o=0,f=0,p(r);return _=o,e=f,m(o,f)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}to_js_value(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.multihostname_to_js_value(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=a()[n/4+2];if(s)throw p(e);return p(_)}finally{t.__wbindgen_add_to_stack_pointer(16)}}static from_json(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=u;t.multihostname_from_json(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw p(s);return te.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}dns_name(){const _=t.multihostname_dns_name(this.__wbg_ptr);return O.__wrap(_)}static new(_){g(_,O);const e=t.multihostname_new(_.__wbg_ptr);return te.__wrap(e)}}c.exports.MultiHostName=te;class Nt{static __wrap(_){_=_>>>0;const e=Object.create(Nt.prototype);return e.__wbg_ptr=_,e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,_}free(){const _=this.__destroy_into_raw();t.__wbg_nativescript_free(_)}to_bytes(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.nativescript_to_bytes(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=D(_,e).slice();return t.__wbindgen_free(_,e*1),s}finally{t.__wbindgen_add_to_stack_pointer(16)}}static from_bytes(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=Q(_,t.__wbindgen_malloc),o=u;t.nativescript_from_bytes(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw p(s);return Nt.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_hex(){let _,e;try{const r=t.__wbindgen_add_to_stack_pointer(-16);t.nativescript_to_hex(r,this.__wbg_ptr);var s=a()[r/4+0],n=a()[r/4+1];return _=s,e=n,m(s,n)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}static from_hex(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=u;t.nativescript_from_hex(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw p(s);return Nt.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_json(){let _,e;try{const l=t.__wbindgen_add_to_stack_pointer(-16);t.nativescript_to_json(l,this.__wbg_ptr);var s=a()[l/4+0],n=a()[l/4+1],r=a()[l/4+2],i=a()[l/4+3],o=s,f=n;if(i)throw o=0,f=0,p(r);return _=o,e=f,m(o,f)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}to_js_value(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.nativescript_to_js_value(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=a()[n/4+2];if(s)throw p(e);return p(_)}finally{t.__wbindgen_add_to_stack_pointer(16)}}static from_json(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=u;t.nativescript_from_json(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw p(s);return Nt.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}hash(){const _=t.nativescript_hash(this.__wbg_ptr);return Ft.__wrap(_)}static new_script_pubkey(_){g(_,ge);const e=t.nativescript_new_script_pubkey(_.__wbg_ptr);return Nt.__wrap(e)}static new_script_all(_){g(_,ce);const e=t.nativescript_new_script_all(_.__wbg_ptr);return Nt.__wrap(e)}static new_script_any(_){g(_,pe);const e=t.nativescript_new_script_any(_.__wbg_ptr);return Nt.__wrap(e)}static new_script_n_of_k(_){g(_,le);const e=t.nativescript_new_script_n_of_k(_.__wbg_ptr);return Nt.__wrap(e)}static new_timelock_start(_){g(_,F_);const e=t.nativescript_new_timelock_start(_.__wbg_ptr);return Nt.__wrap(e)}static new_timelock_expiry(_){g(_,P_);const e=t.nativescript_new_timelock_expiry(_.__wbg_ptr);return Nt.__wrap(e)}kind(){return t.nativescript_kind(this.__wbg_ptr)>>>0}as_script_pubkey(){const _=t.nativescript_as_script_pubkey(this.__wbg_ptr);return _===0?void 0:ge.__wrap(_)}as_script_all(){const _=t.nativescript_as_script_all(this.__wbg_ptr);return _===0?void 0:ce.__wrap(_)}as_script_any(){const _=t.nativescript_as_script_any(this.__wbg_ptr);return _===0?void 0:pe.__wrap(_)}as_script_n_of_k(){const _=t.nativescript_as_script_n_of_k(this.__wbg_ptr);return _===0?void 0:le.__wrap(_)}as_timelock_start(){const _=t.nativescript_as_timelock_start(this.__wbg_ptr);return _===0?void 0:F_.__wrap(_)}as_timelock_expiry(){const _=t.nativescript_as_timelock_expiry(this.__wbg_ptr);return _===0?void 0:P_.__wrap(_)}get_required_signers(){const _=t.nativescript_get_required_signers(this.__wbg_ptr);return Z.__wrap(_)}}c.exports.NativeScript=Nt;class Ht{static __wrap(_){_=_>>>0;const e=Object.create(Ht.prototype);return e.__wbg_ptr=_,e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,_}free(){const _=this.__destroy_into_raw();t.__wbg_nativescripts_free(_)}static new(){const _=t.certificates_new();return Ht.__wrap(_)}len(){return t.assetnames_len(this.__wbg_ptr)>>>0}get(_){const e=t.nativescripts_get(this.__wbg_ptr,_);return Nt.__wrap(e)}add(_){g(_,Nt),t.nativescripts_add(this.__wbg_ptr,_.__wbg_ptr)}}c.exports.NativeScripts=Ht;class D_{static __wrap(_){_=_>>>0;const e=Object.create(D_.prototype);return e.__wbg_ptr=_,e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,_}free(){const _=this.__destroy_into_raw();t.__wbg_networkid_free(_)}to_bytes(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.networkid_to_bytes(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=D(_,e).slice();return t.__wbindgen_free(_,e*1),s}finally{t.__wbindgen_add_to_stack_pointer(16)}}static from_bytes(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=Q(_,t.__wbindgen_malloc),o=u;t.networkid_from_bytes(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw p(s);return D_.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_hex(){let _,e;try{const r=t.__wbindgen_add_to_stack_pointer(-16);t.networkid_to_hex(r,this.__wbg_ptr);var s=a()[r/4+0],n=a()[r/4+1];return _=s,e=n,m(s,n)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}static from_hex(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=u;t.networkid_from_hex(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw p(s);return D_.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_json(){let _,e;try{const l=t.__wbindgen_add_to_stack_pointer(-16);t.networkid_to_json(l,this.__wbg_ptr);var s=a()[l/4+0],n=a()[l/4+1],r=a()[l/4+2],i=a()[l/4+3],o=s,f=n;if(i)throw o=0,f=0,p(r);return _=o,e=f,m(o,f)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}to_js_value(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.networkid_to_js_value(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=a()[n/4+2];if(s)throw p(e);return p(_)}finally{t.__wbindgen_add_to_stack_pointer(16)}}static from_json(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=u;t.networkid_from_json(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw p(s);return D_.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}static testnet(){const _=t.language_new_plutus_v1();return D_.__wrap(_)}static mainnet(){const _=t.language_new_plutus_v2();return D_.__wrap(_)}kind(){return t.networkid_kind(this.__wbg_ptr)>>>0}}c.exports.NetworkId=D_;class Ne{static __wrap(_){_=_>>>0;const e=Object.create(Ne.prototype);return e.__wbg_ptr=_,e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,_}free(){const _=this.__destroy_into_raw();t.__wbg_networkinfo_free(_)}static new(_,e){const s=t.networkinfo_new(_,e);return Ne.__wrap(s)}network_id(){return t.networkinfo_network_id(this.__wbg_ptr)}protocol_magic(){return t.networkinfo_protocol_magic(this.__wbg_ptr)>>>0}static testnet_preview(){const _=t.networkinfo_testnet_preview();return Ne.__wrap(_)}static testnet_preprod(){const _=t.networkinfo_testnet_preprod();return Ne.__wrap(_)}static testnet(){const _=t.networkinfo_testnet();return Ne.__wrap(_)}static mainnet(){const _=t.networkinfo_mainnet();return Ne.__wrap(_)}}c.exports.NetworkInfo=Ne;class _e{static __wrap(_){_=_>>>0;const e=Object.create(_e.prototype);return e.__wbg_ptr=_,e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,_}free(){const _=this.__destroy_into_raw();t.__wbg_nonce_free(_)}to_bytes(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.nonce_to_bytes(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=D(_,e).slice();return t.__wbindgen_free(_,e*1),s}finally{t.__wbindgen_add_to_stack_pointer(16)}}static from_bytes(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=Q(_,t.__wbindgen_malloc),o=u;t.nonce_from_bytes(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw p(s);return _e.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_hex(){let _,e;try{const r=t.__wbindgen_add_to_stack_pointer(-16);t.nonce_to_hex(r,this.__wbg_ptr);var s=a()[r/4+0],n=a()[r/4+1];return _=s,e=n,m(s,n)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}static from_hex(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=u;t.nonce_from_hex(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw p(s);return _e.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_json(){let _,e;try{const l=t.__wbindgen_add_to_stack_pointer(-16);t.nonce_to_json(l,this.__wbg_ptr);var s=a()[l/4+0],n=a()[l/4+1],r=a()[l/4+2],i=a()[l/4+3],o=s,f=n;if(i)throw o=0,f=0,p(r);return _=o,e=f,m(o,f)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}to_js_value(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.nonce_to_js_value(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=a()[n/4+2];if(s)throw p(e);return p(_)}finally{t.__wbindgen_add_to_stack_pointer(16)}}static from_json(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=u;t.nonce_from_json(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw p(s);return _e.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}static new_identity(){const _=t.nonce_new_identity();return _e.__wrap(_)}static new_from_hash(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=Q(_,t.__wbindgen_malloc),o=u;t.nonce_new_from_hash(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw p(s);return _e.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}get_hash(){try{const s=t.__wbindgen_add_to_stack_pointer(-16);t.nonce_get_hash(s,this.__wbg_ptr);var _=a()[s/4+0],e=a()[s/4+1];let n;return _!==0&&(n=D(_,e).slice(),t.__wbindgen_free(_,e*1)),n}finally{t.__wbindgen_add_to_stack_pointer(16)}}}c.exports.Nonce=_e;class T_{static __wrap(_){_=_>>>0;const e=Object.create(T_.prototype);return e.__wbg_ptr=_,e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,_}free(){const _=this.__destroy_into_raw();t.__wbg_operationalcert_free(_)}to_bytes(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.operationalcert_to_bytes(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=D(_,e).slice();return t.__wbindgen_free(_,e*1),s}finally{t.__wbindgen_add_to_stack_pointer(16)}}static from_bytes(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=Q(_,t.__wbindgen_malloc),o=u;t.operationalcert_from_bytes(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw p(s);return T_.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_hex(){let _,e;try{const r=t.__wbindgen_add_to_stack_pointer(-16);t.operationalcert_to_hex(r,this.__wbg_ptr);var s=a()[r/4+0],n=a()[r/4+1];return _=s,e=n,m(s,n)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}static from_hex(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=u;t.operationalcert_from_hex(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw p(s);return T_.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_json(){let _,e;try{const l=t.__wbindgen_add_to_stack_pointer(-16);t.operationalcert_to_json(l,this.__wbg_ptr);var s=a()[l/4+0],n=a()[l/4+1],r=a()[l/4+2],i=a()[l/4+3],o=s,f=n;if(i)throw o=0,f=0,p(r);return _=o,e=f,m(o,f)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}to_js_value(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.operationalcert_to_js_value(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=a()[n/4+2];if(s)throw p(e);return p(_)}finally{t.__wbindgen_add_to_stack_pointer(16)}}static from_json(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=u;t.operationalcert_from_json(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw p(s);return T_.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}hot_vkey(){const _=t.operationalcert_hot_vkey(this.__wbg_ptr);return De.__wrap(_)}sequence_number(){return t.operationalcert_sequence_number(this.__wbg_ptr)>>>0}kes_period(){return t.operationalcert_kes_period(this.__wbg_ptr)>>>0}sigma(){const _=t.operationalcert_sigma(this.__wbg_ptr);return it.__wrap(_)}static new(_,e,s,n){g(_,De),g(n,it);const r=t.operationalcert_new(_.__wbg_ptr,e,s,n.__wbg_ptr);return T_.__wrap(r)}}c.exports.OperationalCert=T_;class ar{static __wrap(_){_=_>>>0;const e=Object.create(ar.prototype);return e.__wbg_ptr=_,e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,_}free(){const _=this.__destroy_into_raw();t.__wbg_outputdatum_free(_)}static new_data_hash(_){g(_,U);const e=t.outputdatum_new_data_hash(_.__wbg_ptr);return ar.__wrap(e)}static new_data(_){g(_,ht);const e=t.datumsource_new(_.__wbg_ptr);return ar.__wrap(e)}data_hash(){const _=t.outputdatum_data_hash(this.__wbg_ptr);return _===0?void 0:U.__wrap(_)}data(){const _=t.outputdatum_data(this.__wbg_ptr);return _===0?void 0:ht.__wrap(_)}}c.exports.OutputDatum=ar;class ht{static __wrap(_){_=_>>>0;const e=Object.create(ht.prototype);return e.__wbg_ptr=_,e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,_}free(){const _=this.__destroy_into_raw();t.__wbg_plutusdata_free(_)}to_bytes(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.plutusdata_to_bytes(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=D(_,e).slice();return t.__wbindgen_free(_,e*1),s}finally{t.__wbindgen_add_to_stack_pointer(16)}}static from_bytes(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=Q(_,t.__wbindgen_malloc),o=u;t.plutusdata_from_bytes(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw p(s);return ht.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_hex(){let _,e;try{const r=t.__wbindgen_add_to_stack_pointer(-16);t.plutusdata_to_hex(r,this.__wbg_ptr);var s=a()[r/4+0],n=a()[r/4+1];return _=s,e=n,m(s,n)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}static from_hex(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=u;t.plutusdata_from_hex(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw p(s);return ht.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}static new_constr_plutus_data(_){g(_,S);const e=t.plutusdata_new_constr_plutus_data(_.__wbg_ptr);return ht.__wrap(e)}static new_empty_constr_plutus_data(_){g(_,I);const e=t.plutusdata_new_empty_constr_plutus_data(_.__wbg_ptr);return ht.__wrap(e)}static new_single_value_constr_plutus_data(_,e){g(_,I),g(e,ht);const s=t.plutusdata_new_single_value_constr_plutus_data(_.__wbg_ptr,e.__wbg_ptr);return ht.__wrap(s)}static new_map(_){g(_,Ue);const e=t.plutusdata_new_map(_.__wbg_ptr);return ht.__wrap(e)}static new_list(_){g(_,n_);const e=t.plutusdata_new_list(_.__wbg_ptr);return ht.__wrap(e)}static new_integer(_){g(_,L);const e=t.plutusdata_new_integer(_.__wbg_ptr);return ht.__wrap(e)}static new_bytes(_){const e=Q(_,t.__wbindgen_malloc),s=u,n=t.plutusdata_new_bytes(e,s);return ht.__wrap(n)}kind(){return t.plutusdata_kind(this.__wbg_ptr)>>>0}as_constr_plutus_data(){const _=t.plutusdata_as_constr_plutus_data(this.__wbg_ptr);return _===0?void 0:S.__wrap(_)}as_map(){const _=t.plutusdata_as_map(this.__wbg_ptr);return _===0?void 0:Ue.__wrap(_)}as_list(){const _=t.plutusdata_as_list(this.__wbg_ptr);return _===0?void 0:n_.__wrap(_)}as_integer(){const _=t.plutusdata_as_integer(this.__wbg_ptr);return _===0?void 0:L.__wrap(_)}as_bytes(){try{const s=t.__wbindgen_add_to_stack_pointer(-16);t.plutusdata_as_bytes(s,this.__wbg_ptr);var _=a()[s/4+0],e=a()[s/4+1];let n;return _!==0&&(n=D(_,e).slice(),t.__wbindgen_free(_,e*1)),n}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_json(_){let e,s;try{const H=t.__wbindgen_add_to_stack_pointer(-16);t.decode_plutus_datum_to_json_str(H,this.__wbg_ptr,_);var n=a()[H/4+0],r=a()[H/4+1],i=a()[H/4+2],o=a()[H/4+3],f=n,l=r;if(o)throw f=0,l=0,p(i);return e=f,s=l,m(f,l)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(e,s,1)}}static from_json(_,e){try{const i=t.__wbindgen_add_to_stack_pointer(-16),o=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),f=u;t.encode_json_str_to_plutus_datum(i,o,f,e);var s=a()[i/4+0],n=a()[i/4+1],r=a()[i/4+2];if(r)throw p(n);return ht.__wrap(s)}finally{t.__wbindgen_add_to_stack_pointer(16)}}static from_address(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16);g(_,pt),t.plutusdata_from_address(r,_.__wbg_ptr);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw p(s);return ht.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}}c.exports.PlutusData=ht;class n_{static __wrap(_){_=_>>>0;const e=Object.create(n_.prototype);return e.__wbg_ptr=_,e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,_}free(){const _=this.__destroy_into_raw();t.__wbg_plutuslist_free(_)}to_bytes(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.plutuslist_to_bytes(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=D(_,e).slice();return t.__wbindgen_free(_,e*1),s}finally{t.__wbindgen_add_to_stack_pointer(16)}}static from_bytes(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=Q(_,t.__wbindgen_malloc),o=u;t.plutuslist_from_bytes(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw p(s);return n_.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_hex(){let _,e;try{const r=t.__wbindgen_add_to_stack_pointer(-16);t.plutuslist_to_hex(r,this.__wbg_ptr);var s=a()[r/4+0],n=a()[r/4+1];return _=s,e=n,m(s,n)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}static from_hex(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=u;t.plutuslist_from_hex(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw p(s);return n_.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}static new(){const _=t.plutuslist_new();return n_.__wrap(_)}len(){return t.assetnames_len(this.__wbg_ptr)>>>0}get(_){const e=t.plutuslist_get(this.__wbg_ptr,_);return ht.__wrap(e)}add(_){g(_,ht),t.plutuslist_add(this.__wbg_ptr,_.__wbg_ptr)}}c.exports.PlutusList=n_;class Ue{static __wrap(_){_=_>>>0;const e=Object.create(Ue.prototype);return e.__wbg_ptr=_,e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,_}free(){const _=this.__destroy_into_raw();t.__wbg_plutusmap_free(_)}to_bytes(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.plutusmap_to_bytes(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=D(_,e).slice();return t.__wbindgen_free(_,e*1),s}finally{t.__wbindgen_add_to_stack_pointer(16)}}static from_bytes(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=Q(_,t.__wbindgen_malloc),o=u;t.plutusmap_from_bytes(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw p(s);return Ue.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_hex(){let _,e;try{const r=t.__wbindgen_add_to_stack_pointer(-16);t.plutusmap_to_hex(r,this.__wbg_ptr);var s=a()[r/4+0],n=a()[r/4+1];return _=s,e=n,m(s,n)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}static from_hex(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=u;t.plutusmap_from_hex(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw p(s);return Ue.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}static new(){const _=t.auxiliarydataset_new();return Ue.__wrap(_)}len(){return t.auxiliarydataset_len(this.__wbg_ptr)>>>0}insert(_,e){g(_,ht),g(e,ht);const s=t.plutusmap_insert(this.__wbg_ptr,_.__wbg_ptr,e.__wbg_ptr);return s===0?void 0:ht.__wrap(s)}get(_){g(_,ht);const e=t.plutusmap_get(this.__wbg_ptr,_.__wbg_ptr);return e===0?void 0:ht.__wrap(e)}keys(){const _=t.plutusmap_keys(this.__wbg_ptr);return n_.__wrap(_)}}c.exports.PlutusMap=Ue;class Lt{static __wrap(_){_=_>>>0;const e=Object.create(Lt.prototype);return e.__wbg_ptr=_,e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,_}free(){const _=this.__destroy_into_raw();t.__wbg_plutusscript_free(_)}to_bytes(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.plutusscript_to_bytes(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=D(_,e).slice();return t.__wbindgen_free(_,e*1),s}finally{t.__wbindgen_add_to_stack_pointer(16)}}static from_bytes(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=Q(_,t.__wbindgen_malloc),o=u;t.plutusscript_from_bytes(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw p(s);return Lt.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_hex(){let _,e;try{const r=t.__wbindgen_add_to_stack_pointer(-16);t.plutusscript_to_hex(r,this.__wbg_ptr);var s=a()[r/4+0],n=a()[r/4+1];return _=s,e=n,m(s,n)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}static from_hex(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=u;t.plutusscript_from_hex(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw p(s);return Lt.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}static new(_){const e=Q(_,t.__wbindgen_malloc),s=u,n=t.plutusscript_new(e,s);return Lt.__wrap(n)}static new_v2(_){const e=Q(_,t.__wbindgen_malloc),s=u,n=t.plutusscript_new_v2(e,s);return Lt.__wrap(n)}static new_with_version(_,e){const s=Q(_,t.__wbindgen_malloc),n=u;g(e,Jt);const r=t.plutusscript_new_with_version(s,n,e.__wbg_ptr);return Lt.__wrap(r)}bytes(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.assetname_name(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=D(_,e).slice();return t.__wbindgen_free(_,e*1),s}finally{t.__wbindgen_add_to_stack_pointer(16)}}static from_bytes_v2(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=Q(_,t.__wbindgen_malloc),o=u;t.plutusscript_from_bytes_v2(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw p(s);return Lt.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}static from_bytes_with_version(_,e){try{const i=t.__wbindgen_add_to_stack_pointer(-16),o=Q(_,t.__wbindgen_malloc),f=u;g(e,Jt),t.plutusscript_from_bytes_with_version(i,o,f,e.__wbg_ptr);var s=a()[i/4+0],n=a()[i/4+1],r=a()[i/4+2];if(r)throw p(n);return Lt.__wrap(s)}finally{t.__wbindgen_add_to_stack_pointer(16)}}static from_hex_with_version(_,e){try{const i=t.__wbindgen_add_to_stack_pointer(-16),o=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),f=u;g(e,Jt),t.plutusscript_from_hex_with_version(i,o,f,e.__wbg_ptr);var s=a()[i/4+0],n=a()[i/4+1],r=a()[i/4+2];if(r)throw p(n);return Lt.__wrap(s)}finally{t.__wbindgen_add_to_stack_pointer(16)}}hash(){const _=t.plutusscript_hash(this.__wbg_ptr);return Ft.__wrap(_)}language_version(){const _=t.plutusscript_language_version(this.__wbg_ptr);return Jt.__wrap(_)}}c.exports.PlutusScript=Lt;class ee{static __wrap(_){_=_>>>0;const e=Object.create(ee.prototype);return e.__wbg_ptr=_,e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,_}free(){const _=this.__destroy_into_raw();t.__wbg_plutusscriptsource_free(_)}static new(_){g(_,Lt);const e=t.plutusscriptsource_new(_.__wbg_ptr);return ee.__wrap(e)}static new_ref_input(_,e){g(_,Ft),g(e,Ct);const s=t.plutusscriptsource_new_ref_input(_.__wbg_ptr,e.__wbg_ptr);return ee.__wrap(s)}static new_ref_input_with_lang_ver(_,e,s){g(_,Ft),g(e,Ct),g(s,Jt);const n=t.plutusscriptsource_new_ref_input_with_lang_ver(_.__wbg_ptr,e.__wbg_ptr,s.__wbg_ptr);return ee.__wrap(n)}}c.exports.PlutusScriptSource=ee;class k_{static __wrap(_){_=_>>>0;const e=Object.create(k_.prototype);return e.__wbg_ptr=_,e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,_}free(){const _=this.__destroy_into_raw();t.__wbg_plutusscripts_free(_)}to_bytes(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.plutusscripts_to_bytes(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=D(_,e).slice();return t.__wbindgen_free(_,e*1),s}finally{t.__wbindgen_add_to_stack_pointer(16)}}static from_bytes(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=Q(_,t.__wbindgen_malloc),o=u;t.plutusscripts_from_bytes(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw p(s);return k_.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_hex(){let _,e;try{const r=t.__wbindgen_add_to_stack_pointer(-16);t.plutusscripts_to_hex(r,this.__wbg_ptr);var s=a()[r/4+0],n=a()[r/4+1];return _=s,e=n,m(s,n)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}static from_hex(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=u;t.plutusscripts_from_hex(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw p(s);return k_.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_json(){let _,e;try{const l=t.__wbindgen_add_to_stack_pointer(-16);t.plutusscripts_to_json(l,this.__wbg_ptr);var s=a()[l/4+0],n=a()[l/4+1],r=a()[l/4+2],i=a()[l/4+3],o=s,f=n;if(i)throw o=0,f=0,p(r);return _=o,e=f,m(o,f)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}to_js_value(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.plutusscripts_to_js_value(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=a()[n/4+2];if(s)throw p(e);return p(_)}finally{t.__wbindgen_add_to_stack_pointer(16)}}static from_json(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=u;t.plutusscripts_from_json(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw p(s);return k_.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}static new(){const _=t.assetnames_new();return k_.__wrap(_)}len(){return t.assetnames_len(this.__wbg_ptr)>>>0}get(_){const e=t.plutusscripts_get(this.__wbg_ptr,_);return Lt.__wrap(e)}add(_){g(_,Lt),t.plutusscripts_add(this.__wbg_ptr,_.__wbg_ptr)}}c.exports.PlutusScripts=k_;class p_{static __wrap(_){_=_>>>0;const e=Object.create(p_.prototype);return e.__wbg_ptr=_,e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,_}free(){const _=this.__destroy_into_raw();t.__wbg_plutuswitness_free(_)}static new(_,e,s){g(_,Lt),g(e,ht),g(s,e_);const n=t.plutuswitness_new(_.__wbg_ptr,e.__wbg_ptr,s.__wbg_ptr);return p_.__wrap(n)}static new_with_ref(_,e,s){g(_,ee),g(e,V),g(s,e_);const n=t.plutuswitness_new_with_ref(_.__wbg_ptr,e.__wbg_ptr,s.__wbg_ptr);return p_.__wrap(n)}static new_without_datum(_,e){g(_,Lt),g(e,e_);const s=t.plutuswitness_new_without_datum(_.__wbg_ptr,e.__wbg_ptr);return p_.__wrap(s)}static new_with_ref_without_datum(_,e){g(_,ee),g(e,e_);const s=t.plutuswitness_new_with_ref_without_datum(_.__wbg_ptr,e.__wbg_ptr);return p_.__wrap(s)}script(){const _=t.plutuswitness_script(this.__wbg_ptr);return _===0?void 0:Lt.__wrap(_)}datum(){const _=t.plutuswitness_datum(this.__wbg_ptr);return _===0?void 0:ht.__wrap(_)}redeemer(){const _=t.plutuswitness_redeemer(this.__wbg_ptr);return e_.__wrap(_)}}c.exports.PlutusWitness=p_;class re{static __wrap(_){_=_>>>0;const e=Object.create(re.prototype);return e.__wbg_ptr=_,e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,_}free(){const _=this.__destroy_into_raw();t.__wbg_plutuswitnesses_free(_)}static new(){const _=t.certificates_new();return re.__wrap(_)}len(){return t.assetnames_len(this.__wbg_ptr)>>>0}get(_){const e=t.plutuswitnesses_get(this.__wbg_ptr,_);return p_.__wrap(e)}add(_){g(_,p_),t.plutuswitnesses_add(this.__wbg_ptr,_.__wbg_ptr)}}c.exports.PlutusWitnesses=re;class $e{static __wrap(_){_=_>>>0;const e=Object.create($e.prototype);return e.__wbg_ptr=_,e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,_}free(){const _=this.__destroy_into_raw();t.__wbg_pointer_free(_)}static new(_,e,s){const n=t.pointer_new(_,e,s);return $e.__wrap(n)}static new_pointer(_,e,s){g(_,I),g(e,I),g(s,I);const n=t.pointer_new_pointer(_.__wbg_ptr,e.__wbg_ptr,s.__wbg_ptr);return $e.__wrap(n)}slot(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.pointer_slot(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=a()[n/4+2];if(s)throw p(e);return _>>>0}finally{t.__wbindgen_add_to_stack_pointer(16)}}tx_index(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.pointer_tx_index(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=a()[n/4+2];if(s)throw p(e);return _>>>0}finally{t.__wbindgen_add_to_stack_pointer(16)}}cert_index(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.pointer_cert_index(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=a()[n/4+2];if(s)throw p(e);return _>>>0}finally{t.__wbindgen_add_to_stack_pointer(16)}}slot_bignum(){const _=t.exunits_mem(this.__wbg_ptr);return I.__wrap(_)}tx_index_bignum(){const _=t.exunits_steps(this.__wbg_ptr);return I.__wrap(_)}cert_index_bignum(){const _=t.constrplutusdata_alternative(this.__wbg_ptr);return I.__wrap(_)}}c.exports.Pointer=$e;class yr{static __wrap(_){_=_>>>0;const e=Object.create(yr.prototype);return e.__wbg_ptr=_,e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,_}free(){const _=this.__destroy_into_raw();t.__wbg_pointeraddress_free(_)}static new(_,e,s){g(e,Qt),g(s,$e);const n=t.pointeraddress_new(_,e.__wbg_ptr,s.__wbg_ptr);return yr.__wrap(n)}payment_cred(){const _=t.pointeraddress_payment_cred(this.__wbg_ptr);return Qt.__wrap(_)}stake_pointer(){const _=t.pointeraddress_stake_pointer(this.__wbg_ptr);return $e.__wrap(_)}to_address(){const _=t.pointeraddress_to_address(this.__wbg_ptr);return pt.__wrap(_)}static from_address(_){g(_,pt);const e=t.pointeraddress_from_address(_.__wbg_ptr);return e===0?void 0:yr.__wrap(e)}}c.exports.PointerAddress=yr;class ne{static __wrap(_){_=_>>>0;const e=Object.create(ne.prototype);return e.__wbg_ptr=_,e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,_}free(){const _=this.__destroy_into_raw();t.__wbg_poolmetadata_free(_)}to_bytes(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.poolmetadata_to_bytes(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=D(_,e).slice();return t.__wbindgen_free(_,e*1),s}finally{t.__wbindgen_add_to_stack_pointer(16)}}static from_bytes(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=Q(_,t.__wbindgen_malloc),o=u;t.poolmetadata_from_bytes(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw p(s);return ne.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_hex(){let _,e;try{const r=t.__wbindgen_add_to_stack_pointer(-16);t.poolmetadata_to_hex(r,this.__wbg_ptr);var s=a()[r/4+0],n=a()[r/4+1];return _=s,e=n,m(s,n)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}static from_hex(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=u;t.poolmetadata_from_hex(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw p(s);return ne.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_json(){let _,e;try{const l=t.__wbindgen_add_to_stack_pointer(-16);t.poolmetadata_to_json(l,this.__wbg_ptr);var s=a()[l/4+0],n=a()[l/4+1],r=a()[l/4+2],i=a()[l/4+3],o=s,f=n;if(i)throw o=0,f=0,p(r);return _=o,e=f,m(o,f)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}to_js_value(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.poolmetadata_to_js_value(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=a()[n/4+2];if(s)throw p(e);return p(_)}finally{t.__wbindgen_add_to_stack_pointer(16)}}static from_json(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=u;t.poolmetadata_from_json(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw p(s);return ne.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}url(){const _=t.multihostname_dns_name(this.__wbg_ptr);return xe.__wrap(_)}pool_metadata_hash(){const _=t.poolmetadata_pool_metadata_hash(this.__wbg_ptr);return Pe.__wrap(_)}static new(_,e){g(_,xe),g(e,Pe);const s=t.poolmetadata_new(_.__wbg_ptr,e.__wbg_ptr);return ne.__wrap(s)}}c.exports.PoolMetadata=ne;class Pe{static __wrap(_){_=_>>>0;const e=Object.create(Pe.prototype);return e.__wbg_ptr=_,e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,_}free(){const _=this.__destroy_into_raw();t.__wbg_poolmetadatahash_free(_)}static from_bytes(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=Q(_,t.__wbindgen_malloc),o=u;t.poolmetadatahash_from_bytes(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw p(s);return Pe.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_bytes(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.auxiliarydatahash_to_bytes(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=D(_,e).slice();return t.__wbindgen_free(_,e*1),s}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_bech32(_){let e,s;try{const H=t.__wbindgen_add_to_stack_pointer(-16),rt=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),dt=u;t.auxiliarydatahash_to_bech32(H,this.__wbg_ptr,rt,dt);var n=a()[H/4+0],r=a()[H/4+1],i=a()[H/4+2],o=a()[H/4+3],f=n,l=r;if(o)throw f=0,l=0,p(i);return e=f,s=l,m(f,l)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(e,s,1)}}static from_bech32(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=u;t.poolmetadatahash_from_bech32(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw p(s);return Pe.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_hex(){let _,e;try{const r=t.__wbindgen_add_to_stack_pointer(-16);t.auxiliarydatahash_to_hex(r,this.__wbg_ptr);var s=a()[r/4+0],n=a()[r/4+1];return _=s,e=n,m(s,n)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}static from_hex(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=u;t.poolmetadatahash_from_hex(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw p(s);return Pe.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}}c.exports.PoolMetadataHash=Pe;class ae{static __wrap(_){_=_>>>0;const e=Object.create(ae.prototype);return e.__wbg_ptr=_,e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,_}free(){const _=this.__destroy_into_raw();t.__wbg_poolparams_free(_)}to_bytes(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.poolparams_to_bytes(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=D(_,e).slice();return t.__wbindgen_free(_,e*1),s}finally{t.__wbindgen_add_to_stack_pointer(16)}}static from_bytes(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=Q(_,t.__wbindgen_malloc),o=u;t.poolparams_from_bytes(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw p(s);return ae.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_hex(){let _,e;try{const r=t.__wbindgen_add_to_stack_pointer(-16);t.poolparams_to_hex(r,this.__wbg_ptr);var s=a()[r/4+0],n=a()[r/4+1];return _=s,e=n,m(s,n)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}static from_hex(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=u;t.poolparams_from_hex(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw p(s);return ae.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_json(){let _,e;try{const l=t.__wbindgen_add_to_stack_pointer(-16);t.poolparams_to_json(l,this.__wbg_ptr);var s=a()[l/4+0],n=a()[l/4+1],r=a()[l/4+2],i=a()[l/4+3],o=s,f=n;if(i)throw o=0,f=0,p(r);return _=o,e=f,m(o,f)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}to_js_value(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.poolparams_to_js_value(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=a()[n/4+2];if(s)throw p(e);return p(_)}finally{t.__wbindgen_add_to_stack_pointer(16)}}static from_json(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=u;t.poolparams_from_json(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw p(s);return ae.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}operator(){const _=t.poolparams_operator(this.__wbg_ptr);return W.__wrap(_)}vrf_keyhash(){const _=t.poolparams_vrf_keyhash(this.__wbg_ptr);return K_.__wrap(_)}pledge(){const _=t.headerbody_slot_bignum(this.__wbg_ptr);return I.__wrap(_)}cost(){const _=t.poolparams_cost(this.__wbg_ptr);return I.__wrap(_)}margin(){const _=t.poolparams_margin(this.__wbg_ptr);return Vt.__wrap(_)}reward_account(){const _=t.poolparams_reward_account(this.__wbg_ptr);return C_.__wrap(_)}pool_owners(){const _=t.poolparams_pool_owners(this.__wbg_ptr);return Z.__wrap(_)}relays(){const _=t.poolparams_relays(this.__wbg_ptr);return de.__wrap(_)}pool_metadata(){const _=t.poolparams_pool_metadata(this.__wbg_ptr);return _===0?void 0:ne.__wrap(_)}static new(_,e,s,n,r,i,o,f,l){g(_,W),g(e,K_),g(s,I),g(n,I),g(r,Vt),g(i,C_),g(o,Z),g(f,de);let H=0;nt(l)||(g(l,ne),H=l.__destroy_into_raw());const rt=t.poolparams_new(_.__wbg_ptr,e.__wbg_ptr,s.__wbg_ptr,n.__wbg_ptr,r.__wbg_ptr,i.__wbg_ptr,o.__wbg_ptr,f.__wbg_ptr,H);return ae.__wrap(rt)}}c.exports.PoolParams=ae;class se{static __wrap(_){_=_>>>0;const e=Object.create(se.prototype);return e.__wbg_ptr=_,e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,_}free(){const _=this.__destroy_into_raw();t.__wbg_poolregistration_free(_)}to_bytes(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.poolregistration_to_bytes(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=D(_,e).slice();return t.__wbindgen_free(_,e*1),s}finally{t.__wbindgen_add_to_stack_pointer(16)}}static from_bytes(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=Q(_,t.__wbindgen_malloc),o=u;t.poolregistration_from_bytes(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw p(s);return se.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_hex(){let _,e;try{const r=t.__wbindgen_add_to_stack_pointer(-16);t.poolregistration_to_hex(r,this.__wbg_ptr);var s=a()[r/4+0],n=a()[r/4+1];return _=s,e=n,m(s,n)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}static from_hex(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=u;t.poolregistration_from_hex(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw p(s);return se.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_json(){let _,e;try{const l=t.__wbindgen_add_to_stack_pointer(-16);t.poolregistration_to_json(l,this.__wbg_ptr);var s=a()[l/4+0],n=a()[l/4+1],r=a()[l/4+2],i=a()[l/4+3],o=s,f=n;if(i)throw o=0,f=0,p(r);return _=o,e=f,m(o,f)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}to_js_value(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.poolregistration_to_js_value(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=a()[n/4+2];if(s)throw p(e);return p(_)}finally{t.__wbindgen_add_to_stack_pointer(16)}}static from_json(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=u;t.poolregistration_from_json(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw p(s);return se.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}pool_params(){const _=t.poolregistration_pool_params(this.__wbg_ptr);return ae.__wrap(_)}static new(_){g(_,ae);const e=t.poolregistration_new(_.__wbg_ptr);return se.__wrap(e)}}c.exports.PoolRegistration=se;class oe{static __wrap(_){_=_>>>0;const e=Object.create(oe.prototype);return e.__wbg_ptr=_,e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,_}free(){const _=this.__destroy_into_raw();t.__wbg_poolretirement_free(_)}to_bytes(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.poolretirement_to_bytes(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=D(_,e).slice();return t.__wbindgen_free(_,e*1),s}finally{t.__wbindgen_add_to_stack_pointer(16)}}static from_bytes(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=Q(_,t.__wbindgen_malloc),o=u;t.poolretirement_from_bytes(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw p(s);return oe.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_hex(){let _,e;try{const r=t.__wbindgen_add_to_stack_pointer(-16);t.poolretirement_to_hex(r,this.__wbg_ptr);var s=a()[r/4+0],n=a()[r/4+1];return _=s,e=n,m(s,n)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}static from_hex(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=u;t.poolretirement_from_hex(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw p(s);return oe.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_json(){let _,e;try{const l=t.__wbindgen_add_to_stack_pointer(-16);t.poolretirement_to_json(l,this.__wbg_ptr);var s=a()[l/4+0],n=a()[l/4+1],r=a()[l/4+2],i=a()[l/4+3],o=s,f=n;if(i)throw o=0,f=0,p(r);return _=o,e=f,m(o,f)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}to_js_value(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.poolretirement_to_js_value(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=a()[n/4+2];if(s)throw p(e);return p(_)}finally{t.__wbindgen_add_to_stack_pointer(16)}}static from_json(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=u;t.poolretirement_from_json(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw p(s);return oe.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}pool_keyhash(){const _=t.poolretirement_pool_keyhash(this.__wbg_ptr);return W.__wrap(_)}epoch(){return t.poolretirement_epoch(this.__wbg_ptr)>>>0}static new(_,e){g(_,W);const s=t.poolretirement_new(_.__wbg_ptr,e);return oe.__wrap(s)}}c.exports.PoolRetirement=oe;class x_{static __wrap(_){_=_>>>0;const e=Object.create(x_.prototype);return e.__wbg_ptr=_,e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,_}free(){const _=this.__destroy_into_raw();t.__wbg_privatekey_free(_)}to_public(){const _=t.privatekey_to_public(this.__wbg_ptr);return l_.__wrap(_)}static generate_ed25519(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.privatekey_generate_ed25519(n);var _=a()[n/4+0],e=a()[n/4+1],s=a()[n/4+2];if(s)throw p(e);return x_.__wrap(_)}finally{t.__wbindgen_add_to_stack_pointer(16)}}static generate_ed25519extended(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.privatekey_generate_ed25519extended(n);var _=a()[n/4+0],e=a()[n/4+1],s=a()[n/4+2];if(s)throw p(e);return x_.__wrap(_)}finally{t.__wbindgen_add_to_stack_pointer(16)}}static from_bech32(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=u;t.privatekey_from_bech32(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw p(s);return x_.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_bech32(){let _,e;try{const r=t.__wbindgen_add_to_stack_pointer(-16);t.privatekey_to_bech32(r,this.__wbg_ptr);var s=a()[r/4+0],n=a()[r/4+1];return _=s,e=n,m(s,n)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}as_bytes(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.privatekey_as_bytes(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=D(_,e).slice();return t.__wbindgen_free(_,e*1),s}finally{t.__wbindgen_add_to_stack_pointer(16)}}static from_extended_bytes(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=Q(_,t.__wbindgen_malloc),o=u;t.privatekey_from_extended_bytes(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw p(s);return x_.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}static from_normal_bytes(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=Q(_,t.__wbindgen_malloc),o=u;t.privatekey_from_normal_bytes(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw p(s);return x_.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}sign(_){const e=Q(_,t.__wbindgen_malloc),s=u,n=t.privatekey_sign(this.__wbg_ptr,e,s);return it.__wrap(n)}to_hex(){let _,e;try{const r=t.__wbindgen_add_to_stack_pointer(-16);t.privatekey_to_hex(r,this.__wbg_ptr);var s=a()[r/4+0],n=a()[r/4+1];return _=s,e=n,m(s,n)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}static from_hex(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=u;t.privatekey_from_hex(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw p(s);return x_.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}}c.exports.PrivateKey=x_;class ie{static __wrap(_){_=_>>>0;const e=Object.create(ie.prototype);return e.__wbg_ptr=_,e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,_}free(){const _=this.__destroy_into_raw();t.__wbg_proposedprotocolparameterupdates_free(_)}to_bytes(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.proposedprotocolparameterupdates_to_bytes(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=D(_,e).slice();return t.__wbindgen_free(_,e*1),s}finally{t.__wbindgen_add_to_stack_pointer(16)}}static from_bytes(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=Q(_,t.__wbindgen_malloc),o=u;t.proposedprotocolparameterupdates_from_bytes(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw p(s);return ie.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_hex(){let _,e;try{const r=t.__wbindgen_add_to_stack_pointer(-16);t.proposedprotocolparameterupdates_to_hex(r,this.__wbg_ptr);var s=a()[r/4+0],n=a()[r/4+1];return _=s,e=n,m(s,n)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}static from_hex(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=u;t.proposedprotocolparameterupdates_from_hex(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw p(s);return ie.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_json(){let _,e;try{const l=t.__wbindgen_add_to_stack_pointer(-16);t.proposedprotocolparameterupdates_to_json(l,this.__wbg_ptr);var s=a()[l/4+0],n=a()[l/4+1],r=a()[l/4+2],i=a()[l/4+3],o=s,f=n;if(i)throw o=0,f=0,p(r);return _=o,e=f,m(o,f)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}to_js_value(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.proposedprotocolparameterupdates_to_js_value(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=a()[n/4+2];if(s)throw p(e);return p(_)}finally{t.__wbindgen_add_to_stack_pointer(16)}}static from_json(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=u;t.proposedprotocolparameterupdates_from_json(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw p(s);return ie.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}static new(){const _=t.auxiliarydataset_new();return ie.__wrap(_)}len(){return t.auxiliarydataset_len(this.__wbg_ptr)>>>0}insert(_,e){g(_,Xt),g(e,N_);const s=t.proposedprotocolparameterupdates_insert(this.__wbg_ptr,_.__wbg_ptr,e.__wbg_ptr);return s===0?void 0:N_.__wrap(s)}get(_){g(_,Xt);const e=t.proposedprotocolparameterupdates_get(this.__wbg_ptr,_.__wbg_ptr);return e===0?void 0:N_.__wrap(e)}keys(){const _=t.proposedprotocolparameterupdates_keys(this.__wbg_ptr);return c_.__wrap(_)}}c.exports.ProposedProtocolParameterUpdates=ie;class N_{static __wrap(_){_=_>>>0;const e=Object.create(N_.prototype);return e.__wbg_ptr=_,e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,_}free(){const _=this.__destroy_into_raw();t.__wbg_protocolparamupdate_free(_)}to_bytes(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.protocolparamupdate_to_bytes(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=D(_,e).slice();return t.__wbindgen_free(_,e*1),s}finally{t.__wbindgen_add_to_stack_pointer(16)}}static from_bytes(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=Q(_,t.__wbindgen_malloc),o=u;t.protocolparamupdate_from_bytes(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw p(s);return N_.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_hex(){let _,e;try{const r=t.__wbindgen_add_to_stack_pointer(-16);t.protocolparamupdate_to_hex(r,this.__wbg_ptr);var s=a()[r/4+0],n=a()[r/4+1];return _=s,e=n,m(s,n)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}static from_hex(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=u;t.protocolparamupdate_from_hex(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw p(s);return N_.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_json(){let _,e;try{const l=t.__wbindgen_add_to_stack_pointer(-16);t.protocolparamupdate_to_json(l,this.__wbg_ptr);var s=a()[l/4+0],n=a()[l/4+1],r=a()[l/4+2],i=a()[l/4+3],o=s,f=n;if(i)throw o=0,f=0,p(r);return _=o,e=f,m(o,f)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}to_js_value(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.protocolparamupdate_to_js_value(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=a()[n/4+2];if(s)throw p(e);return p(_)}finally{t.__wbindgen_add_to_stack_pointer(16)}}static from_json(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=u;t.protocolparamupdate_from_json(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw p(s);return N_.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}set_minfee_a(_){g(_,I),t.protocolparamupdate_set_minfee_a(this.__wbg_ptr,_.__wbg_ptr)}minfee_a(){const _=t.protocolparamupdate_minfee_a(this.__wbg_ptr);return _===0?void 0:I.__wrap(_)}set_minfee_b(_){g(_,I),t.protocolparamupdate_set_minfee_b(this.__wbg_ptr,_.__wbg_ptr)}minfee_b(){const _=t.protocolparamupdate_minfee_b(this.__wbg_ptr);return _===0?void 0:I.__wrap(_)}set_max_block_body_size(_){t.protocolparamupdate_set_max_block_body_size(this.__wbg_ptr,_)}max_block_body_size(){try{const s=t.__wbindgen_add_to_stack_pointer(-16);t.protocolparamupdate_max_block_body_size(s,this.__wbg_ptr);var _=a()[s/4+0],e=a()[s/4+1];return _===0?void 0:e>>>0}finally{t.__wbindgen_add_to_stack_pointer(16)}}set_max_tx_size(_){t.protocolparamupdate_set_max_tx_size(this.__wbg_ptr,_)}max_tx_size(){try{const s=t.__wbindgen_add_to_stack_pointer(-16);t.protocolparamupdate_max_tx_size(s,this.__wbg_ptr);var _=a()[s/4+0],e=a()[s/4+1];return _===0?void 0:e>>>0}finally{t.__wbindgen_add_to_stack_pointer(16)}}set_max_block_header_size(_){t.protocolparamupdate_set_max_block_header_size(this.__wbg_ptr,_)}max_block_header_size(){try{const s=t.__wbindgen_add_to_stack_pointer(-16);t.protocolparamupdate_max_block_header_size(s,this.__wbg_ptr);var _=a()[s/4+0],e=a()[s/4+1];return _===0?void 0:e>>>0}finally{t.__wbindgen_add_to_stack_pointer(16)}}set_key_deposit(_){g(_,I),t.protocolparamupdate_set_key_deposit(this.__wbg_ptr,_.__wbg_ptr)}key_deposit(){const _=t.protocolparamupdate_key_deposit(this.__wbg_ptr);return _===0?void 0:I.__wrap(_)}set_pool_deposit(_){g(_,I),t.protocolparamupdate_set_pool_deposit(this.__wbg_ptr,_.__wbg_ptr)}pool_deposit(){const _=t.protocolparamupdate_pool_deposit(this.__wbg_ptr);return _===0?void 0:I.__wrap(_)}set_max_epoch(_){t.protocolparamupdate_set_max_epoch(this.__wbg_ptr,_)}max_epoch(){try{const s=t.__wbindgen_add_to_stack_pointer(-16);t.protocolparamupdate_max_epoch(s,this.__wbg_ptr);var _=a()[s/4+0],e=a()[s/4+1];return _===0?void 0:e>>>0}finally{t.__wbindgen_add_to_stack_pointer(16)}}set_n_opt(_){t.protocolparamupdate_set_n_opt(this.__wbg_ptr,_)}n_opt(){try{const s=t.__wbindgen_add_to_stack_pointer(-16);t.protocolparamupdate_n_opt(s,this.__wbg_ptr);var _=a()[s/4+0],e=a()[s/4+1];return _===0?void 0:e>>>0}finally{t.__wbindgen_add_to_stack_pointer(16)}}set_pool_pledge_influence(_){g(_,Vt),t.protocolparamupdate_set_pool_pledge_influence(this.__wbg_ptr,_.__wbg_ptr)}pool_pledge_influence(){const _=t.protocolparamupdate_pool_pledge_influence(this.__wbg_ptr);return _===0?void 0:Vt.__wrap(_)}set_expansion_rate(_){g(_,Vt),t.protocolparamupdate_set_expansion_rate(this.__wbg_ptr,_.__wbg_ptr)}expansion_rate(){const _=t.protocolparamupdate_expansion_rate(this.__wbg_ptr);return _===0?void 0:Vt.__wrap(_)}set_treasury_growth_rate(_){g(_,Vt),t.protocolparamupdate_set_treasury_growth_rate(this.__wbg_ptr,_.__wbg_ptr)}treasury_growth_rate(){const _=t.protocolparamupdate_treasury_growth_rate(this.__wbg_ptr);return _===0?void 0:Vt.__wrap(_)}d(){const _=t.protocolparamupdate_d(this.__wbg_ptr);return _===0?void 0:Vt.__wrap(_)}extra_entropy(){const _=t.protocolparamupdate_extra_entropy(this.__wbg_ptr);return _===0?void 0:_e.__wrap(_)}set_protocol_version(_){g(_,w_),t.protocolparamupdate_set_protocol_version(this.__wbg_ptr,_.__wbg_ptr)}protocol_version(){const _=t.protocolparamupdate_protocol_version(this.__wbg_ptr);return _===0?void 0:w_.__wrap(_)}set_min_pool_cost(_){g(_,I),t.protocolparamupdate_set_min_pool_cost(this.__wbg_ptr,_.__wbg_ptr)}min_pool_cost(){const _=t.protocolparamupdate_min_pool_cost(this.__wbg_ptr);return _===0?void 0:I.__wrap(_)}set_ada_per_utxo_byte(_){g(_,I),t.protocolparamupdate_set_ada_per_utxo_byte(this.__wbg_ptr,_.__wbg_ptr)}ada_per_utxo_byte(){const _=t.protocolparamupdate_ada_per_utxo_byte(this.__wbg_ptr);return _===0?void 0:I.__wrap(_)}set_cost_models(_){g(_,F),t.protocolparamupdate_set_cost_models(this.__wbg_ptr,_.__wbg_ptr)}cost_models(){const _=t.protocolparamupdate_cost_models(this.__wbg_ptr);return _===0?void 0:F.__wrap(_)}set_execution_costs(_){g(_,vt),t.protocolparamupdate_set_execution_costs(this.__wbg_ptr,_.__wbg_ptr)}execution_costs(){const _=t.protocolparamupdate_execution_costs(this.__wbg_ptr);return _===0?void 0:vt.__wrap(_)}set_max_tx_ex_units(_){g(_,at),t.protocolparamupdate_set_max_tx_ex_units(this.__wbg_ptr,_.__wbg_ptr)}max_tx_ex_units(){const _=t.protocolparamupdate_max_tx_ex_units(this.__wbg_ptr);return _===0?void 0:at.__wrap(_)}set_max_block_ex_units(_){g(_,at),t.protocolparamupdate_set_max_block_ex_units(this.__wbg_ptr,_.__wbg_ptr)}max_block_ex_units(){const _=t.protocolparamupdate_max_block_ex_units(this.__wbg_ptr);return _===0?void 0:at.__wrap(_)}set_max_value_size(_){t.protocolparamupdate_set_max_value_size(this.__wbg_ptr,_)}max_value_size(){try{const s=t.__wbindgen_add_to_stack_pointer(-16);t.protocolparamupdate_max_value_size(s,this.__wbg_ptr);var _=a()[s/4+0],e=a()[s/4+1];return _===0?void 0:e>>>0}finally{t.__wbindgen_add_to_stack_pointer(16)}}set_collateral_percentage(_){t.protocolparamupdate_set_collateral_percentage(this.__wbg_ptr,_)}collateral_percentage(){try{const s=t.__wbindgen_add_to_stack_pointer(-16);t.protocolparamupdate_collateral_percentage(s,this.__wbg_ptr);var _=a()[s/4+0],e=a()[s/4+1];return _===0?void 0:e>>>0}finally{t.__wbindgen_add_to_stack_pointer(16)}}set_max_collateral_inputs(_){t.protocolparamupdate_set_max_collateral_inputs(this.__wbg_ptr,_)}max_collateral_inputs(){try{const s=t.__wbindgen_add_to_stack_pointer(-16);t.protocolparamupdate_max_collateral_inputs(s,this.__wbg_ptr);var _=a()[s/4+0],e=a()[s/4+1];return _===0?void 0:e>>>0}finally{t.__wbindgen_add_to_stack_pointer(16)}}static new(){const _=t.protocolparamupdate_new();return N_.__wrap(_)}}c.exports.ProtocolParamUpdate=N_;class w_{static __wrap(_){_=_>>>0;const e=Object.create(w_.prototype);return e.__wbg_ptr=_,e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,_}free(){const _=this.__destroy_into_raw();t.__wbg_protocolversion_free(_)}to_bytes(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.protocolversion_to_bytes(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=D(_,e).slice();return t.__wbindgen_free(_,e*1),s}finally{t.__wbindgen_add_to_stack_pointer(16)}}static from_bytes(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=Q(_,t.__wbindgen_malloc),o=u;t.protocolversion_from_bytes(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw p(s);return w_.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_hex(){let _,e;try{const r=t.__wbindgen_add_to_stack_pointer(-16);t.protocolversion_to_hex(r,this.__wbg_ptr);var s=a()[r/4+0],n=a()[r/4+1];return _=s,e=n,m(s,n)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}static from_hex(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=u;t.protocolversion_from_hex(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw p(s);return w_.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_json(){let _,e;try{const l=t.__wbindgen_add_to_stack_pointer(-16);t.protocolversion_to_json(l,this.__wbg_ptr);var s=a()[l/4+0],n=a()[l/4+1],r=a()[l/4+2],i=a()[l/4+3],o=s,f=n;if(i)throw o=0,f=0,p(r);return _=o,e=f,m(o,f)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}to_js_value(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.protocolversion_to_js_value(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=a()[n/4+2];if(s)throw p(e);return p(_)}finally{t.__wbindgen_add_to_stack_pointer(16)}}static from_json(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=u;t.protocolversion_from_json(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw p(s);return w_.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}major(){return t.networkinfo_protocol_magic(this.__wbg_ptr)>>>0}minor(){return t.protocolversion_minor(this.__wbg_ptr)>>>0}static new(_,e){const s=t.protocolversion_new(_,e);return w_.__wrap(s)}}c.exports.ProtocolVersion=w_;class l_{static __wrap(_){_=_>>>0;const e=Object.create(l_.prototype);return e.__wbg_ptr=_,e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,_}free(){const _=this.__destroy_into_raw();t.__wbg_publickey_free(_)}static from_bech32(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=u;t.publickey_from_bech32(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw p(s);return l_.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_bech32(){let _,e;try{const r=t.__wbindgen_add_to_stack_pointer(-16);t.publickey_to_bech32(r,this.__wbg_ptr);var s=a()[r/4+0],n=a()[r/4+1];return _=s,e=n,m(s,n)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}as_bytes(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.auxiliarydatahash_to_bytes(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=D(_,e).slice();return t.__wbindgen_free(_,e*1),s}finally{t.__wbindgen_add_to_stack_pointer(16)}}static from_bytes(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=Q(_,t.__wbindgen_malloc),o=u;t.publickey_from_bytes(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw p(s);return l_.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}verify(_,e){const s=Q(_,t.__wbindgen_malloc),n=u;return g(e,it),t.publickey_verify(this.__wbg_ptr,s,n,e.__wbg_ptr)!==0}hash(){const _=t.publickey_hash(this.__wbg_ptr);return W.__wrap(_)}to_hex(){let _,e;try{const r=t.__wbindgen_add_to_stack_pointer(-16);t.publickey_to_hex(r,this.__wbg_ptr);var s=a()[r/4+0],n=a()[r/4+1];return _=s,e=n,m(s,n)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}static from_hex(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=u;t.publickey_from_hex(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw p(s);return l_.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}}c.exports.PublicKey=l_;class Br{static __wrap(_){_=_>>>0;const e=Object.create(Br.prototype);return e.__wbg_ptr=_,e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,_}free(){const _=this.__destroy_into_raw();t.__wbg_publickeys_free(_)}constructor(){const _=t.ed25519keyhashes_new();return Br.__wrap(_)}size(){return t.assetnames_len(this.__wbg_ptr)>>>0}get(_){const e=t.publickeys_get(this.__wbg_ptr,_);return l_.__wrap(e)}add(_){g(_,l_),t.publickeys_add(this.__wbg_ptr,_.__wbg_ptr)}}c.exports.PublicKeys=Br;class e_{static __wrap(_){_=_>>>0;const e=Object.create(e_.prototype);return e.__wbg_ptr=_,e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,_}free(){const _=this.__destroy_into_raw();t.__wbg_redeemer_free(_)}to_bytes(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.redeemer_to_bytes(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=D(_,e).slice();return t.__wbindgen_free(_,e*1),s}finally{t.__wbindgen_add_to_stack_pointer(16)}}static from_bytes(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=Q(_,t.__wbindgen_malloc),o=u;t.redeemer_from_bytes(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw p(s);return e_.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_hex(){let _,e;try{const r=t.__wbindgen_add_to_stack_pointer(-16);t.redeemer_to_hex(r,this.__wbg_ptr);var s=a()[r/4+0],n=a()[r/4+1];return _=s,e=n,m(s,n)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}static from_hex(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=u;t.redeemer_from_hex(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw p(s);return e_.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_json(){let _,e;try{const l=t.__wbindgen_add_to_stack_pointer(-16);t.redeemer_to_json(l,this.__wbg_ptr);var s=a()[l/4+0],n=a()[l/4+1],r=a()[l/4+2],i=a()[l/4+3],o=s,f=n;if(i)throw o=0,f=0,p(r);return _=o,e=f,m(o,f)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}to_js_value(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.redeemer_to_js_value(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=a()[n/4+2];if(s)throw p(e);return p(_)}finally{t.__wbindgen_add_to_stack_pointer(16)}}static from_json(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=u;t.redeemer_from_json(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw p(s);return e_.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}tag(){const _=t.redeemer_tag(this.__wbg_ptr);return g_.__wrap(_)}index(){const _=t.redeemer_index(this.__wbg_ptr);return I.__wrap(_)}data(){const _=t.redeemer_data(this.__wbg_ptr);return ht.__wrap(_)}ex_units(){const _=t.redeemer_ex_units(this.__wbg_ptr);return at.__wrap(_)}static new(_,e,s,n){g(_,g_),g(e,I),g(s,ht),g(n,at);const r=t.redeemer_new(_.__wbg_ptr,e.__wbg_ptr,s.__wbg_ptr,n.__wbg_ptr);return e_.__wrap(r)}}c.exports.Redeemer=e_;class g_{static __wrap(_){_=_>>>0;const e=Object.create(g_.prototype);return e.__wbg_ptr=_,e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,_}free(){const _=this.__destroy_into_raw();t.__wbg_redeemertag_free(_)}to_bytes(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.redeemertag_to_bytes(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=D(_,e).slice();return t.__wbindgen_free(_,e*1),s}finally{t.__wbindgen_add_to_stack_pointer(16)}}static from_bytes(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=Q(_,t.__wbindgen_malloc),o=u;t.redeemertag_from_bytes(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw p(s);return g_.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_hex(){let _,e;try{const r=t.__wbindgen_add_to_stack_pointer(-16);t.redeemertag_to_hex(r,this.__wbg_ptr);var s=a()[r/4+0],n=a()[r/4+1];return _=s,e=n,m(s,n)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}static from_hex(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=u;t.redeemertag_from_hex(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw p(s);return g_.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_json(){let _,e;try{const l=t.__wbindgen_add_to_stack_pointer(-16);t.redeemertag_to_json(l,this.__wbg_ptr);var s=a()[l/4+0],n=a()[l/4+1],r=a()[l/4+2],i=a()[l/4+3],o=s,f=n;if(i)throw o=0,f=0,p(r);return _=o,e=f,m(o,f)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}to_js_value(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.redeemertag_to_js_value(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=a()[n/4+2];if(s)throw p(e);return p(_)}finally{t.__wbindgen_add_to_stack_pointer(16)}}static from_json(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=u;t.redeemertag_from_json(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw p(s);return g_.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}static new_spend(){const _=t.redeemertag_new_spend();return g_.__wrap(_)}static new_mint(){const _=t.redeemertag_new_mint();return g_.__wrap(_)}static new_cert(){const _=t.redeemertag_new_cert();return g_.__wrap(_)}static new_reward(){const _=t.redeemertag_new_reward();return g_.__wrap(_)}kind(){return t.redeemertag_kind(this.__wbg_ptr)>>>0}}c.exports.RedeemerTag=g_;class A_{static __wrap(_){_=_>>>0;const e=Object.create(A_.prototype);return e.__wbg_ptr=_,e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,_}free(){const _=this.__destroy_into_raw();t.__wbg_redeemers_free(_)}to_bytes(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.redeemers_to_bytes(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=D(_,e).slice();return t.__wbindgen_free(_,e*1),s}finally{t.__wbindgen_add_to_stack_pointer(16)}}static from_bytes(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=Q(_,t.__wbindgen_malloc),o=u;t.redeemers_from_bytes(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw p(s);return A_.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_hex(){let _,e;try{const r=t.__wbindgen_add_to_stack_pointer(-16);t.redeemers_to_hex(r,this.__wbg_ptr);var s=a()[r/4+0],n=a()[r/4+1];return _=s,e=n,m(s,n)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}static from_hex(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=u;t.redeemers_from_hex(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw p(s);return A_.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_json(){let _,e;try{const l=t.__wbindgen_add_to_stack_pointer(-16);t.redeemers_to_json(l,this.__wbg_ptr);var s=a()[l/4+0],n=a()[l/4+1],r=a()[l/4+2],i=a()[l/4+3],o=s,f=n;if(i)throw o=0,f=0,p(r);return _=o,e=f,m(o,f)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}to_js_value(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.redeemers_to_js_value(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=a()[n/4+2];if(s)throw p(e);return p(_)}finally{t.__wbindgen_add_to_stack_pointer(16)}}static from_json(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=u;t.redeemers_from_json(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw p(s);return A_.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}static new(){const _=t.certificates_new();return A_.__wrap(_)}len(){return t.assetnames_len(this.__wbg_ptr)>>>0}get(_){const e=t.redeemers_get(this.__wbg_ptr,_);return e_.__wrap(e)}add(_){g(_,e_),t.redeemers_add(this.__wbg_ptr,_.__wbg_ptr)}total_ex_units(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.redeemers_total_ex_units(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=a()[n/4+2];if(s)throw p(e);return at.__wrap(_)}finally{t.__wbindgen_add_to_stack_pointer(16)}}}c.exports.Redeemers=A_;class I_{static __wrap(_){_=_>>>0;const e=Object.create(I_.prototype);return e.__wbg_ptr=_,e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,_}free(){const _=this.__destroy_into_raw();t.__wbg_relay_free(_)}to_bytes(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.relay_to_bytes(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=D(_,e).slice();return t.__wbindgen_free(_,e*1),s}finally{t.__wbindgen_add_to_stack_pointer(16)}}static from_bytes(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=Q(_,t.__wbindgen_malloc),o=u;t.relay_from_bytes(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw p(s);return I_.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_hex(){let _,e;try{const r=t.__wbindgen_add_to_stack_pointer(-16);t.relay_to_hex(r,this.__wbg_ptr);var s=a()[r/4+0],n=a()[r/4+1];return _=s,e=n,m(s,n)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}static from_hex(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=u;t.relay_from_hex(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw p(s);return I_.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_json(){let _,e;try{const l=t.__wbindgen_add_to_stack_pointer(-16);t.relay_to_json(l,this.__wbg_ptr);var s=a()[l/4+0],n=a()[l/4+1],r=a()[l/4+2],i=a()[l/4+3],o=s,f=n;if(i)throw o=0,f=0,p(r);return _=o,e=f,m(o,f)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}to_js_value(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.relay_to_js_value(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=a()[n/4+2];if(s)throw p(e);return p(_)}finally{t.__wbindgen_add_to_stack_pointer(16)}}static from_json(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=u;t.relay_from_json(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw p(s);return I_.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}static new_single_host_addr(_){g(_,be);const e=t.relay_new_single_host_addr(_.__wbg_ptr);return I_.__wrap(e)}static new_single_host_name(_){g(_,ue);const e=t.relay_new_single_host_name(_.__wbg_ptr);return I_.__wrap(e)}static new_multi_host_name(_){g(_,te);const e=t.relay_new_multi_host_name(_.__wbg_ptr);return I_.__wrap(e)}kind(){return t.relay_kind(this.__wbg_ptr)>>>0}as_single_host_addr(){const _=t.relay_as_single_host_addr(this.__wbg_ptr);return _===0?void 0:be.__wrap(_)}as_single_host_name(){const _=t.relay_as_single_host_name(this.__wbg_ptr);return _===0?void 0:ue.__wrap(_)}as_multi_host_name(){const _=t.relay_as_multi_host_name(this.__wbg_ptr);return _===0?void 0:te.__wrap(_)}}c.exports.Relay=I_;class de{static __wrap(_){_=_>>>0;const e=Object.create(de.prototype);return e.__wbg_ptr=_,e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,_}free(){const _=this.__destroy_into_raw();t.__wbg_relays_free(_)}to_bytes(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.relays_to_bytes(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=D(_,e).slice();return t.__wbindgen_free(_,e*1),s}finally{t.__wbindgen_add_to_stack_pointer(16)}}static from_bytes(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=Q(_,t.__wbindgen_malloc),o=u;t.relays_from_bytes(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw p(s);return de.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_hex(){let _,e;try{const r=t.__wbindgen_add_to_stack_pointer(-16);t.relays_to_hex(r,this.__wbg_ptr);var s=a()[r/4+0],n=a()[r/4+1];return _=s,e=n,m(s,n)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}static from_hex(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=u;t.relays_from_hex(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw p(s);return de.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_json(){let _,e;try{const l=t.__wbindgen_add_to_stack_pointer(-16);t.relays_to_json(l,this.__wbg_ptr);var s=a()[l/4+0],n=a()[l/4+1],r=a()[l/4+2],i=a()[l/4+3],o=s,f=n;if(i)throw o=0,f=0,p(r);return _=o,e=f,m(o,f)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}to_js_value(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.relays_to_js_value(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=a()[n/4+2];if(s)throw p(e);return p(_)}finally{t.__wbindgen_add_to_stack_pointer(16)}}static from_json(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=u;t.relays_from_json(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw p(s);return de.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}static new(){const _=t.assetnames_new();return de.__wrap(_)}len(){return t.assetnames_len(this.__wbg_ptr)>>>0}get(_){const e=t.relays_get(this.__wbg_ptr,_);return I_.__wrap(e)}add(_){g(_,I_),t.relays_add(this.__wbg_ptr,_.__wbg_ptr)}}c.exports.Relays=de;class C_{static __wrap(_){_=_>>>0;const e=Object.create(C_.prototype);return e.__wbg_ptr=_,e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,_}free(){const _=this.__destroy_into_raw();t.__wbg_rewardaddress_free(_)}static new(_,e){g(e,Qt);const s=t.enterpriseaddress_new(_,e.__wbg_ptr);return C_.__wrap(s)}payment_cred(){const _=t.baseaddress_payment_cred(this.__wbg_ptr);return Qt.__wrap(_)}to_address(){const _=t.rewardaddress_to_address(this.__wbg_ptr);return pt.__wrap(_)}static from_address(_){g(_,pt);const e=t.rewardaddress_from_address(_.__wbg_ptr);return e===0?void 0:C_.__wrap(e)}}c.exports.RewardAddress=C_;class Fe{static __wrap(_){_=_>>>0;const e=Object.create(Fe.prototype);return e.__wbg_ptr=_,e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,_}free(){const _=this.__destroy_into_raw();t.__wbg_rewardaddresses_free(_)}to_bytes(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.rewardaddresses_to_bytes(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=D(_,e).slice();return t.__wbindgen_free(_,e*1),s}finally{t.__wbindgen_add_to_stack_pointer(16)}}static from_bytes(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=Q(_,t.__wbindgen_malloc),o=u;t.rewardaddresses_from_bytes(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw p(s);return Fe.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_hex(){let _,e;try{const r=t.__wbindgen_add_to_stack_pointer(-16);t.rewardaddresses_to_hex(r,this.__wbg_ptr);var s=a()[r/4+0],n=a()[r/4+1];return _=s,e=n,m(s,n)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}static from_hex(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=u;t.rewardaddresses_from_hex(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw p(s);return Fe.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_json(){let _,e;try{const l=t.__wbindgen_add_to_stack_pointer(-16);t.rewardaddresses_to_json(l,this.__wbg_ptr);var s=a()[l/4+0],n=a()[l/4+1],r=a()[l/4+2],i=a()[l/4+3],o=s,f=n;if(i)throw o=0,f=0,p(r);return _=o,e=f,m(o,f)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}to_js_value(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.rewardaddresses_to_js_value(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=a()[n/4+2];if(s)throw p(e);return p(_)}finally{t.__wbindgen_add_to_stack_pointer(16)}}static from_json(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=u;t.rewardaddresses_from_json(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw p(s);return Fe.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}static new(){const _=t.ed25519keyhashes_new();return Fe.__wrap(_)}len(){return t.assetnames_len(this.__wbg_ptr)>>>0}get(_){const e=t.rewardaddresses_get(this.__wbg_ptr,_);return C_.__wrap(e)}add(_){g(_,C_),t.rewardaddresses_add(this.__wbg_ptr,_.__wbg_ptr)}}c.exports.RewardAddresses=Fe;class ce{static __wrap(_){_=_>>>0;const e=Object.create(ce.prototype);return e.__wbg_ptr=_,e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,_}free(){const _=this.__destroy_into_raw();t.__wbg_scriptall_free(_)}to_bytes(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.scriptall_to_bytes(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=D(_,e).slice();return t.__wbindgen_free(_,e*1),s}finally{t.__wbindgen_add_to_stack_pointer(16)}}static from_bytes(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=Q(_,t.__wbindgen_malloc),o=u;t.scriptall_from_bytes(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw p(s);return ce.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_hex(){let _,e;try{const r=t.__wbindgen_add_to_stack_pointer(-16);t.scriptall_to_hex(r,this.__wbg_ptr);var s=a()[r/4+0],n=a()[r/4+1];return _=s,e=n,m(s,n)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}static from_hex(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=u;t.scriptall_from_hex(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw p(s);return ce.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_json(){let _,e;try{const l=t.__wbindgen_add_to_stack_pointer(-16);t.scriptall_to_json(l,this.__wbg_ptr);var s=a()[l/4+0],n=a()[l/4+1],r=a()[l/4+2],i=a()[l/4+3],o=s,f=n;if(i)throw o=0,f=0,p(r);return _=o,e=f,m(o,f)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}to_js_value(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.scriptall_to_js_value(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=a()[n/4+2];if(s)throw p(e);return p(_)}finally{t.__wbindgen_add_to_stack_pointer(16)}}static from_json(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=u;t.scriptall_from_json(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw p(s);return ce.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}native_scripts(){const _=t.scriptall_native_scripts(this.__wbg_ptr);return Ht.__wrap(_)}static new(_){g(_,Ht);const e=t.scriptall_new(_.__wbg_ptr);return ce.__wrap(e)}}c.exports.ScriptAll=ce;class pe{static __wrap(_){_=_>>>0;const e=Object.create(pe.prototype);return e.__wbg_ptr=_,e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,_}free(){const _=this.__destroy_into_raw();t.__wbg_scriptany_free(_)}to_bytes(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.scriptany_to_bytes(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=D(_,e).slice();return t.__wbindgen_free(_,e*1),s}finally{t.__wbindgen_add_to_stack_pointer(16)}}static from_bytes(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=Q(_,t.__wbindgen_malloc),o=u;t.scriptany_from_bytes(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw p(s);return pe.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_hex(){let _,e;try{const r=t.__wbindgen_add_to_stack_pointer(-16);t.scriptany_to_hex(r,this.__wbg_ptr);var s=a()[r/4+0],n=a()[r/4+1];return _=s,e=n,m(s,n)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}static from_hex(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=u;t.scriptany_from_hex(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw p(s);return pe.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_json(){let _,e;try{const l=t.__wbindgen_add_to_stack_pointer(-16);t.scriptall_to_json(l,this.__wbg_ptr);var s=a()[l/4+0],n=a()[l/4+1],r=a()[l/4+2],i=a()[l/4+3],o=s,f=n;if(i)throw o=0,f=0,p(r);return _=o,e=f,m(o,f)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}to_js_value(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.scriptany_to_js_value(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=a()[n/4+2];if(s)throw p(e);return p(_)}finally{t.__wbindgen_add_to_stack_pointer(16)}}static from_json(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=u;t.scriptany_from_json(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw p(s);return pe.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}native_scripts(){const _=t.scriptall_native_scripts(this.__wbg_ptr);return Ht.__wrap(_)}static new(_){g(_,Ht);const e=t.scriptall_new(_.__wbg_ptr);return pe.__wrap(e)}}c.exports.ScriptAny=pe;class U_{static __wrap(_){_=_>>>0;const e=Object.create(U_.prototype);return e.__wbg_ptr=_,e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,_}free(){const _=this.__destroy_into_raw();t.__wbg_scriptdatahash_free(_)}static from_bytes(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=Q(_,t.__wbindgen_malloc),o=u;t.scriptdatahash_from_bytes(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw p(s);return U_.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_bytes(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.auxiliarydatahash_to_bytes(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=D(_,e).slice();return t.__wbindgen_free(_,e*1),s}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_bech32(_){let e,s;try{const H=t.__wbindgen_add_to_stack_pointer(-16),rt=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),dt=u;t.auxiliarydatahash_to_bech32(H,this.__wbg_ptr,rt,dt);var n=a()[H/4+0],r=a()[H/4+1],i=a()[H/4+2],o=a()[H/4+3],f=n,l=r;if(o)throw f=0,l=0,p(i);return e=f,s=l,m(f,l)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(e,s,1)}}static from_bech32(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=u;t.scriptdatahash_from_bech32(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw p(s);return U_.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_hex(){let _,e;try{const r=t.__wbindgen_add_to_stack_pointer(-16);t.auxiliarydatahash_to_hex(r,this.__wbg_ptr);var s=a()[r/4+0],n=a()[r/4+1];return _=s,e=n,m(s,n)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}static from_hex(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=u;t.scriptdatahash_from_hex(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw p(s);return U_.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}}c.exports.ScriptDataHash=U_;class Ft{static __wrap(_){_=_>>>0;const e=Object.create(Ft.prototype);return e.__wbg_ptr=_,e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,_}free(){const _=this.__destroy_into_raw();t.__wbg_scripthash_free(_)}static from_bytes(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=Q(_,t.__wbindgen_malloc),o=u;t.scripthash_from_bytes(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw p(s);return Ft.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_bytes(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.ed25519keyhash_to_bytes(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=D(_,e).slice();return t.__wbindgen_free(_,e*1),s}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_bech32(_){let e,s;try{const H=t.__wbindgen_add_to_stack_pointer(-16),rt=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),dt=u;t.ed25519keyhash_to_bech32(H,this.__wbg_ptr,rt,dt);var n=a()[H/4+0],r=a()[H/4+1],i=a()[H/4+2],o=a()[H/4+3],f=n,l=r;if(o)throw f=0,l=0,p(i);return e=f,s=l,m(f,l)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(e,s,1)}}static from_bech32(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=u;t.scripthash_from_bech32(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw p(s);return Ft.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_hex(){let _,e;try{const r=t.__wbindgen_add_to_stack_pointer(-16);t.ed25519keyhash_to_hex(r,this.__wbg_ptr);var s=a()[r/4+0],n=a()[r/4+1];return _=s,e=n,m(s,n)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}static from_hex(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=u;t.scripthash_from_hex(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw p(s);return Ft.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}}c.exports.ScriptHash=Ft;class we{static __wrap(_){_=_>>>0;const e=Object.create(we.prototype);return e.__wbg_ptr=_,e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,_}free(){const _=this.__destroy_into_raw();t.__wbg_scripthashes_free(_)}to_bytes(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.scripthashes_to_bytes(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=D(_,e).slice();return t.__wbindgen_free(_,e*1),s}finally{t.__wbindgen_add_to_stack_pointer(16)}}static from_bytes(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=Q(_,t.__wbindgen_malloc),o=u;t.scripthashes_from_bytes(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw p(s);return we.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_hex(){let _,e;try{const r=t.__wbindgen_add_to_stack_pointer(-16);t.scripthashes_to_hex(r,this.__wbg_ptr);var s=a()[r/4+0],n=a()[r/4+1];return _=s,e=n,m(s,n)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}static from_hex(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=u;t.scripthashes_from_hex(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw p(s);return we.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_json(){let _,e;try{const l=t.__wbindgen_add_to_stack_pointer(-16);t.ed25519keyhashes_to_json(l,this.__wbg_ptr);var s=a()[l/4+0],n=a()[l/4+1],r=a()[l/4+2],i=a()[l/4+3],o=s,f=n;if(i)throw o=0,f=0,p(r);return _=o,e=f,m(o,f)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}to_js_value(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.ed25519keyhashes_to_js_value(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=a()[n/4+2];if(s)throw p(e);return p(_)}finally{t.__wbindgen_add_to_stack_pointer(16)}}static from_json(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=u;t.scripthashes_from_json(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw p(s);return we.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}static new(){const _=t.ed25519keyhashes_new();return we.__wrap(_)}len(){return t.assetnames_len(this.__wbg_ptr)>>>0}get(_){const e=t.scripthashes_get(this.__wbg_ptr,_);return Ft.__wrap(e)}add(_){g(_,Ft),t.ed25519keyhashes_add(this.__wbg_ptr,_.__wbg_ptr)}}c.exports.ScriptHashes=we;class le{static __wrap(_){_=_>>>0;const e=Object.create(le.prototype);return e.__wbg_ptr=_,e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,_}free(){const _=this.__destroy_into_raw();t.__wbg_scriptnofk_free(_)}to_bytes(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.scriptnofk_to_bytes(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=D(_,e).slice();return t.__wbindgen_free(_,e*1),s}finally{t.__wbindgen_add_to_stack_pointer(16)}}static from_bytes(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=Q(_,t.__wbindgen_malloc),o=u;t.scriptnofk_from_bytes(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw p(s);return le.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_hex(){let _,e;try{const r=t.__wbindgen_add_to_stack_pointer(-16);t.scriptnofk_to_hex(r,this.__wbg_ptr);var s=a()[r/4+0],n=a()[r/4+1];return _=s,e=n,m(s,n)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}static from_hex(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=u;t.scriptnofk_from_hex(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw p(s);return le.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_json(){let _,e;try{const l=t.__wbindgen_add_to_stack_pointer(-16);t.scriptnofk_to_json(l,this.__wbg_ptr);var s=a()[l/4+0],n=a()[l/4+1],r=a()[l/4+2],i=a()[l/4+3],o=s,f=n;if(i)throw o=0,f=0,p(r);return _=o,e=f,m(o,f)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}to_js_value(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.scriptnofk_to_js_value(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=a()[n/4+2];if(s)throw p(e);return p(_)}finally{t.__wbindgen_add_to_stack_pointer(16)}}static from_json(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=u;t.scriptnofk_from_json(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw p(s);return le.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}n(){return t.scriptnofk_n(this.__wbg_ptr)>>>0}native_scripts(){const _=t.scriptall_native_scripts(this.__wbg_ptr);return Ht.__wrap(_)}static new(_,e){g(e,Ht);const s=t.scriptnofk_new(_,e.__wbg_ptr);return le.__wrap(s)}}c.exports.ScriptNOfK=le;class ge{static __wrap(_){_=_>>>0;const e=Object.create(ge.prototype);return e.__wbg_ptr=_,e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,_}free(){const _=this.__destroy_into_raw();t.__wbg_scriptpubkey_free(_)}to_bytes(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.scriptpubkey_to_bytes(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=D(_,e).slice();return t.__wbindgen_free(_,e*1),s}finally{t.__wbindgen_add_to_stack_pointer(16)}}static from_bytes(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=Q(_,t.__wbindgen_malloc),o=u;t.scriptpubkey_from_bytes(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw p(s);return ge.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_hex(){let _,e;try{const r=t.__wbindgen_add_to_stack_pointer(-16);t.scriptpubkey_to_hex(r,this.__wbg_ptr);var s=a()[r/4+0],n=a()[r/4+1];return _=s,e=n,m(s,n)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}static from_hex(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=u;t.scriptpubkey_from_hex(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw p(s);return ge.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_json(){let _,e;try{const l=t.__wbindgen_add_to_stack_pointer(-16);t.scriptpubkey_to_json(l,this.__wbg_ptr);var s=a()[l/4+0],n=a()[l/4+1],r=a()[l/4+2],i=a()[l/4+3],o=s,f=n;if(i)throw o=0,f=0,p(r);return _=o,e=f,m(o,f)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}to_js_value(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.scriptpubkey_to_js_value(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=a()[n/4+2];if(s)throw p(e);return p(_)}finally{t.__wbindgen_add_to_stack_pointer(16)}}static from_json(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=u;t.scriptpubkey_from_json(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw p(s);return ge.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}addr_keyhash(){const _=t.scriptpubkey_addr_keyhash(this.__wbg_ptr);return W.__wrap(_)}static new(_){g(_,W);const e=t.scriptpubkey_new(_.__wbg_ptr);return ge.__wrap(e)}}c.exports.ScriptPubkey=ge;class j_{static __wrap(_){_=_>>>0;const e=Object.create(j_.prototype);return e.__wbg_ptr=_,e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,_}free(){const _=this.__destroy_into_raw();t.__wbg_scriptref_free(_)}to_bytes(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.scriptref_to_bytes(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=D(_,e).slice();return t.__wbindgen_free(_,e*1),s}finally{t.__wbindgen_add_to_stack_pointer(16)}}static from_bytes(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=Q(_,t.__wbindgen_malloc),o=u;t.scriptref_from_bytes(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw p(s);return j_.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_hex(){let _,e;try{const r=t.__wbindgen_add_to_stack_pointer(-16);t.scriptref_to_hex(r,this.__wbg_ptr);var s=a()[r/4+0],n=a()[r/4+1];return _=s,e=n,m(s,n)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}static from_hex(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=u;t.scriptref_from_hex(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw p(s);return j_.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_json(){let _,e;try{const l=t.__wbindgen_add_to_stack_pointer(-16);t.scriptref_to_json(l,this.__wbg_ptr);var s=a()[l/4+0],n=a()[l/4+1],r=a()[l/4+2],i=a()[l/4+3],o=s,f=n;if(i)throw o=0,f=0,p(r);return _=o,e=f,m(o,f)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}to_js_value(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.scriptref_to_js_value(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=a()[n/4+2];if(s)throw p(e);return p(_)}finally{t.__wbindgen_add_to_stack_pointer(16)}}static from_json(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=u;t.scriptref_from_json(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw p(s);return j_.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}static new_native_script(_){g(_,Nt);const e=t.scriptref_new_native_script(_.__wbg_ptr);return j_.__wrap(e)}static new_plutus_script(_){g(_,Lt);const e=t.scriptref_new_plutus_script(_.__wbg_ptr);return j_.__wrap(e)}is_native_script(){return t.scriptref_is_native_script(this.__wbg_ptr)!==0}is_plutus_script(){return t.scriptref_is_plutus_script(this.__wbg_ptr)!==0}native_script(){const _=t.scriptref_native_script(this.__wbg_ptr);return _===0?void 0:Nt.__wrap(_)}plutus_script(){const _=t.scriptref_plutus_script(this.__wbg_ptr);return _===0?void 0:Lt.__wrap(_)}}c.exports.ScriptRef=j_;class vr{static __wrap(_){_=_>>>0;const e=Object.create(vr.prototype);return e.__wbg_ptr=_,e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,_}free(){const _=this.__destroy_into_raw();t.__wbg_serializedaddress_free(_)}static new(_,e,s){const n=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),r=u,i=v(e,t.__wbindgen_malloc,t.__wbindgen_realloc),o=u,f=v(s,t.__wbindgen_malloc,t.__wbindgen_realloc),l=u,H=t.serializedaddress_new(n,r,i,o,f,l);return vr.__wrap(H)}get_pub_key_hash(){let _,e;try{const r=t.__wbindgen_add_to_stack_pointer(-16);t.serializedaddress_get_pub_key_hash(r,this.__wbg_ptr);var s=a()[r/4+0],n=a()[r/4+1];return _=s,e=n,m(s,n)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}get_script_hash(){let _,e;try{const r=t.__wbindgen_add_to_stack_pointer(-16);t.serializedaddress_get_script_hash(r,this.__wbg_ptr);var s=a()[r/4+0],n=a()[r/4+1];return _=s,e=n,m(s,n)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}get_stake_key_hash(){let _,e;try{const r=t.__wbindgen_add_to_stack_pointer(-16);t.serializedaddress_get_stake_key_hash(r,this.__wbg_ptr);var s=a()[r/4+0],n=a()[r/4+1];return _=s,e=n,m(s,n)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}}c.exports.SerializedAddress=vr;class be{static __wrap(_){_=_>>>0;const e=Object.create(be.prototype);return e.__wbg_ptr=_,e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,_}free(){const _=this.__destroy_into_raw();t.__wbg_singlehostaddr_free(_)}to_bytes(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.singlehostaddr_to_bytes(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=D(_,e).slice();return t.__wbindgen_free(_,e*1),s}finally{t.__wbindgen_add_to_stack_pointer(16)}}static from_bytes(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=Q(_,t.__wbindgen_malloc),o=u;t.singlehostaddr_from_bytes(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw p(s);return be.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_hex(){let _,e;try{const r=t.__wbindgen_add_to_stack_pointer(-16);t.singlehostaddr_to_hex(r,this.__wbg_ptr);var s=a()[r/4+0],n=a()[r/4+1];return _=s,e=n,m(s,n)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}static from_hex(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=u;t.singlehostaddr_from_hex(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw p(s);return be.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_json(){let _,e;try{const l=t.__wbindgen_add_to_stack_pointer(-16);t.singlehostaddr_to_json(l,this.__wbg_ptr);var s=a()[l/4+0],n=a()[l/4+1],r=a()[l/4+2],i=a()[l/4+3],o=s,f=n;if(i)throw o=0,f=0,p(r);return _=o,e=f,m(o,f)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}to_js_value(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.singlehostaddr_to_js_value(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=a()[n/4+2];if(s)throw p(e);return p(_)}finally{t.__wbindgen_add_to_stack_pointer(16)}}static from_json(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=u;t.singlehostaddr_from_json(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw p(s);return be.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}port(){const _=t.singlehostaddr_port(this.__wbg_ptr);return _===16777215?void 0:_}ipv4(){const _=t.singlehostaddr_ipv4(this.__wbg_ptr);return _===0?void 0:$_.__wrap(_)}ipv6(){const _=t.singlehostaddr_ipv6(this.__wbg_ptr);return _===0?void 0:J_.__wrap(_)}static new(_,e,s){let n=0;nt(e)||(g(e,$_),n=e.__destroy_into_raw());let r=0;nt(s)||(g(s,J_),r=s.__destroy_into_raw());const i=t.singlehostaddr_new(nt(_)?16777215:_,n,r);return be.__wrap(i)}}c.exports.SingleHostAddr=be;class ue{static __wrap(_){_=_>>>0;const e=Object.create(ue.prototype);return e.__wbg_ptr=_,e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,_}free(){const _=this.__destroy_into_raw();t.__wbg_singlehostname_free(_)}to_bytes(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.singlehostname_to_bytes(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=D(_,e).slice();return t.__wbindgen_free(_,e*1),s}finally{t.__wbindgen_add_to_stack_pointer(16)}}static from_bytes(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=Q(_,t.__wbindgen_malloc),o=u;t.singlehostname_from_bytes(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw p(s);return ue.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_hex(){let _,e;try{const r=t.__wbindgen_add_to_stack_pointer(-16);t.singlehostname_to_hex(r,this.__wbg_ptr);var s=a()[r/4+0],n=a()[r/4+1];return _=s,e=n,m(s,n)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}static from_hex(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=u;t.singlehostname_from_hex(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw p(s);return ue.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_json(){let _,e;try{const l=t.__wbindgen_add_to_stack_pointer(-16);t.singlehostname_to_json(l,this.__wbg_ptr);var s=a()[l/4+0],n=a()[l/4+1],r=a()[l/4+2],i=a()[l/4+3],o=s,f=n;if(i)throw o=0,f=0,p(r);return _=o,e=f,m(o,f)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}to_js_value(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.singlehostname_to_js_value(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=a()[n/4+2];if(s)throw p(e);return p(_)}finally{t.__wbindgen_add_to_stack_pointer(16)}}static from_json(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=u;t.singlehostname_from_json(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw p(s);return ue.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}port(){const _=t.singlehostname_port(this.__wbg_ptr);return _===16777215?void 0:_}dns_name(){const _=t.multihostname_dns_name(this.__wbg_ptr);return E.__wrap(_)}static new(_,e){g(e,E);const s=t.singlehostname_new(nt(_)?16777215:_,e.__wbg_ptr);return ue.__wrap(s)}}c.exports.SingleHostName=ue;class Qt{static __wrap(_){_=_>>>0;const e=Object.create(Qt.prototype);return e.__wbg_ptr=_,e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,_}free(){const _=this.__destroy_into_raw();t.__wbg_stakecredential_free(_)}static from_keyhash(_){g(_,W);const e=t.stakecredential_from_keyhash(_.__wbg_ptr);return Qt.__wrap(e)}static from_scripthash(_){g(_,Ft);const e=t.stakecredential_from_scripthash(_.__wbg_ptr);return Qt.__wrap(e)}to_keyhash(){const _=t.stakecredential_to_keyhash(this.__wbg_ptr);return _===0?void 0:W.__wrap(_)}to_scripthash(){const _=t.stakecredential_to_scripthash(this.__wbg_ptr);return _===0?void 0:Ft.__wrap(_)}kind(){return t.networkid_kind(this.__wbg_ptr)>>>0}to_bytes(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.stakecredential_to_bytes(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=D(_,e).slice();return t.__wbindgen_free(_,e*1),s}finally{t.__wbindgen_add_to_stack_pointer(16)}}static from_bytes(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=Q(_,t.__wbindgen_malloc),o=u;t.stakecredential_from_bytes(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw p(s);return Qt.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_hex(){let _,e;try{const r=t.__wbindgen_add_to_stack_pointer(-16);t.stakecredential_to_hex(r,this.__wbg_ptr);var s=a()[r/4+0],n=a()[r/4+1];return _=s,e=n,m(s,n)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}static from_hex(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=u;t.stakecredential_from_hex(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw p(s);return Qt.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_json(){let _,e;try{const l=t.__wbindgen_add_to_stack_pointer(-16);t.stakecredential_to_json(l,this.__wbg_ptr);var s=a()[l/4+0],n=a()[l/4+1],r=a()[l/4+2],i=a()[l/4+3],o=s,f=n;if(i)throw o=0,f=0,p(r);return _=o,e=f,m(o,f)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}to_js_value(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.stakecredential_to_js_value(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=a()[n/4+2];if(s)throw p(e);return p(_)}finally{t.__wbindgen_add_to_stack_pointer(16)}}static from_json(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=u;t.stakecredential_from_json(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw p(s);return Qt.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}}c.exports.StakeCredential=Qt;class Me{static __wrap(_){_=_>>>0;const e=Object.create(Me.prototype);return e.__wbg_ptr=_,e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,_}free(){const _=this.__destroy_into_raw();t.__wbg_stakecredentials_free(_)}to_bytes(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.stakecredentials_to_bytes(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=D(_,e).slice();return t.__wbindgen_free(_,e*1),s}finally{t.__wbindgen_add_to_stack_pointer(16)}}static from_bytes(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=Q(_,t.__wbindgen_malloc),o=u;t.stakecredentials_from_bytes(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw p(s);return Me.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_hex(){let _,e;try{const r=t.__wbindgen_add_to_stack_pointer(-16);t.stakecredentials_to_hex(r,this.__wbg_ptr);var s=a()[r/4+0],n=a()[r/4+1];return _=s,e=n,m(s,n)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}static from_hex(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=u;t.stakecredentials_from_hex(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw p(s);return Me.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_json(){let _,e;try{const l=t.__wbindgen_add_to_stack_pointer(-16);t.stakecredentials_to_json(l,this.__wbg_ptr);var s=a()[l/4+0],n=a()[l/4+1],r=a()[l/4+2],i=a()[l/4+3],o=s,f=n;if(i)throw o=0,f=0,p(r);return _=o,e=f,m(o,f)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}to_js_value(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.stakecredentials_to_js_value(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=a()[n/4+2];if(s)throw p(e);return p(_)}finally{t.__wbindgen_add_to_stack_pointer(16)}}static from_json(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=u;t.stakecredentials_from_json(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw p(s);return Me.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}static new(){const _=t.ed25519keyhashes_new();return Me.__wrap(_)}len(){return t.assetnames_len(this.__wbg_ptr)>>>0}get(_){const e=t.stakecredentials_get(this.__wbg_ptr,_);return Qt.__wrap(e)}add(_){g(_,Qt),t.stakecredentials_add(this.__wbg_ptr,_.__wbg_ptr)}}c.exports.StakeCredentials=Me;class fe{static __wrap(_){_=_>>>0;const e=Object.create(fe.prototype);return e.__wbg_ptr=_,e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,_}free(){const _=this.__destroy_into_raw();t.__wbg_stakedelegation_free(_)}to_bytes(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.stakedelegation_to_bytes(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=D(_,e).slice();return t.__wbindgen_free(_,e*1),s}finally{t.__wbindgen_add_to_stack_pointer(16)}}static from_bytes(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=Q(_,t.__wbindgen_malloc),o=u;t.stakedelegation_from_bytes(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw p(s);return fe.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_hex(){let _,e;try{const r=t.__wbindgen_add_to_stack_pointer(-16);t.stakedelegation_to_hex(r,this.__wbg_ptr);var s=a()[r/4+0],n=a()[r/4+1];return _=s,e=n,m(s,n)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}static from_hex(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=u;t.stakedelegation_from_hex(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw p(s);return fe.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_json(){let _,e;try{const l=t.__wbindgen_add_to_stack_pointer(-16);t.stakedelegation_to_json(l,this.__wbg_ptr);var s=a()[l/4+0],n=a()[l/4+1],r=a()[l/4+2],i=a()[l/4+3],o=s,f=n;if(i)throw o=0,f=0,p(r);return _=o,e=f,m(o,f)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}to_js_value(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.stakedelegation_to_js_value(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=a()[n/4+2];if(s)throw p(e);return p(_)}finally{t.__wbindgen_add_to_stack_pointer(16)}}static from_json(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=u;t.stakedelegation_from_json(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw p(s);return fe.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}stake_credential(){const _=t.baseaddress_payment_cred(this.__wbg_ptr);return Qt.__wrap(_)}pool_keyhash(){const _=t.stakedelegation_pool_keyhash(this.__wbg_ptr);return W.__wrap(_)}static new(_,e){g(_,Qt),g(e,W);const s=t.stakedelegation_new(_.__wbg_ptr,e.__wbg_ptr);return fe.__wrap(s)}}c.exports.StakeDelegation=fe;class he{static __wrap(_){_=_>>>0;const e=Object.create(he.prototype);return e.__wbg_ptr=_,e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,_}free(){const _=this.__destroy_into_raw();t.__wbg_stakederegistration_free(_)}to_bytes(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.stakederegistration_to_bytes(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=D(_,e).slice();return t.__wbindgen_free(_,e*1),s}finally{t.__wbindgen_add_to_stack_pointer(16)}}static from_bytes(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=Q(_,t.__wbindgen_malloc),o=u;t.stakederegistration_from_bytes(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw p(s);return he.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_hex(){let _,e;try{const r=t.__wbindgen_add_to_stack_pointer(-16);t.stakederegistration_to_hex(r,this.__wbg_ptr);var s=a()[r/4+0],n=a()[r/4+1];return _=s,e=n,m(s,n)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}static from_hex(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=u;t.stakederegistration_from_hex(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw p(s);return he.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_json(){let _,e;try{const l=t.__wbindgen_add_to_stack_pointer(-16);t.stakederegistration_to_json(l,this.__wbg_ptr);var s=a()[l/4+0],n=a()[l/4+1],r=a()[l/4+2],i=a()[l/4+3],o=s,f=n;if(i)throw o=0,f=0,p(r);return _=o,e=f,m(o,f)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}to_js_value(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.stakederegistration_to_js_value(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=a()[n/4+2];if(s)throw p(e);return p(_)}finally{t.__wbindgen_add_to_stack_pointer(16)}}static from_json(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=u;t.stakederegistration_from_json(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw p(s);return he.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}stake_credential(){const _=t.baseaddress_payment_cred(this.__wbg_ptr);return Qt.__wrap(_)}static new(_){g(_,Qt);const e=t.stakederegistration_new(_.__wbg_ptr);return he.__wrap(e)}}c.exports.StakeDeregistration=he;class ye{static __wrap(_){_=_>>>0;const e=Object.create(ye.prototype);return e.__wbg_ptr=_,e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,_}free(){const _=this.__destroy_into_raw();t.__wbg_stakeregistration_free(_)}to_bytes(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.stakeregistration_to_bytes(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=D(_,e).slice();return t.__wbindgen_free(_,e*1),s}finally{t.__wbindgen_add_to_stack_pointer(16)}}static from_bytes(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=Q(_,t.__wbindgen_malloc),o=u;t.stakeregistration_from_bytes(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw p(s);return ye.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_hex(){let _,e;try{const r=t.__wbindgen_add_to_stack_pointer(-16);t.stakeregistration_to_hex(r,this.__wbg_ptr);var s=a()[r/4+0],n=a()[r/4+1];return _=s,e=n,m(s,n)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}static from_hex(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=u;t.stakeregistration_from_hex(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw p(s);return ye.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_json(){let _,e;try{const l=t.__wbindgen_add_to_stack_pointer(-16);t.stakederegistration_to_json(l,this.__wbg_ptr);var s=a()[l/4+0],n=a()[l/4+1],r=a()[l/4+2],i=a()[l/4+3],o=s,f=n;if(i)throw o=0,f=0,p(r);return _=o,e=f,m(o,f)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}to_js_value(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.stakeregistration_to_js_value(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=a()[n/4+2];if(s)throw p(e);return p(_)}finally{t.__wbindgen_add_to_stack_pointer(16)}}static from_json(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=u;t.stakeregistration_from_json(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw p(s);return ye.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}stake_credential(){const _=t.baseaddress_payment_cred(this.__wbg_ptr);return Qt.__wrap(_)}static new(_){g(_,Qt);const e=t.stakederegistration_new(_.__wbg_ptr);return ye.__wrap(e)}}c.exports.StakeRegistration=ye;class Er{static __wrap(_){_=_>>>0;const e=Object.create(Er.prototype);return e.__wbg_ptr=_,e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,_}free(){const _=this.__destroy_into_raw();t.__wbg_strings_free(_)}static new(){const _=t.assetnames_new();return Er.__wrap(_)}len(){return t.assetnames_len(this.__wbg_ptr)>>>0}get(_){let e,s;try{const i=t.__wbindgen_add_to_stack_pointer(-16);t.strings_get(i,this.__wbg_ptr,_);var n=a()[i/4+0],r=a()[i/4+1];return e=n,s=r,m(n,r)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(e,s,1)}}add(_){const e=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),s=u;t.strings_add(this.__wbg_ptr,e,s)}}c.exports.Strings=Er;class P_{static __wrap(_){_=_>>>0;const e=Object.create(P_.prototype);return e.__wbg_ptr=_,e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,_}free(){const _=this.__destroy_into_raw();t.__wbg_timelockexpiry_free(_)}to_bytes(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.timelockexpiry_to_bytes(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=D(_,e).slice();return t.__wbindgen_free(_,e*1),s}finally{t.__wbindgen_add_to_stack_pointer(16)}}static from_bytes(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=Q(_,t.__wbindgen_malloc),o=u;t.timelockexpiry_from_bytes(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw p(s);return P_.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_hex(){let _,e;try{const r=t.__wbindgen_add_to_stack_pointer(-16);t.timelockexpiry_to_hex(r,this.__wbg_ptr);var s=a()[r/4+0],n=a()[r/4+1];return _=s,e=n,m(s,n)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}static from_hex(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=u;t.timelockexpiry_from_hex(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw p(s);return P_.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_json(){let _,e;try{const l=t.__wbindgen_add_to_stack_pointer(-16);t.timelockexpiry_to_json(l,this.__wbg_ptr);var s=a()[l/4+0],n=a()[l/4+1],r=a()[l/4+2],i=a()[l/4+3],o=s,f=n;if(i)throw o=0,f=0,p(r);return _=o,e=f,m(o,f)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}to_js_value(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.timelockexpiry_to_js_value(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=a()[n/4+2];if(s)throw p(e);return p(_)}finally{t.__wbindgen_add_to_stack_pointer(16)}}static from_json(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=u;t.timelockexpiry_from_json(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw p(s);return P_.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}slot(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.timelockexpiry_slot(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=a()[n/4+2];if(s)throw p(e);return _>>>0}finally{t.__wbindgen_add_to_stack_pointer(16)}}slot_bignum(){const _=t.linearfee_constant(this.__wbg_ptr);return I.__wrap(_)}static new(_){const e=t.timelockexpiry_new(_);return P_.__wrap(e)}static new_timelockexpiry(_){g(_,I);const e=t.exunits_mem(_.__wbg_ptr);return P_.__wrap(e)}}c.exports.TimelockExpiry=P_;class F_{static __wrap(_){_=_>>>0;const e=Object.create(F_.prototype);return e.__wbg_ptr=_,e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,_}free(){const _=this.__destroy_into_raw();t.__wbg_timelockstart_free(_)}to_bytes(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.timelockstart_to_bytes(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=D(_,e).slice();return t.__wbindgen_free(_,e*1),s}finally{t.__wbindgen_add_to_stack_pointer(16)}}static from_bytes(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=Q(_,t.__wbindgen_malloc),o=u;t.timelockstart_from_bytes(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw p(s);return F_.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_hex(){let _,e;try{const r=t.__wbindgen_add_to_stack_pointer(-16);t.timelockstart_to_hex(r,this.__wbg_ptr);var s=a()[r/4+0],n=a()[r/4+1];return _=s,e=n,m(s,n)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}static from_hex(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=u;t.timelockstart_from_hex(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw p(s);return F_.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_json(){let _,e;try{const l=t.__wbindgen_add_to_stack_pointer(-16);t.timelockexpiry_to_json(l,this.__wbg_ptr);var s=a()[l/4+0],n=a()[l/4+1],r=a()[l/4+2],i=a()[l/4+3],o=s,f=n;if(i)throw o=0,f=0,p(r);return _=o,e=f,m(o,f)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}to_js_value(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.timelockstart_to_js_value(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=a()[n/4+2];if(s)throw p(e);return p(_)}finally{t.__wbindgen_add_to_stack_pointer(16)}}static from_json(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=u;t.timelockstart_from_json(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw p(s);return F_.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}slot(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.timelockexpiry_slot(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=a()[n/4+2];if(s)throw p(e);return _>>>0}finally{t.__wbindgen_add_to_stack_pointer(16)}}slot_bignum(){const _=t.linearfee_constant(this.__wbg_ptr);return I.__wrap(_)}static new(_){const e=t.timelockexpiry_new(_);return F_.__wrap(e)}static new_timelockstart(_){g(_,I);const e=t.exunits_mem(_.__wbg_ptr);return F_.__wrap(e)}}c.exports.TimelockStart=F_;class b_{static __wrap(_){_=_>>>0;const e=Object.create(b_.prototype);return e.__wbg_ptr=_,e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,_}free(){const _=this.__destroy_into_raw();t.__wbg_transaction_free(_)}to_bytes(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.transaction_to_bytes(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=D(_,e).slice();return t.__wbindgen_free(_,e*1),s}finally{t.__wbindgen_add_to_stack_pointer(16)}}static from_bytes(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=Q(_,t.__wbindgen_malloc),o=u;t.transaction_from_bytes(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw p(s);return b_.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_hex(){let _,e;try{const r=t.__wbindgen_add_to_stack_pointer(-16);t.transaction_to_hex(r,this.__wbg_ptr);var s=a()[r/4+0],n=a()[r/4+1];return _=s,e=n,m(s,n)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}static from_hex(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=u;t.transaction_from_hex(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw p(s);return b_.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_json(){let _,e;try{const l=t.__wbindgen_add_to_stack_pointer(-16);t.transaction_to_json(l,this.__wbg_ptr);var s=a()[l/4+0],n=a()[l/4+1],r=a()[l/4+2],i=a()[l/4+3],o=s,f=n;if(i)throw o=0,f=0,p(r);return _=o,e=f,m(o,f)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}to_js_value(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.transaction_to_js_value(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=a()[n/4+2];if(s)throw p(e);return p(_)}finally{t.__wbindgen_add_to_stack_pointer(16)}}static from_json(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=u;t.transaction_from_json(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw p(s);return b_.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}body(){const _=t.fixedtransaction_body(this.__wbg_ptr);return Wt.__wrap(_)}witness_set(){const _=t.transaction_witness_set(this.__wbg_ptr);return f_.__wrap(_)}is_valid(){return t.transaction_is_valid(this.__wbg_ptr)!==0}auxiliary_data(){const _=t.transaction_auxiliary_data(this.__wbg_ptr);return _===0?void 0:Pt.__wrap(_)}set_is_valid(_){t.transaction_set_is_valid(this.__wbg_ptr,_)}static new(_,e,s){g(_,Wt),g(e,f_);let n=0;nt(s)||(g(s,Pt),n=s.__destroy_into_raw());const r=t.transaction_new(_.__wbg_ptr,e.__wbg_ptr,n);return b_.__wrap(r)}}c.exports.Transaction=b_;class Sr{static __wrap(_){_=_>>>0;const e=Object.create(Sr.prototype);return e.__wbg_ptr=_,e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,_}free(){const _=this.__destroy_into_raw();t.__wbg_transactionbatch_free(_)}len(){return t.assetnames_len(this.__wbg_ptr)>>>0}get(_){const e=t.transactionbatch_get(this.__wbg_ptr,_);return b_.__wrap(e)}}c.exports.TransactionBatch=Sr;class Qr{static __wrap(_){_=_>>>0;const e=Object.create(Qr.prototype);return e.__wbg_ptr=_,e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,_}free(){const _=this.__destroy_into_raw();t.__wbg_transactionbatchlist_free(_)}len(){return t.assetnames_len(this.__wbg_ptr)>>>0}get(_){const e=t.transactionbatchlist_get(this.__wbg_ptr,_);return Sr.__wrap(e)}}c.exports.TransactionBatchList=Qr;class ve{static __wrap(_){_=_>>>0;const e=Object.create(ve.prototype);return e.__wbg_ptr=_,e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,_}free(){const _=this.__destroy_into_raw();t.__wbg_transactionbodies_free(_)}to_bytes(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.transactionbodies_to_bytes(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=D(_,e).slice();return t.__wbindgen_free(_,e*1),s}finally{t.__wbindgen_add_to_stack_pointer(16)}}static from_bytes(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=Q(_,t.__wbindgen_malloc),o=u;t.transactionbodies_from_bytes(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw p(s);return ve.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_hex(){let _,e;try{const r=t.__wbindgen_add_to_stack_pointer(-16);t.transactionbodies_to_hex(r,this.__wbg_ptr);var s=a()[r/4+0],n=a()[r/4+1];return _=s,e=n,m(s,n)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}static from_hex(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=u;t.transactionbodies_from_hex(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw p(s);return ve.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_json(){let _,e;try{const l=t.__wbindgen_add_to_stack_pointer(-16);t.transactionbodies_to_json(l,this.__wbg_ptr);var s=a()[l/4+0],n=a()[l/4+1],r=a()[l/4+2],i=a()[l/4+3],o=s,f=n;if(i)throw o=0,f=0,p(r);return _=o,e=f,m(o,f)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}to_js_value(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.transactionbodies_to_js_value(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=a()[n/4+2];if(s)throw p(e);return p(_)}finally{t.__wbindgen_add_to_stack_pointer(16)}}static from_json(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=u;t.transactionbodies_from_json(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw p(s);return ve.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}static new(){const _=t.certificates_new();return ve.__wrap(_)}len(){return t.assetnames_len(this.__wbg_ptr)>>>0}get(_){const e=t.transactionbodies_get(this.__wbg_ptr,_);return Wt.__wrap(e)}add(_){g(_,Wt),t.transactionbodies_add(this.__wbg_ptr,_.__wbg_ptr)}}c.exports.TransactionBodies=ve;class Wt{static __wrap(_){_=_>>>0;const e=Object.create(Wt.prototype);return e.__wbg_ptr=_,e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,_}free(){const _=this.__destroy_into_raw();t.__wbg_transactionbody_free(_)}to_bytes(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.transactionbody_to_bytes(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=D(_,e).slice();return t.__wbindgen_free(_,e*1),s}finally{t.__wbindgen_add_to_stack_pointer(16)}}static from_bytes(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=Q(_,t.__wbindgen_malloc),o=u;t.transactionbody_from_bytes(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw p(s);return Wt.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_hex(){let _,e;try{const r=t.__wbindgen_add_to_stack_pointer(-16);t.transactionbody_to_hex(r,this.__wbg_ptr);var s=a()[r/4+0],n=a()[r/4+1];return _=s,e=n,m(s,n)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}static from_hex(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=u;t.transactionbody_from_hex(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw p(s);return Wt.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_json(){let _,e;try{const l=t.__wbindgen_add_to_stack_pointer(-16);t.transactionbody_to_json(l,this.__wbg_ptr);var s=a()[l/4+0],n=a()[l/4+1],r=a()[l/4+2],i=a()[l/4+3],o=s,f=n;if(i)throw o=0,f=0,p(r);return _=o,e=f,m(o,f)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}to_js_value(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.transactionbody_to_js_value(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=a()[n/4+2];if(s)throw p(e);return p(_)}finally{t.__wbindgen_add_to_stack_pointer(16)}}static from_json(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=u;t.transactionbody_from_json(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw p(s);return Wt.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}inputs(){const _=t.transactionbody_inputs(this.__wbg_ptr);return zt.__wrap(_)}outputs(){const _=t.transactionbody_outputs(this.__wbg_ptr);return M_.__wrap(_)}fee(){const _=t.transactionbody_fee(this.__wbg_ptr);return I.__wrap(_)}ttl(){try{const r=t.__wbindgen_add_to_stack_pointer(-16);t.transactionbody_ttl(r,this.__wbg_ptr);var _=a()[r/4+0],e=a()[r/4+1],s=a()[r/4+2],n=a()[r/4+3];if(n)throw p(s);return _===0?void 0:e>>>0}finally{t.__wbindgen_add_to_stack_pointer(16)}}ttl_bignum(){const _=t.transactionbody_ttl_bignum(this.__wbg_ptr);return _===0?void 0:I.__wrap(_)}set_ttl(_){g(_,I),t.protocolparamupdate_set_minfee_a(this.__wbg_ptr,_.__wbg_ptr)}remove_ttl(){t.transactionbody_remove_ttl(this.__wbg_ptr)}set_certs(_){g(_,N),t.transactionbody_set_certs(this.__wbg_ptr,_.__wbg_ptr)}certs(){const _=t.transactionbody_certs(this.__wbg_ptr);return _===0?void 0:N.__wrap(_)}set_withdrawals(_){g(_,q_),t.transactionbody_set_withdrawals(this.__wbg_ptr,_.__wbg_ptr)}withdrawals(){const _=t.transactionbody_withdrawals(this.__wbg_ptr);return _===0?void 0:q_.__wrap(_)}set_update(_){g(_,Ae),t.transactionbody_set_update(this.__wbg_ptr,_.__wbg_ptr)}update(){const _=t.transactionbody_update(this.__wbg_ptr);return _===0?void 0:Ae.__wrap(_)}set_auxiliary_data_hash(_){g(_,qt),t.transactionbody_set_auxiliary_data_hash(this.__wbg_ptr,_.__wbg_ptr)}auxiliary_data_hash(){const _=t.transactionbody_auxiliary_data_hash(this.__wbg_ptr);return _===0?void 0:qt.__wrap(_)}set_validity_start_interval(_){t.transactionbody_set_validity_start_interval(this.__wbg_ptr,_)}set_validity_start_interval_bignum(_){g(_,I);var e=_.__destroy_into_raw();t.transactionbody_set_validity_start_interval_bignum(this.__wbg_ptr,e)}validity_start_interval_bignum(){const _=t.protocolparamupdate_minfee_b(this.__wbg_ptr);return _===0?void 0:I.__wrap(_)}validity_start_interval(){try{const r=t.__wbindgen_add_to_stack_pointer(-16);t.transactionbody_validity_start_interval(r,this.__wbg_ptr);var _=a()[r/4+0],e=a()[r/4+1],s=a()[r/4+2],n=a()[r/4+3];if(n)throw p(s);return _===0?void 0:e>>>0}finally{t.__wbindgen_add_to_stack_pointer(16)}}set_mint(_){g(_,r_),t.transactionbody_set_mint(this.__wbg_ptr,_.__wbg_ptr)}mint(){const _=t.transactionbody_mint(this.__wbg_ptr);return _===0?void 0:r_.__wrap(_)}multiassets(){const _=t.transactionbody_multiassets(this.__wbg_ptr);return _===0?void 0:r_.__wrap(_)}set_reference_inputs(_){g(_,zt),t.transactionbody_set_reference_inputs(this.__wbg_ptr,_.__wbg_ptr)}reference_inputs(){const _=t.transactionbody_reference_inputs(this.__wbg_ptr);return _===0?void 0:zt.__wrap(_)}set_script_data_hash(_){g(_,U_),t.transactionbody_set_script_data_hash(this.__wbg_ptr,_.__wbg_ptr)}script_data_hash(){const _=t.transactionbody_script_data_hash(this.__wbg_ptr);return _===0?void 0:U_.__wrap(_)}set_collateral(_){g(_,zt),t.transactionbody_set_collateral(this.__wbg_ptr,_.__wbg_ptr)}collateral(){const _=t.transactionbody_collateral(this.__wbg_ptr);return _===0?void 0:zt.__wrap(_)}set_required_signers(_){g(_,Z),t.transactionbody_set_required_signers(this.__wbg_ptr,_.__wbg_ptr)}required_signers(){const _=t.transactionbody_required_signers(this.__wbg_ptr);return _===0?void 0:Z.__wrap(_)}set_network_id(_){g(_,D_),t.transactionbody_set_network_id(this.__wbg_ptr,_.__wbg_ptr)}network_id(){const _=t.transactionbody_network_id(this.__wbg_ptr);return _===0?void 0:D_.__wrap(_)}set_collateral_return(_){g(_,Yt),t.transactionbody_set_collateral_return(this.__wbg_ptr,_.__wbg_ptr)}collateral_return(){const _=t.transactionbody_collateral_return(this.__wbg_ptr);return _===0?void 0:Yt.__wrap(_)}set_total_collateral(_){g(_,I),t.protocolparamupdate_set_key_deposit(this.__wbg_ptr,_.__wbg_ptr)}total_collateral(){const _=t.protocolparamupdate_key_deposit(this.__wbg_ptr);return _===0?void 0:I.__wrap(_)}static new(_,e,s,n){g(_,zt),g(e,M_),g(s,I);const r=t.transactionbody_new(_.__wbg_ptr,e.__wbg_ptr,s.__wbg_ptr,!nt(n),nt(n)?0:n);return Wt.__wrap(r)}static new_tx_body(_,e,s){g(_,zt),g(e,M_),g(s,I);const n=t.transactionbody_new_tx_body(_.__wbg_ptr,e.__wbg_ptr,s.__wbg_ptr);return Wt.__wrap(n)}}c.exports.TransactionBody=Wt;class Or{static __wrap(_){_=_>>>0;const e=Object.create(Or.prototype);return e.__wbg_ptr=_,e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,_}free(){const _=this.__destroy_into_raw();t.__wbg_transactionbuilder_free(_)}add_inputs_from(_,e){try{const r=t.__wbindgen_add_to_stack_pointer(-16);g(_,We),t.transactionbuilder_add_inputs_from(r,this.__wbg_ptr,_.__wbg_ptr,e);var s=a()[r/4+0],n=a()[r/4+1];if(n)throw p(s)}finally{t.__wbindgen_add_to_stack_pointer(16)}}set_inputs(_){g(_,or),t.transactionbuilder_set_inputs(this.__wbg_ptr,_.__wbg_ptr)}set_collateral(_){g(_,or),t.transactionbuilder_set_collateral(this.__wbg_ptr,_.__wbg_ptr)}set_collateral_return(_){g(_,Yt),t.transactionbuilder_set_collateral_return(this.__wbg_ptr,_.__wbg_ptr)}set_collateral_return_and_total(_){try{const n=t.__wbindgen_add_to_stack_pointer(-16);g(_,Yt),t.transactionbuilder_set_collateral_return_and_total(n,this.__wbg_ptr,_.__wbg_ptr);var e=a()[n/4+0],s=a()[n/4+1];if(s)throw p(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}set_total_collateral(_){g(_,I),t.transactionbuilder_set_total_collateral(this.__wbg_ptr,_.__wbg_ptr)}set_total_collateral_and_return(_,e){try{const r=t.__wbindgen_add_to_stack_pointer(-16);g(_,I),g(e,pt),t.transactionbuilder_set_total_collateral_and_return(r,this.__wbg_ptr,_.__wbg_ptr,e.__wbg_ptr);var s=a()[r/4+0],n=a()[r/4+1];if(n)throw p(s)}finally{t.__wbindgen_add_to_stack_pointer(16)}}add_reference_input(_){g(_,Ct),t.transactionbuilder_add_reference_input(this.__wbg_ptr,_.__wbg_ptr)}add_key_input(_,e,s){g(_,W),g(e,Ct),g(s,gt),t.transactionbuilder_add_key_input(this.__wbg_ptr,_.__wbg_ptr,e.__wbg_ptr,s.__wbg_ptr)}add_script_input(_,e,s){g(_,Ft),g(e,Ct),g(s,gt),t.transactionbuilder_add_script_input(this.__wbg_ptr,_.__wbg_ptr,e.__wbg_ptr,s.__wbg_ptr)}add_native_script_input(_,e,s){g(_,Nt),g(e,Ct),g(s,gt),t.transactionbuilder_add_native_script_input(this.__wbg_ptr,_.__wbg_ptr,e.__wbg_ptr,s.__wbg_ptr)}add_plutus_script_input(_,e,s){g(_,p_),g(e,Ct),g(s,gt),t.transactionbuilder_add_plutus_script_input(this.__wbg_ptr,_.__wbg_ptr,e.__wbg_ptr,s.__wbg_ptr)}add_bootstrap_input(_,e,s){g(_,A),g(e,Ct),g(s,gt),t.transactionbuilder_add_bootstrap_input(this.__wbg_ptr,_.__wbg_ptr,e.__wbg_ptr,s.__wbg_ptr)}add_input(_,e,s){g(_,pt),g(e,Ct),g(s,gt),t.transactionbuilder_add_input(this.__wbg_ptr,_.__wbg_ptr,e.__wbg_ptr,s.__wbg_ptr)}count_missing_input_scripts(){return t.transactionbuilder_count_missing_input_scripts(this.__wbg_ptr)>>>0}add_required_native_input_scripts(_){return g(_,Ht),t.transactionbuilder_add_required_native_input_scripts(this.__wbg_ptr,_.__wbg_ptr)>>>0}add_required_plutus_input_scripts(_){return g(_,re),t.transactionbuilder_add_required_plutus_input_scripts(this.__wbg_ptr,_.__wbg_ptr)>>>0}get_native_input_scripts(){const _=t.transactionbuilder_get_native_input_scripts(this.__wbg_ptr);return _===0?void 0:Ht.__wrap(_)}get_plutus_input_scripts(){const _=t.transactionbuilder_get_plutus_input_scripts(this.__wbg_ptr);return _===0?void 0:re.__wrap(_)}fee_for_input(_,e,s){try{const o=t.__wbindgen_add_to_stack_pointer(-16);g(_,pt),g(e,Ct),g(s,gt),t.transactionbuilder_fee_for_input(o,this.__wbg_ptr,_.__wbg_ptr,e.__wbg_ptr,s.__wbg_ptr);var n=a()[o/4+0],r=a()[o/4+1],i=a()[o/4+2];if(i)throw p(r);return I.__wrap(n)}finally{t.__wbindgen_add_to_stack_pointer(16)}}add_output(_){try{const n=t.__wbindgen_add_to_stack_pointer(-16);g(_,Yt),t.transactionbuilder_add_output(n,this.__wbg_ptr,_.__wbg_ptr);var e=a()[n/4+0],s=a()[n/4+1];if(s)throw p(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}fee_for_output(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16);g(_,Yt),t.transactionbuilder_fee_for_output(r,this.__wbg_ptr,_.__wbg_ptr);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw p(s);return I.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}set_fee(_){g(_,I),t.transactionbuilder_set_fee(this.__wbg_ptr,_.__wbg_ptr)}set_ttl(_){t.transactionbuilder_set_ttl(this.__wbg_ptr,_)}set_ttl_bignum(_){g(_,I),t.transactionbuilder_set_ttl_bignum(this.__wbg_ptr,_.__wbg_ptr)}set_validity_start_interval(_){t.transactionbuilder_set_validity_start_interval(this.__wbg_ptr,_)}set_validity_start_interval_bignum(_){g(_,I);var e=_.__destroy_into_raw();t.transactionbuilder_set_validity_start_interval_bignum(this.__wbg_ptr,e)}set_certs(_){g(_,N),t.transactionbuilder_set_certs(this.__wbg_ptr,_.__wbg_ptr)}set_withdrawals(_){g(_,q_),t.transactionbuilder_set_withdrawals(this.__wbg_ptr,_.__wbg_ptr)}get_auxiliary_data(){const _=t.transactionbuilder_get_auxiliary_data(this.__wbg_ptr);return _===0?void 0:Pt.__wrap(_)}set_auxiliary_data(_){g(_,Pt),t.transactionbuilder_set_auxiliary_data(this.__wbg_ptr,_.__wbg_ptr)}set_metadata(_){g(_,Ot),t.transactionbuilder_set_metadata(this.__wbg_ptr,_.__wbg_ptr)}add_metadatum(_,e){g(_,I),g(e,mt),t.transactionbuilder_add_metadatum(this.__wbg_ptr,_.__wbg_ptr,e.__wbg_ptr)}add_json_metadatum(_,e){try{const r=t.__wbindgen_add_to_stack_pointer(-16);g(_,I);const i=v(e,t.__wbindgen_malloc,t.__wbindgen_realloc),o=u;t.transactionbuilder_add_json_metadatum(r,this.__wbg_ptr,_.__wbg_ptr,i,o);var s=a()[r/4+0],n=a()[r/4+1];if(n)throw p(s)}finally{t.__wbindgen_add_to_stack_pointer(16)}}add_json_metadatum_with_schema(_,e,s){try{const i=t.__wbindgen_add_to_stack_pointer(-16);g(_,I);const o=v(e,t.__wbindgen_malloc,t.__wbindgen_realloc),f=u;t.transactionbuilder_add_json_metadatum_with_schema(i,this.__wbg_ptr,_.__wbg_ptr,o,f,s);var n=a()[i/4+0],r=a()[i/4+1];if(r)throw p(n)}finally{t.__wbindgen_add_to_stack_pointer(16)}}set_mint_builder(_){g(_,nr),t.transactionbuilder_set_mint_builder(this.__wbg_ptr,_.__wbg_ptr)}get_mint_builder(){const _=t.transactionbuilder_get_mint_builder(this.__wbg_ptr);return _===0?void 0:nr.__wrap(_)}set_mint(_,e){try{const r=t.__wbindgen_add_to_stack_pointer(-16);g(_,r_),g(e,Ht),t.transactionbuilder_set_mint(r,this.__wbg_ptr,_.__wbg_ptr,e.__wbg_ptr);var s=a()[r/4+0],n=a()[r/4+1];if(n)throw p(s)}finally{t.__wbindgen_add_to_stack_pointer(16)}}get_mint(){const _=t.transactionbuilder_get_mint(this.__wbg_ptr);return _===0?void 0:r_.__wrap(_)}get_mint_scripts(){const _=t.transactionbuilder_get_mint_scripts(this.__wbg_ptr);return _===0?void 0:Ht.__wrap(_)}set_mint_asset(_,e){g(_,Nt),g(e,Q_),t.transactionbuilder_set_mint_asset(this.__wbg_ptr,_.__wbg_ptr,e.__wbg_ptr)}add_mint_asset(_,e,s){g(_,Nt),g(e,It),g(s,St);var n=s.__destroy_into_raw();t.transactionbuilder_add_mint_asset(this.__wbg_ptr,_.__wbg_ptr,e.__wbg_ptr,n)}add_mint_asset_and_output(_,e,s,n,r){try{const l=t.__wbindgen_add_to_stack_pointer(-16);g(_,Nt),g(e,It),g(s,St);var i=s.__destroy_into_raw();g(n,B_),g(r,I),t.transactionbuilder_add_mint_asset_and_output(l,this.__wbg_ptr,_.__wbg_ptr,e.__wbg_ptr,i,n.__wbg_ptr,r.__wbg_ptr);var o=a()[l/4+0],f=a()[l/4+1];if(f)throw p(o)}finally{t.__wbindgen_add_to_stack_pointer(16)}}add_mint_asset_and_output_min_required_coin(_,e,s,n){try{const f=t.__wbindgen_add_to_stack_pointer(-16);g(_,Nt),g(e,It),g(s,St);var r=s.__destroy_into_raw();g(n,B_),t.transactionbuilder_add_mint_asset_and_output_min_required_coin(f,this.__wbg_ptr,_.__wbg_ptr,e.__wbg_ptr,r,n.__wbg_ptr);var i=a()[f/4+0],o=a()[f/4+1];if(o)throw p(i)}finally{t.__wbindgen_add_to_stack_pointer(16)}}static new(_){g(_,sr);const e=t.transactionbuilder_new(_.__wbg_ptr);return Or.__wrap(e)}get_reference_inputs(){const _=t.transactionbuilder_get_reference_inputs(this.__wbg_ptr);return zt.__wrap(_)}get_explicit_input(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.transactionbuilder_get_explicit_input(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=a()[n/4+2];if(s)throw p(e);return gt.__wrap(_)}finally{t.__wbindgen_add_to_stack_pointer(16)}}get_implicit_input(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.transactionbuilder_get_implicit_input(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=a()[n/4+2];if(s)throw p(e);return gt.__wrap(_)}finally{t.__wbindgen_add_to_stack_pointer(16)}}get_total_input(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.transactionbuilder_get_total_input(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=a()[n/4+2];if(s)throw p(e);return gt.__wrap(_)}finally{t.__wbindgen_add_to_stack_pointer(16)}}get_total_output(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.transactionbuilder_get_total_output(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=a()[n/4+2];if(s)throw p(e);return gt.__wrap(_)}finally{t.__wbindgen_add_to_stack_pointer(16)}}get_explicit_output(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.transactionbuilder_get_explicit_output(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=a()[n/4+2];if(s)throw p(e);return gt.__wrap(_)}finally{t.__wbindgen_add_to_stack_pointer(16)}}get_deposit(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.transactionbuilder_get_deposit(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=a()[n/4+2];if(s)throw p(e);return I.__wrap(_)}finally{t.__wbindgen_add_to_stack_pointer(16)}}get_fee_if_set(){const _=t.transactionbuilder_get_fee_if_set(this.__wbg_ptr);return _===0?void 0:I.__wrap(_)}add_change_if_needed(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16);g(_,pt),t.transactionbuilder_add_change_if_needed(r,this.__wbg_ptr,_.__wbg_ptr);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw p(s);return e!==0}finally{t.__wbindgen_add_to_stack_pointer(16)}}add_change_if_needed_with_datum(_,e){try{const i=t.__wbindgen_add_to_stack_pointer(-16);g(_,pt),g(e,ar),t.transactionbuilder_add_change_if_needed_with_datum(i,this.__wbg_ptr,_.__wbg_ptr,e.__wbg_ptr);var s=a()[i/4+0],n=a()[i/4+1],r=a()[i/4+2];if(r)throw p(n);return s!==0}finally{t.__wbindgen_add_to_stack_pointer(16)}}calc_script_data_hash(_){try{const n=t.__wbindgen_add_to_stack_pointer(-16);g(_,F),t.transactionbuilder_calc_script_data_hash(n,this.__wbg_ptr,_.__wbg_ptr);var e=a()[n/4+0],s=a()[n/4+1];if(s)throw p(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}set_script_data_hash(_){g(_,U_),t.transactionbuilder_set_script_data_hash(this.__wbg_ptr,_.__wbg_ptr)}remove_script_data_hash(){t.transactionbuilder_remove_script_data_hash(this.__wbg_ptr)}add_required_signer(_){g(_,W),t.transactionbuilder_add_required_signer(this.__wbg_ptr,_.__wbg_ptr)}full_size(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.transactionbuilder_full_size(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=a()[n/4+2];if(s)throw p(e);return _>>>0}finally{t.__wbindgen_add_to_stack_pointer(16)}}output_sizes(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.transactionbuilder_output_sizes(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=bt(_,e).slice();return t.__wbindgen_free(_,e*4),s}finally{t.__wbindgen_add_to_stack_pointer(16)}}build(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.transactionbuilder_build(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=a()[n/4+2];if(s)throw p(e);return Wt.__wrap(_)}finally{t.__wbindgen_add_to_stack_pointer(16)}}build_tx(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.transactionbuilder_build_tx(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=a()[n/4+2];if(s)throw p(e);return b_.__wrap(_)}finally{t.__wbindgen_add_to_stack_pointer(16)}}build_tx_unsafe(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.transactionbuilder_build_tx_unsafe(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=a()[n/4+2];if(s)throw p(e);return b_.__wrap(_)}finally{t.__wbindgen_add_to_stack_pointer(16)}}min_fee(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.transactionbuilder_min_fee(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=a()[n/4+2];if(s)throw p(e);return I.__wrap(_)}finally{t.__wbindgen_add_to_stack_pointer(16)}}}c.exports.TransactionBuilder=Or;class sr{static __wrap(_){_=_>>>0;const e=Object.create(sr.prototype);return e.__wbg_ptr=_,e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,_}free(){const _=this.__destroy_into_raw();t.__wbg_transactionbuilderconfig_free(_)}}c.exports.TransactionBuilderConfig=sr;class i_{static __wrap(_){_=_>>>0;const e=Object.create(i_.prototype);return e.__wbg_ptr=_,e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,_}free(){const _=this.__destroy_into_raw();t.__wbg_transactionbuilderconfigbuilder_free(_)}static new(){const _=t.transactionbuilderconfigbuilder_new();return i_.__wrap(_)}fee_algo(_){g(_,rr);const e=t.transactionbuilderconfigbuilder_fee_algo(this.__wbg_ptr,_.__wbg_ptr);return i_.__wrap(e)}coins_per_utxo_word(_){g(_,I);const e=t.transactionbuilderconfigbuilder_coins_per_utxo_word(this.__wbg_ptr,_.__wbg_ptr);return i_.__wrap(e)}coins_per_utxo_byte(_){g(_,I);const e=t.transactionbuilderconfigbuilder_coins_per_utxo_byte(this.__wbg_ptr,_.__wbg_ptr);return i_.__wrap(e)}ex_unit_prices(_){g(_,vt);const e=t.transactionbuilderconfigbuilder_ex_unit_prices(this.__wbg_ptr,_.__wbg_ptr);return i_.__wrap(e)}pool_deposit(_){g(_,I);const e=t.transactionbuilderconfigbuilder_pool_deposit(this.__wbg_ptr,_.__wbg_ptr);return i_.__wrap(e)}key_deposit(_){g(_,I);const e=t.transactionbuilderconfigbuilder_key_deposit(this.__wbg_ptr,_.__wbg_ptr);return i_.__wrap(e)}max_value_size(_){const e=t.transactionbuilderconfigbuilder_max_value_size(this.__wbg_ptr,_);return i_.__wrap(e)}max_tx_size(_){const e=t.transactionbuilderconfigbuilder_max_tx_size(this.__wbg_ptr,_);return i_.__wrap(e)}prefer_pure_change(_){const e=t.transactionbuilderconfigbuilder_prefer_pure_change(this.__wbg_ptr,_);return i_.__wrap(e)}build(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.transactionbuilderconfigbuilder_build(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=a()[n/4+2];if(s)throw p(e);return sr.__wrap(_)}finally{t.__wbindgen_add_to_stack_pointer(16)}}}c.exports.TransactionBuilderConfigBuilder=i_;class u_{static __wrap(_){_=_>>>0;const e=Object.create(u_.prototype);return e.__wbg_ptr=_,e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,_}free(){const _=this.__destroy_into_raw();t.__wbg_transactionhash_free(_)}static from_bytes(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=Q(_,t.__wbindgen_malloc),o=u;t.transactionhash_from_bytes(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw p(s);return u_.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_bytes(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.auxiliarydatahash_to_bytes(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=D(_,e).slice();return t.__wbindgen_free(_,e*1),s}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_bech32(_){let e,s;try{const H=t.__wbindgen_add_to_stack_pointer(-16),rt=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),dt=u;t.auxiliarydatahash_to_bech32(H,this.__wbg_ptr,rt,dt);var n=a()[H/4+0],r=a()[H/4+1],i=a()[H/4+2],o=a()[H/4+3],f=n,l=r;if(o)throw f=0,l=0,p(i);return e=f,s=l,m(f,l)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(e,s,1)}}static from_bech32(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=u;t.transactionhash_from_bech32(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw p(s);return u_.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_hex(){let _,e;try{const r=t.__wbindgen_add_to_stack_pointer(-16);t.auxiliarydatahash_to_hex(r,this.__wbg_ptr);var s=a()[r/4+0],n=a()[r/4+1];return _=s,e=n,m(s,n)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}static from_hex(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=u;t.transactionhash_from_hex(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw p(s);return u_.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}}c.exports.TransactionHash=u_;class Ct{static __wrap(_){_=_>>>0;const e=Object.create(Ct.prototype);return e.__wbg_ptr=_,e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,_}free(){const _=this.__destroy_into_raw();t.__wbg_transactioninput_free(_)}to_bytes(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.transactioninput_to_bytes(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=D(_,e).slice();return t.__wbindgen_free(_,e*1),s}finally{t.__wbindgen_add_to_stack_pointer(16)}}static from_bytes(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=Q(_,t.__wbindgen_malloc),o=u;t.transactioninput_from_bytes(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw p(s);return Ct.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_hex(){let _,e;try{const r=t.__wbindgen_add_to_stack_pointer(-16);t.transactioninput_to_hex(r,this.__wbg_ptr);var s=a()[r/4+0],n=a()[r/4+1];return _=s,e=n,m(s,n)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}static from_hex(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=u;t.transactioninput_from_hex(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw p(s);return Ct.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_json(){let _,e;try{const l=t.__wbindgen_add_to_stack_pointer(-16);t.transactioninput_to_json(l,this.__wbg_ptr);var s=a()[l/4+0],n=a()[l/4+1],r=a()[l/4+2],i=a()[l/4+3],o=s,f=n;if(i)throw o=0,f=0,p(r);return _=o,e=f,m(o,f)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}to_js_value(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.transactioninput_to_js_value(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=a()[n/4+2];if(s)throw p(e);return p(_)}finally{t.__wbindgen_add_to_stack_pointer(16)}}static from_json(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=u;t.transactioninput_from_json(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw p(s);return Ct.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}transaction_id(){const _=t.transactioninput_transaction_id(this.__wbg_ptr);return u_.__wrap(_)}index(){return t.transactioninput_index(this.__wbg_ptr)>>>0}static new(_,e){g(_,u_);const s=t.transactioninput_new(_.__wbg_ptr,e);return Ct.__wrap(s)}}c.exports.TransactionInput=Ct;class zt{static __wrap(_){_=_>>>0;const e=Object.create(zt.prototype);return e.__wbg_ptr=_,e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,_}free(){const _=this.__destroy_into_raw();t.__wbg_transactioninputs_free(_)}to_bytes(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.transactioninputs_to_bytes(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=D(_,e).slice();return t.__wbindgen_free(_,e*1),s}finally{t.__wbindgen_add_to_stack_pointer(16)}}static from_bytes(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=Q(_,t.__wbindgen_malloc),o=u;t.transactioninputs_from_bytes(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw p(s);return zt.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_hex(){let _,e;try{const r=t.__wbindgen_add_to_stack_pointer(-16);t.transactioninputs_to_hex(r,this.__wbg_ptr);var s=a()[r/4+0],n=a()[r/4+1];return _=s,e=n,m(s,n)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}static from_hex(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=u;t.transactioninputs_from_hex(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw p(s);return zt.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_json(){let _,e;try{const l=t.__wbindgen_add_to_stack_pointer(-16);t.transactioninputs_to_json(l,this.__wbg_ptr);var s=a()[l/4+0],n=a()[l/4+1],r=a()[l/4+2],i=a()[l/4+3],o=s,f=n;if(i)throw o=0,f=0,p(r);return _=o,e=f,m(o,f)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}to_js_value(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.transactioninputs_to_js_value(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=a()[n/4+2];if(s)throw p(e);return p(_)}finally{t.__wbindgen_add_to_stack_pointer(16)}}static from_json(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=u;t.transactioninputs_from_json(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw p(s);return zt.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}static new(){const _=t.assetnames_new();return zt.__wrap(_)}len(){return t.assetnames_len(this.__wbg_ptr)>>>0}get(_){const e=t.transactioninputs_get(this.__wbg_ptr,_);return Ct.__wrap(e)}add(_){g(_,Ct),t.transactioninputs_add(this.__wbg_ptr,_.__wbg_ptr)}to_option(){const _=t.transactioninputs_to_option(this.__wbg_ptr);return _===0?void 0:zt.__wrap(_)}}c.exports.TransactionInputs=zt;class mt{static __wrap(_){_=_>>>0;const e=Object.create(mt.prototype);return e.__wbg_ptr=_,e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,_}free(){const _=this.__destroy_into_raw();t.__wbg_transactionmetadatum_free(_)}to_bytes(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.transactionmetadatum_to_bytes(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=D(_,e).slice();return t.__wbindgen_free(_,e*1),s}finally{t.__wbindgen_add_to_stack_pointer(16)}}static from_bytes(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=Q(_,t.__wbindgen_malloc),o=u;t.transactionmetadatum_from_bytes(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw p(s);return mt.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_hex(){let _,e;try{const r=t.__wbindgen_add_to_stack_pointer(-16);t.transactionmetadatum_to_hex(r,this.__wbg_ptr);var s=a()[r/4+0],n=a()[r/4+1];return _=s,e=n,m(s,n)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}static from_hex(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=u;t.transactionmetadatum_from_hex(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw p(s);return mt.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}static new_map(_){g(_,Te);const e=t.transactionmetadatum_new_map(_.__wbg_ptr);return mt.__wrap(e)}static new_list(_){g(_,X_);const e=t.transactionmetadatum_new_list(_.__wbg_ptr);return mt.__wrap(e)}static new_int(_){g(_,St);const e=t.transactionmetadatum_new_int(_.__wbg_ptr);return mt.__wrap(e)}static new_bytes(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=Q(_,t.__wbindgen_malloc),o=u;t.transactionmetadatum_new_bytes(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw p(s);return mt.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}static new_text(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=u;t.transactionmetadatum_new_text(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw p(s);return mt.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}kind(){return t.plutusdata_kind(this.__wbg_ptr)>>>0}as_map(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.transactionmetadatum_as_map(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=a()[n/4+2];if(s)throw p(e);return Te.__wrap(_)}finally{t.__wbindgen_add_to_stack_pointer(16)}}as_list(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.transactionmetadatum_as_list(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=a()[n/4+2];if(s)throw p(e);return X_.__wrap(_)}finally{t.__wbindgen_add_to_stack_pointer(16)}}as_int(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.transactionmetadatum_as_int(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=a()[n/4+2];if(s)throw p(e);return St.__wrap(_)}finally{t.__wbindgen_add_to_stack_pointer(16)}}as_bytes(){try{const i=t.__wbindgen_add_to_stack_pointer(-16);t.transactionmetadatum_as_bytes(i,this.__wbg_ptr);var _=a()[i/4+0],e=a()[i/4+1],s=a()[i/4+2],n=a()[i/4+3];if(n)throw p(s);var r=D(_,e).slice();return t.__wbindgen_free(_,e*1),r}finally{t.__wbindgen_add_to_stack_pointer(16)}}as_text(){let _,e;try{const l=t.__wbindgen_add_to_stack_pointer(-16);t.transactionmetadatum_as_text(l,this.__wbg_ptr);var s=a()[l/4+0],n=a()[l/4+1],r=a()[l/4+2],i=a()[l/4+3],o=s,f=n;if(i)throw o=0,f=0,p(r);return _=o,e=f,m(o,f)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}}c.exports.TransactionMetadatum=mt;class Je{static __wrap(_){_=_>>>0;const e=Object.create(Je.prototype);return e.__wbg_ptr=_,e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,_}free(){const _=this.__destroy_into_raw();t.__wbg_transactionmetadatumlabels_free(_)}to_bytes(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.transactionmetadatumlabels_to_bytes(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=D(_,e).slice();return t.__wbindgen_free(_,e*1),s}finally{t.__wbindgen_add_to_stack_pointer(16)}}static from_bytes(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=Q(_,t.__wbindgen_malloc),o=u;t.transactionmetadatumlabels_from_bytes(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw p(s);return Je.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_hex(){let _,e;try{const r=t.__wbindgen_add_to_stack_pointer(-16);t.transactionmetadatumlabels_to_hex(r,this.__wbg_ptr);var s=a()[r/4+0],n=a()[r/4+1];return _=s,e=n,m(s,n)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}static from_hex(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=u;t.transactionmetadatumlabels_from_hex(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw p(s);return Je.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}static new(){const _=t.certificates_new();return Je.__wrap(_)}len(){return t.assetnames_len(this.__wbg_ptr)>>>0}get(_){const e=t.transactionmetadatumlabels_get(this.__wbg_ptr,_);return I.__wrap(e)}add(_){g(_,I),t.transactionmetadatumlabels_add(this.__wbg_ptr,_.__wbg_ptr)}}c.exports.TransactionMetadatumLabels=Je;class Yt{static __wrap(_){_=_>>>0;const e=Object.create(Yt.prototype);return e.__wbg_ptr=_,e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,_}free(){const _=this.__destroy_into_raw();t.__wbg_transactionoutput_free(_)}to_bytes(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.transactionoutput_to_bytes(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=D(_,e).slice();return t.__wbindgen_free(_,e*1),s}finally{t.__wbindgen_add_to_stack_pointer(16)}}static from_bytes(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=Q(_,t.__wbindgen_malloc),o=u;t.transactionoutput_from_bytes(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw p(s);return Yt.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_hex(){let _,e;try{const r=t.__wbindgen_add_to_stack_pointer(-16);t.transactionoutput_to_hex(r,this.__wbg_ptr);var s=a()[r/4+0],n=a()[r/4+1];return _=s,e=n,m(s,n)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}static from_hex(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=u;t.transactionoutput_from_hex(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw p(s);return Yt.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_json(){let _,e;try{const l=t.__wbindgen_add_to_stack_pointer(-16);t.transactionoutput_to_json(l,this.__wbg_ptr);var s=a()[l/4+0],n=a()[l/4+1],r=a()[l/4+2],i=a()[l/4+3],o=s,f=n;if(i)throw o=0,f=0,p(r);return _=o,e=f,m(o,f)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}to_js_value(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.transactionoutput_to_js_value(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=a()[n/4+2];if(s)throw p(e);return p(_)}finally{t.__wbindgen_add_to_stack_pointer(16)}}static from_json(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=u;t.transactionoutput_from_json(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw p(s);return Yt.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}address(){const _=t.transactionoutput_address(this.__wbg_ptr);return pt.__wrap(_)}amount(){const _=t.transactionoutput_amount(this.__wbg_ptr);return gt.__wrap(_)}data_hash(){const _=t.transactionoutput_data_hash(this.__wbg_ptr);return _===0?void 0:U.__wrap(_)}plutus_data(){const _=t.transactionoutput_plutus_data(this.__wbg_ptr);return _===0?void 0:ht.__wrap(_)}script_ref(){const _=t.transactionoutput_script_ref(this.__wbg_ptr);return _===0?void 0:j_.__wrap(_)}set_script_ref(_){g(_,j_),t.transactionoutput_set_script_ref(this.__wbg_ptr,_.__wbg_ptr)}set_plutus_data(_){g(_,ht),t.transactionoutput_set_plutus_data(this.__wbg_ptr,_.__wbg_ptr)}set_data_hash(_){g(_,U),t.transactionoutput_set_data_hash(this.__wbg_ptr,_.__wbg_ptr)}has_plutus_data(){return t.transactionoutput_has_plutus_data(this.__wbg_ptr)!==0}has_data_hash(){return t.transactionoutput_has_data_hash(this.__wbg_ptr)!==0}has_script_ref(){return t.transactionoutput_has_script_ref(this.__wbg_ptr)!==0}static new(_,e){g(_,pt),g(e,gt);const s=t.transactionoutput_new(_.__wbg_ptr,e.__wbg_ptr);return Yt.__wrap(s)}serialization_format(){const _=t.transactionoutput_serialization_format(this.__wbg_ptr);return _===2?void 0:_}}c.exports.TransactionOutput=Yt;class B_{static __wrap(_){_=_>>>0;const e=Object.create(B_.prototype);return e.__wbg_ptr=_,e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,_}free(){const _=this.__destroy_into_raw();t.__wbg_transactionoutputamountbuilder_free(_)}with_value(_){g(_,gt);const e=t.transactionoutputamountbuilder_with_value(this.__wbg_ptr,_.__wbg_ptr);return B_.__wrap(e)}with_coin(_){g(_,I);const e=t.transactionoutputamountbuilder_with_coin(this.__wbg_ptr,_.__wbg_ptr);return B_.__wrap(e)}with_coin_and_asset(_,e){g(_,I),g(e,$t);const s=t.transactionoutputamountbuilder_with_coin_and_asset(this.__wbg_ptr,_.__wbg_ptr,e.__wbg_ptr);return B_.__wrap(s)}with_asset_and_min_required_coin(_,e){try{const i=t.__wbindgen_add_to_stack_pointer(-16);g(_,$t),g(e,I),t.transactionoutputamountbuilder_with_asset_and_min_required_coin(i,this.__wbg_ptr,_.__wbg_ptr,e.__wbg_ptr);var s=a()[i/4+0],n=a()[i/4+1],r=a()[i/4+2];if(r)throw p(n);return B_.__wrap(s)}finally{t.__wbindgen_add_to_stack_pointer(16)}}with_asset_and_min_required_coin_by_utxo_cost(_,e){try{const i=t.__wbindgen_add_to_stack_pointer(-16);g(_,$t),g(e,M),t.transactionoutputamountbuilder_with_asset_and_min_required_coin_by_utxo_cost(i,this.__wbg_ptr,_.__wbg_ptr,e.__wbg_ptr);var s=a()[i/4+0],n=a()[i/4+1],r=a()[i/4+2];if(r)throw p(n);return B_.__wrap(s)}finally{t.__wbindgen_add_to_stack_pointer(16)}}build(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.transactionoutputamountbuilder_build(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=a()[n/4+2];if(s)throw p(e);return Yt.__wrap(_)}finally{t.__wbindgen_add_to_stack_pointer(16)}}}c.exports.TransactionOutputAmountBuilder=B_;class Ke{static __wrap(_){_=_>>>0;const e=Object.create(Ke.prototype);return e.__wbg_ptr=_,e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,_}free(){const _=this.__destroy_into_raw();t.__wbg_transactionoutputbuilder_free(_)}static new(){const _=t.transactionoutputbuilder_new();return Ke.__wrap(_)}with_address(_){g(_,pt);const e=t.transactionoutputbuilder_with_address(this.__wbg_ptr,_.__wbg_ptr);return Ke.__wrap(e)}with_data_hash(_){g(_,U);const e=t.transactionoutputbuilder_with_data_hash(this.__wbg_ptr,_.__wbg_ptr);return Ke.__wrap(e)}with_plutus_data(_){g(_,ht);const e=t.transactionoutputbuilder_with_plutus_data(this.__wbg_ptr,_.__wbg_ptr);return Ke.__wrap(e)}with_script_ref(_){g(_,j_);const e=t.transactionoutputbuilder_with_script_ref(this.__wbg_ptr,_.__wbg_ptr);return Ke.__wrap(e)}next(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.transactionoutputbuilder_next(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=a()[n/4+2];if(s)throw p(e);return B_.__wrap(_)}finally{t.__wbindgen_add_to_stack_pointer(16)}}}c.exports.TransactionOutputBuilder=Ke;class M_{static __wrap(_){_=_>>>0;const e=Object.create(M_.prototype);return e.__wbg_ptr=_,e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,_}free(){const _=this.__destroy_into_raw();t.__wbg_transactionoutputs_free(_)}to_bytes(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.transactionoutputs_to_bytes(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=D(_,e).slice();return t.__wbindgen_free(_,e*1),s}finally{t.__wbindgen_add_to_stack_pointer(16)}}static from_bytes(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=Q(_,t.__wbindgen_malloc),o=u;t.transactionoutputs_from_bytes(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw p(s);return M_.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_hex(){let _,e;try{const r=t.__wbindgen_add_to_stack_pointer(-16);t.transactionoutputs_to_hex(r,this.__wbg_ptr);var s=a()[r/4+0],n=a()[r/4+1];return _=s,e=n,m(s,n)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}static from_hex(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=u;t.transactionoutputs_from_hex(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw p(s);return M_.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_json(){let _,e;try{const l=t.__wbindgen_add_to_stack_pointer(-16);t.transactionoutputs_to_json(l,this.__wbg_ptr);var s=a()[l/4+0],n=a()[l/4+1],r=a()[l/4+2],i=a()[l/4+3],o=s,f=n;if(i)throw o=0,f=0,p(r);return _=o,e=f,m(o,f)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}to_js_value(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.transactionoutputs_to_js_value(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=a()[n/4+2];if(s)throw p(e);return p(_)}finally{t.__wbindgen_add_to_stack_pointer(16)}}static from_json(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=u;t.transactionoutputs_from_json(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw p(s);return M_.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}static new(){const _=t.certificates_new();return M_.__wrap(_)}len(){return t.assetnames_len(this.__wbg_ptr)>>>0}get(_){const e=t.transactionoutputs_get(this.__wbg_ptr,_);return Yt.__wrap(e)}add(_){g(_,Yt),t.transactionoutputs_add(this.__wbg_ptr,_.__wbg_ptr)}}c.exports.TransactionOutputs=M_;class me{static __wrap(_){_=_>>>0;const e=Object.create(me.prototype);return e.__wbg_ptr=_,e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,_}free(){const _=this.__destroy_into_raw();t.__wbg_transactionunspentoutput_free(_)}to_bytes(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.transactionunspentoutput_to_bytes(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=D(_,e).slice();return t.__wbindgen_free(_,e*1),s}finally{t.__wbindgen_add_to_stack_pointer(16)}}static from_bytes(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=Q(_,t.__wbindgen_malloc),o=u;t.transactionunspentoutput_from_bytes(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw p(s);return me.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_hex(){let _,e;try{const r=t.__wbindgen_add_to_stack_pointer(-16);t.transactionunspentoutput_to_hex(r,this.__wbg_ptr);var s=a()[r/4+0],n=a()[r/4+1];return _=s,e=n,m(s,n)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}static from_hex(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=u;t.transactionunspentoutput_from_hex(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw p(s);return me.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_json(){let _,e;try{const l=t.__wbindgen_add_to_stack_pointer(-16);t.transactionunspentoutput_to_json(l,this.__wbg_ptr);var s=a()[l/4+0],n=a()[l/4+1],r=a()[l/4+2],i=a()[l/4+3],o=s,f=n;if(i)throw o=0,f=0,p(r);return _=o,e=f,m(o,f)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}to_js_value(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.transactionunspentoutput_to_js_value(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=a()[n/4+2];if(s)throw p(e);return p(_)}finally{t.__wbindgen_add_to_stack_pointer(16)}}static from_json(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=u;t.transactionunspentoutput_from_json(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw p(s);return me.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}static new(_,e){g(_,Ct),g(e,Yt);const s=t.transactionunspentoutput_new(_.__wbg_ptr,e.__wbg_ptr);return me.__wrap(s)}input(){const _=t.transactionunspentoutput_input(this.__wbg_ptr);return Ct.__wrap(_)}output(){const _=t.transactionunspentoutput_output(this.__wbg_ptr);return Yt.__wrap(_)}}c.exports.TransactionUnspentOutput=me;class We{static __wrap(_){_=_>>>0;const e=Object.create(We.prototype);return e.__wbg_ptr=_,e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,_}free(){const _=this.__destroy_into_raw();t.__wbg_transactionunspentoutputs_free(_)}to_json(){let _,e;try{const l=t.__wbindgen_add_to_stack_pointer(-16);t.transactionunspentoutputs_to_json(l,this.__wbg_ptr);var s=a()[l/4+0],n=a()[l/4+1],r=a()[l/4+2],i=a()[l/4+3],o=s,f=n;if(i)throw o=0,f=0,p(r);return _=o,e=f,m(o,f)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}to_js_value(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.transactionunspentoutputs_to_js_value(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=a()[n/4+2];if(s)throw p(e);return p(_)}finally{t.__wbindgen_add_to_stack_pointer(16)}}static from_json(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=u;t.transactionunspentoutputs_from_json(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw p(s);return We.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}static new(){const _=t.certificates_new();return We.__wrap(_)}len(){return t.assetnames_len(this.__wbg_ptr)>>>0}get(_){const e=t.transactionunspentoutputs_get(this.__wbg_ptr,_);return me.__wrap(e)}add(_){g(_,me),t.transactionunspentoutputs_add(this.__wbg_ptr,_.__wbg_ptr)}}c.exports.TransactionUnspentOutputs=We;class f_{static __wrap(_){_=_>>>0;const e=Object.create(f_.prototype);return e.__wbg_ptr=_,e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,_}free(){const _=this.__destroy_into_raw();t.__wbg_transactionwitnessset_free(_)}to_bytes(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.transactionwitnessset_to_bytes(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=D(_,e).slice();return t.__wbindgen_free(_,e*1),s}finally{t.__wbindgen_add_to_stack_pointer(16)}}static from_bytes(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=Q(_,t.__wbindgen_malloc),o=u;t.transactionwitnessset_from_bytes(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw p(s);return f_.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_hex(){let _,e;try{const r=t.__wbindgen_add_to_stack_pointer(-16);t.transactionwitnessset_to_hex(r,this.__wbg_ptr);var s=a()[r/4+0],n=a()[r/4+1];return _=s,e=n,m(s,n)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}static from_hex(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=u;t.transactionwitnessset_from_hex(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw p(s);return f_.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_json(){let _,e;try{const l=t.__wbindgen_add_to_stack_pointer(-16);t.transactionwitnessset_to_json(l,this.__wbg_ptr);var s=a()[l/4+0],n=a()[l/4+1],r=a()[l/4+2],i=a()[l/4+3],o=s,f=n;if(i)throw o=0,f=0,p(r);return _=o,e=f,m(o,f)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}to_js_value(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.transactionwitnessset_to_js_value(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=a()[n/4+2];if(s)throw p(e);return p(_)}finally{t.__wbindgen_add_to_stack_pointer(16)}}static from_json(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=u;t.transactionwitnessset_from_json(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw p(s);return f_.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}set_vkeys(_){g(_,Ce),t.transactionwitnessset_set_vkeys(this.__wbg_ptr,_.__wbg_ptr)}vkeys(){const _=t.transactionwitnessset_vkeys(this.__wbg_ptr);return _===0?void 0:Ce.__wrap(_)}set_native_scripts(_){g(_,Ht),t.transactionwitnessset_set_native_scripts(this.__wbg_ptr,_.__wbg_ptr)}native_scripts(){const _=t.transactionwitnessset_native_scripts(this.__wbg_ptr);return _===0?void 0:Ht.__wrap(_)}set_bootstraps(_){g(_,x),t.transactionwitnessset_set_bootstraps(this.__wbg_ptr,_.__wbg_ptr)}bootstraps(){const _=t.transactionwitnessset_bootstraps(this.__wbg_ptr);return _===0?void 0:x.__wrap(_)}set_plutus_scripts(_){g(_,k_),t.transactionwitnessset_set_plutus_scripts(this.__wbg_ptr,_.__wbg_ptr)}plutus_scripts(){const _=t.transactionwitnessset_plutus_scripts(this.__wbg_ptr);return _===0?void 0:k_.__wrap(_)}set_plutus_data(_){g(_,n_),t.transactionwitnessset_set_plutus_data(this.__wbg_ptr,_.__wbg_ptr)}plutus_data(){const _=t.transactionwitnessset_plutus_data(this.__wbg_ptr);return _===0?void 0:n_.__wrap(_)}set_redeemers(_){g(_,A_),t.transactionwitnessset_set_redeemers(this.__wbg_ptr,_.__wbg_ptr)}redeemers(){const _=t.transactionwitnessset_redeemers(this.__wbg_ptr);return _===0?void 0:A_.__wrap(_)}static new(){const _=t.transactionwitnessset_new();return f_.__wrap(_)}}c.exports.TransactionWitnessSet=f_;class ke{static __wrap(_){_=_>>>0;const e=Object.create(ke.prototype);return e.__wbg_ptr=_,e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,_}free(){const _=this.__destroy_into_raw();t.__wbg_transactionwitnesssets_free(_)}to_bytes(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.transactionwitnesssets_to_bytes(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=D(_,e).slice();return t.__wbindgen_free(_,e*1),s}finally{t.__wbindgen_add_to_stack_pointer(16)}}static from_bytes(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=Q(_,t.__wbindgen_malloc),o=u;t.transactionwitnesssets_from_bytes(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw p(s);return ke.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_hex(){let _,e;try{const r=t.__wbindgen_add_to_stack_pointer(-16);t.transactionwitnesssets_to_hex(r,this.__wbg_ptr);var s=a()[r/4+0],n=a()[r/4+1];return _=s,e=n,m(s,n)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}static from_hex(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=u;t.transactionwitnesssets_from_hex(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw p(s);return ke.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_json(){let _,e;try{const l=t.__wbindgen_add_to_stack_pointer(-16);t.transactionwitnesssets_to_json(l,this.__wbg_ptr);var s=a()[l/4+0],n=a()[l/4+1],r=a()[l/4+2],i=a()[l/4+3],o=s,f=n;if(i)throw o=0,f=0,p(r);return _=o,e=f,m(o,f)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}to_js_value(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.transactionwitnesssets_to_js_value(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=a()[n/4+2];if(s)throw p(e);return p(_)}finally{t.__wbindgen_add_to_stack_pointer(16)}}static from_json(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=u;t.transactionwitnesssets_from_json(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw p(s);return ke.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}static new(){const _=t.assetnames_new();return ke.__wrap(_)}len(){return t.assetnames_len(this.__wbg_ptr)>>>0}get(_){const e=t.transactionwitnesssets_get(this.__wbg_ptr,_);return f_.__wrap(e)}add(_){g(_,f_),t.transactionwitnesssets_add(this.__wbg_ptr,_.__wbg_ptr)}}c.exports.TransactionWitnessSets=ke;class ka{__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,_}free(){const _=this.__destroy_into_raw();t.__wbg_txbuilderconstants_free(_)}static plutus_default_cost_models(){const _=t.txbuilderconstants_plutus_default_cost_models();return F.__wrap(_)}static plutus_alonzo_cost_models(){const _=t.txbuilderconstants_plutus_alonzo_cost_models();return F.__wrap(_)}static plutus_vasil_cost_models(){const _=t.txbuilderconstants_plutus_default_cost_models();return F.__wrap(_)}}c.exports.TxBuilderConstants=ka;class or{static __wrap(_){_=_>>>0;const e=Object.create(or.prototype);return e.__wbg_ptr=_,e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,_}free(){const _=this.__destroy_into_raw();t.__wbg_txinputsbuilder_free(_)}static new(){const _=t.txinputsbuilder_new();return or.__wrap(_)}add_key_input(_,e,s){g(_,W),g(e,Ct),g(s,gt),t.txinputsbuilder_add_key_input(this.__wbg_ptr,_.__wbg_ptr,e.__wbg_ptr,s.__wbg_ptr)}add_script_input(_,e,s){g(_,Ft),g(e,Ct),g(s,gt),t.txinputsbuilder_add_script_input(this.__wbg_ptr,_.__wbg_ptr,e.__wbg_ptr,s.__wbg_ptr)}add_native_script_input(_,e,s){g(_,Nt),g(e,Ct),g(s,gt),t.txinputsbuilder_add_native_script_input(this.__wbg_ptr,_.__wbg_ptr,e.__wbg_ptr,s.__wbg_ptr)}add_plutus_script_input(_,e,s){g(_,p_),g(e,Ct),g(s,gt),t.txinputsbuilder_add_plutus_script_input(this.__wbg_ptr,_.__wbg_ptr,e.__wbg_ptr,s.__wbg_ptr)}add_bootstrap_input(_,e,s){g(_,A),g(e,Ct),g(s,gt),t.txinputsbuilder_add_bootstrap_input(this.__wbg_ptr,_.__wbg_ptr,e.__wbg_ptr,s.__wbg_ptr)}add_input(_,e,s){g(_,pt),g(e,Ct),g(s,gt),t.txinputsbuilder_add_input(this.__wbg_ptr,_.__wbg_ptr,e.__wbg_ptr,s.__wbg_ptr)}count_missing_input_scripts(){return t.txinputsbuilder_count_missing_input_scripts(this.__wbg_ptr)>>>0}add_required_native_input_scripts(_){return g(_,Ht),t.txinputsbuilder_add_required_native_input_scripts(this.__wbg_ptr,_.__wbg_ptr)>>>0}add_required_plutus_input_scripts(_){return g(_,re),t.txinputsbuilder_add_required_plutus_input_scripts(this.__wbg_ptr,_.__wbg_ptr)>>>0}add_required_script_input_witnesses(_){return g(_,Et),t.txinputsbuilder_add_required_script_input_witnesses(this.__wbg_ptr,_.__wbg_ptr)>>>0}get_ref_inputs(){const _=t.txinputsbuilder_get_ref_inputs(this.__wbg_ptr);return zt.__wrap(_)}get_native_input_scripts(){const _=t.txinputsbuilder_get_native_input_scripts(this.__wbg_ptr);return _===0?void 0:Ht.__wrap(_)}get_plutus_input_scripts(){const _=t.txinputsbuilder_get_plutus_input_scripts(this.__wbg_ptr);return _===0?void 0:re.__wrap(_)}len(){return t.txinputsbuilder_len(this.__wbg_ptr)>>>0}add_required_signer(_){g(_,W),t.txinputsbuilder_add_required_signer(this.__wbg_ptr,_.__wbg_ptr)}add_required_signers(_){g(_,Z),t.txinputsbuilder_add_required_signers(this.__wbg_ptr,_.__wbg_ptr)}total_value(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.txinputsbuilder_total_value(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=a()[n/4+2];if(s)throw p(e);return gt.__wrap(_)}finally{t.__wbindgen_add_to_stack_pointer(16)}}inputs(){const _=t.txinputsbuilder_inputs(this.__wbg_ptr);return zt.__wrap(_)}inputs_option(){const _=t.txinputsbuilder_inputs_option(this.__wbg_ptr);return _===0?void 0:zt.__wrap(_)}}c.exports.TxInputsBuilder=or;class xe{static __wrap(_){_=_>>>0;const e=Object.create(xe.prototype);return e.__wbg_ptr=_,e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,_}free(){const _=this.__destroy_into_raw();t.__wbg_url_free(_)}to_bytes(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.url_to_bytes(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=D(_,e).slice();return t.__wbindgen_free(_,e*1),s}finally{t.__wbindgen_add_to_stack_pointer(16)}}static from_bytes(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=Q(_,t.__wbindgen_malloc),o=u;t.url_from_bytes(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw p(s);return xe.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_hex(){let _,e;try{const r=t.__wbindgen_add_to_stack_pointer(-16);t.url_to_hex(r,this.__wbg_ptr);var s=a()[r/4+0],n=a()[r/4+1];return _=s,e=n,m(s,n)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}static from_hex(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=u;t.url_from_hex(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw p(s);return xe.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_json(){let _,e;try{const l=t.__wbindgen_add_to_stack_pointer(-16);t.dnsrecordaoraaaa_to_json(l,this.__wbg_ptr);var s=a()[l/4+0],n=a()[l/4+1],r=a()[l/4+2],i=a()[l/4+3],o=s,f=n;if(i)throw o=0,f=0,p(r);return _=o,e=f,m(o,f)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}to_js_value(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.dnsrecordaoraaaa_to_js_value(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=a()[n/4+2];if(s)throw p(e);return p(_)}finally{t.__wbindgen_add_to_stack_pointer(16)}}static from_json(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=u;t.dnsrecordaoraaaa_from_json(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw p(s);return xe.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}static new(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=u;t.url_new(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw p(s);return xe.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}url(){let _,e;try{const r=t.__wbindgen_add_to_stack_pointer(-16);t.dnsrecordaoraaaa_record(r,this.__wbg_ptr);var s=a()[r/4+0],n=a()[r/4+1];return _=s,e=n,m(s,n)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}}c.exports.URL=xe;class Vt{static __wrap(_){_=_>>>0;const e=Object.create(Vt.prototype);return e.__wbg_ptr=_,e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,_}free(){const _=this.__destroy_into_raw();t.__wbg_unitinterval_free(_)}to_bytes(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.unitinterval_to_bytes(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=D(_,e).slice();return t.__wbindgen_free(_,e*1),s}finally{t.__wbindgen_add_to_stack_pointer(16)}}static from_bytes(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=Q(_,t.__wbindgen_malloc),o=u;t.unitinterval_from_bytes(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw p(s);return Vt.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_hex(){let _,e;try{const r=t.__wbindgen_add_to_stack_pointer(-16);t.unitinterval_to_hex(r,this.__wbg_ptr);var s=a()[r/4+0],n=a()[r/4+1];return _=s,e=n,m(s,n)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}static from_hex(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=u;t.unitinterval_from_hex(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw p(s);return Vt.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_json(){let _,e;try{const l=t.__wbindgen_add_to_stack_pointer(-16);t.unitinterval_to_json(l,this.__wbg_ptr);var s=a()[l/4+0],n=a()[l/4+1],r=a()[l/4+2],i=a()[l/4+3],o=s,f=n;if(i)throw o=0,f=0,p(r);return _=o,e=f,m(o,f)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}to_js_value(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.unitinterval_to_js_value(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=a()[n/4+2];if(s)throw p(e);return p(_)}finally{t.__wbindgen_add_to_stack_pointer(16)}}static from_json(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=u;t.unitinterval_from_json(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw p(s);return Vt.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}numerator(){const _=t.exunits_mem(this.__wbg_ptr);return I.__wrap(_)}denominator(){const _=t.exunits_steps(this.__wbg_ptr);return I.__wrap(_)}static new(_,e){g(_,I),g(e,I);const s=t.exunits_new(_.__wbg_ptr,e.__wbg_ptr);return Vt.__wrap(s)}}c.exports.UnitInterval=Vt;class Ae{static __wrap(_){_=_>>>0;const e=Object.create(Ae.prototype);return e.__wbg_ptr=_,e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,_}free(){const _=this.__destroy_into_raw();t.__wbg_update_free(_)}to_bytes(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.update_to_bytes(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=D(_,e).slice();return t.__wbindgen_free(_,e*1),s}finally{t.__wbindgen_add_to_stack_pointer(16)}}static from_bytes(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=Q(_,t.__wbindgen_malloc),o=u;t.update_from_bytes(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw p(s);return Ae.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_hex(){let _,e;try{const r=t.__wbindgen_add_to_stack_pointer(-16);t.update_to_hex(r,this.__wbg_ptr);var s=a()[r/4+0],n=a()[r/4+1];return _=s,e=n,m(s,n)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}static from_hex(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=u;t.update_from_hex(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw p(s);return Ae.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_json(){let _,e;try{const l=t.__wbindgen_add_to_stack_pointer(-16);t.update_to_json(l,this.__wbg_ptr);var s=a()[l/4+0],n=a()[l/4+1],r=a()[l/4+2],i=a()[l/4+3],o=s,f=n;if(i)throw o=0,f=0,p(r);return _=o,e=f,m(o,f)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}to_js_value(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.update_to_js_value(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=a()[n/4+2];if(s)throw p(e);return p(_)}finally{t.__wbindgen_add_to_stack_pointer(16)}}static from_json(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=u;t.update_from_json(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw p(s);return Ae.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}proposed_protocol_parameter_updates(){const _=t.update_proposed_protocol_parameter_updates(this.__wbg_ptr);return ie.__wrap(_)}epoch(){return t.update_epoch(this.__wbg_ptr)>>>0}static new(_,e){g(_,ie);const s=t.update_new(_.__wbg_ptr,e);return Ae.__wrap(s)}}c.exports.Update=Ae;class h_{static __wrap(_){_=_>>>0;const e=Object.create(h_.prototype);return e.__wbg_ptr=_,e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,_}free(){const _=this.__destroy_into_raw();t.__wbg_vrfcert_free(_)}to_bytes(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.vrfcert_to_bytes(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=D(_,e).slice();return t.__wbindgen_free(_,e*1),s}finally{t.__wbindgen_add_to_stack_pointer(16)}}static from_bytes(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=Q(_,t.__wbindgen_malloc),o=u;t.vrfcert_from_bytes(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw p(s);return h_.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_hex(){let _,e;try{const r=t.__wbindgen_add_to_stack_pointer(-16);t.vrfcert_to_hex(r,this.__wbg_ptr);var s=a()[r/4+0],n=a()[r/4+1];return _=s,e=n,m(s,n)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}static from_hex(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=u;t.vrfcert_from_hex(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw p(s);return h_.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_json(){let _,e;try{const l=t.__wbindgen_add_to_stack_pointer(-16);t.vrfcert_to_json(l,this.__wbg_ptr);var s=a()[l/4+0],n=a()[l/4+1],r=a()[l/4+2],i=a()[l/4+3],o=s,f=n;if(i)throw o=0,f=0,p(r);return _=o,e=f,m(o,f)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}to_js_value(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.vrfcert_to_js_value(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=a()[n/4+2];if(s)throw p(e);return p(_)}finally{t.__wbindgen_add_to_stack_pointer(16)}}static from_json(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=u;t.vrfcert_from_json(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw p(s);return h_.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}output(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.assetname_name(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=D(_,e).slice();return t.__wbindgen_free(_,e*1),s}finally{t.__wbindgen_add_to_stack_pointer(16)}}proof(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.bootstrapwitness_attributes(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=D(_,e).slice();return t.__wbindgen_free(_,e*1),s}finally{t.__wbindgen_add_to_stack_pointer(16)}}static new(_,e){try{const i=t.__wbindgen_add_to_stack_pointer(-16),o=Q(_,t.__wbindgen_malloc),f=u,l=Q(e,t.__wbindgen_malloc),H=u;t.vrfcert_new(i,o,f,l,H);var s=a()[i/4+0],n=a()[i/4+1],r=a()[i/4+2];if(r)throw p(n);return h_.__wrap(s)}finally{t.__wbindgen_add_to_stack_pointer(16)}}}c.exports.VRFCert=h_;class K_{static __wrap(_){_=_>>>0;const e=Object.create(K_.prototype);return e.__wbg_ptr=_,e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,_}free(){const _=this.__destroy_into_raw();t.__wbg_vrfkeyhash_free(_)}static from_bytes(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=Q(_,t.__wbindgen_malloc),o=u;t.vrfkeyhash_from_bytes(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw p(s);return K_.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_bytes(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.auxiliarydatahash_to_bytes(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=D(_,e).slice();return t.__wbindgen_free(_,e*1),s}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_bech32(_){let e,s;try{const H=t.__wbindgen_add_to_stack_pointer(-16),rt=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),dt=u;t.auxiliarydatahash_to_bech32(H,this.__wbg_ptr,rt,dt);var n=a()[H/4+0],r=a()[H/4+1],i=a()[H/4+2],o=a()[H/4+3],f=n,l=r;if(o)throw f=0,l=0,p(i);return e=f,s=l,m(f,l)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(e,s,1)}}static from_bech32(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=u;t.vrfkeyhash_from_bech32(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw p(s);return K_.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_hex(){let _,e;try{const r=t.__wbindgen_add_to_stack_pointer(-16);t.auxiliarydatahash_to_hex(r,this.__wbg_ptr);var s=a()[r/4+0],n=a()[r/4+1];return _=s,e=n,m(s,n)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}static from_hex(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=u;t.vrfkeyhash_from_hex(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw p(s);return K_.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}}c.exports.VRFKeyHash=K_;class Ie{static __wrap(_){_=_>>>0;const e=Object.create(Ie.prototype);return e.__wbg_ptr=_,e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,_}free(){const _=this.__destroy_into_raw();t.__wbg_vrfvkey_free(_)}static from_bytes(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=Q(_,t.__wbindgen_malloc),o=u;t.vrfvkey_from_bytes(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw p(s);return Ie.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_bytes(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.auxiliarydatahash_to_bytes(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=D(_,e).slice();return t.__wbindgen_free(_,e*1),s}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_bech32(_){let e,s;try{const H=t.__wbindgen_add_to_stack_pointer(-16),rt=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),dt=u;t.auxiliarydatahash_to_bech32(H,this.__wbg_ptr,rt,dt);var n=a()[H/4+0],r=a()[H/4+1],i=a()[H/4+2],o=a()[H/4+3],f=n,l=r;if(o)throw f=0,l=0,p(i);return e=f,s=l,m(f,l)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(e,s,1)}}static from_bech32(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=u;t.vrfvkey_from_bech32(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw p(s);return Ie.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_hex(){let _,e;try{const r=t.__wbindgen_add_to_stack_pointer(-16);t.auxiliarydatahash_to_hex(r,this.__wbg_ptr);var s=a()[r/4+0],n=a()[r/4+1];return _=s,e=n,m(s,n)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}static from_hex(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=u;t.vrfvkey_from_hex(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw p(s);return Ie.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}}c.exports.VRFVKey=Ie;class gt{static __wrap(_){_=_>>>0;const e=Object.create(gt.prototype);return e.__wbg_ptr=_,e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,_}free(){const _=this.__destroy_into_raw();t.__wbg_value_free(_)}to_bytes(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.value_to_bytes(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=D(_,e).slice();return t.__wbindgen_free(_,e*1),s}finally{t.__wbindgen_add_to_stack_pointer(16)}}static from_bytes(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=Q(_,t.__wbindgen_malloc),o=u;t.value_from_bytes(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw p(s);return gt.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_hex(){let _,e;try{const r=t.__wbindgen_add_to_stack_pointer(-16);t.value_to_hex(r,this.__wbg_ptr);var s=a()[r/4+0],n=a()[r/4+1];return _=s,e=n,m(s,n)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}static from_hex(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=u;t.value_from_hex(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw p(s);return gt.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_json(){let _,e;try{const l=t.__wbindgen_add_to_stack_pointer(-16);t.value_to_json(l,this.__wbg_ptr);var s=a()[l/4+0],n=a()[l/4+1],r=a()[l/4+2],i=a()[l/4+3],o=s,f=n;if(i)throw o=0,f=0,p(r);return _=o,e=f,m(o,f)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}to_js_value(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.value_to_js_value(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=a()[n/4+2];if(s)throw p(e);return p(_)}finally{t.__wbindgen_add_to_stack_pointer(16)}}static from_json(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=u;t.value_from_json(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw p(s);return gt.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}static new(_){g(_,I);const e=t.value_new(_.__wbg_ptr);return gt.__wrap(e)}static new_from_assets(_){g(_,$t);const e=t.value_new_from_assets(_.__wbg_ptr);return gt.__wrap(e)}static new_with_assets(_,e){g(_,I),g(e,$t);const s=t.value_new_with_assets(_.__wbg_ptr,e.__wbg_ptr);return gt.__wrap(s)}static zero(){const _=t.value_zero();return gt.__wrap(_)}is_zero(){return t.value_is_zero(this.__wbg_ptr)!==0}coin(){const _=t.value_coin(this.__wbg_ptr);return I.__wrap(_)}set_coin(_){g(_,I),t.value_set_coin(this.__wbg_ptr,_.__wbg_ptr)}multiasset(){const _=t.value_multiasset(this.__wbg_ptr);return _===0?void 0:$t.__wrap(_)}set_multiasset(_){g(_,$t),t.value_set_multiasset(this.__wbg_ptr,_.__wbg_ptr)}checked_add(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16);g(_,gt),t.value_checked_add(r,this.__wbg_ptr,_.__wbg_ptr);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw p(s);return gt.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}checked_sub(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16);g(_,gt),t.value_checked_sub(r,this.__wbg_ptr,_.__wbg_ptr);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw p(s);return gt.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}clamped_sub(_){g(_,gt);const e=t.value_clamped_sub(this.__wbg_ptr,_.__wbg_ptr);return gt.__wrap(e)}compare(_){g(_,gt);const e=t.value_compare(this.__wbg_ptr,_.__wbg_ptr);return e===16777215?void 0:e}}c.exports.Value=gt;class Zt{static __wrap(_){_=_>>>0;const e=Object.create(Zt.prototype);return e.__wbg_ptr=_,e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,_}free(){const _=this.__destroy_into_raw();t.__wbg_vkey_free(_)}to_bytes(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.vkey_to_bytes(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=D(_,e).slice();return t.__wbindgen_free(_,e*1),s}finally{t.__wbindgen_add_to_stack_pointer(16)}}static from_bytes(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=Q(_,t.__wbindgen_malloc),o=u;t.vkey_from_bytes(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw p(s);return Zt.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_hex(){let _,e;try{const r=t.__wbindgen_add_to_stack_pointer(-16);t.vkey_to_hex(r,this.__wbg_ptr);var s=a()[r/4+0],n=a()[r/4+1];return _=s,e=n,m(s,n)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}static from_hex(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=u;t.vkey_from_hex(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw p(s);return Zt.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_json(){let _,e;try{const l=t.__wbindgen_add_to_stack_pointer(-16);t.vkey_to_json(l,this.__wbg_ptr);var s=a()[l/4+0],n=a()[l/4+1],r=a()[l/4+2],i=a()[l/4+3],o=s,f=n;if(i)throw o=0,f=0,p(r);return _=o,e=f,m(o,f)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}to_js_value(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.vkey_to_js_value(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=a()[n/4+2];if(s)throw p(e);return p(_)}finally{t.__wbindgen_add_to_stack_pointer(16)}}static from_json(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=u;t.vkey_from_json(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw p(s);return Zt.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}static new(_){g(_,l_);const e=t.vkey_new(_.__wbg_ptr);return Zt.__wrap(e)}public_key(){const _=t.vkey_public_key(this.__wbg_ptr);return l_.__wrap(_)}}c.exports.Vkey=Zt;class Dr{static __wrap(_){_=_>>>0;const e=Object.create(Dr.prototype);return e.__wbg_ptr=_,e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,_}free(){const _=this.__destroy_into_raw();t.__wbg_vkeys_free(_)}static new(){const _=t.ed25519keyhashes_new();return Dr.__wrap(_)}len(){return t.assetnames_len(this.__wbg_ptr)>>>0}get(_){const e=t.vkeys_get(this.__wbg_ptr,_);return Zt.__wrap(e)}add(_){g(_,Zt),t.vkeys_add(this.__wbg_ptr,_.__wbg_ptr)}}c.exports.Vkeys=Dr;class H_{static __wrap(_){_=_>>>0;const e=Object.create(H_.prototype);return e.__wbg_ptr=_,e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,_}free(){const _=this.__destroy_into_raw();t.__wbg_vkeywitness_free(_)}to_bytes(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.vkeywitness_to_bytes(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=D(_,e).slice();return t.__wbindgen_free(_,e*1),s}finally{t.__wbindgen_add_to_stack_pointer(16)}}static from_bytes(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=Q(_,t.__wbindgen_malloc),o=u;t.vkeywitness_from_bytes(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw p(s);return H_.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_hex(){let _,e;try{const r=t.__wbindgen_add_to_stack_pointer(-16);t.vkeywitness_to_hex(r,this.__wbg_ptr);var s=a()[r/4+0],n=a()[r/4+1];return _=s,e=n,m(s,n)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}static from_hex(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=u;t.vkeywitness_from_hex(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw p(s);return H_.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_json(){let _,e;try{const l=t.__wbindgen_add_to_stack_pointer(-16);t.vkeywitness_to_json(l,this.__wbg_ptr);var s=a()[l/4+0],n=a()[l/4+1],r=a()[l/4+2],i=a()[l/4+3],o=s,f=n;if(i)throw o=0,f=0,p(r);return _=o,e=f,m(o,f)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}to_js_value(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.vkeywitness_to_js_value(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=a()[n/4+2];if(s)throw p(e);return p(_)}finally{t.__wbindgen_add_to_stack_pointer(16)}}static from_json(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=u;t.vkeywitness_from_json(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw p(s);return H_.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}static new(_,e){g(_,Zt),g(e,it);const s=t.vkeywitness_new(_.__wbg_ptr,e.__wbg_ptr);return H_.__wrap(s)}vkey(){const _=t.vkeywitness_vkey(this.__wbg_ptr);return Zt.__wrap(_)}signature(){const _=t.vkeywitness_signature(this.__wbg_ptr);return it.__wrap(_)}}c.exports.Vkeywitness=H_;class Ce{static __wrap(_){_=_>>>0;const e=Object.create(Ce.prototype);return e.__wbg_ptr=_,e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,_}free(){const _=this.__destroy_into_raw();t.__wbg_vkeywitnesses_free(_)}to_bytes(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.vkeywitnesses_to_bytes(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=D(_,e).slice();return t.__wbindgen_free(_,e*1),s}finally{t.__wbindgen_add_to_stack_pointer(16)}}static from_bytes(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=Q(_,t.__wbindgen_malloc),o=u;t.vkeywitnesses_from_bytes(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw p(s);return Ce.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_hex(){let _,e;try{const r=t.__wbindgen_add_to_stack_pointer(-16);t.vkeywitnesses_to_hex(r,this.__wbg_ptr);var s=a()[r/4+0],n=a()[r/4+1];return _=s,e=n,m(s,n)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}static from_hex(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=u;t.vkeywitnesses_from_hex(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw p(s);return Ce.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_json(){let _,e;try{const l=t.__wbindgen_add_to_stack_pointer(-16);t.vkeywitnesses_to_json(l,this.__wbg_ptr);var s=a()[l/4+0],n=a()[l/4+1],r=a()[l/4+2],i=a()[l/4+3],o=s,f=n;if(i)throw o=0,f=0,p(r);return _=o,e=f,m(o,f)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}to_js_value(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.vkeywitnesses_to_js_value(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=a()[n/4+2];if(s)throw p(e);return p(_)}finally{t.__wbindgen_add_to_stack_pointer(16)}}static from_json(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=u;t.vkeywitnesses_from_json(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw p(s);return Ce.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}static new(){const _=t.ed25519keyhashes_new();return Ce.__wrap(_)}len(){return t.assetnames_len(this.__wbg_ptr)>>>0}get(_){const e=t.vkeywitnesses_get(this.__wbg_ptr,_);return H_.__wrap(e)}add(_){g(_,H_),t.vkeywitnesses_add(this.__wbg_ptr,_.__wbg_ptr)}}c.exports.Vkeywitnesses=Ce;class q_{static __wrap(_){_=_>>>0;const e=Object.create(q_.prototype);return e.__wbg_ptr=_,e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,_}free(){const _=this.__destroy_into_raw();t.__wbg_withdrawals_free(_)}to_bytes(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.withdrawals_to_bytes(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=D(_,e).slice();return t.__wbindgen_free(_,e*1),s}finally{t.__wbindgen_add_to_stack_pointer(16)}}static from_bytes(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=Q(_,t.__wbindgen_malloc),o=u;t.withdrawals_from_bytes(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw p(s);return q_.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_hex(){let _,e;try{const r=t.__wbindgen_add_to_stack_pointer(-16);t.withdrawals_to_hex(r,this.__wbg_ptr);var s=a()[r/4+0],n=a()[r/4+1];return _=s,e=n,m(s,n)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}static from_hex(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=u;t.withdrawals_from_hex(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw p(s);return q_.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}to_json(){let _,e;try{const l=t.__wbindgen_add_to_stack_pointer(-16);t.withdrawals_to_json(l,this.__wbg_ptr);var s=a()[l/4+0],n=a()[l/4+1],r=a()[l/4+2],i=a()[l/4+3],o=s,f=n;if(i)throw o=0,f=0,p(r);return _=o,e=f,m(o,f)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_free(_,e,1)}}to_js_value(){try{const n=t.__wbindgen_add_to_stack_pointer(-16);t.withdrawals_to_js_value(n,this.__wbg_ptr);var _=a()[n/4+0],e=a()[n/4+1],s=a()[n/4+2];if(s)throw p(e);return p(_)}finally{t.__wbindgen_add_to_stack_pointer(16)}}static from_json(_){try{const r=t.__wbindgen_add_to_stack_pointer(-16),i=v(_,t.__wbindgen_malloc,t.__wbindgen_realloc),o=u;t.withdrawals_from_json(r,i,o);var e=a()[r/4+0],s=a()[r/4+1],n=a()[r/4+2];if(n)throw p(s);return q_.__wrap(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}static new(){const _=t.auxiliarydataset_new();return q_.__wrap(_)}len(){return t.auxiliarydataset_len(this.__wbg_ptr)>>>0}insert(_,e){g(_,C_),g(e,I);const s=t.withdrawals_insert(this.__wbg_ptr,_.__wbg_ptr,e.__wbg_ptr);return s===0?void 0:I.__wrap(s)}get(_){g(_,C_);const e=t.withdrawals_get(this.__wbg_ptr,_.__wbg_ptr);return e===0?void 0:I.__wrap(e)}keys(){const _=t.withdrawals_keys(this.__wbg_ptr);return Fe.__wrap(_)}}c.exports.Withdrawals=q_,c.exports.__wbindgen_object_drop_ref=function(C){p(C)},c.exports.__wbindgen_string_new=function(C,_){const e=m(C,_);return G(e)},c.exports.__wbindgen_error_new=function(C,_){const e=new Error(m(C,_));return G(e)},c.exports.__wbindgen_string_get=function(C,_){const e=k(_),s=typeof e=="string"?e:void 0;var n=nt(s)?0:v(s,t.__wbindgen_malloc,t.__wbindgen_realloc),r=u;a()[C/4+1]=r,a()[C/4+0]=n},c.exports.__wbindgen_object_clone_ref=function(C){const _=k(C);return G(_)},c.exports.__wbindgen_is_object=function(C){const _=k(C);return typeof _=="object"&&_!==null},c.exports.__wbg_String_91fba7ded13ba54c=function(C,_){const e=String(k(_)),s=v(e,t.__wbindgen_malloc,t.__wbindgen_realloc),n=u;a()[C/4+1]=n,a()[C/4+0]=s},c.exports.__wbindgen_number_new=function(C){return G(C)},c.exports.__wbg_set_20cbc34131e76824=function(C,_,e){k(C)[p(_)]=p(e)},c.exports.__wbg_crypto_566d7465cdbb6b7a=function(C){const _=k(C).crypto;return G(_)},c.exports.__wbg_process_dc09a8c7d59982f6=function(C){const _=k(C).process;return G(_)},c.exports.__wbg_versions_d98c6400c6ca2bd8=function(C){const _=k(C).versions;return G(_)},c.exports.__wbg_node_caaf83d002149bd5=function(C){const _=k(C).node;return G(_)},c.exports.__wbindgen_is_string=function(C){return typeof k(C)=="string"},c.exports.__wbg_require_94a9da52636aacbf=function(){return At(function(){return G(en)},arguments)},c.exports.__wbg_msCrypto_0b84745e9245cdf6=function(C){const _=k(C).msCrypto;return G(_)},c.exports.__wbg_randomFillSync_290977693942bf03=function(){return At(function(C,_){k(C).randomFillSync(p(_))},arguments)},c.exports.__wbg_getRandomValues_260cc23a41afad9a=function(){return At(function(C,_){k(C).getRandomValues(k(_))},arguments)},c.exports.__wbindgen_is_function=function(C){return typeof k(C)=="function"},c.exports.__wbg_self_e7c1f827057f6584=function(){return At(function(){const C=self.self;return G(C)},arguments)},c.exports.__wbg_window_a09ec664e14b1b81=function(){return At(function(){const C=window.window;return G(C)},arguments)},c.exports.__wbg_globalThis_87cbb8506fecf3a9=function(){return At(function(){const C=globalThis.globalThis;return G(C)},arguments)},c.exports.__wbg_global_c85a9259e621f3db=function(){return At(function(){const C=qr.global;return G(C)},arguments)},c.exports.__wbindgen_is_undefined=function(C){return k(C)===void 0},c.exports.__wbg_newnoargs_2b8b6bd7753c76ba=function(C,_){const e=new Function(m(C,_));return G(e)},c.exports.__wbg_call_95d1ea488d03e4e8=function(){return At(function(C,_){const e=k(C).call(k(_));return G(e)},arguments)},c.exports.__wbg_new_b525de17f44a8943=function(){const C=new Array;return G(C)},c.exports.__wbg_new_f841cc6f2098f4b5=function(){return G(new Map)},c.exports.__wbg_new_f9876326328f45ed=function(){const C=new Object;return G(C)},c.exports.__wbg_set_17224bc548dd1d7b=function(C,_,e){k(C)[_>>>0]=p(e)},c.exports.__wbg_call_9495de66fdbe016b=function(){return At(function(C,_,e){const s=k(C).call(k(_),k(e));return G(s)},arguments)},c.exports.__wbg_set_388c4c6422704173=function(C,_,e){const s=k(C).set(k(_),k(e));return G(s)},c.exports.__wbg_buffer_cf65c07de34b9a08=function(C){const _=k(C).buffer;return G(_)},c.exports.__wbg_newwithbyteoffsetandlength_9fb2f11355ecadf5=function(C,_,e){const s=new Uint8Array(k(C),_>>>0,e>>>0);return G(s)},c.exports.__wbg_new_537b7341ce90bb31=function(C){const _=new Uint8Array(k(C));return G(_)},c.exports.__wbg_set_17499e8aa4003ebd=function(C,_,e){k(C).set(k(_),e>>>0)},c.exports.__wbg_newwithlength_b56c882b57805732=function(C){const _=new Uint8Array(C>>>0);return G(_)},c.exports.__wbg_subarray_7526649b91a252a6=function(C,_,e){const s=k(C).subarray(_>>>0,e>>>0);return G(s)},c.exports.__wbg_new_d87f272aec784ec0=function(C,_){const e=new Function(m(C,_));return G(e)},c.exports.__wbg_call_eae29933372a39be=function(C,_){const e=k(C).call(k(_));return G(e)},c.exports.__wbindgen_jsval_eq=function(C,_){return k(C)===k(_)},c.exports.__wbg_self_e0b3266d2d9eba1a=function(C){const _=k(C).self;return G(_)},c.exports.__wbg_require_0993fe224bf8e202=function(C,_){const e=en(m(C,_));return G(e)},c.exports.__wbg_crypto_e95a6e54c5c2e37f=function(C){const _=k(C).crypto;return G(_)},c.exports.__wbg_getRandomValues_dc67302a7bd1aec5=function(C){const _=k(C).getRandomValues;return G(_)},c.exports.__wbg_randomFillSync_dd2297de5917c74e=function(C,_,e){k(C).randomFillSync(D(_,e))},c.exports.__wbg_getRandomValues_02639197c8166a96=function(C,_,e){k(C).getRandomValues(D(_,e))},c.exports.__wbindgen_debug_string=function(C,_){const e=_t(k(_)),s=v(e,t.__wbindgen_malloc,t.__wbindgen_realloc),n=u;a()[C/4+1]=n,a()[C/4+0]=s},c.exports.__wbindgen_throw=function(C,_){throw new Error(m(C,_))},c.exports.__wbindgen_memory=function(){const C=t.memory;return G(C)};const xa=xn.join(__dirname,"sidan_csl_rs_bg.wasm"),Aa=xn.readFileSync(xa),Ia=new WebAssembly.Module(Aa);t=new WebAssembly.Instance(Ia,d).exports,c.exports.__wasm=t})(y);const dr={mem:7e6,steps:3e9},v_={epoch:0,coinsPerUTxOSize:"4310",priceMem:.0577,priceStep:721e-7,minFeeA:44,minFeeB:155381,keyDeposit:"2000000",maxTxSize:16384,maxValSize:"5000",poolDeposit:"500000000",maxCollateralInputs:3,decentralisation:0,maxBlockSize:98304,collateralPercent:150,maxBlockHeaderSize:1100,minPoolCost:"340000000",maxTxExMem:"16000000",maxTxExSteps:"10000000000",maxBlockExMem:"80000000",maxBlockExSteps:"40000000000"},Xr=2147483648,je={V1:y.exports.Language.new_plutus_v1(),V2:y.exports.Language.new_plutus_v2()},Y_=56,es={CERT:y.exports.RedeemerTag.new_cert(),MINT:y.exports.RedeemerTag.new_mint(),REWARD:y.exports.RedeemerTag.new_reward(),SPEND:y.exports.RedeemerTag.new_spend()},Rr={testnet:["74","1598400","1595967616","432000"],preview:["183","15811222","1682467200","86400"],preprod:["65","26438400","1682121600","432000"],mainnet:["208","4492800","1596059091","432000"]},An={ALONZO:y.exports.TxBuilderConstants.plutus_alonzo_cost_models(),BABBAGE:(()=>{const c=y.exports.Costmdls.new(),d=y.exports.CostModel.new();Object.values({"addInteger-cpu-arguments-intercept":205665,"addInteger-cpu-arguments-slope":812,"addInteger-memory-arguments-intercept":1,"addInteger-memory-arguments-slope":1,"appendByteString-cpu-arguments-intercept":1e3,"appendByteString-cpu-arguments-slope":571,"appendByteString-memory-arguments-intercept":0,"appendByteString-memory-arguments-slope":1,"appendString-cpu-arguments-intercept":1e3,"appendString-cpu-arguments-slope":24177,"appendString-memory-arguments-intercept":4,"appendString-memory-arguments-slope":1,"bData-cpu-arguments":1e3,"bData-memory-arguments":32,"blake2b_256-cpu-arguments-intercept":117366,"blake2b_256-cpu-arguments-slope":10475,"blake2b_256-memory-arguments":4,"cekApplyCost-exBudgetCPU":23e3,"cekApplyCost-exBudgetMemory":100,"cekBuiltinCost-exBudgetCPU":23e3,"cekBuiltinCost-exBudgetMemory":100,"cekConstCost-exBudgetCPU":23e3,"cekConstCost-exBudgetMemory":100,"cekDelayCost-exBudgetCPU":23e3,"cekDelayCost-exBudgetMemory":100,"cekForceCost-exBudgetCPU":23e3,"cekForceCost-exBudgetMemory":100,"cekLamCost-exBudgetCPU":23e3,"cekLamCost-exBudgetMemory":100,"cekStartupCost-exBudgetCPU":100,"cekStartupCost-exBudgetMemory":100,"cekVarCost-exBudgetCPU":23e3,"cekVarCost-exBudgetMemory":100,"chooseData-cpu-arguments":19537,"chooseData-memory-arguments":32,"chooseList-cpu-arguments":175354,"chooseList-memory-arguments":32,"chooseUnit-cpu-arguments":46417,"chooseUnit-memory-arguments":4,"consByteString-cpu-arguments-intercept":221973,"consByteString-cpu-arguments-slope":511,"consByteString-memory-arguments-intercept":0,"consByteString-memory-arguments-slope":1,"constrData-cpu-arguments":89141,"constrData-memory-arguments":32,"decodeUtf8-cpu-arguments-intercept":497525,"decodeUtf8-cpu-arguments-slope":14068,"decodeUtf8-memory-arguments-intercept":4,"decodeUtf8-memory-arguments-slope":2,"divideInteger-cpu-arguments-constant":196500,"divideInteger-cpu-arguments-model-arguments-intercept":453240,"divideInteger-cpu-arguments-model-arguments-slope":220,"divideInteger-memory-arguments-intercept":0,"divideInteger-memory-arguments-minimum":1,"divideInteger-memory-arguments-slope":1,"encodeUtf8-cpu-arguments-intercept":1e3,"encodeUtf8-cpu-arguments-slope":28662,"encodeUtf8-memory-arguments-intercept":4,"encodeUtf8-memory-arguments-slope":2,"equalsByteString-cpu-arguments-constant":245e3,"equalsByteString-cpu-arguments-intercept":216773,"equalsByteString-cpu-arguments-slope":62,"equalsByteString-memory-arguments":1,"equalsData-cpu-arguments-intercept":1060367,"equalsData-cpu-arguments-slope":12586,"equalsData-memory-arguments":1,"equalsInteger-cpu-arguments-intercept":208512,"equalsInteger-cpu-arguments-slope":421,"equalsInteger-memory-arguments":1,"equalsString-cpu-arguments-constant":187e3,"equalsString-cpu-arguments-intercept":1e3,"equalsString-cpu-arguments-slope":52998,"equalsString-memory-arguments":1,"fstPair-cpu-arguments":80436,"fstPair-memory-arguments":32,"headList-cpu-arguments":43249,"headList-memory-arguments":32,"iData-cpu-arguments":1e3,"iData-memory-arguments":32,"ifThenElse-cpu-arguments":80556,"ifThenElse-memory-arguments":1,"indexByteString-cpu-arguments":57667,"indexByteString-memory-arguments":4,"lengthOfByteString-cpu-arguments":1e3,"lengthOfByteString-memory-arguments":10,"lessThanByteString-cpu-arguments-intercept":197145,"lessThanByteString-cpu-arguments-slope":156,"lessThanByteString-memory-arguments":1,"lessThanEqualsByteString-cpu-arguments-intercept":197145,"lessThanEqualsByteString-cpu-arguments-slope":156,"lessThanEqualsByteString-memory-arguments":1,"lessThanEqualsInteger-cpu-arguments-intercept":204924,"lessThanEqualsInteger-cpu-arguments-slope":473,"lessThanEqualsInteger-memory-arguments":1,"lessThanInteger-cpu-arguments-intercept":208896,"lessThanInteger-cpu-arguments-slope":511,"lessThanInteger-memory-arguments":1,"listData-cpu-arguments":52467,"listData-memory-arguments":32,"mapData-cpu-arguments":64832,"mapData-memory-arguments":32,"mkCons-cpu-arguments":65493,"mkCons-memory-arguments":32,"mkNilData-cpu-arguments":22558,"mkNilData-memory-arguments":32,"mkNilPairData-cpu-arguments":16563,"mkNilPairData-memory-arguments":32,"mkPairData-cpu-arguments":76511,"mkPairData-memory-arguments":32,"modInteger-cpu-arguments-constant":196500,"modInteger-cpu-arguments-model-arguments-intercept":453240,"modInteger-cpu-arguments-model-arguments-slope":220,"modInteger-memory-arguments-intercept":0,"modInteger-memory-arguments-minimum":1,"modInteger-memory-arguments-slope":1,"multiplyInteger-cpu-arguments-intercept":69522,"multiplyInteger-cpu-arguments-slope":11687,"multiplyInteger-memory-arguments-intercept":0,"multiplyInteger-memory-arguments-slope":1,"nullList-cpu-arguments":60091,"nullList-memory-arguments":32,"quotientInteger-cpu-arguments-constant":196500,"quotientInteger-cpu-arguments-model-arguments-intercept":453240,"quotientInteger-cpu-arguments-model-arguments-slope":220,"quotientInteger-memory-arguments-intercept":0,"quotientInteger-memory-arguments-minimum":1,"quotientInteger-memory-arguments-slope":1,"remainderInteger-cpu-arguments-constant":196500,"remainderInteger-cpu-arguments-model-arguments-intercept":453240,"remainderInteger-cpu-arguments-model-arguments-slope":220,"remainderInteger-memory-arguments-intercept":0,"remainderInteger-memory-arguments-minimum":1,"remainderInteger-memory-arguments-slope":1,"sha2_256-cpu-arguments-intercept":806990,"sha2_256-cpu-arguments-slope":30482,"sha2_256-memory-arguments":4,"sha3_256-cpu-arguments-intercept":1927926,"sha3_256-cpu-arguments-slope":82523,"sha3_256-memory-arguments":4,"sliceByteString-cpu-arguments-intercept":265318,"sliceByteString-cpu-arguments-slope":0,"sliceByteString-memory-arguments-intercept":4,"sliceByteString-memory-arguments-slope":0,"sndPair-cpu-arguments":85931,"sndPair-memory-arguments":32,"subtractInteger-cpu-arguments-intercept":205665,"subtractInteger-cpu-arguments-slope":812,"subtractInteger-memory-arguments-intercept":1,"subtractInteger-memory-arguments-slope":1,"tailList-cpu-arguments":41182,"tailList-memory-arguments":32,"trace-cpu-arguments":212342,"trace-memory-arguments":32,"unBData-cpu-arguments":31220,"unBData-memory-arguments":32,"unConstrData-cpu-arguments":32696,"unConstrData-memory-arguments":32,"unIData-cpu-arguments":43357,"unIData-memory-arguments":32,"unListData-cpu-arguments":32247,"unListData-memory-arguments":32,"unMapData-cpu-arguments":38314,"unMapData-memory-arguments":32,"verifyEd25519Signature-cpu-arguments-intercept":57996947,"verifyEd25519Signature-cpu-arguments-slope":18975,"verifyEd25519Signature-memory-arguments":10}).forEach((w,b)=>d.set(b,y.exports.Int.new_i32(w)));const t=y.exports.CostModel.new();return Object.values({"addInteger-cpu-arguments-intercept":205665,"addInteger-cpu-arguments-slope":812,"addInteger-memory-arguments-intercept":1,"addInteger-memory-arguments-slope":1,"appendByteString-cpu-arguments-intercept":1e3,"appendByteString-cpu-arguments-slope":571,"appendByteString-memory-arguments-intercept":0,"appendByteString-memory-arguments-slope":1,"appendString-cpu-arguments-intercept":1e3,"appendString-cpu-arguments-slope":24177,"appendString-memory-arguments-intercept":4,"appendString-memory-arguments-slope":1,"bData-cpu-arguments":1e3,"bData-memory-arguments":32,"blake2b_256-cpu-arguments-intercept":117366,"blake2b_256-cpu-arguments-slope":10475,"blake2b_256-memory-arguments":4,"cekApplyCost-exBudgetCPU":23e3,"cekApplyCost-exBudgetMemory":100,"cekBuiltinCost-exBudgetCPU":23e3,"cekBuiltinCost-exBudgetMemory":100,"cekConstCost-exBudgetCPU":23e3,"cekConstCost-exBudgetMemory":100,"cekDelayCost-exBudgetCPU":23e3,"cekDelayCost-exBudgetMemory":100,"cekForceCost-exBudgetCPU":23e3,"cekForceCost-exBudgetMemory":100,"cekLamCost-exBudgetCPU":23e3,"cekLamCost-exBudgetMemory":100,"cekStartupCost-exBudgetCPU":100,"cekStartupCost-exBudgetMemory":100,"cekVarCost-exBudgetCPU":23e3,"cekVarCost-exBudgetMemory":100,"chooseData-cpu-arguments":19537,"chooseData-memory-arguments":32,"chooseList-cpu-arguments":175354,"chooseList-memory-arguments":32,"chooseUnit-cpu-arguments":46417,"chooseUnit-memory-arguments":4,"consByteString-cpu-arguments-intercept":221973,"consByteString-cpu-arguments-slope":511,"consByteString-memory-arguments-intercept":0,"consByteString-memory-arguments-slope":1,"constrData-cpu-arguments":89141,"constrData-memory-arguments":32,"decodeUtf8-cpu-arguments-intercept":497525,"decodeUtf8-cpu-arguments-slope":14068,"decodeUtf8-memory-arguments-intercept":4,"decodeUtf8-memory-arguments-slope":2,"divideInteger-cpu-arguments-constant":196500,"divideInteger-cpu-arguments-model-arguments-intercept":453240,"divideInteger-cpu-arguments-model-arguments-slope":220,"divideInteger-memory-arguments-intercept":0,"divideInteger-memory-arguments-minimum":1,"divideInteger-memory-arguments-slope":1,"encodeUtf8-cpu-arguments-intercept":1e3,"encodeUtf8-cpu-arguments-slope":28662,"encodeUtf8-memory-arguments-intercept":4,"encodeUtf8-memory-arguments-slope":2,"equalsByteString-cpu-arguments-constant":245e3,"equalsByteString-cpu-arguments-intercept":216773,"equalsByteString-cpu-arguments-slope":62,"equalsByteString-memory-arguments":1,"equalsData-cpu-arguments-intercept":1060367,"equalsData-cpu-arguments-slope":12586,"equalsData-memory-arguments":1,"equalsInteger-cpu-arguments-intercept":208512,"equalsInteger-cpu-arguments-slope":421,"equalsInteger-memory-arguments":1,"equalsString-cpu-arguments-constant":187e3,"equalsString-cpu-arguments-intercept":1e3,"equalsString-cpu-arguments-slope":52998,"equalsString-memory-arguments":1,"fstPair-cpu-arguments":80436,"fstPair-memory-arguments":32,"headList-cpu-arguments":43249,"headList-memory-arguments":32,"iData-cpu-arguments":1e3,"iData-memory-arguments":32,"ifThenElse-cpu-arguments":80556,"ifThenElse-memory-arguments":1,"indexByteString-cpu-arguments":57667,"indexByteString-memory-arguments":4,"lengthOfByteString-cpu-arguments":1e3,"lengthOfByteString-memory-arguments":10,"lessThanByteString-cpu-arguments-intercept":197145,"lessThanByteString-cpu-arguments-slope":156,"lessThanByteString-memory-arguments":1,"lessThanEqualsByteString-cpu-arguments-intercept":197145,"lessThanEqualsByteString-cpu-arguments-slope":156,"lessThanEqualsByteString-memory-arguments":1,"lessThanEqualsInteger-cpu-arguments-intercept":204924,"lessThanEqualsInteger-cpu-arguments-slope":473,"lessThanEqualsInteger-memory-arguments":1,"lessThanInteger-cpu-arguments-intercept":208896,"lessThanInteger-cpu-arguments-slope":511,"lessThanInteger-memory-arguments":1,"listData-cpu-arguments":52467,"listData-memory-arguments":32,"mapData-cpu-arguments":64832,"mapData-memory-arguments":32,"mkCons-cpu-arguments":65493,"mkCons-memory-arguments":32,"mkNilData-cpu-arguments":22558,"mkNilData-memory-arguments":32,"mkNilPairData-cpu-arguments":16563,"mkNilPairData-memory-arguments":32,"mkPairData-cpu-arguments":76511,"mkPairData-memory-arguments":32,"modInteger-cpu-arguments-constant":196500,"modInteger-cpu-arguments-model-arguments-intercept":453240,"modInteger-cpu-arguments-model-arguments-slope":220,"modInteger-memory-arguments-intercept":0,"modInteger-memory-arguments-minimum":1,"modInteger-memory-arguments-slope":1,"multiplyInteger-cpu-arguments-intercept":69522,"multiplyInteger-cpu-arguments-slope":11687,"multiplyInteger-memory-arguments-intercept":0,"multiplyInteger-memory-arguments-slope":1,"nullList-cpu-arguments":60091,"nullList-memory-arguments":32,"quotientInteger-cpu-arguments-constant":196500,"quotientInteger-cpu-arguments-model-arguments-intercept":453240,"quotientInteger-cpu-arguments-model-arguments-slope":220,"quotientInteger-memory-arguments-intercept":0,"quotientInteger-memory-arguments-minimum":1,"quotientInteger-memory-arguments-slope":1,"remainderInteger-cpu-arguments-constant":196500,"remainderInteger-cpu-arguments-model-arguments-intercept":453240,"remainderInteger-cpu-arguments-model-arguments-slope":220,"remainderInteger-memory-arguments-intercept":0,"remainderInteger-memory-arguments-minimum":1,"remainderInteger-memory-arguments-slope":1,"serialiseData-cpu-arguments-intercept":1159724,"serialiseData-cpu-arguments-slope":392670,"serialiseData-memory-arguments-intercept":0,"serialiseData-memory-arguments-slope":2,"sha2_256-cpu-arguments-intercept":806990,"sha2_256-cpu-arguments-slope":30482,"sha2_256-memory-arguments":4,"sha3_256-cpu-arguments-intercept":1927926,"sha3_256-cpu-arguments-slope":82523,"sha3_256-memory-arguments":4,"sliceByteString-cpu-arguments-intercept":265318,"sliceByteString-cpu-arguments-slope":0,"sliceByteString-memory-arguments-intercept":4,"sliceByteString-memory-arguments-slope":0,"sndPair-cpu-arguments":85931,"sndPair-memory-arguments":32,"subtractInteger-cpu-arguments-intercept":205665,"subtractInteger-cpu-arguments-slope":812,"subtractInteger-memory-arguments-intercept":1,"subtractInteger-memory-arguments-slope":1,"tailList-cpu-arguments":41182,"tailList-memory-arguments":32,"trace-cpu-arguments":212342,"trace-memory-arguments":32,"unBData-cpu-arguments":31220,"unBData-memory-arguments":32,"unConstrData-cpu-arguments":32696,"unConstrData-memory-arguments":32,"unIData-cpu-arguments":43357,"unIData-memory-arguments":32,"unListData-cpu-arguments":32247,"unListData-memory-arguments":32,"unMapData-cpu-arguments":38314,"unMapData-memory-arguments":32,"verifyEcdsaSecp256k1Signature-cpu-arguments":35892428,"verifyEcdsaSecp256k1Signature-memory-arguments":10,"verifyEd25519Signature-cpu-arguments-intercept":57996947,"verifyEd25519Signature-cpu-arguments-slope":18975,"verifyEd25519Signature-memory-arguments":10,"verifySchnorrSecp256k1Signature-cpu-arguments-intercept":38887044,"verifySchnorrSecp256k1Signature-cpu-arguments-slope":32947,"verifySchnorrSecp256k1Signature-memory-arguments":10}).forEach((w,b)=>t.set(b,y.exports.Int.new_i32(w))),c.insert(y.exports.Language.new_plutus_v1(),d),c.insert(y.exports.Language.new_plutus_v2(),t),c})()},rs={ALONZO:{V1:"a141005901d59f1a000302590001011a00060bc719026d00011a000249f01903e800011a000249f018201a0025cea81971f70419744d186419744d186419744d186419744d186419744d186419744d18641864186419744d18641a000249f018201a000249f018201a000249f018201a000249f01903e800011a000249f018201a000249f01903e800081a000242201a00067e2318760001011a000249f01903e800081a000249f01a0001b79818f7011a000249f0192710011a0002155e19052e011903e81a000249f01903e8011a000249f018201a000249f018201a000249f0182001011a000249f0011a000249f0041a000194af18f8011a000194af18f8011a0002377c190556011a0002bdea1901f1011a000249f018201a000249f018201a000249f018201a000249f018201a000249f018201a000249f018201a000242201a00067e23187600010119f04c192bd200011a000249f018201a000242201a00067e2318760001011a000242201a00067e2318760001011a0025cea81971f704001a000141bb041a000249f019138800011a000249f018201a000302590001011a000249f018201a000249f018201a000249f018201a000249f018201a000249f018201a000249f018201a000249f018201a00330da70101ff"},BABBAGE:{V1:"a141005901b69f1a0003236119032c01011903e819023b00011903e8195e7104011903e818201a0001ca761928eb041959d818641959d818641959d818641959d818641959d818641959d81864186418641959d81864194c5118201a0002acfa182019b551041a000363151901ff00011a00015c3518201a000797751936f404021a0002ff941a0006ea7818dc0001011903e8196ff604021a0003bd081a00034ec5183e011a00102e0f19312a011a00032e801901a5011a0002da781903e819cf06011a00013a34182019a8f118201903e818201a00013aac0119e143041903e80a1a00030219189c011a00030219189c011a0003207c1901d9011a000330001901ff0119ccf3182019fd40182019ffd5182019581e18201940b318201a00012adf18201a0002ff941a0006ea7818dc0001011a00010f92192da7000119eabb18201a0002ff941a0006ea7818dc0001011a0002ff941a0006ea7818dc0001011a000c504e197712041a001d6af61a0001425b041a00040c660004001a00014fab18201a0003236119032c010119a0de18201a00033d7618201979f41820197fb8182019a95d1820197df718201995aa18201a009063b91903fd0aff",V2:"a20198af1a0003236119032c01011903e819023b00011903e8195e7104011903e818201a0001ca761928eb041959d818641959d818641959d818641959d818641959d818641959d81864186418641959d81864194c5118201a0002acfa182019b551041a000363151901ff00011a00015c3518201a000797751936f404021a0002ff941a0006ea7818dc0001011903e8196ff604021a0003bd081a00034ec5183e011a00102e0f19312a011a00032e801901a5011a0002da781903e819cf06011a00013a34182019a8f118201903e818201a00013aac0119e143041903e80a1a00030219189c011a00030219189c011a0003207c1901d9011a000330001901ff0119ccf3182019fd40182019ffd5182019581e18201940b318201a00012adf18201a0002ff941a0006ea7818dc0001011a00010f92192da7000119eabb18201a0002ff941a0006ea7818dc0001011a0002ff941a0006ea7818dc0001011a0011b22c1a0005fdde00021a000c504e197712041a001d6af61a0001425b041a00040c660004001a00014fab18201a0003236119032c010119a0de18201a00033d7618201979f41820197fb8182019a95d1820197df718201995aa18201b00000004a817c8001b00000004a817c8001a009063b91903fd0a1b00000004a817c800001b00000004a817c80041005901b69f1a0003236119032c01011903e819023b00011903e8195e7104011903e818201a0001ca761928eb041959d818641959d818641959d818641959d818641959d818641959d81864186418641959d81864194c5118201a0002acfa182019b551041a000363151901ff00011a00015c3518201a000797751936f404021a0002ff941a0006ea7818dc0001011903e8196ff604021a0003bd081a00034ec5183e011a00102e0f19312a011a00032e801901a5011a0002da781903e819cf06011a00013a34182019a8f118201903e818201a00013aac0119e143041903e80a1a00030219189c011a00030219189c011a0003207c1901d9011a000330001901ff0119ccf3182019fd40182019ffd5182019581e18201940b318201a00012adf18201a0002ff941a0006ea7818dc0001011a00010f92192da7000119eabb18201a0002ff941a0006ea7818dc0001011a0002ff941a0006ea7818dc0001011a000c504e197712041a001d6af61a0001425b041a00040c660004001a00014fab18201a0003236119032c010119a0de18201a00033d7618201979f41820197fb8182019a95d1820197df718201995aa18201a009063b91903fd0aff"}},bn={[y.exports.NetworkInfo.testnet().network_id()]:"8d18d786e92776c824607fd8e193ec535c79dc61ea2405ddf3b09fe3",[y.exports.NetworkInfo.mainnet().network_id()]:"f0ff48bbb7bbe9d59a40f1ce90e9e9d0ff5002ec48f232b49ca0fb9a"},ns={mainnet:"wss://ogmios-api.mainnet.dandelion.link",preprod:"wss://ogmios-api.iohk-preprod.dandelion.link",preview:"__TBD_SOON_TM__",testnet:"wss://ogmios-api.testnet.dandelion.link"},as={LQ:"da8c30857834c6ae7203935b89278c532b3995245295456f993e1d244c51",MIN:"29d222ce763455e3d7a09a665ce554f00ac89d2e99a1a83d267170c64d494e",NTX:"edfd7a1d77bcb8b884c474bdc92a16002d1fb720e454fa6e993444794e5458",iBTC:"f66d78b4a3cb3d37afa0ec36461e51ecbde00f26c8f0a68f94b6988069425443",iETH:"f66d78b4a3cb3d37afa0ec36461e51ecbde00f26c8f0a68f94b6988069455448",iUSD:"f66d78b4a3cb3d37afa0ec36461e51ecbde00f26c8f0a68f94b6988069555344",MILK:"8a1cfae21368b8bebbbed9800fec304e95cce39a2a57dc35e2e3ebaa4d494c4b",AGIX:"f43a62fdc3965df486de8a0d32fe800963589c41b38946602a0dc53541474958",MELD:"6ac8ef33b510ec004fe11585f7c5a9f0c07f0c23428ab4f29c1d7d104d454c44",INDY:"533bb94a8850ee3ccbe483106489399112b74c905342cb1792a797a0494e4459",CLAY:"38ad9dc3aec6a2f38e220142b9aa6ade63ebe71f65e7cc2b7d8a8535434c4159",MCOS:"6f46e1304b16d884c85c62fb0eef35028facdc41aaa0fd319a152ed64d434f53",DING:"ce5b9e0f8a88255b65f2e4d065c6e716e9fa9a8a86dfb86423dd1ac044494e47",GERO:"10a49b996e2402269af553a8a96fb8eb90d79e9eca79e2b4223057b64745524f",NMKR:"5dac8536653edc12f6f5e1045d8164b9f59998d3bdc300fc928434894e4d4b52",PAVIA:"884892bcdc360bcef87d6b3f806e7f9cd5ac30d999d49970e7a903ae5041564941",HOSKY:"a0028f350aaabe0545fdcb56b039bfb08e4bb4d8c4d7c3c7d481c235484f534b59",YUMMI:"078eafce5cd7edafdf63900edef2c1ea759e77f30ca81d6bbdeec92479756d6d69",C3:"8e51398904a5d3fc129fbf4f1589701de23c7824d5c90fdb9490e15a434841524c4933",GIMBAL:"2b0a04a7b60132b1805b296c7fcb3b217ff14413991bf76f72663c3067696d62616c",SUNDAE:"9a9693a9a37912a5097918f97918d15240c92ab729a0b7c4aa144d7753554e444145",GREENS:"4623ab311b7d982d8d26fcbe1a9439ca56661aafcdcd8d8a0ef31fd6475245454e53",GENS:"dda5fdb1002f7389b33e036b6afee82a8189becb6cba852e8b79b4fb0014df1047454e53",SOCIETY:"25f0fc240e91bd95dcdaebd2ba7713fc5168ac77234a3d79449fc20c534f4349455459",DJED:"8db269c3ec630e06ae29f74bc39edd1f87c819f1056206e879a1cd61446a65644d6963726f555344",SHEN:"8db269c3ec630e06ae29f74bc39edd1f87c819f1056206e879a1cd615368656e4d6963726f555344",WMT:"1d7f33bd23d85e1a25d87d86fac4f199c3197a2f7afeb662a0f34e1e776f726c646d6f62696c65746f6b656e",COPI:"b6a7467ea1deb012808ef4e87b5ff371e85f7142d7b356a40d9b42a0436f726e75636f70696173205b76696120436861696e506f72742e696f5d"},In=["begin","eternl","flint","lace","nami","nufi","gerowallet","typhoncip30","vespr","yoroi"],Jn=(c,d,t="5000000")=>{const w=y.exports.BigNum.from_str(c.get("lovelace")??"0").checked_add(y.exports.BigNum.from_str(t)),b=d.filter(j=>j.output.amount.filter(P=>P.unit!=="lovelace").some(P=>c.has(P.unit))),h=ds(b);return[...h.less_than(w)?cs(w.clamped_sub(h).to_str(),d.filter(j=>!b.some(P=>P.input.txHash===j.input.txHash&&P.input.outputIndex===j.input.outputIndex))):[],...b]},ss=(c,d,t=!1,{maxTxSize:w,minFeeA:b,minFeeB:h}=v_)=>{const k=d.filter(Y=>Xn(Y)===!1).sort(un),j=y.exports.BigNum.from_str(mn(w,b,h)),P=t?y.exports.BigNum.from_str(c).checked_add(j).to_str():c;return Ar(k,new Map([["lovelace",P]]))},Wn=(c,d,t=!1,w=v_)=>{const b=d.filter(Xn).sort(un),h=is(w),k=c.get("lovelace")??"0",j=t?y.exports.BigNum.from_str(k).checked_add(h).to_str():k;return c.set("lovelace",j),Ar(b,c)},os=(c,d)=>Array.from(d,t=>({unit:t[0],quantity:y.exports.BigNum.from_str(t[1])})).every(t=>c.filter(w=>w.output.amount.find(b=>b.unit===t.unit)!==void 0).reduce((w,b)=>{const h=b.output.amount.reduce((k,j)=>k.checked_add(y.exports.BigNum.from_str(t.unit===j.unit?j.quantity:"0")),y.exports.BigNum.from_str("0"));return w.checked_add(h)},y.exports.BigNum.from_str("0")).less_than(t.quantity)===!1),un=(c,d)=>{var b,h;const t=y.exports.BigNum.from_str(((b=c.output.amount.find(k=>k.unit==="lovelace"))==null?void 0:b.quantity)??"0");return y.exports.BigNum.from_str(((h=d.output.amount.find(k=>k.unit==="lovelace"))==null?void 0:h.quantity)??"0").compare(t)},is=c=>{const{maxTxSize:d,minFeeA:t,minFeeB:w}=c;return y.exports.BigNum.from_str(mn(d,t,w))},Xn=c=>c.output.amount.length>1,ds=c=>c.reduce((d,t)=>{var b;const w=((b=t.output.amount.find(h=>h.unit==="lovelace"))==null?void 0:b.quantity)??"0";return d.checked_add(y.exports.BigNum.from_str(w))},y.exports.BigNum.from_str("0")),cs=(c,d)=>{const t=d.sort(un);return Ar(t,new Map([["lovelace",c]]))},Ar=(c,d,t=[])=>c.length===0||os(t,d)?t:ps(c[0],d)?Ar(c.slice(1),d,[...t,c[0]]):Ar(c.slice(1),d,t),ps=(c,d)=>Array.from(d.keys()).some(t=>c.output.amount.find(w=>w.unit===t)!==void 0),ws=(c,d)=>{const t=bs(d),w=us(c,d);return{coseKey:d_(t.to_bytes()),coseSign1:d_(w.to_bytes())}},ls=(c,d,{key:t,signature:w})=>{var k,j;const b=jt.COSEKey.from_bytes(kt(t)),h=jt.COSESign1.from_bytes(kt(w));if((c==null?void 0:c.length)>0){const P=d_(h.payload()??new Uint8Array);if(a_(c)!==P)return!1}if((d==null?void 0:d.length)>0){const p=(k=h.headers().protected().deserialized_headers().header(jt.Label.new_text("address")))==null?void 0:k.as_bytes();if(p===void 0)throw new Error("Couldn't find a signer address in signature");const z=(j=b.header(jt.Label.new_int(jt.Int.new_negative(jt.BigNum.from_str("2")))))==null?void 0:j.as_bytes();if(z===void 0)throw new Error("Couldn't find a signer key in signature");const Y=ir(d_(p)),q=Rs(d_(z));if(gs(d,Y,q)===!1)throw new Error("Couldn't check signature because of address mismatch");const m=qs(d_(h.signature())),G=h.signed_data().to_bytes();return q.verify(G,m)}return!1},gs=(c,d,t)=>{if(c!==d.to_bech32())return!1;try{return cr(c)===t.hash().to_hex()}catch{return!1}},bs=c=>{const d=jt.COSEKey.new(jt.Label.from_key_type(jt.KeyType.OKP));return d.set_algorithm_id(jt.Label.from_algorithm_id(jt.AlgorithmId.EdDSA)),d.set_header(jt.Label.new_int(jt.Int.new_negative(jt.BigNum.from_str("1"))),jt.CBORValue.new_int(jt.Int.new_i32(6))),d.set_header(jt.Label.new_int(jt.Int.new_negative(jt.BigNum.from_str("2"))),jt.CBORValue.new_bytes(c.key.to_public().as_bytes())),d},us=(c,d)=>{const t=jt.HeaderMap.new(),w=jt.HeaderMap.new();t.set_algorithm_id(jt.Label.from_algorithm_id(jt.AlgorithmId.EdDSA)),t.set_header(jt.Label.new_text("address"),jt.CBORValue.new_bytes(d.address.to_bytes()));const b=jt.Headers.new(jt.ProtectedHeaderMap.new(t),w),h=jt.COSESign1Builder.new(b,kt(c.payload),!1);c.externalAAD!==void 0&&h.set_external_aad(kt(c.externalAAD));const k=h.make_data_to_sign(),j=d.key.sign(k.to_bytes());return h.build(j.to_bytes())};var Zn={},s_={exports:{}};Se.notEqual=hs;Se.notOk=ys;Se.equal=fs;Se.ok=Se;var ta=Se;function fs(c,d,t){Se(c==d,t)}function hs(c,d,t){Se(c!=d,t)}function ys(c,d){Se(!c,d)}function Se(c,d){if(!c)throw new Error(d||"AssertionError")}var G_={exports:{}},vs=fn;fn.supported=typeof WebAssembly<"u";function fn(c){if(!fn.supported)return null;var d=c&&c.imports,t=ms("AGFzbQEAAAABEANgAn9/AGADf39/AGABfwADBQQAAQICBQUBAQroBwdNBQZtZW1vcnkCAAxibGFrZTJiX2luaXQAAA5ibGFrZTJiX3VwZGF0ZQABDWJsYWtlMmJfZmluYWwAAhBibGFrZTJiX2NvbXByZXNzAAMK00AElgMAIABCADcDACAAQQhqQgA3AwAgAEEQakIANwMAIABBGGpCADcDACAAQSBqQgA3AwAgAEEoakIANwMAIABBMGpCADcDACAAQThqQgA3AwAgAEHAAGpCADcDACAAQcgAakIANwMAIABB0ABqQgA3AwAgAEHYAGpCADcDACAAQeAAakIANwMAIABB6ABqQgA3AwAgAEHwAGpCADcDACAAQfgAakIANwMAIABBgAFqQoiS853/zPmE6gBBACkDAIU3AwAgAEGIAWpCu86qptjQ67O7f0EIKQMAhTcDACAAQZABakKr8NP0r+68tzxBECkDAIU3AwAgAEGYAWpC8e30+KWn/aelf0EYKQMAhTcDACAAQaABakLRhZrv+s+Uh9EAQSApAwCFNwMAIABBqAFqQp/Y+dnCkdqCm39BKCkDAIU3AwAgAEGwAWpC6/qG2r+19sEfQTApAwCFNwMAIABBuAFqQvnC+JuRo7Pw2wBBOCkDAIU3AwAgAEHAAWpCADcDACAAQcgBakIANwMAIABB0AFqQgA3AwALbQEDfyAAQcABaiEDIABByAFqIQQgBCkDAKchBQJAA0AgASACRg0BIAVBgAFGBEAgAyADKQMAIAWtfDcDAEEAIQUgABADCyAAIAVqIAEtAAA6AAAgBUEBaiEFIAFBAWohAQwACwsgBCAFrTcDAAtkAQN/IABBwAFqIQEgAEHIAWohAiABIAEpAwAgAikDAHw3AwAgAEHQAWpCfzcDACACKQMApyEDAkADQCADQYABRg0BIAAgA2pBADoAACADQQFqIQMMAAsLIAIgA603AwAgABADC+U7AiB+CX8gAEGAAWohISAAQYgBaiEiIABBkAFqISMgAEGYAWohJCAAQaABaiElIABBqAFqISYgAEGwAWohJyAAQbgBaiEoICEpAwAhASAiKQMAIQIgIykDACEDICQpAwAhBCAlKQMAIQUgJikDACEGICcpAwAhByAoKQMAIQhCiJLznf/M+YTqACEJQrvOqqbY0Ouzu38hCkKr8NP0r+68tzwhC0Lx7fT4paf9p6V/IQxC0YWa7/rPlIfRACENQp/Y+dnCkdqCm38hDkLr+obav7X2wR8hD0L5wvibkaOz8NsAIRAgACkDACERIABBCGopAwAhEiAAQRBqKQMAIRMgAEEYaikDACEUIABBIGopAwAhFSAAQShqKQMAIRYgAEEwaikDACEXIABBOGopAwAhGCAAQcAAaikDACEZIABByABqKQMAIRogAEHQAGopAwAhGyAAQdgAaikDACEcIABB4ABqKQMAIR0gAEHoAGopAwAhHiAAQfAAaikDACEfIABB+ABqKQMAISAgDSAAQcABaikDAIUhDSAPIABB0AFqKQMAhSEPIAEgBSARfHwhASANIAGFQiCKIQ0gCSANfCEJIAUgCYVCGIohBSABIAUgEnx8IQEgDSABhUIQiiENIAkgDXwhCSAFIAmFQj+KIQUgAiAGIBN8fCECIA4gAoVCIIohDiAKIA58IQogBiAKhUIYiiEGIAIgBiAUfHwhAiAOIAKFQhCKIQ4gCiAOfCEKIAYgCoVCP4ohBiADIAcgFXx8IQMgDyADhUIgiiEPIAsgD3whCyAHIAuFQhiKIQcgAyAHIBZ8fCEDIA8gA4VCEIohDyALIA98IQsgByALhUI/iiEHIAQgCCAXfHwhBCAQIASFQiCKIRAgDCAQfCEMIAggDIVCGIohCCAEIAggGHx8IQQgECAEhUIQiiEQIAwgEHwhDCAIIAyFQj+KIQggASAGIBl8fCEBIBAgAYVCIIohECALIBB8IQsgBiALhUIYiiEGIAEgBiAafHwhASAQIAGFQhCKIRAgCyAQfCELIAYgC4VCP4ohBiACIAcgG3x8IQIgDSAChUIgiiENIAwgDXwhDCAHIAyFQhiKIQcgAiAHIBx8fCECIA0gAoVCEIohDSAMIA18IQwgByAMhUI/iiEHIAMgCCAdfHwhAyAOIAOFQiCKIQ4gCSAOfCEJIAggCYVCGIohCCADIAggHnx8IQMgDiADhUIQiiEOIAkgDnwhCSAIIAmFQj+KIQggBCAFIB98fCEEIA8gBIVCIIohDyAKIA98IQogBSAKhUIYiiEFIAQgBSAgfHwhBCAPIASFQhCKIQ8gCiAPfCEKIAUgCoVCP4ohBSABIAUgH3x8IQEgDSABhUIgiiENIAkgDXwhCSAFIAmFQhiKIQUgASAFIBt8fCEBIA0gAYVCEIohDSAJIA18IQkgBSAJhUI/iiEFIAIgBiAVfHwhAiAOIAKFQiCKIQ4gCiAOfCEKIAYgCoVCGIohBiACIAYgGXx8IQIgDiAChUIQiiEOIAogDnwhCiAGIAqFQj+KIQYgAyAHIBp8fCEDIA8gA4VCIIohDyALIA98IQsgByALhUIYiiEHIAMgByAgfHwhAyAPIAOFQhCKIQ8gCyAPfCELIAcgC4VCP4ohByAEIAggHnx8IQQgECAEhUIgiiEQIAwgEHwhDCAIIAyFQhiKIQggBCAIIBd8fCEEIBAgBIVCEIohECAMIBB8IQwgCCAMhUI/iiEIIAEgBiASfHwhASAQIAGFQiCKIRAgCyAQfCELIAYgC4VCGIohBiABIAYgHXx8IQEgECABhUIQiiEQIAsgEHwhCyAGIAuFQj+KIQYgAiAHIBF8fCECIA0gAoVCIIohDSAMIA18IQwgByAMhUIYiiEHIAIgByATfHwhAiANIAKFQhCKIQ0gDCANfCEMIAcgDIVCP4ohByADIAggHHx8IQMgDiADhUIgiiEOIAkgDnwhCSAIIAmFQhiKIQggAyAIIBh8fCEDIA4gA4VCEIohDiAJIA58IQkgCCAJhUI/iiEIIAQgBSAWfHwhBCAPIASFQiCKIQ8gCiAPfCEKIAUgCoVCGIohBSAEIAUgFHx8IQQgDyAEhUIQiiEPIAogD3whCiAFIAqFQj+KIQUgASAFIBx8fCEBIA0gAYVCIIohDSAJIA18IQkgBSAJhUIYiiEFIAEgBSAZfHwhASANIAGFQhCKIQ0gCSANfCEJIAUgCYVCP4ohBSACIAYgHXx8IQIgDiAChUIgiiEOIAogDnwhCiAGIAqFQhiKIQYgAiAGIBF8fCECIA4gAoVCEIohDiAKIA58IQogBiAKhUI/iiEGIAMgByAWfHwhAyAPIAOFQiCKIQ8gCyAPfCELIAcgC4VCGIohByADIAcgE3x8IQMgDyADhUIQiiEPIAsgD3whCyAHIAuFQj+KIQcgBCAIICB8fCEEIBAgBIVCIIohECAMIBB8IQwgCCAMhUIYiiEIIAQgCCAefHwhBCAQIASFQhCKIRAgDCAQfCEMIAggDIVCP4ohCCABIAYgG3x8IQEgECABhUIgiiEQIAsgEHwhCyAGIAuFQhiKIQYgASAGIB98fCEBIBAgAYVCEIohECALIBB8IQsgBiALhUI/iiEGIAIgByAUfHwhAiANIAKFQiCKIQ0gDCANfCEMIAcgDIVCGIohByACIAcgF3x8IQIgDSAChUIQiiENIAwgDXwhDCAHIAyFQj+KIQcgAyAIIBh8fCEDIA4gA4VCIIohDiAJIA58IQkgCCAJhUIYiiEIIAMgCCASfHwhAyAOIAOFQhCKIQ4gCSAOfCEJIAggCYVCP4ohCCAEIAUgGnx8IQQgDyAEhUIgiiEPIAogD3whCiAFIAqFQhiKIQUgBCAFIBV8fCEEIA8gBIVCEIohDyAKIA98IQogBSAKhUI/iiEFIAEgBSAYfHwhASANIAGFQiCKIQ0gCSANfCEJIAUgCYVCGIohBSABIAUgGnx8IQEgDSABhUIQiiENIAkgDXwhCSAFIAmFQj+KIQUgAiAGIBR8fCECIA4gAoVCIIohDiAKIA58IQogBiAKhUIYiiEGIAIgBiASfHwhAiAOIAKFQhCKIQ4gCiAOfCEKIAYgCoVCP4ohBiADIAcgHnx8IQMgDyADhUIgiiEPIAsgD3whCyAHIAuFQhiKIQcgAyAHIB18fCEDIA8gA4VCEIohDyALIA98IQsgByALhUI/iiEHIAQgCCAcfHwhBCAQIASFQiCKIRAgDCAQfCEMIAggDIVCGIohCCAEIAggH3x8IQQgECAEhUIQiiEQIAwgEHwhDCAIIAyFQj+KIQggASAGIBN8fCEBIBAgAYVCIIohECALIBB8IQsgBiALhUIYiiEGIAEgBiAXfHwhASAQIAGFQhCKIRAgCyAQfCELIAYgC4VCP4ohBiACIAcgFnx8IQIgDSAChUIgiiENIAwgDXwhDCAHIAyFQhiKIQcgAiAHIBt8fCECIA0gAoVCEIohDSAMIA18IQwgByAMhUI/iiEHIAMgCCAVfHwhAyAOIAOFQiCKIQ4gCSAOfCEJIAggCYVCGIohCCADIAggEXx8IQMgDiADhUIQiiEOIAkgDnwhCSAIIAmFQj+KIQggBCAFICB8fCEEIA8gBIVCIIohDyAKIA98IQogBSAKhUIYiiEFIAQgBSAZfHwhBCAPIASFQhCKIQ8gCiAPfCEKIAUgCoVCP4ohBSABIAUgGnx8IQEgDSABhUIgiiENIAkgDXwhCSAFIAmFQhiKIQUgASAFIBF8fCEBIA0gAYVCEIohDSAJIA18IQkgBSAJhUI/iiEFIAIgBiAWfHwhAiAOIAKFQiCKIQ4gCiAOfCEKIAYgCoVCGIohBiACIAYgGHx8IQIgDiAChUIQiiEOIAogDnwhCiAGIAqFQj+KIQYgAyAHIBN8fCEDIA8gA4VCIIohDyALIA98IQsgByALhUIYiiEHIAMgByAVfHwhAyAPIAOFQhCKIQ8gCyAPfCELIAcgC4VCP4ohByAEIAggG3x8IQQgECAEhUIgiiEQIAwgEHwhDCAIIAyFQhiKIQggBCAIICB8fCEEIBAgBIVCEIohECAMIBB8IQwgCCAMhUI/iiEIIAEgBiAffHwhASAQIAGFQiCKIRAgCyAQfCELIAYgC4VCGIohBiABIAYgEnx8IQEgECABhUIQiiEQIAsgEHwhCyAGIAuFQj+KIQYgAiAHIBx8fCECIA0gAoVCIIohDSAMIA18IQwgByAMhUIYiiEHIAIgByAdfHwhAiANIAKFQhCKIQ0gDCANfCEMIAcgDIVCP4ohByADIAggF3x8IQMgDiADhUIgiiEOIAkgDnwhCSAIIAmFQhiKIQggAyAIIBl8fCEDIA4gA4VCEIohDiAJIA58IQkgCCAJhUI/iiEIIAQgBSAUfHwhBCAPIASFQiCKIQ8gCiAPfCEKIAUgCoVCGIohBSAEIAUgHnx8IQQgDyAEhUIQiiEPIAogD3whCiAFIAqFQj+KIQUgASAFIBN8fCEBIA0gAYVCIIohDSAJIA18IQkgBSAJhUIYiiEFIAEgBSAdfHwhASANIAGFQhCKIQ0gCSANfCEJIAUgCYVCP4ohBSACIAYgF3x8IQIgDiAChUIgiiEOIAogDnwhCiAGIAqFQhiKIQYgAiAGIBt8fCECIA4gAoVCEIohDiAKIA58IQogBiAKhUI/iiEGIAMgByARfHwhAyAPIAOFQiCKIQ8gCyAPfCELIAcgC4VCGIohByADIAcgHHx8IQMgDyADhUIQiiEPIAsgD3whCyAHIAuFQj+KIQcgBCAIIBl8fCEEIBAgBIVCIIohECAMIBB8IQwgCCAMhUIYiiEIIAQgCCAUfHwhBCAQIASFQhCKIRAgDCAQfCEMIAggDIVCP4ohCCABIAYgFXx8IQEgECABhUIgiiEQIAsgEHwhCyAGIAuFQhiKIQYgASAGIB58fCEBIBAgAYVCEIohECALIBB8IQsgBiALhUI/iiEGIAIgByAYfHwhAiANIAKFQiCKIQ0gDCANfCEMIAcgDIVCGIohByACIAcgFnx8IQIgDSAChUIQiiENIAwgDXwhDCAHIAyFQj+KIQcgAyAIICB8fCEDIA4gA4VCIIohDiAJIA58IQkgCCAJhUIYiiEIIAMgCCAffHwhAyAOIAOFQhCKIQ4gCSAOfCEJIAggCYVCP4ohCCAEIAUgEnx8IQQgDyAEhUIgiiEPIAogD3whCiAFIAqFQhiKIQUgBCAFIBp8fCEEIA8gBIVCEIohDyAKIA98IQogBSAKhUI/iiEFIAEgBSAdfHwhASANIAGFQiCKIQ0gCSANfCEJIAUgCYVCGIohBSABIAUgFnx8IQEgDSABhUIQiiENIAkgDXwhCSAFIAmFQj+KIQUgAiAGIBJ8fCECIA4gAoVCIIohDiAKIA58IQogBiAKhUIYiiEGIAIgBiAgfHwhAiAOIAKFQhCKIQ4gCiAOfCEKIAYgCoVCP4ohBiADIAcgH3x8IQMgDyADhUIgiiEPIAsgD3whCyAHIAuFQhiKIQcgAyAHIB58fCEDIA8gA4VCEIohDyALIA98IQsgByALhUI/iiEHIAQgCCAVfHwhBCAQIASFQiCKIRAgDCAQfCEMIAggDIVCGIohCCAEIAggG3x8IQQgECAEhUIQiiEQIAwgEHwhDCAIIAyFQj+KIQggASAGIBF8fCEBIBAgAYVCIIohECALIBB8IQsgBiALhUIYiiEGIAEgBiAYfHwhASAQIAGFQhCKIRAgCyAQfCELIAYgC4VCP4ohBiACIAcgF3x8IQIgDSAChUIgiiENIAwgDXwhDCAHIAyFQhiKIQcgAiAHIBR8fCECIA0gAoVCEIohDSAMIA18IQwgByAMhUI/iiEHIAMgCCAafHwhAyAOIAOFQiCKIQ4gCSAOfCEJIAggCYVCGIohCCADIAggE3x8IQMgDiADhUIQiiEOIAkgDnwhCSAIIAmFQj+KIQggBCAFIBl8fCEEIA8gBIVCIIohDyAKIA98IQogBSAKhUIYiiEFIAQgBSAcfHwhBCAPIASFQhCKIQ8gCiAPfCEKIAUgCoVCP4ohBSABIAUgHnx8IQEgDSABhUIgiiENIAkgDXwhCSAFIAmFQhiKIQUgASAFIBx8fCEBIA0gAYVCEIohDSAJIA18IQkgBSAJhUI/iiEFIAIgBiAYfHwhAiAOIAKFQiCKIQ4gCiAOfCEKIAYgCoVCGIohBiACIAYgH3x8IQIgDiAChUIQiiEOIAogDnwhCiAGIAqFQj+KIQYgAyAHIB18fCEDIA8gA4VCIIohDyALIA98IQsgByALhUIYiiEHIAMgByASfHwhAyAPIAOFQhCKIQ8gCyAPfCELIAcgC4VCP4ohByAEIAggFHx8IQQgECAEhUIgiiEQIAwgEHwhDCAIIAyFQhiKIQggBCAIIBp8fCEEIBAgBIVCEIohECAMIBB8IQwgCCAMhUI/iiEIIAEgBiAWfHwhASAQIAGFQiCKIRAgCyAQfCELIAYgC4VCGIohBiABIAYgEXx8IQEgECABhUIQiiEQIAsgEHwhCyAGIAuFQj+KIQYgAiAHICB8fCECIA0gAoVCIIohDSAMIA18IQwgByAMhUIYiiEHIAIgByAVfHwhAiANIAKFQhCKIQ0gDCANfCEMIAcgDIVCP4ohByADIAggGXx8IQMgDiADhUIgiiEOIAkgDnwhCSAIIAmFQhiKIQggAyAIIBd8fCEDIA4gA4VCEIohDiAJIA58IQkgCCAJhUI/iiEIIAQgBSATfHwhBCAPIASFQiCKIQ8gCiAPfCEKIAUgCoVCGIohBSAEIAUgG3x8IQQgDyAEhUIQiiEPIAogD3whCiAFIAqFQj+KIQUgASAFIBd8fCEBIA0gAYVCIIohDSAJIA18IQkgBSAJhUIYiiEFIAEgBSAgfHwhASANIAGFQhCKIQ0gCSANfCEJIAUgCYVCP4ohBSACIAYgH3x8IQIgDiAChUIgiiEOIAogDnwhCiAGIAqFQhiKIQYgAiAGIBp8fCECIA4gAoVCEIohDiAKIA58IQogBiAKhUI/iiEGIAMgByAcfHwhAyAPIAOFQiCKIQ8gCyAPfCELIAcgC4VCGIohByADIAcgFHx8IQMgDyADhUIQiiEPIAsgD3whCyAHIAuFQj+KIQcgBCAIIBF8fCEEIBAgBIVCIIohECAMIBB8IQwgCCAMhUIYiiEIIAQgCCAZfHwhBCAQIASFQhCKIRAgDCAQfCEMIAggDIVCP4ohCCABIAYgHXx8IQEgECABhUIgiiEQIAsgEHwhCyAGIAuFQhiKIQYgASAGIBN8fCEBIBAgAYVCEIohECALIBB8IQsgBiALhUI/iiEGIAIgByAefHwhAiANIAKFQiCKIQ0gDCANfCEMIAcgDIVCGIohByACIAcgGHx8IQIgDSAChUIQiiENIAwgDXwhDCAHIAyFQj+KIQcgAyAIIBJ8fCEDIA4gA4VCIIohDiAJIA58IQkgCCAJhUIYiiEIIAMgCCAVfHwhAyAOIAOFQhCKIQ4gCSAOfCEJIAggCYVCP4ohCCAEIAUgG3x8IQQgDyAEhUIgiiEPIAogD3whCiAFIAqFQhiKIQUgBCAFIBZ8fCEEIA8gBIVCEIohDyAKIA98IQogBSAKhUI/iiEFIAEgBSAbfHwhASANIAGFQiCKIQ0gCSANfCEJIAUgCYVCGIohBSABIAUgE3x8IQEgDSABhUIQiiENIAkgDXwhCSAFIAmFQj+KIQUgAiAGIBl8fCECIA4gAoVCIIohDiAKIA58IQogBiAKhUIYiiEGIAIgBiAVfHwhAiAOIAKFQhCKIQ4gCiAOfCEKIAYgCoVCP4ohBiADIAcgGHx8IQMgDyADhUIgiiEPIAsgD3whCyAHIAuFQhiKIQcgAyAHIBd8fCEDIA8gA4VCEIohDyALIA98IQsgByALhUI/iiEHIAQgCCASfHwhBCAQIASFQiCKIRAgDCAQfCEMIAggDIVCGIohCCAEIAggFnx8IQQgECAEhUIQiiEQIAwgEHwhDCAIIAyFQj+KIQggASAGICB8fCEBIBAgAYVCIIohECALIBB8IQsgBiALhUIYiiEGIAEgBiAcfHwhASAQIAGFQhCKIRAgCyAQfCELIAYgC4VCP4ohBiACIAcgGnx8IQIgDSAChUIgiiENIAwgDXwhDCAHIAyFQhiKIQcgAiAHIB98fCECIA0gAoVCEIohDSAMIA18IQwgByAMhUI/iiEHIAMgCCAUfHwhAyAOIAOFQiCKIQ4gCSAOfCEJIAggCYVCGIohCCADIAggHXx8IQMgDiADhUIQiiEOIAkgDnwhCSAIIAmFQj+KIQggBCAFIB58fCEEIA8gBIVCIIohDyAKIA98IQogBSAKhUIYiiEFIAQgBSARfHwhBCAPIASFQhCKIQ8gCiAPfCEKIAUgCoVCP4ohBSABIAUgEXx8IQEgDSABhUIgiiENIAkgDXwhCSAFIAmFQhiKIQUgASAFIBJ8fCEBIA0gAYVCEIohDSAJIA18IQkgBSAJhUI/iiEFIAIgBiATfHwhAiAOIAKFQiCKIQ4gCiAOfCEKIAYgCoVCGIohBiACIAYgFHx8IQIgDiAChUIQiiEOIAogDnwhCiAGIAqFQj+KIQYgAyAHIBV8fCEDIA8gA4VCIIohDyALIA98IQsgByALhUIYiiEHIAMgByAWfHwhAyAPIAOFQhCKIQ8gCyAPfCELIAcgC4VCP4ohByAEIAggF3x8IQQgECAEhUIgiiEQIAwgEHwhDCAIIAyFQhiKIQggBCAIIBh8fCEEIBAgBIVCEIohECAMIBB8IQwgCCAMhUI/iiEIIAEgBiAZfHwhASAQIAGFQiCKIRAgCyAQfCELIAYgC4VCGIohBiABIAYgGnx8IQEgECABhUIQiiEQIAsgEHwhCyAGIAuFQj+KIQYgAiAHIBt8fCECIA0gAoVCIIohDSAMIA18IQwgByAMhUIYiiEHIAIgByAcfHwhAiANIAKFQhCKIQ0gDCANfCEMIAcgDIVCP4ohByADIAggHXx8IQMgDiADhUIgiiEOIAkgDnwhCSAIIAmFQhiKIQggAyAIIB58fCEDIA4gA4VCEIohDiAJIA58IQkgCCAJhUI/iiEIIAQgBSAffHwhBCAPIASFQiCKIQ8gCiAPfCEKIAUgCoVCGIohBSAEIAUgIHx8IQQgDyAEhUIQiiEPIAogD3whCiAFIAqFQj+KIQUgASAFIB98fCEBIA0gAYVCIIohDSAJIA18IQkgBSAJhUIYiiEFIAEgBSAbfHwhASANIAGFQhCKIQ0gCSANfCEJIAUgCYVCP4ohBSACIAYgFXx8IQIgDiAChUIgiiEOIAogDnwhCiAGIAqFQhiKIQYgAiAGIBl8fCECIA4gAoVCEIohDiAKIA58IQogBiAKhUI/iiEGIAMgByAafHwhAyAPIAOFQiCKIQ8gCyAPfCELIAcgC4VCGIohByADIAcgIHx8IQMgDyADhUIQiiEPIAsgD3whCyAHIAuFQj+KIQcgBCAIIB58fCEEIBAgBIVCIIohECAMIBB8IQwgCCAMhUIYiiEIIAQgCCAXfHwhBCAQIASFQhCKIRAgDCAQfCEMIAggDIVCP4ohCCABIAYgEnx8IQEgECABhUIgiiEQIAsgEHwhCyAGIAuFQhiKIQYgASAGIB18fCEBIBAgAYVCEIohECALIBB8IQsgBiALhUI/iiEGIAIgByARfHwhAiANIAKFQiCKIQ0gDCANfCEMIAcgDIVCGIohByACIAcgE3x8IQIgDSAChUIQiiENIAwgDXwhDCAHIAyFQj+KIQcgAyAIIBx8fCEDIA4gA4VCIIohDiAJIA58IQkgCCAJhUIYiiEIIAMgCCAYfHwhAyAOIAOFQhCKIQ4gCSAOfCEJIAggCYVCP4ohCCAEIAUgFnx8IQQgDyAEhUIgiiEPIAogD3whCiAFIAqFQhiKIQUgBCAFIBR8fCEEIA8gBIVCEIohDyAKIA98IQogBSAKhUI/iiEFICEgISkDACABIAmFhTcDACAiICIpAwAgAiAKhYU3AwAgIyAjKQMAIAMgC4WFNwMAICQgJCkDACAEIAyFhTcDACAlICUpAwAgBSANhYU3AwAgJiAmKQMAIAYgDoWFNwMAICcgJykDACAHIA+FhTcDACAoICgpAwAgCCAQhYU3AwAL"),w=null,b={buffer:t,memory:null,exports:null,realloc:h,onload:k};return k(function(){}),b;function h(P){b.exports.memory.grow(Math.ceil(Math.abs(P-b.memory.length)/65536)),b.memory=new Uint8Array(b.exports.memory.buffer)}function k(P){if(b.exports)return P();if(w){w.then(P.bind(null,null)).catch(P);return}try{if(c&&c.async)throw new Error("async");j({instance:new WebAssembly.Instance(new WebAssembly.Module(t),d)})}catch{w=WebAssembly.instantiate(t,d).then(j)}k(P)}function j(P){b.exports=P.instance.exports,b.memory=b.exports.memory&&b.exports.memory.buffer&&new Uint8Array(b.exports.memory.buffer)}}function ms(c){return typeof atob=="function"?new Uint8Array(atob(c).split("").map(ks)):new(en("buffer")).Buffer(c,"base64")}function ks(c){return c.charCodeAt(0)}var R_=ta,Tt=vs(),Be=64,Mr=[];G_.exports=m_;var Cn=G_.exports.BYTES_MIN=16,jn=G_.exports.BYTES_MAX=64;G_.exports.BYTES=32;var Bn=G_.exports.KEYBYTES_MIN=16,En=G_.exports.KEYBYTES_MAX=64;G_.exports.KEYBYTES=32;var Sn=G_.exports.SALTBYTES=16,Qn=G_.exports.PERSONALBYTES=16;function m_(c,d,t,w,b){if(!(this instanceof m_))return new m_(c,d,t,w,b);if(!(Tt&&Tt.exports))throw new Error("WASM not loaded. Wait for Blake2b.ready(cb)");c||(c=32),b!==!0&&(R_(c>=Cn,"digestLength must be at least "+Cn+", was given "+c),R_(c<=jn,"digestLength must be at most "+jn+", was given "+c),d!=null&&R_(d.length>=Bn,"key must be at least "+Bn+", was given "+d.length),d!=null&&R_(d.length<=En,"key must be at least "+En+", was given "+d.length),t!=null&&R_(t.length===Sn,"salt must be exactly "+Sn+", was given "+t.length),w!=null&&R_(w.length===Qn,"personal must be exactly "+Qn+", was given "+w.length)),Mr.length||(Mr.push(Be),Be+=216),this.digestLength=c,this.finalized=!1,this.pointer=Mr.pop(),Tt.memory.fill(0,0,64),Tt.memory[0]=this.digestLength,Tt.memory[1]=d?d.length:0,Tt.memory[2]=1,Tt.memory[3]=1,t&&Tt.memory.set(t,32),w&&Tt.memory.set(w,48),this.pointer+216>Tt.memory.length&&Tt.realloc(this.pointer+216),Tt.exports.blake2b_init(this.pointer,this.digestLength),d&&(this.update(d),Tt.memory.fill(0,Be,Be+d.length),Tt.memory[this.pointer+200]=128)}m_.prototype.update=function(c){return R_(this.finalized===!1,"Hash instance finalized"),R_(c,"input must be TypedArray or Buffer"),Be+c.length>Tt.memory.length&&Tt.realloc(Be+c.length),Tt.memory.set(c,Be),Tt.exports.blake2b_update(this.pointer,Be,Be+c.length),this};m_.prototype.digest=function(c){if(R_(this.finalized===!1,"Hash instance finalized"),this.finalized=!0,Mr.push(this.pointer),Tt.exports.blake2b_final(this.pointer),!c||c==="binary")return Tt.memory.slice(this.pointer+128,this.pointer+128+this.digestLength);if(c==="hex")return As(Tt.memory,this.pointer+128,this.digestLength);R_(c.length>=this.digestLength,"input must be TypedArray or Buffer");for(var d=0;d<this.digestLength;d++)c[d]=Tt.memory[this.pointer+128+d];return c};m_.prototype.final=m_.prototype.digest;m_.WASM=Tt&&Tt.buffer;m_.SUPPORTED=typeof WebAssembly<"u";m_.ready=function(c){if(c||(c=xs),!Tt)return c(new Error("WebAssembly not supported"));var d=new Promise(function(t,w){Tt.onload(function(b){b?w():t(),c(b)})});return d};m_.prototype.ready=m_.ready;function xs(){}function As(c,d,t){for(var w="",b=0;b<t;b++)w+=Is(c[d+b]);return w}function Is(c){return c<16?"0"+c.toString(16):c.toString(16)}var Re=ta,Ir=G_.exports;function Tr(c,d,t){var w=c[d]+c[t],b=c[d+1]+c[t+1];w>=4294967296&&b++,c[d]=w,c[d+1]=b}function On(c,d,t,w){var b=c[d]+t;t<0&&(b+=4294967296);var h=c[d+1]+w;b>=4294967296&&h++,c[d]=b,c[d+1]=h}function _a(c,d){return c[d]^c[d+1]<<8^c[d+2]<<16^c[d+3]<<24}function He(c,d,t,w,b,h){var k=kr[b],j=kr[b+1],P=kr[h],p=kr[h+1];Tr(lt,c,d),On(lt,c,k,j);var z=lt[w]^lt[c],Y=lt[w+1]^lt[c+1];lt[w]=Y,lt[w+1]=z,Tr(lt,t,w),z=lt[d]^lt[t],Y=lt[d+1]^lt[t+1],lt[d]=z>>>24^Y<<8,lt[d+1]=Y>>>24^z<<8,Tr(lt,c,d),On(lt,c,P,p),z=lt[w]^lt[c],Y=lt[w+1]^lt[c+1],lt[w]=z>>>16^Y<<16,lt[w+1]=Y>>>16^z<<16,Tr(lt,t,w),z=lt[d]^lt[t],Y=lt[d+1]^lt[t+1],lt[d]=Y>>>31^z<<1,lt[d+1]=z>>>31^Y<<1}var ea=new Uint32Array([4089235720,1779033703,2227873595,3144134277,4271175723,1013904242,1595750129,2773480762,2917565137,1359893119,725511199,2600822924,4215389547,528734635,327033209,1541459225]),Cs=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,14,10,4,8,9,15,13,6,1,12,0,2,11,7,5,3,11,8,12,0,5,2,15,13,10,14,3,6,7,1,9,4,7,9,3,1,13,12,11,14,2,6,5,10,4,0,15,8,9,0,5,7,2,4,10,15,14,1,11,12,6,8,3,13,2,12,6,10,0,11,8,3,4,13,7,5,15,14,1,9,12,5,1,15,14,13,4,10,0,7,6,3,9,2,8,11,13,11,7,14,12,1,3,9,5,0,15,4,8,6,2,10,6,15,14,9,11,3,0,8,12,2,13,7,1,4,10,5,10,2,8,4,7,6,1,5,15,11,9,14,3,12,13,0,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,14,10,4,8,9,15,13,6,1,12,0,2,11,7,5,3],t_=new Uint8Array(Cs.map(function(c){return c*2})),lt=new Uint32Array(32),kr=new Uint32Array(32);function ra(c,d){var t=0;for(t=0;t<16;t++)lt[t]=c.h[t],lt[t+16]=ea[t];for(lt[24]=lt[24]^c.t,lt[25]=lt[25]^c.t/4294967296,d&&(lt[28]=~lt[28],lt[29]=~lt[29]),t=0;t<32;t++)kr[t]=_a(c.b,4*t);for(t=0;t<12;t++)He(0,8,16,24,t_[t*16+0],t_[t*16+1]),He(2,10,18,26,t_[t*16+2],t_[t*16+3]),He(4,12,20,28,t_[t*16+4],t_[t*16+5]),He(6,14,22,30,t_[t*16+6],t_[t*16+7]),He(0,10,20,30,t_[t*16+8],t_[t*16+9]),He(2,12,22,24,t_[t*16+10],t_[t*16+11]),He(4,14,16,26,t_[t*16+12],t_[t*16+13]),He(6,8,18,28,t_[t*16+14],t_[t*16+15]);for(t=0;t<16;t++)c.h[t]=c.h[t]^lt[t]^lt[t+16]}var qe=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]);function gr(c,d,t,w){qe.fill(0),this.b=new Uint8Array(128),this.h=new Uint32Array(16),this.t=0,this.c=0,this.outlen=c,qe[0]=c,d&&(qe[1]=d.length),qe[2]=1,qe[3]=1,t&&qe.set(t,32),w&&qe.set(w,48);for(var b=0;b<16;b++)this.h[b]=ea[b]^_a(qe,b*4);d&&(na(this,d),this.c=128)}gr.prototype.update=function(c){return Re(c!=null,"input must be Uint8Array or Buffer"),na(this,c),this};gr.prototype.digest=function(c){var d=!c||c==="binary"||c==="hex"?new Uint8Array(this.outlen):c;return Re(d.length>=this.outlen,"out must have at least outlen bytes of space"),js(this,d),c==="hex"?Bs(d):d};gr.prototype.final=gr.prototype.digest;gr.ready=function(c){Ir.ready(function(){c()})};function na(c,d){for(var t=0;t<d.length;t++)c.c===128&&(c.t+=c.c,ra(c,!1),c.c=0),c.b[c.c++]=d[t]}function js(c,d){for(c.t+=c.c;c.c<128;)c.b[c.c++]=0;ra(c,!0);for(var t=0;t<c.outlen;t++)d[t]=c.h[t>>2]>>8*(t&3);return d}function Bs(c){for(var d="",t=0;t<c.length;t++)d+=Es(c[t]);return d}function Es(c){return c<16?"0"+c.toString(16):c.toString(16)}var aa=gr;s_.exports=function(d,t,w,b,h){return h!==!0&&(Re(d>=Dn,"outlen must be at least "+Dn+", was given "+d),Re(d<=Tn,"outlen must be at most "+Tn+", was given "+d),t!=null&&Re(t.length>=Nn,"key must be at least "+Nn+", was given "+t.length),t!=null&&Re(t.length<=Un,"key must be at most "+Un+", was given "+t.length),w!=null&&Re(w.length===Pn,"salt must be exactly "+Pn+", was given "+w.length),b!=null&&Re(b.length===Fn,"personal must be exactly "+Fn+", was given "+b.length)),new aa(d,t,w,b)};s_.exports.ready=function(c){Ir.ready(function(){c()})};s_.exports.WASM_SUPPORTED=Ir.SUPPORTED;s_.exports.WASM_LOADED=!1;var Dn=s_.exports.BYTES_MIN=16,Tn=s_.exports.BYTES_MAX=64;s_.exports.BYTES=32;var Nn=s_.exports.KEYBYTES_MIN=16,Un=s_.exports.KEYBYTES_MAX=64;s_.exports.KEYBYTES=32;var Pn=s_.exports.SALTBYTES=16,Fn=s_.exports.PERSONALBYTES=16;Ir.ready(function(c){c||(s_.exports.WASM_LOADED=!0,aa=Ir)});var br={};Object.defineProperty(br,"__esModule",{value:!0});br.bech32m=br.bech32=void 0;const zr="qpzry9x8gf2tvdw0s3jn54khce6mua7l",sa={};for(let c=0;c<zr.length;c++){const d=zr.charAt(c);sa[d]=c}function wr(c){const d=c>>25;return(c&33554431)<<5^-(d>>0&1)&996825010^-(d>>1&1)&642813549^-(d>>2&1)&513874426^-(d>>3&1)&1027748829^-(d>>4&1)&705979059}function Mn(c){let d=1;for(let t=0;t<c.length;++t){const w=c.charCodeAt(t);if(w<33||w>126)return"Invalid prefix ("+c+")";d=wr(d)^w>>5}d=wr(d);for(let t=0;t<c.length;++t){const w=c.charCodeAt(t);d=wr(d)^w&31}return d}function hn(c,d,t,w){let b=0,h=0;const k=(1<<t)-1,j=[];for(let P=0;P<c.length;++P)for(b=b<<d|c[P],h+=d;h>=t;)h-=t,j.push(b>>h&k);if(w)h>0&&j.push(b<<t-h&k);else{if(h>=d)return"Excess padding";if(b<<t-h&k)return"Non-zero padding"}return j}function Ss(c){return hn(c,8,5,!0)}function Qs(c){const d=hn(c,5,8,!1);if(Array.isArray(d))return d}function Os(c){const d=hn(c,5,8,!1);if(Array.isArray(d))return d;throw new Error(d)}function oa(c){let d;c==="bech32"?d=1:d=734539939;function t(k,j,P){if(P=P||90,k.length+7+j.length>P)throw new TypeError("Exceeds length limit");k=k.toLowerCase();let p=Mn(k);if(typeof p=="string")throw new Error(p);let z=k+"1";for(let Y=0;Y<j.length;++Y){const q=j[Y];if(q>>5!==0)throw new Error("Non 5-bit word");p=wr(p)^q,z+=zr.charAt(q)}for(let Y=0;Y<6;++Y)p=wr(p);p^=d;for(let Y=0;Y<6;++Y){const q=p>>(5-Y)*5&31;z+=zr.charAt(q)}return z}function w(k,j){if(j=j||90,k.length<8)return k+" too short";if(k.length>j)return"Exceeds length limit";const P=k.toLowerCase(),p=k.toUpperCase();if(k!==P&&k!==p)return"Mixed-case string "+k;k=P;const z=k.lastIndexOf("1");if(z===-1)return"No separator character for "+k;if(z===0)return"Missing prefix for "+k;const Y=k.slice(0,z),q=k.slice(z+1);if(q.length<6)return"Data too short";let m=Mn(Y);if(typeof m=="string")return m;const G=[];for(let u=0;u<q.length;++u){const tt=q.charAt(u),X=sa[tt];if(X===void 0)return"Unknown character "+tt;m=wr(m)^X,!(u+6>=q.length)&&G.push(X)}return m!==d?"Invalid checksum for "+k:{prefix:Y,words:G}}function b(k,j){const P=w(k,j);if(typeof P=="object")return P}function h(k,j){const P=w(k,j);if(typeof P=="object")return P;throw new Error(P)}return{decodeUnsafe:b,decode:h,encode:t,toWords:Ss,fromWordsUnsafe:Qs,fromWords:Os}}br.bech32=oa("bech32");br.bech32m=oa("bech32m");var Ds=qr&&qr.__importDefault||function(c){return c&&c.__esModule?c:{default:c}};Object.defineProperty(Zn,"__esModule",{value:!0});const Ts=Ds(s_.exports),Nr=br,Zr="asset";class xr{constructor(d){this.hashBuf=d}static fromHash(d){return new xr(d)}static fromParts(d,t){const w=(0,Ts.default)(20).update(new Uint8Array([...d,...t])).digest("binary");return xr.fromHash(w)}static fromBech32(d){const{prefix:t,words:w}=Nr.bech32.decode(d);if(t!==Zr)throw new Error("Invalid asset fingerprint");const b=Buffer.from(Nr.bech32.fromWords(w));return xr.fromHash(b)}fingerprint(){const d=Nr.bech32.toWords(this.hashBuf);return Nr.bech32.encode(Zr,d)}hash(){return Buffer.from(this.hashBuf).toString("hex")}prefix(){return Zr}checksum(){return this.fingerprint().slice(-6)}}var Ns=Zn.default=xr;const Us=Ns,Ps=(c,d)=>{const t=Ks(c),w=t.derive(Xr+1852).derive(Xr+1815).derive(Xr+d),b=w.derive(0).derive(0).to_raw_key(),h=w.derive(2).derive(0).to_raw_key();return w.free(),t.free(),{paymentKey:b,stakeKey:h}},Fs=(c,d,t)=>{const w=new Map(d);w.set("lovelace",String(Number(w.get("lovelace"))+Number(t)));const b=new Map;for(let q=0;q<c.length;q++)b.set(q,c[q]);const h=new Set,k=new Set,j=new Set,P=new Set,p=new Set;for(let q=0;q<c.length;q++)switch(c[q].output.amount.length){case 1:{k.add(q);break}case 2:{j.add(q);break}case 3:{P.add(q);break}default:{p.add(q);break}}const z=(q,m,G)=>{const u=b.get(q);if(!u)return;const tt=Ms(u,m);if(Number(tt)>0){h.add(q),G.delete(q);for(const X of u.output.amount)w.set(X.unit,String(Number(w.get(X.unit))-Number(X.quantity)))}};for(const q of w.keys())if(q!="lovelace"){for(const m of j){const G=w.get(q);if(!G||Number(G)<=0)break;z(m,q,j)}for(const m of P){const G=w.get(q);if(!G||Number(G)<=0)break;z(m,q,P)}for(const m of p){const G=w.get(q);if(!G||Number(G)<=0)break;z(m,q,p)}}for(const q of k){const m=w.get("lovelace");if(!m||Number(m)<=0)break;z(q,"lovelace",k)}for(const q of j){const m=w.get("lovelace");if(!m||Number(m)<=0)break;z(q,"lovelace",j)}for(const q of P){const m=w.get("lovelace");if(!m||Number(m)<=0)break;z(q,"lovelace",P)}for(const q of p){const m=w.get("lovelace");if(!m||Number(m)<=0)break;z(q,"lovelace",p)}for(const q of w.keys())if(Number(w.get(q))>0)return[];const Y=[];for(const q of h){const m=b.get(q);m&&Y.push(m)}return Y},Ms=(c,d)=>{for(const t of c.output.amount)if(t.unit==d)return t.quantity;return"0"},ir=c=>y.exports.Address.from_bytes(kt(c)),Ks=c=>y.exports.Bip32PrivateKey.from_bytes(kt(c)),Hs=c=>y.exports.DataHash.from_bytes(kt(c)),V_=c=>y.exports.Ed25519KeyHash.from_bytes(kt(c)),qs=c=>y.exports.Ed25519Signature.from_bytes(kt(c)),$r=c=>y.exports.NativeScript.from_bytes(kt(c)),Rs=c=>y.exports.PublicKey.from_bytes(kt(c)),ia=c=>y.exports.PlutusData.from_bytes(kt(c)),ur=(c,d)=>y.exports.PlutusScript.from_bytes_with_version(kt(c),je[d]),zs=c=>y.exports.ScriptRef.from_bytes(kt(c)),Vs=c=>y.exports.ScriptHash.from_bytes(kt(c)),L_=c=>y.exports.Transaction.from_bytes(kt(c)),da=c=>y.exports.TransactionHash.from_bytes(kt(c)),Kn=c=>y.exports.TransactionUnspentOutput.from_bytes(kt(c)),Hn=c=>y.exports.TransactionWitnessSet.from_bytes(kt(c)),Ls=c=>y.exports.Value.from_bytes(kt(c)),S_=c=>y.exports.Address.from_bech32(c),yn=c=>y.exports.BaseAddress.from_address(S_(c)),ca=c=>y.exports.EnterpriseAddress.from_address(S_(c)),pa=c=>y.exports.RewardAddress.from_address(S_(c)),d_=c=>Buffer.from(c).toString("hex"),kt=c=>c.length%2===0&&/^[0-9A-F]*$/i.test(c)?Buffer.from(c,"hex"):Buffer.from(c,"utf-8"),Jr=c=>{const d=t=>{const w=new Array;for(let b=0;b<t.len();b+=1)w.push(Jr(t.get(b)));return w};switch(c.kind()){case y.exports.NativeScriptKind.ScriptAll:{const t=c.as_script_all();return{type:"all",scripts:d(t.native_scripts())}}case y.exports.NativeScriptKind.ScriptAny:{const t=c.as_script_any();return{type:"any",scripts:d(t.native_scripts())}}case y.exports.NativeScriptKind.ScriptNOfK:{const t=c.as_script_n_of_k();return{type:"atLeast",required:t.n(),scripts:d(t.native_scripts())}}case y.exports.NativeScriptKind.TimelockStart:return{type:"after",slot:c.as_timelock_start().slot_bignum().to_str()};case y.exports.NativeScriptKind.TimelockExpiry:return{type:"before",slot:c.as_timelock_expiry().slot_bignum().to_str()};case y.exports.NativeScriptKind.ScriptPubkey:return{type:"sig",keyHash:c.as_script_pubkey().addr_keyhash().to_hex()};default:throw new Error(`Script Kind: ${c.kind()}, is not supported`)}},Wr=c=>{const d=t=>{const w=y.exports.NativeScripts.new();return t.forEach(b=>{w.add(Wr(b))}),w};switch(c.type){case"all":return y.exports.NativeScript.new_script_all(y.exports.ScriptAll.new(d(c.scripts)));case"any":return y.exports.NativeScript.new_script_any(y.exports.ScriptAny.new(d(c.scripts)));case"atLeast":return y.exports.NativeScript.new_script_n_of_k(y.exports.ScriptNOfK.new(c.required,d(c.scripts)));case"after":return y.exports.NativeScript.new_timelock_start(y.exports.TimelockStart.new_timelockstart(y.exports.BigNum.from_str(c.slot)));case"before":return y.exports.NativeScript.new_timelock_expiry(y.exports.TimelockExpiry.new_timelockexpiry(y.exports.BigNum.from_str(c.slot)));case"sig":return y.exports.NativeScript.new_script_pubkey(y.exports.ScriptPubkey.new(V_(c.keyHash)))}},Kr=c=>{var w,b,h;const d=k=>{const j=[];for(let P=0;P<k.len();P+=1)j.push(Kr(k.get(P)));return j},t=k=>{const j=new Map;for(let P=0;P<k.len();P+=1){const p=k.keys().get(P),z=k.get(p)??y.exports.PlutusData.from_hex(a_("NO_ITEM_FOUND_INSIDE_GOLD_ROOM"));j.set(Kr(p),Kr(z))}return j};switch(c.kind()){case y.exports.PlutusDataKind.Bytes:return d_(c.as_bytes()??new Uint8Array);case y.exports.PlutusDataKind.Integer:return parseInt(((w=c.as_integer())==null?void 0:w.to_str())??"0",10);case y.exports.PlutusDataKind.List:return d(c.as_list()??y.exports.PlutusList.new());case y.exports.PlutusDataKind.Map:return t(c.as_map()??y.exports.PlutusMap.new());case y.exports.PlutusDataKind.ConstrPlutusData:return{alternative:parseInt(((b=c.as_constr_plutus_data())==null?void 0:b.alternative().to_str())??"0",10),fields:d(((h=c.as_constr_plutus_data())==null?void 0:h.data())??y.exports.PlutusList.new())};default:throw new Error(`PlutusData Kind: ${c.kind()}, is not supported`)}},ze=c=>{const d=t=>{const w=y.exports.PlutusList.new();return t.forEach(b=>{w.add(ze(b))}),w};switch(typeof c){case"string":return y.exports.PlutusData.new_bytes(kt(c));case"number":return y.exports.PlutusData.new_integer(y.exports.BigInt.from_str(c.toString()));case"bigint":return y.exports.PlutusData.new_integer(y.exports.BigInt.from_str(c.toString()));case"object":if(c instanceof Array){const t=d(c);return y.exports.PlutusData.new_list(t)}else if(c instanceof Map){const t=y.exports.PlutusMap.new();return c.forEach((w,b)=>{t.insert(ze(b),ze(w))}),y.exports.PlutusData.new_map(t)}else return y.exports.PlutusData.new_constr_plutus_data(y.exports.ConstrPlutusData.new(y.exports.BigNum.from_str(c.alternative.toString()),d(c.fields)))}},Ys=c=>{const d=y.exports.Relays.new();throw c.relays.forEach(t=>{d.add(wa(t))}),new Error("toPoolParams not implemented.")},nn=c=>{const d=t=>es[t];return y.exports.Redeemer.new(d(c.tag),y.exports.BigNum.from_str(c.index.toString()),ze(c.data),y.exports.ExUnits.new(y.exports.BigNum.from_str(c.budget.mem.toString()),y.exports.BigNum.from_str(c.budget.steps.toString())))},wa=c=>{switch(c.type){case"SingleHostAddr":{const d=c.IPV4?y.exports.Ipv4.new(new Uint8Array(c.IPV4.split(".").map(w=>parseInt(w)))):void 0,t=c.IPV6?y.exports.Ipv6.new(kt(c.IPV6.replaceAll(":",""))):void 0;return y.exports.Relay.new_single_host_addr(y.exports.SingleHostAddr.new(c.port,d,t))}case"SingleHostName":return y.exports.Relay.new_single_host_name(y.exports.SingleHostName.new(c.port,y.exports.DNSRecordAorAAAA.new(c.domainName)));case"MultiHostName":return y.exports.Relay.new_multi_host_name(y.exports.MultiHostName.new(y.exports.DNSRecordSRV.new(c.domainName)))}},la=c=>{if(c.is_plutus_script()){const t=c.plutus_script();return{code:t.to_hex(),version:Object.keys(je).find(w=>je[w].to_hex()===t.language_version().to_hex())}}const d=c.native_script();return Jr(d)},fr=c=>{if("code"in c){const d=ur(c.code,c.version);return y.exports.ScriptRef.new_plutus_script(d)}return y.exports.ScriptRef.new_native_script(Wr(c))},Vr=c=>{var b,h,k;const d=c.output().has_data_hash()?(b=c.output().data_hash())==null?void 0:b.to_hex():void 0,t=c.output().has_plutus_data()?(h=c.output().plutus_data())==null?void 0:h.to_hex():void 0,w=c.output().has_script_ref()?(k=c.output().script_ref())==null?void 0:k.to_hex():void 0;return{input:{outputIndex:c.input().index(),txHash:c.input().transaction_id().to_hex()},output:{address:c.output().address().to_bech32(),amount:ga(c.output().amount()),dataHash:d,plutusData:t,scriptRef:w}}},z_=c=>{const d=y.exports.TransactionInput.new(da(c.input.txHash),c.input.outputIndex),t=y.exports.TransactionOutput.new(S_(c.output.address),Ee(c.output.amount));return c.output.dataHash!==void 0&&t.set_data_hash(Hs(c.output.dataHash)),c.output.plutusData!==void 0&&t.set_plutus_data(ia(c.output.plutusData)),c.output.scriptRef!==void 0&&t.set_script_ref(zs(c.output.scriptRef)),y.exports.TransactionUnspentOutput.new(d,t)},qn=c=>{const d=c.split(".")[1]??"0",t=`${parseInt(d,10)}`,w="1"+"0".repeat(d.length);return y.exports.UnitInterval.new(y.exports.BigNum.from_str(t),y.exports.BigNum.from_str(w))},a_=c=>c.length%2===0&&/^[0-9A-F]*$/i.test(c)?c:d_(Buffer.from(c,"utf-8")),vn=c=>Buffer.from(c,"hex").toString("utf-8"),ga=c=>{const d=[{unit:"lovelace",quantity:c.coin().to_str()}],t=c.multiasset();if(t!==void 0){const w=t.keys();for(let b=0;b<w.len();b+=1){const h=w.get(b),k=t.get(h);if(k!==void 0){const j=k.keys();for(let P=0;P<j.len();P+=1){const p=j.get(P),z=k.get(p)??y.exports.BigNum.from_str("0"),Y=h.to_hex()+d_(p.name());d.push({unit:Y,quantity:z.to_str()})}}}}return d},Ee=c=>{const d=c.find(h=>h.unit==="lovelace"),t=Array.from(new Set(c.filter(h=>h.unit!=="lovelace").map(h=>h.unit.slice(0,Y_)))),w=y.exports.MultiAsset.new();t.forEach(h=>{const k=y.exports.Assets.new();c.filter(j=>j.unit.slice(0,Y_)===h).forEach(j=>{k.insert(y.exports.AssetName.new(kt(j.unit.slice(Y_))),y.exports.BigNum.from_str(j.quantity))}),w.insert(Vs(h),k)});const b=y.exports.Value.new(y.exports.BigNum.from_str(d?d.quantity:"0"));return(c.length>1||!d)&&b.set_multiasset(w),b},Rn=(c,d,t)=>y.exports.BaseAddress.new(c,y.exports.StakeCredential.from_keyhash(d),y.exports.StakeCredential.from_keyhash(t)),ba=(c,d="")=>y.exports.Bip32PrivateKey.from_bip39_entropy(kt(c),kt(a_(d))),an=c=>y.exports.DataCost.new_coins_per_byte(y.exports.BigNum.from_str(c)),Gs=c=>{if(typeof c!="object"||!("input"in c))return y.exports.DatumSource.new(ze(c));const d=z_(c);if(d.output().has_plutus_data())return y.exports.DatumSource.new_ref_input(d.input());throw new Error(`No inline datum found in UTxO: ${d.input().transaction_id().to_hex()}`)},zn=(c,d)=>y.exports.EnterpriseAddress.new(c,y.exports.StakeCredential.from_keyhash(d)),Vn=(c,d)=>{if(typeof c=="string")return y.exports.MintWitness.new_native_script($r(c));if(d===void 0)throw new Error("Minting with plutus requires a redeemer to be defined");if(d.tag!=="MINT")throw new Error("Minting redeemer's tag must be defined as 'MINT'");return y.exports.MintWitness.new_plutus_script(on(c),nn({tag:"MINT",index:0,budget:dr,data:{alternative:0,fields:[]},...d}))},sn=(c,d)=>y.exports.RewardAddress.new(c,y.exports.StakeCredential.from_keyhash(d)),on=c=>{if("code"in c)return y.exports.PlutusScriptSource.new(ur(c.code,c.version));const d=z_(c);if(d.output().has_script_ref()){const t=d.output().script_ref();if(t.is_plutus_script()){const w=la(t),b=ur(w.code,w.version).hash();return y.exports.PlutusScriptSource.new_ref_input_with_lang_ver(b,d.input(),je[w.version])}}throw new Error(`No plutus script reference found in UTxO: ${d.input().transaction_id().to_hex()}`)},Ur=c=>{const d=y.exports.ScriptPubkey.new(c);return y.exports.NativeScript.new_script_pubkey(d)},Hr=(c=v_)=>{const d=y.exports.TransactionBuilderConfigBuilder.new().coins_per_utxo_byte(y.exports.BigNum.from_str(c.coinsPerUTxOSize)).ex_unit_prices(y.exports.ExUnitPrices.new(qn(c.priceMem.toString()),qn(c.priceStep.toString()))).fee_algo(y.exports.LinearFee.new(y.exports.BigNum.from_str(c.minFeeA.toString()),y.exports.BigNum.from_str(c.minFeeB.toString()))).key_deposit(y.exports.BigNum.from_str(c.keyDeposit)).max_tx_size(c.maxTxSize).max_value_size(parseInt(c.maxValSize,10)).pool_deposit(y.exports.BigNum.from_str(c.poolDeposit)).build();return y.exports.TransactionBuilder.new(d)},Ln=c=>{const d=y.exports.TxInputsBuilder.new();return c.map(t=>t instanceof y.exports.TransactionUnspentOutput?t:z_(t)).forEach(t=>{d.add_input(t.output().address(),t.input(),t.output().amount())}),d},Pr=c=>{if(typeof c=="string")return y.exports.TransactionOutputBuilder.new().with_address(S_(c));let d=y.exports.TransactionOutputBuilder.new().with_address(S_(c.address));if(c.datum){const{value:t,inline:w}=c.datum,b=ze(t);d=d.with_data_hash(y.exports.hash_plutus_data(b)),w&&(d=d.with_plutus_data(b))}if(c.script){const t=fr(c.script);d=d.with_script_ref(t)}return d},Qe=c=>{const d=c.slice(0,Y_),t=c.includes(".")?a_(c.split(".")[1]):c.slice(Y_);return{policyId:d,assetName:t}},$=c=>Ve.default.isAxiosError(c)?c.response?JSON.stringify({data:c.response.data,headers:c.response.headers,status:c.response.status}):c.request?JSON.stringify(c.request):c.message:JSON.stringify(c),$s=c=>{const d=ze(c);return y.exports.hash_plutus_data(d).to_hex()},Js=(c,d=Date.now())=>{if(Rr[c]){const[t,w,b,h]=Rr[c];return parseInt(y.exports.BigNum.from_str(d.toString()).div_floor(y.exports.BigNum.from_str("1000")).checked_sub(y.exports.BigNum.from_str(b)).div_floor(y.exports.BigNum.from_str(h)).checked_add(y.exports.BigNum.from_str(t)).to_str(),10)}throw new Error(`Couldn't resolve EpochNo for network: ${c}`)},ua=(c,d)=>Us.fromParts(kt(c),kt(d)).fingerprint(),Ws=(c,d)=>rs[c][d],Xs=c=>Wr(c).hash().to_hex(),Ze=c=>{var d,t;try{const w=[(d=yn(c))==null?void 0:d.payment_cred().to_keyhash(),(t=ca(c))==null?void 0:t.payment_cred().to_keyhash()].find(b=>b!==void 0);if(w!==void 0)return w.to_hex();throw new Error(`Couldn't resolve payment key hash from address: ${c}`)}catch(w){throw new Error(`An error occurred during resolvePaymentKeyHash: ${w}.`)}},Zs=(c,d=0)=>{const t=ur(c.code,c.version);return y.exports.EnterpriseAddress.new(d,y.exports.StakeCredential.from_scripthash(t.hash())).to_address().to_bech32()},to=c=>{try{const d=ca(c),t=d==null?void 0:d.payment_cred().to_scripthash();if(t!==void 0)return t.to_hex();throw new Error(`Couldn't resolve script hash from address: ${c}`)}catch(d){throw new Error(`An error occurred during resolveScriptHash: ${d}.`)}},_o=c=>y.exports.Ed25519KeyHash.from_hex(c).to_bech32("pool1"),eo=c=>{const d=tn.mnemonicToEntropy(c.join(" ")),t=ba(d),w=t.to_bech32();return t.free(),w},ro=c=>fr(c).to_hex(),no=(c,d=Date.now())=>{if(Rr[c]){const[t,w,b]=Rr[c];return y.exports.BigNum.from_str(d.toString()).div_floor(y.exports.BigNum.from_str("1000")).checked_sub(y.exports.BigNum.from_str(b)).checked_add(y.exports.BigNum.from_str(w)).to_str()}throw new Error(`Couldn't resolve SlotNo for network: ${c}`)},Cr=c=>{try{const d=S_(c),t=yn(c),w=t==null?void 0:t.stake_cred().to_keyhash();if(w!==void 0)return sn(d.network_id(),w).to_address().to_bech32();throw new Error(`Couldn't resolve reward address from address: ${c}`)}catch(d){throw new Error(`An error occurred during resolveRewardAddress: ${d}.`)}},cr=c=>{var d,t;try{const w=[(d=yn(c))==null?void 0:d.stake_cred().to_keyhash(),(t=pa(c))==null?void 0:t.payment_cred().to_keyhash()].find(b=>b!==void 0);if(w!==void 0)return w.to_hex();throw new Error(`Couldn't resolve stake key hash from address: ${c}`)}catch(w){throw new Error(`An error occurred during resolveStakeKeyHash: ${w}.`)}},mn=(c,d=v_.minFeeA,t=v_.minFeeB)=>(BigInt(d)*BigInt(c)+BigInt(t)).toString(),fa=c=>{const d=L_(c).body();return y.exports.hash_transaction(d).to_hex()},ao=(c="",d=32)=>{if(d<=0||d>2048)throw new Error("Length must be bewteen 1 and 2048");const w=Yn.customAlphabet("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789")(d);return a_(`${c}${w}`)},so=c=>Kr(ia(c));class oo{_axiosInstance;constructor(...d){if(typeof d[0]=="string"&&d[0].startsWith("http"))this._axiosInstance=Ve.default.create({baseURL:d[0]});else{const t=d[0],w=t.slice(0,7);this._axiosInstance=Ve.default.create({baseURL:`https://cardano-${w}.blockfrost.io/api/v${d[1]??0}`,headers:{project_id:t}})}}async fetchAccountInfo(d){const t=d.startsWith("addr")?Cr(d):d;try{const{data:w,status:b}=await this._axiosInstance.get(`accounts/${t}`);if(b===200)return{poolId:w.pool_id,active:w.active||w.active_epoch!==null,balance:w.controlled_amount,rewards:w.withdrawable_amount,withdrawals:w.withdrawals_sum};throw $(w)}catch(w){throw $(w)}}resolveScriptRef=async d=>{if(d){const{data:t,status:w}=await this._axiosInstance.get(`scripts/${d}`);if(w===200){const b=t.type.startsWith("plutus")?{code:await this.fetchPlutusScriptCBOR(d),version:t.type.replace("plutus","")}:await this.fetchNativeScriptJSON(d);return fr(b).to_hex()}throw $(t)}};toUTxO=async(d,t)=>({input:{outputIndex:d.output_index,txHash:t},output:{address:d.address,amount:d.amount,dataHash:d.data_hash??void 0,plutusData:d.inline_datum??void 0,scriptRef:await this.resolveScriptRef(d.reference_script_hash),scriptHash:d.reference_script_hash}});async fetchAddressUTxOs(d,t){const w=t!==void 0?`/${t}`:"",b=`addresses/${d}/utxos`+w,h=async(k=1,j=[])=>{const{data:P,status:p}=await this._axiosInstance.get(`${b}?page=${k}`);if(p===200)return P.length>0?h(k+1,[...j,...await Promise.all(P.map(z=>this.toUTxO(z,z.tx_hash)))]):j;throw $(P)};try{return await h()}catch{return[]}}async fetchAssetAddresses(d){const t=async(w=1,b=[])=>{const{policyId:h,assetName:k}=Qe(d),{data:j,status:P}=await this._axiosInstance.get(`assets/${h}${k}/addresses?page=${w}`);if(P===200)return j.length>0?t(w+1,[...b,...j]):b;throw $(j)};try{return await t()}catch{return[]}}async fetchAssetMetadata(d){try{const{policyId:t,assetName:w}=Qe(d),{data:b,status:h}=await this._axiosInstance.get(`assets/${t}${w}`);if(h===200)return{...b.onchain_metadata};throw $(b)}catch(t){throw $(t)}}async fetchBlockInfo(d){try{const{data:t,status:w}=await this._axiosInstance.get(`blocks/${d}`);if(w===200)return{confirmations:t.confirmations,epoch:t.epoch,epochSlot:t.epoch_slot.toString(),fees:t.fees,hash:t.hash,nextBlock:t.next_block??"",operationalCertificate:t.op_cert,output:t.output??"0",previousBlock:t.previous_block,size:t.size,slot:t.slot.toString(),slotLeader:t.slot_leader??"",time:t.time,txCount:t.tx_count,VRFKey:t.block_vrf};throw $(t)}catch(t){throw $(t)}}async fetchCollectionAssets(d,t=1){try{const{data:w,status:b}=await this._axiosInstance.get(`assets/policy/${d}?page=${t}`);if(b===200)return{assets:w.map(h=>({unit:h.asset,quantity:h.quantity})),next:w.length===100?t+1:null};throw $(w)}catch{return{assets:[],next:null}}}async fetchHandleAddress(d){try{const t=a_(d.replace("$","")),{data:w,status:b}=await this._axiosInstance.get(`assets/${bn[1]}${t}/addresses`);if(b===200)return w[0].address;throw $(w)}catch(t){throw $(t)}}async fetchProtocolParameters(d=Number.NaN){try{const{data:t,status:w}=await this._axiosInstance.get(`epochs/${isNaN(d)?"latest":d}/parameters`);if(w===200)return{coinsPerUTxOSize:t.coins_per_utxo_word,collateralPercent:t.collateral_percent,decentralisation:t.decentralisation_param,epoch:t.epoch,keyDeposit:t.key_deposit,maxBlockExMem:t.max_block_ex_mem,maxBlockExSteps:t.max_block_ex_steps,maxBlockHeaderSize:t.max_block_header_size,maxBlockSize:t.max_block_size,maxCollateralInputs:t.max_collateral_inputs,maxTxExMem:t.max_tx_ex_mem,maxTxExSteps:t.max_tx_ex_steps,maxTxSize:t.max_tx_size,maxValSize:t.max_val_size,minFeeA:t.min_fee_a,minFeeB:t.min_fee_b,minPoolCost:t.min_pool_cost,poolDeposit:t.pool_deposit,priceMem:t.price_mem,priceStep:t.price_step};throw $(t)}catch(t){throw $(t)}}async fetchTxInfo(d){try{const{data:t,status:w}=await this._axiosInstance.get(`txs/${d}`);if(w===200)return{block:t.block,deposit:t.deposit,fees:t.fees,hash:t.hash,index:t.index,invalidAfter:t.invalid_hereafter??"",invalidBefore:t.invalid_before??"",slot:t.slot.toString(),size:t.size};throw $(t)}catch(t){throw $(t)}}async fetchUTxOs(d){try{const{data:t,status:w}=await this._axiosInstance.get(`txs/${d}/utxos`);if(w===200){const b=t.outputs,h=[];return b.forEach(j=>{h.push(this.toUTxO(j,d))}),await Promise.all(h)}throw $(t)}catch(t){throw $(t)}}onTxConfirmed(d,t,w=100){let b=0;const h=setInterval(()=>{b>=w&&clearInterval(h),this.fetchTxInfo(d).then(k=>{this.fetchBlockInfo(k.block).then(j=>{(j==null?void 0:j.confirmations)>0&&(clearInterval(h),t())}).catch(()=>{b+=1})}).catch(()=>{b+=1})},5e3)}async submitTx(d){try{const t={"Content-Type":"application/cbor"},{data:w,status:b}=await this._axiosInstance.post("tx/submit",kt(d),{headers:t});if(b===200)return w;throw $(w)}catch(t){throw $(t)}}async fetchPlutusScriptCBOR(d){const{data:t,status:w}=await this._axiosInstance.get(`scripts/${d}/cbor`);if(w===200)return t.cbor;throw $(t)}async fetchNativeScriptJSON(d){const{data:t,status:w}=await this._axiosInstance.get(`scripts/${d}/json`);if(w===200)return t.json;throw $(t)}}class io{_axiosInstance;constructor(d,t,w){const b=w.host??"ipfs.infura.io",h=w.port??5001,k=w.version??0;this._axiosInstance=Ve.default.create({baseURL:`https://${b}:${h}/api/v${k}`,auth:{username:d,password:t}})}async uploadContent(d,t=!1){try{const w={"Content-Type":"multipart/form-data"},{data:b,status:h}=await this._axiosInstance.post(`add?recursive=${t}`,d,{headers:w});if(h===200)return b;throw $(b)}catch(w){throw $(w)}}}class co{_axiosInstance;constructor(...d){if(typeof d[0]=="string"&&d[0].startsWith("http"))this._axiosInstance=Ve.default.create({baseURL:d[0],headers:{Authorization:`Bearer ${d[1]}`}});else{let t=1;typeof d[2]=="number"&&(t=d[2]);const w={baseURL:`https://${d[0]}.koios.rest/api/v${t}`};typeof d[1]=="string"&&(w.headers={Authorization:`Bearer ${d[1]}`}),this._axiosInstance=Ve.default.create(w)}}async fetchAccountInfo(d){try{const t=d.startsWith("addr")?Cr(d):d,{data:w,status:b}=await this._axiosInstance.post("account_info",{_stake_addresses:[t]});if(b===200)return{poolId:w[0].delegated_pool,active:w[0].status==="registered",balance:w[0].total_balance.toString(),rewards:w[0].rewards_available,withdrawals:w[0].withdrawals};throw $(w)}catch(t){throw $(t)}}async fetchAddressUTxOs(d,t){try{const{data:w,status:b}=await this._axiosInstance.post("address_info",{_addresses:[d]});if(b===200){const h=w.flatMap(k=>k.utxo_set).map(k=>this.toUTxO(k,d));return t!==void 0?h.filter(k=>k.output.amount.find(j=>j.unit===t)!==void 0):h}throw $(w)}catch{return[]}}async fetchAssetAddresses(d){try{const{policyId:t,assetName:w}=Qe(d),{data:b,status:h}=await this._axiosInstance.get(`asset_address_list?_asset_policy=${t}&_asset_name=${w}`);if(h===200)return b.map(k=>({address:k.payment_address,quantity:k.quantity}));throw $(b)}catch(t){throw $(t)}}async fetchAssetMetadata(d){try{const{policyId:t,assetName:w}=Qe(d),{data:b,status:h}=await this._axiosInstance.get(`asset_info?_asset_policy=${t}&_asset_name=${w}`);if(h===200)return{...b[0].minting_tx_metadata[721][t][vn(w)]};throw $(b)}catch(t){throw $(t)}}async fetchBlockInfo(d){try{const{data:t,status:w}=await this._axiosInstance.post("block_info",{_block_hashes:[d]});if(w===200)return{confirmations:t[0].num_confirmations,epoch:t[0].epoch_no,epochSlot:t[0].epoch_slot.toString(),fees:t[0].total_fees??"",hash:t[0].hash,nextBlock:t[0].child_hash??"",operationalCertificate:t[0].op_cert,output:t[0].total_output??"0",previousBlock:t[0].parent_hash,size:t[0].block_size,slot:t[0].abs_slot.toString(),slotLeader:t[0].pool??"",time:t[0].block_time,txCount:t[0].tx_count,VRFKey:t[0].vrf_key};throw $(t)}catch(t){throw $(t)}}async fetchCollectionAssets(d,t=0){try{const{data:w,status:b}=await this._axiosInstance.get(`asset_policy_info?_asset_policy=${d}&limit=100&offset=${t}`);if(b===200)return{assets:w.map(h=>({unit:`${d}${h.asset_name}`,quantity:h.total_supply})),next:w.length===100?t+100:null};throw $(w)}catch(w){throw $(w)}}async fetchHandleAddress(d){try{const t=a_(d.replace("$","")),{data:w,status:b}=await this._axiosInstance.get(`asset_address_list?_asset_policy=${bn[1]}&_asset_name=${t}`);if(b===200)return w[0].payment_address;throw $(w)}catch(t){throw $(t)}}async fetchProtocolParameters(d){try{const{data:t,status:w}=await this._axiosInstance.get(`epoch_params?_epoch_no=${d}`);if(w===200)return{coinsPerUTxOSize:t[0].coins_per_utxo_size,collateralPercent:t[0].collateral_percent,decentralisation:t[0].decentralisation,epoch:t[0].epoch_no,keyDeposit:t[0].key_deposit,maxBlockExMem:t[0].max_block_ex_mem.toString(),maxBlockExSteps:t[0].max_block_ex_steps.toString(),maxBlockHeaderSize:t[0].max_bh_size,maxBlockSize:t[0].max_block_size,maxCollateralInputs:t[0].max_collateral_inputs,maxTxExMem:t[0].max_tx_ex_mem.toString(),maxTxExSteps:t[0].max_tx_ex_steps.toString(),maxTxSize:t[0].max_tx_size,maxValSize:t[0].max_val_size.toString(),minFeeA:t[0].min_fee_a,minFeeB:t[0].min_fee_b,minPoolCost:t[0].min_pool_cost,poolDeposit:t[0].pool_deposit,priceMem:t[0].price_mem,priceStep:t[0].price_step};throw $(t)}catch(t){throw $(t)}}async fetchTxInfo(d){var t,w;try{const{data:b,status:h}=await this._axiosInstance.post("tx_info",{_tx_hashes:[d]});if(h===200)return{block:b[0].block_hash,deposit:b[0].deposit,fees:b[0].fee,hash:b[0].tx_hash,index:b[0].tx_block_index,invalidAfter:((t=b[0].invalid_after)==null?void 0:t.toString())??"",invalidBefore:((w=b[0].invalid_before)==null?void 0:w.toString())??"",slot:b[0].absolute_slot.toString(),size:b[0].tx_size};throw $(b)}catch(b){throw $(b)}}async fetchUTxOs(d){try{const{data:t,status:w}=await this._axiosInstance.post("tx_info",{_tx_hashes:[d]});if(w===200)return t[0].outputs.map(h=>this.toUTxO(h,h.payment_addr.bech32));throw $(t)}catch(t){throw $(t)}}onTxConfirmed(d,t,w=100){let b=0;const h=setInterval(()=>{b>=w&&clearInterval(h),this.fetchTxInfo(d).then(k=>{this.fetchBlockInfo(k.block).then(j=>{(j==null?void 0:j.confirmations)>0&&(clearInterval(h),t())}).catch(()=>{b+=1})}).catch(()=>{b+=1})},5e3)}async submitTx(d){try{const t={"Content-Type":"application/cbor"},{data:w,status:b}=await this._axiosInstance.post("submittx",kt(d),{headers:t});if(b===202)return w;throw $(w)}catch(t){throw $(t)}}toUTxO(d,t){var w,b;return{input:{outputIndex:d.tx_index,txHash:d.tx_hash},output:{address:t,amount:[{unit:"lovelace",quantity:d.value},...d.asset_list.map(h=>({unit:`${h.policy_id}${h.asset_name}`,quantity:`${h.quantity}`}))],dataHash:d.datum_hash??void 0,plutusData:((w=d.inline_datum)==null?void 0:w.bytes)??void 0,scriptRef:this.resolveScriptRef(d.reference_script),scriptHash:((b=d.reference_script)==null?void 0:b.hash)??void 0}}}resolveScriptRef=d=>{if(d){const t=d.type.startsWith("plutus")?{code:d.bytes,version:d.type.replace("plutus","")}:Jr($r(d.bytes));return fr(t).to_hex()}}}const po=["testnet","preview","preprod","mainnet"],ha=c=>po.includes(c);class wo{_baseUrl;constructor(...d){this._baseUrl=ha(d[0])?ns[d[0]]:d[0]}async evaluateTx(d){const t=await this.open();return this.send(t,"EvaluateTx",{evaluate:d}),new Promise((w,b)=>{t.addEventListener("message",h=>{try{const{result:k}=JSON.parse(h.data);k.EvaluationResult?w(Object.keys(k.EvaluationResult).map(j=>({index:parseInt(j.split(":")[1],10),tag:j.split(":")[0].toUpperCase(),budget:{mem:k.EvaluationResult[j].memory,steps:k.EvaluationResult[j].steps}}))):b(k.EvaluationFailure),t.close()}catch(k){b(k)}},{once:!0})})}async onNextTx(d){const t=await this.open();return this.send(t,"AwaitAcquire",{}),t.addEventListener("message",w=>{const{result:b}=JSON.parse(w.data);if(b===null)return this.send(t,"AwaitAcquire",{});b.AwaitAcquired===void 0&&d(b),this.send(t,"NextTx",{})}),()=>t.close()}async submitTx(d){const t=await this.open();return this.send(t,"SubmitTx",{submit:d}),new Promise((w,b)=>{t.addEventListener("message",h=>{try{const{result:k}=JSON.parse(h.data);k.SubmitSuccess?w(k.SubmitSuccess.txId):b(k.SubmitFail),t.close()}catch(k){b(k)}},{once:!0})})}async open(){const d=new WebSocket(this._baseUrl);return await new Promise(t=>{d.addEventListener("open",()=>t(!0),{once:!0})}),d}send(d,t,w){d.send(JSON.stringify({version:"1.0",type:"jsonwsp/request",servicename:"ogmios",methodname:t,args:w}))}}class lo{_axiosInstance;constructor(d,t,w,b=1){this._axiosInstance=Ve.default.create({baseURL:`https://cardano-${d}.tangocrypto.com/${t}/v${b}`,headers:{"x-api-key":w}})}async evaluateTx(d){try{const{data:t,status:w}=await this._axiosInstance.post("transactions/evaluate",{tx:d,utxos:[]});if(w===200)return t.redeemers.map(b=>({index:b.index,tag:b.purpose.toUpperCase(),budget:{mem:b.unit_mem,steps:b.unit_steps}}));throw $(t)}catch(t){throw $(t)}}async fetchAccountInfo(d){try{const t=d.startsWith("addr")?Cr(d):d,{data:w,status:b}=await this._axiosInstance.get(`wallets/${t}`);if(b===200)return{poolId:w.pool_id,active:w.active,balance:w.controlled_total_stake,rewards:w.rewards_sum,withdrawals:w.withdrawals_sum};throw $(w)}catch(t){throw $(t)}}async fetchAddressUTxOs(d,t){const w=t!==void 0?`/assets/${t}`:"",b=`addresses/${d}${w}/utxos?size=50`,h=async(p="",z=[])=>{var m;const{data:Y,status:q}=await this._axiosInstance.get(`${b}&cursor=${p}`);if(q===200)return Y.cursor!==null&&((m=Y.cursor)==null?void 0:m.length)>0?h(Y.cursor,[...z,...Y.data.map(P)]):Y.data.map(P);throw $(Y)},k=(p,z)=>{const Y=[{unit:"lovelace",quantity:p.toString()}];return z.forEach(q=>{const m=a_(q.asset_name);Y.push({unit:`${q.policy_id}${m}`,quantity:q.quantity.toString()})}),Y},j=p=>{if(p){const z=p.type.startsWith("plutus")?{code:p.code,version:p.type.replace("plutus","")}:Jr($r(p.json));return fr(z).to_hex()}},P=p=>{var z;return{input:{outputIndex:p.index,txHash:p.hash},output:{address:d,amount:k(p.value,p.assets),dataHash:void 0,plutusData:((z=p.inline_datum)==null?void 0:z.value_raw)??void 0,scriptRef:j(p.reference_script)}}};try{return await h()}catch{return[]}}async fetchAssetAddresses(d){const t=b=>({address:b.address,quantity:b.quantity.toString()}),w=async(b="",h=[])=>{var z;const{policyId:k,assetName:j}=Qe(d),{data:P,status:p}=await this._axiosInstance.get(`assets/${k}${j}/addresses?size=100&cursor=${b}`);if(p===200)return P.cursor!==null&&((z=P.cursor)==null?void 0:z.length)>0?w(P.cursor,[...h,...P.data.map(t)]):P.data.map(t);throw $(P)};try{return await w()}catch{return[]}}async fetchAssetMetadata(d){var t;try{const{policyId:w,assetName:b}=Qe(d),{data:h,status:k}=await this._axiosInstance.get(`assets/${w}${b}`);if(k===200)return{...(t=h.metadata.find(j=>j.label===721))==null?void 0:t.json[w][vn(b)]};throw $(h)}catch(w){throw $(w)}}async fetchBlockInfo(d){try{const{data:t,status:w}=await this._axiosInstance.get(`blocks/${d}`);if(w===200)return{confirmations:t.confirmations,epoch:t.epoch_no,epochSlot:t.epoch_slot_no.toString(),fees:t.fees.toString(),hash:t.hash,nextBlock:t.next_block.toString()??"",operationalCertificate:t.op_cert,output:t.out_sum.toString()??"0",previousBlock:t.previous_block.toString(),size:t.size,slot:t.slot_no.toString(),slotLeader:t.slot_leader??"",time:Date.parse(t.time),txCount:t.tx_count,VRFKey:t.vrf_key};throw $(t)}catch(t){throw $(t)}}async fetchCollectionAssets(d,t=""){try{const{data:w,status:b}=await this._axiosInstance.get(`policies/${d}/assets?size=100&cursor=${t}`);if(b===200)return{assets:w.data.map(h=>({unit:`${h.policy_id}${h.asset_name}`,quantity:h.quantity})),next:w.cursor};throw $(w)}catch{return{assets:[],next:null}}}async fetchHandleAddress(d){try{const t=a_(d.replace("$","")),{data:w,status:b}=await this._axiosInstance.get(`assets/${bn[1]}${t}/addresses`);if(b===200)return w.data[0].address;throw $(w)}catch(t){throw $(t)}}async fetchProtocolParameters(d){try{const{data:t,status:w}=await this._axiosInstance.get(`epochs/${d}/parameters`);if(w===200)return{coinsPerUTxOSize:t.coins_per_utxo_size.toString(),collateralPercent:t.collateral_percent,decentralisation:t.decentralisation,epoch:t.epoch_no,keyDeposit:t.key_deposit.toString(),maxBlockExMem:t.max_block_ex_mem.toString(),maxBlockExSteps:t.max_block_ex_steps.toString(),maxBlockHeaderSize:t.max_block_header_size,maxBlockSize:t.max_block_size,maxCollateralInputs:t.max_collateral_inputs,maxTxExMem:t.max_tx_ex_mem.toString(),maxTxExSteps:t.max_tx_ex_steps.toString(),maxTxSize:t.max_tx_size,maxValSize:t.max_val_size.toString(),minFeeA:t.min_fee_a,minFeeB:t.min_fee_b,minPoolCost:t.min_pool_cost.toString(),poolDeposit:t.pool_deposit.toString(),priceMem:t.price_mem,priceStep:t.price_step};throw $(t)}catch(t){throw $(t)}}async fetchTxInfo(d){try{const{data:t,status:w}=await this._axiosInstance.get(`transactions/${d}`);if(w===200)return{block:t.block.hash,deposit:t.deposit,fees:t.fee,hash:t.hash,index:t.block_index,invalidAfter:t.invalid_hereafter??"",invalidBefore:t.invalid_before??"",slot:t.block.slot_no.toString(),size:t.size};throw $(t)}catch(t){throw $(t)}}async fetchUTxOs(d){try{return console.log(d),[]}catch(t){throw $(t)}}onTxConfirmed(d,t,w=100){let b=0;const h=setInterval(()=>{b>=w&&clearInterval(h),this.fetchTxInfo(d).then(k=>{this.fetchBlockInfo(k.block).then(j=>{(j==null?void 0:j.confirmations)>0&&(clearInterval(h),t())}).catch(()=>{b+=1})}).catch(()=>{b+=1})},5e3)}async submitTx(d){try{const t={"Content-Type":"application/json"},{data:w,status:b}=await this._axiosInstance.post("transactions/submit",{tx:d},{headers:t});if(b===200)return w.tx_id;throw $(w)}catch(t){throw $(t)}}}class go{_axiosInstance;_amountsAsStrings={headers:{"amounts-as-strings":"true"}};submitUrl;constructor({network:d,apiKey:t,turboSubmit:w=!1}){this._axiosInstance=Ve.default.create({baseURL:`https://${d}.gomaestro-api.org/v1`,headers:{"api-key":t}}),this.submitUrl=w?"txmanager/turbosubmit":"txmanager"}async evaluateTx(d){try{const{data:t,status:w}=await this._axiosInstance.post("transactions/evaluate",{cbor:d});if(w===200){const b={spend:"SPEND",mint:"MINT",cert:"CERT",wdrl:"REWARD"};return t.map(k=>{const j=k.ex_units,P=k.redeemer_index,p=b[k.redeemer_tag];return{budget:j,index:P,tag:p}})}throw $(t)}catch(t){throw $(t)}}async fetchAccountInfo(d){const t=d.startsWith("addr")?Cr(d):d;try{const{data:w,status:b}=await this._axiosInstance.get(`accounts/${t}`,this._amountsAsStrings);if(b===200){const h=w.data;return{poolId:h.delegated_pool,active:h.registered,balance:h.total_balance,rewards:h.rewards_available,withdrawals:h.total_withdrawn}}throw $(w)}catch(w){throw $(w)}}async fetchAddressUTxOs(d,t){const w=(()=>d.startsWith("addr_vkh")||d.startsWith("addr_shared_vkh")?`addresses/cred/${d}`:`addresses/${d}`)(),b=t?`&asset=${t}`:"",h=async(k=null,j=[])=>{const P=k===null?"":`&cursor=${k}`,{data:p,status:z}=await this._axiosInstance.get(`${w}/utxos?count=100${b}${P}`,this._amountsAsStrings);if(z===200){const q=p.data.map(this.toUTxO),m=[...j,...q],G=p.next_cursor;return G==null?m:h(G,m)}throw $(p)};try{return await h()}catch{return[]}}async fetchAssetAddresses(d){const{policyId:t,assetName:w}=Qe(d),b=async(h=null,k=[])=>{const j=h===null?"":`&cursor=${h}`,{data:P,status:p}=await this._axiosInstance.get(`assets/${t}${w}/addresses?count=100${j}`,this._amountsAsStrings);if(p===200){const Y=P.data.map(G=>({address:G.address,quantity:G.amount})),q=P.next_cursor,m=[...k,...Y];return q==null?m:b(q,m)}throw $(P)};try{return await b()}catch{return[]}}async fetchAssetMetadata(d){try{const{policyId:t,assetName:w}=Qe(d),{data:b,status:h}=await this._axiosInstance.get(`assets/${t}${w}`);if(h===200){const k=b.data;return{...k.asset_standards.cip25_metadata,...k.asset_standards.cip68_metadata}}throw $(b)}catch(t){throw $(t)}}async fetchBlockInfo(d){var t;try{const{data:w,status:b}=await this._axiosInstance.get(`blocks/${d}`,this._amountsAsStrings);if(b===200){const h=w.data;return{confirmations:h.confirmations,epoch:h.epoch,epochSlot:h.epoch_slot.toString(),fees:h.total_fees,hash:h.hash,nextBlock:h.next_block??"",operationalCertificate:(t=h.operational_certificate)==null?void 0:t.hot_vkey,output:h.total_output_lovelace??"0",previousBlock:h.previous_block,size:h.size,slot:h.absolute_slot.toString(),slotLeader:h.block_producer??"",time:Date.parse(h.timestamp)/1e3,txCount:h.tx_hashes.length,VRFKey:y.exports.VRFVKey.from_hex(h.vrf_key).to_bech32("vrf_vk")}}throw $(w)}catch(w){throw $(w)}}async fetchCollectionAssets(d,t){try{const{data:w,status:b}=await this._axiosInstance.get(`policy/${d}/assets?count=100${t?`&cursor=${t}`:""}`);if(b===200)return{assets:w.data.map(k=>({unit:d+k.asset_name,quantity:k.total_supply})),next:w.next_cursor};throw $(w)}catch{return{assets:[],next:null}}}async fetchHandleAddress(d){try{const t=d.charAt(0)==="$"?d.substring(1):d,{data:w,status:b}=await this._axiosInstance.get(`ecosystem/adahandle/${t}`);if(b===200)return w.data;throw $(w)}catch(t){throw $(t)}}async fetchProtocolParameters(d=Number.NaN){if(!isNaN(d))throw new Error("Maestro only supports fetching Protocol parameters of the latest completed epoch.");const t=w=>{const b=w.indexOf("/");return parseInt(w.slice(0,b))/parseInt(w.slice(b+1))};try{const{data:w,status:b}=await this._axiosInstance.get("protocol-params");if(b===200){const h=w.data;try{const{data:k,status:j}=await this._axiosInstance.get("epochs/current");if(j===200){const P=k.data;return{coinsPerUTxOSize:h.coins_per_utxo_byte.toString(),collateralPercent:parseInt(h.collateral_percentage),decentralisation:0,epoch:parseInt(P.epoch_no),keyDeposit:h.stake_key_deposit.toString(),maxBlockExMem:h.max_execution_units_per_block.memory.toString(),maxBlockExSteps:h.max_execution_units_per_block.steps.toString(),maxBlockHeaderSize:parseInt(h.max_block_header_size),maxBlockSize:parseInt(h.max_block_body_size),maxCollateralInputs:parseInt(h.max_collateral_inputs),maxTxExMem:h.max_execution_units_per_transaction.memory.toString(),maxTxExSteps:h.max_execution_units_per_transaction.steps.toString(),maxTxSize:parseInt(h.max_tx_size),maxValSize:h.max_value_size.toString(),minFeeA:h.min_fee_coefficient,minFeeB:h.min_fee_constant,minPoolCost:h.min_pool_cost.toString(),poolDeposit:h.pool_deposit.toString(),priceMem:t(h.prices.memory),priceStep:t(h.prices.steps)}}throw $(k)}catch(k){throw $(k)}}throw $(w)}catch(w){throw $(w)}}async fetchTxInfo(d){try{const{data:t,status:w}=await this._axiosInstance.get(`transactions/${d}`);if(w===200){const b=t.data;return{block:b.block_hash,deposit:b.deposit.toString(),fees:b.fee.toString(),hash:b.tx_hash,index:b.block_tx_index,invalidAfter:b.invalid_hereafter??"",invalidBefore:b.invalid_before??"",slot:b.block_absolute_slot.toString(),size:b.size-1}}throw $(t)}catch(t){throw $(t)}}async fetchUTxOs(d){try{const{data:t,status:w}=await this._axiosInstance.get(`transactions/${d}`,this._amountsAsStrings);if(w===200)return t.data.outputs.map(this.toUTxO);throw $(t)}catch(t){throw $(t)}}onTxConfirmed(d,t,w=100){let b=0;const h=setInterval(()=>{b>=w&&clearInterval(h),this.fetchTxInfo(d).then(k=>{this.fetchBlockInfo(k.block).then(j=>{(j==null?void 0:j.confirmations)>0&&(clearInterval(h),t())}).catch(()=>{b+=1})}).catch(()=>{b+=1})},5e3)}async submitTx(d){try{const t={"Content-Type":"application/cbor"},{data:w,status:b}=await this._axiosInstance.post(this.submitUrl,kt(d),{headers:t});if(b===202)return w;throw $(w)}catch(t){throw $(t)}}toUTxO=d=>{var t,w,b;return{input:{outputIndex:d.index,txHash:d.tx_hash},output:{address:d.address,amount:d.assets.map(h=>({unit:h.unit,quantity:h.amount})),dataHash:(t=d.datum)==null?void 0:t.hash,plutusData:(w=d.datum)==null?void 0:w.bytes,scriptRef:this.resolveScript(d),scriptHash:(b=d.reference_script)==null?void 0:b.hash}}};resolveScript=d=>{if(d.reference_script){const t=d.reference_script.type==="native"?d.reference_script.json:{code:d.reference_script.bytes,version:d.reference_script.type.replace("plutusv","V")};return fr(t).to_hex()}else return}}class bo{static withOneSignature(d){const t=V_(Ze(d));return Ur(t).to_hex()}static withAtLeastNSignatures(d,t){const w=y.exports.NativeScripts.new();d.forEach(h=>{const k=V_(Ze(h));w.add(Ur(k))});const b=y.exports.ScriptNOfK.new(t,w);return y.exports.NativeScript.new_script_any(b).to_hex()}static withAnySignature(d){const t=y.exports.NativeScripts.new();d.forEach(b=>{const h=V_(Ze(b));t.add(Ur(h))});const w=y.exports.ScriptAny.new(t);return y.exports.NativeScript.new_script_any(w).to_hex()}static withAllSignatures(d){const t=y.exports.NativeScripts.new();d.forEach(b=>{const h=V_(Ze(b));t.add(Ur(h))});const w=y.exports.ScriptAll.new(t);return y.exports.NativeScript.new_script_any(w).to_hex()}static fromNativeScript(d){return Wr(d).to_hex()}}function Le(c,d,t,w){var b=arguments.length,h=b<3?d:w===null?w=Object.getOwnPropertyDescriptor(d,t):w,k;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")h=Reflect.decorate(c,d,t,w);else for(var j=c.length-1;j>=0;j--)(k=c[j])&&(h=(b<3?k(h):b>3?k(d,t,h):k(d,t))||h);return b>3&&h&&Object.defineProperty(d,t,h),h}const uo=c=>class extends c{__visits=[]},tr=()=>function(c,d,t){const w=t.value;t.value=function(...b){const h=w.call(this,...b);return this.__visits&&this.__visits.push(d),h}};exports.Transaction=class{_changeAddress;_txOutputs=new Map;_recipients=new Map;_totalBurns=new Map;_totalMints=new Map;_era;_initiator;_mintBuilder;_protocolParameters;_txBuilder;_txCertificates;_txInputsBuilder;_txWithdrawals;constructor(d={}){this._era=d.era,this._initiator=d.initiator,this._mintBuilder=y.exports.MintBuilder.new(),this._protocolParameters=d.parameters??v_,this._txBuilder=Hr(d.parameters),this._txCertificates=y.exports.Certificates.new(),this._txInputsBuilder=y.exports.TxInputsBuilder.new(),this._txWithdrawals=y.exports.Withdrawals.new()}static attachMetadata(d,t,w="BABBAGE"){var k;const b=L_(d),h=b.auxiliary_data()??y.exports.AuxiliaryData.new();if(h.set_metadata(y.exports.GeneralTransactionMetadata.from_hex(t)),h.set_prefer_alonzo_format(w==="ALONZO"),y.exports.hash_auxiliary_data(h).to_hex()!==((k=b.body().auxiliary_data_hash())==null?void 0:k.to_hex()))throw new Error("[Transaction] attachMetadata: The metadata hash does not match the auxiliary data hash.");return y.exports.Transaction.new(b.body(),b.witness_set(),h).to_hex()}static deattachMetadata(d){const t=L_(d);return y.exports.Transaction.new(t.body(),t.witness_set(),void 0).to_hex()}static maskMetadata(d,t="BABBAGE"){var h;const w=L_(d),b=(h=w.auxiliary_data())==null?void 0:h.metadata();if(b!==void 0){const k=y.exports.GeneralTransactionMetadata.new();for(let P=0;P<b.len();P+=1){const p=b.keys().get(P),z=b.get(p);k.insert(p,y.exports.TransactionMetadatum.from_hex("0".repeat(((z==null?void 0:z.to_hex())??"").length)))}const j=w.auxiliary_data();return j!==void 0&&(j.set_metadata(k),j.set_prefer_alonzo_format(t==="ALONZO")),y.exports.Transaction.new(w.body(),w.witness_set(),j).to_hex()}return d}static readMetadata(d){var w,b;return((b=(w=L_(d).auxiliary_data())==null?void 0:w.metadata())==null?void 0:b.to_hex())??""}static writeMetadata(d,t,w="BABBAGE"){const b=L_(d),h=b.auxiliary_data()??y.exports.AuxiliaryData.new();return h.set_metadata(y.exports.GeneralTransactionMetadata.from_hex(t)),h.set_prefer_alonzo_format(w==="ALONZO"),y.exports.Transaction.new(b.body(),b.witness_set(),h).to_hex()}get size(){return this._txBuilder.full_size()}async build(){try{return(this._mintBuilder.has_plutus_scripts()||this.notVisited("redeemValue")===!1)&&(await this.addRequiredSignersIfNeeded(),await this.addCollateralIfNeeded()),await this.forgeAssetsIfNeeded(),await this.addTxInputsAsNeeded(),await this.addChangeAddress(),this._txBuilder.build_tx().to_hex()}catch(d){throw new Error(`[Transaction] An error occurred during build: ${d}.`)}}burnAsset(d,t,w){const b=this._totalBurns.has(t.unit)?y.exports.BigNum.from_str(this._totalBurns.get(t.unit)??"0").checked_add(y.exports.BigNum.from_str(t.quantity)).to_str():t.quantity;return this._mintBuilder.add_asset(Vn(d,w),y.exports.AssetName.new(kt(t.unit.slice(Y_))),y.exports.Int.new_negative(y.exports.BigNum.from_str(t.quantity))),this._totalBurns.set(t.unit,b),this}delegateStake(d,t){const w=y.exports.Certificate.new_stake_delegation(y.exports.StakeDelegation.new(y.exports.StakeCredential.from_keyhash(V_(cr(d))),y.exports.Ed25519KeyHash.from_bech32(t)));return this._txCertificates.add(w),this}deregisterStake(d){const t=y.exports.Certificate.new_stake_deregistration(y.exports.StakeDeregistration.new(y.exports.StakeCredential.from_keyhash(V_(cr(d)))));return this._txCertificates.add(t),this}mintAsset(d,t,w){var p,z;const b=(Y,q)=>{const m=typeof Y=="string"?$r(Y).hash().to_hex():h(Y).hash().to_hex(),G=a_(q.assetName);return{unit:`${m}${G}`,quantity:q.assetQuantity}},h=Y=>{if("code"in Y)return ur(Y.code,Y.version);const q=z_(Y);if(q.output().has_script_ref()){const m=q.output().script_ref();if(m.is_plutus_script()){const G=la(m);return ur(G.code,G.version)}}throw new Error(`[Transaction] No plutus script reference found in UTxO: ${q.input().transaction_id().to_hex()}`)},k=b(d,t),P=y.exports.BigNum.from_str(((p=this._totalMints.get(k.unit))==null?void 0:p.assetQuantity)??"0").checked_add(y.exports.BigNum.from_str(k.quantity));return this._mintBuilder.add_asset(Vn(d,w),y.exports.AssetName.new(kt(a_(t.assetName))),y.exports.Int.new(y.exports.BigNum.from_str(k.quantity))),this._recipients.has(t.recipient)?(z=this._recipients.get(t.recipient))==null||z.push(k):this._recipients.set(t.recipient,[k]),this._totalMints.set(k.unit,{...t,assetQuantity:P.to_str()}),this}redeemValue(d){const t={tag:"SPEND",budget:dr,index:this._txInputsBuilder.inputs().len(),data:{alternative:0,fields:[]},...d.redeemer},w=z_(d.value),b=d.datum?y.exports.PlutusWitness.new_with_ref(on(d.script),Gs(d.datum),nn(t)):y.exports.PlutusWitness.new_with_ref_without_datum(on(d.script),nn(t));return this._txInputsBuilder.add_plutus_script_input(b,w.input(),w.output().amount()),this}registerStake(d){const t=y.exports.Certificate.new_stake_registration(y.exports.StakeRegistration.new(y.exports.StakeCredential.from_keyhash(V_(cr(d)))));return this._txCertificates.add(t),this}registerPool(d){const t=y.exports.Certificate.new_pool_registration(y.exports.PoolRegistration.new(Ys(d)));return this._txCertificates.add(t),this}retirePool(d,t){const w=y.exports.Certificate.new_pool_retirement(y.exports.PoolRetirement.new(y.exports.Ed25519KeyHash.from_bech32(d),t));return this._txCertificates.add(w),this}sendAssets(d,t){const w=Ee(t),b=w.multiasset();if(w.is_zero()||b===void 0)return this;const h=Pr(d).next(),k=w.coin().is_zero()?h.with_asset_and_min_required_coin_by_utxo_cost(b,an(this._protocolParameters.coinsPerUTxOSize)).build():h.with_coin_and_asset(w.coin(),b).build();return t.forEach(j=>{this.setTxOutput(j)}),this._txBuilder.add_output(k),this}sendLovelace(d,t){const b=Pr(d).next().with_coin(y.exports.BigNum.from_str(t)).build();return this.setTxOutput({unit:"lovelace",quantity:t}),this._txBuilder.add_output(b),this}sendToken(d,t,w){return this.sendAssets(d,[{quantity:w,unit:as[t]}]),this}sendValue(d,t){const w=Ee(t.output.amount),h=Pr(d).next().with_value(w).build();return t.output.amount.forEach(k=>{this.setTxOutput(k)}),this._txBuilder.add_output(h),this}setChangeAddress(d){return this._changeAddress=S_(d),this}setCollateral(d){const t=Ln(d);return this._txBuilder.set_collateral(t),this}setMetadata(d,t){return this._txBuilder.add_json_metadatum_with_schema(y.exports.BigNum.from_str(d.toString()),JSON.stringify(t),y.exports.MetadataJsonSchema.NoConversions),this}setRequiredSigners(d){return Array.from(new Set(d.map(w=>w.startsWith("addr")?Ze(w):cr(w)).map(w=>V_(w)))).forEach(w=>{this._txBuilder.add_required_signer(w)}),this}setTimeToStart(d){return this._txBuilder.set_validity_start_interval_bignum(y.exports.BigNum.from_str(d)),this}setTimeToExpire(d){return this._txBuilder.set_ttl_bignum(y.exports.BigNum.from_str(d)),this}setTxInputs(d){return d.map(t=>z_(t)).forEach(t=>{this._txInputsBuilder.add_input(t.output().address(),t.input(),t.output().amount())}),this}setTxRefInputs(d){return d.map(t=>z_(t)).forEach(t=>{this._txBuilder.add_reference_input(t.input())}),this}withdrawRewards(d,t){const w=pa(d);return w!==void 0&&this._txWithdrawals.insert(w,y.exports.BigNum.from_str(t)),this}async addBurnInputsIfNeeded(){if(this._initiator&&this._totalBurns.size>0&&this.notVisited("setTxInputs")){const d=await this._initiator.getUsedUTxOs();Wn(this._totalBurns,d.map(w=>Vr(w))).map(w=>z_(w)).forEach(w=>{this._txInputsBuilder.add_input(w.output().address(),w.input(),w.output().amount())})}}async addChangeAddress(){if(this._initiator&&this._changeAddress===void 0){const d=await this._initiator.getUsedAddress();this._txBuilder.add_change_if_needed(d)}else this._changeAddress!==void 0&&this._txBuilder.add_change_if_needed(this._changeAddress)}async addCollateralIfNeeded(){if(this._initiator&&this.notVisited("setCollateral")){const d=await this._initiator.getUsedCollateral();this._txBuilder.set_collateral(Ln(d))}}async addRequiredSignersIfNeeded(){if(this._initiator&&this.notVisited("setRequiredSigners")){const d=await this._initiator.getUsedAddress(),t=Ze(d.to_bech32());this._txBuilder.add_required_signer(V_(t))}}async addTxInputsAsNeeded(){if(this.notVisited("setTxInputs")){const d=await this.filterAvailableUTxOs();Jn(this._txOutputs,d.map(w=>Vr(w))).map(w=>z_(w)).forEach(w=>{this._txInputsBuilder.add_input(w.output().address(),w.input(),w.output().amount())})}if(this._txBuilder.set_inputs(this._txInputsBuilder),(this._mintBuilder.has_native_scripts()||this._mintBuilder.has_plutus_scripts())&&this._txBuilder.set_mint_builder(this._mintBuilder),this._txCertificates.len()>0&&this._txBuilder.set_certs(this._txCertificates),this._txWithdrawals.len()>0&&this._txBuilder.set_withdrawals(this._txWithdrawals),this._txBuilder.get_mint_builder()||this.notVisited("redeemValue")===!1){const d=this._era!==void 0?An[this._era]:An.BABBAGE;this._txBuilder.calc_script_data_hash(d)}}async forgeAssetsIfNeeded(){const d=(t,w)=>{const b=t.data.assetName,h=t.data.metadata,k=t.unit.slice(0,Y_);if(t.data.label==="777")return h;if(w&&w[k]){const{[k]:j,...P}=w,p={[b]:h,...j};return{[k]:{...p},...P}}return w!==void 0?{[k]:{[b]:h},...w}:{[k]:{[b]:h}}};await this.addBurnInputsIfNeeded(),Array.from(this._totalMints,t=>({unit:t[0],data:t[1]})).reduce((t,w)=>t.set(w.data.label,d(w,t.get(w.data.label))),new Map).forEach((t,w)=>{this._txBuilder.add_json_metadatum(y.exports.BigNum.from_str(w),JSON.stringify(t))}),this.addMintOutputs()}async filterAvailableUTxOs(d=[]){return this._initiator===void 0?[]:(await this._initiator.getUsedUTxOs()).filter(w=>d.find(b=>b.input.txHash===w.input().transaction_id().to_hex())===void 0)}addMintOutputs(){this._recipients.forEach((d,t)=>{const b=Ee(d).multiasset();if(b!==void 0){const k=Pr(t).next().with_asset_and_min_required_coin_by_utxo_cost(b,an(this._protocolParameters.coinsPerUTxOSize)).build();this._txBuilder.add_output(k)}})}notVisited(d){return this.__visits.includes(d)===!1}setTxOutput(d){const w=y.exports.BigNum.from_str(this._txOutputs.get(d.unit)??"0").checked_add(y.exports.BigNum.from_str(d.quantity)).to_str();this._txOutputs.set(d.unit,w)}};Le([tr()],exports.Transaction.prototype,"mintAsset",null);Le([tr()],exports.Transaction.prototype,"redeemValue",null);Le([tr()],exports.Transaction.prototype,"sendAssets",null);Le([tr()],exports.Transaction.prototype,"sendValue",null);Le([tr()],exports.Transaction.prototype,"setCollateral",null);Le([tr()],exports.Transaction.prototype,"setRequiredSigners",null);Le([tr()],exports.Transaction.prototype,"setTxInputs",null);exports.Transaction=Le([uo],exports.Transaction);var lr={exports:{}},ya={exports:{}},kn={exports:{}};(function(c){(function(d){var t,w=/^-?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?$/i,b=Math.ceil,h=Math.floor,k="[BigNumber Error] ",j=k+"Number primitive has more than 15 significant digits: ",P=1e14,p=14,z=9007199254740991,Y=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8,1e9,1e10,1e11,1e12,1e13],q=1e7,m=1e9;function G(_t){var g,D,Q,J=I.prototype={constructor:I,toString:null,valueOf:null},ct=new I(1),bt=20,xt=4,At=-7,pt=21,It=-1e7,Ut=1e7,Dt=!1,Pt=1,qt=0,K={prefix:"",groupSize:3,secondaryGroupSize:0,groupSeparator:",",decimalSeparator:".",fractionGroupSize:0,fractionGroupSeparator:"\xA0",suffix:""},R="0123456789abcdefghijklmnopqrstuvwxyz",L=!0;function I(x,A){var B,N,S,T,F,E,O,M,U=this;if(!(U instanceof I))return new I(x,A);if(A==null){if(x&&x._isBigNumber===!0){U.s=x.s,!x.c||x.e>Ut?U.c=U.e=null:x.e<It?U.c=[U.e=0]:(U.e=x.e,U.c=x.c.slice());return}if((E=typeof x=="number")&&x*0==0){if(U.s=1/x<0?(x=-x,-1):1,x===~~x){for(T=0,F=x;F>=10;F/=10,T++);T>Ut?U.c=U.e=null:(U.e=T,U.c=[x]);return}M=String(x)}else{if(!w.test(M=String(x)))return Q(U,M,E);U.s=M.charCodeAt(0)==45?(M=M.slice(1),-1):1}(T=M.indexOf("."))>-1&&(M=M.replace(".","")),(F=M.search(/e/i))>0?(T<0&&(T=F),T+=+M.slice(F+1),M=M.substring(0,F)):T<0&&(T=M.length)}else{if(v(A,2,R.length,"Base"),A==10&&L)return U=new I(x),et(U,bt+U.e+1,xt);if(M=String(x),E=typeof x=="number"){if(x*0!=0)return Q(U,M,E,A);if(U.s=1/x<0?(M=M.slice(1),-1):1,I.DEBUG&&M.replace(/^0\.0*|\./,"").length>15)throw Error(j+x)}else U.s=M.charCodeAt(0)===45?(M=M.slice(1),-1):1;for(B=R.slice(0,A),T=F=0,O=M.length;F<O;F++)if(B.indexOf(N=M.charAt(F))<0){if(N=="."){if(F>T){T=O;continue}}else if(!S&&(M==M.toUpperCase()&&(M=M.toLowerCase())||M==M.toLowerCase()&&(M=M.toUpperCase()))){S=!0,F=-1,T=0;continue}return Q(U,String(x),E,A)}E=!1,M=D(M,A,10,U.s),(T=M.indexOf("."))>-1?M=M.replace(".",""):T=M.length}for(F=0;M.charCodeAt(F)===48;F++);for(O=M.length;M.charCodeAt(--O)===48;);if(M=M.slice(F,++O)){if(O-=F,E&&I.DEBUG&&O>15&&(x>z||x!==h(x)))throw Error(j+U.s*x);if((T=T-F-1)>Ut)U.c=U.e=null;else if(T<It)U.c=[U.e=0];else{if(U.e=T,U.c=[],F=(T+1)%p,T<0&&(F+=p),F<O){for(F&&U.c.push(+M.slice(0,F)),O-=p;F<O;)U.c.push(+M.slice(F,F+=p));F=p-(M=M.slice(F)).length}else F-=O;for(;F--;M+="0");U.c.push(+M)}}else U.c=[U.e=0]}I.clone=G,I.ROUND_UP=0,I.ROUND_DOWN=1,I.ROUND_CEIL=2,I.ROUND_FLOOR=3,I.ROUND_HALF_UP=4,I.ROUND_HALF_DOWN=5,I.ROUND_HALF_EVEN=6,I.ROUND_HALF_CEIL=7,I.ROUND_HALF_FLOOR=8,I.EUCLID=9,I.config=I.set=function(x){var A,B;if(x!=null)if(typeof x=="object"){if(x.hasOwnProperty(A="DECIMAL_PLACES")&&(B=x[A],v(B,0,m,A),bt=B),x.hasOwnProperty(A="ROUNDING_MODE")&&(B=x[A],v(B,0,8,A),xt=B),x.hasOwnProperty(A="EXPONENTIAL_AT")&&(B=x[A],B&&B.pop?(v(B[0],-m,0,A),v(B[1],0,m,A),At=B[0],pt=B[1]):(v(B,-m,m,A),At=-(pt=B<0?-B:B))),x.hasOwnProperty(A="RANGE"))if(B=x[A],B&&B.pop)v(B[0],-m,-1,A),v(B[1],1,m,A),It=B[0],Ut=B[1];else if(v(B,-m,m,A),B)It=-(Ut=B<0?-B:B);else throw Error(k+A+" cannot be zero: "+B);if(x.hasOwnProperty(A="CRYPTO"))if(B=x[A],B===!!B)if(B)if(typeof crypto<"u"&&crypto&&(crypto.getRandomValues||crypto.randomBytes))Dt=B;else throw Dt=!B,Error(k+"crypto unavailable");else Dt=B;else throw Error(k+A+" not true or false: "+B);if(x.hasOwnProperty(A="MODULO_MODE")&&(B=x[A],v(B,0,9,A),Pt=B),x.hasOwnProperty(A="POW_PRECISION")&&(B=x[A],v(B,0,m,A),qt=B),x.hasOwnProperty(A="FORMAT"))if(B=x[A],typeof B=="object")K=B;else throw Error(k+A+" not an object: "+B);if(x.hasOwnProperty(A="ALPHABET"))if(B=x[A],typeof B=="string"&&!/^.?$|[+\-.\s]|(.).*\1/.test(B))L=B.slice(0,10)=="0123456789",R=B;else throw Error(k+A+" invalid: "+B)}else throw Error(k+"Object expected: "+x);return{DECIMAL_PLACES:bt,ROUNDING_MODE:xt,EXPONENTIAL_AT:[At,pt],RANGE:[It,Ut],CRYPTO:Dt,MODULO_MODE:Pt,POW_PRECISION:qt,FORMAT:K,ALPHABET:R}},I.isBigNumber=function(x){if(!x||x._isBigNumber!==!0)return!1;if(!I.DEBUG)return!0;var A,B,N=x.c,S=x.e,T=x.s;t:if({}.toString.call(N)=="[object Array]"){if((T===1||T===-1)&&S>=-m&&S<=m&&S===h(S)){if(N[0]===0){if(S===0&&N.length===1)return!0;break t}if(A=(S+1)%p,A<1&&(A+=p),String(N[0]).length==A){for(A=0;A<N.length;A++)if(B=N[A],B<0||B>=P||B!==h(B))break t;if(B!==0)return!0}}}else if(N===null&&S===null&&(T===null||T===1||T===-1))return!0;throw Error(k+"Invalid BigNumber: "+x)},I.maximum=I.max=function(){return ut(arguments,-1)},I.minimum=I.min=function(){return ut(arguments,1)},I.random=function(){var x=9007199254740992,A=Math.random()*x&2097151?function(){return h(Math.random()*x)}:function(){return(Math.random()*1073741824|0)*8388608+(Math.random()*8388608|0)};return function(B){var N,S,T,F,E,O=0,M=[],U=new I(ct);if(B==null?B=bt:v(B,0,m),F=b(B/p),Dt)if(crypto.getRandomValues){for(N=crypto.getRandomValues(new Uint32Array(F*=2));O<F;)E=N[O]*131072+(N[O+1]>>>11),E>=9e15?(S=crypto.getRandomValues(new Uint32Array(2)),N[O]=S[0],N[O+1]=S[1]):(M.push(E%1e14),O+=2);O=F/2}else if(crypto.randomBytes){for(N=crypto.randomBytes(F*=7);O<F;)E=(N[O]&31)*281474976710656+N[O+1]*1099511627776+N[O+2]*4294967296+N[O+3]*16777216+(N[O+4]<<16)+(N[O+5]<<8)+N[O+6],E>=9e15?crypto.randomBytes(7).copy(N,O):(M.push(E%1e14),O+=7);O=F/7}else throw Dt=!1,Error(k+"crypto unavailable");if(!Dt)for(;O<F;)E=A(),E<9e15&&(M[O++]=E%1e14);for(F=M[--O],B%=p,F&&B&&(E=Y[p-B],M[O]=h(F/E)*E);M[O]===0;M.pop(),O--);if(O<0)M=[T=0];else{for(T=-1;M[0]===0;M.splice(0,1),T-=p);for(O=1,E=M[0];E>=10;E/=10,O++);O<p&&(T-=p-O)}return U.e=T,U.c=M,U}}(),I.sum=function(){for(var x=1,A=arguments,B=new I(A[0]);x<A.length;)B=B.plus(A[x++]);return B},D=function(){var x="0123456789";function A(B,N,S,T){for(var F,E=[0],O,M=0,U=B.length;M<U;){for(O=E.length;O--;E[O]*=N);for(E[0]+=T.indexOf(B.charAt(M++)),F=0;F<E.length;F++)E[F]>S-1&&(E[F+1]==null&&(E[F+1]=0),E[F+1]+=E[F]/S|0,E[F]%=S)}return E.reverse()}return function(B,N,S,T,F){var E,O,M,U,V,W,Z,it,Bt=B.indexOf("."),vt=bt,at=xt;for(Bt>=0&&(U=qt,qt=0,B=B.replace(".",""),it=new I(N),W=it.pow(B.length-Bt),qt=U,it.c=A(a(tt(W.c),W.e,"0"),10,S,x),it.e=it.c.length),Z=A(B,N,S,F?(E=R,x):(E=x,R)),M=U=Z.length;Z[--U]==0;Z.pop());if(!Z[0])return E.charAt(0);if(Bt<0?--M:(W.c=Z,W.e=M,W.s=T,W=g(W,it,vt,at,S),Z=W.c,V=W.r,M=W.e),O=M+vt+1,Bt=Z[O],U=S/2,V=V||O<0||Z[O+1]!=null,V=at<4?(Bt!=null||V)&&(at==0||at==(W.s<0?3:2)):Bt>U||Bt==U&&(at==4||V||at==6&&Z[O-1]&1||at==(W.s<0?8:7)),O<1||!Z[0])B=V?a(E.charAt(1),-vt,E.charAt(0)):E.charAt(0);else{if(Z.length=O,V)for(--S;++Z[--O]>S;)Z[O]=0,O||(++M,Z=[1].concat(Z));for(U=Z.length;!Z[--U];);for(Bt=0,B="";Bt<=U;B+=E.charAt(Z[Bt++]));B=a(B,M,E.charAt(0))}return B}}(),g=function(){function x(N,S,T){var F,E,O,M,U=0,V=N.length,W=S%q,Z=S/q|0;for(N=N.slice();V--;)O=N[V]%q,M=N[V]/q|0,F=Z*O+M*W,E=W*O+F%q*q+U,U=(E/T|0)+(F/q|0)+Z*M,N[V]=E%T;return U&&(N=[U].concat(N)),N}function A(N,S,T,F){var E,O;if(T!=F)O=T>F?1:-1;else for(E=O=0;E<T;E++)if(N[E]!=S[E]){O=N[E]>S[E]?1:-1;break}return O}function B(N,S,T,F){for(var E=0;T--;)N[T]-=E,E=N[T]<S[T]?1:0,N[T]=E*F+N[T]-S[T];for(;!N[0]&&N.length>1;N.splice(0,1));}return function(N,S,T,F,E){var O,M,U,V,W,Z,it,Bt,vt,at,ft,Ot,o_,Xt,c_,Rt,__,Mt=N.s==S.s?1:-1,Kt=N.c,Et=S.c;if(!Kt||!Kt[0]||!Et||!Et[0])return new I(!N.s||!S.s||(Kt?Et&&Kt[0]==Et[0]:!Et)?NaN:Kt&&Kt[0]==0||!Et?Mt*0:Mt/0);for(Bt=new I(Mt),vt=Bt.c=[],M=N.e-S.e,Mt=T+M+1,E||(E=P,M=u(N.e/p)-u(S.e/p),Mt=Mt/p|0),U=0;Et[U]==(Kt[U]||0);U++);if(Et[U]>(Kt[U]||0)&&M--,Mt<0)vt.push(1),V=!0;else{for(Xt=Kt.length,Rt=Et.length,U=0,Mt+=2,W=h(E/(Et[0]+1)),W>1&&(Et=x(Et,W,E),Kt=x(Kt,W,E),Rt=Et.length,Xt=Kt.length),o_=Rt,at=Kt.slice(0,Rt),ft=at.length;ft<Rt;at[ft++]=0);__=Et.slice(),__=[0].concat(__),c_=Et[0],Et[1]>=E/2&&c_++;do{if(W=0,O=A(Et,at,Rt,ft),O<0){if(Ot=at[0],Rt!=ft&&(Ot=Ot*E+(at[1]||0)),W=h(Ot/c_),W>1)for(W>=E&&(W=E-1),Z=x(Et,W,E),it=Z.length,ft=at.length;A(Z,at,it,ft)==1;)W--,B(Z,Rt<it?__:Et,it,E),it=Z.length,O=1;else W==0&&(O=W=1),Z=Et.slice(),it=Z.length;if(it<ft&&(Z=[0].concat(Z)),B(at,Z,ft,E),ft=at.length,O==-1)for(;A(Et,at,Rt,ft)<1;)W++,B(at,Rt<ft?__:Et,ft,E),ft=at.length}else O===0&&(W++,at=[0]);vt[U++]=W,at[0]?at[ft++]=Kt[o_]||0:(at=[Kt[o_]],ft=1)}while((o_++<Xt||at[0]!=null)&&Mt--);V=at[0]!=null,vt[0]||vt.splice(0,1)}if(E==P){for(U=1,Mt=vt[0];Mt>=10;Mt/=10,U++);et(Bt,T+(Bt.e=U+M*p-1)+1,F,V)}else Bt.e=M,Bt.r=+V;return Bt}}();function wt(x,A,B,N){var S,T,F,E,O;if(B==null?B=xt:v(B,0,8),!x.c)return x.toString();if(S=x.c[0],F=x.e,A==null)O=tt(x.c),O=N==1||N==2&&(F<=At||F>=pt)?yt(O,F):a(O,F,"0");else if(x=et(new I(x),A,B),T=x.e,O=tt(x.c),E=O.length,N==1||N==2&&(A<=T||T<=At)){for(;E<A;O+="0",E++);O=yt(O,T)}else if(A-=F,O=a(O,T,"0"),T+1>E){if(--A>0)for(O+=".";A--;O+="0");}else if(A+=T-E,A>0)for(T+1==E&&(O+=".");A--;O+="0");return x.s<0&&S?"-"+O:O}function ut(x,A){for(var B,N,S=1,T=new I(x[0]);S<x.length;S++)N=new I(x[S]),(!N.s||(B=X(T,N))===A||B===0&&T.s===A)&&(T=N);return T}function st(x,A,B){for(var N=1,S=A.length;!A[--S];A.pop());for(S=A[0];S>=10;S/=10,N++);return(B=N+B*p-1)>Ut?x.c=x.e=null:B<It?x.c=[x.e=0]:(x.e=B,x.c=A),x}Q=function(){var x=/^(-?)0([xbo])(?=\w[\w.]*$)/i,A=/^([^.]+)\.$/,B=/^\.([^.]+)$/,N=/^-?(Infinity|NaN)$/,S=/^\s*\+(?=[\w.])|^\s+|\s+$/g;return function(T,F,E,O){var M,U=E?F:F.replace(S,"");if(N.test(U))T.s=isNaN(U)?null:U<0?-1:1;else{if(!E&&(U=U.replace(x,function(V,W,Z){return M=(Z=Z.toLowerCase())=="x"?16:Z=="b"?2:8,!O||O==M?W:V}),O&&(M=O,U=U.replace(A,"$1").replace(B,"0.$1")),F!=U))return new I(U,M);if(I.DEBUG)throw Error(k+"Not a"+(O?" base "+O:"")+" number: "+F);T.s=null}T.c=T.e=null}}();function et(x,A,B,N){var S,T,F,E,O,M,U,V=x.c,W=Y;if(V){t:{for(S=1,E=V[0];E>=10;E/=10,S++);if(T=A-S,T<0)T+=p,F=A,O=V[M=0],U=h(O/W[S-F-1]%10);else if(M=b((T+1)/p),M>=V.length)if(N){for(;V.length<=M;V.push(0));O=U=0,S=1,T%=p,F=T-p+1}else break t;else{for(O=E=V[M],S=1;E>=10;E/=10,S++);T%=p,F=T-p+S,U=F<0?0:h(O/W[S-F-1]%10)}if(N=N||A<0||V[M+1]!=null||(F<0?O:O%W[S-F-1]),N=B<4?(U||N)&&(B==0||B==(x.s<0?3:2)):U>5||U==5&&(B==4||N||B==6&&(T>0?F>0?O/W[S-F]:0:V[M-1])%10&1||B==(x.s<0?8:7)),A<1||!V[0])return V.length=0,N?(A-=x.e+1,V[0]=W[(p-A%p)%p],x.e=-A||0):V[0]=x.e=0,x;if(T==0?(V.length=M,E=1,M--):(V.length=M+1,E=W[p-T],V[M]=F>0?h(O/W[S-F]%W[F])*E:0),N)for(;;)if(M==0){for(T=1,F=V[0];F>=10;F/=10,T++);for(F=V[0]+=E,E=1;F>=10;F/=10,E++);T!=E&&(x.e++,V[0]==P&&(V[0]=1));break}else{if(V[M]+=E,V[M]!=P)break;V[M--]=0,E=1}for(T=V.length;V[--T]===0;V.pop());}x.e>Ut?x.c=x.e=null:x.e<It&&(x.c=[x.e=0])}return x}function ot(x){var A,B=x.e;return B===null?x.toString():(A=tt(x.c),A=B<=At||B>=pt?yt(A,B):a(A,B,"0"),x.s<0?"-"+A:A)}return J.absoluteValue=J.abs=function(){var x=new I(this);return x.s<0&&(x.s=1),x},J.comparedTo=function(x,A){return X(this,new I(x,A))},J.decimalPlaces=J.dp=function(x,A){var B,N,S,T=this;if(x!=null)return v(x,0,m),A==null?A=xt:v(A,0,8),et(new I(T),x+T.e+1,A);if(!(B=T.c))return null;if(N=((S=B.length-1)-u(this.e/p))*p,S=B[S])for(;S%10==0;S/=10,N--);return N<0&&(N=0),N},J.dividedBy=J.div=function(x,A){return g(this,new I(x,A),bt,xt)},J.dividedToIntegerBy=J.idiv=function(x,A){return g(this,new I(x,A),0,1)},J.exponentiatedBy=J.pow=function(x,A){var B,N,S,T,F,E,O,M,U,V=this;if(x=new I(x),x.c&&!x.isInteger())throw Error(k+"Exponent not an integer: "+ot(x));if(A!=null&&(A=new I(A)),E=x.e>14,!V.c||!V.c[0]||V.c[0]==1&&!V.e&&V.c.length==1||!x.c||!x.c[0])return U=new I(Math.pow(+ot(V),E?x.s*(2-nt(x)):+ot(x))),A?U.mod(A):U;if(O=x.s<0,A){if(A.c?!A.c[0]:!A.s)return new I(NaN);N=!O&&V.isInteger()&&A.isInteger(),N&&(V=V.mod(A))}else{if(x.e>9&&(V.e>0||V.e<-1||(V.e==0?V.c[0]>1||E&&V.c[1]>=24e7:V.c[0]<8e13||E&&V.c[0]<=9999975e7)))return T=V.s<0&&nt(x)?-0:0,V.e>-1&&(T=1/T),new I(O?1/T:T);qt&&(T=b(qt/p+2))}for(E?(B=new I(.5),O&&(x.s=1),M=nt(x)):(S=Math.abs(+ot(x)),M=S%2),U=new I(ct);;){if(M){if(U=U.times(V),!U.c)break;T?U.c.length>T&&(U.c.length=T):N&&(U=U.mod(A))}if(S){if(S=h(S/2),S===0)break;M=S%2}else if(x=x.times(B),et(x,x.e+1,1),x.e>14)M=nt(x);else{if(S=+ot(x),S===0)break;M=S%2}V=V.times(V),T?V.c&&V.c.length>T&&(V.c.length=T):N&&(V=V.mod(A))}return N?U:(O&&(U=ct.div(U)),A?U.mod(A):T?et(U,qt,xt,F):U)},J.integerValue=function(x){var A=new I(this);return x==null?x=xt:v(x,0,8),et(A,A.e+1,x)},J.isEqualTo=J.eq=function(x,A){return X(this,new I(x,A))===0},J.isFinite=function(){return!!this.c},J.isGreaterThan=J.gt=function(x,A){return X(this,new I(x,A))>0},J.isGreaterThanOrEqualTo=J.gte=function(x,A){return(A=X(this,new I(x,A)))===1||A===0},J.isInteger=function(){return!!this.c&&u(this.e/p)>this.c.length-2},J.isLessThan=J.lt=function(x,A){return X(this,new I(x,A))<0},J.isLessThanOrEqualTo=J.lte=function(x,A){return(A=X(this,new I(x,A)))===-1||A===0},J.isNaN=function(){return!this.s},J.isNegative=function(){return this.s<0},J.isPositive=function(){return this.s>0},J.isZero=function(){return!!this.c&&this.c[0]==0},J.minus=function(x,A){var B,N,S,T,F=this,E=F.s;if(x=new I(x,A),A=x.s,!E||!A)return new I(NaN);if(E!=A)return x.s=-A,F.plus(x);var O=F.e/p,M=x.e/p,U=F.c,V=x.c;if(!O||!M){if(!U||!V)return U?(x.s=-A,x):new I(V?F:NaN);if(!U[0]||!V[0])return V[0]?(x.s=-A,x):new I(U[0]?F:xt==3?-0:0)}if(O=u(O),M=u(M),U=U.slice(),E=O-M){for((T=E<0)?(E=-E,S=U):(M=O,S=V),S.reverse(),A=E;A--;S.push(0));S.reverse()}else for(N=(T=(E=U.length)<(A=V.length))?E:A,E=A=0;A<N;A++)if(U[A]!=V[A]){T=U[A]<V[A];break}if(T&&(S=U,U=V,V=S,x.s=-x.s),A=(N=V.length)-(B=U.length),A>0)for(;A--;U[B++]=0);for(A=P-1;N>E;){if(U[--N]<V[N]){for(B=N;B&&!U[--B];U[B]=A);--U[B],U[N]+=P}U[N]-=V[N]}for(;U[0]==0;U.splice(0,1),--M);return U[0]?st(x,U,M):(x.s=xt==3?-1:1,x.c=[x.e=0],x)},J.modulo=J.mod=function(x,A){var B,N,S=this;return x=new I(x,A),!S.c||!x.s||x.c&&!x.c[0]?new I(NaN):!x.c||S.c&&!S.c[0]?new I(S):(Pt==9?(N=x.s,x.s=1,B=g(S,x,0,3),x.s=N,B.s*=N):B=g(S,x,0,Pt),x=S.minus(B.times(x)),!x.c[0]&&Pt==1&&(x.s=S.s),x)},J.multipliedBy=J.times=function(x,A){var B,N,S,T,F,E,O,M,U,V,W,Z,it,Bt,vt,at=this,ft=at.c,Ot=(x=new I(x,A)).c;if(!ft||!Ot||!ft[0]||!Ot[0])return!at.s||!x.s||ft&&!ft[0]&&!Ot||Ot&&!Ot[0]&&!ft?x.c=x.e=x.s=null:(x.s*=at.s,!ft||!Ot?x.c=x.e=null:(x.c=[0],x.e=0)),x;for(N=u(at.e/p)+u(x.e/p),x.s*=at.s,O=ft.length,V=Ot.length,O<V&&(it=ft,ft=Ot,Ot=it,S=O,O=V,V=S),S=O+V,it=[];S--;it.push(0));for(Bt=P,vt=q,S=V;--S>=0;){for(B=0,W=Ot[S]%vt,Z=Ot[S]/vt|0,F=O,T=S+F;T>S;)M=ft[--F]%vt,U=ft[F]/vt|0,E=Z*M+U*W,M=W*M+E%vt*vt+it[T]+B,B=(M/Bt|0)+(E/vt|0)+Z*U,it[T--]=M%Bt;it[T]=B}return B?++N:it.splice(0,1),st(x,it,N)},J.negated=function(){var x=new I(this);return x.s=-x.s||null,x},J.plus=function(x,A){var B,N=this,S=N.s;if(x=new I(x,A),A=x.s,!S||!A)return new I(NaN);if(S!=A)return x.s=-A,N.minus(x);var T=N.e/p,F=x.e/p,E=N.c,O=x.c;if(!T||!F){if(!E||!O)return new I(S/0);if(!E[0]||!O[0])return O[0]?x:new I(E[0]?N:S*0)}if(T=u(T),F=u(F),E=E.slice(),S=T-F){for(S>0?(F=T,B=O):(S=-S,B=E),B.reverse();S--;B.push(0));B.reverse()}for(S=E.length,A=O.length,S-A<0&&(B=O,O=E,E=B,A=S),S=0;A;)S=(E[--A]=E[A]+O[A]+S)/P|0,E[A]=P===E[A]?0:E[A]%P;return S&&(E=[S].concat(E),++F),st(x,E,F)},J.precision=J.sd=function(x,A){var B,N,S,T=this;if(x!=null&&x!==!!x)return v(x,1,m),A==null?A=xt:v(A,0,8),et(new I(T),x,A);if(!(B=T.c))return null;if(S=B.length-1,N=S*p+1,S=B[S]){for(;S%10==0;S/=10,N--);for(S=B[0];S>=10;S/=10,N++);}return x&&T.e+1>N&&(N=T.e+1),N},J.shiftedBy=function(x){return v(x,-z,z),this.times("1e"+x)},J.squareRoot=J.sqrt=function(){var x,A,B,N,S,T=this,F=T.c,E=T.s,O=T.e,M=bt+4,U=new I("0.5");if(E!==1||!F||!F[0])return new I(!E||E<0&&(!F||F[0])?NaN:F?T:1/0);if(E=Math.sqrt(+ot(T)),E==0||E==1/0?(A=tt(F),(A.length+O)%2==0&&(A+="0"),E=Math.sqrt(+A),O=u((O+1)/2)-(O<0||O%2),E==1/0?A="5e"+O:(A=E.toExponential(),A=A.slice(0,A.indexOf("e")+1)+O),B=new I(A)):B=new I(E+""),B.c[0]){for(O=B.e,E=O+M,E<3&&(E=0);;)if(S=B,B=U.times(S.plus(g(T,S,M,1))),tt(S.c).slice(0,E)===(A=tt(B.c)).slice(0,E))if(B.e<O&&--E,A=A.slice(E-3,E+1),A=="9999"||!N&&A=="4999"){if(!N&&(et(S,S.e+bt+2,0),S.times(S).eq(T))){B=S;break}M+=4,E+=4,N=1}else{(!+A||!+A.slice(1)&&A.charAt(0)=="5")&&(et(B,B.e+bt+2,1),x=!B.times(B).eq(T));break}}return et(B,B.e+bt+1,xt,x)},J.toExponential=function(x,A){return x!=null&&(v(x,0,m),x++),wt(this,x,A,1)},J.toFixed=function(x,A){return x!=null&&(v(x,0,m),x=x+this.e+1),wt(this,x,A)},J.toFormat=function(x,A,B){var N,S=this;if(B==null)x!=null&&A&&typeof A=="object"?(B=A,A=null):x&&typeof x=="object"?(B=x,x=A=null):B=K;else if(typeof B!="object")throw Error(k+"Argument not an object: "+B);if(N=S.toFixed(x,A),S.c){var T,F=N.split("."),E=+B.groupSize,O=+B.secondaryGroupSize,M=B.groupSeparator||"",U=F[0],V=F[1],W=S.s<0,Z=W?U.slice(1):U,it=Z.length;if(O&&(T=E,E=O,O=T,it-=T),E>0&&it>0){for(T=it%E||E,U=Z.substr(0,T);T<it;T+=E)U+=M+Z.substr(T,E);O>0&&(U+=M+Z.slice(T)),W&&(U="-"+U)}N=V?U+(B.decimalSeparator||"")+((O=+B.fractionGroupSize)?V.replace(new RegExp("\\d{"+O+"}\\B","g"),"$&"+(B.fractionGroupSeparator||"")):V):U}return(B.prefix||"")+N+(B.suffix||"")},J.toFraction=function(x){var A,B,N,S,T,F,E,O,M,U,V,W,Z=this,it=Z.c;if(x!=null&&(E=new I(x),!E.isInteger()&&(E.c||E.s!==1)||E.lt(ct)))throw Error(k+"Argument "+(E.isInteger()?"out of range: ":"not an integer: ")+ot(E));if(!it)return new I(Z);for(A=new I(ct),M=B=new I(ct),N=O=new I(ct),W=tt(it),T=A.e=W.length-Z.e-1,A.c[0]=Y[(F=T%p)<0?p+F:F],x=!x||E.comparedTo(A)>0?T>0?A:M:E,F=Ut,Ut=1/0,E=new I(W),O.c[0]=0;U=g(E,A,0,1),S=B.plus(U.times(N)),S.comparedTo(x)!=1;)B=N,N=S,M=O.plus(U.times(S=M)),O=S,A=E.minus(U.times(S=A)),E=S;return S=g(x.minus(B),N,0,1),O=O.plus(S.times(M)),B=B.plus(S.times(N)),O.s=M.s=Z.s,T=T*2,V=g(M,N,T,xt).minus(Z).abs().comparedTo(g(O,B,T,xt).minus(Z).abs())<1?[M,N]:[O,B],Ut=F,V},J.toNumber=function(){return+ot(this)},J.toPrecision=function(x,A){return x!=null&&v(x,1,m),wt(this,x,A,2)},J.toString=function(x){var A,B=this,N=B.s,S=B.e;return S===null?N?(A="Infinity",N<0&&(A="-"+A)):A="NaN":(x==null?A=S<=At||S>=pt?yt(tt(B.c),S):a(tt(B.c),S,"0"):x===10&&L?(B=et(new I(B),bt+S+1,xt),A=a(tt(B.c),B.e,"0")):(v(x,2,R.length,"Base"),A=D(a(tt(B.c),S,"0"),10,x,N,!0)),N<0&&B.c[0]&&(A="-"+A)),A},J.valueOf=J.toJSON=function(){return ot(this)},J._isBigNumber=!0,_t!=null&&I.set(_t),I}function u(_t){var g=_t|0;return _t>0||_t===g?g:g-1}function tt(_t){for(var g,D,Q=1,J=_t.length,ct=_t[0]+"";Q<J;){for(g=_t[Q++]+"",D=p-g.length;D--;g="0"+g);ct+=g}for(J=ct.length;ct.charCodeAt(--J)===48;);return ct.slice(0,J+1||1)}function X(_t,g){var D,Q,J=_t.c,ct=g.c,bt=_t.s,xt=g.s,At=_t.e,pt=g.e;if(!bt||!xt)return null;if(D=J&&!J[0],Q=ct&&!ct[0],D||Q)return D?Q?0:-xt:bt;if(bt!=xt)return bt;if(D=bt<0,Q=At==pt,!J||!ct)return Q?0:!J^D?1:-1;if(!Q)return At>pt^D?1:-1;for(xt=(At=J.length)<(pt=ct.length)?At:pt,bt=0;bt<xt;bt++)if(J[bt]!=ct[bt])return J[bt]>ct[bt]^D?1:-1;return At==pt?0:At>pt^D?1:-1}function v(_t,g,D,Q){if(_t<g||_t>D||_t!==h(_t))throw Error(k+(Q||"Argument")+(typeof _t=="number"?_t<g||_t>D?" out of range: ":" not an integer: ":" not a primitive number: ")+String(_t))}function nt(_t){var g=_t.c.length-1;return u(_t.e/p)==g&&_t.c[g]%2!=0}function yt(_t,g){return(_t.length>1?_t.charAt(0)+"."+_t.slice(1):_t)+(g<0?"e":"e+")+g}function a(_t,g,D){var Q,J;if(g<0){for(J=D+".";++g;J+=D);_t=J+_t}else if(Q=_t.length,++g>Q){for(J=D,g-=Q;--g;J+=D);_t+=J}else g<Q&&(_t=_t.slice(0,g)+"."+_t.slice(g));return _t}t=G(),t.default=t.BigNumber=t,c.exports?c.exports=t:(d||(d=typeof self<"u"&&self?self:window),d.BigNumber=t)})(qr)})(kn);(function(c){var d=kn.exports,t=c.exports;(function(){var w=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,b,h,k={"\b":"\\b"," ":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},j;function P(z){return w.lastIndex=0,w.test(z)?'"'+z.replace(w,function(Y){var q=k[Y];return typeof q=="string"?q:"\\u"+("0000"+Y.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+z+'"'}function p(z,Y){var q,m,G,u,tt=b,X,v=Y[z],nt=v!=null&&(v instanceof d||d.isBigNumber(v));switch(v&&typeof v=="object"&&typeof v.toJSON=="function"&&(v=v.toJSON(z)),typeof j=="function"&&(v=j.call(Y,z,v)),typeof v){case"string":return nt?v:P(v);case"number":return isFinite(v)?String(v):"null";case"boolean":case"null":case"bigint":return String(v);case"object":if(!v)return"null";if(b+=h,X=[],Object.prototype.toString.apply(v)==="[object Array]"){for(u=v.length,q=0;q<u;q+=1)X[q]=p(q,v)||"null";return G=X.length===0?"[]":b?`[
|
|
12
|
+
`+b+X.join(`,
|
|
13
|
+
`+b)+`
|
|
14
|
+
`+tt+"]":"["+X.join(",")+"]",b=tt,G}if(j&&typeof j=="object")for(u=j.length,q=0;q<u;q+=1)typeof j[q]=="string"&&(m=j[q],G=p(m,v),G&&X.push(P(m)+(b?": ":":")+G));else Object.keys(v).forEach(function(yt){var a=p(yt,v);a&&X.push(P(yt)+(b?": ":":")+a)});return G=X.length===0?"{}":b?`{
|
|
15
|
+
`+b+X.join(`,
|
|
16
|
+
`+b)+`
|
|
17
|
+
`+tt+"}":"{"+X.join(",")+"}",b=tt,G}}typeof t.stringify!="function"&&(t.stringify=function(z,Y,q){var m;if(b="",h="",typeof q=="number")for(m=0;m<q;m+=1)h+=" ";else typeof q=="string"&&(h=q);if(j=Y,Y&&typeof Y!="function"&&(typeof Y!="object"||typeof Y.length!="number"))throw new Error("JSON.stringify");return p("",{"":z})})})()})(ya);var Fr=null;const fo=/(?:_|\\u005[Ff])(?:_|\\u005[Ff])(?:p|\\u0070)(?:r|\\u0072)(?:o|\\u006[Ff])(?:t|\\u0074)(?:o|\\u006[Ff])(?:_|\\u005[Ff])(?:_|\\u005[Ff])/,ho=/(?:c|\\u0063)(?:o|\\u006[Ff])(?:n|\\u006[Ee])(?:s|\\u0073)(?:t|\\u0074)(?:r|\\u0072)(?:u|\\u0075)(?:c|\\u0063)(?:t|\\u0074)(?:o|\\u006[Ff])(?:r|\\u0072)/;var yo=function(c){var d={strict:!1,storeAsString:!1,alwaysParseAsBig:!1,useNativeBigInt:!1,protoAction:"error",constructorAction:"error"};if(c!=null){if(c.strict===!0&&(d.strict=!0),c.storeAsString===!0&&(d.storeAsString=!0),d.alwaysParseAsBig=c.alwaysParseAsBig===!0?c.alwaysParseAsBig:!1,d.useNativeBigInt=c.useNativeBigInt===!0?c.useNativeBigInt:!1,typeof c.constructorAction<"u")if(c.constructorAction==="error"||c.constructorAction==="ignore"||c.constructorAction==="preserve")d.constructorAction=c.constructorAction;else throw new Error(`Incorrect value for constructorAction option, must be "error", "ignore" or undefined but passed ${c.constructorAction}`);if(typeof c.protoAction<"u")if(c.protoAction==="error"||c.protoAction==="ignore"||c.protoAction==="preserve")d.protoAction=c.protoAction;else throw new Error(`Incorrect value for protoAction option, must be "error", "ignore" or undefined but passed ${c.protoAction}`)}var t,w,b={'"':'"',"\\":"\\","/":"/",b:"\b",f:"\f",n:`
|
|
18
|
+
`,r:"\r",t:" "},h,k=function(u){throw{name:"SyntaxError",message:u,at:t,text:h}},j=function(u){return u&&u!==w&&k("Expected '"+u+"' instead of '"+w+"'"),w=h.charAt(t),t+=1,w},P=function(){var u,tt="";for(w==="-"&&(tt="-",j("-"));w>="0"&&w<="9";)tt+=w,j();if(w===".")for(tt+=".";j()&&w>="0"&&w<="9";)tt+=w;if(w==="e"||w==="E")for(tt+=w,j(),(w==="-"||w==="+")&&(tt+=w,j());w>="0"&&w<="9";)tt+=w,j();if(u=+tt,!isFinite(u))k("Bad number");else return Fr==null&&(Fr=kn.exports),tt.length>15?d.storeAsString?tt:d.useNativeBigInt?BigInt(tt):new Fr(tt):d.alwaysParseAsBig?d.useNativeBigInt?BigInt(u):new Fr(u):u},p=function(){var u,tt,X="",v;if(w==='"')for(var nt=t;j();){if(w==='"')return t-1>nt&&(X+=h.substring(nt,t-1)),j(),X;if(w==="\\"){if(t-1>nt&&(X+=h.substring(nt,t-1)),j(),w==="u"){for(v=0,tt=0;tt<4&&(u=parseInt(j(),16),!!isFinite(u));tt+=1)v=v*16+u;X+=String.fromCharCode(v)}else if(typeof b[w]=="string")X+=b[w];else break;nt=t}}k("Bad string")},z=function(){for(;w&&w<=" ";)j()},Y=function(){switch(w){case"t":return j("t"),j("r"),j("u"),j("e"),!0;case"f":return j("f"),j("a"),j("l"),j("s"),j("e"),!1;case"n":return j("n"),j("u"),j("l"),j("l"),null}k("Unexpected '"+w+"'")},q,m=function(){var u=[];if(w==="["){if(j("["),z(),w==="]")return j("]"),u;for(;w;){if(u.push(q()),z(),w==="]")return j("]"),u;j(","),z()}}k("Bad array")},G=function(){var u,tt=Object.create(null);if(w==="{"){if(j("{"),z(),w==="}")return j("}"),tt;for(;w;){if(u=p(),z(),j(":"),d.strict===!0&&Object.hasOwnProperty.call(tt,u)&&k('Duplicate key "'+u+'"'),fo.test(u)===!0?d.protoAction==="error"?k("Object contains forbidden prototype property"):d.protoAction==="ignore"?q():tt[u]=q():ho.test(u)===!0?d.constructorAction==="error"?k("Object contains forbidden constructor property"):d.constructorAction==="ignore"?q():tt[u]=q():tt[u]=q(),z(),w==="}")return j("}"),tt;j(","),z()}}k("Bad object")};return q=function(){switch(z(),w){case"{":return G();case"[":return m();case'"':return p();case"-":return P();default:return w>="0"&&w<="9"?P():Y()}},function(u,tt){var X;return h=u+"",t=0,w=" ",X=q(),z(),w&&k("Syntax error"),typeof tt=="function"?function v(nt,yt){var a,_t=nt[yt];return _t&&typeof _t=="object"&&Object.keys(_t).forEach(function(g){a=v(_t,g),a!==void 0?_t[g]=a:delete _t[g]}),tt.call(nt,yt,_t)}({"":X},""):X}},vo=yo,va=ya.exports.stringify,ma=vo;lr.exports=function(c){return{parse:ma(c),stringify:va}};lr.exports.parse=ma();lr.exports.stringify=va;class mo{txHex="";txBuilder=Hr();txEvaluationMultiplier=1.1;_protocolParams=v_;txOutput;addingScriptInput=!1;addingPlutusMint=!1;isHydra=!1;meshTxBuilderBody;mintItem;txInQueueItem;collateralQueueItem;refScriptTxInQueueItem;reset=()=>(this.txHex="",this.txBuilder=Hr(),this.txEvaluationMultiplier=1.1,this._protocolParams=v_,this.txOutput=void 0,this.addingScriptInput=!1,this.addingPlutusMint=!1,this.mintItem=void 0,this.txInQueueItem=void 0,this.collateralQueueItem=void 0,this.refScriptTxInQueueItem=void 0,this.meshTxBuilderBody=this.emptyTxBuilderBody(),this);emptyTxBuilderBody=()=>({inputs:[],outputs:[],extraInputs:[],selectionThreshold:0,collaterals:[],requiredSignatures:[],referenceInputs:[],mints:[],changeAddress:"",metadata:[],validityRange:{},certificates:[],signingKey:[]});constructor(){this.meshTxBuilderBody=this.emptyTxBuilderBody()}completeSync=d=>(d?this.meshTxBuilderBody=d:this.queueAllLastItem(),this.serializeTxBody(this.meshTxBuilderBody));completeSigning=()=>{const{signingKey:d}=this.meshTxBuilderBody;return d.length>0&&this.addAllSigningKeys(d),this.txHex};serializeTxBody=d=>{const{inputs:t,outputs:w,extraInputs:b,selectionThreshold:h,collaterals:k,referenceInputs:j,mints:P,changeAddress:p,certificates:z,validityRange:Y,requiredSignatures:q,metadata:m}=d;if(this.isHydra?this.protocolParams({minFeeA:0,minFeeB:0,priceMem:0,priceStep:0,collateralPercent:0,coinsPerUTxOSize:"0"}):this.protocolParams({}),b.length>0&&this.addUtxosFrom(b,String(h)),this.removeDuplicateInputs(),this.meshTxBuilderBody.mints.sort((G,u)=>G.policyId.localeCompare(u.policyId)),this.meshTxBuilderBody.inputs.sort((G,u)=>G.txIn.txHash===u.txIn.txHash?G.txIn.txIndex-u.txIn.txIndex:G.txIn.txHash.localeCompare(u.txIn.txHash)),this.addAllInputs(t),this.addAllOutputs(w),this.addAllCollaterals(k),this.addAllReferenceInputs(j),this.addAllMints(P),this.addAllCertificates(z),this.addValidityRange(Y),this.addAllRequiredSignatures(q),this.addAllMetadata(m),this.addCostModels(),p){const G=this.meshTxBuilderBody.collaterals.map(X=>{var v,nt;return((nt=(v=X.txIn.amount)==null?void 0:v.find(yt=>yt.unit==="lovelace"))==null?void 0:nt.quantity)||"0"}).reduce((X,v)=>X+parseInt(v),0),u=Math.ceil(this._protocolParams.collateralPercent*Number(Number(this.txBuilder.min_fee().checked_add(y.exports.BigNum.from_str("10000")).to_js_value()))/100);let tt=!1;if(G-u>0){const X=y.exports.TransactionOutput.new(y.exports.Address.from_bech32(p),y.exports.Value.new(y.exports.BigNum.from_str(String(u))));G-u>Number(y.exports.min_ada_for_output(X,y.exports.DataCost.new_coins_per_byte(y.exports.BigNum.from_str(this._protocolParams.coinsPerUTxOSize))).to_js_value())&&(this.txBuilder.set_collateral_return(y.exports.TransactionOutput.new(y.exports.Address.from_bech32(p),y.exports.Value.new(y.exports.BigNum.from_str(String(G))))),this.txBuilder.set_total_collateral(y.exports.BigNum.from_str(String(G))),tt=!0)}this.addChange(p),tt&&this.addCollateralReturn(p)}return this.buildTx(),this};txIn=(d,t,w,b)=>(this.txInQueueItem&&this.queueInput(),this.addingScriptInput?this.txInQueueItem={type:"Script",txIn:{txHash:d,txIndex:t,amount:w,address:b},scriptTxIn:{}}:this.txInQueueItem={type:"PubKey",txIn:{txHash:d,txIndex:t,amount:w,address:b}},this.addingScriptInput=!1,this);txInScript=(d,t="V2")=>{if(!this.txInQueueItem)throw Error("Undefined input");if(this.txInQueueItem.type==="PubKey")throw Error("Datum value attempted to be called a non script input");return this.txInQueueItem.scriptTxIn.scriptSource={type:"Provided",script:{code:d,version:t}},this};txInDatumValue=(d,t="Mesh")=>{if(!this.txInQueueItem)throw Error("Undefined input");if(this.txInQueueItem.type==="PubKey")throw Error("Datum value attempted to be called a non script input");let w=d;return t==="JSON"&&(w=this.castRawDataToJsonString(d)),t==="Mesh"?(this.txInQueueItem.scriptTxIn.datumSource={type:"Provided",data:{type:t,content:d}},this):(this.txInQueueItem.scriptTxIn.datumSource={type:"Provided",data:{type:t,content:w}},this)};txInInlineDatumPresent=()=>{if(!this.txInQueueItem)throw Error("Undefined input");if(this.txInQueueItem.type==="PubKey")throw Error("Inline datum present attempted to be called a non script input");const{txHash:d,txIndex:t}=this.txInQueueItem.txIn;return d&&t.toString()&&(this.txInQueueItem.scriptTxIn.datumSource={type:"Inline",txHash:d,txIndex:t}),this};txInRedeemerValue=(d,t={...dr},w="Mesh")=>{if(!this.txInQueueItem)throw Error("Undefined input");if(this.txInQueueItem.type==="PubKey")throw Error("Spending tx in reference redeemer attempted to be called a non script input");let b=d;return w==="Mesh"?(this.txInQueueItem.scriptTxIn.redeemer={data:{type:w,content:d},exUnits:t},this):(w==="JSON"&&(b=this.castRawDataToJsonString(d)),this.txInQueueItem.scriptTxIn.redeemer={data:{type:w,content:b},exUnits:t},this)};txOut=(d,t)=>(this.txOutput&&(this.meshTxBuilderBody.outputs.push(this.txOutput),this.txOutput=void 0),this.txOutput={address:d,amount:t},this);txOutDatumHashValue=(d,t="Mesh")=>{let w=d;if(this.txOutput){if(t==="Mesh")return this.txOutput.datum={type:"Hash",data:{type:t,content:w}},this;t==="JSON"&&(w=this.castRawDataToJsonString(d)),this.txOutput.datum={type:"Hash",data:{type:t,content:w}}}return this};txOutInlineDatumValue=(d,t="Mesh")=>{let w=d;if(this.txOutput){if(t==="Mesh")return this.txOutput.datum={type:"Inline",data:{type:t,content:w}},this;t==="JSON"&&(w=this.castRawDataToJsonString(d)),this.txOutput.datum={type:"Inline",data:{type:t,content:w}}}return this};txOutReferenceScript=(d,t="V2")=>(this.txOutput&&(this.txOutput.referenceScript={code:d,version:t}),this);spendingPlutusScriptV2=()=>(this.addingScriptInput=!0,this);spendingTxInReference=(d,t,w,b="V2")=>{if(!this.txInQueueItem)throw Error("Undefined input");if(this.txInQueueItem.type==="PubKey")throw Error("Spending tx in reference attempted to be called a non script input");return this.txInQueueItem.scriptTxIn.scriptSource={type:"Inline",txInInfo:{txHash:d,txIndex:t,spendingScriptHash:w,version:b}},this};spendingReferenceTxInInlineDatumPresent=()=>(this.txInInlineDatumPresent(),this);spendingReferenceTxInRedeemerValue=(d,t={...dr},w="Mesh")=>(this.txInRedeemerValue(d,t,w),this);readOnlyTxInReference=(d,t)=>(this.meshTxBuilderBody.referenceInputs.push({txHash:d,txIndex:t}),this);mintPlutusScriptV2=()=>(this.addingPlutusMint=!0,this);mint=(d,t,w)=>(this.mintItem&&this.queueMint(),this.mintItem={type:this.addingPlutusMint?"Plutus":"Native",policyId:t,assetName:w,amount:d},this.addingPlutusMint=!1,this);mintingScript=(d,t="V2")=>{if(!this.mintItem)throw Error("Undefined mint");if(!this.mintItem.type)throw Error("Mint information missing");return this.mintItem.scriptSource={type:"Provided",script:{code:d,version:t}},this};mintTxInReference=(d,t,w="V2")=>{if(!this.mintItem)throw Error("Undefined mint");if(!this.mintItem.type)throw Error("Mint information missing");if(this.mintItem.type=="Native")throw Error("Mint tx in reference can only be used on plutus script tokens");if(!this.mintItem.policyId)throw Error("PolicyId information missing from mint asset");return this.mintItem.scriptSource={type:"Reference Script",txHash:d,txIndex:t,version:w},this};mintReferenceTxInRedeemerValue=(d,t={...dr},w="Mesh")=>{if(!this.mintItem)throw Error("Undefined mint");if(this.mintItem.type=="Native")throw Error("Mint tx in reference can only be used on plutus script tokens");if(this.mintItem.type=="Plutus"){if(!this.mintItem.policyId)throw Error("PolicyId information missing from mint asset");let b=d;if(w==="Mesh")return this.mintItem.redeemer={data:{type:w,content:b},exUnits:t},this;w==="JSON"&&(b=this.castRawDataToJsonString(d)),this.mintItem.redeemer={data:{type:w,content:b},exUnits:t}}return this};mintRedeemerValue=(d,t={...dr},w="Mesh")=>(this.mintReferenceTxInRedeemerValue(d,t,w),this);requiredSignerHash=d=>(this.meshTxBuilderBody.requiredSignatures.push(d),this);txInCollateral=(d,t,w,b)=>(this.collateralQueueItem&&this.meshTxBuilderBody.collaterals.push(this.collateralQueueItem),this.collateralQueueItem={type:"PubKey",txIn:{txHash:d,txIndex:t,amount:w,address:b}},this);registerPoolCertificate=d=>(this.meshTxBuilderBody.certificates.push({type:"RegisterPool",poolParams:d}),this);registerStakeCertificate=d=>(this.meshTxBuilderBody.certificates.push({type:"RegisterStake",stakeKeyHash:d}),this);delegateStakeCertificate=(d,t)=>(this.meshTxBuilderBody.certificates.push({type:"DelegateStake",stakeKeyHash:d,poolId:t}),this);deregisterStakeCertificate=d=>(this.meshTxBuilderBody.certificates.push({type:"DeregisterStake",stakeKeyHash:d}),this);retirePoolCertificate=(d,t)=>(this.meshTxBuilderBody.certificates.push({type:"RetirePool",poolId:d,epoch:t}),this);changeAddress=d=>(this.meshTxBuilderBody.changeAddress=d,this);invalidBefore=d=>(this.meshTxBuilderBody.validityRange.invalidBefore=d,this);invalidHereafter=d=>(this.meshTxBuilderBody.validityRange.invalidHereafter=d,this);metadataValue=(d,t)=>(this.meshTxBuilderBody.metadata.push({tag:d,metadata:t}),this);protocolParams=d=>{const t={...v_,...d};return this._protocolParams=t,this.txBuilder=Hr(t),this};signingKey=d=>(this.meshTxBuilderBody.signingKey.push(d),this);selectUtxosFrom=(d,t=5e6)=>(this.meshTxBuilderBody.extraInputs=d,this.meshTxBuilderBody.selectionThreshold=t,this);addUtxosFrom=(d,t)=>{const w=this.meshTxBuilderBody.outputs.reduce((h,k)=>(k.amount.forEach(P=>{const{unit:p,quantity:z}=P,Y=Number(h.get(p))||0;h.set(p,String(Y+Number(z)))}),h),new Map);this.meshTxBuilderBody.inputs.reduce((h,k)=>{const j=k.txIn.amount;return j==null||j.forEach(P=>{const{unit:p,quantity:z}=P,Y=Number(h.get(p))||0;h.set(p,String(Y-Number(z)))}),h},w),this.meshTxBuilderBody.mints.reduce((h,k)=>{const j={unit:k.policyId+k.assetName,quantity:String(k.amount)},P=Number(h.get(j.unit))||0;return h.set(j.unit,String(P-Number(j.quantity))),h},w),Fs(d,w,t).forEach(h=>{this.addTxIn({type:"PubKey",txIn:{txHash:h.input.txHash,txIndex:h.input.outputIndex,amount:h.output.amount,address:h.output.address}})})};addAllSigningKeys=d=>{if(d.length>0){const t=y.exports.Vkeywitnesses.new(),w=y.exports.Transaction.from_hex(this.txHex),b=w.body();d.forEach(j=>{const P=j.slice(0,4)==="5820"?j.slice(4):j,p=y.exports.PrivateKey.from_hex(P),z=y.exports.make_vkey_witness(y.exports.hash_transaction(b),p);t.add(z)});const h=w.witness_set();h.set_vkeys(t);const k=y.exports.Transaction.new(b,h,w.auxiliary_data());this.txHex=k.to_hex()}};buildTx=()=>{const d=this.txBuilder.build_tx();this.txHex=d.to_hex()};queueInput=()=>{if(!this.txInQueueItem)throw Error("Undefined input");if(this.txInQueueItem.type==="Script")if(this.txInQueueItem.scriptTxIn){if(!this.txInQueueItem.scriptTxIn.datumSource)throw Error("Script input does not contain datum information");if(!this.txInQueueItem.scriptTxIn.redeemer)throw Error("Script input does not contain redeemer information");if(!this.txInQueueItem.scriptTxIn.scriptSource)throw Error("Script input does not contain script information")}else throw Error("Script input does not contain script, datum, or redeemer information");this.meshTxBuilderBody.inputs.push(this.txInQueueItem),this.txInQueueItem=void 0};queueMint=()=>{if(!this.mintItem)throw Error("Undefined mint");if(!this.mintItem.scriptSource)throw Error("Missing mint script information");this.meshTxBuilderBody.mints.push(this.mintItem),this.mintItem=void 0};makePlutusScriptSource=d=>{const t=y.exports.ScriptHash.from_hex(d.spendingScriptHash),w=y.exports.TransactionInput.new(y.exports.TransactionHash.from_hex(d.txHash),d.txIndex);return y.exports.PlutusScriptSource.new_ref_input_with_lang_ver(t,w,je[d.version])};removeDuplicateInputs=()=>{const d=this.meshTxBuilderBody.inputs,t=b=>`${b.txHash}#${b.txIndex}`,w=[];for(let b=0;b<d.length;b++){const h=t(d[b].txIn);w.includes(h)?(d.splice(b,1),b--):w.push(h)}};addAllInputs=d=>{for(let t=0;t<d.length;t++){const w=d[t];switch(w.type){case"PubKey":this.addTxIn(w);break;case"Script":this.addScriptTxIn(w);break}}};addTxIn=d=>{this.txBuilder.add_input(y.exports.Address.from_bech32(d.txIn.address),y.exports.TransactionInput.new(y.exports.TransactionHash.from_hex(d.txIn.txHash),d.txIn.txIndex),Ee(d.txIn.amount))};addScriptTxIn=({scriptTxIn:d,txIn:t})=>{let w;const{datumSource:b,scriptSource:h,redeemer:k}=d;if(b.type==="Provided")w=y.exports.DatumSource.new(this.castDataToPlutusData(b.data));else{const p=y.exports.TransactionInput.new(y.exports.TransactionHash.from_hex(b.txHash),b.txIndex);w=y.exports.DatumSource.new_ref_input(p)}let j;h.type=="Inline"?j=this.makePlutusScriptSource(h.txInInfo):j=y.exports.PlutusScriptSource.new(y.exports.PlutusScript.from_hex_with_version(h.script.code,je[h.script.version]));const P=y.exports.Redeemer.new(y.exports.RedeemerTag.new_spend(),y.exports.BigNum.from_str("0"),this.castDataToPlutusData(k.data),y.exports.ExUnits.new(y.exports.BigNum.from_str(String(k.exUnits.mem)),y.exports.BigNum.from_str(String(k.exUnits.steps))));this.txBuilder.add_plutus_script_input(y.exports.PlutusWitness.new_with_ref(j,w,P),y.exports.TransactionInput.new(y.exports.TransactionHash.from_hex(t.txHash),t.txIndex),Ee(t.amount))};addAllOutputs=d=>{for(let t=0;t<d.length;t++){const w=d[t];this.addOutput(w)}};addOutput=({amount:d,address:t,datum:w,referenceScript:b})=>{const h=Ee(d),k=h.multiasset();if(h.is_zero()&&k===void 0)throw Error("Invalid output amount");let j=y.exports.TransactionOutputBuilder.new().with_address(S_(t));w&&w.type==="Hash"&&(j=j.with_data_hash(y.exports.hash_plutus_data(this.castDataToPlutusData(w.data)))),w&&w.type==="Inline"&&(j=j.with_plutus_data(this.castDataToPlutusData(w.data))),b&&(j=j.with_script_ref(y.exports.ScriptRef.new_plutus_script(y.exports.PlutusScript.from_hex_with_version(b.code,je[b.version]))));const P=j.next();if(k){const p=h.coin().is_zero()?P.with_asset_and_min_required_coin_by_utxo_cost(k,an(this._protocolParams.coinsPerUTxOSize)).build():P.with_coin_and_asset(h.coin(),k).build();this.txBuilder.add_output(p)}else{const p=P.with_coin(h.coin()).build();this.txBuilder.add_output(p)}};addAllCollaterals=d=>{const t=y.exports.TxInputsBuilder.new();for(let w=0;w<d.length;w++){const b=d[w];this.addCollateral(t,b)}this.txBuilder.set_collateral(t)};addCollateral=(d,t)=>{d.add_input(y.exports.Address.from_bech32(t.txIn.address),y.exports.TransactionInput.new(y.exports.TransactionHash.from_hex(t.txIn.txHash),t.txIn.txIndex),Ee(t.txIn.amount))};addCollateralReturn=d=>{var w;const t=(w=this.txBuilder.get_fee_if_set())==null?void 0:w.to_js_value();if(t){const b=Math.ceil(this._protocolParams.collateralPercent*Number(t)/100);this.txBuilder.set_total_collateral_and_return(y.exports.BigNum.from_str(String(b)),y.exports.Address.from_bech32(d))}};addAllReferenceInputs=d=>{d.forEach(t=>{this.addReferenceInput(t)})};addReferenceInput=({txHash:d,txIndex:t})=>{const w=y.exports.TransactionInput.new(y.exports.TransactionHash.from_hex(d),t);this.txBuilder.add_reference_input(w)};addAllMints=d=>{const t=y.exports.MintBuilder.new();let w=0;for(let b=0;b<d.length;b++){const h=d[b];if(!h.scriptSource)throw Error("Mint script is expected to be provided");if(h.type==="Plutus"){if(!h.redeemer)throw Error("Missing mint redeemer information");this.addPlutusMint(t,h,w),w++}else h.type==="Native"&&this.addNativeMint(t,h)}this.txBuilder.set_mint_builder(t)};addPlutusMint=(d,{redeemer:t,policyId:w,scriptSource:b,assetName:h,amount:k},j)=>{const P=y.exports.Redeemer.new(y.exports.RedeemerTag.new_mint(),y.exports.BigNum.from_str(String(j)),this.castDataToPlutusData(t.data),y.exports.ExUnits.new(y.exports.BigNum.from_str(String(t.exUnits.mem)),y.exports.BigNum.from_str(String(t.exUnits.steps)))),p=b.type==="Reference Script"?y.exports.PlutusScriptSource.new_ref_input_with_lang_ver(y.exports.ScriptHash.from_hex(w),y.exports.TransactionInput.new(y.exports.TransactionHash.from_hex(b.txHash),b.txIndex),je[b.version]):y.exports.PlutusScriptSource.new(y.exports.PlutusScript.from_hex_with_version(b.script.code,je[b.script.version]));d.add_asset(y.exports.MintWitness.new_plutus_script(p,P),y.exports.AssetName.new(Buffer.from(h,"hex")),y.exports.Int.from_str(k))};addNativeMint=(d,{scriptSource:t,assetName:w,amount:b})=>{if(t.type==="Reference Script")throw Error("Native mint cannot have reference script");d.add_asset(y.exports.MintWitness.new_native_script(y.exports.NativeScript.from_hex(t.script.code)),y.exports.AssetName.new(Buffer.from(w,"hex")),y.exports.Int.from_str(b))};decimalToFraction(d){const t=10**d.toString().split(".")[1].length;return[d*t,t]}toPoolParams=d=>{const t=this.decimalToFraction(d.margin),w=y.exports.Relays.new();d.relays.forEach(k=>{w.add(wa(k))});const b=y.exports.RewardAddress.from_address(y.exports.Address.from_bech32(d.rewardAddress));if(b===void 0)throw new Error("Reward address is invalid");const h=y.exports.Ed25519KeyHashes.new();return d.owners.forEach(k=>{h.add(y.exports.Ed25519KeyHash.from_hex(k))}),y.exports.PoolParams.new(y.exports.Ed25519KeyHash.from_hex(d.operator),y.exports.VRFKeyHash.from_hex(d.VRFKeyHash),y.exports.BigNum.from_str(d.pledge),y.exports.BigNum.from_str(d.cost),y.exports.UnitInterval.new(y.exports.BigNum.from_str(t[0].toString()),y.exports.BigNum.from_str(t[1].toString())),b,h,w,d.metadata?y.exports.PoolMetadata.from_json(lr.exports.stringify(d.metadata)):void 0)};addCertificate=(d,t)=>{switch(t.type){case"RegisterPool":d.add(y.exports.Certificate.new_pool_registration(y.exports.PoolRegistration.new(this.toPoolParams(t.poolParams))));break;case"RegisterStake":d.add(y.exports.Certificate.new_stake_registration(y.exports.StakeRegistration.new(y.exports.StakeCredential.from_keyhash(y.exports.Ed25519KeyHash.from_hex(t.stakeKeyHash)))));break;case"DelegateStake":d.add(y.exports.Certificate.new_stake_delegation(y.exports.StakeDelegation.new(y.exports.StakeCredential.from_keyhash(y.exports.Ed25519KeyHash.from_hex(t.stakeKeyHash)),t.poolId.startsWith("pool")?y.exports.Ed25519KeyHash.from_bech32(t.poolId):y.exports.Ed25519KeyHash.from_hex(t.poolId))));break;case"DeregisterStake":d.add(y.exports.Certificate.new_stake_deregistration(y.exports.StakeDeregistration.new(y.exports.StakeCredential.from_keyhash(y.exports.Ed25519KeyHash.from_hex(t.stakeKeyHash)))));break;case"RetirePool":d.add(y.exports.Certificate.new_pool_retirement(y.exports.PoolRetirement.new(t.poolId.startsWith("pool")?y.exports.Ed25519KeyHash.from_bech32(t.poolId):y.exports.Ed25519KeyHash.from_hex(t.poolId),t.epoch)))}};queueAllLastItem=()=>{this.txOutput&&(this.meshTxBuilderBody.outputs.push(this.txOutput),this.txOutput=void 0),this.txInQueueItem&&this.queueInput(),this.collateralQueueItem&&(this.meshTxBuilderBody.collaterals.push(this.collateralQueueItem),this.collateralQueueItem=void 0),this.mintItem&&this.queueMint()};addAllCertificates=d=>{const t=y.exports.Certificates.new();d.forEach(w=>{this.addCertificate(t,w)}),this.txBuilder.set_certs(t)};addCostModels=()=>{this.txBuilder.calc_script_data_hash(y.exports.TxBuilderConstants.plutus_vasil_cost_models())};addChange=d=>{this.txBuilder.add_change_if_needed(y.exports.Address.from_bech32(d))};addValidityRange=({invalidBefore:d,invalidHereafter:t})=>{d&&this.txBuilder.set_validity_start_interval_bignum(y.exports.BigNum.from_str(d.toString())),t&&this.txBuilder.set_ttl_bignum(y.exports.BigNum.from_str(t.toString()))};addAllRequiredSignatures=d=>{d.forEach(t=>{this.txBuilder.add_required_signer(y.exports.Ed25519KeyHash.from_hex(t))})};addAllMetadata=d=>{d.forEach(({tag:t,metadata:w})=>{this.txBuilder.add_json_metadatum(y.exports.BigNum.from_str(t),lr.exports.stringify(w))})};updateRedeemer=(d,t)=>{t.forEach(w=>{switch(w.tag){case"SPEND":{const b=d.inputs[w.index];b.type=="Script"&&b.scriptTxIn.redeemer&&(b.scriptTxIn.redeemer.exUnits.mem=Math.floor(w.budget.mem*this.txEvaluationMultiplier),b.scriptTxIn.redeemer.exUnits.steps=Math.floor(w.budget.steps*this.txEvaluationMultiplier));break}case"MINT":{const b=d.mints[w.index];b.type=="Plutus"&&b.redeemer&&(b.redeemer.exUnits.mem=Math.floor(w.budget.mem*this.txEvaluationMultiplier),b.redeemer.exUnits.steps=Math.floor(w.budget.steps*this.txEvaluationMultiplier));break}}})};castRawDataToJsonString=d=>typeof d=="object"?lr.exports.stringify(d):d;castDataToPlutusData=({type:d,content:t})=>d==="Mesh"?ze(t):d==="CBOR"?y.exports.PlutusData.from_hex(t):y.exports.PlutusData.from_json(t,y.exports.PlutusDatumSchema.DetailedSchema)}class ko extends mo{_fetcher;_submitter;_evaluator;queriedTxHashes=new Set;queriedUTxOs={};constructor({fetcher:d,submitter:t,evaluator:w,isHydra:b=!1}){super(),d&&(this._fetcher=d),t&&(this._submitter=t),w&&(this._evaluator=w),b&&(this.isHydra=!0)}complete=async d=>{d?this.meshTxBuilderBody=d:this.queueAllLastItem();const{inputs:t,collaterals:w}=this.meshTxBuilderBody,b=[...t,...w].filter(h=>!this.isInputComplete(h));if(console.log("Incomplete UTxO",b),await this.queryAllTxInfo(b),console.log("Incomplete UTxO",b),b.forEach(h=>{this.completeTxInformation(h)}),this.completeSync(d),this._evaluator){const h=await this._evaluator.evaluateTx(this.txHex);this.updateRedeemer(this.meshTxBuilderBody,h),this.completeSync(d)}return this};submitTx=async d=>{var w;return await((w=this._submitter)==null?void 0:w.submitTx(d))};getUTxOInfo=async d=>{var w;let t=[];this.queriedTxHashes.has(d)||(console.log("Query",d),this.queriedTxHashes.add(d),t=await((w=this._fetcher)==null?void 0:w.fetchUTxOs(d))||[],this.queriedUTxOs[d]=t)};queryAllTxInfo=d=>{var w;const t=[];if(d.length>0&&!this._fetcher)throw Error("Transaction information is incomplete while no fetcher instance is provided");for(let b=0;b<d.length;b++){const h=d[b];this.isInputInfoComplete(h)||t.push(this.getUTxOInfo(h.txIn.txHash)),h.type==="Script"&&((w=h.scriptTxIn.scriptSource)==null?void 0:w.type)==="Inline"&&!this.isRefScriptInfoComplete(h)&&t.push(this.getUTxOInfo(h.scriptTxIn.scriptSource.txInInfo.txHash))}return Promise.all(t)};completeTxInformation=d=>{var t;if(!this.isInputInfoComplete(d)){const w=this.queriedUTxOs[d.txIn.txHash],b=w==null?void 0:w.find(j=>j.input.outputIndex===d.txIn.txIndex),h=b==null?void 0:b.output.amount,k=b==null?void 0:b.output.address;if(!h||h.length===0)throw Error(`Couldn't find value information for ${d.txIn.txHash}#${d.txIn.txIndex}`);if(d.txIn.amount=h,d.type==="PubKey"){if(!k||k==="")throw Error(`Couldn't find address information for ${d.txIn.txHash}#${d.txIn.txIndex}`);d.txIn.address=k}}if(d.type==="Script"&&((t=d.scriptTxIn.scriptSource)==null?void 0:t.type)=="Inline"&&!this.isRefScriptInfoComplete(d)){const w=d.scriptTxIn.scriptSource.txInInfo,h=this.queriedUTxOs[w.txHash].find(k=>k.input.outputIndex===w.txIndex);if(!h)throw Error(`Couldn't find script reference utxo for ${w.txHash}#${w.txIndex}`);w.spendingScriptHash=h==null?void 0:h.output.scriptHash}};isInputComplete=d=>d.type==="PubKey"?this.isInputInfoComplete(d):d.type==="Script"?this.isInputInfoComplete(d)&&this.isRefScriptInfoComplete(d):!0;isInputInfoComplete=d=>{const{amount:t,address:w}=d.txIn;return!(d.type==="PubKey"&&(!t||!w)||d.type==="Script"&&!t)};isRefScriptInfoComplete=d=>{var w;const{scriptSource:t}=d.scriptTxIn;return!((t==null?void 0:t.type)==="Inline"&&!((w=t.txInInfo)!=null&&w.spendingScriptHash))}}const dn=(c,d)=>{const t=c.vkeys();if(t!==void 0){const w=new Set;for(let h=0;h<t.len();h+=1)w.add(t.get(h).to_hex());for(let h=0;h<d.len();h+=1)w.add(d.get(h).to_hex());const b=y.exports.Vkeywitnesses.new();return w.forEach(h=>{b.add(y.exports.Vkeywitness.from_hex(h))}),b}return d};class Gt{_networkId;_encryptedSecret;constructor(d,t){this._networkId=d,this._encryptedSecret=t}getAccount(d,t){return this.accountContext(d,t,(w,b)=>{const h=Rn(this._networkId,w.to_public().hash(),b.to_public().hash()).to_address().to_bech32(),k=zn(this._networkId,w.to_public().hash()).to_address().to_bech32(),j=sn(this._networkId,b.to_public().hash()).to_address().to_bech32();return{baseAddress:h,enterpriseAddress:k,rewardAddress:j}})}signData(d,t,w,b){try{return this.accountContext(d,t,(h,k)=>{const j={payload:b},P={address:Gt.resolveAddress(this._networkId,w,h,k),key:w.startsWith("stake")?k:h},{coseSign1:p,coseKey:z}=ws(j,P);return{signature:p,key:z}})}catch(h){throw new Error(`An error occurred during signData: ${h}.`)}}signTx(d,t,w,b,h){try{const k=da(fa(b));return this.accountContext(d,t,(j,P)=>{const p=y.exports.Vkeywitnesses.new();return Gt.resolveSigners(b,w,j.to_public().hash().to_hex()).forEach(Y=>{if(Y===j.to_public().hash().to_hex())p.add(y.exports.make_vkey_witness(k,j));else if(Y===P.to_public().hash().to_hex())p.add(y.exports.make_vkey_witness(k,P));else if(h===!1)throw new Error(`Missing key witness for: ${Y}`)}),p})}catch(k){throw new Error(`An error occurred during signTx: ${k}.`)}}static encryptMnemonic(d,t){const w=tn.mnemonicToEntropy(d.join(" ")),b=ba(w),h=d_(b.as_bytes());return b.free(),Gt.encrypt(h,t)}static encryptPrivateKey(d,t){const w=y.exports.Bip32PrivateKey.from_bech32(d),b=d_(w.as_bytes());return w.free(),Gt.encrypt(b,t)}static encryptSigningKeys(d,t,w){const b=Gt.encrypt(d.slice(4),w),h=Gt.encrypt(t.slice(4),w);return[b,h]}static generateMnemonic(d=256){return tn.generateMnemonic(d).split(" ")}accountContext(d,t,w){const{paymentKey:b,stakeKey:h}=Gt.resolveKeys(d,t,this._encryptedSecret),k=w(b,h);return b.free(),h.free(),k}static decrypt(d,t){try{return y.exports.decrypt_with_password(a_(t),d)}catch{throw new Error("The password is incorrect.")}}static encrypt(d,t){const w=Yn.customAlphabet("0123456789abcdef"),b=w(64),h=w(24);return y.exports.encrypt_with_password(a_(t),b,h,d)}static resolveAddress(d,t,w,b){const h=[Rn(d,w.to_public().hash(),b.to_public().hash()),zn(d,w.to_public().hash()),sn(d,b.to_public().hash())].find(k=>k.to_address().to_bech32()===t);if(h!==void 0)return h.to_address();throw new Error(`Address: ${t} doesn't belong to this account.`)}static resolveKeys(d,t,w){if(typeof w=="string"){const k=Gt.decrypt(w,t);return Ps(k,d)}const b=Gt.decrypt(w[0],t),h=Gt.decrypt(w[1],t);return{paymentKey:y.exports.PrivateKey.from_hex(b),stakeKey:y.exports.PrivateKey.from_hex(h)}}static resolveSigners(d,t,w){const b=j=>{const P=(X,v=[],nt=0)=>{var _t,g,D,Q,J;if(X===void 0||nt>=X.len())return v;const yt=X.get(nt),a=new Array;switch(yt.kind()){case y.exports.CertificateKind.StakeDeregistration:{const ct=(_t=yt.as_stake_deregistration())==null?void 0:_t.stake_credential(),bt=(ct==null?void 0:ct.kind())===y.exports.StakeCredKind.Key?ct.to_keyhash():void 0;bt&&a.push(bt.to_hex());break}case y.exports.CertificateKind.StakeDelegation:{const ct=(g=yt.as_stake_delegation())==null?void 0:g.stake_credential(),bt=(ct==null?void 0:ct.kind())===y.exports.StakeCredKind.Key?ct.to_keyhash():void 0;bt&&a.push(bt.to_hex());break}case y.exports.CertificateKind.PoolRegistration:{const ct=(D=yt.as_pool_registration())==null?void 0:D.pool_params().pool_owners();a.push(...z(ct));break}case y.exports.CertificateKind.PoolRetirement:{const ct=(Q=yt.as_pool_retirement())==null?void 0:Q.pool_keyhash();ct&&a.push(ct.to_hex());break}case y.exports.CertificateKind.MoveInstantaneousRewardsCert:{const ct=(J=yt.as_move_instantaneous_rewards_cert())==null?void 0:J.move_instantaneous_reward().as_to_stake_creds();if(ct)for(let bt=0;bt<ct.len();bt+=1){const xt=ct.keys().get(bt),At=xt.kind()===y.exports.StakeCredKind.Key?xt.to_keyhash():void 0;At&&a.push(At.to_hex())}break}}return P(X,[...v,...a],nt+1)},p=(X,v=[],nt=0)=>{if(X===void 0||nt>=X.len())return v;const yt=X.get(nt).index(),a=X.get(nt).transaction_id(),_t=t.find(g=>g.input.outputIndex===yt&&g.input.txHash===a.to_hex())!==void 0?w:"OUR_PRINCESS_IS_IN_ANOTHER_CASTLE";return p(X,[...v,_t],nt+1)},z=(X,v=[],nt=0)=>X===void 0||nt>=X.len()?v:z(X,[...v,X.get(nt).to_hex()],nt+1),Y=(X,v=[],nt=0)=>{if(X===void 0||nt>=X.len())return v;const yt=X.keys().get(nt).payment_cred(),a=yt.kind()===y.exports.StakeCredKind.Key?yt.to_keyhash():void 0;return Y(X,a?[...v,a.to_hex()]:v,nt+1)},q=j.certs(),m=j.collateral(),G=j.inputs(),u=j.required_signers(),tt=j.withdrawals();return[...P(q),...p(m),...p(G),...z(u),...Y(tt)]},h=j=>{const P=(z,Y=[])=>{var q,m,G,u;if(z)for(let tt=0;tt<z.len();tt+=1){const X=z.get(tt);switch(X.kind()){case y.exports.NativeScriptKind.ScriptPubkey:{const v=(q=X.as_script_pubkey())==null?void 0:q.addr_keyhash().to_hex();return v?[...Y,v]:Y}case y.exports.NativeScriptKind.ScriptAll:return P((m=X.as_script_all())==null?void 0:m.native_scripts(),Y);case y.exports.NativeScriptKind.ScriptAny:return P((G=X.as_script_any())==null?void 0:G.native_scripts(),Y);case y.exports.NativeScriptKind.ScriptNOfK:return P((u=X.as_script_n_of_k())==null?void 0:u.native_scripts(),Y)}}return Y},p=j.native_scripts();return[...P(p)]},k=L_(d);return new Set([...b(k.body()),...h(k.witness_set())])}}const E_="MARI0TIME";class xo{_fetcher;_submitter;_wallet;constructor(d){switch(this._fetcher=d.fetcher,this._submitter=d.submitter,d.key.type){case"mnemonic":this._wallet=new Gt(d.networkId,Gt.encryptMnemonic(d.key.words,E_));break;case"root":this._wallet=new Gt(d.networkId,Gt.encryptPrivateKey(d.key.bech32,E_));break;case"cli":this._wallet=new Gt(d.networkId,Gt.encryptSigningKeys(d.key.payment,d.key.stake??"f0".repeat(34),E_))}}getBaseAddress(d=0){return this._wallet.getAccount(d,E_).baseAddress}getPaymentAddress(d=0){return this._wallet.getAccount(d,E_).enterpriseAddress}getRewardAddress(d=0){return this._wallet.getAccount(d,E_).rewardAddress}getUsedAddress(d=0){const t=this._wallet.getAccount(d,E_);return S_(t.enterpriseAddress)}getUsedCollateral(d=v_.maxCollateralInputs){throw new Error("getUsedCollateral not implemented.")}async getUsedUTxOs(d=0){const t=this._wallet.getAccount(d,E_);return(await this._fetcher.fetchAddressUTxOs(t.enterpriseAddress)).map(b=>z_(b))}signData(d,t,w=0){try{return this._wallet.signData(w,E_,d,t)}catch(b){throw new Error(`[AppWallet] An error occurred during signData: ${b}.`)}}async signTx(d,t=!1,w=0){try{const b=this._wallet.getAccount(w,E_),h=await this._fetcher.fetchAddressUTxOs(b.enterpriseAddress),k=this._wallet.signTx(w,E_,h,d,t),j=L_(d),P=j.witness_set(),p=dn(P,k);return P.set_vkeys(p),y.exports.Transaction.new(j.body(),P,j.auxiliary_data()).to_hex()}catch(b){throw new Error(`[AppWallet] An error occurred during signTx: ${b}.`)}}async signTxs(d,t){return console.log("unimplemented",d,t),[]}submitTx(d){return this._submitter.submitTx(d)}static brew(d=256){return Gt.generateMnemonic(d)}}class Lr{_walletInstance;_walletName;walletInstance;constructor(d,t){this._walletInstance=d,this._walletName=t,this.walletInstance={...d}}static getInstalledWallets(){return window.cardano===void 0?[]:In.filter(d=>window.cardano[d]!==void 0).map(d=>({name:window.cardano[d].name,icon:window.cardano[d].icon,version:window.cardano[d].apiVersion}))}static async enable(d){try{const t=await Lr.resolveInstance(d);if(t!==void 0)return new Lr(t,d);throw new Error(`Couldn't create an instance of wallet: ${d}`)}catch(t){throw new Error(`[BrowserWallet] An error occurred during enable: ${JSON.stringify(t)}.`)}}async getBalance(){const d=await this._walletInstance.getBalance();return ga(Ls(d))}async getChangeAddress(){const d=await this._walletInstance.getChangeAddress();return ir(d).to_bech32()}async getCollateral(d=v_.maxCollateralInputs){return(await this.getUsedCollateral(d)).map(w=>Vr(w))}getNetworkId(){return this._walletInstance.getNetworkId()}async getRewardAddresses(){return(await this._walletInstance.getRewardAddresses()).map(t=>ir(t).to_bech32())}async getUnusedAddresses(){return(await this._walletInstance.getUnusedAddresses()).map(t=>ir(t).to_bech32())}async getUsedAddresses(){return(await this._walletInstance.getUsedAddresses()).map(t=>ir(t).to_bech32())}async getUtxos(d=void 0){return(await this.getUsedUTxOs(d)).map(w=>Vr(w))}signData(d,t){const w=S_(d).to_hex();return this._walletInstance.signData(w,a_(t))}async signTx(d,t=!1){try{const w=L_(d),b=w.witness_set(),h=await this._walletInstance.signTx(d,t),k=Hn(h).vkeys()??y.exports.Vkeywitnesses.new(),j=dn(b,k);return b.set_vkeys(j),d_(y.exports.Transaction.new(w.body(),b,w.auxiliary_data()).to_bytes())}catch(w){throw new Error(`[BrowserWallet] An error occurred during signTx: ${JSON.stringify(w)}.`)}}async signTxs(d,t=!1){let w;switch(this._walletName){case"Typhon Wallet":this._walletInstance.signTxs&&(w=await this._walletInstance.signTxs(d,t));break;default:this._walletInstance.signTxs?w=await this._walletInstance.signTxs(d.map(h=>({cbor:h,partialSign:t}))):this._walletInstance.experimental.signTxs&&(w=await this._walletInstance.experimental.signTxs(d.map(h=>({cbor:h,partialSign:t}))));break}if(!w)throw new Error("Wallet does not support signTxs");const b=[];for(let h=0;h<w.length;h++){const k=L_(d[h]),j=k.witness_set(),P=Hn(w[h]).vkeys()??y.exports.Vkeywitnesses.new(),p=dn(j,P);j.set_vkeys(p);const z=d_(y.exports.Transaction.new(k.body(),j,k.auxiliary_data()).to_bytes());b.push(z)}return b}submitTx(d){return this._walletInstance.submitTx(d)}async getUsedAddress(){const d=await this._walletInstance.getUsedAddresses();return ir(d[0])}async getUsedCollateral(d=v_.maxCollateralInputs){return(await this._walletInstance.experimental.getCollateral()??[]).map(w=>Kn(w)).slice(0,d)}async getUsedUTxOs(d=void 0){const t=d?Ee(d).to_hex():void 0;return(await this._walletInstance.getUtxos(t)??[]).map(b=>Kn(b))}async getAssets(){return(await this.getBalance()).filter(t=>t.unit!=="lovelace").map(t=>{const w=t.unit.slice(0,Y_),b=t.unit.slice(Y_),h=ua(w,b);return{unit:t.unit,policyId:w,assetName:vn(b),fingerprint:h,quantity:t.quantity}})}async getLovelace(){const t=(await this.getBalance()).find(w=>w.unit==="lovelace");return t!==void 0?t.quantity:"0"}async getPolicyIdAssets(d){return(await this.getAssets()).filter(w=>w.policyId===d)}async getPolicyIds(){const d=await this.getBalance();return Array.from(new Set(d.map(t=>t.unit.slice(0,Y_)))).filter(t=>t!=="lovelace")}static resolveInstance(d){if(window.cardano===void 0)return;const t=In.map(w=>window.cardano[w]).filter(w=>w!==void 0).find(w=>w.name.toLowerCase()===d.toLowerCase());return t==null?void 0:t.enable()}}exports.AppWallet=xo;exports.BlockfrostProvider=oo;exports.BrowserWallet=Lr;exports.EmbeddedWallet=Gt;exports.ForgeScript=bo;exports.InfuraProvider=io;exports.KoiosProvider=co;exports.MaestroProvider=go;exports.MeshTxBuilder=ko;exports.OgmiosProvider=wo;exports.TangoProvider=lo;exports.assetClass=Ra;exports.assocMap=_n;exports.bool=Ma;exports.builtinByteString=Oe;exports.checkSignature=ls;exports.conStr=Yr;exports.conStr0=y_;exports.conStr1=Gr;exports.conStr2=Fa;exports.currencySymbol=wn;exports.dict=Ga;exports.generateNonce=ao;exports.integer=pn;exports.isNetwork=ha;exports.keepRelevant=Jn;exports.largestFirst=ss;exports.largestFirstMultiAsset=Wn;exports.list=Ka;exports.mConStr=Ta;exports.mConStr0=pr;exports.mConStr1=Gn;exports.mConStr2=Na;exports.mMaybeStakingHash=cn;exports.mPubKeyAddress=Ua;exports.mScriptAddress=Pa;exports.maybeStakingHash=gn;exports.parseAssetUnit=Qe;exports.parseHttpError=$;exports.parsePlutusValueToAssets=Wa;exports.paymentPubKeyHash=Va;exports.posixTime=Ya;exports.pubKeyAddress=Ha;exports.pubKeyHash=La;exports.readPlutusData=so;exports.resolveDataHash=$s;exports.resolveEpochNo=Js;exports.resolveFingerprint=ua;exports.resolveLanguageView=Ws;exports.resolveNativeScriptHash=Xs;exports.resolvePaymentKeyHash=Ze;exports.resolvePlutusScriptAddress=Zs;exports.resolvePlutusScriptHash=to;exports.resolvePoolId=_o;exports.resolvePrivateKey=eo;exports.resolveRewardAddress=Cr;exports.resolveScriptRef=ro;exports.resolveSlotNo=no;exports.resolveStakeKeyHash=cr;exports.resolveTxFees=mn;exports.resolveTxHash=fa;exports.scriptAddress=qa;exports.tokenName=ln;exports.tuple=$a;exports.txOutRef=za;exports.value=Ja;
|