diff --git a/108f2867fde2069b7ac6.wasm b/108f2867fde2069b7ac6.wasm new file mode 100644 index 000000000..96405142b Binary files /dev/null and b/108f2867fde2069b7ac6.wasm differ diff --git a/206.bundle.js b/206.bundle.js deleted file mode 100644 index 77299a116..000000000 --- a/206.bundle.js +++ /dev/null @@ -1,2 +0,0 @@ -(()=>{var r,e,t,o,a,n,i={},p={};function c(r){var e=p[r];if(void 0!==e)return e.exports;var t=p[r]={exports:{}};return i[r](t,t.exports,c),t.exports}c.m=i,c.x=()=>{var r=c.O(void 0,[495,877,66],(()=>c(66)));return r=c.O(r)},r="function"==typeof Symbol?Symbol("webpack queues"):"__webpack_queues__",e="function"==typeof Symbol?Symbol("webpack exports"):"__webpack_exports__",t="function"==typeof Symbol?Symbol("webpack error"):"__webpack_error__",o=r=>{r&&r.d<1&&(r.d=1,r.forEach((r=>r.r--)),r.forEach((r=>r.r--?r.r++:r())))},c.a=(a,n,i)=>{var p;i&&((p=[]).d=-1);var c,s,f,l=new Set,u=a.exports,b=new Promise(((r,e)=>{f=e,s=r}));b[e]=u,b[r]=r=>(p&&r(p),l.forEach(r),b.catch((r=>{}))),a.exports=b,n((a=>{var n;c=(a=>a.map((a=>{if(null!==a&&"object"==typeof a){if(a[r])return a;if(a.then){var n=[];n.d=0,a.then((r=>{i[e]=r,o(n)}),(r=>{i[t]=r,o(n)}));var i={};return i[r]=r=>r(n),i}}var p={};return p[r]=r=>{},p[e]=a,p})))(a);var i=()=>c.map((r=>{if(r[t])throw r[t];return r[e]})),s=new Promise((e=>{(n=()=>e(i)).r=0;var t=r=>r!==p&&!l.has(r)&&(l.add(r),r&&!r.d&&(n.r++,r.push(n)));c.map((e=>e[r](t)))}));return n.r?s:i()}),(r=>(r?f(b[t]=r):s(u),o(p)))),p&&p.d<0&&(p.d=0)},a=[],c.O=(r,e,t,o)=>{if(!e){var n=1/0;for(f=0;f=o)&&Object.keys(c.O).every((r=>c.O[r](e[p])))?e.splice(p--,1):(i=!1,o0&&a[f-1][2]>o;f--)a[f]=a[f-1];a[f]=[e,t,o]},c.d=(r,e)=>{for(var t in e)c.o(e,t)&&!c.o(r,t)&&Object.defineProperty(r,t,{enumerable:!0,get:e[t]})},c.f={},c.e=r=>Promise.all(Object.keys(c.f).reduce(((e,t)=>(c.f[t](r,e),e)),[])),c.u=r=>r+".bundle.js",c.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(r){if("object"==typeof window)return window}}(),c.o=(r,e)=>Object.prototype.hasOwnProperty.call(r,e),(()=>{var r;c.g.importScripts&&(r=c.g.location+"");var e=c.g.document;if(!r&&e&&(e.currentScript&&(r=e.currentScript.src),!r)){var t=e.getElementsByTagName("script");if(t.length)for(var o=t.length-1;o>-1&&(!r||!/^http(s?):/.test(r));)r=t[o--].src}if(!r)throw new Error("Automatic publicPath is not supported in this browser");r=r.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),c.p=r})(),(()=>{c.b=self.location+"";var r={206:1};c.f.i=(e,t)=>{r[e]||importScripts(c.p+c.u(e))};var e=self.webpackChunkaleo_website=self.webpackChunkaleo_website||[],t=e.push.bind(e);e.push=e=>{var[o,a,n]=e;for(var i in a)c.o(a,i)&&(c.m[i]=a[i]);for(n&&n(c);o.length;)r[o.pop()]=1;t(e)}})(),n=c.x,c.x=()=>Promise.all([495,877,66].map(c.e,c)).then(n);c.x()})(); -//# sourceMappingURL=206.bundle.js.map \ No newline at end of file diff --git a/206.bundle.js.map b/206.bundle.js.map deleted file mode 100644 index 50f81be47..000000000 --- a/206.bundle.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"206.bundle.js","mappings":"UAAIA,EACAC,EACAC,EACAC,ECHAC,ECAAC,E,KCCAC,EAA2B,CAAC,EAGhC,SAASC,EAAoBC,GAE5B,IAAIC,EAAeH,EAAyBE,GAC5C,QAAqBE,IAAjBD,EACH,OAAOA,EAAaE,QAGrB,IAAIC,EAASN,EAAyBE,GAAY,CAGjDG,Q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,EAASC,cAAcC,MAC/BL,GAAW,CACf,IAAIM,EAAUH,EAASI,qBAAqB,UAC5C,GAAGD,EAAQlC,OAEV,IADA,IAAID,EAAImC,EAAQlC,OAAS,EAClBD,GAAK,KAAO6B,IAAc,aAAaQ,KAAKR,KAAaA,EAAYM,EAAQnC,KAAKkC,GAE3F,CAID,IAAKL,EAAW,MAAM,IAAIS,MAAM,yDAChCT,EAAYA,EAAUU,QAAQ,OAAQ,IAAIA,QAAQ,QAAS,IAAIA,QAAQ,YAAa,KACpFxF,EAAoByF,EAAIX,C,WClBxB9E,EAAoB0F,EAAIC,KAAKX,SAAW,GAIxC,IAAIY,EAAkB,CACrB,IAAK,GAgBN5F,EAAoB+D,EAAEd,EAAI,CAACe,EAASG,KAE/ByB,EAAgB5B,IAElBe,cAAc/E,EAAoByF,EAAIzF,EAAoBoE,EAAEJ,GAE9D,EAGD,IAAI6B,EAAqBF,KAA+B,yBAAIA,KAA+B,0BAAK,GAC5FG,EAA6BD,EAAmBnD,KAAKqD,KAAKF,GAC9DA,EAAmBnD,KAvBCsD,IACnB,IAAKnD,EAAUoD,EAAaC,GAAWF,EACvC,IAAI,IAAI/F,KAAYgG,EAChBjG,EAAoB2D,EAAEsC,EAAahG,KACrCD,EAAoBO,EAAEN,GAAYgG,EAAYhG,IAIhD,IADGiG,GAASA,EAAQlG,GACd6C,EAASK,QACd0C,EAAgB/C,EAASsD,OAAS,EACnCL,EAA2BE,EAAK,C,KRnB7BlG,EAAOE,EAAoBQ,EAC/BR,EAAoBQ,EAAI,IAChBkB,QAAQuC,IAAI,CAAC,IAAI,IAAI,IAAInC,IAAI9B,EAAoBkC,EAAGlC,IAAsBgC,KAAKlC,GSD7DE,EAAoBQ,G","sources":["webpack://aleo-website/webpack/runtime/async module","webpack://aleo-website/webpack/runtime/chunk loaded","webpack://aleo-website/webpack/runtime/startup chunk dependencies","webpack://aleo-website/webpack/bootstrap","webpack://aleo-website/webpack/runtime/define property getters","webpack://aleo-website/webpack/runtime/ensure chunk","webpack://aleo-website/webpack/runtime/get javascript chunk filename","webpack://aleo-website/webpack/runtime/global","webpack://aleo-website/webpack/runtime/hasOwnProperty shorthand","webpack://aleo-website/webpack/runtime/publicPath","webpack://aleo-website/webpack/runtime/importScripts chunk loading","webpack://aleo-website/webpack/startup"],"sourcesContent":["var webpackQueues = typeof Symbol === \"function\" ? Symbol(\"webpack queues\") : \"__webpack_queues__\";\nvar webpackExports = typeof Symbol === \"function\" ? Symbol(\"webpack exports\") : \"__webpack_exports__\";\nvar webpackError = typeof Symbol === \"function\" ? Symbol(\"webpack error\") : \"__webpack_error__\";\nvar resolveQueue = (queue) => {\n\tif(queue && queue.d < 1) {\n\t\tqueue.d = 1;\n\t\tqueue.forEach((fn) => (fn.r--));\n\t\tqueue.forEach((fn) => (fn.r-- ? fn.r++ : fn()));\n\t}\n}\nvar wrapDeps = (deps) => (deps.map((dep) => {\n\tif(dep !== null && typeof dep === \"object\") {\n\t\tif(dep[webpackQueues]) return dep;\n\t\tif(dep.then) {\n\t\t\tvar queue = [];\n\t\t\tqueue.d = 0;\n\t\t\tdep.then((r) => {\n\t\t\t\tobj[webpackExports] = r;\n\t\t\t\tresolveQueue(queue);\n\t\t\t}, (e) => {\n\t\t\t\tobj[webpackError] = e;\n\t\t\t\tresolveQueue(queue);\n\t\t\t});\n\t\t\tvar obj = {};\n\t\t\tobj[webpackQueues] = (fn) => (fn(queue));\n\t\t\treturn obj;\n\t\t}\n\t}\n\tvar ret = {};\n\tret[webpackQueues] = x => {};\n\tret[webpackExports] = dep;\n\treturn ret;\n}));\n__webpack_require__.a = (module, body, hasAwait) => {\n\tvar queue;\n\thasAwait && ((queue = []).d = -1);\n\tvar depQueues = new Set();\n\tvar exports = module.exports;\n\tvar currentDeps;\n\tvar outerResolve;\n\tvar reject;\n\tvar promise = new Promise((resolve, rej) => {\n\t\treject = rej;\n\t\touterResolve = resolve;\n\t});\n\tpromise[webpackExports] = exports;\n\tpromise[webpackQueues] = (fn) => (queue && fn(queue), depQueues.forEach(fn), promise[\"catch\"](x => {}));\n\tmodule.exports = promise;\n\tbody((deps) => {\n\t\tcurrentDeps = wrapDeps(deps);\n\t\tvar fn;\n\t\tvar getResult = () => (currentDeps.map((d) => {\n\t\t\tif(d[webpackError]) throw d[webpackError];\n\t\t\treturn d[webpackExports];\n\t\t}))\n\t\tvar promise = new Promise((resolve) => {\n\t\t\tfn = () => (resolve(getResult));\n\t\t\tfn.r = 0;\n\t\t\tvar fnQueue = (q) => (q !== queue && !depQueues.has(q) && (depQueues.add(q), q && !q.d && (fn.r++, q.push(fn))));\n\t\t\tcurrentDeps.map((dep) => (dep[webpackQueues](fnQueue)));\n\t\t});\n\t\treturn fn.r ? promise : getResult();\n\t}, (err) => ((err ? reject(promise[webpackError] = err) : outerResolve(exports)), resolveQueue(queue)));\n\tqueue && queue.d < 0 && (queue.d = 0);\n};","var deferred = [];\n__webpack_require__.O = (result, chunkIds, fn, priority) => {\n\tif(chunkIds) {\n\t\tpriority = priority || 0;\n\t\tfor(var i = deferred.length; i > 0 && deferred[i - 1][2] > priority; i--) deferred[i] = deferred[i - 1];\n\t\tdeferred[i] = [chunkIds, fn, priority];\n\t\treturn;\n\t}\n\tvar notFulfilled = Infinity;\n\tfor (var i = 0; i < deferred.length; i++) {\n\t\tvar [chunkIds, fn, priority] = deferred[i];\n\t\tvar fulfilled = true;\n\t\tfor (var j = 0; j < chunkIds.length; j++) {\n\t\t\tif ((priority & 1 === 0 || notFulfilled >= priority) && Object.keys(__webpack_require__.O).every((key) => (__webpack_require__.O[key](chunkIds[j])))) {\n\t\t\t\tchunkIds.splice(j--, 1);\n\t\t\t} else {\n\t\t\t\tfulfilled = false;\n\t\t\t\tif(priority < notFulfilled) notFulfilled = priority;\n\t\t\t}\n\t\t}\n\t\tif(fulfilled) {\n\t\t\tdeferred.splice(i--, 1)\n\t\t\tvar r = fn();\n\t\t\tif (r !== undefined) result = r;\n\t\t}\n\t}\n\treturn result;\n};","var next = __webpack_require__.x;\n__webpack_require__.x = () => {\n\treturn Promise.all([495,877,66].map(__webpack_require__.e, __webpack_require__)).then(next);\n};","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n// expose the modules object (__webpack_modules__)\n__webpack_require__.m = __webpack_modules__;\n\n// the startup function\n__webpack_require__.x = () => {\n\t// Load entry module and return exports\n\t// This entry module depends on other loaded chunks and execution need to be delayed\n\tvar __webpack_exports__ = __webpack_require__.O(undefined, [495,877,66], () => (__webpack_require__(66)))\n\t__webpack_exports__ = __webpack_require__.O(__webpack_exports__);\n\treturn __webpack_exports__;\n};\n\n","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.f = {};\n// This file contains only the entry chunk.\n// The chunk loading function for additional chunks\n__webpack_require__.e = (chunkId) => {\n\treturn Promise.all(Object.keys(__webpack_require__.f).reduce((promises, key) => {\n\t\t__webpack_require__.f[key](chunkId, promises);\n\t\treturn promises;\n\t}, []));\n};","// This function allow to reference async chunks and sibling chunks for the entrypoint\n__webpack_require__.u = (chunkId) => {\n\t// return url for filenames based on template\n\treturn \"\" + chunkId + \".bundle.js\";\n};","__webpack_require__.g = (function() {\n\tif (typeof globalThis === 'object') return globalThis;\n\ttry {\n\t\treturn this || new Function('return this')();\n\t} catch (e) {\n\t\tif (typeof window === 'object') return window;\n\t}\n})();","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","var scriptUrl;\nif (__webpack_require__.g.importScripts) scriptUrl = __webpack_require__.g.location + \"\";\nvar document = __webpack_require__.g.document;\nif (!scriptUrl && document) {\n\tif (document.currentScript)\n\t\tscriptUrl = document.currentScript.src;\n\tif (!scriptUrl) {\n\t\tvar scripts = document.getElementsByTagName(\"script\");\n\t\tif(scripts.length) {\n\t\t\tvar i = scripts.length - 1;\n\t\t\twhile (i > -1 && (!scriptUrl || !/^http(s?):/.test(scriptUrl))) scriptUrl = scripts[i--].src;\n\t\t}\n\t}\n}\n// When supporting browsers where an automatic publicPath is not supported you must specify an output.publicPath manually via configuration\n// or pass an empty string (\"\") and set the __webpack_public_path__ variable from your code to use your own logic.\nif (!scriptUrl) throw new Error(\"Automatic publicPath is not supported in this browser\");\nscriptUrl = scriptUrl.replace(/#.*$/, \"\").replace(/\\?.*$/, \"\").replace(/\\/[^\\/]+$/, \"/\");\n__webpack_require__.p = scriptUrl;","__webpack_require__.b = self.location + \"\";\n\n// object to store loaded chunks\n// \"1\" means \"already loaded\"\nvar installedChunks = {\n\t206: 1\n};\n\n// importScripts chunk loading\nvar installChunk = (data) => {\n\tvar [chunkIds, moreModules, runtime] = data;\n\tfor(var moduleId in moreModules) {\n\t\tif(__webpack_require__.o(moreModules, moduleId)) {\n\t\t\t__webpack_require__.m[moduleId] = moreModules[moduleId];\n\t\t}\n\t}\n\tif(runtime) runtime(__webpack_require__);\n\twhile(chunkIds.length)\n\t\tinstalledChunks[chunkIds.pop()] = 1;\n\tparentChunkLoadingFunction(data);\n};\n__webpack_require__.f.i = (chunkId, promises) => {\n\t// \"1\" is the signal for \"already loaded\"\n\tif(!installedChunks[chunkId]) {\n\t\tif(true) { // all chunks have JS\n\t\t\timportScripts(__webpack_require__.p + __webpack_require__.u(chunkId));\n\t\t}\n\t}\n};\n\nvar chunkLoadingGlobal = self[\"webpackChunkaleo_website\"] = self[\"webpackChunkaleo_website\"] || [];\nvar parentChunkLoadingFunction = chunkLoadingGlobal.push.bind(chunkLoadingGlobal);\nchunkLoadingGlobal.push = installChunk;\n\n// no HMR\n\n// no HMR manifest","// run startup\nvar __webpack_exports__ = __webpack_require__.x();\n"],"names":["webpackQueues","webpackExports","webpackError","resolveQueue","deferred","next","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","undefined","exports","module","__webpack_modules__","m","x","__webpack_exports__","O","Symbol","queue","d","forEach","fn","r","a","body","hasAwait","currentDeps","outerResolve","reject","depQueues","Set","promise","Promise","resolve","rej","deps","map","dep","then","obj","e","ret","wrapDeps","getResult","fnQueue","q","has","add","push","err","result","chunkIds","priority","notFulfilled","Infinity","i","length","fulfilled","j","Object","keys","every","key","splice","definition","o","defineProperty","enumerable","get","f","chunkId","all","reduce","promises","u","g","globalThis","this","Function","window","prop","prototype","hasOwnProperty","call","scriptUrl","importScripts","location","document","currentScript","src","scripts","getElementsByTagName","test","Error","replace","p","b","self","installedChunks","chunkLoadingGlobal","parentChunkLoadingFunction","bind","data","moreModules","runtime","pop"],"sourceRoot":""} \ No newline at end of file diff --git a/258.bundle.js b/258.bundle.js deleted file mode 100644 index 96bc27ad0..000000000 --- a/258.bundle.js +++ /dev/null @@ -1,2 +0,0 @@ -(self.webpackChunkaleo_website=self.webpackChunkaleo_website||[]).push([[258,877],{81:(_,t,e)=>{_.exports=e.p+"58342153fc9a001d7976.wasm"},977:(_,t,e)=>{_.exports=e.p+"2d6a4d794221941c07b8.js"},877:(_,t,e)=>{e.a(_,(async(_,r)=>{try{function i(_,t,e,r){return new Promise((n=>{const i=new Worker(_,{type:"module"});i.addEventListener("message",(_=>{setTimeout((()=>{n(i),i.unref&&i.unref()}),0)}),{capture:!0,once:!0}),i.postMessage({module:t,memory:e,address:r})}))}let o;e.d(t,{$7:()=>B_,Ao:()=>q_,BP:()=>M_,D0:()=>A_,Fs:()=>L_,KC:()=>U_,LW:()=>E_,OS:()=>O_,Yc:()=>J_,ZD:()=>C_,ZF:()=>I_,ZX:()=>$_,Zc:()=>R_,c7:()=>j_,hv:()=>D_,pF:()=>N_,pV:()=>T_,qp:()=>z_,to:()=>W_});const a=new Array(128).fill(void 0);function s(_){return a[_]}a.push(void 0,null,!0,!1);let c=a.length;function g(_){_<132||(a[_]=c,c=_)}function w(_){const t=s(_);return g(_),t}const d="undefined"!=typeof TextDecoder?new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0}):{decode:()=>{throw Error("TextDecoder not available")}};"undefined"!=typeof TextDecoder&&d.decode();let b=null;function l(){return null!==b&&b.buffer===o.memory.buffer||(b=new Uint8Array(o.memory.buffer)),b}function u(_,t){return _>>>=0,d.decode(l().slice(_,_+t))}function f(_){c===a.length&&a.push(a.length+1);const t=c;return c=a[t],a[t]=_,t}let p=0;const y="undefined"!=typeof TextEncoder?new TextEncoder("utf-8"):{encode:()=>{throw Error("TextEncoder not available")}},m=function(_,t){const e=y.encode(_);return t.set(e),{read:_.length,written:e.length}};function h(_,t,e){if(void 0===e){const e=y.encode(_),r=t(e.length,1)>>>0;return l().subarray(r,r+e.length).set(e),p=e.length,r}let r=_.length,n=t(r,1)>>>0;const i=l();let o=0;for(;o127)break;i[n+o]=t}if(o!==r){0!==o&&(_=_.slice(o)),n=e(n,r,r=o+3*_.length,1)>>>0;const t=l().subarray(n+o,n+r);o+=m(_,t).written,n=e(n,r,o,1)>>>0}return p=o,n}function v(_){return null==_}let k=null;function P(){return null!==k&&k.buffer===o.memory.buffer||(k=new Int32Array(o.memory.buffer)),k}function S(_){const t=typeof _;if("number"==t||"boolean"==t||null==_)return`${_}`;if("string"==t)return`"${_}"`;if("symbol"==t){const t=_.description;return null==t?"Symbol":`Symbol(${t})`}if("function"==t){const t=_.name;return"string"==typeof t&&t.length>0?`Function(${t})`:"Function"}if(Array.isArray(_)){const t=_.length;let e="[";t>0&&(e+=S(_[0]));for(let r=1;r1))return toString.call(_);if(r=e[1],"Object"==r)try{return"Object("+JSON.stringify(_)+")"}catch(_){return"Object"}return _ instanceof Error?`${_.name}: ${_.message}\n${_.stack}`:r}const x="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((_=>{o.__wbindgen_export_3.get(_.dtor)(_.a,_.b)}));function V(_,t,e,r){const n={a:_,b:t,cnt:1,dtor:e},i=(..._)=>{n.cnt++;const t=n.a;n.a=0;try{return r(t,n.b,..._)}finally{0==--n.cnt?(o.__wbindgen_export_3.get(n.dtor)(t,n.b),x.unregister(n)):n.a=t}};return i.original=n,x.register(i,n,n),i}function F(_,t,e){o._dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h467700a9696faab3(_,t,f(e))}function T(_,t){if(!(_ instanceof t))throw new Error(`expected instance of ${t.name}`);return _.ptr}function R(_,t){const e=t(1*_.length,1)>>>0;return l().set(_,e/1),p=_.length,e}function z(_,t,e,r){try{const a=o.__wbindgen_add_to_stack_pointer(-16);T(_,q),T(t,p_),T(e,r_);const s=h(r,o.__wbindgen_malloc,o.__wbindgen_realloc),c=p;o.verifyFunctionExecution(a,_.__wbg_ptr,t.__wbg_ptr,e.__wbg_ptr,s,c);var n=P()[a/4+0],i=P()[a/4+1];if(P()[a/4+2])throw w(i);return 0!==n}finally{o.__wbindgen_add_to_stack_pointer(16)}}let A=null;function O(){return null!==A&&A.buffer===o.memory.buffer||(A=new BigInt64Array(o.memory.buffer)),A}function j(_,t){return _>>>=0,l().subarray(_/1,_/1+t)}function K(_){o.runRayonThread(_)}function C(_,t){return w(o.initThreadPool(f(_),t))}function E(_,t){try{return _.apply(this,t)}catch(_){o.__wbindgen_exn_store(f(_))}}function M(_,t,e,r){o.wasm_bindgen__convert__closures__invoke2_mut__h381bef3cd886b4c7(_,t,f(e),f(r))}const B="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((_=>o.__wbg_address_free(_>>>0)));let U=class _{static __wrap(t){t>>>=0;const e=Object.create(_.prototype);return e.__wbg_ptr=t,B.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,B.unregister(this),_}free(){const _=this.__destroy_into_raw();o.__wbg_address_free(_)}static from_private_key(t){T(t,G);const e=o.address_from_private_key(t.__wbg_ptr);return _.__wrap(e)}static from_view_key(t){T(t,m_);const e=o.address_from_view_key(t.__wbg_ptr);return _.__wrap(e)}static from_string(t){const e=h(t,o.__wbindgen_malloc,o.__wbindgen_realloc),r=p,n=o.address_from_string(e,r);return _.__wrap(n)}to_string(){let _,t;try{const n=o.__wbindgen_add_to_stack_pointer(-16);o.address_to_string(n,this.__wbg_ptr);var e=P()[n/4+0],r=P()[n/4+1];return _=e,t=r,u(e,r)}finally{o.__wbindgen_add_to_stack_pointer(16),o.__wbindgen_free(_,t,1)}}verify(_,t){const e=R(_,o.__wbindgen_malloc),r=p;T(t,b_);return 0!==o.address_verify(this.__wbg_ptr,e,r,t.__wbg_ptr)}};const I="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((_=>o.__wbg_execution_free(_>>>0)));let q=class _{static __wrap(t){t>>>=0;const e=Object.create(_.prototype);return e.__wbg_ptr=t,I.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,I.unregister(this),_}free(){const _=this.__destroy_into_raw();o.__wbg_execution_free(_)}toString(){let _,t;try{const n=o.__wbindgen_add_to_stack_pointer(-16);o.execution_toString(n,this.__wbg_ptr);var e=P()[n/4+0],r=P()[n/4+1];return _=e,t=r,u(e,r)}finally{o.__wbindgen_add_to_stack_pointer(16),o.__wbindgen_free(_,t,1)}}static fromString(t){try{const n=o.__wbindgen_add_to_stack_pointer(-16),i=h(t,o.__wbindgen_malloc,o.__wbindgen_realloc),a=p;o.execution_fromString(n,i,a);var e=P()[n/4+0],r=P()[n/4+1];if(P()[n/4+2])throw w(r);return _.__wrap(e)}finally{o.__wbindgen_add_to_stack_pointer(16)}}};const W="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((_=>o.__wbg_executionresponse_free(_>>>0)));let $=class _{static __wrap(t){t>>>=0;const e=Object.create(_.prototype);return e.__wbg_ptr=t,W.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,W.unregister(this),_}free(){const _=this.__destroy_into_raw();o.__wbg_executionresponse_free(_)}getOutputs(){return w(o.executionresponse_getOutputs(this.__wbg_ptr))}getExecution(){const _=o.executionresponse_getExecution(this.__wbg_ptr);return 0===_?void 0:q.__wrap(_)}getKeys(){try{const e=o.__wbindgen_add_to_stack_pointer(-16);o.executionresponse_getKeys(e,this.__wbg_ptr);var _=P()[e/4+0],t=P()[e/4+1];if(P()[e/4+2])throw w(t);return L.__wrap(_)}finally{o.__wbindgen_add_to_stack_pointer(16)}}getProvingKey(){const _=o.executionresponse_getProvingKey(this.__wbg_ptr);return 0===_?void 0:a_.__wrap(_)}getVerifyingKey(){const _=o.executionresponse_getVerifyingKey(this.__wbg_ptr);return p_.__wrap(_)}getFunctionId(){let _,t;try{const n=o.__wbindgen_add_to_stack_pointer(-16);o.executionresponse_getFunctionId(n,this.__wbg_ptr);var e=P()[n/4+0],r=P()[n/4+1];return _=e,t=r,u(e,r)}finally{o.__wbindgen_add_to_stack_pointer(16),o.__wbindgen_free(_,t,1)}}getProgram(){const _=o.executionresponse_getProgram(this.__wbg_ptr);return r_.__wrap(_)}};const D="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((_=>o.__wbg_field_free(_>>>0)));let N=class _{static __wrap(t){t>>>=0;const e=Object.create(_.prototype);return e.__wbg_ptr=t,D.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,D.unregister(this),_}free(){const _=this.__destroy_into_raw();o.__wbg_field_free(_)}toString(){let _,t;try{const n=o.__wbindgen_add_to_stack_pointer(-16);o.field_toString(n,this.__wbg_ptr);var e=P()[n/4+0],r=P()[n/4+1];return _=e,t=r,u(e,r)}finally{o.__wbindgen_add_to_stack_pointer(16),o.__wbindgen_free(_,t,1)}}static fromString(t){try{const n=o.__wbindgen_add_to_stack_pointer(-16),i=h(t,o.__wbindgen_malloc,o.__wbindgen_realloc),a=p;o.field_fromString(n,i,a);var e=P()[n/4+0],r=P()[n/4+1];if(P()[n/4+2])throw w(r);return _.__wrap(e)}finally{o.__wbindgen_add_to_stack_pointer(16)}}};const J="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((_=>o.__wbg_keypair_free(_>>>0)));class L{static __wrap(_){_>>>=0;const t=Object.create(L.prototype);return t.__wbg_ptr=_,J.register(t,t.__wbg_ptr,t),t}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,J.unregister(this),_}free(){const _=this.__destroy_into_raw();o.__wbg_keypair_free(_)}constructor(_,t){T(_,a_);var e=_.__destroy_into_raw();T(t,p_);var r=t.__destroy_into_raw();const n=o.keypair_new(e,r);return this.__wbg_ptr=n>>>0,this}provingKey(){try{const e=o.__wbindgen_add_to_stack_pointer(-16);o.keypair_provingKey(e,this.__wbg_ptr);var _=P()[e/4+0],t=P()[e/4+1];if(P()[e/4+2])throw w(t);return a_.__wrap(_)}finally{o.__wbindgen_add_to_stack_pointer(16)}}verifyingKey(){try{const e=o.__wbindgen_add_to_stack_pointer(-16);o.keypair_verifyingKey(e,this.__wbg_ptr);var _=P()[e/4+0],t=P()[e/4+1];if(P()[e/4+2])throw w(t);return p_.__wrap(_)}finally{o.__wbindgen_add_to_stack_pointer(16)}}}const H="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((_=>o.__wbg_metadata_free(_>>>0)));let Z=class _{static __wrap(t){t>>>=0;const e=Object.create(_.prototype);return e.__wbg_ptr=t,H.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,H.unregister(this),_}free(){const _=this.__destroy_into_raw();o.__wbg_metadata_free(_)}get name(){let _,t;try{const n=o.__wbindgen_add_to_stack_pointer(-16);o.__wbg_get_metadata_name(n,this.__wbg_ptr);var e=P()[n/4+0],r=P()[n/4+1];return _=e,t=r,u(e,r)}finally{o.__wbindgen_add_to_stack_pointer(16),o.__wbindgen_free(_,t,1)}}set name(_){const t=h(_,o.__wbindgen_malloc,o.__wbindgen_realloc),e=p;o.__wbg_set_metadata_name(this.__wbg_ptr,t,e)}get locator(){let _,t;try{const n=o.__wbindgen_add_to_stack_pointer(-16);o.__wbg_get_metadata_locator(n,this.__wbg_ptr);var e=P()[n/4+0],r=P()[n/4+1];return _=e,t=r,u(e,r)}finally{o.__wbindgen_add_to_stack_pointer(16),o.__wbindgen_free(_,t,1)}}set locator(_){const t=h(_,o.__wbindgen_malloc,o.__wbindgen_realloc),e=p;o.__wbg_set_metadata_locator(this.__wbg_ptr,t,e)}get prover(){let _,t;try{const n=o.__wbindgen_add_to_stack_pointer(-16);o.__wbg_get_metadata_prover(n,this.__wbg_ptr);var e=P()[n/4+0],r=P()[n/4+1];return _=e,t=r,u(e,r)}finally{o.__wbindgen_add_to_stack_pointer(16),o.__wbindgen_free(_,t,1)}}set prover(_){const t=h(_,o.__wbindgen_malloc,o.__wbindgen_realloc),e=p;o.__wbg_set_metadata_prover(this.__wbg_ptr,t,e)}get verifier(){let _,t;try{const n=o.__wbindgen_add_to_stack_pointer(-16);o.__wbg_get_metadata_verifier(n,this.__wbg_ptr);var e=P()[n/4+0],r=P()[n/4+1];return _=e,t=r,u(e,r)}finally{o.__wbindgen_add_to_stack_pointer(16),o.__wbindgen_free(_,t,1)}}set verifier(_){const t=h(_,o.__wbindgen_malloc,o.__wbindgen_realloc),e=p;o.__wbg_set_metadata_verifier(this.__wbg_ptr,t,e)}get verifyingKey(){let _,t;try{const n=o.__wbindgen_add_to_stack_pointer(-16);o.__wbg_get_metadata_verifyingKey(n,this.__wbg_ptr);var e=P()[n/4+0],r=P()[n/4+1];return _=e,t=r,u(e,r)}finally{o.__wbindgen_add_to_stack_pointer(16),o.__wbindgen_free(_,t,1)}}set verifyingKey(_){const t=h(_,o.__wbindgen_malloc,o.__wbindgen_realloc),e=p;o.__wbg_set_metadata_verifyingKey(this.__wbg_ptr,t,e)}static baseUrl(){let _,t;try{const n=o.__wbindgen_add_to_stack_pointer(-16);o.metadata_baseUrl(n);var e=P()[n/4+0],r=P()[n/4+1];return _=e,t=r,u(e,r)}finally{o.__wbindgen_add_to_stack_pointer(16),o.__wbindgen_free(_,t,1)}}static bond_public(){const t=o.metadata_bond_public();return _.__wrap(t)}static bond_validator(){const t=o.metadata_bond_validator();return _.__wrap(t)}static claim_unbond_public(){const t=o.metadata_claim_unbond_public();return _.__wrap(t)}static fee_private(){const t=o.metadata_fee_private();return _.__wrap(t)}static fee_public(){const t=o.metadata_fee_public();return _.__wrap(t)}static inclusion(){const t=o.metadata_inclusion();return _.__wrap(t)}static join(){const t=o.metadata_join();return _.__wrap(t)}static set_validator_state(){const t=o.metadata_set_validator_state();return _.__wrap(t)}static split(){const t=o.metadata_split();return _.__wrap(t)}static transfer_private(){const t=o.metadata_transfer_private();return _.__wrap(t)}static transfer_private_to_public(){const t=o.metadata_transfer_private_to_public();return _.__wrap(t)}static transfer_public(){const t=o.metadata_transfer_public();return _.__wrap(t)}static transfer_public_as_signer(){const t=o.metadata_transfer_public_as_signer();return _.__wrap(t)}static transfer_public_to_private(){const t=o.metadata_transfer_public_to_private();return _.__wrap(t)}static unbond_public(){const t=o.metadata_unbond_public();return _.__wrap(t)}};const Q="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((_=>o.__wbg_offlinequery_free(_>>>0)));let X=class _{static __wrap(t){t>>>=0;const e=Object.create(_.prototype);return e.__wbg_ptr=t,Q.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,Q.unregister(this),_}free(){const _=this.__destroy_into_raw();o.__wbg_offlinequery_free(_)}constructor(_){try{const r=o.__wbindgen_add_to_stack_pointer(-16),n=h(_,o.__wbindgen_malloc,o.__wbindgen_realloc),i=p;o.offlinequery_new(r,n,i);var t=P()[r/4+0],e=P()[r/4+1];if(P()[r/4+2])throw w(e);return this.__wbg_ptr=t>>>0,this}finally{o.__wbindgen_add_to_stack_pointer(16)}}addStatePath(_,t){try{const r=o.__wbindgen_add_to_stack_pointer(-16),n=h(_,o.__wbindgen_malloc,o.__wbindgen_realloc),i=p,a=h(t,o.__wbindgen_malloc,o.__wbindgen_realloc),s=p;o.offlinequery_addStatePath(r,this.__wbg_ptr,n,i,a,s);var e=P()[r/4+0];if(P()[r/4+1])throw w(e)}finally{o.__wbindgen_add_to_stack_pointer(16)}}toString(){let _,t;try{const n=o.__wbindgen_add_to_stack_pointer(-16);o.offlinequery_toString(n,this.__wbg_ptr);var e=P()[n/4+0],r=P()[n/4+1];return _=e,t=r,u(e,r)}finally{o.__wbindgen_add_to_stack_pointer(16),o.__wbindgen_free(_,t,1)}}static fromString(t){try{const n=o.__wbindgen_add_to_stack_pointer(-16),i=h(t,o.__wbindgen_malloc,o.__wbindgen_realloc),a=p;o.offlinequery_fromString(n,i,a);var e=P()[n/4+0],r=P()[n/4+1];if(P()[n/4+2])throw w(r);return _.__wrap(e)}finally{o.__wbindgen_add_to_stack_pointer(16)}}};const Y="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((_=>o.__wbg_privatekey_free(_>>>0)));let G=class _{static __wrap(t){t>>>=0;const e=Object.create(_.prototype);return e.__wbg_ptr=t,Y.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,Y.unregister(this),_}free(){const _=this.__destroy_into_raw();o.__wbg_privatekey_free(_)}constructor(){const _=o.privatekey_new();return this.__wbg_ptr=_>>>0,this}static from_seed_unchecked(t){const e=R(t,o.__wbindgen_malloc),r=p,n=o.privatekey_from_seed_unchecked(e,r);return _.__wrap(n)}static from_string(t){try{const n=o.__wbindgen_add_to_stack_pointer(-16),i=h(t,o.__wbindgen_malloc,o.__wbindgen_realloc),a=p;o.privatekey_from_string(n,i,a);var e=P()[n/4+0],r=P()[n/4+1];if(P()[n/4+2])throw w(r);return _.__wrap(e)}finally{o.__wbindgen_add_to_stack_pointer(16)}}to_string(){let _,t;try{const n=o.__wbindgen_add_to_stack_pointer(-16);o.privatekey_to_string(n,this.__wbg_ptr);var e=P()[n/4+0],r=P()[n/4+1];return _=e,t=r,u(e,r)}finally{o.__wbindgen_add_to_stack_pointer(16),o.__wbindgen_free(_,t,1)}}to_view_key(){const _=o.privatekey_to_view_key(this.__wbg_ptr);return m_.__wrap(_)}to_address(){const _=o.privatekey_to_address(this.__wbg_ptr);return U.__wrap(_)}sign(_){const t=R(_,o.__wbindgen_malloc),e=p,r=o.privatekey_sign(this.__wbg_ptr,t,e);return b_.__wrap(r)}static newEncrypted(_){try{const r=o.__wbindgen_add_to_stack_pointer(-16),n=h(_,o.__wbindgen_malloc,o.__wbindgen_realloc),i=p;o.privatekey_newEncrypted(r,n,i);var t=P()[r/4+0],e=P()[r/4+1];if(P()[r/4+2])throw w(e);return t_.__wrap(t)}finally{o.__wbindgen_add_to_stack_pointer(16)}}toCiphertext(_){try{const r=o.__wbindgen_add_to_stack_pointer(-16),n=h(_,o.__wbindgen_malloc,o.__wbindgen_realloc),i=p;o.privatekey_toCiphertext(r,this.__wbg_ptr,n,i);var t=P()[r/4+0],e=P()[r/4+1];if(P()[r/4+2])throw w(e);return t_.__wrap(t)}finally{o.__wbindgen_add_to_stack_pointer(16)}}static fromPrivateKeyCiphertext(t,e){try{const i=o.__wbindgen_add_to_stack_pointer(-16);T(t,t_);const a=h(e,o.__wbindgen_malloc,o.__wbindgen_realloc),s=p;o.privatekey_fromPrivateKeyCiphertext(i,t.__wbg_ptr,a,s);var r=P()[i/4+0],n=P()[i/4+1];if(P()[i/4+2])throw w(n);return _.__wrap(r)}finally{o.__wbindgen_add_to_stack_pointer(16)}}};const __="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((_=>o.__wbg_privatekeyciphertext_free(_>>>0)));let t_=class _{static __wrap(t){t>>>=0;const e=Object.create(_.prototype);return e.__wbg_ptr=t,__.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,__.unregister(this),_}free(){const _=this.__destroy_into_raw();o.__wbg_privatekeyciphertext_free(_)}static encryptPrivateKey(t,e){try{const i=o.__wbindgen_add_to_stack_pointer(-16);T(t,G);const a=h(e,o.__wbindgen_malloc,o.__wbindgen_realloc),s=p;o.privatekey_toCiphertext(i,t.__wbg_ptr,a,s);var r=P()[i/4+0],n=P()[i/4+1];if(P()[i/4+2])throw w(n);return _.__wrap(r)}finally{o.__wbindgen_add_to_stack_pointer(16)}}decryptToPrivateKey(_){try{const r=o.__wbindgen_add_to_stack_pointer(-16),n=h(_,o.__wbindgen_malloc,o.__wbindgen_realloc),i=p;o.privatekeyciphertext_decryptToPrivateKey(r,this.__wbg_ptr,n,i);var t=P()[r/4+0],e=P()[r/4+1];if(P()[r/4+2])throw w(e);return G.__wrap(t)}finally{o.__wbindgen_add_to_stack_pointer(16)}}toString(){let _,t;try{const n=o.__wbindgen_add_to_stack_pointer(-16);o.privatekeyciphertext_toString(n,this.__wbg_ptr);var e=P()[n/4+0],r=P()[n/4+1];return _=e,t=r,u(e,r)}finally{o.__wbindgen_add_to_stack_pointer(16),o.__wbindgen_free(_,t,1)}}static fromString(t){try{const n=o.__wbindgen_add_to_stack_pointer(-16),i=h(t,o.__wbindgen_malloc,o.__wbindgen_realloc),a=p;o.privatekeyciphertext_fromString(n,i,a);var e=P()[n/4+0],r=P()[n/4+1];if(P()[n/4+2])throw w(r);return _.__wrap(e)}finally{o.__wbindgen_add_to_stack_pointer(16)}}};const e_="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((_=>o.__wbg_program_free(_>>>0)));let r_=class _{static __wrap(t){t>>>=0;const e=Object.create(_.prototype);return e.__wbg_ptr=t,e_.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,e_.unregister(this),_}free(){const _=this.__destroy_into_raw();o.__wbg_program_free(_)}static fromString(t){try{const n=o.__wbindgen_add_to_stack_pointer(-16),i=h(t,o.__wbindgen_malloc,o.__wbindgen_realloc),a=p;o.program_fromString(n,i,a);var e=P()[n/4+0],r=P()[n/4+1];if(P()[n/4+2])throw w(r);return _.__wrap(e)}finally{o.__wbindgen_add_to_stack_pointer(16)}}toString(){let _,t;try{const n=o.__wbindgen_add_to_stack_pointer(-16);o.program_toString(n,this.__wbg_ptr);var e=P()[n/4+0],r=P()[n/4+1];return _=e,t=r,u(e,r)}finally{o.__wbindgen_add_to_stack_pointer(16),o.__wbindgen_free(_,t,1)}}hasFunction(_){const t=h(_,o.__wbindgen_malloc,o.__wbindgen_realloc),e=p;return 0!==o.program_hasFunction(this.__wbg_ptr,t,e)}getFunctions(){return w(o.program_getFunctions(this.__wbg_ptr))}getFunctionInputs(_){try{const r=o.__wbindgen_add_to_stack_pointer(-16),n=h(_,o.__wbindgen_malloc,o.__wbindgen_realloc),i=p;o.program_getFunctionInputs(r,this.__wbg_ptr,n,i);var t=P()[r/4+0],e=P()[r/4+1];if(P()[r/4+2])throw w(e);return w(t)}finally{o.__wbindgen_add_to_stack_pointer(16)}}getMappings(){try{const e=o.__wbindgen_add_to_stack_pointer(-16);o.program_getMappings(e,this.__wbg_ptr);var _=P()[e/4+0],t=P()[e/4+1];if(P()[e/4+2])throw w(t);return w(_)}finally{o.__wbindgen_add_to_stack_pointer(16)}}getRecordMembers(_){try{const r=o.__wbindgen_add_to_stack_pointer(-16),n=h(_,o.__wbindgen_malloc,o.__wbindgen_realloc),i=p;o.program_getRecordMembers(r,this.__wbg_ptr,n,i);var t=P()[r/4+0],e=P()[r/4+1];if(P()[r/4+2])throw w(e);return w(t)}finally{o.__wbindgen_add_to_stack_pointer(16)}}getStructMembers(_){try{const r=o.__wbindgen_add_to_stack_pointer(-16),n=h(_,o.__wbindgen_malloc,o.__wbindgen_realloc),i=p;o.program_getStructMembers(r,this.__wbg_ptr,n,i);var t=P()[r/4+0],e=P()[r/4+1];if(P()[r/4+2])throw w(e);return w(t)}finally{o.__wbindgen_add_to_stack_pointer(16)}}static getCreditsProgram(){const t=o.program_getCreditsProgram();return _.__wrap(t)}id(){let _,t;try{const n=o.__wbindgen_add_to_stack_pointer(-16);o.program_id(n,this.__wbg_ptr);var e=P()[n/4+0],r=P()[n/4+1];return _=e,t=r,u(e,r)}finally{o.__wbindgen_add_to_stack_pointer(16),o.__wbindgen_free(_,t,1)}}address(){try{const e=o.__wbindgen_add_to_stack_pointer(-16);o.program_address(e,this.__wbg_ptr);var _=P()[e/4+0],t=P()[e/4+1];if(P()[e/4+2])throw w(t);return U.__wrap(_)}finally{o.__wbindgen_add_to_stack_pointer(16)}}isEqual(t){T(t,_);return 0!==o.program_isEqual(this.__wbg_ptr,t.__wbg_ptr)}getImports(){return w(o.program_getImports(this.__wbg_ptr))}};const n_="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((_=>o.__wbg_programmanager_free(_>>>0)));let i_=class{__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,n_.unregister(this),_}free(){const _=this.__destroy_into_raw();o.__wbg_programmanager_free(_)}static buildDeploymentTransaction(_,t,e,r,n,i,a,s,c){T(_,G);const g=h(t,o.__wbindgen_malloc,o.__wbindgen_realloc),d=p;let b=0;v(r)||(T(r,w_),b=r.__destroy_into_raw());var l=v(n)?0:h(n,o.__wbindgen_malloc,o.__wbindgen_realloc),u=p;let y=0;v(a)||(T(a,a_),y=a.__destroy_into_raw());let m=0;v(s)||(T(s,p_),m=s.__destroy_into_raw());let k=0;v(c)||(T(c,X),k=c.__destroy_into_raw());return w(o.programmanager_buildDeploymentTransaction(_.__wbg_ptr,g,d,e,b,l,u,v(i)?0:f(i),y,m,k))}static estimateDeploymentFee(_,t){const e=h(_,o.__wbindgen_malloc,o.__wbindgen_realloc),r=p;return w(o.programmanager_estimateDeploymentFee(e,r,v(t)?0:f(t)))}static estimateProgramNameCost(_){try{const r=o.__wbindgen_add_to_stack_pointer(-16),n=h(_,o.__wbindgen_malloc,o.__wbindgen_realloc),i=p;o.programmanager_estimateProgramNameCost(r,n,i);var t=O()[r/8+0],e=P()[r/4+2];if(P()[r/4+3])throw w(e);return BigInt.asUintN(64,t)}finally{o.__wbindgen_add_to_stack_pointer(16)}}static executeFunctionOffline(_,t,e,r,n,i,a,s,c,g,d){T(_,G);const b=h(t,o.__wbindgen_malloc,o.__wbindgen_realloc),l=p,u=h(e,o.__wbindgen_malloc,o.__wbindgen_realloc),y=p;let m=0;v(s)||(T(s,a_),m=s.__destroy_into_raw());let k=0;v(c)||(T(c,p_),k=c.__destroy_into_raw());var P=v(g)?0:h(g,o.__wbindgen_malloc,o.__wbindgen_realloc),S=p;let x=0;v(d)||(T(d,X),x=d.__destroy_into_raw());return w(o.programmanager_executeFunctionOffline(_.__wbg_ptr,b,l,u,y,f(r),n,i,v(a)?0:f(a),m,k,P,S,x))}static buildExecutionTransaction(_,t,e,r,n,i,a,s,c,g,d,b,l){T(_,G);const u=h(t,o.__wbindgen_malloc,o.__wbindgen_realloc),y=p,m=h(e,o.__wbindgen_malloc,o.__wbindgen_realloc),k=p;let P=0;v(i)||(T(i,w_),P=i.__destroy_into_raw());var S=v(a)?0:h(a,o.__wbindgen_malloc,o.__wbindgen_realloc),x=p;let V=0;v(c)||(T(c,a_),V=c.__destroy_into_raw());let F=0;v(g)||(T(g,p_),F=g.__destroy_into_raw());let R=0;v(d)||(T(d,a_),R=d.__destroy_into_raw());let z=0;v(b)||(T(b,p_),z=b.__destroy_into_raw());let A=0;v(l)||(T(l,X),A=l.__destroy_into_raw());return w(o.programmanager_buildExecutionTransaction(_.__wbg_ptr,u,y,m,k,f(r),n,P,S,x,v(s)?0:f(s),V,F,R,z,A))}static estimateExecutionFee(_,t,e,r,n,i,a,s,c){T(_,G);const g=h(t,o.__wbindgen_malloc,o.__wbindgen_realloc),d=p,b=h(e,o.__wbindgen_malloc,o.__wbindgen_realloc),l=p;var u=v(n)?0:h(n,o.__wbindgen_malloc,o.__wbindgen_realloc),y=p;let m=0;v(a)||(T(a,a_),m=a.__destroy_into_raw());let k=0;v(s)||(T(s,p_),k=s.__destroy_into_raw());let P=0;v(c)||(T(c,X),P=c.__destroy_into_raw());return w(o.programmanager_estimateExecutionFee(_.__wbg_ptr,g,d,b,l,f(r),u,y,v(i)?0:f(i),m,k,P))}static estimateFinalizeFee(_,t){try{const n=o.__wbindgen_add_to_stack_pointer(-16),i=h(_,o.__wbindgen_malloc,o.__wbindgen_realloc),a=p,s=h(t,o.__wbindgen_malloc,o.__wbindgen_realloc),c=p;o.programmanager_estimateFinalizeFee(n,i,a,s,c);var e=O()[n/8+0],r=P()[n/4+2];if(P()[n/4+3])throw w(r);return BigInt.asUintN(64,e)}finally{o.__wbindgen_add_to_stack_pointer(16)}}static buildJoinTransaction(_,t,e,r,n,i,a,s,c,g,d){T(_,G),T(t,w_);var b=t.__destroy_into_raw();T(e,w_);var l=e.__destroy_into_raw();let u=0;v(n)||(T(n,w_),u=n.__destroy_into_raw());var f=v(i)?0:h(i,o.__wbindgen_malloc,o.__wbindgen_realloc),y=p;let m=0;v(a)||(T(a,a_),m=a.__destroy_into_raw());let k=0;v(s)||(T(s,p_),k=s.__destroy_into_raw());let P=0;v(c)||(T(c,a_),P=c.__destroy_into_raw());let S=0;v(g)||(T(g,p_),S=g.__destroy_into_raw());let x=0;v(d)||(T(d,X),x=d.__destroy_into_raw());return w(o.programmanager_buildJoinTransaction(_.__wbg_ptr,b,l,r,u,f,y,m,k,P,S,x))}static buildSplitTransaction(_,t,e,r,n,i,a){T(_,G),T(e,w_);var s=e.__destroy_into_raw(),c=v(r)?0:h(r,o.__wbindgen_malloc,o.__wbindgen_realloc),g=p;let d=0;v(n)||(T(n,a_),d=n.__destroy_into_raw());let b=0;v(i)||(T(i,p_),b=i.__destroy_into_raw());let l=0;v(a)||(T(a,X),l=a.__destroy_into_raw());return w(o.programmanager_buildSplitTransaction(_.__wbg_ptr,t,s,c,g,d,b,l))}static buildTransferTransaction(_,t,e,r,n,i,a,s,c,g,d,b,l){T(_,G);const u=h(e,o.__wbindgen_malloc,o.__wbindgen_realloc),f=p,y=h(r,o.__wbindgen_malloc,o.__wbindgen_realloc),m=p;let k=0;v(n)||(T(n,w_),k=n.__destroy_into_raw());let P=0;v(a)||(T(a,w_),P=a.__destroy_into_raw());var S=v(s)?0:h(s,o.__wbindgen_malloc,o.__wbindgen_realloc),x=p;let V=0;v(c)||(T(c,a_),V=c.__destroy_into_raw());let F=0;v(g)||(T(g,p_),F=g.__destroy_into_raw());let R=0;v(d)||(T(d,a_),R=d.__destroy_into_raw());let z=0;v(b)||(T(b,p_),z=b.__destroy_into_raw());let A=0;v(l)||(T(l,X),A=l.__destroy_into_raw());return w(o.programmanager_buildTransferTransaction(_.__wbg_ptr,t,u,f,y,m,k,i,P,S,x,V,F,R,z,A))}static synthesizeKeyPair(_,t,e,r,n){T(_,G);const i=h(t,o.__wbindgen_malloc,o.__wbindgen_realloc),a=p,s=h(e,o.__wbindgen_malloc,o.__wbindgen_realloc),c=p;return w(o.programmanager_synthesizeKeyPair(_.__wbg_ptr,i,a,s,c,f(r),v(n)?0:f(n)))}};const o_="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((_=>o.__wbg_provingkey_free(_>>>0)));let a_=class _{static __wrap(t){t>>>=0;const e=Object.create(_.prototype);return e.__wbg_ptr=t,o_.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,o_.unregister(this),_}free(){const _=this.__destroy_into_raw();o.__wbg_provingkey_free(_)}isBondPublicProver(){return 0!==o.provingkey_isBondPublicProver(this.__wbg_ptr)}isBondValidatorProver(){return 0!==o.provingkey_isBondValidatorProver(this.__wbg_ptr)}isClaimUnbondPublicProver(){return 0!==o.provingkey_isClaimUnbondPublicProver(this.__wbg_ptr)}isFeePrivateProver(){return 0!==o.provingkey_isFeePrivateProver(this.__wbg_ptr)}isFeePublicProver(){return 0!==o.provingkey_isFeePublicProver(this.__wbg_ptr)}isInclusionProver(){return 0!==o.provingkey_isInclusionProver(this.__wbg_ptr)}isJoinProver(){return 0!==o.provingkey_isJoinProver(this.__wbg_ptr)}isSetValidatorStateProver(){return 0!==o.provingkey_isSetValidatorStateProver(this.__wbg_ptr)}isSplitProver(){return 0!==o.provingkey_isSplitProver(this.__wbg_ptr)}isTransferPrivateProver(){return 0!==o.provingkey_isTransferPrivateProver(this.__wbg_ptr)}isTransferPrivateToPublicProver(){return 0!==o.provingkey_isTransferPrivateToPublicProver(this.__wbg_ptr)}isTransferPublicProver(){return 0!==o.provingkey_isTransferPublicProver(this.__wbg_ptr)}isTransferPublicAsSignerProver(){return 0!==o.provingkey_isTransferPublicAsSignerProver(this.__wbg_ptr)}isTransferPublicToPrivateProver(){return 0!==o.provingkey_isTransferPublicToPrivateProver(this.__wbg_ptr)}isUnbondPublicProver(){return 0!==o.provingkey_isUnbondPublicProver(this.__wbg_ptr)}checksum(){let _,t;try{const n=o.__wbindgen_add_to_stack_pointer(-16);o.provingkey_checksum(n,this.__wbg_ptr);var e=P()[n/4+0],r=P()[n/4+1];return _=e,t=r,u(e,r)}finally{o.__wbindgen_add_to_stack_pointer(16),o.__wbindgen_free(_,t,1)}}copy(){const t=o.provingkey_copy(this.__wbg_ptr);return _.__wrap(t)}static fromBytes(t){try{const n=o.__wbindgen_add_to_stack_pointer(-16),i=R(t,o.__wbindgen_malloc),a=p;o.provingkey_fromBytes(n,i,a);var e=P()[n/4+0],r=P()[n/4+1];if(P()[n/4+2])throw w(r);return _.__wrap(e)}finally{o.__wbindgen_add_to_stack_pointer(16)}}static fromString(t){try{const n=o.__wbindgen_add_to_stack_pointer(-16),i=h(t,o.__wbindgen_malloc,o.__wbindgen_realloc),a=p;o.provingkey_fromString(n,i,a);var e=P()[n/4+0],r=P()[n/4+1];if(P()[n/4+2])throw w(r);return _.__wrap(e)}finally{o.__wbindgen_add_to_stack_pointer(16)}}toBytes(){try{const n=o.__wbindgen_add_to_stack_pointer(-16);o.provingkey_toBytes(n,this.__wbg_ptr);var _=P()[n/4+0],t=P()[n/4+1],e=P()[n/4+2];if(P()[n/4+3])throw w(e);var r=j(_,t).slice();return o.__wbindgen_free(_,1*t,1),r}finally{o.__wbindgen_add_to_stack_pointer(16)}}toString(){let _,t;try{const n=o.__wbindgen_add_to_stack_pointer(-16);o.provingkey_toString(n,this.__wbg_ptr);var e=P()[n/4+0],r=P()[n/4+1];return _=e,t=r,u(e,r)}finally{o.__wbindgen_add_to_stack_pointer(16),o.__wbindgen_free(_,t,1)}}};const s_="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((_=>o.__wbg_recordciphertext_free(_>>>0)));let c_=class _{static __wrap(t){t>>>=0;const e=Object.create(_.prototype);return e.__wbg_ptr=t,s_.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,s_.unregister(this),_}free(){const _=this.__destroy_into_raw();o.__wbg_recordciphertext_free(_)}static fromString(t){try{const n=o.__wbindgen_add_to_stack_pointer(-16),i=h(t,o.__wbindgen_malloc,o.__wbindgen_realloc),a=p;o.recordciphertext_fromString(n,i,a);var e=P()[n/4+0],r=P()[n/4+1];if(P()[n/4+2])throw w(r);return _.__wrap(e)}finally{o.__wbindgen_add_to_stack_pointer(16)}}toString(){let _,t;try{const n=o.__wbindgen_add_to_stack_pointer(-16);o.recordciphertext_toString(n,this.__wbg_ptr);var e=P()[n/4+0],r=P()[n/4+1];return _=e,t=r,u(e,r)}finally{o.__wbindgen_add_to_stack_pointer(16),o.__wbindgen_free(_,t,1)}}decrypt(_){try{const r=o.__wbindgen_add_to_stack_pointer(-16);T(_,m_),o.recordciphertext_decrypt(r,this.__wbg_ptr,_.__wbg_ptr);var t=P()[r/4+0],e=P()[r/4+1];if(P()[r/4+2])throw w(e);return w_.__wrap(t)}finally{o.__wbindgen_add_to_stack_pointer(16)}}isOwner(_){T(_,m_);return 0!==o.recordciphertext_isOwner(this.__wbg_ptr,_.__wbg_ptr)}};const g_="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((_=>o.__wbg_recordplaintext_free(_>>>0)));let w_=class _{static __wrap(t){t>>>=0;const e=Object.create(_.prototype);return e.__wbg_ptr=t,g_.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,g_.unregister(this),_}free(){const _=this.__destroy_into_raw();o.__wbg_recordplaintext_free(_)}commitment(_,t){try{const n=o.__wbindgen_add_to_stack_pointer(-16),i=h(_,o.__wbindgen_malloc,o.__wbindgen_realloc),a=p,s=h(t,o.__wbindgen_malloc,o.__wbindgen_realloc),c=p;o.recordplaintext_commitment(n,this.__wbg_ptr,i,a,s,c);var e=P()[n/4+0],r=P()[n/4+1];if(P()[n/4+2])throw w(r);return N.__wrap(e)}finally{o.__wbindgen_add_to_stack_pointer(16)}}static fromString(t){try{const n=o.__wbindgen_add_to_stack_pointer(-16),i=h(t,o.__wbindgen_malloc,o.__wbindgen_realloc),a=p;o.recordplaintext_fromString(n,i,a);var e=P()[n/4+0],r=P()[n/4+1];if(P()[n/4+2])throw w(r);return _.__wrap(e)}finally{o.__wbindgen_add_to_stack_pointer(16)}}toString(){let _,t;try{const n=o.__wbindgen_add_to_stack_pointer(-16);o.recordplaintext_toString(n,this.__wbg_ptr);var e=P()[n/4+0],r=P()[n/4+1];return _=e,t=r,u(e,r)}finally{o.__wbindgen_add_to_stack_pointer(16),o.__wbindgen_free(_,t,1)}}microcredits(){const _=o.recordplaintext_microcredits(this.__wbg_ptr);return BigInt.asUintN(64,_)}nonce(){let _,t;try{const n=o.__wbindgen_add_to_stack_pointer(-16);o.recordplaintext_nonce(n,this.__wbg_ptr);var e=P()[n/4+0],r=P()[n/4+1];return _=e,t=r,u(e,r)}finally{o.__wbindgen_add_to_stack_pointer(16),o.__wbindgen_free(_,t,1)}}serialNumberString(_,t,e){let r,n;try{const b=o.__wbindgen_add_to_stack_pointer(-16);T(_,G);const l=h(t,o.__wbindgen_malloc,o.__wbindgen_realloc),f=p,y=h(e,o.__wbindgen_malloc,o.__wbindgen_realloc),m=p;o.recordplaintext_serialNumberString(b,this.__wbg_ptr,_.__wbg_ptr,l,f,y,m);var i=P()[b/4+0],a=P()[b/4+1],s=P()[b/4+2],c=P()[b/4+3],g=i,d=a;if(c)throw g=0,d=0,w(s);return r=g,n=d,u(g,d)}finally{o.__wbindgen_add_to_stack_pointer(16),o.__wbindgen_free(r,n,1)}}};const d_="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((_=>o.__wbg_signature_free(_>>>0)));let b_=class _{static __wrap(t){t>>>=0;const e=Object.create(_.prototype);return e.__wbg_ptr=t,d_.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,d_.unregister(this),_}free(){const _=this.__destroy_into_raw();o.__wbg_signature_free(_)}static sign(t,e){T(t,G);const r=R(e,o.__wbindgen_malloc),n=p,i=o.privatekey_sign(t.__wbg_ptr,r,n);return _.__wrap(i)}verify(_,t){T(_,U);const e=R(t,o.__wbindgen_malloc),r=p;return 0!==o.signature_verify(this.__wbg_ptr,_.__wbg_ptr,e,r)}static from_string(t){const e=h(t,o.__wbindgen_malloc,o.__wbindgen_realloc),r=p,n=o.signature_from_string(e,r);return _.__wrap(n)}to_string(){let _,t;try{const n=o.__wbindgen_add_to_stack_pointer(-16);o.signature_to_string(n,this.__wbg_ptr);var e=P()[n/4+0],r=P()[n/4+1];return _=e,t=r,u(e,r)}finally{o.__wbindgen_add_to_stack_pointer(16),o.__wbindgen_free(_,t,1)}}};const l_="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((_=>o.__wbg_transaction_free(_>>>0)));let u_=class _{static __wrap(t){t>>>=0;const e=Object.create(_.prototype);return e.__wbg_ptr=t,l_.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,l_.unregister(this),_}free(){const _=this.__destroy_into_raw();o.__wbg_transaction_free(_)}static fromString(t){try{const n=o.__wbindgen_add_to_stack_pointer(-16),i=h(t,o.__wbindgen_malloc,o.__wbindgen_realloc),a=p;o.transaction_fromString(n,i,a);var e=P()[n/4+0],r=P()[n/4+1];if(P()[n/4+2])throw w(r);return _.__wrap(e)}finally{o.__wbindgen_add_to_stack_pointer(16)}}toString(){let _,t;try{const n=o.__wbindgen_add_to_stack_pointer(-16);o.transaction_toString(n,this.__wbg_ptr);var e=P()[n/4+0],r=P()[n/4+1];return _=e,t=r,u(e,r)}finally{o.__wbindgen_add_to_stack_pointer(16),o.__wbindgen_free(_,t,1)}}transactionId(){let _,t;try{const n=o.__wbindgen_add_to_stack_pointer(-16);o.transaction_transactionId(n,this.__wbg_ptr);var e=P()[n/4+0],r=P()[n/4+1];return _=e,t=r,u(e,r)}finally{o.__wbindgen_add_to_stack_pointer(16),o.__wbindgen_free(_,t,1)}}transactionType(){let _,t;try{const n=o.__wbindgen_add_to_stack_pointer(-16);o.transaction_transactionType(n,this.__wbg_ptr);var e=P()[n/4+0],r=P()[n/4+1];return _=e,t=r,u(e,r)}finally{o.__wbindgen_add_to_stack_pointer(16),o.__wbindgen_free(_,t,1)}}};const f_="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((_=>o.__wbg_verifyingkey_free(_>>>0)));let p_=class _{static __wrap(t){t>>>=0;const e=Object.create(_.prototype);return e.__wbg_ptr=t,f_.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,f_.unregister(this),_}free(){const _=this.__destroy_into_raw();o.__wbg_verifyingkey_free(_)}static bondPublicVerifier(){const t=o.verifyingkey_bondPublicVerifier();return _.__wrap(t)}static bondValidatorVerifier(){const t=o.verifyingkey_bondValidatorVerifier();return _.__wrap(t)}static claimUnbondPublicVerifier(){const t=o.verifyingkey_claimUnbondPublicVerifier();return _.__wrap(t)}static feePrivateVerifier(){const t=o.verifyingkey_feePrivateVerifier();return _.__wrap(t)}static feePublicVerifier(){const t=o.verifyingkey_feePublicVerifier();return _.__wrap(t)}static inclusionVerifier(){const t=o.verifyingkey_inclusionVerifier();return _.__wrap(t)}static joinVerifier(){const t=o.verifyingkey_joinVerifier();return _.__wrap(t)}static setValidatorStateVerifier(){const t=o.verifyingkey_setValidatorStateVerifier();return _.__wrap(t)}static splitVerifier(){const t=o.verifyingkey_splitVerifier();return _.__wrap(t)}static transferPrivateVerifier(){const t=o.verifyingkey_transferPrivateVerifier();return _.__wrap(t)}static transferPrivateToPublicVerifier(){const t=o.verifyingkey_transferPrivateToPublicVerifier();return _.__wrap(t)}static transferPublicVerifier(){const t=o.verifyingkey_transferPublicVerifier();return _.__wrap(t)}static transferPublicAsSignerVerifier(){const t=o.verifyingkey_transferPublicAsSignerVerifier();return _.__wrap(t)}static transferPublicToPrivateVerifier(){const t=o.verifyingkey_transferPublicToPrivateVerifier();return _.__wrap(t)}static unbondPublicVerifier(){const t=o.verifyingkey_unbondPublicVerifier();return _.__wrap(t)}isBondPublicVerifier(){return 0!==o.verifyingkey_isBondPublicVerifier(this.__wbg_ptr)}isBondValidatorVerifier(){return 0!==o.verifyingkey_isBondValidatorVerifier(this.__wbg_ptr)}isClaimUnbondPublicVerifier(){return 0!==o.verifyingkey_isClaimUnbondPublicVerifier(this.__wbg_ptr)}isFeePrivateVerifier(){return 0!==o.verifyingkey_isFeePrivateVerifier(this.__wbg_ptr)}isFeePublicVerifier(){return 0!==o.verifyingkey_isFeePublicVerifier(this.__wbg_ptr)}isInclusionVerifier(){return 0!==o.verifyingkey_isInclusionVerifier(this.__wbg_ptr)}isJoinVerifier(){return 0!==o.verifyingkey_isJoinVerifier(this.__wbg_ptr)}isSetValidatorStateVerifier(){return 0!==o.verifyingkey_isSetValidatorStateVerifier(this.__wbg_ptr)}isSplitVerifier(){return 0!==o.verifyingkey_isSplitVerifier(this.__wbg_ptr)}isTransferPrivateVerifier(){return 0!==o.verifyingkey_isTransferPrivateVerifier(this.__wbg_ptr)}isTransferPrivateToPublicVerifier(){return 0!==o.verifyingkey_isTransferPrivateToPublicVerifier(this.__wbg_ptr)}isTransferPublicVerifier(){return 0!==o.verifyingkey_isTransferPublicVerifier(this.__wbg_ptr)}isTransferPublicAsSignerVerifier(){return 0!==o.verifyingkey_isTransferPublicAsSignerVerifier(this.__wbg_ptr)}isTransferPublicToPrivateVerifier(){return 0!==o.verifyingkey_isTransferPublicToPrivateVerifier(this.__wbg_ptr)}isUnbondPublicVerifier(){return 0!==o.verifyingkey_isUnbondPublicVerifier(this.__wbg_ptr)}checksum(){let _,t;try{const n=o.__wbindgen_add_to_stack_pointer(-16);o.verifyingkey_checksum(n,this.__wbg_ptr);var e=P()[n/4+0],r=P()[n/4+1];return _=e,t=r,u(e,r)}finally{o.__wbindgen_add_to_stack_pointer(16),o.__wbindgen_free(_,t,1)}}copy(){const t=o.verifyingkey_copy(this.__wbg_ptr);return _.__wrap(t)}static fromBytes(t){try{const n=o.__wbindgen_add_to_stack_pointer(-16),i=R(t,o.__wbindgen_malloc),a=p;o.verifyingkey_fromBytes(n,i,a);var e=P()[n/4+0],r=P()[n/4+1];if(P()[n/4+2])throw w(r);return _.__wrap(e)}finally{o.__wbindgen_add_to_stack_pointer(16)}}static fromString(t){try{const n=o.__wbindgen_add_to_stack_pointer(-16),i=h(t,o.__wbindgen_malloc,o.__wbindgen_realloc),a=p;o.verifyingkey_fromString(n,i,a);var e=P()[n/4+0],r=P()[n/4+1];if(P()[n/4+2])throw w(r);return _.__wrap(e)}finally{o.__wbindgen_add_to_stack_pointer(16)}}toBytes(){try{const n=o.__wbindgen_add_to_stack_pointer(-16);o.verifyingkey_toBytes(n,this.__wbg_ptr);var _=P()[n/4+0],t=P()[n/4+1],e=P()[n/4+2];if(P()[n/4+3])throw w(e);var r=j(_,t).slice();return o.__wbindgen_free(_,1*t,1),r}finally{o.__wbindgen_add_to_stack_pointer(16)}}toString(){let _,t;try{const n=o.__wbindgen_add_to_stack_pointer(-16);o.verifyingkey_toString(n,this.__wbg_ptr);var e=P()[n/4+0],r=P()[n/4+1];return _=e,t=r,u(e,r)}finally{o.__wbindgen_add_to_stack_pointer(16),o.__wbindgen_free(_,t,1)}}};const y_="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((_=>o.__wbg_viewkey_free(_>>>0)));let m_=class _{static __wrap(t){t>>>=0;const e=Object.create(_.prototype);return e.__wbg_ptr=t,y_.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,y_.unregister(this),_}free(){const _=this.__destroy_into_raw();o.__wbg_viewkey_free(_)}static from_private_key(t){T(t,G);const e=o.privatekey_to_view_key(t.__wbg_ptr);return _.__wrap(e)}static from_string(t){const e=h(t,o.__wbindgen_malloc,o.__wbindgen_realloc),r=p,n=o.viewkey_from_string(e,r);return _.__wrap(n)}to_string(){let _,t;try{const n=o.__wbindgen_add_to_stack_pointer(-16);o.viewkey_to_string(n,this.__wbg_ptr);var e=P()[n/4+0],r=P()[n/4+1];return _=e,t=r,u(e,r)}finally{o.__wbindgen_add_to_stack_pointer(16),o.__wbindgen_free(_,t,1)}}to_address(){const _=o.address_from_view_key(this.__wbg_ptr);return U.__wrap(_)}decrypt(_){let t,e;try{const g=o.__wbindgen_add_to_stack_pointer(-16),d=h(_,o.__wbindgen_malloc,o.__wbindgen_realloc),b=p;o.viewkey_decrypt(g,this.__wbg_ptr,d,b);var r=P()[g/4+0],n=P()[g/4+1],i=P()[g/4+2],a=P()[g/4+3],s=r,c=n;if(a)throw s=0,c=0,w(i);return t=s,e=c,u(s,c)}finally{o.__wbindgen_add_to_stack_pointer(16),o.__wbindgen_free(t,e,1)}}};async function h_(_,t){if("function"==typeof Response&&_ instanceof Response){if("function"==typeof WebAssembly.instantiateStreaming)try{return await WebAssembly.instantiateStreaming(_,t)}catch(t){if("application/wasm"==_.headers.get("Content-Type"))throw t;console.warn("`WebAssembly.instantiateStreaming` failed because your server does not serve wasm with `application/wasm` MIME type. Falling back to `WebAssembly.instantiate` which is slower. Original error:\n",t)}const e=await _.arrayBuffer();return await WebAssembly.instantiate(e,t)}{const e=await WebAssembly.instantiate(_,t);return e instanceof WebAssembly.Instance?{instance:e,module:_}:e}}function v_(){const _={wbg:{}};return _.wbg.__wbindgen_object_drop_ref=function(_){w(_)},_.wbg.__wbg_new_71801a555ad9f2aa=function(){return E((function(){return f(new XMLHttpRequest)}),arguments)},_.wbg.__wbg_overrideMimeType_ee9c51919ceb418b=function(){return E((function(_,t,e){s(_).overrideMimeType(u(t,e))}),arguments)},_.wbg.__wbg_open_c9eb0cf2c9d95679=function(){return E((function(_,t,e,r,n,i){s(_).open(u(t,e),u(r,n),0!==i)}),arguments)},_.wbg.__wbg_send_80d29985093c1ec5=function(){return E((function(_){s(_).send()}),arguments)},_.wbg.__wbg_response_7c2e2759084f7279=function(){return E((function(_){return f(s(_).response)}),arguments)},_.wbg.__wbg_status_d485fb5a478426fb=function(){return E((function(_){return s(_).status}),arguments)},_.wbg.__wbg_new_72fb9a18b5ae2624=function(){return f(new Object)},_.wbg.__wbindgen_string_new=function(_,t){return f(u(_,t))},_.wbg.__wbg_set_1f9b04f170055d33=function(){return E((function(_,t,e){return Reflect.set(s(_),s(t),s(e))}),arguments)},_.wbg.__wbg_new_ab6fd82b10560829=function(){return E((function(){return f(new Headers)}),arguments)},_.wbg.__wbindgen_object_clone_ref=function(_){return f(s(_))},_.wbg.__wbg_new_0d76b0581eca6298=function(){return E((function(){return f(new AbortController)}),arguments)},_.wbg.__wbg_signal_a61f78a3478fd9bc=function(_){return f(s(_).signal)},_.wbg.__wbg_append_7bfcb4937d1d5e29=function(){return E((function(_,t,e,r,n){s(_).append(u(t,e),u(r,n))}),arguments)},_.wbg.__wbg_instanceof_Response_849eb93e75734b6e=function(_){let t;try{t=s(_)instanceof Response}catch(_){t=!1}return t},_.wbg.__wbg_status_61a01141acd3cf74=function(_){return s(_).status},_.wbg.__wbg_url_5f6dc4009ac5f99d=function(_,t){const e=h(s(t).url,o.__wbindgen_malloc,o.__wbindgen_realloc),r=p;P()[_/4+1]=r,P()[_/4+0]=e},_.wbg.__wbg_headers_9620bfada380764a=function(_){return f(s(_).headers)},_.wbg.__wbg_iterator_2cee6dadfd956dfa=function(){return f(Symbol.iterator)},_.wbg.__wbg_get_e3c254076557e348=function(){return E((function(_,t){return f(Reflect.get(s(_),s(t)))}),arguments)},_.wbg.__wbindgen_is_function=function(_){return"function"==typeof s(_)},_.wbg.__wbg_call_27c0f87801dedf93=function(){return E((function(_,t){return f(s(_).call(s(t)))}),arguments)},_.wbg.__wbindgen_is_object=function(_){const t=s(_);return"object"==typeof t&&null!==t},_.wbg.__wbg_next_40fc327bfc8770e6=function(_){return f(s(_).next)},_.wbg.__wbg_next_196c84450b364254=function(){return E((function(_){return f(s(_).next())}),arguments)},_.wbg.__wbg_done_298b57d23c0fc80c=function(_){return s(_).done},_.wbg.__wbg_value_d93c65011f51a456=function(_){return f(s(_).value)},_.wbg.__wbg_abort_2aa7521d5690750e=function(_){s(_).abort()},_.wbg.__wbg_stringify_8887fe74e1c50d81=function(){return E((function(_){return f(JSON.stringify(s(_)))}),arguments)},_.wbg.__wbindgen_string_get=function(_,t){const e=s(t),r="string"==typeof e?e:void 0;var n=v(r)?0:h(r,o.__wbindgen_malloc,o.__wbindgen_realloc),i=p;P()[_/4+1]=i,P()[_/4+0]=n},_.wbg.__wbg_log_0159ca40cddf5b15=function(_,t){console.log(u(_,t))},_.wbg.__wbindgen_bigint_from_u64=function(_){return f(BigInt.asUintN(64,_))},_.wbg.__wbg_call_b3ca7c6051f9bec1=function(){return E((function(_,t,e){return f(s(_).call(s(t),s(e)))}),arguments)},_.wbg.__wbg_transaction_new=function(_){return f(u_.__wrap(_))},_.wbg.__wbg_keypair_new=function(_){return f(L.__wrap(_))},_.wbg.__wbindgen_module=function(){return f(x_.__wbindgen_wasm_module)},_.wbg.__wbindgen_memory=function(){return f(o.memory)},_.wbg.__wbg_spawnWorker_f6acaddb2e29dc4a=function(_,t,e,r){return f(i(s(_),s(t),s(e),r>>>0))},_.wbg.__wbg_executionresponse_new=function(_){return f($.__wrap(_))},_.wbg.__wbg_newwithlength_66ae46612e7f0234=function(_){return f(new Array(_>>>0))},_.wbg.__wbg_set_d4638f722068f043=function(_,t,e){s(_)[t>>>0]=w(e)},_.wbg.__wbindgen_cb_drop=function(_){const t=w(_).original;if(1==t.cnt--)return t.a=0,!0;return!1},_.wbg.__wbg_new_16b304a2cfa7ff4a=function(){return f(new Array)},_.wbg.__wbg_push_a5b05aedc7234f9f=function(_,t){return s(_).push(s(t))},_.wbg.__wbg_arrayBuffer_29931d52c7206b02=function(){return E((function(_){return f(s(_).arrayBuffer())}),arguments)},_.wbg.__wbg_new_63b92bc8671ed464=function(_){return f(new Uint8Array(s(_)))},_.wbg.__wbg_length_c20a40f15020d68a=function(_){return s(_).length},_.wbg.__wbg_new_81740750da40724f=function(_,t){try{var e={a:_,b:t};const r=new Promise(((_,t)=>{const r=e.a;e.a=0;try{return M(r,e.b,_,t)}finally{e.a=r}}));return f(r)}finally{e.a=e.b=0}},_.wbg.__wbindgen_number_new=function(_){return f(_)},_.wbg.__wbg_new_abda76e883ba8a5f=function(){return f(new Error)},_.wbg.__wbg_stack_658279fe44541cf6=function(_,t){const e=h(s(t).stack,o.__wbindgen_malloc,o.__wbindgen_realloc),r=p;P()[_/4+1]=r,P()[_/4+0]=e},_.wbg.__wbg_error_f851667af71bcfc6=function(_,t){let e,r;try{e=_,r=t,console.error(u(_,t))}finally{o.__wbindgen_free(e,r,1)}},_.wbg.__wbg_buffer_12d079cc21e14bdb=function(_){return f(s(_).buffer)},_.wbg.__wbg_newwithbyteoffsetandlength_aa4a17c33a06e5cb=function(_,t,e){return f(new Uint8Array(s(_),t>>>0,e>>>0))},_.wbg.__wbg_randomFillSync_5c9c955aa56b6049=function(){return E((function(_,t){s(_).randomFillSync(w(t))}),arguments)},_.wbg.__wbg_subarray_a1f73cd4b5b42fe1=function(_,t,e){return f(s(_).subarray(t>>>0,e>>>0))},_.wbg.__wbg_getRandomValues_3aa56aa6edec874c=function(){return E((function(_,t){s(_).getRandomValues(s(t))}),arguments)},_.wbg.__wbg_set_a47bac70306a19a7=function(_,t,e){s(_).set(s(t),e>>>0)},_.wbg.__wbg_crypto_1d1f22824a6a080c=function(_){return f(s(_).crypto)},_.wbg.__wbg_process_4a72847cc503995b=function(_){return f(s(_).process)},_.wbg.__wbg_versions_f686565e586dd935=function(_){return f(s(_).versions)},_.wbg.__wbg_node_104a2ff8d6ea03a2=function(_){return f(s(_).node)},_.wbg.__wbindgen_is_string=function(_){return"string"==typeof s(_)},_.wbg.__wbg_require_cca90b1a94a0255b=function(){return E((function(){return f(module.require)}),arguments)},_.wbg.__wbg_msCrypto_eb05e62b530a1508=function(_){return f(s(_).msCrypto)},_.wbg.__wbg_newwithlength_e9b4878cebadb3d3=function(_){return f(new Uint8Array(_>>>0))},_.wbg.__wbg_length_cd7af8117672b8b8=function(_){return s(_).length},_.wbg.__wbg_get_bd8e338fbd5f5cc8=function(_,t){return f(s(_)[t>>>0])},_.wbg.__wbg_self_ce0dbfc45cf2f5be=function(){return E((function(){return f(self.self)}),arguments)},_.wbg.__wbg_window_c6fb939a7f436783=function(){return E((function(){return f(window.window)}),arguments)},_.wbg.__wbg_globalThis_d1e6af4856ba331b=function(){return E((function(){return f(globalThis.globalThis)}),arguments)},_.wbg.__wbg_global_207b558942527489=function(){return E((function(){return f(global.global)}),arguments)},_.wbg.__wbindgen_is_undefined=function(_){return void 0===s(_)},_.wbg.__wbg_newnoargs_e258087cd0daa0ea=function(_,t){return f(new Function(u(_,t)))},_.wbg.__wbg_has_0af94d20077affa2=function(){return E((function(_,t){return Reflect.has(s(_),s(t))}),arguments)},_.wbg.__wbg_fetch_bc7c8e27076a5c84=function(_){return f(fetch(s(_)))},_.wbg.__wbg_fetch_921fad6ef9e883dd=function(_,t){return f(s(_).fetch(s(t)))},_.wbg.__wbindgen_debug_string=function(_,t){const e=h(S(s(t)),o.__wbindgen_malloc,o.__wbindgen_realloc),r=p;P()[_/4+1]=r,P()[_/4+0]=e},_.wbg.__wbindgen_throw=function(_,t){throw new Error(u(_,t))},_.wbg.__wbindgen_rethrow=function(_){throw w(_)},_.wbg.__wbg_then_a73caa9a87991566=function(_,t,e){return f(s(_).then(s(t),s(e)))},_.wbg.__wbg_then_0c86a60e8fcfe9f6=function(_,t){return f(s(_).then(s(t)))},_.wbg.__wbg_queueMicrotask_481971b0d87f3dd4=function(_){queueMicrotask(s(_))},_.wbg.__wbg_queueMicrotask_3cbae2ec6b6cd3d6=function(_){return f(s(_).queueMicrotask)},_.wbg.__wbg_resolve_b0083a7967828ec8=function(_){return f(Promise.resolve(s(_)))},_.wbg.__wbg_waitAsync_5d743fc9058ba01a=function(){return f(Atomics.waitAsync)},_.wbg.__wbg_new_8cccba86b0f574cb=function(_){return f(new Int32Array(s(_)))},_.wbg.__wbg_waitAsync_46d5c36955b71a79=function(_,t,e){return f(Atomics.waitAsync(s(_),t,e))},_.wbg.__wbg_async_19c0400d97cc72fe=function(_){return s(_).async},_.wbg.__wbg_value_571d60108110e917=function(_){return f(s(_).value)},_.wbg.__wbindgen_link_fc1eedd35dc7e0a6=function(_){const t=h("data:application/javascript,"+encodeURIComponent("onmessage = function (ev) {\n let [ia, index, value] = ev.data;\n ia = new Int32Array(ia.buffer);\n let result = Atomics.wait(ia, index, value);\n postMessage(result);\n };\n "),o.__wbindgen_malloc,o.__wbindgen_realloc),e=p;P()[_/4+1]=e,P()[_/4+0]=t},_.wbg.__wbg_new_d1187ae36d662ef9=function(){return E((function(_,t){return f(new Worker(u(_,t)))}),arguments)},_.wbg.__wbg_setonmessage_503809e5bb51bd33=function(_,t){s(_).onmessage=s(t)},_.wbg.__wbg_of_6a70eed8d41f469c=function(_,t,e){return f(Array.of(s(_),s(t),s(e)))},_.wbg.__wbg_postMessage_7380d10e8b8269df=function(){return E((function(_,t){s(_).postMessage(s(t))}),arguments)},_.wbg.__wbg_data_3ce7c145ca4fbcdc=function(_){return f(s(_).data)},_.wbg.__wbg_newwithstrandinit_3fd6fba4083ff2d0=function(){return E((function(_,t,e){return f(new Request(u(_,t),s(e)))}),arguments)},_.wbg.__wbg_responseText_c67ed2d48db10769=function(){return E((function(_,t){const e=s(t).responseText;var r=v(e)?0:h(e,o.__wbindgen_malloc,o.__wbindgen_realloc),n=p;P()[_/4+1]=n,P()[_/4+0]=r}),arguments)},_.wbg.__wbindgen_closure_wrapper5837=function(_,t,e){return f(V(_,t,538,F))},_.wbg.__wbindgen_closure_wrapper5862=function(_,t,e){return f(V(_,t,538,F))},_}function k_(_,t){_.wbg.memory=t||new WebAssembly.Memory({initial:25,maximum:65536,shared:!0})}function P_(_,t){return o=_.exports,x_.__wbindgen_wasm_module=t,A=null,k=null,b=null,o.__wbindgen_start(),o}function S_(_,t){if(void 0!==o)return o;const e=v_();k_(e,t),_ instanceof WebAssembly.Module||(_=new WebAssembly.Module(_));return P_(new WebAssembly.Instance(_,e),_)}async function x_(_,t){if(void 0!==o)return o;const e=v_();("string"==typeof _||"function"==typeof Request&&_ instanceof Request||"function"==typeof URL&&_ instanceof URL)&&(_=fetch(_)),k_(e,t);const{instance:r,module:n}=await h_(await _,e);return P_(r,n)}var n=Object.freeze({__proto__:null,Address:U,Execution:q,ExecutionResponse:$,Field:N,KeyPair:L,Metadata:Z,OfflineQuery:X,PrivateKey:G,PrivateKeyCiphertext:t_,Program:r_,ProgramManager:i_,ProvingKey:a_,RecordCiphertext:c_,RecordPlaintext:w_,Signature:b_,Transaction:u_,VerifyingKey:p_,ViewKey:m_,default:x_,initSync:S_,initThreadPool:C,runRayonThread:K,verifyFunctionExecution:z});const V_="assets/aleo_wasm.wasm";const{initThreadPool:F_,Address:T_,Execution:R_,ExecutionResponse:z_,Field:A_,Metadata:O_,OfflineQuery:j_,Private:K_,PrivateKey:C_,PrivateKeyCiphertext:E_,Program:M_,ProvingKey:B_,RecordCiphertext:U_,RecordPlaintext:I_,ProgramManager:q_,Signature:W_,Transaction:$_,ViewKey:D_,VerifyingKey:N_,verifyFunctionExecution:J_}=await(async(_={})=>{let{importHook:t,serverPath:e,initializeHook:r}=_,i=V_;return null!=e&&(i=e+/[^\/\\]*$/.exec(i)[0]),null!=t&&(i=t(i)),null!=r?await r(x_,i):await x_(i),n})({importHook:()=>new URL(e(81),e.b)});async function L_(_){null==_&&(_=navigator.hardwareConcurrency),console.info(`Spawning ${_} threads`),await F_(new URL(e(977),e.b),_)}r()}catch(H_){r(H_)}}),1)}}]); -//# sourceMappingURL=258.bundle.js.map \ No newline at end of file diff --git a/258.bundle.js.map b/258.bundle.js.map deleted file mode 100644 index a362a5cd4..000000000 --- a/258.bundle.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"258.bundle.js","mappings":"wOAAA,SAASA,EAAYC,EAAKC,EAAQC,EAAQC,GAClC,OAAO,IAAIC,SAASC,IAChB,MAAMC,EAAS,IAAIC,OAAOP,EAAK,CAC3BQ,KAAM,WAGVF,EAAOG,iBAAiB,WAAYC,IAGhCC,YAAW,KACPN,EAAQC,GAIJA,EAAOM,OACPN,EAAOM,OAC/B,GACmB,EAAE,GACN,CACCC,SAAS,EACTC,MAAM,IAGVR,EAAOS,YAAY,CACfd,SACAC,SACAC,WACF,GAEd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ACjBmB,GAAK,SACLgB,GAAQ,aACRgD,GAAY,QACZ8e,GAAO,WACPje,GAAU,qBACVyB,GAAoB,QACpBQ,GAAO,WACP6F,GAAU,iBACV8C,GAAgB,gBAChBU,GAAe,eACfqS,GAAc,UACdrR,GAAS,YACTM,GAAW,QACX+E,GAAO,aACPrE,GAAY,wBACZ/W,SD26IoB0b,OAAOiM,EAAM,CAAC,KACtB,IAAI,WAACC,EAAU,WAAEC,EAAU,eAAEC,GAAkBH,EAE3CI,EAAaP,GAiBjB,OAfkB,MAAdK,IACAE,EAAaF,EAAa,YAAY7qB,KAAK+qB,GAAY,IAGzC,MAAdH,IACAG,EAAaH,EAAWG,IAGN,MAAlBD,QACMA,EAAe3H,GAAY4H,SAG3B5H,GAAW4H,GAGdpB,CAAO,EC97IpBqB,CAAK,CACXJ,WAAYA,IACD,IAAIZ,IAAI,aAIvBtL,eAAe9a,GAAeqnB,GACX,MAAXA,IACAA,EAAUC,UAAUC,qBAGxBnM,QAAQoM,KAAK,YAAYH,mBAEnBR,GAAmB,IAAIT,IAAI,YAA+BiB,EACpE,C","sources":["webpack://aleo-website/wasm.js","webpack://aleo-website/../js/index.js"],"sourcesContent":["function spawnWorker(url, module, memory, address) {\n return new Promise((resolve) => {\n const worker = new Worker(url, {\n type: \"module\",\n });\n\n worker.addEventListener(\"message\", (event) => {\n // This is needed in Node to wait one extra tick, so that way\n // the Worker can fully initialize before we return.\n setTimeout(() => {\n resolve(worker);\n\n // When running in Node, this allows the process to exit\n // even though the Worker is still running.\n if (worker.unref) {\n worker.unref();\n }\n }, 0);\n }, {\n capture: true,\n once: true,\n });\n\n worker.postMessage({\n module,\n memory,\n address,\n });\n });\n }\n\nlet wasm;\n\nconst heap = new Array(128).fill(undefined);\n\nheap.push(undefined, null, true, false);\n\nfunction getObject(idx) { return heap[idx]; }\n\nlet heap_next = heap.length;\n\nfunction dropObject(idx) {\n if (idx < 132) return;\n heap[idx] = heap_next;\n heap_next = idx;\n}\n\nfunction takeObject(idx) {\n const ret = getObject(idx);\n dropObject(idx);\n return ret;\n}\n\nconst cachedTextDecoder = (typeof TextDecoder !== 'undefined' ? new TextDecoder('utf-8', { ignoreBOM: true, fatal: true }) : { decode: () => { throw Error('TextDecoder not available') } } );\n\nif (typeof TextDecoder !== 'undefined') { cachedTextDecoder.decode(); }\nlet cachedUint8Memory0 = null;\n\nfunction getUint8Memory0() {\n if (cachedUint8Memory0 === null || cachedUint8Memory0.buffer !== wasm.memory.buffer) {\n cachedUint8Memory0 = new Uint8Array(wasm.memory.buffer);\n }\n return cachedUint8Memory0;\n}\n\nfunction getStringFromWasm0(ptr, len) {\n ptr = ptr >>> 0;\n return cachedTextDecoder.decode(getUint8Memory0().slice(ptr, ptr + len));\n}\n\nfunction addHeapObject(obj) {\n if (heap_next === heap.length) heap.push(heap.length + 1);\n const idx = heap_next;\n heap_next = heap[idx];\n\n heap[idx] = obj;\n return idx;\n}\n\nlet WASM_VECTOR_LEN = 0;\n\nconst cachedTextEncoder = (typeof TextEncoder !== 'undefined' ? new TextEncoder('utf-8') : { encode: () => { throw Error('TextEncoder not available') } } );\n\nconst encodeString = function (arg, view) {\n const buf = cachedTextEncoder.encode(arg);\n view.set(buf);\n return {\n read: arg.length,\n written: buf.length\n };\n};\n\nfunction passStringToWasm0(arg, malloc, realloc) {\n\n if (realloc === undefined) {\n const buf = cachedTextEncoder.encode(arg);\n const ptr = malloc(buf.length, 1) >>> 0;\n getUint8Memory0().subarray(ptr, ptr + buf.length).set(buf);\n WASM_VECTOR_LEN = buf.length;\n return ptr;\n }\n\n let len = arg.length;\n let ptr = malloc(len, 1) >>> 0;\n\n const mem = getUint8Memory0();\n\n let offset = 0;\n\n for (; offset < len; offset++) {\n const code = arg.charCodeAt(offset);\n if (code > 0x7F) break;\n mem[ptr + offset] = code;\n }\n\n if (offset !== len) {\n if (offset !== 0) {\n arg = arg.slice(offset);\n }\n ptr = realloc(ptr, len, len = offset + arg.length * 3, 1) >>> 0;\n const view = getUint8Memory0().subarray(ptr + offset, ptr + len);\n const ret = encodeString(arg, view);\n\n offset += ret.written;\n ptr = realloc(ptr, len, offset, 1) >>> 0;\n }\n\n WASM_VECTOR_LEN = offset;\n return ptr;\n}\n\nfunction isLikeNone(x) {\n return x === undefined || x === null;\n}\n\nlet cachedInt32Memory0 = null;\n\nfunction getInt32Memory0() {\n if (cachedInt32Memory0 === null || cachedInt32Memory0.buffer !== wasm.memory.buffer) {\n cachedInt32Memory0 = new Int32Array(wasm.memory.buffer);\n }\n return cachedInt32Memory0;\n}\n\nfunction debugString(val) {\n // primitive types\n const type = typeof val;\n if (type == 'number' || type == 'boolean' || val == null) {\n return `${val}`;\n }\n if (type == 'string') {\n return `\"${val}\"`;\n }\n if (type == 'symbol') {\n const description = val.description;\n if (description == null) {\n return 'Symbol';\n } else {\n return `Symbol(${description})`;\n }\n }\n if (type == 'function') {\n const name = val.name;\n if (typeof name == 'string' && name.length > 0) {\n return `Function(${name})`;\n } else {\n return 'Function';\n }\n }\n // objects\n if (Array.isArray(val)) {\n const length = val.length;\n let debug = '[';\n if (length > 0) {\n debug += debugString(val[0]);\n }\n for(let i = 1; i < length; i++) {\n debug += ', ' + debugString(val[i]);\n }\n debug += ']';\n return debug;\n }\n // Test for built-in\n const builtInMatches = /\\[object ([^\\]]+)\\]/.exec(toString.call(val));\n let className;\n if (builtInMatches.length > 1) {\n className = builtInMatches[1];\n } else {\n // Failed to match the standard '[object ClassName]'\n return toString.call(val);\n }\n if (className == 'Object') {\n // we're a user defined class or Object\n // JSON.stringify avoids problems with cycles, and is generally much\n // easier than looping through ownProperties of `val`.\n try {\n return 'Object(' + JSON.stringify(val) + ')';\n } catch (_) {\n return 'Object';\n }\n }\n // errors\n if (val instanceof Error) {\n return `${val.name}: ${val.message}\\n${val.stack}`;\n }\n // TODO we could test for more things here, like `Set`s and `Map`s.\n return className;\n}\n\nconst CLOSURE_DTORS = (typeof FinalizationRegistry === 'undefined')\n ? { register: () => {}, unregister: () => {} }\n : new FinalizationRegistry(state => {\n wasm.__wbindgen_export_3.get(state.dtor)(state.a, state.b);\n});\n\nfunction makeMutClosure(arg0, arg1, dtor, f) {\n const state = { a: arg0, b: arg1, cnt: 1, dtor };\n const real = (...args) => {\n // First up with a closure we increment the internal reference\n // count. This ensures that the Rust closure environment won't\n // be deallocated while we're invoking it.\n state.cnt++;\n const a = state.a;\n state.a = 0;\n try {\n return f(a, state.b, ...args);\n } finally {\n if (--state.cnt === 0) {\n wasm.__wbindgen_export_3.get(state.dtor)(a, state.b);\n CLOSURE_DTORS.unregister(state);\n } else {\n state.a = a;\n }\n }\n };\n real.original = state;\n CLOSURE_DTORS.register(real, state, state);\n return real;\n}\nfunction __wbg_adapter_34(arg0, arg1, arg2) {\n wasm._dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h467700a9696faab3(arg0, arg1, addHeapObject(arg2));\n}\n\nfunction _assertClass(instance, klass) {\n if (!(instance instanceof klass)) {\n throw new Error(`expected instance of ${klass.name}`);\n }\n return instance.ptr;\n}\n\nfunction passArray8ToWasm0(arg, malloc) {\n const ptr = malloc(arg.length * 1, 1) >>> 0;\n getUint8Memory0().set(arg, ptr / 1);\n WASM_VECTOR_LEN = arg.length;\n return ptr;\n}\n/**\n* Verify an execution with a single function and a single transition. Executions with multiple\n* transitions or functions will fail to verify. Also, this does not verify that the state root of\n* the execution is included in the Aleo Network ledger.\n*\n* @param {Execution} execution The function execution to verify\n* @param {VerifyingKey} verifying_key The verifying key for the function\n* @param {Program} program The program that the function execution belongs to\n* @param {String} function_id The name of the function that was executed\n* @returns {boolean} True if the execution is valid, false otherwise\n* @param {Execution} execution\n* @param {VerifyingKey} verifying_key\n* @param {Program} program\n* @param {string} function_id\n* @returns {boolean}\n*/\nfunction verifyFunctionExecution(execution, verifying_key, program, function_id) {\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n _assertClass(execution, Execution);\n _assertClass(verifying_key, VerifyingKey);\n _assertClass(program, Program);\n const ptr0 = passStringToWasm0(function_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n wasm.verifyFunctionExecution(retptr, execution.__wbg_ptr, verifying_key.__wbg_ptr, program.__wbg_ptr, ptr0, len0);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n var r2 = getInt32Memory0()[retptr / 4 + 2];\n if (r2) {\n throw takeObject(r1);\n }\n return r0 !== 0;\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n }\n}\n\nlet cachedBigInt64Memory0 = null;\n\nfunction getBigInt64Memory0() {\n if (cachedBigInt64Memory0 === null || cachedBigInt64Memory0.buffer !== wasm.memory.buffer) {\n cachedBigInt64Memory0 = new BigInt64Array(wasm.memory.buffer);\n }\n return cachedBigInt64Memory0;\n}\n\nfunction getArrayU8FromWasm0(ptr, len) {\n ptr = ptr >>> 0;\n return getUint8Memory0().subarray(ptr / 1, ptr / 1 + len);\n}\n/**\n* @param {number} receiver\n*/\nfunction runRayonThread(receiver) {\n wasm.runRayonThread(receiver);\n}\n\n/**\n* @param {URL} url\n* @param {number} num_threads\n* @returns {Promise}\n*/\nfunction initThreadPool(url, num_threads) {\n const ret = wasm.initThreadPool(addHeapObject(url), num_threads);\n return takeObject(ret);\n}\n\nfunction handleError(f, args) {\n try {\n return f.apply(this, args);\n } catch (e) {\n wasm.__wbindgen_exn_store(addHeapObject(e));\n }\n}\nfunction __wbg_adapter_281(arg0, arg1, arg2, arg3) {\n wasm.wasm_bindgen__convert__closures__invoke2_mut__h381bef3cd886b4c7(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));\n}\n\nconst AddressFinalization = (typeof FinalizationRegistry === 'undefined')\n ? { register: () => {}, unregister: () => {} }\n : new FinalizationRegistry(ptr => wasm.__wbg_address_free(ptr >>> 0));\n/**\n* Public address of an Aleo account\n*/\nclass Address {\n\n static __wrap(ptr) {\n ptr = ptr >>> 0;\n const obj = Object.create(Address.prototype);\n obj.__wbg_ptr = ptr;\n AddressFinalization.register(obj, obj.__wbg_ptr, obj);\n return obj;\n }\n\n __destroy_into_raw() {\n const ptr = this.__wbg_ptr;\n this.__wbg_ptr = 0;\n AddressFinalization.unregister(this);\n return ptr;\n }\n\n free() {\n const ptr = this.__destroy_into_raw();\n wasm.__wbg_address_free(ptr);\n }\n /**\n * Derive an Aleo address from a private key\n *\n * @param {PrivateKey} private_key The private key to derive the address from\n * @returns {Address} Address corresponding to the private key\n * @param {PrivateKey} private_key\n * @returns {Address}\n */\n static from_private_key(private_key) {\n _assertClass(private_key, PrivateKey);\n const ret = wasm.address_from_private_key(private_key.__wbg_ptr);\n return Address.__wrap(ret);\n }\n /**\n * Derive an Aleo address from a view key\n *\n * @param {ViewKey} view_key The view key to derive the address from\n * @returns {Address} Address corresponding to the view key\n * @param {ViewKey} view_key\n * @returns {Address}\n */\n static from_view_key(view_key) {\n _assertClass(view_key, ViewKey);\n const ret = wasm.address_from_view_key(view_key.__wbg_ptr);\n return Address.__wrap(ret);\n }\n /**\n * Create an aleo address object from a string representation of an address\n *\n * @param {string} address String representation of an addressm\n * @returns {Address} Address\n * @param {string} address\n * @returns {Address}\n */\n static from_string(address) {\n const ptr0 = passStringToWasm0(address, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n const ret = wasm.address_from_string(ptr0, len0);\n return Address.__wrap(ret);\n }\n /**\n * Get a string representation of an Aleo address object\n *\n * @param {Address} Address\n * @returns {string} String representation of the address\n * @returns {string}\n */\n to_string() {\n let deferred1_0;\n let deferred1_1;\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n wasm.address_to_string(retptr, this.__wbg_ptr);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n deferred1_0 = r0;\n deferred1_1 = r1;\n return getStringFromWasm0(r0, r1);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);\n }\n }\n /**\n * Verify a signature for a message signed by the address\n *\n * @param {Uint8Array} Byte array representing a message signed by the address\n * @returns {boolean} Boolean representing whether or not the signature is valid\n * @param {Uint8Array} message\n * @param {Signature} signature\n * @returns {boolean}\n */\n verify(message, signature) {\n const ptr0 = passArray8ToWasm0(message, wasm.__wbindgen_malloc);\n const len0 = WASM_VECTOR_LEN;\n _assertClass(signature, Signature);\n const ret = wasm.address_verify(this.__wbg_ptr, ptr0, len0, signature.__wbg_ptr);\n return ret !== 0;\n }\n}\n\nconst ExecutionFinalization = (typeof FinalizationRegistry === 'undefined')\n ? { register: () => {}, unregister: () => {} }\n : new FinalizationRegistry(ptr => wasm.__wbg_execution_free(ptr >>> 0));\n/**\n* Execution of an Aleo program.\n*/\nclass Execution {\n\n static __wrap(ptr) {\n ptr = ptr >>> 0;\n const obj = Object.create(Execution.prototype);\n obj.__wbg_ptr = ptr;\n ExecutionFinalization.register(obj, obj.__wbg_ptr, obj);\n return obj;\n }\n\n __destroy_into_raw() {\n const ptr = this.__wbg_ptr;\n this.__wbg_ptr = 0;\n ExecutionFinalization.unregister(this);\n return ptr;\n }\n\n free() {\n const ptr = this.__destroy_into_raw();\n wasm.__wbg_execution_free(ptr);\n }\n /**\n * Returns the string representation of the execution.\n * @returns {string}\n */\n toString() {\n let deferred1_0;\n let deferred1_1;\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n wasm.execution_toString(retptr, this.__wbg_ptr);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n deferred1_0 = r0;\n deferred1_1 = r1;\n return getStringFromWasm0(r0, r1);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);\n }\n }\n /**\n * Creates an execution object from a string representation of an execution.\n * @param {string} execution\n * @returns {Execution}\n */\n static fromString(execution) {\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n const ptr0 = passStringToWasm0(execution, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n wasm.execution_fromString(retptr, ptr0, len0);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n var r2 = getInt32Memory0()[retptr / 4 + 2];\n if (r2) {\n throw takeObject(r1);\n }\n return Execution.__wrap(r0);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n }\n }\n}\n\nconst ExecutionResponseFinalization = (typeof FinalizationRegistry === 'undefined')\n ? { register: () => {}, unregister: () => {} }\n : new FinalizationRegistry(ptr => wasm.__wbg_executionresponse_free(ptr >>> 0));\n/**\n* Webassembly Representation of an Aleo function execution response\n*\n* This object is returned by the execution of an Aleo function off-chain. It provides methods for\n* retrieving the outputs of the function execution.\n*/\nclass ExecutionResponse {\n\n static __wrap(ptr) {\n ptr = ptr >>> 0;\n const obj = Object.create(ExecutionResponse.prototype);\n obj.__wbg_ptr = ptr;\n ExecutionResponseFinalization.register(obj, obj.__wbg_ptr, obj);\n return obj;\n }\n\n __destroy_into_raw() {\n const ptr = this.__wbg_ptr;\n this.__wbg_ptr = 0;\n ExecutionResponseFinalization.unregister(this);\n return ptr;\n }\n\n free() {\n const ptr = this.__destroy_into_raw();\n wasm.__wbg_executionresponse_free(ptr);\n }\n /**\n * Get the outputs of the executed function\n *\n * @returns {Array} Array of strings representing the outputs of the function\n * @returns {Array}\n */\n getOutputs() {\n const ret = wasm.executionresponse_getOutputs(this.__wbg_ptr);\n return takeObject(ret);\n }\n /**\n * Returns the execution object if present, null if otherwise.\n *\n * @returns {Execution | undefined} The execution object if present, null if otherwise\n * @returns {Execution | undefined}\n */\n getExecution() {\n const ret = wasm.executionresponse_getExecution(this.__wbg_ptr);\n return ret === 0 ? undefined : Execution.__wrap(ret);\n }\n /**\n * Returns the program keys if present\n * @returns {KeyPair}\n */\n getKeys() {\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n wasm.executionresponse_getKeys(retptr, this.__wbg_ptr);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n var r2 = getInt32Memory0()[retptr / 4 + 2];\n if (r2) {\n throw takeObject(r1);\n }\n return KeyPair.__wrap(r0);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n }\n }\n /**\n * Returns the proving_key if the proving key was cached in the Execution response.\n * Note the proving key is removed from the response object after the first call to this\n * function. Subsequent calls will return null.\n *\n * @returns {ProvingKey | undefined} The proving key\n * @returns {ProvingKey | undefined}\n */\n getProvingKey() {\n const ret = wasm.executionresponse_getProvingKey(this.__wbg_ptr);\n return ret === 0 ? undefined : ProvingKey.__wrap(ret);\n }\n /**\n * Returns the verifying_key associated with the program\n *\n * @returns {VerifyingKey} The verifying key\n * @returns {VerifyingKey}\n */\n getVerifyingKey() {\n const ret = wasm.executionresponse_getVerifyingKey(this.__wbg_ptr);\n return VerifyingKey.__wrap(ret);\n }\n /**\n * Returns the function identifier\n * @returns {string}\n */\n getFunctionId() {\n let deferred1_0;\n let deferred1_1;\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n wasm.executionresponse_getFunctionId(retptr, this.__wbg_ptr);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n deferred1_0 = r0;\n deferred1_1 = r1;\n return getStringFromWasm0(r0, r1);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);\n }\n }\n /**\n * Returns the program\n * @returns {Program}\n */\n getProgram() {\n const ret = wasm.executionresponse_getProgram(this.__wbg_ptr);\n return Program.__wrap(ret);\n }\n}\n\nconst FieldFinalization = (typeof FinalizationRegistry === 'undefined')\n ? { register: () => {}, unregister: () => {} }\n : new FinalizationRegistry(ptr => wasm.__wbg_field_free(ptr >>> 0));\n/**\n*/\nclass Field {\n\n static __wrap(ptr) {\n ptr = ptr >>> 0;\n const obj = Object.create(Field.prototype);\n obj.__wbg_ptr = ptr;\n FieldFinalization.register(obj, obj.__wbg_ptr, obj);\n return obj;\n }\n\n __destroy_into_raw() {\n const ptr = this.__wbg_ptr;\n this.__wbg_ptr = 0;\n FieldFinalization.unregister(this);\n return ptr;\n }\n\n free() {\n const ptr = this.__destroy_into_raw();\n wasm.__wbg_field_free(ptr);\n }\n /**\n * @returns {string}\n */\n toString() {\n let deferred1_0;\n let deferred1_1;\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n wasm.field_toString(retptr, this.__wbg_ptr);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n deferred1_0 = r0;\n deferred1_1 = r1;\n return getStringFromWasm0(r0, r1);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);\n }\n }\n /**\n * @param {string} field\n * @returns {Field}\n */\n static fromString(field) {\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n const ptr0 = passStringToWasm0(field, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n wasm.field_fromString(retptr, ptr0, len0);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n var r2 = getInt32Memory0()[retptr / 4 + 2];\n if (r2) {\n throw takeObject(r1);\n }\n return Field.__wrap(r0);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n }\n }\n}\n\nconst KeyPairFinalization = (typeof FinalizationRegistry === 'undefined')\n ? { register: () => {}, unregister: () => {} }\n : new FinalizationRegistry(ptr => wasm.__wbg_keypair_free(ptr >>> 0));\n/**\n* Key pair object containing both the function proving and verifying keys\n*/\nclass KeyPair {\n\n static __wrap(ptr) {\n ptr = ptr >>> 0;\n const obj = Object.create(KeyPair.prototype);\n obj.__wbg_ptr = ptr;\n KeyPairFinalization.register(obj, obj.__wbg_ptr, obj);\n return obj;\n }\n\n __destroy_into_raw() {\n const ptr = this.__wbg_ptr;\n this.__wbg_ptr = 0;\n KeyPairFinalization.unregister(this);\n return ptr;\n }\n\n free() {\n const ptr = this.__destroy_into_raw();\n wasm.__wbg_keypair_free(ptr);\n }\n /**\n * Create new key pair from proving and verifying keys\n *\n * @param {ProvingKey} proving_key Proving key corresponding to a function in an Aleo program\n * @param {VerifyingKey} verifying_key Verifying key corresponding to a function in an Aleo program\n * @returns {KeyPair} Key pair object containing both the function proving and verifying keys\n * @param {ProvingKey} proving_key\n * @param {VerifyingKey} verifying_key\n */\n constructor(proving_key, verifying_key) {\n _assertClass(proving_key, ProvingKey);\n var ptr0 = proving_key.__destroy_into_raw();\n _assertClass(verifying_key, VerifyingKey);\n var ptr1 = verifying_key.__destroy_into_raw();\n const ret = wasm.keypair_new(ptr0, ptr1);\n this.__wbg_ptr = ret >>> 0;\n return this;\n }\n /**\n * Get the proving key. This method will remove the proving key from the key pair\n *\n * @returns {ProvingKey | Error}\n * @returns {ProvingKey}\n */\n provingKey() {\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n wasm.keypair_provingKey(retptr, this.__wbg_ptr);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n var r2 = getInt32Memory0()[retptr / 4 + 2];\n if (r2) {\n throw takeObject(r1);\n }\n return ProvingKey.__wrap(r0);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n }\n }\n /**\n * Get the verifying key. This method will remove the verifying key from the key pair\n *\n * @returns {VerifyingKey | Error}\n * @returns {VerifyingKey}\n */\n verifyingKey() {\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n wasm.keypair_verifyingKey(retptr, this.__wbg_ptr);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n var r2 = getInt32Memory0()[retptr / 4 + 2];\n if (r2) {\n throw takeObject(r1);\n }\n return VerifyingKey.__wrap(r0);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n }\n }\n}\n\nconst MetadataFinalization = (typeof FinalizationRegistry === 'undefined')\n ? { register: () => {}, unregister: () => {} }\n : new FinalizationRegistry(ptr => wasm.__wbg_metadata_free(ptr >>> 0));\n/**\n*/\nclass Metadata {\n\n static __wrap(ptr) {\n ptr = ptr >>> 0;\n const obj = Object.create(Metadata.prototype);\n obj.__wbg_ptr = ptr;\n MetadataFinalization.register(obj, obj.__wbg_ptr, obj);\n return obj;\n }\n\n __destroy_into_raw() {\n const ptr = this.__wbg_ptr;\n this.__wbg_ptr = 0;\n MetadataFinalization.unregister(this);\n return ptr;\n }\n\n free() {\n const ptr = this.__destroy_into_raw();\n wasm.__wbg_metadata_free(ptr);\n }\n /**\n * @returns {string}\n */\n get name() {\n let deferred1_0;\n let deferred1_1;\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n wasm.__wbg_get_metadata_name(retptr, this.__wbg_ptr);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n deferred1_0 = r0;\n deferred1_1 = r1;\n return getStringFromWasm0(r0, r1);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);\n }\n }\n /**\n * @param {string} arg0\n */\n set name(arg0) {\n const ptr0 = passStringToWasm0(arg0, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n wasm.__wbg_set_metadata_name(this.__wbg_ptr, ptr0, len0);\n }\n /**\n * @returns {string}\n */\n get locator() {\n let deferred1_0;\n let deferred1_1;\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n wasm.__wbg_get_metadata_locator(retptr, this.__wbg_ptr);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n deferred1_0 = r0;\n deferred1_1 = r1;\n return getStringFromWasm0(r0, r1);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);\n }\n }\n /**\n * @param {string} arg0\n */\n set locator(arg0) {\n const ptr0 = passStringToWasm0(arg0, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n wasm.__wbg_set_metadata_locator(this.__wbg_ptr, ptr0, len0);\n }\n /**\n * @returns {string}\n */\n get prover() {\n let deferred1_0;\n let deferred1_1;\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n wasm.__wbg_get_metadata_prover(retptr, this.__wbg_ptr);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n deferred1_0 = r0;\n deferred1_1 = r1;\n return getStringFromWasm0(r0, r1);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);\n }\n }\n /**\n * @param {string} arg0\n */\n set prover(arg0) {\n const ptr0 = passStringToWasm0(arg0, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n wasm.__wbg_set_metadata_prover(this.__wbg_ptr, ptr0, len0);\n }\n /**\n * @returns {string}\n */\n get verifier() {\n let deferred1_0;\n let deferred1_1;\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n wasm.__wbg_get_metadata_verifier(retptr, this.__wbg_ptr);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n deferred1_0 = r0;\n deferred1_1 = r1;\n return getStringFromWasm0(r0, r1);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);\n }\n }\n /**\n * @param {string} arg0\n */\n set verifier(arg0) {\n const ptr0 = passStringToWasm0(arg0, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n wasm.__wbg_set_metadata_verifier(this.__wbg_ptr, ptr0, len0);\n }\n /**\n * @returns {string}\n */\n get verifyingKey() {\n let deferred1_0;\n let deferred1_1;\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n wasm.__wbg_get_metadata_verifyingKey(retptr, this.__wbg_ptr);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n deferred1_0 = r0;\n deferred1_1 = r1;\n return getStringFromWasm0(r0, r1);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);\n }\n }\n /**\n * @param {string} arg0\n */\n set verifyingKey(arg0) {\n const ptr0 = passStringToWasm0(arg0, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n wasm.__wbg_set_metadata_verifyingKey(this.__wbg_ptr, ptr0, len0);\n }\n /**\n * @returns {string}\n */\n static baseUrl() {\n let deferred1_0;\n let deferred1_1;\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n wasm.metadata_baseUrl(retptr);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n deferred1_0 = r0;\n deferred1_1 = r1;\n return getStringFromWasm0(r0, r1);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);\n }\n }\n /**\n * @returns {Metadata}\n */\n static bond_public() {\n const ret = wasm.metadata_bond_public();\n return Metadata.__wrap(ret);\n }\n /**\n * @returns {Metadata}\n */\n static bond_validator() {\n const ret = wasm.metadata_bond_validator();\n return Metadata.__wrap(ret);\n }\n /**\n * @returns {Metadata}\n */\n static claim_unbond_public() {\n const ret = wasm.metadata_claim_unbond_public();\n return Metadata.__wrap(ret);\n }\n /**\n * @returns {Metadata}\n */\n static fee_private() {\n const ret = wasm.metadata_fee_private();\n return Metadata.__wrap(ret);\n }\n /**\n * @returns {Metadata}\n */\n static fee_public() {\n const ret = wasm.metadata_fee_public();\n return Metadata.__wrap(ret);\n }\n /**\n * @returns {Metadata}\n */\n static inclusion() {\n const ret = wasm.metadata_inclusion();\n return Metadata.__wrap(ret);\n }\n /**\n * @returns {Metadata}\n */\n static join() {\n const ret = wasm.metadata_join();\n return Metadata.__wrap(ret);\n }\n /**\n * @returns {Metadata}\n */\n static set_validator_state() {\n const ret = wasm.metadata_set_validator_state();\n return Metadata.__wrap(ret);\n }\n /**\n * @returns {Metadata}\n */\n static split() {\n const ret = wasm.metadata_split();\n return Metadata.__wrap(ret);\n }\n /**\n * @returns {Metadata}\n */\n static transfer_private() {\n const ret = wasm.metadata_transfer_private();\n return Metadata.__wrap(ret);\n }\n /**\n * @returns {Metadata}\n */\n static transfer_private_to_public() {\n const ret = wasm.metadata_transfer_private_to_public();\n return Metadata.__wrap(ret);\n }\n /**\n * @returns {Metadata}\n */\n static transfer_public() {\n const ret = wasm.metadata_transfer_public();\n return Metadata.__wrap(ret);\n }\n /**\n * @returns {Metadata}\n */\n static transfer_public_as_signer() {\n const ret = wasm.metadata_transfer_public_as_signer();\n return Metadata.__wrap(ret);\n }\n /**\n * @returns {Metadata}\n */\n static transfer_public_to_private() {\n const ret = wasm.metadata_transfer_public_to_private();\n return Metadata.__wrap(ret);\n }\n /**\n * @returns {Metadata}\n */\n static unbond_public() {\n const ret = wasm.metadata_unbond_public();\n return Metadata.__wrap(ret);\n }\n}\n\nconst OfflineQueryFinalization = (typeof FinalizationRegistry === 'undefined')\n ? { register: () => {}, unregister: () => {} }\n : new FinalizationRegistry(ptr => wasm.__wbg_offlinequery_free(ptr >>> 0));\n/**\n* An offline query object used to insert the global state root and state paths needed to create\n* a valid inclusion proof offline.\n*/\nclass OfflineQuery {\n\n static __wrap(ptr) {\n ptr = ptr >>> 0;\n const obj = Object.create(OfflineQuery.prototype);\n obj.__wbg_ptr = ptr;\n OfflineQueryFinalization.register(obj, obj.__wbg_ptr, obj);\n return obj;\n }\n\n __destroy_into_raw() {\n const ptr = this.__wbg_ptr;\n this.__wbg_ptr = 0;\n OfflineQueryFinalization.unregister(this);\n return ptr;\n }\n\n free() {\n const ptr = this.__destroy_into_raw();\n wasm.__wbg_offlinequery_free(ptr);\n }\n /**\n * Creates a new offline query object. The state root is required to be passed in as a string\n * @param {string} state_root\n */\n constructor(state_root) {\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n const ptr0 = passStringToWasm0(state_root, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n wasm.offlinequery_new(retptr, ptr0, len0);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n var r2 = getInt32Memory0()[retptr / 4 + 2];\n if (r2) {\n throw takeObject(r1);\n }\n this.__wbg_ptr = r0 >>> 0;\n return this;\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n }\n }\n /**\n * Add a new state path to the offline query object.\n *\n * @param {string} commitment: The commitment corresponding to a record inpout\n * @param {string} state_path: The state path corresponding to the commitment\n * @param {string} commitment\n * @param {string} state_path\n */\n addStatePath(commitment, state_path) {\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n const ptr0 = passStringToWasm0(commitment, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n const ptr1 = passStringToWasm0(state_path, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len1 = WASM_VECTOR_LEN;\n wasm.offlinequery_addStatePath(retptr, this.__wbg_ptr, ptr0, len0, ptr1, len1);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n if (r1) {\n throw takeObject(r0);\n }\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n }\n }\n /**\n * Get a json string representation of the offline query object\n * @returns {string}\n */\n toString() {\n let deferred1_0;\n let deferred1_1;\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n wasm.offlinequery_toString(retptr, this.__wbg_ptr);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n deferred1_0 = r0;\n deferred1_1 = r1;\n return getStringFromWasm0(r0, r1);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);\n }\n }\n /**\n * Create an offline query object from a json string representation\n * @param {string} s\n * @returns {OfflineQuery}\n */\n static fromString(s) {\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n const ptr0 = passStringToWasm0(s, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n wasm.offlinequery_fromString(retptr, ptr0, len0);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n var r2 = getInt32Memory0()[retptr / 4 + 2];\n if (r2) {\n throw takeObject(r1);\n }\n return OfflineQuery.__wrap(r0);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n }\n }\n}\n\nconst PrivateKeyFinalization = (typeof FinalizationRegistry === 'undefined')\n ? { register: () => {}, unregister: () => {} }\n : new FinalizationRegistry(ptr => wasm.__wbg_privatekey_free(ptr >>> 0));\n/**\n* Private key of an Aleo account\n*/\nclass PrivateKey {\n\n static __wrap(ptr) {\n ptr = ptr >>> 0;\n const obj = Object.create(PrivateKey.prototype);\n obj.__wbg_ptr = ptr;\n PrivateKeyFinalization.register(obj, obj.__wbg_ptr, obj);\n return obj;\n }\n\n __destroy_into_raw() {\n const ptr = this.__wbg_ptr;\n this.__wbg_ptr = 0;\n PrivateKeyFinalization.unregister(this);\n return ptr;\n }\n\n free() {\n const ptr = this.__destroy_into_raw();\n wasm.__wbg_privatekey_free(ptr);\n }\n /**\n * Generate a new private key using a cryptographically secure random number generator\n *\n * @returns {PrivateKey}\n */\n constructor() {\n const ret = wasm.privatekey_new();\n this.__wbg_ptr = ret >>> 0;\n return this;\n }\n /**\n * Get a private key from a series of unchecked bytes\n *\n * @param {Uint8Array} seed Unchecked 32 byte long Uint8Array acting as the seed for the private key\n * @returns {PrivateKey}\n * @param {Uint8Array} seed\n * @returns {PrivateKey}\n */\n static from_seed_unchecked(seed) {\n const ptr0 = passArray8ToWasm0(seed, wasm.__wbindgen_malloc);\n const len0 = WASM_VECTOR_LEN;\n const ret = wasm.privatekey_from_seed_unchecked(ptr0, len0);\n return PrivateKey.__wrap(ret);\n }\n /**\n * Get a private key from a string representation of a private key\n *\n * @param {string} seed String representation of a private key\n * @returns {PrivateKey}\n * @param {string} private_key\n * @returns {PrivateKey}\n */\n static from_string(private_key) {\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n const ptr0 = passStringToWasm0(private_key, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n wasm.privatekey_from_string(retptr, ptr0, len0);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n var r2 = getInt32Memory0()[retptr / 4 + 2];\n if (r2) {\n throw takeObject(r1);\n }\n return PrivateKey.__wrap(r0);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n }\n }\n /**\n * Get a string representation of the private key. This function should be used very carefully\n * as it exposes the private key plaintext\n *\n * @returns {string} String representation of a private key\n * @returns {string}\n */\n to_string() {\n let deferred1_0;\n let deferred1_1;\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n wasm.privatekey_to_string(retptr, this.__wbg_ptr);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n deferred1_0 = r0;\n deferred1_1 = r1;\n return getStringFromWasm0(r0, r1);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);\n }\n }\n /**\n * Get the view key corresponding to the private key\n *\n * @returns {ViewKey}\n * @returns {ViewKey}\n */\n to_view_key() {\n const ret = wasm.privatekey_to_view_key(this.__wbg_ptr);\n return ViewKey.__wrap(ret);\n }\n /**\n * Get the address corresponding to the private key\n *\n * @returns {Address}\n * @returns {Address}\n */\n to_address() {\n const ret = wasm.privatekey_to_address(this.__wbg_ptr);\n return Address.__wrap(ret);\n }\n /**\n * Sign a message with the private key\n *\n * @param {Uint8Array} Byte array representing a message signed by the address\n * @returns {Signature} Signature generated by signing the message with the address\n * @param {Uint8Array} message\n * @returns {Signature}\n */\n sign(message) {\n const ptr0 = passArray8ToWasm0(message, wasm.__wbindgen_malloc);\n const len0 = WASM_VECTOR_LEN;\n const ret = wasm.privatekey_sign(this.__wbg_ptr, ptr0, len0);\n return Signature.__wrap(ret);\n }\n /**\n * Get a new randomly generated private key ciphertext using a secret. The secret is sensitive\n * and will be needed to decrypt the private key later, so it should be stored securely\n *\n * @param {string} secret Secret used to encrypt the private key\n * @returns {PrivateKeyCiphertext | Error} Ciphertext representation of the private key\n * @param {string} secret\n * @returns {PrivateKeyCiphertext}\n */\n static newEncrypted(secret) {\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n const ptr0 = passStringToWasm0(secret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n wasm.privatekey_newEncrypted(retptr, ptr0, len0);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n var r2 = getInt32Memory0()[retptr / 4 + 2];\n if (r2) {\n throw takeObject(r1);\n }\n return PrivateKeyCiphertext.__wrap(r0);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n }\n }\n /**\n * Encrypt an existing private key with a secret. The secret is sensitive and will be needed to\n * decrypt the private key later, so it should be stored securely\n *\n * @param {string} secret Secret used to encrypt the private key\n * @returns {PrivateKeyCiphertext | Error} Ciphertext representation of the private key\n * @param {string} secret\n * @returns {PrivateKeyCiphertext}\n */\n toCiphertext(secret) {\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n const ptr0 = passStringToWasm0(secret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n wasm.privatekey_toCiphertext(retptr, this.__wbg_ptr, ptr0, len0);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n var r2 = getInt32Memory0()[retptr / 4 + 2];\n if (r2) {\n throw takeObject(r1);\n }\n return PrivateKeyCiphertext.__wrap(r0);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n }\n }\n /**\n * Get private key from a private key ciphertext and secret originally used to encrypt it\n *\n * @param {PrivateKeyCiphertext} ciphertext Ciphertext representation of the private key\n * @param {string} secret Secret originally used to encrypt the private key\n * @returns {PrivateKey | Error} Private key\n * @param {PrivateKeyCiphertext} ciphertext\n * @param {string} secret\n * @returns {PrivateKey}\n */\n static fromPrivateKeyCiphertext(ciphertext, secret) {\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n _assertClass(ciphertext, PrivateKeyCiphertext);\n const ptr0 = passStringToWasm0(secret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n wasm.privatekey_fromPrivateKeyCiphertext(retptr, ciphertext.__wbg_ptr, ptr0, len0);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n var r2 = getInt32Memory0()[retptr / 4 + 2];\n if (r2) {\n throw takeObject(r1);\n }\n return PrivateKey.__wrap(r0);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n }\n }\n}\n\nconst PrivateKeyCiphertextFinalization = (typeof FinalizationRegistry === 'undefined')\n ? { register: () => {}, unregister: () => {} }\n : new FinalizationRegistry(ptr => wasm.__wbg_privatekeyciphertext_free(ptr >>> 0));\n/**\n* Private Key in ciphertext form\n*/\nclass PrivateKeyCiphertext {\n\n static __wrap(ptr) {\n ptr = ptr >>> 0;\n const obj = Object.create(PrivateKeyCiphertext.prototype);\n obj.__wbg_ptr = ptr;\n PrivateKeyCiphertextFinalization.register(obj, obj.__wbg_ptr, obj);\n return obj;\n }\n\n __destroy_into_raw() {\n const ptr = this.__wbg_ptr;\n this.__wbg_ptr = 0;\n PrivateKeyCiphertextFinalization.unregister(this);\n return ptr;\n }\n\n free() {\n const ptr = this.__destroy_into_raw();\n wasm.__wbg_privatekeyciphertext_free(ptr);\n }\n /**\n * Encrypt a private key using a secret string. The secret is sensitive and will be needed to\n * decrypt the private key later, so it should be stored securely\n *\n * @param {PrivateKey} private_key Private key to encrypt\n * @param {string} secret Secret to encrypt the private key with\n * @returns {PrivateKeyCiphertext | Error} Private key ciphertext\n * @param {PrivateKey} private_key\n * @param {string} secret\n * @returns {PrivateKeyCiphertext}\n */\n static encryptPrivateKey(private_key, secret) {\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n _assertClass(private_key, PrivateKey);\n const ptr0 = passStringToWasm0(secret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n wasm.privatekey_toCiphertext(retptr, private_key.__wbg_ptr, ptr0, len0);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n var r2 = getInt32Memory0()[retptr / 4 + 2];\n if (r2) {\n throw takeObject(r1);\n }\n return PrivateKeyCiphertext.__wrap(r0);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n }\n }\n /**\n * Decrypts a private ciphertext using a secret string. This must be the same secret used to\n * encrypt the private key\n *\n * @param {string} secret Secret used to encrypt the private key\n * @returns {PrivateKey | Error} Private key\n * @param {string} secret\n * @returns {PrivateKey}\n */\n decryptToPrivateKey(secret) {\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n const ptr0 = passStringToWasm0(secret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n wasm.privatekeyciphertext_decryptToPrivateKey(retptr, this.__wbg_ptr, ptr0, len0);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n var r2 = getInt32Memory0()[retptr / 4 + 2];\n if (r2) {\n throw takeObject(r1);\n }\n return PrivateKey.__wrap(r0);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n }\n }\n /**\n * Returns the ciphertext string\n *\n * @returns {string} Ciphertext string\n * @returns {string}\n */\n toString() {\n let deferred1_0;\n let deferred1_1;\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n wasm.privatekeyciphertext_toString(retptr, this.__wbg_ptr);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n deferred1_0 = r0;\n deferred1_1 = r1;\n return getStringFromWasm0(r0, r1);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);\n }\n }\n /**\n * Creates a PrivateKeyCiphertext from a string\n *\n * @param {string} ciphertext Ciphertext string\n * @returns {PrivateKeyCiphertext | Error} Private key ciphertext\n * @param {string} ciphertext\n * @returns {PrivateKeyCiphertext}\n */\n static fromString(ciphertext) {\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n const ptr0 = passStringToWasm0(ciphertext, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n wasm.privatekeyciphertext_fromString(retptr, ptr0, len0);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n var r2 = getInt32Memory0()[retptr / 4 + 2];\n if (r2) {\n throw takeObject(r1);\n }\n return PrivateKeyCiphertext.__wrap(r0);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n }\n }\n}\n\nconst ProgramFinalization = (typeof FinalizationRegistry === 'undefined')\n ? { register: () => {}, unregister: () => {} }\n : new FinalizationRegistry(ptr => wasm.__wbg_program_free(ptr >>> 0));\n/**\n* Webassembly Representation of an Aleo program\n*/\nclass Program {\n\n static __wrap(ptr) {\n ptr = ptr >>> 0;\n const obj = Object.create(Program.prototype);\n obj.__wbg_ptr = ptr;\n ProgramFinalization.register(obj, obj.__wbg_ptr, obj);\n return obj;\n }\n\n __destroy_into_raw() {\n const ptr = this.__wbg_ptr;\n this.__wbg_ptr = 0;\n ProgramFinalization.unregister(this);\n return ptr;\n }\n\n free() {\n const ptr = this.__destroy_into_raw();\n wasm.__wbg_program_free(ptr);\n }\n /**\n * Create a program from a program string\n *\n * @param {string} program Aleo program source code\n * @returns {Program | Error} Program object\n * @param {string} program\n * @returns {Program}\n */\n static fromString(program) {\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n const ptr0 = passStringToWasm0(program, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n wasm.program_fromString(retptr, ptr0, len0);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n var r2 = getInt32Memory0()[retptr / 4 + 2];\n if (r2) {\n throw takeObject(r1);\n }\n return Program.__wrap(r0);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n }\n }\n /**\n * Get a string representation of the program\n *\n * @returns {string} String containing the program source code\n * @returns {string}\n */\n toString() {\n let deferred1_0;\n let deferred1_1;\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n wasm.program_toString(retptr, this.__wbg_ptr);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n deferred1_0 = r0;\n deferred1_1 = r1;\n return getStringFromWasm0(r0, r1);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);\n }\n }\n /**\n * Determine if a function is present in the program\n *\n * @param {string} functionName Name of the function to check for\n * @returns {boolean} True if the program is valid, false otherwise\n * @param {string} function_name\n * @returns {boolean}\n */\n hasFunction(function_name) {\n const ptr0 = passStringToWasm0(function_name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n const ret = wasm.program_hasFunction(this.__wbg_ptr, ptr0, len0);\n return ret !== 0;\n }\n /**\n * Get javascript array of functions names in the program\n *\n * @returns {Array} Array of all function names present in the program\n *\n * @example\n * const expected_functions = [\n * \"mint\",\n * \"transfer_private\",\n * \"transfer_private_to_public\",\n * \"transfer_public\",\n * \"transfer_public_to_private\",\n * \"join\",\n * \"split\",\n * \"fee\"\n * ]\n *\n * const credits_program = aleo_wasm.Program.getCreditsProgram();\n * const credits_functions = credits_program.getFunctions();\n * console.log(credits_functions === expected_functions); // Output should be \"true\"\n * @returns {Array}\n */\n getFunctions() {\n const ret = wasm.program_getFunctions(this.__wbg_ptr);\n return takeObject(ret);\n }\n /**\n * Get a javascript object representation of the function inputs and types. This can be used\n * to generate a web form to capture user inputs for an execution of a function.\n *\n * @param {string} function_name Name of the function to get inputs for\n * @returns {Array | Error} Array of function inputs\n *\n * @example\n * const expected_inputs = [\n * {\n * type:\"record\",\n * visibility:\"private\",\n * record:\"credits\",\n * members:[\n * {\n * name:\"microcredits\",\n * type:\"u64\",\n * visibility:\"private\"\n * }\n * ],\n * register:\"r0\"\n * },\n * {\n * type:\"address\",\n * visibility:\"private\",\n * register:\"r1\"\n * },\n * {\n * type:\"u64\",\n * visibility:\"private\",\n * register:\"r2\"\n * }\n * ];\n *\n * const credits_program = aleo_wasm.Program.getCreditsProgram();\n * const transfer_function_inputs = credits_program.getFunctionInputs(\"transfer_private\");\n * console.log(transfer_function_inputs === expected_inputs); // Output should be \"true\"\n * @param {string} function_name\n * @returns {Array}\n */\n getFunctionInputs(function_name) {\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n const ptr0 = passStringToWasm0(function_name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n wasm.program_getFunctionInputs(retptr, this.__wbg_ptr, ptr0, len0);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n var r2 = getInt32Memory0()[retptr / 4 + 2];\n if (r2) {\n throw takeObject(r1);\n }\n return takeObject(r0);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n }\n }\n /**\n * Get a the list of a program's mappings and the names/types of their keys and values.\n *\n * @returns {Array | Error} - An array of objects representing the mappings in the program\n * @example\n * const expected_mappings = [\n * {\n * name: \"account\",\n * key_name: \"owner\",\n * key_type: \"address\",\n * value_name: \"microcredits\",\n * value_type: \"u64\"\n * }\n * ]\n *\n * const credits_program = aleo_wasm.Program.getCreditsProgram();\n * const credits_mappings = credits_program.getMappings();\n * console.log(credits_mappings === expected_mappings); // Output should be \"true\"\n * @returns {Array}\n */\n getMappings() {\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n wasm.program_getMappings(retptr, this.__wbg_ptr);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n var r2 = getInt32Memory0()[retptr / 4 + 2];\n if (r2) {\n throw takeObject(r1);\n }\n return takeObject(r0);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n }\n }\n /**\n * Get a javascript object representation of a program record and its types\n *\n * @param {string} record_name Name of the record to get members for\n * @returns {Object | Error} Object containing the record name, type, and members\n *\n * @example\n *\n * const expected_record = {\n * type: \"record\",\n * record: \"Credits\",\n * members: [\n * {\n * name: \"owner\",\n * type: \"address\",\n * visibility: \"private\"\n * },\n * {\n * name: \"microcredits\",\n * type: \"u64\",\n * visibility: \"private\"\n * }\n * ];\n * };\n *\n * const credits_program = aleo_wasm.Program.getCreditsProgram();\n * const credits_record = credits_program.getRecordMembers(\"Credits\");\n * console.log(credits_record === expected_record); // Output should be \"true\"\n * @param {string} record_name\n * @returns {object}\n */\n getRecordMembers(record_name) {\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n const ptr0 = passStringToWasm0(record_name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n wasm.program_getRecordMembers(retptr, this.__wbg_ptr, ptr0, len0);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n var r2 = getInt32Memory0()[retptr / 4 + 2];\n if (r2) {\n throw takeObject(r1);\n }\n return takeObject(r0);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n }\n }\n /**\n * Get a javascript object representation of a program struct and its types\n *\n * @param {string} struct_name Name of the struct to get members for\n * @returns {Array | Error} Array containing the struct members\n *\n * @example\n *\n * const STRUCT_PROGRAM = \"program token_issue.aleo;\n *\n * struct token_metadata:\n * network as u32;\n * version as u32;\n *\n * struct token:\n * token_id as u32;\n * metadata as token_metadata;\n *\n * function no_op:\n * input r0 as u64;\n * output r0 as u64;\"\n *\n * const expected_struct_members = [\n * {\n * name: \"token_id\",\n * type: \"u32\",\n * },\n * {\n * name: \"metadata\",\n * type: \"struct\",\n * struct_id: \"token_metadata\",\n * members: [\n * {\n * name: \"network\",\n * type: \"u32\",\n * }\n * {\n * name: \"version\",\n * type: \"u32\",\n * }\n * ]\n * }\n * ];\n *\n * const program = aleo_wasm.Program.fromString(STRUCT_PROGRAM);\n * const struct_members = program.getStructMembers(\"token\");\n * console.log(struct_members === expected_struct_members); // Output should be \"true\"\n * @param {string} struct_name\n * @returns {Array}\n */\n getStructMembers(struct_name) {\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n const ptr0 = passStringToWasm0(struct_name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n wasm.program_getStructMembers(retptr, this.__wbg_ptr, ptr0, len0);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n var r2 = getInt32Memory0()[retptr / 4 + 2];\n if (r2) {\n throw takeObject(r1);\n }\n return takeObject(r0);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n }\n }\n /**\n * Get the credits.aleo program\n *\n * @returns {Program} The credits.aleo program\n * @returns {Program}\n */\n static getCreditsProgram() {\n const ret = wasm.program_getCreditsProgram();\n return Program.__wrap(ret);\n }\n /**\n * Get the id of the program\n *\n * @returns {string} The id of the program\n * @returns {string}\n */\n id() {\n let deferred1_0;\n let deferred1_1;\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n wasm.program_id(retptr, this.__wbg_ptr);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n deferred1_0 = r0;\n deferred1_1 = r1;\n return getStringFromWasm0(r0, r1);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);\n }\n }\n /**\n * Get a unique address of the program\n *\n * @returns {Address} The address of the program\n * @returns {Address}\n */\n address() {\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n wasm.program_address(retptr, this.__wbg_ptr);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n var r2 = getInt32Memory0()[retptr / 4 + 2];\n if (r2) {\n throw takeObject(r1);\n }\n return Address.__wrap(r0);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n }\n }\n /**\n * Determine equality with another program\n *\n * @param {Program} other The other program to compare\n * @returns {boolean} True if the programs are equal, false otherwise\n * @param {Program} other\n * @returns {boolean}\n */\n isEqual(other) {\n _assertClass(other, Program);\n const ret = wasm.program_isEqual(this.__wbg_ptr, other.__wbg_ptr);\n return ret !== 0;\n }\n /**\n * Get program_imports\n *\n * @returns {Array} The program imports\n *\n * @example\n *\n * const DOUBLE_TEST = \"import multiply_test.aleo;\n *\n * program double_test.aleo;\n *\n * function double_it:\n * input r0 as u32.private;\n * call multiply_test.aleo/multiply 2u32 r0 into r1;\n * output r1 as u32.private;\";\n *\n * const expected_imports = [\n * \"multiply_test.aleo\"\n * ];\n *\n * const program = aleo_wasm.Program.fromString(DOUBLE_TEST_PROGRAM);\n * const imports = program.getImports();\n * console.log(imports === expected_imports); // Output should be \"true\"\n * @returns {Array}\n */\n getImports() {\n const ret = wasm.program_getImports(this.__wbg_ptr);\n return takeObject(ret);\n }\n}\n\nconst ProgramManagerFinalization = (typeof FinalizationRegistry === 'undefined')\n ? { register: () => {}, unregister: () => {} }\n : new FinalizationRegistry(ptr => wasm.__wbg_programmanager_free(ptr >>> 0));\n/**\n*/\nclass ProgramManager {\n\n __destroy_into_raw() {\n const ptr = this.__wbg_ptr;\n this.__wbg_ptr = 0;\n ProgramManagerFinalization.unregister(this);\n return ptr;\n }\n\n free() {\n const ptr = this.__destroy_into_raw();\n wasm.__wbg_programmanager_free(ptr);\n }\n /**\n * Deploy an Aleo program\n *\n * @param private_key The private key of the sender\n * @param program The source code of the program being deployed\n * @param imports A javascript object holding the source code of any imported programs in the\n * form \\{\"program_name1\": \"program_source_code\", \"program_name2\": \"program_source_code\", ..\\}.\n * Note that all imported programs must be deployed on chain before the main program in order\n * for the deployment to succeed\n * @param fee_credits The amount of credits to pay as a fee\n * @param fee_record The record to spend the fee from\n * @param url The url of the Aleo network node to send the transaction to\n * @param imports (optional) Provide a list of imports to use for the program deployment in the\n * form of a javascript object where the keys are a string of the program name and the values\n * are a string representing the program source code \\{ \"hello.aleo\": \"hello.aleo source code\" \\}\n * @param fee_proving_key (optional) Provide a proving key to use for the fee execution\n * @param fee_verifying_key (optional) Provide a verifying key to use for the fee execution\n * @returns {Transaction | Error}\n * @param {PrivateKey} private_key\n * @param {string} program\n * @param {number} fee_credits\n * @param {RecordPlaintext | undefined} [fee_record]\n * @param {string | undefined} [url]\n * @param {object | undefined} [imports]\n * @param {ProvingKey | undefined} [fee_proving_key]\n * @param {VerifyingKey | undefined} [fee_verifying_key]\n * @param {OfflineQuery | undefined} [offline_query]\n * @returns {Promise}\n */\n static buildDeploymentTransaction(private_key, program, fee_credits, fee_record, url, imports, fee_proving_key, fee_verifying_key, offline_query) {\n _assertClass(private_key, PrivateKey);\n const ptr0 = passStringToWasm0(program, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n let ptr1 = 0;\n if (!isLikeNone(fee_record)) {\n _assertClass(fee_record, RecordPlaintext);\n ptr1 = fee_record.__destroy_into_raw();\n }\n var ptr2 = isLikeNone(url) ? 0 : passStringToWasm0(url, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n var len2 = WASM_VECTOR_LEN;\n let ptr3 = 0;\n if (!isLikeNone(fee_proving_key)) {\n _assertClass(fee_proving_key, ProvingKey);\n ptr3 = fee_proving_key.__destroy_into_raw();\n }\n let ptr4 = 0;\n if (!isLikeNone(fee_verifying_key)) {\n _assertClass(fee_verifying_key, VerifyingKey);\n ptr4 = fee_verifying_key.__destroy_into_raw();\n }\n let ptr5 = 0;\n if (!isLikeNone(offline_query)) {\n _assertClass(offline_query, OfflineQuery);\n ptr5 = offline_query.__destroy_into_raw();\n }\n const ret = wasm.programmanager_buildDeploymentTransaction(private_key.__wbg_ptr, ptr0, len0, fee_credits, ptr1, ptr2, len2, isLikeNone(imports) ? 0 : addHeapObject(imports), ptr3, ptr4, ptr5);\n return takeObject(ret);\n }\n /**\n * Estimate the fee for a program deployment\n *\n * Disclaimer: Fee estimation is experimental and may not represent a correct estimate on any current or future network\n *\n * @param program The source code of the program being deployed\n * @param imports (optional) Provide a list of imports to use for the deployment fee estimation\n * in the form of a javascript object where the keys are a string of the program name and the values\n * are a string representing the program source code \\{ \"hello.aleo\": \"hello.aleo source code\" \\}\n * @returns {u64 | Error}\n * @param {string} program\n * @param {object | undefined} [imports]\n * @returns {Promise}\n */\n static estimateDeploymentFee(program, imports) {\n const ptr0 = passStringToWasm0(program, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n const ret = wasm.programmanager_estimateDeploymentFee(ptr0, len0, isLikeNone(imports) ? 0 : addHeapObject(imports));\n return takeObject(ret);\n }\n /**\n * Estimate the component of the deployment cost which comes from the fee for the program name.\n * Note that this cost does not represent the entire cost of deployment. It is additional to\n * the cost of the size (in bytes) of the deployment.\n *\n * Disclaimer: Fee estimation is experimental and may not represent a correct estimate on any current or future network\n *\n * @param name The name of the program to be deployed\n * @returns {u64 | Error}\n * @param {string} name\n * @returns {bigint}\n */\n static estimateProgramNameCost(name) {\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n const ptr0 = passStringToWasm0(name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n wasm.programmanager_estimateProgramNameCost(retptr, ptr0, len0);\n var r0 = getBigInt64Memory0()[retptr / 8 + 0];\n var r2 = getInt32Memory0()[retptr / 4 + 2];\n var r3 = getInt32Memory0()[retptr / 4 + 3];\n if (r3) {\n throw takeObject(r2);\n }\n return BigInt.asUintN(64, r0);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n }\n }\n /**\n * Execute an arbitrary function locally\n *\n * @param {PrivateKey} private_key The private key of the sender\n * @param {string} program The source code of the program being executed\n * @param {string} function The name of the function to execute\n * @param {Array} inputs A javascript array of inputs to the function\n * @param {boolean} prove_execution If true, the execution will be proven and an execution object\n * containing the proof and the encrypted inputs and outputs needed to verify the proof offline\n * will be returned.\n * @param {boolean} cache Cache the proving and verifying keys in the Execution response.\n * If this is set to 'true' the keys synthesized will be stored in the Execution Response\n * and the `ProvingKey` and `VerifyingKey` can be retrieved from the response via the `.getKeys()`\n * method.\n * @param {Object | undefined} imports (optional) Provide a list of imports to use for the function execution in the\n * form of a javascript object where the keys are a string of the program name and the values\n * are a string representing the program source code \\{ \"hello.aleo\": \"hello.aleo source code\" \\}\n * @param {ProvingKey | undefined} proving_key (optional) Provide a verifying key to use for the function execution\n * @param {VerifyingKey | undefined} verifying_key (optional) Provide a verifying key to use for the function execution\n * @param {PrivateKey} private_key\n * @param {string} program\n * @param {string} _function\n * @param {Array} inputs\n * @param {boolean} prove_execution\n * @param {boolean} cache\n * @param {object | undefined} [imports]\n * @param {ProvingKey | undefined} [proving_key]\n * @param {VerifyingKey | undefined} [verifying_key]\n * @param {string | undefined} [url]\n * @param {OfflineQuery | undefined} [offline_query]\n * @returns {Promise}\n */\n static executeFunctionOffline(private_key, program, _function, inputs, prove_execution, cache, imports, proving_key, verifying_key, url, offline_query) {\n _assertClass(private_key, PrivateKey);\n const ptr0 = passStringToWasm0(program, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n const ptr1 = passStringToWasm0(_function, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len1 = WASM_VECTOR_LEN;\n let ptr2 = 0;\n if (!isLikeNone(proving_key)) {\n _assertClass(proving_key, ProvingKey);\n ptr2 = proving_key.__destroy_into_raw();\n }\n let ptr3 = 0;\n if (!isLikeNone(verifying_key)) {\n _assertClass(verifying_key, VerifyingKey);\n ptr3 = verifying_key.__destroy_into_raw();\n }\n var ptr4 = isLikeNone(url) ? 0 : passStringToWasm0(url, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n var len4 = WASM_VECTOR_LEN;\n let ptr5 = 0;\n if (!isLikeNone(offline_query)) {\n _assertClass(offline_query, OfflineQuery);\n ptr5 = offline_query.__destroy_into_raw();\n }\n const ret = wasm.programmanager_executeFunctionOffline(private_key.__wbg_ptr, ptr0, len0, ptr1, len1, addHeapObject(inputs), prove_execution, cache, isLikeNone(imports) ? 0 : addHeapObject(imports), ptr2, ptr3, ptr4, len4, ptr5);\n return takeObject(ret);\n }\n /**\n * Execute Aleo function and create an Aleo execution transaction\n *\n * @param private_key The private key of the sender\n * @param program The source code of the program being executed\n * @param function The name of the function to execute\n * @param inputs A javascript array of inputs to the function\n * @param fee_credits The amount of credits to pay as a fee\n * @param fee_record The record to spend the fee from\n * @param url The url of the Aleo network node to send the transaction to\n * If this is set to 'true' the keys synthesized (or passed in as optional parameters via the\n * `proving_key` and `verifying_key` arguments) will be stored in the ProgramManager's memory\n * and used for subsequent transactions. If this is set to 'false' the proving and verifying\n * keys will be deallocated from memory after the transaction is executed.\n * @param imports (optional) Provide a list of imports to use for the function execution in the\n * form of a javascript object where the keys are a string of the program name and the values\n * are a string representing the program source code \\{ \"hello.aleo\": \"hello.aleo source code\" \\}\n * @param proving_key (optional) Provide a verifying key to use for the function execution\n * @param verifying_key (optional) Provide a verifying key to use for the function execution\n * @param fee_proving_key (optional) Provide a proving key to use for the fee execution\n * @param fee_verifying_key (optional) Provide a verifying key to use for the fee execution\n * @returns {Transaction | Error}\n * @param {PrivateKey} private_key\n * @param {string} program\n * @param {string} _function\n * @param {Array} inputs\n * @param {number} fee_credits\n * @param {RecordPlaintext | undefined} [fee_record]\n * @param {string | undefined} [url]\n * @param {object | undefined} [imports]\n * @param {ProvingKey | undefined} [proving_key]\n * @param {VerifyingKey | undefined} [verifying_key]\n * @param {ProvingKey | undefined} [fee_proving_key]\n * @param {VerifyingKey | undefined} [fee_verifying_key]\n * @param {OfflineQuery | undefined} [offline_query]\n * @returns {Promise}\n */\n static buildExecutionTransaction(private_key, program, _function, inputs, fee_credits, fee_record, url, imports, proving_key, verifying_key, fee_proving_key, fee_verifying_key, offline_query) {\n _assertClass(private_key, PrivateKey);\n const ptr0 = passStringToWasm0(program, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n const ptr1 = passStringToWasm0(_function, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len1 = WASM_VECTOR_LEN;\n let ptr2 = 0;\n if (!isLikeNone(fee_record)) {\n _assertClass(fee_record, RecordPlaintext);\n ptr2 = fee_record.__destroy_into_raw();\n }\n var ptr3 = isLikeNone(url) ? 0 : passStringToWasm0(url, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n var len3 = WASM_VECTOR_LEN;\n let ptr4 = 0;\n if (!isLikeNone(proving_key)) {\n _assertClass(proving_key, ProvingKey);\n ptr4 = proving_key.__destroy_into_raw();\n }\n let ptr5 = 0;\n if (!isLikeNone(verifying_key)) {\n _assertClass(verifying_key, VerifyingKey);\n ptr5 = verifying_key.__destroy_into_raw();\n }\n let ptr6 = 0;\n if (!isLikeNone(fee_proving_key)) {\n _assertClass(fee_proving_key, ProvingKey);\n ptr6 = fee_proving_key.__destroy_into_raw();\n }\n let ptr7 = 0;\n if (!isLikeNone(fee_verifying_key)) {\n _assertClass(fee_verifying_key, VerifyingKey);\n ptr7 = fee_verifying_key.__destroy_into_raw();\n }\n let ptr8 = 0;\n if (!isLikeNone(offline_query)) {\n _assertClass(offline_query, OfflineQuery);\n ptr8 = offline_query.__destroy_into_raw();\n }\n const ret = wasm.programmanager_buildExecutionTransaction(private_key.__wbg_ptr, ptr0, len0, ptr1, len1, addHeapObject(inputs), fee_credits, ptr2, ptr3, len3, isLikeNone(imports) ? 0 : addHeapObject(imports), ptr4, ptr5, ptr6, ptr7, ptr8);\n return takeObject(ret);\n }\n /**\n * Estimate Fee for Aleo function execution. Note if \"cache\" is set to true, the proving and\n * verifying keys will be stored in the ProgramManager's memory and used for subsequent\n * program executions.\n *\n * Disclaimer: Fee estimation is experimental and may not represent a correct estimate on any current or future network\n *\n * @param private_key The private key of the sender\n * @param program The source code of the program to estimate the execution fee for\n * @param function The name of the function to execute\n * @param inputs A javascript array of inputs to the function\n * @param url The url of the Aleo network node to send the transaction to\n * @param imports (optional) Provide a list of imports to use for the fee estimation in the\n * form of a javascript object where the keys are a string of the program name and the values\n * are a string representing the program source code \\{ \"hello.aleo\": \"hello.aleo source code\" \\}\n * @param proving_key (optional) Provide a verifying key to use for the fee estimation\n * @param verifying_key (optional) Provide a verifying key to use for the fee estimation\n * @returns {u64 | Error} Fee in microcredits\n * @param {PrivateKey} private_key\n * @param {string} program\n * @param {string} _function\n * @param {Array} inputs\n * @param {string | undefined} [url]\n * @param {object | undefined} [imports]\n * @param {ProvingKey | undefined} [proving_key]\n * @param {VerifyingKey | undefined} [verifying_key]\n * @param {OfflineQuery | undefined} [offline_query]\n * @returns {Promise}\n */\n static estimateExecutionFee(private_key, program, _function, inputs, url, imports, proving_key, verifying_key, offline_query) {\n _assertClass(private_key, PrivateKey);\n const ptr0 = passStringToWasm0(program, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n const ptr1 = passStringToWasm0(_function, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len1 = WASM_VECTOR_LEN;\n var ptr2 = isLikeNone(url) ? 0 : passStringToWasm0(url, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n var len2 = WASM_VECTOR_LEN;\n let ptr3 = 0;\n if (!isLikeNone(proving_key)) {\n _assertClass(proving_key, ProvingKey);\n ptr3 = proving_key.__destroy_into_raw();\n }\n let ptr4 = 0;\n if (!isLikeNone(verifying_key)) {\n _assertClass(verifying_key, VerifyingKey);\n ptr4 = verifying_key.__destroy_into_raw();\n }\n let ptr5 = 0;\n if (!isLikeNone(offline_query)) {\n _assertClass(offline_query, OfflineQuery);\n ptr5 = offline_query.__destroy_into_raw();\n }\n const ret = wasm.programmanager_estimateExecutionFee(private_key.__wbg_ptr, ptr0, len0, ptr1, len1, addHeapObject(inputs), ptr2, len2, isLikeNone(imports) ? 0 : addHeapObject(imports), ptr3, ptr4, ptr5);\n return takeObject(ret);\n }\n /**\n * Estimate the finalize fee component for executing a function. This fee is additional to the\n * size of the execution of the program in bytes. If the function does not have a finalize\n * step, then the finalize fee is 0.\n *\n * Disclaimer: Fee estimation is experimental and may not represent a correct estimate on any current or future network\n *\n * @param program The program containing the function to estimate the finalize fee for\n * @param function The function to estimate the finalize fee for\n * @returns {u64 | Error} Fee in microcredits\n * @param {string} program\n * @param {string} _function\n * @returns {bigint}\n */\n static estimateFinalizeFee(program, _function) {\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n const ptr0 = passStringToWasm0(program, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n const ptr1 = passStringToWasm0(_function, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len1 = WASM_VECTOR_LEN;\n wasm.programmanager_estimateFinalizeFee(retptr, ptr0, len0, ptr1, len1);\n var r0 = getBigInt64Memory0()[retptr / 8 + 0];\n var r2 = getInt32Memory0()[retptr / 4 + 2];\n var r3 = getInt32Memory0()[retptr / 4 + 3];\n if (r3) {\n throw takeObject(r2);\n }\n return BigInt.asUintN(64, r0);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n }\n }\n /**\n * Join two records together to create a new record with an amount of credits equal to the sum\n * of the credits of the two original records\n *\n * @param private_key The private key of the sender\n * @param record_1 The first record to combine\n * @param record_2 The second record to combine\n * @param fee_credits The amount of credits to pay as a fee\n * @param fee_record The record to spend the fee from\n * @param url The url of the Aleo network node to send the transaction to\n * @param join_proving_key (optional) Provide a proving key to use for the join function\n * @param join_verifying_key (optional) Provide a verifying key to use for the join function\n * @param fee_proving_key (optional) Provide a proving key to use for the fee execution\n * @param fee_verifying_key (optional) Provide a verifying key to use for the fee execution\n * @returns {Transaction | Error} Transaction object\n * @param {PrivateKey} private_key\n * @param {RecordPlaintext} record_1\n * @param {RecordPlaintext} record_2\n * @param {number} fee_credits\n * @param {RecordPlaintext | undefined} [fee_record]\n * @param {string | undefined} [url]\n * @param {ProvingKey | undefined} [join_proving_key]\n * @param {VerifyingKey | undefined} [join_verifying_key]\n * @param {ProvingKey | undefined} [fee_proving_key]\n * @param {VerifyingKey | undefined} [fee_verifying_key]\n * @param {OfflineQuery | undefined} [offline_query]\n * @returns {Promise}\n */\n static buildJoinTransaction(private_key, record_1, record_2, fee_credits, fee_record, url, join_proving_key, join_verifying_key, fee_proving_key, fee_verifying_key, offline_query) {\n _assertClass(private_key, PrivateKey);\n _assertClass(record_1, RecordPlaintext);\n var ptr0 = record_1.__destroy_into_raw();\n _assertClass(record_2, RecordPlaintext);\n var ptr1 = record_2.__destroy_into_raw();\n let ptr2 = 0;\n if (!isLikeNone(fee_record)) {\n _assertClass(fee_record, RecordPlaintext);\n ptr2 = fee_record.__destroy_into_raw();\n }\n var ptr3 = isLikeNone(url) ? 0 : passStringToWasm0(url, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n var len3 = WASM_VECTOR_LEN;\n let ptr4 = 0;\n if (!isLikeNone(join_proving_key)) {\n _assertClass(join_proving_key, ProvingKey);\n ptr4 = join_proving_key.__destroy_into_raw();\n }\n let ptr5 = 0;\n if (!isLikeNone(join_verifying_key)) {\n _assertClass(join_verifying_key, VerifyingKey);\n ptr5 = join_verifying_key.__destroy_into_raw();\n }\n let ptr6 = 0;\n if (!isLikeNone(fee_proving_key)) {\n _assertClass(fee_proving_key, ProvingKey);\n ptr6 = fee_proving_key.__destroy_into_raw();\n }\n let ptr7 = 0;\n if (!isLikeNone(fee_verifying_key)) {\n _assertClass(fee_verifying_key, VerifyingKey);\n ptr7 = fee_verifying_key.__destroy_into_raw();\n }\n let ptr8 = 0;\n if (!isLikeNone(offline_query)) {\n _assertClass(offline_query, OfflineQuery);\n ptr8 = offline_query.__destroy_into_raw();\n }\n const ret = wasm.programmanager_buildJoinTransaction(private_key.__wbg_ptr, ptr0, ptr1, fee_credits, ptr2, ptr3, len3, ptr4, ptr5, ptr6, ptr7, ptr8);\n return takeObject(ret);\n }\n /**\n * Split an Aleo credits record into two separate records. This function does not require a fee.\n *\n * @param private_key The private key of the sender\n * @param split_amount The amount of the credit split. This amount will be subtracted from the\n * value of the record and two new records will be created with the split amount and the remainder\n * @param amount_record The record to split\n * @param url The url of the Aleo network node to send the transaction to\n * @param split_proving_key (optional) Provide a proving key to use for the split function\n * @param split_verifying_key (optional) Provide a verifying key to use for the split function\n * @returns {Transaction | Error} Transaction object\n * @param {PrivateKey} private_key\n * @param {number} split_amount\n * @param {RecordPlaintext} amount_record\n * @param {string | undefined} [url]\n * @param {ProvingKey | undefined} [split_proving_key]\n * @param {VerifyingKey | undefined} [split_verifying_key]\n * @param {OfflineQuery | undefined} [offline_query]\n * @returns {Promise}\n */\n static buildSplitTransaction(private_key, split_amount, amount_record, url, split_proving_key, split_verifying_key, offline_query) {\n _assertClass(private_key, PrivateKey);\n _assertClass(amount_record, RecordPlaintext);\n var ptr0 = amount_record.__destroy_into_raw();\n var ptr1 = isLikeNone(url) ? 0 : passStringToWasm0(url, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n var len1 = WASM_VECTOR_LEN;\n let ptr2 = 0;\n if (!isLikeNone(split_proving_key)) {\n _assertClass(split_proving_key, ProvingKey);\n ptr2 = split_proving_key.__destroy_into_raw();\n }\n let ptr3 = 0;\n if (!isLikeNone(split_verifying_key)) {\n _assertClass(split_verifying_key, VerifyingKey);\n ptr3 = split_verifying_key.__destroy_into_raw();\n }\n let ptr4 = 0;\n if (!isLikeNone(offline_query)) {\n _assertClass(offline_query, OfflineQuery);\n ptr4 = offline_query.__destroy_into_raw();\n }\n const ret = wasm.programmanager_buildSplitTransaction(private_key.__wbg_ptr, split_amount, ptr0, ptr1, len1, ptr2, ptr3, ptr4);\n return takeObject(ret);\n }\n /**\n * Send credits from one Aleo account to another\n *\n * @param private_key The private key of the sender\n * @param amount_credits The amount of credits to send\n * @param recipient The recipient of the transaction\n * @param transfer_type The type of the transfer (options: \"private\", \"public\", \"private_to_public\", \"public_to_private\")\n * @param amount_record The record to fund the amount from\n * @param fee_credits The amount of credits to pay as a fee\n * @param fee_record The record to spend the fee from\n * @param url The url of the Aleo network node to send the transaction to\n * @param transfer_verifying_key (optional) Provide a verifying key to use for the transfer\n * function\n * @param fee_proving_key (optional) Provide a proving key to use for the fee execution\n * @param fee_verifying_key (optional) Provide a verifying key to use for the fee execution\n * @returns {Transaction | Error}\n * @param {PrivateKey} private_key\n * @param {number} amount_credits\n * @param {string} recipient\n * @param {string} transfer_type\n * @param {RecordPlaintext | undefined} amount_record\n * @param {number} fee_credits\n * @param {RecordPlaintext | undefined} [fee_record]\n * @param {string | undefined} [url]\n * @param {ProvingKey | undefined} [transfer_proving_key]\n * @param {VerifyingKey | undefined} [transfer_verifying_key]\n * @param {ProvingKey | undefined} [fee_proving_key]\n * @param {VerifyingKey | undefined} [fee_verifying_key]\n * @param {OfflineQuery | undefined} [offline_query]\n * @returns {Promise}\n */\n static buildTransferTransaction(private_key, amount_credits, recipient, transfer_type, amount_record, fee_credits, fee_record, url, transfer_proving_key, transfer_verifying_key, fee_proving_key, fee_verifying_key, offline_query) {\n _assertClass(private_key, PrivateKey);\n const ptr0 = passStringToWasm0(recipient, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n const ptr1 = passStringToWasm0(transfer_type, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len1 = WASM_VECTOR_LEN;\n let ptr2 = 0;\n if (!isLikeNone(amount_record)) {\n _assertClass(amount_record, RecordPlaintext);\n ptr2 = amount_record.__destroy_into_raw();\n }\n let ptr3 = 0;\n if (!isLikeNone(fee_record)) {\n _assertClass(fee_record, RecordPlaintext);\n ptr3 = fee_record.__destroy_into_raw();\n }\n var ptr4 = isLikeNone(url) ? 0 : passStringToWasm0(url, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n var len4 = WASM_VECTOR_LEN;\n let ptr5 = 0;\n if (!isLikeNone(transfer_proving_key)) {\n _assertClass(transfer_proving_key, ProvingKey);\n ptr5 = transfer_proving_key.__destroy_into_raw();\n }\n let ptr6 = 0;\n if (!isLikeNone(transfer_verifying_key)) {\n _assertClass(transfer_verifying_key, VerifyingKey);\n ptr6 = transfer_verifying_key.__destroy_into_raw();\n }\n let ptr7 = 0;\n if (!isLikeNone(fee_proving_key)) {\n _assertClass(fee_proving_key, ProvingKey);\n ptr7 = fee_proving_key.__destroy_into_raw();\n }\n let ptr8 = 0;\n if (!isLikeNone(fee_verifying_key)) {\n _assertClass(fee_verifying_key, VerifyingKey);\n ptr8 = fee_verifying_key.__destroy_into_raw();\n }\n let ptr9 = 0;\n if (!isLikeNone(offline_query)) {\n _assertClass(offline_query, OfflineQuery);\n ptr9 = offline_query.__destroy_into_raw();\n }\n const ret = wasm.programmanager_buildTransferTransaction(private_key.__wbg_ptr, amount_credits, ptr0, len0, ptr1, len1, ptr2, fee_credits, ptr3, ptr4, len4, ptr5, ptr6, ptr7, ptr8, ptr9);\n return takeObject(ret);\n }\n /**\n * Synthesize proving and verifying keys for a program\n *\n * @param program {string} The program source code of the program to synthesize keys for\n * @param function_id {string} The function to synthesize keys for\n * @param inputs {Array} The inputs to the function\n * @param imports {Object | undefined} The imports for the program\n * @param {PrivateKey} private_key\n * @param {string} program\n * @param {string} function_id\n * @param {Array} inputs\n * @param {object | undefined} [imports]\n * @returns {Promise}\n */\n static synthesizeKeyPair(private_key, program, function_id, inputs, imports) {\n _assertClass(private_key, PrivateKey);\n const ptr0 = passStringToWasm0(program, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n const ptr1 = passStringToWasm0(function_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len1 = WASM_VECTOR_LEN;\n const ret = wasm.programmanager_synthesizeKeyPair(private_key.__wbg_ptr, ptr0, len0, ptr1, len1, addHeapObject(inputs), isLikeNone(imports) ? 0 : addHeapObject(imports));\n return takeObject(ret);\n }\n}\n\nconst ProvingKeyFinalization = (typeof FinalizationRegistry === 'undefined')\n ? { register: () => {}, unregister: () => {} }\n : new FinalizationRegistry(ptr => wasm.__wbg_provingkey_free(ptr >>> 0));\n/**\n* Proving key for a function within an Aleo program\n*/\nclass ProvingKey {\n\n static __wrap(ptr) {\n ptr = ptr >>> 0;\n const obj = Object.create(ProvingKey.prototype);\n obj.__wbg_ptr = ptr;\n ProvingKeyFinalization.register(obj, obj.__wbg_ptr, obj);\n return obj;\n }\n\n __destroy_into_raw() {\n const ptr = this.__wbg_ptr;\n this.__wbg_ptr = 0;\n ProvingKeyFinalization.unregister(this);\n return ptr;\n }\n\n free() {\n const ptr = this.__destroy_into_raw();\n wasm.__wbg_provingkey_free(ptr);\n }\n /**\n * Verify if the proving key is for the bond_public function\n *\n * @example\n * const provingKey = ProvingKey.fromBytes(\"bond_public_proving_key.bin\");\n * provingKey.isBondPublicProver() ? console.log(\"Key verified\") : throw new Error(\"Invalid key\");\n *\n * @returns {boolean} returns true if the proving key is for the bond_public function, false if otherwise\n * @returns {boolean}\n */\n isBondPublicProver() {\n const ret = wasm.provingkey_isBondPublicProver(this.__wbg_ptr);\n return ret !== 0;\n }\n /**\n * Verify if the proving key is for the bond_validator function\n *\n * @example\n * const provingKey = ProvingKey.fromBytes(\"bond_validator_proving_key.bin\");\n * provingKey.isBondPublicProver() ? console.log(\"Key verified\") : throw new Error(\"Invalid key\");\n *\n * @returns {boolean} returns true if the proving key is for the bond_validator function, false if otherwise\n * @returns {boolean}\n */\n isBondValidatorProver() {\n const ret = wasm.provingkey_isBondValidatorProver(this.__wbg_ptr);\n return ret !== 0;\n }\n /**\n * Verify if the proving key is for the claim_unbond function\n *\n * @example\n * const provingKey = ProvingKey.fromBytes(\"claim_unbond_proving_key.bin\");\n * provingKey.isClaimUnbondProver() ? console.log(\"Key verified\") : throw new Error(\"Invalid key\");\n *\n * @returns {boolean} returns true if the proving key is for the claim_unbond function, false if otherwise\n * @returns {boolean}\n */\n isClaimUnbondPublicProver() {\n const ret = wasm.provingkey_isClaimUnbondPublicProver(this.__wbg_ptr);\n return ret !== 0;\n }\n /**\n * Verify if the proving key is for the fee_private function\n *\n * @example\n * const provingKey = ProvingKey.fromBytes(\"fee_private_proving_key.bin\");\n * provingKey.isFeePrivateProver() ? console.log(\"Key verified\") : throw new Error(\"Invalid key\");\n *\n * @returns {boolean} returns true if the proving key is for the fee_private function, false if otherwise\n * @returns {boolean}\n */\n isFeePrivateProver() {\n const ret = wasm.provingkey_isFeePrivateProver(this.__wbg_ptr);\n return ret !== 0;\n }\n /**\n * Verify if the proving key is for the fee_public function\n *\n * @example\n * const provingKey = ProvingKey.fromBytes(\"fee_public_proving_key.bin\");\n * provingKey.isFeePublicProver() ? console.log(\"Key verified\") : throw new Error(\"Invalid key\");\n *\n * @returns {boolean} returns true if the proving key is for the fee_public function, false if otherwise\n * @returns {boolean}\n */\n isFeePublicProver() {\n const ret = wasm.provingkey_isFeePublicProver(this.__wbg_ptr);\n return ret !== 0;\n }\n /**\n * Verify if the proving key is for the inclusion function\n *\n * @example\n * const provingKey = ProvingKey.fromBytes(\"inclusion_proving_key.bin\");\n * provingKey.isInclusionProver() ? console.log(\"Key verified\") : throw new Error(\"Invalid key\");\n *\n * @returns {boolean} returns true if the proving key is for the inclusion function, false if otherwise\n * @returns {boolean}\n */\n isInclusionProver() {\n const ret = wasm.provingkey_isInclusionProver(this.__wbg_ptr);\n return ret !== 0;\n }\n /**\n * Verify if the proving key is for the join function\n *\n * @example\n * const provingKey = ProvingKey.fromBytes(\"join_proving_key.bin\");\n * provingKey.isJoinProver() ? console.log(\"Key verified\") : throw new Error(\"Invalid key\");\n *\n * @returns {boolean} returns true if the proving key is for the join function, false if otherwise\n * @returns {boolean}\n */\n isJoinProver() {\n const ret = wasm.provingkey_isJoinProver(this.__wbg_ptr);\n return ret !== 0;\n }\n /**\n * Verify if the proving key is for the set_validator_state function\n *\n * @example\n * const provingKey = ProvingKey.fromBytes(\"set_validator_set_proving_key.bin\");\n * provingKey.isSetValidatorStateProver() ? console.log(\"Key verified\") : throw new Error(\"Invalid key\");\n *\n * @returns {boolean} returns true if the proving key is for the set_validator_state function, false if otherwise\n * @returns {boolean}\n */\n isSetValidatorStateProver() {\n const ret = wasm.provingkey_isSetValidatorStateProver(this.__wbg_ptr);\n return ret !== 0;\n }\n /**\n * Verify if the proving key is for the split function\n *\n * @example\n * const provingKey = ProvingKey.fromBytes(\"split_proving_key.bin\");\n * provingKey.isSplitProver() ? console.log(\"Key verified\") : throw new Error(\"Invalid key\");\n *\n * @returns {boolean} returns true if the proving key is for the split function, false if otherwise\n * @returns {boolean}\n */\n isSplitProver() {\n const ret = wasm.provingkey_isSplitProver(this.__wbg_ptr);\n return ret !== 0;\n }\n /**\n * Verify if the proving key is for the transfer_private function\n *\n * @example\n * const provingKey = ProvingKey.fromBytes(\"transfer_private_proving_key.bin\");\n * provingKey.isTransferPrivateProver() ? console.log(\"Key verified\") : throw new Error(\"Invalid key\");\n *\n * @returns {boolean} returns true if the proving key is for the transfer_private function, false if otherwise\n * @returns {boolean}\n */\n isTransferPrivateProver() {\n const ret = wasm.provingkey_isTransferPrivateProver(this.__wbg_ptr);\n return ret !== 0;\n }\n /**\n * Verify if the proving key is for the transfer_private_to_public function\n *\n * @example\n * const provingKey = ProvingKey.fromBytes(\"transfer_private_to_public_proving_key.bin\");\n * provingKey.isTransferPrivateToPublicProver() ? console.log(\"Key verified\") : throw new Error(\"Invalid key\");\n *\n * @returns {boolean} returns true if the proving key is for the transfer_private_to_public function, false if otherwise\n * @returns {boolean}\n */\n isTransferPrivateToPublicProver() {\n const ret = wasm.provingkey_isTransferPrivateToPublicProver(this.__wbg_ptr);\n return ret !== 0;\n }\n /**\n * Verify if the proving key is for the transfer_public function\n *\n * @example\n * const provingKey = ProvingKey.fromBytes(\"transfer_public_proving_key.bin\");\n * provingKey.isTransferPublicProver() ? console.log(\"Key verified\") : throw new Error(\"Invalid key\");\n *\n * @returns {boolean} returns true if the proving key is for the transfer_public function, false if otherwise\n * @returns {boolean}\n */\n isTransferPublicProver() {\n const ret = wasm.provingkey_isTransferPublicProver(this.__wbg_ptr);\n return ret !== 0;\n }\n /**\n * Verify if the proving key is for the transfer_public_as_signer function\n *\n * @example\n * const provingKey = ProvingKey.fromBytes(\"transfer_public_as_signer_proving_key.bin\");\n * provingKey.isTransferPublicAsSignerProver() ? console.log(\"Key verified\") : throw new Error(\"Invalid key\");\n *\n * @returns {boolean} returns true if the proving key is for the transfer_public function, false if otherwise\n * @returns {boolean}\n */\n isTransferPublicAsSignerProver() {\n const ret = wasm.provingkey_isTransferPublicAsSignerProver(this.__wbg_ptr);\n return ret !== 0;\n }\n /**\n * Verify if the proving key is for the transfer_public_to_private function\n *\n * @example\n * const provingKey = ProvingKey.fromBytes(\"transfer_public_to_private_proving_key.bin\");\n * provingKey.isTransferPublicToPrivateProver() ? console.log(\"Key verified\") : throw new Error(\"Invalid key\");\n *\n * @returns {boolean} returns true if the proving key is for the transfer_public_to_private function, false if otherwise\n * @returns {boolean}\n */\n isTransferPublicToPrivateProver() {\n const ret = wasm.provingkey_isTransferPublicToPrivateProver(this.__wbg_ptr);\n return ret !== 0;\n }\n /**\n * Verify if the proving key is for the unbond_public function\n *\n * @example\n * const provingKey = ProvingKey.fromBytes(\"unbond_public.bin\");\n * provingKey.isUnbondPublicProver() ? console.log(\"Key verified\") : throw new Error(\"Invalid key\");\n *\n * @returns {boolean} returns true if the proving key is for the unbond_public_prover function, false if otherwise\n * @returns {boolean}\n */\n isUnbondPublicProver() {\n const ret = wasm.provingkey_isUnbondPublicProver(this.__wbg_ptr);\n return ret !== 0;\n }\n /**\n * Return the checksum of the proving key\n *\n * @returns {string} Checksum of the proving key\n * @returns {string}\n */\n checksum() {\n let deferred1_0;\n let deferred1_1;\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n wasm.provingkey_checksum(retptr, this.__wbg_ptr);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n deferred1_0 = r0;\n deferred1_1 = r1;\n return getStringFromWasm0(r0, r1);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);\n }\n }\n /**\n * Create a copy of the proving key\n *\n * @returns {ProvingKey} A copy of the proving key\n * @returns {ProvingKey}\n */\n copy() {\n const ret = wasm.provingkey_copy(this.__wbg_ptr);\n return ProvingKey.__wrap(ret);\n }\n /**\n * Construct a new proving key from a byte array\n *\n * @param {Uint8Array} bytes Byte array representation of a proving key\n * @returns {ProvingKey | Error}\n * @param {Uint8Array} bytes\n * @returns {ProvingKey}\n */\n static fromBytes(bytes) {\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n const ptr0 = passArray8ToWasm0(bytes, wasm.__wbindgen_malloc);\n const len0 = WASM_VECTOR_LEN;\n wasm.provingkey_fromBytes(retptr, ptr0, len0);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n var r2 = getInt32Memory0()[retptr / 4 + 2];\n if (r2) {\n throw takeObject(r1);\n }\n return ProvingKey.__wrap(r0);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n }\n }\n /**\n * Create a proving key from string\n *\n * @param {string | Error} String representation of the proving key\n * @param {string} string\n * @returns {ProvingKey}\n */\n static fromString(string) {\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n const ptr0 = passStringToWasm0(string, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n wasm.provingkey_fromString(retptr, ptr0, len0);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n var r2 = getInt32Memory0()[retptr / 4 + 2];\n if (r2) {\n throw takeObject(r1);\n }\n return ProvingKey.__wrap(r0);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n }\n }\n /**\n * Return the byte representation of a proving key\n *\n * @returns {Uint8Array | Error} Byte array representation of a proving key\n * @returns {Uint8Array}\n */\n toBytes() {\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n wasm.provingkey_toBytes(retptr, this.__wbg_ptr);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n var r2 = getInt32Memory0()[retptr / 4 + 2];\n var r3 = getInt32Memory0()[retptr / 4 + 3];\n if (r3) {\n throw takeObject(r2);\n }\n var v1 = getArrayU8FromWasm0(r0, r1).slice();\n wasm.__wbindgen_free(r0, r1 * 1, 1);\n return v1;\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n }\n }\n /**\n * Get a string representation of the proving key\n *\n * @returns {string} String representation of the proving key\n * @returns {string}\n */\n toString() {\n let deferred1_0;\n let deferred1_1;\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n wasm.provingkey_toString(retptr, this.__wbg_ptr);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n deferred1_0 = r0;\n deferred1_1 = r1;\n return getStringFromWasm0(r0, r1);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);\n }\n }\n}\n\nconst RecordCiphertextFinalization = (typeof FinalizationRegistry === 'undefined')\n ? { register: () => {}, unregister: () => {} }\n : new FinalizationRegistry(ptr => wasm.__wbg_recordciphertext_free(ptr >>> 0));\n/**\n* Encrypted Aleo record\n*/\nclass RecordCiphertext {\n\n static __wrap(ptr) {\n ptr = ptr >>> 0;\n const obj = Object.create(RecordCiphertext.prototype);\n obj.__wbg_ptr = ptr;\n RecordCiphertextFinalization.register(obj, obj.__wbg_ptr, obj);\n return obj;\n }\n\n __destroy_into_raw() {\n const ptr = this.__wbg_ptr;\n this.__wbg_ptr = 0;\n RecordCiphertextFinalization.unregister(this);\n return ptr;\n }\n\n free() {\n const ptr = this.__destroy_into_raw();\n wasm.__wbg_recordciphertext_free(ptr);\n }\n /**\n * Create a record ciphertext from a string\n *\n * @param {string} record String representation of a record ciphertext\n * @returns {RecordCiphertext | Error} Record ciphertext\n * @param {string} record\n * @returns {RecordCiphertext}\n */\n static fromString(record) {\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n const ptr0 = passStringToWasm0(record, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n wasm.recordciphertext_fromString(retptr, ptr0, len0);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n var r2 = getInt32Memory0()[retptr / 4 + 2];\n if (r2) {\n throw takeObject(r1);\n }\n return RecordCiphertext.__wrap(r0);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n }\n }\n /**\n * Return the string reprensentation of the record ciphertext\n *\n * @returns {string} String representation of the record ciphertext\n * @returns {string}\n */\n toString() {\n let deferred1_0;\n let deferred1_1;\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n wasm.recordciphertext_toString(retptr, this.__wbg_ptr);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n deferred1_0 = r0;\n deferred1_1 = r1;\n return getStringFromWasm0(r0, r1);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);\n }\n }\n /**\n * Decrypt the record ciphertext into plaintext using the view key. The record will only\n * decrypt if the record was encrypted by the account corresponding to the view key\n *\n * @param {ViewKey} view_key View key used to decrypt the ciphertext\n * @returns {RecordPlaintext | Error} Record plaintext object\n * @param {ViewKey} view_key\n * @returns {RecordPlaintext}\n */\n decrypt(view_key) {\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n _assertClass(view_key, ViewKey);\n wasm.recordciphertext_decrypt(retptr, this.__wbg_ptr, view_key.__wbg_ptr);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n var r2 = getInt32Memory0()[retptr / 4 + 2];\n if (r2) {\n throw takeObject(r1);\n }\n return RecordPlaintext.__wrap(r0);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n }\n }\n /**\n * Determines if the account corresponding to the view key is the owner of the record\n *\n * @param {ViewKey} view_key View key used to decrypt the ciphertext\n * @returns {boolean}\n * @param {ViewKey} view_key\n * @returns {boolean}\n */\n isOwner(view_key) {\n _assertClass(view_key, ViewKey);\n const ret = wasm.recordciphertext_isOwner(this.__wbg_ptr, view_key.__wbg_ptr);\n return ret !== 0;\n }\n}\n\nconst RecordPlaintextFinalization = (typeof FinalizationRegistry === 'undefined')\n ? { register: () => {}, unregister: () => {} }\n : new FinalizationRegistry(ptr => wasm.__wbg_recordplaintext_free(ptr >>> 0));\n/**\n* Plaintext representation of an Aleo record\n*/\nclass RecordPlaintext {\n\n static __wrap(ptr) {\n ptr = ptr >>> 0;\n const obj = Object.create(RecordPlaintext.prototype);\n obj.__wbg_ptr = ptr;\n RecordPlaintextFinalization.register(obj, obj.__wbg_ptr, obj);\n return obj;\n }\n\n __destroy_into_raw() {\n const ptr = this.__wbg_ptr;\n this.__wbg_ptr = 0;\n RecordPlaintextFinalization.unregister(this);\n return ptr;\n }\n\n free() {\n const ptr = this.__destroy_into_raw();\n wasm.__wbg_recordplaintext_free(ptr);\n }\n /**\n * @param {string} program_id\n * @param {string} record_name\n * @returns {Field}\n */\n commitment(program_id, record_name) {\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n const ptr0 = passStringToWasm0(program_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n const ptr1 = passStringToWasm0(record_name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len1 = WASM_VECTOR_LEN;\n wasm.recordplaintext_commitment(retptr, this.__wbg_ptr, ptr0, len0, ptr1, len1);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n var r2 = getInt32Memory0()[retptr / 4 + 2];\n if (r2) {\n throw takeObject(r1);\n }\n return Field.__wrap(r0);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n }\n }\n /**\n * Return a record plaintext from a string.\n *\n * @param {string} record String representation of a plaintext representation of an Aleo record\n * @returns {RecordPlaintext | Error} Record plaintext\n * @param {string} record\n * @returns {RecordPlaintext}\n */\n static fromString(record) {\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n const ptr0 = passStringToWasm0(record, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n wasm.recordplaintext_fromString(retptr, ptr0, len0);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n var r2 = getInt32Memory0()[retptr / 4 + 2];\n if (r2) {\n throw takeObject(r1);\n }\n return RecordPlaintext.__wrap(r0);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n }\n }\n /**\n * Returns the record plaintext string\n *\n * @returns {string} String representation of the record plaintext\n * @returns {string}\n */\n toString() {\n let deferred1_0;\n let deferred1_1;\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n wasm.recordplaintext_toString(retptr, this.__wbg_ptr);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n deferred1_0 = r0;\n deferred1_1 = r1;\n return getStringFromWasm0(r0, r1);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);\n }\n }\n /**\n * Returns the amount of microcredits in the record\n *\n * @returns {u64} Amount of microcredits in the record\n * @returns {bigint}\n */\n microcredits() {\n const ret = wasm.recordplaintext_microcredits(this.__wbg_ptr);\n return BigInt.asUintN(64, ret);\n }\n /**\n * Returns the nonce of the record. This can be used to uniquely identify a record.\n *\n * @returns {string} Nonce of the record\n * @returns {string}\n */\n nonce() {\n let deferred1_0;\n let deferred1_1;\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n wasm.recordplaintext_nonce(retptr, this.__wbg_ptr);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n deferred1_0 = r0;\n deferred1_1 = r1;\n return getStringFromWasm0(r0, r1);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);\n }\n }\n /**\n * Attempt to get the serial number of a record to determine whether or not is has been spent\n *\n * @param {PrivateKey} private_key Private key of the account that owns the record\n * @param {string} program_id Program ID of the program that the record is associated with\n * @param {string} record_name Name of the record\n * @returns {string | Error} Serial number of the record\n * @param {PrivateKey} private_key\n * @param {string} program_id\n * @param {string} record_name\n * @returns {string}\n */\n serialNumberString(private_key, program_id, record_name) {\n let deferred4_0;\n let deferred4_1;\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n _assertClass(private_key, PrivateKey);\n const ptr0 = passStringToWasm0(program_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n const ptr1 = passStringToWasm0(record_name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len1 = WASM_VECTOR_LEN;\n wasm.recordplaintext_serialNumberString(retptr, this.__wbg_ptr, private_key.__wbg_ptr, ptr0, len0, ptr1, len1);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n var r2 = getInt32Memory0()[retptr / 4 + 2];\n var r3 = getInt32Memory0()[retptr / 4 + 3];\n var ptr3 = r0;\n var len3 = r1;\n if (r3) {\n ptr3 = 0; len3 = 0;\n throw takeObject(r2);\n }\n deferred4_0 = ptr3;\n deferred4_1 = len3;\n return getStringFromWasm0(ptr3, len3);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n wasm.__wbindgen_free(deferred4_0, deferred4_1, 1);\n }\n }\n}\n\nconst SignatureFinalization = (typeof FinalizationRegistry === 'undefined')\n ? { register: () => {}, unregister: () => {} }\n : new FinalizationRegistry(ptr => wasm.__wbg_signature_free(ptr >>> 0));\n/**\n* Cryptographic signature of a message signed by an Aleo account\n*/\nclass Signature {\n\n static __wrap(ptr) {\n ptr = ptr >>> 0;\n const obj = Object.create(Signature.prototype);\n obj.__wbg_ptr = ptr;\n SignatureFinalization.register(obj, obj.__wbg_ptr, obj);\n return obj;\n }\n\n __destroy_into_raw() {\n const ptr = this.__wbg_ptr;\n this.__wbg_ptr = 0;\n SignatureFinalization.unregister(this);\n return ptr;\n }\n\n free() {\n const ptr = this.__destroy_into_raw();\n wasm.__wbg_signature_free(ptr);\n }\n /**\n * Sign a message with a private key\n *\n * @param {PrivateKey} private_key The private key to sign the message with\n * @param {Uint8Array} message Byte representation of the message to sign\n * @returns {Signature} Signature of the message\n * @param {PrivateKey} private_key\n * @param {Uint8Array} message\n * @returns {Signature}\n */\n static sign(private_key, message) {\n _assertClass(private_key, PrivateKey);\n const ptr0 = passArray8ToWasm0(message, wasm.__wbindgen_malloc);\n const len0 = WASM_VECTOR_LEN;\n const ret = wasm.privatekey_sign(private_key.__wbg_ptr, ptr0, len0);\n return Signature.__wrap(ret);\n }\n /**\n * Verify a signature of a message with an address\n *\n * @param {Address} address The address to verify the signature with\n * @param {Uint8Array} message Byte representation of the message to verify\n * @returns {boolean} True if the signature is valid, false otherwise\n * @param {Address} address\n * @param {Uint8Array} message\n * @returns {boolean}\n */\n verify(address, message) {\n _assertClass(address, Address);\n const ptr0 = passArray8ToWasm0(message, wasm.__wbindgen_malloc);\n const len0 = WASM_VECTOR_LEN;\n const ret = wasm.signature_verify(this.__wbg_ptr, address.__wbg_ptr, ptr0, len0);\n return ret !== 0;\n }\n /**\n * Get a signature from a string representation of a signature\n *\n * @param {string} signature String representation of a signature\n * @returns {Signature} Signature\n * @param {string} signature\n * @returns {Signature}\n */\n static from_string(signature) {\n const ptr0 = passStringToWasm0(signature, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n const ret = wasm.signature_from_string(ptr0, len0);\n return Signature.__wrap(ret);\n }\n /**\n * Get a string representation of a signature\n *\n * @returns {string} String representation of a signature\n * @returns {string}\n */\n to_string() {\n let deferred1_0;\n let deferred1_1;\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n wasm.signature_to_string(retptr, this.__wbg_ptr);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n deferred1_0 = r0;\n deferred1_1 = r1;\n return getStringFromWasm0(r0, r1);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);\n }\n }\n}\n\nconst TransactionFinalization = (typeof FinalizationRegistry === 'undefined')\n ? { register: () => {}, unregister: () => {} }\n : new FinalizationRegistry(ptr => wasm.__wbg_transaction_free(ptr >>> 0));\n/**\n* Webassembly Representation of an Aleo transaction\n*\n* This object is created when generating an on-chain function deployment or execution and is the\n* object that should be submitted to the Aleo Network in order to deploy or execute a function.\n*/\nclass Transaction {\n\n static __wrap(ptr) {\n ptr = ptr >>> 0;\n const obj = Object.create(Transaction.prototype);\n obj.__wbg_ptr = ptr;\n TransactionFinalization.register(obj, obj.__wbg_ptr, obj);\n return obj;\n }\n\n __destroy_into_raw() {\n const ptr = this.__wbg_ptr;\n this.__wbg_ptr = 0;\n TransactionFinalization.unregister(this);\n return ptr;\n }\n\n free() {\n const ptr = this.__destroy_into_raw();\n wasm.__wbg_transaction_free(ptr);\n }\n /**\n * Create a transaction from a string\n *\n * @param {string} transaction String representation of a transaction\n * @returns {Transaction | Error}\n * @param {string} transaction\n * @returns {Transaction}\n */\n static fromString(transaction) {\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n const ptr0 = passStringToWasm0(transaction, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n wasm.transaction_fromString(retptr, ptr0, len0);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n var r2 = getInt32Memory0()[retptr / 4 + 2];\n if (r2) {\n throw takeObject(r1);\n }\n return Transaction.__wrap(r0);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n }\n }\n /**\n * Get the transaction as a string. If you want to submit this transaction to the Aleo Network\n * this function will create the string that should be submitted in the `POST` data.\n *\n * @returns {string} String representation of the transaction\n * @returns {string}\n */\n toString() {\n let deferred1_0;\n let deferred1_1;\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n wasm.transaction_toString(retptr, this.__wbg_ptr);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n deferred1_0 = r0;\n deferred1_1 = r1;\n return getStringFromWasm0(r0, r1);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);\n }\n }\n /**\n * Get the id of the transaction. This is the merkle root of the transaction's inclusion proof.\n *\n * This value can be used to query the status of the transaction on the Aleo Network to see\n * if it was successful. If successful, the transaction will be included in a block and this\n * value can be used to lookup the transaction data on-chain.\n *\n * @returns {string} Transaction id\n * @returns {string}\n */\n transactionId() {\n let deferred1_0;\n let deferred1_1;\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n wasm.transaction_transactionId(retptr, this.__wbg_ptr);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n deferred1_0 = r0;\n deferred1_1 = r1;\n return getStringFromWasm0(r0, r1);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);\n }\n }\n /**\n * Get the type of the transaction (will return \"deploy\" or \"execute\")\n *\n * @returns {string} Transaction type\n * @returns {string}\n */\n transactionType() {\n let deferred1_0;\n let deferred1_1;\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n wasm.transaction_transactionType(retptr, this.__wbg_ptr);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n deferred1_0 = r0;\n deferred1_1 = r1;\n return getStringFromWasm0(r0, r1);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);\n }\n }\n}\n\nconst VerifyingKeyFinalization = (typeof FinalizationRegistry === 'undefined')\n ? { register: () => {}, unregister: () => {} }\n : new FinalizationRegistry(ptr => wasm.__wbg_verifyingkey_free(ptr >>> 0));\n/**\n* Verifying key for a function within an Aleo program\n*/\nclass VerifyingKey {\n\n static __wrap(ptr) {\n ptr = ptr >>> 0;\n const obj = Object.create(VerifyingKey.prototype);\n obj.__wbg_ptr = ptr;\n VerifyingKeyFinalization.register(obj, obj.__wbg_ptr, obj);\n return obj;\n }\n\n __destroy_into_raw() {\n const ptr = this.__wbg_ptr;\n this.__wbg_ptr = 0;\n VerifyingKeyFinalization.unregister(this);\n return ptr;\n }\n\n free() {\n const ptr = this.__destroy_into_raw();\n wasm.__wbg_verifyingkey_free(ptr);\n }\n /**\n * Returns the verifying key for the bond_public function\n *\n * @returns {VerifyingKey} Verifying key for the bond_public function\n * @returns {VerifyingKey}\n */\n static bondPublicVerifier() {\n const ret = wasm.verifyingkey_bondPublicVerifier();\n return VerifyingKey.__wrap(ret);\n }\n /**\n * Returns the verifying key for the bond_validator function\n *\n * @returns {VerifyingKey} Verifying key for the bond_validator function\n * @returns {VerifyingKey}\n */\n static bondValidatorVerifier() {\n const ret = wasm.verifyingkey_bondValidatorVerifier();\n return VerifyingKey.__wrap(ret);\n }\n /**\n * Returns the verifying key for the claim_delegator function\n *\n * @returns {VerifyingKey} Verifying key for the claim_unbond_public function\n * @returns {VerifyingKey}\n */\n static claimUnbondPublicVerifier() {\n const ret = wasm.verifyingkey_claimUnbondPublicVerifier();\n return VerifyingKey.__wrap(ret);\n }\n /**\n * Returns the verifying key for the fee_private function\n *\n * @returns {VerifyingKey} Verifying key for the fee_private function\n * @returns {VerifyingKey}\n */\n static feePrivateVerifier() {\n const ret = wasm.verifyingkey_feePrivateVerifier();\n return VerifyingKey.__wrap(ret);\n }\n /**\n * Returns the verifying key for the fee_public function\n *\n * @returns {VerifyingKey} Verifying key for the fee_public function\n * @returns {VerifyingKey}\n */\n static feePublicVerifier() {\n const ret = wasm.verifyingkey_feePublicVerifier();\n return VerifyingKey.__wrap(ret);\n }\n /**\n * Returns the verifying key for the inclusion function\n *\n * @returns {VerifyingKey} Verifying key for the inclusion function\n * @returns {VerifyingKey}\n */\n static inclusionVerifier() {\n const ret = wasm.verifyingkey_inclusionVerifier();\n return VerifyingKey.__wrap(ret);\n }\n /**\n * Returns the verifying key for the join function\n *\n * @returns {VerifyingKey} Verifying key for the join function\n * @returns {VerifyingKey}\n */\n static joinVerifier() {\n const ret = wasm.verifyingkey_joinVerifier();\n return VerifyingKey.__wrap(ret);\n }\n /**\n * Returns the verifying key for the set_validator_state function\n *\n * @returns {VerifyingKey} Verifying key for the set_validator_state function\n * @returns {VerifyingKey}\n */\n static setValidatorStateVerifier() {\n const ret = wasm.verifyingkey_setValidatorStateVerifier();\n return VerifyingKey.__wrap(ret);\n }\n /**\n * Returns the verifying key for the split function\n *\n * @returns {VerifyingKey} Verifying key for the split function\n * @returns {VerifyingKey}\n */\n static splitVerifier() {\n const ret = wasm.verifyingkey_splitVerifier();\n return VerifyingKey.__wrap(ret);\n }\n /**\n * Returns the verifying key for the transfer_private function\n *\n * @returns {VerifyingKey} Verifying key for the transfer_private function\n * @returns {VerifyingKey}\n */\n static transferPrivateVerifier() {\n const ret = wasm.verifyingkey_transferPrivateVerifier();\n return VerifyingKey.__wrap(ret);\n }\n /**\n * Returns the verifying key for the transfer_private_to_public function\n *\n * @returns {VerifyingKey} Verifying key for the transfer_private_to_public function\n * @returns {VerifyingKey}\n */\n static transferPrivateToPublicVerifier() {\n const ret = wasm.verifyingkey_transferPrivateToPublicVerifier();\n return VerifyingKey.__wrap(ret);\n }\n /**\n * Returns the verifying key for the transfer_public function\n *\n * @returns {VerifyingKey} Verifying key for the transfer_public function\n * @returns {VerifyingKey}\n */\n static transferPublicVerifier() {\n const ret = wasm.verifyingkey_transferPublicVerifier();\n return VerifyingKey.__wrap(ret);\n }\n /**\n * Returns the verifying key for the transfer_public_as_signer function\n *\n * @returns {VerifyingKey} Verifying key for the transfer_public_as_signer function\n * @returns {VerifyingKey}\n */\n static transferPublicAsSignerVerifier() {\n const ret = wasm.verifyingkey_transferPublicAsSignerVerifier();\n return VerifyingKey.__wrap(ret);\n }\n /**\n * Returns the verifying key for the transfer_public_to_private function\n *\n * @returns {VerifyingKey} Verifying key for the transfer_public_to_private function\n * @returns {VerifyingKey}\n */\n static transferPublicToPrivateVerifier() {\n const ret = wasm.verifyingkey_transferPublicToPrivateVerifier();\n return VerifyingKey.__wrap(ret);\n }\n /**\n * Returns the verifying key for the unbond_public function\n *\n * @returns {VerifyingKey} Verifying key for the unbond_public function\n * @returns {VerifyingKey}\n */\n static unbondPublicVerifier() {\n const ret = wasm.verifyingkey_unbondPublicVerifier();\n return VerifyingKey.__wrap(ret);\n }\n /**\n * Returns the verifying key for the bond_public function\n *\n * @returns {VerifyingKey} Verifying key for the bond_public function\n * @returns {boolean}\n */\n isBondPublicVerifier() {\n const ret = wasm.verifyingkey_isBondPublicVerifier(this.__wbg_ptr);\n return ret !== 0;\n }\n /**\n * Returns the verifying key for the bond_validator function\n *\n * @returns {VerifyingKey} Verifying key for the bond_validator function\n * @returns {boolean}\n */\n isBondValidatorVerifier() {\n const ret = wasm.verifyingkey_isBondValidatorVerifier(this.__wbg_ptr);\n return ret !== 0;\n }\n /**\n * Verifies the verifying key is for the claim_delegator function\n *\n * @returns {bool}\n * @returns {boolean}\n */\n isClaimUnbondPublicVerifier() {\n const ret = wasm.verifyingkey_isClaimUnbondPublicVerifier(this.__wbg_ptr);\n return ret !== 0;\n }\n /**\n * Verifies the verifying key is for the fee_private function\n *\n * @returns {bool}\n * @returns {boolean}\n */\n isFeePrivateVerifier() {\n const ret = wasm.verifyingkey_isFeePrivateVerifier(this.__wbg_ptr);\n return ret !== 0;\n }\n /**\n * Verifies the verifying key is for the fee_public function\n *\n * @returns {bool}\n * @returns {boolean}\n */\n isFeePublicVerifier() {\n const ret = wasm.verifyingkey_isFeePublicVerifier(this.__wbg_ptr);\n return ret !== 0;\n }\n /**\n * Verifies the verifying key is for the inclusion function\n *\n * @returns {bool}\n * @returns {boolean}\n */\n isInclusionVerifier() {\n const ret = wasm.verifyingkey_isInclusionVerifier(this.__wbg_ptr);\n return ret !== 0;\n }\n /**\n * Verifies the verifying key is for the join function\n *\n * @returns {bool}\n * @returns {boolean}\n */\n isJoinVerifier() {\n const ret = wasm.verifyingkey_isJoinVerifier(this.__wbg_ptr);\n return ret !== 0;\n }\n /**\n * Verifies the verifying key is for the set_validator_state function\n *\n * @returns {bool}\n * @returns {boolean}\n */\n isSetValidatorStateVerifier() {\n const ret = wasm.verifyingkey_isSetValidatorStateVerifier(this.__wbg_ptr);\n return ret !== 0;\n }\n /**\n * Verifies the verifying key is for the split function\n *\n * @returns {bool}\n * @returns {boolean}\n */\n isSplitVerifier() {\n const ret = wasm.verifyingkey_isSplitVerifier(this.__wbg_ptr);\n return ret !== 0;\n }\n /**\n * Verifies the verifying key is for the transfer_private function\n *\n * @returns {bool}\n * @returns {boolean}\n */\n isTransferPrivateVerifier() {\n const ret = wasm.verifyingkey_isTransferPrivateVerifier(this.__wbg_ptr);\n return ret !== 0;\n }\n /**\n * Verifies the verifying key is for the transfer_private_to_public function\n *\n * @returns {bool}\n * @returns {boolean}\n */\n isTransferPrivateToPublicVerifier() {\n const ret = wasm.verifyingkey_isTransferPrivateToPublicVerifier(this.__wbg_ptr);\n return ret !== 0;\n }\n /**\n * Verifies the verifying key is for the transfer_public function\n *\n * @returns {bool}\n * @returns {boolean}\n */\n isTransferPublicVerifier() {\n const ret = wasm.verifyingkey_isTransferPublicVerifier(this.__wbg_ptr);\n return ret !== 0;\n }\n /**\n * Verifies the verifying key is for the transfer_public_as_signer function\n *\n * @returns {bool}\n * @returns {boolean}\n */\n isTransferPublicAsSignerVerifier() {\n const ret = wasm.verifyingkey_isTransferPublicAsSignerVerifier(this.__wbg_ptr);\n return ret !== 0;\n }\n /**\n * Verifies the verifying key is for the transfer_public_to_private function\n *\n * @returns {bool}\n * @returns {boolean}\n */\n isTransferPublicToPrivateVerifier() {\n const ret = wasm.verifyingkey_isTransferPublicToPrivateVerifier(this.__wbg_ptr);\n return ret !== 0;\n }\n /**\n * Verifies the verifying key is for the unbond_public function\n *\n * @returns {bool}\n * @returns {boolean}\n */\n isUnbondPublicVerifier() {\n const ret = wasm.verifyingkey_isUnbondPublicVerifier(this.__wbg_ptr);\n return ret !== 0;\n }\n /**\n * Get the checksum of the verifying key\n *\n * @returns {string} Checksum of the verifying key\n * @returns {string}\n */\n checksum() {\n let deferred1_0;\n let deferred1_1;\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n wasm.verifyingkey_checksum(retptr, this.__wbg_ptr);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n deferred1_0 = r0;\n deferred1_1 = r1;\n return getStringFromWasm0(r0, r1);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);\n }\n }\n /**\n * Create a copy of the verifying key\n *\n * @returns {VerifyingKey} A copy of the verifying key\n * @returns {VerifyingKey}\n */\n copy() {\n const ret = wasm.verifyingkey_copy(this.__wbg_ptr);\n return VerifyingKey.__wrap(ret);\n }\n /**\n * Construct a new verifying key from a byte array\n *\n * @param {Uint8Array} bytes Byte representation of a verifying key\n * @returns {VerifyingKey | Error}\n * @param {Uint8Array} bytes\n * @returns {VerifyingKey}\n */\n static fromBytes(bytes) {\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n const ptr0 = passArray8ToWasm0(bytes, wasm.__wbindgen_malloc);\n const len0 = WASM_VECTOR_LEN;\n wasm.verifyingkey_fromBytes(retptr, ptr0, len0);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n var r2 = getInt32Memory0()[retptr / 4 + 2];\n if (r2) {\n throw takeObject(r1);\n }\n return VerifyingKey.__wrap(r0);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n }\n }\n /**\n * Create a verifying key from string\n *\n * @param {String} string String representation of a verifying key\n * @returns {VerifyingKey | Error}\n * @param {string} string\n * @returns {VerifyingKey}\n */\n static fromString(string) {\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n const ptr0 = passStringToWasm0(string, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n wasm.verifyingkey_fromString(retptr, ptr0, len0);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n var r2 = getInt32Memory0()[retptr / 4 + 2];\n if (r2) {\n throw takeObject(r1);\n }\n return VerifyingKey.__wrap(r0);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n }\n }\n /**\n * Create a byte array from a verifying key\n *\n * @returns {Uint8Array | Error} Byte representation of a verifying key\n * @returns {Uint8Array}\n */\n toBytes() {\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n wasm.verifyingkey_toBytes(retptr, this.__wbg_ptr);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n var r2 = getInt32Memory0()[retptr / 4 + 2];\n var r3 = getInt32Memory0()[retptr / 4 + 3];\n if (r3) {\n throw takeObject(r2);\n }\n var v1 = getArrayU8FromWasm0(r0, r1).slice();\n wasm.__wbindgen_free(r0, r1 * 1, 1);\n return v1;\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n }\n }\n /**\n * Get a string representation of the verifying key\n *\n * @returns {String} String representation of the verifying key\n * @returns {string}\n */\n toString() {\n let deferred1_0;\n let deferred1_1;\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n wasm.verifyingkey_toString(retptr, this.__wbg_ptr);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n deferred1_0 = r0;\n deferred1_1 = r1;\n return getStringFromWasm0(r0, r1);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);\n }\n }\n}\n\nconst ViewKeyFinalization = (typeof FinalizationRegistry === 'undefined')\n ? { register: () => {}, unregister: () => {} }\n : new FinalizationRegistry(ptr => wasm.__wbg_viewkey_free(ptr >>> 0));\n/**\n*/\nclass ViewKey {\n\n static __wrap(ptr) {\n ptr = ptr >>> 0;\n const obj = Object.create(ViewKey.prototype);\n obj.__wbg_ptr = ptr;\n ViewKeyFinalization.register(obj, obj.__wbg_ptr, obj);\n return obj;\n }\n\n __destroy_into_raw() {\n const ptr = this.__wbg_ptr;\n this.__wbg_ptr = 0;\n ViewKeyFinalization.unregister(this);\n return ptr;\n }\n\n free() {\n const ptr = this.__destroy_into_raw();\n wasm.__wbg_viewkey_free(ptr);\n }\n /**\n * Create a new view key from a private key\n *\n * @param {PrivateKey} private_key Private key\n * @returns {ViewKey} View key\n * @param {PrivateKey} private_key\n * @returns {ViewKey}\n */\n static from_private_key(private_key) {\n _assertClass(private_key, PrivateKey);\n const ret = wasm.privatekey_to_view_key(private_key.__wbg_ptr);\n return ViewKey.__wrap(ret);\n }\n /**\n * Create a new view key from a string representation of a view key\n *\n * @param {string} view_key String representation of a view key\n * @returns {ViewKey} View key\n * @param {string} view_key\n * @returns {ViewKey}\n */\n static from_string(view_key) {\n const ptr0 = passStringToWasm0(view_key, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n const ret = wasm.viewkey_from_string(ptr0, len0);\n return ViewKey.__wrap(ret);\n }\n /**\n * Get a string representation of a view key\n *\n * @returns {string} String representation of a view key\n * @returns {string}\n */\n to_string() {\n let deferred1_0;\n let deferred1_1;\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n wasm.viewkey_to_string(retptr, this.__wbg_ptr);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n deferred1_0 = r0;\n deferred1_1 = r1;\n return getStringFromWasm0(r0, r1);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);\n }\n }\n /**\n * Get the address corresponding to a view key\n *\n * @returns {Address} Address\n * @returns {Address}\n */\n to_address() {\n const ret = wasm.address_from_view_key(this.__wbg_ptr);\n return Address.__wrap(ret);\n }\n /**\n * Decrypt a record ciphertext with a view key\n *\n * @param {string} ciphertext String representation of a record ciphertext\n * @returns {string} String representation of a record plaintext\n * @param {string} ciphertext\n * @returns {string}\n */\n decrypt(ciphertext) {\n let deferred3_0;\n let deferred3_1;\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n const ptr0 = passStringToWasm0(ciphertext, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n wasm.viewkey_decrypt(retptr, this.__wbg_ptr, ptr0, len0);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n var r2 = getInt32Memory0()[retptr / 4 + 2];\n var r3 = getInt32Memory0()[retptr / 4 + 3];\n var ptr2 = r0;\n var len2 = r1;\n if (r3) {\n ptr2 = 0; len2 = 0;\n throw takeObject(r2);\n }\n deferred3_0 = ptr2;\n deferred3_1 = len2;\n return getStringFromWasm0(ptr2, len2);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n wasm.__wbindgen_free(deferred3_0, deferred3_1, 1);\n }\n }\n}\n\nasync function __wbg_load(module, imports) {\n if (typeof Response === 'function' && module instanceof Response) {\n if (typeof WebAssembly.instantiateStreaming === 'function') {\n try {\n return await WebAssembly.instantiateStreaming(module, imports);\n\n } catch (e) {\n if (module.headers.get('Content-Type') != 'application/wasm') {\n console.warn(\"`WebAssembly.instantiateStreaming` failed because your server does not serve wasm with `application/wasm` MIME type. Falling back to `WebAssembly.instantiate` which is slower. Original error:\\n\", e);\n\n } else {\n throw e;\n }\n }\n }\n\n const bytes = await module.arrayBuffer();\n return await WebAssembly.instantiate(bytes, imports);\n\n } else {\n const instance = await WebAssembly.instantiate(module, imports);\n\n if (instance instanceof WebAssembly.Instance) {\n return { instance, module };\n\n } else {\n return instance;\n }\n }\n}\n\nfunction __wbg_get_imports() {\n const imports = {};\n imports.wbg = {};\n imports.wbg.__wbindgen_object_drop_ref = function(arg0) {\n takeObject(arg0);\n };\n imports.wbg.__wbg_new_71801a555ad9f2aa = function() { return handleError(function () {\n const ret = new XMLHttpRequest();\n return addHeapObject(ret);\n }, arguments) };\n imports.wbg.__wbg_overrideMimeType_ee9c51919ceb418b = function() { return handleError(function (arg0, arg1, arg2) {\n getObject(arg0).overrideMimeType(getStringFromWasm0(arg1, arg2));\n }, arguments) };\n imports.wbg.__wbg_open_c9eb0cf2c9d95679 = function() { return handleError(function (arg0, arg1, arg2, arg3, arg4, arg5) {\n getObject(arg0).open(getStringFromWasm0(arg1, arg2), getStringFromWasm0(arg3, arg4), arg5 !== 0);\n }, arguments) };\n imports.wbg.__wbg_send_80d29985093c1ec5 = function() { return handleError(function (arg0) {\n getObject(arg0).send();\n }, arguments) };\n imports.wbg.__wbg_response_7c2e2759084f7279 = function() { return handleError(function (arg0) {\n const ret = getObject(arg0).response;\n return addHeapObject(ret);\n }, arguments) };\n imports.wbg.__wbg_status_d485fb5a478426fb = function() { return handleError(function (arg0) {\n const ret = getObject(arg0).status;\n return ret;\n }, arguments) };\n imports.wbg.__wbg_new_72fb9a18b5ae2624 = function() {\n const ret = new Object();\n return addHeapObject(ret);\n };\n imports.wbg.__wbindgen_string_new = function(arg0, arg1) {\n const ret = getStringFromWasm0(arg0, arg1);\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_set_1f9b04f170055d33 = function() { return handleError(function (arg0, arg1, arg2) {\n const ret = Reflect.set(getObject(arg0), getObject(arg1), getObject(arg2));\n return ret;\n }, arguments) };\n imports.wbg.__wbg_new_ab6fd82b10560829 = function() { return handleError(function () {\n const ret = new Headers();\n return addHeapObject(ret);\n }, arguments) };\n imports.wbg.__wbindgen_object_clone_ref = function(arg0) {\n const ret = getObject(arg0);\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_new_0d76b0581eca6298 = function() { return handleError(function () {\n const ret = new AbortController();\n return addHeapObject(ret);\n }, arguments) };\n imports.wbg.__wbg_signal_a61f78a3478fd9bc = function(arg0) {\n const ret = getObject(arg0).signal;\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_append_7bfcb4937d1d5e29 = function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {\n getObject(arg0).append(getStringFromWasm0(arg1, arg2), getStringFromWasm0(arg3, arg4));\n }, arguments) };\n imports.wbg.__wbg_instanceof_Response_849eb93e75734b6e = function(arg0) {\n let result;\n try {\n result = getObject(arg0) instanceof Response;\n } catch (_) {\n result = false;\n }\n const ret = result;\n return ret;\n };\n imports.wbg.__wbg_status_61a01141acd3cf74 = function(arg0) {\n const ret = getObject(arg0).status;\n return ret;\n };\n imports.wbg.__wbg_url_5f6dc4009ac5f99d = function(arg0, arg1) {\n const ret = getObject(arg1).url;\n const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len1 = WASM_VECTOR_LEN;\n getInt32Memory0()[arg0 / 4 + 1] = len1;\n getInt32Memory0()[arg0 / 4 + 0] = ptr1;\n };\n imports.wbg.__wbg_headers_9620bfada380764a = function(arg0) {\n const ret = getObject(arg0).headers;\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_iterator_2cee6dadfd956dfa = function() {\n const ret = Symbol.iterator;\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_get_e3c254076557e348 = function() { return handleError(function (arg0, arg1) {\n const ret = Reflect.get(getObject(arg0), getObject(arg1));\n return addHeapObject(ret);\n }, arguments) };\n imports.wbg.__wbindgen_is_function = function(arg0) {\n const ret = typeof(getObject(arg0)) === 'function';\n return ret;\n };\n imports.wbg.__wbg_call_27c0f87801dedf93 = function() { return handleError(function (arg0, arg1) {\n const ret = getObject(arg0).call(getObject(arg1));\n return addHeapObject(ret);\n }, arguments) };\n imports.wbg.__wbindgen_is_object = function(arg0) {\n const val = getObject(arg0);\n const ret = typeof(val) === 'object' && val !== null;\n return ret;\n };\n imports.wbg.__wbg_next_40fc327bfc8770e6 = function(arg0) {\n const ret = getObject(arg0).next;\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_next_196c84450b364254 = function() { return handleError(function (arg0) {\n const ret = getObject(arg0).next();\n return addHeapObject(ret);\n }, arguments) };\n imports.wbg.__wbg_done_298b57d23c0fc80c = function(arg0) {\n const ret = getObject(arg0).done;\n return ret;\n };\n imports.wbg.__wbg_value_d93c65011f51a456 = function(arg0) {\n const ret = getObject(arg0).value;\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_abort_2aa7521d5690750e = function(arg0) {\n getObject(arg0).abort();\n };\n imports.wbg.__wbg_stringify_8887fe74e1c50d81 = function() { return handleError(function (arg0) {\n const ret = JSON.stringify(getObject(arg0));\n return addHeapObject(ret);\n }, arguments) };\n imports.wbg.__wbindgen_string_get = function(arg0, arg1) {\n const obj = getObject(arg1);\n const ret = typeof(obj) === 'string' ? obj : undefined;\n var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n var len1 = WASM_VECTOR_LEN;\n getInt32Memory0()[arg0 / 4 + 1] = len1;\n getInt32Memory0()[arg0 / 4 + 0] = ptr1;\n };\n imports.wbg.__wbg_log_0159ca40cddf5b15 = function(arg0, arg1) {\n console.log(getStringFromWasm0(arg0, arg1));\n };\n imports.wbg.__wbindgen_bigint_from_u64 = function(arg0) {\n const ret = BigInt.asUintN(64, arg0);\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_call_b3ca7c6051f9bec1 = function() { return handleError(function (arg0, arg1, arg2) {\n const ret = getObject(arg0).call(getObject(arg1), getObject(arg2));\n return addHeapObject(ret);\n }, arguments) };\n imports.wbg.__wbg_transaction_new = function(arg0) {\n const ret = Transaction.__wrap(arg0);\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_keypair_new = function(arg0) {\n const ret = KeyPair.__wrap(arg0);\n return addHeapObject(ret);\n };\n imports.wbg.__wbindgen_module = function() {\n const ret = __wbg_init.__wbindgen_wasm_module;\n return addHeapObject(ret);\n };\n imports.wbg.__wbindgen_memory = function() {\n const ret = wasm.memory;\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_spawnWorker_f6acaddb2e29dc4a = function(arg0, arg1, arg2, arg3) {\n const ret = spawnWorker(getObject(arg0), getObject(arg1), getObject(arg2), arg3 >>> 0);\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_executionresponse_new = function(arg0) {\n const ret = ExecutionResponse.__wrap(arg0);\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_newwithlength_66ae46612e7f0234 = function(arg0) {\n const ret = new Array(arg0 >>> 0);\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_set_d4638f722068f043 = function(arg0, arg1, arg2) {\n getObject(arg0)[arg1 >>> 0] = takeObject(arg2);\n };\n imports.wbg.__wbindgen_cb_drop = function(arg0) {\n const obj = takeObject(arg0).original;\n if (obj.cnt-- == 1) {\n obj.a = 0;\n return true;\n }\n const ret = false;\n return ret;\n };\n imports.wbg.__wbg_new_16b304a2cfa7ff4a = function() {\n const ret = new Array();\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_push_a5b05aedc7234f9f = function(arg0, arg1) {\n const ret = getObject(arg0).push(getObject(arg1));\n return ret;\n };\n imports.wbg.__wbg_arrayBuffer_29931d52c7206b02 = function() { return handleError(function (arg0) {\n const ret = getObject(arg0).arrayBuffer();\n return addHeapObject(ret);\n }, arguments) };\n imports.wbg.__wbg_new_63b92bc8671ed464 = function(arg0) {\n const ret = new Uint8Array(getObject(arg0));\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_length_c20a40f15020d68a = function(arg0) {\n const ret = getObject(arg0).length;\n return ret;\n };\n imports.wbg.__wbg_new_81740750da40724f = function(arg0, arg1) {\n try {\n var state0 = {a: arg0, b: arg1};\n var cb0 = (arg0, arg1) => {\n const a = state0.a;\n state0.a = 0;\n try {\n return __wbg_adapter_281(a, state0.b, arg0, arg1);\n } finally {\n state0.a = a;\n }\n };\n const ret = new Promise(cb0);\n return addHeapObject(ret);\n } finally {\n state0.a = state0.b = 0;\n }\n };\n imports.wbg.__wbindgen_number_new = function(arg0) {\n const ret = arg0;\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_new_abda76e883ba8a5f = function() {\n const ret = new Error();\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_stack_658279fe44541cf6 = function(arg0, arg1) {\n const ret = getObject(arg1).stack;\n const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len1 = WASM_VECTOR_LEN;\n getInt32Memory0()[arg0 / 4 + 1] = len1;\n getInt32Memory0()[arg0 / 4 + 0] = ptr1;\n };\n imports.wbg.__wbg_error_f851667af71bcfc6 = function(arg0, arg1) {\n let deferred0_0;\n let deferred0_1;\n try {\n deferred0_0 = arg0;\n deferred0_1 = arg1;\n console.error(getStringFromWasm0(arg0, arg1));\n } finally {\n wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);\n }\n };\n imports.wbg.__wbg_buffer_12d079cc21e14bdb = function(arg0) {\n const ret = getObject(arg0).buffer;\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_newwithbyteoffsetandlength_aa4a17c33a06e5cb = function(arg0, arg1, arg2) {\n const ret = new Uint8Array(getObject(arg0), arg1 >>> 0, arg2 >>> 0);\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_randomFillSync_5c9c955aa56b6049 = function() { return handleError(function (arg0, arg1) {\n getObject(arg0).randomFillSync(takeObject(arg1));\n }, arguments) };\n imports.wbg.__wbg_subarray_a1f73cd4b5b42fe1 = function(arg0, arg1, arg2) {\n const ret = getObject(arg0).subarray(arg1 >>> 0, arg2 >>> 0);\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_getRandomValues_3aa56aa6edec874c = function() { return handleError(function (arg0, arg1) {\n getObject(arg0).getRandomValues(getObject(arg1));\n }, arguments) };\n imports.wbg.__wbg_set_a47bac70306a19a7 = function(arg0, arg1, arg2) {\n getObject(arg0).set(getObject(arg1), arg2 >>> 0);\n };\n imports.wbg.__wbg_crypto_1d1f22824a6a080c = function(arg0) {\n const ret = getObject(arg0).crypto;\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_process_4a72847cc503995b = function(arg0) {\n const ret = getObject(arg0).process;\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_versions_f686565e586dd935 = function(arg0) {\n const ret = getObject(arg0).versions;\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_node_104a2ff8d6ea03a2 = function(arg0) {\n const ret = getObject(arg0).node;\n return addHeapObject(ret);\n };\n imports.wbg.__wbindgen_is_string = function(arg0) {\n const ret = typeof(getObject(arg0)) === 'string';\n return ret;\n };\n imports.wbg.__wbg_require_cca90b1a94a0255b = function() { return handleError(function () {\n const ret = module.require;\n return addHeapObject(ret);\n }, arguments) };\n imports.wbg.__wbg_msCrypto_eb05e62b530a1508 = function(arg0) {\n const ret = getObject(arg0).msCrypto;\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_newwithlength_e9b4878cebadb3d3 = function(arg0) {\n const ret = new Uint8Array(arg0 >>> 0);\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_length_cd7af8117672b8b8 = function(arg0) {\n const ret = getObject(arg0).length;\n return ret;\n };\n imports.wbg.__wbg_get_bd8e338fbd5f5cc8 = function(arg0, arg1) {\n const ret = getObject(arg0)[arg1 >>> 0];\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_self_ce0dbfc45cf2f5be = function() { return handleError(function () {\n const ret = self.self;\n return addHeapObject(ret);\n }, arguments) };\n imports.wbg.__wbg_window_c6fb939a7f436783 = function() { return handleError(function () {\n const ret = window.window;\n return addHeapObject(ret);\n }, arguments) };\n imports.wbg.__wbg_globalThis_d1e6af4856ba331b = function() { return handleError(function () {\n const ret = globalThis.globalThis;\n return addHeapObject(ret);\n }, arguments) };\n imports.wbg.__wbg_global_207b558942527489 = function() { return handleError(function () {\n const ret = global.global;\n return addHeapObject(ret);\n }, arguments) };\n imports.wbg.__wbindgen_is_undefined = function(arg0) {\n const ret = getObject(arg0) === undefined;\n return ret;\n };\n imports.wbg.__wbg_newnoargs_e258087cd0daa0ea = function(arg0, arg1) {\n const ret = new Function(getStringFromWasm0(arg0, arg1));\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_has_0af94d20077affa2 = function() { return handleError(function (arg0, arg1) {\n const ret = Reflect.has(getObject(arg0), getObject(arg1));\n return ret;\n }, arguments) };\n imports.wbg.__wbg_fetch_bc7c8e27076a5c84 = function(arg0) {\n const ret = fetch(getObject(arg0));\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_fetch_921fad6ef9e883dd = function(arg0, arg1) {\n const ret = getObject(arg0).fetch(getObject(arg1));\n return addHeapObject(ret);\n };\n imports.wbg.__wbindgen_debug_string = function(arg0, arg1) {\n const ret = debugString(getObject(arg1));\n const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len1 = WASM_VECTOR_LEN;\n getInt32Memory0()[arg0 / 4 + 1] = len1;\n getInt32Memory0()[arg0 / 4 + 0] = ptr1;\n };\n imports.wbg.__wbindgen_throw = function(arg0, arg1) {\n throw new Error(getStringFromWasm0(arg0, arg1));\n };\n imports.wbg.__wbindgen_rethrow = function(arg0) {\n throw takeObject(arg0);\n };\n imports.wbg.__wbg_then_a73caa9a87991566 = function(arg0, arg1, arg2) {\n const ret = getObject(arg0).then(getObject(arg1), getObject(arg2));\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_then_0c86a60e8fcfe9f6 = function(arg0, arg1) {\n const ret = getObject(arg0).then(getObject(arg1));\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_queueMicrotask_481971b0d87f3dd4 = function(arg0) {\n queueMicrotask(getObject(arg0));\n };\n imports.wbg.__wbg_queueMicrotask_3cbae2ec6b6cd3d6 = function(arg0) {\n const ret = getObject(arg0).queueMicrotask;\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_resolve_b0083a7967828ec8 = function(arg0) {\n const ret = Promise.resolve(getObject(arg0));\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_waitAsync_5d743fc9058ba01a = function() {\n const ret = Atomics.waitAsync;\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_new_8cccba86b0f574cb = function(arg0) {\n const ret = new Int32Array(getObject(arg0));\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_waitAsync_46d5c36955b71a79 = function(arg0, arg1, arg2) {\n const ret = Atomics.waitAsync(getObject(arg0), arg1, arg2);\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_async_19c0400d97cc72fe = function(arg0) {\n const ret = getObject(arg0).async;\n return ret;\n };\n imports.wbg.__wbg_value_571d60108110e917 = function(arg0) {\n const ret = getObject(arg0).value;\n return addHeapObject(ret);\n };\n imports.wbg.__wbindgen_link_fc1eedd35dc7e0a6 = function(arg0) {\n const ret = \"data:application/javascript,\" + encodeURIComponent(`onmessage = function (ev) {\n let [ia, index, value] = ev.data;\n ia = new Int32Array(ia.buffer);\n let result = Atomics.wait(ia, index, value);\n postMessage(result);\n };\n `);\n const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len1 = WASM_VECTOR_LEN;\n getInt32Memory0()[arg0 / 4 + 1] = len1;\n getInt32Memory0()[arg0 / 4 + 0] = ptr1;\n };\n imports.wbg.__wbg_new_d1187ae36d662ef9 = function() { return handleError(function (arg0, arg1) {\n const ret = new Worker(getStringFromWasm0(arg0, arg1));\n return addHeapObject(ret);\n }, arguments) };\n imports.wbg.__wbg_setonmessage_503809e5bb51bd33 = function(arg0, arg1) {\n getObject(arg0).onmessage = getObject(arg1);\n };\n imports.wbg.__wbg_of_6a70eed8d41f469c = function(arg0, arg1, arg2) {\n const ret = Array.of(getObject(arg0), getObject(arg1), getObject(arg2));\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_postMessage_7380d10e8b8269df = function() { return handleError(function (arg0, arg1) {\n getObject(arg0).postMessage(getObject(arg1));\n }, arguments) };\n imports.wbg.__wbg_data_3ce7c145ca4fbcdc = function(arg0) {\n const ret = getObject(arg0).data;\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_newwithstrandinit_3fd6fba4083ff2d0 = function() { return handleError(function (arg0, arg1, arg2) {\n const ret = new Request(getStringFromWasm0(arg0, arg1), getObject(arg2));\n return addHeapObject(ret);\n }, arguments) };\n imports.wbg.__wbg_responseText_c67ed2d48db10769 = function() { return handleError(function (arg0, arg1) {\n const ret = getObject(arg1).responseText;\n var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n var len1 = WASM_VECTOR_LEN;\n getInt32Memory0()[arg0 / 4 + 1] = len1;\n getInt32Memory0()[arg0 / 4 + 0] = ptr1;\n }, arguments) };\n imports.wbg.__wbindgen_closure_wrapper5837 = function(arg0, arg1, arg2) {\n const ret = makeMutClosure(arg0, arg1, 538, __wbg_adapter_34);\n return addHeapObject(ret);\n };\n imports.wbg.__wbindgen_closure_wrapper5862 = function(arg0, arg1, arg2) {\n const ret = makeMutClosure(arg0, arg1, 538, __wbg_adapter_34);\n return addHeapObject(ret);\n };\n\n return imports;\n}\n\nfunction __wbg_init_memory(imports, maybe_memory) {\n imports.wbg.memory = maybe_memory || new WebAssembly.Memory({initial:25,maximum:65536,shared:true});\n}\n\nfunction __wbg_finalize_init(instance, module) {\n wasm = instance.exports;\n __wbg_init.__wbindgen_wasm_module = module;\n cachedBigInt64Memory0 = null;\n cachedInt32Memory0 = null;\n cachedUint8Memory0 = null;\n\n wasm.__wbindgen_start();\n return wasm;\n}\n\nfunction initSync(module, maybe_memory) {\n if (wasm !== undefined) return wasm;\n\n const imports = __wbg_get_imports();\n\n __wbg_init_memory(imports, maybe_memory);\n\n if (!(module instanceof WebAssembly.Module)) {\n module = new WebAssembly.Module(module);\n }\n\n const instance = new WebAssembly.Instance(module, imports);\n\n return __wbg_finalize_init(instance, module);\n}\n\nasync function __wbg_init(input, maybe_memory) {\n if (wasm !== undefined) return wasm;\n\n\n const imports = __wbg_get_imports();\n\n if (typeof input === 'string' || (typeof Request === 'function' && input instanceof Request) || (typeof URL === 'function' && input instanceof URL)) {\n input = fetch(input);\n }\n\n __wbg_init_memory(imports, maybe_memory);\n\n const { instance, module } = await __wbg_load(await input, imports);\n\n return __wbg_finalize_init(instance, module);\n}\n\nvar exports = /*#__PURE__*/Object.freeze({\n __proto__: null,\n Address: Address,\n Execution: Execution,\n ExecutionResponse: ExecutionResponse,\n Field: Field,\n KeyPair: KeyPair,\n Metadata: Metadata,\n OfflineQuery: OfflineQuery,\n PrivateKey: PrivateKey,\n PrivateKeyCiphertext: PrivateKeyCiphertext,\n Program: Program,\n ProgramManager: ProgramManager,\n ProvingKey: ProvingKey,\n RecordCiphertext: RecordCiphertext,\n RecordPlaintext: RecordPlaintext,\n Signature: Signature,\n Transaction: Transaction,\n VerifyingKey: VerifyingKey,\n ViewKey: ViewKey,\n default: __wbg_init,\n initSync: initSync,\n initThreadPool: initThreadPool,\n runRayonThread: runRayonThread,\n verifyFunctionExecution: verifyFunctionExecution\n});\n\nconst wasm_path = \"assets/aleo_wasm.wasm\";\n\n \n var Cargo = async (opt = {}) => {\n let {importHook, serverPath, initializeHook} = opt;\n\n let final_path = wasm_path;\n\n if (serverPath != null) {\n final_path = serverPath + /[^\\/\\\\]*$/.exec(final_path)[0];\n }\n\n if (importHook != null) {\n final_path = importHook(final_path);\n }\n\n if (initializeHook != null) {\n await initializeHook(__wbg_init, final_path);\n\n } else {\n await __wbg_init(final_path);\n }\n\n return exports;\n };\n\nexport { Cargo as default };\n//# sourceMappingURL=wasm.js.map\n","import wasm from \"../dist/wasm.js\";\n\nconst {\n initThreadPool: wasmInitThreadPool,\n Address,\n Execution,\n ExecutionResponse,\n Field,\n Metadata,\n OfflineQuery,\n Private,\n PrivateKey,\n PrivateKeyCiphertext,\n Program,\n ProvingKey,\n RecordCiphertext,\n RecordPlaintext,\n ProgramManager,\n Signature,\n Transaction,\n ViewKey,\n VerifyingKey,\n verifyFunctionExecution,\n} = await wasm({\n importHook: () => {\n return new URL(\"assets/aleo_wasm.wasm\", import.meta.url);\n },\n});\n\nasync function initThreadPool(threads) {\n if (threads == null) {\n threads = navigator.hardwareConcurrency;\n }\n\n console.info(`Spawning ${threads} threads`);\n\n await wasmInitThreadPool(new URL(\"worker.js\", import.meta.url), threads);\n}\n\nexport {\n initThreadPool,\n Address,\n Execution,\n ExecutionResponse,\n Field,\n Metadata,\n OfflineQuery,\n PrivateKey,\n PrivateKeyCiphertext,\n Program,\n ProvingKey,\n RecordCiphertext,\n RecordPlaintext,\n ProgramManager,\n Signature,\n Transaction,\n ViewKey,\n VerifyingKey,\n verifyFunctionExecution,\n};\n"],"names":["spawnWorker","url","module","memory","address","Promise","resolve","worker","Worker","type","addEventListener","event","setTimeout","unref","capture","once","postMessage","wasm","heap","Array","fill","undefined","getObject","idx","push","heap_next","length","dropObject","takeObject","ret","cachedTextDecoder","TextDecoder","ignoreBOM","fatal","decode","Error","cachedUint8Memory0","getUint8Memory0","buffer","Uint8Array","getStringFromWasm0","ptr","len","slice","addHeapObject","obj","WASM_VECTOR_LEN","cachedTextEncoder","TextEncoder","encode","encodeString","arg","view","buf","set","read","written","passStringToWasm0","malloc","realloc","subarray","mem","offset","code","charCodeAt","isLikeNone","x","cachedInt32Memory0","getInt32Memory0","Int32Array","debugString","val","description","name","isArray","debug","i","builtInMatches","exec","toString","call","className","JSON","stringify","_","message","stack","CLOSURE_DTORS","FinalizationRegistry","register","unregister","state","__wbindgen_export_3","get","dtor","a","b","makeMutClosure","arg0","arg1","f","cnt","real","args","original","__wbg_adapter_34","arg2","_dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h467700a9696faab3","_assertClass","instance","klass","passArray8ToWasm0","verifyFunctionExecution$1","execution","verifying_key","program","function_id","retptr","__wbindgen_add_to_stack_pointer","Execution$1","VerifyingKey$1","Program$1","ptr0","__wbindgen_malloc","__wbindgen_realloc","len0","verifyFunctionExecution","__wbg_ptr","r0","r1","cachedBigInt64Memory0","getBigInt64Memory0","BigInt64Array","getArrayU8FromWasm0","runRayonThread","receiver","initThreadPool$1","num_threads","initThreadPool","handleError","apply","this","e","__wbindgen_exn_store","__wbg_adapter_281","arg3","wasm_bindgen__convert__closures__invoke2_mut__h381bef3cd886b4c7","AddressFinalization","__wbg_address_free","Address","__wrap","Object","create","prototype","__destroy_into_raw","free","from_private_key","private_key","PrivateKey$1","address_from_private_key","from_view_key","view_key","ViewKey$1","address_from_view_key","from_string","address_from_string","to_string","deferred1_0","deferred1_1","address_to_string","__wbindgen_free","verify","signature","Signature$1","address_verify","ExecutionFinalization","__wbg_execution_free","Execution","execution_toString","fromString","execution_fromString","ExecutionResponseFinalization","__wbg_executionresponse_free","ExecutionResponse","getOutputs","executionresponse_getOutputs","getExecution","executionresponse_getExecution","getKeys","executionresponse_getKeys","KeyPair","getProvingKey","executionresponse_getProvingKey","ProvingKey$1","getVerifyingKey","executionresponse_getVerifyingKey","getFunctionId","executionresponse_getFunctionId","getProgram","executionresponse_getProgram","FieldFinalization","__wbg_field_free","Field","field_toString","field","field_fromString","KeyPairFinalization","__wbg_keypair_free","constructor","proving_key","ptr1","keypair_new","provingKey","keypair_provingKey","verifyingKey","keypair_verifyingKey","MetadataFinalization","__wbg_metadata_free","Metadata","__wbg_get_metadata_name","__wbg_set_metadata_name","locator","__wbg_get_metadata_locator","__wbg_set_metadata_locator","prover","__wbg_get_metadata_prover","__wbg_set_metadata_prover","verifier","__wbg_get_metadata_verifier","__wbg_set_metadata_verifier","__wbg_get_metadata_verifyingKey","__wbg_set_metadata_verifyingKey","baseUrl","metadata_baseUrl","bond_public","metadata_bond_public","bond_validator","metadata_bond_validator","claim_unbond_public","metadata_claim_unbond_public","fee_private","metadata_fee_private","fee_public","metadata_fee_public","inclusion","metadata_inclusion","join","metadata_join","set_validator_state","metadata_set_validator_state","split","metadata_split","transfer_private","metadata_transfer_private","transfer_private_to_public","metadata_transfer_private_to_public","transfer_public","metadata_transfer_public","transfer_public_as_signer","metadata_transfer_public_as_signer","transfer_public_to_private","metadata_transfer_public_to_private","unbond_public","metadata_unbond_public","OfflineQueryFinalization","__wbg_offlinequery_free","OfflineQuery","state_root","offlinequery_new","addStatePath","commitment","state_path","len1","offlinequery_addStatePath","offlinequery_toString","s","offlinequery_fromString","PrivateKeyFinalization","__wbg_privatekey_free","PrivateKey","privatekey_new","from_seed_unchecked","seed","privatekey_from_seed_unchecked","privatekey_from_string","privatekey_to_string","to_view_key","privatekey_to_view_key","to_address","privatekey_to_address","Address$1","sign","privatekey_sign","newEncrypted","secret","privatekey_newEncrypted","PrivateKeyCiphertext$1","toCiphertext","privatekey_toCiphertext","fromPrivateKeyCiphertext","ciphertext","privatekey_fromPrivateKeyCiphertext","PrivateKeyCiphertextFinalization","__wbg_privatekeyciphertext_free","PrivateKeyCiphertext","encryptPrivateKey","decryptToPrivateKey","privatekeyciphertext_decryptToPrivateKey","privatekeyciphertext_toString","privatekeyciphertext_fromString","ProgramFinalization","__wbg_program_free","Program","program_fromString","program_toString","hasFunction","function_name","program_hasFunction","getFunctions","program_getFunctions","getFunctionInputs","program_getFunctionInputs","getMappings","program_getMappings","getRecordMembers","record_name","program_getRecordMembers","getStructMembers","struct_name","program_getStructMembers","getCreditsProgram","program_getCreditsProgram","id","program_id","program_address","isEqual","other","program_isEqual","getImports","program_getImports","ProgramManagerFinalization","__wbg_programmanager_free","buildDeploymentTransaction","fee_credits","fee_record","imports","fee_proving_key","fee_verifying_key","offline_query","RecordPlaintext$1","ptr2","len2","ptr3","ptr4","ptr5","OfflineQuery$1","programmanager_buildDeploymentTransaction","estimateDeploymentFee","programmanager_estimateDeploymentFee","estimateProgramNameCost","programmanager_estimateProgramNameCost","r2","BigInt","asUintN","executeFunctionOffline","_function","inputs","prove_execution","cache","len4","programmanager_executeFunctionOffline","buildExecutionTransaction","len3","ptr6","ptr7","ptr8","programmanager_buildExecutionTransaction","estimateExecutionFee","programmanager_estimateExecutionFee","estimateFinalizeFee","programmanager_estimateFinalizeFee","buildJoinTransaction","record_1","record_2","join_proving_key","join_verifying_key","programmanager_buildJoinTransaction","buildSplitTransaction","split_amount","amount_record","split_proving_key","split_verifying_key","programmanager_buildSplitTransaction","buildTransferTransaction","amount_credits","recipient","transfer_type","transfer_proving_key","transfer_verifying_key","ptr9","programmanager_buildTransferTransaction","synthesizeKeyPair","programmanager_synthesizeKeyPair","ProvingKeyFinalization","__wbg_provingkey_free","ProvingKey","isBondPublicProver","provingkey_isBondPublicProver","isBondValidatorProver","provingkey_isBondValidatorProver","isClaimUnbondPublicProver","provingkey_isClaimUnbondPublicProver","isFeePrivateProver","provingkey_isFeePrivateProver","isFeePublicProver","provingkey_isFeePublicProver","isInclusionProver","provingkey_isInclusionProver","isJoinProver","provingkey_isJoinProver","isSetValidatorStateProver","provingkey_isSetValidatorStateProver","isSplitProver","provingkey_isSplitProver","isTransferPrivateProver","provingkey_isTransferPrivateProver","isTransferPrivateToPublicProver","provingkey_isTransferPrivateToPublicProver","isTransferPublicProver","provingkey_isTransferPublicProver","isTransferPublicAsSignerProver","provingkey_isTransferPublicAsSignerProver","isTransferPublicToPrivateProver","provingkey_isTransferPublicToPrivateProver","isUnbondPublicProver","provingkey_isUnbondPublicProver","checksum","provingkey_checksum","copy","provingkey_copy","fromBytes","bytes","provingkey_fromBytes","string","provingkey_fromString","toBytes","provingkey_toBytes","v1","provingkey_toString","RecordCiphertextFinalization","__wbg_recordciphertext_free","RecordCiphertext","record","recordciphertext_fromString","recordciphertext_toString","decrypt","recordciphertext_decrypt","isOwner","recordciphertext_isOwner","RecordPlaintextFinalization","__wbg_recordplaintext_free","RecordPlaintext","recordplaintext_commitment","Field$1","recordplaintext_fromString","recordplaintext_toString","microcredits","recordplaintext_microcredits","nonce","recordplaintext_nonce","serialNumberString","deferred4_0","deferred4_1","recordplaintext_serialNumberString","r3","SignatureFinalization","__wbg_signature_free","Signature","signature_verify","signature_from_string","signature_to_string","TransactionFinalization","__wbg_transaction_free","Transaction","transaction","transaction_fromString","transaction_toString","transactionId","transaction_transactionId","transactionType","transaction_transactionType","VerifyingKeyFinalization","__wbg_verifyingkey_free","VerifyingKey","bondPublicVerifier","verifyingkey_bondPublicVerifier","bondValidatorVerifier","verifyingkey_bondValidatorVerifier","claimUnbondPublicVerifier","verifyingkey_claimUnbondPublicVerifier","feePrivateVerifier","verifyingkey_feePrivateVerifier","feePublicVerifier","verifyingkey_feePublicVerifier","inclusionVerifier","verifyingkey_inclusionVerifier","joinVerifier","verifyingkey_joinVerifier","setValidatorStateVerifier","verifyingkey_setValidatorStateVerifier","splitVerifier","verifyingkey_splitVerifier","transferPrivateVerifier","verifyingkey_transferPrivateVerifier","transferPrivateToPublicVerifier","verifyingkey_transferPrivateToPublicVerifier","transferPublicVerifier","verifyingkey_transferPublicVerifier","transferPublicAsSignerVerifier","verifyingkey_transferPublicAsSignerVerifier","transferPublicToPrivateVerifier","verifyingkey_transferPublicToPrivateVerifier","unbondPublicVerifier","verifyingkey_unbondPublicVerifier","isBondPublicVerifier","verifyingkey_isBondPublicVerifier","isBondValidatorVerifier","verifyingkey_isBondValidatorVerifier","isClaimUnbondPublicVerifier","verifyingkey_isClaimUnbondPublicVerifier","isFeePrivateVerifier","verifyingkey_isFeePrivateVerifier","isFeePublicVerifier","verifyingkey_isFeePublicVerifier","isInclusionVerifier","verifyingkey_isInclusionVerifier","isJoinVerifier","verifyingkey_isJoinVerifier","isSetValidatorStateVerifier","verifyingkey_isSetValidatorStateVerifier","isSplitVerifier","verifyingkey_isSplitVerifier","isTransferPrivateVerifier","verifyingkey_isTransferPrivateVerifier","isTransferPrivateToPublicVerifier","verifyingkey_isTransferPrivateToPublicVerifier","isTransferPublicVerifier","verifyingkey_isTransferPublicVerifier","isTransferPublicAsSignerVerifier","verifyingkey_isTransferPublicAsSignerVerifier","isTransferPublicToPrivateVerifier","verifyingkey_isTransferPublicToPrivateVerifier","isUnbondPublicVerifier","verifyingkey_isUnbondPublicVerifier","verifyingkey_checksum","verifyingkey_copy","verifyingkey_fromBytes","verifyingkey_fromString","verifyingkey_toBytes","verifyingkey_toString","ViewKeyFinalization","__wbg_viewkey_free","ViewKey","viewkey_from_string","viewkey_to_string","deferred3_0","deferred3_1","viewkey_decrypt","async","__wbg_load","Response","WebAssembly","instantiateStreaming","headers","console","warn","arrayBuffer","instantiate","Instance","__wbg_get_imports","wbg","__wbindgen_object_drop_ref","__wbg_new_71801a555ad9f2aa","XMLHttpRequest","arguments","__wbg_overrideMimeType_ee9c51919ceb418b","overrideMimeType","__wbg_open_c9eb0cf2c9d95679","arg4","arg5","open","__wbg_send_80d29985093c1ec5","send","__wbg_response_7c2e2759084f7279","response","__wbg_status_d485fb5a478426fb","status","__wbg_new_72fb9a18b5ae2624","__wbindgen_string_new","__wbg_set_1f9b04f170055d33","Reflect","__wbg_new_ab6fd82b10560829","Headers","__wbindgen_object_clone_ref","__wbg_new_0d76b0581eca6298","AbortController","__wbg_signal_a61f78a3478fd9bc","signal","__wbg_append_7bfcb4937d1d5e29","append","__wbg_instanceof_Response_849eb93e75734b6e","result","__wbg_status_61a01141acd3cf74","__wbg_url_5f6dc4009ac5f99d","__wbg_headers_9620bfada380764a","__wbg_iterator_2cee6dadfd956dfa","Symbol","iterator","__wbg_get_e3c254076557e348","__wbindgen_is_function","__wbg_call_27c0f87801dedf93","__wbindgen_is_object","__wbg_next_40fc327bfc8770e6","next","__wbg_next_196c84450b364254","__wbg_done_298b57d23c0fc80c","done","__wbg_value_d93c65011f51a456","value","__wbg_abort_2aa7521d5690750e","abort","__wbg_stringify_8887fe74e1c50d81","__wbindgen_string_get","__wbg_log_0159ca40cddf5b15","log","__wbindgen_bigint_from_u64","__wbg_call_b3ca7c6051f9bec1","__wbg_transaction_new","Transaction$1","__wbg_keypair_new","__wbindgen_module","__wbg_init","__wbindgen_wasm_module","__wbindgen_memory","__wbg_spawnWorker_f6acaddb2e29dc4a","__wbg_executionresponse_new","ExecutionResponse$1","__wbg_newwithlength_66ae46612e7f0234","__wbg_set_d4638f722068f043","__wbindgen_cb_drop","__wbg_new_16b304a2cfa7ff4a","__wbg_push_a5b05aedc7234f9f","__wbg_arrayBuffer_29931d52c7206b02","__wbg_new_63b92bc8671ed464","__wbg_length_c20a40f15020d68a","__wbg_new_81740750da40724f","state0","cb0","__wbindgen_number_new","__wbg_new_abda76e883ba8a5f","__wbg_stack_658279fe44541cf6","__wbg_error_f851667af71bcfc6","deferred0_0","deferred0_1","error","__wbg_buffer_12d079cc21e14bdb","__wbg_newwithbyteoffsetandlength_aa4a17c33a06e5cb","__wbg_randomFillSync_5c9c955aa56b6049","randomFillSync","__wbg_subarray_a1f73cd4b5b42fe1","__wbg_getRandomValues_3aa56aa6edec874c","getRandomValues","__wbg_set_a47bac70306a19a7","__wbg_crypto_1d1f22824a6a080c","crypto","__wbg_process_4a72847cc503995b","process","__wbg_versions_f686565e586dd935","versions","__wbg_node_104a2ff8d6ea03a2","node","__wbindgen_is_string","__wbg_require_cca90b1a94a0255b","require","__wbg_msCrypto_eb05e62b530a1508","msCrypto","__wbg_newwithlength_e9b4878cebadb3d3","__wbg_length_cd7af8117672b8b8","__wbg_get_bd8e338fbd5f5cc8","__wbg_self_ce0dbfc45cf2f5be","self","__wbg_window_c6fb939a7f436783","window","__wbg_globalThis_d1e6af4856ba331b","globalThis","__wbg_global_207b558942527489","global","__wbindgen_is_undefined","__wbg_newnoargs_e258087cd0daa0ea","Function","__wbg_has_0af94d20077affa2","has","__wbg_fetch_bc7c8e27076a5c84","fetch","__wbg_fetch_921fad6ef9e883dd","__wbindgen_debug_string","__wbindgen_throw","__wbindgen_rethrow","__wbg_then_a73caa9a87991566","then","__wbg_then_0c86a60e8fcfe9f6","__wbg_queueMicrotask_481971b0d87f3dd4","queueMicrotask","__wbg_queueMicrotask_3cbae2ec6b6cd3d6","__wbg_resolve_b0083a7967828ec8","__wbg_waitAsync_5d743fc9058ba01a","Atomics","waitAsync","__wbg_new_8cccba86b0f574cb","__wbg_waitAsync_46d5c36955b71a79","__wbg_async_19c0400d97cc72fe","__wbg_value_571d60108110e917","__wbindgen_link_fc1eedd35dc7e0a6","encodeURIComponent","__wbg_new_d1187ae36d662ef9","__wbg_setonmessage_503809e5bb51bd33","onmessage","__wbg_of_6a70eed8d41f469c","of","__wbg_postMessage_7380d10e8b8269df","__wbg_data_3ce7c145ca4fbcdc","data","__wbg_newwithstrandinit_3fd6fba4083ff2d0","Request","__wbg_responseText_c67ed2d48db10769","responseText","__wbindgen_closure_wrapper5837","__wbindgen_closure_wrapper5862","__wbg_init_memory","maybe_memory","Memory","initial","maximum","shared","__wbg_finalize_init","exports","__wbindgen_start","initSync","Module","input","URL","freeze","__proto__","Metadata$1","ProgramManager","ProgramManager$1","RecordCiphertext$1","default","wasm_path","wasmInitThreadPool","Private","opt","importHook","serverPath","initializeHook","final_path","Cargo","threads","navigator","hardwareConcurrency","info"],"sourceRoot":""} \ No newline at end of file diff --git a/286.bundle.js b/286.bundle.js deleted file mode 100644 index 93e36ecd6..000000000 --- a/286.bundle.js +++ /dev/null @@ -1,2 +0,0 @@ -(self.webpackChunkaleo_website=self.webpackChunkaleo_website||[]).push([[286],{286:(e,n,t)=>{t.r(n),t.d(n,{CLSThresholds:()=>P,FCPThresholds:()=>w,FIDThresholds:()=>ne,INPThresholds:()=>j,LCPThresholds:()=>G,TTFBThresholds:()=>Q,onCLS:()=>A,onFCP:()=>I,onFID:()=>te,onINP:()=>z,onLCP:()=>K,onTTFB:()=>V});var r,i,o,a,c,u=-1,s=function(e){addEventListener("pageshow",(function(n){n.persisted&&(u=n.timeStamp,e(n))}),!0)},f=function(){var e=self.performance&&performance.getEntriesByType&&performance.getEntriesByType("navigation")[0];if(e&&e.responseStart>0&&e.responseStart=0?r="back-forward-cache":t&&(document.prerendering||d()>0?r="prerender":document.wasDiscarded?r="restore":t.type&&(r=t.type.replace(/_/g,"-"))),{name:e,value:void 0===n?-1:n,rating:"good",delta:0,entries:[],id:"v4-".concat(Date.now(),"-").concat(Math.floor(8999999999999*Math.random())+1e12),navigationType:r}},p=function(e,n,t){try{if(PerformanceObserver.supportedEntryTypes.includes(e)){var r=new PerformanceObserver((function(e){Promise.resolve().then((function(){n(e.getEntries())}))}));return r.observe(Object.assign({type:e,buffered:!0},t||{})),r}}catch(e){}},v=function(e,n,t,r){var i,o;return function(a){n.value>=0&&(a||r)&&((o=n.value-(i||0))||void 0===i)&&(i=n.value,n.delta=o,n.rating=function(e,n){return e>n[1]?"poor":e>n[0]?"needs-improvement":"good"}(n.value,t),e(n))}},m=function(e){requestAnimationFrame((function(){return requestAnimationFrame((function(){return e()}))}))},h=function(e){document.addEventListener("visibilitychange",(function(){"hidden"===document.visibilityState&&e()}))},g=function(e){var n=!1;return function(){n||(e(),n=!0)}},T=-1,y=function(){return"hidden"!==document.visibilityState||document.prerendering?1/0:0},E=function(e){"hidden"===document.visibilityState&&T>-1&&(T="visibilitychange"===e.type?e.timeStamp:0,b())},C=function(){addEventListener("visibilitychange",E,!0),addEventListener("prerenderingchange",E,!0)},b=function(){removeEventListener("visibilitychange",E,!0),removeEventListener("prerenderingchange",E,!0)},L=function(){return T<0&&(T=y(),C(),s((function(){setTimeout((function(){T=y(),C()}),0)}))),{get firstHiddenTime(){return T}}},S=function(e){document.prerendering?addEventListener("prerenderingchange",(function(){return e()}),!0):e()},w=[1800,3e3],I=function(e,n){n=n||{},S((function(){var t,r=L(),i=l("FCP"),o=p("paint",(function(e){e.forEach((function(e){"first-contentful-paint"===e.name&&(o.disconnect(),e.startTimer.value&&(r.value=i,r.entries=o,t())},c=p("layout-shift",a);c&&(t=v(e,r,P,n.reportAllChanges),h((function(){a(c.takeRecords()),t(!0)})),s((function(){i=0,r=l("CLS",0),t=v(e,r,P,n.reportAllChanges),m((function(){return t()}))})),setTimeout(t,0))})))},F=0,k=1/0,M=0,D=function(e){e.forEach((function(e){e.interactionId&&(k=Math.min(k,e.interactionId),M=Math.max(M,e.interactionId),F=M?(M-k)/7+1:0)}))},B=function(){return r?F:performance.interactionCount||0},R=function(){"interactionCount"in performance||r||(r=p("event",D,{type:"event",buffered:!0,durationThreshold:0}))},x=[],H=new Map,N=0,q=[],O=function(e){if(q.forEach((function(n){return n(e)})),e.interactionId||"first-input"===e.entryType){var n=x[x.length-1],t=H.get(e.interactionId);if(t||x.length<10||e.duration>n.latency){if(t)e.duration>t.latency?(t.entries=[e],t.latency=e.duration):e.duration===t.latency&&e.startTime===t.entries[0].startTime&&t.entries.push(e);else{var r={id:e.interactionId,latency:e.duration,entries:[e]};H.set(r.id,r),x.push(r)}x.sort((function(e,n){return n.latency-e.latency})),x.length>10&&x.splice(10).forEach((function(e){return H.delete(e.id)}))}}},_=function(e){var n=self.requestIdleCallback||self.setTimeout,t=-1;return e=g(e),"hidden"===document.visibilityState?e():(t=n(e),h(e)),t},j=[200,500],z=function(e,n){"PerformanceEventTiming"in self&&"interactionId"in PerformanceEventTiming.prototype&&(n=n||{},S((function(){var t;R();var r,i=l("INP"),o=function(e){_((function(){e.forEach(O);var n=function(){var e=Math.min(x.length-1,Math.floor((B()-N)/50));return x[e]}();n&&n.latency!==i.value&&(i.value=n.latency,i.entries=n.entries,r())}))},a=p("event",o,{durationThreshold:null!==(t=n.durationThreshold)&&void 0!==t?t:40});r=v(e,i,j,n.reportAllChanges),a&&(a.observe({type:"first-input",buffered:!0}),h((function(){o(a.takeRecords()),r(!0)})),s((function(){N=B(),x.length=0,H.clear(),i=l("INP"),r=v(e,i,j,n.reportAllChanges)})))})))},G=[2500,4e3],J={},K=function(e,n){n=n||{},S((function(){var t,r=L(),i=l("LCP"),o=function(e){n.reportAllChanges||(e=e.slice(-1)),e.forEach((function(e){e.startTime=0&&o1e12?new Date:performance.now())-e.timeStamp;"pointerdown"==e.type?function(e,n){var t=function(){Y(e,n),i()},r=function(){i()},i=function(){removeEventListener("pointerup",t,W),removeEventListener("pointercancel",r,W)};addEventListener("pointerup",t,W),addEventListener("pointercancel",r,W)}(n,e):Y(n,e)}},ee=function(e){["mousedown","keydown","touchstart","pointerdown"].forEach((function(n){return e(n,$,W)}))},ne=[100,300],te=function(e,n){n=n||{},S((function(){var t,r=L(),a=l("FID"),u=function(e){e.startTime0&&e.responseStart=0?r=\"back-forward-cache\":t&&(document.prerendering||u()>0?r=\"prerender\":document.wasDiscarded?r=\"restore\":t.type&&(r=t.type.replace(/_/g,\"-\")));return{name:e,value:void 0===n?-1:n,rating:\"good\",delta:0,entries:[],id:\"v4-\".concat(Date.now(),\"-\").concat(Math.floor(8999999999999*Math.random())+1e12),navigationType:r}},s=function(e,n,t){try{if(PerformanceObserver.supportedEntryTypes.includes(e)){var r=new PerformanceObserver((function(e){Promise.resolve().then((function(){n(e.getEntries())}))}));return r.observe(Object.assign({type:e,buffered:!0},t||{})),r}}catch(e){}},d=function(e,n,t,r){var i,o;return function(a){n.value>=0&&(a||r)&&((o=n.value-(i||0))||void 0===i)&&(i=n.value,n.delta=o,n.rating=function(e,n){return e>n[1]?\"poor\":e>n[0]?\"needs-improvement\":\"good\"}(n.value,t),e(n))}},l=function(e){requestAnimationFrame((function(){return requestAnimationFrame((function(){return e()}))}))},p=function(e){document.addEventListener(\"visibilitychange\",(function(){\"hidden\"===document.visibilityState&&e()}))},v=function(e){var n=!1;return function(){n||(e(),n=!0)}},m=-1,h=function(){return\"hidden\"!==document.visibilityState||document.prerendering?1/0:0},g=function(e){\"hidden\"===document.visibilityState&&m>-1&&(m=\"visibilitychange\"===e.type?e.timeStamp:0,T())},y=function(){addEventListener(\"visibilitychange\",g,!0),addEventListener(\"prerenderingchange\",g,!0)},T=function(){removeEventListener(\"visibilitychange\",g,!0),removeEventListener(\"prerenderingchange\",g,!0)},E=function(){return m<0&&(m=h(),y(),a((function(){setTimeout((function(){m=h(),y()}),0)}))),{get firstHiddenTime(){return m}}},C=function(e){document.prerendering?addEventListener(\"prerenderingchange\",(function(){return e()}),!0):e()},b=[1800,3e3],S=function(e,n){n=n||{},C((function(){var t,r=E(),i=f(\"FCP\"),o=s(\"paint\",(function(e){e.forEach((function(e){\"first-contentful-paint\"===e.name&&(o.disconnect(),e.startTimer.value&&(r.value=i,r.entries=o,t())},u=s(\"layout-shift\",c);u&&(t=d(e,r,L,n.reportAllChanges),p((function(){c(u.takeRecords()),t(!0)})),a((function(){i=0,r=f(\"CLS\",0),t=d(e,r,L,n.reportAllChanges),l((function(){return t()}))})),setTimeout(t,0))})))},A=0,I=1/0,P=0,M=function(e){e.forEach((function(e){e.interactionId&&(I=Math.min(I,e.interactionId),P=Math.max(P,e.interactionId),A=P?(P-I)/7+1:0)}))},k=function(){return e?A:performance.interactionCount||0},F=function(){\"interactionCount\"in performance||e||(e=s(\"event\",M,{type:\"event\",buffered:!0,durationThreshold:0}))},D=[],x=new Map,R=0,B=function(){var e=Math.min(D.length-1,Math.floor((k()-R)/50));return D[e]},H=[],q=function(e){if(H.forEach((function(n){return n(e)})),e.interactionId||\"first-input\"===e.entryType){var n=D[D.length-1],t=x.get(e.interactionId);if(t||D.length<10||e.duration>n.latency){if(t)e.duration>t.latency?(t.entries=[e],t.latency=e.duration):e.duration===t.latency&&e.startTime===t.entries[0].startTime&&t.entries.push(e);else{var r={id:e.interactionId,latency:e.duration,entries:[e]};x.set(r.id,r),D.push(r)}D.sort((function(e,n){return n.latency-e.latency})),D.length>10&&D.splice(10).forEach((function(e){return x.delete(e.id)}))}}},O=function(e){var n=self.requestIdleCallback||self.setTimeout,t=-1;return e=v(e),\"hidden\"===document.visibilityState?e():(t=n(e),p(e)),t},N=[200,500],j=function(e,n){\"PerformanceEventTiming\"in self&&\"interactionId\"in PerformanceEventTiming.prototype&&(n=n||{},C((function(){var t;F();var r,i=f(\"INP\"),o=function(e){O((function(){e.forEach(q);var n=B();n&&n.latency!==i.value&&(i.value=n.latency,i.entries=n.entries,r())}))},c=s(\"event\",o,{durationThreshold:null!==(t=n.durationThreshold)&&void 0!==t?t:40});r=d(e,i,N,n.reportAllChanges),c&&(c.observe({type:\"first-input\",buffered:!0}),p((function(){o(c.takeRecords()),r(!0)})),a((function(){R=k(),D.length=0,x.clear(),i=f(\"INP\"),r=d(e,i,N,n.reportAllChanges)})))})))},_=[2500,4e3],z={},G=function(e,n){n=n||{},C((function(){var t,r=E(),i=f(\"LCP\"),o=function(e){n.reportAllChanges||(e=e.slice(-1)),e.forEach((function(e){e.startTime=0&&t1e12?new Date:performance.now())-e.timeStamp;\"pointerdown\"==e.type?function(e,n){var t=function(){W(e,n),i()},r=function(){i()},i=function(){removeEventListener(\"pointerup\",t,U),removeEventListener(\"pointercancel\",r,U)};addEventListener(\"pointerup\",t,U),addEventListener(\"pointercancel\",r,U)}(n,e):W(n,e)}},Z=function(e){[\"mousedown\",\"keydown\",\"touchstart\",\"pointerdown\"].forEach((function(n){return e(n,Y,U)}))},$=[100,300],ee=function(e,r){r=r||{},C((function(){var o,c=E(),u=f(\"FID\"),l=function(e){e.startTime{var r,e,t,o,a,n,i={},p={};function c(r){var e=p[r];if(void 0!==e)return e.exports;var t=p[r]={exports:{}};return i[r](t,t.exports,c),t.exports}c.m=i,c.x=()=>{var r=c.O(void 0,[495,877,66],(()=>c(66)));return r=c.O(r)},r="function"==typeof Symbol?Symbol("webpack queues"):"__webpack_queues__",e="function"==typeof Symbol?Symbol("webpack exports"):"__webpack_exports__",t="function"==typeof Symbol?Symbol("webpack error"):"__webpack_error__",o=r=>{r&&r.d<1&&(r.d=1,r.forEach((r=>r.r--)),r.forEach((r=>r.r--?r.r++:r())))},c.a=(a,n,i)=>{var p;i&&((p=[]).d=-1);var c,s,f,l=new Set,u=a.exports,b=new Promise(((r,e)=>{f=e,s=r}));b[e]=u,b[r]=r=>(p&&r(p),l.forEach(r),b.catch((r=>{}))),a.exports=b,n((a=>{var n;c=(a=>a.map((a=>{if(null!==a&&"object"==typeof a){if(a[r])return a;if(a.then){var n=[];n.d=0,a.then((r=>{i[e]=r,o(n)}),(r=>{i[t]=r,o(n)}));var i={};return i[r]=r=>r(n),i}}var p={};return p[r]=r=>{},p[e]=a,p})))(a);var i=()=>c.map((r=>{if(r[t])throw r[t];return r[e]})),s=new Promise((e=>{(n=()=>e(i)).r=0;var t=r=>r!==p&&!l.has(r)&&(l.add(r),r&&!r.d&&(n.r++,r.push(n)));c.map((e=>e[r](t)))}));return n.r?s:i()}),(r=>(r?f(b[t]=r):s(u),o(p)))),p&&p.d<0&&(p.d=0)},a=[],c.O=(r,e,t,o)=>{if(!e){var n=1/0;for(f=0;f=o)&&Object.keys(c.O).every((r=>c.O[r](e[p])))?e.splice(p--,1):(i=!1,o0&&a[f-1][2]>o;f--)a[f]=a[f-1];a[f]=[e,t,o]},c.d=(r,e)=>{for(var t in e)c.o(e,t)&&!c.o(r,t)&&Object.defineProperty(r,t,{enumerable:!0,get:e[t]})},c.f={},c.e=r=>Promise.all(Object.keys(c.f).reduce(((e,t)=>(c.f[t](r,e),e)),[])),c.u=r=>r+".bundle.js",c.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(r){if("object"==typeof window)return window}}(),c.o=(r,e)=>Object.prototype.hasOwnProperty.call(r,e),(()=>{var r;c.g.importScripts&&(r=c.g.location+"");var e=c.g.document;if(!r&&e&&(e.currentScript&&(r=e.currentScript.src),!r)){var t=e.getElementsByTagName("script");if(t.length)for(var o=t.length-1;o>-1&&(!r||!/^http(s?):/.test(r));)r=t[o--].src}if(!r)throw new Error("Automatic publicPath is not supported in this browser");r=r.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),c.p=r})(),(()=>{c.b=self.location+"";var r={301:1};c.f.i=(e,t)=>{r[e]||importScripts(c.p+c.u(e))};var e=self.webpackChunkaleo_website=self.webpackChunkaleo_website||[],t=e.push.bind(e);e.push=e=>{var[o,a,n]=e;for(var i in a)c.o(a,i)&&(c.m[i]=a[i]);for(n&&n(c);o.length;)r[o.pop()]=1;t(e)}})(),n=c.x,c.x=()=>Promise.all([495,877,66].map(c.e,c)).then(n);c.x()})(); -//# sourceMappingURL=301.bundle.js.map \ No newline at end of file diff --git a/301.bundle.js.map b/301.bundle.js.map deleted file mode 100644 index f83a620a9..000000000 --- a/301.bundle.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"301.bundle.js","mappings":"UAAIA,EACAC,EACAC,EACAC,ECHAC,ECAAC,E,KCCAC,EAA2B,CAAC,EAGhC,SAASC,EAAoBC,GAE5B,IAAIC,EAAeH,EAAyBE,GAC5C,QAAqBE,IAAjBD,EACH,OAAOA,EAAaE,QAGrB,IAAIC,EAASN,EAAyBE,GAAY,CAGjDG,QAAS,CAAC,GAOX,OAHAE,EAAoBL,GAAUI,EAAQA,EAAOD,QAASJ,GAG/CK,EAAOD,OACf,CAGAJ,EAAoBO,EAAID,EAGxBN,EAAoBQ,EAAI,KAGvB,IAAIC,EAAsBT,EAAoBU,OAAEP,EAAW,CAAC,IAAI,IAAI,KAAK,IAAOH,EAAoB,MAEpG,OADAS,EAAsBT,EAAoBU,EAAED,EAClB,EHjCvBhB,EAAk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Q,OAAQ,IAAIA,QAAQ,QAAS,IAAIA,QAAQ,YAAa,KACpFxF,EAAoByF,EAAIX,C,WClBxB9E,EAAoB0F,EAAIC,KAAKX,SAAW,GAIxC,IAAIY,EAAkB,CACrB,IAAK,GAgBN5F,EAAoB+D,EAAEd,EAAI,CAACe,EAASG,KAE/ByB,EAAgB5B,IAElBe,cAAc/E,EAAoByF,EAAIzF,EAAoBoE,EAAEJ,GAE9D,EAGD,IAAI6B,EAAqBF,KAA+B,yBAAIA,KAA+B,0BAAK,GAC5FG,EAA6BD,EAAmBnD,KAAKqD,KAAKF,GAC9DA,EAAmBnD,KAvBCsD,IACnB,IAAKnD,EAAUoD,EAAaC,GAAWF,EACvC,IAAI,IAAI/F,KAAYgG,EAChBjG,EAAoB2D,EAAEsC,EAAahG,KACrCD,EAAoBO,EAAEN,GAAYgG,EAAYhG,IAIhD,IADGiG,GAASA,EAAQlG,GACd6C,EAASK,QACd0C,EAAgB/C,EAASsD,OAAS,EACnCL,EAA2BE,EAAK,C,KRnB7BlG,EAAOE,EAAoBQ,EAC/BR,EAAoBQ,EAAI,IAChBkB,QAAQuC,IAAI,CAAC,IAAI,IAAI,IAAInC,IAAI9B,EAAoBkC,EAAGlC,IAAsBgC,KAAKlC,GSD7DE,EAAoBQ,G","sources":["webpack://aleo-website/webpack/runtime/async module","webpack://aleo-website/webpack/runtime/chunk loaded","webpack://aleo-website/webpack/runtime/startup chunk dependencies","webpack://aleo-website/webpack/bootstrap","webpack://aleo-website/webpack/runtime/define property getters","webpack://aleo-website/webpack/runtime/ensure chunk","webpack://aleo-website/webpack/runtime/get javascript chunk filename","webpack://aleo-website/webpack/runtime/global","webpack://aleo-website/webpack/runtime/hasOwnProperty shorthand","webpack://aleo-website/webpack/runtime/publicPath","webpack://aleo-website/webpack/runtime/importScripts chunk loading","webpack://aleo-website/webpack/startup"],"sourcesContent":["var webpackQueues = typeof Symbol === \"function\" ? Symbol(\"webpack queues\") : \"__webpack_queues__\";\nvar webpackExports = typeof Symbol === \"function\" ? Symbol(\"webpack exports\") : \"__webpack_exports__\";\nvar webpackError = typeof Symbol === \"function\" ? Symbol(\"webpack error\") : \"__webpack_error__\";\nvar resolveQueue = (queue) => {\n\tif(queue && queue.d < 1) {\n\t\tqueue.d = 1;\n\t\tqueue.forEach((fn) => (fn.r--));\n\t\tqueue.forEach((fn) => (fn.r-- ? fn.r++ : fn()));\n\t}\n}\nvar wrapDeps = (deps) => (deps.map((dep) => {\n\tif(dep !== null && typeof dep === \"object\") {\n\t\tif(dep[webpackQueues]) return dep;\n\t\tif(dep.then) {\n\t\t\tvar queue = [];\n\t\t\tqueue.d = 0;\n\t\t\tdep.then((r) => {\n\t\t\t\tobj[webpackExports] = r;\n\t\t\t\tresolveQueue(queue);\n\t\t\t}, (e) => {\n\t\t\t\tobj[webpackError] = e;\n\t\t\t\tresolveQueue(queue);\n\t\t\t});\n\t\t\tvar obj = {};\n\t\t\tobj[webpackQueues] = (fn) => (fn(queue));\n\t\t\treturn obj;\n\t\t}\n\t}\n\tvar ret = {};\n\tret[webpackQueues] = x => {};\n\tret[webpackExports] = dep;\n\treturn ret;\n}));\n__webpack_require__.a = (module, body, hasAwait) => {\n\tvar queue;\n\thasAwait && ((queue = []).d = -1);\n\tvar depQueues = new Set();\n\tvar exports = module.exports;\n\tvar currentDeps;\n\tvar outerResolve;\n\tvar reject;\n\tvar promise = new Promise((resolve, rej) => {\n\t\treject = rej;\n\t\touterResolve = resolve;\n\t});\n\tpromise[webpackExports] = exports;\n\tpromise[webpackQueues] = (fn) => (queue && fn(queue), depQueues.forEach(fn), promise[\"catch\"](x => {}));\n\tmodule.exports = promise;\n\tbody((deps) => {\n\t\tcurrentDeps = wrapDeps(deps);\n\t\tvar fn;\n\t\tvar getResult = () => (currentDeps.map((d) => {\n\t\t\tif(d[webpackError]) throw d[webpackError];\n\t\t\treturn d[webpackExports];\n\t\t}))\n\t\tvar promise = new Promise((resolve) => {\n\t\t\tfn = () => (resolve(getResult));\n\t\t\tfn.r = 0;\n\t\t\tvar fnQueue = (q) => (q !== queue && !depQueues.has(q) && (depQueues.add(q), q && !q.d && (fn.r++, q.push(fn))));\n\t\t\tcurrentDeps.map((dep) => (dep[webpackQueues](fnQueue)));\n\t\t});\n\t\treturn fn.r ? promise : getResult();\n\t}, (err) => ((err ? reject(promise[webpackError] = err) : outerResolve(exports)), resolveQueue(queue)));\n\tqueue && queue.d < 0 && (queue.d = 0);\n};","var deferred = [];\n__webpack_require__.O = (result, chunkIds, fn, priority) => {\n\tif(chunkIds) {\n\t\tpriority = priority || 0;\n\t\tfor(var i = deferred.length; i > 0 && deferred[i - 1][2] > priority; i--) deferred[i] = deferred[i - 1];\n\t\tdeferred[i] = [chunkIds, fn, priority];\n\t\treturn;\n\t}\n\tvar notFulfilled = Infinity;\n\tfor (var i = 0; i < deferred.length; i++) {\n\t\tvar [chunkIds, fn, priority] = deferred[i];\n\t\tvar fulfilled = true;\n\t\tfor (var j = 0; j < chunkIds.length; j++) {\n\t\t\tif ((priority & 1 === 0 || notFulfilled >= priority) && Object.keys(__webpack_require__.O).every((key) => (__webpack_require__.O[key](chunkIds[j])))) {\n\t\t\t\tchunkIds.splice(j--, 1);\n\t\t\t} else {\n\t\t\t\tfulfilled = false;\n\t\t\t\tif(priority < notFulfilled) notFulfilled = priority;\n\t\t\t}\n\t\t}\n\t\tif(fulfilled) {\n\t\t\tdeferred.splice(i--, 1)\n\t\t\tvar r = fn();\n\t\t\tif (r !== undefined) result = r;\n\t\t}\n\t}\n\treturn result;\n};","var next = __webpack_require__.x;\n__webpack_require__.x = () => {\n\treturn Promise.all([495,877,66].map(__webpack_require__.e, __webpack_require__)).then(next);\n};","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n// expose the modules object (__webpack_modules__)\n__webpack_require__.m = __webpack_modules__;\n\n// the startup function\n__webpack_require__.x = () => {\n\t// Load entry module and return exports\n\t// This entry module depends on other loaded chunks and execution need to be delayed\n\tvar __webpack_exports__ = __webpack_require__.O(undefined, [495,877,66], () => (__webpack_require__(66)))\n\t__webpack_exports__ = __webpack_require__.O(__webpack_exports__);\n\treturn __webpack_exports__;\n};\n\n","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.f = {};\n// This file contains only the entry chunk.\n// The chunk loading function for additional chunks\n__webpack_require__.e = (chunkId) => {\n\treturn Promise.all(Object.keys(__webpack_require__.f).reduce((promises, key) => {\n\t\t__webpack_require__.f[key](chunkId, promises);\n\t\treturn promises;\n\t}, []));\n};","// This function allow to reference async chunks and sibling chunks for the entrypoint\n__webpack_require__.u = (chunkId) => {\n\t// return url for filenames based on template\n\treturn \"\" + chunkId + \".bundle.js\";\n};","__webpack_require__.g = (function() {\n\tif (typeof globalThis === 'object') return globalThis;\n\ttry {\n\t\treturn this || new Function('return this')();\n\t} catch (e) {\n\t\tif (typeof window === 'object') return window;\n\t}\n})();","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","var scriptUrl;\nif (__webpack_require__.g.importScripts) scriptUrl = __webpack_require__.g.location + \"\";\nvar document = __webpack_require__.g.document;\nif (!scriptUrl && document) {\n\tif (document.currentScript)\n\t\tscriptUrl = document.currentScript.src;\n\tif (!scriptUrl) {\n\t\tvar scripts = document.getElementsByTagName(\"script\");\n\t\tif(scripts.length) {\n\t\t\tvar i = scripts.length - 1;\n\t\t\twhile (i > -1 && (!scriptUrl || !/^http(s?):/.test(scriptUrl))) scriptUrl = scripts[i--].src;\n\t\t}\n\t}\n}\n// When supporting browsers where an automatic publicPath is not supported you must specify an output.publicPath manually via configuration\n// or pass an empty string (\"\") and set the __webpack_public_path__ variable from your code to use your own logic.\nif (!scriptUrl) throw new Error(\"Automatic publicPath is not supported in this browser\");\nscriptUrl = scriptUrl.replace(/#.*$/, \"\").replace(/\\?.*$/, \"\").replace(/\\/[^\\/]+$/, \"/\");\n__webpack_require__.p = scriptUrl;","__webpack_require__.b = self.location + \"\";\n\n// object to store loaded chunks\n// \"1\" means \"already loaded\"\nvar installedChunks = {\n\t301: 1\n};\n\n// importScripts chunk loading\nvar installChunk = (data) => {\n\tvar [chunkIds, moreModules, runtime] = data;\n\tfor(var moduleId in moreModules) {\n\t\tif(__webpack_require__.o(moreModules, moduleId)) {\n\t\t\t__webpack_require__.m[moduleId] = moreModules[moduleId];\n\t\t}\n\t}\n\tif(runtime) runtime(__webpack_require__);\n\twhile(chunkIds.length)\n\t\tinstalledChunks[chunkIds.pop()] = 1;\n\tparentChunkLoadingFunction(data);\n};\n__webpack_require__.f.i = (chunkId, promises) => {\n\t// \"1\" is the signal for \"already loaded\"\n\tif(!installedChunks[chunkId]) {\n\t\tif(true) { // all chunks have JS\n\t\t\timportScripts(__webpack_require__.p + __webpack_require__.u(chunkId));\n\t\t}\n\t}\n};\n\nvar chunkLoadingGlobal = self[\"webpackChunkaleo_website\"] = self[\"webpackChunkaleo_website\"] || [];\nvar parentChunkLoadingFunction = chunkLoadingGlobal.push.bind(chunkLoadingGlobal);\nchunkLoadingGlobal.push = installChunk;\n\n// no HMR\n\n// no HMR manifest","// run startup\nvar __webpack_exports__ = __webpack_require__.x();\n"],"names":["webpackQueues","webpackExports","webpackError","resolveQueue","deferred","next","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","undefined","exports","module","__webpack_modules__","m","x","__webpack_exports__","O","Symbol","queue","d","forEach","fn","r","a","body","hasAwait","currentDeps","outerResolve","reject","depQueues","Set","promise","Promise","resolve","rej","deps","map","dep","then","obj","e","ret","wrapDeps","getResult","fnQueue","q","has","add","push","err","result","chunkIds","priority","notFulfilled","Infinity","i","length","fulfilled","j","Object","keys","every","key","splice","definition","o","defineProperty","enumerable","get","f","chunkId","all","reduce","promises","u","g","globalThis","this","Function","window","prop","prototype","hasOwnProperty","call","scriptUrl","importScripts","location","document","currentScript","src","scripts","getElementsByTagName","test","Error","replace","p","b","self","installedChunks","chunkLoadingGlobal","parentChunkLoadingFunction","bind","data","moreModules","runtime","pop"],"sourceRoot":""} \ No newline at end of file diff --git a/383.bundle.js b/383.bundle.js index 61e9b3aaa..725c37b35 100644 --- a/383.bundle.js +++ b/383.bundle.js @@ -1,3 +1,3 @@ /*! For license information please see 383.bundle.js.LICENSE.txt */ -(self.webpackChunkaleo_website=self.webpackChunkaleo_website||[]).push([[383],{5052:(e,t,r)=>{r.a(e,(async(e,n)=>{try{r.d(t,{AleoKeyProvider:()=>p,AleoKeyProviderParams:()=>y,PrivateKey:()=>o._q,ProgramManager:()=>d,ProgramManagerBase:()=>o.L,initThreadPool:()=>o.CK,verifyFunctionExecution:()=>o.hz});var o=r(9933),i=e([o]);o=(i.then?(await i)():i)[0];async function a(e,t){const r=await fetch(e,t);if(!r.ok)throw new Error(r.status+" could not get URL "+e);return r}async function s(e,t){t.method="POST";const r=await fetch(e,t);if(!r.ok)throw new Error(r.status+" could not post URL "+e);return r}class f{host;headers;account;constructor(e,t){this.host=e+"/testnet",t&&t.headers?this.headers=t.headers:this.headers={"X-Aleo-SDK-Version":"0.6.12"}}setAccount(e){this.account=e}getAccount(){return this.account}setHost(e){this.host=e+"/testnet"}async fetchData(e="/"){try{const t=await a(this.host+e,{headers:this.headers});return await t.json()}catch(e){throw new Error("Error fetching data.")}}async findUnspentRecords(e,t,r,n,i,a){if(a=a||[],e<0)throw new Error("Start height must be greater than or equal to 0");const s=new Array;let c,u,l,h,f=0,y=BigInt(0);if(void 0===r){if(void 0===this.account)throw new Error("Private key must be specified in an argument to findOwnedRecords or set in the AleoNetworkClient");l=this.account._privateKey}else try{l=r instanceof o._q?r:o._q.from_string(r)}catch(e){throw new Error("Error parsing private key provided.")}const p=l.to_view_key();try{const e=await this.getLatestHeight();if("number"!=typeof e)throw new Error("Error fetching latest block height.");h=e}catch(e){throw new Error("Error fetching latest block height.")}if(u="number"==typeof t&&t<=h?t:h,e>u)throw new Error("Start height must be less than or equal to end height.");for(;u>e;){c=u-50,c=BigInt(i))))return s;if(void 0!==n&&n.length>0){let e=0;if(t.microcredits()>n[e]){if(e+=1,s.push(t),"number"==typeof i&&(y+=t.microcredits(),y>=BigInt(i)))return s;if(s.length>=n.length)return s}}}}}catch(e){}}}}}}}catch(e){if(console.warn("Error fetching blocks in range: "+c.toString()+"-"+u.toString()),console.warn("Error: ",e),f+=1,f>10)return console.warn("10 failures fetching records reached. Returning records fetched so far"),s}}return s}async getBlock(e){try{return await this.fetchData("/block/"+e)}catch(e){throw new Error("Error fetching block.")}}async getBlockRange(e,t){try{return await this.fetchData("/blocks?start="+e+"&end="+t)}catch(r){throw new Error("Error fetching blocks between "+e+" and "+t+".")}}async getDeploymentTransactionIDForProgram(e){e instanceof o.$r&&(e=e.toString());try{return(await this.fetchData("/find/transactionID/deployment/"+e)).replace('"',"")}catch(e){throw new Error("Error fetching deployment transaction for program.")}}async getDeploymentTransactionForProgram(e){try{const t=await this.getDeploymentTransactionIDForProgram(e);return await this.getTransaction(t)}catch(e){throw new Error("Error fetching deployment transaction for program.")}}async getLatestBlock(){try{return await this.fetchData("/latest/block")}catch(e){throw new Error("Error fetching latest block.")}}async getLatestCommittee(){try{return await this.fetchData("/committee/latest")}catch(e){throw new Error("Error fetching latest block.")}}async getLatestHeight(){try{return await this.fetchData("/latest/height")}catch(e){throw new Error("Error fetching latest height.")}}async getProgram(e){try{return await this.fetchData("/program/"+e)}catch(e){throw new Error("Error fetching program")}}async getProgramObject(e){try{return o.$r.fromString(e)}catch(t){try{return o.$r.fromString(await this.getProgram(e))}catch(t){throw new Error(`${e} is neither a program name or a valid program`)}}}async getProgramImports(e){try{const t={},r=(e instanceof o.$r?e:await this.getProgramObject(e)).getImports();for(let e=0;e0&&!g)try{g=await this.networkClient.getProgramImports(t)}catch(e){throw h(`Error finding program imports. Network response: '${e}'. Please ensure you're connected to a valid Aleo network and the program is deployed to the network.`)}return await o.L.buildExecutionTransaction(w,d,r,a,n,f,this.host,g,y,p,m,b,l)}async execute(e){const t=await this.buildExecutionTransaction(e);return await this.networkClient.submitTransaction(t)}async run(e,t,r,n,i,a,s,c,u,l){let h=u;if(void 0===u&&void 0!==this.account&&(h=this.account.privateKey()),void 0===h)throw"No private key provided and no private key set in the ProgramManager";if(!s||!c)try{[s,c]=await this.keyProvider.functionKeys(a)}catch(e){console.log(`Function keys not found. Key finder response: '${e}'. The function keys will be synthesized`)}return console.log("Running program offline"),console.log("Proving key: ",s),console.log("Verifying key: ",c),o.L.executeFunctionOffline(h,e,t,r,n,!1,i,s,c,this.host,l)}async join(e,t,r,n,i,a,s,c){let u,l,f=s;if(void 0===s&&void 0!==this.account&&(f=this.account.privateKey()),void 0===f)throw"No private key provided and no private key set in the ProgramManager";try{u=n?await this.keyProvider.feePrivateKeys():await this.keyProvider.feePublicKeys(),l=await this.keyProvider.joinKeys()}catch(e){throw h(`Error finding fee keys. Key finder response: '${e}'. Please ensure your key provider is configured correctly.`)}const[y,p]=u,[d,g]=l;try{a=n?await this.getCreditsRecord(r,[],a,i):void 0}catch(e){throw h(`Error finding fee record. Record finder response: '${e}'. Please ensure you're connected to a valid Aleo network and a record with enough balance exists.`)}try{e=e instanceof o.PD?e:o.PD.fromString(e),t=t instanceof o.PD?t:o.PD.fromString(t)}catch(e){throw h("Records provided are not valid. Please ensure they are valid plaintext records.")}const v=await o.L.buildJoinTransaction(f,e,t,r,a,this.host,d,g,y,p,c);return await this.networkClient.submitTransaction(v)}async split(e,t,r,n){let i,a=r;if(void 0===a&&void 0!==this.account&&(a=this.account.privateKey()),void 0===a)throw"No private key provided and no private key set in the ProgramManager";try{i=await this.keyProvider.splitKeys()}catch(e){throw h(`Error finding fee keys. Key finder response: '${e}'. Please ensure your key provider is configured correctly.`)}const[s,c]=i;try{t=t instanceof o.PD?t:o.PD.fromString(t)}catch(e){throw h("Record provided is not valid. Please ensure it is a valid plaintext record.")}const u=await o.L.buildSplitTransaction(a,e,t,this.host,s,c,n);return await this.networkClient.submitTransaction(u)}async synthesizeKeys(e,t,r,n){let i,a=n;void 0===a&&(a=void 0!==this.account?this.account.privateKey():new o._q);try{i=await this.networkClient.getProgramImports(e);const n=await o.L.synthesizeKeyPair(a,e,t,r,i);return[n.provingKey(),n.verifyingKey()]}catch(e){throw h(`Could not synthesize keys - error ${e}. Please ensure the program is valid and the inputs are correct.`)}}async buildTransferTransaction(e,t,r,n,i,a,s,l,f,y){r=u(r);let p,d,g=f;if(void 0===g&&void 0!==this.account&&(g=this.account.privateKey()),void 0===g)throw"No private key provided and no private key set in the ProgramManager";try{p=i?await this.keyProvider.feePrivateKeys():await this.keyProvider.feePublicKeys(),d=await this.keyProvider.transferKeys(r)}catch(e){throw h(`Error finding fee keys. Key finder response: '${e}'. Please ensure your key provider is configured correctly.`)}const[v,w]=p,[m,b]=d;try{const e=[];c(r)?(s=await this.getCreditsRecord(n,[],s,a),e.push(s.nonce())):s=void 0,l=i?await this.getCreditsRecord(n,e,l,a):void 0}catch(e){throw h(`Error finding fee record. Record finder response: '${e}'. Please ensure you're connected to a valid Aleo network and a record with enough balance exists.`)}return await o.L.buildTransferTransaction(g,e,t,r,s,n,l,this.host,m,b,v,w,y)}async buildTransferPublicTransaction(e,t,r,n,o){return this.buildTransferTransaction(e,t,"public",r,!1,void 0,void 0,void 0,n,o)}async buildTransferPublicAsSignerTransaction(e,t,r,n,o){return this.buildTransferTransaction(e,t,"public",r,!1,void 0,void 0,void 0,n,o)}async transfer(e,t,r,n,o,i,a,s,c,u){const l=await this.buildTransferTransaction(e,t,r,n,o,i,a,s,c,u);return await this.networkClient.submitTransaction(l)}async buildBondPublicTransaction(e,t,r,n,o={}){const i=Math.trunc(1e6*n),{programName:a="credits.aleo",functionName:s="bond_public",fee:c=o.fee||.86,privateFee:u=!1,inputs:l=[e,t,r,`${i.toString()}u64`],keySearchParams:h=new y({proverUri:v.bond_public.prover,verifierUri:v.bond_public.verifier,cacheKey:"credits.aleo/bond_public"}),program:f=this.creditsProgram(),...p}=o,d={programName:a,functionName:s,fee:c,privateFee:u,inputs:l,keySearchParams:h,...p};return await this.buildExecutionTransaction(d)}async bondPublic(e,t,r,n,o={}){const i=await this.buildBondPublicTransaction(e,t,r,n,o);return await this.networkClient.submitTransaction(i)}async buildBondValidatorTransaction(e,t,r,n,o={}){const i=Math.trunc(1e6*r),a=Math.trunc(n),{programName:s="credits.aleo",functionName:c="bond_validator",fee:u=o.fee||.86,privateFee:l=!1,inputs:h=[e,t,`${i.toString()}u64`,`${a.toString()}u8`],keySearchParams:f=new y({proverUri:v.bond_validator.prover,verifierUri:v.bond_validator.verifier,cacheKey:"credits.aleo/bond_validator"}),program:p=this.creditsProgram(),...d}=o,g={programName:s,functionName:c,fee:u,privateFee:l,inputs:h,keySearchParams:f,...d};return await this.buildExecutionTransaction(g)}async bondValidator(e,t,r,n,o={}){const i=await this.buildBondValidatorTransaction(e,t,r,n,o);return await this.networkClient.submitTransaction(i)}async buildUnbondPublicTransaction(e,t,r={}){const n=Math.trunc(1e6*t),{programName:o="credits.aleo",functionName:i="unbond_public",fee:a=r.fee||1.3,privateFee:s=!1,inputs:c=[e,`${n.toString()}u64`],keySearchParams:u=new y({proverUri:v.unbond_public.prover,verifierUri:v.unbond_public.verifier,cacheKey:"credits.aleo/unbond_public"}),program:l=this.creditsProgram(),...h}=r,f={programName:o,functionName:i,fee:a,privateFee:s,inputs:c,keySearchParams:u,...h};return this.buildExecutionTransaction(f)}async unbondPublic(e,t,r={}){const n=await this.buildUnbondPublicTransaction(e,t,r);return await this.networkClient.submitTransaction(n)}async buildClaimUnbondPublicTransaction(e,t={}){const{programName:r="credits.aleo",functionName:n="claim_unbond_public",fee:o=t.fee||2,privateFee:i=!1,inputs:a=[e],keySearchParams:s=new y({proverUri:v.claim_unbond_public.prover,verifierUri:v.claim_unbond_public.verifier,cacheKey:"credits.aleo/claim_unbond_public"}),program:c=this.creditsProgram(),...u}=t,l={programName:r,functionName:n,fee:o,privateFee:i,inputs:a,keySearchParams:s,...u};return await this.buildExecutionTransaction(l)}async claimUnbondPublic(e,t={}){const r=await this.buildClaimUnbondPublicTransaction(e,t);return await this.networkClient.submitTransaction(r)}async buildSetValidatorStateTransaction(e,t={}){const{programName:r="credits.aleo",functionName:n="set_validator_state",fee:o=1,privateFee:i=!1,inputs:a=[e.toString()],keySearchParams:s=new y({proverUri:v.set_validator_state.prover,verifierUri:v.set_validator_state.verifier,cacheKey:"credits.aleo/set_validator_state"}),...c}=t,u={programName:r,functionName:n,fee:o,privateFee:i,inputs:a,keySearchParams:s,...c};return await this.execute(u)}async setValidatorState(e,t={}){const r=await this.buildSetValidatorStateTransaction(e,t);return this.networkClient.submitTransaction(r)}verifyExecution(e){try{const t=e.getExecution(),r=e.getFunctionId(),n=e.getProgram(),i=e.getVerifyingKey();return(0,o.hz)(t,i,n,r)}catch(e){return console.warn("The execution was not found in the response, cannot verify the execution"),!1}}createProgramFromSource(e){return o.$r.fromString(e)}creditsProgram(){return o.$r.getCreditsProgram()}verifyProgram(e){try{return o.$r.fromString(e),!0}catch(e){return!1}}async getCreditsRecord(e,t,r,n){try{return r instanceof o.PD?r:o.PD.fromString(r)}catch(r){try{const r=this.recordProvider;return await r.findCreditsRecord(e,!0,t,n)}catch(e){throw h(`Error finding fee record. Record finder response: '${e}'. Please ensure you're connected to a valid Aleo network and a record with enough balance exists.`)}}}}function c(e){return w.has(e)}function u(e){return m.has(e)?e:h(`Invalid transfer type '${e}'. Valid transfer types are 'private', 'privateToPublic', 'public', and 'publicToPrivate'.`)}const g=o.SF.baseUrl();function l(e){const t=o.XV[e.verifyingKey];if(!t)throw new Error("Invalid method name: "+e.verifyingKey);return{name:e.name,locator:e.locator,prover:e.prover,verifier:e.verifier,verifyingKey:t}}const v={bond_public:l(o.SF.bond_public()),bond_validator:l(o.SF.bond_validator()),claim_unbond_public:l(o.SF.claim_unbond_public()),fee_private:l(o.SF.fee_private()),fee_public:l(o.SF.fee_public()),inclusion:l(o.SF.inclusion()),join:l(o.SF.join()),set_validator_state:l(o.SF.set_validator_state()),split:l(o.SF.split()),transfer_private:l(o.SF.transfer_private()),transfer_private_to_public:l(o.SF.transfer_private_to_public()),transfer_public:l(o.SF.transfer_public()),transfer_public_as_signer:l(o.SF.transfer_public_as_signer()),transfer_public_to_private:l(o.SF.transfer_public_to_private()),unbond_public:l(o.SF.unbond_public()),getKey:function(e){return this.hasOwnProperty(e)?this[e]:new Error(`Key "${e}" not found.`)}},w=new Set(["transfer_private","private","transferPrivate","transfer_private_to_public","privateToPublic","transferPrivateToPublic"]),m=new Set(["transfer_private","private","transferPrivate","transfer_private_to_public","privateToPublic","transferPrivateToPublic","transfer_public","transfer_public_as_signer","public","public_as_signer","transferPublic","transferPublicAsSigner","transfer_public_to_private","publicToPrivate","publicAsSigner","transferPublicToPrivate"]),b=new Set(["private","transfer_private","transferPrivate"]),_=new Set(["private_to_public","privateToPublic","transfer_private_to_public","transferPrivateToPublic"]),P=new Set(["public","transfer_public","transferPublic"]),E=new Set(["public_as_signer","transfer_public_as_signer","transferPublicAsSigner"]),k=new Set(["public_to_private","publicToPrivate","transfer_public_to_private","transferPublicToPrivate"]);function h(e){throw console.error(e),e}n()}catch(K){n(K)}}))},5383:(e,t,r)=>{r.a(e,(async(e,t)=>{try{var n=r(5052),o=e([n]);function i(e){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i(e)}function a(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function s(e,t){if(e){if("string"==typeof e)return c(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?c(e,t):void 0}}function c(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0;--i){var a=this.tryEntries[i],s=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),u=n.call(a,"finallyLoc");if(c&&u){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),N(r),w}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;N(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:F(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),w}},t}function f(e,t,r,n,o,i,a){try{var s=e[i](a),c=s.value}catch(e){return void r(e)}s.done?t(c):Promise.resolve(c).then(n,o)}function y(e){return function(){var t=this,r=arguments;return new Promise((function(n,o){var i=e.apply(t,r);function a(e){f(i,n,o,a,s,"next",e)}function s(e){f(i,n,o,a,s,"throw",e)}a(void 0)}))}}n=(o.then?(await o)():o)[0],await n.initThreadPool();var p="https://api.explorer.aleo.org/v1",d=new n.AleoKeyProvider,g=new n.ProgramManager(p,d,void 0);d.useCache(!0),self.postMessage({type:"ALEO_WORKER_READY"});var v=null;self.addEventListener("message",(function(e){if("ALEO_EXECUTE_PROGRAM_LOCAL"===e.data.type){var t=e.data,r=t.localProgram,o=t.aleoFunction,i=t.inputs,c=t.privateKey;console.log("Web worker: Executing function locally...");var f=performance.now();y(h().mark((function e(){var t,a,s,u,l,y,p,w,m,b;return h().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,t=n.PrivateKey.from_string(c),a=g.createProgramFromSource(r),s=a.id(),a.hasFunction(o)){e.next=6;break}throw"Program ".concat(s," does not contain function ").concat(o);case 6:if(u="".concat(s,":").concat(o),l=g.networkClient.getProgramImports(r),v===r){e.next=14;break}return e.next=11,g.synthesizeKeys(r,o,i,t);case 11:y=e.sent,g.keyProvider.cacheKeys(u,y),v=r;case 14:return p=new n.AleoKeyProviderParams({cacheKey:u}),e.next=17,g.run(r,o,i,!1,l,p,void 0,void 0,t,void 0);case 17:w=e.sent,console.log("Web worker: Local execution completed in ".concat(performance.now()-f," ms")),m=w.getOutputs(),(b=w.getExecution())?(n.verifyFunctionExecution(b,d.getKeys(u)[1],a,"hello"),b=b.toString(),console.log("Execution verified successfully: "+b)):b="",console.log("Function execution response: ".concat(m)),self.postMessage({type:"OFFLINE_EXECUTION_COMPLETED",outputs:{outputs:m,execution:b}}),e.next=30;break;case 26:e.prev=26,e.t0=e.catch(0),console.error(e.t0),self.postMessage({type:"ERROR",errorMessage:e.t0.toString()});case 30:case"end":return e.stop()}}),e,null,[[0,26]])})))()}else if("ALEO_EXECUTE_PROGRAM_ON_CHAIN"===e.data.type){var w=e.data,m=w.remoteProgram,b=w.aleoFunction,_=w.inputs,P=w.privateKey,E=w.fee,k=w.privateFee,K=w.feeRecord,T=w.url;console.log("Web worker: Creating execution...");var S=performance.now();y(h().mark((function e(){var t,r,o,i,a,s,c;return h().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,t=n.PrivateKey.from_string(P),e.next=4,g.networkClient.getProgramObject(m);case 4:if(r=e.sent,o=r.id(),r.hasFunction(b)){e.next=8;break}throw"Program ".concat(o," does not contain function ").concat(b);case 8:if(i="".concat(o,":").concat(b),g.keyProvider.containsKeys(i)){e.next=15;break}return console.log("Web worker: Synthesizing proving & verifying keys for: '".concat(o,":").concat(b,"'")),e.next=13,g.synthesizeKeys(m,b,_,t);case 13:a=e.sent,g.keyProvider.cacheKeys(i,a);case 15:return s=new n.AleoKeyProviderParams({cacheKey:i}),"string"==typeof T&&g.setHost(T),e.next=19,g.execute({programName:o,functionName:b,fee:E,privateFee:k,inputs:_,keySearchParams:s,feeRecord:K,privateKey:t});case 19:c=e.sent,console.log("Web worker: On-chain execution transaction created in ".concat(performance.now()-S," ms")),self.postMessage({type:"EXECUTION_TRANSACTION_COMPLETED",executeTransaction:c}),e.next=28;break;case 24:e.prev=24,e.t0=e.catch(0),console.error("Error creating execution transaction: ".concat(e.t0)),self.postMessage({type:"ERROR",errorMessage:e.t0.toString()});case 28:return e.prev=28,g.setHost(p),e.finish(28);case 31:case"end":return e.stop()}}),e,null,[[0,24,28,31]])})))()}else if("ALEO_ESTIMATE_EXECUTION_FEE"===e.data.type){var x=e.data,O=x.remoteProgram,C=x.privateKey,N=x.aleoFunction,R=x.inputs,F=x.url;console.log("Web worker: Estimating execution fee...");var L=performance.now();y(h().mark((function e(){var t,r,o,i,c,f,y,p,d,v,w;return h().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,t=n.PrivateKey.from_string(C),e.next=4,g.networkClient.getProgramObject(O);case 4:if(r=e.sent,o=r.id(),r.getFunctions().includes(N)){e.next=8;break}throw"Program ".concat(o," does not contain function ").concat(N);case 8:return i="".concat(o,":").concat(N),e.next=11,g.networkClient.getProgramImports(O);case 11:if(c=e.sent,g.keyProvider.containsKeys(i)){e.next=18;break}return console.log("Web worker: Synthesizing proving & verifying keys for: '".concat(o,":").concat(N,"'")),e.next=16,g.synthesizeKeys(r.toString(),N,R,t);case 16:f=e.sent,g.keyProvider.cacheKeys(i,f);case 18:return y=g.keyProvider.getKeys(i),m=2,p=l(h=y)||u(h,m)||s(h,m)||a(),d=p[0],v=p[1],e.next=21,n.ProgramManagerBase.estimateExecutionFee(t,O,N,R,F,c,d,v,void 0);case 21:w=e.sent,console.log("Web worker: Execution fee estimated in ".concat(performance.now()-L," ms")),console.log("Execution Fee Estimation: ".concat(w," microcredits")),self.postMessage({type:"EXECUTION_FEE_ESTIMATION_COMPLETED",executionFee:Number(w)/1e6+.01}),e.next=31;break;case 27:e.prev=27,e.t0=e.catch(0),console.error(e.t0),self.postMessage({type:"ERROR",errorMessage:e.t0.toString()});case 31:case"end":return e.stop()}var h,m}),e,null,[[0,27]])})))()}else if("ALEO_ESTIMATE_DEPLOYMENT_FEE"===e.data.type){var A=e.data,M=A.program;A.url;console.log("Web worker: Estimating deployment fee...");var I=performance.now();y(h().mark((function e(){var t,r;return h().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,g.networkClient.getProgramImports(M);case 3:return t=e.sent,console.log("Estimating deployment fee.."),e.next=7,n.ProgramManagerBase.estimateDeploymentFee(M,t);case 7:r=e.sent,console.log("Web worker: Deployment fee estimation completed in ".concat(performance.now()-I," ms")),console.log("Deployment Fee Estimation: ".concat(r," microcredits")),self.postMessage({type:"DEPLOYMENT_FEE_ESTIMATION_COMPLETED",deploymentFee:Number(r)/1e6+.01}),e.next=17;break;case 13:e.prev=13,e.t0=e.catch(0),console.error(e.t0),self.postMessage({type:"ERROR",errorMessage:e.t0.toString()});case 17:case"end":return e.stop()}}),e,null,[[0,13]])})))()}else if("ALEO_TRANSFER"===e.data.type){var D=e.data,$=D.privateKey,U=D.amountCredits,B=D.recipient,j=D.transfer_type,W=D.amountRecord,V=D.fee,z=D.privateFee,H=D.feeRecord,X=D.url;console.log("Web worker: Creating transfer of type ".concat(j,"..."));var G=performance.now();y(h().mark((function e(){var t;return h().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,"string"==typeof X&&g.setHost(X),e.next=4,g.transfer(U,B,j,V,z,void 0,W,H,n.PrivateKey.from_string($),void 0);case 4:t=e.sent,console.log("Web worker: Transfer transaction ".concat(t," created in ").concat(performance.now()-G," ms")),self.postMessage({type:"TRANSFER_TRANSACTION_COMPLETED",transferTransaction:t}),e.next=13;break;case 9:e.prev=9,e.t0=e.catch(0),console.error(e.t0),self.postMessage({type:"ERROR",errorMessage:e.t0.toString()});case 13:return e.prev=13,g.setHost(p),e.finish(13);case 16:case"end":return e.stop()}}),e,null,[[0,9,13,16]])})))()}else if("ALEO_DEPLOY"===e.data.type){var Y=e.data,q=Y.program,J=Y.privateKey,Q=Y.fee,Z=Y.privateFee,ee=Y.feeRecord,te=Y.url;console.log("Web worker: Creating deployment...");var re=performance.now();y(h().mark((function e(){var t,r,o;return h().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,"string"==typeof te&&g.setHost(te),t=g.createProgramFromSource(q),r=!1,e.prev=4,e.next=7,g.networkClient.getProgram(t.id());case 7:r=!0,e.next=13;break;case 10:e.prev=10,e.t0=e.catch(4),console.log("Program not found on the Aleo Network - proceeding with deployment...");case 13:if(!r){e.next=15;break}throw"Program ".concat(t.id()," already exists on the network");case 15:return console.log("fee is: ",Q),e.next=18,g.deploy(q,Q,Z,void 0,ee,n.PrivateKey.from_string(J));case 18:o=e.sent,console.log("Web worker: Deployment transaction ".concat(o," created in ").concat(performance.now()-re," ms")),self.postMessage({type:"DEPLOY_TRANSACTION_COMPLETED",deployTransaction:o}),e.next=27;break;case 23:e.prev=23,e.t1=e.catch(0),console.log(e.t1),self.postMessage({type:"ERROR",errorMessage:e.t1.toString()});case 27:return e.prev=27,g.setHost(p),e.finish(27);case 30:case"end":return e.stop()}}),e,null,[[0,23,27,30],[4,10]])})))()}else if("ALEO_SPLIT"===e.data.type){var ne=e.data,oe=ne.splitAmount,ie=ne.record,ae=ne.privateKey,se=ne.url;console.log("Web worker: Creating split...");var ce=performance.now();y(h().mark((function e(){var t;return h().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,"string"==typeof se&&g.setHost(se),e.next=4,g.split(oe,ie,n.PrivateKey.from_string(ae),void 0);case 4:t=e.sent,console.log("Web worker: Split transaction ".concat(t," created in ").concat(performance.now()-ce," ms")),self.postMessage({type:"SPLIT_TRANSACTION_COMPLETED",splitTransaction:t}),e.next=13;break;case 9:e.prev=9,e.t0=e.catch(0),console.log(e.t0),self.postMessage({type:"ERROR",errorMessage:e.t0.toString()});case 13:return e.prev=13,g.setHost(p),e.finish(13);case 16:case"end":return e.stop()}}),e,null,[[0,9,13,16]])})))()}else if("ALEO_JOIN"===e.data.type){var ue=e.data,le=ue.recordOne,he=ue.recordTwo,fe=ue.fee,ye=ue.privateFee,pe=ue.feeRecord,de=ue.privateKey,ge=ue.url;console.log("Web worker: Creating join...");var ve=performance.now();y(h().mark((function e(){var t;return h().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,"string"==typeof ge&&g.setHost(ge),e.next=4,g.join(le,he,fe,ye,void 0,pe,n.PrivateKey.from_string(de),void 0);case 4:t=e.sent,console.log("Web worker: Join transaction ".concat(t," created in ").concat(performance.now()-ve," ms")),self.postMessage({type:"JOIN_TRANSACTION_COMPLETED",joinTransaction:t}),e.next=13;break;case 9:e.prev=9,e.t0=e.catch(0),console.log(e.t0),self.postMessage({type:"ERROR",errorMessage:e.t0.toString()});case 13:return e.prev=13,g.setHost(p),e.finish(13);case 16:case"end":return e.stop()}}),e,null,[[0,9,13,16]])})))()}})),t()}catch(w){t(w)}}),1)}}]); +(self.webpackChunkaleo_website=self.webpackChunkaleo_website||[]).push([[383],{5052:(e,t,r)=>{r.a(e,(async(e,n)=>{try{r.d(t,{AleoKeyProvider:()=>y,AleoKeyProviderParams:()=>p,PrivateKey:()=>o._q,ProgramManager:()=>d,ProgramManagerBase:()=>o.L,initThreadPool:()=>o.CK,verifyFunctionExecution:()=>o.hz});var o=r(9933),i=e([o]);o=(i.then?(await i)():i)[0];async function a(e,t){const r=await fetch(e,t);if(!r.ok)throw new Error(r.status+" could not get URL "+e);return r}async function s(e,t){t.method="POST";const r=await fetch(e,t);if(!r.ok)throw new Error(r.status+" could not post URL "+e);return r}class f{host;headers;account;constructor(e,t){this.host=e+"/testnet",t&&t.headers?this.headers=t.headers:this.headers={"X-Aleo-SDK-Version":"0.6.12"}}setAccount(e){this.account=e}getAccount(){return this.account}setHost(e){this.host=e+"/testnet"}async fetchData(e="/"){try{const t=await a(this.host+e,{headers:this.headers});return await t.json()}catch(e){throw new Error("Error fetching data.")}}async findUnspentRecords(e,t,r,n,i,a){if(a=a||[],e<0)throw new Error("Start height must be greater than or equal to 0");const s=new Array;let c,u,l,h,f=0,p=BigInt(0);if(void 0===r){if(void 0===this.account)throw new Error("Private key must be specified in an argument to findOwnedRecords or set in the AleoNetworkClient");l=this.account._privateKey}else try{l=r instanceof o._q?r:o._q.from_string(r)}catch(e){throw new Error("Error parsing private key provided.")}const y=l.to_view_key();try{const e=await this.getLatestHeight();if("number"!=typeof e)throw new Error("Error fetching latest block height.");h=e}catch(e){throw new Error("Error fetching latest block height.")}if(u="number"==typeof t&&t<=h?t:h,e>u)throw new Error("Start height must be less than or equal to end height.");for(;u>e;){c=u-50,c=BigInt(i))))return s;if(void 0!==n&&n.length>0){let e=0;if(t.microcredits()>n[e]){if(e+=1,s.push(t),"number"==typeof i&&(p+=t.microcredits(),p>=BigInt(i)))return s;if(s.length>=n.length)return s}}}}}catch(e){}}}}}}}catch(e){if(console.warn("Error fetching blocks in range: "+c.toString()+"-"+u.toString()),console.warn("Error: ",e),f+=1,f>10)return console.warn("10 failures fetching records reached. Returning records fetched so far"),s}}return s}async getBlock(e){try{return await this.fetchData("/block/"+e)}catch(e){throw new Error("Error fetching block.")}}async getBlockRange(e,t){try{return await this.fetchData("/blocks?start="+e+"&end="+t)}catch(r){throw new Error("Error fetching blocks between "+e+" and "+t+".")}}async getDeploymentTransactionIDForProgram(e){e instanceof o.$r&&(e=e.toString());try{return(await this.fetchData("/find/transactionID/deployment/"+e)).replace('"',"")}catch(e){throw new Error("Error fetching deployment transaction for program.")}}async getDeploymentTransactionForProgram(e){try{const t=await this.getDeploymentTransactionIDForProgram(e);return await this.getTransaction(t)}catch(e){throw new Error("Error fetching deployment transaction for program.")}}async getLatestBlock(){try{return await this.fetchData("/latest/block")}catch(e){throw new Error("Error fetching latest block.")}}async getLatestCommittee(){try{return await this.fetchData("/committee/latest")}catch(e){throw new Error("Error fetching latest block.")}}async getLatestHeight(){try{return await this.fetchData("/latest/height")}catch(e){throw new Error("Error fetching latest height.")}}async getProgram(e){try{return await this.fetchData("/program/"+e)}catch(e){throw new Error("Error fetching program")}}async getProgramObject(e){try{return o.$r.fromString(e)}catch(t){try{return o.$r.fromString(await this.getProgram(e))}catch(t){throw new Error(`${e} is neither a program name or a valid program`)}}}async getProgramImports(e){try{const t={},r=(e instanceof o.$r?e:await this.getProgramObject(e)).getImports();for(let e=0;e0&&!g)try{g=await this.networkClient.getProgramImports(t)}catch(e){throw h(`Error finding program imports. Network response: '${e}'. Please ensure you're connected to a valid Aleo network and the program is deployed to the network.`)}return await o.L.buildExecutionTransaction(m,d,r,a,n,f,this.host,g,p,y,w,b,l)}async execute(e){const t=await this.buildExecutionTransaction(e);return await this.networkClient.submitTransaction(t)}async run(e,t,r,n,i,a,s,c,u,l){let h=u;if(void 0===u&&void 0!==this.account&&(h=this.account.privateKey()),void 0===h)throw"No private key provided and no private key set in the ProgramManager";if(!s||!c)try{[s,c]=await this.keyProvider.functionKeys(a)}catch(e){console.log(`Function keys not found. Key finder response: '${e}'. The function keys will be synthesized`)}return console.log("Running program offline"),console.log("Proving key: ",s),console.log("Verifying key: ",c),o.L.executeFunctionOffline(h,e,t,r,n,!1,i,s,c,this.host,l)}async join(e,t,r,n,i,a,s,c){let u,l,f=s;if(void 0===s&&void 0!==this.account&&(f=this.account.privateKey()),void 0===f)throw"No private key provided and no private key set in the ProgramManager";try{u=n?await this.keyProvider.feePrivateKeys():await this.keyProvider.feePublicKeys(),l=await this.keyProvider.joinKeys()}catch(e){throw h(`Error finding fee keys. Key finder response: '${e}'. Please ensure your key provider is configured correctly.`)}const[p,y]=u,[d,g]=l;try{a=n?await this.getCreditsRecord(r,[],a,i):void 0}catch(e){throw h(`Error finding fee record. Record finder response: '${e}'. Please ensure you're connected to a valid Aleo network and a record with enough balance exists.`)}try{e=e instanceof o.PD?e:o.PD.fromString(e),t=t instanceof o.PD?t:o.PD.fromString(t)}catch(e){throw h("Records provided are not valid. Please ensure they are valid plaintext records.")}const v=await o.L.buildJoinTransaction(f,e,t,r,a,this.host,d,g,p,y,c);return await this.networkClient.submitTransaction(v)}async split(e,t,r,n){let i,a=r;if(void 0===a&&void 0!==this.account&&(a=this.account.privateKey()),void 0===a)throw"No private key provided and no private key set in the ProgramManager";try{i=await this.keyProvider.splitKeys()}catch(e){throw h(`Error finding fee keys. Key finder response: '${e}'. Please ensure your key provider is configured correctly.`)}const[s,c]=i;try{t=t instanceof o.PD?t:o.PD.fromString(t)}catch(e){throw h("Record provided is not valid. Please ensure it is a valid plaintext record.")}const u=await o.L.buildSplitTransaction(a,e,t,this.host,s,c,n);return await this.networkClient.submitTransaction(u)}async synthesizeKeys(e,t,r,n){let i,a=n;void 0===a&&(a=void 0!==this.account?this.account.privateKey():new o._q);try{i=await this.networkClient.getProgramImports(e);const n=await o.L.synthesizeKeyPair(a,e,t,r,i);return[n.provingKey(),n.verifyingKey()]}catch(e){throw h(`Could not synthesize keys - error ${e}. Please ensure the program is valid and the inputs are correct.`)}}async buildTransferTransaction(e,t,r,n,i,a,s,l,f,p){r=u(r);let y,d,g=f;if(void 0===g&&void 0!==this.account&&(g=this.account.privateKey()),void 0===g)throw"No private key provided and no private key set in the ProgramManager";try{y=i?await this.keyProvider.feePrivateKeys():await this.keyProvider.feePublicKeys(),d=await this.keyProvider.transferKeys(r)}catch(e){throw h(`Error finding fee keys. Key finder response: '${e}'. Please ensure your key provider is configured correctly.`)}const[v,m]=y,[w,b]=d;try{const e=[];c(r)?(s=await this.getCreditsRecord(n,[],s,a),e.push(s.nonce())):s=void 0,l=i?await this.getCreditsRecord(n,e,l,a):void 0}catch(e){throw h(`Error finding fee record. Record finder response: '${e}'. Please ensure you're connected to a valid Aleo network and a record with enough balance exists.`)}return await o.L.buildTransferTransaction(g,e,t,r,s,n,l,this.host,w,b,v,m,p)}async buildTransferPublicTransaction(e,t,r,n,o){return this.buildTransferTransaction(e,t,"public",r,!1,void 0,void 0,void 0,n,o)}async buildTransferPublicAsSignerTransaction(e,t,r,n,o){return this.buildTransferTransaction(e,t,"public",r,!1,void 0,void 0,void 0,n,o)}async transfer(e,t,r,n,o,i,a,s,c,u){const l=await this.buildTransferTransaction(e,t,r,n,o,i,a,s,c,u);return await this.networkClient.submitTransaction(l)}async buildBondPublicTransaction(e,t,r,n,o={}){const i=Math.trunc(1e6*n),{programName:a="credits.aleo",functionName:s="bond_public",fee:c=o.fee||.86,privateFee:u=!1,inputs:l=[e,t,r,`${i.toString()}u64`],keySearchParams:h=new p({proverUri:v.bond_public.prover,verifierUri:v.bond_public.verifier,cacheKey:"credits.aleo/bond_public"}),program:f=this.creditsProgram(),...y}=o,d={programName:a,functionName:s,fee:c,privateFee:u,inputs:l,keySearchParams:h,...y};return await this.buildExecutionTransaction(d)}async bondPublic(e,t,r,n,o={}){const i=await this.buildBondPublicTransaction(e,t,r,n,o);return await this.networkClient.submitTransaction(i)}async buildBondValidatorTransaction(e,t,r,n,o={}){const i=Math.trunc(1e6*r),a=Math.trunc(n),{programName:s="credits.aleo",functionName:c="bond_validator",fee:u=o.fee||.86,privateFee:l=!1,inputs:h=[e,t,`${i.toString()}u64`,`${a.toString()}u8`],keySearchParams:f=new p({proverUri:v.bond_validator.prover,verifierUri:v.bond_validator.verifier,cacheKey:"credits.aleo/bond_validator"}),program:y=this.creditsProgram(),...d}=o,g={programName:s,functionName:c,fee:u,privateFee:l,inputs:h,keySearchParams:f,...d};return await this.buildExecutionTransaction(g)}async bondValidator(e,t,r,n,o={}){const i=await this.buildBondValidatorTransaction(e,t,r,n,o);return await this.networkClient.submitTransaction(i)}async buildUnbondPublicTransaction(e,t,r={}){const n=Math.trunc(1e6*t),{programName:o="credits.aleo",functionName:i="unbond_public",fee:a=r.fee||1.3,privateFee:s=!1,inputs:c=[e,`${n.toString()}u64`],keySearchParams:u=new p({proverUri:v.unbond_public.prover,verifierUri:v.unbond_public.verifier,cacheKey:"credits.aleo/unbond_public"}),program:l=this.creditsProgram(),...h}=r,f={programName:o,functionName:i,fee:a,privateFee:s,inputs:c,keySearchParams:u,...h};return this.buildExecutionTransaction(f)}async unbondPublic(e,t,r={}){const n=await this.buildUnbondPublicTransaction(e,t,r);return await this.networkClient.submitTransaction(n)}async buildClaimUnbondPublicTransaction(e,t={}){const{programName:r="credits.aleo",functionName:n="claim_unbond_public",fee:o=t.fee||2,privateFee:i=!1,inputs:a=[e],keySearchParams:s=new p({proverUri:v.claim_unbond_public.prover,verifierUri:v.claim_unbond_public.verifier,cacheKey:"credits.aleo/claim_unbond_public"}),program:c=this.creditsProgram(),...u}=t,l={programName:r,functionName:n,fee:o,privateFee:i,inputs:a,keySearchParams:s,...u};return await this.buildExecutionTransaction(l)}async claimUnbondPublic(e,t={}){const r=await this.buildClaimUnbondPublicTransaction(e,t);return await this.networkClient.submitTransaction(r)}async buildSetValidatorStateTransaction(e,t={}){const{programName:r="credits.aleo",functionName:n="set_validator_state",fee:o=1,privateFee:i=!1,inputs:a=[e.toString()],keySearchParams:s=new p({proverUri:v.set_validator_state.prover,verifierUri:v.set_validator_state.verifier,cacheKey:"credits.aleo/set_validator_state"}),...c}=t,u={programName:r,functionName:n,fee:o,privateFee:i,inputs:a,keySearchParams:s,...c};return await this.execute(u)}async setValidatorState(e,t={}){const r=await this.buildSetValidatorStateTransaction(e,t);return this.networkClient.submitTransaction(r)}verifyExecution(e){try{const t=e.getExecution(),r=e.getFunctionId(),n=e.getProgram(),i=e.getVerifyingKey();return(0,o.hz)(t,i,n,r)}catch(e){return console.warn("The execution was not found in the response, cannot verify the execution"),!1}}createProgramFromSource(e){return o.$r.fromString(e)}creditsProgram(){return o.$r.getCreditsProgram()}verifyProgram(e){try{return o.$r.fromString(e),!0}catch(e){return!1}}async getCreditsRecord(e,t,r,n){try{return r instanceof o.PD?r:o.PD.fromString(r)}catch(r){try{const r=this.recordProvider;return await r.findCreditsRecord(e,!0,t,n)}catch(e){throw h(`Error finding fee record. Record finder response: '${e}'. Please ensure you're connected to a valid Aleo network and a record with enough balance exists.`)}}}}function c(e){return m.has(e)}function u(e){return w.has(e)?e:h(`Invalid transfer type '${e}'. Valid transfer types are 'private', 'privateToPublic', 'public', and 'publicToPrivate'.`)}const g=o.SF.baseUrl();function l(e){const t=o.XV[e.verifyingKey];if(!t)throw new Error("Invalid method name: "+e.verifyingKey);return{name:e.name,locator:e.locator,prover:e.prover,verifier:e.verifier,verifyingKey:t}}const v={bond_public:l(o.SF.bond_public()),bond_validator:l(o.SF.bond_validator()),claim_unbond_public:l(o.SF.claim_unbond_public()),fee_private:l(o.SF.fee_private()),fee_public:l(o.SF.fee_public()),inclusion:l(o.SF.inclusion()),join:l(o.SF.join()),set_validator_state:l(o.SF.set_validator_state()),split:l(o.SF.split()),transfer_private:l(o.SF.transfer_private()),transfer_private_to_public:l(o.SF.transfer_private_to_public()),transfer_public:l(o.SF.transfer_public()),transfer_public_as_signer:l(o.SF.transfer_public_as_signer()),transfer_public_to_private:l(o.SF.transfer_public_to_private()),unbond_public:l(o.SF.unbond_public()),getKey:function(e){return this.hasOwnProperty(e)?this[e]:new Error(`Key "${e}" not found.`)}},m=new Set(["transfer_private","private","transferPrivate","transfer_private_to_public","privateToPublic","transferPrivateToPublic"]),w=new Set(["transfer_private","private","transferPrivate","transfer_private_to_public","privateToPublic","transferPrivateToPublic","transfer_public","transfer_public_as_signer","public","public_as_signer","transferPublic","transferPublicAsSigner","transfer_public_to_private","publicToPrivate","publicAsSigner","transferPublicToPrivate"]),b=new Set(["private","transfer_private","transferPrivate"]),_=new Set(["private_to_public","privateToPublic","transfer_private_to_public","transferPrivateToPublic"]),P=new Set(["public","transfer_public","transferPublic"]),E=new Set(["public_as_signer","transfer_public_as_signer","transferPublicAsSigner"]),k=new Set(["public_to_private","publicToPrivate","transfer_public_to_private","transferPublicToPrivate"]);function h(e){throw console.error(e),e}n()}catch(K){n(K)}}))},5383:(e,t,r)=>{r.a(e,(async(e,t)=>{try{var n=r(5052),o=e([n]);function i(e){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i(e)}function a(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function s(e,t){if(e){if("string"==typeof e)return c(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?c(e,t):void 0}}function c(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0;--i){var a=this.tryEntries[i],s=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),u=n.call(a,"finallyLoc");if(c&&u){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),N(r),m}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;N(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:F(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),m}},t}function f(e,t,r,n,o,i,a){try{var s=e[i](a),c=s.value}catch(e){return void r(e)}s.done?t(c):Promise.resolve(c).then(n,o)}function p(e){return function(){var t=this,r=arguments;return new Promise((function(n,o){var i=e.apply(t,r);function a(e){f(i,n,o,a,s,"next",e)}function s(e){f(i,n,o,a,s,"throw",e)}a(void 0)}))}}n=(o.then?(await o)():o)[0],await n.initThreadPool();var y="https://api.explorer.provable.com/v1",d=new n.AleoKeyProvider,g=new n.ProgramManager(y,d,void 0);d.useCache(!0),self.postMessage({type:"ALEO_WORKER_READY"});var v=null;self.addEventListener("message",(function(e){if("ALEO_EXECUTE_PROGRAM_LOCAL"===e.data.type){var t=e.data,r=t.localProgram,o=t.aleoFunction,i=t.inputs,c=t.privateKey;console.log("Web worker: Executing function locally...");var f=performance.now();p(h().mark((function e(){var t,a,s,u,l,p,y,m,w,b;return h().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,t=n.PrivateKey.from_string(c),a=g.createProgramFromSource(r),s=a.id(),a.hasFunction(o)){e.next=6;break}throw"Program ".concat(s," does not contain function ").concat(o);case 6:if(u="".concat(s,":").concat(o),l=g.networkClient.getProgramImports(r),v===r){e.next=14;break}return e.next=11,g.synthesizeKeys(r,o,i,t);case 11:p=e.sent,g.keyProvider.cacheKeys(u,p),v=r;case 14:return y=new n.AleoKeyProviderParams({cacheKey:u}),e.next=17,g.run(r,o,i,!1,l,y,void 0,void 0,t,void 0);case 17:m=e.sent,console.log("Web worker: Local execution completed in ".concat(performance.now()-f," ms")),w=m.getOutputs(),(b=m.getExecution())?(n.verifyFunctionExecution(b,d.getKeys(u)[1],a,"hello"),b=b.toString(),console.log("Execution verified successfully: "+b)):b="",console.log("Function execution response: ".concat(w)),self.postMessage({type:"OFFLINE_EXECUTION_COMPLETED",outputs:{outputs:w,execution:b}}),e.next=30;break;case 26:e.prev=26,e.t0=e.catch(0),console.error(e.t0),self.postMessage({type:"ERROR",errorMessage:e.t0.toString()});case 30:case"end":return e.stop()}}),e,null,[[0,26]])})))()}else if("ALEO_EXECUTE_PROGRAM_ON_CHAIN"===e.data.type){var m=e.data,w=m.remoteProgram,b=m.aleoFunction,_=m.inputs,P=m.privateKey,E=m.fee,k=m.privateFee,K=m.feeRecord,T=m.url;console.log("Web worker: Creating execution...");var S=performance.now();p(h().mark((function e(){var t,r,o,i,a,s,c;return h().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,t=n.PrivateKey.from_string(P),e.next=4,g.networkClient.getProgramObject(w);case 4:if(r=e.sent,o=r.id(),r.hasFunction(b)){e.next=8;break}throw"Program ".concat(o," does not contain function ").concat(b);case 8:if(i="".concat(o,":").concat(b),g.keyProvider.containsKeys(i)){e.next=15;break}return console.log("Web worker: Synthesizing proving & verifying keys for: '".concat(o,":").concat(b,"'")),e.next=13,g.synthesizeKeys(w,b,_,t);case 13:a=e.sent,g.keyProvider.cacheKeys(i,a);case 15:return s=new n.AleoKeyProviderParams({cacheKey:i}),"string"==typeof T&&g.setHost(T),e.next=19,g.execute({programName:o,functionName:b,fee:E,privateFee:k,inputs:_,keySearchParams:s,feeRecord:K,privateKey:t});case 19:c=e.sent,console.log("Web worker: On-chain execution transaction created in ".concat(performance.now()-S," ms")),self.postMessage({type:"EXECUTION_TRANSACTION_COMPLETED",executeTransaction:c}),e.next=28;break;case 24:e.prev=24,e.t0=e.catch(0),console.error("Error creating execution transaction: ".concat(e.t0)),self.postMessage({type:"ERROR",errorMessage:e.t0.toString()});case 28:return e.prev=28,g.setHost(y),e.finish(28);case 31:case"end":return e.stop()}}),e,null,[[0,24,28,31]])})))()}else if("ALEO_ESTIMATE_EXECUTION_FEE"===e.data.type){var x=e.data,O=x.remoteProgram,C=x.privateKey,N=x.aleoFunction,R=x.inputs,F=x.url;console.log("Web worker: Estimating execution fee...");var L=performance.now();p(h().mark((function e(){var t,r,o,i,c,f,p,y,d,v,m;return h().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,t=n.PrivateKey.from_string(C),e.next=4,g.networkClient.getProgramObject(O);case 4:if(r=e.sent,o=r.id(),r.getFunctions().includes(N)){e.next=8;break}throw"Program ".concat(o," does not contain function ").concat(N);case 8:return i="".concat(o,":").concat(N),e.next=11,g.networkClient.getProgramImports(O);case 11:if(c=e.sent,g.keyProvider.containsKeys(i)){e.next=18;break}return console.log("Web worker: Synthesizing proving & verifying keys for: '".concat(o,":").concat(N,"'")),e.next=16,g.synthesizeKeys(r.toString(),N,R,t);case 16:f=e.sent,g.keyProvider.cacheKeys(i,f);case 18:return p=g.keyProvider.getKeys(i),w=2,y=l(h=p)||u(h,w)||s(h,w)||a(),d=y[0],v=y[1],e.next=21,n.ProgramManagerBase.estimateExecutionFee(t,O,N,R,F,c,d,v,void 0);case 21:m=e.sent,console.log("Web worker: Execution fee estimated in ".concat(performance.now()-L," ms")),console.log("Execution Fee Estimation: ".concat(m," microcredits")),self.postMessage({type:"EXECUTION_FEE_ESTIMATION_COMPLETED",executionFee:Number(m)/1e6+.01}),e.next=31;break;case 27:e.prev=27,e.t0=e.catch(0),console.error(e.t0),self.postMessage({type:"ERROR",errorMessage:e.t0.toString()});case 31:case"end":return e.stop()}var h,w}),e,null,[[0,27]])})))()}else if("ALEO_ESTIMATE_DEPLOYMENT_FEE"===e.data.type){var A=e.data,M=A.program;A.url;console.log("Web worker: Estimating deployment fee...");var I=performance.now();p(h().mark((function e(){var t,r;return h().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,g.networkClient.getProgramImports(M);case 3:return t=e.sent,console.log("Estimating deployment fee.."),e.next=7,n.ProgramManagerBase.estimateDeploymentFee(M,t);case 7:r=e.sent,console.log("Web worker: Deployment fee estimation completed in ".concat(performance.now()-I," ms")),console.log("Deployment Fee Estimation: ".concat(r," microcredits")),self.postMessage({type:"DEPLOYMENT_FEE_ESTIMATION_COMPLETED",deploymentFee:Number(r)/1e6+.01}),e.next=17;break;case 13:e.prev=13,e.t0=e.catch(0),console.error(e.t0),self.postMessage({type:"ERROR",errorMessage:e.t0.toString()});case 17:case"end":return e.stop()}}),e,null,[[0,13]])})))()}else if("ALEO_TRANSFER"===e.data.type){var D=e.data,$=D.privateKey,U=D.amountCredits,B=D.recipient,j=D.transfer_type,W=D.amountRecord,V=D.fee,z=D.privateFee,H=D.feeRecord,X=D.url;console.log("Web worker: Creating transfer of type ".concat(j,"..."));var G=performance.now();p(h().mark((function e(){var t;return h().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,"string"==typeof X&&g.setHost(X),e.next=4,g.transfer(U,B,j,V,z,void 0,W,H,n.PrivateKey.from_string($),void 0);case 4:t=e.sent,console.log("Web worker: Transfer transaction ".concat(t," created in ").concat(performance.now()-G," ms")),self.postMessage({type:"TRANSFER_TRANSACTION_COMPLETED",transferTransaction:t}),e.next=13;break;case 9:e.prev=9,e.t0=e.catch(0),console.error(e.t0),self.postMessage({type:"ERROR",errorMessage:e.t0.toString()});case 13:return e.prev=13,g.setHost(y),e.finish(13);case 16:case"end":return e.stop()}}),e,null,[[0,9,13,16]])})))()}else if("ALEO_DEPLOY"===e.data.type){var Y=e.data,q=Y.program,J=Y.privateKey,Q=Y.fee,Z=Y.privateFee,ee=Y.feeRecord,te=Y.url;console.log("Web worker: Creating deployment...");var re=performance.now();p(h().mark((function e(){var t,r,o;return h().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,"string"==typeof te&&g.setHost(te),t=g.createProgramFromSource(q),r=!1,e.prev=4,e.next=7,g.networkClient.getProgram(t.id());case 7:r=!0,e.next=13;break;case 10:e.prev=10,e.t0=e.catch(4),console.log("Program not found on the Aleo Network - proceeding with deployment...");case 13:if(!r){e.next=15;break}throw"Program ".concat(t.id()," already exists on the network");case 15:return console.log("fee is: ",Q),e.next=18,g.deploy(q,Q,Z,void 0,ee,n.PrivateKey.from_string(J));case 18:o=e.sent,console.log("Web worker: Deployment transaction ".concat(o," created in ").concat(performance.now()-re," ms")),self.postMessage({type:"DEPLOY_TRANSACTION_COMPLETED",deployTransaction:o}),e.next=27;break;case 23:e.prev=23,e.t1=e.catch(0),console.log(e.t1),self.postMessage({type:"ERROR",errorMessage:e.t1.toString()});case 27:return e.prev=27,g.setHost(y),e.finish(27);case 30:case"end":return e.stop()}}),e,null,[[0,23,27,30],[4,10]])})))()}else if("ALEO_SPLIT"===e.data.type){var ne=e.data,oe=ne.splitAmount,ie=ne.record,ae=ne.privateKey,se=ne.url;console.log("Web worker: Creating split...");var ce=performance.now();p(h().mark((function e(){var t;return h().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,"string"==typeof se&&g.setHost(se),e.next=4,g.split(oe,ie,n.PrivateKey.from_string(ae),void 0);case 4:t=e.sent,console.log("Web worker: Split transaction ".concat(t," created in ").concat(performance.now()-ce," ms")),self.postMessage({type:"SPLIT_TRANSACTION_COMPLETED",splitTransaction:t}),e.next=13;break;case 9:e.prev=9,e.t0=e.catch(0),console.log(e.t0),self.postMessage({type:"ERROR",errorMessage:e.t0.toString()});case 13:return e.prev=13,g.setHost(y),e.finish(13);case 16:case"end":return e.stop()}}),e,null,[[0,9,13,16]])})))()}else if("ALEO_JOIN"===e.data.type){var ue=e.data,le=ue.recordOne,he=ue.recordTwo,fe=ue.fee,pe=ue.privateFee,ye=ue.feeRecord,de=ue.privateKey,ge=ue.url;console.log("Web worker: Creating join...");var ve=performance.now();p(h().mark((function e(){var t;return h().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,"string"==typeof ge&&g.setHost(ge),e.next=4,g.join(le,he,fe,pe,void 0,ye,n.PrivateKey.from_string(de),void 0);case 4:t=e.sent,console.log("Web worker: Join transaction ".concat(t," created in ").concat(performance.now()-ve," ms")),self.postMessage({type:"JOIN_TRANSACTION_COMPLETED",joinTransaction:t}),e.next=13;break;case 9:e.prev=9,e.t0=e.catch(0),console.log(e.t0),self.postMessage({type:"ERROR",errorMessage:e.t0.toString()});case 13:return e.prev=13,g.setHost(y),e.finish(13);case 16:case"end":return e.stop()}}),e,null,[[0,9,13,16]])})))()}})),t()}catch(m){t(m)}}),1)}}]); //# sourceMappingURL=383.bundle.js.map \ No newline at end of file diff --git a/383.bundle.js.map b/383.bundle.js.map index 2c92204db..185ff8bf5 100644 --- a/383.bundle.js.map +++ b/383.bundle.js.map @@ -1 +1 @@ -{"version":3,"file":"383.bundle.js","mappings":";iWAAOA,eAAeC,EAAIC,EAAmBC,GACzC,MAAMC,QAAiBC,MAAMH,EAAKC,GAElC,IAAKC,EAASE,GACV,MAAM,IAAIC,MAAMH,EAASI,OAAS,sBAAwBN,GAG9D,OAAOE,CACX,CAGOJ,eAAeS,EAAKP,EAAmBC,GAC1CA,EAAQO,OAAS,OAEjB,MAAMN,QAAiBC,MAAMH,EAAKC,GAElC,IAAKC,EAASE,GACV,MAAM,IAAIC,MAAMH,EAASI,OAAS,uBAAyBN,GAG/D,OAAOE,CACX,CCUA,MAAMO,EACJC,KACAC,QACAC,QAEAC,WAAAA,CAAYH,EAAcT,GACxBa,KAAKJ,KAAOA,EAAO,WAEfT,GAAWA,EAAQU,QACrBG,KAAKH,QAAUV,EAAQU,QAGvBG,KAAKH,QAAU,CAEb,qBAAsB,UAa5BI,UAAAA,CAAWH,GACTE,KAAKF,QAAUA,EASjBI,UAAAA,GACE,OAAOF,KAAKF,QASdK,OAAAA,CAAQP,GACNI,KAAKJ,KAAOA,EAAO,WAGrB,eAAMQ,CACFlB,EAAM,KAER,IACA,MAAME,QAAiBH,EAAIe,KAAKJ,KAAOV,EAAK,CAC1CW,QAASG,KAAKH,UAGhB,aAAaT,EAASiB,OACpB,MAAOC,GACP,MAAM,IAAIf,MAAM,yBA2BpB,wBAAMgB,CACFC,EACAC,EACAC,EACAC,EACAC,EACAC,GAIF,GAFAA,EAASA,GAAU,GAEfL,EAAc,EAChB,MAAM,IAAIjB,MAAM,mDAIlB,MAAMuB,EAAU,IAAIC,MACpB,IAAIC,EACAC,EACAC,EAGAC,EAFAC,EAAW,EACXC,EAAmBC,OAAO,GAI9B,QAA0B,IAAfZ,EAA4B,CACrC,QAA4B,IAAjBV,KAAKF,QACd,MAAM,IAAIP,MAAM,o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4I,IAAI,gCAAD4M,OAAiChX,EAAW,gBAAAgX,OAAeR,YAAYC,MAAQF,GAAS,QACnGf,KAAKQ,YAAY,CACbjW,KAAM,6BACN4Z,gBAAiB3Z,IAClB0Z,EAAAxG,KAAA,gBAAAwG,EAAAnF,KAAA,EAAAmF,EAAAxC,GAAAwC,EAAA,SAEHlY,QAAQ4I,IAAGsP,EAAAxC,IACX1B,KAAKQ,YAAY,CACbjW,KAAM,QACNoX,aAAcuC,EAAAxC,GAAMxV,aACrB,QAEiC,OAFjCgY,EAAAnF,KAAA,GAEHwB,EAAelY,QAAQiY,GAAa4D,EAAA5E,OAAA,6BAAA4E,EAAAhF,OAAA,GAAA+E,EAAA,uBA/B5CnE,EAkCJ,CACJ","sources":["webpack://aleo-website/../src/utils.ts","webpack://aleo-website/../src/network-client.ts","webpack://aleo-website/../src/function-key-provider.ts","webpack://aleo-website/../src/program-manager.ts","webpack://aleo-website/../src/index.ts","webpack://aleo-website/./src/workers/worker.js"],"sourcesContent":["export async function get(url: URL | string, options?: RequestInit) {\n const response = await fetch(url, options);\n\n if (!response.ok) {\n throw new Error(response.status + \" could not get URL \" + url);\n }\n\n return response;\n}\n\n\nexport async function post(url: URL | string, options: RequestInit) {\n options.method = \"POST\";\n\n const response = await fetch(url, options);\n\n if (!response.ok) {\n throw new Error(response.status + \" could not post URL \" + url);\n }\n\n return response;\n}\n","import { get, post } from \"./utils\";\nimport {\n Account,\n Block,\n RecordCiphertext,\n Program,\n RecordPlaintext,\n PrivateKey,\n Transaction,\n TransactionModel,\n logAndThrow\n} from \"./index\";\n\ntype ProgramImports = { [key: string]: string | Program };\n\ninterface AleoNetworkClientOptions {\n headers?: { [key: string]: string };\n}\n\n/**\n * Client library that encapsulates REST calls to publicly exposed endpoints of Aleo nodes. The methods provided in this\n * allow users to query public information from the Aleo blockchain and submit transactions to the network.\n *\n * @param {string} host\n * @example\n * // Connection to a local node\n * const localNetworkClient = new AleoNetworkClient(\"http://localhost:3030\");\n *\n * // Connection to a public beacon node\n * const publicnetworkClient = new AleoNetworkClient(\"https://api.explorer.aleo.org/v1\");\n */\nclass AleoNetworkClient {\n host: string;\n headers: { [key: string]: string };\n account: Account | undefined;\n\n constructor(host: string, options?: AleoNetworkClientOptions) {\n this.host = host + \"/testnet\";\n\n if (options && options.headers) {\n this.headers = options.headers;\n\n } else {\n this.headers = {\n // This is replaced by the actual version by a Rollup plugin\n \"X-Aleo-SDK-Version\": \"%%VERSION%%\",\n };\n }\n }\n\n /**\n * Set an account to use in networkClient calls\n *\n * @param {Account} account\n * @example\n * const account = new Account();\n * networkClient.setAccount(account);\n */\n setAccount(account: Account) {\n this.account = account;\n }\n\n /**\n * Return the Aleo account used in the networkClient\n *\n * @example\n * const account = networkClient.getAccount();\n */\n getAccount(): Account | undefined {\n return this.account;\n }\n\n /**\n * Set a new host for the networkClient\n *\n * @param {string} host The address of a node hosting the Aleo API\n * @param host\n */\n setHost(host: string) {\n this.host = host + \"/testnet\";\n }\n\n async fetchData(\n url = \"/\",\n ): Promise {\n try {\n const response = await get(this.host + url, {\n headers: this.headers\n });\n\n return await response.json();\n } catch (error) {\n throw new Error(\"Error fetching data.\");\n }\n }\n\n /**\n * Attempts to find unspent records in the Aleo blockchain for a specified private key\n * @param {number} startHeight - The height at which to start searching for unspent records\n * @param {number} endHeight - The height at which to stop searching for unspent records\n * @param {string | PrivateKey} privateKey - The private key to use to find unspent records\n * @param {number[]} amounts - The amounts (in microcredits) to search for (eg. [100, 200, 3000])\n * @param {number} maxMicrocredits - The maximum number of microcredits to search for\n * @param {string[]} nonces - The nonces of already found records to exclude from the search\n *\n * @example\n * // Find all unspent records\n * const privateKey = \"[PRIVATE_KEY]\";\n * const records = networkClient.findUnspentRecords(0, undefined, privateKey);\n *\n * // Find specific amounts\n * const startHeight = 500000;\n * const amounts = [600000, 1000000];\n * const records = networkClient.findUnspentRecords(startHeight, undefined, privateKey, amounts);\n *\n * // Find specific amounts with a maximum number of cumulative microcredits\n * const maxMicrocredits = 100000;\n * const records = networkClient.findUnspentRecords(startHeight, undefined, privateKey, undefined, maxMicrocredits);\n */\n async findUnspentRecords(\n startHeight: number,\n endHeight: number | undefined,\n privateKey: string | PrivateKey | undefined,\n amounts: number[] | undefined,\n maxMicrocredits?: number | undefined,\n nonces?: string[] | undefined,\n ): Promise | Error> {\n nonces = nonces || [];\n // Ensure start height is not negative\n if (startHeight < 0) {\n throw new Error(\"Start height must be greater than or equal to 0\");\n }\n\n // Initialize search parameters\n const records = new Array();\n let start;\n let end;\n let resolvedPrivateKey: PrivateKey;\n let failures = 0;\n let totalRecordValue = BigInt(0);\n let latestHeight: number;\n\n // Ensure a private key is present to find owned records\n if (typeof privateKey === \"undefined\") {\n if (typeof this.account === \"undefined\") {\n throw new Error(\"Private key must be specified in an argument to findOwnedRecords or set in the AleoNetworkClient\");\n } else {\n resolvedPrivateKey = this.account._privateKey;\n }\n } else {\n try {\n resolvedPrivateKey = privateKey instanceof PrivateKey ? privateKey : PrivateKey.from_string(privateKey);\n } catch (error) {\n throw new Error(\"Error parsing private key provided.\");\n }\n }\n const viewKey = resolvedPrivateKey.to_view_key();\n\n // Get the latest height to ensure the range being searched is valid\n try {\n const blockHeight = await this.getLatestHeight();\n if (typeof blockHeight === \"number\") {\n latestHeight = blockHeight;\n } else {\n throw new Error(\"Error fetching latest block height.\");\n }\n } catch (error) {\n throw new Error(\"Error fetching latest block height.\");\n }\n\n // If no end height is specified or is greater than the latest height, set the end height to the latest height\n if (typeof endHeight === \"number\" && endHeight <= latestHeight) {\n end = endHeight\n } else {\n end = latestHeight;\n }\n\n // If the starting is greater than the ending height, return an error\n if (startHeight > end) {\n throw new Error(\"Start height must be less than or equal to end height.\");\n }\n\n // Iterate through blocks in reverse order in chunks of 50\n while (end > startHeight) {\n start = end - 50;\n if (start < startHeight) {\n start = startHeight;\n }\n try {\n // Get 50 blocks (or the difference between the start and end if less than 50)\n const blocks = await this.getBlockRange(start, end);\n end = start;\n if (!(blocks instanceof Error)) {\n // Iterate through blocks to find unspent records\n for (let i = 0; i < blocks.length; i++) {\n const block = blocks[i];\n const transactions = block.transactions;\n if (!(typeof transactions === \"undefined\")) {\n for (let j = 0; j < transactions.length; j++) {\n const confirmedTransaction = transactions[j];\n // Search for unspent records in execute transactions of credits.aleo\n if (confirmedTransaction.type == \"execute\") {\n const transaction = confirmedTransaction.transaction;\n if (transaction.execution && !(typeof transaction.execution.transitions == \"undefined\")) {\n for (let k = 0; k < transaction.execution.transitions.length; k++) {\n const transition = transaction.execution.transitions[k];\n // Only search for unspent records in credits.aleo (for now)\n if (transition.program !== \"credits.aleo\") {\n continue;\n }\n if (!(typeof transition.outputs == \"undefined\")) {\n for (let l = 0; l < transition.outputs.length; l++) {\n const output = transition.outputs[l];\n if (output.type === \"record\") {\n try {\n // Create a wasm record ciphertext object from the found output\n const record = RecordCiphertext.fromString(output.value);\n // Determine if the record is owned by the specified view key\n if (record.isOwner(viewKey)) {\n // Decrypt the record and get the serial number\n const recordPlaintext = record.decrypt(viewKey);\n\n // If the record has already been found, skip it\n const nonce = recordPlaintext.nonce();\n if (nonces.includes(nonce)) {\n continue;\n }\n\n // Otherwise record the nonce that has been found\n const serialNumber = recordPlaintext.serialNumberString(resolvedPrivateKey, \"credits.aleo\", \"credits\");\n // Attempt to see if the serial number is spent\n try {\n await this.getTransitionId(serialNumber);\n } catch (error) {\n // If it's not found, add it to the list of unspent records\n if (!amounts) {\n records.push(recordPlaintext);\n // If the user specified a maximum number of microcredits, check if the search has found enough\n if (typeof maxMicrocredits === \"number\") {\n totalRecordValue += recordPlaintext.microcredits();\n // Exit if the search has found the amount specified\n if (totalRecordValue >= BigInt(maxMicrocredits)) {\n return records;\n }\n }\n }\n // If the user specified a list of amounts, check if the search has found them\n if (!(typeof amounts === \"undefined\") && amounts.length > 0) {\n let amounts_found = 0;\n if (recordPlaintext.microcredits() > amounts[amounts_found]) {\n amounts_found += 1;\n records.push(recordPlaintext);\n // If the user specified a maximum number of microcredits, check if the search has found enough\n if (typeof maxMicrocredits === \"number\") {\n totalRecordValue += recordPlaintext.microcredits();\n // Exit if the search has found the amount specified\n if (totalRecordValue >= BigInt(maxMicrocredits)) {\n return records;\n }\n }\n if (records.length >= amounts.length) {\n return records;\n }\n }\n }\n }\n }\n } catch (error) {\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n } catch (error) {\n // If there is an error fetching blocks, log it and keep searching\n console.warn(\"Error fetching blocks in range: \" + start.toString() + \"-\" + end.toString());\n console.warn(\"Error: \", error);\n failures += 1;\n if (failures > 10) {\n console.warn(\"10 failures fetching records reached. Returning records fetched so far\");\n return records;\n }\n }\n }\n return records;\n }\n\n /**\n * Returns the contents of the block at the specified block height\n *\n * @param {number} height\n * @example\n * const block = networkClient.getBlock(1234);\n */\n async getBlock(height: number): Promise {\n try {\n const block = await this.fetchData(\"/block/\" + height);\n return block;\n } catch (error) {\n throw new Error(\"Error fetching block.\");\n }\n }\n\n /**\n * Returns a range of blocks between the specified block heights\n *\n * @param {number} start\n * @param {number} end\n * @example\n * const blockRange = networkClient.getBlockRange(2050, 2100);\n */\n async getBlockRange(start: number, end: number): Promise | Error> {\n try {\n return await this.fetchData>(\"/blocks?start=\" + start + \"&end=\" + end);\n } catch (error) {\n const errorMessage = \"Error fetching blocks between \" + start + \" and \" + end + \".\"\n throw new Error(errorMessage);\n }\n }\n\n /**\n * Returns the deployment transaction id associated with the specified program\n *\n * @param {Program | string} program\n * @returns {TransactionModel | Error}\n */\n async getDeploymentTransactionIDForProgram(program: Program | string): Promise {\n if (program instanceof Program) {\n program = program.toString();\n }\n try {\n const id = await this.fetchData(\"/find/transactionID/deployment/\" + program);\n return id.replace(\"\\\"\", \"\")\n } catch (error) {\n throw new Error(\"Error fetching deployment transaction for program.\");\n }\n }\n\n /**\n * Returns the deployment transaction associated with a specified program\n *\n * @param {Program | string} program\n * @returns {TransactionModel | Error}\n */\n async getDeploymentTransactionForProgram(program: Program | string): Promise {\n try {\n const transaction_id = await this.getDeploymentTransactionIDForProgram(program);\n return await this.getTransaction(transaction_id);\n } catch (error) {\n throw new Error(\"Error fetching deployment transaction for program.\");\n }\n }\n\n /**\n * Returns the contents of the latest block\n *\n * @example\n * const latestHeight = networkClient.getLatestBlock();\n */\n async getLatestBlock(): Promise {\n try {\n return await this.fetchData(\"/latest/block\") as Block;\n } catch (error) {\n throw new Error(\"Error fetching latest block.\");\n }\n }\n\n /**\n * Returns the latest committee\n *\n * @returns {Promise} A javascript object containing the latest committee\n */\n async getLatestCommittee(): Promise {\n try {\n return await this.fetchData(\"/committee/latest\");\n } catch (error) {\n throw new Error(\"Error fetching latest block.\");\n }\n }\n\n /**\n * Returns the latest block height\n *\n * @example\n * const latestHeight = networkClient.getLatestHeight();\n */\n async getLatestHeight(): Promise {\n try {\n return await this.fetchData(\"/latest/height\");\n } catch (error) {\n throw new Error(\"Error fetching latest height.\");\n }\n }\n\n /**\n * Returns the source code of a program given a program ID\n *\n * @param {string} programId The program ID of a program deployed to the Aleo Network\n * @return {Promise} Source code of the program\n *\n * @example\n * const program = networkClient.getProgram(\"hello_hello.aleo\");\n * const expectedSource = \"program hello_hello.aleo;\\n\\nfunction hello:\\n input r0 as u32.public;\\n input r1 as u32.private;\\n add r0 r1 into r2;\\n output r2 as u32.private;\\n\"\n * assert.equal(program, expectedSource);\n */\n async getProgram(programId: string): Promise {\n try {\n return await this.fetchData(\"/program/\" + programId)\n } catch (error) {\n throw new Error(\"Error fetching program\");\n }\n }\n\n /**\n * Returns a program object from a program ID or program source code\n *\n * @param {string} inputProgram The program ID or program source code of a program deployed to the Aleo Network\n * @return {Promise} Source code of the program\n *\n * @example\n * const programID = \"hello_hello.aleo\";\n * const programSource = \"program hello_hello.aleo;\\n\\nfunction hello:\\n input r0 as u32.public;\\n input r1 as u32.private;\\n add r0 r1 into r2;\\n output r2 as u32.private;\\n\"\n *\n * // Get program object from program ID or program source code\n * const programObjectFromID = await networkClient.getProgramObject(programID);\n * const programObjectFromSource = await networkClient.getProgramObject(programSource);\n *\n * // Both program objects should be equal\n * assert.equal(programObjectFromID.to_string(), programObjectFromSource.to_string());\n */\n async getProgramObject(inputProgram: string): Promise {\n try {\n return Program.fromString(inputProgram);\n } catch (error) {\n try {\n return Program.fromString((await this.getProgram(inputProgram)));\n } catch (error) {\n throw new Error(`${inputProgram} is neither a program name or a valid program`);\n }\n }\n }\n\n /**\n * Returns an object containing the source code of a program and the source code of all programs it imports\n *\n * @param {Program | string} inputProgram The program ID or program source code of a program deployed to the Aleo Network\n * @returns {Promise} Object of the form { \"program_id\": \"program_source\", .. } containing program id & source code for all program imports\n *\n * @example\n * const double_test_source = \"import multiply_test.aleo;\\n\\nprogram double_test.aleo;\\n\\nfunction double_it:\\n input r0 as u32.private;\\n call multiply_test.aleo/multiply 2u32 r0 into r1;\\n output r1 as u32.private;\\n\"\n * const double_test = Program.fromString(double_test_source);\n * const expectedImports = {\n * \"multiply_test.aleo\": \"program multiply_test.aleo;\\n\\nfunction multiply:\\n input r0 as u32.public;\\n input r1 as u32.private;\\n mul r0 r1 into r2;\\n output r2 as u32.private;\\n\"\n * }\n *\n * // Imports can be fetched using the program ID, source code, or program object\n * let programImports = await networkClient.getProgramImports(\"double_test.aleo\");\n * assert.deepStrictEqual(programImports, expectedImports);\n *\n * // Using the program source code\n * programImports = await networkClient.getProgramImports(double_test_source);\n * assert.deepStrictEqual(programImports, expectedImports);\n *\n * // Using the program object\n * programImports = await networkClient.getProgramImports(double_test);\n * assert.deepStrictEqual(programImports, expectedImports);\n */\n async getProgramImports(inputProgram: Program | string): Promise {\n try {\n const imports: ProgramImports = {};\n\n // Get the program object or fail if the program is not valid or does not exist\n const program = inputProgram instanceof Program ? inputProgram : (await this.getProgramObject(inputProgram));\n\n // Get the list of programs that the program imports\n const importList = program.getImports();\n\n // Recursively get any imports that the imported programs have in a depth first search order\n for (let i = 0; i < importList.length; i++) {\n const import_id = importList[i];\n if (!imports.hasOwnProperty(import_id)) {\n const programSource = await this.getProgram(import_id);\n const nestedImports = await this.getProgramImports(import_id);\n for (const key in nestedImports) {\n if (!imports.hasOwnProperty(key)) {\n imports[key] = nestedImports[key];\n }\n }\n imports[import_id] = programSource;\n }\n }\n return imports;\n } catch (error) {\n throw logAndThrow(\"Error fetching program imports: \" + error)\n }\n }\n\n /**\n * Get a list of the program names that a program imports\n *\n * @param {Program | string} inputProgram - The program id or program source code to get the imports of\n * @returns {string[]} - The list of program names that the program imports\n *\n * @example\n * const programImportsNames = networkClient.getProgramImports(\"double_test.aleo\");\n * const expectedImportsNames = [\"multiply_test.aleo\"];\n * assert.deepStrictEqual(programImportsNames, expectedImportsNames);\n */\n async getProgramImportNames(inputProgram: Program | string): Promise {\n try {\n const program = inputProgram instanceof Program ? inputProgram : (await this.getProgramObject(inputProgram));\n return program.getImports();\n } catch (error) {\n throw new Error(\"Error fetching program imports with error: \" + error);\n }\n }\n\n /**\n * Returns the names of the mappings of a program\n *\n * @param {string} programId - The program ID to get the mappings of (e.g. \"credits.aleo\")\n * @example\n * const mappings = networkClient.getProgramMappingNames(\"credits.aleo\");\n * const expectedMappings = [\"account\"];\n * assert.deepStrictEqual(mappings, expectedMappings);\n */\n async getProgramMappingNames(programId: string): Promise | Error> {\n try {\n return await this.fetchData>(\"/program/\" + programId + \"/mappings\")\n } catch (error) {\n throw new Error(\"Error fetching program mappings - ensure the program exists on chain before trying again\");\n }\n }\n\n /**\n * Returns the value of a program's mapping for a specific key\n *\n * @param {string} programId - The program ID to get the mapping value of (e.g. \"credits.aleo\")\n * @param {string} mappingName - The name of the mapping to get the value of (e.g. \"account\")\n * @param {string} key - The key of the mapping to get the value of (e.g. \"aleo1rhgdu77hgyqd3xjj8ucu3jj9r2krwz6mnzyd80gncr5fxcwlh5rsvzp9px\")\n * @return {Promise} String representation of the value of the mapping\n *\n * @example\n * // Get public balance of an account\n * const mappingValue = networkClient.getMappingValue(\"credits.aleo\", \"account\", \"aleo1rhgdu77hgyqd3xjj8ucu3jj9r2krwz6mnzyd80gncr5fxcwlh5rsvzp9px\");\n * const expectedValue = \"0u64\";\n * assert.equal(mappingValue, expectedValue);\n */\n async getProgramMappingValue(programId: string, mappingName: string, key: string): Promise {\n try {\n return await this.fetchData(\"/program/\" + programId + \"/mapping/\" + mappingName + \"/\" + key)\n } catch (error) {\n throw new Error(\"Error fetching mapping value - ensure the mapping exists and the key is correct\");\n }\n }\n\n /**\n * Returns the latest state/merkle root of the Aleo blockchain\n *\n * @example\n * const stateRoot = networkClient.getStateRoot();\n */\n async getStateRoot(): Promise {\n try {\n return await this.fetchData(\"/latest/stateRoot\");\n } catch (error) {\n throw new Error(\"Error fetching Aleo state root\");\n }\n }\n\n /**\n * Returns a transaction by its unique identifier\n *\n * @param {string} id\n * @example\n * const transaction = networkClient.getTransaction(\"at1handz9xjrqeynjrr0xay4pcsgtnczdksz3e584vfsgaz0dh0lyxq43a4wj\");\n */\n async getTransaction(id: string): Promise {\n try {\n return await this.fetchData(\"/transaction/\" + id);\n } catch (error) {\n throw new Error(\"Error fetching transaction.\");\n }\n }\n\n /**\n * Returns the transactions present at the specified block height\n *\n * @param {number} height\n * @example\n * const transactions = networkClient.getTransactions(654);\n */\n async getTransactions(height: number): Promise | Error> {\n try {\n return await this.fetchData>(\"/block/\" + height.toString() + \"/transactions\");\n } catch (error) {\n throw new Error(\"Error fetching transactions.\");\n }\n }\n\n /**\n * Returns the transactions in the memory pool.\n *\n * @example\n * const transactions = networkClient.getTransactionsInMempool();\n */\n async getTransactionsInMempool(): Promise | Error> {\n try {\n return await this.fetchData>(\"/memoryPool/transactions\");\n } catch (error) {\n throw new Error(\"Error fetching transactions from mempool.\");\n }\n }\n\n /**\n * Returns the transition ID of the transition corresponding to the ID of the input or output.\n * @param {string} inputOrOutputID - ID of the input or output.\n *\n * @example\n * const transitionId = networkClient.getTransitionId(\"2429232855236830926144356377868449890830704336664550203176918782554219952323field\");\n */\n async getTransitionId(inputOrOutputID: string): Promise {\n try {\n return await this.fetchData(\"/find/transitionID/\" + inputOrOutputID);\n } catch (error) {\n throw new Error(\"Error fetching transition ID.\");\n }\n }\n\n /**\n * Submit an execute or deployment transaction to the Aleo network\n *\n * @param {Transaction | string} transaction - The transaction to submit to the network\n * @returns {string | Error} - The transaction id of the submitted transaction or the resulting error\n */\n async submitTransaction(transaction: Transaction | string): Promise {\n const transaction_string = transaction instanceof Transaction ? transaction.toString() : transaction;\n try {\n const response = await post(this.host + \"/transaction/broadcast\", {\n body: transaction_string,\n headers: Object.assign({}, this.headers, {\n \"Content-Type\": \"application/json\",\n }),\n });\n\n try {\n return await response.json();\n\n } catch (error) {\n throw new Error(`Error posting transaction. Aleo network response: ${(error as Error).message}`);\n }\n } catch (error) {\n throw new Error(`Error posting transaction: No response received: ${(error as Error).message}`);\n }\n }\n}\n\nexport { AleoNetworkClient, AleoNetworkClientOptions, ProgramImports }\n","import {\n ProvingKey,\n VerifyingKey,\n CREDITS_PROGRAM_KEYS,\n KEY_STORE,\n Key,\n PRIVATE_TRANSFER,\n PRIVATE_TO_PUBLIC_TRANSFER,\n PUBLIC_TRANSFER,\n PUBLIC_TO_PRIVATE_TRANSFER,\n PUBLIC_TRANSFER_AS_SIGNER\n} from \"./index\";\nimport { get } from \"./utils\";\n\ntype FunctionKeyPair = [ProvingKey, VerifyingKey];\ntype CachedKeyPair = [Uint8Array, Uint8Array];\ntype AleoKeyProviderInitParams = {\n proverUri?: string;\n verifierUri?: string;\n cacheKey?: string;\n};\n\n/**\n * Interface for record search parameters. This allows for arbitrary search parameters to be passed to record provider\n * implementations.\n */\ninterface KeySearchParams {\n [key: string]: any; // This allows for arbitrary keys with any type values\n}\n\n/**\n * AleoKeyProviderParams search parameter for the AleoKeyProvider. It allows for the specification of a proverUri and\n * verifierUri to fetch keys via HTTP from a remote resource as well as a unique cacheKey to store the keys in memory.\n */\nclass AleoKeyProviderParams implements KeySearchParams {\n name: string | undefined;\n proverUri: string | undefined;\n verifierUri: string | undefined;\n cacheKey: string | undefined;\n\n /**\n * Create a new AleoKeyProviderParams object which implements the KeySearchParams interface. Users can optionally\n * specify a url for the proverUri & verifierUri to fetch keys via HTTP from a remote resource as well as a unique\n * cacheKey to store the keys in memory for future use. If no proverUri or verifierUri is specified, a cachekey must\n * be provided.\n *\n * @param { AleoKeyProviderInitParams } params - Optional search parameters\n */\n constructor(params: {proverUri?: string, verifierUri?: string, cacheKey?: string, name?: string}) {\n this.proverUri = params.proverUri;\n this.verifierUri = params.verifierUri;\n this.cacheKey = params.cacheKey;\n this.name = params.name;\n }\n}\n\n/**\n * KeyProvider interface. Enables the retrieval of public proving and verifying keys for Aleo Programs.\n */\ninterface FunctionKeyProvider {\n /**\n * Get bond_public function keys from the credits.aleo program\n *\n * @returns {Promise} Proving and verifying keys for the bond_public function\n */\n bondPublicKeys(): Promise;\n\n /**\n * Get bond_validator function keys from the credits.aleo program\n *\n * @returns {Promise} Proving and verifying keys for the bond_validator function\n */\n bondValidatorKeys(): Promise;\n\n /**\n * Cache a set of keys. This will overwrite any existing keys with the same keyId. The user can check if a keyId\n * exists in the cache using the containsKeys method prior to calling this method if overwriting is not desired.\n *\n * @param {string} keyId access key for the cache\n * @param {FunctionKeyPair} keys keys to cache\n */\n cacheKeys(keyId: string, keys: FunctionKeyPair): void;\n\n /**\n * Get unbond_public function keys from the credits.aleo program\n *\n * @returns {Promise} Proving and verifying keys for the unbond_public function\n */\n claimUnbondPublicKeys(): Promise;\n\n /**\n * Get arbitrary function keys from a provider\n *\n * @param {KeySearchParams | undefined} params - Optional search parameters for the key provider\n * @returns {Promise} Proving and verifying keys for the specified program\n *\n * @example\n * // Create a search object which implements the KeySearchParams interface\n * class IndexDbSearch implements KeySearchParams {\n * db: string\n * keyId: string\n * constructor(params: {db: string, keyId: string}) {\n * this.db = params.db;\n * this.keyId = params.keyId;\n * }\n * }\n *\n * // Create a new object which implements the KeyProvider interface\n * class IndexDbKeyProvider implements FunctionKeyProvider {\n * async functionKeys(params: KeySearchParams): Promise {\n * return new Promise((resolve, reject) => {\n * const request = indexedDB.open(params.db, 1);\n *\n * request.onupgradeneeded = function(e) {\n * const db = e.target.result;\n * if (!db.objectStoreNames.contains('keys')) {\n * db.createObjectStore('keys', { keyPath: 'id' });\n * }\n * };\n *\n * request.onsuccess = function(e) {\n * const db = e.target.result;\n * const transaction = db.transaction([\"keys\"], \"readonly\");\n * const store = transaction.objectStore(\"keys\");\n * const request = store.get(params.keyId);\n * request.onsuccess = function(e) {\n * if (request.result) {\n * resolve(request.result as FunctionKeyPair);\n * } else {\n * reject(new Error(\"Key not found\"));\n * }\n * };\n * request.onerror = function(e) { reject(new Error(\"Error fetching key\")); };\n * };\n *\n * request.onerror = function(e) { reject(new Error(\"Error opening database\")); };\n * });\n * }\n *\n * // implement the other methods...\n * }\n *\n *\n * const keyProvider = new AleoKeyProvider();\n * const networkClient = new AleoNetworkClient(\"https://api.explorer.aleo.org/v1\");\n * const recordProvider = new NetworkRecordProvider(account, networkClient);\n *\n * // Initialize a program manager with the key provider to automatically fetch keys for value transfers\n * const programManager = new ProgramManager(\"https://api.explorer.aleo.org/v1\", keyProvider, recordProvider);\n * programManager.transfer(1, \"aleo166q6ww6688cug7qxwe7nhctjpymydwzy2h7rscfmatqmfwnjvggqcad0at\", \"public\", 0.5);\n *\n * // Keys can also be fetched manually\n * const searchParams = new IndexDbSearch({db: \"keys\", keyId: \"credits.aleo:transferPrivate\"});\n * const [transferPrivateProvingKey, transferPrivateVerifyingKey] = await keyProvider.functionKeys(searchParams);\n */\n functionKeys(params?: KeySearchParams): Promise;\n\n /**\n * Get fee_private function keys from the credits.aleo program\n *\n * @returns {Promise} Proving and verifying keys for the join function\n */\n feePrivateKeys(): Promise;\n\n /**\n * Get fee_public function keys from the credits.aleo program\n *\n * @returns {Promise} Proving and verifying keys for the join function\n */\n feePublicKeys(): Promise;\n\n /**\n * Get join function keys from the credits.aleo program\n *\n * @returns {Promise} Proving and verifying keys for the join function\n */\n joinKeys(): Promise;\n\n /**\n * Get split function keys from the credits.aleo program\n *\n * @returns {Promise} Proving and verifying keys for the join function\n */\n splitKeys(): Promise;\n\n /**\n * Get keys for a variant of the transfer function from the credits.aleo program\n *\n * @param {string} visibility Visibility of the transfer function (private, public, privateToPublic, publicToPrivate)\n * @returns {Promise} Proving and verifying keys for the specified transfer function\n *\n * @example\n * // Create a new object which implements the KeyProvider interface\n * const networkClient = new AleoNetworkClient(\"https://api.explorer.aleo.org/v1\");\n * const keyProvider = new AleoKeyProvider();\n * const recordProvider = new NetworkRecordProvider(account, networkClient);\n *\n * // Initialize a program manager with the key provider to automatically fetch keys for value transfers\n * const programManager = new ProgramManager(\"https://api.explorer.aleo.org/v1\", keyProvider, recordProvider);\n * programManager.transfer(1, \"aleo166q6ww6688cug7qxwe7nhctjpymydwzy2h7rscfmatqmfwnjvggqcad0at\", \"public\", 0.5);\n *\n * // Keys can also be fetched manually\n * const [transferPublicProvingKey, transferPublicVerifyingKey] = await keyProvider.transferKeys(\"public\");\n */\n transferKeys(visibility: string): Promise;\n\n /**\n * Get unbond_public function keys from the credits.aleo program\n *\n * @returns {Promise} Proving and verifying keys for the join function\n */\n unBondPublicKeys(): Promise;\n\n}\n\n\n/**\n * AleoKeyProvider class. Implements the KeyProvider interface. Enables the retrieval of Aleo program proving and\n * verifying keys for the credits.aleo program over http from official Aleo sources and storing and retrieving function\n * keys from a local memory cache.\n */\nclass AleoKeyProvider implements FunctionKeyProvider {\n cache: Map;\n cacheOption: boolean;\n keyUris: string;\n\n async fetchBytes(\n url = \"/\",\n ): Promise {\n try {\n const response = await get(url);\n const data = await response.arrayBuffer();\n return new Uint8Array(data);\n } catch (error) {\n throw new Error(\"Error fetching data.\" + error);\n }\n }\n\n constructor() {\n this.keyUris = KEY_STORE;\n this.cache = new Map();\n this.cacheOption = false;\n }\n\n /**\n * Use local memory to store keys\n *\n * @param {boolean} useCache whether to store keys in local memory\n */\n useCache(useCache: boolean) {\n this.cacheOption = useCache;\n }\n\n /**\n * Clear the key cache\n */\n clearCache() {\n this.cache.clear();\n }\n\n /**\n * Cache a set of keys. This will overwrite any existing keys with the same keyId. The user can check if a keyId\n * exists in the cache using the containsKeys method prior to calling this method if overwriting is not desired.\n *\n * @param {string} keyId access key for the cache\n * @param {FunctionKeyPair} keys keys to cache\n */\n cacheKeys(keyId: string, keys: FunctionKeyPair) {\n const [provingKey, verifyingKey] = keys;\n this.cache.set(keyId, [provingKey.toBytes(), verifyingKey.toBytes()]);\n }\n\n /**\n * Determine if a keyId exists in the cache\n *\n * @param {string} keyId keyId of a proving and verifying key pair\n * @returns {boolean} true if the keyId exists in the cache, false otherwise\n */\n containsKeys(keyId: string): boolean {\n return this.cache.has(keyId)\n }\n\n /**\n * Delete a set of keys from the cache\n *\n * @param {string} keyId keyId of a proving and verifying key pair to delete from memory\n * @returns {boolean} true if the keyId exists in the cache and was deleted, false if the key did not exist\n */\n deleteKeys(keyId: string): boolean {\n return this.cache.delete(keyId)\n }\n\n /**\n * Get a set of keys from the cache\n * @param keyId keyId of a proving and verifying key pair\n *\n * @returns {FunctionKeyPair | Error} Proving and verifying keys for the specified program\n */\n getKeys(keyId: string): FunctionKeyPair | Error {\n console.debug(`Checking if key exists in cache. KeyId: ${keyId}`)\n if (this.cache.has(keyId)) {\n const [provingKeyBytes, verifyingKeyBytes] = this.cache.get(keyId);\n return [ProvingKey.fromBytes(provingKeyBytes), VerifyingKey.fromBytes(verifyingKeyBytes)];\n } else {\n return new Error(\"Key not found in cache.\");\n }\n }\n\n /**\n * Get arbitrary function keys from a provider\n *\n * @param {KeySearchParams} params parameters for the key search in form of: {proverUri: string, verifierUri: string, cacheKey: string}\n * @returns {Promise} Proving and verifying keys for the specified program\n *\n * @example\n * // Create a new object which implements the KeyProvider interface\n * const networkClient = new AleoNetworkClient(\"https://api.explorer.aleo.org/v1\");\n * const keyProvider = new AleoKeyProvider();\n * const recordProvider = new NetworkRecordProvider(account, networkClient);\n *\n * // Initialize a program manager with the key provider to automatically fetch keys for value transfers\n * const programManager = new ProgramManager(\"https://api.explorer.aleo.org/v1\", keyProvider, recordProvider);\n * programManager.transfer(1, \"aleo166q6ww6688cug7qxwe7nhctjpymydwzy2h7rscfmatqmfwnjvggqcad0at\", \"public\", 0.5);\n *\n * // Keys can also be fetched manually using the key provider\n * const keySearchParams = { \"cacheKey\": \"myProgram:myFunction\" };\n * const [transferPrivateProvingKey, transferPrivateVerifyingKey] = await keyProvider.functionKeys(keySearchParams);\n */\n async functionKeys(params?: KeySearchParams): Promise {\n if (params) {\n let proverUrl;\n let verifierUrl;\n let cacheKey;\n if (\"name\" in params && typeof params[\"name\"] == \"string\") {\n let key = CREDITS_PROGRAM_KEYS.getKey(params[\"name\"]);\n if (!(key instanceof Error)) {\n return this.fetchCreditsKeys(key);\n }\n }\n\n if (\"proverUri\" in params && typeof params[\"proverUri\"] == \"string\") {\n proverUrl = params[\"proverUri\"];\n }\n\n if (\"verifierUri\" in params && typeof params[\"verifierUri\"] == \"string\") {\n verifierUrl = params[\"verifierUri\"];\n }\n\n if (\"cacheKey\" in params && typeof params[\"cacheKey\"] == \"string\") {\n cacheKey = params[\"cacheKey\"];\n }\n\n if (proverUrl && verifierUrl) {\n return await this.fetchRemoteKeys(proverUrl, verifierUrl, cacheKey);\n }\n\n if (cacheKey) {\n return this.getKeys(cacheKey);\n }\n }\n throw Error(\"Invalid parameters provided, must provide either a cacheKey and/or a proverUrl and a verifierUrl\");\n }\n\n /**\n * Returns the proving and verifying keys for a specified program from a specified url.\n *\n * @param {string} verifierUrl Url of the proving key\n * @param {string} proverUrl Url the verifying key\n * @param {string} cacheKey Key to store the keys in the cache\n *\n * @returns {Promise} Proving and verifying keys for the specified program\n *\n * @example\n * // Create a new AleoKeyProvider object\n * const networkClient = new AleoNetworkClient(\"https://api.explorer.aleo.org/v1\");\n * const keyProvider = new AleoKeyProvider();\n * const recordProvider = new NetworkRecordProvider(account, networkClient);\n *\n * // Initialize a program manager with the key provider to automatically fetch keys for value transfers\n * const programManager = new ProgramManager(\"https://api.explorer.aleo.org/v1\", keyProvider, recordProvider);\n * programManager.transfer(1, \"aleo166q6ww6688cug7qxwe7nhctjpymydwzy2h7rscfmatqmfwnjvggqcad0at\", \"public\", 0.5);\n *\n * // Keys can also be fetched manually\n * const [transferPrivateProvingKey, transferPrivateVerifyingKey] = await keyProvider.fetchKeys(\n * CREDITS_PROGRAM_KEYS.transfer_private.prover,\n * CREDITS_PROGRAM_KEYS.transfer_private.verifier,\n * );\n */\n async fetchRemoteKeys(proverUrl: string, verifierUrl: string, cacheKey?: string): Promise {\n try {\n // If cache is enabled, check if the keys have already been fetched and return them if they have\n if (this.cacheOption) {\n if (!cacheKey) {\n cacheKey = proverUrl;\n }\n const value = this.cache.get(cacheKey);\n if (typeof value !== \"undefined\") {\n return [ProvingKey.fromBytes(value[0]), VerifyingKey.fromBytes(value[1])];\n } else {\n console.debug(\"Fetching proving keys from url \" + proverUrl);\n const provingKey = ProvingKey.fromBytes(await this.fetchBytes(proverUrl))\n console.debug(\"Fetching verifying keys \" + verifierUrl);\n const verifyingKey = (await this.getVerifyingKey(verifierUrl));\n this.cache.set(cacheKey, [provingKey.toBytes(), verifyingKey.toBytes()]);\n return [provingKey, verifyingKey];\n }\n }\n else {\n // If cache is disabled, fetch the keys and return them\n const provingKey = ProvingKey.fromBytes(await this.fetchBytes(proverUrl))\n const verifyingKey = (await this.getVerifyingKey(verifierUrl));\n return [provingKey, verifyingKey];\n }\n } catch (error) {\n throw new Error(`Error: ${error} fetching fee proving and verifying keys from ${proverUrl} and ${verifierUrl}.`);\n }\n }\n\n /***\n * Fetches the proving key from a remote source.\n *\n * @param proverUrl\n * @param cacheKey\n *\n * @returns {Promise} Proving key for the specified program\n */\n async fetchProvingKey(proverUrl: string, cacheKey?: string): Promise {\n try {\n // If cache is enabled, check if the keys have already been fetched and return them if they have\n if (this.cacheOption) {\n if (!cacheKey) {\n cacheKey = proverUrl;\n }\n const value = this.cache.get(cacheKey);\n if (typeof value !== \"undefined\") {\n return ProvingKey.fromBytes(value[0]);\n } else {\n console.debug(\"Fetching proving keys from url \" + proverUrl);\n const provingKey = ProvingKey.fromBytes(await this.fetchBytes(proverUrl));\n return provingKey;\n }\n }\n else {\n const provingKey = ProvingKey.fromBytes(await this.fetchBytes(proverUrl));\n return provingKey;\n }\n } catch (error) {\n throw new Error(`Error: ${error} fetching fee proving keys from ${proverUrl}`);\n }\n }\n\n async fetchCreditsKeys(key: Key): Promise {\n try {\n if (!this.cache.has(key.locator) || !this.cacheOption) {\n const verifying_key = key.verifyingKey()\n const proving_key = await this.fetchProvingKey(key.prover, key.locator);\n if (this.cacheOption) {\n this.cache.set(CREDITS_PROGRAM_KEYS.bond_public.locator, [proving_key.toBytes(), verifying_key.toBytes()]);\n }\n return [proving_key, verifying_key];\n } else {\n const keyPair = this.cache.get(key.locator);\n return [ProvingKey.fromBytes(keyPair[0]), VerifyingKey.fromBytes(keyPair[1])];\n }\n } catch (error) {\n throw new Error(`Error: fetching credits.aleo keys: ${error}`);\n }\n }\n\n async bondPublicKeys(): Promise {\n return this.fetchCreditsKeys(CREDITS_PROGRAM_KEYS.bond_public);\n }\n\n bondValidatorKeys(): Promise {\n return this.fetchCreditsKeys(CREDITS_PROGRAM_KEYS.bond_validator);\n }\n\n claimUnbondPublicKeys(): Promise {\n return this.fetchCreditsKeys(CREDITS_PROGRAM_KEYS.claim_unbond_public)\n }\n\n /**\n * Returns the proving and verifying keys for the transfer functions in the credits.aleo program\n * @param {string} visibility Visibility of the transfer function\n * @returns {Promise} Proving and verifying keys for the transfer functions\n *\n * @example\n * // Create a new AleoKeyProvider\n * const networkClient = new AleoNetworkClient(\"https://api.explorer.aleo.org/v1\");\n * const keyProvider = new AleoKeyProvider();\n * const recordProvider = new NetworkRecordProvider(account, networkClient);\n *\n * // Initialize a program manager with the key provider to automatically fetch keys for value transfers\n * const programManager = new ProgramManager(\"https://api.explorer.aleo.org/v1\", keyProvider, recordProvider);\n * programManager.transfer(1, \"aleo166q6ww6688cug7qxwe7nhctjpymydwzy2h7rscfmatqmfwnjvggqcad0at\", \"public\", 0.5);\n *\n * // Keys can also be fetched manually\n * const [transferPublicProvingKey, transferPublicVerifyingKey] = await keyProvider.transferKeys(\"public\");\n */\n async transferKeys(visibility: string): Promise {\n if (PRIVATE_TRANSFER.has(visibility)) {\n return await this.fetchCreditsKeys(CREDITS_PROGRAM_KEYS.transfer_private);\n } else if (PRIVATE_TO_PUBLIC_TRANSFER.has(visibility)) {\n return await this.fetchCreditsKeys(CREDITS_PROGRAM_KEYS.transfer_private_to_public);\n } else if (PUBLIC_TRANSFER.has(visibility)) {\n return await this.fetchCreditsKeys(CREDITS_PROGRAM_KEYS.transfer_public);\n } else if (PUBLIC_TRANSFER_AS_SIGNER.has(visibility)) {\n return await this.fetchCreditsKeys(CREDITS_PROGRAM_KEYS.transfer_public_as_signer);\n } else if (PUBLIC_TO_PRIVATE_TRANSFER.has(visibility)) {\n return await this.fetchCreditsKeys(CREDITS_PROGRAM_KEYS.transfer_public_to_private);\n } else {\n throw new Error(\"Invalid visibility type\");\n }\n }\n\n /**\n * Returns the proving and verifying keys for the join function in the credits.aleo program\n *\n * @returns {Promise} Proving and verifying keys for the join function\n */\n async joinKeys(): Promise {\n return await this.fetchCreditsKeys(CREDITS_PROGRAM_KEYS.join);\n }\n\n /**\n * Returns the proving and verifying keys for the split function in the credits.aleo program\n *\n * @returns {Promise} Proving and verifying keys for the split function\n * */\n async splitKeys(): Promise {\n return await this.fetchCreditsKeys(CREDITS_PROGRAM_KEYS.split);\n }\n\n /**\n * Returns the proving and verifying keys for the fee_private function in the credits.aleo program\n *\n * @returns {Promise} Proving and verifying keys for the fee function\n */\n async feePrivateKeys(): Promise {\n return await this.fetchCreditsKeys(CREDITS_PROGRAM_KEYS.fee_private);\n }\n\n /**\n * Returns the proving and verifying keys for the fee_public function in the credits.aleo program\n *\n * @returns {Promise} Proving and verifying keys for the fee function\n */\n async feePublicKeys(): Promise {\n return await this.fetchCreditsKeys(CREDITS_PROGRAM_KEYS.fee_public);\n }\n\n /**\n * Gets a verifying key. If the verifying key is for a credits.aleo function, get it from the wasm cache otherwise\n *\n * @returns {Promise} Verifying key for the function\n */\n // attempt to fetch it from the network\n async getVerifyingKey(verifierUri: string): Promise {\n switch (verifierUri) {\n case CREDITS_PROGRAM_KEYS.bond_public.verifier:\n return CREDITS_PROGRAM_KEYS.bond_public.verifyingKey();\n case CREDITS_PROGRAM_KEYS.bond_validator.verifier:\n return CREDITS_PROGRAM_KEYS.bond_validator.verifyingKey();\n case CREDITS_PROGRAM_KEYS.claim_unbond_public.verifier:\n return CREDITS_PROGRAM_KEYS.claim_unbond_public.verifyingKey();\n case CREDITS_PROGRAM_KEYS.fee_private.verifier:\n return CREDITS_PROGRAM_KEYS.fee_private.verifyingKey();\n case CREDITS_PROGRAM_KEYS.fee_public.verifier:\n return CREDITS_PROGRAM_KEYS.fee_public.verifyingKey();\n case CREDITS_PROGRAM_KEYS.inclusion.verifier:\n return CREDITS_PROGRAM_KEYS.inclusion.verifyingKey();\n case CREDITS_PROGRAM_KEYS.join.verifier:\n return CREDITS_PROGRAM_KEYS.join.verifyingKey();\n case CREDITS_PROGRAM_KEYS.set_validator_state.verifier:\n return CREDITS_PROGRAM_KEYS.set_validator_state.verifyingKey();\n case CREDITS_PROGRAM_KEYS.split.verifier:\n return CREDITS_PROGRAM_KEYS.split.verifyingKey();\n case CREDITS_PROGRAM_KEYS.transfer_private.verifier:\n return CREDITS_PROGRAM_KEYS.transfer_private.verifyingKey();\n case CREDITS_PROGRAM_KEYS.transfer_private_to_public.verifier:\n return CREDITS_PROGRAM_KEYS.transfer_private_to_public.verifyingKey();\n case CREDITS_PROGRAM_KEYS.transfer_public.verifier:\n return CREDITS_PROGRAM_KEYS.transfer_public.verifyingKey();\n case CREDITS_PROGRAM_KEYS.transfer_public_as_signer.verifier:\n return CREDITS_PROGRAM_KEYS.transfer_public_as_signer.verifyingKey();\n case CREDITS_PROGRAM_KEYS.transfer_public_to_private.verifier:\n return CREDITS_PROGRAM_KEYS.transfer_public_to_private.verifyingKey();\n case CREDITS_PROGRAM_KEYS.unbond_public.verifier:\n return CREDITS_PROGRAM_KEYS.unbond_public.verifyingKey();\n default:\n try {\n /// Try to fetch the verifying key from the network as a string\n const response = await get(verifierUri);\n const text = await response.text();\n return VerifyingKey.fromString(text);\n } catch (e) {\n /// If that fails, try to fetch the verifying key from the network as bytes\n try {\n return VerifyingKey.fromBytes(await this.fetchBytes(verifierUri));\n } catch (inner) {\n return new Error(\"Invalid verifying key. Error: \" + inner);\n }\n }\n }\n }\n\n unBondPublicKeys(): Promise {\n return this.fetchCreditsKeys(CREDITS_PROGRAM_KEYS.unbond_public);\n }\n}\n\nexport {AleoKeyProvider, AleoKeyProviderParams, AleoKeyProviderInitParams, CachedKeyPair, FunctionKeyPair, FunctionKeyProvider, KeySearchParams}\n","import {\n Account,\n AleoKeyProvider,\n AleoNetworkClient,\n ExecutionResponse,\n FunctionKeyProvider,\n FunctionKeyPair,\n OfflineQuery,\n KeySearchParams,\n RecordPlaintext,\n RecordProvider,\n RecordSearchParams,\n PrivateKey,\n Program,\n ProgramImports,\n ProvingKey,\n VerifyingKey,\n Transaction,\n PRIVATE_TRANSFER_TYPES,\n VALID_TRANSFER_TYPES,\n logAndThrow,\n ProgramManagerBase as WasmProgramManager, verifyFunctionExecution, AleoKeyProviderParams, CREDITS_PROGRAM_KEYS,\n} from \"./index\";\nimport {Execution} from \"@provablehq/wasm/dist/crates/aleo_wasm\";\n\n/**\n * Represents the options for executing a transaction in the Aleo network.\n * This interface is used to specify the parameters required for building and submitting an execution transaction.\n *\n * @property {string} programName - The name of the program containing the function to be executed.\n * @property {string} functionName - The name of the function to execute within the program.\n * @property {number} fee - The fee to be paid for the transaction.\n * @property {boolean} privateFee - If true, uses a private record to pay the fee; otherwise, uses the account's public credit balance.\n * @property {string[]} inputs - The inputs to the function being executed.\n * @property {RecordSearchParams} [recordSearchParams] - Optional parameters for searching for a record to pay the execution transaction fee.\n * @property {KeySearchParams} [keySearchParams] - Optional parameters for finding the matching proving & verifying keys for the function.\n * @property {string | RecordPlaintext} [feeRecord] - Optional fee record to use for the transaction.\n * @property {ProvingKey} [provingKey] - Optional proving key to use for the transaction.\n * @property {VerifyingKey} [verifyingKey] - Optional verifying key to use for the transaction.\n * @property {PrivateKey} [privateKey] - Optional private key to use for the transaction.\n * @property {OfflineQuery} [offlineQuery] - Optional offline query if creating transactions in an offline environment.\n * @property {string | Program} [program] - Optional program source code to use for the transaction.\n * @property {ProgramImports} [imports] - Optional programs that the program being executed imports.\n */\ninterface ExecuteOptions {\n programName: string;\n functionName: string;\n fee: number;\n privateFee: boolean;\n inputs: string[];\n recordSearchParams?: RecordSearchParams;\n keySearchParams?: KeySearchParams;\n feeRecord?: string | RecordPlaintext;\n provingKey?: ProvingKey;\n verifyingKey?: VerifyingKey;\n privateKey?: PrivateKey;\n offlineQuery?: OfflineQuery;\n program?: string | Program;\n imports?: ProgramImports;\n}\n\n/**\n * The ProgramManager class is used to execute and deploy programs on the Aleo network and create value transfers.\n */\nclass ProgramManager {\n account: Account | undefined;\n keyProvider: FunctionKeyProvider;\n host: string;\n networkClient: AleoNetworkClient;\n recordProvider: RecordProvider | undefined;\n\n /** Create a new instance of the ProgramManager\n *\n * @param { string | undefined } host A host uri running the official Aleo API\n * @param { FunctionKeyProvider | undefined } keyProvider A key provider that implements {@link FunctionKeyProvider} interface\n * @param { RecordProvider | undefined } recordProvider A record provider that implements {@link RecordProvider} interface\n */\n constructor(host?: string | undefined, keyProvider?: FunctionKeyProvider | undefined, recordProvider?: RecordProvider | undefined) {\n this.host = host ? host : 'https://api.explorer.aleo.org/v1';\n this.networkClient = new AleoNetworkClient(this.host);\n \n this.keyProvider = keyProvider ? keyProvider : new AleoKeyProvider();\n this.recordProvider = recordProvider;\n }\n\n /**\n * Set the account to use for transaction submission to the Aleo network\n *\n * @param {Account} account Account to use for transaction submission\n */\n setAccount(account: Account) {\n this.account = account;\n }\n\n /**\n * Set the key provider that provides the proving and verifying keys for programs\n *\n * @param {FunctionKeyProvider} keyProvider\n */\n setKeyProvider(keyProvider: FunctionKeyProvider) {\n this.keyProvider = keyProvider;\n }\n\n /**\n * Set the host peer to use for transaction submission to the Aleo network\n *\n * @param host {string} Peer url to use for transaction submission\n */\n setHost(host: string) {\n this.host = host;\n this.networkClient.setHost(host);\n }\n\n /**\n * Set the record provider that provides records for transactions\n *\n * @param {RecordProvider} recordProvider\n */\n setRecordProvider(recordProvider: RecordProvider) {\n this.recordProvider = recordProvider;\n }\n\n /**\n * Deploy an Aleo program to the Aleo network\n *\n * @param {string} program Program source code\n * @param {number} fee Fee to pay for the transaction\n * @param {boolean} privateFee Use a private record to pay the fee. If false this will use the account's public credit balance\n * @param {RecordSearchParams | undefined} recordSearchParams Optional parameters for searching for a record to use\n * pay the deployment fee\n * @param {string | RecordPlaintext | undefined} feeRecord Optional Fee record to use for the transaction\n * @param {PrivateKey | undefined} privateKey Optional private key to use for the transaction\n * @returns {string | Error} The transaction id of the deployed program or a failure message from the network\n *\n * @example\n * // Create a new NetworkClient, KeyProvider, and RecordProvider\n * const networkClient = new AleoNetworkClient(\"https://api.explorer.aleo.org/v1\");\n * const keyProvider = new AleoKeyProvider();\n * const recordProvider = new NetworkRecordProvider(account, networkClient);\n *\n * // Initialize a program manager with the key provider to automatically fetch keys for deployments\n * const program = \"program hello_hello.aleo;\\n\\nfunction hello:\\n input r0 as u32.public;\\n input r1 as u32.private;\\n add r0 r1 into r2;\\n output r2 as u32.private;\\n\";\n * const programManager = new ProgramManager(\"https://api.explorer.aleo.org/v1\", keyProvider, recordProvider);\n *\n * // Define a fee in credits\n * const fee = 1.2;\n *\n * // Deploy the program\n * const tx_id = await programManager.deploy(program, fee);\n *\n * // Verify the transaction was successful\n * const transaction = await programManager.networkClient.getTransaction(tx_id);\n */\n async deploy(\n program: string,\n fee: number,\n privateFee: boolean,\n recordSearchParams?: RecordSearchParams,\n feeRecord?: string | RecordPlaintext,\n privateKey?: PrivateKey,\n ): Promise {\n // Ensure the program is valid and does not exist on the network\n try {\n const programObject = Program.fromString(program);\n let programSource;\n try {\n programSource = await this.networkClient.getProgram(programObject.id());\n } catch (e) {\n // Program does not exist on the network, deployment can proceed\n console.log(`Program ${programObject.id()} does not exist on the network, deploying...`);\n }\n if (typeof programSource == \"string\") {\n throw (`Program ${programObject.id()} already exists on the network, please rename your program`);\n }\n } catch (e) {\n throw logAndThrow(`Error validating program: ${e}`);\n }\n\n // Get the private key from the account if it is not provided in the parameters\n let deploymentPrivateKey = privateKey;\n if (typeof privateKey === \"undefined\" && typeof this.account !== \"undefined\") {\n deploymentPrivateKey = this.account.privateKey();\n }\n\n if (typeof deploymentPrivateKey === \"undefined\") {\n throw(\"No private key provided and no private key set in the ProgramManager\");\n }\n\n // Get the fee record from the account if it is not provided in the parameters\n try {\n feeRecord = privateFee ? await this.getCreditsRecord(fee, [], feeRecord, recordSearchParams) : undefined;\n } catch (e) {\n throw logAndThrow(`Error finding fee record. Record finder response: '${e}'. Please ensure you're connected to a valid Aleo network and a record with enough balance exists.`);\n }\n\n // Get the proving and verifying keys from the key provider\n let feeKeys;\n try {\n feeKeys = privateFee ? await this.keyProvider.feePrivateKeys() : await this.keyProvider.feePublicKeys();\n } catch (e) {\n throw logAndThrow(`Error finding fee keys. Key finder response: '${e}'. Please ensure your key provider is configured correctly.`);\n }\n const [feeProvingKey, feeVerifyingKey] = feeKeys;\n\n // Resolve the program imports if they exist\n let imports;\n try {\n imports = await this.networkClient.getProgramImports(program);\n } catch (e) {\n throw logAndThrow(`Error finding program imports. Network response: '${e}'. Please ensure you're connected to a valid Aleo network and the program is deployed to the network.`);\n }\n\n // Build a deployment transaction and submit it to the network\n const tx = await WasmProgramManager.buildDeploymentTransaction(deploymentPrivateKey, program, fee, feeRecord, this.host, imports, feeProvingKey, feeVerifyingKey);\n return await this.networkClient.submitTransaction(tx);\n }\n\n /**\n * Builds an execution transaction for submission to the Aleo network.\n *\n * @param {ExecuteOptions} options - The options for the execution transaction.\n * @returns {Promise} - A promise that resolves to the transaction or an error.\n *\n * @example\n * // Create a new NetworkClient, KeyProvider, and RecordProvider using official Aleo record, key, and network providers\n * const networkClient = new AleoNetworkClient(\"https://api.explorer.aleo.org/v1\");\n * const keyProvider = new AleoKeyProvider();\n * keyProvider.useCache = true;\n * const recordProvider = new NetworkRecordProvider(account, networkClient);\n *\n * // Initialize a program manager with the key provider to automatically fetch keys for executions\n * const programManager = new ProgramManager(\"https://api.explorer.aleo.org/v1\", keyProvider, recordProvider);\n *\n * // Build and execute the transaction\n * const transaction = await programManager.buildExecutionTransaction({\n * programName: \"hello_hello.aleo\",\n * functionName: \"hello_hello\",\n * fee: 0.020,\n * privateFee: false,\n * inputs: [\"5u32\", \"5u32\"],\n * keySearchParams: { \"cacheKey\": \"hello_hello:hello\" }\n * });\n * const result = await programManager.networkClient.submitTransaction(transaction);\n */\n async buildExecutionTransaction(options: ExecuteOptions): Promise {\n // Destructure the options object to access the parameters\n const {\n programName,\n functionName,\n fee,\n privateFee,\n inputs,\n recordSearchParams,\n keySearchParams,\n privateKey,\n offlineQuery\n } = options;\n\n let feeRecord = options.feeRecord;\n let provingKey = options.provingKey;\n let verifyingKey = options.verifyingKey;\n let program = options.program;\n let imports = options.imports;\n\n // Ensure the function exists on the network\n if (program === undefined) {\n try {\n program = (await this.networkClient.getProgram(programName));\n } catch (e) {\n throw logAndThrow(`Error finding ${programName}. Network response: '${e}'. Please ensure you're connected to a valid Aleo network the program is deployed to the network.`);\n }\n } else if (program instanceof Program) {\n program = program.toString();\n }\n\n // Get the private key from the account if it is not provided in the parameters\n let executionPrivateKey = privateKey;\n if (typeof privateKey === \"undefined\" && typeof this.account !== \"undefined\") {\n executionPrivateKey = this.account.privateKey();\n }\n\n if (typeof executionPrivateKey === \"undefined\") {\n throw(\"No private key provided and no private key set in the ProgramManager\");\n }\n\n // Get the fee record from the account if it is not provided in the parameters\n try {\n feeRecord = privateFee ? await this.getCreditsRecord(fee, [], feeRecord, recordSearchParams) : undefined;\n } catch (e) {\n throw logAndThrow(`Error finding fee record. Record finder response: '${e}'. Please ensure you're connected to a valid Aleo network and a record with enough balance exists.`);\n }\n\n // Get the fee proving and verifying keys from the key provider\n let feeKeys;\n try {\n feeKeys = privateFee ? await this.keyProvider.feePrivateKeys() : await this.keyProvider.feePublicKeys();\n } catch (e) {\n throw logAndThrow(`Error finding fee keys. Key finder response: '${e}'. Please ensure your key provider is configured correctly.`);\n }\n const [feeProvingKey, feeVerifyingKey] = feeKeys;\n\n // If the function proving and verifying keys are not provided, attempt to find them using the key provider\n if (!provingKey || !verifyingKey) {\n try {\n [provingKey, verifyingKey] = await this.keyProvider.functionKeys(keySearchParams);\n } catch (e) {\n console.log(`Function keys not found. Key finder response: '${e}'. The function keys will be synthesized`)\n }\n }\n\n // Resolve the program imports if they exist\n const numberOfImports = Program.fromString(program).getImports().length;\n if (numberOfImports > 0 && !imports) {\n try {\n imports = await this.networkClient.getProgramImports(programName);\n } catch (e) {\n throw logAndThrow(`Error finding program imports. Network response: '${e}'. Please ensure you're connected to a valid Aleo network and the program is deployed to the network.`);\n }\n }\n\n // Build an execution transaction and submit it to the network\n return await WasmProgramManager.buildExecutionTransaction(executionPrivateKey, program, functionName, inputs, fee, feeRecord, this.host, imports, provingKey, verifyingKey, feeProvingKey, feeVerifyingKey, offlineQuery);\n }\n\n /**\n * Builds an execution transaction for submission to the Aleo network.\n *\n * @param {ExecuteOptions} options - The options for the execution transaction.\n * @returns {Promise} - A promise that resolves to the transaction or an error.\n *\n * @example\n * // Create a new NetworkClient, KeyProvider, and RecordProvider using official Aleo record, key, and network providers\n * const networkClient = new AleoNetworkClient(\"https://api.explorer.aleo.org/v1\");\n * const keyProvider = new AleoKeyProvider();\n * keyProvider.useCache = true;\n * const recordProvider = new NetworkRecordProvider(account, networkClient);\n *\n * // Initialize a program manager with the key provider to automatically fetch keys for executions\n * const programManager = new ProgramManager(\"https://api.explorer.aleo.org/v1\", keyProvider, recordProvider);\n *\n * // Build and execute the transaction\n * const transaction = await programManager.execute({\n * programName: \"hello_hello.aleo\",\n * functionName: \"hello_hello\",\n * fee: 0.020,\n * privateFee: false,\n * inputs: [\"5u32\", \"5u32\"],\n * keySearchParams: { \"cacheKey\": \"hello_hello:hello\" }\n * });\n * const result = await programManager.networkClient.submitTransaction(transaction);\n */\n async execute(options: ExecuteOptions): Promise {\n const tx = await this.buildExecutionTransaction(options);\n return await this.networkClient.submitTransaction(tx);\n }\n\n /**\n * Run an Aleo program in offline mode\n *\n * @param {string} program Program source code containing the function to be executed\n * @param {string} function_name Function name to execute\n * @param {string[]} inputs Inputs to the function\n * @param {number} proveExecution Whether to prove the execution of the function and return an execution transcript\n * that contains the proof.\n * @param {string[] | undefined} imports Optional imports to the program\n * @param {KeySearchParams | undefined} keySearchParams Optional parameters for finding the matching proving &\n * verifying keys for the function\n * @param {ProvingKey | undefined} provingKey Optional proving key to use for the transaction\n * @param {VerifyingKey | undefined} verifyingKey Optional verifying key to use for the transaction\n * @param {PrivateKey | undefined} privateKey Optional private key to use for the transaction\n * @param {OfflineQuery | undefined} offlineQuery Optional offline query if creating transactions in an offline environment\n * @returns {Promise}\n *\n * @example\n * import { Account, Program } from '@provablehq/sdk';\n *\n * /// Create the source for the \"helloworld\" program\n * const program = \"program helloworld.aleo;\\n\\nfunction hello:\\n input r0 as u32.public;\\n input r1 as u32.private;\\n add r0 r1 into r2;\\n output r2 as u32.private;\\n\";\n * const programManager = new ProgramManager();\n *\n * /// Create a temporary account for the execution of the program\n * const account = new Account();\n * programManager.setAccount(account);\n *\n * /// Get the response and ensure that the program executed correctly\n * const executionResponse = await programManager.run(program, \"hello\", [\"5u32\", \"5u32\"]);\n * const result = executionResponse.getOutputs();\n * assert(result === [\"10u32\"]);\n */\n async run(\n program: string,\n function_name: string,\n inputs: string[],\n proveExecution: boolean,\n imports?: ProgramImports,\n keySearchParams?: KeySearchParams,\n provingKey?: ProvingKey,\n verifyingKey?: VerifyingKey,\n privateKey?: PrivateKey,\n offlineQuery?: OfflineQuery,\n ): Promise {\n // Get the private key from the account if it is not provided in the parameters\n let executionPrivateKey = privateKey;\n if (typeof privateKey === \"undefined\" && typeof this.account !== \"undefined\") {\n executionPrivateKey = this.account.privateKey();\n }\n\n if (typeof executionPrivateKey === \"undefined\") {\n throw(\"No private key provided and no private key set in the ProgramManager\");\n }\n\n // If the function proving and verifying keys are not provided, attempt to find them using the key provider\n if (!provingKey || !verifyingKey) {\n try {\n [provingKey, verifyingKey] = await this.keyProvider.functionKeys(keySearchParams);\n } catch (e) {\n console.log(`Function keys not found. Key finder response: '${e}'. The function keys will be synthesized`)\n }\n }\n\n // Run the program offline and return the result\n console.log(\"Running program offline\")\n console.log(\"Proving key: \", provingKey);\n console.log(\"Verifying key: \", verifyingKey);\n return WasmProgramManager.executeFunctionOffline(executionPrivateKey, program, function_name, inputs, proveExecution, false, imports, provingKey, verifyingKey, this.host, offlineQuery);\n }\n\n /**\n * Join two credits records into a single credits record\n *\n * @param {RecordPlaintext | string} recordOne First credits record to join\n * @param {RecordPlaintext | string} recordTwo Second credits record to join\n * @param {number} fee Fee in credits pay for the join transaction\n * @param {boolean} privateFee Use a private record to pay the fee. If false this will use the account's public credit balance\n * @param {RecordSearchParams | undefined} recordSearchParams Optional parameters for finding the fee record to use\n * to pay the fee for the join transaction\n * @param {RecordPlaintext | string | undefined} feeRecord Fee record to use for the join transaction\n * @param {PrivateKey | undefined} privateKey Private key to use for the join transaction\n * @param {OfflineQuery | undefined} offlineQuery Optional offline query if creating transactions in an offline environment\n * @returns {Promise}\n */\n async join(\n recordOne: RecordPlaintext | string,\n recordTwo: RecordPlaintext | string,\n fee: number,\n privateFee: boolean,\n recordSearchParams?: RecordSearchParams | undefined,\n feeRecord?: RecordPlaintext | string | undefined,\n privateKey?: PrivateKey,\n offlineQuery?: OfflineQuery,\n ): Promise {\n // Get the private key from the account if it is not provided in the parameters\n let executionPrivateKey = privateKey;\n if (typeof privateKey === \"undefined\" && typeof this.account !== \"undefined\") {\n executionPrivateKey = this.account.privateKey();\n }\n\n if (typeof executionPrivateKey === \"undefined\") {\n throw(\"No private key provided and no private key set in the ProgramManager\");\n }\n\n // Get the proving and verifying keys from the key provider\n let feeKeys;\n let joinKeys\n try {\n feeKeys = privateFee ? await this.keyProvider.feePrivateKeys() : await this.keyProvider.feePublicKeys();\n joinKeys = await this.keyProvider.joinKeys();\n } catch (e) {\n throw logAndThrow(`Error finding fee keys. Key finder response: '${e}'. Please ensure your key provider is configured correctly.`);\n }\n const [feeProvingKey, feeVerifyingKey] = feeKeys;\n const [joinProvingKey, joinVerifyingKey] = joinKeys;\n\n // Get the fee record from the account if it is not provided in the parameters\n try {\n feeRecord = privateFee ? await this.getCreditsRecord(fee, [], feeRecord, recordSearchParams) : undefined;\n } catch (e) {\n throw logAndThrow(`Error finding fee record. Record finder response: '${e}'. Please ensure you're connected to a valid Aleo network and a record with enough balance exists.`);\n }\n\n // Validate the records provided are valid plaintext records\n try {\n recordOne = recordOne instanceof RecordPlaintext ? recordOne : RecordPlaintext.fromString(recordOne);\n recordTwo = recordTwo instanceof RecordPlaintext ? recordTwo : RecordPlaintext.fromString(recordTwo);\n } catch (e) {\n throw logAndThrow('Records provided are not valid. Please ensure they are valid plaintext records.')\n }\n\n // Build an execution transaction and submit it to the network\n const tx = await WasmProgramManager.buildJoinTransaction(executionPrivateKey, recordOne, recordTwo, fee, feeRecord, this.host, joinProvingKey, joinVerifyingKey, feeProvingKey, feeVerifyingKey, offlineQuery);\n return await this.networkClient.submitTransaction(tx);\n }\n\n /**\n * Split credits into two new credits records\n *\n * @param {number} splitAmount Amount in microcredits to split from the original credits record\n * @param {RecordPlaintext | string} amountRecord Amount record to use for the split transaction\n * @param {PrivateKey | undefined} privateKey Optional private key to use for the split transaction\n * @param {OfflineQuery | undefined} offlineQuery Optional offline query if creating transactions in an offline environment\n * @returns {Promise}\n *\n * @example\n * // Create a new NetworkClient, KeyProvider, and RecordProvider\n * const networkClient = new AleoNetworkClient(\"https://api.explorer.aleo.org/v1\");\n * const keyProvider = new AleoKeyProvider();\n * const recordProvider = new NetworkRecordProvider(account, networkClient);\n *\n * // Initialize a program manager with the key provider to automatically fetch keys for executions\n * const programName = \"hello_hello.aleo\";\n * const programManager = new ProgramManager(\"https://api.explorer.aleo.org/v1\", keyProvider, recordProvider);\n * const record = \"{ owner: aleo184vuwr5u7u0ha5f5k44067dd2uaqewxx6pe5ltha5pv99wvhfqxqv339h4.private, microcredits: 45000000u64.private, _nonce: 4106205762862305308495708971985748592380064201230396559307556388725936304984group.public}\"\n * const tx_id = await programManager.split(25000000, record);\n * const transaction = await programManager.networkClient.getTransaction(tx_id);\n */\n async split(splitAmount: number, amountRecord: RecordPlaintext | string, privateKey?: PrivateKey, offlineQuery?: OfflineQuery): Promise {\n // Get the private key from the account if it is not provided in the parameters\n let executionPrivateKey = privateKey;\n if (typeof executionPrivateKey === \"undefined\" && typeof this.account !== \"undefined\") {\n executionPrivateKey = this.account.privateKey();\n }\n\n if (typeof executionPrivateKey === \"undefined\") {\n throw(\"No private key provided and no private key set in the ProgramManager\");\n }\n\n // Get the split keys from the key provider\n let splitKeys;\n try {\n splitKeys = await this.keyProvider.splitKeys();\n } catch (e) {\n throw logAndThrow(`Error finding fee keys. Key finder response: '${e}'. Please ensure your key provider is configured correctly.`);\n }\n const [splitProvingKey, splitVerifyingKey] = splitKeys;\n\n // Validate the record to be split\n try {\n amountRecord = amountRecord instanceof RecordPlaintext ? amountRecord : RecordPlaintext.fromString(amountRecord);\n } catch (e) {\n throw logAndThrow(\"Record provided is not valid. Please ensure it is a valid plaintext record.\");\n }\n\n // Build an execution transaction and submit it to the network\n const tx = await WasmProgramManager.buildSplitTransaction(executionPrivateKey, splitAmount, amountRecord, this.host, splitProvingKey, splitVerifyingKey, offlineQuery);\n return await this.networkClient.submitTransaction(tx);\n }\n\n /**\n * Pre-synthesize proving and verifying keys for a program\n *\n * @param program {string} The program source code to synthesize keys for\n * @param function_id {string} The function id to synthesize keys for\n * @param inputs {Array} Sample inputs to the function\n * @param privateKey {PrivateKey | undefined} Optional private key to use for the key synthesis\n *\n * @returns {Promise}\n */\n async synthesizeKeys(\n program: string,\n function_id: string,\n inputs: Array,\n privateKey?: PrivateKey,\n ): Promise {\n // Resolve the program imports if they exist\n let imports;\n\n let executionPrivateKey = privateKey;\n if (typeof executionPrivateKey === \"undefined\") {\n if (typeof this.account !== \"undefined\") {\n executionPrivateKey = this.account.privateKey();\n } else {\n executionPrivateKey = new PrivateKey();\n }\n }\n\n // Attempt to run an offline execution of the program and extract the proving and verifying keys\n try {\n imports = await this.networkClient.getProgramImports(program);\n const keyPair = await WasmProgramManager.synthesizeKeyPair(\n executionPrivateKey,\n program,\n function_id,\n inputs,\n imports\n );\n return [keyPair.provingKey(), keyPair.verifyingKey()];\n } catch (e) {\n throw logAndThrow(`Could not synthesize keys - error ${e}. Please ensure the program is valid and the inputs are correct.`);\n }\n }\n\n /**\n * Build a transaction to transfer credits to another account for later submission to the Aleo network\n *\n * @param {number} amount The amount of credits to transfer\n * @param {string} recipient The recipient of the transfer\n * @param {string} transferType The type of transfer to perform - options: 'private', 'privateToPublic', 'public', 'publicToPrivate'\n * @param {number} fee The fee to pay for the transfer\n * @param {boolean} privateFee Use a private record to pay the fee. If false this will use the account's public credit balance\n * @param {RecordSearchParams | undefined} recordSearchParams Optional parameters for finding the amount and fee\n * records for the transfer transaction\n * @param {RecordPlaintext | string} amountRecord Optional amount record to use for the transfer\n * @param {RecordPlaintext | string} feeRecord Optional fee record to use for the transfer\n * @param {PrivateKey | undefined} privateKey Optional private key to use for the transfer transaction\n * @param {OfflineQuery | undefined} offlineQuery Optional offline query if creating transactions in an offline environment\n * @returns {Promise} The transaction id of the transfer transaction\n *\n * @example\n * // Create a new NetworkClient, KeyProvider, and RecordProvider\n * const networkClient = new AleoNetworkClient(\"https://api.explorer.aleo.org/v1\");\n * const keyProvider = new AleoKeyProvider();\n * const recordProvider = new NetworkRecordProvider(account, networkClient);\n *\n * // Initialize a program manager with the key provider to automatically fetch keys for executions\n * const programName = \"hello_hello.aleo\";\n * const programManager = new ProgramManager(\"https://api.explorer.aleo.org/v1\", keyProvider, recordProvider);\n * await programManager.initialize();\n * const tx_id = await programManager.transfer(1, \"aleo1rhgdu77hgyqd3xjj8ucu3jj9r2krwz6mnzyd80gncr5fxcwlh5rsvzp9px\", \"private\", 0.2)\n * const transaction = await programManager.networkClient.getTransaction(tx_id);\n */\n async buildTransferTransaction(\n amount: number,\n recipient: string,\n transferType: string,\n fee: number,\n privateFee: boolean,\n recordSearchParams?: RecordSearchParams,\n amountRecord?: RecordPlaintext | string,\n feeRecord?: RecordPlaintext | string,\n privateKey?: PrivateKey,\n offlineQuery?: OfflineQuery\n ): Promise {\n // Validate the transfer type\n transferType = validateTransferType(transferType);\n\n // Get the private key from the account if it is not provided in the parameters\n let executionPrivateKey = privateKey;\n if (typeof executionPrivateKey === \"undefined\" && typeof this.account !== \"undefined\") {\n executionPrivateKey = this.account.privateKey();\n }\n\n if (typeof executionPrivateKey === \"undefined\") {\n throw(\"No private key provided and no private key set in the ProgramManager\");\n }\n\n // Get the proving and verifying keys from the key provider\n let feeKeys;\n let transferKeys\n try {\n feeKeys = privateFee ? await this.keyProvider.feePrivateKeys() : await this.keyProvider.feePublicKeys();\n transferKeys = await this.keyProvider.transferKeys(transferType);\n } catch (e) {\n throw logAndThrow(`Error finding fee keys. Key finder response: '${e}'. Please ensure your key provider is configured correctly.`);\n }\n const [feeProvingKey, feeVerifyingKey] = feeKeys;\n const [transferProvingKey, transferVerifyingKey] = transferKeys;\n\n // Get the amount and fee record from the account if it is not provided in the parameters\n try {\n // Track the nonces of the records found so no duplicate records are used\n const nonces: string[] = [];\n if (requiresAmountRecord(transferType)) {\n // If the transfer type is private and requires an amount record, get it from the record provider\n amountRecord = await this.getCreditsRecord(fee, [], amountRecord, recordSearchParams);\n nonces.push(amountRecord.nonce());\n } else {\n amountRecord = undefined;\n }\n feeRecord = privateFee ? await this.getCreditsRecord(fee, nonces, feeRecord, recordSearchParams) : undefined;\n } catch (e) {\n throw logAndThrow(`Error finding fee record. Record finder response: '${e}'. Please ensure you're connected to a valid Aleo network and a record with enough balance exists.`);\n }\n\n // Build an execution transaction and submit it to the network\n return await WasmProgramManager.buildTransferTransaction(executionPrivateKey, amount, recipient, transferType, amountRecord, fee, feeRecord, this.host, transferProvingKey, transferVerifyingKey, feeProvingKey, feeVerifyingKey, offlineQuery);\n }\n\n /**\n * Build a transfer_public transaction to transfer credits to another account for later submission to the Aleo network\n *\n * @param {number} amount The amount of credits to transfer\n * @param {string} recipient The recipient of the transfer\n * @param {string} transferType The type of transfer to perform - options: 'private', 'privateToPublic', 'public', 'publicToPrivate'\n * @param {number} fee The fee to pay for the transfer\n * @param {boolean} privateFee Use a private record to pay the fee. If false this will use the account's public credit balance\n * @param {RecordSearchParams | undefined} recordSearchParams Optional parameters for finding the amount and fee\n * records for the transfer transaction\n * @param {RecordPlaintext | string} amountRecord Optional amount record to use for the transfer\n * @param {RecordPlaintext | string} feeRecord Optional fee record to use for the transfer\n * @param {PrivateKey | undefined} privateKey Optional private key to use for the transfer transaction\n * @param {OfflineQuery | undefined} offlineQuery Optional offline query if creating transactions in an offline environment\n * @returns {Promise} The transaction id of the transfer transaction\n */\n async buildTransferPublicTransaction(\n amount: number,\n recipient: string,\n fee: number,\n privateKey?: PrivateKey,\n offlineQuery?: OfflineQuery\n ): Promise {\n return this.buildTransferTransaction(amount, recipient, \"public\", fee, false, undefined, undefined, undefined, privateKey, offlineQuery);\n }\n\n /**\n * Build a transfer_public_as_signer transaction to transfer credits to another account for later submission to the Aleo network\n *\n * @param {number} amount The amount of credits to transfer\n * @param {string} recipient The recipient of the transfer\n * @param {string} transferType The type of transfer to perform - options: 'private', 'privateToPublic', 'public', 'publicToPrivate'\n * @param {number} fee The fee to pay for the transfer\n * @param {boolean} privateFee Use a private record to pay the fee. If false this will use the account's public credit balance\n * @param {RecordSearchParams | undefined} recordSearchParams Optional parameters for finding the amount and fee\n * records for the transfer transaction\n * @param {RecordPlaintext | string} amountRecord Optional amount record to use for the transfer\n * @param {RecordPlaintext | string} feeRecord Optional fee record to use for the transfer\n * @param {PrivateKey | undefined} privateKey Optional private key to use for the transfer transaction\n * @param {OfflineQuery | undefined} offlineQuery Optional offline query if creating transactions in an offline environment\n * @returns {Promise} The transaction id of the transfer transaction\n */\n async buildTransferPublicAsSignerTransaction(\n amount: number,\n recipient: string,\n fee: number,\n privateKey?: PrivateKey,\n offlineQuery?: OfflineQuery\n ): Promise {\n return this.buildTransferTransaction(amount, recipient, \"public\", fee, false, undefined, undefined, undefined, privateKey, offlineQuery);\n }\n\n /**\n * Transfer credits to another account\n *\n * @param {number} amount The amount of credits to transfer\n * @param {string} recipient The recipient of the transfer\n * @param {string} transferType The type of transfer to perform - options: 'private', 'privateToPublic', 'public', 'publicToPrivate'\n * @param {number} fee The fee to pay for the transfer\n * @param {boolean} privateFee Use a private record to pay the fee. If false this will use the account's public credit balance\n * @param {RecordSearchParams | undefined} recordSearchParams Optional parameters for finding the amount and fee\n * records for the transfer transaction\n * @param {RecordPlaintext | string} amountRecord Optional amount record to use for the transfer\n * @param {RecordPlaintext | string} feeRecord Optional fee record to use for the transfer\n * @param {PrivateKey | undefined} privateKey Optional private key to use for the transfer transaction\n * @param {OfflineQuery | undefined} offlineQuery Optional offline query if creating transactions in an offline environment\n * @returns {Promise} The transaction id of the transfer transaction\n *\n * @example\n * // Create a new NetworkClient, KeyProvider, and RecordProvider\n * const networkClient = new AleoNetworkClient(\"https://api.explorer.aleo.org/v1\");\n * const keyProvider = new AleoKeyProvider();\n * const recordProvider = new NetworkRecordProvider(account, networkClient);\n *\n * // Initialize a program manager with the key provider to automatically fetch keys for executions\n * const programManager = new ProgramManager(\"https://api.explorer.aleo.org/v1\", keyProvider, recordProvider);\n * await programManager.initialize();\n * const tx_id = await programManager.transfer(1, \"aleo1rhgdu77hgyqd3xjj8ucu3jj9r2krwz6mnzyd80gncr5fxcwlh5rsvzp9px\", \"private\", 0.2)\n * const transaction = await programManager.networkClient.getTransaction(tx_id);\n */\n async transfer(\n amount: number,\n recipient: string,\n transferType: string,\n fee: number,\n privateFee: boolean,\n recordSearchParams?: RecordSearchParams,\n amountRecord?: RecordPlaintext | string,\n feeRecord?: RecordPlaintext | string,\n privateKey?: PrivateKey,\n offlineQuery?: OfflineQuery\n ): Promise {\n const tx = await this.buildTransferTransaction(amount, recipient, transferType, fee, privateFee, recordSearchParams, amountRecord, feeRecord, privateKey, offlineQuery);\n return await this.networkClient.submitTransaction(tx);\n }\n\n /**\n * Build transaction to bond credits to a validator for later submission to the Aleo Network\n *\n * @example\n * // Create a keyProvider to handle key management\n * const keyProvider = new AleoKeyProvider();\n * keyProvider.useCache = true;\n *\n * // Create a new ProgramManager with the key that will be used to bond credits\n * const programManager = new ProgramManager(\"https://api.explorer.aleo.org/v1\", keyProvider, undefined);\n * programManager.setAccount(new Account(\"YourPrivateKey\"));\n *\n * // Create the bonding transaction object for later submission\n * const tx = await programManager.buildBondPublicTransaction(\"aleo1jx8s4dvjepculny4wfrzwyhs3tlyv65r58ns3g6q2gm2esh7ps8sqy9s5j\", \"aleo1rhgdu77hgyqd3xjj8ucu3jj9r2krwz6mnzyd80gncr5fxcwlh5rsvzp9px\", \"aleo1feya8sjy9k2zflvl2dx39pdsq5tju28elnp2ektnn588uu9ghv8s84msv9\", 2000000);\n * console.log(tx);\n *\n * // The transaction can be later submitted to the network using the network client.\n * const result = await programManager.networkClient.submitTransaction(tx);\n *\n * @returns string\n * @param {string} staker_address Address of the staker who is bonding the credits\n * @param {string} validator_address Address of the validator to bond to, if this address is the same as the staker (i.e. the\n * executor of this function), it will attempt to bond the credits as a validator. Bonding as a validator currently\n * requires a minimum of 10,000,000 credits to bond (subject to change). If the address is specified is an existing\n * validator and is different from the address of the executor of this function, it will bond the credits to that\n * validator's staking committee as a delegator. A minimum of 10 credits is required to bond as a delegator.\n * @param {string} withdrawal_address Address to withdraw the staked credits to when unbond_public is called.\n * @param {number} amount The amount of credits to bond\n * @param {Partial} options - Override default execution options.\n */\n async buildBondPublicTransaction(staker_address: string, validator_address: string, withdrawal_address: string, amount: number, options: Partial = {}) {\n const scaledAmount = Math.trunc(amount * 1000000);\n\n const {\n programName = \"credits.aleo\",\n functionName = \"bond_public\",\n fee = options.fee || 0.86,\n privateFee = false,\n inputs = [staker_address, validator_address, withdrawal_address, `${scaledAmount.toString()}u64`],\n keySearchParams = new AleoKeyProviderParams({\n proverUri: CREDITS_PROGRAM_KEYS.bond_public.prover,\n verifierUri: CREDITS_PROGRAM_KEYS.bond_public.verifier,\n cacheKey: \"credits.aleo/bond_public\"\n }),\n program = this.creditsProgram(),\n ...additionalOptions\n } = options;\n\n const executeOptions: ExecuteOptions = {\n programName,\n functionName,\n fee,\n privateFee,\n inputs,\n keySearchParams,\n ...additionalOptions\n };\n\n return await this.buildExecutionTransaction(executeOptions);\n }\n\n /**\n * Bond credits to validator.\n *\n * @example\n * // Create a keyProvider to handle key management\n * const keyProvider = new AleoKeyProvider();\n * keyProvider.useCache = true;\n *\n * // Create a new ProgramManager with the key that will be used to bond credits\n * const programManager = new ProgramManager(\"https://api.explorer.aleo.org/v1\", keyProvider, undefined);\n * programManager.setAccount(new Account(\"YourPrivateKey\"));\n *\n * // Create the bonding transaction\n * const tx_id = await programManager.bondPublic(\"aleo1jx8s4dvjepculny4wfrzwyhs3tlyv65r58ns3g6q2gm2esh7ps8sqy9s5j\", \"aleo1rhgdu77hgyqd3xjj8ucu3jj9r2krwz6mnzyd80gncr5fxcwlh5rsvzp9px\", \"aleo1feya8sjy9k2zflvl2dx39pdsq5tju28elnp2ektnn588uu9ghv8s84msv9\", 2000000);\n *\n * @returns string\n * @param {string} staker_address Address of the staker who is bonding the credits\n * @param {string} validator_address Address of the validator to bond to, if this address is the same as the signer (i.e. the\n * executor of this function), it will attempt to bond the credits as a validator. Bonding as a validator currently\n * requires a minimum of 1,000,000 credits to bond (subject to change). If the address is specified is an existing\n * validator and is different from the address of the executor of this function, it will bond the credits to that\n * validator's staking committee as a delegator. A minimum of 10 credits is required to bond as a delegator.\n * @param {string} withdrawal_address Address to withdraw the staked credits to when unbond_public is called.\n * @param {number} amount The amount of credits to bond\n * @param {Options} options Options for the execution\n */\n async bondPublic(staker_address: string, validator_address: string, withdrawal_address:string, amount: number, options: Partial = {}) {\n const tx = await this.buildBondPublicTransaction(staker_address, validator_address, withdrawal_address, amount, options);\n return await this.networkClient.submitTransaction(tx);\n }\n\n /**\n * Build a bond_validator transaction for later submission to the Aleo Network.\n *\n * @example\n * // Create a keyProvider to handle key management\n * const keyProvider = new AleoKeyProvider();\n * keyProvider.useCache = true;\n *\n * // Create a new ProgramManager with the key that will be used to bond credits\n * const programManager = new ProgramManager(\"https://api.explorer.aleo.org/v1\", keyProvider, undefined);\n * programManager.setAccount(new Account(\"YourPrivateKey\"));\n *\n * // Create the bond validator transaction object for later use.\n * const tx = await programManager.buildBondValidatorTransaction(\"aleo1rhgdu77hgyqd3xjj8ucu3jj9r2krwz6mnzyd80gncr5fxcwlh5rsvzp9px\", \"aleo1feya8sjy9k2zflvl2dx39pdsq5tju28elnp2ektnn588uu9ghv8s84msv9\", 2000000);\n * console.log(tx);\n *\n * // The transaction can later be submitted to the network using the network client.\n * const tx_id = await programManager.networkClient.submitTransaction(tx);\n *\n * @returns string\n * @param {string} validator_address Address of the validator to bond to, if this address is the same as the staker (i.e. the\n * executor of this function), it will attempt to bond the credits as a validator. Bonding as a validator currently\n * requires a minimum of 10,000,000 credits to bond (subject to change). If the address is specified is an existing\n * validator and is different from the address of the executor of this function, it will bond the credits to that\n * validator's staking committee as a delegator. A minimum of 10 credits is required to bond as a delegator.\n * @param {string} withdrawal_address Address to withdraw the staked credits to when unbond_public is called.\n * @param {number} amount The amount of credits to bond\n * @param {number} commission The commission rate for the validator (must be between 0 and 100 - an error will be thrown if it is not)\n * @param {Partial} options - Override default execution options.\n */\n async buildBondValidatorTransaction(validator_address: string, withdrawal_address: string, amount: number, commission: number, options: Partial = {}) {\n const scaledAmount = Math.trunc(amount * 1000000);\n\n const adjustedCommission = Math.trunc(commission)\n\n const {\n programName = \"credits.aleo\",\n functionName = \"bond_validator\",\n fee = options.fee || 0.86,\n privateFee = false,\n inputs = [validator_address, withdrawal_address, `${scaledAmount.toString()}u64`, `${adjustedCommission.toString()}u8`],\n keySearchParams = new AleoKeyProviderParams({\n proverUri: CREDITS_PROGRAM_KEYS.bond_validator.prover,\n verifierUri: CREDITS_PROGRAM_KEYS.bond_validator.verifier,\n cacheKey: \"credits.aleo/bond_validator\"\n }),\n program = this.creditsProgram(),\n ...additionalOptions\n } = options;\n\n const executeOptions: ExecuteOptions = {\n programName,\n functionName,\n fee,\n privateFee,\n inputs,\n keySearchParams,\n ...additionalOptions\n };\n\n return await this.buildExecutionTransaction(executeOptions);\n }\n\n /**\n * Build transaction to bond a validator.\n *\n * @example\n * // Create a keyProvider to handle key management\n * const keyProvider = new AleoKeyProvider();\n * keyProvider.useCache = true;\n *\n * // Create a new ProgramManager with the key that will be used to bond credits\n * const programManager = new ProgramManager(\"https://api.explorer.aleo.org/v1\", keyProvider, undefined);\n * programManager.setAccount(new Account(\"YourPrivateKey\"));\n *\n * // Create the bonding transaction\n * const tx_id = await programManager.bondValidator(\"aleo1rhgdu77hgyqd3xjj8ucu3jj9r2krwz6mnzyd80gncr5fxcwlh5rsvzp9px\", \"aleo1feya8sjy9k2zflvl2dx39pdsq5tju28elnp2ektnn588uu9ghv8s84msv9\", 2000000);\n *\n * @returns string\n * @param {string} validator_address Address of the validator to bond to, if this address is the same as the staker (i.e. the\n * executor of this function), it will attempt to bond the credits as a validator. Bonding as a validator currently\n * requires a minimum of 10,000,000 credits to bond (subject to change). If the address is specified is an existing\n * validator and is different from the address of the executor of this function, it will bond the credits to that\n * validator's staking committee as a delegator. A minimum of 10 credits is required to bond as a delegator.\n * @param {string} withdrawal_address Address to withdraw the staked credits to when unbond_public is called.\n * @param {number} amount The amount of credits to bond\n * @param {number} commission The commission rate for the validator (must be between 0 and 100 - an error will be thrown if it is not)\n * @param {Partial} options - Override default execution options.\n */\n async bondValidator(validator_address: string, withdrawal_address: string, amount: number, commission: number, options: Partial = {}) {\n const tx = await this.buildBondValidatorTransaction(validator_address, withdrawal_address, amount, commission, options);\n return await this.networkClient.submitTransaction(tx);\n }\n\n /**\n * Build a transaction to unbond public credits from a validator in the Aleo network.\n *\n * @param {string} staker_address - The address of the staker who is unbonding the credits.\n * @param {number} amount - The amount of credits to unbond (scaled by 1,000,000).\n * @param {Partial} options - Override default execution options.\n * @returns {Promise} - A promise that resolves to the transaction or an error message.\n *\n * @example\n * // Create a keyProvider to handle key management.\n * const keyProvider = new AleoKeyProvider();\n * keyProvider.useCache = true;\n *\n * // Create a new ProgramManager with the key that will be used to unbond credits.\n * const programManager = new ProgramManager(\"https://api.explorer.aleo.org/v1\", keyProvider, undefined);\n * const tx = await programManager.buildUnbondPublicTransaction(\"aleo1jx8s4dvjepculny4wfrzwyhs3tlyv65r58ns3g6q2gm2esh7ps8sqy9s5j\", 2000000);\n * console.log(tx);\n *\n * // The transaction can be submitted later to the network using the network client.\n * programManager.networkClient.submitTransaction(tx);\n */\n async buildUnbondPublicTransaction(staker_address: string, amount: number, options: Partial = {}): Promise {\n const scaledAmount = Math.trunc(amount * 1000000);\n\n const {\n programName = \"credits.aleo\",\n functionName = \"unbond_public\",\n fee = options.fee || 1.3,\n privateFee = false,\n inputs = [staker_address, `${scaledAmount.toString()}u64`],\n keySearchParams = new AleoKeyProviderParams({\n proverUri: CREDITS_PROGRAM_KEYS.unbond_public.prover,\n verifierUri: CREDITS_PROGRAM_KEYS.unbond_public.verifier,\n cacheKey: \"credits.aleo/unbond_public\"\n }),\n program = this.creditsProgram(),\n ...additionalOptions\n } = options;\n\n const executeOptions: ExecuteOptions = {\n programName,\n functionName,\n fee,\n privateFee,\n inputs,\n keySearchParams,\n ...additionalOptions\n };\n\n return this.buildExecutionTransaction(executeOptions);\n }\n\n /**\n * Unbond a specified amount of staked credits.\n *\n * @example\n * // Create a keyProvider to handle key management\n * const keyProvider = new AleoKeyProvider();\n * keyProvider.useCache = true;\n *\n * // Create a new ProgramManager with the key that will be used to bond credits\n * const programManager = new ProgramManager(\"https://api.explorer.aleo.org/v1\", keyProvider, undefined);\n * programManager.setAccount(new Account(\"YourPrivateKey\"));\n *\n * // Create the bonding transaction and send it to the network\n * const tx_id = await programManager.unbondPublic(\"aleo1jx8s4dvjepculny4wfrzwyhs3tlyv65r58ns3g6q2gm2esh7ps8sqy9s5j\", 10);\n *\n * @returns string\n * @param {string} staker_address Address of the staker who is unbonding the credits\n * @param {number} amount Amount of credits to unbond. If the address of the executor of this function is an\n * existing validator, it will subtract this amount of credits from the validator's staked credits. If there are\n * less than 1,000,000 credits staked pool after the unbond, the validator will be removed from the validator set.\n * If the address of the executor of this function is not a validator and has credits bonded as a delegator, it will\n * subtract this amount of credits from the delegator's staked credits. If there are less than 10 credits bonded\n * after the unbond operation, the delegator will be removed from the validator's staking pool.\n * @param {ExecuteOptions} options Options for the execution\n */\n async unbondPublic(staker_address: string, amount: number, options: Partial = {}): Promise {\n const tx = await this.buildUnbondPublicTransaction(staker_address, amount, options);\n return await this.networkClient.submitTransaction(tx);\n }\n\n /**\n * Build a transaction to claim unbonded public credits in the Aleo network.\n *\n * @param {string} staker_address - The address of the staker who is claiming the credits.\n * @param {Partial} options - Override default execution options.\n * @returns {Promise} - A promise that resolves to the transaction or an error message.\n *\n * @example\n * // Create a keyProvider to handle key management\n * const keyProvider = new AleoKeyProvider();\n * keyProvider.useCache = true;\n *\n * // Create a new ProgramManager with the key that will be used to claim unbonded credits.\n * const programManager = new ProgramManager(\"https://api.explorer.aleo.org/v1\", keyProvider, undefined);\n *\n * // Create the claim unbonded transaction object for later use.\n * const tx = await programManager.buildClaimUnbondPublicTransaction(\"aleo1jx8s4dvjepculny4wfrzwyhs3tlyv65r58ns3g6q2gm2esh7ps8sqy9s5j\");\n * console.log(tx);\n *\n * // The transaction can be submitted later to the network using the network client.\n * programManager.networkClient.submitTransaction(tx);\n */\n async buildClaimUnbondPublicTransaction(staker_address: string, options: Partial = {}): Promise {\n const {\n programName = \"credits.aleo\",\n functionName = \"claim_unbond_public\",\n fee = options.fee || 2,\n privateFee = false,\n inputs = [staker_address],\n keySearchParams = new AleoKeyProviderParams({\n proverUri: CREDITS_PROGRAM_KEYS.claim_unbond_public.prover,\n verifierUri: CREDITS_PROGRAM_KEYS.claim_unbond_public.verifier,\n cacheKey: \"credits.aleo/claim_unbond_public\"\n }),\n program = this.creditsProgram(),\n ...additionalOptions\n } = options;\n\n const executeOptions: ExecuteOptions = {\n programName,\n functionName,\n fee,\n privateFee,\n inputs,\n keySearchParams,\n ...additionalOptions\n };\n\n return await this.buildExecutionTransaction(executeOptions);\n }\n\n /**\n * Claim unbonded credits. If credits have been unbonded by the account executing this function, this method will\n * claim them and add them to the public balance of the account.\n *\n * @example\n * // Create a keyProvider to handle key management\n * const keyProvider = new AleoKeyProvider();\n * keyProvider.useCache = true;\n *\n * // Create a new ProgramManager with the key that will be used to bond credits\n * const programManager = new ProgramManager(\"https://api.explorer.aleo.org/v1\", keyProvider, undefined);\n * programManager.setAccount(new Account(\"YourPrivateKey\"));\n *\n * // Create the bonding transaction\n * const tx_id = await programManager.claimUnbondPublic(\"aleo1jx8s4dvjepculny4wfrzwyhs3tlyv65r58ns3g6q2gm2esh7ps8sqy9s5j\");\n *\n * @param {string} staker_address Address of the staker who is claiming the credits\n * @param {ExecuteOptions} options\n * @returns string\n */\n async claimUnbondPublic(staker_address: string, options: Partial = {}): Promise {\n const tx = await this.buildClaimUnbondPublicTransaction(staker_address, options);\n return await this.networkClient.submitTransaction(tx);\n }\n\n /**\n * Build a set_validator_state transaction for later usage.\n *\n * This function allows a validator to set their state to be either opened or closed to new stakers.\n * When the validator is open to new stakers, any staker (including the validator) can bond or unbond from the validator.\n * When the validator is closed to new stakers, existing stakers can still bond or unbond from the validator, but new stakers cannot bond.\n *\n * This function serves two primary purposes:\n * 1. Allow a validator to leave the committee, by closing themselves to stakers and then unbonding all of their stakers.\n * 2. Allow a validator to maintain their % of stake, by closing themselves to allowing more stakers to bond to them.\n *\n * @example\n * // Create a keyProvider to handle key management\n * const keyProvider = new AleoKeyProvider();\n * keyProvider.useCache = true;\n *\n * // Create a new ProgramManager with the key that will be used to bond credits\n * const programManager = new ProgramManager(\"https://api.explorer.aleo.org/v1\", keyProvider, undefined);\n * programManager.setAccount(new Account(\"ValidatorPrivateKey\"));\n *\n * // Create the bonding transaction\n * const tx = await programManager.buildSetValidatorStateTransaction(true);\n *\n * // The transaction can be submitted later to the network using the network client.\n * programManager.networkClient.submitTransaction(tx);\n *\n * @returns string\n * @param {boolean} validator_state\n * @param {Partial} options - Override default execution options\n */\n async buildSetValidatorStateTransaction(validator_state: boolean, options: Partial = {}) {\n const {\n programName = \"credits.aleo\",\n functionName = \"set_validator_state\",\n fee = 1,\n privateFee = false,\n inputs = [validator_state.toString()],\n keySearchParams = new AleoKeyProviderParams({\n proverUri: CREDITS_PROGRAM_KEYS.set_validator_state.prover,\n verifierUri: CREDITS_PROGRAM_KEYS.set_validator_state.verifier,\n cacheKey: \"credits.aleo/set_validator_state\"\n }),\n ...additionalOptions\n } = options;\n\n const executeOptions: ExecuteOptions = {\n programName,\n functionName,\n fee,\n privateFee,\n inputs,\n keySearchParams,\n ...additionalOptions\n };\n\n return await this.execute(executeOptions);\n }\n\n /**\n * Submit a set_validator_state transaction to the Aleo Network.\n *\n * This function allows a validator to set their state to be either opened or closed to new stakers.\n * When the validator is open to new stakers, any staker (including the validator) can bond or unbond from the validator.\n * When the validator is closed to new stakers, existing stakers can still bond or unbond from the validator, but new stakers cannot bond.\n *\n * This function serves two primary purposes:\n * 1. Allow a validator to leave the committee, by closing themselves to stakers and then unbonding all of their stakers.\n * 2. Allow a validator to maintain their % of stake, by closing themselves to allowing more stakers to bond to them.\n *\n * @example\n * // Create a keyProvider to handle key management\n * const keyProvider = new AleoKeyProvider();\n * keyProvider.useCache = true;\n *\n * // Create a new ProgramManager with the key that will be used to bond credits\n * const programManager = new ProgramManager(\"https://api.explorer.aleo.org/v1\", keyProvider, undefined);\n * programManager.setAccount(new Account(\"ValidatorPrivateKey\"));\n *\n * // Create the bonding transaction\n * const tx_id = await programManager.setValidatorState(true);\n *\n * @returns string\n * @param {boolean} validator_state\n * @param {Partial} options - Override default execution options\n */\n async setValidatorState(validator_state: boolean, options: Partial = {}) {\n const tx = await this.buildSetValidatorStateTransaction(validator_state, options);\n return this.networkClient.submitTransaction(tx);\n }\n\n /**\n * Verify a proof of execution from an offline execution\n *\n * @param {executionResponse} executionResponse\n * @returns {boolean} True if the proof is valid, false otherwise\n */\n verifyExecution(executionResponse: ExecutionResponse): boolean {\n try {\n const execution = executionResponse.getExecution();\n const function_id = executionResponse.getFunctionId();\n const program = executionResponse.getProgram();\n const verifyingKey = executionResponse.getVerifyingKey();\n return verifyFunctionExecution(execution, verifyingKey, program, function_id);\n } catch(e) {\n console.warn(\"The execution was not found in the response, cannot verify the execution\");\n return false;\n }\n }\n\n /**\n * Create a program object from a program's source code\n *\n * @param {string} program Program source code\n * @returns {Program | Error} The program object\n */\n createProgramFromSource(program: string): Program | Error {\n return Program.fromString(program);\n }\n\n /**\n * Get the credits program object\n *\n * @returns {Program} The credits program object\n */\n creditsProgram(): Program {\n return Program.getCreditsProgram();\n }\n\n /**\n * Verify a program is valid\n *\n * @param {string} program The program source code\n */\n verifyProgram(program: string): boolean {\n try {\n Program.fromString(program);\n return true;\n } catch (e) {\n return false;\n }\n }\n\n // Internal utility function for getting a credits.aleo record\n async getCreditsRecord(amount: number, nonces: string[], record?: RecordPlaintext | string, params?: RecordSearchParams): Promise {\n try {\n return record instanceof RecordPlaintext ? record : RecordPlaintext.fromString(record);\n } catch (e) {\n try {\n const recordProvider = this.recordProvider;\n return (await recordProvider.findCreditsRecord(amount, true, nonces, params))\n } catch (e) {\n throw logAndThrow(`Error finding fee record. Record finder response: '${e}'. Please ensure you're connected to a valid Aleo network and a record with enough balance exists.`);\n }\n }\n }\n}\n\n// Ensure the transfer type requires an amount record\nfunction requiresAmountRecord(transferType: string): boolean {\n return PRIVATE_TRANSFER_TYPES.has(transferType);\n}\n\n// Validate the transfer type\nfunction validateTransferType(transferType: string): string | Error {\n return VALID_TRANSFER_TYPES.has(transferType) ? transferType :\n logAndThrow(`Invalid transfer type '${transferType}'. Valid transfer types are 'private', 'privateToPublic', 'public', and 'publicToPrivate'.`);\n}\n\nexport { ProgramManager }\n","import {VerifyingKey, Metadata} from \"@provablehq/wasm\";\n\nconst KEY_STORE = Metadata.baseUrl();\n\ninterface Key {\n name: string,\n locator: string,\n prover: string,\n verifier: string,\n verifyingKey: () => VerifyingKey,\n}\n\nfunction convert(metadata: Metadata): Key {\n // This looks up the method name in VerifyingKey\n const verifyingKey = (VerifyingKey as any)[metadata.verifyingKey];\n\n if (!verifyingKey) {\n throw new Error(\"Invalid method name: \" + metadata.verifyingKey);\n }\n\n return {\n name: metadata.name,\n locator: metadata.locator,\n prover: metadata.prover,\n verifier: metadata.verifier,\n verifyingKey,\n };\n}\n\nconst CREDITS_PROGRAM_KEYS = {\n bond_public: convert(Metadata.bond_public()),\n bond_validator: convert(Metadata.bond_validator()),\n claim_unbond_public: convert(Metadata.claim_unbond_public()),\n fee_private: convert(Metadata.fee_private()),\n fee_public: convert(Metadata.fee_public()),\n inclusion: convert(Metadata.inclusion()),\n join: convert(Metadata.join()),\n set_validator_state: convert(Metadata.set_validator_state()),\n split: convert(Metadata.split()),\n transfer_private: convert(Metadata.transfer_private()),\n transfer_private_to_public: convert(Metadata.transfer_private_to_public()),\n transfer_public: convert(Metadata.transfer_public()),\n transfer_public_as_signer: convert(Metadata.transfer_public_as_signer()),\n transfer_public_to_private: convert(Metadata.transfer_public_to_private()),\n unbond_public: convert(Metadata.unbond_public()),\n getKey: function(key: string): Key | Error {\n if (this.hasOwnProperty(key)) {\n return (this as any)[key] as Key;\n } else {\n return new Error(`Key \"${key}\" not found.`);\n }\n }\n};\n\nconst PRIVATE_TRANSFER_TYPES = new Set([\n \"transfer_private\",\n \"private\",\n \"transferPrivate\",\n \"transfer_private_to_public\",\n \"privateToPublic\",\n \"transferPrivateToPublic\",\n]);\nconst VALID_TRANSFER_TYPES = new Set([\n \"transfer_private\",\n \"private\",\n \"transferPrivate\",\n \"transfer_private_to_public\",\n \"privateToPublic\",\n \"transferPrivateToPublic\",\n \"transfer_public\",\n \"transfer_public_as_signer\",\n \"public\",\n \"public_as_signer\",\n \"transferPublic\",\n \"transferPublicAsSigner\",\n \"transfer_public_to_private\",\n \"publicToPrivate\",\n \"publicAsSigner\",\n \"transferPublicToPrivate\",\n]);\nconst PRIVATE_TRANSFER = new Set([\n \"private\",\n \"transfer_private\",\n \"transferPrivate\",\n]);\nconst PRIVATE_TO_PUBLIC_TRANSFER = new Set([\n \"private_to_public\",\n \"privateToPublic\",\n \"transfer_private_to_public\",\n \"transferPrivateToPublic\",\n]);\nconst PUBLIC_TRANSFER = new Set([\n \"public\",\n \"transfer_public\",\n \"transferPublic\",\n]);\nconst PUBLIC_TRANSFER_AS_SIGNER = new Set([\n \"public_as_signer\",\n \"transfer_public_as_signer\",\n \"transferPublicAsSigner\",\n]);\nconst PUBLIC_TO_PRIVATE_TRANSFER = new Set([\n \"public_to_private\",\n \"publicToPrivate\",\n \"transfer_public_to_private\",\n \"transferPublicToPrivate\",\n]);\n\nfunction logAndThrow(message: string): Error {\n console.error(message);\n throw message;\n}\n\nimport { Account } from \"./account\";\nimport { AleoNetworkClient, ProgramImports } from \"./network-client\";\nimport { Block } from \"./models/block\";\nimport { Execution } from \"./models/execution\";\nimport { Input } from \"./models/input\";\nimport { Output } from \"./models/output\";\nimport { TransactionModel } from \"./models/transactionModel\";\nimport { Transition } from \"./models/transition\";\nimport {\n AleoKeyProvider,\n AleoKeyProviderParams,\n AleoKeyProviderInitParams,\n CachedKeyPair,\n FunctionKeyPair,\n FunctionKeyProvider,\n KeySearchParams,\n} from \"./function-key-provider\";\nimport {\n OfflineKeyProvider,\n OfflineSearchParams\n} from \"./offline-key-provider\";\nimport {\n BlockHeightSearch,\n NetworkRecordProvider,\n RecordProvider,\n RecordSearchParams,\n} from \"./record-provider\";\n\n// @TODO: This function is no longer needed, remove it.\nasync function initializeWasm() {\n console.warn(\"initializeWasm is deprecated, you no longer need to use it\");\n}\n\nexport { createAleoWorker } from \"./managed-worker\";\n\nexport { ProgramManager } from \"./program-manager\";\n\nexport {\n Address,\n Execution as FunctionExecution,\n ExecutionResponse,\n Field,\n OfflineQuery,\n PrivateKey,\n PrivateKeyCiphertext,\n Program,\n ProgramManager as ProgramManagerBase,\n ProvingKey,\n RecordCiphertext,\n RecordPlaintext,\n Signature,\n Transaction,\n VerifyingKey,\n ViewKey,\n initThreadPool,\n verifyFunctionExecution,\n} from \"@provablehq/wasm\";\n\nexport { initializeWasm };\n\nexport {\n Account,\n AleoKeyProvider,\n AleoKeyProviderParams,\n AleoKeyProviderInitParams,\n AleoNetworkClient,\n Block,\n BlockHeightSearch,\n CachedKeyPair,\n Execution,\n FunctionKeyPair,\n FunctionKeyProvider,\n Input,\n Key,\n KeySearchParams,\n NetworkRecordProvider,\n ProgramImports,\n OfflineKeyProvider,\n OfflineSearchParams,\n Output,\n RecordProvider,\n RecordSearchParams,\n TransactionModel,\n Transition,\n CREDITS_PROGRAM_KEYS,\n KEY_STORE,\n PRIVATE_TRANSFER,\n PRIVATE_TO_PUBLIC_TRANSFER,\n PRIVATE_TRANSFER_TYPES,\n PUBLIC_TRANSFER,\n PUBLIC_TRANSFER_AS_SIGNER,\n PUBLIC_TO_PRIVATE_TRANSFER,\n VALID_TRANSFER_TYPES,\n logAndThrow,\n};\n","import * as aleo from \"@provablehq/sdk\";\n\nawait aleo.initThreadPool();\n\nconst defaultHost = \"https://api.explorer.aleo.org/v1\";\nconst keyProvider = new aleo.AleoKeyProvider();\nconst programManager = new aleo.ProgramManager(defaultHost, keyProvider, undefined);\nkeyProvider.useCache(true);\n\nself.postMessage({\n type: \"ALEO_WORKER_READY\",\n});\n\nlet lastLocalProgram = null;\nself.addEventListener(\"message\", (ev) => {\n if (ev.data.type === \"ALEO_EXECUTE_PROGRAM_LOCAL\") {\n const { localProgram, aleoFunction, inputs, privateKey } = ev.data;\n\n console.log(\"Web worker: Executing function locally...\");\n let startTime = performance.now();\n\n (async function () {\n try {\n const privateKeyObject = aleo.PrivateKey.from_string(privateKey);\n // Ensure the program is valid and that it contains the function specified\n const program = programManager.createProgramFromSource(localProgram);\n const program_id = program.id();\n if (!program.hasFunction(aleoFunction)) {\n throw `Program ${program_id} does not contain function ${aleoFunction}`;\n }\n const cacheKey = `${program_id}:${aleoFunction}`;\n\n // Get the program imports\n const imports = programManager.networkClient.getProgramImports(localProgram);\n\n // Get the proving and verifying keys for the function\n if (lastLocalProgram !== localProgram) {\n const keys = await programManager.synthesizeKeys(localProgram, aleoFunction, inputs, privateKeyObject);\n programManager.keyProvider.cacheKeys(cacheKey, keys);\n lastLocalProgram = localProgram;\n }\n\n // Pass the cache key to the execute function\n const keyParams = new aleo.AleoKeyProviderParams({\"cacheKey\": cacheKey});\n\n // Execute the function locally\n let response = await programManager.run(\n localProgram,\n aleoFunction,\n inputs,\n false,\n imports,\n keyParams,\n undefined,\n undefined,\n privateKeyObject,\n undefined\n );\n\n // Return the outputs to the main thread\n console.log(`Web worker: Local execution completed in ${performance.now() - startTime} ms`);\n const outputs = response.getOutputs();\n let execution = response.getExecution();\n if (execution) {\n aleo.verifyFunctionExecution(execution, keyProvider.getKeys(cacheKey)[1], program, \"hello\");\n execution = execution.toString();\n console.log(\"Execution verified successfully: \" + execution);\n } else {\n execution = \"\";\n }\n\n console.log(`Function execution response: ${outputs}`);\n self.postMessage({\n type: \"OFFLINE_EXECUTION_COMPLETED\",\n outputs: {outputs: outputs, execution: execution}\n });\n } catch (error) {\n console.error(error);\n self.postMessage({\n type: \"ERROR\",\n errorMessage: error.toString(),\n });\n }\n })();\n } else if (ev.data.type === \"ALEO_EXECUTE_PROGRAM_ON_CHAIN\") {\n const {\n remoteProgram,\n aleoFunction,\n inputs,\n privateKey,\n fee,\n privateFee,\n feeRecord,\n url,\n } = ev.data;\n\n console.log(\"Web worker: Creating execution...\");\n let startTime = performance.now();\n\n (async function () {\n try {\n const privateKeyObject = aleo.PrivateKey.from_string(privateKey)\n // Ensure the program is valid and that it contains the function specified\n const program = await programManager.networkClient.getProgramObject(remoteProgram);\n const program_id = program.id();\n if (!program.hasFunction(aleoFunction)) {\n throw `Program ${program_id} does not contain function ${aleoFunction}`;\n }\n\n // Get the proving and verifying keys for the function\n const cacheKey = `${program_id}:${aleoFunction}`;\n if (!programManager.keyProvider.containsKeys(cacheKey)) {\n console.log(`Web worker: Synthesizing proving & verifying keys for: '${program_id}:${aleoFunction}'`);\n const keys = await programManager.synthesizeKeys(remoteProgram, aleoFunction, inputs, privateKeyObject);\n programManager.keyProvider.cacheKeys(cacheKey, keys);\n }\n\n // Pass the cache key to the execute function\n const keyParams = new aleo.AleoKeyProviderParams({\"cacheKey\": cacheKey})\n\n // Set the host to the provided URL if provided\n if (typeof url === \"string\") { programManager.setHost(url); }\n const transaction = await programManager.execute({\n programName: program_id,\n functionName: aleoFunction,\n fee: fee,\n privateFee: privateFee,\n inputs: inputs,\n keySearchParams: keyParams,\n feeRecord: feeRecord,\n privateKey: privateKeyObject\n });\n\n // Return the transaction id to the main thread\n console.log(`Web worker: On-chain execution transaction created in ${performance.now() - startTime} ms`);\n self.postMessage({\n type: \"EXECUTION_TRANSACTION_COMPLETED\",\n executeTransaction: transaction,\n });\n } catch (error) {\n console.error(`Error creating execution transaction: ${error}`);\n self.postMessage({\n type: \"ERROR\",\n errorMessage: error.toString(),\n });\n } finally {\n programManager.setHost(defaultHost);\n }\n })();\n } else if (ev.data.type === \"ALEO_ESTIMATE_EXECUTION_FEE\") {\n const { remoteProgram, privateKey, aleoFunction, inputs, url } =\n ev.data;\n\n console.log(\"Web worker: Estimating execution fee...\");\n let startTime = performance.now();\n\n (async function () {\n try {\n const privateKeyObject = aleo.PrivateKey.from_string(privateKey);\n // Ensure the program is valid and that it contains the function specified\n const program = await programManager.networkClient.getProgramObject(remoteProgram);\n const program_id = program.id();\n if (!program.getFunctions().includes(aleoFunction)) {\n throw `Program ${program_id} does not contain function ${aleoFunction}`;\n }\n const cacheKey = `${program_id}:${aleoFunction}`;\n const imports = await programManager.networkClient.getProgramImports(remoteProgram);\n\n // Get the proving and verifying keys for the function\n if (!programManager.keyProvider.containsKeys(cacheKey)) {\n console.log(`Web worker: Synthesizing proving & verifying keys for: '${program_id}:${aleoFunction}'`);\n const keys = await programManager.synthesizeKeys(program.toString(), aleoFunction, inputs, privateKeyObject);\n programManager.keyProvider.cacheKeys(cacheKey, keys);\n }\n\n // Estimate the execution fee\n const [provingKey, verifyingKey] = programManager.keyProvider.getKeys(cacheKey);\n let executeFee = await aleo.ProgramManagerBase.estimateExecutionFee(\n privateKeyObject,\n remoteProgram,\n aleoFunction,\n inputs,\n url,\n imports,\n provingKey,\n verifyingKey,\n undefined\n );\n\n // Return the execution fee estimate to the main thread\n console.log(`Web worker: Execution fee estimated in ${performance.now() - startTime} ms`);\n console.log(`Execution Fee Estimation: ${executeFee} microcredits`);\n self.postMessage({\n type: \"EXECUTION_FEE_ESTIMATION_COMPLETED\",\n executionFee: Number(executeFee) / 1000000 + 0.01,\n });\n } catch (error) {\n console.error(error);\n self.postMessage({\n type: \"ERROR\",\n errorMessage: error.toString(),\n });\n }\n })();\n } else if (ev.data.type === \"ALEO_ESTIMATE_DEPLOYMENT_FEE\") {\n const { program, url } = ev.data;\n\n console.log(\"Web worker: Estimating deployment fee...\");\n\n let startTime = performance.now();\n (async function () {\n try {\n const imports = await programManager.networkClient.getProgramImports(program);\n console.log(\"Estimating deployment fee..\");\n let deploymentFee =\n await aleo.ProgramManagerBase.estimateDeploymentFee(\n program,\n imports,\n );\n\n // Return the deployment fee estimate to the main thread\n console.log(`Web worker: Deployment fee estimation completed in ${performance.now() - startTime} ms`);\n console.log(`Deployment Fee Estimation: ${deploymentFee} microcredits`);\n self.postMessage({\n type: \"DEPLOYMENT_FEE_ESTIMATION_COMPLETED\",\n deploymentFee: Number(deploymentFee) / 1000000 + 0.01,\n });\n } catch (error) {\n console.error(error);\n self.postMessage({\n type: \"ERROR\",\n errorMessage: error.toString(),\n });\n }\n })();\n } else if (ev.data.type === \"ALEO_TRANSFER\") {\n const {\n privateKey,\n amountCredits,\n recipient,\n transfer_type,\n amountRecord,\n fee,\n privateFee,\n feeRecord,\n url,\n } = ev.data;\n\n console.log(\n `Web worker: Creating transfer of type ${transfer_type}...`,\n );\n let startTime = performance.now();\n\n (async function () {\n try {\n // Set the host to the provided URL if provided\n if (typeof url === \"string\") { programManager.setHost(url); }\n\n // Create the transfer transaction and submit it to the network\n const transaction = await programManager.transfer(\n amountCredits,\n recipient,\n transfer_type,\n fee,\n privateFee,\n undefined,\n amountRecord,\n feeRecord,\n aleo.PrivateKey.from_string(privateKey),\n undefined\n );\n\n // Return the transaction id to the main thread\n console.log(`Web worker: Transfer transaction ${transaction} created in ${performance.now() - startTime} ms`);\n self.postMessage({\n type: \"TRANSFER_TRANSACTION_COMPLETED\",\n transferTransaction: transaction,\n });\n } catch (error) {\n console.error(error);\n self.postMessage({\n type: \"ERROR\",\n errorMessage: error.toString(),\n });\n } finally {\n programManager.setHost(defaultHost);\n }\n })();\n } else if (ev.data.type === \"ALEO_DEPLOY\") {\n const { program, privateKey, fee, privateFee, feeRecord, url } = ev.data;\n\n console.log(\"Web worker: Creating deployment...\");\n\n let startTime = performance.now();\n (async function () {\n try {\n // Set the network client host if specified\n if (typeof url === \"string\") { programManager.setHost(url); }\n\n // Check if the program is valid\n const programObject = programManager.createProgramFromSource(program);\n\n // Check if the program already exists on the network. If so, throw an error\n let programExists = false;\n try {\n await programManager.networkClient.getProgram(programObject.id());\n programExists = true;\n } catch (e) {\n console.log(\n `Program not found on the Aleo Network - proceeding with deployment...`,\n );\n }\n\n if (programExists) {\n throw `Program ${programObject.id()} already exists on the network`;\n }\n\n console.log(\"fee is: \", fee);\n // Create the deployment transaction and submit it to the network\n let transaction = await programManager.deploy(\n program,\n fee,\n privateFee,\n undefined,\n feeRecord,\n aleo.PrivateKey.from_string(privateKey),\n )\n\n // Return the transaction id to the main thread\n console.log(`Web worker: Deployment transaction ${transaction} created in ${performance.now() - startTime} ms`);\n self.postMessage({\n type: \"DEPLOY_TRANSACTION_COMPLETED\",\n deployTransaction: transaction,\n });\n } catch (error) {\n console.log(error);\n self.postMessage({\n type: \"ERROR\",\n errorMessage: error.toString(),\n });\n } finally {\n programManager.setHost(defaultHost);\n }\n })();\n } else if (ev.data.type === \"ALEO_SPLIT\") {\n const { splitAmount, record, privateKey, url } = ev.data;\n\n console.log(\"Web worker: Creating split...\");\n\n let startTime = performance.now();\n (async function () {\n try {\n // Set the network client host if specified\n if (typeof url === \"string\") { programManager.setHost(url); }\n\n // Create the split transaction and submit to the network\n const transaction = await programManager.split(\n splitAmount,\n record,\n aleo.PrivateKey.from_string(privateKey),\n undefined\n );\n\n // Return the transaction id to the main thread\n console.log(`Web worker: Split transaction ${transaction} created in ${performance.now() - startTime} ms`);\n self.postMessage({\n type: \"SPLIT_TRANSACTION_COMPLETED\",\n splitTransaction: transaction,\n });\n } catch (error) {\n console.log(error);\n self.postMessage({\n type: \"ERROR\",\n errorMessage: error.toString(),\n });\n } finally {\n programManager.setHost(defaultHost);\n }\n })();\n } else if (ev.data.type === \"ALEO_JOIN\") {\n const { recordOne, recordTwo, fee, privateFee, feeRecord, privateKey, url } =\n ev.data;\n\n console.log(\"Web worker: Creating join...\");\n\n let startTime = performance.now();\n (async function () {\n\n try {\n // Set the network client host if specified\n if (typeof url === \"string\") { programManager.setHost(url); }\n\n // Create the join transaction and submit it to the network\n const transaction = await programManager.join(\n recordOne,\n recordTwo,\n fee,\n privateFee,\n undefined,\n feeRecord,\n aleo.PrivateKey.from_string(privateKey),\n undefined\n );\n\n // Return the transaction id to the main thread\n console.log(`Web worker: Join transaction ${transaction} created in ${performance.now() - startTime} ms`);\n self.postMessage({\n type: \"JOIN_TRANSACTION_COMPLETED\",\n joinTransaction: transaction,\n });\n } catch (error) {\n console.log(error);\n self.postMessage({\n type: \"ERROR\",\n errorMessage: error.toString(),\n });\n } finally {\n programManager.setHost(defaultHost);\n }\n })();\n }\n});\n"],"names":["async","get","url","options","response","fetch","ok","Error","status","post","method","AleoNetworkClient","host","headers","account","constructor","this","setAccount","getAccount","setHost","fetchData","json","error","findUnspentRecords","startHeight","endHeight","privateKey","amounts","maxMicrocredits","nonces","records","Array","start","end","resolvedPrivateKey","latestHeight","failures","totalRecordValue","BigInt","_privateKey","PrivateKey","from_string","viewKey","to_view_key","blockHeight","getLatestHeight","blocks","getBlockRange","i","length","transactions","j","confirmedTransaction","type","transaction","execution","transitions","k","transition","program","outputs","l","output","record","RecordCiphertext","fromString","value","isOwner","recordPlaintext","decrypt","nonce","includes","serialNumber","serialNumberString","getTransitionId","push","microcredits","amounts_found","console","warn","toString","getBlock","height","getDeploymentTransactionIDForProgram","Program","replace","getDeploymentTransactionForProgram","transaction_id","getTransaction","getLatestBlock","getLatestCommittee","getProgram","programId","getProgramObject","inputProgram","getProgramImports","imports","importList","getImports","import_id","hasOwnProperty","programSource","nestedImports","key","logAndThrow","getProgramImportNames","getProgramMappingNames","getProgramMappingValue","mappingName","getStateRoot","id","getTransactions","getTransactionsInMempool","inputOrOutputID","submitTransaction","transaction_string","Transaction","body","Object","assign","message","AleoKeyProviderParams","name","proverUri","verifierUri","cacheKey","params","AleoKeyProvider","cache","cacheOption","keyUris","fetchBytes","data","arrayBuffer","Uint8Array","KEY_STORE","Map","useCache","clearCache","clear","cacheKeys","keyId","keys","provingKey","verifyingKey","set","toBytes","containsKeys","has","deleteKeys","delete","getKeys","debug","provingKeyBytes","verifyingKeyBytes","ProvingKey","fromBytes","VerifyingKey","functionKeys","proverUrl","verifierUrl","CREDITS_PROGRAM_KEYS","getKey","fetchCreditsKeys","fetchRemoteKeys","getVerifyingKey","fetchProvingKey","locator","keyPair","verifying_key","proving_key","prover","bond_public","bondPublicKeys","bondValidatorKeys","bond_validator","claimUnbondPublicKeys","claim_unbond_public","transferKeys","visibility","PRIVATE_TRANSFER","transfer_private","PRIVATE_TO_PUBLIC_TRANSFER","transfer_private_to_public","PUBLIC_TRANSFER","transfer_public","PUBLIC_TRANSFER_AS_SIGNER","transfer_public_as_signer","PUBLIC_TO_PRIVATE_TRANSFER","transfer_public_to_private","joinKeys","join","splitKeys","split","feePrivateKeys","fee_private","feePublicKeys","fee_public","verifier","inclusion","set_validator_state","unbond_public","text","e","inner","unBondPublicKeys","ProgramManager","keyProvider","networkClient","recordProvider","setKeyProvider","setRecordProvider","deploy","fee","privateFee","recordSearchParams","feeRecord","programObject","log","feeKeys","deploymentPrivateKey","getCreditsRecord","undefined","feeProvingKey","feeVerifyingKey","tx","ProgramManager$1","buildDeploymentTransaction","buildExecutionTransaction","programName","functionName","inputs","keySearchParams","offlineQuery","executionPrivateKey","execute","run","function_name","proveExecution","executeFunctionOffline","recordOne","recordTwo","joinProvingKey","joinVerifyingKey","RecordPlaintext","buildJoinTransaction","splitAmount","amountRecord","splitProvingKey","splitVerifyingKey","buildSplitTransaction","synthesizeKeys","function_id","synthesizeKeyPair","buildTransferTransaction","amount","recipient","transferType","validateTransferType","transferProvingKey","transferVerifyingKey","requiresAmountRecord","buildTransferPublicTransaction","buildTransferPublicAsSignerTransaction","transfer","buildBondPublicTransaction","staker_address","validator_address","withdrawal_address","scaledAmount","Math","trunc","creditsProgram","additionalOptions","executeOptions","bondPublic","buildBondValidatorTransaction","commission","adjustedCommission","bondValidator","buildUnbondPublicTransaction","unbondPublic","buildClaimUnbondPublicTransaction","claimUnbondPublic","buildSetValidatorStateTransaction","validator_state","setValidatorState","verifyExecution","executionResponse","getExecution","getFunctionId","verifyFunctionExecution","createProgramFromSource","getCreditsProgram","verifyProgram","findCreditsRecord","PRIVATE_TRANSFER_TYPES","VALID_TRANSFER_TYPES","Metadata","baseUrl","convert","metadata","Set","_regeneratorRuntime","t","r","prototype","n","o","defineProperty","Symbol","a","iterator","c","asyncIterator","u","toStringTag","define","enumerable","configurable","writable","wrap","Generator","create","Context","makeInvokeMethod","tryCatch","arg","call","h","f","s","y","GeneratorFunction","GeneratorFunctionPrototype","p","d","getPrototypeOf","v","values","g","defineIteratorMethods","forEach","_invoke","AsyncIterator","invoke","_typeof","resolve","__await","then","callInvokeWithMethodAndArg","done","delegate","maybeInvokeDelegate","sent","_sent","dispatchException","abrupt","TypeError","resultName","next","nextLoc","pushTryEntry","tryLoc","catchLoc","finallyLoc","afterLoc","tryEntries","resetTryEntry","completion","reset","isNaN","displayName","isGeneratorFunction","mark","setPrototypeOf","__proto__","awrap","Promise","reverse","pop","prev","charAt","slice","stop","rval","handle","complete","finish","delegateYield","asyncGeneratorStep","gen","reject","_next","_throw","info","_asyncToGenerator","fn","self","args","arguments","apply","err","aleo","defaultHost","programManager","postMessage","lastLocalProgram","addEventListener","ev","_ev$data","localProgram","aleoFunction","startTime","performance","now","_callee","privateKeyObject","program_id","keyParams","_context","hasFunction","concat","getOutputs","t0","errorMessage","_ev$data2","remoteProgram","_callee2","_context2","executeTransaction","_ev$data3","_callee3","_programManager$keyPr","_programManager$keyPr2","executeFee","_context3","getFunctions","estimateExecutionFee","executionFee","Number","_ev$data4","_callee4","deploymentFee","_context4","estimateDeploymentFee","_ev$data5","amountCredits","transfer_type","_callee5","_context5","transferTransaction","_ev$data6","_callee6","programExists","_context6","deployTransaction","t1","_ev$data7","_callee7","_context7","splitTransaction","_ev$data8","_callee8","_context8","joinTransaction"],"sourceRoot":""} \ No newline at end of file +{"version":3,"file":"383.bundle.js","mappings":";iWAAOA,eAAeC,EAAIC,EAAmBC,GACzC,MAAMC,QAAiBC,MAAMH,EAAKC,GAElC,IAAKC,EAASE,GACV,MAAM,IAAIC,MAAMH,EAASI,OAAS,sBAAwBN,GAG9D,OAAOE,CACX,CAGOJ,eAAeS,EAAKP,EAAmBC,GAC1CA,EAAQO,OAAS,OAEjB,MAAMN,QAAiBC,MAAMH,EAAKC,GAElC,IAAKC,EAASE,GACV,M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AAAkB,MAAA,SAAA+I,GAAA,cAAAA,EAAAnF,KAAAmF,EAAAxG,MAAA,OAMO,OANPwG,EAAAnF,KAAA,EAI0B,iBAAR3X,IAAoBmZ,EAAelY,QAAQjB,IAEtD8c,EAAAxG,KAAA,EAC0B6C,EAAetN,KACrCiD,GACAC,GACA5B,GACAC,QACAQ,EACAN,GACA2L,EAAAA,WAAgB1W,YAAYf,SAC5BoM,GACH,OATKxK,EAAW0Z,EAAA9G,KAYjBpR,QAAQ4I,IAAI,gCAAD4M,OAAiChX,EAAW,gBAAAgX,OAAeR,YAAYC,MAAQF,GAAS,QACnGf,KAAKQ,YAAY,CACbjW,KAAM,6BACN4Z,gBAAiB3Z,IAClB0Z,EAAAxG,KAAA,gBAAAwG,EAAAnF,KAAA,EAAAmF,EAAAxC,GAAAwC,EAAA,SAEHlY,QAAQ4I,IAAGsP,EAAAxC,IACX1B,KAAKQ,YAAY,CACbjW,KAAM,QACNoX,aAAcuC,EAAAxC,GAAMxV,aACrB,QAEiC,OAFjCgY,EAAAnF,KAAA,GAEHwB,EAAelY,QAAQiY,GAAa4D,EAAA5E,OAAA,6BAAA4E,EAAAhF,OAAA,GAAA+E,EAAA,uBA/B5CnE,EAkCJ,CACJ","sources":["webpack://aleo-website/../src/utils.ts","webpack://aleo-website/../src/network-client.ts","webpack://aleo-website/../src/function-key-provider.ts","webpack://aleo-website/../src/program-manager.ts","webpack://aleo-website/../src/index.ts","webpack://aleo-website/./src/workers/worker.js"],"sourcesContent":["export async function get(url: URL | string, options?: RequestInit) {\n const response = await fetch(url, options);\n\n if (!response.ok) {\n throw new Error(response.status + \" could not get URL \" + url);\n }\n\n return response;\n}\n\n\nexport async function post(url: URL | string, options: RequestInit) {\n options.method = \"POST\";\n\n const response = await fetch(url, options);\n\n if (!response.ok) {\n throw new Error(response.status + \" could not post URL \" + url);\n }\n\n return response;\n}\n","import { get, post } from \"./utils\";\nimport {\n Account,\n Block,\n RecordCiphertext,\n Program,\n RecordPlaintext,\n PrivateKey,\n Transaction,\n TransactionModel,\n logAndThrow\n} from \"./index\";\n\ntype ProgramImports = { [key: string]: string | Program };\n\ninterface AleoNetworkClientOptions {\n headers?: { [key: string]: string };\n}\n\n/**\n * Client library that encapsulates REST calls to publicly exposed endpoints of Aleo nodes. The methods provided in this\n * allow users to query public information from the Aleo blockchain and submit transactions to the network.\n *\n * @param {string} host\n * @example\n * // Connection to a local node\n * const localNetworkClient = new AleoNetworkClient(\"http://localhost:3030\");\n *\n * // Connection to a public beacon node\n * const publicnetworkClient = new AleoNetworkClient(\"https://api.explorer.aleo.org/v1\");\n */\nclass AleoNetworkClient {\n host: string;\n headers: { [key: string]: string };\n account: Account | undefined;\n\n constructor(host: string, options?: AleoNetworkClientOptions) {\n this.host = host + \"/testnet\";\n\n if (options && options.headers) {\n this.headers = options.headers;\n\n } else {\n this.headers = {\n // This is replaced by the actual version by a Rollup plugin\n \"X-Aleo-SDK-Version\": \"%%VERSION%%\",\n };\n }\n }\n\n /**\n * Set an account to use in networkClient calls\n *\n * @param {Account} account\n * @example\n * const account = new Account();\n * networkClient.setAccount(account);\n */\n setAccount(account: Account) {\n this.account = account;\n }\n\n /**\n * Return the Aleo account used in the networkClient\n *\n * @example\n * const account = networkClient.getAccount();\n */\n getAccount(): Account | undefined {\n return this.account;\n }\n\n /**\n * Set a new host for the networkClient\n *\n * @param {string} host The address of a node hosting the Aleo API\n * @param host\n */\n setHost(host: string) {\n this.host = host + \"/testnet\";\n }\n\n async fetchData(\n url = \"/\",\n ): Promise {\n try {\n const response = await get(this.host + url, {\n headers: this.headers\n });\n\n return await response.json();\n } catch (error) {\n throw new Error(\"Error fetching data.\");\n }\n }\n\n /**\n * Attempts to find unspent records in the Aleo blockchain for a specified private key\n * @param {number} startHeight - The height at which to start searching for unspent records\n * @param {number} endHeight - The height at which to stop searching for unspent records\n * @param {string | PrivateKey} privateKey - The private key to use to find unspent records\n * @param {number[]} amounts - The amounts (in microcredits) to search for (eg. [100, 200, 3000])\n * @param {number} maxMicrocredits - The maximum number of microcredits to search for\n * @param {string[]} nonces - The nonces of already found records to exclude from the search\n *\n * @example\n * // Find all unspent records\n * const privateKey = \"[PRIVATE_KEY]\";\n * const records = networkClient.findUnspentRecords(0, undefined, privateKey);\n *\n * // Find specific amounts\n * const startHeight = 500000;\n * const amounts = [600000, 1000000];\n * const records = networkClient.findUnspentRecords(startHeight, undefined, privateKey, amounts);\n *\n * // Find specific amounts with a maximum number of cumulative microcredits\n * const maxMicrocredits = 100000;\n * const records = networkClient.findUnspentRecords(startHeight, undefined, privateKey, undefined, maxMicrocredits);\n */\n async findUnspentRecords(\n startHeight: number,\n endHeight: number | undefined,\n privateKey: string | PrivateKey | undefined,\n amounts: number[] | undefined,\n maxMicrocredits?: number | undefined,\n nonces?: string[] | undefined,\n ): Promise | Error> {\n nonces = nonces || [];\n // Ensure start height is not negative\n if (startHeight < 0) {\n throw new Error(\"Start height must be greater than or equal to 0\");\n }\n\n // Initialize search parameters\n const records = new Array();\n let start;\n let end;\n let resolvedPrivateKey: PrivateKey;\n let failures = 0;\n let totalRecordValue = BigInt(0);\n let latestHeight: number;\n\n // Ensure a private key is present to find owned records\n if (typeof privateKey === \"undefined\") {\n if (typeof this.account === \"undefined\") {\n throw new Error(\"Private key must be specified in an argument to findOwnedRecords or set in the AleoNetworkClient\");\n } else {\n resolvedPrivateKey = this.account._privateKey;\n }\n } else {\n try {\n resolvedPrivateKey = privateKey instanceof PrivateKey ? privateKey : PrivateKey.from_string(privateKey);\n } catch (error) {\n throw new Error(\"Error parsing private key provided.\");\n }\n }\n const viewKey = resolvedPrivateKey.to_view_key();\n\n // Get the latest height to ensure the range being searched is valid\n try {\n const blockHeight = await this.getLatestHeight();\n if (typeof blockHeight === \"number\") {\n latestHeight = blockHeight;\n } else {\n throw new Error(\"Error fetching latest block height.\");\n }\n } catch (error) {\n throw new Error(\"Error fetching latest block height.\");\n }\n\n // If no end height is specified or is greater than the latest height, set the end height to the latest height\n if (typeof endHeight === \"number\" && endHeight <= latestHeight) {\n end = endHeight\n } else {\n end = latestHeight;\n }\n\n // If the starting is greater than the ending height, return an error\n if (startHeight > end) {\n throw new Error(\"Start height must be less than or equal to end height.\");\n }\n\n // Iterate through blocks in reverse order in chunks of 50\n while (end > startHeight) {\n start = end - 50;\n if (start < startHeight) {\n start = startHeight;\n }\n try {\n // Get 50 blocks (or the difference between the start and end if less than 50)\n const blocks = await this.getBlockRange(start, end);\n end = start;\n if (!(blocks instanceof Error)) {\n // Iterate through blocks to find unspent records\n for (let i = 0; i < blocks.length; i++) {\n const block = blocks[i];\n const transactions = block.transactions;\n if (!(typeof transactions === \"undefined\")) {\n for (let j = 0; j < transactions.length; j++) {\n const confirmedTransaction = transactions[j];\n // Search for unspent records in execute transactions of credits.aleo\n if (confirmedTransaction.type == \"execute\") {\n const transaction = confirmedTransaction.transaction;\n if (transaction.execution && !(typeof transaction.execution.transitions == \"undefined\")) {\n for (let k = 0; k < transaction.execution.transitions.length; k++) {\n const transition = transaction.execution.transitions[k];\n // Only search for unspent records in credits.aleo (for now)\n if (transition.program !== \"credits.aleo\") {\n continue;\n }\n if (!(typeof transition.outputs == \"undefined\")) {\n for (let l = 0; l < transition.outputs.length; l++) {\n const output = transition.outputs[l];\n if (output.type === \"record\") {\n try {\n // Create a wasm record ciphertext object from the found output\n const record = RecordCiphertext.fromString(output.value);\n // Determine if the record is owned by the specified view key\n if (record.isOwner(viewKey)) {\n // Decrypt the record and get the serial number\n const recordPlaintext = record.decrypt(viewKey);\n\n // If the record has already been found, skip it\n const nonce = recordPlaintext.nonce();\n if (nonces.includes(nonce)) {\n continue;\n }\n\n // Otherwise record the nonce that has been found\n const serialNumber = recordPlaintext.serialNumberString(resolvedPrivateKey, \"credits.aleo\", \"credits\");\n // Attempt to see if the serial number is spent\n try {\n await this.getTransitionId(serialNumber);\n } catch (error) {\n // If it's not found, add it to the list of unspent records\n if (!amounts) {\n records.push(recordPlaintext);\n // If the user specified a maximum number of microcredits, check if the search has found enough\n if (typeof maxMicrocredits === \"number\") {\n totalRecordValue += recordPlaintext.microcredits();\n // Exit if the search has found the amount specified\n if (totalRecordValue >= BigInt(maxMicrocredits)) {\n return records;\n }\n }\n }\n // If the user specified a list of amounts, check if the search has found them\n if (!(typeof amounts === \"undefined\") && amounts.length > 0) {\n let amounts_found = 0;\n if (recordPlaintext.microcredits() > amounts[amounts_found]) {\n amounts_found += 1;\n records.push(recordPlaintext);\n // If the user specified a maximum number of microcredits, check if the search has found enough\n if (typeof maxMicrocredits === \"number\") {\n totalRecordValue += recordPlaintext.microcredits();\n // Exit if the search has found the amount specified\n if (totalRecordValue >= BigInt(maxMicrocredits)) {\n return records;\n }\n }\n if (records.length >= amounts.length) {\n return records;\n }\n }\n }\n }\n }\n } catch (error) {\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n } catch (error) {\n // If there is an error fetching blocks, log it and keep searching\n console.warn(\"Error fetching blocks in range: \" + start.toString() + \"-\" + end.toString());\n console.warn(\"Error: \", error);\n failures += 1;\n if (failures > 10) {\n console.warn(\"10 failures fetching records reached. Returning records fetched so far\");\n return records;\n }\n }\n }\n return records;\n }\n\n /**\n * Returns the contents of the block at the specified block height\n *\n * @param {number} height\n * @example\n * const block = networkClient.getBlock(1234);\n */\n async getBlock(height: number): Promise {\n try {\n const block = await this.fetchData(\"/block/\" + height);\n return block;\n } catch (error) {\n throw new Error(\"Error fetching block.\");\n }\n }\n\n /**\n * Returns a range of blocks between the specified block heights\n *\n * @param {number} start\n * @param {number} end\n * @example\n * const blockRange = networkClient.getBlockRange(2050, 2100);\n */\n async getBlockRange(start: number, end: number): Promise | Error> {\n try {\n return await this.fetchData>(\"/blocks?start=\" + start + \"&end=\" + end);\n } catch (error) {\n const errorMessage = \"Error fetching blocks between \" + start + \" and \" + end + \".\"\n throw new Error(errorMessage);\n }\n }\n\n /**\n * Returns the deployment transaction id associated with the specified program\n *\n * @param {Program | string} program\n * @returns {TransactionModel | Error}\n */\n async getDeploymentTransactionIDForProgram(program: Program | string): Promise {\n if (program instanceof Program) {\n program = program.toString();\n }\n try {\n const id = await this.fetchData(\"/find/transactionID/deployment/\" + program);\n return id.replace(\"\\\"\", \"\")\n } catch (error) {\n throw new Error(\"Error fetching deployment transaction for program.\");\n }\n }\n\n /**\n * Returns the deployment transaction associated with a specified program\n *\n * @param {Program | string} program\n * @returns {TransactionModel | Error}\n */\n async getDeploymentTransactionForProgram(program: Program | string): Promise {\n try {\n const transaction_id = await this.getDeploymentTransactionIDForProgram(program);\n return await this.getTransaction(transaction_id);\n } catch (error) {\n throw new Error(\"Error fetching deployment transaction for program.\");\n }\n }\n\n /**\n * Returns the contents of the latest block\n *\n * @example\n * const latestHeight = networkClient.getLatestBlock();\n */\n async getLatestBlock(): Promise {\n try {\n return await this.fetchData(\"/latest/block\") as Block;\n } catch (error) {\n throw new Error(\"Error fetching latest block.\");\n }\n }\n\n /**\n * Returns the latest committee\n *\n * @returns {Promise} A javascript object containing the latest committee\n */\n async getLatestCommittee(): Promise {\n try {\n return await this.fetchData(\"/committee/latest\");\n } catch (error) {\n throw new Error(\"Error fetching latest block.\");\n }\n }\n\n /**\n * Returns the latest block height\n *\n * @example\n * const latestHeight = networkClient.getLatestHeight();\n */\n async getLatestHeight(): Promise {\n try {\n return await this.fetchData(\"/latest/height\");\n } catch (error) {\n throw new Error(\"Error fetching latest height.\");\n }\n }\n\n /**\n * Returns the source code of a program given a program ID\n *\n * @param {string} programId The program ID of a program deployed to the Aleo Network\n * @return {Promise} Source code of the program\n *\n * @example\n * const program = networkClient.getProgram(\"hello_hello.aleo\");\n * const expectedSource = \"program hello_hello.aleo;\\n\\nfunction hello:\\n input r0 as u32.public;\\n input r1 as u32.private;\\n add r0 r1 into r2;\\n output r2 as u32.private;\\n\"\n * assert.equal(program, expectedSource);\n */\n async getProgram(programId: string): Promise {\n try {\n return await this.fetchData(\"/program/\" + programId)\n } catch (error) {\n throw new Error(\"Error fetching program\");\n }\n }\n\n /**\n * Returns a program object from a program ID or program source code\n *\n * @param {string} inputProgram The program ID or program source code of a program deployed to the Aleo Network\n * @return {Promise} Source code of the program\n *\n * @example\n * const programID = \"hello_hello.aleo\";\n * const programSource = \"program hello_hello.aleo;\\n\\nfunction hello:\\n input r0 as u32.public;\\n input r1 as u32.private;\\n add r0 r1 into r2;\\n output r2 as u32.private;\\n\"\n *\n * // Get program object from program ID or program source code\n * const programObjectFromID = await networkClient.getProgramObject(programID);\n * const programObjectFromSource = await networkClient.getProgramObject(programSource);\n *\n * // Both program objects should be equal\n * assert.equal(programObjectFromID.to_string(), programObjectFromSource.to_string());\n */\n async getProgramObject(inputProgram: string): Promise {\n try {\n return Program.fromString(inputProgram);\n } catch (error) {\n try {\n return Program.fromString((await this.getProgram(inputProgram)));\n } catch (error) {\n throw new Error(`${inputProgram} is neither a program name or a valid program`);\n }\n }\n }\n\n /**\n * Returns an object containing the source code of a program and the source code of all programs it imports\n *\n * @param {Program | string} inputProgram The program ID or program source code of a program deployed to the Aleo Network\n * @returns {Promise} Object of the form { \"program_id\": \"program_source\", .. } containing program id & source code for all program imports\n *\n * @example\n * const double_test_source = \"import multiply_test.aleo;\\n\\nprogram double_test.aleo;\\n\\nfunction double_it:\\n input r0 as u32.private;\\n call multiply_test.aleo/multiply 2u32 r0 into r1;\\n output r1 as u32.private;\\n\"\n * const double_test = Program.fromString(double_test_source);\n * const expectedImports = {\n * \"multiply_test.aleo\": \"program multiply_test.aleo;\\n\\nfunction multiply:\\n input r0 as u32.public;\\n input r1 as u32.private;\\n mul r0 r1 into r2;\\n output r2 as u32.private;\\n\"\n * }\n *\n * // Imports can be fetched using the program ID, source code, or program object\n * let programImports = await networkClient.getProgramImports(\"double_test.aleo\");\n * assert.deepStrictEqual(programImports, expectedImports);\n *\n * // Using the program source code\n * programImports = await networkClient.getProgramImports(double_test_source);\n * assert.deepStrictEqual(programImports, expectedImports);\n *\n * // Using the program object\n * programImports = await networkClient.getProgramImports(double_test);\n * assert.deepStrictEqual(programImports, expectedImports);\n */\n async getProgramImports(inputProgram: Program | string): Promise {\n try {\n const imports: ProgramImports = {};\n\n // Get the program object or fail if the program is not valid or does not exist\n const program = inputProgram instanceof Program ? inputProgram : (await this.getProgramObject(inputProgram));\n\n // Get the list of programs that the program imports\n const importList = program.getImports();\n\n // Recursively get any imports that the imported programs have in a depth first search order\n for (let i = 0; i < importList.length; i++) {\n const import_id = importList[i];\n if (!imports.hasOwnProperty(import_id)) {\n const programSource = await this.getProgram(import_id);\n const nestedImports = await this.getProgramImports(import_id);\n for (const key in nestedImports) {\n if (!imports.hasOwnProperty(key)) {\n imports[key] = nestedImports[key];\n }\n }\n imports[import_id] = programSource;\n }\n }\n return imports;\n } catch (error) {\n throw logAndThrow(\"Error fetching program imports: \" + error)\n }\n }\n\n /**\n * Get a list of the program names that a program imports\n *\n * @param {Program | string} inputProgram - The program id or program source code to get the imports of\n * @returns {string[]} - The list of program names that the program imports\n *\n * @example\n * const programImportsNames = networkClient.getProgramImports(\"double_test.aleo\");\n * const expectedImportsNames = [\"multiply_test.aleo\"];\n * assert.deepStrictEqual(programImportsNames, expectedImportsNames);\n */\n async getProgramImportNames(inputProgram: Program | string): Promise {\n try {\n const program = inputProgram instanceof Program ? inputProgram : (await this.getProgramObject(inputProgram));\n return program.getImports();\n } catch (error) {\n throw new Error(\"Error fetching program imports with error: \" + error);\n }\n }\n\n /**\n * Returns the names of the mappings of a program\n *\n * @param {string} programId - The program ID to get the mappings of (e.g. \"credits.aleo\")\n * @example\n * const mappings = networkClient.getProgramMappingNames(\"credits.aleo\");\n * const expectedMappings = [\"account\"];\n * assert.deepStrictEqual(mappings, expectedMappings);\n */\n async getProgramMappingNames(programId: string): Promise | Error> {\n try {\n return await this.fetchData>(\"/program/\" + programId + \"/mappings\")\n } catch (error) {\n throw new Error(\"Error fetching program mappings - ensure the program exists on chain before trying again\");\n }\n }\n\n /**\n * Returns the value of a program's mapping for a specific key\n *\n * @param {string} programId - The program ID to get the mapping value of (e.g. \"credits.aleo\")\n * @param {string} mappingName - The name of the mapping to get the value of (e.g. \"account\")\n * @param {string} key - The key of the mapping to get the value of (e.g. \"aleo1rhgdu77hgyqd3xjj8ucu3jj9r2krwz6mnzyd80gncr5fxcwlh5rsvzp9px\")\n * @return {Promise} String representation of the value of the mapping\n *\n * @example\n * // Get public balance of an account\n * const mappingValue = networkClient.getMappingValue(\"credits.aleo\", \"account\", \"aleo1rhgdu77hgyqd3xjj8ucu3jj9r2krwz6mnzyd80gncr5fxcwlh5rsvzp9px\");\n * const expectedValue = \"0u64\";\n * assert.equal(mappingValue, expectedValue);\n */\n async getProgramMappingValue(programId: string, mappingName: string, key: string): Promise {\n try {\n return await this.fetchData(\"/program/\" + programId + \"/mapping/\" + mappingName + \"/\" + key)\n } catch (error) {\n throw new Error(\"Error fetching mapping value - ensure the mapping exists and the key is correct\");\n }\n }\n\n /**\n * Returns the latest state/merkle root of the Aleo blockchain\n *\n * @example\n * const stateRoot = networkClient.getStateRoot();\n */\n async getStateRoot(): Promise {\n try {\n return await this.fetchData(\"/latest/stateRoot\");\n } catch (error) {\n throw new Error(\"Error fetching Aleo state root\");\n }\n }\n\n /**\n * Returns a transaction by its unique identifier\n *\n * @param {string} id\n * @example\n * const transaction = networkClient.getTransaction(\"at1handz9xjrqeynjrr0xay4pcsgtnczdksz3e584vfsgaz0dh0lyxq43a4wj\");\n */\n async getTransaction(id: string): Promise {\n try {\n return await this.fetchData(\"/transaction/\" + id);\n } catch (error) {\n throw new Error(\"Error fetching transaction.\");\n }\n }\n\n /**\n * Returns the transactions present at the specified block height\n *\n * @param {number} height\n * @example\n * const transactions = networkClient.getTransactions(654);\n */\n async getTransactions(height: number): Promise | Error> {\n try {\n return await this.fetchData>(\"/block/\" + height.toString() + \"/transactions\");\n } catch (error) {\n throw new Error(\"Error fetching transactions.\");\n }\n }\n\n /**\n * Returns the transactions in the memory pool.\n *\n * @example\n * const transactions = networkClient.getTransactionsInMempool();\n */\n async getTransactionsInMempool(): Promise | Error> {\n try {\n return await this.fetchData>(\"/memoryPool/transactions\");\n } catch (error) {\n throw new Error(\"Error fetching transactions from mempool.\");\n }\n }\n\n /**\n * Returns the transition ID of the transition corresponding to the ID of the input or output.\n * @param {string} inputOrOutputID - ID of the input or output.\n *\n * @example\n * const transitionId = networkClient.getTransitionId(\"2429232855236830926144356377868449890830704336664550203176918782554219952323field\");\n */\n async getTransitionId(inputOrOutputID: string): Promise {\n try {\n return await this.fetchData(\"/find/transitionID/\" + inputOrOutputID);\n } catch (error) {\n throw new Error(\"Error fetching transition ID.\");\n }\n }\n\n /**\n * Submit an execute or deployment transaction to the Aleo network\n *\n * @param {Transaction | string} transaction - The transaction to submit to the network\n * @returns {string | Error} - The transaction id of the submitted transaction or the resulting error\n */\n async submitTransaction(transaction: Transaction | string): Promise {\n const transaction_string = transaction instanceof Transaction ? transaction.toString() : transaction;\n try {\n const response = await post(this.host + \"/transaction/broadcast\", {\n body: transaction_string,\n headers: Object.assign({}, this.headers, {\n \"Content-Type\": \"application/json\",\n }),\n });\n\n try {\n return await response.json();\n\n } catch (error) {\n throw new Error(`Error posting transaction. Aleo network response: ${(error as Error).message}`);\n }\n } catch (error) {\n throw new Error(`Error posting transaction: No response received: ${(error as Error).message}`);\n }\n }\n}\n\nexport { AleoNetworkClient, AleoNetworkClientOptions, ProgramImports }\n","import {\n ProvingKey,\n VerifyingKey,\n CREDITS_PROGRAM_KEYS,\n KEY_STORE,\n Key,\n PRIVATE_TRANSFER,\n PRIVATE_TO_PUBLIC_TRANSFER,\n PUBLIC_TRANSFER,\n PUBLIC_TO_PRIVATE_TRANSFER,\n PUBLIC_TRANSFER_AS_SIGNER\n} from \"./index\";\nimport { get } from \"./utils\";\n\ntype FunctionKeyPair = [ProvingKey, VerifyingKey];\ntype CachedKeyPair = [Uint8Array, Uint8Array];\ntype AleoKeyProviderInitParams = {\n proverUri?: string;\n verifierUri?: string;\n cacheKey?: string;\n};\n\n/**\n * Interface for record search parameters. This allows for arbitrary search parameters to be passed to record provider\n * implementations.\n */\ninterface KeySearchParams {\n [key: string]: any; // This allows for arbitrary keys with any type values\n}\n\n/**\n * AleoKeyProviderParams search parameter for the AleoKeyProvider. It allows for the specification of a proverUri and\n * verifierUri to fetch keys via HTTP from a remote resource as well as a unique cacheKey to store the keys in memory.\n */\nclass AleoKeyProviderParams implements KeySearchParams {\n name: string | undefined;\n proverUri: string | undefined;\n verifierUri: string | undefined;\n cacheKey: string | undefined;\n\n /**\n * Create a new AleoKeyProviderParams object which implements the KeySearchParams interface. Users can optionally\n * specify a url for the proverUri & verifierUri to fetch keys via HTTP from a remote resource as well as a unique\n * cacheKey to store the keys in memory for future use. If no proverUri or verifierUri is specified, a cachekey must\n * be provided.\n *\n * @param { AleoKeyProviderInitParams } params - Optional search parameters\n */\n constructor(params: {proverUri?: string, verifierUri?: string, cacheKey?: string, name?: string}) {\n this.proverUri = params.proverUri;\n this.verifierUri = params.verifierUri;\n this.cacheKey = params.cacheKey;\n this.name = params.name;\n }\n}\n\n/**\n * KeyProvider interface. Enables the retrieval of public proving and verifying keys for Aleo Programs.\n */\ninterface FunctionKeyProvider {\n /**\n * Get bond_public function keys from the credits.aleo program\n *\n * @returns {Promise} Proving and verifying keys for the bond_public function\n */\n bondPublicKeys(): Promise;\n\n /**\n * Get bond_validator function keys from the credits.aleo program\n *\n * @returns {Promise} Proving and verifying keys for the bond_validator function\n */\n bondValidatorKeys(): Promise;\n\n /**\n * Cache a set of keys. This will overwrite any existing keys with the same keyId. The user can check if a keyId\n * exists in the cache using the containsKeys method prior to calling this method if overwriting is not desired.\n *\n * @param {string} keyId access key for the cache\n * @param {FunctionKeyPair} keys keys to cache\n */\n cacheKeys(keyId: string, keys: FunctionKeyPair): void;\n\n /**\n * Get unbond_public function keys from the credits.aleo program\n *\n * @returns {Promise} Proving and verifying keys for the unbond_public function\n */\n claimUnbondPublicKeys(): Promise;\n\n /**\n * Get arbitrary function keys from a provider\n *\n * @param {KeySearchParams | undefined} params - Optional search parameters for the key provider\n * @returns {Promise} Proving and verifying keys for the specified program\n *\n * @example\n * // Create a search object which implements the KeySearchParams interface\n * class IndexDbSearch implements KeySearchParams {\n * db: string\n * keyId: string\n * constructor(params: {db: string, keyId: string}) {\n * this.db = params.db;\n * this.keyId = params.keyId;\n * }\n * }\n *\n * // Create a new object which implements the KeyProvider interface\n * class IndexDbKeyProvider implements FunctionKeyProvider {\n * async functionKeys(params: KeySearchParams): Promise {\n * return new Promise((resolve, reject) => {\n * const request = indexedDB.open(params.db, 1);\n *\n * request.onupgradeneeded = function(e) {\n * const db = e.target.result;\n * if (!db.objectStoreNames.contains('keys')) {\n * db.createObjectStore('keys', { keyPath: 'id' });\n * }\n * };\n *\n * request.onsuccess = function(e) {\n * const db = e.target.result;\n * const transaction = db.transaction([\"keys\"], \"readonly\");\n * const store = transaction.objectStore(\"keys\");\n * const request = store.get(params.keyId);\n * request.onsuccess = function(e) {\n * if (request.result) {\n * resolve(request.result as FunctionKeyPair);\n * } else {\n * reject(new Error(\"Key not found\"));\n * }\n * };\n * request.onerror = function(e) { reject(new Error(\"Error fetching key\")); };\n * };\n *\n * request.onerror = function(e) { reject(new Error(\"Error opening database\")); };\n * });\n * }\n *\n * // implement the other methods...\n * }\n *\n *\n * const keyProvider = new AleoKeyProvider();\n * const networkClient = new AleoNetworkClient(\"https://api.explorer.aleo.org/v1\");\n * const recordProvider = new NetworkRecordProvider(account, networkClient);\n *\n * // Initialize a program manager with the key provider to automatically fetch keys for value transfers\n * const programManager = new ProgramManager(\"https://api.explorer.aleo.org/v1\", keyProvider, recordProvider);\n * programManager.transfer(1, \"aleo166q6ww6688cug7qxwe7nhctjpymydwzy2h7rscfmatqmfwnjvggqcad0at\", \"public\", 0.5);\n *\n * // Keys can also be fetched manually\n * const searchParams = new IndexDbSearch({db: \"keys\", keyId: \"credits.aleo:transferPrivate\"});\n * const [transferPrivateProvingKey, transferPrivateVerifyingKey] = await keyProvider.functionKeys(searchParams);\n */\n functionKeys(params?: KeySearchParams): Promise;\n\n /**\n * Get fee_private function keys from the credits.aleo program\n *\n * @returns {Promise} Proving and verifying keys for the join function\n */\n feePrivateKeys(): Promise;\n\n /**\n * Get fee_public function keys from the credits.aleo program\n *\n * @returns {Promise} Proving and verifying keys for the join function\n */\n feePublicKeys(): Promise;\n\n /**\n * Get join function keys from the credits.aleo program\n *\n * @returns {Promise} Proving and verifying keys for the join function\n */\n joinKeys(): Promise;\n\n /**\n * Get split function keys from the credits.aleo program\n *\n * @returns {Promise} Proving and verifying keys for the join function\n */\n splitKeys(): Promise;\n\n /**\n * Get keys for a variant of the transfer function from the credits.aleo program\n *\n * @param {string} visibility Visibility of the transfer function (private, public, privateToPublic, publicToPrivate)\n * @returns {Promise} Proving and verifying keys for the specified transfer function\n *\n * @example\n * // Create a new object which implements the KeyProvider interface\n * const networkClient = new AleoNetworkClient(\"https://api.explorer.aleo.org/v1\");\n * const keyProvider = new AleoKeyProvider();\n * const recordProvider = new NetworkRecordProvider(account, networkClient);\n *\n * // Initialize a program manager with the key provider to automatically fetch keys for value transfers\n * const programManager = new ProgramManager(\"https://api.explorer.aleo.org/v1\", keyProvider, recordProvider);\n * programManager.transfer(1, \"aleo166q6ww6688cug7qxwe7nhctjpymydwzy2h7rscfmatqmfwnjvggqcad0at\", \"public\", 0.5);\n *\n * // Keys can also be fetched manually\n * const [transferPublicProvingKey, transferPublicVerifyingKey] = await keyProvider.transferKeys(\"public\");\n */\n transferKeys(visibility: string): Promise;\n\n /**\n * Get unbond_public function keys from the credits.aleo program\n *\n * @returns {Promise} Proving and verifying keys for the join function\n */\n unBondPublicKeys(): Promise;\n\n}\n\n\n/**\n * AleoKeyProvider class. Implements the KeyProvider interface. Enables the retrieval of Aleo program proving and\n * verifying keys for the credits.aleo program over http from official Aleo sources and storing and retrieving function\n * keys from a local memory cache.\n */\nclass AleoKeyProvider implements FunctionKeyProvider {\n cache: Map;\n cacheOption: boolean;\n keyUris: string;\n\n async fetchBytes(\n url = \"/\",\n ): Promise {\n try {\n const response = await get(url);\n const data = await response.arrayBuffer();\n return new Uint8Array(data);\n } catch (error) {\n throw new Error(\"Error fetching data.\" + error);\n }\n }\n\n constructor() {\n this.keyUris = KEY_STORE;\n this.cache = new Map();\n this.cacheOption = false;\n }\n\n /**\n * Use local memory to store keys\n *\n * @param {boolean} useCache whether to store keys in local memory\n */\n useCache(useCache: boolean) {\n this.cacheOption = useCache;\n }\n\n /**\n * Clear the key cache\n */\n clearCache() {\n this.cache.clear();\n }\n\n /**\n * Cache a set of keys. This will overwrite any existing keys with the same keyId. The user can check if a keyId\n * exists in the cache using the containsKeys method prior to calling this method if overwriting is not desired.\n *\n * @param {string} keyId access key for the cache\n * @param {FunctionKeyPair} keys keys to cache\n */\n cacheKeys(keyId: string, keys: FunctionKeyPair) {\n const [provingKey, verifyingKey] = keys;\n this.cache.set(keyId, [provingKey.toBytes(), verifyingKey.toBytes()]);\n }\n\n /**\n * Determine if a keyId exists in the cache\n *\n * @param {string} keyId keyId of a proving and verifying key pair\n * @returns {boolean} true if the keyId exists in the cache, false otherwise\n */\n containsKeys(keyId: string): boolean {\n return this.cache.has(keyId)\n }\n\n /**\n * Delete a set of keys from the cache\n *\n * @param {string} keyId keyId of a proving and verifying key pair to delete from memory\n * @returns {boolean} true if the keyId exists in the cache and was deleted, false if the key did not exist\n */\n deleteKeys(keyId: string): boolean {\n return this.cache.delete(keyId)\n }\n\n /**\n * Get a set of keys from the cache\n * @param keyId keyId of a proving and verifying key pair\n *\n * @returns {FunctionKeyPair | Error} Proving and verifying keys for the specified program\n */\n getKeys(keyId: string): FunctionKeyPair | Error {\n console.debug(`Checking if key exists in cache. KeyId: ${keyId}`)\n if (this.cache.has(keyId)) {\n const [provingKeyBytes, verifyingKeyBytes] = this.cache.get(keyId);\n return [ProvingKey.fromBytes(provingKeyBytes), VerifyingKey.fromBytes(verifyingKeyBytes)];\n } else {\n return new Error(\"Key not found in cache.\");\n }\n }\n\n /**\n * Get arbitrary function keys from a provider\n *\n * @param {KeySearchParams} params parameters for the key search in form of: {proverUri: string, verifierUri: string, cacheKey: string}\n * @returns {Promise} Proving and verifying keys for the specified program\n *\n * @example\n * // Create a new object which implements the KeyProvider interface\n * const networkClient = new AleoNetworkClient(\"https://api.explorer.aleo.org/v1\");\n * const keyProvider = new AleoKeyProvider();\n * const recordProvider = new NetworkRecordProvider(account, networkClient);\n *\n * // Initialize a program manager with the key provider to automatically fetch keys for value transfers\n * const programManager = new ProgramManager(\"https://api.explorer.aleo.org/v1\", keyProvider, recordProvider);\n * programManager.transfer(1, \"aleo166q6ww6688cug7qxwe7nhctjpymydwzy2h7rscfmatqmfwnjvggqcad0at\", \"public\", 0.5);\n *\n * // Keys can also be fetched manually using the key provider\n * const keySearchParams = { \"cacheKey\": \"myProgram:myFunction\" };\n * const [transferPrivateProvingKey, transferPrivateVerifyingKey] = await keyProvider.functionKeys(keySearchParams);\n */\n async functionKeys(params?: KeySearchParams): Promise {\n if (params) {\n let proverUrl;\n let verifierUrl;\n let cacheKey;\n if (\"name\" in params && typeof params[\"name\"] == \"string\") {\n let key = CREDITS_PROGRAM_KEYS.getKey(params[\"name\"]);\n if (!(key instanceof Error)) {\n return this.fetchCreditsKeys(key);\n }\n }\n\n if (\"proverUri\" in params && typeof params[\"proverUri\"] == \"string\") {\n proverUrl = params[\"proverUri\"];\n }\n\n if (\"verifierUri\" in params && typeof params[\"verifierUri\"] == \"string\") {\n verifierUrl = params[\"verifierUri\"];\n }\n\n if (\"cacheKey\" in params && typeof params[\"cacheKey\"] == \"string\") {\n cacheKey = params[\"cacheKey\"];\n }\n\n if (proverUrl && verifierUrl) {\n return await this.fetchRemoteKeys(proverUrl, verifierUrl, cacheKey);\n }\n\n if (cacheKey) {\n return this.getKeys(cacheKey);\n }\n }\n throw Error(\"Invalid parameters provided, must provide either a cacheKey and/or a proverUrl and a verifierUrl\");\n }\n\n /**\n * Returns the proving and verifying keys for a specified program from a specified url.\n *\n * @param {string} verifierUrl Url of the proving key\n * @param {string} proverUrl Url the verifying key\n * @param {string} cacheKey Key to store the keys in the cache\n *\n * @returns {Promise} Proving and verifying keys for the specified program\n *\n * @example\n * // Create a new AleoKeyProvider object\n * const networkClient = new AleoNetworkClient(\"https://api.explorer.aleo.org/v1\");\n * const keyProvider = new AleoKeyProvider();\n * const recordProvider = new NetworkRecordProvider(account, networkClient);\n *\n * // Initialize a program manager with the key provider to automatically fetch keys for value transfers\n * const programManager = new ProgramManager(\"https://api.explorer.aleo.org/v1\", keyProvider, recordProvider);\n * programManager.transfer(1, \"aleo166q6ww6688cug7qxwe7nhctjpymydwzy2h7rscfmatqmfwnjvggqcad0at\", \"public\", 0.5);\n *\n * // Keys can also be fetched manually\n * const [transferPrivateProvingKey, transferPrivateVerifyingKey] = await keyProvider.fetchKeys(\n * CREDITS_PROGRAM_KEYS.transfer_private.prover,\n * CREDITS_PROGRAM_KEYS.transfer_private.verifier,\n * );\n */\n async fetchRemoteKeys(proverUrl: string, verifierUrl: string, cacheKey?: string): Promise {\n try {\n // If cache is enabled, check if the keys have already been fetched and return them if they have\n if (this.cacheOption) {\n if (!cacheKey) {\n cacheKey = proverUrl;\n }\n const value = this.cache.get(cacheKey);\n if (typeof value !== \"undefined\") {\n return [ProvingKey.fromBytes(value[0]), VerifyingKey.fromBytes(value[1])];\n } else {\n console.debug(\"Fetching proving keys from url \" + proverUrl);\n const provingKey = ProvingKey.fromBytes(await this.fetchBytes(proverUrl))\n console.debug(\"Fetching verifying keys \" + verifierUrl);\n const verifyingKey = (await this.getVerifyingKey(verifierUrl));\n this.cache.set(cacheKey, [provingKey.toBytes(), verifyingKey.toBytes()]);\n return [provingKey, verifyingKey];\n }\n }\n else {\n // If cache is disabled, fetch the keys and return them\n const provingKey = ProvingKey.fromBytes(await this.fetchBytes(proverUrl))\n const verifyingKey = (await this.getVerifyingKey(verifierUrl));\n return [provingKey, verifyingKey];\n }\n } catch (error) {\n throw new Error(`Error: ${error} fetching fee proving and verifying keys from ${proverUrl} and ${verifierUrl}.`);\n }\n }\n\n /***\n * Fetches the proving key from a remote source.\n *\n * @param proverUrl\n * @param cacheKey\n *\n * @returns {Promise} Proving key for the specified program\n */\n async fetchProvingKey(proverUrl: string, cacheKey?: string): Promise {\n try {\n // If cache is enabled, check if the keys have already been fetched and return them if they have\n if (this.cacheOption) {\n if (!cacheKey) {\n cacheKey = proverUrl;\n }\n const value = this.cache.get(cacheKey);\n if (typeof value !== \"undefined\") {\n return ProvingKey.fromBytes(value[0]);\n } else {\n console.debug(\"Fetching proving keys from url \" + proverUrl);\n const provingKey = ProvingKey.fromBytes(await this.fetchBytes(proverUrl));\n return provingKey;\n }\n }\n else {\n const provingKey = ProvingKey.fromBytes(await this.fetchBytes(proverUrl));\n return provingKey;\n }\n } catch (error) {\n throw new Error(`Error: ${error} fetching fee proving keys from ${proverUrl}`);\n }\n }\n\n async fetchCreditsKeys(key: Key): Promise {\n try {\n if (!this.cache.has(key.locator) || !this.cacheOption) {\n const verifying_key = key.verifyingKey()\n const proving_key = await this.fetchProvingKey(key.prover, key.locator);\n if (this.cacheOption) {\n this.cache.set(CREDITS_PROGRAM_KEYS.bond_public.locator, [proving_key.toBytes(), verifying_key.toBytes()]);\n }\n return [proving_key, verifying_key];\n } else {\n const keyPair = this.cache.get(key.locator);\n return [ProvingKey.fromBytes(keyPair[0]), VerifyingKey.fromBytes(keyPair[1])];\n }\n } catch (error) {\n throw new Error(`Error: fetching credits.aleo keys: ${error}`);\n }\n }\n\n async bondPublicKeys(): Promise {\n return this.fetchCreditsKeys(CREDITS_PROGRAM_KEYS.bond_public);\n }\n\n bondValidatorKeys(): Promise {\n return this.fetchCreditsKeys(CREDITS_PROGRAM_KEYS.bond_validator);\n }\n\n claimUnbondPublicKeys(): Promise {\n return this.fetchCreditsKeys(CREDITS_PROGRAM_KEYS.claim_unbond_public)\n }\n\n /**\n * Returns the proving and verifying keys for the transfer functions in the credits.aleo program\n * @param {string} visibility Visibility of the transfer function\n * @returns {Promise} Proving and verifying keys for the transfer functions\n *\n * @example\n * // Create a new AleoKeyProvider\n * const networkClient = new AleoNetworkClient(\"https://api.explorer.aleo.org/v1\");\n * const keyProvider = new AleoKeyProvider();\n * const recordProvider = new NetworkRecordProvider(account, networkClient);\n *\n * // Initialize a program manager with the key provider to automatically fetch keys for value transfers\n * const programManager = new ProgramManager(\"https://api.explorer.aleo.org/v1\", keyProvider, recordProvider);\n * programManager.transfer(1, \"aleo166q6ww6688cug7qxwe7nhctjpymydwzy2h7rscfmatqmfwnjvggqcad0at\", \"public\", 0.5);\n *\n * // Keys can also be fetched manually\n * const [transferPublicProvingKey, transferPublicVerifyingKey] = await keyProvider.transferKeys(\"public\");\n */\n async transferKeys(visibility: string): Promise {\n if (PRIVATE_TRANSFER.has(visibility)) {\n return await this.fetchCreditsKeys(CREDITS_PROGRAM_KEYS.transfer_private);\n } else if (PRIVATE_TO_PUBLIC_TRANSFER.has(visibility)) {\n return await this.fetchCreditsKeys(CREDITS_PROGRAM_KEYS.transfer_private_to_public);\n } else if (PUBLIC_TRANSFER.has(visibility)) {\n return await this.fetchCreditsKeys(CREDITS_PROGRAM_KEYS.transfer_public);\n } else if (PUBLIC_TRANSFER_AS_SIGNER.has(visibility)) {\n return await this.fetchCreditsKeys(CREDITS_PROGRAM_KEYS.transfer_public_as_signer);\n } else if (PUBLIC_TO_PRIVATE_TRANSFER.has(visibility)) {\n return await this.fetchCreditsKeys(CREDITS_PROGRAM_KEYS.transfer_public_to_private);\n } else {\n throw new Error(\"Invalid visibility type\");\n }\n }\n\n /**\n * Returns the proving and verifying keys for the join function in the credits.aleo program\n *\n * @returns {Promise} Proving and verifying keys for the join function\n */\n async joinKeys(): Promise {\n return await this.fetchCreditsKeys(CREDITS_PROGRAM_KEYS.join);\n }\n\n /**\n * Returns the proving and verifying keys for the split function in the credits.aleo program\n *\n * @returns {Promise} Proving and verifying keys for the split function\n * */\n async splitKeys(): Promise {\n return await this.fetchCreditsKeys(CREDITS_PROGRAM_KEYS.split);\n }\n\n /**\n * Returns the proving and verifying keys for the fee_private function in the credits.aleo program\n *\n * @returns {Promise} Proving and verifying keys for the fee function\n */\n async feePrivateKeys(): Promise {\n return await this.fetchCreditsKeys(CREDITS_PROGRAM_KEYS.fee_private);\n }\n\n /**\n * Returns the proving and verifying keys for the fee_public function in the credits.aleo program\n *\n * @returns {Promise} Proving and verifying keys for the fee function\n */\n async feePublicKeys(): Promise {\n return await this.fetchCreditsKeys(CREDITS_PROGRAM_KEYS.fee_public);\n }\n\n /**\n * Gets a verifying key. If the verifying key is for a credits.aleo function, get it from the wasm cache otherwise\n *\n * @returns {Promise} Verifying key for the function\n */\n // attempt to fetch it from the network\n async getVerifyingKey(verifierUri: string): Promise {\n switch (verifierUri) {\n case CREDITS_PROGRAM_KEYS.bond_public.verifier:\n return CREDITS_PROGRAM_KEYS.bond_public.verifyingKey();\n case CREDITS_PROGRAM_KEYS.bond_validator.verifier:\n return CREDITS_PROGRAM_KEYS.bond_validator.verifyingKey();\n case CREDITS_PROGRAM_KEYS.claim_unbond_public.verifier:\n return CREDITS_PROGRAM_KEYS.claim_unbond_public.verifyingKey();\n case CREDITS_PROGRAM_KEYS.fee_private.verifier:\n return CREDITS_PROGRAM_KEYS.fee_private.verifyingKey();\n case CREDITS_PROGRAM_KEYS.fee_public.verifier:\n return CREDITS_PROGRAM_KEYS.fee_public.verifyingKey();\n case CREDITS_PROGRAM_KEYS.inclusion.verifier:\n return CREDITS_PROGRAM_KEYS.inclusion.verifyingKey();\n case CREDITS_PROGRAM_KEYS.join.verifier:\n return CREDITS_PROGRAM_KEYS.join.verifyingKey();\n case CREDITS_PROGRAM_KEYS.set_validator_state.verifier:\n return CREDITS_PROGRAM_KEYS.set_validator_state.verifyingKey();\n case CREDITS_PROGRAM_KEYS.split.verifier:\n return CREDITS_PROGRAM_KEYS.split.verifyingKey();\n case CREDITS_PROGRAM_KEYS.transfer_private.verifier:\n return CREDITS_PROGRAM_KEYS.transfer_private.verifyingKey();\n case CREDITS_PROGRAM_KEYS.transfer_private_to_public.verifier:\n return CREDITS_PROGRAM_KEYS.transfer_private_to_public.verifyingKey();\n case CREDITS_PROGRAM_KEYS.transfer_public.verifier:\n return CREDITS_PROGRAM_KEYS.transfer_public.verifyingKey();\n case CREDITS_PROGRAM_KEYS.transfer_public_as_signer.verifier:\n return CREDITS_PROGRAM_KEYS.transfer_public_as_signer.verifyingKey();\n case CREDITS_PROGRAM_KEYS.transfer_public_to_private.verifier:\n return CREDITS_PROGRAM_KEYS.transfer_public_to_private.verifyingKey();\n case CREDITS_PROGRAM_KEYS.unbond_public.verifier:\n return CREDITS_PROGRAM_KEYS.unbond_public.verifyingKey();\n default:\n try {\n /// Try to fetch the verifying key from the network as a string\n const response = await get(verifierUri);\n const text = await response.text();\n return VerifyingKey.fromString(text);\n } catch (e) {\n /// If that fails, try to fetch the verifying key from the network as bytes\n try {\n return VerifyingKey.fromBytes(await this.fetchBytes(verifierUri));\n } catch (inner) {\n return new Error(\"Invalid verifying key. Error: \" + inner);\n }\n }\n }\n }\n\n unBondPublicKeys(): Promise {\n return this.fetchCreditsKeys(CREDITS_PROGRAM_KEYS.unbond_public);\n }\n}\n\nexport {AleoKeyProvider, AleoKeyProviderParams, AleoKeyProviderInitParams, CachedKeyPair, FunctionKeyPair, FunctionKeyProvider, KeySearchParams}\n","import {\n Account,\n AleoKeyProvider,\n AleoNetworkClient,\n ExecutionResponse,\n FunctionKeyProvider,\n FunctionKeyPair,\n OfflineQuery,\n KeySearchParams,\n RecordPlaintext,\n RecordProvider,\n RecordSearchParams,\n PrivateKey,\n Program,\n ProgramImports,\n ProvingKey,\n VerifyingKey,\n Transaction,\n PRIVATE_TRANSFER_TYPES,\n VALID_TRANSFER_TYPES,\n logAndThrow,\n ProgramManagerBase as WasmProgramManager, verifyFunctionExecution, AleoKeyProviderParams, CREDITS_PROGRAM_KEYS,\n} from \"./index\";\nimport {Execution} from \"@provablehq/wasm/dist/crates/aleo_wasm\";\n\n/**\n * Represents the options for executing a transaction in the Aleo network.\n * This interface is used to specify the parameters required for building and submitting an execution transaction.\n *\n * @property {string} programName - The name of the program containing the function to be executed.\n * @property {string} functionName - The name of the function to execute within the program.\n * @property {number} fee - The fee to be paid for the transaction.\n * @property {boolean} privateFee - If true, uses a private record to pay the fee; otherwise, uses the account's public credit balance.\n * @property {string[]} inputs - The inputs to the function being executed.\n * @property {RecordSearchParams} [recordSearchParams] - Optional parameters for searching for a record to pay the execution transaction fee.\n * @property {KeySearchParams} [keySearchParams] - Optional parameters for finding the matching proving & verifying keys for the function.\n * @property {string | RecordPlaintext} [feeRecord] - Optional fee record to use for the transaction.\n * @property {ProvingKey} [provingKey] - Optional proving key to use for the transaction.\n * @property {VerifyingKey} [verifyingKey] - Optional verifying key to use for the transaction.\n * @property {PrivateKey} [privateKey] - Optional private key to use for the transaction.\n * @property {OfflineQuery} [offlineQuery] - Optional offline query if creating transactions in an offline environment.\n * @property {string | Program} [program] - Optional program source code to use for the transaction.\n * @property {ProgramImports} [imports] - Optional programs that the program being executed imports.\n */\ninterface ExecuteOptions {\n programName: string;\n functionName: string;\n fee: number;\n privateFee: boolean;\n inputs: string[];\n recordSearchParams?: RecordSearchParams;\n keySearchParams?: KeySearchParams;\n feeRecord?: string | RecordPlaintext;\n provingKey?: ProvingKey;\n verifyingKey?: VerifyingKey;\n privateKey?: PrivateKey;\n offlineQuery?: OfflineQuery;\n program?: string | Program;\n imports?: ProgramImports;\n}\n\n/**\n * The ProgramManager class is used to execute and deploy programs on the Aleo network and create value transfers.\n */\nclass ProgramManager {\n account: Account | undefined;\n keyProvider: FunctionKeyProvider;\n host: string;\n networkClient: AleoNetworkClient;\n recordProvider: RecordProvider | undefined;\n\n /** Create a new instance of the ProgramManager\n *\n * @param { string | undefined } host A host uri running the official Aleo API\n * @param { FunctionKeyProvider | undefined } keyProvider A key provider that implements {@link FunctionKeyProvider} interface\n * @param { RecordProvider | undefined } recordProvider A record provider that implements {@link RecordProvider} interface\n */\n constructor(host?: string | undefined, keyProvider?: FunctionKeyProvider | undefined, recordProvider?: RecordProvider | undefined) {\n this.host = host ? host : 'https://api.explorer.aleo.org/v1';\n this.networkClient = new AleoNetworkClient(this.host);\n \n this.keyProvider = keyProvider ? keyProvider : new AleoKeyProvider();\n this.recordProvider = recordProvider;\n }\n\n /**\n * Set the account to use for transaction submission to the Aleo network\n *\n * @param {Account} account Account to use for transaction submission\n */\n setAccount(account: Account) {\n this.account = account;\n }\n\n /**\n * Set the key provider that provides the proving and verifying keys for programs\n *\n * @param {FunctionKeyProvider} keyProvider\n */\n setKeyProvider(keyProvider: FunctionKeyProvider) {\n this.keyProvider = keyProvider;\n }\n\n /**\n * Set the host peer to use for transaction submission to the Aleo network\n *\n * @param host {string} Peer url to use for transaction submission\n */\n setHost(host: string) {\n this.host = host;\n this.networkClient.setHost(host);\n }\n\n /**\n * Set the record provider that provides records for transactions\n *\n * @param {RecordProvider} recordProvider\n */\n setRecordProvider(recordProvider: RecordProvider) {\n this.recordProvider = recordProvider;\n }\n\n /**\n * Deploy an Aleo program to the Aleo network\n *\n * @param {string} program Program source code\n * @param {number} fee Fee to pay for the transaction\n * @param {boolean} privateFee Use a private record to pay the fee. If false this will use the account's public credit balance\n * @param {RecordSearchParams | undefined} recordSearchParams Optional parameters for searching for a record to use\n * pay the deployment fee\n * @param {string | RecordPlaintext | undefined} feeRecord Optional Fee record to use for the transaction\n * @param {PrivateKey | undefined} privateKey Optional private key to use for the transaction\n * @returns {string | Error} The transaction id of the deployed program or a failure message from the network\n *\n * @example\n * // Create a new NetworkClient, KeyProvider, and RecordProvider\n * const networkClient = new AleoNetworkClient(\"https://api.explorer.aleo.org/v1\");\n * const keyProvider = new AleoKeyProvider();\n * const recordProvider = new NetworkRecordProvider(account, networkClient);\n *\n * // Initialize a program manager with the key provider to automatically fetch keys for deployments\n * const program = \"program hello_hello.aleo;\\n\\nfunction hello:\\n input r0 as u32.public;\\n input r1 as u32.private;\\n add r0 r1 into r2;\\n output r2 as u32.private;\\n\";\n * const programManager = new ProgramManager(\"https://api.explorer.aleo.org/v1\", keyProvider, recordProvider);\n *\n * // Define a fee in credits\n * const fee = 1.2;\n *\n * // Deploy the program\n * const tx_id = await programManager.deploy(program, fee);\n *\n * // Verify the transaction was successful\n * const transaction = await programManager.networkClient.getTransaction(tx_id);\n */\n async deploy(\n program: string,\n fee: number,\n privateFee: boolean,\n recordSearchParams?: RecordSearchParams,\n feeRecord?: string | RecordPlaintext,\n privateKey?: PrivateKey,\n ): Promise {\n // Ensure the program is valid and does not exist on the network\n try {\n const programObject = Program.fromString(program);\n let programSource;\n try {\n programSource = await this.networkClient.getProgram(programObject.id());\n } catch (e) {\n // Program does not exist on the network, deployment can proceed\n console.log(`Program ${programObject.id()} does not exist on the network, deploying...`);\n }\n if (typeof programSource == \"string\") {\n throw (`Program ${programObject.id()} already exists on the network, please rename your program`);\n }\n } catch (e) {\n throw logAndThrow(`Error validating program: ${e}`);\n }\n\n // Get the private key from the account if it is not provided in the parameters\n let deploymentPrivateKey = privateKey;\n if (typeof privateKey === \"undefined\" && typeof this.account !== \"undefined\") {\n deploymentPrivateKey = this.account.privateKey();\n }\n\n if (typeof deploymentPrivateKey === \"undefined\") {\n throw(\"No private key provided and no private key set in the ProgramManager\");\n }\n\n // Get the fee record from the account if it is not provided in the parameters\n try {\n feeRecord = privateFee ? await this.getCreditsRecord(fee, [], feeRecord, recordSearchParams) : undefined;\n } catch (e) {\n throw logAndThrow(`Error finding fee record. Record finder response: '${e}'. Please ensure you're connected to a valid Aleo network and a record with enough balance exists.`);\n }\n\n // Get the proving and verifying keys from the key provider\n let feeKeys;\n try {\n feeKeys = privateFee ? await this.keyProvider.feePrivateKeys() : await this.keyProvider.feePublicKeys();\n } catch (e) {\n throw logAndThrow(`Error finding fee keys. Key finder response: '${e}'. Please ensure your key provider is configured correctly.`);\n }\n const [feeProvingKey, feeVerifyingKey] = feeKeys;\n\n // Resolve the program imports if they exist\n let imports;\n try {\n imports = await this.networkClient.getProgramImports(program);\n } catch (e) {\n throw logAndThrow(`Error finding program imports. Network response: '${e}'. Please ensure you're connected to a valid Aleo network and the program is deployed to the network.`);\n }\n\n // Build a deployment transaction and submit it to the network\n const tx = await WasmProgramManager.buildDeploymentTransaction(deploymentPrivateKey, program, fee, feeRecord, this.host, imports, feeProvingKey, feeVerifyingKey);\n return await this.networkClient.submitTransaction(tx);\n }\n\n /**\n * Builds an execution transaction for submission to the Aleo network.\n *\n * @param {ExecuteOptions} options - The options for the execution transaction.\n * @returns {Promise} - A promise that resolves to the transaction or an error.\n *\n * @example\n * // Create a new NetworkClient, KeyProvider, and RecordProvider using official Aleo record, key, and network providers\n * const networkClient = new AleoNetworkClient(\"https://api.explorer.aleo.org/v1\");\n * const keyProvider = new AleoKeyProvider();\n * keyProvider.useCache = true;\n * const recordProvider = new NetworkRecordProvider(account, networkClient);\n *\n * // Initialize a program manager with the key provider to automatically fetch keys for executions\n * const programManager = new ProgramManager(\"https://api.explorer.aleo.org/v1\", keyProvider, recordProvider);\n *\n * // Build and execute the transaction\n * const transaction = await programManager.buildExecutionTransaction({\n * programName: \"hello_hello.aleo\",\n * functionName: \"hello_hello\",\n * fee: 0.020,\n * privateFee: false,\n * inputs: [\"5u32\", \"5u32\"],\n * keySearchParams: { \"cacheKey\": \"hello_hello:hello\" }\n * });\n * const result = await programManager.networkClient.submitTransaction(transaction);\n */\n async buildExecutionTransaction(options: ExecuteOptions): Promise {\n // Destructure the options object to access the parameters\n const {\n programName,\n functionName,\n fee,\n privateFee,\n inputs,\n recordSearchParams,\n keySearchParams,\n privateKey,\n offlineQuery\n } = options;\n\n let feeRecord = options.feeRecord;\n let provingKey = options.provingKey;\n let verifyingKey = options.verifyingKey;\n let program = options.program;\n let imports = options.imports;\n\n // Ensure the function exists on the network\n if (program === undefined) {\n try {\n program = (await this.networkClient.getProgram(programName));\n } catch (e) {\n throw logAndThrow(`Error finding ${programName}. Network response: '${e}'. Please ensure you're connected to a valid Aleo network the program is deployed to the network.`);\n }\n } else if (program instanceof Program) {\n program = program.toString();\n }\n\n // Get the private key from the account if it is not provided in the parameters\n let executionPrivateKey = privateKey;\n if (typeof privateKey === \"undefined\" && typeof this.account !== \"undefined\") {\n executionPrivateKey = this.account.privateKey();\n }\n\n if (typeof executionPrivateKey === \"undefined\") {\n throw(\"No private key provided and no private key set in the ProgramManager\");\n }\n\n // Get the fee record from the account if it is not provided in the parameters\n try {\n feeRecord = privateFee ? await this.getCreditsRecord(fee, [], feeRecord, recordSearchParams) : undefined;\n } catch (e) {\n throw logAndThrow(`Error finding fee record. Record finder response: '${e}'. Please ensure you're connected to a valid Aleo network and a record with enough balance exists.`);\n }\n\n // Get the fee proving and verifying keys from the key provider\n let feeKeys;\n try {\n feeKeys = privateFee ? await this.keyProvider.feePrivateKeys() : await this.keyProvider.feePublicKeys();\n } catch (e) {\n throw logAndThrow(`Error finding fee keys. Key finder response: '${e}'. Please ensure your key provider is configured correctly.`);\n }\n const [feeProvingKey, feeVerifyingKey] = feeKeys;\n\n // If the function proving and verifying keys are not provided, attempt to find them using the key provider\n if (!provingKey || !verifyingKey) {\n try {\n [provingKey, verifyingKey] = await this.keyProvider.functionKeys(keySearchParams);\n } catch (e) {\n console.log(`Function keys not found. Key finder response: '${e}'. The function keys will be synthesized`)\n }\n }\n\n // Resolve the program imports if they exist\n const numberOfImports = Program.fromString(program).getImports().length;\n if (numberOfImports > 0 && !imports) {\n try {\n imports = await this.networkClient.getProgramImports(programName);\n } catch (e) {\n throw logAndThrow(`Error finding program imports. Network response: '${e}'. Please ensure you're connected to a valid Aleo network and the program is deployed to the network.`);\n }\n }\n\n // Build an execution transaction and submit it to the network\n return await WasmProgramManager.buildExecutionTransaction(executionPrivateKey, program, functionName, inputs, fee, feeRecord, this.host, imports, provingKey, verifyingKey, feeProvingKey, feeVerifyingKey, offlineQuery);\n }\n\n /**\n * Builds an execution transaction for submission to the Aleo network.\n *\n * @param {ExecuteOptions} options - The options for the execution transaction.\n * @returns {Promise} - A promise that resolves to the transaction or an error.\n *\n * @example\n * // Create a new NetworkClient, KeyProvider, and RecordProvider using official Aleo record, key, and network providers\n * const networkClient = new AleoNetworkClient(\"https://api.explorer.aleo.org/v1\");\n * const keyProvider = new AleoKeyProvider();\n * keyProvider.useCache = true;\n * const recordProvider = new NetworkRecordProvider(account, networkClient);\n *\n * // Initialize a program manager with the key provider to automatically fetch keys for executions\n * const programManager = new ProgramManager(\"https://api.explorer.aleo.org/v1\", keyProvider, recordProvider);\n *\n * // Build and execute the transaction\n * const transaction = await programManager.execute({\n * programName: \"hello_hello.aleo\",\n * functionName: \"hello_hello\",\n * fee: 0.020,\n * privateFee: false,\n * inputs: [\"5u32\", \"5u32\"],\n * keySearchParams: { \"cacheKey\": \"hello_hello:hello\" }\n * });\n * const result = await programManager.networkClient.submitTransaction(transaction);\n */\n async execute(options: ExecuteOptions): Promise {\n const tx = await this.buildExecutionTransaction(options);\n return await this.networkClient.submitTransaction(tx);\n }\n\n /**\n * Run an Aleo program in offline mode\n *\n * @param {string} program Program source code containing the function to be executed\n * @param {string} function_name Function name to execute\n * @param {string[]} inputs Inputs to the function\n * @param {number} proveExecution Whether to prove the execution of the function and return an execution transcript\n * that contains the proof.\n * @param {string[] | undefined} imports Optional imports to the program\n * @param {KeySearchParams | undefined} keySearchParams Optional parameters for finding the matching proving &\n * verifying keys for the function\n * @param {ProvingKey | undefined} provingKey Optional proving key to use for the transaction\n * @param {VerifyingKey | undefined} verifyingKey Optional verifying key to use for the transaction\n * @param {PrivateKey | undefined} privateKey Optional private key to use for the transaction\n * @param {OfflineQuery | undefined} offlineQuery Optional offline query if creating transactions in an offline environment\n * @returns {Promise}\n *\n * @example\n * import { Account, Program } from '@provablehq/sdk';\n *\n * /// Create the source for the \"helloworld\" program\n * const program = \"program helloworld.aleo;\\n\\nfunction hello:\\n input r0 as u32.public;\\n input r1 as u32.private;\\n add r0 r1 into r2;\\n output r2 as u32.private;\\n\";\n * const programManager = new ProgramManager();\n *\n * /// Create a temporary account for the execution of the program\n * const account = new Account();\n * programManager.setAccount(account);\n *\n * /// Get the response and ensure that the program executed correctly\n * const executionResponse = await programManager.run(program, \"hello\", [\"5u32\", \"5u32\"]);\n * const result = executionResponse.getOutputs();\n * assert(result === [\"10u32\"]);\n */\n async run(\n program: string,\n function_name: string,\n inputs: string[],\n proveExecution: boolean,\n imports?: ProgramImports,\n keySearchParams?: KeySearchParams,\n provingKey?: ProvingKey,\n verifyingKey?: VerifyingKey,\n privateKey?: PrivateKey,\n offlineQuery?: OfflineQuery,\n ): Promise {\n // Get the private key from the account if it is not provided in the parameters\n let executionPrivateKey = privateKey;\n if (typeof privateKey === \"undefined\" && typeof this.account !== \"undefined\") {\n executionPrivateKey = this.account.privateKey();\n }\n\n if (typeof executionPrivateKey === \"undefined\") {\n throw(\"No private key provided and no private key set in the ProgramManager\");\n }\n\n // If the function proving and verifying keys are not provided, attempt to find them using the key provider\n if (!provingKey || !verifyingKey) {\n try {\n [provingKey, verifyingKey] = await this.keyProvider.functionKeys(keySearchParams);\n } catch (e) {\n console.log(`Function keys not found. Key finder response: '${e}'. The function keys will be synthesized`)\n }\n }\n\n // Run the program offline and return the result\n console.log(\"Running program offline\")\n console.log(\"Proving key: \", provingKey);\n console.log(\"Verifying key: \", verifyingKey);\n return WasmProgramManager.executeFunctionOffline(executionPrivateKey, program, function_name, inputs, proveExecution, false, imports, provingKey, verifyingKey, this.host, offlineQuery);\n }\n\n /**\n * Join two credits records into a single credits record\n *\n * @param {RecordPlaintext | string} recordOne First credits record to join\n * @param {RecordPlaintext | string} recordTwo Second credits record to join\n * @param {number} fee Fee in credits pay for the join transaction\n * @param {boolean} privateFee Use a private record to pay the fee. If false this will use the account's public credit balance\n * @param {RecordSearchParams | undefined} recordSearchParams Optional parameters for finding the fee record to use\n * to pay the fee for the join transaction\n * @param {RecordPlaintext | string | undefined} feeRecord Fee record to use for the join transaction\n * @param {PrivateKey | undefined} privateKey Private key to use for the join transaction\n * @param {OfflineQuery | undefined} offlineQuery Optional offline query if creating transactions in an offline environment\n * @returns {Promise}\n */\n async join(\n recordOne: RecordPlaintext | string,\n recordTwo: RecordPlaintext | string,\n fee: number,\n privateFee: boolean,\n recordSearchParams?: RecordSearchParams | undefined,\n feeRecord?: RecordPlaintext | string | undefined,\n privateKey?: PrivateKey,\n offlineQuery?: OfflineQuery,\n ): Promise {\n // Get the private key from the account if it is not provided in the parameters\n let executionPrivateKey = privateKey;\n if (typeof privateKey === \"undefined\" && typeof this.account !== \"undefined\") {\n executionPrivateKey = this.account.privateKey();\n }\n\n if (typeof executionPrivateKey === \"undefined\") {\n throw(\"No private key provided and no private key set in the ProgramManager\");\n }\n\n // Get the proving and verifying keys from the key provider\n let feeKeys;\n let joinKeys\n try {\n feeKeys = privateFee ? await this.keyProvider.feePrivateKeys() : await this.keyProvider.feePublicKeys();\n joinKeys = await this.keyProvider.joinKeys();\n } catch (e) {\n throw logAndThrow(`Error finding fee keys. Key finder response: '${e}'. Please ensure your key provider is configured correctly.`);\n }\n const [feeProvingKey, feeVerifyingKey] = feeKeys;\n const [joinProvingKey, joinVerifyingKey] = joinKeys;\n\n // Get the fee record from the account if it is not provided in the parameters\n try {\n feeRecord = privateFee ? await this.getCreditsRecord(fee, [], feeRecord, recordSearchParams) : undefined;\n } catch (e) {\n throw logAndThrow(`Error finding fee record. Record finder response: '${e}'. Please ensure you're connected to a valid Aleo network and a record with enough balance exists.`);\n }\n\n // Validate the records provided are valid plaintext records\n try {\n recordOne = recordOne instanceof RecordPlaintext ? recordOne : RecordPlaintext.fromString(recordOne);\n recordTwo = recordTwo instanceof RecordPlaintext ? recordTwo : RecordPlaintext.fromString(recordTwo);\n } catch (e) {\n throw logAndThrow('Records provided are not valid. Please ensure they are valid plaintext records.')\n }\n\n // Build an execution transaction and submit it to the network\n const tx = await WasmProgramManager.buildJoinTransaction(executionPrivateKey, recordOne, recordTwo, fee, feeRecord, this.host, joinProvingKey, joinVerifyingKey, feeProvingKey, feeVerifyingKey, offlineQuery);\n return await this.networkClient.submitTransaction(tx);\n }\n\n /**\n * Split credits into two new credits records\n *\n * @param {number} splitAmount Amount in microcredits to split from the original credits record\n * @param {RecordPlaintext | string} amountRecord Amount record to use for the split transaction\n * @param {PrivateKey | undefined} privateKey Optional private key to use for the split transaction\n * @param {OfflineQuery | undefined} offlineQuery Optional offline query if creating transactions in an offline environment\n * @returns {Promise}\n *\n * @example\n * // Create a new NetworkClient, KeyProvider, and RecordProvider\n * const networkClient = new AleoNetworkClient(\"https://api.explorer.aleo.org/v1\");\n * const keyProvider = new AleoKeyProvider();\n * const recordProvider = new NetworkRecordProvider(account, networkClient);\n *\n * // Initialize a program manager with the key provider to automatically fetch keys for executions\n * const programName = \"hello_hello.aleo\";\n * const programManager = new ProgramManager(\"https://api.explorer.aleo.org/v1\", keyProvider, recordProvider);\n * const record = \"{ owner: aleo184vuwr5u7u0ha5f5k44067dd2uaqewxx6pe5ltha5pv99wvhfqxqv339h4.private, microcredits: 45000000u64.private, _nonce: 4106205762862305308495708971985748592380064201230396559307556388725936304984group.public}\"\n * const tx_id = await programManager.split(25000000, record);\n * const transaction = await programManager.networkClient.getTransaction(tx_id);\n */\n async split(splitAmount: number, amountRecord: RecordPlaintext | string, privateKey?: PrivateKey, offlineQuery?: OfflineQuery): Promise {\n // Get the private key from the account if it is not provided in the parameters\n let executionPrivateKey = privateKey;\n if (typeof executionPrivateKey === \"undefined\" && typeof this.account !== \"undefined\") {\n executionPrivateKey = this.account.privateKey();\n }\n\n if (typeof executionPrivateKey === \"undefined\") {\n throw(\"No private key provided and no private key set in the ProgramManager\");\n }\n\n // Get the split keys from the key provider\n let splitKeys;\n try {\n splitKeys = await this.keyProvider.splitKeys();\n } catch (e) {\n throw logAndThrow(`Error finding fee keys. Key finder response: '${e}'. Please ensure your key provider is configured correctly.`);\n }\n const [splitProvingKey, splitVerifyingKey] = splitKeys;\n\n // Validate the record to be split\n try {\n amountRecord = amountRecord instanceof RecordPlaintext ? amountRecord : RecordPlaintext.fromString(amountRecord);\n } catch (e) {\n throw logAndThrow(\"Record provided is not valid. Please ensure it is a valid plaintext record.\");\n }\n\n // Build an execution transaction and submit it to the network\n const tx = await WasmProgramManager.buildSplitTransaction(executionPrivateKey, splitAmount, amountRecord, this.host, splitProvingKey, splitVerifyingKey, offlineQuery);\n return await this.networkClient.submitTransaction(tx);\n }\n\n /**\n * Pre-synthesize proving and verifying keys for a program\n *\n * @param program {string} The program source code to synthesize keys for\n * @param function_id {string} The function id to synthesize keys for\n * @param inputs {Array} Sample inputs to the function\n * @param privateKey {PrivateKey | undefined} Optional private key to use for the key synthesis\n *\n * @returns {Promise}\n */\n async synthesizeKeys(\n program: string,\n function_id: string,\n inputs: Array,\n privateKey?: PrivateKey,\n ): Promise {\n // Resolve the program imports if they exist\n let imports;\n\n let executionPrivateKey = privateKey;\n if (typeof executionPrivateKey === \"undefined\") {\n if (typeof this.account !== \"undefined\") {\n executionPrivateKey = this.account.privateKey();\n } else {\n executionPrivateKey = new PrivateKey();\n }\n }\n\n // Attempt to run an offline execution of the program and extract the proving and verifying keys\n try {\n imports = await this.networkClient.getProgramImports(program);\n const keyPair = await WasmProgramManager.synthesizeKeyPair(\n executionPrivateKey,\n program,\n function_id,\n inputs,\n imports\n );\n return [keyPair.provingKey(), keyPair.verifyingKey()];\n } catch (e) {\n throw logAndThrow(`Could not synthesize keys - error ${e}. Please ensure the program is valid and the inputs are correct.`);\n }\n }\n\n /**\n * Build a transaction to transfer credits to another account for later submission to the Aleo network\n *\n * @param {number} amount The amount of credits to transfer\n * @param {string} recipient The recipient of the transfer\n * @param {string} transferType The type of transfer to perform - options: 'private', 'privateToPublic', 'public', 'publicToPrivate'\n * @param {number} fee The fee to pay for the transfer\n * @param {boolean} privateFee Use a private record to pay the fee. If false this will use the account's public credit balance\n * @param {RecordSearchParams | undefined} recordSearchParams Optional parameters for finding the amount and fee\n * records for the transfer transaction\n * @param {RecordPlaintext | string} amountRecord Optional amount record to use for the transfer\n * @param {RecordPlaintext | string} feeRecord Optional fee record to use for the transfer\n * @param {PrivateKey | undefined} privateKey Optional private key to use for the transfer transaction\n * @param {OfflineQuery | undefined} offlineQuery Optional offline query if creating transactions in an offline environment\n * @returns {Promise} The transaction id of the transfer transaction\n *\n * @example\n * // Create a new NetworkClient, KeyProvider, and RecordProvider\n * const networkClient = new AleoNetworkClient(\"https://api.explorer.aleo.org/v1\");\n * const keyProvider = new AleoKeyProvider();\n * const recordProvider = new NetworkRecordProvider(account, networkClient);\n *\n * // Initialize a program manager with the key provider to automatically fetch keys for executions\n * const programName = \"hello_hello.aleo\";\n * const programManager = new ProgramManager(\"https://api.explorer.aleo.org/v1\", keyProvider, recordProvider);\n * await programManager.initialize();\n * const tx_id = await programManager.transfer(1, \"aleo1rhgdu77hgyqd3xjj8ucu3jj9r2krwz6mnzyd80gncr5fxcwlh5rsvzp9px\", \"private\", 0.2)\n * const transaction = await programManager.networkClient.getTransaction(tx_id);\n */\n async buildTransferTransaction(\n amount: number,\n recipient: string,\n transferType: string,\n fee: number,\n privateFee: boolean,\n recordSearchParams?: RecordSearchParams,\n amountRecord?: RecordPlaintext | string,\n feeRecord?: RecordPlaintext | string,\n privateKey?: PrivateKey,\n offlineQuery?: OfflineQuery\n ): Promise {\n // Validate the transfer type\n transferType = validateTransferType(transferType);\n\n // Get the private key from the account if it is not provided in the parameters\n let executionPrivateKey = privateKey;\n if (typeof executionPrivateKey === \"undefined\" && typeof this.account !== \"undefined\") {\n executionPrivateKey = this.account.privateKey();\n }\n\n if (typeof executionPrivateKey === \"undefined\") {\n throw(\"No private key provided and no private key set in the ProgramManager\");\n }\n\n // Get the proving and verifying keys from the key provider\n let feeKeys;\n let transferKeys\n try {\n feeKeys = privateFee ? await this.keyProvider.feePrivateKeys() : await this.keyProvider.feePublicKeys();\n transferKeys = await this.keyProvider.transferKeys(transferType);\n } catch (e) {\n throw logAndThrow(`Error finding fee keys. Key finder response: '${e}'. Please ensure your key provider is configured correctly.`);\n }\n const [feeProvingKey, feeVerifyingKey] = feeKeys;\n const [transferProvingKey, transferVerifyingKey] = transferKeys;\n\n // Get the amount and fee record from the account if it is not provided in the parameters\n try {\n // Track the nonces of the records found so no duplicate records are used\n const nonces: string[] = [];\n if (requiresAmountRecord(transferType)) {\n // If the transfer type is private and requires an amount record, get it from the record provider\n amountRecord = await this.getCreditsRecord(fee, [], amountRecord, recordSearchParams);\n nonces.push(amountRecord.nonce());\n } else {\n amountRecord = undefined;\n }\n feeRecord = privateFee ? await this.getCreditsRecord(fee, nonces, feeRecord, recordSearchParams) : undefined;\n } catch (e) {\n throw logAndThrow(`Error finding fee record. Record finder response: '${e}'. Please ensure you're connected to a valid Aleo network and a record with enough balance exists.`);\n }\n\n // Build an execution transaction and submit it to the network\n return await WasmProgramManager.buildTransferTransaction(executionPrivateKey, amount, recipient, transferType, amountRecord, fee, feeRecord, this.host, transferProvingKey, transferVerifyingKey, feeProvingKey, feeVerifyingKey, offlineQuery);\n }\n\n /**\n * Build a transfer_public transaction to transfer credits to another account for later submission to the Aleo network\n *\n * @param {number} amount The amount of credits to transfer\n * @param {string} recipient The recipient of the transfer\n * @param {string} transferType The type of transfer to perform - options: 'private', 'privateToPublic', 'public', 'publicToPrivate'\n * @param {number} fee The fee to pay for the transfer\n * @param {boolean} privateFee Use a private record to pay the fee. If false this will use the account's public credit balance\n * @param {RecordSearchParams | undefined} recordSearchParams Optional parameters for finding the amount and fee\n * records for the transfer transaction\n * @param {RecordPlaintext | string} amountRecord Optional amount record to use for the transfer\n * @param {RecordPlaintext | string} feeRecord Optional fee record to use for the transfer\n * @param {PrivateKey | undefined} privateKey Optional private key to use for the transfer transaction\n * @param {OfflineQuery | undefined} offlineQuery Optional offline query if creating transactions in an offline environment\n * @returns {Promise} The transaction id of the transfer transaction\n */\n async buildTransferPublicTransaction(\n amount: number,\n recipient: string,\n fee: number,\n privateKey?: PrivateKey,\n offlineQuery?: OfflineQuery\n ): Promise {\n return this.buildTransferTransaction(amount, recipient, \"public\", fee, false, undefined, undefined, undefined, privateKey, offlineQuery);\n }\n\n /**\n * Build a transfer_public_as_signer transaction to transfer credits to another account for later submission to the Aleo network\n *\n * @param {number} amount The amount of credits to transfer\n * @param {string} recipient The recipient of the transfer\n * @param {string} transferType The type of transfer to perform - options: 'private', 'privateToPublic', 'public', 'publicToPrivate'\n * @param {number} fee The fee to pay for the transfer\n * @param {boolean} privateFee Use a private record to pay the fee. If false this will use the account's public credit balance\n * @param {RecordSearchParams | undefined} recordSearchParams Optional parameters for finding the amount and fee\n * records for the transfer transaction\n * @param {RecordPlaintext | string} amountRecord Optional amount record to use for the transfer\n * @param {RecordPlaintext | string} feeRecord Optional fee record to use for the transfer\n * @param {PrivateKey | undefined} privateKey Optional private key to use for the transfer transaction\n * @param {OfflineQuery | undefined} offlineQuery Optional offline query if creating transactions in an offline environment\n * @returns {Promise} The transaction id of the transfer transaction\n */\n async buildTransferPublicAsSignerTransaction(\n amount: number,\n recipient: string,\n fee: number,\n privateKey?: PrivateKey,\n offlineQuery?: OfflineQuery\n ): Promise {\n return this.buildTransferTransaction(amount, recipient, \"public\", fee, false, undefined, undefined, undefined, privateKey, offlineQuery);\n }\n\n /**\n * Transfer credits to another account\n *\n * @param {number} amount The amount of credits to transfer\n * @param {string} recipient The recipient of the transfer\n * @param {string} transferType The type of transfer to perform - options: 'private', 'privateToPublic', 'public', 'publicToPrivate'\n * @param {number} fee The fee to pay for the transfer\n * @param {boolean} privateFee Use a private record to pay the fee. If false this will use the account's public credit balance\n * @param {RecordSearchParams | undefined} recordSearchParams Optional parameters for finding the amount and fee\n * records for the transfer transaction\n * @param {RecordPlaintext | string} amountRecord Optional amount record to use for the transfer\n * @param {RecordPlaintext | string} feeRecord Optional fee record to use for the transfer\n * @param {PrivateKey | undefined} privateKey Optional private key to use for the transfer transaction\n * @param {OfflineQuery | undefined} offlineQuery Optional offline query if creating transactions in an offline environment\n * @returns {Promise} The transaction id of the transfer transaction\n *\n * @example\n * // Create a new NetworkClient, KeyProvider, and RecordProvider\n * const networkClient = new AleoNetworkClient(\"https://api.explorer.aleo.org/v1\");\n * const keyProvider = new AleoKeyProvider();\n * const recordProvider = new NetworkRecordProvider(account, networkClient);\n *\n * // Initialize a program manager with the key provider to automatically fetch keys for executions\n * const programManager = new ProgramManager(\"https://api.explorer.aleo.org/v1\", keyProvider, recordProvider);\n * await programManager.initialize();\n * const tx_id = await programManager.transfer(1, \"aleo1rhgdu77hgyqd3xjj8ucu3jj9r2krwz6mnzyd80gncr5fxcwlh5rsvzp9px\", \"private\", 0.2)\n * const transaction = await programManager.networkClient.getTransaction(tx_id);\n */\n async transfer(\n amount: number,\n recipient: string,\n transferType: string,\n fee: number,\n privateFee: boolean,\n recordSearchParams?: RecordSearchParams,\n amountRecord?: RecordPlaintext | string,\n feeRecord?: RecordPlaintext | string,\n privateKey?: PrivateKey,\n offlineQuery?: OfflineQuery\n ): Promise {\n const tx = await this.buildTransferTransaction(amount, recipient, transferType, fee, privateFee, recordSearchParams, amountRecord, feeRecord, privateKey, offlineQuery);\n return await this.networkClient.submitTransaction(tx);\n }\n\n /**\n * Build transaction to bond credits to a validator for later submission to the Aleo Network\n *\n * @example\n * // Create a keyProvider to handle key management\n * const keyProvider = new AleoKeyProvider();\n * keyProvider.useCache = true;\n *\n * // Create a new ProgramManager with the key that will be used to bond credits\n * const programManager = new ProgramManager(\"https://api.explorer.aleo.org/v1\", keyProvider, undefined);\n * programManager.setAccount(new Account(\"YourPrivateKey\"));\n *\n * // Create the bonding transaction object for later submission\n * const tx = await programManager.buildBondPublicTransaction(\"aleo1jx8s4dvjepculny4wfrzwyhs3tlyv65r58ns3g6q2gm2esh7ps8sqy9s5j\", \"aleo1rhgdu77hgyqd3xjj8ucu3jj9r2krwz6mnzyd80gncr5fxcwlh5rsvzp9px\", \"aleo1feya8sjy9k2zflvl2dx39pdsq5tju28elnp2ektnn588uu9ghv8s84msv9\", 2000000);\n * console.log(tx);\n *\n * // The transaction can be later submitted to the network using the network client.\n * const result = await programManager.networkClient.submitTransaction(tx);\n *\n * @returns string\n * @param {string} staker_address Address of the staker who is bonding the credits\n * @param {string} validator_address Address of the validator to bond to, if this address is the same as the staker (i.e. the\n * executor of this function), it will attempt to bond the credits as a validator. Bonding as a validator currently\n * requires a minimum of 10,000,000 credits to bond (subject to change). If the address is specified is an existing\n * validator and is different from the address of the executor of this function, it will bond the credits to that\n * validator's staking committee as a delegator. A minimum of 10 credits is required to bond as a delegator.\n * @param {string} withdrawal_address Address to withdraw the staked credits to when unbond_public is called.\n * @param {number} amount The amount of credits to bond\n * @param {Partial} options - Override default execution options.\n */\n async buildBondPublicTransaction(staker_address: string, validator_address: string, withdrawal_address: string, amount: number, options: Partial = {}) {\n const scaledAmount = Math.trunc(amount * 1000000);\n\n const {\n programName = \"credits.aleo\",\n functionName = \"bond_public\",\n fee = options.fee || 0.86,\n privateFee = false,\n inputs = [staker_address, validator_address, withdrawal_address, `${scaledAmount.toString()}u64`],\n keySearchParams = new AleoKeyProviderParams({\n proverUri: CREDITS_PROGRAM_KEYS.bond_public.prover,\n verifierUri: CREDITS_PROGRAM_KEYS.bond_public.verifier,\n cacheKey: \"credits.aleo/bond_public\"\n }),\n program = this.creditsProgram(),\n ...additionalOptions\n } = options;\n\n const executeOptions: ExecuteOptions = {\n programName,\n functionName,\n fee,\n privateFee,\n inputs,\n keySearchParams,\n ...additionalOptions\n };\n\n return await this.buildExecutionTransaction(executeOptions);\n }\n\n /**\n * Bond credits to validator.\n *\n * @example\n * // Create a keyProvider to handle key management\n * const keyProvider = new AleoKeyProvider();\n * keyProvider.useCache = true;\n *\n * // Create a new ProgramManager with the key that will be used to bond credits\n * const programManager = new ProgramManager(\"https://api.explorer.aleo.org/v1\", keyProvider, undefined);\n * programManager.setAccount(new Account(\"YourPrivateKey\"));\n *\n * // Create the bonding transaction\n * const tx_id = await programManager.bondPublic(\"aleo1jx8s4dvjepculny4wfrzwyhs3tlyv65r58ns3g6q2gm2esh7ps8sqy9s5j\", \"aleo1rhgdu77hgyqd3xjj8ucu3jj9r2krwz6mnzyd80gncr5fxcwlh5rsvzp9px\", \"aleo1feya8sjy9k2zflvl2dx39pdsq5tju28elnp2ektnn588uu9ghv8s84msv9\", 2000000);\n *\n * @returns string\n * @param {string} staker_address Address of the staker who is bonding the credits\n * @param {string} validator_address Address of the validator to bond to, if this address is the same as the signer (i.e. the\n * executor of this function), it will attempt to bond the credits as a validator. Bonding as a validator currently\n * requires a minimum of 1,000,000 credits to bond (subject to change). If the address is specified is an existing\n * validator and is different from the address of the executor of this function, it will bond the credits to that\n * validator's staking committee as a delegator. A minimum of 10 credits is required to bond as a delegator.\n * @param {string} withdrawal_address Address to withdraw the staked credits to when unbond_public is called.\n * @param {number} amount The amount of credits to bond\n * @param {Options} options Options for the execution\n */\n async bondPublic(staker_address: string, validator_address: string, withdrawal_address:string, amount: number, options: Partial = {}) {\n const tx = await this.buildBondPublicTransaction(staker_address, validator_address, withdrawal_address, amount, options);\n return await this.networkClient.submitTransaction(tx);\n }\n\n /**\n * Build a bond_validator transaction for later submission to the Aleo Network.\n *\n * @example\n * // Create a keyProvider to handle key management\n * const keyProvider = new AleoKeyProvider();\n * keyProvider.useCache = true;\n *\n * // Create a new ProgramManager with the key that will be used to bond credits\n * const programManager = new ProgramManager(\"https://api.explorer.aleo.org/v1\", keyProvider, undefined);\n * programManager.setAccount(new Account(\"YourPrivateKey\"));\n *\n * // Create the bond validator transaction object for later use.\n * const tx = await programManager.buildBondValidatorTransaction(\"aleo1rhgdu77hgyqd3xjj8ucu3jj9r2krwz6mnzyd80gncr5fxcwlh5rsvzp9px\", \"aleo1feya8sjy9k2zflvl2dx39pdsq5tju28elnp2ektnn588uu9ghv8s84msv9\", 2000000);\n * console.log(tx);\n *\n * // The transaction can later be submitted to the network using the network client.\n * const tx_id = await programManager.networkClient.submitTransaction(tx);\n *\n * @returns string\n * @param {string} validator_address Address of the validator to bond to, if this address is the same as the staker (i.e. the\n * executor of this function), it will attempt to bond the credits as a validator. Bonding as a validator currently\n * requires a minimum of 10,000,000 credits to bond (subject to change). If the address is specified is an existing\n * validator and is different from the address of the executor of this function, it will bond the credits to that\n * validator's staking committee as a delegator. A minimum of 10 credits is required to bond as a delegator.\n * @param {string} withdrawal_address Address to withdraw the staked credits to when unbond_public is called.\n * @param {number} amount The amount of credits to bond\n * @param {number} commission The commission rate for the validator (must be between 0 and 100 - an error will be thrown if it is not)\n * @param {Partial} options - Override default execution options.\n */\n async buildBondValidatorTransaction(validator_address: string, withdrawal_address: string, amount: number, commission: number, options: Partial = {}) {\n const scaledAmount = Math.trunc(amount * 1000000);\n\n const adjustedCommission = Math.trunc(commission)\n\n const {\n programName = \"credits.aleo\",\n functionName = \"bond_validator\",\n fee = options.fee || 0.86,\n privateFee = false,\n inputs = [validator_address, withdrawal_address, `${scaledAmount.toString()}u64`, `${adjustedCommission.toString()}u8`],\n keySearchParams = new AleoKeyProviderParams({\n proverUri: CREDITS_PROGRAM_KEYS.bond_validator.prover,\n verifierUri: CREDITS_PROGRAM_KEYS.bond_validator.verifier,\n cacheKey: \"credits.aleo/bond_validator\"\n }),\n program = this.creditsProgram(),\n ...additionalOptions\n } = options;\n\n const executeOptions: ExecuteOptions = {\n programName,\n functionName,\n fee,\n privateFee,\n inputs,\n keySearchParams,\n ...additionalOptions\n };\n\n return await this.buildExecutionTransaction(executeOptions);\n }\n\n /**\n * Build transaction to bond a validator.\n *\n * @example\n * // Create a keyProvider to handle key management\n * const keyProvider = new AleoKeyProvider();\n * keyProvider.useCache = true;\n *\n * // Create a new ProgramManager with the key that will be used to bond credits\n * const programManager = new ProgramManager(\"https://api.explorer.aleo.org/v1\", keyProvider, undefined);\n * programManager.setAccount(new Account(\"YourPrivateKey\"));\n *\n * // Create the bonding transaction\n * const tx_id = await programManager.bondValidator(\"aleo1rhgdu77hgyqd3xjj8ucu3jj9r2krwz6mnzyd80gncr5fxcwlh5rsvzp9px\", \"aleo1feya8sjy9k2zflvl2dx39pdsq5tju28elnp2ektnn588uu9ghv8s84msv9\", 2000000);\n *\n * @returns string\n * @param {string} validator_address Address of the validator to bond to, if this address is the same as the staker (i.e. the\n * executor of this function), it will attempt to bond the credits as a validator. Bonding as a validator currently\n * requires a minimum of 10,000,000 credits to bond (subject to change). If the address is specified is an existing\n * validator and is different from the address of the executor of this function, it will bond the credits to that\n * validator's staking committee as a delegator. A minimum of 10 credits is required to bond as a delegator.\n * @param {string} withdrawal_address Address to withdraw the staked credits to when unbond_public is called.\n * @param {number} amount The amount of credits to bond\n * @param {number} commission The commission rate for the validator (must be between 0 and 100 - an error will be thrown if it is not)\n * @param {Partial} options - Override default execution options.\n */\n async bondValidator(validator_address: string, withdrawal_address: string, amount: number, commission: number, options: Partial = {}) {\n const tx = await this.buildBondValidatorTransaction(validator_address, withdrawal_address, amount, commission, options);\n return await this.networkClient.submitTransaction(tx);\n }\n\n /**\n * Build a transaction to unbond public credits from a validator in the Aleo network.\n *\n * @param {string} staker_address - The address of the staker who is unbonding the credits.\n * @param {number} amount - The amount of credits to unbond (scaled by 1,000,000).\n * @param {Partial} options - Override default execution options.\n * @returns {Promise} - A promise that resolves to the transaction or an error message.\n *\n * @example\n * // Create a keyProvider to handle key management.\n * const keyProvider = new AleoKeyProvider();\n * keyProvider.useCache = true;\n *\n * // Create a new ProgramManager with the key that will be used to unbond credits.\n * const programManager = new ProgramManager(\"https://api.explorer.aleo.org/v1\", keyProvider, undefined);\n * const tx = await programManager.buildUnbondPublicTransaction(\"aleo1jx8s4dvjepculny4wfrzwyhs3tlyv65r58ns3g6q2gm2esh7ps8sqy9s5j\", 2000000);\n * console.log(tx);\n *\n * // The transaction can be submitted later to the network using the network client.\n * programManager.networkClient.submitTransaction(tx);\n */\n async buildUnbondPublicTransaction(staker_address: string, amount: number, options: Partial = {}): Promise {\n const scaledAmount = Math.trunc(amount * 1000000);\n\n const {\n programName = \"credits.aleo\",\n functionName = \"unbond_public\",\n fee = options.fee || 1.3,\n privateFee = false,\n inputs = [staker_address, `${scaledAmount.toString()}u64`],\n keySearchParams = new AleoKeyProviderParams({\n proverUri: CREDITS_PROGRAM_KEYS.unbond_public.prover,\n verifierUri: CREDITS_PROGRAM_KEYS.unbond_public.verifier,\n cacheKey: \"credits.aleo/unbond_public\"\n }),\n program = this.creditsProgram(),\n ...additionalOptions\n } = options;\n\n const executeOptions: ExecuteOptions = {\n programName,\n functionName,\n fee,\n privateFee,\n inputs,\n keySearchParams,\n ...additionalOptions\n };\n\n return this.buildExecutionTransaction(executeOptions);\n }\n\n /**\n * Unbond a specified amount of staked credits.\n *\n * @example\n * // Create a keyProvider to handle key management\n * const keyProvider = new AleoKeyProvider();\n * keyProvider.useCache = true;\n *\n * // Create a new ProgramManager with the key that will be used to bond credits\n * const programManager = new ProgramManager(\"https://api.explorer.aleo.org/v1\", keyProvider, undefined);\n * programManager.setAccount(new Account(\"YourPrivateKey\"));\n *\n * // Create the bonding transaction and send it to the network\n * const tx_id = await programManager.unbondPublic(\"aleo1jx8s4dvjepculny4wfrzwyhs3tlyv65r58ns3g6q2gm2esh7ps8sqy9s5j\", 10);\n *\n * @returns string\n * @param {string} staker_address Address of the staker who is unbonding the credits\n * @param {number} amount Amount of credits to unbond. If the address of the executor of this function is an\n * existing validator, it will subtract this amount of credits from the validator's staked credits. If there are\n * less than 1,000,000 credits staked pool after the unbond, the validator will be removed from the validator set.\n * If the address of the executor of this function is not a validator and has credits bonded as a delegator, it will\n * subtract this amount of credits from the delegator's staked credits. If there are less than 10 credits bonded\n * after the unbond operation, the delegator will be removed from the validator's staking pool.\n * @param {ExecuteOptions} options Options for the execution\n */\n async unbondPublic(staker_address: string, amount: number, options: Partial = {}): Promise {\n const tx = await this.buildUnbondPublicTransaction(staker_address, amount, options);\n return await this.networkClient.submitTransaction(tx);\n }\n\n /**\n * Build a transaction to claim unbonded public credits in the Aleo network.\n *\n * @param {string} staker_address - The address of the staker who is claiming the credits.\n * @param {Partial} options - Override default execution options.\n * @returns {Promise} - A promise that resolves to the transaction or an error message.\n *\n * @example\n * // Create a keyProvider to handle key management\n * const keyProvider = new AleoKeyProvider();\n * keyProvider.useCache = true;\n *\n * // Create a new ProgramManager with the key that will be used to claim unbonded credits.\n * const programManager = new ProgramManager(\"https://api.explorer.aleo.org/v1\", keyProvider, undefined);\n *\n * // Create the claim unbonded transaction object for later use.\n * const tx = await programManager.buildClaimUnbondPublicTransaction(\"aleo1jx8s4dvjepculny4wfrzwyhs3tlyv65r58ns3g6q2gm2esh7ps8sqy9s5j\");\n * console.log(tx);\n *\n * // The transaction can be submitted later to the network using the network client.\n * programManager.networkClient.submitTransaction(tx);\n */\n async buildClaimUnbondPublicTransaction(staker_address: string, options: Partial = {}): Promise {\n const {\n programName = \"credits.aleo\",\n functionName = \"claim_unbond_public\",\n fee = options.fee || 2,\n privateFee = false,\n inputs = [staker_address],\n keySearchParams = new AleoKeyProviderParams({\n proverUri: CREDITS_PROGRAM_KEYS.claim_unbond_public.prover,\n verifierUri: CREDITS_PROGRAM_KEYS.claim_unbond_public.verifier,\n cacheKey: \"credits.aleo/claim_unbond_public\"\n }),\n program = this.creditsProgram(),\n ...additionalOptions\n } = options;\n\n const executeOptions: ExecuteOptions = {\n programName,\n functionName,\n fee,\n privateFee,\n inputs,\n keySearchParams,\n ...additionalOptions\n };\n\n return await this.buildExecutionTransaction(executeOptions);\n }\n\n /**\n * Claim unbonded credits. If credits have been unbonded by the account executing this function, this method will\n * claim them and add them to the public balance of the account.\n *\n * @example\n * // Create a keyProvider to handle key management\n * const keyProvider = new AleoKeyProvider();\n * keyProvider.useCache = true;\n *\n * // Create a new ProgramManager with the key that will be used to bond credits\n * const programManager = new ProgramManager(\"https://api.explorer.aleo.org/v1\", keyProvider, undefined);\n * programManager.setAccount(new Account(\"YourPrivateKey\"));\n *\n * // Create the bonding transaction\n * const tx_id = await programManager.claimUnbondPublic(\"aleo1jx8s4dvjepculny4wfrzwyhs3tlyv65r58ns3g6q2gm2esh7ps8sqy9s5j\");\n *\n * @param {string} staker_address Address of the staker who is claiming the credits\n * @param {ExecuteOptions} options\n * @returns string\n */\n async claimUnbondPublic(staker_address: string, options: Partial = {}): Promise {\n const tx = await this.buildClaimUnbondPublicTransaction(staker_address, options);\n return await this.networkClient.submitTransaction(tx);\n }\n\n /**\n * Build a set_validator_state transaction for later usage.\n *\n * This function allows a validator to set their state to be either opened or closed to new stakers.\n * When the validator is open to new stakers, any staker (including the validator) can bond or unbond from the validator.\n * When the validator is closed to new stakers, existing stakers can still bond or unbond from the validator, but new stakers cannot bond.\n *\n * This function serves two primary purposes:\n * 1. Allow a validator to leave the committee, by closing themselves to stakers and then unbonding all of their stakers.\n * 2. Allow a validator to maintain their % of stake, by closing themselves to allowing more stakers to bond to them.\n *\n * @example\n * // Create a keyProvider to handle key management\n * const keyProvider = new AleoKeyProvider();\n * keyProvider.useCache = true;\n *\n * // Create a new ProgramManager with the key that will be used to bond credits\n * const programManager = new ProgramManager(\"https://api.explorer.aleo.org/v1\", keyProvider, undefined);\n * programManager.setAccount(new Account(\"ValidatorPrivateKey\"));\n *\n * // Create the bonding transaction\n * const tx = await programManager.buildSetValidatorStateTransaction(true);\n *\n * // The transaction can be submitted later to the network using the network client.\n * programManager.networkClient.submitTransaction(tx);\n *\n * @returns string\n * @param {boolean} validator_state\n * @param {Partial} options - Override default execution options\n */\n async buildSetValidatorStateTransaction(validator_state: boolean, options: Partial = {}) {\n const {\n programName = \"credits.aleo\",\n functionName = \"set_validator_state\",\n fee = 1,\n privateFee = false,\n inputs = [validator_state.toString()],\n keySearchParams = new AleoKeyProviderParams({\n proverUri: CREDITS_PROGRAM_KEYS.set_validator_state.prover,\n verifierUri: CREDITS_PROGRAM_KEYS.set_validator_state.verifier,\n cacheKey: \"credits.aleo/set_validator_state\"\n }),\n ...additionalOptions\n } = options;\n\n const executeOptions: ExecuteOptions = {\n programName,\n functionName,\n fee,\n privateFee,\n inputs,\n keySearchParams,\n ...additionalOptions\n };\n\n return await this.execute(executeOptions);\n }\n\n /**\n * Submit a set_validator_state transaction to the Aleo Network.\n *\n * This function allows a validator to set their state to be either opened or closed to new stakers.\n * When the validator is open to new stakers, any staker (including the validator) can bond or unbond from the validator.\n * When the validator is closed to new stakers, existing stakers can still bond or unbond from the validator, but new stakers cannot bond.\n *\n * This function serves two primary purposes:\n * 1. Allow a validator to leave the committee, by closing themselves to stakers and then unbonding all of their stakers.\n * 2. Allow a validator to maintain their % of stake, by closing themselves to allowing more stakers to bond to them.\n *\n * @example\n * // Create a keyProvider to handle key management\n * const keyProvider = new AleoKeyProvider();\n * keyProvider.useCache = true;\n *\n * // Create a new ProgramManager with the key that will be used to bond credits\n * const programManager = new ProgramManager(\"https://api.explorer.aleo.org/v1\", keyProvider, undefined);\n * programManager.setAccount(new Account(\"ValidatorPrivateKey\"));\n *\n * // Create the bonding transaction\n * const tx_id = await programManager.setValidatorState(true);\n *\n * @returns string\n * @param {boolean} validator_state\n * @param {Partial} options - Override default execution options\n */\n async setValidatorState(validator_state: boolean, options: Partial = {}) {\n const tx = await this.buildSetValidatorStateTransaction(validator_state, options);\n return this.networkClient.submitTransaction(tx);\n }\n\n /**\n * Verify a proof of execution from an offline execution\n *\n * @param {executionResponse} executionResponse\n * @returns {boolean} True if the proof is valid, false otherwise\n */\n verifyExecution(executionResponse: ExecutionResponse): boolean {\n try {\n const execution = executionResponse.getExecution();\n const function_id = executionResponse.getFunctionId();\n const program = executionResponse.getProgram();\n const verifyingKey = executionResponse.getVerifyingKey();\n return verifyFunctionExecution(execution, verifyingKey, program, function_id);\n } catch(e) {\n console.warn(\"The execution was not found in the response, cannot verify the execution\");\n return false;\n }\n }\n\n /**\n * Create a program object from a program's source code\n *\n * @param {string} program Program source code\n * @returns {Program | Error} The program object\n */\n createProgramFromSource(program: string): Program | Error {\n return Program.fromString(program);\n }\n\n /**\n * Get the credits program object\n *\n * @returns {Program} The credits program object\n */\n creditsProgram(): Program {\n return Program.getCreditsProgram();\n }\n\n /**\n * Verify a program is valid\n *\n * @param {string} program The program source code\n */\n verifyProgram(program: string): boolean {\n try {\n Program.fromString(program);\n return true;\n } catch (e) {\n return false;\n }\n }\n\n // Internal utility function for getting a credits.aleo record\n async getCreditsRecord(amount: number, nonces: string[], record?: RecordPlaintext | string, params?: RecordSearchParams): Promise {\n try {\n return record instanceof RecordPlaintext ? record : RecordPlaintext.fromString(record);\n } catch (e) {\n try {\n const recordProvider = this.recordProvider;\n return (await recordProvider.findCreditsRecord(amount, true, nonces, params))\n } catch (e) {\n throw logAndThrow(`Error finding fee record. Record finder response: '${e}'. Please ensure you're connected to a valid Aleo network and a record with enough balance exists.`);\n }\n }\n }\n}\n\n// Ensure the transfer type requires an amount record\nfunction requiresAmountRecord(transferType: string): boolean {\n return PRIVATE_TRANSFER_TYPES.has(transferType);\n}\n\n// Validate the transfer type\nfunction validateTransferType(transferType: string): string | Error {\n return VALID_TRANSFER_TYPES.has(transferType) ? transferType :\n logAndThrow(`Invalid transfer type '${transferType}'. Valid transfer types are 'private', 'privateToPublic', 'public', and 'publicToPrivate'.`);\n}\n\nexport { ProgramManager }\n","import {VerifyingKey, Metadata} from \"@provablehq/wasm\";\n\nconst KEY_STORE = Metadata.baseUrl();\n\ninterface Key {\n name: string,\n locator: string,\n prover: string,\n verifier: string,\n verifyingKey: () => VerifyingKey,\n}\n\nfunction convert(metadata: Metadata): Key {\n // This looks up the method name in VerifyingKey\n const verifyingKey = (VerifyingKey as any)[metadata.verifyingKey];\n\n if (!verifyingKey) {\n throw new Error(\"Invalid method name: \" + metadata.verifyingKey);\n }\n\n return {\n name: metadata.name,\n locator: metadata.locator,\n prover: metadata.prover,\n verifier: metadata.verifier,\n verifyingKey,\n };\n}\n\nconst CREDITS_PROGRAM_KEYS = {\n bond_public: convert(Metadata.bond_public()),\n bond_validator: convert(Metadata.bond_validator()),\n claim_unbond_public: convert(Metadata.claim_unbond_public()),\n fee_private: convert(Metadata.fee_private()),\n fee_public: convert(Metadata.fee_public()),\n inclusion: convert(Metadata.inclusion()),\n join: convert(Metadata.join()),\n set_validator_state: convert(Metadata.set_validator_state()),\n split: convert(Metadata.split()),\n transfer_private: convert(Metadata.transfer_private()),\n transfer_private_to_public: convert(Metadata.transfer_private_to_public()),\n transfer_public: convert(Metadata.transfer_public()),\n transfer_public_as_signer: convert(Metadata.transfer_public_as_signer()),\n transfer_public_to_private: convert(Metadata.transfer_public_to_private()),\n unbond_public: convert(Metadata.unbond_public()),\n getKey: function(key: string): Key | Error {\n if (this.hasOwnProperty(key)) {\n return (this as any)[key] as Key;\n } else {\n return new Error(`Key \"${key}\" not found.`);\n }\n }\n};\n\nconst PRIVATE_TRANSFER_TYPES = new Set([\n \"transfer_private\",\n \"private\",\n \"transferPrivate\",\n \"transfer_private_to_public\",\n \"privateToPublic\",\n \"transferPrivateToPublic\",\n]);\nconst VALID_TRANSFER_TYPES = new Set([\n \"transfer_private\",\n \"private\",\n \"transferPrivate\",\n \"transfer_private_to_public\",\n \"privateToPublic\",\n \"transferPrivateToPublic\",\n \"transfer_public\",\n \"transfer_public_as_signer\",\n \"public\",\n \"public_as_signer\",\n \"transferPublic\",\n \"transferPublicAsSigner\",\n \"transfer_public_to_private\",\n \"publicToPrivate\",\n \"publicAsSigner\",\n \"transferPublicToPrivate\",\n]);\nconst PRIVATE_TRANSFER = new Set([\n \"private\",\n \"transfer_private\",\n \"transferPrivate\",\n]);\nconst PRIVATE_TO_PUBLIC_TRANSFER = new Set([\n \"private_to_public\",\n \"privateToPublic\",\n \"transfer_private_to_public\",\n \"transferPrivateToPublic\",\n]);\nconst PUBLIC_TRANSFER = new Set([\n \"public\",\n \"transfer_public\",\n \"transferPublic\",\n]);\nconst PUBLIC_TRANSFER_AS_SIGNER = new Set([\n \"public_as_signer\",\n \"transfer_public_as_signer\",\n \"transferPublicAsSigner\",\n]);\nconst PUBLIC_TO_PRIVATE_TRANSFER = new Set([\n \"public_to_private\",\n \"publicToPrivate\",\n \"transfer_public_to_private\",\n \"transferPublicToPrivate\",\n]);\n\nfunction logAndThrow(message: string): Error {\n console.error(message);\n throw message;\n}\n\nimport { Account } from \"./account\";\nimport { AleoNetworkClient, ProgramImports } from \"./network-client\";\nimport { Block } from \"./models/block\";\nimport { Execution } from \"./models/execution\";\nimport { Input } from \"./models/input\";\nimport { Output } from \"./models/output\";\nimport { TransactionModel } from \"./models/transactionModel\";\nimport { Transition } from \"./models/transition\";\nimport {\n AleoKeyProvider,\n AleoKeyProviderParams,\n AleoKeyProviderInitParams,\n CachedKeyPair,\n FunctionKeyPair,\n FunctionKeyProvider,\n KeySearchParams,\n} from \"./function-key-provider\";\nimport {\n OfflineKeyProvider,\n OfflineSearchParams\n} from \"./offline-key-provider\";\nimport {\n BlockHeightSearch,\n NetworkRecordProvider,\n RecordProvider,\n RecordSearchParams,\n} from \"./record-provider\";\n\n// @TODO: This function is no longer needed, remove it.\nasync function initializeWasm() {\n console.warn(\"initializeWasm is deprecated, you no longer need to use it\");\n}\n\nexport { createAleoWorker } from \"./managed-worker\";\n\nexport { ProgramManager } from \"./program-manager\";\n\nexport {\n Address,\n Execution as FunctionExecution,\n ExecutionResponse,\n Field,\n OfflineQuery,\n PrivateKey,\n PrivateKeyCiphertext,\n Program,\n ProgramManager as ProgramManagerBase,\n ProvingKey,\n RecordCiphertext,\n RecordPlaintext,\n Signature,\n Transaction,\n VerifyingKey,\n ViewKey,\n initThreadPool,\n verifyFunctionExecution,\n} from \"@provablehq/wasm\";\n\nexport { initializeWasm };\n\nexport {\n Account,\n AleoKeyProvider,\n AleoKeyProviderParams,\n AleoKeyProviderInitParams,\n AleoNetworkClient,\n Block,\n BlockHeightSearch,\n CachedKeyPair,\n Execution,\n FunctionKeyPair,\n FunctionKeyProvider,\n Input,\n Key,\n KeySearchParams,\n NetworkRecordProvider,\n ProgramImports,\n OfflineKeyProvider,\n OfflineSearchParams,\n Output,\n RecordProvider,\n RecordSearchParams,\n TransactionModel,\n Transition,\n CREDITS_PROGRAM_KEYS,\n KEY_STORE,\n PRIVATE_TRANSFER,\n PRIVATE_TO_PUBLIC_TRANSFER,\n PRIVATE_TRANSFER_TYPES,\n PUBLIC_TRANSFER,\n PUBLIC_TRANSFER_AS_SIGNER,\n PUBLIC_TO_PRIVATE_TRANSFER,\n VALID_TRANSFER_TYPES,\n logAndThrow,\n};\n","import * as aleo from \"@provablehq/sdk\";\n\nawait aleo.initThreadPool();\n\nconst defaultHost = \"https://api.explorer.provable.com/v1\";\nconst keyProvider = new aleo.AleoKeyProvider();\nconst programManager = new aleo.ProgramManager(defaultHost, keyProvider, undefined);\nkeyProvider.useCache(true);\n\nself.postMessage({\n type: \"ALEO_WORKER_READY\",\n});\n\nlet lastLocalProgram = null;\nself.addEventListener(\"message\", (ev) => {\n if (ev.data.type === \"ALEO_EXECUTE_PROGRAM_LOCAL\") {\n const { localProgram, aleoFunction, inputs, privateKey } = ev.data;\n\n console.log(\"Web worker: Executing function locally...\");\n let startTime = performance.now();\n\n (async function () {\n try {\n const privateKeyObject = aleo.PrivateKey.from_string(privateKey);\n // Ensure the program is valid and that it contains the function specified\n const program = programManager.createProgramFromSource(localProgram);\n const program_id = program.id();\n if (!program.hasFunction(aleoFunction)) {\n throw `Program ${program_id} does not contain function ${aleoFunction}`;\n }\n const cacheKey = `${program_id}:${aleoFunction}`;\n\n // Get the program imports\n const imports = programManager.networkClient.getProgramImports(localProgram);\n\n // Get the proving and verifying keys for the function\n if (lastLocalProgram !== localProgram) {\n const keys = await programManager.synthesizeKeys(localProgram, aleoFunction, inputs, privateKeyObject);\n programManager.keyProvider.cacheKeys(cacheKey, keys);\n lastLocalProgram = localProgram;\n }\n\n // Pass the cache key to the execute function\n const keyParams = new aleo.AleoKeyProviderParams({\"cacheKey\": cacheKey});\n\n // Execute the function locally\n let response = await programManager.run(\n localProgram,\n aleoFunction,\n inputs,\n false,\n imports,\n keyParams,\n undefined,\n undefined,\n privateKeyObject,\n undefined\n );\n\n // Return the outputs to the main thread\n console.log(`Web worker: Local execution completed in ${performance.now() - startTime} ms`);\n const outputs = response.getOutputs();\n let execution = response.getExecution();\n if (execution) {\n aleo.verifyFunctionExecution(execution, keyProvider.getKeys(cacheKey)[1], program, \"hello\");\n execution = execution.toString();\n console.log(\"Execution verified successfully: \" + execution);\n } else {\n execution = \"\";\n }\n\n console.log(`Function execution response: ${outputs}`);\n self.postMessage({\n type: \"OFFLINE_EXECUTION_COMPLETED\",\n outputs: {outputs: outputs, execution: execution}\n });\n } catch (error) {\n console.error(error);\n self.postMessage({\n type: \"ERROR\",\n errorMessage: error.toString(),\n });\n }\n })();\n } else if (ev.data.type === \"ALEO_EXECUTE_PROGRAM_ON_CHAIN\") {\n const {\n remoteProgram,\n aleoFunction,\n inputs,\n privateKey,\n fee,\n privateFee,\n feeRecord,\n url,\n } = ev.data;\n\n console.log(\"Web worker: Creating execution...\");\n let startTime = performance.now();\n\n (async function () {\n try {\n const privateKeyObject = aleo.PrivateKey.from_string(privateKey)\n // Ensure the program is valid and that it contains the function specified\n const program = await programManager.networkClient.getProgramObject(remoteProgram);\n const program_id = program.id();\n if (!program.hasFunction(aleoFunction)) {\n throw `Program ${program_id} does not contain function ${aleoFunction}`;\n }\n\n // Get the proving and verifying keys for the function\n const cacheKey = `${program_id}:${aleoFunction}`;\n if (!programManager.keyProvider.containsKeys(cacheKey)) {\n console.log(`Web worker: Synthesizing proving & verifying keys for: '${program_id}:${aleoFunction}'`);\n const keys = await programManager.synthesizeKeys(remoteProgram, aleoFunction, inputs, privateKeyObject);\n programManager.keyProvider.cacheKeys(cacheKey, keys);\n }\n\n // Pass the cache key to the execute function\n const keyParams = new aleo.AleoKeyProviderParams({\"cacheKey\": cacheKey})\n\n // Set the host to the provided URL if provided\n if (typeof url === \"string\") { programManager.setHost(url); }\n const transaction = await programManager.execute({\n programName: program_id,\n functionName: aleoFunction,\n fee: fee,\n privateFee: privateFee,\n inputs: inputs,\n keySearchParams: keyParams,\n feeRecord: feeRecord,\n privateKey: privateKeyObject\n });\n\n // Return the transaction id to the main thread\n console.log(`Web worker: On-chain execution transaction created in ${performance.now() - startTime} ms`);\n self.postMessage({\n type: \"EXECUTION_TRANSACTION_COMPLETED\",\n executeTransaction: transaction,\n });\n } catch (error) {\n console.error(`Error creating execution transaction: ${error}`);\n self.postMessage({\n type: \"ERROR\",\n errorMessage: error.toString(),\n });\n } finally {\n programManager.setHost(defaultHost);\n }\n })();\n } else if (ev.data.type === \"ALEO_ESTIMATE_EXECUTION_FEE\") {\n const { remoteProgram, privateKey, aleoFunction, inputs, url } =\n ev.data;\n\n console.log(\"Web worker: Estimating execution fee...\");\n let startTime = performance.now();\n\n (async function () {\n try {\n const privateKeyObject = aleo.PrivateKey.from_string(privateKey);\n // Ensure the program is valid and that it contains the function specified\n const program = await programManager.networkClient.getProgramObject(remoteProgram);\n const program_id = program.id();\n if (!program.getFunctions().includes(aleoFunction)) {\n throw `Program ${program_id} does not contain function ${aleoFunction}`;\n }\n const cacheKey = `${program_id}:${aleoFunction}`;\n const imports = await programManager.networkClient.getProgramImports(remoteProgram);\n\n // Get the proving and verifying keys for the function\n if (!programManager.keyProvider.containsKeys(cacheKey)) {\n console.log(`Web worker: Synthesizing proving & verifying keys for: '${program_id}:${aleoFunction}'`);\n const keys = await programManager.synthesizeKeys(program.toString(), aleoFunction, inputs, privateKeyObject);\n programManager.keyProvider.cacheKeys(cacheKey, keys);\n }\n\n // Estimate the execution fee\n const [provingKey, verifyingKey] = programManager.keyProvider.getKeys(cacheKey);\n let executeFee = await aleo.ProgramManagerBase.estimateExecutionFee(\n privateKeyObject,\n remoteProgram,\n aleoFunction,\n inputs,\n url,\n imports,\n provingKey,\n verifyingKey,\n undefined\n );\n\n // Return the execution fee estimate to the main thread\n console.log(`Web worker: Execution fee estimated in ${performance.now() - startTime} ms`);\n console.log(`Execution Fee Estimation: ${executeFee} microcredits`);\n self.postMessage({\n type: \"EXECUTION_FEE_ESTIMATION_COMPLETED\",\n executionFee: Number(executeFee) / 1000000 + 0.01,\n });\n } catch (error) {\n console.error(error);\n self.postMessage({\n type: \"ERROR\",\n errorMessage: error.toString(),\n });\n }\n })();\n } else if (ev.data.type === \"ALEO_ESTIMATE_DEPLOYMENT_FEE\") {\n const { program, url } = ev.data;\n\n console.log(\"Web worker: Estimating deployment fee...\");\n\n let startTime = performance.now();\n (async function () {\n try {\n const imports = await programManager.networkClient.getProgramImports(program);\n console.log(\"Estimating deployment fee..\");\n let deploymentFee =\n await aleo.ProgramManagerBase.estimateDeploymentFee(\n program,\n imports,\n );\n\n // Return the deployment fee estimate to the main thread\n console.log(`Web worker: Deployment fee estimation completed in ${performance.now() - startTime} ms`);\n console.log(`Deployment Fee Estimation: ${deploymentFee} microcredits`);\n self.postMessage({\n type: \"DEPLOYMENT_FEE_ESTIMATION_COMPLETED\",\n deploymentFee: Number(deploymentFee) / 1000000 + 0.01,\n });\n } catch (error) {\n console.error(error);\n self.postMessage({\n type: \"ERROR\",\n errorMessage: error.toString(),\n });\n }\n })();\n } else if (ev.data.type === \"ALEO_TRANSFER\") {\n const {\n privateKey,\n amountCredits,\n recipient,\n transfer_type,\n amountRecord,\n fee,\n privateFee,\n feeRecord,\n url,\n } = ev.data;\n\n console.log(\n `Web worker: Creating transfer of type ${transfer_type}...`,\n );\n let startTime = performance.now();\n\n (async function () {\n try {\n // Set the host to the provided URL if provided\n if (typeof url === \"string\") { programManager.setHost(url); }\n\n // Create the transfer transaction and submit it to the network\n const transaction = await programManager.transfer(\n amountCredits,\n recipient,\n transfer_type,\n fee,\n privateFee,\n undefined,\n amountRecord,\n feeRecord,\n aleo.PrivateKey.from_string(privateKey),\n undefined\n );\n\n // Return the transaction id to the main thread\n console.log(`Web worker: Transfer transaction ${transaction} created in ${performance.now() - startTime} ms`);\n self.postMessage({\n type: \"TRANSFER_TRANSACTION_COMPLETED\",\n transferTransaction: transaction,\n });\n } catch (error) {\n console.error(error);\n self.postMessage({\n type: \"ERROR\",\n errorMessage: error.toString(),\n });\n } finally {\n programManager.setHost(defaultHost);\n }\n })();\n } else if (ev.data.type === \"ALEO_DEPLOY\") {\n const { program, privateKey, fee, privateFee, feeRecord, url } = ev.data;\n\n console.log(\"Web worker: Creating deployment...\");\n\n let startTime = performance.now();\n (async function () {\n try {\n // Set the network client host if specified\n if (typeof url === \"string\") { programManager.setHost(url); }\n\n // Check if the program is valid\n const programObject = programManager.createProgramFromSource(program);\n\n // Check if the program already exists on the network. If so, throw an error\n let programExists = false;\n try {\n await programManager.networkClient.getProgram(programObject.id());\n programExists = true;\n } catch (e) {\n console.log(\n `Program not found on the Aleo Network - proceeding with deployment...`,\n );\n }\n\n if (programExists) {\n throw `Program ${programObject.id()} already exists on the network`;\n }\n\n console.log(\"fee is: \", fee);\n // Create the deployment transaction and submit it to the network\n let transaction = await programManager.deploy(\n program,\n fee,\n privateFee,\n undefined,\n feeRecord,\n aleo.PrivateKey.from_string(privateKey),\n )\n\n // Return the transaction id to the main thread\n console.log(`Web worker: Deployment transaction ${transaction} created in ${performance.now() - startTime} ms`);\n self.postMessage({\n type: \"DEPLOY_TRANSACTION_COMPLETED\",\n deployTransaction: transaction,\n });\n } catch (error) {\n console.log(error);\n self.postMessage({\n type: \"ERROR\",\n errorMessage: error.toString(),\n });\n } finally {\n programManager.setHost(defaultHost);\n }\n })();\n } else if (ev.data.type === \"ALEO_SPLIT\") {\n const { splitAmount, record, privateKey, url } = ev.data;\n\n console.log(\"Web worker: Creating split...\");\n\n let startTime = performance.now();\n (async function () {\n try {\n // Set the network client host if specified\n if (typeof url === \"string\") { programManager.setHost(url); }\n\n // Create the split transaction and submit to the network\n const transaction = await programManager.split(\n splitAmount,\n record,\n aleo.PrivateKey.from_string(privateKey),\n undefined\n );\n\n // Return the transaction id to the main thread\n console.log(`Web worker: Split transaction ${transaction} created in ${performance.now() - startTime} ms`);\n self.postMessage({\n type: \"SPLIT_TRANSACTION_COMPLETED\",\n splitTransaction: transaction,\n });\n } catch (error) {\n console.log(error);\n self.postMessage({\n type: \"ERROR\",\n errorMessage: error.toString(),\n });\n } finally {\n programManager.setHost(defaultHost);\n }\n })();\n } else if (ev.data.type === \"ALEO_JOIN\") {\n const { recordOne, recordTwo, fee, privateFee, feeRecord, privateKey, url } =\n ev.data;\n\n console.log(\"Web worker: Creating join...\");\n\n let startTime = performance.now();\n (async function () {\n\n try {\n // Set the network client host if specified\n if (typeof url === \"string\") { programManager.setHost(url); }\n\n // Create the join transaction and submit it to the network\n const transaction = await programManager.join(\n recordOne,\n recordTwo,\n fee,\n privateFee,\n undefined,\n feeRecord,\n aleo.PrivateKey.from_string(privateKey),\n undefined\n );\n\n // Return the transaction id to the main thread\n console.log(`Web worker: Join transaction ${transaction} created in ${performance.now() - startTime} ms`);\n self.postMessage({\n type: \"JOIN_TRANSACTION_COMPLETED\",\n joinTransaction: transaction,\n });\n } catch (error) {\n console.log(error);\n self.postMessage({\n type: \"ERROR\",\n errorMessage: error.toString(),\n });\n } finally {\n programManager.setHost(defaultHost);\n }\n })();\n }\n});\n"],"names":["async","get","url","options","response","fetch","ok","Error","status","post","method","AleoNetworkClient","host","headers","account","constructor","this","setAccount","getAccount","setHost","fetchData","json","error","findUnspentRecords","startHeight","endHeight","privateKey","amounts","maxMicrocredits","nonces","records","Array","start","end","resolvedPrivateKey","latestHeight","failures","totalRecordValue","BigInt","_privateKey","PrivateKey","from_string","viewKey","to_view_key","blockHeight","getLatestHeight","blocks","getBlockRange","i","length","transactions","j","confirmedTransaction","type","transaction","execution","transitions","k","transition","program","outputs","l","output","record","RecordCiphertext","fromString","value","isOwner","recordPlaintext","decrypt","nonce","includes","serialNumber","serialNumberString","getTransitionId","push","microcredits","amounts_found","console","warn","toString","getBlock","height","getDeploymentTransactionIDForProgram","Program","replace","getDeploymentTransactionForProgram","transaction_id","getTransaction","getLatestBlock","getLatestCommittee","getProgram","programId","getProgramObject","inputProgram","getProgramImports","imports","importList","getImports","import_id","hasOwnProperty","programSource","nestedImports","key","logAndThrow","getProgramImportNames","getProgramMappingNames","getProgramMappingValue","mappingName","getStateRoot","id","getTransactions","getTransactionsInMempool","inputOrOutputID","submitTransaction","transaction_string","Transaction","body","Object","assign","message","AleoKeyProviderParams","name","proverUri","verifierUri","cacheKey","params","AleoKeyProvider","cache","cacheOption","keyUris","fetchBytes","data","arrayBuffer","Uint8Array","KEY_STORE","Map","useCache","clearCache","clear","cacheKeys","keyId","keys","provingKey","verifyingKey","set","toBytes","containsKeys","has","deleteKeys","delete","getKeys","debug","provingKeyBytes","verifyingKeyBytes","ProvingKey","fromBytes","VerifyingKey","functionKeys","proverUrl","verifierUrl","CREDITS_PROGRAM_KEYS","getKey","fetchCreditsKeys","fetchRemoteKeys","getVerifyingKey","fetchProvingKey","locator","keyPair","verifying_key","proving_key","prover","bond_public","bondPublicKeys","bondValidatorKeys","bond_validator","claimUnbondPublicKeys","claim_unbond_public","transferKeys","visibility","PRIVATE_TRANSFER","transfer_private","PRIVATE_TO_PUBLIC_TRANSFER","transfer_private_to_public","PUBLIC_TRANSFER","transfer_public","PUBLIC_TRANSFER_AS_SIGNER","transfer_public_as_signer","PUBLIC_TO_PRIVATE_TRANSFER","transfer_public_to_private","joinKeys","join","splitKeys","split","feePrivateKeys","fee_private","feePublicKeys","fee_public","verifier","inclusion","set_validator_state","unbond_public","text","e","inner","unBondPublicKeys","ProgramManager","keyProvider","networkClient","recordProvider","setKeyProvider","setRecordProvider","deploy","fee","privateFee","recordSearchParams","feeRecord","programObject","log","feeKeys","deploymentPrivateKey","getCreditsRecord","undefined","feeProvingKey","feeVerifyingKey","tx","ProgramManager$1","buildDeploymentTransaction","buildExecutionTransaction","programName","functionName","inputs","keySearchParams","offlineQuery","executionPrivateKey","execute","run","function_name","proveExecution","executeFunctionOffline","recordOne","recordTwo","joinProvingKey","joinVerifyingKey","RecordPlaintext","buildJoinTransaction","splitAmount","amountRecord","splitProvingKey","splitVerifyingKey","buildSplitTransaction","synthesizeKeys","function_id","synthesizeKeyPair","buildTransferTransaction","amount","recipient","transferType","validateTransferType","transferProvingKey","transferVerifyingKey","requiresAmountRecord","buildTransferPublicTransaction","buildTransferPublicAsSignerTransaction","transfer","buildBondPublicTransaction","staker_address","validator_address","withdrawal_address","scaledAmount","Math","trunc","creditsProgram","additionalOptions","executeOptions","bondPublic","buildBondValidatorTransaction","commission","adjustedCommission","bondValidator","buildUnbondPublicTransaction","unbondPublic","buildClaimUnbondPublicTransaction","claimUnbondPublic","buildSetValidatorStateTransaction","validator_state","setValidatorState","verifyExecution","executionResponse","getExecution","getFunctionId","verifyFunctionExecution","createProgramFromSource","getCreditsProgram","verifyProgram","findCreditsRecord","PRIVATE_TRANSFER_TYPES","VALID_TRANSFER_TYPES","Metadata","baseUrl","convert","metadata","Set","_regeneratorRuntime","t","r","prototype","n","o","defineProperty","Symbol","a","iterator","c","asyncIterator","u","toStringTag","define","enumerable","configurable","writable","wrap","Generator","create","Context","makeInvokeMethod","tryCatch","arg","call","h","f","s","y","GeneratorFunction","GeneratorFunctionPrototype","p","d","getPrototypeOf","v","values","g","defineIteratorMethods","forEach","_invoke","AsyncIterator","invoke","_typeof","resolve","__await","then","callInvokeWithMethodAndArg","done","delegate","maybeInvokeDelegate","sent","_sent","dispatchException","abrupt","TypeError","resultName","next","nextLoc","pushTryEntry","tryLoc","catchLoc","finallyLoc","afterLoc","tryEntries","resetTryEntry","completion","reset","isNaN","displayName","isGeneratorFunction","mark","setPrototypeOf","__proto__","awrap","Promise","reverse","pop","prev","charAt","slice","stop","rval","handle","complete","finish","delegateYield","asyncGeneratorStep","gen","reject","_next","_throw","info","_asyncToGenerator","fn","self","args","arguments","apply","err","aleo","defaultHost","programManager","postMessage","lastLocalProgram","addEventListener","ev","_ev$data","localProgram","aleoFunction","startTime","performance","now","_callee","privateKeyObject","program_id","keyParams","_context","hasFunction","concat","getOutputs","t0","errorMessage","_ev$data2","remoteProgram","_callee2","_context2","executeTransaction","_ev$data3","_callee3","_programManager$keyPr","_programManager$keyPr2","executeFee","_context3","getFunctions","estimateExecutionFee","executionFee","Number","_ev$data4","_callee4","deploymentFee","_context4","estimateDeploymentFee","_ev$data5","amountCredits","transfer_type","_callee5","_context5","transferTransaction","_ev$data6","_callee6","programExists","_context6","deployTransaction","t1","_ev$data7","_callee7","_context7","splitTransaction","_ev$data8","_callee8","_context8","joinTransaction"],"sourceRoot":""} \ No newline at end of file diff --git a/38c18e22c4f37629c446.wasm b/38c18e22c4f37629c446.wasm new file mode 100644 index 000000000..7d6ef6365 Binary files /dev/null and b/38c18e22c4f37629c446.wasm differ diff --git a/2d6a4d794221941c07b8.js b/3ebf0bb8781b6d786343.js similarity index 97% rename from 2d6a4d794221941c07b8.js rename to 3ebf0bb8781b6d786343.js index 3e211abae..d1dd014b1 100644 --- a/2d6a4d794221941c07b8.js +++ b/3ebf0bb8781b6d786343.js @@ -1 +1 @@ -let _;const t=new Array(128).fill(void 0);function e(_){return t[_]}t.push(void 0,null,!0,!1);let r=t.length;function n(_){const n=e(_);return function(_){_<132||(t[_]=r,r=_)}(_),n}const i="undefined"!=typeof TextDecoder?new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0}):{decode:()=>{throw Error("TextDecoder not available")}};"undefined"!=typeof TextDecoder&&i.decode();let o=null;function a(){return null!==o&&o.buffer===_.memory.buffer||(o=new Uint8Array(_.memory.buffer)),o}function s(_,t){return _>>>=0,i.decode(a().slice(_,_+t))}function c(_){r===t.length&&t.push(t.length+1);const e=r;return r=t[e],t[e]=_,e}let g=0;const w="undefined"!=typeof TextEncoder?new TextEncoder("utf-8"):{encode:()=>{throw Error("TextEncoder not available")}},d=function(_,t){const e=w.encode(_);return t.set(e),{read:_.length,written:e.length}};function b(_,t,e){if(void 0===e){const e=w.encode(_),r=t(e.length,1)>>>0;return a().subarray(r,r+e.length).set(e),g=e.length,r}let r=_.length,n=t(r,1)>>>0;const i=a();let o=0;for(;o127)break;i[n+o]=t}if(o!==r){0!==o&&(_=_.slice(o)),n=e(n,r,r=o+3*_.length,1)>>>0;const t=a().subarray(n+o,n+r);o+=d(_,t).written,n=e(n,r,o,1)>>>0}return g=o,n}function l(_){return null==_}let u=null;function f(){return null!==u&&u.buffer===_.memory.buffer||(u=new Int32Array(_.memory.buffer)),u}function p(_){const t=typeof _;if("number"==t||"boolean"==t||null==_)return`${_}`;if("string"==t)return`"${_}"`;if("symbol"==t){const t=_.description;return null==t?"Symbol":`Symbol(${t})`}if("function"==t){const t=_.name;return"string"==typeof t&&t.length>0?`Function(${t})`:"Function"}if(Array.isArray(_)){const t=_.length;let e="[";t>0&&(e+=p(_[0]));for(let r=1;r1))return toString.call(_);if(r=e[1],"Object"==r)try{return"Object("+JSON.stringify(_)+")"}catch(_){return"Object"}return _ instanceof Error?`${_.name}: ${_.message}\n${_.stack}`:r}const y="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((t=>{_.__wbindgen_export_3.get(t.dtor)(t.a,t.b)}));function m(t,e,r,n){const i={a:t,b:e,cnt:1,dtor:r},o=(...t)=>{i.cnt++;const e=i.a;i.a=0;try{return n(e,i.b,...t)}finally{0==--i.cnt?(_.__wbindgen_export_3.get(i.dtor)(e,i.b),y.unregister(i)):i.a=e}};return o.original=i,y.register(o,i,i),o}function h(t,e,r){_._dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h467700a9696faab3(t,e,c(r))}function v(_,t){if(!(_ instanceof t))throw new Error(`expected instance of ${t.name}`);return _.ptr}function k(_,t){const e=t(1*_.length,1)>>>0;return a().set(_,e/1),g=_.length,e}let P=null;function S(){return null!==P&&P.buffer===_.memory.buffer||(P=new BigInt64Array(_.memory.buffer)),P}function V(_,t){return _>>>=0,a().subarray(_/1,_/1+t)}function x(t,e){try{return t.apply(this,e)}catch(t){_.__wbindgen_exn_store(c(t))}}const F="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((t=>_.__wbg_address_free(t>>>0)));class T{static __wrap(_){_>>>=0;const t=Object.create(T.prototype);return t.__wbg_ptr=_,F.register(t,t.__wbg_ptr,t),t}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,F.unregister(this),_}free(){const t=this.__destroy_into_raw();_.__wbg_address_free(t)}static from_private_key(t){v(t,W);const e=_.address_from_private_key(t.__wbg_ptr);return T.__wrap(e)}static from_view_key(t){v(t,a_);const e=_.address_from_view_key(t.__wbg_ptr);return T.__wrap(e)}static from_string(t){const e=b(t,_.__wbindgen_malloc,_.__wbindgen_realloc),r=g,n=_.address_from_string(e,r);return T.__wrap(n)}to_string(){let t,e;try{const i=_.__wbindgen_add_to_stack_pointer(-16);_.address_to_string(i,this.__wbg_ptr);var r=f()[i/4+0],n=f()[i/4+1];return t=r,e=n,s(r,n)}finally{_.__wbindgen_add_to_stack_pointer(16),_.__wbindgen_free(t,e,1)}}verify(t,e){const r=k(t,_.__wbindgen_malloc),n=g;v(e,t_);return 0!==_.address_verify(this.__wbg_ptr,r,n,e.__wbg_ptr)}}const R="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((t=>_.__wbg_execution_free(t>>>0)));class z{static __wrap(_){_>>>=0;const t=Object.create(z.prototype);return t.__wbg_ptr=_,R.register(t,t.__wbg_ptr,t),t}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,R.unregister(this),_}free(){const t=this.__destroy_into_raw();_.__wbg_execution_free(t)}toString(){let t,e;try{const i=_.__wbindgen_add_to_stack_pointer(-16);_.execution_toString(i,this.__wbg_ptr);var r=f()[i/4+0],n=f()[i/4+1];return t=r,e=n,s(r,n)}finally{_.__wbindgen_add_to_stack_pointer(16),_.__wbindgen_free(t,e,1)}}static fromString(t){try{const i=_.__wbindgen_add_to_stack_pointer(-16),o=b(t,_.__wbindgen_malloc,_.__wbindgen_realloc),a=g;_.execution_fromString(i,o,a);var e=f()[i/4+0],r=f()[i/4+1];if(f()[i/4+2])throw n(r);return z.__wrap(e)}finally{_.__wbindgen_add_to_stack_pointer(16)}}}const A="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((t=>_.__wbg_executionresponse_free(t>>>0)));class O{static __wrap(_){_>>>=0;const t=Object.create(O.prototype);return t.__wbg_ptr=_,A.register(t,t.__wbg_ptr,t),t}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,A.unregister(this),_}free(){const t=this.__destroy_into_raw();_.__wbg_executionresponse_free(t)}getOutputs(){return n(_.executionresponse_getOutputs(this.__wbg_ptr))}getExecution(){const t=_.executionresponse_getExecution(this.__wbg_ptr);return 0===t?void 0:z.__wrap(t)}getKeys(){try{const r=_.__wbindgen_add_to_stack_pointer(-16);_.executionresponse_getKeys(r,this.__wbg_ptr);var t=f()[r/4+0],e=f()[r/4+1];if(f()[r/4+2])throw n(e);return E.__wrap(t)}finally{_.__wbindgen_add_to_stack_pointer(16)}}getProvingKey(){const t=_.executionresponse_getProvingKey(this.__wbg_ptr);return 0===t?void 0:Q.__wrap(t)}getVerifyingKey(){const t=_.executionresponse_getVerifyingKey(this.__wbg_ptr);return i_.__wrap(t)}getFunctionId(){let t,e;try{const i=_.__wbindgen_add_to_stack_pointer(-16);_.executionresponse_getFunctionId(i,this.__wbg_ptr);var r=f()[i/4+0],n=f()[i/4+1];return t=r,e=n,s(r,n)}finally{_.__wbindgen_add_to_stack_pointer(16),_.__wbindgen_free(t,e,1)}}getProgram(){const t=_.executionresponse_getProgram(this.__wbg_ptr);return J.__wrap(t)}}const j="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((t=>_.__wbg_field_free(t>>>0)));class K{static __wrap(_){_>>>=0;const t=Object.create(K.prototype);return t.__wbg_ptr=_,j.register(t,t.__wbg_ptr,t),t}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,j.unregister(this),_}free(){const t=this.__destroy_into_raw();_.__wbg_field_free(t)}toString(){let t,e;try{const i=_.__wbindgen_add_to_stack_pointer(-16);_.field_toString(i,this.__wbg_ptr);var r=f()[i/4+0],n=f()[i/4+1];return t=r,e=n,s(r,n)}finally{_.__wbindgen_add_to_stack_pointer(16),_.__wbindgen_free(t,e,1)}}static fromString(t){try{const i=_.__wbindgen_add_to_stack_pointer(-16),o=b(t,_.__wbindgen_malloc,_.__wbindgen_realloc),a=g;_.field_fromString(i,o,a);var e=f()[i/4+0],r=f()[i/4+1];if(f()[i/4+2])throw n(r);return K.__wrap(e)}finally{_.__wbindgen_add_to_stack_pointer(16)}}}const M="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((t=>_.__wbg_keypair_free(t>>>0)));class E{static __wrap(_){_>>>=0;const t=Object.create(E.prototype);return t.__wbg_ptr=_,M.register(t,t.__wbg_ptr,t),t}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,M.unregister(this),_}free(){const t=this.__destroy_into_raw();_.__wbg_keypair_free(t)}constructor(t,e){v(t,Q);var r=t.__destroy_into_raw();v(e,i_);var n=e.__destroy_into_raw();const i=_.keypair_new(r,n);return this.__wbg_ptr=i>>>0,this}provingKey(){try{const r=_.__wbindgen_add_to_stack_pointer(-16);_.keypair_provingKey(r,this.__wbg_ptr);var t=f()[r/4+0],e=f()[r/4+1];if(f()[r/4+2])throw n(e);return Q.__wrap(t)}finally{_.__wbindgen_add_to_stack_pointer(16)}}verifyingKey(){try{const r=_.__wbindgen_add_to_stack_pointer(-16);_.keypair_verifyingKey(r,this.__wbg_ptr);var t=f()[r/4+0],e=f()[r/4+1];if(f()[r/4+2])throw n(e);return i_.__wrap(t)}finally{_.__wbindgen_add_to_stack_pointer(16)}}}const B="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((t=>_.__wbg_metadata_free(t>>>0)));class I{static __wrap(_){_>>>=0;const t=Object.create(I.prototype);return t.__wbg_ptr=_,B.register(t,t.__wbg_ptr,t),t}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,B.unregister(this),_}free(){const t=this.__destroy_into_raw();_.__wbg_metadata_free(t)}get name(){let t,e;try{const i=_.__wbindgen_add_to_stack_pointer(-16);_.__wbg_get_metadata_name(i,this.__wbg_ptr);var r=f()[i/4+0],n=f()[i/4+1];return t=r,e=n,s(r,n)}finally{_.__wbindgen_add_to_stack_pointer(16),_.__wbindgen_free(t,e,1)}}set name(t){const e=b(t,_.__wbindgen_malloc,_.__wbindgen_realloc),r=g;_.__wbg_set_metadata_name(this.__wbg_ptr,e,r)}get locator(){let t,e;try{const i=_.__wbindgen_add_to_stack_pointer(-16);_.__wbg_get_metadata_locator(i,this.__wbg_ptr);var r=f()[i/4+0],n=f()[i/4+1];return t=r,e=n,s(r,n)}finally{_.__wbindgen_add_to_stack_pointer(16),_.__wbindgen_free(t,e,1)}}set locator(t){const e=b(t,_.__wbindgen_malloc,_.__wbindgen_realloc),r=g;_.__wbg_set_metadata_locator(this.__wbg_ptr,e,r)}get prover(){let t,e;try{const i=_.__wbindgen_add_to_stack_pointer(-16);_.__wbg_get_metadata_prover(i,this.__wbg_ptr);var r=f()[i/4+0],n=f()[i/4+1];return t=r,e=n,s(r,n)}finally{_.__wbindgen_add_to_stack_pointer(16),_.__wbindgen_free(t,e,1)}}set prover(t){const e=b(t,_.__wbindgen_malloc,_.__wbindgen_realloc),r=g;_.__wbg_set_metadata_prover(this.__wbg_ptr,e,r)}get verifier(){let t,e;try{const i=_.__wbindgen_add_to_stack_pointer(-16);_.__wbg_get_metadata_verifier(i,this.__wbg_ptr);var r=f()[i/4+0],n=f()[i/4+1];return t=r,e=n,s(r,n)}finally{_.__wbindgen_add_to_stack_pointer(16),_.__wbindgen_free(t,e,1)}}set verifier(t){const e=b(t,_.__wbindgen_malloc,_.__wbindgen_realloc),r=g;_.__wbg_set_metadata_verifier(this.__wbg_ptr,e,r)}get verifyingKey(){let t,e;try{const i=_.__wbindgen_add_to_stack_pointer(-16);_.__wbg_get_metadata_verifyingKey(i,this.__wbg_ptr);var r=f()[i/4+0],n=f()[i/4+1];return t=r,e=n,s(r,n)}finally{_.__wbindgen_add_to_stack_pointer(16),_.__wbindgen_free(t,e,1)}}set verifyingKey(t){const e=b(t,_.__wbindgen_malloc,_.__wbindgen_realloc),r=g;_.__wbg_set_metadata_verifyingKey(this.__wbg_ptr,e,r)}static baseUrl(){let t,e;try{const i=_.__wbindgen_add_to_stack_pointer(-16);_.metadata_baseUrl(i);var r=f()[i/4+0],n=f()[i/4+1];return t=r,e=n,s(r,n)}finally{_.__wbindgen_add_to_stack_pointer(16),_.__wbindgen_free(t,e,1)}}static bond_public(){const t=_.metadata_bond_public();return I.__wrap(t)}static bond_validator(){const t=_.metadata_bond_validator();return I.__wrap(t)}static claim_unbond_public(){const t=_.metadata_claim_unbond_public();return I.__wrap(t)}static fee_private(){const t=_.metadata_fee_private();return I.__wrap(t)}static fee_public(){const t=_.metadata_fee_public();return I.__wrap(t)}static inclusion(){const t=_.metadata_inclusion();return I.__wrap(t)}static join(){const t=_.metadata_join();return I.__wrap(t)}static set_validator_state(){const t=_.metadata_set_validator_state();return I.__wrap(t)}static split(){const t=_.metadata_split();return I.__wrap(t)}static transfer_private(){const t=_.metadata_transfer_private();return I.__wrap(t)}static transfer_private_to_public(){const t=_.metadata_transfer_private_to_public();return I.__wrap(t)}static transfer_public(){const t=_.metadata_transfer_public();return I.__wrap(t)}static transfer_public_as_signer(){const t=_.metadata_transfer_public_as_signer();return I.__wrap(t)}static transfer_public_to_private(){const t=_.metadata_transfer_public_to_private();return I.__wrap(t)}static unbond_public(){const t=_.metadata_unbond_public();return I.__wrap(t)}}const U="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((t=>_.__wbg_offlinequery_free(t>>>0)));class C{static __wrap(_){_>>>=0;const t=Object.create(C.prototype);return t.__wbg_ptr=_,U.register(t,t.__wbg_ptr,t),t}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,U.unregister(this),_}free(){const t=this.__destroy_into_raw();_.__wbg_offlinequery_free(t)}constructor(t){try{const i=_.__wbindgen_add_to_stack_pointer(-16),o=b(t,_.__wbindgen_malloc,_.__wbindgen_realloc),a=g;_.offlinequery_new(i,o,a);var e=f()[i/4+0],r=f()[i/4+1];if(f()[i/4+2])throw n(r);return this.__wbg_ptr=e>>>0,this}finally{_.__wbindgen_add_to_stack_pointer(16)}}addStatePath(t,e){try{const i=_.__wbindgen_add_to_stack_pointer(-16),o=b(t,_.__wbindgen_malloc,_.__wbindgen_realloc),a=g,s=b(e,_.__wbindgen_malloc,_.__wbindgen_realloc),c=g;_.offlinequery_addStatePath(i,this.__wbg_ptr,o,a,s,c);var r=f()[i/4+0];if(f()[i/4+1])throw n(r)}finally{_.__wbindgen_add_to_stack_pointer(16)}}toString(){let t,e;try{const i=_.__wbindgen_add_to_stack_pointer(-16);_.offlinequery_toString(i,this.__wbg_ptr);var r=f()[i/4+0],n=f()[i/4+1];return t=r,e=n,s(r,n)}finally{_.__wbindgen_add_to_stack_pointer(16),_.__wbindgen_free(t,e,1)}}static fromString(t){try{const i=_.__wbindgen_add_to_stack_pointer(-16),o=b(t,_.__wbindgen_malloc,_.__wbindgen_realloc),a=g;_.offlinequery_fromString(i,o,a);var e=f()[i/4+0],r=f()[i/4+1];if(f()[i/4+2])throw n(r);return C.__wrap(e)}finally{_.__wbindgen_add_to_stack_pointer(16)}}}const q="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((t=>_.__wbg_privatekey_free(t>>>0)));class W{static __wrap(_){_>>>=0;const t=Object.create(W.prototype);return t.__wbg_ptr=_,q.register(t,t.__wbg_ptr,t),t}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,q.unregister(this),_}free(){const t=this.__destroy_into_raw();_.__wbg_privatekey_free(t)}constructor(){const t=_.privatekey_new();return this.__wbg_ptr=t>>>0,this}static from_seed_unchecked(t){const e=k(t,_.__wbindgen_malloc),r=g,n=_.privatekey_from_seed_unchecked(e,r);return W.__wrap(n)}static from_string(t){try{const i=_.__wbindgen_add_to_stack_pointer(-16),o=b(t,_.__wbindgen_malloc,_.__wbindgen_realloc),a=g;_.privatekey_from_string(i,o,a);var e=f()[i/4+0],r=f()[i/4+1];if(f()[i/4+2])throw n(r);return W.__wrap(e)}finally{_.__wbindgen_add_to_stack_pointer(16)}}to_string(){let t,e;try{const i=_.__wbindgen_add_to_stack_pointer(-16);_.privatekey_to_string(i,this.__wbg_ptr);var r=f()[i/4+0],n=f()[i/4+1];return t=r,e=n,s(r,n)}finally{_.__wbindgen_add_to_stack_pointer(16),_.__wbindgen_free(t,e,1)}}to_view_key(){const t=_.privatekey_to_view_key(this.__wbg_ptr);return a_.__wrap(t)}to_address(){const t=_.privatekey_to_address(this.__wbg_ptr);return T.__wrap(t)}sign(t){const e=k(t,_.__wbindgen_malloc),r=g,n=_.privatekey_sign(this.__wbg_ptr,e,r);return t_.__wrap(n)}static newEncrypted(t){try{const i=_.__wbindgen_add_to_stack_pointer(-16),o=b(t,_.__wbindgen_malloc,_.__wbindgen_realloc),a=g;_.privatekey_newEncrypted(i,o,a);var e=f()[i/4+0],r=f()[i/4+1];if(f()[i/4+2])throw n(r);return $.__wrap(e)}finally{_.__wbindgen_add_to_stack_pointer(16)}}toCiphertext(t){try{const i=_.__wbindgen_add_to_stack_pointer(-16),o=b(t,_.__wbindgen_malloc,_.__wbindgen_realloc),a=g;_.privatekey_toCiphertext(i,this.__wbg_ptr,o,a);var e=f()[i/4+0],r=f()[i/4+1];if(f()[i/4+2])throw n(r);return $.__wrap(e)}finally{_.__wbindgen_add_to_stack_pointer(16)}}static fromPrivateKeyCiphertext(t,e){try{const o=_.__wbindgen_add_to_stack_pointer(-16);v(t,$);const a=b(e,_.__wbindgen_malloc,_.__wbindgen_realloc),s=g;_.privatekey_fromPrivateKeyCiphertext(o,t.__wbg_ptr,a,s);var r=f()[o/4+0],i=f()[o/4+1];if(f()[o/4+2])throw n(i);return W.__wrap(r)}finally{_.__wbindgen_add_to_stack_pointer(16)}}}const N="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((t=>_.__wbg_privatekeyciphertext_free(t>>>0)));class ${static __wrap(_){_>>>=0;const t=Object.create($.prototype);return t.__wbg_ptr=_,N.register(t,t.__wbg_ptr,t),t}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,N.unregister(this),_}free(){const t=this.__destroy_into_raw();_.__wbg_privatekeyciphertext_free(t)}static encryptPrivateKey(t,e){try{const o=_.__wbindgen_add_to_stack_pointer(-16);v(t,W);const a=b(e,_.__wbindgen_malloc,_.__wbindgen_realloc),s=g;_.privatekey_toCiphertext(o,t.__wbg_ptr,a,s);var r=f()[o/4+0],i=f()[o/4+1];if(f()[o/4+2])throw n(i);return $.__wrap(r)}finally{_.__wbindgen_add_to_stack_pointer(16)}}decryptToPrivateKey(t){try{const i=_.__wbindgen_add_to_stack_pointer(-16),o=b(t,_.__wbindgen_malloc,_.__wbindgen_realloc),a=g;_.privatekeyciphertext_decryptToPrivateKey(i,this.__wbg_ptr,o,a);var e=f()[i/4+0],r=f()[i/4+1];if(f()[i/4+2])throw n(r);return W.__wrap(e)}finally{_.__wbindgen_add_to_stack_pointer(16)}}toString(){let t,e;try{const i=_.__wbindgen_add_to_stack_pointer(-16);_.privatekeyciphertext_toString(i,this.__wbg_ptr);var r=f()[i/4+0],n=f()[i/4+1];return t=r,e=n,s(r,n)}finally{_.__wbindgen_add_to_stack_pointer(16),_.__wbindgen_free(t,e,1)}}static fromString(t){try{const i=_.__wbindgen_add_to_stack_pointer(-16),o=b(t,_.__wbindgen_malloc,_.__wbindgen_realloc),a=g;_.privatekeyciphertext_fromString(i,o,a);var e=f()[i/4+0],r=f()[i/4+1];if(f()[i/4+2])throw n(r);return $.__wrap(e)}finally{_.__wbindgen_add_to_stack_pointer(16)}}}const D="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((t=>_.__wbg_program_free(t>>>0)));class J{static __wrap(_){_>>>=0;const t=Object.create(J.prototype);return t.__wbg_ptr=_,D.register(t,t.__wbg_ptr,t),t}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,D.unregister(this),_}free(){const t=this.__destroy_into_raw();_.__wbg_program_free(t)}static fromString(t){try{const i=_.__wbindgen_add_to_stack_pointer(-16),o=b(t,_.__wbindgen_malloc,_.__wbindgen_realloc),a=g;_.program_fromString(i,o,a);var e=f()[i/4+0],r=f()[i/4+1];if(f()[i/4+2])throw n(r);return J.__wrap(e)}finally{_.__wbindgen_add_to_stack_pointer(16)}}toString(){let t,e;try{const i=_.__wbindgen_add_to_stack_pointer(-16);_.program_toString(i,this.__wbg_ptr);var r=f()[i/4+0],n=f()[i/4+1];return t=r,e=n,s(r,n)}finally{_.__wbindgen_add_to_stack_pointer(16),_.__wbindgen_free(t,e,1)}}hasFunction(t){const e=b(t,_.__wbindgen_malloc,_.__wbindgen_realloc),r=g;return 0!==_.program_hasFunction(this.__wbg_ptr,e,r)}getFunctions(){return n(_.program_getFunctions(this.__wbg_ptr))}getFunctionInputs(t){try{const i=_.__wbindgen_add_to_stack_pointer(-16),o=b(t,_.__wbindgen_malloc,_.__wbindgen_realloc),a=g;_.program_getFunctionInputs(i,this.__wbg_ptr,o,a);var e=f()[i/4+0],r=f()[i/4+1];if(f()[i/4+2])throw n(r);return n(e)}finally{_.__wbindgen_add_to_stack_pointer(16)}}getMappings(){try{const r=_.__wbindgen_add_to_stack_pointer(-16);_.program_getMappings(r,this.__wbg_ptr);var t=f()[r/4+0],e=f()[r/4+1];if(f()[r/4+2])throw n(e);return n(t)}finally{_.__wbindgen_add_to_stack_pointer(16)}}getRecordMembers(t){try{const i=_.__wbindgen_add_to_stack_pointer(-16),o=b(t,_.__wbindgen_malloc,_.__wbindgen_realloc),a=g;_.program_getRecordMembers(i,this.__wbg_ptr,o,a);var e=f()[i/4+0],r=f()[i/4+1];if(f()[i/4+2])throw n(r);return n(e)}finally{_.__wbindgen_add_to_stack_pointer(16)}}getStructMembers(t){try{const i=_.__wbindgen_add_to_stack_pointer(-16),o=b(t,_.__wbindgen_malloc,_.__wbindgen_realloc),a=g;_.program_getStructMembers(i,this.__wbg_ptr,o,a);var e=f()[i/4+0],r=f()[i/4+1];if(f()[i/4+2])throw n(r);return n(e)}finally{_.__wbindgen_add_to_stack_pointer(16)}}static getCreditsProgram(){const t=_.program_getCreditsProgram();return J.__wrap(t)}id(){let t,e;try{const i=_.__wbindgen_add_to_stack_pointer(-16);_.program_id(i,this.__wbg_ptr);var r=f()[i/4+0],n=f()[i/4+1];return t=r,e=n,s(r,n)}finally{_.__wbindgen_add_to_stack_pointer(16),_.__wbindgen_free(t,e,1)}}address(){try{const r=_.__wbindgen_add_to_stack_pointer(-16);_.program_address(r,this.__wbg_ptr);var t=f()[r/4+0],e=f()[r/4+1];if(f()[r/4+2])throw n(e);return T.__wrap(t)}finally{_.__wbindgen_add_to_stack_pointer(16)}}isEqual(t){v(t,J);return 0!==_.program_isEqual(this.__wbg_ptr,t.__wbg_ptr)}getImports(){return n(_.program_getImports(this.__wbg_ptr))}}const H="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((t=>_.__wbg_programmanager_free(t>>>0)));const L="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((t=>_.__wbg_provingkey_free(t>>>0)));class Q{static __wrap(_){_>>>=0;const t=Object.create(Q.prototype);return t.__wbg_ptr=_,L.register(t,t.__wbg_ptr,t),t}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,L.unregister(this),_}free(){const t=this.__destroy_into_raw();_.__wbg_provingkey_free(t)}isBondPublicProver(){return 0!==_.provingkey_isBondPublicProver(this.__wbg_ptr)}isBondValidatorProver(){return 0!==_.provingkey_isBondValidatorProver(this.__wbg_ptr)}isClaimUnbondPublicProver(){return 0!==_.provingkey_isClaimUnbondPublicProver(this.__wbg_ptr)}isFeePrivateProver(){return 0!==_.provingkey_isFeePrivateProver(this.__wbg_ptr)}isFeePublicProver(){return 0!==_.provingkey_isFeePublicProver(this.__wbg_ptr)}isInclusionProver(){return 0!==_.provingkey_isInclusionProver(this.__wbg_ptr)}isJoinProver(){return 0!==_.provingkey_isJoinProver(this.__wbg_ptr)}isSetValidatorStateProver(){return 0!==_.provingkey_isSetValidatorStateProver(this.__wbg_ptr)}isSplitProver(){return 0!==_.provingkey_isSplitProver(this.__wbg_ptr)}isTransferPrivateProver(){return 0!==_.provingkey_isTransferPrivateProver(this.__wbg_ptr)}isTransferPrivateToPublicProver(){return 0!==_.provingkey_isTransferPrivateToPublicProver(this.__wbg_ptr)}isTransferPublicProver(){return 0!==_.provingkey_isTransferPublicProver(this.__wbg_ptr)}isTransferPublicAsSignerProver(){return 0!==_.provingkey_isTransferPublicAsSignerProver(this.__wbg_ptr)}isTransferPublicToPrivateProver(){return 0!==_.provingkey_isTransferPublicToPrivateProver(this.__wbg_ptr)}isUnbondPublicProver(){return 0!==_.provingkey_isUnbondPublicProver(this.__wbg_ptr)}checksum(){let t,e;try{const i=_.__wbindgen_add_to_stack_pointer(-16);_.provingkey_checksum(i,this.__wbg_ptr);var r=f()[i/4+0],n=f()[i/4+1];return t=r,e=n,s(r,n)}finally{_.__wbindgen_add_to_stack_pointer(16),_.__wbindgen_free(t,e,1)}}copy(){const t=_.provingkey_copy(this.__wbg_ptr);return Q.__wrap(t)}static fromBytes(t){try{const i=_.__wbindgen_add_to_stack_pointer(-16),o=k(t,_.__wbindgen_malloc),a=g;_.provingkey_fromBytes(i,o,a);var e=f()[i/4+0],r=f()[i/4+1];if(f()[i/4+2])throw n(r);return Q.__wrap(e)}finally{_.__wbindgen_add_to_stack_pointer(16)}}static fromString(t){try{const i=_.__wbindgen_add_to_stack_pointer(-16),o=b(t,_.__wbindgen_malloc,_.__wbindgen_realloc),a=g;_.provingkey_fromString(i,o,a);var e=f()[i/4+0],r=f()[i/4+1];if(f()[i/4+2])throw n(r);return Q.__wrap(e)}finally{_.__wbindgen_add_to_stack_pointer(16)}}toBytes(){try{const o=_.__wbindgen_add_to_stack_pointer(-16);_.provingkey_toBytes(o,this.__wbg_ptr);var t=f()[o/4+0],e=f()[o/4+1],r=f()[o/4+2];if(f()[o/4+3])throw n(r);var i=V(t,e).slice();return _.__wbindgen_free(t,1*e,1),i}finally{_.__wbindgen_add_to_stack_pointer(16)}}toString(){let t,e;try{const i=_.__wbindgen_add_to_stack_pointer(-16);_.provingkey_toString(i,this.__wbg_ptr);var r=f()[i/4+0],n=f()[i/4+1];return t=r,e=n,s(r,n)}finally{_.__wbindgen_add_to_stack_pointer(16),_.__wbindgen_free(t,e,1)}}}const X="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((t=>_.__wbg_recordciphertext_free(t>>>0)));class G{static __wrap(_){_>>>=0;const t=Object.create(G.prototype);return t.__wbg_ptr=_,X.register(t,t.__wbg_ptr,t),t}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,X.unregister(this),_}free(){const t=this.__destroy_into_raw();_.__wbg_recordciphertext_free(t)}static fromString(t){try{const i=_.__wbindgen_add_to_stack_pointer(-16),o=b(t,_.__wbindgen_malloc,_.__wbindgen_realloc),a=g;_.recordciphertext_fromString(i,o,a);var e=f()[i/4+0],r=f()[i/4+1];if(f()[i/4+2])throw n(r);return G.__wrap(e)}finally{_.__wbindgen_add_to_stack_pointer(16)}}toString(){let t,e;try{const i=_.__wbindgen_add_to_stack_pointer(-16);_.recordciphertext_toString(i,this.__wbg_ptr);var r=f()[i/4+0],n=f()[i/4+1];return t=r,e=n,s(r,n)}finally{_.__wbindgen_add_to_stack_pointer(16),_.__wbindgen_free(t,e,1)}}decrypt(t){try{const i=_.__wbindgen_add_to_stack_pointer(-16);v(t,a_),_.recordciphertext_decrypt(i,this.__wbg_ptr,t.__wbg_ptr);var e=f()[i/4+0],r=f()[i/4+1];if(f()[i/4+2])throw n(r);return Z.__wrap(e)}finally{_.__wbindgen_add_to_stack_pointer(16)}}isOwner(t){v(t,a_);return 0!==_.recordciphertext_isOwner(this.__wbg_ptr,t.__wbg_ptr)}}const Y="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((t=>_.__wbg_recordplaintext_free(t>>>0)));class Z{static __wrap(_){_>>>=0;const t=Object.create(Z.prototype);return t.__wbg_ptr=_,Y.register(t,t.__wbg_ptr,t),t}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,Y.unregister(this),_}free(){const t=this.__destroy_into_raw();_.__wbg_recordplaintext_free(t)}commitment(t,e){try{const o=_.__wbindgen_add_to_stack_pointer(-16),a=b(t,_.__wbindgen_malloc,_.__wbindgen_realloc),s=g,c=b(e,_.__wbindgen_malloc,_.__wbindgen_realloc),w=g;_.recordplaintext_commitment(o,this.__wbg_ptr,a,s,c,w);var r=f()[o/4+0],i=f()[o/4+1];if(f()[o/4+2])throw n(i);return K.__wrap(r)}finally{_.__wbindgen_add_to_stack_pointer(16)}}static fromString(t){try{const i=_.__wbindgen_add_to_stack_pointer(-16),o=b(t,_.__wbindgen_malloc,_.__wbindgen_realloc),a=g;_.recordplaintext_fromString(i,o,a);var e=f()[i/4+0],r=f()[i/4+1];if(f()[i/4+2])throw n(r);return Z.__wrap(e)}finally{_.__wbindgen_add_to_stack_pointer(16)}}toString(){let t,e;try{const i=_.__wbindgen_add_to_stack_pointer(-16);_.recordplaintext_toString(i,this.__wbg_ptr);var r=f()[i/4+0],n=f()[i/4+1];return t=r,e=n,s(r,n)}finally{_.__wbindgen_add_to_stack_pointer(16),_.__wbindgen_free(t,e,1)}}microcredits(){const t=_.recordplaintext_microcredits(this.__wbg_ptr);return BigInt.asUintN(64,t)}nonce(){let t,e;try{const i=_.__wbindgen_add_to_stack_pointer(-16);_.recordplaintext_nonce(i,this.__wbg_ptr);var r=f()[i/4+0],n=f()[i/4+1];return t=r,e=n,s(r,n)}finally{_.__wbindgen_add_to_stack_pointer(16),_.__wbindgen_free(t,e,1)}}serialNumberString(t,e,r){let i,o;try{const p=_.__wbindgen_add_to_stack_pointer(-16);v(t,W);const y=b(e,_.__wbindgen_malloc,_.__wbindgen_realloc),m=g,h=b(r,_.__wbindgen_malloc,_.__wbindgen_realloc),k=g;_.recordplaintext_serialNumberString(p,this.__wbg_ptr,t.__wbg_ptr,y,m,h,k);var a=f()[p/4+0],c=f()[p/4+1],w=f()[p/4+2],d=f()[p/4+3],l=a,u=c;if(d)throw l=0,u=0,n(w);return i=l,o=u,s(l,u)}finally{_.__wbindgen_add_to_stack_pointer(16),_.__wbindgen_free(i,o,1)}}}const __="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((t=>_.__wbg_signature_free(t>>>0)));class t_{static __wrap(_){_>>>=0;const t=Object.create(t_.prototype);return t.__wbg_ptr=_,__.register(t,t.__wbg_ptr,t),t}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,__.unregister(this),_}free(){const t=this.__destroy_into_raw();_.__wbg_signature_free(t)}static sign(t,e){v(t,W);const r=k(e,_.__wbindgen_malloc),n=g,i=_.privatekey_sign(t.__wbg_ptr,r,n);return t_.__wrap(i)}verify(t,e){v(t,T);const r=k(e,_.__wbindgen_malloc),n=g;return 0!==_.signature_verify(this.__wbg_ptr,t.__wbg_ptr,r,n)}static from_string(t){const e=b(t,_.__wbindgen_malloc,_.__wbindgen_realloc),r=g,n=_.signature_from_string(e,r);return t_.__wrap(n)}to_string(){let t,e;try{const i=_.__wbindgen_add_to_stack_pointer(-16);_.signature_to_string(i,this.__wbg_ptr);var r=f()[i/4+0],n=f()[i/4+1];return t=r,e=n,s(r,n)}finally{_.__wbindgen_add_to_stack_pointer(16),_.__wbindgen_free(t,e,1)}}}const e_="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((t=>_.__wbg_transaction_free(t>>>0)));class r_{static __wrap(_){_>>>=0;const t=Object.create(r_.prototype);return t.__wbg_ptr=_,e_.register(t,t.__wbg_ptr,t),t}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,e_.unregister(this),_}free(){const t=this.__destroy_into_raw();_.__wbg_transaction_free(t)}static fromString(t){try{const i=_.__wbindgen_add_to_stack_pointer(-16),o=b(t,_.__wbindgen_malloc,_.__wbindgen_realloc),a=g;_.transaction_fromString(i,o,a);var e=f()[i/4+0],r=f()[i/4+1];if(f()[i/4+2])throw n(r);return r_.__wrap(e)}finally{_.__wbindgen_add_to_stack_pointer(16)}}toString(){let t,e;try{const i=_.__wbindgen_add_to_stack_pointer(-16);_.transaction_toString(i,this.__wbg_ptr);var r=f()[i/4+0],n=f()[i/4+1];return t=r,e=n,s(r,n)}finally{_.__wbindgen_add_to_stack_pointer(16),_.__wbindgen_free(t,e,1)}}transactionId(){let t,e;try{const i=_.__wbindgen_add_to_stack_pointer(-16);_.transaction_transactionId(i,this.__wbg_ptr);var r=f()[i/4+0],n=f()[i/4+1];return t=r,e=n,s(r,n)}finally{_.__wbindgen_add_to_stack_pointer(16),_.__wbindgen_free(t,e,1)}}transactionType(){let t,e;try{const i=_.__wbindgen_add_to_stack_pointer(-16);_.transaction_transactionType(i,this.__wbg_ptr);var r=f()[i/4+0],n=f()[i/4+1];return t=r,e=n,s(r,n)}finally{_.__wbindgen_add_to_stack_pointer(16),_.__wbindgen_free(t,e,1)}}}const n_="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((t=>_.__wbg_verifyingkey_free(t>>>0)));class i_{static __wrap(_){_>>>=0;const t=Object.create(i_.prototype);return t.__wbg_ptr=_,n_.register(t,t.__wbg_ptr,t),t}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,n_.unregister(this),_}free(){const t=this.__destroy_into_raw();_.__wbg_verifyingkey_free(t)}static bondPublicVerifier(){const t=_.verifyingkey_bondPublicVerifier();return i_.__wrap(t)}static bondValidatorVerifier(){const t=_.verifyingkey_bondValidatorVerifier();return i_.__wrap(t)}static claimUnbondPublicVerifier(){const t=_.verifyingkey_claimUnbondPublicVerifier();return i_.__wrap(t)}static feePrivateVerifier(){const t=_.verifyingkey_feePrivateVerifier();return i_.__wrap(t)}static feePublicVerifier(){const t=_.verifyingkey_feePublicVerifier();return i_.__wrap(t)}static inclusionVerifier(){const t=_.verifyingkey_inclusionVerifier();return i_.__wrap(t)}static joinVerifier(){const t=_.verifyingkey_joinVerifier();return i_.__wrap(t)}static setValidatorStateVerifier(){const t=_.verifyingkey_setValidatorStateVerifier();return i_.__wrap(t)}static splitVerifier(){const t=_.verifyingkey_splitVerifier();return i_.__wrap(t)}static transferPrivateVerifier(){const t=_.verifyingkey_transferPrivateVerifier();return i_.__wrap(t)}static transferPrivateToPublicVerifier(){const t=_.verifyingkey_transferPrivateToPublicVerifier();return i_.__wrap(t)}static transferPublicVerifier(){const t=_.verifyingkey_transferPublicVerifier();return i_.__wrap(t)}static transferPublicAsSignerVerifier(){const t=_.verifyingkey_transferPublicAsSignerVerifier();return i_.__wrap(t)}static transferPublicToPrivateVerifier(){const t=_.verifyingkey_transferPublicToPrivateVerifier();return i_.__wrap(t)}static unbondPublicVerifier(){const t=_.verifyingkey_unbondPublicVerifier();return i_.__wrap(t)}isBondPublicVerifier(){return 0!==_.verifyingkey_isBondPublicVerifier(this.__wbg_ptr)}isBondValidatorVerifier(){return 0!==_.verifyingkey_isBondValidatorVerifier(this.__wbg_ptr)}isClaimUnbondPublicVerifier(){return 0!==_.verifyingkey_isClaimUnbondPublicVerifier(this.__wbg_ptr)}isFeePrivateVerifier(){return 0!==_.verifyingkey_isFeePrivateVerifier(this.__wbg_ptr)}isFeePublicVerifier(){return 0!==_.verifyingkey_isFeePublicVerifier(this.__wbg_ptr)}isInclusionVerifier(){return 0!==_.verifyingkey_isInclusionVerifier(this.__wbg_ptr)}isJoinVerifier(){return 0!==_.verifyingkey_isJoinVerifier(this.__wbg_ptr)}isSetValidatorStateVerifier(){return 0!==_.verifyingkey_isSetValidatorStateVerifier(this.__wbg_ptr)}isSplitVerifier(){return 0!==_.verifyingkey_isSplitVerifier(this.__wbg_ptr)}isTransferPrivateVerifier(){return 0!==_.verifyingkey_isTransferPrivateVerifier(this.__wbg_ptr)}isTransferPrivateToPublicVerifier(){return 0!==_.verifyingkey_isTransferPrivateToPublicVerifier(this.__wbg_ptr)}isTransferPublicVerifier(){return 0!==_.verifyingkey_isTransferPublicVerifier(this.__wbg_ptr)}isTransferPublicAsSignerVerifier(){return 0!==_.verifyingkey_isTransferPublicAsSignerVerifier(this.__wbg_ptr)}isTransferPublicToPrivateVerifier(){return 0!==_.verifyingkey_isTransferPublicToPrivateVerifier(this.__wbg_ptr)}isUnbondPublicVerifier(){return 0!==_.verifyingkey_isUnbondPublicVerifier(this.__wbg_ptr)}checksum(){let t,e;try{const i=_.__wbindgen_add_to_stack_pointer(-16);_.verifyingkey_checksum(i,this.__wbg_ptr);var r=f()[i/4+0],n=f()[i/4+1];return t=r,e=n,s(r,n)}finally{_.__wbindgen_add_to_stack_pointer(16),_.__wbindgen_free(t,e,1)}}copy(){const t=_.verifyingkey_copy(this.__wbg_ptr);return i_.__wrap(t)}static fromBytes(t){try{const i=_.__wbindgen_add_to_stack_pointer(-16),o=k(t,_.__wbindgen_malloc),a=g;_.verifyingkey_fromBytes(i,o,a);var e=f()[i/4+0],r=f()[i/4+1];if(f()[i/4+2])throw n(r);return i_.__wrap(e)}finally{_.__wbindgen_add_to_stack_pointer(16)}}static fromString(t){try{const i=_.__wbindgen_add_to_stack_pointer(-16),o=b(t,_.__wbindgen_malloc,_.__wbindgen_realloc),a=g;_.verifyingkey_fromString(i,o,a);var e=f()[i/4+0],r=f()[i/4+1];if(f()[i/4+2])throw n(r);return i_.__wrap(e)}finally{_.__wbindgen_add_to_stack_pointer(16)}}toBytes(){try{const o=_.__wbindgen_add_to_stack_pointer(-16);_.verifyingkey_toBytes(o,this.__wbg_ptr);var t=f()[o/4+0],e=f()[o/4+1],r=f()[o/4+2];if(f()[o/4+3])throw n(r);var i=V(t,e).slice();return _.__wbindgen_free(t,1*e,1),i}finally{_.__wbindgen_add_to_stack_pointer(16)}}toString(){let t,e;try{const i=_.__wbindgen_add_to_stack_pointer(-16);_.verifyingkey_toString(i,this.__wbg_ptr);var r=f()[i/4+0],n=f()[i/4+1];return t=r,e=n,s(r,n)}finally{_.__wbindgen_add_to_stack_pointer(16),_.__wbindgen_free(t,e,1)}}}const o_="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((t=>_.__wbg_viewkey_free(t>>>0)));class a_{static __wrap(_){_>>>=0;const t=Object.create(a_.prototype);return t.__wbg_ptr=_,o_.register(t,t.__wbg_ptr,t),t}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,o_.unregister(this),_}free(){const t=this.__destroy_into_raw();_.__wbg_viewkey_free(t)}static from_private_key(t){v(t,W);const e=_.privatekey_to_view_key(t.__wbg_ptr);return a_.__wrap(e)}static from_string(t){const e=b(t,_.__wbindgen_malloc,_.__wbindgen_realloc),r=g,n=_.viewkey_from_string(e,r);return a_.__wrap(n)}to_string(){let t,e;try{const i=_.__wbindgen_add_to_stack_pointer(-16);_.viewkey_to_string(i,this.__wbg_ptr);var r=f()[i/4+0],n=f()[i/4+1];return t=r,e=n,s(r,n)}finally{_.__wbindgen_add_to_stack_pointer(16),_.__wbindgen_free(t,e,1)}}to_address(){const t=_.address_from_view_key(this.__wbg_ptr);return T.__wrap(t)}decrypt(t){let e,r;try{const l=_.__wbindgen_add_to_stack_pointer(-16),u=b(t,_.__wbindgen_malloc,_.__wbindgen_realloc),p=g;_.viewkey_decrypt(l,this.__wbg_ptr,u,p);var i=f()[l/4+0],o=f()[l/4+1],a=f()[l/4+2],c=f()[l/4+3],w=i,d=o;if(c)throw w=0,d=0,n(a);return e=w,r=d,s(w,d)}finally{_.__wbindgen_add_to_stack_pointer(16),_.__wbindgen_free(e,r,1)}}}function s_(){const t={wbg:{}};return t.wbg.__wbindgen_object_drop_ref=function(_){n(_)},t.wbg.__wbg_new_71801a555ad9f2aa=function(){return x((function(){return c(new XMLHttpRequest)}),arguments)},t.wbg.__wbg_overrideMimeType_ee9c51919ceb418b=function(){return x((function(_,t,r){e(_).overrideMimeType(s(t,r))}),arguments)},t.wbg.__wbg_open_c9eb0cf2c9d95679=function(){return x((function(_,t,r,n,i,o){e(_).open(s(t,r),s(n,i),0!==o)}),arguments)},t.wbg.__wbg_send_80d29985093c1ec5=function(){return x((function(_){e(_).send()}),arguments)},t.wbg.__wbg_response_7c2e2759084f7279=function(){return x((function(_){return c(e(_).response)}),arguments)},t.wbg.__wbg_status_d485fb5a478426fb=function(){return x((function(_){return e(_).status}),arguments)},t.wbg.__wbg_new_72fb9a18b5ae2624=function(){return c(new Object)},t.wbg.__wbindgen_string_new=function(_,t){return c(s(_,t))},t.wbg.__wbg_set_1f9b04f170055d33=function(){return x((function(_,t,r){return Reflect.set(e(_),e(t),e(r))}),arguments)},t.wbg.__wbg_new_ab6fd82b10560829=function(){return x((function(){return c(new Headers)}),arguments)},t.wbg.__wbindgen_object_clone_ref=function(_){return c(e(_))},t.wbg.__wbg_new_0d76b0581eca6298=function(){return x((function(){return c(new AbortController)}),arguments)},t.wbg.__wbg_signal_a61f78a3478fd9bc=function(_){return c(e(_).signal)},t.wbg.__wbg_append_7bfcb4937d1d5e29=function(){return x((function(_,t,r,n,i){e(_).append(s(t,r),s(n,i))}),arguments)},t.wbg.__wbg_instanceof_Response_849eb93e75734b6e=function(_){let t;try{t=e(_)instanceof Response}catch(_){t=!1}return t},t.wbg.__wbg_status_61a01141acd3cf74=function(_){return e(_).status},t.wbg.__wbg_url_5f6dc4009ac5f99d=function(t,r){const n=b(e(r).url,_.__wbindgen_malloc,_.__wbindgen_realloc),i=g;f()[t/4+1]=i,f()[t/4+0]=n},t.wbg.__wbg_headers_9620bfada380764a=function(_){return c(e(_).headers)},t.wbg.__wbg_iterator_2cee6dadfd956dfa=function(){return c(Symbol.iterator)},t.wbg.__wbg_get_e3c254076557e348=function(){return x((function(_,t){return c(Reflect.get(e(_),e(t)))}),arguments)},t.wbg.__wbindgen_is_function=function(_){return"function"==typeof e(_)},t.wbg.__wbg_call_27c0f87801dedf93=function(){return x((function(_,t){return c(e(_).call(e(t)))}),arguments)},t.wbg.__wbindgen_is_object=function(_){const t=e(_);return"object"==typeof t&&null!==t},t.wbg.__wbg_next_40fc327bfc8770e6=function(_){return c(e(_).next)},t.wbg.__wbg_next_196c84450b364254=function(){return x((function(_){return c(e(_).next())}),arguments)},t.wbg.__wbg_done_298b57d23c0fc80c=function(_){return e(_).done},t.wbg.__wbg_value_d93c65011f51a456=function(_){return c(e(_).value)},t.wbg.__wbg_abort_2aa7521d5690750e=function(_){e(_).abort()},t.wbg.__wbg_stringify_8887fe74e1c50d81=function(){return x((function(_){return c(JSON.stringify(e(_)))}),arguments)},t.wbg.__wbindgen_string_get=function(t,r){const n=e(r),i="string"==typeof n?n:void 0;var o=l(i)?0:b(i,_.__wbindgen_malloc,_.__wbindgen_realloc),a=g;f()[t/4+1]=a,f()[t/4+0]=o},t.wbg.__wbg_log_0159ca40cddf5b15=function(_,t){console.log(s(_,t))},t.wbg.__wbindgen_bigint_from_u64=function(_){return c(BigInt.asUintN(64,_))},t.wbg.__wbg_call_b3ca7c6051f9bec1=function(){return x((function(_,t,r){return c(e(_).call(e(t),e(r)))}),arguments)},t.wbg.__wbg_transaction_new=function(_){return c(r_.__wrap(_))},t.wbg.__wbg_keypair_new=function(_){return c(E.__wrap(_))},t.wbg.__wbindgen_module=function(){return c(w_.__wbindgen_wasm_module)},t.wbg.__wbindgen_memory=function(){return c(_.memory)},t.wbg.__wbg_spawnWorker_f6acaddb2e29dc4a=function(_,t,r,n){return c(function(_,t,e,r){return new Promise((n=>{const i=new Worker(_,{type:"module"});i.addEventListener("message",(_=>{setTimeout((()=>{n(i),i.unref&&i.unref()}),0)}),{capture:!0,once:!0}),i.postMessage({module:t,memory:e,address:r})}))}(e(_),e(t),e(r),n>>>0))},t.wbg.__wbg_executionresponse_new=function(_){return c(O.__wrap(_))},t.wbg.__wbg_newwithlength_66ae46612e7f0234=function(_){return c(new Array(_>>>0))},t.wbg.__wbg_set_d4638f722068f043=function(_,t,r){e(_)[t>>>0]=n(r)},t.wbg.__wbindgen_cb_drop=function(_){const t=n(_).original;if(1==t.cnt--)return t.a=0,!0;return!1},t.wbg.__wbg_new_16b304a2cfa7ff4a=function(){return c(new Array)},t.wbg.__wbg_push_a5b05aedc7234f9f=function(_,t){return e(_).push(e(t))},t.wbg.__wbg_arrayBuffer_29931d52c7206b02=function(){return x((function(_){return c(e(_).arrayBuffer())}),arguments)},t.wbg.__wbg_new_63b92bc8671ed464=function(_){return c(new Uint8Array(e(_)))},t.wbg.__wbg_length_c20a40f15020d68a=function(_){return e(_).length},t.wbg.__wbg_new_81740750da40724f=function(t,e){try{var r={a:t,b:e};const n=new Promise(((t,e)=>{const n=r.a;r.a=0;try{return function(t,e,r,n){_.wasm_bindgen__convert__closures__invoke2_mut__h381bef3cd886b4c7(t,e,c(r),c(n))}(n,r.b,t,e)}finally{r.a=n}}));return c(n)}finally{r.a=r.b=0}},t.wbg.__wbindgen_number_new=function(_){return c(_)},t.wbg.__wbg_new_abda76e883ba8a5f=function(){return c(new Error)},t.wbg.__wbg_stack_658279fe44541cf6=function(t,r){const n=b(e(r).stack,_.__wbindgen_malloc,_.__wbindgen_realloc),i=g;f()[t/4+1]=i,f()[t/4+0]=n},t.wbg.__wbg_error_f851667af71bcfc6=function(t,e){let r,n;try{r=t,n=e,console.error(s(t,e))}finally{_.__wbindgen_free(r,n,1)}},t.wbg.__wbg_buffer_12d079cc21e14bdb=function(_){return c(e(_).buffer)},t.wbg.__wbg_newwithbyteoffsetandlength_aa4a17c33a06e5cb=function(_,t,r){return c(new Uint8Array(e(_),t>>>0,r>>>0))},t.wbg.__wbg_randomFillSync_5c9c955aa56b6049=function(){return x((function(_,t){e(_).randomFillSync(n(t))}),arguments)},t.wbg.__wbg_subarray_a1f73cd4b5b42fe1=function(_,t,r){return c(e(_).subarray(t>>>0,r>>>0))},t.wbg.__wbg_getRandomValues_3aa56aa6edec874c=function(){return x((function(_,t){e(_).getRandomValues(e(t))}),arguments)},t.wbg.__wbg_set_a47bac70306a19a7=function(_,t,r){e(_).set(e(t),r>>>0)},t.wbg.__wbg_crypto_1d1f22824a6a080c=function(_){return c(e(_).crypto)},t.wbg.__wbg_process_4a72847cc503995b=function(_){return c(e(_).process)},t.wbg.__wbg_versions_f686565e586dd935=function(_){return c(e(_).versions)},t.wbg.__wbg_node_104a2ff8d6ea03a2=function(_){return c(e(_).node)},t.wbg.__wbindgen_is_string=function(_){return"string"==typeof e(_)},t.wbg.__wbg_require_cca90b1a94a0255b=function(){return x((function(){return c(module.require)}),arguments)},t.wbg.__wbg_msCrypto_eb05e62b530a1508=function(_){return c(e(_).msCrypto)},t.wbg.__wbg_newwithlength_e9b4878cebadb3d3=function(_){return c(new Uint8Array(_>>>0))},t.wbg.__wbg_length_cd7af8117672b8b8=function(_){return e(_).length},t.wbg.__wbg_get_bd8e338fbd5f5cc8=function(_,t){return c(e(_)[t>>>0])},t.wbg.__wbg_self_ce0dbfc45cf2f5be=function(){return x((function(){return c(self.self)}),arguments)},t.wbg.__wbg_window_c6fb939a7f436783=function(){return x((function(){return c(window.window)}),arguments)},t.wbg.__wbg_globalThis_d1e6af4856ba331b=function(){return x((function(){return c(globalThis.globalThis)}),arguments)},t.wbg.__wbg_global_207b558942527489=function(){return x((function(){return c(global.global)}),arguments)},t.wbg.__wbindgen_is_undefined=function(_){return void 0===e(_)},t.wbg.__wbg_newnoargs_e258087cd0daa0ea=function(_,t){return c(new Function(s(_,t)))},t.wbg.__wbg_has_0af94d20077affa2=function(){return x((function(_,t){return Reflect.has(e(_),e(t))}),arguments)},t.wbg.__wbg_fetch_bc7c8e27076a5c84=function(_){return c(fetch(e(_)))},t.wbg.__wbg_fetch_921fad6ef9e883dd=function(_,t){return c(e(_).fetch(e(t)))},t.wbg.__wbindgen_debug_string=function(t,r){const n=b(p(e(r)),_.__wbindgen_malloc,_.__wbindgen_realloc),i=g;f()[t/4+1]=i,f()[t/4+0]=n},t.wbg.__wbindgen_throw=function(_,t){throw new Error(s(_,t))},t.wbg.__wbindgen_rethrow=function(_){throw n(_)},t.wbg.__wbg_then_a73caa9a87991566=function(_,t,r){return c(e(_).then(e(t),e(r)))},t.wbg.__wbg_then_0c86a60e8fcfe9f6=function(_,t){return c(e(_).then(e(t)))},t.wbg.__wbg_queueMicrotask_481971b0d87f3dd4=function(_){queueMicrotask(e(_))},t.wbg.__wbg_queueMicrotask_3cbae2ec6b6cd3d6=function(_){return c(e(_).queueMicrotask)},t.wbg.__wbg_resolve_b0083a7967828ec8=function(_){return c(Promise.resolve(e(_)))},t.wbg.__wbg_waitAsync_5d743fc9058ba01a=function(){return c(Atomics.waitAsync)},t.wbg.__wbg_new_8cccba86b0f574cb=function(_){return c(new Int32Array(e(_)))},t.wbg.__wbg_waitAsync_46d5c36955b71a79=function(_,t,r){return c(Atomics.waitAsync(e(_),t,r))},t.wbg.__wbg_async_19c0400d97cc72fe=function(_){return e(_).async},t.wbg.__wbg_value_571d60108110e917=function(_){return c(e(_).value)},t.wbg.__wbindgen_link_fc1eedd35dc7e0a6=function(t){const e=b("data:application/javascript,"+encodeURIComponent("onmessage = function (ev) {\n let [ia, index, value] = ev.data;\n ia = new Int32Array(ia.buffer);\n let result = Atomics.wait(ia, index, value);\n postMessage(result);\n };\n "),_.__wbindgen_malloc,_.__wbindgen_realloc),r=g;f()[t/4+1]=r,f()[t/4+0]=e},t.wbg.__wbg_new_d1187ae36d662ef9=function(){return x((function(_,t){return c(new Worker(s(_,t)))}),arguments)},t.wbg.__wbg_setonmessage_503809e5bb51bd33=function(_,t){e(_).onmessage=e(t)},t.wbg.__wbg_of_6a70eed8d41f469c=function(_,t,r){return c(Array.of(e(_),e(t),e(r)))},t.wbg.__wbg_postMessage_7380d10e8b8269df=function(){return x((function(_,t){e(_).postMessage(e(t))}),arguments)},t.wbg.__wbg_data_3ce7c145ca4fbcdc=function(_){return c(e(_).data)},t.wbg.__wbg_newwithstrandinit_3fd6fba4083ff2d0=function(){return x((function(_,t,r){return c(new Request(s(_,t),e(r)))}),arguments)},t.wbg.__wbg_responseText_c67ed2d48db10769=function(){return x((function(t,r){const n=e(r).responseText;var i=l(n)?0:b(n,_.__wbindgen_malloc,_.__wbindgen_realloc),o=g;f()[t/4+1]=o,f()[t/4+0]=i}),arguments)},t.wbg.__wbindgen_closure_wrapper5837=function(_,t,e){return c(m(_,t,538,h))},t.wbg.__wbindgen_closure_wrapper5862=function(_,t,e){return c(m(_,t,538,h))},t}function c_(_,t){_.wbg.memory=t||new WebAssembly.Memory({initial:25,maximum:65536,shared:!0})}function g_(t,e){return _=t.exports,w_.__wbindgen_wasm_module=e,P=null,u=null,o=null,_.__wbindgen_start(),_}async function w_(t,e){if(void 0!==_)return _;const r=s_();("string"==typeof t||"function"==typeof Request&&t instanceof Request||"function"==typeof URL&&t instanceof URL)&&(t=fetch(t)),c_(r,e);const{instance:n,module:i}=await async function(_,t){if("function"==typeof Response&&_ instanceof Response){if("function"==typeof WebAssembly.instantiateStreaming)try{return await WebAssembly.instantiateStreaming(_,t)}catch(t){if("application/wasm"==_.headers.get("Content-Type"))throw t;console.warn("`WebAssembly.instantiateStreaming` failed because your server does not serve wasm with `application/wasm` MIME type. Falling back to `WebAssembly.instantiate` which is slower. Original error:\n",t)}const e=await _.arrayBuffer();return await WebAssembly.instantiate(e,t)}{const e=await WebAssembly.instantiate(_,t);return e instanceof WebAssembly.Instance?{instance:e,module:_}:e}}(await t,r);return g_(n,i)}var d_=Object.freeze({__proto__:null,Address:T,Execution:z,ExecutionResponse:O,Field:K,KeyPair:E,Metadata:I,OfflineQuery:C,PrivateKey:W,PrivateKeyCiphertext:$,Program:J,ProgramManager:class{__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,H.unregister(this),_}free(){const t=this.__destroy_into_raw();_.__wbg_programmanager_free(t)}static buildDeploymentTransaction(t,e,r,i,o,a,s,w,d){v(t,W);const u=b(e,_.__wbindgen_malloc,_.__wbindgen_realloc),f=g;let p=0;l(i)||(v(i,Z),p=i.__destroy_into_raw());var y=l(o)?0:b(o,_.__wbindgen_malloc,_.__wbindgen_realloc),m=g;let h=0;l(s)||(v(s,Q),h=s.__destroy_into_raw());let k=0;l(w)||(v(w,i_),k=w.__destroy_into_raw());let P=0;l(d)||(v(d,C),P=d.__destroy_into_raw());return n(_.programmanager_buildDeploymentTransaction(t.__wbg_ptr,u,f,r,p,y,m,l(a)?0:c(a),h,k,P))}static estimateDeploymentFee(t,e){const r=b(t,_.__wbindgen_malloc,_.__wbindgen_realloc),i=g;return n(_.programmanager_estimateDeploymentFee(r,i,l(e)?0:c(e)))}static estimateProgramNameCost(t){try{const i=_.__wbindgen_add_to_stack_pointer(-16),o=b(t,_.__wbindgen_malloc,_.__wbindgen_realloc),a=g;_.programmanager_estimateProgramNameCost(i,o,a);var e=S()[i/8+0],r=f()[i/4+2];if(f()[i/4+3])throw n(r);return BigInt.asUintN(64,e)}finally{_.__wbindgen_add_to_stack_pointer(16)}}static executeFunctionOffline(t,e,r,i,o,a,s,w,d,u,f){v(t,W);const p=b(e,_.__wbindgen_malloc,_.__wbindgen_realloc),y=g,m=b(r,_.__wbindgen_malloc,_.__wbindgen_realloc),h=g;let k=0;l(w)||(v(w,Q),k=w.__destroy_into_raw());let P=0;l(d)||(v(d,i_),P=d.__destroy_into_raw());var S=l(u)?0:b(u,_.__wbindgen_malloc,_.__wbindgen_realloc),V=g;let x=0;l(f)||(v(f,C),x=f.__destroy_into_raw());return n(_.programmanager_executeFunctionOffline(t.__wbg_ptr,p,y,m,h,c(i),o,a,l(s)?0:c(s),k,P,S,V,x))}static buildExecutionTransaction(t,e,r,i,o,a,s,w,d,u,f,p,y){v(t,W);const m=b(e,_.__wbindgen_malloc,_.__wbindgen_realloc),h=g,k=b(r,_.__wbindgen_malloc,_.__wbindgen_realloc),P=g;let S=0;l(a)||(v(a,Z),S=a.__destroy_into_raw());var V=l(s)?0:b(s,_.__wbindgen_malloc,_.__wbindgen_realloc),x=g;let F=0;l(d)||(v(d,Q),F=d.__destroy_into_raw());let T=0;l(u)||(v(u,i_),T=u.__destroy_into_raw());let R=0;l(f)||(v(f,Q),R=f.__destroy_into_raw());let z=0;l(p)||(v(p,i_),z=p.__destroy_into_raw());let A=0;l(y)||(v(y,C),A=y.__destroy_into_raw());return n(_.programmanager_buildExecutionTransaction(t.__wbg_ptr,m,h,k,P,c(i),o,S,V,x,l(w)?0:c(w),F,T,R,z,A))}static estimateExecutionFee(t,e,r,i,o,a,s,w,d){v(t,W);const u=b(e,_.__wbindgen_malloc,_.__wbindgen_realloc),f=g,p=b(r,_.__wbindgen_malloc,_.__wbindgen_realloc),y=g;var m=l(o)?0:b(o,_.__wbindgen_malloc,_.__wbindgen_realloc),h=g;let k=0;l(s)||(v(s,Q),k=s.__destroy_into_raw());let P=0;l(w)||(v(w,i_),P=w.__destroy_into_raw());let S=0;l(d)||(v(d,C),S=d.__destroy_into_raw());return n(_.programmanager_estimateExecutionFee(t.__wbg_ptr,u,f,p,y,c(i),m,h,l(a)?0:c(a),k,P,S))}static estimateFinalizeFee(t,e){try{const o=_.__wbindgen_add_to_stack_pointer(-16),a=b(t,_.__wbindgen_malloc,_.__wbindgen_realloc),s=g,c=b(e,_.__wbindgen_malloc,_.__wbindgen_realloc),w=g;_.programmanager_estimateFinalizeFee(o,a,s,c,w);var r=S()[o/8+0],i=f()[o/4+2];if(f()[o/4+3])throw n(i);return BigInt.asUintN(64,r)}finally{_.__wbindgen_add_to_stack_pointer(16)}}static buildJoinTransaction(t,e,r,i,o,a,s,c,w,d,u){v(t,W),v(e,Z);var f=e.__destroy_into_raw();v(r,Z);var p=r.__destroy_into_raw();let y=0;l(o)||(v(o,Z),y=o.__destroy_into_raw());var m=l(a)?0:b(a,_.__wbindgen_malloc,_.__wbindgen_realloc),h=g;let k=0;l(s)||(v(s,Q),k=s.__destroy_into_raw());let P=0;l(c)||(v(c,i_),P=c.__destroy_into_raw());let S=0;l(w)||(v(w,Q),S=w.__destroy_into_raw());let V=0;l(d)||(v(d,i_),V=d.__destroy_into_raw());let x=0;l(u)||(v(u,C),x=u.__destroy_into_raw());return n(_.programmanager_buildJoinTransaction(t.__wbg_ptr,f,p,i,y,m,h,k,P,S,V,x))}static buildSplitTransaction(t,e,r,i,o,a,s){v(t,W),v(r,Z);var c=r.__destroy_into_raw(),w=l(i)?0:b(i,_.__wbindgen_malloc,_.__wbindgen_realloc),d=g;let u=0;l(o)||(v(o,Q),u=o.__destroy_into_raw());let f=0;l(a)||(v(a,i_),f=a.__destroy_into_raw());let p=0;l(s)||(v(s,C),p=s.__destroy_into_raw());return n(_.programmanager_buildSplitTransaction(t.__wbg_ptr,e,c,w,d,u,f,p))}static buildTransferTransaction(t,e,r,i,o,a,s,c,w,d,u,f,p){v(t,W);const y=b(r,_.__wbindgen_malloc,_.__wbindgen_realloc),m=g,h=b(i,_.__wbindgen_malloc,_.__wbindgen_realloc),k=g;let P=0;l(o)||(v(o,Z),P=o.__destroy_into_raw());let S=0;l(s)||(v(s,Z),S=s.__destroy_into_raw());var V=l(c)?0:b(c,_.__wbindgen_malloc,_.__wbindgen_realloc),x=g;let F=0;l(w)||(v(w,Q),F=w.__destroy_into_raw());let T=0;l(d)||(v(d,i_),T=d.__destroy_into_raw());let R=0;l(u)||(v(u,Q),R=u.__destroy_into_raw());let z=0;l(f)||(v(f,i_),z=f.__destroy_into_raw());let A=0;l(p)||(v(p,C),A=p.__destroy_into_raw());return n(_.programmanager_buildTransferTransaction(t.__wbg_ptr,e,y,m,h,k,P,a,S,V,x,F,T,R,z,A))}static synthesizeKeyPair(t,e,r,i,o){v(t,W);const a=b(e,_.__wbindgen_malloc,_.__wbindgen_realloc),s=g,w=b(r,_.__wbindgen_malloc,_.__wbindgen_realloc),d=g;return n(_.programmanager_synthesizeKeyPair(t.__wbg_ptr,a,s,w,d,c(i),l(o)?0:c(o)))}},ProvingKey:Q,RecordCiphertext:G,RecordPlaintext:Z,Signature:t_,Transaction:r_,VerifyingKey:i_,ViewKey:a_,default:w_,initSync:function(t,e){if(void 0!==_)return _;const r=s_();return c_(r,e),t instanceof WebAssembly.Module||(t=new WebAssembly.Module(t)),g_(new WebAssembly.Instance(t,r),t)},initThreadPool:function(t,e){return n(_.initThreadPool(c(t),e))},runRayonThread:function(t){_.runRayonThread(t)},verifyFunctionExecution:function(t,e,r,i){try{const s=_.__wbindgen_add_to_stack_pointer(-16);v(t,z),v(e,i_),v(r,J);const c=b(i,_.__wbindgen_malloc,_.__wbindgen_realloc),w=g;_.verifyFunctionExecution(s,t.__wbg_ptr,e.__wbg_ptr,r.__wbg_ptr,c,w);var o=f()[s/4+0],a=f()[s/4+1];if(f()[s/4+2])throw n(a);return 0!==o}finally{_.__wbindgen_add_to_stack_pointer(16)}}});await async function(_){const[t,{module:e,memory:r,address:n}]=await Promise.all([_,new Promise((_=>{addEventListener("message",(t=>{_(t.data)}),{capture:!0,once:!0})}))]),i=await t({initializeHook:(_,t)=>_(e,r)});postMessage(null),i.runRayonThread(n),close()}((async(_={})=>{let{importHook:t,serverPath:e,initializeHook:r}=_,n="assets/aleo_wasm.wasm";return null!=e&&(n=e+/[^\/\\]*$/.exec(n)[0]),null!=t&&(n=t(n)),null!=r?await r(w_,n):await w_(n),d_})); \ No newline at end of file +let _;const t=new Array(128).fill(void 0);function e(_){return t[_]}t.push(void 0,null,!0,!1);let r=t.length;function n(_){const n=e(_);return function(_){_<132||(t[_]=r,r=_)}(_),n}const i="undefined"!=typeof TextDecoder?new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0}):{decode:()=>{throw Error("TextDecoder not available")}};"undefined"!=typeof TextDecoder&&i.decode();let o=null;function a(){return null!==o&&o.buffer===_.memory.buffer||(o=new Uint8Array(_.memory.buffer)),o}function s(_,t){return _>>>=0,i.decode(a().slice(_,_+t))}function c(_){r===t.length&&t.push(t.length+1);const e=r;return r=t[e],t[e]=_,e}let g=0;const w="undefined"!=typeof TextEncoder?new TextEncoder("utf-8"):{encode:()=>{throw Error("TextEncoder not available")}},d=function(_,t){const e=w.encode(_);return t.set(e),{read:_.length,written:e.length}};function b(_,t,e){if(void 0===e){const e=w.encode(_),r=t(e.length,1)>>>0;return a().subarray(r,r+e.length).set(e),g=e.length,r}let r=_.length,n=t(r,1)>>>0;const i=a();let o=0;for(;o127)break;i[n+o]=t}if(o!==r){0!==o&&(_=_.slice(o)),n=e(n,r,r=o+3*_.length,1)>>>0;const t=a().subarray(n+o,n+r);o+=d(_,t).written,n=e(n,r,o,1)>>>0}return g=o,n}function l(_){return null==_}let u=null;function f(){return null!==u&&u.buffer===_.memory.buffer||(u=new Int32Array(_.memory.buffer)),u}function p(_){const t=typeof _;if("number"==t||"boolean"==t||null==_)return`${_}`;if("string"==t)return`"${_}"`;if("symbol"==t){const t=_.description;return null==t?"Symbol":`Symbol(${t})`}if("function"==t){const t=_.name;return"string"==typeof t&&t.length>0?`Function(${t})`:"Function"}if(Array.isArray(_)){const t=_.length;let e="[";t>0&&(e+=p(_[0]));for(let r=1;r1))return toString.call(_);if(r=e[1],"Object"==r)try{return"Object("+JSON.stringify(_)+")"}catch(_){return"Object"}return _ instanceof Error?`${_.name}: ${_.message}\n${_.stack}`:r}const y="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((t=>{_.__wbindgen_export_3.get(t.dtor)(t.a,t.b)}));function m(t,e,r,n){const i={a:t,b:e,cnt:1,dtor:r},o=(...t)=>{i.cnt++;const e=i.a;i.a=0;try{return n(e,i.b,...t)}finally{0==--i.cnt?(_.__wbindgen_export_3.get(i.dtor)(e,i.b),y.unregister(i)):i.a=e}};return o.original=i,y.register(o,i,i),o}function h(t,e,r){_._dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h4428289ce4d5afd9(t,e,c(r))}function v(_,t){if(!(_ instanceof t))throw new Error(`expected instance of ${t.name}`);return _.ptr}function k(_,t){const e=t(1*_.length,1)>>>0;return a().set(_,e/1),g=_.length,e}let P=null;function S(){return null!==P&&P.buffer===_.memory.buffer||(P=new BigInt64Array(_.memory.buffer)),P}function V(_,t){return _>>>=0,a().subarray(_/1,_/1+t)}function x(t,e){try{return t.apply(this,e)}catch(t){_.__wbindgen_exn_store(c(t))}}const F="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((t=>_.__wbg_address_free(t>>>0)));class T{static __wrap(_){_>>>=0;const t=Object.create(T.prototype);return t.__wbg_ptr=_,F.register(t,t.__wbg_ptr,t),t}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,F.unregister(this),_}free(){const t=this.__destroy_into_raw();_.__wbg_address_free(t)}static from_private_key(t){v(t,W);const e=_.address_from_private_key(t.__wbg_ptr);return T.__wrap(e)}static from_view_key(t){v(t,a_);const e=_.address_from_view_key(t.__wbg_ptr);return T.__wrap(e)}static from_string(t){const e=b(t,_.__wbindgen_malloc,_.__wbindgen_realloc),r=g,n=_.address_from_string(e,r);return T.__wrap(n)}to_string(){let t,e;try{const i=_.__wbindgen_add_to_stack_pointer(-16);_.address_to_string(i,this.__wbg_ptr);var r=f()[i/4+0],n=f()[i/4+1];return t=r,e=n,s(r,n)}finally{_.__wbindgen_add_to_stack_pointer(16),_.__wbindgen_free(t,e,1)}}verify(t,e){const r=k(t,_.__wbindgen_malloc),n=g;v(e,t_);return 0!==_.address_verify(this.__wbg_ptr,r,n,e.__wbg_ptr)}}const R="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((t=>_.__wbg_execution_free(t>>>0)));class z{static __wrap(_){_>>>=0;const t=Object.create(z.prototype);return t.__wbg_ptr=_,R.register(t,t.__wbg_ptr,t),t}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,R.unregister(this),_}free(){const t=this.__destroy_into_raw();_.__wbg_execution_free(t)}toString(){let t,e;try{const i=_.__wbindgen_add_to_stack_pointer(-16);_.execution_toString(i,this.__wbg_ptr);var r=f()[i/4+0],n=f()[i/4+1];return t=r,e=n,s(r,n)}finally{_.__wbindgen_add_to_stack_pointer(16),_.__wbindgen_free(t,e,1)}}static fromString(t){try{const i=_.__wbindgen_add_to_stack_pointer(-16),o=b(t,_.__wbindgen_malloc,_.__wbindgen_realloc),a=g;_.execution_fromString(i,o,a);var e=f()[i/4+0],r=f()[i/4+1];if(f()[i/4+2])throw n(r);return z.__wrap(e)}finally{_.__wbindgen_add_to_stack_pointer(16)}}}const A="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((t=>_.__wbg_executionresponse_free(t>>>0)));class O{static __wrap(_){_>>>=0;const t=Object.create(O.prototype);return t.__wbg_ptr=_,A.register(t,t.__wbg_ptr,t),t}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,A.unregister(this),_}free(){const t=this.__destroy_into_raw();_.__wbg_executionresponse_free(t)}getOutputs(){return n(_.executionresponse_getOutputs(this.__wbg_ptr))}getExecution(){const t=_.executionresponse_getExecution(this.__wbg_ptr);return 0===t?void 0:z.__wrap(t)}getKeys(){try{const r=_.__wbindgen_add_to_stack_pointer(-16);_.executionresponse_getKeys(r,this.__wbg_ptr);var t=f()[r/4+0],e=f()[r/4+1];if(f()[r/4+2])throw n(e);return E.__wrap(t)}finally{_.__wbindgen_add_to_stack_pointer(16)}}getProvingKey(){const t=_.executionresponse_getProvingKey(this.__wbg_ptr);return 0===t?void 0:Q.__wrap(t)}getVerifyingKey(){const t=_.executionresponse_getVerifyingKey(this.__wbg_ptr);return i_.__wrap(t)}getFunctionId(){let t,e;try{const i=_.__wbindgen_add_to_stack_pointer(-16);_.executionresponse_getFunctionId(i,this.__wbg_ptr);var r=f()[i/4+0],n=f()[i/4+1];return t=r,e=n,s(r,n)}finally{_.__wbindgen_add_to_stack_pointer(16),_.__wbindgen_free(t,e,1)}}getProgram(){const t=_.executionresponse_getProgram(this.__wbg_ptr);return J.__wrap(t)}}const j="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((t=>_.__wbg_field_free(t>>>0)));class K{static __wrap(_){_>>>=0;const t=Object.create(K.prototype);return t.__wbg_ptr=_,j.register(t,t.__wbg_ptr,t),t}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,j.unregister(this),_}free(){const t=this.__destroy_into_raw();_.__wbg_field_free(t)}toString(){let t,e;try{const i=_.__wbindgen_add_to_stack_pointer(-16);_.field_toString(i,this.__wbg_ptr);var r=f()[i/4+0],n=f()[i/4+1];return t=r,e=n,s(r,n)}finally{_.__wbindgen_add_to_stack_pointer(16),_.__wbindgen_free(t,e,1)}}static fromString(t){try{const i=_.__wbindgen_add_to_stack_pointer(-16),o=b(t,_.__wbindgen_malloc,_.__wbindgen_realloc),a=g;_.field_fromString(i,o,a);var e=f()[i/4+0],r=f()[i/4+1];if(f()[i/4+2])throw n(r);return K.__wrap(e)}finally{_.__wbindgen_add_to_stack_pointer(16)}}}const M="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((t=>_.__wbg_keypair_free(t>>>0)));class E{static __wrap(_){_>>>=0;const t=Object.create(E.prototype);return t.__wbg_ptr=_,M.register(t,t.__wbg_ptr,t),t}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,M.unregister(this),_}free(){const t=this.__destroy_into_raw();_.__wbg_keypair_free(t)}constructor(t,e){v(t,Q);var r=t.__destroy_into_raw();v(e,i_);var n=e.__destroy_into_raw();const i=_.keypair_new(r,n);return this.__wbg_ptr=i>>>0,this}provingKey(){try{const r=_.__wbindgen_add_to_stack_pointer(-16);_.keypair_provingKey(r,this.__wbg_ptr);var t=f()[r/4+0],e=f()[r/4+1];if(f()[r/4+2])throw n(e);return Q.__wrap(t)}finally{_.__wbindgen_add_to_stack_pointer(16)}}verifyingKey(){try{const r=_.__wbindgen_add_to_stack_pointer(-16);_.keypair_verifyingKey(r,this.__wbg_ptr);var t=f()[r/4+0],e=f()[r/4+1];if(f()[r/4+2])throw n(e);return i_.__wrap(t)}finally{_.__wbindgen_add_to_stack_pointer(16)}}}const B="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((t=>_.__wbg_metadata_free(t>>>0)));class I{static __wrap(_){_>>>=0;const t=Object.create(I.prototype);return t.__wbg_ptr=_,B.register(t,t.__wbg_ptr,t),t}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,B.unregister(this),_}free(){const t=this.__destroy_into_raw();_.__wbg_metadata_free(t)}get name(){let t,e;try{const i=_.__wbindgen_add_to_stack_pointer(-16);_.__wbg_get_metadata_name(i,this.__wbg_ptr);var r=f()[i/4+0],n=f()[i/4+1];return t=r,e=n,s(r,n)}finally{_.__wbindgen_add_to_stack_pointer(16),_.__wbindgen_free(t,e,1)}}set name(t){const e=b(t,_.__wbindgen_malloc,_.__wbindgen_realloc),r=g;_.__wbg_set_metadata_name(this.__wbg_ptr,e,r)}get locator(){let t,e;try{const i=_.__wbindgen_add_to_stack_pointer(-16);_.__wbg_get_metadata_locator(i,this.__wbg_ptr);var r=f()[i/4+0],n=f()[i/4+1];return t=r,e=n,s(r,n)}finally{_.__wbindgen_add_to_stack_pointer(16),_.__wbindgen_free(t,e,1)}}set locator(t){const e=b(t,_.__wbindgen_malloc,_.__wbindgen_realloc),r=g;_.__wbg_set_metadata_locator(this.__wbg_ptr,e,r)}get prover(){let t,e;try{const i=_.__wbindgen_add_to_stack_pointer(-16);_.__wbg_get_metadata_prover(i,this.__wbg_ptr);var r=f()[i/4+0],n=f()[i/4+1];return t=r,e=n,s(r,n)}finally{_.__wbindgen_add_to_stack_pointer(16),_.__wbindgen_free(t,e,1)}}set prover(t){const e=b(t,_.__wbindgen_malloc,_.__wbindgen_realloc),r=g;_.__wbg_set_metadata_prover(this.__wbg_ptr,e,r)}get verifier(){let t,e;try{const i=_.__wbindgen_add_to_stack_pointer(-16);_.__wbg_get_metadata_verifier(i,this.__wbg_ptr);var r=f()[i/4+0],n=f()[i/4+1];return t=r,e=n,s(r,n)}finally{_.__wbindgen_add_to_stack_pointer(16),_.__wbindgen_free(t,e,1)}}set verifier(t){const e=b(t,_.__wbindgen_malloc,_.__wbindgen_realloc),r=g;_.__wbg_set_metadata_verifier(this.__wbg_ptr,e,r)}get verifyingKey(){let t,e;try{const i=_.__wbindgen_add_to_stack_pointer(-16);_.__wbg_get_metadata_verifyingKey(i,this.__wbg_ptr);var r=f()[i/4+0],n=f()[i/4+1];return t=r,e=n,s(r,n)}finally{_.__wbindgen_add_to_stack_pointer(16),_.__wbindgen_free(t,e,1)}}set verifyingKey(t){const e=b(t,_.__wbindgen_malloc,_.__wbindgen_realloc),r=g;_.__wbg_set_metadata_verifyingKey(this.__wbg_ptr,e,r)}static baseUrl(){let t,e;try{const i=_.__wbindgen_add_to_stack_pointer(-16);_.metadata_baseUrl(i);var r=f()[i/4+0],n=f()[i/4+1];return t=r,e=n,s(r,n)}finally{_.__wbindgen_add_to_stack_pointer(16),_.__wbindgen_free(t,e,1)}}static bond_public(){const t=_.metadata_bond_public();return I.__wrap(t)}static bond_validator(){const t=_.metadata_bond_validator();return I.__wrap(t)}static claim_unbond_public(){const t=_.metadata_claim_unbond_public();return I.__wrap(t)}static fee_private(){const t=_.metadata_fee_private();return I.__wrap(t)}static fee_public(){const t=_.metadata_fee_public();return I.__wrap(t)}static inclusion(){const t=_.metadata_inclusion();return I.__wrap(t)}static join(){const t=_.metadata_join();return I.__wrap(t)}static set_validator_state(){const t=_.metadata_set_validator_state();return I.__wrap(t)}static split(){const t=_.metadata_split();return I.__wrap(t)}static transfer_private(){const t=_.metadata_transfer_private();return I.__wrap(t)}static transfer_private_to_public(){const t=_.metadata_transfer_private_to_public();return I.__wrap(t)}static transfer_public(){const t=_.metadata_transfer_public();return I.__wrap(t)}static transfer_public_as_signer(){const t=_.metadata_transfer_public_as_signer();return I.__wrap(t)}static transfer_public_to_private(){const t=_.metadata_transfer_public_to_private();return I.__wrap(t)}static unbond_public(){const t=_.metadata_unbond_public();return I.__wrap(t)}}const U="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((t=>_.__wbg_offlinequery_free(t>>>0)));class C{static __wrap(_){_>>>=0;const t=Object.create(C.prototype);return t.__wbg_ptr=_,U.register(t,t.__wbg_ptr,t),t}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,U.unregister(this),_}free(){const t=this.__destroy_into_raw();_.__wbg_offlinequery_free(t)}constructor(t){try{const i=_.__wbindgen_add_to_stack_pointer(-16),o=b(t,_.__wbindgen_malloc,_.__wbindgen_realloc),a=g;_.offlinequery_new(i,o,a);var e=f()[i/4+0],r=f()[i/4+1];if(f()[i/4+2])throw n(r);return this.__wbg_ptr=e>>>0,this}finally{_.__wbindgen_add_to_stack_pointer(16)}}addStatePath(t,e){try{const i=_.__wbindgen_add_to_stack_pointer(-16),o=b(t,_.__wbindgen_malloc,_.__wbindgen_realloc),a=g,s=b(e,_.__wbindgen_malloc,_.__wbindgen_realloc),c=g;_.offlinequery_addStatePath(i,this.__wbg_ptr,o,a,s,c);var r=f()[i/4+0];if(f()[i/4+1])throw n(r)}finally{_.__wbindgen_add_to_stack_pointer(16)}}toString(){let t,e;try{const i=_.__wbindgen_add_to_stack_pointer(-16);_.offlinequery_toString(i,this.__wbg_ptr);var r=f()[i/4+0],n=f()[i/4+1];return t=r,e=n,s(r,n)}finally{_.__wbindgen_add_to_stack_pointer(16),_.__wbindgen_free(t,e,1)}}static fromString(t){try{const i=_.__wbindgen_add_to_stack_pointer(-16),o=b(t,_.__wbindgen_malloc,_.__wbindgen_realloc),a=g;_.offlinequery_fromString(i,o,a);var e=f()[i/4+0],r=f()[i/4+1];if(f()[i/4+2])throw n(r);return C.__wrap(e)}finally{_.__wbindgen_add_to_stack_pointer(16)}}}const q="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((t=>_.__wbg_privatekey_free(t>>>0)));class W{static __wrap(_){_>>>=0;const t=Object.create(W.prototype);return t.__wbg_ptr=_,q.register(t,t.__wbg_ptr,t),t}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,q.unregister(this),_}free(){const t=this.__destroy_into_raw();_.__wbg_privatekey_free(t)}constructor(){const t=_.privatekey_new();return this.__wbg_ptr=t>>>0,this}static from_seed_unchecked(t){const e=k(t,_.__wbindgen_malloc),r=g,n=_.privatekey_from_seed_unchecked(e,r);return W.__wrap(n)}static from_string(t){try{const i=_.__wbindgen_add_to_stack_pointer(-16),o=b(t,_.__wbindgen_malloc,_.__wbindgen_realloc),a=g;_.privatekey_from_string(i,o,a);var e=f()[i/4+0],r=f()[i/4+1];if(f()[i/4+2])throw n(r);return W.__wrap(e)}finally{_.__wbindgen_add_to_stack_pointer(16)}}to_string(){let t,e;try{const i=_.__wbindgen_add_to_stack_pointer(-16);_.privatekey_to_string(i,this.__wbg_ptr);var r=f()[i/4+0],n=f()[i/4+1];return t=r,e=n,s(r,n)}finally{_.__wbindgen_add_to_stack_pointer(16),_.__wbindgen_free(t,e,1)}}to_view_key(){const t=_.privatekey_to_view_key(this.__wbg_ptr);return a_.__wrap(t)}to_address(){const t=_.privatekey_to_address(this.__wbg_ptr);return T.__wrap(t)}sign(t){const e=k(t,_.__wbindgen_malloc),r=g,n=_.privatekey_sign(this.__wbg_ptr,e,r);return t_.__wrap(n)}static newEncrypted(t){try{const i=_.__wbindgen_add_to_stack_pointer(-16),o=b(t,_.__wbindgen_malloc,_.__wbindgen_realloc),a=g;_.privatekey_newEncrypted(i,o,a);var e=f()[i/4+0],r=f()[i/4+1];if(f()[i/4+2])throw n(r);return $.__wrap(e)}finally{_.__wbindgen_add_to_stack_pointer(16)}}toCiphertext(t){try{const i=_.__wbindgen_add_to_stack_pointer(-16),o=b(t,_.__wbindgen_malloc,_.__wbindgen_realloc),a=g;_.privatekey_toCiphertext(i,this.__wbg_ptr,o,a);var e=f()[i/4+0],r=f()[i/4+1];if(f()[i/4+2])throw n(r);return $.__wrap(e)}finally{_.__wbindgen_add_to_stack_pointer(16)}}static fromPrivateKeyCiphertext(t,e){try{const o=_.__wbindgen_add_to_stack_pointer(-16);v(t,$);const a=b(e,_.__wbindgen_malloc,_.__wbindgen_realloc),s=g;_.privatekey_fromPrivateKeyCiphertext(o,t.__wbg_ptr,a,s);var r=f()[o/4+0],i=f()[o/4+1];if(f()[o/4+2])throw n(i);return W.__wrap(r)}finally{_.__wbindgen_add_to_stack_pointer(16)}}}const N="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((t=>_.__wbg_privatekeyciphertext_free(t>>>0)));class ${static __wrap(_){_>>>=0;const t=Object.create($.prototype);return t.__wbg_ptr=_,N.register(t,t.__wbg_ptr,t),t}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,N.unregister(this),_}free(){const t=this.__destroy_into_raw();_.__wbg_privatekeyciphertext_free(t)}static encryptPrivateKey(t,e){try{const o=_.__wbindgen_add_to_stack_pointer(-16);v(t,W);const a=b(e,_.__wbindgen_malloc,_.__wbindgen_realloc),s=g;_.privatekey_toCiphertext(o,t.__wbg_ptr,a,s);var r=f()[o/4+0],i=f()[o/4+1];if(f()[o/4+2])throw n(i);return $.__wrap(r)}finally{_.__wbindgen_add_to_stack_pointer(16)}}decryptToPrivateKey(t){try{const i=_.__wbindgen_add_to_stack_pointer(-16),o=b(t,_.__wbindgen_malloc,_.__wbindgen_realloc),a=g;_.privatekeyciphertext_decryptToPrivateKey(i,this.__wbg_ptr,o,a);var e=f()[i/4+0],r=f()[i/4+1];if(f()[i/4+2])throw n(r);return W.__wrap(e)}finally{_.__wbindgen_add_to_stack_pointer(16)}}toString(){let t,e;try{const i=_.__wbindgen_add_to_stack_pointer(-16);_.privatekeyciphertext_toString(i,this.__wbg_ptr);var r=f()[i/4+0],n=f()[i/4+1];return t=r,e=n,s(r,n)}finally{_.__wbindgen_add_to_stack_pointer(16),_.__wbindgen_free(t,e,1)}}static fromString(t){try{const i=_.__wbindgen_add_to_stack_pointer(-16),o=b(t,_.__wbindgen_malloc,_.__wbindgen_realloc),a=g;_.privatekeyciphertext_fromString(i,o,a);var e=f()[i/4+0],r=f()[i/4+1];if(f()[i/4+2])throw n(r);return $.__wrap(e)}finally{_.__wbindgen_add_to_stack_pointer(16)}}}const D="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((t=>_.__wbg_program_free(t>>>0)));class J{static __wrap(_){_>>>=0;const t=Object.create(J.prototype);return t.__wbg_ptr=_,D.register(t,t.__wbg_ptr,t),t}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,D.unregister(this),_}free(){const t=this.__destroy_into_raw();_.__wbg_program_free(t)}static fromString(t){try{const i=_.__wbindgen_add_to_stack_pointer(-16),o=b(t,_.__wbindgen_malloc,_.__wbindgen_realloc),a=g;_.program_fromString(i,o,a);var e=f()[i/4+0],r=f()[i/4+1];if(f()[i/4+2])throw n(r);return J.__wrap(e)}finally{_.__wbindgen_add_to_stack_pointer(16)}}toString(){let t,e;try{const i=_.__wbindgen_add_to_stack_pointer(-16);_.program_toString(i,this.__wbg_ptr);var r=f()[i/4+0],n=f()[i/4+1];return t=r,e=n,s(r,n)}finally{_.__wbindgen_add_to_stack_pointer(16),_.__wbindgen_free(t,e,1)}}hasFunction(t){const e=b(t,_.__wbindgen_malloc,_.__wbindgen_realloc),r=g;return 0!==_.program_hasFunction(this.__wbg_ptr,e,r)}getFunctions(){return n(_.program_getFunctions(this.__wbg_ptr))}getFunctionInputs(t){try{const i=_.__wbindgen_add_to_stack_pointer(-16),o=b(t,_.__wbindgen_malloc,_.__wbindgen_realloc),a=g;_.program_getFunctionInputs(i,this.__wbg_ptr,o,a);var e=f()[i/4+0],r=f()[i/4+1];if(f()[i/4+2])throw n(r);return n(e)}finally{_.__wbindgen_add_to_stack_pointer(16)}}getMappings(){try{const r=_.__wbindgen_add_to_stack_pointer(-16);_.program_getMappings(r,this.__wbg_ptr);var t=f()[r/4+0],e=f()[r/4+1];if(f()[r/4+2])throw n(e);return n(t)}finally{_.__wbindgen_add_to_stack_pointer(16)}}getRecordMembers(t){try{const i=_.__wbindgen_add_to_stack_pointer(-16),o=b(t,_.__wbindgen_malloc,_.__wbindgen_realloc),a=g;_.program_getRecordMembers(i,this.__wbg_ptr,o,a);var e=f()[i/4+0],r=f()[i/4+1];if(f()[i/4+2])throw n(r);return n(e)}finally{_.__wbindgen_add_to_stack_pointer(16)}}getStructMembers(t){try{const i=_.__wbindgen_add_to_stack_pointer(-16),o=b(t,_.__wbindgen_malloc,_.__wbindgen_realloc),a=g;_.program_getStructMembers(i,this.__wbg_ptr,o,a);var e=f()[i/4+0],r=f()[i/4+1];if(f()[i/4+2])throw n(r);return n(e)}finally{_.__wbindgen_add_to_stack_pointer(16)}}static getCreditsProgram(){const t=_.program_getCreditsProgram();return J.__wrap(t)}id(){let t,e;try{const i=_.__wbindgen_add_to_stack_pointer(-16);_.program_id(i,this.__wbg_ptr);var r=f()[i/4+0],n=f()[i/4+1];return t=r,e=n,s(r,n)}finally{_.__wbindgen_add_to_stack_pointer(16),_.__wbindgen_free(t,e,1)}}address(){try{const r=_.__wbindgen_add_to_stack_pointer(-16);_.program_address(r,this.__wbg_ptr);var t=f()[r/4+0],e=f()[r/4+1];if(f()[r/4+2])throw n(e);return T.__wrap(t)}finally{_.__wbindgen_add_to_stack_pointer(16)}}isEqual(t){v(t,J);return 0!==_.program_isEqual(this.__wbg_ptr,t.__wbg_ptr)}getImports(){return n(_.program_getImports(this.__wbg_ptr))}}const H="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((t=>_.__wbg_programmanager_free(t>>>0)));const L="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((t=>_.__wbg_provingkey_free(t>>>0)));class Q{static __wrap(_){_>>>=0;const t=Object.create(Q.prototype);return t.__wbg_ptr=_,L.register(t,t.__wbg_ptr,t),t}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,L.unregister(this),_}free(){const t=this.__destroy_into_raw();_.__wbg_provingkey_free(t)}isBondPublicProver(){return 0!==_.provingkey_isBondPublicProver(this.__wbg_ptr)}isBondValidatorProver(){return 0!==_.provingkey_isBondValidatorProver(this.__wbg_ptr)}isClaimUnbondPublicProver(){return 0!==_.provingkey_isClaimUnbondPublicProver(this.__wbg_ptr)}isFeePrivateProver(){return 0!==_.provingkey_isFeePrivateProver(this.__wbg_ptr)}isFeePublicProver(){return 0!==_.provingkey_isFeePublicProver(this.__wbg_ptr)}isInclusionProver(){return 0!==_.provingkey_isInclusionProver(this.__wbg_ptr)}isJoinProver(){return 0!==_.provingkey_isJoinProver(this.__wbg_ptr)}isSetValidatorStateProver(){return 0!==_.provingkey_isSetValidatorStateProver(this.__wbg_ptr)}isSplitProver(){return 0!==_.provingkey_isSplitProver(this.__wbg_ptr)}isTransferPrivateProver(){return 0!==_.provingkey_isTransferPrivateProver(this.__wbg_ptr)}isTransferPrivateToPublicProver(){return 0!==_.provingkey_isTransferPrivateToPublicProver(this.__wbg_ptr)}isTransferPublicProver(){return 0!==_.provingkey_isTransferPublicProver(this.__wbg_ptr)}isTransferPublicAsSignerProver(){return 0!==_.provingkey_isTransferPublicAsSignerProver(this.__wbg_ptr)}isTransferPublicToPrivateProver(){return 0!==_.provingkey_isTransferPublicToPrivateProver(this.__wbg_ptr)}isUnbondPublicProver(){return 0!==_.provingkey_isUnbondPublicProver(this.__wbg_ptr)}checksum(){let t,e;try{const i=_.__wbindgen_add_to_stack_pointer(-16);_.provingkey_checksum(i,this.__wbg_ptr);var r=f()[i/4+0],n=f()[i/4+1];return t=r,e=n,s(r,n)}finally{_.__wbindgen_add_to_stack_pointer(16),_.__wbindgen_free(t,e,1)}}copy(){const t=_.provingkey_copy(this.__wbg_ptr);return Q.__wrap(t)}static fromBytes(t){try{const i=_.__wbindgen_add_to_stack_pointer(-16),o=k(t,_.__wbindgen_malloc),a=g;_.provingkey_fromBytes(i,o,a);var e=f()[i/4+0],r=f()[i/4+1];if(f()[i/4+2])throw n(r);return Q.__wrap(e)}finally{_.__wbindgen_add_to_stack_pointer(16)}}static fromString(t){try{const i=_.__wbindgen_add_to_stack_pointer(-16),o=b(t,_.__wbindgen_malloc,_.__wbindgen_realloc),a=g;_.provingkey_fromString(i,o,a);var e=f()[i/4+0],r=f()[i/4+1];if(f()[i/4+2])throw n(r);return Q.__wrap(e)}finally{_.__wbindgen_add_to_stack_pointer(16)}}toBytes(){try{const o=_.__wbindgen_add_to_stack_pointer(-16);_.provingkey_toBytes(o,this.__wbg_ptr);var t=f()[o/4+0],e=f()[o/4+1],r=f()[o/4+2];if(f()[o/4+3])throw n(r);var i=V(t,e).slice();return _.__wbindgen_free(t,1*e,1),i}finally{_.__wbindgen_add_to_stack_pointer(16)}}toString(){let t,e;try{const i=_.__wbindgen_add_to_stack_pointer(-16);_.provingkey_toString(i,this.__wbg_ptr);var r=f()[i/4+0],n=f()[i/4+1];return t=r,e=n,s(r,n)}finally{_.__wbindgen_add_to_stack_pointer(16),_.__wbindgen_free(t,e,1)}}}const X="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((t=>_.__wbg_recordciphertext_free(t>>>0)));class G{static __wrap(_){_>>>=0;const t=Object.create(G.prototype);return t.__wbg_ptr=_,X.register(t,t.__wbg_ptr,t),t}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,X.unregister(this),_}free(){const t=this.__destroy_into_raw();_.__wbg_recordciphertext_free(t)}static fromString(t){try{const i=_.__wbindgen_add_to_stack_pointer(-16),o=b(t,_.__wbindgen_malloc,_.__wbindgen_realloc),a=g;_.recordciphertext_fromString(i,o,a);var e=f()[i/4+0],r=f()[i/4+1];if(f()[i/4+2])throw n(r);return G.__wrap(e)}finally{_.__wbindgen_add_to_stack_pointer(16)}}toString(){let t,e;try{const i=_.__wbindgen_add_to_stack_pointer(-16);_.recordciphertext_toString(i,this.__wbg_ptr);var r=f()[i/4+0],n=f()[i/4+1];return t=r,e=n,s(r,n)}finally{_.__wbindgen_add_to_stack_pointer(16),_.__wbindgen_free(t,e,1)}}decrypt(t){try{const i=_.__wbindgen_add_to_stack_pointer(-16);v(t,a_),_.recordciphertext_decrypt(i,this.__wbg_ptr,t.__wbg_ptr);var e=f()[i/4+0],r=f()[i/4+1];if(f()[i/4+2])throw n(r);return Z.__wrap(e)}finally{_.__wbindgen_add_to_stack_pointer(16)}}isOwner(t){v(t,a_);return 0!==_.recordciphertext_isOwner(this.__wbg_ptr,t.__wbg_ptr)}}const Y="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((t=>_.__wbg_recordplaintext_free(t>>>0)));class Z{static __wrap(_){_>>>=0;const t=Object.create(Z.prototype);return t.__wbg_ptr=_,Y.register(t,t.__wbg_ptr,t),t}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,Y.unregister(this),_}free(){const t=this.__destroy_into_raw();_.__wbg_recordplaintext_free(t)}commitment(t,e){try{const o=_.__wbindgen_add_to_stack_pointer(-16),a=b(t,_.__wbindgen_malloc,_.__wbindgen_realloc),s=g,c=b(e,_.__wbindgen_malloc,_.__wbindgen_realloc),w=g;_.recordplaintext_commitment(o,this.__wbg_ptr,a,s,c,w);var r=f()[o/4+0],i=f()[o/4+1];if(f()[o/4+2])throw n(i);return K.__wrap(r)}finally{_.__wbindgen_add_to_stack_pointer(16)}}static fromString(t){try{const i=_.__wbindgen_add_to_stack_pointer(-16),o=b(t,_.__wbindgen_malloc,_.__wbindgen_realloc),a=g;_.recordplaintext_fromString(i,o,a);var e=f()[i/4+0],r=f()[i/4+1];if(f()[i/4+2])throw n(r);return Z.__wrap(e)}finally{_.__wbindgen_add_to_stack_pointer(16)}}toString(){let t,e;try{const i=_.__wbindgen_add_to_stack_pointer(-16);_.recordplaintext_toString(i,this.__wbg_ptr);var r=f()[i/4+0],n=f()[i/4+1];return t=r,e=n,s(r,n)}finally{_.__wbindgen_add_to_stack_pointer(16),_.__wbindgen_free(t,e,1)}}microcredits(){const t=_.recordplaintext_microcredits(this.__wbg_ptr);return BigInt.asUintN(64,t)}nonce(){let t,e;try{const i=_.__wbindgen_add_to_stack_pointer(-16);_.recordplaintext_nonce(i,this.__wbg_ptr);var r=f()[i/4+0],n=f()[i/4+1];return t=r,e=n,s(r,n)}finally{_.__wbindgen_add_to_stack_pointer(16),_.__wbindgen_free(t,e,1)}}serialNumberString(t,e,r){let i,o;try{const p=_.__wbindgen_add_to_stack_pointer(-16);v(t,W);const y=b(e,_.__wbindgen_malloc,_.__wbindgen_realloc),m=g,h=b(r,_.__wbindgen_malloc,_.__wbindgen_realloc),k=g;_.recordplaintext_serialNumberString(p,this.__wbg_ptr,t.__wbg_ptr,y,m,h,k);var a=f()[p/4+0],c=f()[p/4+1],w=f()[p/4+2],d=f()[p/4+3],l=a,u=c;if(d)throw l=0,u=0,n(w);return i=l,o=u,s(l,u)}finally{_.__wbindgen_add_to_stack_pointer(16),_.__wbindgen_free(i,o,1)}}}const __="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((t=>_.__wbg_signature_free(t>>>0)));class t_{static __wrap(_){_>>>=0;const t=Object.create(t_.prototype);return t.__wbg_ptr=_,__.register(t,t.__wbg_ptr,t),t}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,__.unregister(this),_}free(){const t=this.__destroy_into_raw();_.__wbg_signature_free(t)}static sign(t,e){v(t,W);const r=k(e,_.__wbindgen_malloc),n=g,i=_.privatekey_sign(t.__wbg_ptr,r,n);return t_.__wrap(i)}verify(t,e){v(t,T);const r=k(e,_.__wbindgen_malloc),n=g;return 0!==_.signature_verify(this.__wbg_ptr,t.__wbg_ptr,r,n)}static from_string(t){const e=b(t,_.__wbindgen_malloc,_.__wbindgen_realloc),r=g,n=_.signature_from_string(e,r);return t_.__wrap(n)}to_string(){let t,e;try{const i=_.__wbindgen_add_to_stack_pointer(-16);_.signature_to_string(i,this.__wbg_ptr);var r=f()[i/4+0],n=f()[i/4+1];return t=r,e=n,s(r,n)}finally{_.__wbindgen_add_to_stack_pointer(16),_.__wbindgen_free(t,e,1)}}}const e_="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((t=>_.__wbg_transaction_free(t>>>0)));class r_{static __wrap(_){_>>>=0;const t=Object.create(r_.prototype);return t.__wbg_ptr=_,e_.register(t,t.__wbg_ptr,t),t}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,e_.unregister(this),_}free(){const t=this.__destroy_into_raw();_.__wbg_transaction_free(t)}static fromString(t){try{const i=_.__wbindgen_add_to_stack_pointer(-16),o=b(t,_.__wbindgen_malloc,_.__wbindgen_realloc),a=g;_.transaction_fromString(i,o,a);var e=f()[i/4+0],r=f()[i/4+1];if(f()[i/4+2])throw n(r);return r_.__wrap(e)}finally{_.__wbindgen_add_to_stack_pointer(16)}}toString(){let t,e;try{const i=_.__wbindgen_add_to_stack_pointer(-16);_.transaction_toString(i,this.__wbg_ptr);var r=f()[i/4+0],n=f()[i/4+1];return t=r,e=n,s(r,n)}finally{_.__wbindgen_add_to_stack_pointer(16),_.__wbindgen_free(t,e,1)}}transactionId(){let t,e;try{const i=_.__wbindgen_add_to_stack_pointer(-16);_.transaction_transactionId(i,this.__wbg_ptr);var r=f()[i/4+0],n=f()[i/4+1];return t=r,e=n,s(r,n)}finally{_.__wbindgen_add_to_stack_pointer(16),_.__wbindgen_free(t,e,1)}}transactionType(){let t,e;try{const i=_.__wbindgen_add_to_stack_pointer(-16);_.transaction_transactionType(i,this.__wbg_ptr);var r=f()[i/4+0],n=f()[i/4+1];return t=r,e=n,s(r,n)}finally{_.__wbindgen_add_to_stack_pointer(16),_.__wbindgen_free(t,e,1)}}}const n_="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((t=>_.__wbg_verifyingkey_free(t>>>0)));class i_{static __wrap(_){_>>>=0;const t=Object.create(i_.prototype);return t.__wbg_ptr=_,n_.register(t,t.__wbg_ptr,t),t}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,n_.unregister(this),_}free(){const t=this.__destroy_into_raw();_.__wbg_verifyingkey_free(t)}static bondPublicVerifier(){const t=_.verifyingkey_bondPublicVerifier();return i_.__wrap(t)}static bondValidatorVerifier(){const t=_.verifyingkey_bondValidatorVerifier();return i_.__wrap(t)}static claimUnbondPublicVerifier(){const t=_.verifyingkey_claimUnbondPublicVerifier();return i_.__wrap(t)}static feePrivateVerifier(){const t=_.verifyingkey_feePrivateVerifier();return i_.__wrap(t)}static feePublicVerifier(){const t=_.verifyingkey_feePublicVerifier();return i_.__wrap(t)}static inclusionVerifier(){const t=_.verifyingkey_inclusionVerifier();return i_.__wrap(t)}static joinVerifier(){const t=_.verifyingkey_joinVerifier();return i_.__wrap(t)}static setValidatorStateVerifier(){const t=_.verifyingkey_setValidatorStateVerifier();return i_.__wrap(t)}static splitVerifier(){const t=_.verifyingkey_splitVerifier();return i_.__wrap(t)}static transferPrivateVerifier(){const t=_.verifyingkey_transferPrivateVerifier();return i_.__wrap(t)}static transferPrivateToPublicVerifier(){const t=_.verifyingkey_transferPrivateToPublicVerifier();return i_.__wrap(t)}static transferPublicVerifier(){const t=_.verifyingkey_transferPublicVerifier();return i_.__wrap(t)}static transferPublicAsSignerVerifier(){const t=_.verifyingkey_transferPublicAsSignerVerifier();return i_.__wrap(t)}static transferPublicToPrivateVerifier(){const t=_.verifyingkey_transferPublicToPrivateVerifier();return i_.__wrap(t)}static unbondPublicVerifier(){const t=_.verifyingkey_unbondPublicVerifier();return i_.__wrap(t)}isBondPublicVerifier(){return 0!==_.verifyingkey_isBondPublicVerifier(this.__wbg_ptr)}isBondValidatorVerifier(){return 0!==_.verifyingkey_isBondValidatorVerifier(this.__wbg_ptr)}isClaimUnbondPublicVerifier(){return 0!==_.verifyingkey_isClaimUnbondPublicVerifier(this.__wbg_ptr)}isFeePrivateVerifier(){return 0!==_.verifyingkey_isFeePrivateVerifier(this.__wbg_ptr)}isFeePublicVerifier(){return 0!==_.verifyingkey_isFeePublicVerifier(this.__wbg_ptr)}isInclusionVerifier(){return 0!==_.verifyingkey_isInclusionVerifier(this.__wbg_ptr)}isJoinVerifier(){return 0!==_.verifyingkey_isJoinVerifier(this.__wbg_ptr)}isSetValidatorStateVerifier(){return 0!==_.verifyingkey_isSetValidatorStateVerifier(this.__wbg_ptr)}isSplitVerifier(){return 0!==_.verifyingkey_isSplitVerifier(this.__wbg_ptr)}isTransferPrivateVerifier(){return 0!==_.verifyingkey_isTransferPrivateVerifier(this.__wbg_ptr)}isTransferPrivateToPublicVerifier(){return 0!==_.verifyingkey_isTransferPrivateToPublicVerifier(this.__wbg_ptr)}isTransferPublicVerifier(){return 0!==_.verifyingkey_isTransferPublicVerifier(this.__wbg_ptr)}isTransferPublicAsSignerVerifier(){return 0!==_.verifyingkey_isTransferPublicAsSignerVerifier(this.__wbg_ptr)}isTransferPublicToPrivateVerifier(){return 0!==_.verifyingkey_isTransferPublicToPrivateVerifier(this.__wbg_ptr)}isUnbondPublicVerifier(){return 0!==_.verifyingkey_isUnbondPublicVerifier(this.__wbg_ptr)}checksum(){let t,e;try{const i=_.__wbindgen_add_to_stack_pointer(-16);_.verifyingkey_checksum(i,this.__wbg_ptr);var r=f()[i/4+0],n=f()[i/4+1];return t=r,e=n,s(r,n)}finally{_.__wbindgen_add_to_stack_pointer(16),_.__wbindgen_free(t,e,1)}}copy(){const t=_.verifyingkey_copy(this.__wbg_ptr);return i_.__wrap(t)}static fromBytes(t){try{const i=_.__wbindgen_add_to_stack_pointer(-16),o=k(t,_.__wbindgen_malloc),a=g;_.verifyingkey_fromBytes(i,o,a);var e=f()[i/4+0],r=f()[i/4+1];if(f()[i/4+2])throw n(r);return i_.__wrap(e)}finally{_.__wbindgen_add_to_stack_pointer(16)}}static fromString(t){try{const i=_.__wbindgen_add_to_stack_pointer(-16),o=b(t,_.__wbindgen_malloc,_.__wbindgen_realloc),a=g;_.verifyingkey_fromString(i,o,a);var e=f()[i/4+0],r=f()[i/4+1];if(f()[i/4+2])throw n(r);return i_.__wrap(e)}finally{_.__wbindgen_add_to_stack_pointer(16)}}toBytes(){try{const o=_.__wbindgen_add_to_stack_pointer(-16);_.verifyingkey_toBytes(o,this.__wbg_ptr);var t=f()[o/4+0],e=f()[o/4+1],r=f()[o/4+2];if(f()[o/4+3])throw n(r);var i=V(t,e).slice();return _.__wbindgen_free(t,1*e,1),i}finally{_.__wbindgen_add_to_stack_pointer(16)}}toString(){let t,e;try{const i=_.__wbindgen_add_to_stack_pointer(-16);_.verifyingkey_toString(i,this.__wbg_ptr);var r=f()[i/4+0],n=f()[i/4+1];return t=r,e=n,s(r,n)}finally{_.__wbindgen_add_to_stack_pointer(16),_.__wbindgen_free(t,e,1)}}}const o_="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((t=>_.__wbg_viewkey_free(t>>>0)));class a_{static __wrap(_){_>>>=0;const t=Object.create(a_.prototype);return t.__wbg_ptr=_,o_.register(t,t.__wbg_ptr,t),t}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,o_.unregister(this),_}free(){const t=this.__destroy_into_raw();_.__wbg_viewkey_free(t)}static from_private_key(t){v(t,W);const e=_.privatekey_to_view_key(t.__wbg_ptr);return a_.__wrap(e)}static from_string(t){const e=b(t,_.__wbindgen_malloc,_.__wbindgen_realloc),r=g,n=_.viewkey_from_string(e,r);return a_.__wrap(n)}to_string(){let t,e;try{const i=_.__wbindgen_add_to_stack_pointer(-16);_.viewkey_to_string(i,this.__wbg_ptr);var r=f()[i/4+0],n=f()[i/4+1];return t=r,e=n,s(r,n)}finally{_.__wbindgen_add_to_stack_pointer(16),_.__wbindgen_free(t,e,1)}}to_address(){const t=_.address_from_view_key(this.__wbg_ptr);return T.__wrap(t)}decrypt(t){let e,r;try{const l=_.__wbindgen_add_to_stack_pointer(-16),u=b(t,_.__wbindgen_malloc,_.__wbindgen_realloc),p=g;_.viewkey_decrypt(l,this.__wbg_ptr,u,p);var i=f()[l/4+0],o=f()[l/4+1],a=f()[l/4+2],c=f()[l/4+3],w=i,d=o;if(c)throw w=0,d=0,n(a);return e=w,r=d,s(w,d)}finally{_.__wbindgen_add_to_stack_pointer(16),_.__wbindgen_free(e,r,1)}}}function s_(){const t={wbg:{}};return t.wbg.__wbindgen_object_drop_ref=function(_){n(_)},t.wbg.__wbg_new_71801a555ad9f2aa=function(){return x((function(){return c(new XMLHttpRequest)}),arguments)},t.wbg.__wbg_overrideMimeType_ee9c51919ceb418b=function(){return x((function(_,t,r){e(_).overrideMimeType(s(t,r))}),arguments)},t.wbg.__wbg_open_c9eb0cf2c9d95679=function(){return x((function(_,t,r,n,i,o){e(_).open(s(t,r),s(n,i),0!==o)}),arguments)},t.wbg.__wbg_send_80d29985093c1ec5=function(){return x((function(_){e(_).send()}),arguments)},t.wbg.__wbg_response_7c2e2759084f7279=function(){return x((function(_){return c(e(_).response)}),arguments)},t.wbg.__wbg_status_d485fb5a478426fb=function(){return x((function(_){return e(_).status}),arguments)},t.wbg.__wbg_new_72fb9a18b5ae2624=function(){return c(new Object)},t.wbg.__wbindgen_string_new=function(_,t){return c(s(_,t))},t.wbg.__wbg_set_1f9b04f170055d33=function(){return x((function(_,t,r){return Reflect.set(e(_),e(t),e(r))}),arguments)},t.wbg.__wbg_new_ab6fd82b10560829=function(){return x((function(){return c(new Headers)}),arguments)},t.wbg.__wbindgen_object_clone_ref=function(_){return c(e(_))},t.wbg.__wbg_new_0d76b0581eca6298=function(){return x((function(){return c(new AbortController)}),arguments)},t.wbg.__wbg_signal_a61f78a3478fd9bc=function(_){return c(e(_).signal)},t.wbg.__wbg_append_7bfcb4937d1d5e29=function(){return x((function(_,t,r,n,i){e(_).append(s(t,r),s(n,i))}),arguments)},t.wbg.__wbg_instanceof_Response_849eb93e75734b6e=function(_){let t;try{t=e(_)instanceof Response}catch(_){t=!1}return t},t.wbg.__wbg_status_61a01141acd3cf74=function(_){return e(_).status},t.wbg.__wbg_url_5f6dc4009ac5f99d=function(t,r){const n=b(e(r).url,_.__wbindgen_malloc,_.__wbindgen_realloc),i=g;f()[t/4+1]=i,f()[t/4+0]=n},t.wbg.__wbg_headers_9620bfada380764a=function(_){return c(e(_).headers)},t.wbg.__wbg_iterator_2cee6dadfd956dfa=function(){return c(Symbol.iterator)},t.wbg.__wbg_get_e3c254076557e348=function(){return x((function(_,t){return c(Reflect.get(e(_),e(t)))}),arguments)},t.wbg.__wbindgen_is_function=function(_){return"function"==typeof e(_)},t.wbg.__wbg_call_27c0f87801dedf93=function(){return x((function(_,t){return c(e(_).call(e(t)))}),arguments)},t.wbg.__wbindgen_is_object=function(_){const t=e(_);return"object"==typeof t&&null!==t},t.wbg.__wbg_next_40fc327bfc8770e6=function(_){return c(e(_).next)},t.wbg.__wbg_next_196c84450b364254=function(){return x((function(_){return c(e(_).next())}),arguments)},t.wbg.__wbg_done_298b57d23c0fc80c=function(_){return e(_).done},t.wbg.__wbg_value_d93c65011f51a456=function(_){return c(e(_).value)},t.wbg.__wbg_abort_2aa7521d5690750e=function(_){e(_).abort()},t.wbg.__wbg_stringify_8887fe74e1c50d81=function(){return x((function(_){return c(JSON.stringify(e(_)))}),arguments)},t.wbg.__wbindgen_string_get=function(t,r){const n=e(r),i="string"==typeof n?n:void 0;var o=l(i)?0:b(i,_.__wbindgen_malloc,_.__wbindgen_realloc),a=g;f()[t/4+1]=a,f()[t/4+0]=o},t.wbg.__wbg_executionresponse_new=function(_){return c(O.__wrap(_))},t.wbg.__wbg_call_b3ca7c6051f9bec1=function(){return x((function(_,t,r){return c(e(_).call(e(t),e(r)))}),arguments)},t.wbg.__wbg_log_0159ca40cddf5b15=function(_,t){console.log(s(_,t))},t.wbg.__wbg_newwithlength_66ae46612e7f0234=function(_){return c(new Array(_>>>0))},t.wbg.__wbg_set_d4638f722068f043=function(_,t,r){e(_)[t>>>0]=n(r)},t.wbg.__wbg_transaction_new=function(_){return c(r_.__wrap(_))},t.wbg.__wbindgen_bigint_from_u64=function(_){return c(BigInt.asUintN(64,_))},t.wbg.__wbg_keypair_new=function(_){return c(E.__wrap(_))},t.wbg.__wbindgen_module=function(){return c(w_.__wbindgen_wasm_module)},t.wbg.__wbindgen_memory=function(){return c(_.memory)},t.wbg.__wbg_spawnWorker_f6acaddb2e29dc4a=function(_,t,r,n){return c(function(_,t,e,r){return new Promise((n=>{const i=new Worker(_,{type:"module"});i.addEventListener("message",(_=>{setTimeout((()=>{n(i),i.unref&&i.unref()}),0)}),{capture:!0,once:!0}),i.postMessage({module:t,memory:e,address:r})}))}(e(_),e(t),e(r),n>>>0))},t.wbg.__wbindgen_cb_drop=function(_){const t=n(_).original;if(1==t.cnt--)return t.a=0,!0;return!1},t.wbg.__wbg_new_16b304a2cfa7ff4a=function(){return c(new Array)},t.wbg.__wbg_push_a5b05aedc7234f9f=function(_,t){return e(_).push(e(t))},t.wbg.__wbg_arrayBuffer_29931d52c7206b02=function(){return x((function(_){return c(e(_).arrayBuffer())}),arguments)},t.wbg.__wbg_new_63b92bc8671ed464=function(_){return c(new Uint8Array(e(_)))},t.wbg.__wbg_length_c20a40f15020d68a=function(_){return e(_).length},t.wbg.__wbg_new_81740750da40724f=function(t,e){try{var r={a:t,b:e};const n=new Promise(((t,e)=>{const n=r.a;r.a=0;try{return function(t,e,r,n){_.wasm_bindgen__convert__closures__invoke2_mut__h2157eed66e6e3fca(t,e,c(r),c(n))}(n,r.b,t,e)}finally{r.a=n}}));return c(n)}finally{r.a=r.b=0}},t.wbg.__wbindgen_number_new=function(_){return c(_)},t.wbg.__wbg_new_abda76e883ba8a5f=function(){return c(new Error)},t.wbg.__wbg_stack_658279fe44541cf6=function(t,r){const n=b(e(r).stack,_.__wbindgen_malloc,_.__wbindgen_realloc),i=g;f()[t/4+1]=i,f()[t/4+0]=n},t.wbg.__wbg_error_f851667af71bcfc6=function(t,e){let r,n;try{r=t,n=e,console.error(s(t,e))}finally{_.__wbindgen_free(r,n,1)}},t.wbg.__wbg_buffer_12d079cc21e14bdb=function(_){return c(e(_).buffer)},t.wbg.__wbg_newwithbyteoffsetandlength_aa4a17c33a06e5cb=function(_,t,r){return c(new Uint8Array(e(_),t>>>0,r>>>0))},t.wbg.__wbg_randomFillSync_5c9c955aa56b6049=function(){return x((function(_,t){e(_).randomFillSync(n(t))}),arguments)},t.wbg.__wbg_subarray_a1f73cd4b5b42fe1=function(_,t,r){return c(e(_).subarray(t>>>0,r>>>0))},t.wbg.__wbg_getRandomValues_3aa56aa6edec874c=function(){return x((function(_,t){e(_).getRandomValues(e(t))}),arguments)},t.wbg.__wbg_set_a47bac70306a19a7=function(_,t,r){e(_).set(e(t),r>>>0)},t.wbg.__wbg_crypto_1d1f22824a6a080c=function(_){return c(e(_).crypto)},t.wbg.__wbg_process_4a72847cc503995b=function(_){return c(e(_).process)},t.wbg.__wbg_versions_f686565e586dd935=function(_){return c(e(_).versions)},t.wbg.__wbg_node_104a2ff8d6ea03a2=function(_){return c(e(_).node)},t.wbg.__wbindgen_is_string=function(_){return"string"==typeof e(_)},t.wbg.__wbg_require_cca90b1a94a0255b=function(){return x((function(){return c(module.require)}),arguments)},t.wbg.__wbg_msCrypto_eb05e62b530a1508=function(_){return c(e(_).msCrypto)},t.wbg.__wbg_newwithlength_e9b4878cebadb3d3=function(_){return c(new Uint8Array(_>>>0))},t.wbg.__wbg_length_cd7af8117672b8b8=function(_){return e(_).length},t.wbg.__wbg_get_bd8e338fbd5f5cc8=function(_,t){return c(e(_)[t>>>0])},t.wbg.__wbg_self_ce0dbfc45cf2f5be=function(){return x((function(){return c(self.self)}),arguments)},t.wbg.__wbg_window_c6fb939a7f436783=function(){return x((function(){return c(window.window)}),arguments)},t.wbg.__wbg_globalThis_d1e6af4856ba331b=function(){return x((function(){return c(globalThis.globalThis)}),arguments)},t.wbg.__wbg_global_207b558942527489=function(){return x((function(){return c(global.global)}),arguments)},t.wbg.__wbindgen_is_undefined=function(_){return void 0===e(_)},t.wbg.__wbg_newnoargs_e258087cd0daa0ea=function(_,t){return c(new Function(s(_,t)))},t.wbg.__wbg_has_0af94d20077affa2=function(){return x((function(_,t){return Reflect.has(e(_),e(t))}),arguments)},t.wbg.__wbg_fetch_bc7c8e27076a5c84=function(_){return c(fetch(e(_)))},t.wbg.__wbg_fetch_921fad6ef9e883dd=function(_,t){return c(e(_).fetch(e(t)))},t.wbg.__wbindgen_debug_string=function(t,r){const n=b(p(e(r)),_.__wbindgen_malloc,_.__wbindgen_realloc),i=g;f()[t/4+1]=i,f()[t/4+0]=n},t.wbg.__wbindgen_throw=function(_,t){throw new Error(s(_,t))},t.wbg.__wbindgen_rethrow=function(_){throw n(_)},t.wbg.__wbg_then_a73caa9a87991566=function(_,t,r){return c(e(_).then(e(t),e(r)))},t.wbg.__wbg_then_0c86a60e8fcfe9f6=function(_,t){return c(e(_).then(e(t)))},t.wbg.__wbg_queueMicrotask_481971b0d87f3dd4=function(_){queueMicrotask(e(_))},t.wbg.__wbg_queueMicrotask_3cbae2ec6b6cd3d6=function(_){return c(e(_).queueMicrotask)},t.wbg.__wbg_resolve_b0083a7967828ec8=function(_){return c(Promise.resolve(e(_)))},t.wbg.__wbg_waitAsync_5d743fc9058ba01a=function(){return c(Atomics.waitAsync)},t.wbg.__wbg_new_8cccba86b0f574cb=function(_){return c(new Int32Array(e(_)))},t.wbg.__wbg_waitAsync_46d5c36955b71a79=function(_,t,r){return c(Atomics.waitAsync(e(_),t,r))},t.wbg.__wbg_async_19c0400d97cc72fe=function(_){return e(_).async},t.wbg.__wbg_value_571d60108110e917=function(_){return c(e(_).value)},t.wbg.__wbindgen_link_fc1eedd35dc7e0a6=function(t){const e=b("data:application/javascript,"+encodeURIComponent("onmessage = function (ev) {\n let [ia, index, value] = ev.data;\n ia = new Int32Array(ia.buffer);\n let result = Atomics.wait(ia, index, value);\n postMessage(result);\n };\n "),_.__wbindgen_malloc,_.__wbindgen_realloc),r=g;f()[t/4+1]=r,f()[t/4+0]=e},t.wbg.__wbg_new_d1187ae36d662ef9=function(){return x((function(_,t){return c(new Worker(s(_,t)))}),arguments)},t.wbg.__wbg_setonmessage_503809e5bb51bd33=function(_,t){e(_).onmessage=e(t)},t.wbg.__wbg_of_6a70eed8d41f469c=function(_,t,r){return c(Array.of(e(_),e(t),e(r)))},t.wbg.__wbg_postMessage_7380d10e8b8269df=function(){return x((function(_,t){e(_).postMessage(e(t))}),arguments)},t.wbg.__wbg_data_3ce7c145ca4fbcdc=function(_){return c(e(_).data)},t.wbg.__wbg_newwithstrandinit_3fd6fba4083ff2d0=function(){return x((function(_,t,r){return c(new Request(s(_,t),e(r)))}),arguments)},t.wbg.__wbg_responseText_c67ed2d48db10769=function(){return x((function(t,r){const n=e(r).responseText;var i=l(n)?0:b(n,_.__wbindgen_malloc,_.__wbindgen_realloc),o=g;f()[t/4+1]=o,f()[t/4+0]=i}),arguments)},t.wbg.__wbindgen_closure_wrapper5837=function(_,t,e){return c(m(_,t,538,h))},t.wbg.__wbindgen_closure_wrapper5862=function(_,t,e){return c(m(_,t,538,h))},t}function c_(_,t){_.wbg.memory=t||new WebAssembly.Memory({initial:25,maximum:65536,shared:!0})}function g_(t,e){return _=t.exports,w_.__wbindgen_wasm_module=e,P=null,u=null,o=null,_.__wbindgen_start(),_}async function w_(t,e){if(void 0!==_)return _;const r=s_();("string"==typeof t||"function"==typeof Request&&t instanceof Request||"function"==typeof URL&&t instanceof URL)&&(t=fetch(t)),c_(r,e);const{instance:n,module:i}=await async function(_,t){if("function"==typeof Response&&_ instanceof Response){if("function"==typeof WebAssembly.instantiateStreaming)try{return await WebAssembly.instantiateStreaming(_,t)}catch(t){if("application/wasm"==_.headers.get("Content-Type"))throw t;console.warn("`WebAssembly.instantiateStreaming` failed because your server does not serve wasm with `application/wasm` MIME type. Falling back to `WebAssembly.instantiate` which is slower. Original error:\n",t)}const e=await _.arrayBuffer();return await WebAssembly.instantiate(e,t)}{const e=await WebAssembly.instantiate(_,t);return e instanceof WebAssembly.Instance?{instance:e,module:_}:e}}(await t,r);return g_(n,i)}var d_=Object.freeze({__proto__:null,Address:T,Execution:z,ExecutionResponse:O,Field:K,KeyPair:E,Metadata:I,OfflineQuery:C,PrivateKey:W,PrivateKeyCiphertext:$,Program:J,ProgramManager:class{__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,H.unregister(this),_}free(){const t=this.__destroy_into_raw();_.__wbg_programmanager_free(t)}static buildDeploymentTransaction(t,e,r,i,o,a,s,w,d){v(t,W);const u=b(e,_.__wbindgen_malloc,_.__wbindgen_realloc),f=g;let p=0;l(i)||(v(i,Z),p=i.__destroy_into_raw());var y=l(o)?0:b(o,_.__wbindgen_malloc,_.__wbindgen_realloc),m=g;let h=0;l(s)||(v(s,Q),h=s.__destroy_into_raw());let k=0;l(w)||(v(w,i_),k=w.__destroy_into_raw());let P=0;l(d)||(v(d,C),P=d.__destroy_into_raw());return n(_.programmanager_buildDeploymentTransaction(t.__wbg_ptr,u,f,r,p,y,m,l(a)?0:c(a),h,k,P))}static estimateDeploymentFee(t,e){const r=b(t,_.__wbindgen_malloc,_.__wbindgen_realloc),i=g;return n(_.programmanager_estimateDeploymentFee(r,i,l(e)?0:c(e)))}static estimateProgramNameCost(t){try{const i=_.__wbindgen_add_to_stack_pointer(-16),o=b(t,_.__wbindgen_malloc,_.__wbindgen_realloc),a=g;_.programmanager_estimateProgramNameCost(i,o,a);var e=S()[i/8+0],r=f()[i/4+2];if(f()[i/4+3])throw n(r);return BigInt.asUintN(64,e)}finally{_.__wbindgen_add_to_stack_pointer(16)}}static executeFunctionOffline(t,e,r,i,o,a,s,w,d,u,f){v(t,W);const p=b(e,_.__wbindgen_malloc,_.__wbindgen_realloc),y=g,m=b(r,_.__wbindgen_malloc,_.__wbindgen_realloc),h=g;let k=0;l(w)||(v(w,Q),k=w.__destroy_into_raw());let P=0;l(d)||(v(d,i_),P=d.__destroy_into_raw());var S=l(u)?0:b(u,_.__wbindgen_malloc,_.__wbindgen_realloc),V=g;let x=0;l(f)||(v(f,C),x=f.__destroy_into_raw());return n(_.programmanager_executeFunctionOffline(t.__wbg_ptr,p,y,m,h,c(i),o,a,l(s)?0:c(s),k,P,S,V,x))}static buildExecutionTransaction(t,e,r,i,o,a,s,w,d,u,f,p,y){v(t,W);const m=b(e,_.__wbindgen_malloc,_.__wbindgen_realloc),h=g,k=b(r,_.__wbindgen_malloc,_.__wbindgen_realloc),P=g;let S=0;l(a)||(v(a,Z),S=a.__destroy_into_raw());var V=l(s)?0:b(s,_.__wbindgen_malloc,_.__wbindgen_realloc),x=g;let F=0;l(d)||(v(d,Q),F=d.__destroy_into_raw());let T=0;l(u)||(v(u,i_),T=u.__destroy_into_raw());let R=0;l(f)||(v(f,Q),R=f.__destroy_into_raw());let z=0;l(p)||(v(p,i_),z=p.__destroy_into_raw());let A=0;l(y)||(v(y,C),A=y.__destroy_into_raw());return n(_.programmanager_buildExecutionTransaction(t.__wbg_ptr,m,h,k,P,c(i),o,S,V,x,l(w)?0:c(w),F,T,R,z,A))}static estimateExecutionFee(t,e,r,i,o,a,s,w,d){v(t,W);const u=b(e,_.__wbindgen_malloc,_.__wbindgen_realloc),f=g,p=b(r,_.__wbindgen_malloc,_.__wbindgen_realloc),y=g;var m=l(o)?0:b(o,_.__wbindgen_malloc,_.__wbindgen_realloc),h=g;let k=0;l(s)||(v(s,Q),k=s.__destroy_into_raw());let P=0;l(w)||(v(w,i_),P=w.__destroy_into_raw());let S=0;l(d)||(v(d,C),S=d.__destroy_into_raw());return n(_.programmanager_estimateExecutionFee(t.__wbg_ptr,u,f,p,y,c(i),m,h,l(a)?0:c(a),k,P,S))}static estimateFinalizeFee(t,e){try{const o=_.__wbindgen_add_to_stack_pointer(-16),a=b(t,_.__wbindgen_malloc,_.__wbindgen_realloc),s=g,c=b(e,_.__wbindgen_malloc,_.__wbindgen_realloc),w=g;_.programmanager_estimateFinalizeFee(o,a,s,c,w);var r=S()[o/8+0],i=f()[o/4+2];if(f()[o/4+3])throw n(i);return BigInt.asUintN(64,r)}finally{_.__wbindgen_add_to_stack_pointer(16)}}static buildJoinTransaction(t,e,r,i,o,a,s,c,w,d,u){v(t,W),v(e,Z);var f=e.__destroy_into_raw();v(r,Z);var p=r.__destroy_into_raw();let y=0;l(o)||(v(o,Z),y=o.__destroy_into_raw());var m=l(a)?0:b(a,_.__wbindgen_malloc,_.__wbindgen_realloc),h=g;let k=0;l(s)||(v(s,Q),k=s.__destroy_into_raw());let P=0;l(c)||(v(c,i_),P=c.__destroy_into_raw());let S=0;l(w)||(v(w,Q),S=w.__destroy_into_raw());let V=0;l(d)||(v(d,i_),V=d.__destroy_into_raw());let x=0;l(u)||(v(u,C),x=u.__destroy_into_raw());return n(_.programmanager_buildJoinTransaction(t.__wbg_ptr,f,p,i,y,m,h,k,P,S,V,x))}static buildSplitTransaction(t,e,r,i,o,a,s){v(t,W),v(r,Z);var c=r.__destroy_into_raw(),w=l(i)?0:b(i,_.__wbindgen_malloc,_.__wbindgen_realloc),d=g;let u=0;l(o)||(v(o,Q),u=o.__destroy_into_raw());let f=0;l(a)||(v(a,i_),f=a.__destroy_into_raw());let p=0;l(s)||(v(s,C),p=s.__destroy_into_raw());return n(_.programmanager_buildSplitTransaction(t.__wbg_ptr,e,c,w,d,u,f,p))}static buildTransferTransaction(t,e,r,i,o,a,s,c,w,d,u,f,p){v(t,W);const y=b(r,_.__wbindgen_malloc,_.__wbindgen_realloc),m=g,h=b(i,_.__wbindgen_malloc,_.__wbindgen_realloc),k=g;let P=0;l(o)||(v(o,Z),P=o.__destroy_into_raw());let S=0;l(s)||(v(s,Z),S=s.__destroy_into_raw());var V=l(c)?0:b(c,_.__wbindgen_malloc,_.__wbindgen_realloc),x=g;let F=0;l(w)||(v(w,Q),F=w.__destroy_into_raw());let T=0;l(d)||(v(d,i_),T=d.__destroy_into_raw());let R=0;l(u)||(v(u,Q),R=u.__destroy_into_raw());let z=0;l(f)||(v(f,i_),z=f.__destroy_into_raw());let A=0;l(p)||(v(p,C),A=p.__destroy_into_raw());return n(_.programmanager_buildTransferTransaction(t.__wbg_ptr,e,y,m,h,k,P,a,S,V,x,F,T,R,z,A))}static synthesizeKeyPair(t,e,r,i,o){v(t,W);const a=b(e,_.__wbindgen_malloc,_.__wbindgen_realloc),s=g,w=b(r,_.__wbindgen_malloc,_.__wbindgen_realloc),d=g;return n(_.programmanager_synthesizeKeyPair(t.__wbg_ptr,a,s,w,d,c(i),l(o)?0:c(o)))}},ProvingKey:Q,RecordCiphertext:G,RecordPlaintext:Z,Signature:t_,Transaction:r_,VerifyingKey:i_,ViewKey:a_,default:w_,initSync:function(t,e){if(void 0!==_)return _;const r=s_();return c_(r,e),t instanceof WebAssembly.Module||(t=new WebAssembly.Module(t)),g_(new WebAssembly.Instance(t,r),t)},initThreadPool:function(t,e){return n(_.initThreadPool(c(t),e))},runRayonThread:function(t){_.runRayonThread(t)},verifyFunctionExecution:function(t,e,r,i){try{const s=_.__wbindgen_add_to_stack_pointer(-16);v(t,z),v(e,i_),v(r,J);const c=b(i,_.__wbindgen_malloc,_.__wbindgen_realloc),w=g;_.verifyFunctionExecution(s,t.__wbg_ptr,e.__wbg_ptr,r.__wbg_ptr,c,w);var o=f()[s/4+0],a=f()[s/4+1];if(f()[s/4+2])throw n(a);return 0!==o}finally{_.__wbindgen_add_to_stack_pointer(16)}}});await async function(_){const[t,{module:e,memory:r,address:n}]=await Promise.all([_,new Promise((_=>{addEventListener("message",(t=>{_(t.data)}),{capture:!0,once:!0})}))]),i=await t({initializeHook:(_,t)=>_(e,r)});postMessage(null),i.runRayonThread(n),close()}((async(_={})=>{let{importHook:t,serverPath:e,initializeHook:r}=_,n="assets/aleo_wasm.wasm";return null!=e&&(n=e+/[^\/\\]*$/.exec(n)[0]),null!=t&&(n=t(n)),null!=r?await r(w_,n):await w_(n),d_})); \ No newline at end of file diff --git a/444.bundle.js b/444.bundle.js deleted file mode 100644 index 1cb94e6ba..000000000 --- a/444.bundle.js +++ /dev/null @@ -1,2 +0,0 @@ -(()=>{var r,e,t,o,a,n,i={},p={};function c(r){var e=p[r];if(void 0!==e)return e.exports;var t=p[r]={exports:{}};return i[r](t,t.exports,c),t.exports}c.m=i,c.x=()=>{var r=c.O(void 0,[495,877,66],(()=>c(66)));return r=c.O(r)},r="function"==typeof Symbol?Symbol("webpack queues"):"__webpack_queues__",e="function"==typeof Symbol?Symbol("webpack exports"):"__webpack_exports__",t="function"==typeof Symbol?Symbol("webpack error"):"__webpack_error__",o=r=>{r&&r.d<1&&(r.d=1,r.forEach((r=>r.r--)),r.forEach((r=>r.r--?r.r++:r())))},c.a=(a,n,i)=>{var p;i&&((p=[]).d=-1);var c,s,f,l=new Set,u=a.exports,b=new Promise(((r,e)=>{f=e,s=r}));b[e]=u,b[r]=r=>(p&&r(p),l.forEach(r),b.catch((r=>{}))),a.exports=b,n((a=>{var n;c=(a=>a.map((a=>{if(null!==a&&"object"==typeof a){if(a[r])return a;if(a.then){var n=[];n.d=0,a.then((r=>{i[e]=r,o(n)}),(r=>{i[t]=r,o(n)}));var i={};return i[r]=r=>r(n),i}}var p={};return p[r]=r=>{},p[e]=a,p})))(a);var i=()=>c.map((r=>{if(r[t])throw r[t];return r[e]})),s=new Promise((e=>{(n=()=>e(i)).r=0;var t=r=>r!==p&&!l.has(r)&&(l.add(r),r&&!r.d&&(n.r++,r.push(n)));c.map((e=>e[r](t)))}));return n.r?s:i()}),(r=>(r?f(b[t]=r):s(u),o(p)))),p&&p.d<0&&(p.d=0)},a=[],c.O=(r,e,t,o)=>{if(!e){var n=1/0;for(f=0;f=o)&&Object.keys(c.O).every((r=>c.O[r](e[p])))?e.splice(p--,1):(i=!1,o0&&a[f-1][2]>o;f--)a[f]=a[f-1];a[f]=[e,t,o]},c.d=(r,e)=>{for(var t in e)c.o(e,t)&&!c.o(r,t)&&Object.defineProperty(r,t,{enumerable:!0,get:e[t]})},c.f={},c.e=r=>Promise.all(Object.keys(c.f).reduce(((e,t)=>(c.f[t](r,e),e)),[])),c.u=r=>r+".bundle.js",c.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(r){if("object"==typeof window)return window}}(),c.o=(r,e)=>Object.prototype.hasOwnProperty.call(r,e),(()=>{var r;c.g.importScripts&&(r=c.g.location+"");var e=c.g.document;if(!r&&e&&(e.currentScript&&(r=e.currentScript.src),!r)){var t=e.getElementsByTagName("script");if(t.length)for(var o=t.length-1;o>-1&&(!r||!/^http(s?):/.test(r));)r=t[o--].src}if(!r)throw new Error("Automatic publicPath is not supported in this browser");r=r.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),c.p=r})(),(()=>{c.b=self.location+"";var r={444:1};c.f.i=(e,t)=>{r[e]||importScripts(c.p+c.u(e))};var e=self.webpackChunkaleo_website=self.webpackChunkaleo_website||[],t=e.push.bind(e);e.push=e=>{var[o,a,n]=e;for(var i in a)c.o(a,i)&&(c.m[i]=a[i]);for(n&&n(c);o.length;)r[o.pop()]=1;t(e)}})(),n=c.x,c.x=()=>Promise.all([495,877,66].map(c.e,c)).then(n);c.x()})(); -//# sourceMappingURL=444.bundle.js.map \ No newline at end of file diff --git a/444.bundle.js.map b/444.bundle.js.map deleted file mode 100644 index caad75089..000000000 --- a/444.bundle.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"444.bundle.js","mappings":"UAAIA,EACAC,EACAC,EACAC,ECHAC,ECAAC,E,KCCAC,EAA2B,CAAC,EAGhC,SAASC,EAAoBC,GAE5B,IAAIC,EAAeH,EAAyBE,GAC5C,QAAqBE,IAAjBD,EACH,OAAOA,EAAaE,QAGrB,IAAIC,EAASN,EAAyBE,GAAY,CAGjDG,QAAS,CAAC,GAOX,OAHAE,EAAoBL,GAAUI,EAAQA,EAAOD,QAASJ,GAG/CK,EAAOD,OACf,CAGAJ,EA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ADA,IAAID,EAAImC,EAAQlC,OAAS,EAClBD,GAAK,KAAO6B,IAAc,aAAaQ,KAAKR,KAAaA,EAAYM,EAAQnC,KAAKkC,GAE3F,CAID,IAAKL,EAAW,MAAM,IAAIS,MAAM,yDAChCT,EAAYA,EAAUU,QAAQ,OAAQ,IAAIA,QAAQ,QAAS,IAAIA,QAAQ,YAAa,KACpFxF,EAAoByF,EAAIX,C,WClBxB9E,EAAoB0F,EAAIC,KAAKX,SAAW,GAIxC,IAAIY,EAAkB,CACrB,IAAK,GAgBN5F,EAAoB+D,EAAEd,EAAI,CAACe,EAASG,KAE/ByB,EAAgB5B,IAElBe,cAAc/E,EAAoByF,EAAIzF,EAAoBoE,EAAEJ,GAE9D,EAGD,IAAI6B,EAAqBF,KAA+B,yBAAIA,KAA+B,0BAAK,GAC5FG,EAA6BD,EAAmBnD,KAAKqD,KAAKF,GAC9DA,EAAmBnD,KAvBCsD,IACnB,IAAKnD,EAAUoD,EAAaC,GAAWF,EACvC,IAAI,IAAI/F,KAAYgG,EAChBjG,EAAoB2D,EAAEsC,EAAahG,KACrCD,EAAoBO,EAAEN,GAAYgG,EAAYhG,IAIhD,IADGiG,GAASA,EAAQlG,GACd6C,EAASK,QACd0C,EAAgB/C,EAASsD,OAAS,EACnCL,EAA2BE,EAAK,C,KRnB7BlG,EAAOE,EAAoBQ,EAC/BR,EAAoBQ,EAAI,IAChBkB,QAAQuC,IAAI,CAAC,IAAI,IAAI,IAAInC,IAAI9B,EAAoBkC,EAAGlC,IAAsBgC,KAAKlC,GSD7DE,EAAoBQ,G","sources":["webpack://aleo-website/webpack/runtime/async module","webpack://aleo-website/webpack/runtime/chunk loaded","webpack://aleo-website/webpack/runtime/startup chunk dependencies","webpack://aleo-website/webpack/bootstrap","webpack://aleo-website/webpack/runtime/define property getters","webpack://aleo-website/webpack/runtime/ensure chunk","webpack://aleo-website/webpack/runtime/get javascript chunk filename","webpack://aleo-website/webpack/runtime/global","webpack://aleo-website/webpack/runtime/hasOwnProperty shorthand","webpack://aleo-website/webpack/runtime/publicPath","webpack://aleo-website/webpack/runtime/importScripts chunk loading","webpack://aleo-website/webpack/startup"],"sourcesContent":["var webpackQueues = typeof Symbol === \"function\" ? Symbol(\"webpack queues\") : \"__webpack_queues__\";\nvar webpackExports = typeof Symbol === \"function\" ? Symbol(\"webpack exports\") : \"__webpack_exports__\";\nvar webpackError = typeof Symbol === \"function\" ? Symbol(\"webpack error\") : \"__webpack_error__\";\nvar resolveQueue = (queue) => {\n\tif(queue && queue.d < 1) {\n\t\tqueue.d = 1;\n\t\tqueue.forEach((fn) => (fn.r--));\n\t\tqueue.forEach((fn) => (fn.r-- ? fn.r++ : fn()));\n\t}\n}\nvar wrapDeps = (deps) => (deps.map((dep) => {\n\tif(dep !== null && typeof dep === \"object\") {\n\t\tif(dep[webpackQueues]) return dep;\n\t\tif(dep.then) {\n\t\t\tvar queue = [];\n\t\t\tqueue.d = 0;\n\t\t\tdep.then((r) => {\n\t\t\t\tobj[webpackExports] = r;\n\t\t\t\tresolveQueue(queue);\n\t\t\t}, (e) => {\n\t\t\t\tobj[webpackError] = e;\n\t\t\t\tresolveQueue(queue);\n\t\t\t});\n\t\t\tvar obj = {};\n\t\t\tobj[webpackQueues] = (fn) => (fn(queue));\n\t\t\treturn obj;\n\t\t}\n\t}\n\tvar ret = {};\n\tret[webpackQueues] = x => {};\n\tret[webpackExports] = dep;\n\treturn ret;\n}));\n__webpack_require__.a = (module, body, hasAwait) => {\n\tvar queue;\n\thasAwait && ((queue = []).d = -1);\n\tvar depQueues = new Set();\n\tvar exports = module.exports;\n\tvar currentDeps;\n\tvar outerResolve;\n\tvar reject;\n\tvar promise = new Promise((resolve, rej) => {\n\t\treject = rej;\n\t\touterResolve = resolve;\n\t});\n\tpromise[webpackExports] = exports;\n\tpromise[webpackQueues] = (fn) => (queue && fn(queue), depQueues.forEach(fn), promise[\"catch\"](x => {}));\n\tmodule.exports = promise;\n\tbody((deps) => {\n\t\tcurrentDeps = wrapDeps(deps);\n\t\tvar fn;\n\t\tvar getResult = () => (currentDeps.map((d) => {\n\t\t\tif(d[webpackError]) throw d[webpackError];\n\t\t\treturn d[webpackExports];\n\t\t}))\n\t\tvar promise = new Promise((resolve) => {\n\t\t\tfn = () => (resolve(getResult));\n\t\t\tfn.r = 0;\n\t\t\tvar fnQueue = (q) => (q !== queue && !depQueues.has(q) && (depQueues.add(q), q && !q.d && (fn.r++, q.push(fn))));\n\t\t\tcurrentDeps.map((dep) => (dep[webpackQueues](fnQueue)));\n\t\t});\n\t\treturn fn.r ? promise : getResult();\n\t}, (err) => ((err ? reject(promise[webpackError] = err) : outerResolve(exports)), resolveQueue(queue)));\n\tqueue && queue.d < 0 && (queue.d = 0);\n};","var deferred = [];\n__webpack_require__.O = (result, chunkIds, fn, priority) => {\n\tif(chunkIds) {\n\t\tpriority = priority || 0;\n\t\tfor(var i = deferred.length; i > 0 && deferred[i - 1][2] > priority; i--) deferred[i] = deferred[i - 1];\n\t\tdeferred[i] = [chunkIds, fn, priority];\n\t\treturn;\n\t}\n\tvar notFulfilled = Infinity;\n\tfor (var i = 0; i < deferred.length; i++) {\n\t\tvar [chunkIds, fn, priority] = deferred[i];\n\t\tvar fulfilled = true;\n\t\tfor (var j = 0; j < chunkIds.length; j++) {\n\t\t\tif ((priority & 1 === 0 || notFulfilled >= priority) && Object.keys(__webpack_require__.O).every((key) => (__webpack_require__.O[key](chunkIds[j])))) {\n\t\t\t\tchunkIds.splice(j--, 1);\n\t\t\t} else {\n\t\t\t\tfulfilled = false;\n\t\t\t\tif(priority < notFulfilled) notFulfilled = priority;\n\t\t\t}\n\t\t}\n\t\tif(fulfilled) {\n\t\t\tdeferred.splice(i--, 1)\n\t\t\tvar r = fn();\n\t\t\tif (r !== undefined) result = r;\n\t\t}\n\t}\n\treturn result;\n};","var next = __webpack_require__.x;\n__webpack_require__.x = () => {\n\treturn Promise.all([495,877,66].map(__webpack_require__.e, __webpack_require__)).then(next);\n};","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n// expose the modules object (__webpack_modules__)\n__webpack_require__.m = __webpack_modules__;\n\n// the startup function\n__webpack_require__.x = () => {\n\t// Load entry module and return exports\n\t// This entry module depends on other loaded chunks and execution need to be delayed\n\tvar __webpack_exports__ = __webpack_require__.O(undefined, [495,877,66], () => (__webpack_require__(66)))\n\t__webpack_exports__ = __webpack_require__.O(__webpack_exports__);\n\treturn __webpack_exports__;\n};\n\n","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.f = {};\n// This file contains only the entry chunk.\n// The chunk loading function for additional chunks\n__webpack_require__.e = (chunkId) => {\n\treturn Promise.all(Object.keys(__webpack_require__.f).reduce((promises, key) => {\n\t\t__webpack_require__.f[key](chunkId, promises);\n\t\treturn promises;\n\t}, []));\n};","// This function allow to reference async chunks and sibling chunks for the entrypoint\n__webpack_require__.u = (chunkId) => {\n\t// return url for filenames based on template\n\treturn \"\" + chunkId + \".bundle.js\";\n};","__webpack_require__.g = (function() {\n\tif (typeof globalThis === 'object') return globalThis;\n\ttry {\n\t\treturn this || new Function('return this')();\n\t} catch (e) {\n\t\tif (typeof window === 'object') return window;\n\t}\n})();","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","var scriptUrl;\nif (__webpack_require__.g.importScripts) scriptUrl = __webpack_require__.g.location + \"\";\nvar document = __webpack_require__.g.document;\nif (!scriptUrl && document) {\n\tif (document.currentScript)\n\t\tscriptUrl = document.currentScript.src;\n\tif (!scriptUrl) {\n\t\tvar scripts = document.getElementsByTagName(\"script\");\n\t\tif(scripts.length) {\n\t\t\tvar i = scripts.length - 1;\n\t\t\twhile (i > -1 && (!scriptUrl || !/^http(s?):/.test(scriptUrl))) scriptUrl = scripts[i--].src;\n\t\t}\n\t}\n}\n// When supporting browsers where an automatic publicPath is not supported you must specify an output.publicPath manually via configuration\n// or pass an empty string (\"\") and set the __webpack_public_path__ variable from your code to use your own logic.\nif (!scriptUrl) throw new Error(\"Automatic publicPath is not supported in this browser\");\nscriptUrl = scriptUrl.replace(/#.*$/, \"\").replace(/\\?.*$/, \"\").replace(/\\/[^\\/]+$/, \"/\");\n__webpack_require__.p = scriptUrl;","__webpack_require__.b = self.location + \"\";\n\n// object to store loaded chunks\n// \"1\" means \"already loaded\"\nvar installedChunks = {\n\t444: 1\n};\n\n// importScripts chunk loading\nvar installChunk = (data) => {\n\tvar [chunkIds, moreModules, runtime] = data;\n\tfor(var moduleId in moreModules) {\n\t\tif(__webpack_require__.o(moreModules, moduleId)) {\n\t\t\t__webpack_require__.m[moduleId] = moreModules[moduleId];\n\t\t}\n\t}\n\tif(runtime) runtime(__webpack_require__);\n\twhile(chunkIds.length)\n\t\tinstalledChunks[chunkIds.pop()] = 1;\n\tparentChunkLoadingFunction(data);\n};\n__webpack_require__.f.i = (chunkId, promises) => {\n\t// \"1\" is the signal for \"already loaded\"\n\tif(!installedChunks[chunkId]) {\n\t\tif(true) { // all chunks have JS\n\t\t\timportScripts(__webpack_require__.p + __webpack_require__.u(chunkId));\n\t\t}\n\t}\n};\n\nvar chunkLoadingGlobal = self[\"webpackChunkaleo_website\"] = self[\"webpackChunkaleo_website\"] || [];\nvar parentChunkLoadingFunction = chunkLoadingGlobal.push.bind(chunkLoadingGlobal);\nchunkLoadingGlobal.push = installChunk;\n\n// no HMR\n\n// no HMR manifest","// run startup\nvar __webpack_exports__ = __webpack_require__.x();\n"],"names":["webpackQueues","webpackExports","webpackError","resolveQueue","deferred","next","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","undefined","exports","module","__webpack_modules__","m","x","__webpack_exports__","O","Symbol","queue","d","forEach","fn","r","a","body","hasAwait","currentDeps","outerResolve","reject","depQueues","Set","promise","Promise","resolve","rej","deps","map","dep","then","obj","e","ret","wrapDeps","getResult","fnQueue","q","has","add","push","err","result","chunkIds","priority","notFulfilled","Infinity","i","length","fulfilled","j","Object","keys","every","key","splice","definition","o","defineProperty","enumerable","get","f","chunkId","all","reduce","promises","u","g","globalThis","this","Function","window","prop","prototype","hasOwnProperty","call","scriptUrl","importScripts","location","document","currentScript","src","scripts","getElementsByTagName","test","Error","replace","p","b","self","installedChunks","chunkLoadingGlobal","parentChunkLoadingFunction","bind","data","moreModules","runtime","pop"],"sourceRoot":""} \ No newline at end of file diff --git a/495.bundle.js b/495.bundle.js deleted file mode 100644 index cca9c4d14..000000000 --- a/495.bundle.js +++ /dev/null @@ -1,2 +0,0 @@ -(self.webpackChunkaleo_website=self.webpackChunkaleo_website||[]).push([[495],{495:(e,r,t)=>{t.a(e,(async(e,i)=>{try{t.d(r,{AleoKeyProvider:()=>u,AleoKeyProviderParams:()=>h,PrivateKey:()=>n.ZD,ProgramManager:()=>f,ProgramManagerBase:()=>n.Ao,initThreadPool:()=>n.Fs,verifyFunctionExecution:()=>n.Yc});var n=t(877),a=e([n]);n=(a.then?(await a)():a)[0];async function o(e,r){const t=await fetch(e,r);if(!t.ok)throw new Error(t.status+" could not get URL "+e);return t}async function s(e,r){r.method="POST";const t=await fetch(e,r);if(!t.ok)throw new Error(t.status+" could not post URL "+e);return t}class c{host;headers;account;constructor(e,r){this.host=e+"/testnet",r&&r.headers?this.headers=r.headers:this.headers={"X-Aleo-SDK-Version":"0.6.12"}}setAccount(e){this.account=e}getAccount(){return this.account}setHost(e){this.host=e+"/testnet"}async fetchData(e="/"){try{const r=await o(this.host+e,{headers:this.headers});return await r.json()}catch(e){throw new Error("Error fetching data.")}}async findUnspentRecords(e,r,t,i,a,o){if(o=o||[],e<0)throw new Error("Start height must be greater than or equal to 0");const s=new Array;let c,h,u,f,d=0,l=BigInt(0);if(void 0===t){if(void 0===this.account)throw new Error("Private key must be specified in an argument to findOwnedRecords or set in the AleoNetworkClient");u=this.account._privateKey}else try{u=t instanceof n.ZD?t:n.ZD.from_string(t)}catch(e){throw new Error("Error parsing private key provided.")}const y=u.to_view_key();try{const e=await this.getLatestHeight();if("number"!=typeof e)throw new Error("Error fetching latest block height.");f=e}catch(e){throw new Error("Error fetching latest block height.")}if(h="number"==typeof r&&r<=f?r:f,e>h)throw new Error("Start height must be less than or equal to end height.");for(;h>e;){c=h-50,c=BigInt(a))))return s;if(void 0!==i&&i.length>0){let e=0;if(r.microcredits()>i[e]){if(e+=1,s.push(r),"number"==typeof a&&(l+=r.microcredits(),l>=BigInt(a)))return s;if(s.length>=i.length)return s}}}}}catch(e){}}}}}}}catch(e){if(console.warn("Error fetching blocks in range: "+c.toString()+"-"+h.toString()),console.warn("Error: ",e),d+=1,d>10)return console.warn("10 failures fetching records reached. Returning records fetched so far"),s}}return s}async getBlock(e){try{return await this.fetchData("/block/"+e)}catch(e){throw new Error("Error fetching block.")}}async getBlockRange(e,r){try{return await this.fetchData("/blocks?start="+e+"&end="+r)}catch(t){throw new Error("Error fetching blocks between "+e+" and "+r+".")}}async getDeploymentTransactionIDForProgram(e){e instanceof n.BP&&(e=e.toString());try{return(await this.fetchData("/find/transactionID/deployment/"+e)).replace('"',"")}catch(e){throw new Error("Error fetching deployment transaction for program.")}}async getDeploymentTransactionForProgram(e){try{const r=await this.getDeploymentTransactionIDForProgram(e);return await this.getTransaction(r)}catch(e){throw new Error("Error fetching deployment transaction for program.")}}async getLatestBlock(){try{return await this.fetchData("/latest/block")}catch(e){throw new Error("Error fetching latest block.")}}async getLatestCommittee(){try{return await this.fetchData("/committee/latest")}catch(e){throw new Error("Error fetching latest block.")}}async getLatestHeight(){try{return await this.fetchData("/latest/height")}catch(e){throw new Error("Error fetching latest height.")}}async getProgram(e){try{return await this.fetchData("/program/"+e)}catch(e){throw new Error("Error fetching program")}}async getProgramObject(e){try{return n.BP.fromString(e)}catch(r){try{return n.BP.fromString(await this.getProgram(e))}catch(r){throw new Error(`${e} is neither a program name or a valid program`)}}}async getProgramImports(e){try{const r={},t=(e instanceof n.BP?e:await this.getProgramObject(e)).getImports();for(let e=0;e0&&!p)try{p=await this.networkClient.getProgramImports(r)}catch(e){throw K(`Error finding program imports. Network response: '${e}'. Please ensure you're connected to a valid Aleo network and the program is deployed to the network.`)}return await n.Ao.buildExecutionTransaction(v,y,t,o,i,f,this.host,p,d,l,w,b,u)}async execute(e){const r=await this.buildExecutionTransaction(e);return await this.networkClient.submitTransaction(r)}async run(e,r,t,i,a,o,s,c,h,u){let f=h;if(void 0===h&&void 0!==this.account&&(f=this.account.privateKey()),void 0===f)throw"No private key provided and no private key set in the ProgramManager";if(!s||!c)try{[s,c]=await this.keyProvider.functionKeys(o)}catch(e){console.log(`Function keys not found. Key finder response: '${e}'. The function keys will be synthesized`)}return console.log("Running program offline"),console.log("Proving key: ",s),console.log("Verifying key: ",c),n.Ao.executeFunctionOffline(f,e,r,t,i,!1,a,s,c,this.host,u)}async join(e,r,t,i,a,o,s,c){let h,u,f=s;if(void 0===s&&void 0!==this.account&&(f=this.account.privateKey()),void 0===f)throw"No private key provided and no private key set in the ProgramManager";try{h=i?await this.keyProvider.feePrivateKeys():await this.keyProvider.feePublicKeys(),u=await this.keyProvider.joinKeys()}catch(e){throw K(`Error finding fee keys. Key finder response: '${e}'. Please ensure your key provider is configured correctly.`)}const[d,l]=h,[y,p]=u;try{o=i?await this.getCreditsRecord(t,[],o,a):void 0}catch(e){throw K(`Error finding fee record. Record finder response: '${e}'. Please ensure you're connected to a valid Aleo network and a record with enough balance exists.`)}try{e=e instanceof n.ZF?e:n.ZF.fromString(e),r=r instanceof n.ZF?r:n.ZF.fromString(r)}catch(e){throw K("Records provided are not valid. Please ensure they are valid plaintext records.")}const g=await n.Ao.buildJoinTransaction(f,e,r,t,o,this.host,y,p,d,l,c);return await this.networkClient.submitTransaction(g)}async split(e,r,t,i){let a,o=t;if(void 0===o&&void 0!==this.account&&(o=this.account.privateKey()),void 0===o)throw"No private key provided and no private key set in the ProgramManager";try{a=await this.keyProvider.splitKeys()}catch(e){throw K(`Error finding fee keys. Key finder response: '${e}'. Please ensure your key provider is configured correctly.`)}const[s,c]=a;try{r=r instanceof n.ZF?r:n.ZF.fromString(r)}catch(e){throw K("Record provided is not valid. Please ensure it is a valid plaintext record.")}const h=await n.Ao.buildSplitTransaction(o,e,r,this.host,s,c,i);return await this.networkClient.submitTransaction(h)}async synthesizeKeys(e,r,t,i){let a,o=i;void 0===o&&(o=void 0!==this.account?this.account.privateKey():new n.ZD);try{a=await this.networkClient.getProgramImports(e);const i=await n.Ao.synthesizeKeyPair(o,e,r,t,a);return[i.provingKey(),i.verifyingKey()]}catch(e){throw K(`Could not synthesize keys - error ${e}. Please ensure the program is valid and the inputs are correct.`)}}async buildTransferTransaction(e,r,t,i,a,o,s,c,h,u){t=l(t);let f,y,p=h;if(void 0===p&&void 0!==this.account&&(p=this.account.privateKey()),void 0===p)throw"No private key provided and no private key set in the ProgramManager";try{f=a?await this.keyProvider.feePrivateKeys():await this.keyProvider.feePublicKeys(),y=await this.keyProvider.transferKeys(t)}catch(e){throw K(`Error finding fee keys. Key finder response: '${e}'. Please ensure your key provider is configured correctly.`)}const[g,v]=f,[w,b]=y;try{const e=[];d(t)?(s=await this.getCreditsRecord(i,[],s,o),e.push(s.nonce())):s=void 0,c=a?await this.getCreditsRecord(i,e,c,o):void 0}catch(e){throw K(`Error finding fee record. Record finder response: '${e}'. Please ensure you're connected to a valid Aleo network and a record with enough balance exists.`)}return await n.Ao.buildTransferTransaction(p,e,r,t,s,i,c,this.host,w,b,g,v,u)}async buildTransferPublicTransaction(e,r,t,i,n){return this.buildTransferTransaction(e,r,"public",t,!1,void 0,void 0,void 0,i,n)}async buildTransferPublicAsSignerTransaction(e,r,t,i,n){return this.buildTransferTransaction(e,r,"public",t,!1,void 0,void 0,void 0,i,n)}async transfer(e,r,t,i,n,a,o,s,c,h){const u=await this.buildTransferTransaction(e,r,t,i,n,a,o,s,c,h);return await this.networkClient.submitTransaction(u)}async buildBondPublicTransaction(e,r,t,i,n={}){const a=Math.trunc(1e6*i),{programName:o="credits.aleo",functionName:s="bond_public",fee:c=n.fee||.86,privateFee:u=!1,inputs:f=[e,r,t,`${a.toString()}u64`],keySearchParams:d=new h({proverUri:g.bond_public.prover,verifierUri:g.bond_public.verifier,cacheKey:"credits.aleo/bond_public"}),program:l=this.creditsProgram(),...y}=n,p={programName:o,functionName:s,fee:c,privateFee:u,inputs:f,keySearchParams:d,...y};return await this.buildExecutionTransaction(p)}async bondPublic(e,r,t,i,n={}){const a=await this.buildBondPublicTransaction(e,r,t,i,n);return await this.networkClient.submitTransaction(a)}async buildBondValidatorTransaction(e,r,t,i,n={}){const a=Math.trunc(1e6*t),o=Math.trunc(i),{programName:s="credits.aleo",functionName:c="bond_validator",fee:u=n.fee||.86,privateFee:f=!1,inputs:d=[e,r,`${a.toString()}u64`,`${o.toString()}u8`],keySearchParams:l=new h({proverUri:g.bond_validator.prover,verifierUri:g.bond_validator.verifier,cacheKey:"credits.aleo/bond_validator"}),program:y=this.creditsProgram(),...p}=n,v={programName:s,functionName:c,fee:u,privateFee:f,inputs:d,keySearchParams:l,...p};return await this.buildExecutionTransaction(v)}async bondValidator(e,r,t,i,n={}){const a=await this.buildBondValidatorTransaction(e,r,t,i,n);return await this.networkClient.submitTransaction(a)}async buildUnbondPublicTransaction(e,r,t={}){const i=Math.trunc(1e6*r),{programName:n="credits.aleo",functionName:a="unbond_public",fee:o=t.fee||1.3,privateFee:s=!1,inputs:c=[e,`${i.toString()}u64`],keySearchParams:u=new h({proverUri:g.unbond_public.prover,verifierUri:g.unbond_public.verifier,cacheKey:"credits.aleo/unbond_public"}),program:f=this.creditsProgram(),...d}=t,l={programName:n,functionName:a,fee:o,privateFee:s,inputs:c,keySearchParams:u,...d};return this.buildExecutionTransaction(l)}async unbondPublic(e,r,t={}){const i=await this.buildUnbondPublicTransaction(e,r,t);return await this.networkClient.submitTransaction(i)}async buildClaimUnbondPublicTransaction(e,r={}){const{programName:t="credits.aleo",functionName:i="claim_unbond_public",fee:n=r.fee||2,privateFee:a=!1,inputs:o=[e],keySearchParams:s=new h({proverUri:g.claim_unbond_public.prover,verifierUri:g.claim_unbond_public.verifier,cacheKey:"credits.aleo/claim_unbond_public"}),program:c=this.creditsProgram(),...u}=r,f={programName:t,functionName:i,fee:n,privateFee:a,inputs:o,keySearchParams:s,...u};return await this.buildExecutionTransaction(f)}async claimUnbondPublic(e,r={}){const t=await this.buildClaimUnbondPublicTransaction(e,r);return await this.networkClient.submitTransaction(t)}async buildSetValidatorStateTransaction(e,r={}){const{programName:t="credits.aleo",functionName:i="set_validator_state",fee:n=1,privateFee:a=!1,inputs:o=[e.toString()],keySearchParams:s=new h({proverUri:g.set_validator_state.prover,verifierUri:g.set_validator_state.verifier,cacheKey:"credits.aleo/set_validator_state"}),...c}=r,u={programName:t,functionName:i,fee:n,privateFee:a,inputs:o,keySearchParams:s,...c};return await this.execute(u)}async setValidatorState(e,r={}){const t=await this.buildSetValidatorStateTransaction(e,r);return this.networkClient.submitTransaction(t)}verifyExecution(e){try{const r=e.getExecution(),t=e.getFunctionId(),i=e.getProgram(),a=e.getVerifyingKey();return(0,n.Yc)(r,a,i,t)}catch(e){return console.warn("The execution was not found in the response, cannot verify the execution"),!1}}createProgramFromSource(e){return n.BP.fromString(e)}creditsProgram(){return n.BP.getCreditsProgram()}verifyProgram(e){try{return n.BP.fromString(e),!0}catch(e){return!1}}async getCreditsRecord(e,r,t,i){try{return t instanceof n.ZF?t:n.ZF.fromString(t)}catch(t){try{const t=this.recordProvider;return await t.findCreditsRecord(e,!0,r,i)}catch(e){throw K(`Error finding fee record. Record finder response: '${e}'. Please ensure you're connected to a valid Aleo network and a record with enough balance exists.`)}}}}function d(e){return v.has(e)}function l(e){return w.has(e)?e:K(`Invalid transfer type '${e}'. Valid transfer types are 'private', 'privateToPublic', 'public', and 'publicToPrivate'.`)}const y=n.OS.baseUrl();function p(e){const r=n.pF[e.verifyingKey];if(!r)throw new Error("Invalid method name: "+e.verifyingKey);return{name:e.name,locator:e.locator,prover:e.prover,verifier:e.verifier,verifyingKey:r}}const g={bond_public:p(n.OS.bond_public()),bond_validator:p(n.OS.bond_validator()),claim_unbond_public:p(n.OS.claim_unbond_public()),fee_private:p(n.OS.fee_private()),fee_public:p(n.OS.fee_public()),inclusion:p(n.OS.inclusion()),join:p(n.OS.join()),set_validator_state:p(n.OS.set_validator_state()),split:p(n.OS.split()),transfer_private:p(n.OS.transfer_private()),transfer_private_to_public:p(n.OS.transfer_private_to_public()),transfer_public:p(n.OS.transfer_public()),transfer_public_as_signer:p(n.OS.transfer_public_as_signer()),transfer_public_to_private:p(n.OS.transfer_public_to_private()),unbond_public:p(n.OS.unbond_public()),getKey:function(e){return this.hasOwnProperty(e)?this[e]:new Error(`Key "${e}" not found.`)}},v=new Set(["transfer_private","private","transferPrivate","transfer_private_to_public","privateToPublic","transferPrivateToPublic"]),w=new Set(["transfer_private","private","transferPrivate","transfer_private_to_public","privateToPublic","transferPrivateToPublic","transfer_public","transfer_public_as_signer","public","public_as_signer","transferPublic","transferPublicAsSigner","transfer_public_to_private","publicToPrivate","publicAsSigner","transferPublicToPrivate"]),b=new Set(["private","transfer_private","transferPrivate"]),m=new Set(["private_to_public","privateToPublic","transfer_private_to_public","transferPrivateToPublic"]),_=new Set(["public","transfer_public","transferPublic"]),P=new Set(["public_as_signer","transfer_public_as_signer","transferPublicAsSigner"]),k=new Set(["public_to_private","publicToPrivate","transfer_public_to_private","transferPublicToPrivate"]);function K(e){throw console.error(e),e}i()}catch(E){i(E)}}))}}]); -//# sourceMappingURL=495.bundle.js.map \ No newline at end of file diff --git a/495.bundle.js.map b/495.bundle.js.map deleted file mode 100644 index 0b207f63e..000000000 --- a/495.bundle.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"495.bundle.js","mappings":"gWAAOA,eAAeC,EAAIC,EAAmBC,GACzC,MAAMC,QAAiBC,MAAMH,EAAKC,GAElC,IAAKC,EAASE,GACV,MAAM,IAAIC,MAAMH,EAASI,OAAS,sBAAwBN,GAG9D,OAAOE,CACX,CAGOJ,eAAeS,EAAKP,EAAmBC,GAC1CA,EAAQO,OAAS,OAEjB,MAAMN,QAAiBC,MAAMH,EAAKC,GAElC,IAAKC,EAASE,GACV,MAAM,IAAIC,MAAMH,EAASI,OAAS,uBAAyBN,GAG/D,OAAOE,CACX,CCUA,MAAMO,EACJC,KACAC,QACAC,QAEAC,WAAAA,CAAYH,EAAcT,GACxBa,KAAKJ,KAAOA,EAAO,WAEfT,GAAWA,EAAQU,QACrBG,KAAKH,QAAUV,EAAQU,QAGvBG,KAAKH,QAAU,CAEb,qBAAsB,S,CAa5BI,UAAAA,CAAWH,GACTE,KAAKF,QAAUA,C,CASjBI,UAAAA,GACE,OAAOF,KAAKF,O,CASdK,OAAAA,CAAQP,GACNI,KAAKJ,KAAOA,EAAO,U,CAGrB,eAAMQ,CACFlB,EAAM,KAER,IACA,MAAME,QAAiBH,EAAIe,KAAKJ,KAAOV,EAAK,CAC1CW,QAASG,KAAKH,UAGhB,aAAaT,EAASiB,MACrB,CAAC,MAAOC,GACP,MAAM,IAAIf,MAAM,uBACjB,C,CA0BH,wBAAMgB,CACFC,EACAC,EACAC,EACAC,EACAC,EACAC,GAIF,GAFAA,EAASA,GAAU,GAEfL,EAAc,EAChB,MAAM,IAAIjB,MAAM,mDAIlB,MAAMuB,EAAU,IAAIC,MACpB,IAAIC,EACAC,EACAC,EAGAC,EAFAC,EAAW,EACXC,EAAmBC,OAAO,GAI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A2BiH,EAAQF,EAAAA,GAAS/G,6BAC5CE,2BAA4B+G,EAAQF,EAAAA,GAAS7G,8BAC7CY,cAAemG,EAAQF,EAAAA,GAASjG,iBAChCvC,OAAQ,SAAS3D,GACb,OAAIvF,KAAKoF,eAAeG,GACZvF,KAAauF,GAEd,IAAIhG,MAAM,QAAQgG,gB,GAK/BiM,EAAyB,IAAIM,IAAI,CACnC,mBACA,UACA,kBACA,6BACA,kBACA,4BAEEL,EAAuB,IAAIK,IAAI,CACjC,mBACA,UACA,kBACA,6BACA,kBACA,0BACA,kBACA,4BACA,SACA,mBACA,iBACA,yBACA,6BACA,kBACA,iBACA,4BAEE1H,EAAmB,IAAI0H,IAAI,CAC7B,UACA,mBACA,oBAEExH,EAA6B,IAAIwH,IAAI,CACvC,oBACA,kBACA,6BACA,4BAEEtH,EAAkB,IAAIsH,IAAI,CAC5B,SACA,kBACA,mBAEEpH,EAA4B,IAAIoH,IAAI,CACtC,mBACA,4BACA,2BAEElH,EAA6B,IAAIkH,IAAI,CACvC,oBACA,kBACA,6BACA,4BAGJ,SAAStM,EAAYgB,GAEjB,MADA1C,QAAQxD,MAAMkG,GACRA,CACV,C","sources":["webpack://aleo-website/../src/utils.ts","webpack://aleo-website/../src/network-client.ts","webpack://aleo-website/../src/function-key-provider.ts","webpack://aleo-website/../src/program-manager.ts","webpack://aleo-website/../src/index.ts"],"sourcesContent":["export async function get(url: URL | string, options?: RequestInit) {\n const response = await fetch(url, options);\n\n if (!response.ok) {\n throw new Error(response.status + \" could not get URL \" + url);\n }\n\n return response;\n}\n\n\nexport async function post(url: URL | string, options: RequestInit) {\n options.method = \"POST\";\n\n const response = await fetch(url, options);\n\n if (!response.ok) {\n throw new Error(response.status + \" could not post URL \" + url);\n }\n\n return response;\n}\n","import { get, post } from \"./utils\";\nimport {\n Account,\n Block,\n RecordCiphertext,\n Program,\n RecordPlaintext,\n PrivateKey,\n Transaction,\n TransactionModel,\n logAndThrow\n} from \"./index\";\n\ntype ProgramImports = { [key: string]: string | Program };\n\ninterface AleoNetworkClientOptions {\n headers?: { [key: string]: string };\n}\n\n/**\n * Client library that encapsulates REST calls to publicly exposed endpoints of Aleo nodes. The methods provided in this\n * allow users to query public information from the Aleo blockchain and submit transactions to the network.\n *\n * @param {string} host\n * @example\n * // Connection to a local node\n * const localNetworkClient = new AleoNetworkClient(\"http://localhost:3030\");\n *\n * // Connection to a public beacon node\n * const publicnetworkClient = new AleoNetworkClient(\"https://api.explorer.aleo.org/v1\");\n */\nclass AleoNetworkClient {\n host: string;\n headers: { [key: string]: string };\n account: Account | undefined;\n\n constructor(host: string, options?: AleoNetworkClientOptions) {\n this.host = host + \"/testnet\";\n\n if (options && options.headers) {\n this.headers = options.headers;\n\n } else {\n this.headers = {\n // This is replaced by the actual version by a Rollup plugin\n \"X-Aleo-SDK-Version\": \"%%VERSION%%\",\n };\n }\n }\n\n /**\n * Set an account to use in networkClient calls\n *\n * @param {Account} account\n * @example\n * const account = new Account();\n * networkClient.setAccount(account);\n */\n setAccount(account: Account) {\n this.account = account;\n }\n\n /**\n * Return the Aleo account used in the networkClient\n *\n * @example\n * const account = networkClient.getAccount();\n */\n getAccount(): Account | undefined {\n return this.account;\n }\n\n /**\n * Set a new host for the networkClient\n *\n * @param {string} host The address of a node hosting the Aleo API\n * @param host\n */\n setHost(host: string) {\n this.host = host + \"/testnet\";\n }\n\n async fetchData(\n url = \"/\",\n ): Promise {\n try {\n const response = await get(this.host + url, {\n headers: this.headers\n });\n\n return await response.json();\n } catch (error) {\n throw new Error(\"Error fetching data.\");\n }\n }\n\n /**\n * Attempts to find unspent records in the Aleo blockchain for a specified private key\n * @param {number} startHeight - The height at which to start searching for unspent records\n * @param {number} endHeight - The height at which to stop searching for unspent records\n * @param {string | PrivateKey} privateKey - The private key to use to find unspent records\n * @param {number[]} amounts - The amounts (in microcredits) to search for (eg. [100, 200, 3000])\n * @param {number} maxMicrocredits - The maximum number of microcredits to search for\n * @param {string[]} nonces - The nonces of already found records to exclude from the search\n *\n * @example\n * // Find all unspent records\n * const privateKey = \"[PRIVATE_KEY]\";\n * const records = networkClient.findUnspentRecords(0, undefined, privateKey);\n *\n * // Find specific amounts\n * const startHeight = 500000;\n * const amounts = [600000, 1000000];\n * const records = networkClient.findUnspentRecords(startHeight, undefined, privateKey, amounts);\n *\n * // Find specific amounts with a maximum number of cumulative microcredits\n * const maxMicrocredits = 100000;\n * const records = networkClient.findUnspentRecords(startHeight, undefined, privateKey, undefined, maxMicrocredits);\n */\n async findUnspentRecords(\n startHeight: number,\n endHeight: number | undefined,\n privateKey: string | PrivateKey | undefined,\n amounts: number[] | undefined,\n maxMicrocredits?: number | undefined,\n nonces?: string[] | undefined,\n ): Promise | Error> {\n nonces = nonces || [];\n // Ensure start height is not negative\n if (startHeight < 0) {\n throw new Error(\"Start height must be greater than or equal to 0\");\n }\n\n // Initialize search parameters\n const records = new Array();\n let start;\n let end;\n let resolvedPrivateKey: PrivateKey;\n let failures = 0;\n let totalRecordValue = BigInt(0);\n let latestHeight: number;\n\n // Ensure a private key is present to find owned records\n if (typeof privateKey === \"undefined\") {\n if (typeof this.account === \"undefined\") {\n throw new Error(\"Private key must be specified in an argument to findOwnedRecords or set in the AleoNetworkClient\");\n } else {\n resolvedPrivateKey = this.account._privateKey;\n }\n } else {\n try {\n resolvedPrivateKey = privateKey instanceof PrivateKey ? privateKey : PrivateKey.from_string(privateKey);\n } catch (error) {\n throw new Error(\"Error parsing private key provided.\");\n }\n }\n const viewKey = resolvedPrivateKey.to_view_key();\n\n // Get the latest height to ensure the range being searched is valid\n try {\n const blockHeight = await this.getLatestHeight();\n if (typeof blockHeight === \"number\") {\n latestHeight = blockHeight;\n } else {\n throw new Error(\"Error fetching latest block height.\");\n }\n } catch (error) {\n throw new Error(\"Error fetching latest block height.\");\n }\n\n // If no end height is specified or is greater than the latest height, set the end height to the latest height\n if (typeof endHeight === \"number\" && endHeight <= latestHeight) {\n end = endHeight\n } else {\n end = latestHeight;\n }\n\n // If the starting is greater than the ending height, return an error\n if (startHeight > end) {\n throw new Error(\"Start height must be less than or equal to end height.\");\n }\n\n // Iterate through blocks in reverse order in chunks of 50\n while (end > startHeight) {\n start = end - 50;\n if (start < startHeight) {\n start = startHeight;\n }\n try {\n // Get 50 blocks (or the difference between the start and end if less than 50)\n const blocks = await this.getBlockRange(start, end);\n end = start;\n if (!(blocks instanceof Error)) {\n // Iterate through blocks to find unspent records\n for (let i = 0; i < blocks.length; i++) {\n const block = blocks[i];\n const transactions = block.transactions;\n if (!(typeof transactions === \"undefined\")) {\n for (let j = 0; j < transactions.length; j++) {\n const confirmedTransaction = transactions[j];\n // Search for unspent records in execute transactions of credits.aleo\n if (confirmedTransaction.type == \"execute\") {\n const transaction = confirmedTransaction.transaction;\n if (transaction.execution && !(typeof transaction.execution.transitions == \"undefined\")) {\n for (let k = 0; k < transaction.execution.transitions.length; k++) {\n const transition = transaction.execution.transitions[k];\n // Only search for unspent records in credits.aleo (for now)\n if (transition.program !== \"credits.aleo\") {\n continue;\n }\n if (!(typeof transition.outputs == \"undefined\")) {\n for (let l = 0; l < transition.outputs.length; l++) {\n const output = transition.outputs[l];\n if (output.type === \"record\") {\n try {\n // Create a wasm record ciphertext object from the found output\n const record = RecordCiphertext.fromString(output.value);\n // Determine if the record is owned by the specified view key\n if (record.isOwner(viewKey)) {\n // Decrypt the record and get the serial number\n const recordPlaintext = record.decrypt(viewKey);\n\n // If the record has already been found, skip it\n const nonce = recordPlaintext.nonce();\n if (nonces.includes(nonce)) {\n continue;\n }\n\n // Otherwise record the nonce that has been found\n const serialNumber = recordPlaintext.serialNumberString(resolvedPrivateKey, \"credits.aleo\", \"credits\");\n // Attempt to see if the serial number is spent\n try {\n await this.getTransitionId(serialNumber);\n } catch (error) {\n // If it's not found, add it to the list of unspent records\n if (!amounts) {\n records.push(recordPlaintext);\n // If the user specified a maximum number of microcredits, check if the search has found enough\n if (typeof maxMicrocredits === \"number\") {\n totalRecordValue += recordPlaintext.microcredits();\n // Exit if the search has found the amount specified\n if (totalRecordValue >= BigInt(maxMicrocredits)) {\n return records;\n }\n }\n }\n // If the user specified a list of amounts, check if the search has found them\n if (!(typeof amounts === \"undefined\") && amounts.length > 0) {\n let amounts_found = 0;\n if (recordPlaintext.microcredits() > amounts[amounts_found]) {\n amounts_found += 1;\n records.push(recordPlaintext);\n // If the user specified a maximum number of microcredits, check if the search has found enough\n if (typeof maxMicrocredits === \"number\") {\n totalRecordValue += recordPlaintext.microcredits();\n // Exit if the search has found the amount specified\n if (totalRecordValue >= BigInt(maxMicrocredits)) {\n return records;\n }\n }\n if (records.length >= amounts.length) {\n return records;\n }\n }\n }\n }\n }\n } catch (error) {\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n } catch (error) {\n // If there is an error fetching blocks, log it and keep searching\n console.warn(\"Error fetching blocks in range: \" + start.toString() + \"-\" + end.toString());\n console.warn(\"Error: \", error);\n failures += 1;\n if (failures > 10) {\n console.warn(\"10 failures fetching records reached. Returning records fetched so far\");\n return records;\n }\n }\n }\n return records;\n }\n\n /**\n * Returns the contents of the block at the specified block height\n *\n * @param {number} height\n * @example\n * const block = networkClient.getBlock(1234);\n */\n async getBlock(height: number): Promise {\n try {\n const block = await this.fetchData(\"/block/\" + height);\n return block;\n } catch (error) {\n throw new Error(\"Error fetching block.\");\n }\n }\n\n /**\n * Returns a range of blocks between the specified block heights\n *\n * @param {number} start\n * @param {number} end\n * @example\n * const blockRange = networkClient.getBlockRange(2050, 2100);\n */\n async getBlockRange(start: number, end: number): Promise | Error> {\n try {\n return await this.fetchData>(\"/blocks?start=\" + start + \"&end=\" + end);\n } catch (error) {\n const errorMessage = \"Error fetching blocks between \" + start + \" and \" + end + \".\"\n throw new Error(errorMessage);\n }\n }\n\n /**\n * Returns the deployment transaction id associated with the specified program\n *\n * @param {Program | string} program\n * @returns {TransactionModel | Error}\n */\n async getDeploymentTransactionIDForProgram(program: Program | string): Promise {\n if (program instanceof Program) {\n program = program.toString();\n }\n try {\n const id = await this.fetchData(\"/find/transactionID/deployment/\" + program);\n return id.replace(\"\\\"\", \"\")\n } catch (error) {\n throw new Error(\"Error fetching deployment transaction for program.\");\n }\n }\n\n /**\n * Returns the deployment transaction associated with a specified program\n *\n * @param {Program | string} program\n * @returns {TransactionModel | Error}\n */\n async getDeploymentTransactionForProgram(program: Program | string): Promise {\n try {\n const transaction_id = await this.getDeploymentTransactionIDForProgram(program);\n return await this.getTransaction(transaction_id);\n } catch (error) {\n throw new Error(\"Error fetching deployment transaction for program.\");\n }\n }\n\n /**\n * Returns the contents of the latest block\n *\n * @example\n * const latestHeight = networkClient.getLatestBlock();\n */\n async getLatestBlock(): Promise {\n try {\n return await this.fetchData(\"/latest/block\") as Block;\n } catch (error) {\n throw new Error(\"Error fetching latest block.\");\n }\n }\n\n /**\n * Returns the latest committee\n *\n * @returns {Promise} A javascript object containing the latest committee\n */\n async getLatestCommittee(): Promise {\n try {\n return await this.fetchData(\"/committee/latest\");\n } catch (error) {\n throw new Error(\"Error fetching latest block.\");\n }\n }\n\n /**\n * Returns the latest block height\n *\n * @example\n * const latestHeight = networkClient.getLatestHeight();\n */\n async getLatestHeight(): Promise {\n try {\n return await this.fetchData(\"/latest/height\");\n } catch (error) {\n throw new Error(\"Error fetching latest height.\");\n }\n }\n\n /**\n * Returns the source code of a program given a program ID\n *\n * @param {string} programId The program ID of a program deployed to the Aleo Network\n * @return {Promise} Source code of the program\n *\n * @example\n * const program = networkClient.getProgram(\"hello_hello.aleo\");\n * const expectedSource = \"program hello_hello.aleo;\\n\\nfunction hello:\\n input r0 as u32.public;\\n input r1 as u32.private;\\n add r0 r1 into r2;\\n output r2 as u32.private;\\n\"\n * assert.equal(program, expectedSource);\n */\n async getProgram(programId: string): Promise {\n try {\n return await this.fetchData(\"/program/\" + programId)\n } catch (error) {\n throw new Error(\"Error fetching program\");\n }\n }\n\n /**\n * Returns a program object from a program ID or program source code\n *\n * @param {string} inputProgram The program ID or program source code of a program deployed to the Aleo Network\n * @return {Promise} Source code of the program\n *\n * @example\n * const programID = \"hello_hello.aleo\";\n * const programSource = \"program hello_hello.aleo;\\n\\nfunction hello:\\n input r0 as u32.public;\\n input r1 as u32.private;\\n add r0 r1 into r2;\\n output r2 as u32.private;\\n\"\n *\n * // Get program object from program ID or program source code\n * const programObjectFromID = await networkClient.getProgramObject(programID);\n * const programObjectFromSource = await networkClient.getProgramObject(programSource);\n *\n * // Both program objects should be equal\n * assert.equal(programObjectFromID.to_string(), programObjectFromSource.to_string());\n */\n async getProgramObject(inputProgram: string): Promise {\n try {\n return Program.fromString(inputProgram);\n } catch (error) {\n try {\n return Program.fromString((await this.getProgram(inputProgram)));\n } catch (error) {\n throw new Error(`${inputProgram} is neither a program name or a valid program`);\n }\n }\n }\n\n /**\n * Returns an object containing the source code of a program and the source code of all programs it imports\n *\n * @param {Program | string} inputProgram The program ID or program source code of a program deployed to the Aleo Network\n * @returns {Promise} Object of the form { \"program_id\": \"program_source\", .. } containing program id & source code for all program imports\n *\n * @example\n * const double_test_source = \"import multiply_test.aleo;\\n\\nprogram double_test.aleo;\\n\\nfunction double_it:\\n input r0 as u32.private;\\n call multiply_test.aleo/multiply 2u32 r0 into r1;\\n output r1 as u32.private;\\n\"\n * const double_test = Program.fromString(double_test_source);\n * const expectedImports = {\n * \"multiply_test.aleo\": \"program multiply_test.aleo;\\n\\nfunction multiply:\\n input r0 as u32.public;\\n input r1 as u32.private;\\n mul r0 r1 into r2;\\n output r2 as u32.private;\\n\"\n * }\n *\n * // Imports can be fetched using the program ID, source code, or program object\n * let programImports = await networkClient.getProgramImports(\"double_test.aleo\");\n * assert.deepStrictEqual(programImports, expectedImports);\n *\n * // Using the program source code\n * programImports = await networkClient.getProgramImports(double_test_source);\n * assert.deepStrictEqual(programImports, expectedImports);\n *\n * // Using the program object\n * programImports = await networkClient.getProgramImports(double_test);\n * assert.deepStrictEqual(programImports, expectedImports);\n */\n async getProgramImports(inputProgram: Program | string): Promise {\n try {\n const imports: ProgramImports = {};\n\n // Get the program object or fail if the program is not valid or does not exist\n const program = inputProgram instanceof Program ? inputProgram : (await this.getProgramObject(inputProgram));\n\n // Get the list of programs that the program imports\n const importList = program.getImports();\n\n // Recursively get any imports that the imported programs have in a depth first search order\n for (let i = 0; i < importList.length; i++) {\n const import_id = importList[i];\n if (!imports.hasOwnProperty(import_id)) {\n const programSource = await this.getProgram(import_id);\n const nestedImports = await this.getProgramImports(import_id);\n for (const key in nestedImports) {\n if (!imports.hasOwnProperty(key)) {\n imports[key] = nestedImports[key];\n }\n }\n imports[import_id] = programSource;\n }\n }\n return imports;\n } catch (error) {\n throw logAndThrow(\"Error fetching program imports: \" + error)\n }\n }\n\n /**\n * Get a list of the program names that a program imports\n *\n * @param {Program | string} inputProgram - The program id or program source code to get the imports of\n * @returns {string[]} - The list of program names that the program imports\n *\n * @example\n * const programImportsNames = networkClient.getProgramImports(\"double_test.aleo\");\n * const expectedImportsNames = [\"multiply_test.aleo\"];\n * assert.deepStrictEqual(programImportsNames, expectedImportsNames);\n */\n async getProgramImportNames(inputProgram: Program | string): Promise {\n try {\n const program = inputProgram instanceof Program ? inputProgram : (await this.getProgramObject(inputProgram));\n return program.getImports();\n } catch (error) {\n throw new Error(\"Error fetching program imports with error: \" + error);\n }\n }\n\n /**\n * Returns the names of the mappings of a program\n *\n * @param {string} programId - The program ID to get the mappings of (e.g. \"credits.aleo\")\n * @example\n * const mappings = networkClient.getProgramMappingNames(\"credits.aleo\");\n * const expectedMappings = [\"account\"];\n * assert.deepStrictEqual(mappings, expectedMappings);\n */\n async getProgramMappingNames(programId: string): Promise | Error> {\n try {\n return await this.fetchData>(\"/program/\" + programId + \"/mappings\")\n } catch (error) {\n throw new Error(\"Error fetching program mappings - ensure the program exists on chain before trying again\");\n }\n }\n\n /**\n * Returns the value of a program's mapping for a specific key\n *\n * @param {string} programId - The program ID to get the mapping value of (e.g. \"credits.aleo\")\n * @param {string} mappingName - The name of the mapping to get the value of (e.g. \"account\")\n * @param {string} key - The key of the mapping to get the value of (e.g. \"aleo1rhgdu77hgyqd3xjj8ucu3jj9r2krwz6mnzyd80gncr5fxcwlh5rsvzp9px\")\n * @return {Promise} String representation of the value of the mapping\n *\n * @example\n * // Get public balance of an account\n * const mappingValue = networkClient.getMappingValue(\"credits.aleo\", \"account\", \"aleo1rhgdu77hgyqd3xjj8ucu3jj9r2krwz6mnzyd80gncr5fxcwlh5rsvzp9px\");\n * const expectedValue = \"0u64\";\n * assert.equal(mappingValue, expectedValue);\n */\n async getProgramMappingValue(programId: string, mappingName: string, key: string): Promise {\n try {\n return await this.fetchData(\"/program/\" + programId + \"/mapping/\" + mappingName + \"/\" + key)\n } catch (error) {\n throw new Error(\"Error fetching mapping value - ensure the mapping exists and the key is correct\");\n }\n }\n\n /**\n * Returns the latest state/merkle root of the Aleo blockchain\n *\n * @example\n * const stateRoot = networkClient.getStateRoot();\n */\n async getStateRoot(): Promise {\n try {\n return await this.fetchData(\"/latest/stateRoot\");\n } catch (error) {\n throw new Error(\"Error fetching Aleo state root\");\n }\n }\n\n /**\n * Returns a transaction by its unique identifier\n *\n * @param {string} id\n * @example\n * const transaction = networkClient.getTransaction(\"at1handz9xjrqeynjrr0xay4pcsgtnczdksz3e584vfsgaz0dh0lyxq43a4wj\");\n */\n async getTransaction(id: string): Promise {\n try {\n return await this.fetchData(\"/transaction/\" + id);\n } catch (error) {\n throw new Error(\"Error fetching transaction.\");\n }\n }\n\n /**\n * Returns the transactions present at the specified block height\n *\n * @param {number} height\n * @example\n * const transactions = networkClient.getTransactions(654);\n */\n async getTransactions(height: number): Promise | Error> {\n try {\n return await this.fetchData>(\"/block/\" + height.toString() + \"/transactions\");\n } catch (error) {\n throw new Error(\"Error fetching transactions.\");\n }\n }\n\n /**\n * Returns the transactions in the memory pool.\n *\n * @example\n * const transactions = networkClient.getTransactionsInMempool();\n */\n async getTransactionsInMempool(): Promise | Error> {\n try {\n return await this.fetchData>(\"/memoryPool/transactions\");\n } catch (error) {\n throw new Error(\"Error fetching transactions from mempool.\");\n }\n }\n\n /**\n * Returns the transition ID of the transition corresponding to the ID of the input or output.\n * @param {string} inputOrOutputID - ID of the input or output.\n *\n * @example\n * const transitionId = networkClient.getTransitionId(\"2429232855236830926144356377868449890830704336664550203176918782554219952323field\");\n */\n async getTransitionId(inputOrOutputID: string): Promise {\n try {\n return await this.fetchData(\"/find/transitionID/\" + inputOrOutputID);\n } catch (error) {\n throw new Error(\"Error fetching transition ID.\");\n }\n }\n\n /**\n * Submit an execute or deployment transaction to the Aleo network\n *\n * @param {Transaction | string} transaction - The transaction to submit to the network\n * @returns {string | Error} - The transaction id of the submitted transaction or the resulting error\n */\n async submitTransaction(transaction: Transaction | string): Promise {\n const transaction_string = transaction instanceof Transaction ? transaction.toString() : transaction;\n try {\n const response = await post(this.host + \"/transaction/broadcast\", {\n body: transaction_string,\n headers: Object.assign({}, this.headers, {\n \"Content-Type\": \"application/json\",\n }),\n });\n\n try {\n return await response.json();\n\n } catch (error) {\n throw new Error(`Error posting transaction. Aleo network response: ${(error as Error).message}`);\n }\n } catch (error) {\n throw new Error(`Error posting transaction: No response received: ${(error as Error).message}`);\n }\n }\n}\n\nexport { AleoNetworkClient, AleoNetworkClientOptions, ProgramImports }\n","import {\n ProvingKey,\n VerifyingKey,\n CREDITS_PROGRAM_KEYS,\n KEY_STORE,\n Key,\n PRIVATE_TRANSFER,\n PRIVATE_TO_PUBLIC_TRANSFER,\n PUBLIC_TRANSFER,\n PUBLIC_TO_PRIVATE_TRANSFER,\n PUBLIC_TRANSFER_AS_SIGNER\n} from \"./index\";\nimport { get } from \"./utils\";\n\ntype FunctionKeyPair = [ProvingKey, VerifyingKey];\ntype CachedKeyPair = [Uint8Array, Uint8Array];\ntype AleoKeyProviderInitParams = {\n proverUri?: string;\n verifierUri?: string;\n cacheKey?: string;\n};\n\n/**\n * Interface for record search parameters. This allows for arbitrary search parameters to be passed to record provider\n * implementations.\n */\ninterface KeySearchParams {\n [key: string]: any; // This allows for arbitrary keys with any type values\n}\n\n/**\n * AleoKeyProviderParams search parameter for the AleoKeyProvider. It allows for the specification of a proverUri and\n * verifierUri to fetch keys via HTTP from a remote resource as well as a unique cacheKey to store the keys in memory.\n */\nclass AleoKeyProviderParams implements KeySearchParams {\n name: string | undefined;\n proverUri: string | undefined;\n verifierUri: string | undefined;\n cacheKey: string | undefined;\n\n /**\n * Create a new AleoKeyProviderParams object which implements the KeySearchParams interface. Users can optionally\n * specify a url for the proverUri & verifierUri to fetch keys via HTTP from a remote resource as well as a unique\n * cacheKey to store the keys in memory for future use. If no proverUri or verifierUri is specified, a cachekey must\n * be provided.\n *\n * @param { AleoKeyProviderInitParams } params - Optional search parameters\n */\n constructor(params: {proverUri?: string, verifierUri?: string, cacheKey?: string, name?: string}) {\n this.proverUri = params.proverUri;\n this.verifierUri = params.verifierUri;\n this.cacheKey = params.cacheKey;\n this.name = params.name;\n }\n}\n\n/**\n * KeyProvider interface. Enables the retrieval of public proving and verifying keys for Aleo Programs.\n */\ninterface FunctionKeyProvider {\n /**\n * Get bond_public function keys from the credits.aleo program\n *\n * @returns {Promise} Proving and verifying keys for the bond_public function\n */\n bondPublicKeys(): Promise;\n\n /**\n * Get bond_validator function keys from the credits.aleo program\n *\n * @returns {Promise} Proving and verifying keys for the bond_validator function\n */\n bondValidatorKeys(): Promise;\n\n /**\n * Cache a set of keys. This will overwrite any existing keys with the same keyId. The user can check if a keyId\n * exists in the cache using the containsKeys method prior to calling this method if overwriting is not desired.\n *\n * @param {string} keyId access key for the cache\n * @param {FunctionKeyPair} keys keys to cache\n */\n cacheKeys(keyId: string, keys: FunctionKeyPair): void;\n\n /**\n * Get unbond_public function keys from the credits.aleo program\n *\n * @returns {Promise} Proving and verifying keys for the unbond_public function\n */\n claimUnbondPublicKeys(): Promise;\n\n /**\n * Get arbitrary function keys from a provider\n *\n * @param {KeySearchParams | undefined} params - Optional search parameters for the key provider\n * @returns {Promise} Proving and verifying keys for the specified program\n *\n * @example\n * // Create a search object which implements the KeySearchParams interface\n * class IndexDbSearch implements KeySearchParams {\n * db: string\n * keyId: string\n * constructor(params: {db: string, keyId: string}) {\n * this.db = params.db;\n * this.keyId = params.keyId;\n * }\n * }\n *\n * // Create a new object which implements the KeyProvider interface\n * class IndexDbKeyProvider implements FunctionKeyProvider {\n * async functionKeys(params: KeySearchParams): Promise {\n * return new Promise((resolve, reject) => {\n * const request = indexedDB.open(params.db, 1);\n *\n * request.onupgradeneeded = function(e) {\n * const db = e.target.result;\n * if (!db.objectStoreNames.contains('keys')) {\n * db.createObjectStore('keys', { keyPath: 'id' });\n * }\n * };\n *\n * request.onsuccess = function(e) {\n * const db = e.target.result;\n * const transaction = db.transaction([\"keys\"], \"readonly\");\n * const store = transaction.objectStore(\"keys\");\n * const request = store.get(params.keyId);\n * request.onsuccess = function(e) {\n * if (request.result) {\n * resolve(request.result as FunctionKeyPair);\n * } else {\n * reject(new Error(\"Key not found\"));\n * }\n * };\n * request.onerror = function(e) { reject(new Error(\"Error fetching key\")); };\n * };\n *\n * request.onerror = function(e) { reject(new Error(\"Error opening database\")); };\n * });\n * }\n *\n * // implement the other methods...\n * }\n *\n *\n * const keyProvider = new AleoKeyProvider();\n * const networkClient = new AleoNetworkClient(\"https://api.explorer.aleo.org/v1\");\n * const recordProvider = new NetworkRecordProvider(account, networkClient);\n *\n * // Initialize a program manager with the key provider to automatically fetch keys for value transfers\n * const programManager = new ProgramManager(\"https://api.explorer.aleo.org/v1\", keyProvider, recordProvider);\n * programManager.transfer(1, \"aleo166q6ww6688cug7qxwe7nhctjpymydwzy2h7rscfmatqmfwnjvggqcad0at\", \"public\", 0.5);\n *\n * // Keys can also be fetched manually\n * const searchParams = new IndexDbSearch({db: \"keys\", keyId: \"credits.aleo:transferPrivate\"});\n * const [transferPrivateProvingKey, transferPrivateVerifyingKey] = await keyProvider.functionKeys(searchParams);\n */\n functionKeys(params?: KeySearchParams): Promise;\n\n /**\n * Get fee_private function keys from the credits.aleo program\n *\n * @returns {Promise} Proving and verifying keys for the join function\n */\n feePrivateKeys(): Promise;\n\n /**\n * Get fee_public function keys from the credits.aleo program\n *\n * @returns {Promise} Proving and verifying keys for the join function\n */\n feePublicKeys(): Promise;\n\n /**\n * Get join function keys from the credits.aleo program\n *\n * @returns {Promise} Proving and verifying keys for the join function\n */\n joinKeys(): Promise;\n\n /**\n * Get split function keys from the credits.aleo program\n *\n * @returns {Promise} Proving and verifying keys for the join function\n */\n splitKeys(): Promise;\n\n /**\n * Get keys for a variant of the transfer function from the credits.aleo program\n *\n * @param {string} visibility Visibility of the transfer function (private, public, privateToPublic, publicToPrivate)\n * @returns {Promise} Proving and verifying keys for the specified transfer function\n *\n * @example\n * // Create a new object which implements the KeyProvider interface\n * const networkClient = new AleoNetworkClient(\"https://api.explorer.aleo.org/v1\");\n * const keyProvider = new AleoKeyProvider();\n * const recordProvider = new NetworkRecordProvider(account, networkClient);\n *\n * // Initialize a program manager with the key provider to automatically fetch keys for value transfers\n * const programManager = new ProgramManager(\"https://api.explorer.aleo.org/v1\", keyProvider, recordProvider);\n * programManager.transfer(1, \"aleo166q6ww6688cug7qxwe7nhctjpymydwzy2h7rscfmatqmfwnjvggqcad0at\", \"public\", 0.5);\n *\n * // Keys can also be fetched manually\n * const [transferPublicProvingKey, transferPublicVerifyingKey] = await keyProvider.transferKeys(\"public\");\n */\n transferKeys(visibility: string): Promise;\n\n /**\n * Get unbond_public function keys from the credits.aleo program\n *\n * @returns {Promise} Proving and verifying keys for the join function\n */\n unBondPublicKeys(): Promise;\n\n}\n\n\n/**\n * AleoKeyProvider class. Implements the KeyProvider interface. Enables the retrieval of Aleo program proving and\n * verifying keys for the credits.aleo program over http from official Aleo sources and storing and retrieving function\n * keys from a local memory cache.\n */\nclass AleoKeyProvider implements FunctionKeyProvider {\n cache: Map;\n cacheOption: boolean;\n keyUris: string;\n\n async fetchBytes(\n url = \"/\",\n ): Promise {\n try {\n const response = await get(url);\n const data = await response.arrayBuffer();\n return new Uint8Array(data);\n } catch (error) {\n throw new Error(\"Error fetching data.\" + error);\n }\n }\n\n constructor() {\n this.keyUris = KEY_STORE;\n this.cache = new Map();\n this.cacheOption = false;\n }\n\n /**\n * Use local memory to store keys\n *\n * @param {boolean} useCache whether to store keys in local memory\n */\n useCache(useCache: boolean) {\n this.cacheOption = useCache;\n }\n\n /**\n * Clear the key cache\n */\n clearCache() {\n this.cache.clear();\n }\n\n /**\n * Cache a set of keys. This will overwrite any existing keys with the same keyId. The user can check if a keyId\n * exists in the cache using the containsKeys method prior to calling this method if overwriting is not desired.\n *\n * @param {string} keyId access key for the cache\n * @param {FunctionKeyPair} keys keys to cache\n */\n cacheKeys(keyId: string, keys: FunctionKeyPair) {\n const [provingKey, verifyingKey] = keys;\n this.cache.set(keyId, [provingKey.toBytes(), verifyingKey.toBytes()]);\n }\n\n /**\n * Determine if a keyId exists in the cache\n *\n * @param {string} keyId keyId of a proving and verifying key pair\n * @returns {boolean} true if the keyId exists in the cache, false otherwise\n */\n containsKeys(keyId: string): boolean {\n return this.cache.has(keyId)\n }\n\n /**\n * Delete a set of keys from the cache\n *\n * @param {string} keyId keyId of a proving and verifying key pair to delete from memory\n * @returns {boolean} true if the keyId exists in the cache and was deleted, false if the key did not exist\n */\n deleteKeys(keyId: string): boolean {\n return this.cache.delete(keyId)\n }\n\n /**\n * Get a set of keys from the cache\n * @param keyId keyId of a proving and verifying key pair\n *\n * @returns {FunctionKeyPair | Error} Proving and verifying keys for the specified program\n */\n getKeys(keyId: string): FunctionKeyPair | Error {\n console.debug(`Checking if key exists in cache. KeyId: ${keyId}`)\n if (this.cache.has(keyId)) {\n const [provingKeyBytes, verifyingKeyBytes] = this.cache.get(keyId);\n return [ProvingKey.fromBytes(provingKeyBytes), VerifyingKey.fromBytes(verifyingKeyBytes)];\n } else {\n return new Error(\"Key not found in cache.\");\n }\n }\n\n /**\n * Get arbitrary function keys from a provider\n *\n * @param {KeySearchParams} params parameters for the key search in form of: {proverUri: string, verifierUri: string, cacheKey: string}\n * @returns {Promise} Proving and verifying keys for the specified program\n *\n * @example\n * // Create a new object which implements the KeyProvider interface\n * const networkClient = new AleoNetworkClient(\"https://api.explorer.aleo.org/v1\");\n * const keyProvider = new AleoKeyProvider();\n * const recordProvider = new NetworkRecordProvider(account, networkClient);\n *\n * // Initialize a program manager with the key provider to automatically fetch keys for value transfers\n * const programManager = new ProgramManager(\"https://api.explorer.aleo.org/v1\", keyProvider, recordProvider);\n * programManager.transfer(1, \"aleo166q6ww6688cug7qxwe7nhctjpymydwzy2h7rscfmatqmfwnjvggqcad0at\", \"public\", 0.5);\n *\n * // Keys can also be fetched manually using the key provider\n * const keySearchParams = { \"cacheKey\": \"myProgram:myFunction\" };\n * const [transferPrivateProvingKey, transferPrivateVerifyingKey] = await keyProvider.functionKeys(keySearchParams);\n */\n async functionKeys(params?: KeySearchParams): Promise {\n if (params) {\n let proverUrl;\n let verifierUrl;\n let cacheKey;\n if (\"name\" in params && typeof params[\"name\"] == \"string\") {\n let key = CREDITS_PROGRAM_KEYS.getKey(params[\"name\"]);\n if (!(key instanceof Error)) {\n return this.fetchCreditsKeys(key);\n }\n }\n\n if (\"proverUri\" in params && typeof params[\"proverUri\"] == \"string\") {\n proverUrl = params[\"proverUri\"];\n }\n\n if (\"verifierUri\" in params && typeof params[\"verifierUri\"] == \"string\") {\n verifierUrl = params[\"verifierUri\"];\n }\n\n if (\"cacheKey\" in params && typeof params[\"cacheKey\"] == \"string\") {\n cacheKey = params[\"cacheKey\"];\n }\n\n if (proverUrl && verifierUrl) {\n return await this.fetchRemoteKeys(proverUrl, verifierUrl, cacheKey);\n }\n\n if (cacheKey) {\n return this.getKeys(cacheKey);\n }\n }\n throw Error(\"Invalid parameters provided, must provide either a cacheKey and/or a proverUrl and a verifierUrl\");\n }\n\n /**\n * Returns the proving and verifying keys for a specified program from a specified url.\n *\n * @param {string} verifierUrl Url of the proving key\n * @param {string} proverUrl Url the verifying key\n * @param {string} cacheKey Key to store the keys in the cache\n *\n * @returns {Promise} Proving and verifying keys for the specified program\n *\n * @example\n * // Create a new AleoKeyProvider object\n * const networkClient = new AleoNetworkClient(\"https://api.explorer.aleo.org/v1\");\n * const keyProvider = new AleoKeyProvider();\n * const recordProvider = new NetworkRecordProvider(account, networkClient);\n *\n * // Initialize a program manager with the key provider to automatically fetch keys for value transfers\n * const programManager = new ProgramManager(\"https://api.explorer.aleo.org/v1\", keyProvider, recordProvider);\n * programManager.transfer(1, \"aleo166q6ww6688cug7qxwe7nhctjpymydwzy2h7rscfmatqmfwnjvggqcad0at\", \"public\", 0.5);\n *\n * // Keys can also be fetched manually\n * const [transferPrivateProvingKey, transferPrivateVerifyingKey] = await keyProvider.fetchKeys(\n * CREDITS_PROGRAM_KEYS.transfer_private.prover,\n * CREDITS_PROGRAM_KEYS.transfer_private.verifier,\n * );\n */\n async fetchRemoteKeys(proverUrl: string, verifierUrl: string, cacheKey?: string): Promise {\n try {\n // If cache is enabled, check if the keys have already been fetched and return them if they have\n if (this.cacheOption) {\n if (!cacheKey) {\n cacheKey = proverUrl;\n }\n const value = this.cache.get(cacheKey);\n if (typeof value !== \"undefined\") {\n return [ProvingKey.fromBytes(value[0]), VerifyingKey.fromBytes(value[1])];\n } else {\n console.debug(\"Fetching proving keys from url \" + proverUrl);\n const provingKey = ProvingKey.fromBytes(await this.fetchBytes(proverUrl))\n console.debug(\"Fetching verifying keys \" + verifierUrl);\n const verifyingKey = (await this.getVerifyingKey(verifierUrl));\n this.cache.set(cacheKey, [provingKey.toBytes(), verifyingKey.toBytes()]);\n return [provingKey, verifyingKey];\n }\n }\n else {\n // If cache is disabled, fetch the keys and return them\n const provingKey = ProvingKey.fromBytes(await this.fetchBytes(proverUrl))\n const verifyingKey = (await this.getVerifyingKey(verifierUrl));\n return [provingKey, verifyingKey];\n }\n } catch (error) {\n throw new Error(`Error: ${error} fetching fee proving and verifying keys from ${proverUrl} and ${verifierUrl}.`);\n }\n }\n\n /***\n * Fetches the proving key from a remote source.\n *\n * @param proverUrl\n * @param cacheKey\n *\n * @returns {Promise} Proving key for the specified program\n */\n async fetchProvingKey(proverUrl: string, cacheKey?: string): Promise {\n try {\n // If cache is enabled, check if the keys have already been fetched and return them if they have\n if (this.cacheOption) {\n if (!cacheKey) {\n cacheKey = proverUrl;\n }\n const value = this.cache.get(cacheKey);\n if (typeof value !== \"undefined\") {\n return ProvingKey.fromBytes(value[0]);\n } else {\n console.debug(\"Fetching proving keys from url \" + proverUrl);\n const provingKey = ProvingKey.fromBytes(await this.fetchBytes(proverUrl));\n return provingKey;\n }\n }\n else {\n const provingKey = ProvingKey.fromBytes(await this.fetchBytes(proverUrl));\n return provingKey;\n }\n } catch (error) {\n throw new Error(`Error: ${error} fetching fee proving keys from ${proverUrl}`);\n }\n }\n\n async fetchCreditsKeys(key: Key): Promise {\n try {\n if (!this.cache.has(key.locator) || !this.cacheOption) {\n const verifying_key = key.verifyingKey()\n const proving_key = await this.fetchProvingKey(key.prover, key.locator);\n if (this.cacheOption) {\n this.cache.set(CREDITS_PROGRAM_KEYS.bond_public.locator, [proving_key.toBytes(), verifying_key.toBytes()]);\n }\n return [proving_key, verifying_key];\n } else {\n const keyPair = this.cache.get(key.locator);\n return [ProvingKey.fromBytes(keyPair[0]), VerifyingKey.fromBytes(keyPair[1])];\n }\n } catch (error) {\n throw new Error(`Error: fetching credits.aleo keys: ${error}`);\n }\n }\n\n async bondPublicKeys(): Promise {\n return this.fetchCreditsKeys(CREDITS_PROGRAM_KEYS.bond_public);\n }\n\n bondValidatorKeys(): Promise {\n return this.fetchCreditsKeys(CREDITS_PROGRAM_KEYS.bond_validator);\n }\n\n claimUnbondPublicKeys(): Promise {\n return this.fetchCreditsKeys(CREDITS_PROGRAM_KEYS.claim_unbond_public)\n }\n\n /**\n * Returns the proving and verifying keys for the transfer functions in the credits.aleo program\n * @param {string} visibility Visibility of the transfer function\n * @returns {Promise} Proving and verifying keys for the transfer functions\n *\n * @example\n * // Create a new AleoKeyProvider\n * const networkClient = new AleoNetworkClient(\"https://api.explorer.aleo.org/v1\");\n * const keyProvider = new AleoKeyProvider();\n * const recordProvider = new NetworkRecordProvider(account, networkClient);\n *\n * // Initialize a program manager with the key provider to automatically fetch keys for value transfers\n * const programManager = new ProgramManager(\"https://api.explorer.aleo.org/v1\", keyProvider, recordProvider);\n * programManager.transfer(1, \"aleo166q6ww6688cug7qxwe7nhctjpymydwzy2h7rscfmatqmfwnjvggqcad0at\", \"public\", 0.5);\n *\n * // Keys can also be fetched manually\n * const [transferPublicProvingKey, transferPublicVerifyingKey] = await keyProvider.transferKeys(\"public\");\n */\n async transferKeys(visibility: string): Promise {\n if (PRIVATE_TRANSFER.has(visibility)) {\n return await this.fetchCreditsKeys(CREDITS_PROGRAM_KEYS.transfer_private);\n } else if (PRIVATE_TO_PUBLIC_TRANSFER.has(visibility)) {\n return await this.fetchCreditsKeys(CREDITS_PROGRAM_KEYS.transfer_private_to_public);\n } else if (PUBLIC_TRANSFER.has(visibility)) {\n return await this.fetchCreditsKeys(CREDITS_PROGRAM_KEYS.transfer_public);\n } else if (PUBLIC_TRANSFER_AS_SIGNER.has(visibility)) {\n return await this.fetchCreditsKeys(CREDITS_PROGRAM_KEYS.transfer_public_as_signer);\n } else if (PUBLIC_TO_PRIVATE_TRANSFER.has(visibility)) {\n return await this.fetchCreditsKeys(CREDITS_PROGRAM_KEYS.transfer_public_to_private);\n } else {\n throw new Error(\"Invalid visibility type\");\n }\n }\n\n /**\n * Returns the proving and verifying keys for the join function in the credits.aleo program\n *\n * @returns {Promise} Proving and verifying keys for the join function\n */\n async joinKeys(): Promise {\n return await this.fetchCreditsKeys(CREDITS_PROGRAM_KEYS.join);\n }\n\n /**\n * Returns the proving and verifying keys for the split function in the credits.aleo program\n *\n * @returns {Promise} Proving and verifying keys for the split function\n * */\n async splitKeys(): Promise {\n return await this.fetchCreditsKeys(CREDITS_PROGRAM_KEYS.split);\n }\n\n /**\n * Returns the proving and verifying keys for the fee_private function in the credits.aleo program\n *\n * @returns {Promise} Proving and verifying keys for the fee function\n */\n async feePrivateKeys(): Promise {\n return await this.fetchCreditsKeys(CREDITS_PROGRAM_KEYS.fee_private);\n }\n\n /**\n * Returns the proving and verifying keys for the fee_public function in the credits.aleo program\n *\n * @returns {Promise} Proving and verifying keys for the fee function\n */\n async feePublicKeys(): Promise {\n return await this.fetchCreditsKeys(CREDITS_PROGRAM_KEYS.fee_public);\n }\n\n /**\n * Gets a verifying key. If the verifying key is for a credits.aleo function, get it from the wasm cache otherwise\n *\n * @returns {Promise} Verifying key for the function\n */\n // attempt to fetch it from the network\n async getVerifyingKey(verifierUri: string): Promise {\n switch (verifierUri) {\n case CREDITS_PROGRAM_KEYS.bond_public.verifier:\n return CREDITS_PROGRAM_KEYS.bond_public.verifyingKey();\n case CREDITS_PROGRAM_KEYS.bond_validator.verifier:\n return CREDITS_PROGRAM_KEYS.bond_validator.verifyingKey();\n case CREDITS_PROGRAM_KEYS.claim_unbond_public.verifier:\n return CREDITS_PROGRAM_KEYS.claim_unbond_public.verifyingKey();\n case CREDITS_PROGRAM_KEYS.fee_private.verifier:\n return CREDITS_PROGRAM_KEYS.fee_private.verifyingKey();\n case CREDITS_PROGRAM_KEYS.fee_public.verifier:\n return CREDITS_PROGRAM_KEYS.fee_public.verifyingKey();\n case CREDITS_PROGRAM_KEYS.inclusion.verifier:\n return CREDITS_PROGRAM_KEYS.inclusion.verifyingKey();\n case CREDITS_PROGRAM_KEYS.join.verifier:\n return CREDITS_PROGRAM_KEYS.join.verifyingKey();\n case CREDITS_PROGRAM_KEYS.set_validator_state.verifier:\n return CREDITS_PROGRAM_KEYS.set_validator_state.verifyingKey();\n case CREDITS_PROGRAM_KEYS.split.verifier:\n return CREDITS_PROGRAM_KEYS.split.verifyingKey();\n case CREDITS_PROGRAM_KEYS.transfer_private.verifier:\n return CREDITS_PROGRAM_KEYS.transfer_private.verifyingKey();\n case CREDITS_PROGRAM_KEYS.transfer_private_to_public.verifier:\n return CREDITS_PROGRAM_KEYS.transfer_private_to_public.verifyingKey();\n case CREDITS_PROGRAM_KEYS.transfer_public.verifier:\n return CREDITS_PROGRAM_KEYS.transfer_public.verifyingKey();\n case CREDITS_PROGRAM_KEYS.transfer_public_as_signer.verifier:\n return CREDITS_PROGRAM_KEYS.transfer_public_as_signer.verifyingKey();\n case CREDITS_PROGRAM_KEYS.transfer_public_to_private.verifier:\n return CREDITS_PROGRAM_KEYS.transfer_public_to_private.verifyingKey();\n case CREDITS_PROGRAM_KEYS.unbond_public.verifier:\n return CREDITS_PROGRAM_KEYS.unbond_public.verifyingKey();\n default:\n try {\n /// Try to fetch the verifying key from the network as a string\n const response = await get(verifierUri);\n const text = await response.text();\n return VerifyingKey.fromString(text);\n } catch (e) {\n /// If that fails, try to fetch the verifying key from the network as bytes\n try {\n return VerifyingKey.fromBytes(await this.fetchBytes(verifierUri));\n } catch (inner) {\n return new Error(\"Invalid verifying key. Error: \" + inner);\n }\n }\n }\n }\n\n unBondPublicKeys(): Promise {\n return this.fetchCreditsKeys(CREDITS_PROGRAM_KEYS.unbond_public);\n }\n}\n\nexport {AleoKeyProvider, AleoKeyProviderParams, AleoKeyProviderInitParams, CachedKeyPair, FunctionKeyPair, FunctionKeyProvider, KeySearchParams}\n","import {\n Account,\n AleoKeyProvider,\n AleoNetworkClient,\n ExecutionResponse,\n FunctionKeyProvider,\n FunctionKeyPair,\n OfflineQuery,\n KeySearchParams,\n RecordPlaintext,\n RecordProvider,\n RecordSearchParams,\n PrivateKey,\n Program,\n ProgramImports,\n ProvingKey,\n VerifyingKey,\n Transaction,\n PRIVATE_TRANSFER_TYPES,\n VALID_TRANSFER_TYPES,\n logAndThrow,\n ProgramManagerBase as WasmProgramManager, verifyFunctionExecution, AleoKeyProviderParams, CREDITS_PROGRAM_KEYS,\n} from \"./index\";\nimport {Execution} from \"@provablehq/wasm/dist/crates/aleo_wasm\";\n\n/**\n * Represents the options for executing a transaction in the Aleo network.\n * This interface is used to specify the parameters required for building and submitting an execution transaction.\n *\n * @property {string} programName - The name of the program containing the function to be executed.\n * @property {string} functionName - The name of the function to execute within the program.\n * @property {number} fee - The fee to be paid for the transaction.\n * @property {boolean} privateFee - If true, uses a private record to pay the fee; otherwise, uses the account's public credit balance.\n * @property {string[]} inputs - The inputs to the function being executed.\n * @property {RecordSearchParams} [recordSearchParams] - Optional parameters for searching for a record to pay the execution transaction fee.\n * @property {KeySearchParams} [keySearchParams] - Optional parameters for finding the matching proving & verifying keys for the function.\n * @property {string | RecordPlaintext} [feeRecord] - Optional fee record to use for the transaction.\n * @property {ProvingKey} [provingKey] - Optional proving key to use for the transaction.\n * @property {VerifyingKey} [verifyingKey] - Optional verifying key to use for the transaction.\n * @property {PrivateKey} [privateKey] - Optional private key to use for the transaction.\n * @property {OfflineQuery} [offlineQuery] - Optional offline query if creating transactions in an offline environment.\n * @property {string | Program} [program] - Optional program source code to use for the transaction.\n * @property {ProgramImports} [imports] - Optional programs that the program being executed imports.\n */\ninterface ExecuteOptions {\n programName: string;\n functionName: string;\n fee: number;\n privateFee: boolean;\n inputs: string[];\n recordSearchParams?: RecordSearchParams;\n keySearchParams?: KeySearchParams;\n feeRecord?: string | RecordPlaintext;\n provingKey?: ProvingKey;\n verifyingKey?: VerifyingKey;\n privateKey?: PrivateKey;\n offlineQuery?: OfflineQuery;\n program?: string | Program;\n imports?: ProgramImports;\n}\n\n/**\n * The ProgramManager class is used to execute and deploy programs on the Aleo network and create value transfers.\n */\nclass ProgramManager {\n account: Account | undefined;\n keyProvider: FunctionKeyProvider;\n host: string;\n networkClient: AleoNetworkClient;\n recordProvider: RecordProvider | undefined;\n\n /** Create a new instance of the ProgramManager\n *\n * @param { string | undefined } host A host uri running the official Aleo API\n * @param { FunctionKeyProvider | undefined } keyProvider A key provider that implements {@link FunctionKeyProvider} interface\n * @param { RecordProvider | undefined } recordProvider A record provider that implements {@link RecordProvider} interface\n */\n constructor(host?: string | undefined, keyProvider?: FunctionKeyProvider | undefined, recordProvider?: RecordProvider | undefined) {\n this.host = host ? host : 'https://api.explorer.aleo.org/v1';\n this.networkClient = new AleoNetworkClient(this.host);\n \n this.keyProvider = keyProvider ? keyProvider : new AleoKeyProvider();\n this.recordProvider = recordProvider;\n }\n\n /**\n * Set the account to use for transaction submission to the Aleo network\n *\n * @param {Account} account Account to use for transaction submission\n */\n setAccount(account: Account) {\n this.account = account;\n }\n\n /**\n * Set the key provider that provides the proving and verifying keys for programs\n *\n * @param {FunctionKeyProvider} keyProvider\n */\n setKeyProvider(keyProvider: FunctionKeyProvider) {\n this.keyProvider = keyProvider;\n }\n\n /**\n * Set the host peer to use for transaction submission to the Aleo network\n *\n * @param host {string} Peer url to use for transaction submission\n */\n setHost(host: string) {\n this.host = host;\n this.networkClient.setHost(host);\n }\n\n /**\n * Set the record provider that provides records for transactions\n *\n * @param {RecordProvider} recordProvider\n */\n setRecordProvider(recordProvider: RecordProvider) {\n this.recordProvider = recordProvider;\n }\n\n /**\n * Deploy an Aleo program to the Aleo network\n *\n * @param {string} program Program source code\n * @param {number} fee Fee to pay for the transaction\n * @param {boolean} privateFee Use a private record to pay the fee. If false this will use the account's public credit balance\n * @param {RecordSearchParams | undefined} recordSearchParams Optional parameters for searching for a record to use\n * pay the deployment fee\n * @param {string | RecordPlaintext | undefined} feeRecord Optional Fee record to use for the transaction\n * @param {PrivateKey | undefined} privateKey Optional private key to use for the transaction\n * @returns {string | Error} The transaction id of the deployed program or a failure message from the network\n *\n * @example\n * // Create a new NetworkClient, KeyProvider, and RecordProvider\n * const networkClient = new AleoNetworkClient(\"https://api.explorer.aleo.org/v1\");\n * const keyProvider = new AleoKeyProvider();\n * const recordProvider = new NetworkRecordProvider(account, networkClient);\n *\n * // Initialize a program manager with the key provider to automatically fetch keys for deployments\n * const program = \"program hello_hello.aleo;\\n\\nfunction hello:\\n input r0 as u32.public;\\n input r1 as u32.private;\\n add r0 r1 into r2;\\n output r2 as u32.private;\\n\";\n * const programManager = new ProgramManager(\"https://api.explorer.aleo.org/v1\", keyProvider, recordProvider);\n *\n * // Define a fee in credits\n * const fee = 1.2;\n *\n * // Deploy the program\n * const tx_id = await programManager.deploy(program, fee);\n *\n * // Verify the transaction was successful\n * const transaction = await programManager.networkClient.getTransaction(tx_id);\n */\n async deploy(\n program: string,\n fee: number,\n privateFee: boolean,\n recordSearchParams?: RecordSearchParams,\n feeRecord?: string | RecordPlaintext,\n privateKey?: PrivateKey,\n ): Promise {\n // Ensure the program is valid and does not exist on the network\n try {\n const programObject = Program.fromString(program);\n let programSource;\n try {\n programSource = await this.networkClient.getProgram(programObject.id());\n } catch (e) {\n // Program does not exist on the network, deployment can proceed\n console.log(`Program ${programObject.id()} does not exist on the network, deploying...`);\n }\n if (typeof programSource == \"string\") {\n throw (`Program ${programObject.id()} already exists on the network, please rename your program`);\n }\n } catch (e) {\n throw logAndThrow(`Error validating program: ${e}`);\n }\n\n // Get the private key from the account if it is not provided in the parameters\n let deploymentPrivateKey = privateKey;\n if (typeof privateKey === \"undefined\" && typeof this.account !== \"undefined\") {\n deploymentPrivateKey = this.account.privateKey();\n }\n\n if (typeof deploymentPrivateKey === \"undefined\") {\n throw(\"No private key provided and no private key set in the ProgramManager\");\n }\n\n // Get the fee record from the account if it is not provided in the parameters\n try {\n feeRecord = privateFee ? await this.getCreditsRecord(fee, [], feeRecord, recordSearchParams) : undefined;\n } catch (e) {\n throw logAndThrow(`Error finding fee record. Record finder response: '${e}'. Please ensure you're connected to a valid Aleo network and a record with enough balance exists.`);\n }\n\n // Get the proving and verifying keys from the key provider\n let feeKeys;\n try {\n feeKeys = privateFee ? await this.keyProvider.feePrivateKeys() : await this.keyProvider.feePublicKeys();\n } catch (e) {\n throw logAndThrow(`Error finding fee keys. Key finder response: '${e}'. Please ensure your key provider is configured correctly.`);\n }\n const [feeProvingKey, feeVerifyingKey] = feeKeys;\n\n // Resolve the program imports if they exist\n let imports;\n try {\n imports = await this.networkClient.getProgramImports(program);\n } catch (e) {\n throw logAndThrow(`Error finding program imports. Network response: '${e}'. Please ensure you're connected to a valid Aleo network and the program is deployed to the network.`);\n }\n\n // Build a deployment transaction and submit it to the network\n const tx = await WasmProgramManager.buildDeploymentTransaction(deploymentPrivateKey, program, fee, feeRecord, this.host, imports, feeProvingKey, feeVerifyingKey);\n return await this.networkClient.submitTransaction(tx);\n }\n\n /**\n * Builds an execution transaction for submission to the Aleo network.\n *\n * @param {ExecuteOptions} options - The options for the execution transaction.\n * @returns {Promise} - A promise that resolves to the transaction or an error.\n *\n * @example\n * // Create a new NetworkClient, KeyProvider, and RecordProvider using official Aleo record, key, and network providers\n * const networkClient = new AleoNetworkClient(\"https://api.explorer.aleo.org/v1\");\n * const keyProvider = new AleoKeyProvider();\n * keyProvider.useCache = true;\n * const recordProvider = new NetworkRecordProvider(account, networkClient);\n *\n * // Initialize a program manager with the key provider to automatically fetch keys for executions\n * const programManager = new ProgramManager(\"https://api.explorer.aleo.org/v1\", keyProvider, recordProvider);\n *\n * // Build and execute the transaction\n * const transaction = await programManager.buildExecutionTransaction({\n * programName: \"hello_hello.aleo\",\n * functionName: \"hello_hello\",\n * fee: 0.020,\n * privateFee: false,\n * inputs: [\"5u32\", \"5u32\"],\n * keySearchParams: { \"cacheKey\": \"hello_hello:hello\" }\n * });\n * const result = await programManager.networkClient.submitTransaction(transaction);\n */\n async buildExecutionTransaction(options: ExecuteOptions): Promise {\n // Destructure the options object to access the parameters\n const {\n programName,\n functionName,\n fee,\n privateFee,\n inputs,\n recordSearchParams,\n keySearchParams,\n privateKey,\n offlineQuery\n } = options;\n\n let feeRecord = options.feeRecord;\n let provingKey = options.provingKey;\n let verifyingKey = options.verifyingKey;\n let program = options.program;\n let imports = options.imports;\n\n // Ensure the function exists on the network\n if (program === undefined) {\n try {\n program = (await this.networkClient.getProgram(programName));\n } catch (e) {\n throw logAndThrow(`Error finding ${programName}. Network response: '${e}'. Please ensure you're connected to a valid Aleo network the program is deployed to the network.`);\n }\n } else if (program instanceof Program) {\n program = program.toString();\n }\n\n // Get the private key from the account if it is not provided in the parameters\n let executionPrivateKey = privateKey;\n if (typeof privateKey === \"undefined\" && typeof this.account !== \"undefined\") {\n executionPrivateKey = this.account.privateKey();\n }\n\n if (typeof executionPrivateKey === \"undefined\") {\n throw(\"No private key provided and no private key set in the ProgramManager\");\n }\n\n // Get the fee record from the account if it is not provided in the parameters\n try {\n feeRecord = privateFee ? await this.getCreditsRecord(fee, [], feeRecord, recordSearchParams) : undefined;\n } catch (e) {\n throw logAndThrow(`Error finding fee record. Record finder response: '${e}'. Please ensure you're connected to a valid Aleo network and a record with enough balance exists.`);\n }\n\n // Get the fee proving and verifying keys from the key provider\n let feeKeys;\n try {\n feeKeys = privateFee ? await this.keyProvider.feePrivateKeys() : await this.keyProvider.feePublicKeys();\n } catch (e) {\n throw logAndThrow(`Error finding fee keys. Key finder response: '${e}'. Please ensure your key provider is configured correctly.`);\n }\n const [feeProvingKey, feeVerifyingKey] = feeKeys;\n\n // If the function proving and verifying keys are not provided, attempt to find them using the key provider\n if (!provingKey || !verifyingKey) {\n try {\n [provingKey, verifyingKey] = await this.keyProvider.functionKeys(keySearchParams);\n } catch (e) {\n console.log(`Function keys not found. Key finder response: '${e}'. The function keys will be synthesized`)\n }\n }\n\n // Resolve the program imports if they exist\n const numberOfImports = Program.fromString(program).getImports().length;\n if (numberOfImports > 0 && !imports) {\n try {\n imports = await this.networkClient.getProgramImports(programName);\n } catch (e) {\n throw logAndThrow(`Error finding program imports. Network response: '${e}'. Please ensure you're connected to a valid Aleo network and the program is deployed to the network.`);\n }\n }\n\n // Build an execution transaction and submit it to the network\n return await WasmProgramManager.buildExecutionTransaction(executionPrivateKey, program, functionName, inputs, fee, feeRecord, this.host, imports, provingKey, verifyingKey, feeProvingKey, feeVerifyingKey, offlineQuery);\n }\n\n /**\n * Builds an execution transaction for submission to the Aleo network.\n *\n * @param {ExecuteOptions} options - The options for the execution transaction.\n * @returns {Promise} - A promise that resolves to the transaction or an error.\n *\n * @example\n * // Create a new NetworkClient, KeyProvider, and RecordProvider using official Aleo record, key, and network providers\n * const networkClient = new AleoNetworkClient(\"https://api.explorer.aleo.org/v1\");\n * const keyProvider = new AleoKeyProvider();\n * keyProvider.useCache = true;\n * const recordProvider = new NetworkRecordProvider(account, networkClient);\n *\n * // Initialize a program manager with the key provider to automatically fetch keys for executions\n * const programManager = new ProgramManager(\"https://api.explorer.aleo.org/v1\", keyProvider, recordProvider);\n *\n * // Build and execute the transaction\n * const transaction = await programManager.execute({\n * programName: \"hello_hello.aleo\",\n * functionName: \"hello_hello\",\n * fee: 0.020,\n * privateFee: false,\n * inputs: [\"5u32\", \"5u32\"],\n * keySearchParams: { \"cacheKey\": \"hello_hello:hello\" }\n * });\n * const result = await programManager.networkClient.submitTransaction(transaction);\n */\n async execute(options: ExecuteOptions): Promise {\n const tx = await this.buildExecutionTransaction(options);\n return await this.networkClient.submitTransaction(tx);\n }\n\n /**\n * Run an Aleo program in offline mode\n *\n * @param {string} program Program source code containing the function to be executed\n * @param {string} function_name Function name to execute\n * @param {string[]} inputs Inputs to the function\n * @param {number} proveExecution Whether to prove the execution of the function and return an execution transcript\n * that contains the proof.\n * @param {string[] | undefined} imports Optional imports to the program\n * @param {KeySearchParams | undefined} keySearchParams Optional parameters for finding the matching proving &\n * verifying keys for the function\n * @param {ProvingKey | undefined} provingKey Optional proving key to use for the transaction\n * @param {VerifyingKey | undefined} verifyingKey Optional verifying key to use for the transaction\n * @param {PrivateKey | undefined} privateKey Optional private key to use for the transaction\n * @param {OfflineQuery | undefined} offlineQuery Optional offline query if creating transactions in an offline environment\n * @returns {Promise}\n *\n * @example\n * import { Account, Program } from '@provablehq/sdk';\n *\n * /// Create the source for the \"helloworld\" program\n * const program = \"program helloworld.aleo;\\n\\nfunction hello:\\n input r0 as u32.public;\\n input r1 as u32.private;\\n add r0 r1 into r2;\\n output r2 as u32.private;\\n\";\n * const programManager = new ProgramManager();\n *\n * /// Create a temporary account for the execution of the program\n * const account = new Account();\n * programManager.setAccount(account);\n *\n * /// Get the response and ensure that the program executed correctly\n * const executionResponse = await programManager.run(program, \"hello\", [\"5u32\", \"5u32\"]);\n * const result = executionResponse.getOutputs();\n * assert(result === [\"10u32\"]);\n */\n async run(\n program: string,\n function_name: string,\n inputs: string[],\n proveExecution: boolean,\n imports?: ProgramImports,\n keySearchParams?: KeySearchParams,\n provingKey?: ProvingKey,\n verifyingKey?: VerifyingKey,\n privateKey?: PrivateKey,\n offlineQuery?: OfflineQuery,\n ): Promise {\n // Get the private key from the account if it is not provided in the parameters\n let executionPrivateKey = privateKey;\n if (typeof privateKey === \"undefined\" && typeof this.account !== \"undefined\") {\n executionPrivateKey = this.account.privateKey();\n }\n\n if (typeof executionPrivateKey === \"undefined\") {\n throw(\"No private key provided and no private key set in the ProgramManager\");\n }\n\n // If the function proving and verifying keys are not provided, attempt to find them using the key provider\n if (!provingKey || !verifyingKey) {\n try {\n [provingKey, verifyingKey] = await this.keyProvider.functionKeys(keySearchParams);\n } catch (e) {\n console.log(`Function keys not found. Key finder response: '${e}'. The function keys will be synthesized`)\n }\n }\n\n // Run the program offline and return the result\n console.log(\"Running program offline\")\n console.log(\"Proving key: \", provingKey);\n console.log(\"Verifying key: \", verifyingKey);\n return WasmProgramManager.executeFunctionOffline(executionPrivateKey, program, function_name, inputs, proveExecution, false, imports, provingKey, verifyingKey, this.host, offlineQuery);\n }\n\n /**\n * Join two credits records into a single credits record\n *\n * @param {RecordPlaintext | string} recordOne First credits record to join\n * @param {RecordPlaintext | string} recordTwo Second credits record to join\n * @param {number} fee Fee in credits pay for the join transaction\n * @param {boolean} privateFee Use a private record to pay the fee. If false this will use the account's public credit balance\n * @param {RecordSearchParams | undefined} recordSearchParams Optional parameters for finding the fee record to use\n * to pay the fee for the join transaction\n * @param {RecordPlaintext | string | undefined} feeRecord Fee record to use for the join transaction\n * @param {PrivateKey | undefined} privateKey Private key to use for the join transaction\n * @param {OfflineQuery | undefined} offlineQuery Optional offline query if creating transactions in an offline environment\n * @returns {Promise}\n */\n async join(\n recordOne: RecordPlaintext | string,\n recordTwo: RecordPlaintext | string,\n fee: number,\n privateFee: boolean,\n recordSearchParams?: RecordSearchParams | undefined,\n feeRecord?: RecordPlaintext | string | undefined,\n privateKey?: PrivateKey,\n offlineQuery?: OfflineQuery,\n ): Promise {\n // Get the private key from the account if it is not provided in the parameters\n let executionPrivateKey = privateKey;\n if (typeof privateKey === \"undefined\" && typeof this.account !== \"undefined\") {\n executionPrivateKey = this.account.privateKey();\n }\n\n if (typeof executionPrivateKey === \"undefined\") {\n throw(\"No private key provided and no private key set in the ProgramManager\");\n }\n\n // Get the proving and verifying keys from the key provider\n let feeKeys;\n let joinKeys\n try {\n feeKeys = privateFee ? await this.keyProvider.feePrivateKeys() : await this.keyProvider.feePublicKeys();\n joinKeys = await this.keyProvider.joinKeys();\n } catch (e) {\n throw logAndThrow(`Error finding fee keys. Key finder response: '${e}'. Please ensure your key provider is configured correctly.`);\n }\n const [feeProvingKey, feeVerifyingKey] = feeKeys;\n const [joinProvingKey, joinVerifyingKey] = joinKeys;\n\n // Get the fee record from the account if it is not provided in the parameters\n try {\n feeRecord = privateFee ? await this.getCreditsRecord(fee, [], feeRecord, recordSearchParams) : undefined;\n } catch (e) {\n throw logAndThrow(`Error finding fee record. Record finder response: '${e}'. Please ensure you're connected to a valid Aleo network and a record with enough balance exists.`);\n }\n\n // Validate the records provided are valid plaintext records\n try {\n recordOne = recordOne instanceof RecordPlaintext ? recordOne : RecordPlaintext.fromString(recordOne);\n recordTwo = recordTwo instanceof RecordPlaintext ? recordTwo : RecordPlaintext.fromString(recordTwo);\n } catch (e) {\n throw logAndThrow('Records provided are not valid. Please ensure they are valid plaintext records.')\n }\n\n // Build an execution transaction and submit it to the network\n const tx = await WasmProgramManager.buildJoinTransaction(executionPrivateKey, recordOne, recordTwo, fee, feeRecord, this.host, joinProvingKey, joinVerifyingKey, feeProvingKey, feeVerifyingKey, offlineQuery);\n return await this.networkClient.submitTransaction(tx);\n }\n\n /**\n * Split credits into two new credits records\n *\n * @param {number} splitAmount Amount in microcredits to split from the original credits record\n * @param {RecordPlaintext | string} amountRecord Amount record to use for the split transaction\n * @param {PrivateKey | undefined} privateKey Optional private key to use for the split transaction\n * @param {OfflineQuery | undefined} offlineQuery Optional offline query if creating transactions in an offline environment\n * @returns {Promise}\n *\n * @example\n * // Create a new NetworkClient, KeyProvider, and RecordProvider\n * const networkClient = new AleoNetworkClient(\"https://api.explorer.aleo.org/v1\");\n * const keyProvider = new AleoKeyProvider();\n * const recordProvider = new NetworkRecordProvider(account, networkClient);\n *\n * // Initialize a program manager with the key provider to automatically fetch keys for executions\n * const programName = \"hello_hello.aleo\";\n * const programManager = new ProgramManager(\"https://api.explorer.aleo.org/v1\", keyProvider, recordProvider);\n * const record = \"{ owner: aleo184vuwr5u7u0ha5f5k44067dd2uaqewxx6pe5ltha5pv99wvhfqxqv339h4.private, microcredits: 45000000u64.private, _nonce: 4106205762862305308495708971985748592380064201230396559307556388725936304984group.public}\"\n * const tx_id = await programManager.split(25000000, record);\n * const transaction = await programManager.networkClient.getTransaction(tx_id);\n */\n async split(splitAmount: number, amountRecord: RecordPlaintext | string, privateKey?: PrivateKey, offlineQuery?: OfflineQuery): Promise {\n // Get the private key from the account if it is not provided in the parameters\n let executionPrivateKey = privateKey;\n if (typeof executionPrivateKey === \"undefined\" && typeof this.account !== \"undefined\") {\n executionPrivateKey = this.account.privateKey();\n }\n\n if (typeof executionPrivateKey === \"undefined\") {\n throw(\"No private key provided and no private key set in the ProgramManager\");\n }\n\n // Get the split keys from the key provider\n let splitKeys;\n try {\n splitKeys = await this.keyProvider.splitKeys();\n } catch (e) {\n throw logAndThrow(`Error finding fee keys. Key finder response: '${e}'. Please ensure your key provider is configured correctly.`);\n }\n const [splitProvingKey, splitVerifyingKey] = splitKeys;\n\n // Validate the record to be split\n try {\n amountRecord = amountRecord instanceof RecordPlaintext ? amountRecord : RecordPlaintext.fromString(amountRecord);\n } catch (e) {\n throw logAndThrow(\"Record provided is not valid. Please ensure it is a valid plaintext record.\");\n }\n\n // Build an execution transaction and submit it to the network\n const tx = await WasmProgramManager.buildSplitTransaction(executionPrivateKey, splitAmount, amountRecord, this.host, splitProvingKey, splitVerifyingKey, offlineQuery);\n return await this.networkClient.submitTransaction(tx);\n }\n\n /**\n * Pre-synthesize proving and verifying keys for a program\n *\n * @param program {string} The program source code to synthesize keys for\n * @param function_id {string} The function id to synthesize keys for\n * @param inputs {Array} Sample inputs to the function\n * @param privateKey {PrivateKey | undefined} Optional private key to use for the key synthesis\n *\n * @returns {Promise}\n */\n async synthesizeKeys(\n program: string,\n function_id: string,\n inputs: Array,\n privateKey?: PrivateKey,\n ): Promise {\n // Resolve the program imports if they exist\n let imports;\n\n let executionPrivateKey = privateKey;\n if (typeof executionPrivateKey === \"undefined\") {\n if (typeof this.account !== \"undefined\") {\n executionPrivateKey = this.account.privateKey();\n } else {\n executionPrivateKey = new PrivateKey();\n }\n }\n\n // Attempt to run an offline execution of the program and extract the proving and verifying keys\n try {\n imports = await this.networkClient.getProgramImports(program);\n const keyPair = await WasmProgramManager.synthesizeKeyPair(\n executionPrivateKey,\n program,\n function_id,\n inputs,\n imports\n );\n return [keyPair.provingKey(), keyPair.verifyingKey()];\n } catch (e) {\n throw logAndThrow(`Could not synthesize keys - error ${e}. Please ensure the program is valid and the inputs are correct.`);\n }\n }\n\n /**\n * Build a transaction to transfer credits to another account for later submission to the Aleo network\n *\n * @param {number} amount The amount of credits to transfer\n * @param {string} recipient The recipient of the transfer\n * @param {string} transferType The type of transfer to perform - options: 'private', 'privateToPublic', 'public', 'publicToPrivate'\n * @param {number} fee The fee to pay for the transfer\n * @param {boolean} privateFee Use a private record to pay the fee. If false this will use the account's public credit balance\n * @param {RecordSearchParams | undefined} recordSearchParams Optional parameters for finding the amount and fee\n * records for the transfer transaction\n * @param {RecordPlaintext | string} amountRecord Optional amount record to use for the transfer\n * @param {RecordPlaintext | string} feeRecord Optional fee record to use for the transfer\n * @param {PrivateKey | undefined} privateKey Optional private key to use for the transfer transaction\n * @param {OfflineQuery | undefined} offlineQuery Optional offline query if creating transactions in an offline environment\n * @returns {Promise} The transaction id of the transfer transaction\n *\n * @example\n * // Create a new NetworkClient, KeyProvider, and RecordProvider\n * const networkClient = new AleoNetworkClient(\"https://api.explorer.aleo.org/v1\");\n * const keyProvider = new AleoKeyProvider();\n * const recordProvider = new NetworkRecordProvider(account, networkClient);\n *\n * // Initialize a program manager with the key provider to automatically fetch keys for executions\n * const programName = \"hello_hello.aleo\";\n * const programManager = new ProgramManager(\"https://api.explorer.aleo.org/v1\", keyProvider, recordProvider);\n * await programManager.initialize();\n * const tx_id = await programManager.transfer(1, \"aleo1rhgdu77hgyqd3xjj8ucu3jj9r2krwz6mnzyd80gncr5fxcwlh5rsvzp9px\", \"private\", 0.2)\n * const transaction = await programManager.networkClient.getTransaction(tx_id);\n */\n async buildTransferTransaction(\n amount: number,\n recipient: string,\n transferType: string,\n fee: number,\n privateFee: boolean,\n recordSearchParams?: RecordSearchParams,\n amountRecord?: RecordPlaintext | string,\n feeRecord?: RecordPlaintext | string,\n privateKey?: PrivateKey,\n offlineQuery?: OfflineQuery\n ): Promise {\n // Validate the transfer type\n transferType = validateTransferType(transferType);\n\n // Get the private key from the account if it is not provided in the parameters\n let executionPrivateKey = privateKey;\n if (typeof executionPrivateKey === \"undefined\" && typeof this.account !== \"undefined\") {\n executionPrivateKey = this.account.privateKey();\n }\n\n if (typeof executionPrivateKey === \"undefined\") {\n throw(\"No private key provided and no private key set in the ProgramManager\");\n }\n\n // Get the proving and verifying keys from the key provider\n let feeKeys;\n let transferKeys\n try {\n feeKeys = privateFee ? await this.keyProvider.feePrivateKeys() : await this.keyProvider.feePublicKeys();\n transferKeys = await this.keyProvider.transferKeys(transferType);\n } catch (e) {\n throw logAndThrow(`Error finding fee keys. Key finder response: '${e}'. Please ensure your key provider is configured correctly.`);\n }\n const [feeProvingKey, feeVerifyingKey] = feeKeys;\n const [transferProvingKey, transferVerifyingKey] = transferKeys;\n\n // Get the amount and fee record from the account if it is not provided in the parameters\n try {\n // Track the nonces of the records found so no duplicate records are used\n const nonces: string[] = [];\n if (requiresAmountRecord(transferType)) {\n // If the transfer type is private and requires an amount record, get it from the record provider\n amountRecord = await this.getCreditsRecord(fee, [], amountRecord, recordSearchParams);\n nonces.push(amountRecord.nonce());\n } else {\n amountRecord = undefined;\n }\n feeRecord = privateFee ? await this.getCreditsRecord(fee, nonces, feeRecord, recordSearchParams) : undefined;\n } catch (e) {\n throw logAndThrow(`Error finding fee record. Record finder response: '${e}'. Please ensure you're connected to a valid Aleo network and a record with enough balance exists.`);\n }\n\n // Build an execution transaction and submit it to the network\n return await WasmProgramManager.buildTransferTransaction(executionPrivateKey, amount, recipient, transferType, amountRecord, fee, feeRecord, this.host, transferProvingKey, transferVerifyingKey, feeProvingKey, feeVerifyingKey, offlineQuery);\n }\n\n /**\n * Build a transfer_public transaction to transfer credits to another account for later submission to the Aleo network\n *\n * @param {number} amount The amount of credits to transfer\n * @param {string} recipient The recipient of the transfer\n * @param {string} transferType The type of transfer to perform - options: 'private', 'privateToPublic', 'public', 'publicToPrivate'\n * @param {number} fee The fee to pay for the transfer\n * @param {boolean} privateFee Use a private record to pay the fee. If false this will use the account's public credit balance\n * @param {RecordSearchParams | undefined} recordSearchParams Optional parameters for finding the amount and fee\n * records for the transfer transaction\n * @param {RecordPlaintext | string} amountRecord Optional amount record to use for the transfer\n * @param {RecordPlaintext | string} feeRecord Optional fee record to use for the transfer\n * @param {PrivateKey | undefined} privateKey Optional private key to use for the transfer transaction\n * @param {OfflineQuery | undefined} offlineQuery Optional offline query if creating transactions in an offline environment\n * @returns {Promise} The transaction id of the transfer transaction\n */\n async buildTransferPublicTransaction(\n amount: number,\n recipient: string,\n fee: number,\n privateKey?: PrivateKey,\n offlineQuery?: OfflineQuery\n ): Promise {\n return this.buildTransferTransaction(amount, recipient, \"public\", fee, false, undefined, undefined, undefined, privateKey, offlineQuery);\n }\n\n /**\n * Build a transfer_public_as_signer transaction to transfer credits to another account for later submission to the Aleo network\n *\n * @param {number} amount The amount of credits to transfer\n * @param {string} recipient The recipient of the transfer\n * @param {string} transferType The type of transfer to perform - options: 'private', 'privateToPublic', 'public', 'publicToPrivate'\n * @param {number} fee The fee to pay for the transfer\n * @param {boolean} privateFee Use a private record to pay the fee. If false this will use the account's public credit balance\n * @param {RecordSearchParams | undefined} recordSearchParams Optional parameters for finding the amount and fee\n * records for the transfer transaction\n * @param {RecordPlaintext | string} amountRecord Optional amount record to use for the transfer\n * @param {RecordPlaintext | string} feeRecord Optional fee record to use for the transfer\n * @param {PrivateKey | undefined} privateKey Optional private key to use for the transfer transaction\n * @param {OfflineQuery | undefined} offlineQuery Optional offline query if creating transactions in an offline environment\n * @returns {Promise} The transaction id of the transfer transaction\n */\n async buildTransferPublicAsSignerTransaction(\n amount: number,\n recipient: string,\n fee: number,\n privateKey?: PrivateKey,\n offlineQuery?: OfflineQuery\n ): Promise {\n return this.buildTransferTransaction(amount, recipient, \"public\", fee, false, undefined, undefined, undefined, privateKey, offlineQuery);\n }\n\n /**\n * Transfer credits to another account\n *\n * @param {number} amount The amount of credits to transfer\n * @param {string} recipient The recipient of the transfer\n * @param {string} transferType The type of transfer to perform - options: 'private', 'privateToPublic', 'public', 'publicToPrivate'\n * @param {number} fee The fee to pay for the transfer\n * @param {boolean} privateFee Use a private record to pay the fee. If false this will use the account's public credit balance\n * @param {RecordSearchParams | undefined} recordSearchParams Optional parameters for finding the amount and fee\n * records for the transfer transaction\n * @param {RecordPlaintext | string} amountRecord Optional amount record to use for the transfer\n * @param {RecordPlaintext | string} feeRecord Optional fee record to use for the transfer\n * @param {PrivateKey | undefined} privateKey Optional private key to use for the transfer transaction\n * @param {OfflineQuery | undefined} offlineQuery Optional offline query if creating transactions in an offline environment\n * @returns {Promise} The transaction id of the transfer transaction\n *\n * @example\n * // Create a new NetworkClient, KeyProvider, and RecordProvider\n * const networkClient = new AleoNetworkClient(\"https://api.explorer.aleo.org/v1\");\n * const keyProvider = new AleoKeyProvider();\n * const recordProvider = new NetworkRecordProvider(account, networkClient);\n *\n * // Initialize a program manager with the key provider to automatically fetch keys for executions\n * const programManager = new ProgramManager(\"https://api.explorer.aleo.org/v1\", keyProvider, recordProvider);\n * await programManager.initialize();\n * const tx_id = await programManager.transfer(1, \"aleo1rhgdu77hgyqd3xjj8ucu3jj9r2krwz6mnzyd80gncr5fxcwlh5rsvzp9px\", \"private\", 0.2)\n * const transaction = await programManager.networkClient.getTransaction(tx_id);\n */\n async transfer(\n amount: number,\n recipient: string,\n transferType: string,\n fee: number,\n privateFee: boolean,\n recordSearchParams?: RecordSearchParams,\n amountRecord?: RecordPlaintext | string,\n feeRecord?: RecordPlaintext | string,\n privateKey?: PrivateKey,\n offlineQuery?: OfflineQuery\n ): Promise {\n const tx = await this.buildTransferTransaction(amount, recipient, transferType, fee, privateFee, recordSearchParams, amountRecord, feeRecord, privateKey, offlineQuery);\n return await this.networkClient.submitTransaction(tx);\n }\n\n /**\n * Build transaction to bond credits to a validator for later submission to the Aleo Network\n *\n * @example\n * // Create a keyProvider to handle key management\n * const keyProvider = new AleoKeyProvider();\n * keyProvider.useCache = true;\n *\n * // Create a new ProgramManager with the key that will be used to bond credits\n * const programManager = new ProgramManager(\"https://api.explorer.aleo.org/v1\", keyProvider, undefined);\n * programManager.setAccount(new Account(\"YourPrivateKey\"));\n *\n * // Create the bonding transaction object for later submission\n * const tx = await programManager.buildBondPublicTransaction(\"aleo1jx8s4dvjepculny4wfrzwyhs3tlyv65r58ns3g6q2gm2esh7ps8sqy9s5j\", \"aleo1rhgdu77hgyqd3xjj8ucu3jj9r2krwz6mnzyd80gncr5fxcwlh5rsvzp9px\", \"aleo1feya8sjy9k2zflvl2dx39pdsq5tju28elnp2ektnn588uu9ghv8s84msv9\", 2000000);\n * console.log(tx);\n *\n * // The transaction can be later submitted to the network using the network client.\n * const result = await programManager.networkClient.submitTransaction(tx);\n *\n * @returns string\n * @param {string} staker_address Address of the staker who is bonding the credits\n * @param {string} validator_address Address of the validator to bond to, if this address is the same as the staker (i.e. the\n * executor of this function), it will attempt to bond the credits as a validator. Bonding as a validator currently\n * requires a minimum of 10,000,000 credits to bond (subject to change). If the address is specified is an existing\n * validator and is different from the address of the executor of this function, it will bond the credits to that\n * validator's staking committee as a delegator. A minimum of 10 credits is required to bond as a delegator.\n * @param {string} withdrawal_address Address to withdraw the staked credits to when unbond_public is called.\n * @param {number} amount The amount of credits to bond\n * @param {Partial} options - Override default execution options.\n */\n async buildBondPublicTransaction(staker_address: string, validator_address: string, withdrawal_address: string, amount: number, options: Partial = {}) {\n const scaledAmount = Math.trunc(amount * 1000000);\n\n const {\n programName = \"credits.aleo\",\n functionName = \"bond_public\",\n fee = options.fee || 0.86,\n privateFee = false,\n inputs = [staker_address, validator_address, withdrawal_address, `${scaledAmount.toString()}u64`],\n keySearchParams = new AleoKeyProviderParams({\n proverUri: CREDITS_PROGRAM_KEYS.bond_public.prover,\n verifierUri: CREDITS_PROGRAM_KEYS.bond_public.verifier,\n cacheKey: \"credits.aleo/bond_public\"\n }),\n program = this.creditsProgram(),\n ...additionalOptions\n } = options;\n\n const executeOptions: ExecuteOptions = {\n programName,\n functionName,\n fee,\n privateFee,\n inputs,\n keySearchParams,\n ...additionalOptions\n };\n\n return await this.buildExecutionTransaction(executeOptions);\n }\n\n /**\n * Bond credits to validator.\n *\n * @example\n * // Create a keyProvider to handle key management\n * const keyProvider = new AleoKeyProvider();\n * keyProvider.useCache = true;\n *\n * // Create a new ProgramManager with the key that will be used to bond credits\n * const programManager = new ProgramManager(\"https://api.explorer.aleo.org/v1\", keyProvider, undefined);\n * programManager.setAccount(new Account(\"YourPrivateKey\"));\n *\n * // Create the bonding transaction\n * const tx_id = await programManager.bondPublic(\"aleo1jx8s4dvjepculny4wfrzwyhs3tlyv65r58ns3g6q2gm2esh7ps8sqy9s5j\", \"aleo1rhgdu77hgyqd3xjj8ucu3jj9r2krwz6mnzyd80gncr5fxcwlh5rsvzp9px\", \"aleo1feya8sjy9k2zflvl2dx39pdsq5tju28elnp2ektnn588uu9ghv8s84msv9\", 2000000);\n *\n * @returns string\n * @param {string} staker_address Address of the staker who is bonding the credits\n * @param {string} validator_address Address of the validator to bond to, if this address is the same as the signer (i.e. the\n * executor of this function), it will attempt to bond the credits as a validator. Bonding as a validator currently\n * requires a minimum of 1,000,000 credits to bond (subject to change). If the address is specified is an existing\n * validator and is different from the address of the executor of this function, it will bond the credits to that\n * validator's staking committee as a delegator. A minimum of 10 credits is required to bond as a delegator.\n * @param {string} withdrawal_address Address to withdraw the staked credits to when unbond_public is called.\n * @param {number} amount The amount of credits to bond\n * @param {Options} options Options for the execution\n */\n async bondPublic(staker_address: string, validator_address: string, withdrawal_address:string, amount: number, options: Partial = {}) {\n const tx = await this.buildBondPublicTransaction(staker_address, validator_address, withdrawal_address, amount, options);\n return await this.networkClient.submitTransaction(tx);\n }\n\n /**\n * Build a bond_validator transaction for later submission to the Aleo Network.\n *\n * @example\n * // Create a keyProvider to handle key management\n * const keyProvider = new AleoKeyProvider();\n * keyProvider.useCache = true;\n *\n * // Create a new ProgramManager with the key that will be used to bond credits\n * const programManager = new ProgramManager(\"https://api.explorer.aleo.org/v1\", keyProvider, undefined);\n * programManager.setAccount(new Account(\"YourPrivateKey\"));\n *\n * // Create the bond validator transaction object for later use.\n * const tx = await programManager.buildBondValidatorTransaction(\"aleo1rhgdu77hgyqd3xjj8ucu3jj9r2krwz6mnzyd80gncr5fxcwlh5rsvzp9px\", \"aleo1feya8sjy9k2zflvl2dx39pdsq5tju28elnp2ektnn588uu9ghv8s84msv9\", 2000000);\n * console.log(tx);\n *\n * // The transaction can later be submitted to the network using the network client.\n * const tx_id = await programManager.networkClient.submitTransaction(tx);\n *\n * @returns string\n * @param {string} validator_address Address of the validator to bond to, if this address is the same as the staker (i.e. the\n * executor of this function), it will attempt to bond the credits as a validator. Bonding as a validator currently\n * requires a minimum of 10,000,000 credits to bond (subject to change). If the address is specified is an existing\n * validator and is different from the address of the executor of this function, it will bond the credits to that\n * validator's staking committee as a delegator. A minimum of 10 credits is required to bond as a delegator.\n * @param {string} withdrawal_address Address to withdraw the staked credits to when unbond_public is called.\n * @param {number} amount The amount of credits to bond\n * @param {number} commission The commission rate for the validator (must be between 0 and 100 - an error will be thrown if it is not)\n * @param {Partial} options - Override default execution options.\n */\n async buildBondValidatorTransaction(validator_address: string, withdrawal_address: string, amount: number, commission: number, options: Partial = {}) {\n const scaledAmount = Math.trunc(amount * 1000000);\n\n const adjustedCommission = Math.trunc(commission)\n\n const {\n programName = \"credits.aleo\",\n functionName = \"bond_validator\",\n fee = options.fee || 0.86,\n privateFee = false,\n inputs = [validator_address, withdrawal_address, `${scaledAmount.toString()}u64`, `${adjustedCommission.toString()}u8`],\n keySearchParams = new AleoKeyProviderParams({\n proverUri: CREDITS_PROGRAM_KEYS.bond_validator.prover,\n verifierUri: CREDITS_PROGRAM_KEYS.bond_validator.verifier,\n cacheKey: \"credits.aleo/bond_validator\"\n }),\n program = this.creditsProgram(),\n ...additionalOptions\n } = options;\n\n const executeOptions: ExecuteOptions = {\n programName,\n functionName,\n fee,\n privateFee,\n inputs,\n keySearchParams,\n ...additionalOptions\n };\n\n return await this.buildExecutionTransaction(executeOptions);\n }\n\n /**\n * Build transaction to bond a validator.\n *\n * @example\n * // Create a keyProvider to handle key management\n * const keyProvider = new AleoKeyProvider();\n * keyProvider.useCache = true;\n *\n * // Create a new ProgramManager with the key that will be used to bond credits\n * const programManager = new ProgramManager(\"https://api.explorer.aleo.org/v1\", keyProvider, undefined);\n * programManager.setAccount(new Account(\"YourPrivateKey\"));\n *\n * // Create the bonding transaction\n * const tx_id = await programManager.bondValidator(\"aleo1rhgdu77hgyqd3xjj8ucu3jj9r2krwz6mnzyd80gncr5fxcwlh5rsvzp9px\", \"aleo1feya8sjy9k2zflvl2dx39pdsq5tju28elnp2ektnn588uu9ghv8s84msv9\", 2000000);\n *\n * @returns string\n * @param {string} validator_address Address of the validator to bond to, if this address is the same as the staker (i.e. the\n * executor of this function), it will attempt to bond the credits as a validator. Bonding as a validator currently\n * requires a minimum of 10,000,000 credits to bond (subject to change). If the address is specified is an existing\n * validator and is different from the address of the executor of this function, it will bond the credits to that\n * validator's staking committee as a delegator. A minimum of 10 credits is required to bond as a delegator.\n * @param {string} withdrawal_address Address to withdraw the staked credits to when unbond_public is called.\n * @param {number} amount The amount of credits to bond\n * @param {number} commission The commission rate for the validator (must be between 0 and 100 - an error will be thrown if it is not)\n * @param {Partial} options - Override default execution options.\n */\n async bondValidator(validator_address: string, withdrawal_address: string, amount: number, commission: number, options: Partial = {}) {\n const tx = await this.buildBondValidatorTransaction(validator_address, withdrawal_address, amount, commission, options);\n return await this.networkClient.submitTransaction(tx);\n }\n\n /**\n * Build a transaction to unbond public credits from a validator in the Aleo network.\n *\n * @param {string} staker_address - The address of the staker who is unbonding the credits.\n * @param {number} amount - The amount of credits to unbond (scaled by 1,000,000).\n * @param {Partial} options - Override default execution options.\n * @returns {Promise} - A promise that resolves to the transaction or an error message.\n *\n * @example\n * // Create a keyProvider to handle key management.\n * const keyProvider = new AleoKeyProvider();\n * keyProvider.useCache = true;\n *\n * // Create a new ProgramManager with the key that will be used to unbond credits.\n * const programManager = new ProgramManager(\"https://api.explorer.aleo.org/v1\", keyProvider, undefined);\n * const tx = await programManager.buildUnbondPublicTransaction(\"aleo1jx8s4dvjepculny4wfrzwyhs3tlyv65r58ns3g6q2gm2esh7ps8sqy9s5j\", 2000000);\n * console.log(tx);\n *\n * // The transaction can be submitted later to the network using the network client.\n * programManager.networkClient.submitTransaction(tx);\n */\n async buildUnbondPublicTransaction(staker_address: string, amount: number, options: Partial = {}): Promise {\n const scaledAmount = Math.trunc(amount * 1000000);\n\n const {\n programName = \"credits.aleo\",\n functionName = \"unbond_public\",\n fee = options.fee || 1.3,\n privateFee = false,\n inputs = [staker_address, `${scaledAmount.toString()}u64`],\n keySearchParams = new AleoKeyProviderParams({\n proverUri: CREDITS_PROGRAM_KEYS.unbond_public.prover,\n verifierUri: CREDITS_PROGRAM_KEYS.unbond_public.verifier,\n cacheKey: \"credits.aleo/unbond_public\"\n }),\n program = this.creditsProgram(),\n ...additionalOptions\n } = options;\n\n const executeOptions: ExecuteOptions = {\n programName,\n functionName,\n fee,\n privateFee,\n inputs,\n keySearchParams,\n ...additionalOptions\n };\n\n return this.buildExecutionTransaction(executeOptions);\n }\n\n /**\n * Unbond a specified amount of staked credits.\n *\n * @example\n * // Create a keyProvider to handle key management\n * const keyProvider = new AleoKeyProvider();\n * keyProvider.useCache = true;\n *\n * // Create a new ProgramManager with the key that will be used to bond credits\n * const programManager = new ProgramManager(\"https://api.explorer.aleo.org/v1\", keyProvider, undefined);\n * programManager.setAccount(new Account(\"YourPrivateKey\"));\n *\n * // Create the bonding transaction and send it to the network\n * const tx_id = await programManager.unbondPublic(\"aleo1jx8s4dvjepculny4wfrzwyhs3tlyv65r58ns3g6q2gm2esh7ps8sqy9s5j\", 10);\n *\n * @returns string\n * @param {string} staker_address Address of the staker who is unbonding the credits\n * @param {number} amount Amount of credits to unbond. If the address of the executor of this function is an\n * existing validator, it will subtract this amount of credits from the validator's staked credits. If there are\n * less than 1,000,000 credits staked pool after the unbond, the validator will be removed from the validator set.\n * If the address of the executor of this function is not a validator and has credits bonded as a delegator, it will\n * subtract this amount of credits from the delegator's staked credits. If there are less than 10 credits bonded\n * after the unbond operation, the delegator will be removed from the validator's staking pool.\n * @param {ExecuteOptions} options Options for the execution\n */\n async unbondPublic(staker_address: string, amount: number, options: Partial = {}): Promise {\n const tx = await this.buildUnbondPublicTransaction(staker_address, amount, options);\n return await this.networkClient.submitTransaction(tx);\n }\n\n /**\n * Build a transaction to claim unbonded public credits in the Aleo network.\n *\n * @param {string} staker_address - The address of the staker who is claiming the credits.\n * @param {Partial} options - Override default execution options.\n * @returns {Promise} - A promise that resolves to the transaction or an error message.\n *\n * @example\n * // Create a keyProvider to handle key management\n * const keyProvider = new AleoKeyProvider();\n * keyProvider.useCache = true;\n *\n * // Create a new ProgramManager with the key that will be used to claim unbonded credits.\n * const programManager = new ProgramManager(\"https://api.explorer.aleo.org/v1\", keyProvider, undefined);\n *\n * // Create the claim unbonded transaction object for later use.\n * const tx = await programManager.buildClaimUnbondPublicTransaction(\"aleo1jx8s4dvjepculny4wfrzwyhs3tlyv65r58ns3g6q2gm2esh7ps8sqy9s5j\");\n * console.log(tx);\n *\n * // The transaction can be submitted later to the network using the network client.\n * programManager.networkClient.submitTransaction(tx);\n */\n async buildClaimUnbondPublicTransaction(staker_address: string, options: Partial = {}): Promise {\n const {\n programName = \"credits.aleo\",\n functionName = \"claim_unbond_public\",\n fee = options.fee || 2,\n privateFee = false,\n inputs = [staker_address],\n keySearchParams = new AleoKeyProviderParams({\n proverUri: CREDITS_PROGRAM_KEYS.claim_unbond_public.prover,\n verifierUri: CREDITS_PROGRAM_KEYS.claim_unbond_public.verifier,\n cacheKey: \"credits.aleo/claim_unbond_public\"\n }),\n program = this.creditsProgram(),\n ...additionalOptions\n } = options;\n\n const executeOptions: ExecuteOptions = {\n programName,\n functionName,\n fee,\n privateFee,\n inputs,\n keySearchParams,\n ...additionalOptions\n };\n\n return await this.buildExecutionTransaction(executeOptions);\n }\n\n /**\n * Claim unbonded credits. If credits have been unbonded by the account executing this function, this method will\n * claim them and add them to the public balance of the account.\n *\n * @example\n * // Create a keyProvider to handle key management\n * const keyProvider = new AleoKeyProvider();\n * keyProvider.useCache = true;\n *\n * // Create a new ProgramManager with the key that will be used to bond credits\n * const programManager = new ProgramManager(\"https://api.explorer.aleo.org/v1\", keyProvider, undefined);\n * programManager.setAccount(new Account(\"YourPrivateKey\"));\n *\n * // Create the bonding transaction\n * const tx_id = await programManager.claimUnbondPublic(\"aleo1jx8s4dvjepculny4wfrzwyhs3tlyv65r58ns3g6q2gm2esh7ps8sqy9s5j\");\n *\n * @param {string} staker_address Address of the staker who is claiming the credits\n * @param {ExecuteOptions} options\n * @returns string\n */\n async claimUnbondPublic(staker_address: string, options: Partial = {}): Promise {\n const tx = await this.buildClaimUnbondPublicTransaction(staker_address, options);\n return await this.networkClient.submitTransaction(tx);\n }\n\n /**\n * Build a set_validator_state transaction for later usage.\n *\n * This function allows a validator to set their state to be either opened or closed to new stakers.\n * When the validator is open to new stakers, any staker (including the validator) can bond or unbond from the validator.\n * When the validator is closed to new stakers, existing stakers can still bond or unbond from the validator, but new stakers cannot bond.\n *\n * This function serves two primary purposes:\n * 1. Allow a validator to leave the committee, by closing themselves to stakers and then unbonding all of their stakers.\n * 2. Allow a validator to maintain their % of stake, by closing themselves to allowing more stakers to bond to them.\n *\n * @example\n * // Create a keyProvider to handle key management\n * const keyProvider = new AleoKeyProvider();\n * keyProvider.useCache = true;\n *\n * // Create a new ProgramManager with the key that will be used to bond credits\n * const programManager = new ProgramManager(\"https://api.explorer.aleo.org/v1\", keyProvider, undefined);\n * programManager.setAccount(new Account(\"ValidatorPrivateKey\"));\n *\n * // Create the bonding transaction\n * const tx = await programManager.buildSetValidatorStateTransaction(true);\n *\n * // The transaction can be submitted later to the network using the network client.\n * programManager.networkClient.submitTransaction(tx);\n *\n * @returns string\n * @param {boolean} validator_state\n * @param {Partial} options - Override default execution options\n */\n async buildSetValidatorStateTransaction(validator_state: boolean, options: Partial = {}) {\n const {\n programName = \"credits.aleo\",\n functionName = \"set_validator_state\",\n fee = 1,\n privateFee = false,\n inputs = [validator_state.toString()],\n keySearchParams = new AleoKeyProviderParams({\n proverUri: CREDITS_PROGRAM_KEYS.set_validator_state.prover,\n verifierUri: CREDITS_PROGRAM_KEYS.set_validator_state.verifier,\n cacheKey: \"credits.aleo/set_validator_state\"\n }),\n ...additionalOptions\n } = options;\n\n const executeOptions: ExecuteOptions = {\n programName,\n functionName,\n fee,\n privateFee,\n inputs,\n keySearchParams,\n ...additionalOptions\n };\n\n return await this.execute(executeOptions);\n }\n\n /**\n * Submit a set_validator_state transaction to the Aleo Network.\n *\n * This function allows a validator to set their state to be either opened or closed to new stakers.\n * When the validator is open to new stakers, any staker (including the validator) can bond or unbond from the validator.\n * When the validator is closed to new stakers, existing stakers can still bond or unbond from the validator, but new stakers cannot bond.\n *\n * This function serves two primary purposes:\n * 1. Allow a validator to leave the committee, by closing themselves to stakers and then unbonding all of their stakers.\n * 2. Allow a validator to maintain their % of stake, by closing themselves to allowing more stakers to bond to them.\n *\n * @example\n * // Create a keyProvider to handle key management\n * const keyProvider = new AleoKeyProvider();\n * keyProvider.useCache = true;\n *\n * // Create a new ProgramManager with the key that will be used to bond credits\n * const programManager = new ProgramManager(\"https://api.explorer.aleo.org/v1\", keyProvider, undefined);\n * programManager.setAccount(new Account(\"ValidatorPrivateKey\"));\n *\n * // Create the bonding transaction\n * const tx_id = await programManager.setValidatorState(true);\n *\n * @returns string\n * @param {boolean} validator_state\n * @param {Partial} options - Override default execution options\n */\n async setValidatorState(validator_state: boolean, options: Partial = {}) {\n const tx = await this.buildSetValidatorStateTransaction(validator_state, options);\n return this.networkClient.submitTransaction(tx);\n }\n\n /**\n * Verify a proof of execution from an offline execution\n *\n * @param {executionResponse} executionResponse\n * @returns {boolean} True if the proof is valid, false otherwise\n */\n verifyExecution(executionResponse: ExecutionResponse): boolean {\n try {\n const execution = executionResponse.getExecution();\n const function_id = executionResponse.getFunctionId();\n const program = executionResponse.getProgram();\n const verifyingKey = executionResponse.getVerifyingKey();\n return verifyFunctionExecution(execution, verifyingKey, program, function_id);\n } catch(e) {\n console.warn(\"The execution was not found in the response, cannot verify the execution\");\n return false;\n }\n }\n\n /**\n * Create a program object from a program's source code\n *\n * @param {string} program Program source code\n * @returns {Program | Error} The program object\n */\n createProgramFromSource(program: string): Program | Error {\n return Program.fromString(program);\n }\n\n /**\n * Get the credits program object\n *\n * @returns {Program} The credits program object\n */\n creditsProgram(): Program {\n return Program.getCreditsProgram();\n }\n\n /**\n * Verify a program is valid\n *\n * @param {string} program The program source code\n */\n verifyProgram(program: string): boolean {\n try {\n Program.fromString(program);\n return true;\n } catch (e) {\n return false;\n }\n }\n\n // Internal utility function for getting a credits.aleo record\n async getCreditsRecord(amount: number, nonces: string[], record?: RecordPlaintext | string, params?: RecordSearchParams): Promise {\n try {\n return record instanceof RecordPlaintext ? record : RecordPlaintext.fromString(record);\n } catch (e) {\n try {\n const recordProvider = this.recordProvider;\n return (await recordProvider.findCreditsRecord(amount, true, nonces, params))\n } catch (e) {\n throw logAndThrow(`Error finding fee record. Record finder response: '${e}'. Please ensure you're connected to a valid Aleo network and a record with enough balance exists.`);\n }\n }\n }\n}\n\n// Ensure the transfer type requires an amount record\nfunction requiresAmountRecord(transferType: string): boolean {\n return PRIVATE_TRANSFER_TYPES.has(transferType);\n}\n\n// Validate the transfer type\nfunction validateTransferType(transferType: string): string | Error {\n return VALID_TRANSFER_TYPES.has(transferType) ? transferType :\n logAndThrow(`Invalid transfer type '${transferType}'. Valid transfer types are 'private', 'privateToPublic', 'public', and 'publicToPrivate'.`);\n}\n\nexport { ProgramManager }\n","import {VerifyingKey, Metadata} from \"@provablehq/wasm\";\n\nconst KEY_STORE = Metadata.baseUrl();\n\ninterface Key {\n name: string,\n locator: string,\n prover: string,\n verifier: string,\n verifyingKey: () => VerifyingKey,\n}\n\nfunction convert(metadata: Metadata): Key {\n // This looks up the method name in VerifyingKey\n const verifyingKey = (VerifyingKey as any)[metadata.verifyingKey];\n\n if (!verifyingKey) {\n throw new Error(\"Invalid method name: \" + metadata.verifyingKey);\n }\n\n return {\n name: metadata.name,\n locator: metadata.locator,\n prover: metadata.prover,\n verifier: metadata.verifier,\n verifyingKey,\n };\n}\n\nconst CREDITS_PROGRAM_KEYS = {\n bond_public: convert(Metadata.bond_public()),\n bond_validator: convert(Metadata.bond_validator()),\n claim_unbond_public: convert(Metadata.claim_unbond_public()),\n fee_private: convert(Metadata.fee_private()),\n fee_public: convert(Metadata.fee_public()),\n inclusion: convert(Metadata.inclusion()),\n join: convert(Metadata.join()),\n set_validator_state: convert(Metadata.set_validator_state()),\n split: convert(Metadata.split()),\n transfer_private: convert(Metadata.transfer_private()),\n transfer_private_to_public: convert(Metadata.transfer_private_to_public()),\n transfer_public: convert(Metadata.transfer_public()),\n transfer_public_as_signer: convert(Metadata.transfer_public_as_signer()),\n transfer_public_to_private: convert(Metadata.transfer_public_to_private()),\n unbond_public: convert(Metadata.unbond_public()),\n getKey: function(key: string): Key | Error {\n if (this.hasOwnProperty(key)) {\n return (this as any)[key] as Key;\n } else {\n return new Error(`Key \"${key}\" not found.`);\n }\n }\n};\n\nconst PRIVATE_TRANSFER_TYPES = new Set([\n \"transfer_private\",\n \"private\",\n \"transferPrivate\",\n \"transfer_private_to_public\",\n \"privateToPublic\",\n \"transferPrivateToPublic\",\n]);\nconst VALID_TRANSFER_TYPES = new Set([\n \"transfer_private\",\n \"private\",\n \"transferPrivate\",\n \"transfer_private_to_public\",\n \"privateToPublic\",\n \"transferPrivateToPublic\",\n \"transfer_public\",\n \"transfer_public_as_signer\",\n \"public\",\n \"public_as_signer\",\n \"transferPublic\",\n \"transferPublicAsSigner\",\n \"transfer_public_to_private\",\n \"publicToPrivate\",\n \"publicAsSigner\",\n \"transferPublicToPrivate\",\n]);\nconst PRIVATE_TRANSFER = new Set([\n \"private\",\n \"transfer_private\",\n \"transferPrivate\",\n]);\nconst PRIVATE_TO_PUBLIC_TRANSFER = new Set([\n \"private_to_public\",\n \"privateToPublic\",\n \"transfer_private_to_public\",\n \"transferPrivateToPublic\",\n]);\nconst PUBLIC_TRANSFER = new Set([\n \"public\",\n \"transfer_public\",\n \"transferPublic\",\n]);\nconst PUBLIC_TRANSFER_AS_SIGNER = new Set([\n \"public_as_signer\",\n \"transfer_public_as_signer\",\n \"transferPublicAsSigner\",\n]);\nconst PUBLIC_TO_PRIVATE_TRANSFER = new Set([\n \"public_to_private\",\n \"publicToPrivate\",\n \"transfer_public_to_private\",\n \"transferPublicToPrivate\",\n]);\n\nfunction logAndThrow(message: string): Error {\n console.error(message);\n throw message;\n}\n\nimport { Account } from \"./account\";\nimport { AleoNetworkClient, ProgramImports } from \"./network-client\";\nimport { Block } from \"./models/block\";\nimport { Execution } from \"./models/execution\";\nimport { Input } from \"./models/input\";\nimport { Output } from \"./models/output\";\nimport { TransactionModel } from \"./models/transactionModel\";\nimport { Transition } from \"./models/transition\";\nimport {\n AleoKeyProvider,\n AleoKeyProviderParams,\n AleoKeyProviderInitParams,\n CachedKeyPair,\n FunctionKeyPair,\n FunctionKeyProvider,\n KeySearchParams,\n} from \"./function-key-provider\";\nimport {\n OfflineKeyProvider,\n OfflineSearchParams\n} from \"./offline-key-provider\";\nimport {\n BlockHeightSearch,\n NetworkRecordProvider,\n RecordProvider,\n RecordSearchParams,\n} from \"./record-provider\";\n\n// @TODO: This function is no longer needed, remove it.\nasync function initializeWasm() {\n console.warn(\"initializeWasm is deprecated, you no longer need to use it\");\n}\n\nexport { createAleoWorker } from \"./managed-worker\";\n\nexport { ProgramManager } from \"./program-manager\";\n\nexport {\n Address,\n Execution as FunctionExecution,\n ExecutionResponse,\n Field,\n OfflineQuery,\n PrivateKey,\n PrivateKeyCiphertext,\n Program,\n ProgramManager as ProgramManagerBase,\n ProvingKey,\n RecordCiphertext,\n RecordPlaintext,\n Signature,\n Transaction,\n VerifyingKey,\n ViewKey,\n initThreadPool,\n verifyFunctionExecution,\n} from \"@provablehq/wasm\";\n\nexport { initializeWasm };\n\nexport {\n Account,\n AleoKeyProvider,\n AleoKeyProviderParams,\n AleoKeyProviderInitParams,\n AleoNetworkClient,\n Block,\n BlockHeightSearch,\n CachedKeyPair,\n Execution,\n FunctionKeyPair,\n FunctionKeyProvider,\n Input,\n Key,\n KeySearchParams,\n NetworkRecordProvider,\n ProgramImports,\n OfflineKeyProvider,\n OfflineSearchParams,\n Output,\n RecordProvider,\n RecordSearchParams,\n TransactionModel,\n Transition,\n CREDITS_PROGRAM_KEYS,\n KEY_STORE,\n PRIVATE_TRANSFER,\n PRIVATE_TO_PUBLIC_TRANSFER,\n PRIVATE_TRANSFER_TYPES,\n PUBLIC_TRANSFER,\n PUBLIC_TRANSFER_AS_SIGNER,\n PUBLIC_TO_PRIVATE_TRANSFER,\n VALID_TRANSFER_TYPES,\n logAndThrow,\n};\n"],"names":["async","get","url","options","response","fetch","ok","Error","status","post","method","AleoNetworkClient","host","headers","account","constructor","this","setAccount","getAccount","setHost","fetchData","json","error","findUnspentRecords","startHeight","endHeight","privateKey","amounts","maxMicrocredits","nonces","records","Array","start","end","resolvedPrivateKey","latestHeight","failures","totalRecordValue","BigInt","_privateKey","PrivateKey","from_string","viewKey","to_view_key","blockHeight","getLatestHeight","blocks","getBlockRange","i","length","transactions","j","confirmedTransaction","type","transaction","execution","transitions","k","transition","program","outputs","l","output","record","RecordCiphertext","fromString","value","isOwner","recordPlaintext","decrypt","nonce","includes","serialNumber","serialNumberString","getTransitionId","push","microcredits","amounts_found","console","warn","toString","getBlock","height","getDeploymentTransactionIDForProgram","Program","replace","getDeploymentTransactionForProgram","transaction_id","getTransaction","getLatestBlock","getLatestCommittee","getProgram","programId","getProgramObject","inputProgram","getProgramImports","imports","importList","getImports","import_id","hasOwnProperty","programSource","nestedImports","key","logAndThrow","getProgramImportNames","getProgramMappingNames","getProgramMappingValue","mappingName","getStateRoot","id","getTransactions","getTransactionsInMempool","inputOrOutputID","submitTransaction","transaction_string","Transaction","body","Object","assign","message","AleoKeyProviderParams","name","proverUri","verifierUri","cacheKey","params","AleoKeyProvider","cache","cacheOption","keyUris","fetchBytes","data","arrayBuffer","Uint8Array","KEY_STORE","Map","useCache","clearCache","clear","cacheKeys","keyId","keys","provingKey","verifyingKey","set","toBytes","containsKeys","has","deleteKeys","delete","getKeys","debug","provingKeyBytes","verifyingKeyBytes","ProvingKey","fromBytes","VerifyingKey","functionKeys","proverUrl","verifierUrl","CREDITS_PROGRAM_KEYS","getKey","fetchCreditsKeys","fetchRemoteKeys","getVerifyingKey","fetchProvingKey","locator","keyPair","verifying_key","proving_key","prover","bond_public","bondPublicKeys","bondValidatorKeys","bond_validator","claimUnbondPublicKeys","claim_unbond_public","transferKeys","visibility","PRIVATE_TRANSFER","transfer_private","PRIVATE_TO_PUBLIC_TRANSFER","transfer_private_to_public","PUBLIC_TRANSFER","transfer_public","PUBLIC_TRANSFER_AS_SIGNER","transfer_public_as_signer","PUBLIC_TO_PRIVATE_TRANSFER","transfer_public_to_private","joinKeys","join","splitKeys","split","feePrivateKeys","fee_private","feePublicKeys","fee_public","verifier","inclusion","set_validator_state","unbond_public","text","e","inner","unBondPublicKeys","ProgramManager","keyProvider","networkClient","recordProvider","setKeyProvider","setRecordProvider","deploy","fee","privateFee","recordSearchParams","feeRecord","programObject","log","feeKeys","deploymentPrivateKey","getCreditsRecord","undefined","feeProvingKey","feeVerifyingKey","tx","ProgramManager$1","buildDeploymentTransaction","buildExecutionTransaction","programName","functionName","inputs","keySearchParams","offlineQuery","executionPrivateKey","execute","run","function_name","proveExecution","executeFunctionOffline","recordOne","recordTwo","joinProvingKey","joinVerifyingKey","RecordPlaintext","buildJoinTransaction","splitAmount","amountRecord","splitProvingKey","splitVerifyingKey","buildSplitTransaction","synthesizeKeys","function_id","synthesizeKeyPair","buildTransferTransaction","amount","recipient","transferType","validateTransferType","transferProvingKey","transferVerifyingKey","requiresAmountRecord","buildTransferPublicTransaction","buildTransferPublicAsSignerTransaction","transfer","buildBondPublicTransaction","staker_address","validator_address","withdrawal_address","scaledAmount","Math","trunc","creditsProgram","additionalOptions","executeOptions","bondPublic","buildBondValidatorTransaction","commission","adjustedCommission","bondValidator","buildUnbondPublicTransaction","unbondPublic","buildClaimUnbondPublicTransaction","claimUnbondPublic","buildSetValidatorStateTransaction","validator_state","setValidatorState","verifyExecution","executionResponse","getExecution","getFunctionId","verifyFunctionExecution","createProgramFromSource","getCreditsProgram","verifyProgram","findCreditsRecord","PRIVATE_TRANSFER_TYPES","VALID_TRANSFER_TYPES","Metadata","baseUrl","convert","metadata","Set"],"sourceRoot":""} \ No newline at end of file diff --git a/511.bundle.js b/511.bundle.js new file mode 100644 index 000000000..9f421ca14 --- /dev/null +++ b/511.bundle.js @@ -0,0 +1,2 @@ +(self.webpackChunkaleo_website=self.webpackChunkaleo_website||[]).push([[511],{4494:(_,t,e)=>{_.exports=e.p+"38c18e22c4f37629c446.wasm"},3645:(_,t,e)=>{_.exports=e.p+"f62b366a9b5fa66a5bcc.js"},6511:(_,t,e)=>{e.a(_,(async(_,r)=>{try{function n(_,t,e,r){return new Promise((n=>{const i=new Worker(_,{type:"module"});i.addEventListener("message",(_=>{setTimeout((()=>{n(i),i.unref&&i.unref()}),0)}),{capture:!0,once:!0}),i.postMessage({module:t,memory:e,address:r})}))}let K;e.d(t,{$r:()=>B_,CK:()=>j,L:()=>W_,PD:()=>q_,SF:()=>j_,XV:()=>J_,YW:()=>N_,_q:()=>E_,fW:()=>I_,hz:()=>L_,zW:()=>U_});const C=new Array(128).fill(void 0);function i(_){return C[_]}C.push(void 0,null,!0,!1);let E=C.length;function o(_){_<132||(C[_]=E,E=_)}function a(_){const t=i(_);return o(_),t}const M="undefined"!=typeof TextDecoder?new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0}):{decode:()=>{throw Error("TextDecoder not available")}};"undefined"!=typeof TextDecoder&&M.decode();let B=null;function s(){return null!==B&&B.buffer===K.memory.buffer||(B=new Uint8Array(K.memory.buffer)),B}function c(_,t){return _>>>=0,M.decode(s().slice(_,_+t))}function g(_){E===C.length&&C.push(C.length+1);const t=E;return E=C[t],C[t]=_,t}let U=0;const I="undefined"!=typeof TextEncoder?new TextEncoder("utf-8"):{encode:()=>{throw Error("TextEncoder not available")}},q=function(_,t){const e=I.encode(_);return t.set(e),{read:_.length,written:e.length}};function w(_,t,e){if(void 0===e){const e=I.encode(_),r=t(e.length,1)>>>0;return s().subarray(r,r+e.length).set(e),U=e.length,r}let r=_.length,n=t(r,1)>>>0;const i=s();let o=0;for(;o127)break;i[n+o]=t}if(o!==r){0!==o&&(_=_.slice(o)),n=e(n,r,r=o+3*_.length,1)>>>0;const t=s().subarray(n+o,n+r);o+=q(_,t).written,n=e(n,r,o,1)>>>0}return U=o,n}function d(_){return null==_}let W=null;function b(){return null!==W&&W.buffer===K.memory.buffer||(W=new Int32Array(K.memory.buffer)),W}function l(_){const t=typeof _;if("number"==t||"boolean"==t||null==_)return`${_}`;if("string"==t)return`"${_}"`;if("symbol"==t){const t=_.description;return null==t?"Symbol":`Symbol(${t})`}if("function"==t){const t=_.name;return"string"==typeof t&&t.length>0?`Function(${t})`:"Function"}if(Array.isArray(_)){const t=_.length;let e="[";t>0&&(e+=l(_[0]));for(let r=1;r1))return toString.call(_);if(r=e[1],"Object"==r)try{return"Object("+JSON.stringify(_)+")"}catch(_){return"Object"}return _ instanceof Error?`${_.name}: ${_.message}\n${_.stack}`:r}const $="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((_=>{K.__wbindgen_export_3.get(_.dtor)(_.a,_.b)}));function u(_,t,e,r){const n={a:_,b:t,cnt:1,dtor:e},i=(..._)=>{n.cnt++;const t=n.a;n.a=0;try{return r(t,n.b,..._)}finally{0==--n.cnt?(K.__wbindgen_export_3.get(n.dtor)(t,n.b),$.unregister(n)):n.a=t}};return i.original=n,$.register(i,n,n),i}function f(_,t,e){K._dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h442b5e922f6f9710(_,t,g(e))}function p(_,t){if(!(_ instanceof t))throw new Error(`expected instance of ${t.name}`);return _.ptr}function y(_,t){const e=t(1*_.length,1)>>>0;return s().set(_,e/1),U=_.length,e}function m(_,t,e,r){try{const o=K.__wbindgen_add_to_stack_pointer(-16);p(_,H),p(t,S_),p(e,g_);const s=w(r,K.__wbindgen_malloc,K.__wbindgen_realloc),c=U;K.verifyFunctionExecution(o,_.__wbg_ptr,t.__wbg_ptr,e.__wbg_ptr,s,c);var n=b()[o/4+0],i=b()[o/4+1];if(b()[o/4+2])throw a(i);return 0!==n}finally{K.__wbindgen_add_to_stack_pointer(16)}}let N=null;function h(){return null!==N&&N.buffer===K.memory.buffer||(N=new BigInt64Array(K.memory.buffer)),N}function v(_,t){return _>>>=0,s().subarray(_/1,_/1+t)}function k(_){K.runRayonThread(_)}function P(_,t){return a(K.initThreadPool(g(_),t))}function S(_,t){try{return _.apply(this,t)}catch(_){K.__wbindgen_exn_store(g(_))}}function x(_,t,e,r){K.wasm_bindgen__convert__closures__invoke2_mut__h5ab12ffe4b82d47a(_,t,g(e),g(r))}const D="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((_=>K.__wbg_address_free(_>>>0)));let J=class _{static __wrap(t){t>>>=0;const e=Object.create(_.prototype);return e.__wbg_ptr=t,D.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,D.unregister(this),_}free(){const _=this.__destroy_into_raw();K.__wbg_address_free(_)}static from_private_key(t){p(t,o_);const e=K.address_from_private_key(t.__wbg_ptr);return _.__wrap(e)}static from_view_key(t){p(t,V_);const e=K.address_from_view_key(t.__wbg_ptr);return _.__wrap(e)}static from_string(t){const e=w(t,K.__wbindgen_malloc,K.__wbindgen_realloc),r=U,n=K.address_from_string(e,r);return _.__wrap(n)}to_string(){let _,t;try{const n=K.__wbindgen_add_to_stack_pointer(-16);K.address_to_string(n,this.__wbg_ptr);var e=b()[n/4+0],r=b()[n/4+1];return _=e,t=r,c(e,r)}finally{K.__wbindgen_add_to_stack_pointer(16),K.__wbindgen_free(_,t,1)}}verify(_,t){const e=y(_,K.__wbindgen_malloc),r=U;p(t,h_);return 0!==K.address_verify(this.__wbg_ptr,e,r,t.__wbg_ptr)}};const L="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((_=>K.__wbg_execution_free(_>>>0)));let H=class _{static __wrap(t){t>>>=0;const e=Object.create(_.prototype);return e.__wbg_ptr=t,L.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,L.unregister(this),_}free(){const _=this.__destroy_into_raw();K.__wbg_execution_free(_)}toString(){let _,t;try{const n=K.__wbindgen_add_to_stack_pointer(-16);K.execution_toString(n,this.__wbg_ptr);var e=b()[n/4+0],r=b()[n/4+1];return _=e,t=r,c(e,r)}finally{K.__wbindgen_add_to_stack_pointer(16),K.__wbindgen_free(_,t,1)}}static fromString(t){try{const n=K.__wbindgen_add_to_stack_pointer(-16),i=w(t,K.__wbindgen_malloc,K.__wbindgen_realloc),o=U;K.execution_fromString(n,i,o);var e=b()[n/4+0],r=b()[n/4+1];if(b()[n/4+2])throw a(r);return _.__wrap(e)}finally{K.__wbindgen_add_to_stack_pointer(16)}}};const Q="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((_=>K.__wbg_executionresponse_free(_>>>0)));let X=class _{static __wrap(t){t>>>=0;const e=Object.create(_.prototype);return e.__wbg_ptr=t,Q.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,Q.unregister(this),_}free(){const _=this.__destroy_into_raw();K.__wbg_executionresponse_free(_)}getOutputs(){return a(K.executionresponse_getOutputs(this.__wbg_ptr))}getExecution(){const _=K.executionresponse_getExecution(this.__wbg_ptr);return 0===_?void 0:H.__wrap(_)}getKeys(){try{const e=K.__wbindgen_add_to_stack_pointer(-16);K.executionresponse_getKeys(e,this.__wbg_ptr);var _=b()[e/4+0],t=b()[e/4+1];if(b()[e/4+2])throw a(t);return __.__wrap(_)}finally{K.__wbindgen_add_to_stack_pointer(16)}}getProvingKey(){const _=K.executionresponse_getProvingKey(this.__wbg_ptr);return 0===_?void 0:l_.__wrap(_)}getVerifyingKey(){const _=K.executionresponse_getVerifyingKey(this.__wbg_ptr);return S_.__wrap(_)}getFunctionId(){let _,t;try{const n=K.__wbindgen_add_to_stack_pointer(-16);K.executionresponse_getFunctionId(n,this.__wbg_ptr);var e=b()[n/4+0],r=b()[n/4+1];return _=e,t=r,c(e,r)}finally{K.__wbindgen_add_to_stack_pointer(16),K.__wbindgen_free(_,t,1)}}getProgram(){const _=K.executionresponse_getProgram(this.__wbg_ptr);return g_.__wrap(_)}};const Y="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((_=>K.__wbg_field_free(_>>>0)));let G=class _{static __wrap(t){t>>>=0;const e=Object.create(_.prototype);return e.__wbg_ptr=t,Y.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,Y.unregister(this),_}free(){const _=this.__destroy_into_raw();K.__wbg_field_free(_)}toString(){let _,t;try{const n=K.__wbindgen_add_to_stack_pointer(-16);K.field_toString(n,this.__wbg_ptr);var e=b()[n/4+0],r=b()[n/4+1];return _=e,t=r,c(e,r)}finally{K.__wbindgen_add_to_stack_pointer(16),K.__wbindgen_free(_,t,1)}}static fromString(t){try{const n=K.__wbindgen_add_to_stack_pointer(-16),i=w(t,K.__wbindgen_malloc,K.__wbindgen_realloc),o=U;K.field_fromString(n,i,o);var e=b()[n/4+0],r=b()[n/4+1];if(b()[n/4+2])throw a(r);return _.__wrap(e)}finally{K.__wbindgen_add_to_stack_pointer(16)}}};const Z="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((_=>K.__wbg_keypair_free(_>>>0)));class __{static __wrap(_){_>>>=0;const t=Object.create(__.prototype);return t.__wbg_ptr=_,Z.register(t,t.__wbg_ptr,t),t}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,Z.unregister(this),_}free(){const _=this.__destroy_into_raw();K.__wbg_keypair_free(_)}constructor(_,t){p(_,l_);var e=_.__destroy_into_raw();p(t,S_);var r=t.__destroy_into_raw();const n=K.keypair_new(e,r);return this.__wbg_ptr=n>>>0,this}provingKey(){try{const e=K.__wbindgen_add_to_stack_pointer(-16);K.keypair_provingKey(e,this.__wbg_ptr);var _=b()[e/4+0],t=b()[e/4+1];if(b()[e/4+2])throw a(t);return l_.__wrap(_)}finally{K.__wbindgen_add_to_stack_pointer(16)}}verifyingKey(){try{const e=K.__wbindgen_add_to_stack_pointer(-16);K.keypair_verifyingKey(e,this.__wbg_ptr);var _=b()[e/4+0],t=b()[e/4+1];if(b()[e/4+2])throw a(t);return S_.__wrap(_)}finally{K.__wbindgen_add_to_stack_pointer(16)}}}const t_="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((_=>K.__wbg_metadata_free(_>>>0)));let e_=class _{static __wrap(t){t>>>=0;const e=Object.create(_.prototype);return e.__wbg_ptr=t,t_.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,t_.unregister(this),_}free(){const _=this.__destroy_into_raw();K.__wbg_metadata_free(_)}get locator(){let _,t;try{const n=K.__wbindgen_add_to_stack_pointer(-16);K.__wbg_get_metadata_locator(n,this.__wbg_ptr);var e=b()[n/4+0],r=b()[n/4+1];return _=e,t=r,c(e,r)}finally{K.__wbindgen_add_to_stack_pointer(16),K.__wbindgen_free(_,t,1)}}set locator(_){const t=w(_,K.__wbindgen_malloc,K.__wbindgen_realloc),e=U;K.__wbg_set_metadata_locator(this.__wbg_ptr,t,e)}get prover(){let _,t;try{const n=K.__wbindgen_add_to_stack_pointer(-16);K.__wbg_get_metadata_prover(n,this.__wbg_ptr);var e=b()[n/4+0],r=b()[n/4+1];return _=e,t=r,c(e,r)}finally{K.__wbindgen_add_to_stack_pointer(16),K.__wbindgen_free(_,t,1)}}set prover(_){const t=w(_,K.__wbindgen_malloc,K.__wbindgen_realloc),e=U;K.__wbg_set_metadata_prover(this.__wbg_ptr,t,e)}get verifier(){let _,t;try{const n=K.__wbindgen_add_to_stack_pointer(-16);K.__wbg_get_metadata_verifier(n,this.__wbg_ptr);var e=b()[n/4+0],r=b()[n/4+1];return _=e,t=r,c(e,r)}finally{K.__wbindgen_add_to_stack_pointer(16),K.__wbindgen_free(_,t,1)}}set verifier(_){const t=w(_,K.__wbindgen_malloc,K.__wbindgen_realloc),e=U;K.__wbg_set_metadata_verifier(this.__wbg_ptr,t,e)}get verifyingKey(){let _,t;try{const n=K.__wbindgen_add_to_stack_pointer(-16);K.__wbg_get_metadata_verifyingKey(n,this.__wbg_ptr);var e=b()[n/4+0],r=b()[n/4+1];return _=e,t=r,c(e,r)}finally{K.__wbindgen_add_to_stack_pointer(16),K.__wbindgen_free(_,t,1)}}set verifyingKey(_){const t=w(_,K.__wbindgen_malloc,K.__wbindgen_realloc),e=U;K.__wbg_set_metadata_verifyingKey(this.__wbg_ptr,t,e)}static baseUrl(){let _,t;try{const n=K.__wbindgen_add_to_stack_pointer(-16);K.metadata_baseUrl(n);var e=b()[n/4+0],r=b()[n/4+1];return _=e,t=r,c(e,r)}finally{K.__wbindgen_add_to_stack_pointer(16),K.__wbindgen_free(_,t,1)}}static bond_public(){const t=K.metadata_bond_public();return _.__wrap(t)}static bond_validator(){const t=K.metadata_bond_validator();return _.__wrap(t)}static claim_unbond_public(){const t=K.metadata_claim_unbond_public();return _.__wrap(t)}static fee_private(){const t=K.metadata_fee_private();return _.__wrap(t)}static fee_public(){const t=K.metadata_fee_public();return _.__wrap(t)}static inclusion(){const t=K.metadata_inclusion();return _.__wrap(t)}static join(){const t=K.metadata_join();return _.__wrap(t)}static set_validator_state(){const t=K.metadata_set_validator_state();return _.__wrap(t)}static split(){const t=K.metadata_split();return _.__wrap(t)}static transfer_private(){const t=K.metadata_transfer_private();return _.__wrap(t)}static transfer_private_to_public(){const t=K.metadata_transfer_private_to_public();return _.__wrap(t)}static transfer_public(){const t=K.metadata_transfer_public();return _.__wrap(t)}static transfer_public_as_signer(){const t=K.metadata_transfer_public_as_signer();return _.__wrap(t)}static transfer_public_to_private(){const t=K.metadata_transfer_public_to_private();return _.__wrap(t)}static unbond_public(){const t=K.metadata_unbond_public();return _.__wrap(t)}};const r_="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((_=>K.__wbg_offlinequery_free(_>>>0)));let n_=class _{static __wrap(t){t>>>=0;const e=Object.create(_.prototype);return e.__wbg_ptr=t,r_.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,r_.unregister(this),_}free(){const _=this.__destroy_into_raw();K.__wbg_offlinequery_free(_)}constructor(_){try{const r=K.__wbindgen_add_to_stack_pointer(-16),n=w(_,K.__wbindgen_malloc,K.__wbindgen_realloc),i=U;K.offlinequery_new(r,n,i);var t=b()[r/4+0],e=b()[r/4+1];if(b()[r/4+2])throw a(e);return this.__wbg_ptr=t>>>0,this}finally{K.__wbindgen_add_to_stack_pointer(16)}}addStatePath(_,t){try{const r=K.__wbindgen_add_to_stack_pointer(-16),n=w(_,K.__wbindgen_malloc,K.__wbindgen_realloc),i=U,o=w(t,K.__wbindgen_malloc,K.__wbindgen_realloc),s=U;K.offlinequery_addStatePath(r,this.__wbg_ptr,n,i,o,s);var e=b()[r/4+0];if(b()[r/4+1])throw a(e)}finally{K.__wbindgen_add_to_stack_pointer(16)}}toString(){let _,t;try{const n=K.__wbindgen_add_to_stack_pointer(-16);K.offlinequery_toString(n,this.__wbg_ptr);var e=b()[n/4+0],r=b()[n/4+1];return _=e,t=r,c(e,r)}finally{K.__wbindgen_add_to_stack_pointer(16),K.__wbindgen_free(_,t,1)}}static fromString(t){try{const n=K.__wbindgen_add_to_stack_pointer(-16),i=w(t,K.__wbindgen_malloc,K.__wbindgen_realloc),o=U;K.offlinequery_fromString(n,i,o);var e=b()[n/4+0],r=b()[n/4+1];if(b()[n/4+2])throw a(r);return _.__wrap(e)}finally{K.__wbindgen_add_to_stack_pointer(16)}}};const i_="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((_=>K.__wbg_privatekey_free(_>>>0)));let o_=class _{static __wrap(t){t>>>=0;const e=Object.create(_.prototype);return e.__wbg_ptr=t,i_.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,i_.unregister(this),_}free(){const _=this.__destroy_into_raw();K.__wbg_privatekey_free(_)}constructor(){const _=K.privatekey_new();return this.__wbg_ptr=_>>>0,this}static from_seed_unchecked(t){const e=y(t,K.__wbindgen_malloc),r=U,n=K.privatekey_from_seed_unchecked(e,r);return _.__wrap(n)}static from_string(t){try{const n=K.__wbindgen_add_to_stack_pointer(-16),i=w(t,K.__wbindgen_malloc,K.__wbindgen_realloc),o=U;K.privatekey_from_string(n,i,o);var e=b()[n/4+0],r=b()[n/4+1];if(b()[n/4+2])throw a(r);return _.__wrap(e)}finally{K.__wbindgen_add_to_stack_pointer(16)}}to_string(){let _,t;try{const n=K.__wbindgen_add_to_stack_pointer(-16);K.privatekey_to_string(n,this.__wbg_ptr);var e=b()[n/4+0],r=b()[n/4+1];return _=e,t=r,c(e,r)}finally{K.__wbindgen_add_to_stack_pointer(16),K.__wbindgen_free(_,t,1)}}to_view_key(){const _=K.privatekey_to_view_key(this.__wbg_ptr);return V_.__wrap(_)}to_address(){const _=K.privatekey_to_address(this.__wbg_ptr);return J.__wrap(_)}sign(_){const t=y(_,K.__wbindgen_malloc),e=U,r=K.privatekey_sign(this.__wbg_ptr,t,e);return h_.__wrap(r)}static newEncrypted(_){try{const r=K.__wbindgen_add_to_stack_pointer(-16),n=w(_,K.__wbindgen_malloc,K.__wbindgen_realloc),i=U;K.privatekey_newEncrypted(r,n,i);var t=b()[r/4+0],e=b()[r/4+1];if(b()[r/4+2])throw a(e);return s_.__wrap(t)}finally{K.__wbindgen_add_to_stack_pointer(16)}}toCiphertext(_){try{const r=K.__wbindgen_add_to_stack_pointer(-16),n=w(_,K.__wbindgen_malloc,K.__wbindgen_realloc),i=U;K.privatekey_toCiphertext(r,this.__wbg_ptr,n,i);var t=b()[r/4+0],e=b()[r/4+1];if(b()[r/4+2])throw a(e);return s_.__wrap(t)}finally{K.__wbindgen_add_to_stack_pointer(16)}}static fromPrivateKeyCiphertext(t,e){try{const i=K.__wbindgen_add_to_stack_pointer(-16);p(t,s_);const o=w(e,K.__wbindgen_malloc,K.__wbindgen_realloc),s=U;K.privatekey_fromPrivateKeyCiphertext(i,t.__wbg_ptr,o,s);var r=b()[i/4+0],n=b()[i/4+1];if(b()[i/4+2])throw a(n);return _.__wrap(r)}finally{K.__wbindgen_add_to_stack_pointer(16)}}};const a_="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((_=>K.__wbg_privatekeyciphertext_free(_>>>0)));let s_=class _{static __wrap(t){t>>>=0;const e=Object.create(_.prototype);return e.__wbg_ptr=t,a_.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,a_.unregister(this),_}free(){const _=this.__destroy_into_raw();K.__wbg_privatekeyciphertext_free(_)}static encryptPrivateKey(t,e){try{const i=K.__wbindgen_add_to_stack_pointer(-16);p(t,o_);const o=w(e,K.__wbindgen_malloc,K.__wbindgen_realloc),s=U;K.privatekey_toCiphertext(i,t.__wbg_ptr,o,s);var r=b()[i/4+0],n=b()[i/4+1];if(b()[i/4+2])throw a(n);return _.__wrap(r)}finally{K.__wbindgen_add_to_stack_pointer(16)}}decryptToPrivateKey(_){try{const r=K.__wbindgen_add_to_stack_pointer(-16),n=w(_,K.__wbindgen_malloc,K.__wbindgen_realloc),i=U;K.privatekeyciphertext_decryptToPrivateKey(r,this.__wbg_ptr,n,i);var t=b()[r/4+0],e=b()[r/4+1];if(b()[r/4+2])throw a(e);return o_.__wrap(t)}finally{K.__wbindgen_add_to_stack_pointer(16)}}toString(){let _,t;try{const n=K.__wbindgen_add_to_stack_pointer(-16);K.privatekeyciphertext_toString(n,this.__wbg_ptr);var e=b()[n/4+0],r=b()[n/4+1];return _=e,t=r,c(e,r)}finally{K.__wbindgen_add_to_stack_pointer(16),K.__wbindgen_free(_,t,1)}}static fromString(t){try{const n=K.__wbindgen_add_to_stack_pointer(-16),i=w(t,K.__wbindgen_malloc,K.__wbindgen_realloc),o=U;K.privatekeyciphertext_fromString(n,i,o);var e=b()[n/4+0],r=b()[n/4+1];if(b()[n/4+2])throw a(r);return _.__wrap(e)}finally{K.__wbindgen_add_to_stack_pointer(16)}}};const c_="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((_=>K.__wbg_program_free(_>>>0)));let g_=class _{static __wrap(t){t>>>=0;const e=Object.create(_.prototype);return e.__wbg_ptr=t,c_.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,c_.unregister(this),_}free(){const _=this.__destroy_into_raw();K.__wbg_program_free(_)}static fromString(t){try{const n=K.__wbindgen_add_to_stack_pointer(-16),i=w(t,K.__wbindgen_malloc,K.__wbindgen_realloc),o=U;K.program_fromString(n,i,o);var e=b()[n/4+0],r=b()[n/4+1];if(b()[n/4+2])throw a(r);return _.__wrap(e)}finally{K.__wbindgen_add_to_stack_pointer(16)}}toString(){let _,t;try{const n=K.__wbindgen_add_to_stack_pointer(-16);K.program_toString(n,this.__wbg_ptr);var e=b()[n/4+0],r=b()[n/4+1];return _=e,t=r,c(e,r)}finally{K.__wbindgen_add_to_stack_pointer(16),K.__wbindgen_free(_,t,1)}}hasFunction(_){const t=w(_,K.__wbindgen_malloc,K.__wbindgen_realloc),e=U;return 0!==K.program_hasFunction(this.__wbg_ptr,t,e)}getFunctions(){return a(K.program_getFunctions(this.__wbg_ptr))}getFunctionInputs(_){try{const r=K.__wbindgen_add_to_stack_pointer(-16),n=w(_,K.__wbindgen_malloc,K.__wbindgen_realloc),i=U;K.program_getFunctionInputs(r,this.__wbg_ptr,n,i);var t=b()[r/4+0],e=b()[r/4+1];if(b()[r/4+2])throw a(e);return a(t)}finally{K.__wbindgen_add_to_stack_pointer(16)}}getMappings(){try{const e=K.__wbindgen_add_to_stack_pointer(-16);K.program_getMappings(e,this.__wbg_ptr);var _=b()[e/4+0],t=b()[e/4+1];if(b()[e/4+2])throw a(t);return a(_)}finally{K.__wbindgen_add_to_stack_pointer(16)}}getRecordMembers(_){try{const r=K.__wbindgen_add_to_stack_pointer(-16),n=w(_,K.__wbindgen_malloc,K.__wbindgen_realloc),i=U;K.program_getRecordMembers(r,this.__wbg_ptr,n,i);var t=b()[r/4+0],e=b()[r/4+1];if(b()[r/4+2])throw a(e);return a(t)}finally{K.__wbindgen_add_to_stack_pointer(16)}}getStructMembers(_){try{const r=K.__wbindgen_add_to_stack_pointer(-16),n=w(_,K.__wbindgen_malloc,K.__wbindgen_realloc),i=U;K.program_getStructMembers(r,this.__wbg_ptr,n,i);var t=b()[r/4+0],e=b()[r/4+1];if(b()[r/4+2])throw a(e);return a(t)}finally{K.__wbindgen_add_to_stack_pointer(16)}}static getCreditsProgram(){const t=K.program_getCreditsProgram();return _.__wrap(t)}id(){let _,t;try{const n=K.__wbindgen_add_to_stack_pointer(-16);K.program_id(n,this.__wbg_ptr);var e=b()[n/4+0],r=b()[n/4+1];return _=e,t=r,c(e,r)}finally{K.__wbindgen_add_to_stack_pointer(16),K.__wbindgen_free(_,t,1)}}address(){try{const e=K.__wbindgen_add_to_stack_pointer(-16);K.program_address(e,this.__wbg_ptr);var _=b()[e/4+0],t=b()[e/4+1];if(b()[e/4+2])throw a(t);return J.__wrap(_)}finally{K.__wbindgen_add_to_stack_pointer(16)}}isEqual(t){p(t,_);return 0!==K.program_isEqual(this.__wbg_ptr,t.__wbg_ptr)}getImports(){return a(K.program_getImports(this.__wbg_ptr))}};const w_="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((_=>K.__wbg_programmanager_free(_>>>0)));let d_=class{__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,w_.unregister(this),_}free(){const _=this.__destroy_into_raw();K.__wbg_programmanager_free(_)}static buildDeploymentTransaction(_,t,e,r,n,i,o,s,c){p(_,o_);const b=w(t,K.__wbindgen_malloc,K.__wbindgen_realloc),l=U;let u=0;d(r)||(p(r,y_),u=r.__destroy_into_raw());var f=d(n)?0:w(n,K.__wbindgen_malloc,K.__wbindgen_realloc),y=U;let m=0;d(o)||(p(o,l_),m=o.__destroy_into_raw());let h=0;d(s)||(p(s,S_),h=s.__destroy_into_raw());let v=0;d(c)||(p(c,n_),v=c.__destroy_into_raw());return a(K.programmanager_buildDeploymentTransaction(_.__wbg_ptr,b,l,e,u,f,y,d(i)?0:g(i),m,h,v))}static estimateDeploymentFee(_,t){const e=w(_,K.__wbindgen_malloc,K.__wbindgen_realloc),r=U;return a(K.programmanager_estimateDeploymentFee(e,r,d(t)?0:g(t)))}static estimateProgramNameCost(_){try{const r=K.__wbindgen_add_to_stack_pointer(-16),n=w(_,K.__wbindgen_malloc,K.__wbindgen_realloc),i=U;K.programmanager_estimateProgramNameCost(r,n,i);var t=h()[r/8+0],e=b()[r/4+2];if(b()[r/4+3])throw a(e);return BigInt.asUintN(64,t)}finally{K.__wbindgen_add_to_stack_pointer(16)}}static executeFunctionOffline(_,t,e,r,n,i,o,s,c,b,l){p(_,o_);const u=w(t,K.__wbindgen_malloc,K.__wbindgen_realloc),f=U,y=w(e,K.__wbindgen_malloc,K.__wbindgen_realloc),m=U;let h=0;d(s)||(p(s,l_),h=s.__destroy_into_raw());let v=0;d(c)||(p(c,S_),v=c.__destroy_into_raw());var k=d(b)?0:w(b,K.__wbindgen_malloc,K.__wbindgen_realloc),P=U;let S=0;d(l)||(p(l,n_),S=l.__destroy_into_raw());return a(K.programmanager_executeFunctionOffline(_.__wbg_ptr,u,f,y,m,g(r),n,i,d(o)?0:g(o),h,v,k,P,S))}static buildExecutionTransaction(_,t,e,r,n,i,o,s,c,b,l,u,f){p(_,o_);const y=w(t,K.__wbindgen_malloc,K.__wbindgen_realloc),m=U,h=w(e,K.__wbindgen_malloc,K.__wbindgen_realloc),v=U;let k=0;d(i)||(p(i,y_),k=i.__destroy_into_raw());var P=d(o)?0:w(o,K.__wbindgen_malloc,K.__wbindgen_realloc),S=U;let x=0;d(c)||(p(c,l_),x=c.__destroy_into_raw());let V=0;d(b)||(p(b,S_),V=b.__destroy_into_raw());let F=0;d(l)||(p(l,l_),F=l.__destroy_into_raw());let T=0;d(u)||(p(u,S_),T=u.__destroy_into_raw());let R=0;d(f)||(p(f,n_),R=f.__destroy_into_raw());return a(K.programmanager_buildExecutionTransaction(_.__wbg_ptr,y,m,h,v,g(r),n,k,P,S,d(s)?0:g(s),x,V,F,T,R))}static estimateExecutionFee(_,t,e,r,n,i,o,s,c){p(_,o_);const b=w(t,K.__wbindgen_malloc,K.__wbindgen_realloc),l=U,u=w(e,K.__wbindgen_malloc,K.__wbindgen_realloc),f=U;var y=d(n)?0:w(n,K.__wbindgen_malloc,K.__wbindgen_realloc),m=U;let h=0;d(o)||(p(o,l_),h=o.__destroy_into_raw());let v=0;d(s)||(p(s,S_),v=s.__destroy_into_raw());let k=0;d(c)||(p(c,n_),k=c.__destroy_into_raw());return a(K.programmanager_estimateExecutionFee(_.__wbg_ptr,b,l,u,f,g(r),y,m,d(i)?0:g(i),h,v,k))}static estimateFinalizeFee(_,t){try{const n=K.__wbindgen_add_to_stack_pointer(-16),i=w(_,K.__wbindgen_malloc,K.__wbindgen_realloc),o=U,s=w(t,K.__wbindgen_malloc,K.__wbindgen_realloc),c=U;K.programmanager_estimateFinalizeFee(n,i,o,s,c);var e=h()[n/8+0],r=b()[n/4+2];if(b()[n/4+3])throw a(r);return BigInt.asUintN(64,e)}finally{K.__wbindgen_add_to_stack_pointer(16)}}static buildJoinTransaction(_,t,e,r,n,i,o,s,c,g,b){p(_,o_),p(t,y_);var l=t.__destroy_into_raw();p(e,y_);var u=e.__destroy_into_raw();let f=0;d(n)||(p(n,y_),f=n.__destroy_into_raw());var y=d(i)?0:w(i,K.__wbindgen_malloc,K.__wbindgen_realloc),m=U;let h=0;d(o)||(p(o,l_),h=o.__destroy_into_raw());let v=0;d(s)||(p(s,S_),v=s.__destroy_into_raw());let k=0;d(c)||(p(c,l_),k=c.__destroy_into_raw());let P=0;d(g)||(p(g,S_),P=g.__destroy_into_raw());let S=0;d(b)||(p(b,n_),S=b.__destroy_into_raw());return a(K.programmanager_buildJoinTransaction(_.__wbg_ptr,l,u,r,f,y,m,h,v,k,P,S))}static buildSplitTransaction(_,t,e,r,n,i,o){p(_,o_),p(e,y_);var s=e.__destroy_into_raw(),c=d(r)?0:w(r,K.__wbindgen_malloc,K.__wbindgen_realloc),g=U;let b=0;d(n)||(p(n,l_),b=n.__destroy_into_raw());let l=0;d(i)||(p(i,S_),l=i.__destroy_into_raw());let u=0;d(o)||(p(o,n_),u=o.__destroy_into_raw());return a(K.programmanager_buildSplitTransaction(_.__wbg_ptr,t,s,c,g,b,l,u))}static buildTransferTransaction(_,t,e,r,n,i,o,s,c,g,b,l,u,f){p(_,o_);const y=w(e,K.__wbindgen_malloc,K.__wbindgen_realloc),m=U,h=w(r,K.__wbindgen_malloc,K.__wbindgen_realloc),v=U;var k=d(n)?0:w(n,K.__wbindgen_malloc,K.__wbindgen_realloc),P=U;let S=0;d(i)||(p(i,y_),S=i.__destroy_into_raw());let x=0;d(s)||(p(s,y_),x=s.__destroy_into_raw());var V=d(c)?0:w(c,K.__wbindgen_malloc,K.__wbindgen_realloc),F=U;let T=0;d(g)||(p(g,l_),T=g.__destroy_into_raw());let R=0;d(b)||(p(b,S_),R=b.__destroy_into_raw());let z=0;d(l)||(p(l,l_),z=l.__destroy_into_raw());let A=0;d(u)||(p(u,S_),A=u.__destroy_into_raw());let O=0;d(f)||(p(f,n_),O=f.__destroy_into_raw());return a(K.programmanager_buildTransferTransaction(_.__wbg_ptr,t,y,m,h,v,k,P,S,o,x,V,F,T,R,z,A,O))}static synthesizeKeyPair(_,t,e,r,n){p(_,o_);const i=w(t,K.__wbindgen_malloc,K.__wbindgen_realloc),o=U,s=w(e,K.__wbindgen_malloc,K.__wbindgen_realloc),c=U;return a(K.programmanager_synthesizeKeyPair(_.__wbg_ptr,i,o,s,c,g(r),d(n)?0:g(n)))}};const b_="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((_=>K.__wbg_provingkey_free(_>>>0)));let l_=class _{static __wrap(t){t>>>=0;const e=Object.create(_.prototype);return e.__wbg_ptr=t,b_.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,b_.unregister(this),_}free(){const _=this.__destroy_into_raw();K.__wbg_provingkey_free(_)}isBondPublicProver(){return 0!==K.provingkey_isBondPublicProver(this.__wbg_ptr)}isBondValidatorProver(){return 0!==K.provingkey_isBondValidatorProver(this.__wbg_ptr)}isClaimUnbondPublicProver(){return 0!==K.provingkey_isClaimUnbondPublicProver(this.__wbg_ptr)}isFeePrivateProver(){return 0!==K.provingkey_isFeePrivateProver(this.__wbg_ptr)}isFeePublicProver(){return 0!==K.provingkey_isFeePublicProver(this.__wbg_ptr)}isInclusionProver(){return 0!==K.provingkey_isInclusionProver(this.__wbg_ptr)}isJoinProver(){return 0!==K.provingkey_isJoinProver(this.__wbg_ptr)}isSetValidatorStateProver(){return 0!==K.provingkey_isSetValidatorStateProver(this.__wbg_ptr)}isSplitProver(){return 0!==K.provingkey_isSplitProver(this.__wbg_ptr)}isTransferPrivateProver(){return 0!==K.provingkey_isTransferPrivateProver(this.__wbg_ptr)}isTransferPrivateToPublicProver(){return 0!==K.provingkey_isTransferPrivateToPublicProver(this.__wbg_ptr)}isTransferPublicProver(){return 0!==K.provingkey_isTransferPublicProver(this.__wbg_ptr)}isTransferPublicAsSignerProver(){return 0!==K.provingkey_isTransferPublicAsSignerProver(this.__wbg_ptr)}isTransferPublicToPrivateProver(){return 0!==K.provingkey_isTransferPublicToPrivateProver(this.__wbg_ptr)}isUnbondPublicProver(){return 0!==K.provingkey_isUnbondPublicProver(this.__wbg_ptr)}checksum(){let _,t;try{const n=K.__wbindgen_add_to_stack_pointer(-16);K.provingkey_checksum(n,this.__wbg_ptr);var e=b()[n/4+0],r=b()[n/4+1];return _=e,t=r,c(e,r)}finally{K.__wbindgen_add_to_stack_pointer(16),K.__wbindgen_free(_,t,1)}}copy(){const t=K.provingkey_copy(this.__wbg_ptr);return _.__wrap(t)}static fromBytes(t){try{const n=K.__wbindgen_add_to_stack_pointer(-16),i=y(t,K.__wbindgen_malloc),o=U;K.provingkey_fromBytes(n,i,o);var e=b()[n/4+0],r=b()[n/4+1];if(b()[n/4+2])throw a(r);return _.__wrap(e)}finally{K.__wbindgen_add_to_stack_pointer(16)}}static fromString(t){try{const n=K.__wbindgen_add_to_stack_pointer(-16),i=w(t,K.__wbindgen_malloc,K.__wbindgen_realloc),o=U;K.provingkey_fromString(n,i,o);var e=b()[n/4+0],r=b()[n/4+1];if(b()[n/4+2])throw a(r);return _.__wrap(e)}finally{K.__wbindgen_add_to_stack_pointer(16)}}toBytes(){try{const n=K.__wbindgen_add_to_stack_pointer(-16);K.provingkey_toBytes(n,this.__wbg_ptr);var _=b()[n/4+0],t=b()[n/4+1],e=b()[n/4+2];if(b()[n/4+3])throw a(e);var r=v(_,t).slice();return K.__wbindgen_free(_,1*t,1),r}finally{K.__wbindgen_add_to_stack_pointer(16)}}toString(){let _,t;try{const n=K.__wbindgen_add_to_stack_pointer(-16);K.provingkey_toString(n,this.__wbg_ptr);var e=b()[n/4+0],r=b()[n/4+1];return _=e,t=r,c(e,r)}finally{K.__wbindgen_add_to_stack_pointer(16),K.__wbindgen_free(_,t,1)}}};const u_="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((_=>K.__wbg_recordciphertext_free(_>>>0)));let f_=class _{static __wrap(t){t>>>=0;const e=Object.create(_.prototype);return e.__wbg_ptr=t,u_.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,u_.unregister(this),_}free(){const _=this.__destroy_into_raw();K.__wbg_recordciphertext_free(_)}static fromString(t){try{const n=K.__wbindgen_add_to_stack_pointer(-16),i=w(t,K.__wbindgen_malloc,K.__wbindgen_realloc),o=U;K.recordciphertext_fromString(n,i,o);var e=b()[n/4+0],r=b()[n/4+1];if(b()[n/4+2])throw a(r);return _.__wrap(e)}finally{K.__wbindgen_add_to_stack_pointer(16)}}toString(){let _,t;try{const n=K.__wbindgen_add_to_stack_pointer(-16);K.recordciphertext_toString(n,this.__wbg_ptr);var e=b()[n/4+0],r=b()[n/4+1];return _=e,t=r,c(e,r)}finally{K.__wbindgen_add_to_stack_pointer(16),K.__wbindgen_free(_,t,1)}}decrypt(_){try{const r=K.__wbindgen_add_to_stack_pointer(-16);p(_,V_),K.recordciphertext_decrypt(r,this.__wbg_ptr,_.__wbg_ptr);var t=b()[r/4+0],e=b()[r/4+1];if(b()[r/4+2])throw a(e);return y_.__wrap(t)}finally{K.__wbindgen_add_to_stack_pointer(16)}}isOwner(_){p(_,V_);return 0!==K.recordciphertext_isOwner(this.__wbg_ptr,_.__wbg_ptr)}};const p_="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((_=>K.__wbg_recordplaintext_free(_>>>0)));let y_=class _{static __wrap(t){t>>>=0;const e=Object.create(_.prototype);return e.__wbg_ptr=t,p_.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,p_.unregister(this),_}free(){const _=this.__destroy_into_raw();K.__wbg_recordplaintext_free(_)}commitment(_,t){try{const n=K.__wbindgen_add_to_stack_pointer(-16),i=w(_,K.__wbindgen_malloc,K.__wbindgen_realloc),o=U,s=w(t,K.__wbindgen_malloc,K.__wbindgen_realloc),c=U;K.recordplaintext_commitment(n,this.__wbg_ptr,i,o,s,c);var e=b()[n/4+0],r=b()[n/4+1];if(b()[n/4+2])throw a(r);return G.__wrap(e)}finally{K.__wbindgen_add_to_stack_pointer(16)}}static fromString(t){try{const n=K.__wbindgen_add_to_stack_pointer(-16),i=w(t,K.__wbindgen_malloc,K.__wbindgen_realloc),o=U;K.recordplaintext_fromString(n,i,o);var e=b()[n/4+0],r=b()[n/4+1];if(b()[n/4+2])throw a(r);return _.__wrap(e)}finally{K.__wbindgen_add_to_stack_pointer(16)}}toString(){let _,t;try{const n=K.__wbindgen_add_to_stack_pointer(-16);K.recordplaintext_toString(n,this.__wbg_ptr);var e=b()[n/4+0],r=b()[n/4+1];return _=e,t=r,c(e,r)}finally{K.__wbindgen_add_to_stack_pointer(16),K.__wbindgen_free(_,t,1)}}microcredits(){const _=K.recordplaintext_microcredits(this.__wbg_ptr);return BigInt.asUintN(64,_)}nonce(){let _,t;try{const n=K.__wbindgen_add_to_stack_pointer(-16);K.recordplaintext_nonce(n,this.__wbg_ptr);var e=b()[n/4+0],r=b()[n/4+1];return _=e,t=r,c(e,r)}finally{K.__wbindgen_add_to_stack_pointer(16),K.__wbindgen_free(_,t,1)}}serialNumberString(_,t,e){let r,n;try{const u=K.__wbindgen_add_to_stack_pointer(-16);p(_,o_);const f=w(t,K.__wbindgen_malloc,K.__wbindgen_realloc),y=U,m=w(e,K.__wbindgen_malloc,K.__wbindgen_realloc),h=U;K.recordplaintext_serialNumberString(u,this.__wbg_ptr,_.__wbg_ptr,f,y,m,h);var i=b()[u/4+0],o=b()[u/4+1],s=b()[u/4+2],g=b()[u/4+3],d=i,l=o;if(g)throw d=0,l=0,a(s);return r=d,n=l,c(d,l)}finally{K.__wbindgen_add_to_stack_pointer(16),K.__wbindgen_free(r,n,1)}}};const m_="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((_=>K.__wbg_signature_free(_>>>0)));let h_=class _{static __wrap(t){t>>>=0;const e=Object.create(_.prototype);return e.__wbg_ptr=t,m_.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,m_.unregister(this),_}free(){const _=this.__destroy_into_raw();K.__wbg_signature_free(_)}static sign(t,e){p(t,o_);const r=y(e,K.__wbindgen_malloc),n=U,i=K.privatekey_sign(t.__wbg_ptr,r,n);return _.__wrap(i)}verify(_,t){p(_,J);const e=y(t,K.__wbindgen_malloc),r=U;return 0!==K.signature_verify(this.__wbg_ptr,_.__wbg_ptr,e,r)}static from_string(t){const e=w(t,K.__wbindgen_malloc,K.__wbindgen_realloc),r=U,n=K.signature_from_string(e,r);return _.__wrap(n)}to_string(){let _,t;try{const n=K.__wbindgen_add_to_stack_pointer(-16);K.signature_to_string(n,this.__wbg_ptr);var e=b()[n/4+0],r=b()[n/4+1];return _=e,t=r,c(e,r)}finally{K.__wbindgen_add_to_stack_pointer(16),K.__wbindgen_free(_,t,1)}}};const v_="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((_=>K.__wbg_transaction_free(_>>>0)));let k_=class _{static __wrap(t){t>>>=0;const e=Object.create(_.prototype);return e.__wbg_ptr=t,v_.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,v_.unregister(this),_}free(){const _=this.__destroy_into_raw();K.__wbg_transaction_free(_)}static fromString(t){try{const n=K.__wbindgen_add_to_stack_pointer(-16),i=w(t,K.__wbindgen_malloc,K.__wbindgen_realloc),o=U;K.transaction_fromString(n,i,o);var e=b()[n/4+0],r=b()[n/4+1];if(b()[n/4+2])throw a(r);return _.__wrap(e)}finally{K.__wbindgen_add_to_stack_pointer(16)}}toString(){let _,t;try{const n=K.__wbindgen_add_to_stack_pointer(-16);K.transaction_toString(n,this.__wbg_ptr);var e=b()[n/4+0],r=b()[n/4+1];return _=e,t=r,c(e,r)}finally{K.__wbindgen_add_to_stack_pointer(16),K.__wbindgen_free(_,t,1)}}transactionId(){let _,t;try{const n=K.__wbindgen_add_to_stack_pointer(-16);K.transaction_transactionId(n,this.__wbg_ptr);var e=b()[n/4+0],r=b()[n/4+1];return _=e,t=r,c(e,r)}finally{K.__wbindgen_add_to_stack_pointer(16),K.__wbindgen_free(_,t,1)}}transactionType(){let _,t;try{const n=K.__wbindgen_add_to_stack_pointer(-16);K.transaction_transactionType(n,this.__wbg_ptr);var e=b()[n/4+0],r=b()[n/4+1];return _=e,t=r,c(e,r)}finally{K.__wbindgen_add_to_stack_pointer(16),K.__wbindgen_free(_,t,1)}}};const P_="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((_=>K.__wbg_verifyingkey_free(_>>>0)));let S_=class _{static __wrap(t){t>>>=0;const e=Object.create(_.prototype);return e.__wbg_ptr=t,P_.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,P_.unregister(this),_}free(){const _=this.__destroy_into_raw();K.__wbg_verifyingkey_free(_)}static bondPublicVerifier(){const t=K.verifyingkey_bondPublicVerifier();return _.__wrap(t)}static bondValidatorVerifier(){const t=K.verifyingkey_bondValidatorVerifier();return _.__wrap(t)}static claimUnbondPublicVerifier(){const t=K.verifyingkey_claimUnbondPublicVerifier();return _.__wrap(t)}static feePrivateVerifier(){const t=K.verifyingkey_feePrivateVerifier();return _.__wrap(t)}static feePublicVerifier(){const t=K.verifyingkey_feePublicVerifier();return _.__wrap(t)}static inclusionVerifier(){const t=K.verifyingkey_inclusionVerifier();return _.__wrap(t)}static joinVerifier(){const t=K.verifyingkey_joinVerifier();return _.__wrap(t)}static setValidatorStateVerifier(){const t=K.verifyingkey_setValidatorStateVerifier();return _.__wrap(t)}static splitVerifier(){const t=K.verifyingkey_splitVerifier();return _.__wrap(t)}static transferPrivateVerifier(){const t=K.verifyingkey_transferPrivateVerifier();return _.__wrap(t)}static transferPrivateToPublicVerifier(){const t=K.verifyingkey_transferPrivateToPublicVerifier();return _.__wrap(t)}static transferPublicVerifier(){const t=K.verifyingkey_transferPublicVerifier();return _.__wrap(t)}static transferPublicAsSignerVerifier(){const t=K.verifyingkey_transferPublicAsSignerVerifier();return _.__wrap(t)}static transferPublicToPrivateVerifier(){const t=K.verifyingkey_transferPublicToPrivateVerifier();return _.__wrap(t)}static unbondPublicVerifier(){const t=K.verifyingkey_unbondPublicVerifier();return _.__wrap(t)}isBondPublicVerifier(){return 0!==K.verifyingkey_isBondPublicVerifier(this.__wbg_ptr)}isBondValidatorVerifier(){return 0!==K.verifyingkey_isBondValidatorVerifier(this.__wbg_ptr)}isClaimUnbondPublicVerifier(){return 0!==K.verifyingkey_isClaimUnbondPublicVerifier(this.__wbg_ptr)}isFeePrivateVerifier(){return 0!==K.verifyingkey_isFeePrivateVerifier(this.__wbg_ptr)}isFeePublicVerifier(){return 0!==K.verifyingkey_isFeePublicVerifier(this.__wbg_ptr)}isInclusionVerifier(){return 0!==K.verifyingkey_isInclusionVerifier(this.__wbg_ptr)}isJoinVerifier(){return 0!==K.verifyingkey_isJoinVerifier(this.__wbg_ptr)}isSetValidatorStateVerifier(){return 0!==K.verifyingkey_isSetValidatorStateVerifier(this.__wbg_ptr)}isSplitVerifier(){return 0!==K.verifyingkey_isSplitVerifier(this.__wbg_ptr)}isTransferPrivateVerifier(){return 0!==K.verifyingkey_isTransferPrivateVerifier(this.__wbg_ptr)}isTransferPrivateToPublicVerifier(){return 0!==K.verifyingkey_isTransferPrivateToPublicVerifier(this.__wbg_ptr)}isTransferPublicVerifier(){return 0!==K.verifyingkey_isTransferPublicVerifier(this.__wbg_ptr)}isTransferPublicAsSignerVerifier(){return 0!==K.verifyingkey_isTransferPublicAsSignerVerifier(this.__wbg_ptr)}isTransferPublicToPrivateVerifier(){return 0!==K.verifyingkey_isTransferPublicToPrivateVerifier(this.__wbg_ptr)}isUnbondPublicVerifier(){return 0!==K.verifyingkey_isUnbondPublicVerifier(this.__wbg_ptr)}checksum(){let _,t;try{const n=K.__wbindgen_add_to_stack_pointer(-16);K.verifyingkey_checksum(n,this.__wbg_ptr);var e=b()[n/4+0],r=b()[n/4+1];return _=e,t=r,c(e,r)}finally{K.__wbindgen_add_to_stack_pointer(16),K.__wbindgen_free(_,t,1)}}copy(){const t=K.verifyingkey_copy(this.__wbg_ptr);return _.__wrap(t)}static fromBytes(t){try{const n=K.__wbindgen_add_to_stack_pointer(-16),i=y(t,K.__wbindgen_malloc),o=U;K.verifyingkey_fromBytes(n,i,o);var e=b()[n/4+0],r=b()[n/4+1];if(b()[n/4+2])throw a(r);return _.__wrap(e)}finally{K.__wbindgen_add_to_stack_pointer(16)}}static fromString(t){try{const n=K.__wbindgen_add_to_stack_pointer(-16),i=w(t,K.__wbindgen_malloc,K.__wbindgen_realloc),o=U;K.verifyingkey_fromString(n,i,o);var e=b()[n/4+0],r=b()[n/4+1];if(b()[n/4+2])throw a(r);return _.__wrap(e)}finally{K.__wbindgen_add_to_stack_pointer(16)}}toBytes(){try{const n=K.__wbindgen_add_to_stack_pointer(-16);K.verifyingkey_toBytes(n,this.__wbg_ptr);var _=b()[n/4+0],t=b()[n/4+1],e=b()[n/4+2];if(b()[n/4+3])throw a(e);var r=v(_,t).slice();return K.__wbindgen_free(_,1*t,1),r}finally{K.__wbindgen_add_to_stack_pointer(16)}}toString(){let _,t;try{const n=K.__wbindgen_add_to_stack_pointer(-16);K.verifyingkey_toString(n,this.__wbg_ptr);var e=b()[n/4+0],r=b()[n/4+1];return _=e,t=r,c(e,r)}finally{K.__wbindgen_add_to_stack_pointer(16),K.__wbindgen_free(_,t,1)}}};const x_="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((_=>K.__wbg_viewkey_free(_>>>0)));let V_=class _{static __wrap(t){t>>>=0;const e=Object.create(_.prototype);return e.__wbg_ptr=t,x_.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,x_.unregister(this),_}free(){const _=this.__destroy_into_raw();K.__wbg_viewkey_free(_)}static from_private_key(t){p(t,o_);const e=K.privatekey_to_view_key(t.__wbg_ptr);return _.__wrap(e)}static from_string(t){const e=w(t,K.__wbindgen_malloc,K.__wbindgen_realloc),r=U,n=K.viewkey_from_string(e,r);return _.__wrap(n)}to_string(){let _,t;try{const n=K.__wbindgen_add_to_stack_pointer(-16);K.viewkey_to_string(n,this.__wbg_ptr);var e=b()[n/4+0],r=b()[n/4+1];return _=e,t=r,c(e,r)}finally{K.__wbindgen_add_to_stack_pointer(16),K.__wbindgen_free(_,t,1)}}to_address(){const _=K.address_from_view_key(this.__wbg_ptr);return J.__wrap(_)}decrypt(_){let t,e;try{const d=K.__wbindgen_add_to_stack_pointer(-16),l=w(_,K.__wbindgen_malloc,K.__wbindgen_realloc),u=U;K.viewkey_decrypt(d,this.__wbg_ptr,l,u);var r=b()[d/4+0],n=b()[d/4+1],i=b()[d/4+2],o=b()[d/4+3],s=r,g=n;if(o)throw s=0,g=0,a(i);return t=s,e=g,c(s,g)}finally{K.__wbindgen_add_to_stack_pointer(16),K.__wbindgen_free(t,e,1)}}};async function V(_,t){if("function"==typeof Response&&_ instanceof Response){if("function"==typeof WebAssembly.instantiateStreaming)try{return await WebAssembly.instantiateStreaming(_,t)}catch(t){if("application/wasm"==_.headers.get("Content-Type"))throw t;console.warn("`WebAssembly.instantiateStreaming` failed because your server does not serve wasm with `application/wasm` MIME type. Falling back to `WebAssembly.instantiate` which is slower. Original error:\n",t)}const e=await _.arrayBuffer();return await WebAssembly.instantiate(e,t)}{const e=await WebAssembly.instantiate(_,t);return e instanceof WebAssembly.Instance?{instance:e,module:_}:e}}function F(){const _={wbg:{}};return _.wbg.__wbindgen_object_drop_ref=function(_){a(_)},_.wbg.__wbg_new_71801a555ad9f2aa=function(){return S((function(){return g(new XMLHttpRequest)}),arguments)},_.wbg.__wbg_overrideMimeType_ee9c51919ceb418b=function(){return S((function(_,t,e){i(_).overrideMimeType(c(t,e))}),arguments)},_.wbg.__wbg_open_c9eb0cf2c9d95679=function(){return S((function(_,t,e,r,n,o){i(_).open(c(t,e),c(r,n),0!==o)}),arguments)},_.wbg.__wbg_send_80d29985093c1ec5=function(){return S((function(_){i(_).send()}),arguments)},_.wbg.__wbg_response_7c2e2759084f7279=function(){return S((function(_){return g(i(_).response)}),arguments)},_.wbg.__wbg_status_d485fb5a478426fb=function(){return S((function(_){return i(_).status}),arguments)},_.wbg.__wbg_new_72fb9a18b5ae2624=function(){return g(new Object)},_.wbg.__wbindgen_string_new=function(_,t){return g(c(_,t))},_.wbg.__wbg_set_1f9b04f170055d33=function(){return S((function(_,t,e){return Reflect.set(i(_),i(t),i(e))}),arguments)},_.wbg.__wbg_new_ab6fd82b10560829=function(){return S((function(){return g(new Headers)}),arguments)},_.wbg.__wbindgen_object_clone_ref=function(_){return g(i(_))},_.wbg.__wbg_new_0d76b0581eca6298=function(){return S((function(){return g(new AbortController)}),arguments)},_.wbg.__wbg_signal_a61f78a3478fd9bc=function(_){return g(i(_).signal)},_.wbg.__wbg_append_7bfcb4937d1d5e29=function(){return S((function(_,t,e,r,n){i(_).append(c(t,e),c(r,n))}),arguments)},_.wbg.__wbg_instanceof_Response_849eb93e75734b6e=function(_){let t;try{t=i(_)instanceof Response}catch(_){t=!1}return t},_.wbg.__wbg_status_61a01141acd3cf74=function(_){return i(_).status},_.wbg.__wbg_url_5f6dc4009ac5f99d=function(_,t){const e=w(i(t).url,K.__wbindgen_malloc,K.__wbindgen_realloc),r=U;b()[_/4+1]=r,b()[_/4+0]=e},_.wbg.__wbg_headers_9620bfada380764a=function(_){return g(i(_).headers)},_.wbg.__wbg_iterator_2cee6dadfd956dfa=function(){return g(Symbol.iterator)},_.wbg.__wbg_get_e3c254076557e348=function(){return S((function(_,t){return g(Reflect.get(i(_),i(t)))}),arguments)},_.wbg.__wbindgen_is_function=function(_){return"function"==typeof i(_)},_.wbg.__wbg_call_27c0f87801dedf93=function(){return S((function(_,t){return g(i(_).call(i(t)))}),arguments)},_.wbg.__wbindgen_is_object=function(_){const t=i(_);return"object"==typeof t&&null!==t},_.wbg.__wbg_next_40fc327bfc8770e6=function(_){return g(i(_).next)},_.wbg.__wbg_next_196c84450b364254=function(){return S((function(_){return g(i(_).next())}),arguments)},_.wbg.__wbg_done_298b57d23c0fc80c=function(_){return i(_).done},_.wbg.__wbg_value_d93c65011f51a456=function(_){return g(i(_).value)},_.wbg.__wbg_abort_2aa7521d5690750e=function(_){i(_).abort()},_.wbg.__wbg_stringify_8887fe74e1c50d81=function(){return S((function(_){return g(JSON.stringify(i(_)))}),arguments)},_.wbg.__wbindgen_string_get=function(_,t){const e=i(t),r="string"==typeof e?e:void 0;var n=d(r)?0:w(r,K.__wbindgen_malloc,K.__wbindgen_realloc),o=U;b()[_/4+1]=o,b()[_/4+0]=n},_.wbg.__wbg_log_0159ca40cddf5b15=function(_,t){console.log(c(_,t))},_.wbg.__wbindgen_bigint_from_u64=function(_){return g(BigInt.asUintN(64,_))},_.wbg.__wbg_call_b3ca7c6051f9bec1=function(){return S((function(_,t,e){return g(i(_).call(i(t),i(e)))}),arguments)},_.wbg.__wbg_keypair_new=function(_){return g(__.__wrap(_))},_.wbg.__wbindgen_module=function(){return g(A.__wbindgen_wasm_module)},_.wbg.__wbindgen_memory=function(){return g(K.memory)},_.wbg.__wbg_spawnWorker_f6acaddb2e29dc4a=function(_,t,e,r){return g(n(i(_),i(t),i(e),r>>>0))},_.wbg.__wbg_executionresponse_new=function(_){return g(X.__wrap(_))},_.wbg.__wbg_transaction_new=function(_){return g(k_.__wrap(_))},_.wbg.__wbg_newwithlength_66ae46612e7f0234=function(_){return g(new Array(_>>>0))},_.wbg.__wbg_set_d4638f722068f043=function(_,t,e){i(_)[t>>>0]=a(e)},_.wbg.__wbindgen_cb_drop=function(_){const t=a(_).original;if(1==t.cnt--)return t.a=0,!0;return!1},_.wbg.__wbg_new_16b304a2cfa7ff4a=function(){return g(new Array)},_.wbg.__wbg_push_a5b05aedc7234f9f=function(_,t){return i(_).push(i(t))},_.wbg.__wbg_arrayBuffer_29931d52c7206b02=function(){return S((function(_){return g(i(_).arrayBuffer())}),arguments)},_.wbg.__wbg_new_63b92bc8671ed464=function(_){return g(new Uint8Array(i(_)))},_.wbg.__wbg_length_c20a40f15020d68a=function(_){return i(_).length},_.wbg.__wbg_new_81740750da40724f=function(_,t){try{var e={a:_,b:t};const r=new Promise(((_,t)=>{const r=e.a;e.a=0;try{return x(r,e.b,_,t)}finally{e.a=r}}));return g(r)}finally{e.a=e.b=0}},_.wbg.__wbindgen_number_new=function(_){return g(_)},_.wbg.__wbg_new_abda76e883ba8a5f=function(){return g(new Error)},_.wbg.__wbg_stack_658279fe44541cf6=function(_,t){const e=w(i(t).stack,K.__wbindgen_malloc,K.__wbindgen_realloc),r=U;b()[_/4+1]=r,b()[_/4+0]=e},_.wbg.__wbg_error_f851667af71bcfc6=function(_,t){let e,r;try{e=_,r=t,console.error(c(_,t))}finally{K.__wbindgen_free(e,r,1)}},_.wbg.__wbg_buffer_12d079cc21e14bdb=function(_){return g(i(_).buffer)},_.wbg.__wbg_newwithbyteoffsetandlength_aa4a17c33a06e5cb=function(_,t,e){return g(new Uint8Array(i(_),t>>>0,e>>>0))},_.wbg.__wbg_randomFillSync_5c9c955aa56b6049=function(){return S((function(_,t){i(_).randomFillSync(a(t))}),arguments)},_.wbg.__wbg_subarray_a1f73cd4b5b42fe1=function(_,t,e){return g(i(_).subarray(t>>>0,e>>>0))},_.wbg.__wbg_getRandomValues_3aa56aa6edec874c=function(){return S((function(_,t){i(_).getRandomValues(i(t))}),arguments)},_.wbg.__wbg_set_a47bac70306a19a7=function(_,t,e){i(_).set(i(t),e>>>0)},_.wbg.__wbg_crypto_1d1f22824a6a080c=function(_){return g(i(_).crypto)},_.wbg.__wbg_process_4a72847cc503995b=function(_){return g(i(_).process)},_.wbg.__wbg_versions_f686565e586dd935=function(_){return g(i(_).versions)},_.wbg.__wbg_node_104a2ff8d6ea03a2=function(_){return g(i(_).node)},_.wbg.__wbindgen_is_string=function(_){return"string"==typeof i(_)},_.wbg.__wbg_require_cca90b1a94a0255b=function(){return S((function(){return g(module.require)}),arguments)},_.wbg.__wbg_msCrypto_eb05e62b530a1508=function(_){return g(i(_).msCrypto)},_.wbg.__wbg_newwithlength_e9b4878cebadb3d3=function(_){return g(new Uint8Array(_>>>0))},_.wbg.__wbg_length_cd7af8117672b8b8=function(_){return i(_).length},_.wbg.__wbg_get_bd8e338fbd5f5cc8=function(_,t){return g(i(_)[t>>>0])},_.wbg.__wbg_self_ce0dbfc45cf2f5be=function(){return S((function(){return g(self.self)}),arguments)},_.wbg.__wbg_window_c6fb939a7f436783=function(){return S((function(){return g(window.window)}),arguments)},_.wbg.__wbg_globalThis_d1e6af4856ba331b=function(){return S((function(){return g(globalThis.globalThis)}),arguments)},_.wbg.__wbg_global_207b558942527489=function(){return S((function(){return g(global.global)}),arguments)},_.wbg.__wbindgen_is_undefined=function(_){return void 0===i(_)},_.wbg.__wbg_newnoargs_e258087cd0daa0ea=function(_,t){return g(new Function(c(_,t)))},_.wbg.__wbg_has_0af94d20077affa2=function(){return S((function(_,t){return Reflect.has(i(_),i(t))}),arguments)},_.wbg.__wbg_fetch_bc7c8e27076a5c84=function(_){return g(fetch(i(_)))},_.wbg.__wbg_fetch_921fad6ef9e883dd=function(_,t){return g(i(_).fetch(i(t)))},_.wbg.__wbindgen_debug_string=function(_,t){const e=w(l(i(t)),K.__wbindgen_malloc,K.__wbindgen_realloc),r=U;b()[_/4+1]=r,b()[_/4+0]=e},_.wbg.__wbindgen_throw=function(_,t){throw new Error(c(_,t))},_.wbg.__wbindgen_rethrow=function(_){throw a(_)},_.wbg.__wbg_then_a73caa9a87991566=function(_,t,e){return g(i(_).then(i(t),i(e)))},_.wbg.__wbg_then_0c86a60e8fcfe9f6=function(_,t){return g(i(_).then(i(t)))},_.wbg.__wbg_queueMicrotask_481971b0d87f3dd4=function(_){queueMicrotask(i(_))},_.wbg.__wbg_queueMicrotask_3cbae2ec6b6cd3d6=function(_){return g(i(_).queueMicrotask)},_.wbg.__wbg_resolve_b0083a7967828ec8=function(_){return g(Promise.resolve(i(_)))},_.wbg.__wbg_waitAsync_5d743fc9058ba01a=function(){return g(Atomics.waitAsync)},_.wbg.__wbg_new_8cccba86b0f574cb=function(_){return g(new Int32Array(i(_)))},_.wbg.__wbg_waitAsync_46d5c36955b71a79=function(_,t,e){return g(Atomics.waitAsync(i(_),t,e))},_.wbg.__wbg_async_19c0400d97cc72fe=function(_){return i(_).async},_.wbg.__wbg_value_571d60108110e917=function(_){return g(i(_).value)},_.wbg.__wbindgen_link_fc1eedd35dc7e0a6=function(_){const t=w("data:application/javascript,"+encodeURIComponent("onmessage = function (ev) {\n let [ia, index, value] = ev.data;\n ia = new Int32Array(ia.buffer);\n let result = Atomics.wait(ia, index, value);\n postMessage(result);\n };\n "),K.__wbindgen_malloc,K.__wbindgen_realloc),e=U;b()[_/4+1]=e,b()[_/4+0]=t},_.wbg.__wbg_new_d1187ae36d662ef9=function(){return S((function(_,t){return g(new Worker(c(_,t)))}),arguments)},_.wbg.__wbg_setonmessage_503809e5bb51bd33=function(_,t){i(_).onmessage=i(t)},_.wbg.__wbg_of_6a70eed8d41f469c=function(_,t,e){return g(Array.of(i(_),i(t),i(e)))},_.wbg.__wbg_postMessage_7380d10e8b8269df=function(){return S((function(_,t){i(_).postMessage(i(t))}),arguments)},_.wbg.__wbg_data_3ce7c145ca4fbcdc=function(_){return g(i(_).data)},_.wbg.__wbg_newwithstrandinit_3fd6fba4083ff2d0=function(){return S((function(_,t,e){return g(new Request(c(_,t),i(e)))}),arguments)},_.wbg.__wbg_responseText_c67ed2d48db10769=function(){return S((function(_,t){const e=i(t).responseText;var r=d(e)?0:w(e,K.__wbindgen_malloc,K.__wbindgen_realloc),n=U;b()[_/4+1]=n,b()[_/4+0]=r}),arguments)},_.wbg.__wbindgen_closure_wrapper5763=function(_,t,e){return g(u(_,t,538,f))},_.wbg.__wbindgen_closure_wrapper5788=function(_,t,e){return g(u(_,t,538,f))},_}function T(_,t){_.wbg.memory=t||new WebAssembly.Memory({initial:25,maximum:65536,shared:!0})}function R(_,t){return K=_.exports,A.__wbindgen_wasm_module=t,N=null,W=null,B=null,K.__wbindgen_start(),K}function z(_,t){if(void 0!==K)return K;const e=F();T(e,t),_ instanceof WebAssembly.Module||(_=new WebAssembly.Module(_));return R(new WebAssembly.Instance(_,e),_)}async function A(_,t){if(void 0!==K)return K;const e=F();("string"==typeof _||"function"==typeof Request&&_ instanceof Request||"function"==typeof URL&&_ instanceof URL)&&(_=fetch(_)),T(e,t);const{instance:r,module:n}=await V(await _,e);return R(r,n)}var O=Object.freeze({__proto__:null,Address:J,Execution:H,ExecutionResponse:X,Field:G,KeyPair:__,Metadata:e_,OfflineQuery:n_,PrivateKey:o_,PrivateKeyCiphertext:s_,Program:g_,ProgramManager:d_,ProvingKey:l_,RecordCiphertext:f_,RecordPlaintext:y_,Signature:h_,Transaction:k_,VerifyingKey:S_,ViewKey:V_,default:A,initSync:z,initThreadPool:P,runRayonThread:k,verifyFunctionExecution:m});const F_="assets/aleo_wasm.wasm";const{initThreadPool:T_,Address:R_,Execution:z_,ExecutionResponse:A_,Field:O_,Metadata:j_,OfflineQuery:K_,Private:C_,PrivateKey:E_,PrivateKeyCiphertext:M_,Program:B_,ProvingKey:U_,RecordCiphertext:I_,RecordPlaintext:q_,ProgramManager:W_,Signature:$_,Transaction:N_,ViewKey:D_,VerifyingKey:J_,verifyFunctionExecution:L_}=await(async(_={})=>{let{importHook:t,serverPath:e,initializeHook:r}=_,n=F_;return null!=e&&(n=e+/[^\/\\]*$/.exec(n)[0]),null!=t&&(n=t(n)),null!=r?await r(A,n):await A(n),O})({importHook:()=>new URL(e(4494),e.b)});async function j(_){null==_&&(_=navigator.hardwareConcurrency),console.info(`Spawning ${_} threads`),await T_(new URL(e(3645),e.b),_)}r()}catch(H_){r(H_)}}),1)}}]); +//# sourceMappingURL=511.bundle.js.map \ No newline at end of file diff --git a/511.bundle.js.map b/511.bundle.js.map new file mode 100644 index 000000000..eefe12c56 --- /dev/null +++ b/511.bundle.js.map @@ -0,0 +1 @@ +{"version":3,"file":"511.bundle.js","mappings":"wOAAA,SAASA,EAAYC,EAAKC,EAAQC,EAAQC,GAClC,OAAO,IAAIC,SAASC,IAChB,MAAMC,EAAS,IAAIC,OAAOP,EAAK,CAC3BQ,KAAM,WAGVF,EAAOG,iBAAiB,WAAYC,IAGhCC,YAAW,KACPN,EAAQC,GAIJA,EAAOM,OACPN,EAAOM,OAC/B,GACmB,EAAE,GACN,CACCC,SAAS,EACTC,M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iBjB,OAfkB,MAAdK,IACAE,EAAaF,EAAa,YAAY9qB,KAAKgrB,GAAY,IAGzC,MAAdH,IACAG,EAAaH,EAAWG,IAGN,MAAlBD,QACMA,EAAe7H,EAAY8H,SAG3B9H,EAAW8H,GAGdpB,CAAO,ECt6IpBqB,CAAK,CACXJ,WAAYA,IACD,IAAIZ,IAAI,eAIvBtL,eAAe/a,EAAesnB,GACX,MAAXA,IACAA,EAAUC,UAAUC,qBAGxBnM,QAAQoM,KAAM,YAAWH,mBAEnBR,GAAmB,IAAIT,IAAI,aAA+BiB,EACpE,C","sources":["webpack://aleo-website/wasm.js","webpack://aleo-website/../js/index.js"],"sourcesContent":["function spawnWorker(url, module, memory, address) {\n return new Promise((resolve) => {\n const worker = new Worker(url, {\n type: \"module\",\n });\n\n worker.addEventListener(\"message\", (event) => {\n // This is needed in Node to wait one extra tick, so that way\n // the Worker can fully initialize before we return.\n setTimeout(() => {\n resolve(worker);\n\n // When running in Node, this allows the process to exit\n // even though the Worker is still running.\n if (worker.unref) {\n worker.unref();\n }\n }, 0);\n }, {\n capture: true,\n once: true,\n });\n\n worker.postMessage({\n module,\n memory,\n address,\n });\n });\n }\n\nlet wasm;\n\nconst heap = new Array(128).fill(undefined);\n\nheap.push(undefined, null, true, false);\n\nfunction getObject(idx) { return heap[idx]; }\n\nlet heap_next = heap.length;\n\nfunction dropObject(idx) {\n if (idx < 132) return;\n heap[idx] = heap_next;\n heap_next = idx;\n}\n\nfunction takeObject(idx) {\n const ret = getObject(idx);\n dropObject(idx);\n return ret;\n}\n\nconst cachedTextDecoder = (typeof TextDecoder !== 'undefined' ? new TextDecoder('utf-8', { ignoreBOM: true, fatal: true }) : { decode: () => { throw Error('TextDecoder not available') } } );\n\nif (typeof TextDecoder !== 'undefined') { cachedTextDecoder.decode(); }\nlet cachedUint8Memory0 = null;\n\nfunction getUint8Memory0() {\n if (cachedUint8Memory0 === null || cachedUint8Memory0.buffer !== wasm.memory.buffer) {\n cachedUint8Memory0 = new Uint8Array(wasm.memory.buffer);\n }\n return cachedUint8Memory0;\n}\n\nfunction getStringFromWasm0(ptr, len) {\n ptr = ptr >>> 0;\n return cachedTextDecoder.decode(getUint8Memory0().slice(ptr, ptr + len));\n}\n\nfunction addHeapObject(obj) {\n if (heap_next === heap.length) heap.push(heap.length + 1);\n const idx = heap_next;\n heap_next = heap[idx];\n\n heap[idx] = obj;\n return idx;\n}\n\nlet WASM_VECTOR_LEN = 0;\n\nconst cachedTextEncoder = (typeof TextEncoder !== 'undefined' ? new TextEncoder('utf-8') : { encode: () => { throw Error('TextEncoder not available') } } );\n\nconst encodeString = function (arg, view) {\n const buf = cachedTextEncoder.encode(arg);\n view.set(buf);\n return {\n read: arg.length,\n written: buf.length\n };\n};\n\nfunction passStringToWasm0(arg, malloc, realloc) {\n\n if (realloc === undefined) {\n const buf = cachedTextEncoder.encode(arg);\n const ptr = malloc(buf.length, 1) >>> 0;\n getUint8Memory0().subarray(ptr, ptr + buf.length).set(buf);\n WASM_VECTOR_LEN = buf.length;\n return ptr;\n }\n\n let len = arg.length;\n let ptr = malloc(len, 1) >>> 0;\n\n const mem = getUint8Memory0();\n\n let offset = 0;\n\n for (; offset < len; offset++) {\n const code = arg.charCodeAt(offset);\n if (code > 0x7F) break;\n mem[ptr + offset] = code;\n }\n\n if (offset !== len) {\n if (offset !== 0) {\n arg = arg.slice(offset);\n }\n ptr = realloc(ptr, len, len = offset + arg.length * 3, 1) >>> 0;\n const view = getUint8Memory0().subarray(ptr + offset, ptr + len);\n const ret = encodeString(arg, view);\n\n offset += ret.written;\n ptr = realloc(ptr, len, offset, 1) >>> 0;\n }\n\n WASM_VECTOR_LEN = offset;\n return ptr;\n}\n\nfunction isLikeNone(x) {\n return x === undefined || x === null;\n}\n\nlet cachedInt32Memory0 = null;\n\nfunction getInt32Memory0() {\n if (cachedInt32Memory0 === null || cachedInt32Memory0.buffer !== wasm.memory.buffer) {\n cachedInt32Memory0 = new Int32Array(wasm.memory.buffer);\n }\n return cachedInt32Memory0;\n}\n\nfunction debugString(val) {\n // primitive types\n const type = typeof val;\n if (type == 'number' || type == 'boolean' || val == null) {\n return `${val}`;\n }\n if (type == 'string') {\n return `\"${val}\"`;\n }\n if (type == 'symbol') {\n const description = val.description;\n if (description == null) {\n return 'Symbol';\n } else {\n return `Symbol(${description})`;\n }\n }\n if (type == 'function') {\n const name = val.name;\n if (typeof name == 'string' && name.length > 0) {\n return `Function(${name})`;\n } else {\n return 'Function';\n }\n }\n // objects\n if (Array.isArray(val)) {\n const length = val.length;\n let debug = '[';\n if (length > 0) {\n debug += debugString(val[0]);\n }\n for(let i = 1; i < length; i++) {\n debug += ', ' + debugString(val[i]);\n }\n debug += ']';\n return debug;\n }\n // Test for built-in\n const builtInMatches = /\\[object ([^\\]]+)\\]/.exec(toString.call(val));\n let className;\n if (builtInMatches.length > 1) {\n className = builtInMatches[1];\n } else {\n // Failed to match the standard '[object ClassName]'\n return toString.call(val);\n }\n if (className == 'Object') {\n // we're a user defined class or Object\n // JSON.stringify avoids problems with cycles, and is generally much\n // easier than looping through ownProperties of `val`.\n try {\n return 'Object(' + JSON.stringify(val) + ')';\n } catch (_) {\n return 'Object';\n }\n }\n // errors\n if (val instanceof Error) {\n return `${val.name}: ${val.message}\\n${val.stack}`;\n }\n // TODO we could test for more things here, like `Set`s and `Map`s.\n return className;\n}\n\nconst CLOSURE_DTORS = (typeof FinalizationRegistry === 'undefined')\n ? { register: () => {}, unregister: () => {} }\n : new FinalizationRegistry(state => {\n wasm.__wbindgen_export_3.get(state.dtor)(state.a, state.b);\n});\n\nfunction makeMutClosure(arg0, arg1, dtor, f) {\n const state = { a: arg0, b: arg1, cnt: 1, dtor };\n const real = (...args) => {\n // First up with a closure we increment the internal reference\n // count. This ensures that the Rust closure environment won't\n // be deallocated while we're invoking it.\n state.cnt++;\n const a = state.a;\n state.a = 0;\n try {\n return f(a, state.b, ...args);\n } finally {\n if (--state.cnt === 0) {\n wasm.__wbindgen_export_3.get(state.dtor)(a, state.b);\n CLOSURE_DTORS.unregister(state);\n } else {\n state.a = a;\n }\n }\n };\n real.original = state;\n CLOSURE_DTORS.register(real, state, state);\n return real;\n}\nfunction __wbg_adapter_34(arg0, arg1, arg2) {\n wasm._dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h442b5e922f6f9710(arg0, arg1, addHeapObject(arg2));\n}\n\nfunction _assertClass(instance, klass) {\n if (!(instance instanceof klass)) {\n throw new Error(`expected instance of ${klass.name}`);\n }\n return instance.ptr;\n}\n\nfunction passArray8ToWasm0(arg, malloc) {\n const ptr = malloc(arg.length * 1, 1) >>> 0;\n getUint8Memory0().set(arg, ptr / 1);\n WASM_VECTOR_LEN = arg.length;\n return ptr;\n}\n/**\n* Verify an execution with a single function and a single transition. Executions with multiple\n* transitions or functions will fail to verify. Also, this does not verify that the state root of\n* the execution is included in the Aleo Network ledger.\n*\n* @param {Execution} execution The function execution to verify\n* @param {VerifyingKey} verifying_key The verifying key for the function\n* @param {Program} program The program that the function execution belongs to\n* @param {String} function_id The name of the function that was executed\n* @returns {boolean} True if the execution is valid, false otherwise\n* @param {Execution} execution\n* @param {VerifyingKey} verifying_key\n* @param {Program} program\n* @param {string} function_id\n* @returns {boolean}\n*/\nfunction verifyFunctionExecution(execution, verifying_key, program, function_id) {\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n _assertClass(execution, Execution);\n _assertClass(verifying_key, VerifyingKey);\n _assertClass(program, Program);\n const ptr0 = passStringToWasm0(function_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n wasm.verifyFunctionExecution(retptr, execution.__wbg_ptr, verifying_key.__wbg_ptr, program.__wbg_ptr, ptr0, len0);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n var r2 = getInt32Memory0()[retptr / 4 + 2];\n if (r2) {\n throw takeObject(r1);\n }\n return r0 !== 0;\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n }\n}\n\nlet cachedBigInt64Memory0 = null;\n\nfunction getBigInt64Memory0() {\n if (cachedBigInt64Memory0 === null || cachedBigInt64Memory0.buffer !== wasm.memory.buffer) {\n cachedBigInt64Memory0 = new BigInt64Array(wasm.memory.buffer);\n }\n return cachedBigInt64Memory0;\n}\n\nfunction getArrayU8FromWasm0(ptr, len) {\n ptr = ptr >>> 0;\n return getUint8Memory0().subarray(ptr / 1, ptr / 1 + len);\n}\n/**\n* @param {number} receiver\n*/\nfunction runRayonThread(receiver) {\n wasm.runRayonThread(receiver);\n}\n\n/**\n* @param {URL} url\n* @param {number} num_threads\n* @returns {Promise}\n*/\nfunction initThreadPool(url, num_threads) {\n const ret = wasm.initThreadPool(addHeapObject(url), num_threads);\n return takeObject(ret);\n}\n\nfunction handleError(f, args) {\n try {\n return f.apply(this, args);\n } catch (e) {\n wasm.__wbindgen_exn_store(addHeapObject(e));\n }\n}\nfunction __wbg_adapter_279(arg0, arg1, arg2, arg3) {\n wasm.wasm_bindgen__convert__closures__invoke2_mut__h5ab12ffe4b82d47a(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));\n}\n\nconst AddressFinalization = (typeof FinalizationRegistry === 'undefined')\n ? { register: () => {}, unregister: () => {} }\n : new FinalizationRegistry(ptr => wasm.__wbg_address_free(ptr >>> 0));\n/**\n* Public address of an Aleo account\n*/\nclass Address {\n\n static __wrap(ptr) {\n ptr = ptr >>> 0;\n const obj = Object.create(Address.prototype);\n obj.__wbg_ptr = ptr;\n AddressFinalization.register(obj, obj.__wbg_ptr, obj);\n return obj;\n }\n\n __destroy_into_raw() {\n const ptr = this.__wbg_ptr;\n this.__wbg_ptr = 0;\n AddressFinalization.unregister(this);\n return ptr;\n }\n\n free() {\n const ptr = this.__destroy_into_raw();\n wasm.__wbg_address_free(ptr);\n }\n /**\n * Derive an Aleo address from a private key\n *\n * @param {PrivateKey} private_key The private key to derive the address from\n * @returns {Address} Address corresponding to the private key\n * @param {PrivateKey} private_key\n * @returns {Address}\n */\n static from_private_key(private_key) {\n _assertClass(private_key, PrivateKey);\n const ret = wasm.address_from_private_key(private_key.__wbg_ptr);\n return Address.__wrap(ret);\n }\n /**\n * Derive an Aleo address from a view key\n *\n * @param {ViewKey} view_key The view key to derive the address from\n * @returns {Address} Address corresponding to the view key\n * @param {ViewKey} view_key\n * @returns {Address}\n */\n static from_view_key(view_key) {\n _assertClass(view_key, ViewKey);\n const ret = wasm.address_from_view_key(view_key.__wbg_ptr);\n return Address.__wrap(ret);\n }\n /**\n * Create an aleo address object from a string representation of an address\n *\n * @param {string} address String representation of an addressm\n * @returns {Address} Address\n * @param {string} address\n * @returns {Address}\n */\n static from_string(address) {\n const ptr0 = passStringToWasm0(address, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n const ret = wasm.address_from_string(ptr0, len0);\n return Address.__wrap(ret);\n }\n /**\n * Get a string representation of an Aleo address object\n *\n * @param {Address} Address\n * @returns {string} String representation of the address\n * @returns {string}\n */\n to_string() {\n let deferred1_0;\n let deferred1_1;\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n wasm.address_to_string(retptr, this.__wbg_ptr);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n deferred1_0 = r0;\n deferred1_1 = r1;\n return getStringFromWasm0(r0, r1);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);\n }\n }\n /**\n * Verify a signature for a message signed by the address\n *\n * @param {Uint8Array} Byte array representing a message signed by the address\n * @returns {boolean} Boolean representing whether or not the signature is valid\n * @param {Uint8Array} message\n * @param {Signature} signature\n * @returns {boolean}\n */\n verify(message, signature) {\n const ptr0 = passArray8ToWasm0(message, wasm.__wbindgen_malloc);\n const len0 = WASM_VECTOR_LEN;\n _assertClass(signature, Signature);\n const ret = wasm.address_verify(this.__wbg_ptr, ptr0, len0, signature.__wbg_ptr);\n return ret !== 0;\n }\n}\n\nconst ExecutionFinalization = (typeof FinalizationRegistry === 'undefined')\n ? { register: () => {}, unregister: () => {} }\n : new FinalizationRegistry(ptr => wasm.__wbg_execution_free(ptr >>> 0));\n/**\n* Execution of an Aleo program.\n*/\nclass Execution {\n\n static __wrap(ptr) {\n ptr = ptr >>> 0;\n const obj = Object.create(Execution.prototype);\n obj.__wbg_ptr = ptr;\n ExecutionFinalization.register(obj, obj.__wbg_ptr, obj);\n return obj;\n }\n\n __destroy_into_raw() {\n const ptr = this.__wbg_ptr;\n this.__wbg_ptr = 0;\n ExecutionFinalization.unregister(this);\n return ptr;\n }\n\n free() {\n const ptr = this.__destroy_into_raw();\n wasm.__wbg_execution_free(ptr);\n }\n /**\n * Returns the string representation of the execution.\n * @returns {string}\n */\n toString() {\n let deferred1_0;\n let deferred1_1;\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n wasm.execution_toString(retptr, this.__wbg_ptr);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n deferred1_0 = r0;\n deferred1_1 = r1;\n return getStringFromWasm0(r0, r1);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);\n }\n }\n /**\n * Creates an execution object from a string representation of an execution.\n * @param {string} execution\n * @returns {Execution}\n */\n static fromString(execution) {\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n const ptr0 = passStringToWasm0(execution, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n wasm.execution_fromString(retptr, ptr0, len0);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n var r2 = getInt32Memory0()[retptr / 4 + 2];\n if (r2) {\n throw takeObject(r1);\n }\n return Execution.__wrap(r0);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n }\n }\n}\n\nconst ExecutionResponseFinalization = (typeof FinalizationRegistry === 'undefined')\n ? { register: () => {}, unregister: () => {} }\n : new FinalizationRegistry(ptr => wasm.__wbg_executionresponse_free(ptr >>> 0));\n/**\n* Webassembly Representation of an Aleo function execution response\n*\n* This object is returned by the execution of an Aleo function off-chain. It provides methods for\n* retrieving the outputs of the function execution.\n*/\nclass ExecutionResponse {\n\n static __wrap(ptr) {\n ptr = ptr >>> 0;\n const obj = Object.create(ExecutionResponse.prototype);\n obj.__wbg_ptr = ptr;\n ExecutionResponseFinalization.register(obj, obj.__wbg_ptr, obj);\n return obj;\n }\n\n __destroy_into_raw() {\n const ptr = this.__wbg_ptr;\n this.__wbg_ptr = 0;\n ExecutionResponseFinalization.unregister(this);\n return ptr;\n }\n\n free() {\n const ptr = this.__destroy_into_raw();\n wasm.__wbg_executionresponse_free(ptr);\n }\n /**\n * Get the outputs of the executed function\n *\n * @returns {Array} Array of strings representing the outputs of the function\n * @returns {Array}\n */\n getOutputs() {\n const ret = wasm.executionresponse_getOutputs(this.__wbg_ptr);\n return takeObject(ret);\n }\n /**\n * Returns the execution object if present, null if otherwise.\n *\n * @returns {Execution | undefined} The execution object if present, null if otherwise\n * @returns {Execution | undefined}\n */\n getExecution() {\n const ret = wasm.executionresponse_getExecution(this.__wbg_ptr);\n return ret === 0 ? undefined : Execution.__wrap(ret);\n }\n /**\n * Returns the program keys if present\n * @returns {KeyPair}\n */\n getKeys() {\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n wasm.executionresponse_getKeys(retptr, this.__wbg_ptr);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n var r2 = getInt32Memory0()[retptr / 4 + 2];\n if (r2) {\n throw takeObject(r1);\n }\n return KeyPair.__wrap(r0);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n }\n }\n /**\n * Returns the proving_key if the proving key was cached in the Execution response.\n * Note the proving key is removed from the response object after the first call to this\n * function. Subsequent calls will return null.\n *\n * @returns {ProvingKey | undefined} The proving key\n * @returns {ProvingKey | undefined}\n */\n getProvingKey() {\n const ret = wasm.executionresponse_getProvingKey(this.__wbg_ptr);\n return ret === 0 ? undefined : ProvingKey.__wrap(ret);\n }\n /**\n * Returns the verifying_key associated with the program\n *\n * @returns {VerifyingKey} The verifying key\n * @returns {VerifyingKey}\n */\n getVerifyingKey() {\n const ret = wasm.executionresponse_getVerifyingKey(this.__wbg_ptr);\n return VerifyingKey.__wrap(ret);\n }\n /**\n * Returns the function identifier\n * @returns {string}\n */\n getFunctionId() {\n let deferred1_0;\n let deferred1_1;\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n wasm.executionresponse_getFunctionId(retptr, this.__wbg_ptr);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n deferred1_0 = r0;\n deferred1_1 = r1;\n return getStringFromWasm0(r0, r1);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);\n }\n }\n /**\n * Returns the program\n * @returns {Program}\n */\n getProgram() {\n const ret = wasm.executionresponse_getProgram(this.__wbg_ptr);\n return Program.__wrap(ret);\n }\n}\n\nconst FieldFinalization = (typeof FinalizationRegistry === 'undefined')\n ? { register: () => {}, unregister: () => {} }\n : new FinalizationRegistry(ptr => wasm.__wbg_field_free(ptr >>> 0));\n/**\n*/\nclass Field {\n\n static __wrap(ptr) {\n ptr = ptr >>> 0;\n const obj = Object.create(Field.prototype);\n obj.__wbg_ptr = ptr;\n FieldFinalization.register(obj, obj.__wbg_ptr, obj);\n return obj;\n }\n\n __destroy_into_raw() {\n const ptr = this.__wbg_ptr;\n this.__wbg_ptr = 0;\n FieldFinalization.unregister(this);\n return ptr;\n }\n\n free() {\n const ptr = this.__destroy_into_raw();\n wasm.__wbg_field_free(ptr);\n }\n /**\n * @returns {string}\n */\n toString() {\n let deferred1_0;\n let deferred1_1;\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n wasm.field_toString(retptr, this.__wbg_ptr);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n deferred1_0 = r0;\n deferred1_1 = r1;\n return getStringFromWasm0(r0, r1);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);\n }\n }\n /**\n * @param {string} field\n * @returns {Field}\n */\n static fromString(field) {\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n const ptr0 = passStringToWasm0(field, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n wasm.field_fromString(retptr, ptr0, len0);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n var r2 = getInt32Memory0()[retptr / 4 + 2];\n if (r2) {\n throw takeObject(r1);\n }\n return Field.__wrap(r0);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n }\n }\n}\n\nconst KeyPairFinalization = (typeof FinalizationRegistry === 'undefined')\n ? { register: () => {}, unregister: () => {} }\n : new FinalizationRegistry(ptr => wasm.__wbg_keypair_free(ptr >>> 0));\n/**\n* Key pair object containing both the function proving and verifying keys\n*/\nclass KeyPair {\n\n static __wrap(ptr) {\n ptr = ptr >>> 0;\n const obj = Object.create(KeyPair.prototype);\n obj.__wbg_ptr = ptr;\n KeyPairFinalization.register(obj, obj.__wbg_ptr, obj);\n return obj;\n }\n\n __destroy_into_raw() {\n const ptr = this.__wbg_ptr;\n this.__wbg_ptr = 0;\n KeyPairFinalization.unregister(this);\n return ptr;\n }\n\n free() {\n const ptr = this.__destroy_into_raw();\n wasm.__wbg_keypair_free(ptr);\n }\n /**\n * Create new key pair from proving and verifying keys\n *\n * @param {ProvingKey} proving_key Proving key corresponding to a function in an Aleo program\n * @param {VerifyingKey} verifying_key Verifying key corresponding to a function in an Aleo program\n * @returns {KeyPair} Key pair object containing both the function proving and verifying keys\n * @param {ProvingKey} proving_key\n * @param {VerifyingKey} verifying_key\n */\n constructor(proving_key, verifying_key) {\n _assertClass(proving_key, ProvingKey);\n var ptr0 = proving_key.__destroy_into_raw();\n _assertClass(verifying_key, VerifyingKey);\n var ptr1 = verifying_key.__destroy_into_raw();\n const ret = wasm.keypair_new(ptr0, ptr1);\n this.__wbg_ptr = ret >>> 0;\n return this;\n }\n /**\n * Get the proving key. This method will remove the proving key from the key pair\n *\n * @returns {ProvingKey | Error}\n * @returns {ProvingKey}\n */\n provingKey() {\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n wasm.keypair_provingKey(retptr, this.__wbg_ptr);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n var r2 = getInt32Memory0()[retptr / 4 + 2];\n if (r2) {\n throw takeObject(r1);\n }\n return ProvingKey.__wrap(r0);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n }\n }\n /**\n * Get the verifying key. This method will remove the verifying key from the key pair\n *\n * @returns {VerifyingKey | Error}\n * @returns {VerifyingKey}\n */\n verifyingKey() {\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n wasm.keypair_verifyingKey(retptr, this.__wbg_ptr);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n var r2 = getInt32Memory0()[retptr / 4 + 2];\n if (r2) {\n throw takeObject(r1);\n }\n return VerifyingKey.__wrap(r0);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n }\n }\n}\n\nconst MetadataFinalization = (typeof FinalizationRegistry === 'undefined')\n ? { register: () => {}, unregister: () => {} }\n : new FinalizationRegistry(ptr => wasm.__wbg_metadata_free(ptr >>> 0));\n/**\n*/\nclass Metadata {\n\n static __wrap(ptr) {\n ptr = ptr >>> 0;\n const obj = Object.create(Metadata.prototype);\n obj.__wbg_ptr = ptr;\n MetadataFinalization.register(obj, obj.__wbg_ptr, obj);\n return obj;\n }\n\n __destroy_into_raw() {\n const ptr = this.__wbg_ptr;\n this.__wbg_ptr = 0;\n MetadataFinalization.unregister(this);\n return ptr;\n }\n\n free() {\n const ptr = this.__destroy_into_raw();\n wasm.__wbg_metadata_free(ptr);\n }\n /**\n * @returns {string}\n */\n get locator() {\n let deferred1_0;\n let deferred1_1;\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n wasm.__wbg_get_metadata_locator(retptr, this.__wbg_ptr);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n deferred1_0 = r0;\n deferred1_1 = r1;\n return getStringFromWasm0(r0, r1);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);\n }\n }\n /**\n * @param {string} arg0\n */\n set locator(arg0) {\n const ptr0 = passStringToWasm0(arg0, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n wasm.__wbg_set_metadata_locator(this.__wbg_ptr, ptr0, len0);\n }\n /**\n * @returns {string}\n */\n get prover() {\n let deferred1_0;\n let deferred1_1;\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n wasm.__wbg_get_metadata_prover(retptr, this.__wbg_ptr);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n deferred1_0 = r0;\n deferred1_1 = r1;\n return getStringFromWasm0(r0, r1);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);\n }\n }\n /**\n * @param {string} arg0\n */\n set prover(arg0) {\n const ptr0 = passStringToWasm0(arg0, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n wasm.__wbg_set_metadata_prover(this.__wbg_ptr, ptr0, len0);\n }\n /**\n * @returns {string}\n */\n get verifier() {\n let deferred1_0;\n let deferred1_1;\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n wasm.__wbg_get_metadata_verifier(retptr, this.__wbg_ptr);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n deferred1_0 = r0;\n deferred1_1 = r1;\n return getStringFromWasm0(r0, r1);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);\n }\n }\n /**\n * @param {string} arg0\n */\n set verifier(arg0) {\n const ptr0 = passStringToWasm0(arg0, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n wasm.__wbg_set_metadata_verifier(this.__wbg_ptr, ptr0, len0);\n }\n /**\n * @returns {string}\n */\n get verifyingKey() {\n let deferred1_0;\n let deferred1_1;\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n wasm.__wbg_get_metadata_verifyingKey(retptr, this.__wbg_ptr);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n deferred1_0 = r0;\n deferred1_1 = r1;\n return getStringFromWasm0(r0, r1);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);\n }\n }\n /**\n * @param {string} arg0\n */\n set verifyingKey(arg0) {\n const ptr0 = passStringToWasm0(arg0, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n wasm.__wbg_set_metadata_verifyingKey(this.__wbg_ptr, ptr0, len0);\n }\n /**\n * @returns {string}\n */\n static baseUrl() {\n let deferred1_0;\n let deferred1_1;\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n wasm.metadata_baseUrl(retptr);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n deferred1_0 = r0;\n deferred1_1 = r1;\n return getStringFromWasm0(r0, r1);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);\n }\n }\n /**\n * @returns {Metadata}\n */\n static bond_public() {\n const ret = wasm.metadata_bond_public();\n return Metadata.__wrap(ret);\n }\n /**\n * @returns {Metadata}\n */\n static bond_validator() {\n const ret = wasm.metadata_bond_validator();\n return Metadata.__wrap(ret);\n }\n /**\n * @returns {Metadata}\n */\n static claim_unbond_public() {\n const ret = wasm.metadata_claim_unbond_public();\n return Metadata.__wrap(ret);\n }\n /**\n * @returns {Metadata}\n */\n static fee_private() {\n const ret = wasm.metadata_fee_private();\n return Metadata.__wrap(ret);\n }\n /**\n * @returns {Metadata}\n */\n static fee_public() {\n const ret = wasm.metadata_fee_public();\n return Metadata.__wrap(ret);\n }\n /**\n * @returns {Metadata}\n */\n static inclusion() {\n const ret = wasm.metadata_inclusion();\n return Metadata.__wrap(ret);\n }\n /**\n * @returns {Metadata}\n */\n static join() {\n const ret = wasm.metadata_join();\n return Metadata.__wrap(ret);\n }\n /**\n * @returns {Metadata}\n */\n static set_validator_state() {\n const ret = wasm.metadata_set_validator_state();\n return Metadata.__wrap(ret);\n }\n /**\n * @returns {Metadata}\n */\n static split() {\n const ret = wasm.metadata_split();\n return Metadata.__wrap(ret);\n }\n /**\n * @returns {Metadata}\n */\n static transfer_private() {\n const ret = wasm.metadata_transfer_private();\n return Metadata.__wrap(ret);\n }\n /**\n * @returns {Metadata}\n */\n static transfer_private_to_public() {\n const ret = wasm.metadata_transfer_private_to_public();\n return Metadata.__wrap(ret);\n }\n /**\n * @returns {Metadata}\n */\n static transfer_public() {\n const ret = wasm.metadata_transfer_public();\n return Metadata.__wrap(ret);\n }\n /**\n * @returns {Metadata}\n */\n static transfer_public_as_signer() {\n const ret = wasm.metadata_transfer_public_as_signer();\n return Metadata.__wrap(ret);\n }\n /**\n * @returns {Metadata}\n */\n static transfer_public_to_private() {\n const ret = wasm.metadata_transfer_public_to_private();\n return Metadata.__wrap(ret);\n }\n /**\n * @returns {Metadata}\n */\n static unbond_public() {\n const ret = wasm.metadata_unbond_public();\n return Metadata.__wrap(ret);\n }\n}\n\nconst OfflineQueryFinalization = (typeof FinalizationRegistry === 'undefined')\n ? { register: () => {}, unregister: () => {} }\n : new FinalizationRegistry(ptr => wasm.__wbg_offlinequery_free(ptr >>> 0));\n/**\n* An offline query object used to insert the global state root and state paths needed to create\n* a valid inclusion proof offline.\n*/\nclass OfflineQuery {\n\n static __wrap(ptr) {\n ptr = ptr >>> 0;\n const obj = Object.create(OfflineQuery.prototype);\n obj.__wbg_ptr = ptr;\n OfflineQueryFinalization.register(obj, obj.__wbg_ptr, obj);\n return obj;\n }\n\n __destroy_into_raw() {\n const ptr = this.__wbg_ptr;\n this.__wbg_ptr = 0;\n OfflineQueryFinalization.unregister(this);\n return ptr;\n }\n\n free() {\n const ptr = this.__destroy_into_raw();\n wasm.__wbg_offlinequery_free(ptr);\n }\n /**\n * Creates a new offline query object. The state root is required to be passed in as a string\n * @param {string} state_root\n */\n constructor(state_root) {\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n const ptr0 = passStringToWasm0(state_root, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n wasm.offlinequery_new(retptr, ptr0, len0);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n var r2 = getInt32Memory0()[retptr / 4 + 2];\n if (r2) {\n throw takeObject(r1);\n }\n this.__wbg_ptr = r0 >>> 0;\n return this;\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n }\n }\n /**\n * Add a new state path to the offline query object.\n *\n * @param {string} commitment: The commitment corresponding to a record inpout\n * @param {string} state_path: The state path corresponding to the commitment\n * @param {string} commitment\n * @param {string} state_path\n */\n addStatePath(commitment, state_path) {\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n const ptr0 = passStringToWasm0(commitment, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n const ptr1 = passStringToWasm0(state_path, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len1 = WASM_VECTOR_LEN;\n wasm.offlinequery_addStatePath(retptr, this.__wbg_ptr, ptr0, len0, ptr1, len1);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n if (r1) {\n throw takeObject(r0);\n }\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n }\n }\n /**\n * Get a json string representation of the offline query object\n * @returns {string}\n */\n toString() {\n let deferred1_0;\n let deferred1_1;\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n wasm.offlinequery_toString(retptr, this.__wbg_ptr);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n deferred1_0 = r0;\n deferred1_1 = r1;\n return getStringFromWasm0(r0, r1);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);\n }\n }\n /**\n * Create an offline query object from a json string representation\n * @param {string} s\n * @returns {OfflineQuery}\n */\n static fromString(s) {\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n const ptr0 = passStringToWasm0(s, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n wasm.offlinequery_fromString(retptr, ptr0, len0);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n var r2 = getInt32Memory0()[retptr / 4 + 2];\n if (r2) {\n throw takeObject(r1);\n }\n return OfflineQuery.__wrap(r0);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n }\n }\n}\n\nconst PrivateKeyFinalization = (typeof FinalizationRegistry === 'undefined')\n ? { register: () => {}, unregister: () => {} }\n : new FinalizationRegistry(ptr => wasm.__wbg_privatekey_free(ptr >>> 0));\n/**\n* Private key of an Aleo account\n*/\nclass PrivateKey {\n\n static __wrap(ptr) {\n ptr = ptr >>> 0;\n const obj = Object.create(PrivateKey.prototype);\n obj.__wbg_ptr = ptr;\n PrivateKeyFinalization.register(obj, obj.__wbg_ptr, obj);\n return obj;\n }\n\n __destroy_into_raw() {\n const ptr = this.__wbg_ptr;\n this.__wbg_ptr = 0;\n PrivateKeyFinalization.unregister(this);\n return ptr;\n }\n\n free() {\n const ptr = this.__destroy_into_raw();\n wasm.__wbg_privatekey_free(ptr);\n }\n /**\n * Generate a new private key using a cryptographically secure random number generator\n *\n * @returns {PrivateKey}\n */\n constructor() {\n const ret = wasm.privatekey_new();\n this.__wbg_ptr = ret >>> 0;\n return this;\n }\n /**\n * Get a private key from a series of unchecked bytes\n *\n * @param {Uint8Array} seed Unchecked 32 byte long Uint8Array acting as the seed for the private key\n * @returns {PrivateKey}\n * @param {Uint8Array} seed\n * @returns {PrivateKey}\n */\n static from_seed_unchecked(seed) {\n const ptr0 = passArray8ToWasm0(seed, wasm.__wbindgen_malloc);\n const len0 = WASM_VECTOR_LEN;\n const ret = wasm.privatekey_from_seed_unchecked(ptr0, len0);\n return PrivateKey.__wrap(ret);\n }\n /**\n * Get a private key from a string representation of a private key\n *\n * @param {string} seed String representation of a private key\n * @returns {PrivateKey}\n * @param {string} private_key\n * @returns {PrivateKey}\n */\n static from_string(private_key) {\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n const ptr0 = passStringToWasm0(private_key, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n wasm.privatekey_from_string(retptr, ptr0, len0);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n var r2 = getInt32Memory0()[retptr / 4 + 2];\n if (r2) {\n throw takeObject(r1);\n }\n return PrivateKey.__wrap(r0);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n }\n }\n /**\n * Get a string representation of the private key. This function should be used very carefully\n * as it exposes the private key plaintext\n *\n * @returns {string} String representation of a private key\n * @returns {string}\n */\n to_string() {\n let deferred1_0;\n let deferred1_1;\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n wasm.privatekey_to_string(retptr, this.__wbg_ptr);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n deferred1_0 = r0;\n deferred1_1 = r1;\n return getStringFromWasm0(r0, r1);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);\n }\n }\n /**\n * Get the view key corresponding to the private key\n *\n * @returns {ViewKey}\n * @returns {ViewKey}\n */\n to_view_key() {\n const ret = wasm.privatekey_to_view_key(this.__wbg_ptr);\n return ViewKey.__wrap(ret);\n }\n /**\n * Get the address corresponding to the private key\n *\n * @returns {Address}\n * @returns {Address}\n */\n to_address() {\n const ret = wasm.privatekey_to_address(this.__wbg_ptr);\n return Address.__wrap(ret);\n }\n /**\n * Sign a message with the private key\n *\n * @param {Uint8Array} Byte array representing a message signed by the address\n * @returns {Signature} Signature generated by signing the message with the address\n * @param {Uint8Array} message\n * @returns {Signature}\n */\n sign(message) {\n const ptr0 = passArray8ToWasm0(message, wasm.__wbindgen_malloc);\n const len0 = WASM_VECTOR_LEN;\n const ret = wasm.privatekey_sign(this.__wbg_ptr, ptr0, len0);\n return Signature.__wrap(ret);\n }\n /**\n * Get a new randomly generated private key ciphertext using a secret. The secret is sensitive\n * and will be needed to decrypt the private key later, so it should be stored securely\n *\n * @param {string} secret Secret used to encrypt the private key\n * @returns {PrivateKeyCiphertext | Error} Ciphertext representation of the private key\n * @param {string} secret\n * @returns {PrivateKeyCiphertext}\n */\n static newEncrypted(secret) {\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n const ptr0 = passStringToWasm0(secret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n wasm.privatekey_newEncrypted(retptr, ptr0, len0);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n var r2 = getInt32Memory0()[retptr / 4 + 2];\n if (r2) {\n throw takeObject(r1);\n }\n return PrivateKeyCiphertext.__wrap(r0);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n }\n }\n /**\n * Encrypt an existing private key with a secret. The secret is sensitive and will be needed to\n * decrypt the private key later, so it should be stored securely\n *\n * @param {string} secret Secret used to encrypt the private key\n * @returns {PrivateKeyCiphertext | Error} Ciphertext representation of the private key\n * @param {string} secret\n * @returns {PrivateKeyCiphertext}\n */\n toCiphertext(secret) {\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n const ptr0 = passStringToWasm0(secret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n wasm.privatekey_toCiphertext(retptr, this.__wbg_ptr, ptr0, len0);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n var r2 = getInt32Memory0()[retptr / 4 + 2];\n if (r2) {\n throw takeObject(r1);\n }\n return PrivateKeyCiphertext.__wrap(r0);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n }\n }\n /**\n * Get private key from a private key ciphertext and secret originally used to encrypt it\n *\n * @param {PrivateKeyCiphertext} ciphertext Ciphertext representation of the private key\n * @param {string} secret Secret originally used to encrypt the private key\n * @returns {PrivateKey | Error} Private key\n * @param {PrivateKeyCiphertext} ciphertext\n * @param {string} secret\n * @returns {PrivateKey}\n */\n static fromPrivateKeyCiphertext(ciphertext, secret) {\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n _assertClass(ciphertext, PrivateKeyCiphertext);\n const ptr0 = passStringToWasm0(secret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n wasm.privatekey_fromPrivateKeyCiphertext(retptr, ciphertext.__wbg_ptr, ptr0, len0);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n var r2 = getInt32Memory0()[retptr / 4 + 2];\n if (r2) {\n throw takeObject(r1);\n }\n return PrivateKey.__wrap(r0);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n }\n }\n}\n\nconst PrivateKeyCiphertextFinalization = (typeof FinalizationRegistry === 'undefined')\n ? { register: () => {}, unregister: () => {} }\n : new FinalizationRegistry(ptr => wasm.__wbg_privatekeyciphertext_free(ptr >>> 0));\n/**\n* Private Key in ciphertext form\n*/\nclass PrivateKeyCiphertext {\n\n static __wrap(ptr) {\n ptr = ptr >>> 0;\n const obj = Object.create(PrivateKeyCiphertext.prototype);\n obj.__wbg_ptr = ptr;\n PrivateKeyCiphertextFinalization.register(obj, obj.__wbg_ptr, obj);\n return obj;\n }\n\n __destroy_into_raw() {\n const ptr = this.__wbg_ptr;\n this.__wbg_ptr = 0;\n PrivateKeyCiphertextFinalization.unregister(this);\n return ptr;\n }\n\n free() {\n const ptr = this.__destroy_into_raw();\n wasm.__wbg_privatekeyciphertext_free(ptr);\n }\n /**\n * Encrypt a private key using a secret string. The secret is sensitive and will be needed to\n * decrypt the private key later, so it should be stored securely\n *\n * @param {PrivateKey} private_key Private key to encrypt\n * @param {string} secret Secret to encrypt the private key with\n * @returns {PrivateKeyCiphertext | Error} Private key ciphertext\n * @param {PrivateKey} private_key\n * @param {string} secret\n * @returns {PrivateKeyCiphertext}\n */\n static encryptPrivateKey(private_key, secret) {\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n _assertClass(private_key, PrivateKey);\n const ptr0 = passStringToWasm0(secret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n wasm.privatekey_toCiphertext(retptr, private_key.__wbg_ptr, ptr0, len0);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n var r2 = getInt32Memory0()[retptr / 4 + 2];\n if (r2) {\n throw takeObject(r1);\n }\n return PrivateKeyCiphertext.__wrap(r0);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n }\n }\n /**\n * Decrypts a private ciphertext using a secret string. This must be the same secret used to\n * encrypt the private key\n *\n * @param {string} secret Secret used to encrypt the private key\n * @returns {PrivateKey | Error} Private key\n * @param {string} secret\n * @returns {PrivateKey}\n */\n decryptToPrivateKey(secret) {\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n const ptr0 = passStringToWasm0(secret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n wasm.privatekeyciphertext_decryptToPrivateKey(retptr, this.__wbg_ptr, ptr0, len0);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n var r2 = getInt32Memory0()[retptr / 4 + 2];\n if (r2) {\n throw takeObject(r1);\n }\n return PrivateKey.__wrap(r0);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n }\n }\n /**\n * Returns the ciphertext string\n *\n * @returns {string} Ciphertext string\n * @returns {string}\n */\n toString() {\n let deferred1_0;\n let deferred1_1;\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n wasm.privatekeyciphertext_toString(retptr, this.__wbg_ptr);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n deferred1_0 = r0;\n deferred1_1 = r1;\n return getStringFromWasm0(r0, r1);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);\n }\n }\n /**\n * Creates a PrivateKeyCiphertext from a string\n *\n * @param {string} ciphertext Ciphertext string\n * @returns {PrivateKeyCiphertext | Error} Private key ciphertext\n * @param {string} ciphertext\n * @returns {PrivateKeyCiphertext}\n */\n static fromString(ciphertext) {\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n const ptr0 = passStringToWasm0(ciphertext, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n wasm.privatekeyciphertext_fromString(retptr, ptr0, len0);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n var r2 = getInt32Memory0()[retptr / 4 + 2];\n if (r2) {\n throw takeObject(r1);\n }\n return PrivateKeyCiphertext.__wrap(r0);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n }\n }\n}\n\nconst ProgramFinalization = (typeof FinalizationRegistry === 'undefined')\n ? { register: () => {}, unregister: () => {} }\n : new FinalizationRegistry(ptr => wasm.__wbg_program_free(ptr >>> 0));\n/**\n* Webassembly Representation of an Aleo program\n*/\nclass Program {\n\n static __wrap(ptr) {\n ptr = ptr >>> 0;\n const obj = Object.create(Program.prototype);\n obj.__wbg_ptr = ptr;\n ProgramFinalization.register(obj, obj.__wbg_ptr, obj);\n return obj;\n }\n\n __destroy_into_raw() {\n const ptr = this.__wbg_ptr;\n this.__wbg_ptr = 0;\n ProgramFinalization.unregister(this);\n return ptr;\n }\n\n free() {\n const ptr = this.__destroy_into_raw();\n wasm.__wbg_program_free(ptr);\n }\n /**\n * Create a program from a program string\n *\n * @param {string} program Aleo program source code\n * @returns {Program | Error} Program object\n * @param {string} program\n * @returns {Program}\n */\n static fromString(program) {\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n const ptr0 = passStringToWasm0(program, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n wasm.program_fromString(retptr, ptr0, len0);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n var r2 = getInt32Memory0()[retptr / 4 + 2];\n if (r2) {\n throw takeObject(r1);\n }\n return Program.__wrap(r0);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n }\n }\n /**\n * Get a string representation of the program\n *\n * @returns {string} String containing the program source code\n * @returns {string}\n */\n toString() {\n let deferred1_0;\n let deferred1_1;\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n wasm.program_toString(retptr, this.__wbg_ptr);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n deferred1_0 = r0;\n deferred1_1 = r1;\n return getStringFromWasm0(r0, r1);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);\n }\n }\n /**\n * Determine if a function is present in the program\n *\n * @param {string} functionName Name of the function to check for\n * @returns {boolean} True if the program is valid, false otherwise\n * @param {string} function_name\n * @returns {boolean}\n */\n hasFunction(function_name) {\n const ptr0 = passStringToWasm0(function_name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n const ret = wasm.program_hasFunction(this.__wbg_ptr, ptr0, len0);\n return ret !== 0;\n }\n /**\n * Get javascript array of functions names in the program\n *\n * @returns {Array} Array of all function names present in the program\n *\n * @example\n * const expected_functions = [\n * \"mint\",\n * \"transfer_private\",\n * \"transfer_private_to_public\",\n * \"transfer_public\",\n * \"transfer_public_to_private\",\n * \"join\",\n * \"split\",\n * \"fee\"\n * ]\n *\n * const credits_program = aleo_wasm.Program.getCreditsProgram();\n * const credits_functions = credits_program.getFunctions();\n * console.log(credits_functions === expected_functions); // Output should be \"true\"\n * @returns {Array}\n */\n getFunctions() {\n const ret = wasm.program_getFunctions(this.__wbg_ptr);\n return takeObject(ret);\n }\n /**\n * Get a javascript object representation of the function inputs and types. This can be used\n * to generate a web form to capture user inputs for an execution of a function.\n *\n * @param {string} function_name Name of the function to get inputs for\n * @returns {Array | Error} Array of function inputs\n *\n * @example\n * const expected_inputs = [\n * {\n * type:\"record\",\n * visibility:\"private\",\n * record:\"credits\",\n * members:[\n * {\n * name:\"microcredits\",\n * type:\"u64\",\n * visibility:\"private\"\n * }\n * ],\n * register:\"r0\"\n * },\n * {\n * type:\"address\",\n * visibility:\"private\",\n * register:\"r1\"\n * },\n * {\n * type:\"u64\",\n * visibility:\"private\",\n * register:\"r2\"\n * }\n * ];\n *\n * const credits_program = aleo_wasm.Program.getCreditsProgram();\n * const transfer_function_inputs = credits_program.getFunctionInputs(\"transfer_private\");\n * console.log(transfer_function_inputs === expected_inputs); // Output should be \"true\"\n * @param {string} function_name\n * @returns {Array}\n */\n getFunctionInputs(function_name) {\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n const ptr0 = passStringToWasm0(function_name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n wasm.program_getFunctionInputs(retptr, this.__wbg_ptr, ptr0, len0);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n var r2 = getInt32Memory0()[retptr / 4 + 2];\n if (r2) {\n throw takeObject(r1);\n }\n return takeObject(r0);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n }\n }\n /**\n * Get a the list of a program's mappings and the names/types of their keys and values.\n *\n * @returns {Array | Error} - An array of objects representing the mappings in the program\n * @example\n * const expected_mappings = [\n * {\n * name: \"account\",\n * key_name: \"owner\",\n * key_type: \"address\",\n * value_name: \"microcredits\",\n * value_type: \"u64\"\n * }\n * ]\n *\n * const credits_program = aleo_wasm.Program.getCreditsProgram();\n * const credits_mappings = credits_program.getMappings();\n * console.log(credits_mappings === expected_mappings); // Output should be \"true\"\n * @returns {Array}\n */\n getMappings() {\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n wasm.program_getMappings(retptr, this.__wbg_ptr);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n var r2 = getInt32Memory0()[retptr / 4 + 2];\n if (r2) {\n throw takeObject(r1);\n }\n return takeObject(r0);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n }\n }\n /**\n * Get a javascript object representation of a program record and its types\n *\n * @param {string} record_name Name of the record to get members for\n * @returns {Object | Error} Object containing the record name, type, and members\n *\n * @example\n *\n * const expected_record = {\n * type: \"record\",\n * record: \"Credits\",\n * members: [\n * {\n * name: \"owner\",\n * type: \"address\",\n * visibility: \"private\"\n * },\n * {\n * name: \"microcredits\",\n * type: \"u64\",\n * visibility: \"private\"\n * }\n * ];\n * };\n *\n * const credits_program = aleo_wasm.Program.getCreditsProgram();\n * const credits_record = credits_program.getRecordMembers(\"Credits\");\n * console.log(credits_record === expected_record); // Output should be \"true\"\n * @param {string} record_name\n * @returns {object}\n */\n getRecordMembers(record_name) {\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n const ptr0 = passStringToWasm0(record_name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n wasm.program_getRecordMembers(retptr, this.__wbg_ptr, ptr0, len0);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n var r2 = getInt32Memory0()[retptr / 4 + 2];\n if (r2) {\n throw takeObject(r1);\n }\n return takeObject(r0);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n }\n }\n /**\n * Get a javascript object representation of a program struct and its types\n *\n * @param {string} struct_name Name of the struct to get members for\n * @returns {Array | Error} Array containing the struct members\n *\n * @example\n *\n * const STRUCT_PROGRAM = \"program token_issue.aleo;\n *\n * struct token_metadata:\n * network as u32;\n * version as u32;\n *\n * struct token:\n * token_id as u32;\n * metadata as token_metadata;\n *\n * function no_op:\n * input r0 as u64;\n * output r0 as u64;\"\n *\n * const expected_struct_members = [\n * {\n * name: \"token_id\",\n * type: \"u32\",\n * },\n * {\n * name: \"metadata\",\n * type: \"struct\",\n * struct_id: \"token_metadata\",\n * members: [\n * {\n * name: \"network\",\n * type: \"u32\",\n * }\n * {\n * name: \"version\",\n * type: \"u32\",\n * }\n * ]\n * }\n * ];\n *\n * const program = aleo_wasm.Program.fromString(STRUCT_PROGRAM);\n * const struct_members = program.getStructMembers(\"token\");\n * console.log(struct_members === expected_struct_members); // Output should be \"true\"\n * @param {string} struct_name\n * @returns {Array}\n */\n getStructMembers(struct_name) {\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n const ptr0 = passStringToWasm0(struct_name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n wasm.program_getStructMembers(retptr, this.__wbg_ptr, ptr0, len0);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n var r2 = getInt32Memory0()[retptr / 4 + 2];\n if (r2) {\n throw takeObject(r1);\n }\n return takeObject(r0);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n }\n }\n /**\n * Get the credits.aleo program\n *\n * @returns {Program} The credits.aleo program\n * @returns {Program}\n */\n static getCreditsProgram() {\n const ret = wasm.program_getCreditsProgram();\n return Program.__wrap(ret);\n }\n /**\n * Get the id of the program\n *\n * @returns {string} The id of the program\n * @returns {string}\n */\n id() {\n let deferred1_0;\n let deferred1_1;\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n wasm.program_id(retptr, this.__wbg_ptr);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n deferred1_0 = r0;\n deferred1_1 = r1;\n return getStringFromWasm0(r0, r1);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);\n }\n }\n /**\n * Get a unique address of the program\n *\n * @returns {Address} The address of the program\n * @returns {Address}\n */\n address() {\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n wasm.program_address(retptr, this.__wbg_ptr);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n var r2 = getInt32Memory0()[retptr / 4 + 2];\n if (r2) {\n throw takeObject(r1);\n }\n return Address.__wrap(r0);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n }\n }\n /**\n * Determine equality with another program\n *\n * @param {Program} other The other program to compare\n * @returns {boolean} True if the programs are equal, false otherwise\n * @param {Program} other\n * @returns {boolean}\n */\n isEqual(other) {\n _assertClass(other, Program);\n const ret = wasm.program_isEqual(this.__wbg_ptr, other.__wbg_ptr);\n return ret !== 0;\n }\n /**\n * Get program_imports\n *\n * @returns {Array} The program imports\n *\n * @example\n *\n * const DOUBLE_TEST = \"import multiply_test.aleo;\n *\n * program double_test.aleo;\n *\n * function double_it:\n * input r0 as u32.private;\n * call multiply_test.aleo/multiply 2u32 r0 into r1;\n * output r1 as u32.private;\";\n *\n * const expected_imports = [\n * \"multiply_test.aleo\"\n * ];\n *\n * const program = aleo_wasm.Program.fromString(DOUBLE_TEST_PROGRAM);\n * const imports = program.getImports();\n * console.log(imports === expected_imports); // Output should be \"true\"\n * @returns {Array}\n */\n getImports() {\n const ret = wasm.program_getImports(this.__wbg_ptr);\n return takeObject(ret);\n }\n}\n\nconst ProgramManagerFinalization = (typeof FinalizationRegistry === 'undefined')\n ? { register: () => {}, unregister: () => {} }\n : new FinalizationRegistry(ptr => wasm.__wbg_programmanager_free(ptr >>> 0));\n/**\n*/\nclass ProgramManager {\n\n __destroy_into_raw() {\n const ptr = this.__wbg_ptr;\n this.__wbg_ptr = 0;\n ProgramManagerFinalization.unregister(this);\n return ptr;\n }\n\n free() {\n const ptr = this.__destroy_into_raw();\n wasm.__wbg_programmanager_free(ptr);\n }\n /**\n * Deploy an Aleo program\n *\n * @param private_key The private key of the sender\n * @param program The source code of the program being deployed\n * @param imports A javascript object holding the source code of any imported programs in the\n * form \\{\"program_name1\": \"program_source_code\", \"program_name2\": \"program_source_code\", ..\\}.\n * Note that all imported programs must be deployed on chain before the main program in order\n * for the deployment to succeed\n * @param fee_credits The amount of credits to pay as a fee\n * @param fee_record The record to spend the fee from\n * @param url The url of the Aleo network node to send the transaction to\n * @param imports (optional) Provide a list of imports to use for the program deployment in the\n * form of a javascript object where the keys are a string of the program name and the values\n * are a string representing the program source code \\{ \"hello.aleo\": \"hello.aleo source code\" \\}\n * @param fee_proving_key (optional) Provide a proving key to use for the fee execution\n * @param fee_verifying_key (optional) Provide a verifying key to use for the fee execution\n * @returns {Transaction | Error}\n * @param {PrivateKey} private_key\n * @param {string} program\n * @param {number} fee_credits\n * @param {RecordPlaintext | undefined} [fee_record]\n * @param {string | undefined} [url]\n * @param {object | undefined} [imports]\n * @param {ProvingKey | undefined} [fee_proving_key]\n * @param {VerifyingKey | undefined} [fee_verifying_key]\n * @param {OfflineQuery | undefined} [offline_query]\n * @returns {Promise}\n */\n static buildDeploymentTransaction(private_key, program, fee_credits, fee_record, url, imports, fee_proving_key, fee_verifying_key, offline_query) {\n _assertClass(private_key, PrivateKey);\n const ptr0 = passStringToWasm0(program, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n let ptr1 = 0;\n if (!isLikeNone(fee_record)) {\n _assertClass(fee_record, RecordPlaintext);\n ptr1 = fee_record.__destroy_into_raw();\n }\n var ptr2 = isLikeNone(url) ? 0 : passStringToWasm0(url, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n var len2 = WASM_VECTOR_LEN;\n let ptr3 = 0;\n if (!isLikeNone(fee_proving_key)) {\n _assertClass(fee_proving_key, ProvingKey);\n ptr3 = fee_proving_key.__destroy_into_raw();\n }\n let ptr4 = 0;\n if (!isLikeNone(fee_verifying_key)) {\n _assertClass(fee_verifying_key, VerifyingKey);\n ptr4 = fee_verifying_key.__destroy_into_raw();\n }\n let ptr5 = 0;\n if (!isLikeNone(offline_query)) {\n _assertClass(offline_query, OfflineQuery);\n ptr5 = offline_query.__destroy_into_raw();\n }\n const ret = wasm.programmanager_buildDeploymentTransaction(private_key.__wbg_ptr, ptr0, len0, fee_credits, ptr1, ptr2, len2, isLikeNone(imports) ? 0 : addHeapObject(imports), ptr3, ptr4, ptr5);\n return takeObject(ret);\n }\n /**\n * Estimate the fee for a program deployment\n *\n * Disclaimer: Fee estimation is experimental and may not represent a correct estimate on any current or future network\n *\n * @param program The source code of the program being deployed\n * @param imports (optional) Provide a list of imports to use for the deployment fee estimation\n * in the form of a javascript object where the keys are a string of the program name and the values\n * are a string representing the program source code \\{ \"hello.aleo\": \"hello.aleo source code\" \\}\n * @returns {u64 | Error}\n * @param {string} program\n * @param {object | undefined} [imports]\n * @returns {Promise}\n */\n static estimateDeploymentFee(program, imports) {\n const ptr0 = passStringToWasm0(program, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n const ret = wasm.programmanager_estimateDeploymentFee(ptr0, len0, isLikeNone(imports) ? 0 : addHeapObject(imports));\n return takeObject(ret);\n }\n /**\n * Estimate the component of the deployment cost which comes from the fee for the program name.\n * Note that this cost does not represent the entire cost of deployment. It is additional to\n * the cost of the size (in bytes) of the deployment.\n *\n * Disclaimer: Fee estimation is experimental and may not represent a correct estimate on any current or future network\n *\n * @param name The name of the program to be deployed\n * @returns {u64 | Error}\n * @param {string} name\n * @returns {bigint}\n */\n static estimateProgramNameCost(name) {\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n const ptr0 = passStringToWasm0(name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n wasm.programmanager_estimateProgramNameCost(retptr, ptr0, len0);\n var r0 = getBigInt64Memory0()[retptr / 8 + 0];\n var r2 = getInt32Memory0()[retptr / 4 + 2];\n var r3 = getInt32Memory0()[retptr / 4 + 3];\n if (r3) {\n throw takeObject(r2);\n }\n return BigInt.asUintN(64, r0);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n }\n }\n /**\n * Execute an arbitrary function locally\n *\n * @param {PrivateKey} private_key The private key of the sender\n * @param {string} program The source code of the program being executed\n * @param {string} function The name of the function to execute\n * @param {Array} inputs A javascript array of inputs to the function\n * @param {boolean} prove_execution If true, the execution will be proven and an execution object\n * containing the proof and the encrypted inputs and outputs needed to verify the proof offline\n * will be returned.\n * @param {boolean} cache Cache the proving and verifying keys in the Execution response.\n * If this is set to 'true' the keys synthesized will be stored in the Execution Response\n * and the `ProvingKey` and `VerifyingKey` can be retrieved from the response via the `.getKeys()`\n * method.\n * @param {Object | undefined} imports (optional) Provide a list of imports to use for the function execution in the\n * form of a javascript object where the keys are a string of the program name and the values\n * are a string representing the program source code \\{ \"hello.aleo\": \"hello.aleo source code\" \\}\n * @param {ProvingKey | undefined} proving_key (optional) Provide a verifying key to use for the function execution\n * @param {VerifyingKey | undefined} verifying_key (optional) Provide a verifying key to use for the function execution\n * @param {PrivateKey} private_key\n * @param {string} program\n * @param {string} _function\n * @param {Array} inputs\n * @param {boolean} prove_execution\n * @param {boolean} cache\n * @param {object | undefined} [imports]\n * @param {ProvingKey | undefined} [proving_key]\n * @param {VerifyingKey | undefined} [verifying_key]\n * @param {string | undefined} [url]\n * @param {OfflineQuery | undefined} [offline_query]\n * @returns {Promise}\n */\n static executeFunctionOffline(private_key, program, _function, inputs, prove_execution, cache, imports, proving_key, verifying_key, url, offline_query) {\n _assertClass(private_key, PrivateKey);\n const ptr0 = passStringToWasm0(program, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n const ptr1 = passStringToWasm0(_function, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len1 = WASM_VECTOR_LEN;\n let ptr2 = 0;\n if (!isLikeNone(proving_key)) {\n _assertClass(proving_key, ProvingKey);\n ptr2 = proving_key.__destroy_into_raw();\n }\n let ptr3 = 0;\n if (!isLikeNone(verifying_key)) {\n _assertClass(verifying_key, VerifyingKey);\n ptr3 = verifying_key.__destroy_into_raw();\n }\n var ptr4 = isLikeNone(url) ? 0 : passStringToWasm0(url, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n var len4 = WASM_VECTOR_LEN;\n let ptr5 = 0;\n if (!isLikeNone(offline_query)) {\n _assertClass(offline_query, OfflineQuery);\n ptr5 = offline_query.__destroy_into_raw();\n }\n const ret = wasm.programmanager_executeFunctionOffline(private_key.__wbg_ptr, ptr0, len0, ptr1, len1, addHeapObject(inputs), prove_execution, cache, isLikeNone(imports) ? 0 : addHeapObject(imports), ptr2, ptr3, ptr4, len4, ptr5);\n return takeObject(ret);\n }\n /**\n * Execute Aleo function and create an Aleo execution transaction\n *\n * @param private_key The private key of the sender\n * @param program The source code of the program being executed\n * @param function The name of the function to execute\n * @param inputs A javascript array of inputs to the function\n * @param fee_credits The amount of credits to pay as a fee\n * @param fee_record The record to spend the fee from\n * @param url The url of the Aleo network node to send the transaction to\n * If this is set to 'true' the keys synthesized (or passed in as optional parameters via the\n * `proving_key` and `verifying_key` arguments) will be stored in the ProgramManager's memory\n * and used for subsequent transactions. If this is set to 'false' the proving and verifying\n * keys will be deallocated from memory after the transaction is executed.\n * @param imports (optional) Provide a list of imports to use for the function execution in the\n * form of a javascript object where the keys are a string of the program name and the values\n * are a string representing the program source code \\{ \"hello.aleo\": \"hello.aleo source code\" \\}\n * @param proving_key (optional) Provide a verifying key to use for the function execution\n * @param verifying_key (optional) Provide a verifying key to use for the function execution\n * @param fee_proving_key (optional) Provide a proving key to use for the fee execution\n * @param fee_verifying_key (optional) Provide a verifying key to use for the fee execution\n * @returns {Transaction | Error}\n * @param {PrivateKey} private_key\n * @param {string} program\n * @param {string} _function\n * @param {Array} inputs\n * @param {number} fee_credits\n * @param {RecordPlaintext | undefined} [fee_record]\n * @param {string | undefined} [url]\n * @param {object | undefined} [imports]\n * @param {ProvingKey | undefined} [proving_key]\n * @param {VerifyingKey | undefined} [verifying_key]\n * @param {ProvingKey | undefined} [fee_proving_key]\n * @param {VerifyingKey | undefined} [fee_verifying_key]\n * @param {OfflineQuery | undefined} [offline_query]\n * @returns {Promise}\n */\n static buildExecutionTransaction(private_key, program, _function, inputs, fee_credits, fee_record, url, imports, proving_key, verifying_key, fee_proving_key, fee_verifying_key, offline_query) {\n _assertClass(private_key, PrivateKey);\n const ptr0 = passStringToWasm0(program, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n const ptr1 = passStringToWasm0(_function, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len1 = WASM_VECTOR_LEN;\n let ptr2 = 0;\n if (!isLikeNone(fee_record)) {\n _assertClass(fee_record, RecordPlaintext);\n ptr2 = fee_record.__destroy_into_raw();\n }\n var ptr3 = isLikeNone(url) ? 0 : passStringToWasm0(url, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n var len3 = WASM_VECTOR_LEN;\n let ptr4 = 0;\n if (!isLikeNone(proving_key)) {\n _assertClass(proving_key, ProvingKey);\n ptr4 = proving_key.__destroy_into_raw();\n }\n let ptr5 = 0;\n if (!isLikeNone(verifying_key)) {\n _assertClass(verifying_key, VerifyingKey);\n ptr5 = verifying_key.__destroy_into_raw();\n }\n let ptr6 = 0;\n if (!isLikeNone(fee_proving_key)) {\n _assertClass(fee_proving_key, ProvingKey);\n ptr6 = fee_proving_key.__destroy_into_raw();\n }\n let ptr7 = 0;\n if (!isLikeNone(fee_verifying_key)) {\n _assertClass(fee_verifying_key, VerifyingKey);\n ptr7 = fee_verifying_key.__destroy_into_raw();\n }\n let ptr8 = 0;\n if (!isLikeNone(offline_query)) {\n _assertClass(offline_query, OfflineQuery);\n ptr8 = offline_query.__destroy_into_raw();\n }\n const ret = wasm.programmanager_buildExecutionTransaction(private_key.__wbg_ptr, ptr0, len0, ptr1, len1, addHeapObject(inputs), fee_credits, ptr2, ptr3, len3, isLikeNone(imports) ? 0 : addHeapObject(imports), ptr4, ptr5, ptr6, ptr7, ptr8);\n return takeObject(ret);\n }\n /**\n * Estimate Fee for Aleo function execution. Note if \"cache\" is set to true, the proving and\n * verifying keys will be stored in the ProgramManager's memory and used for subsequent\n * program executions.\n *\n * Disclaimer: Fee estimation is experimental and may not represent a correct estimate on any current or future network\n *\n * @param private_key The private key of the sender\n * @param program The source code of the program to estimate the execution fee for\n * @param function The name of the function to execute\n * @param inputs A javascript array of inputs to the function\n * @param url The url of the Aleo network node to send the transaction to\n * @param imports (optional) Provide a list of imports to use for the fee estimation in the\n * form of a javascript object where the keys are a string of the program name and the values\n * are a string representing the program source code \\{ \"hello.aleo\": \"hello.aleo source code\" \\}\n * @param proving_key (optional) Provide a verifying key to use for the fee estimation\n * @param verifying_key (optional) Provide a verifying key to use for the fee estimation\n * @returns {u64 | Error} Fee in microcredits\n * @param {PrivateKey} private_key\n * @param {string} program\n * @param {string} _function\n * @param {Array} inputs\n * @param {string | undefined} [url]\n * @param {object | undefined} [imports]\n * @param {ProvingKey | undefined} [proving_key]\n * @param {VerifyingKey | undefined} [verifying_key]\n * @param {OfflineQuery | undefined} [offline_query]\n * @returns {Promise}\n */\n static estimateExecutionFee(private_key, program, _function, inputs, url, imports, proving_key, verifying_key, offline_query) {\n _assertClass(private_key, PrivateKey);\n const ptr0 = passStringToWasm0(program, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n const ptr1 = passStringToWasm0(_function, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len1 = WASM_VECTOR_LEN;\n var ptr2 = isLikeNone(url) ? 0 : passStringToWasm0(url, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n var len2 = WASM_VECTOR_LEN;\n let ptr3 = 0;\n if (!isLikeNone(proving_key)) {\n _assertClass(proving_key, ProvingKey);\n ptr3 = proving_key.__destroy_into_raw();\n }\n let ptr4 = 0;\n if (!isLikeNone(verifying_key)) {\n _assertClass(verifying_key, VerifyingKey);\n ptr4 = verifying_key.__destroy_into_raw();\n }\n let ptr5 = 0;\n if (!isLikeNone(offline_query)) {\n _assertClass(offline_query, OfflineQuery);\n ptr5 = offline_query.__destroy_into_raw();\n }\n const ret = wasm.programmanager_estimateExecutionFee(private_key.__wbg_ptr, ptr0, len0, ptr1, len1, addHeapObject(inputs), ptr2, len2, isLikeNone(imports) ? 0 : addHeapObject(imports), ptr3, ptr4, ptr5);\n return takeObject(ret);\n }\n /**\n * Estimate the finalize fee component for executing a function. This fee is additional to the\n * size of the execution of the program in bytes. If the function does not have a finalize\n * step, then the finalize fee is 0.\n *\n * Disclaimer: Fee estimation is experimental and may not represent a correct estimate on any current or future network\n *\n * @param program The program containing the function to estimate the finalize fee for\n * @param function The function to estimate the finalize fee for\n * @returns {u64 | Error} Fee in microcredits\n * @param {string} program\n * @param {string} _function\n * @returns {bigint}\n */\n static estimateFinalizeFee(program, _function) {\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n const ptr0 = passStringToWasm0(program, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n const ptr1 = passStringToWasm0(_function, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len1 = WASM_VECTOR_LEN;\n wasm.programmanager_estimateFinalizeFee(retptr, ptr0, len0, ptr1, len1);\n var r0 = getBigInt64Memory0()[retptr / 8 + 0];\n var r2 = getInt32Memory0()[retptr / 4 + 2];\n var r3 = getInt32Memory0()[retptr / 4 + 3];\n if (r3) {\n throw takeObject(r2);\n }\n return BigInt.asUintN(64, r0);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n }\n }\n /**\n * Join two records together to create a new record with an amount of credits equal to the sum\n * of the credits of the two original records\n *\n * @param private_key The private key of the sender\n * @param record_1 The first record to combine\n * @param record_2 The second record to combine\n * @param fee_credits The amount of credits to pay as a fee\n * @param fee_record The record to spend the fee from\n * @param url The url of the Aleo network node to send the transaction to\n * @param join_proving_key (optional) Provide a proving key to use for the join function\n * @param join_verifying_key (optional) Provide a verifying key to use for the join function\n * @param fee_proving_key (optional) Provide a proving key to use for the fee execution\n * @param fee_verifying_key (optional) Provide a verifying key to use for the fee execution\n * @returns {Transaction | Error} Transaction object\n * @param {PrivateKey} private_key\n * @param {RecordPlaintext} record_1\n * @param {RecordPlaintext} record_2\n * @param {number} fee_credits\n * @param {RecordPlaintext | undefined} [fee_record]\n * @param {string | undefined} [url]\n * @param {ProvingKey | undefined} [join_proving_key]\n * @param {VerifyingKey | undefined} [join_verifying_key]\n * @param {ProvingKey | undefined} [fee_proving_key]\n * @param {VerifyingKey | undefined} [fee_verifying_key]\n * @param {OfflineQuery | undefined} [offline_query]\n * @returns {Promise}\n */\n static buildJoinTransaction(private_key, record_1, record_2, fee_credits, fee_record, url, join_proving_key, join_verifying_key, fee_proving_key, fee_verifying_key, offline_query) {\n _assertClass(private_key, PrivateKey);\n _assertClass(record_1, RecordPlaintext);\n var ptr0 = record_1.__destroy_into_raw();\n _assertClass(record_2, RecordPlaintext);\n var ptr1 = record_2.__destroy_into_raw();\n let ptr2 = 0;\n if (!isLikeNone(fee_record)) {\n _assertClass(fee_record, RecordPlaintext);\n ptr2 = fee_record.__destroy_into_raw();\n }\n var ptr3 = isLikeNone(url) ? 0 : passStringToWasm0(url, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n var len3 = WASM_VECTOR_LEN;\n let ptr4 = 0;\n if (!isLikeNone(join_proving_key)) {\n _assertClass(join_proving_key, ProvingKey);\n ptr4 = join_proving_key.__destroy_into_raw();\n }\n let ptr5 = 0;\n if (!isLikeNone(join_verifying_key)) {\n _assertClass(join_verifying_key, VerifyingKey);\n ptr5 = join_verifying_key.__destroy_into_raw();\n }\n let ptr6 = 0;\n if (!isLikeNone(fee_proving_key)) {\n _assertClass(fee_proving_key, ProvingKey);\n ptr6 = fee_proving_key.__destroy_into_raw();\n }\n let ptr7 = 0;\n if (!isLikeNone(fee_verifying_key)) {\n _assertClass(fee_verifying_key, VerifyingKey);\n ptr7 = fee_verifying_key.__destroy_into_raw();\n }\n let ptr8 = 0;\n if (!isLikeNone(offline_query)) {\n _assertClass(offline_query, OfflineQuery);\n ptr8 = offline_query.__destroy_into_raw();\n }\n const ret = wasm.programmanager_buildJoinTransaction(private_key.__wbg_ptr, ptr0, ptr1, fee_credits, ptr2, ptr3, len3, ptr4, ptr5, ptr6, ptr7, ptr8);\n return takeObject(ret);\n }\n /**\n * Split an Aleo credits record into two separate records. This function does not require a fee.\n *\n * @param private_key The private key of the sender\n * @param split_amount The amount of the credit split. This amount will be subtracted from the\n * value of the record and two new records will be created with the split amount and the remainder\n * @param amount_record The record to split\n * @param url The url of the Aleo network node to send the transaction to\n * @param split_proving_key (optional) Provide a proving key to use for the split function\n * @param split_verifying_key (optional) Provide a verifying key to use for the split function\n * @returns {Transaction | Error} Transaction object\n * @param {PrivateKey} private_key\n * @param {number} split_amount\n * @param {RecordPlaintext} amount_record\n * @param {string | undefined} [url]\n * @param {ProvingKey | undefined} [split_proving_key]\n * @param {VerifyingKey | undefined} [split_verifying_key]\n * @param {OfflineQuery | undefined} [offline_query]\n * @returns {Promise}\n */\n static buildSplitTransaction(private_key, split_amount, amount_record, url, split_proving_key, split_verifying_key, offline_query) {\n _assertClass(private_key, PrivateKey);\n _assertClass(amount_record, RecordPlaintext);\n var ptr0 = amount_record.__destroy_into_raw();\n var ptr1 = isLikeNone(url) ? 0 : passStringToWasm0(url, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n var len1 = WASM_VECTOR_LEN;\n let ptr2 = 0;\n if (!isLikeNone(split_proving_key)) {\n _assertClass(split_proving_key, ProvingKey);\n ptr2 = split_proving_key.__destroy_into_raw();\n }\n let ptr3 = 0;\n if (!isLikeNone(split_verifying_key)) {\n _assertClass(split_verifying_key, VerifyingKey);\n ptr3 = split_verifying_key.__destroy_into_raw();\n }\n let ptr4 = 0;\n if (!isLikeNone(offline_query)) {\n _assertClass(offline_query, OfflineQuery);\n ptr4 = offline_query.__destroy_into_raw();\n }\n const ret = wasm.programmanager_buildSplitTransaction(private_key.__wbg_ptr, split_amount, ptr0, ptr1, len1, ptr2, ptr3, ptr4);\n return takeObject(ret);\n }\n /**\n * Send credits from one Aleo account to another\n *\n * @param private_key The private key of the sender\n * @param amount_credits The amount of credits to send\n * @param recipient The recipient of the transaction\n * @param transfer_type The type of the transfer (options: \"private\", \"public\", \"private_to_public\", \"public_to_private\")\n * @param amount_record The record to fund the amount from\n * @param fee_credits The amount of credits to pay as a fee\n * @param fee_record The record to spend the fee from\n * @param url The url of the Aleo network node to send the transaction to\n * @param transfer_verifying_key (optional) Provide a verifying key to use for the transfer\n * function\n * @param fee_proving_key (optional) Provide a proving key to use for the fee execution\n * @param fee_verifying_key (optional) Provide a verifying key to use for the fee execution\n * @returns {Transaction | Error}\n * @param {PrivateKey} private_key\n * @param {number} amount_credits\n * @param {string} recipient\n * @param {string} transfer_type\n * @param {string | undefined} caller\n * @param {RecordPlaintext | undefined} amount_record\n * @param {number} fee_credits\n * @param {RecordPlaintext | undefined} [fee_record]\n * @param {string | undefined} [url]\n * @param {ProvingKey | undefined} [transfer_proving_key]\n * @param {VerifyingKey | undefined} [transfer_verifying_key]\n * @param {ProvingKey | undefined} [fee_proving_key]\n * @param {VerifyingKey | undefined} [fee_verifying_key]\n * @param {OfflineQuery | undefined} [offline_query]\n * @returns {Promise}\n */\n static buildTransferTransaction(private_key, amount_credits, recipient, transfer_type, caller, amount_record, fee_credits, fee_record, url, transfer_proving_key, transfer_verifying_key, fee_proving_key, fee_verifying_key, offline_query) {\n _assertClass(private_key, PrivateKey);\n const ptr0 = passStringToWasm0(recipient, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n const ptr1 = passStringToWasm0(transfer_type, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len1 = WASM_VECTOR_LEN;\n var ptr2 = isLikeNone(caller) ? 0 : passStringToWasm0(caller, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n var len2 = WASM_VECTOR_LEN;\n let ptr3 = 0;\n if (!isLikeNone(amount_record)) {\n _assertClass(amount_record, RecordPlaintext);\n ptr3 = amount_record.__destroy_into_raw();\n }\n let ptr4 = 0;\n if (!isLikeNone(fee_record)) {\n _assertClass(fee_record, RecordPlaintext);\n ptr4 = fee_record.__destroy_into_raw();\n }\n var ptr5 = isLikeNone(url) ? 0 : passStringToWasm0(url, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n var len5 = WASM_VECTOR_LEN;\n let ptr6 = 0;\n if (!isLikeNone(transfer_proving_key)) {\n _assertClass(transfer_proving_key, ProvingKey);\n ptr6 = transfer_proving_key.__destroy_into_raw();\n }\n let ptr7 = 0;\n if (!isLikeNone(transfer_verifying_key)) {\n _assertClass(transfer_verifying_key, VerifyingKey);\n ptr7 = transfer_verifying_key.__destroy_into_raw();\n }\n let ptr8 = 0;\n if (!isLikeNone(fee_proving_key)) {\n _assertClass(fee_proving_key, ProvingKey);\n ptr8 = fee_proving_key.__destroy_into_raw();\n }\n let ptr9 = 0;\n if (!isLikeNone(fee_verifying_key)) {\n _assertClass(fee_verifying_key, VerifyingKey);\n ptr9 = fee_verifying_key.__destroy_into_raw();\n }\n let ptr10 = 0;\n if (!isLikeNone(offline_query)) {\n _assertClass(offline_query, OfflineQuery);\n ptr10 = offline_query.__destroy_into_raw();\n }\n const ret = wasm.programmanager_buildTransferTransaction(private_key.__wbg_ptr, amount_credits, ptr0, len0, ptr1, len1, ptr2, len2, ptr3, fee_credits, ptr4, ptr5, len5, ptr6, ptr7, ptr8, ptr9, ptr10);\n return takeObject(ret);\n }\n /**\n * Synthesize proving and verifying keys for a program\n *\n * @param program {string} The program source code of the program to synthesize keys for\n * @param function_id {string} The function to synthesize keys for\n * @param inputs {Array} The inputs to the function\n * @param imports {Object | undefined} The imports for the program\n * @param {PrivateKey} private_key\n * @param {string} program\n * @param {string} function_id\n * @param {Array} inputs\n * @param {object | undefined} [imports]\n * @returns {Promise}\n */\n static synthesizeKeyPair(private_key, program, function_id, inputs, imports) {\n _assertClass(private_key, PrivateKey);\n const ptr0 = passStringToWasm0(program, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n const ptr1 = passStringToWasm0(function_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len1 = WASM_VECTOR_LEN;\n const ret = wasm.programmanager_synthesizeKeyPair(private_key.__wbg_ptr, ptr0, len0, ptr1, len1, addHeapObject(inputs), isLikeNone(imports) ? 0 : addHeapObject(imports));\n return takeObject(ret);\n }\n}\n\nconst ProvingKeyFinalization = (typeof FinalizationRegistry === 'undefined')\n ? { register: () => {}, unregister: () => {} }\n : new FinalizationRegistry(ptr => wasm.__wbg_provingkey_free(ptr >>> 0));\n/**\n* Proving key for a function within an Aleo program\n*/\nclass ProvingKey {\n\n static __wrap(ptr) {\n ptr = ptr >>> 0;\n const obj = Object.create(ProvingKey.prototype);\n obj.__wbg_ptr = ptr;\n ProvingKeyFinalization.register(obj, obj.__wbg_ptr, obj);\n return obj;\n }\n\n __destroy_into_raw() {\n const ptr = this.__wbg_ptr;\n this.__wbg_ptr = 0;\n ProvingKeyFinalization.unregister(this);\n return ptr;\n }\n\n free() {\n const ptr = this.__destroy_into_raw();\n wasm.__wbg_provingkey_free(ptr);\n }\n /**\n * Verify if the proving key is for the bond_public function\n *\n * @example\n * const provingKey = ProvingKey.fromBytes(\"bond_public_proving_key.bin\");\n * provingKey.isBondPublicProver() ? console.log(\"Key verified\") : throw new Error(\"Invalid key\");\n *\n * @returns {boolean} returns true if the proving key is for the bond_public function, false if otherwise\n * @returns {boolean}\n */\n isBondPublicProver() {\n const ret = wasm.provingkey_isBondPublicProver(this.__wbg_ptr);\n return ret !== 0;\n }\n /**\n * Verify if the proving key is for the bond_validator function\n *\n * @example\n * const provingKey = ProvingKey.fromBytes(\"bond_validator_proving_key.bin\");\n * provingKey.isBondPublicProver() ? console.log(\"Key verified\") : throw new Error(\"Invalid key\");\n *\n * @returns {boolean} returns true if the proving key is for the bond_validator function, false if otherwise\n * @returns {boolean}\n */\n isBondValidatorProver() {\n const ret = wasm.provingkey_isBondValidatorProver(this.__wbg_ptr);\n return ret !== 0;\n }\n /**\n * Verify if the proving key is for the claim_unbond function\n *\n * @example\n * const provingKey = ProvingKey.fromBytes(\"claim_unbond_proving_key.bin\");\n * provingKey.isClaimUnbondProver() ? console.log(\"Key verified\") : throw new Error(\"Invalid key\");\n *\n * @returns {boolean} returns true if the proving key is for the claim_unbond function, false if otherwise\n * @returns {boolean}\n */\n isClaimUnbondPublicProver() {\n const ret = wasm.provingkey_isClaimUnbondPublicProver(this.__wbg_ptr);\n return ret !== 0;\n }\n /**\n * Verify if the proving key is for the fee_private function\n *\n * @example\n * const provingKey = ProvingKey.fromBytes(\"fee_private_proving_key.bin\");\n * provingKey.isFeePrivateProver() ? console.log(\"Key verified\") : throw new Error(\"Invalid key\");\n *\n * @returns {boolean} returns true if the proving key is for the fee_private function, false if otherwise\n * @returns {boolean}\n */\n isFeePrivateProver() {\n const ret = wasm.provingkey_isFeePrivateProver(this.__wbg_ptr);\n return ret !== 0;\n }\n /**\n * Verify if the proving key is for the fee_public function\n *\n * @example\n * const provingKey = ProvingKey.fromBytes(\"fee_public_proving_key.bin\");\n * provingKey.isFeePublicProver() ? console.log(\"Key verified\") : throw new Error(\"Invalid key\");\n *\n * @returns {boolean} returns true if the proving key is for the fee_public function, false if otherwise\n * @returns {boolean}\n */\n isFeePublicProver() {\n const ret = wasm.provingkey_isFeePublicProver(this.__wbg_ptr);\n return ret !== 0;\n }\n /**\n * Verify if the proving key is for the inclusion function\n *\n * @example\n * const provingKey = ProvingKey.fromBytes(\"inclusion_proving_key.bin\");\n * provingKey.isInclusionProver() ? console.log(\"Key verified\") : throw new Error(\"Invalid key\");\n *\n * @returns {boolean} returns true if the proving key is for the inclusion function, false if otherwise\n * @returns {boolean}\n */\n isInclusionProver() {\n const ret = wasm.provingkey_isInclusionProver(this.__wbg_ptr);\n return ret !== 0;\n }\n /**\n * Verify if the proving key is for the join function\n *\n * @example\n * const provingKey = ProvingKey.fromBytes(\"join_proving_key.bin\");\n * provingKey.isJoinProver() ? console.log(\"Key verified\") : throw new Error(\"Invalid key\");\n *\n * @returns {boolean} returns true if the proving key is for the join function, false if otherwise\n * @returns {boolean}\n */\n isJoinProver() {\n const ret = wasm.provingkey_isJoinProver(this.__wbg_ptr);\n return ret !== 0;\n }\n /**\n * Verify if the proving key is for the set_validator_state function\n *\n * @example\n * const provingKey = ProvingKey.fromBytes(\"set_validator_set_proving_key.bin\");\n * provingKey.isSetValidatorStateProver() ? console.log(\"Key verified\") : throw new Error(\"Invalid key\");\n *\n * @returns {boolean} returns true if the proving key is for the set_validator_state function, false if otherwise\n * @returns {boolean}\n */\n isSetValidatorStateProver() {\n const ret = wasm.provingkey_isSetValidatorStateProver(this.__wbg_ptr);\n return ret !== 0;\n }\n /**\n * Verify if the proving key is for the split function\n *\n * @example\n * const provingKey = ProvingKey.fromBytes(\"split_proving_key.bin\");\n * provingKey.isSplitProver() ? console.log(\"Key verified\") : throw new Error(\"Invalid key\");\n *\n * @returns {boolean} returns true if the proving key is for the split function, false if otherwise\n * @returns {boolean}\n */\n isSplitProver() {\n const ret = wasm.provingkey_isSplitProver(this.__wbg_ptr);\n return ret !== 0;\n }\n /**\n * Verify if the proving key is for the transfer_private function\n *\n * @example\n * const provingKey = ProvingKey.fromBytes(\"transfer_private_proving_key.bin\");\n * provingKey.isTransferPrivateProver() ? console.log(\"Key verified\") : throw new Error(\"Invalid key\");\n *\n * @returns {boolean} returns true if the proving key is for the transfer_private function, false if otherwise\n * @returns {boolean}\n */\n isTransferPrivateProver() {\n const ret = wasm.provingkey_isTransferPrivateProver(this.__wbg_ptr);\n return ret !== 0;\n }\n /**\n * Verify if the proving key is for the transfer_private_to_public function\n *\n * @example\n * const provingKey = ProvingKey.fromBytes(\"transfer_private_to_public_proving_key.bin\");\n * provingKey.isTransferPrivateToPublicProver() ? console.log(\"Key verified\") : throw new Error(\"Invalid key\");\n *\n * @returns {boolean} returns true if the proving key is for the transfer_private_to_public function, false if otherwise\n * @returns {boolean}\n */\n isTransferPrivateToPublicProver() {\n const ret = wasm.provingkey_isTransferPrivateToPublicProver(this.__wbg_ptr);\n return ret !== 0;\n }\n /**\n * Verify if the proving key is for the transfer_public function\n *\n * @example\n * const provingKey = ProvingKey.fromBytes(\"transfer_public_proving_key.bin\");\n * provingKey.isTransferPublicProver() ? console.log(\"Key verified\") : throw new Error(\"Invalid key\");\n *\n * @returns {boolean} returns true if the proving key is for the transfer_public function, false if otherwise\n * @returns {boolean}\n */\n isTransferPublicProver() {\n const ret = wasm.provingkey_isTransferPublicProver(this.__wbg_ptr);\n return ret !== 0;\n }\n /**\n * Verify if the proving key is for the transfer_public_as_signer function\n *\n * @example\n * const provingKey = ProvingKey.fromBytes(\"transfer_public_as_signer_proving_key.bin\");\n * provingKey.isTransferPublicAsSignerProver() ? console.log(\"Key verified\") : throw new Error(\"Invalid key\");\n *\n * @returns {boolean} returns true if the proving key is for the transfer_public function, false if otherwise\n * @returns {boolean}\n */\n isTransferPublicAsSignerProver() {\n const ret = wasm.provingkey_isTransferPublicAsSignerProver(this.__wbg_ptr);\n return ret !== 0;\n }\n /**\n * Verify if the proving key is for the transfer_public_to_private function\n *\n * @example\n * const provingKey = ProvingKey.fromBytes(\"transfer_public_to_private_proving_key.bin\");\n * provingKey.isTransferPublicToPrivateProver() ? console.log(\"Key verified\") : throw new Error(\"Invalid key\");\n *\n * @returns {boolean} returns true if the proving key is for the transfer_public_to_private function, false if otherwise\n * @returns {boolean}\n */\n isTransferPublicToPrivateProver() {\n const ret = wasm.provingkey_isTransferPublicToPrivateProver(this.__wbg_ptr);\n return ret !== 0;\n }\n /**\n * Verify if the proving key is for the unbond_public function\n *\n * @example\n * const provingKey = ProvingKey.fromBytes(\"unbond_public.bin\");\n * provingKey.isUnbondPublicProver() ? console.log(\"Key verified\") : throw new Error(\"Invalid key\");\n *\n * @returns {boolean} returns true if the proving key is for the unbond_public_prover function, false if otherwise\n * @returns {boolean}\n */\n isUnbondPublicProver() {\n const ret = wasm.provingkey_isUnbondPublicProver(this.__wbg_ptr);\n return ret !== 0;\n }\n /**\n * Return the checksum of the proving key\n *\n * @returns {string} Checksum of the proving key\n * @returns {string}\n */\n checksum() {\n let deferred1_0;\n let deferred1_1;\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n wasm.provingkey_checksum(retptr, this.__wbg_ptr);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n deferred1_0 = r0;\n deferred1_1 = r1;\n return getStringFromWasm0(r0, r1);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);\n }\n }\n /**\n * Create a copy of the proving key\n *\n * @returns {ProvingKey} A copy of the proving key\n * @returns {ProvingKey}\n */\n copy() {\n const ret = wasm.provingkey_copy(this.__wbg_ptr);\n return ProvingKey.__wrap(ret);\n }\n /**\n * Construct a new proving key from a byte array\n *\n * @param {Uint8Array} bytes Byte array representation of a proving key\n * @returns {ProvingKey | Error}\n * @param {Uint8Array} bytes\n * @returns {ProvingKey}\n */\n static fromBytes(bytes) {\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n const ptr0 = passArray8ToWasm0(bytes, wasm.__wbindgen_malloc);\n const len0 = WASM_VECTOR_LEN;\n wasm.provingkey_fromBytes(retptr, ptr0, len0);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n var r2 = getInt32Memory0()[retptr / 4 + 2];\n if (r2) {\n throw takeObject(r1);\n }\n return ProvingKey.__wrap(r0);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n }\n }\n /**\n * Create a proving key from string\n *\n * @param {string | Error} String representation of the proving key\n * @param {string} string\n * @returns {ProvingKey}\n */\n static fromString(string) {\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n const ptr0 = passStringToWasm0(string, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n wasm.provingkey_fromString(retptr, ptr0, len0);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n var r2 = getInt32Memory0()[retptr / 4 + 2];\n if (r2) {\n throw takeObject(r1);\n }\n return ProvingKey.__wrap(r0);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n }\n }\n /**\n * Return the byte representation of a proving key\n *\n * @returns {Uint8Array | Error} Byte array representation of a proving key\n * @returns {Uint8Array}\n */\n toBytes() {\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n wasm.provingkey_toBytes(retptr, this.__wbg_ptr);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n var r2 = getInt32Memory0()[retptr / 4 + 2];\n var r3 = getInt32Memory0()[retptr / 4 + 3];\n if (r3) {\n throw takeObject(r2);\n }\n var v1 = getArrayU8FromWasm0(r0, r1).slice();\n wasm.__wbindgen_free(r0, r1 * 1, 1);\n return v1;\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n }\n }\n /**\n * Get a string representation of the proving key\n *\n * @returns {string} String representation of the proving key\n * @returns {string}\n */\n toString() {\n let deferred1_0;\n let deferred1_1;\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n wasm.provingkey_toString(retptr, this.__wbg_ptr);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n deferred1_0 = r0;\n deferred1_1 = r1;\n return getStringFromWasm0(r0, r1);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);\n }\n }\n}\n\nconst RecordCiphertextFinalization = (typeof FinalizationRegistry === 'undefined')\n ? { register: () => {}, unregister: () => {} }\n : new FinalizationRegistry(ptr => wasm.__wbg_recordciphertext_free(ptr >>> 0));\n/**\n* Encrypted Aleo record\n*/\nclass RecordCiphertext {\n\n static __wrap(ptr) {\n ptr = ptr >>> 0;\n const obj = Object.create(RecordCiphertext.prototype);\n obj.__wbg_ptr = ptr;\n RecordCiphertextFinalization.register(obj, obj.__wbg_ptr, obj);\n return obj;\n }\n\n __destroy_into_raw() {\n const ptr = this.__wbg_ptr;\n this.__wbg_ptr = 0;\n RecordCiphertextFinalization.unregister(this);\n return ptr;\n }\n\n free() {\n const ptr = this.__destroy_into_raw();\n wasm.__wbg_recordciphertext_free(ptr);\n }\n /**\n * Create a record ciphertext from a string\n *\n * @param {string} record String representation of a record ciphertext\n * @returns {RecordCiphertext | Error} Record ciphertext\n * @param {string} record\n * @returns {RecordCiphertext}\n */\n static fromString(record) {\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n const ptr0 = passStringToWasm0(record, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n wasm.recordciphertext_fromString(retptr, ptr0, len0);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n var r2 = getInt32Memory0()[retptr / 4 + 2];\n if (r2) {\n throw takeObject(r1);\n }\n return RecordCiphertext.__wrap(r0);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n }\n }\n /**\n * Return the string reprensentation of the record ciphertext\n *\n * @returns {string} String representation of the record ciphertext\n * @returns {string}\n */\n toString() {\n let deferred1_0;\n let deferred1_1;\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n wasm.recordciphertext_toString(retptr, this.__wbg_ptr);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n deferred1_0 = r0;\n deferred1_1 = r1;\n return getStringFromWasm0(r0, r1);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);\n }\n }\n /**\n * Decrypt the record ciphertext into plaintext using the view key. The record will only\n * decrypt if the record was encrypted by the account corresponding to the view key\n *\n * @param {ViewKey} view_key View key used to decrypt the ciphertext\n * @returns {RecordPlaintext | Error} Record plaintext object\n * @param {ViewKey} view_key\n * @returns {RecordPlaintext}\n */\n decrypt(view_key) {\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n _assertClass(view_key, ViewKey);\n wasm.recordciphertext_decrypt(retptr, this.__wbg_ptr, view_key.__wbg_ptr);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n var r2 = getInt32Memory0()[retptr / 4 + 2];\n if (r2) {\n throw takeObject(r1);\n }\n return RecordPlaintext.__wrap(r0);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n }\n }\n /**\n * Determines if the account corresponding to the view key is the owner of the record\n *\n * @param {ViewKey} view_key View key used to decrypt the ciphertext\n * @returns {boolean}\n * @param {ViewKey} view_key\n * @returns {boolean}\n */\n isOwner(view_key) {\n _assertClass(view_key, ViewKey);\n const ret = wasm.recordciphertext_isOwner(this.__wbg_ptr, view_key.__wbg_ptr);\n return ret !== 0;\n }\n}\n\nconst RecordPlaintextFinalization = (typeof FinalizationRegistry === 'undefined')\n ? { register: () => {}, unregister: () => {} }\n : new FinalizationRegistry(ptr => wasm.__wbg_recordplaintext_free(ptr >>> 0));\n/**\n* Plaintext representation of an Aleo record\n*/\nclass RecordPlaintext {\n\n static __wrap(ptr) {\n ptr = ptr >>> 0;\n const obj = Object.create(RecordPlaintext.prototype);\n obj.__wbg_ptr = ptr;\n RecordPlaintextFinalization.register(obj, obj.__wbg_ptr, obj);\n return obj;\n }\n\n __destroy_into_raw() {\n const ptr = this.__wbg_ptr;\n this.__wbg_ptr = 0;\n RecordPlaintextFinalization.unregister(this);\n return ptr;\n }\n\n free() {\n const ptr = this.__destroy_into_raw();\n wasm.__wbg_recordplaintext_free(ptr);\n }\n /**\n * @param {string} program_id\n * @param {string} record_name\n * @returns {Field}\n */\n commitment(program_id, record_name) {\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n const ptr0 = passStringToWasm0(program_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n const ptr1 = passStringToWasm0(record_name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len1 = WASM_VECTOR_LEN;\n wasm.recordplaintext_commitment(retptr, this.__wbg_ptr, ptr0, len0, ptr1, len1);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n var r2 = getInt32Memory0()[retptr / 4 + 2];\n if (r2) {\n throw takeObject(r1);\n }\n return Field.__wrap(r0);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n }\n }\n /**\n * Return a record plaintext from a string.\n *\n * @param {string} record String representation of a plaintext representation of an Aleo record\n * @returns {RecordPlaintext | Error} Record plaintext\n * @param {string} record\n * @returns {RecordPlaintext}\n */\n static fromString(record) {\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n const ptr0 = passStringToWasm0(record, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n wasm.recordplaintext_fromString(retptr, ptr0, len0);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n var r2 = getInt32Memory0()[retptr / 4 + 2];\n if (r2) {\n throw takeObject(r1);\n }\n return RecordPlaintext.__wrap(r0);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n }\n }\n /**\n * Returns the record plaintext string\n *\n * @returns {string} String representation of the record plaintext\n * @returns {string}\n */\n toString() {\n let deferred1_0;\n let deferred1_1;\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n wasm.recordplaintext_toString(retptr, this.__wbg_ptr);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n deferred1_0 = r0;\n deferred1_1 = r1;\n return getStringFromWasm0(r0, r1);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);\n }\n }\n /**\n * Returns the amount of microcredits in the record\n *\n * @returns {u64} Amount of microcredits in the record\n * @returns {bigint}\n */\n microcredits() {\n const ret = wasm.recordplaintext_microcredits(this.__wbg_ptr);\n return BigInt.asUintN(64, ret);\n }\n /**\n * Returns the nonce of the record. This can be used to uniquely identify a record.\n *\n * @returns {string} Nonce of the record\n * @returns {string}\n */\n nonce() {\n let deferred1_0;\n let deferred1_1;\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n wasm.recordplaintext_nonce(retptr, this.__wbg_ptr);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n deferred1_0 = r0;\n deferred1_1 = r1;\n return getStringFromWasm0(r0, r1);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);\n }\n }\n /**\n * Attempt to get the serial number of a record to determine whether or not is has been spent\n *\n * @param {PrivateKey} private_key Private key of the account that owns the record\n * @param {string} program_id Program ID of the program that the record is associated with\n * @param {string} record_name Name of the record\n * @returns {string | Error} Serial number of the record\n * @param {PrivateKey} private_key\n * @param {string} program_id\n * @param {string} record_name\n * @returns {string}\n */\n serialNumberString(private_key, program_id, record_name) {\n let deferred4_0;\n let deferred4_1;\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n _assertClass(private_key, PrivateKey);\n const ptr0 = passStringToWasm0(program_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n const ptr1 = passStringToWasm0(record_name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len1 = WASM_VECTOR_LEN;\n wasm.recordplaintext_serialNumberString(retptr, this.__wbg_ptr, private_key.__wbg_ptr, ptr0, len0, ptr1, len1);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n var r2 = getInt32Memory0()[retptr / 4 + 2];\n var r3 = getInt32Memory0()[retptr / 4 + 3];\n var ptr3 = r0;\n var len3 = r1;\n if (r3) {\n ptr3 = 0; len3 = 0;\n throw takeObject(r2);\n }\n deferred4_0 = ptr3;\n deferred4_1 = len3;\n return getStringFromWasm0(ptr3, len3);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n wasm.__wbindgen_free(deferred4_0, deferred4_1, 1);\n }\n }\n}\n\nconst SignatureFinalization = (typeof FinalizationRegistry === 'undefined')\n ? { register: () => {}, unregister: () => {} }\n : new FinalizationRegistry(ptr => wasm.__wbg_signature_free(ptr >>> 0));\n/**\n* Cryptographic signature of a message signed by an Aleo account\n*/\nclass Signature {\n\n static __wrap(ptr) {\n ptr = ptr >>> 0;\n const obj = Object.create(Signature.prototype);\n obj.__wbg_ptr = ptr;\n SignatureFinalization.register(obj, obj.__wbg_ptr, obj);\n return obj;\n }\n\n __destroy_into_raw() {\n const ptr = this.__wbg_ptr;\n this.__wbg_ptr = 0;\n SignatureFinalization.unregister(this);\n return ptr;\n }\n\n free() {\n const ptr = this.__destroy_into_raw();\n wasm.__wbg_signature_free(ptr);\n }\n /**\n * Sign a message with a private key\n *\n * @param {PrivateKey} private_key The private key to sign the message with\n * @param {Uint8Array} message Byte representation of the message to sign\n * @returns {Signature} Signature of the message\n * @param {PrivateKey} private_key\n * @param {Uint8Array} message\n * @returns {Signature}\n */\n static sign(private_key, message) {\n _assertClass(private_key, PrivateKey);\n const ptr0 = passArray8ToWasm0(message, wasm.__wbindgen_malloc);\n const len0 = WASM_VECTOR_LEN;\n const ret = wasm.privatekey_sign(private_key.__wbg_ptr, ptr0, len0);\n return Signature.__wrap(ret);\n }\n /**\n * Verify a signature of a message with an address\n *\n * @param {Address} address The address to verify the signature with\n * @param {Uint8Array} message Byte representation of the message to verify\n * @returns {boolean} True if the signature is valid, false otherwise\n * @param {Address} address\n * @param {Uint8Array} message\n * @returns {boolean}\n */\n verify(address, message) {\n _assertClass(address, Address);\n const ptr0 = passArray8ToWasm0(message, wasm.__wbindgen_malloc);\n const len0 = WASM_VECTOR_LEN;\n const ret = wasm.signature_verify(this.__wbg_ptr, address.__wbg_ptr, ptr0, len0);\n return ret !== 0;\n }\n /**\n * Get a signature from a string representation of a signature\n *\n * @param {string} signature String representation of a signature\n * @returns {Signature} Signature\n * @param {string} signature\n * @returns {Signature}\n */\n static from_string(signature) {\n const ptr0 = passStringToWasm0(signature, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n const ret = wasm.signature_from_string(ptr0, len0);\n return Signature.__wrap(ret);\n }\n /**\n * Get a string representation of a signature\n *\n * @returns {string} String representation of a signature\n * @returns {string}\n */\n to_string() {\n let deferred1_0;\n let deferred1_1;\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n wasm.signature_to_string(retptr, this.__wbg_ptr);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n deferred1_0 = r0;\n deferred1_1 = r1;\n return getStringFromWasm0(r0, r1);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);\n }\n }\n}\n\nconst TransactionFinalization = (typeof FinalizationRegistry === 'undefined')\n ? { register: () => {}, unregister: () => {} }\n : new FinalizationRegistry(ptr => wasm.__wbg_transaction_free(ptr >>> 0));\n/**\n* Webassembly Representation of an Aleo transaction\n*\n* This object is created when generating an on-chain function deployment or execution and is the\n* object that should be submitted to the Aleo Network in order to deploy or execute a function.\n*/\nclass Transaction {\n\n static __wrap(ptr) {\n ptr = ptr >>> 0;\n const obj = Object.create(Transaction.prototype);\n obj.__wbg_ptr = ptr;\n TransactionFinalization.register(obj, obj.__wbg_ptr, obj);\n return obj;\n }\n\n __destroy_into_raw() {\n const ptr = this.__wbg_ptr;\n this.__wbg_ptr = 0;\n TransactionFinalization.unregister(this);\n return ptr;\n }\n\n free() {\n const ptr = this.__destroy_into_raw();\n wasm.__wbg_transaction_free(ptr);\n }\n /**\n * Create a transaction from a string\n *\n * @param {string} transaction String representation of a transaction\n * @returns {Transaction | Error}\n * @param {string} transaction\n * @returns {Transaction}\n */\n static fromString(transaction) {\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n const ptr0 = passStringToWasm0(transaction, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n wasm.transaction_fromString(retptr, ptr0, len0);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n var r2 = getInt32Memory0()[retptr / 4 + 2];\n if (r2) {\n throw takeObject(r1);\n }\n return Transaction.__wrap(r0);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n }\n }\n /**\n * Get the transaction as a string. If you want to submit this transaction to the Aleo Network\n * this function will create the string that should be submitted in the `POST` data.\n *\n * @returns {string} String representation of the transaction\n * @returns {string}\n */\n toString() {\n let deferred1_0;\n let deferred1_1;\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n wasm.transaction_toString(retptr, this.__wbg_ptr);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n deferred1_0 = r0;\n deferred1_1 = r1;\n return getStringFromWasm0(r0, r1);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);\n }\n }\n /**\n * Get the id of the transaction. This is the merkle root of the transaction's inclusion proof.\n *\n * This value can be used to query the status of the transaction on the Aleo Network to see\n * if it was successful. If successful, the transaction will be included in a block and this\n * value can be used to lookup the transaction data on-chain.\n *\n * @returns {string} Transaction id\n * @returns {string}\n */\n transactionId() {\n let deferred1_0;\n let deferred1_1;\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n wasm.transaction_transactionId(retptr, this.__wbg_ptr);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n deferred1_0 = r0;\n deferred1_1 = r1;\n return getStringFromWasm0(r0, r1);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);\n }\n }\n /**\n * Get the type of the transaction (will return \"deploy\" or \"execute\")\n *\n * @returns {string} Transaction type\n * @returns {string}\n */\n transactionType() {\n let deferred1_0;\n let deferred1_1;\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n wasm.transaction_transactionType(retptr, this.__wbg_ptr);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n deferred1_0 = r0;\n deferred1_1 = r1;\n return getStringFromWasm0(r0, r1);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);\n }\n }\n}\n\nconst VerifyingKeyFinalization = (typeof FinalizationRegistry === 'undefined')\n ? { register: () => {}, unregister: () => {} }\n : new FinalizationRegistry(ptr => wasm.__wbg_verifyingkey_free(ptr >>> 0));\n/**\n* Verifying key for a function within an Aleo program\n*/\nclass VerifyingKey {\n\n static __wrap(ptr) {\n ptr = ptr >>> 0;\n const obj = Object.create(VerifyingKey.prototype);\n obj.__wbg_ptr = ptr;\n VerifyingKeyFinalization.register(obj, obj.__wbg_ptr, obj);\n return obj;\n }\n\n __destroy_into_raw() {\n const ptr = this.__wbg_ptr;\n this.__wbg_ptr = 0;\n VerifyingKeyFinalization.unregister(this);\n return ptr;\n }\n\n free() {\n const ptr = this.__destroy_into_raw();\n wasm.__wbg_verifyingkey_free(ptr);\n }\n /**\n * Returns the verifying key for the bond_public function\n *\n * @returns {VerifyingKey} Verifying key for the bond_public function\n * @returns {VerifyingKey}\n */\n static bondPublicVerifier() {\n const ret = wasm.verifyingkey_bondPublicVerifier();\n return VerifyingKey.__wrap(ret);\n }\n /**\n * Returns the verifying key for the bond_validator function\n *\n * @returns {VerifyingKey} Verifying key for the bond_validator function\n * @returns {VerifyingKey}\n */\n static bondValidatorVerifier() {\n const ret = wasm.verifyingkey_bondValidatorVerifier();\n return VerifyingKey.__wrap(ret);\n }\n /**\n * Returns the verifying key for the claim_delegator function\n *\n * @returns {VerifyingKey} Verifying key for the claim_unbond_public function\n * @returns {VerifyingKey}\n */\n static claimUnbondPublicVerifier() {\n const ret = wasm.verifyingkey_claimUnbondPublicVerifier();\n return VerifyingKey.__wrap(ret);\n }\n /**\n * Returns the verifying key for the fee_private function\n *\n * @returns {VerifyingKey} Verifying key for the fee_private function\n * @returns {VerifyingKey}\n */\n static feePrivateVerifier() {\n const ret = wasm.verifyingkey_feePrivateVerifier();\n return VerifyingKey.__wrap(ret);\n }\n /**\n * Returns the verifying key for the fee_public function\n *\n * @returns {VerifyingKey} Verifying key for the fee_public function\n * @returns {VerifyingKey}\n */\n static feePublicVerifier() {\n const ret = wasm.verifyingkey_feePublicVerifier();\n return VerifyingKey.__wrap(ret);\n }\n /**\n * Returns the verifying key for the inclusion function\n *\n * @returns {VerifyingKey} Verifying key for the inclusion function\n * @returns {VerifyingKey}\n */\n static inclusionVerifier() {\n const ret = wasm.verifyingkey_inclusionVerifier();\n return VerifyingKey.__wrap(ret);\n }\n /**\n * Returns the verifying key for the join function\n *\n * @returns {VerifyingKey} Verifying key for the join function\n * @returns {VerifyingKey}\n */\n static joinVerifier() {\n const ret = wasm.verifyingkey_joinVerifier();\n return VerifyingKey.__wrap(ret);\n }\n /**\n * Returns the verifying key for the set_validator_state function\n *\n * @returns {VerifyingKey} Verifying key for the set_validator_state function\n * @returns {VerifyingKey}\n */\n static setValidatorStateVerifier() {\n const ret = wasm.verifyingkey_setValidatorStateVerifier();\n return VerifyingKey.__wrap(ret);\n }\n /**\n * Returns the verifying key for the split function\n *\n * @returns {VerifyingKey} Verifying key for the split function\n * @returns {VerifyingKey}\n */\n static splitVerifier() {\n const ret = wasm.verifyingkey_splitVerifier();\n return VerifyingKey.__wrap(ret);\n }\n /**\n * Returns the verifying key for the transfer_private function\n *\n * @returns {VerifyingKey} Verifying key for the transfer_private function\n * @returns {VerifyingKey}\n */\n static transferPrivateVerifier() {\n const ret = wasm.verifyingkey_transferPrivateVerifier();\n return VerifyingKey.__wrap(ret);\n }\n /**\n * Returns the verifying key for the transfer_private_to_public function\n *\n * @returns {VerifyingKey} Verifying key for the transfer_private_to_public function\n * @returns {VerifyingKey}\n */\n static transferPrivateToPublicVerifier() {\n const ret = wasm.verifyingkey_transferPrivateToPublicVerifier();\n return VerifyingKey.__wrap(ret);\n }\n /**\n * Returns the verifying key for the transfer_public function\n *\n * @returns {VerifyingKey} Verifying key for the transfer_public function\n * @returns {VerifyingKey}\n */\n static transferPublicVerifier() {\n const ret = wasm.verifyingkey_transferPublicVerifier();\n return VerifyingKey.__wrap(ret);\n }\n /**\n * Returns the verifying key for the transfer_public_as_signer function\n *\n * @returns {VerifyingKey} Verifying key for the transfer_public_as_signer function\n * @returns {VerifyingKey}\n */\n static transferPublicAsSignerVerifier() {\n const ret = wasm.verifyingkey_transferPublicAsSignerVerifier();\n return VerifyingKey.__wrap(ret);\n }\n /**\n * Returns the verifying key for the transfer_public_to_private function\n *\n * @returns {VerifyingKey} Verifying key for the transfer_public_to_private function\n * @returns {VerifyingKey}\n */\n static transferPublicToPrivateVerifier() {\n const ret = wasm.verifyingkey_transferPublicToPrivateVerifier();\n return VerifyingKey.__wrap(ret);\n }\n /**\n * Returns the verifying key for the unbond_public function\n *\n * @returns {VerifyingKey} Verifying key for the unbond_public function\n * @returns {VerifyingKey}\n */\n static unbondPublicVerifier() {\n const ret = wasm.verifyingkey_unbondPublicVerifier();\n return VerifyingKey.__wrap(ret);\n }\n /**\n * Returns the verifying key for the bond_public function\n *\n * @returns {VerifyingKey} Verifying key for the bond_public function\n * @returns {boolean}\n */\n isBondPublicVerifier() {\n const ret = wasm.verifyingkey_isBondPublicVerifier(this.__wbg_ptr);\n return ret !== 0;\n }\n /**\n * Returns the verifying key for the bond_validator function\n *\n * @returns {VerifyingKey} Verifying key for the bond_validator function\n * @returns {boolean}\n */\n isBondValidatorVerifier() {\n const ret = wasm.verifyingkey_isBondValidatorVerifier(this.__wbg_ptr);\n return ret !== 0;\n }\n /**\n * Verifies the verifying key is for the claim_delegator function\n *\n * @returns {bool}\n * @returns {boolean}\n */\n isClaimUnbondPublicVerifier() {\n const ret = wasm.verifyingkey_isClaimUnbondPublicVerifier(this.__wbg_ptr);\n return ret !== 0;\n }\n /**\n * Verifies the verifying key is for the fee_private function\n *\n * @returns {bool}\n * @returns {boolean}\n */\n isFeePrivateVerifier() {\n const ret = wasm.verifyingkey_isFeePrivateVerifier(this.__wbg_ptr);\n return ret !== 0;\n }\n /**\n * Verifies the verifying key is for the fee_public function\n *\n * @returns {bool}\n * @returns {boolean}\n */\n isFeePublicVerifier() {\n const ret = wasm.verifyingkey_isFeePublicVerifier(this.__wbg_ptr);\n return ret !== 0;\n }\n /**\n * Verifies the verifying key is for the inclusion function\n *\n * @returns {bool}\n * @returns {boolean}\n */\n isInclusionVerifier() {\n const ret = wasm.verifyingkey_isInclusionVerifier(this.__wbg_ptr);\n return ret !== 0;\n }\n /**\n * Verifies the verifying key is for the join function\n *\n * @returns {bool}\n * @returns {boolean}\n */\n isJoinVerifier() {\n const ret = wasm.verifyingkey_isJoinVerifier(this.__wbg_ptr);\n return ret !== 0;\n }\n /**\n * Verifies the verifying key is for the set_validator_state function\n *\n * @returns {bool}\n * @returns {boolean}\n */\n isSetValidatorStateVerifier() {\n const ret = wasm.verifyingkey_isSetValidatorStateVerifier(this.__wbg_ptr);\n return ret !== 0;\n }\n /**\n * Verifies the verifying key is for the split function\n *\n * @returns {bool}\n * @returns {boolean}\n */\n isSplitVerifier() {\n const ret = wasm.verifyingkey_isSplitVerifier(this.__wbg_ptr);\n return ret !== 0;\n }\n /**\n * Verifies the verifying key is for the transfer_private function\n *\n * @returns {bool}\n * @returns {boolean}\n */\n isTransferPrivateVerifier() {\n const ret = wasm.verifyingkey_isTransferPrivateVerifier(this.__wbg_ptr);\n return ret !== 0;\n }\n /**\n * Verifies the verifying key is for the transfer_private_to_public function\n *\n * @returns {bool}\n * @returns {boolean}\n */\n isTransferPrivateToPublicVerifier() {\n const ret = wasm.verifyingkey_isTransferPrivateToPublicVerifier(this.__wbg_ptr);\n return ret !== 0;\n }\n /**\n * Verifies the verifying key is for the transfer_public function\n *\n * @returns {bool}\n * @returns {boolean}\n */\n isTransferPublicVerifier() {\n const ret = wasm.verifyingkey_isTransferPublicVerifier(this.__wbg_ptr);\n return ret !== 0;\n }\n /**\n * Verifies the verifying key is for the transfer_public_as_signer function\n *\n * @returns {bool}\n * @returns {boolean}\n */\n isTransferPublicAsSignerVerifier() {\n const ret = wasm.verifyingkey_isTransferPublicAsSignerVerifier(this.__wbg_ptr);\n return ret !== 0;\n }\n /**\n * Verifies the verifying key is for the transfer_public_to_private function\n *\n * @returns {bool}\n * @returns {boolean}\n */\n isTransferPublicToPrivateVerifier() {\n const ret = wasm.verifyingkey_isTransferPublicToPrivateVerifier(this.__wbg_ptr);\n return ret !== 0;\n }\n /**\n * Verifies the verifying key is for the unbond_public function\n *\n * @returns {bool}\n * @returns {boolean}\n */\n isUnbondPublicVerifier() {\n const ret = wasm.verifyingkey_isUnbondPublicVerifier(this.__wbg_ptr);\n return ret !== 0;\n }\n /**\n * Get the checksum of the verifying key\n *\n * @returns {string} Checksum of the verifying key\n * @returns {string}\n */\n checksum() {\n let deferred1_0;\n let deferred1_1;\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n wasm.verifyingkey_checksum(retptr, this.__wbg_ptr);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n deferred1_0 = r0;\n deferred1_1 = r1;\n return getStringFromWasm0(r0, r1);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);\n }\n }\n /**\n * Create a copy of the verifying key\n *\n * @returns {VerifyingKey} A copy of the verifying key\n * @returns {VerifyingKey}\n */\n copy() {\n const ret = wasm.verifyingkey_copy(this.__wbg_ptr);\n return VerifyingKey.__wrap(ret);\n }\n /**\n * Construct a new verifying key from a byte array\n *\n * @param {Uint8Array} bytes Byte representation of a verifying key\n * @returns {VerifyingKey | Error}\n * @param {Uint8Array} bytes\n * @returns {VerifyingKey}\n */\n static fromBytes(bytes) {\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n const ptr0 = passArray8ToWasm0(bytes, wasm.__wbindgen_malloc);\n const len0 = WASM_VECTOR_LEN;\n wasm.verifyingkey_fromBytes(retptr, ptr0, len0);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n var r2 = getInt32Memory0()[retptr / 4 + 2];\n if (r2) {\n throw takeObject(r1);\n }\n return VerifyingKey.__wrap(r0);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n }\n }\n /**\n * Create a verifying key from string\n *\n * @param {String} string String representation of a verifying key\n * @returns {VerifyingKey | Error}\n * @param {string} string\n * @returns {VerifyingKey}\n */\n static fromString(string) {\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n const ptr0 = passStringToWasm0(string, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n wasm.verifyingkey_fromString(retptr, ptr0, len0);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n var r2 = getInt32Memory0()[retptr / 4 + 2];\n if (r2) {\n throw takeObject(r1);\n }\n return VerifyingKey.__wrap(r0);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n }\n }\n /**\n * Create a byte array from a verifying key\n *\n * @returns {Uint8Array | Error} Byte representation of a verifying key\n * @returns {Uint8Array}\n */\n toBytes() {\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n wasm.verifyingkey_toBytes(retptr, this.__wbg_ptr);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n var r2 = getInt32Memory0()[retptr / 4 + 2];\n var r3 = getInt32Memory0()[retptr / 4 + 3];\n if (r3) {\n throw takeObject(r2);\n }\n var v1 = getArrayU8FromWasm0(r0, r1).slice();\n wasm.__wbindgen_free(r0, r1 * 1, 1);\n return v1;\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n }\n }\n /**\n * Get a string representation of the verifying key\n *\n * @returns {String} String representation of the verifying key\n * @returns {string}\n */\n toString() {\n let deferred1_0;\n let deferred1_1;\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n wasm.verifyingkey_toString(retptr, this.__wbg_ptr);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n deferred1_0 = r0;\n deferred1_1 = r1;\n return getStringFromWasm0(r0, r1);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);\n }\n }\n}\n\nconst ViewKeyFinalization = (typeof FinalizationRegistry === 'undefined')\n ? { register: () => {}, unregister: () => {} }\n : new FinalizationRegistry(ptr => wasm.__wbg_viewkey_free(ptr >>> 0));\n/**\n*/\nclass ViewKey {\n\n static __wrap(ptr) {\n ptr = ptr >>> 0;\n const obj = Object.create(ViewKey.prototype);\n obj.__wbg_ptr = ptr;\n ViewKeyFinalization.register(obj, obj.__wbg_ptr, obj);\n return obj;\n }\n\n __destroy_into_raw() {\n const ptr = this.__wbg_ptr;\n this.__wbg_ptr = 0;\n ViewKeyFinalization.unregister(this);\n return ptr;\n }\n\n free() {\n const ptr = this.__destroy_into_raw();\n wasm.__wbg_viewkey_free(ptr);\n }\n /**\n * Create a new view key from a private key\n *\n * @param {PrivateKey} private_key Private key\n * @returns {ViewKey} View key\n * @param {PrivateKey} private_key\n * @returns {ViewKey}\n */\n static from_private_key(private_key) {\n _assertClass(private_key, PrivateKey);\n const ret = wasm.privatekey_to_view_key(private_key.__wbg_ptr);\n return ViewKey.__wrap(ret);\n }\n /**\n * Create a new view key from a string representation of a view key\n *\n * @param {string} view_key String representation of a view key\n * @returns {ViewKey} View key\n * @param {string} view_key\n * @returns {ViewKey}\n */\n static from_string(view_key) {\n const ptr0 = passStringToWasm0(view_key, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n const ret = wasm.viewkey_from_string(ptr0, len0);\n return ViewKey.__wrap(ret);\n }\n /**\n * Get a string representation of a view key\n *\n * @returns {string} String representation of a view key\n * @returns {string}\n */\n to_string() {\n let deferred1_0;\n let deferred1_1;\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n wasm.viewkey_to_string(retptr, this.__wbg_ptr);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n deferred1_0 = r0;\n deferred1_1 = r1;\n return getStringFromWasm0(r0, r1);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);\n }\n }\n /**\n * Get the address corresponding to a view key\n *\n * @returns {Address} Address\n * @returns {Address}\n */\n to_address() {\n const ret = wasm.address_from_view_key(this.__wbg_ptr);\n return Address.__wrap(ret);\n }\n /**\n * Decrypt a record ciphertext with a view key\n *\n * @param {string} ciphertext String representation of a record ciphertext\n * @returns {string} String representation of a record plaintext\n * @param {string} ciphertext\n * @returns {string}\n */\n decrypt(ciphertext) {\n let deferred3_0;\n let deferred3_1;\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n const ptr0 = passStringToWasm0(ciphertext, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n wasm.viewkey_decrypt(retptr, this.__wbg_ptr, ptr0, len0);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n var r2 = getInt32Memory0()[retptr / 4 + 2];\n var r3 = getInt32Memory0()[retptr / 4 + 3];\n var ptr2 = r0;\n var len2 = r1;\n if (r3) {\n ptr2 = 0; len2 = 0;\n throw takeObject(r2);\n }\n deferred3_0 = ptr2;\n deferred3_1 = len2;\n return getStringFromWasm0(ptr2, len2);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n wasm.__wbindgen_free(deferred3_0, deferred3_1, 1);\n }\n }\n}\n\nasync function __wbg_load(module, imports) {\n if (typeof Response === 'function' && module instanceof Response) {\n if (typeof WebAssembly.instantiateStreaming === 'function') {\n try {\n return await WebAssembly.instantiateStreaming(module, imports);\n\n } catch (e) {\n if (module.headers.get('Content-Type') != 'application/wasm') {\n console.warn(\"`WebAssembly.instantiateStreaming` failed because your server does not serve wasm with `application/wasm` MIME type. Falling back to `WebAssembly.instantiate` which is slower. Original error:\\n\", e);\n\n } else {\n throw e;\n }\n }\n }\n\n const bytes = await module.arrayBuffer();\n return await WebAssembly.instantiate(bytes, imports);\n\n } else {\n const instance = await WebAssembly.instantiate(module, imports);\n\n if (instance instanceof WebAssembly.Instance) {\n return { instance, module };\n\n } else {\n return instance;\n }\n }\n}\n\nfunction __wbg_get_imports() {\n const imports = {};\n imports.wbg = {};\n imports.wbg.__wbindgen_object_drop_ref = function(arg0) {\n takeObject(arg0);\n };\n imports.wbg.__wbg_new_71801a555ad9f2aa = function() { return handleError(function () {\n const ret = new XMLHttpRequest();\n return addHeapObject(ret);\n }, arguments) };\n imports.wbg.__wbg_overrideMimeType_ee9c51919ceb418b = function() { return handleError(function (arg0, arg1, arg2) {\n getObject(arg0).overrideMimeType(getStringFromWasm0(arg1, arg2));\n }, arguments) };\n imports.wbg.__wbg_open_c9eb0cf2c9d95679 = function() { return handleError(function (arg0, arg1, arg2, arg3, arg4, arg5) {\n getObject(arg0).open(getStringFromWasm0(arg1, arg2), getStringFromWasm0(arg3, arg4), arg5 !== 0);\n }, arguments) };\n imports.wbg.__wbg_send_80d29985093c1ec5 = function() { return handleError(function (arg0) {\n getObject(arg0).send();\n }, arguments) };\n imports.wbg.__wbg_response_7c2e2759084f7279 = function() { return handleError(function (arg0) {\n const ret = getObject(arg0).response;\n return addHeapObject(ret);\n }, arguments) };\n imports.wbg.__wbg_status_d485fb5a478426fb = function() { return handleError(function (arg0) {\n const ret = getObject(arg0).status;\n return ret;\n }, arguments) };\n imports.wbg.__wbg_new_72fb9a18b5ae2624 = function() {\n const ret = new Object();\n return addHeapObject(ret);\n };\n imports.wbg.__wbindgen_string_new = function(arg0, arg1) {\n const ret = getStringFromWasm0(arg0, arg1);\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_set_1f9b04f170055d33 = function() { return handleError(function (arg0, arg1, arg2) {\n const ret = Reflect.set(getObject(arg0), getObject(arg1), getObject(arg2));\n return ret;\n }, arguments) };\n imports.wbg.__wbg_new_ab6fd82b10560829 = function() { return handleError(function () {\n const ret = new Headers();\n return addHeapObject(ret);\n }, arguments) };\n imports.wbg.__wbindgen_object_clone_ref = function(arg0) {\n const ret = getObject(arg0);\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_new_0d76b0581eca6298 = function() { return handleError(function () {\n const ret = new AbortController();\n return addHeapObject(ret);\n }, arguments) };\n imports.wbg.__wbg_signal_a61f78a3478fd9bc = function(arg0) {\n const ret = getObject(arg0).signal;\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_append_7bfcb4937d1d5e29 = function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {\n getObject(arg0).append(getStringFromWasm0(arg1, arg2), getStringFromWasm0(arg3, arg4));\n }, arguments) };\n imports.wbg.__wbg_instanceof_Response_849eb93e75734b6e = function(arg0) {\n let result;\n try {\n result = getObject(arg0) instanceof Response;\n } catch (_) {\n result = false;\n }\n const ret = result;\n return ret;\n };\n imports.wbg.__wbg_status_61a01141acd3cf74 = function(arg0) {\n const ret = getObject(arg0).status;\n return ret;\n };\n imports.wbg.__wbg_url_5f6dc4009ac5f99d = function(arg0, arg1) {\n const ret = getObject(arg1).url;\n const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len1 = WASM_VECTOR_LEN;\n getInt32Memory0()[arg0 / 4 + 1] = len1;\n getInt32Memory0()[arg0 / 4 + 0] = ptr1;\n };\n imports.wbg.__wbg_headers_9620bfada380764a = function(arg0) {\n const ret = getObject(arg0).headers;\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_iterator_2cee6dadfd956dfa = function() {\n const ret = Symbol.iterator;\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_get_e3c254076557e348 = function() { return handleError(function (arg0, arg1) {\n const ret = Reflect.get(getObject(arg0), getObject(arg1));\n return addHeapObject(ret);\n }, arguments) };\n imports.wbg.__wbindgen_is_function = function(arg0) {\n const ret = typeof(getObject(arg0)) === 'function';\n return ret;\n };\n imports.wbg.__wbg_call_27c0f87801dedf93 = function() { return handleError(function (arg0, arg1) {\n const ret = getObject(arg0).call(getObject(arg1));\n return addHeapObject(ret);\n }, arguments) };\n imports.wbg.__wbindgen_is_object = function(arg0) {\n const val = getObject(arg0);\n const ret = typeof(val) === 'object' && val !== null;\n return ret;\n };\n imports.wbg.__wbg_next_40fc327bfc8770e6 = function(arg0) {\n const ret = getObject(arg0).next;\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_next_196c84450b364254 = function() { return handleError(function (arg0) {\n const ret = getObject(arg0).next();\n return addHeapObject(ret);\n }, arguments) };\n imports.wbg.__wbg_done_298b57d23c0fc80c = function(arg0) {\n const ret = getObject(arg0).done;\n return ret;\n };\n imports.wbg.__wbg_value_d93c65011f51a456 = function(arg0) {\n const ret = getObject(arg0).value;\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_abort_2aa7521d5690750e = function(arg0) {\n getObject(arg0).abort();\n };\n imports.wbg.__wbg_stringify_8887fe74e1c50d81 = function() { return handleError(function (arg0) {\n const ret = JSON.stringify(getObject(arg0));\n return addHeapObject(ret);\n }, arguments) };\n imports.wbg.__wbindgen_string_get = function(arg0, arg1) {\n const obj = getObject(arg1);\n const ret = typeof(obj) === 'string' ? obj : undefined;\n var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n var len1 = WASM_VECTOR_LEN;\n getInt32Memory0()[arg0 / 4 + 1] = len1;\n getInt32Memory0()[arg0 / 4 + 0] = ptr1;\n };\n imports.wbg.__wbg_log_0159ca40cddf5b15 = function(arg0, arg1) {\n console.log(getStringFromWasm0(arg0, arg1));\n };\n imports.wbg.__wbindgen_bigint_from_u64 = function(arg0) {\n const ret = BigInt.asUintN(64, arg0);\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_call_b3ca7c6051f9bec1 = function() { return handleError(function (arg0, arg1, arg2) {\n const ret = getObject(arg0).call(getObject(arg1), getObject(arg2));\n return addHeapObject(ret);\n }, arguments) };\n imports.wbg.__wbg_keypair_new = function(arg0) {\n const ret = KeyPair.__wrap(arg0);\n return addHeapObject(ret);\n };\n imports.wbg.__wbindgen_module = function() {\n const ret = __wbg_init.__wbindgen_wasm_module;\n return addHeapObject(ret);\n };\n imports.wbg.__wbindgen_memory = function() {\n const ret = wasm.memory;\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_spawnWorker_f6acaddb2e29dc4a = function(arg0, arg1, arg2, arg3) {\n const ret = spawnWorker(getObject(arg0), getObject(arg1), getObject(arg2), arg3 >>> 0);\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_executionresponse_new = function(arg0) {\n const ret = ExecutionResponse.__wrap(arg0);\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_transaction_new = function(arg0) {\n const ret = Transaction.__wrap(arg0);\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_newwithlength_66ae46612e7f0234 = function(arg0) {\n const ret = new Array(arg0 >>> 0);\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_set_d4638f722068f043 = function(arg0, arg1, arg2) {\n getObject(arg0)[arg1 >>> 0] = takeObject(arg2);\n };\n imports.wbg.__wbindgen_cb_drop = function(arg0) {\n const obj = takeObject(arg0).original;\n if (obj.cnt-- == 1) {\n obj.a = 0;\n return true;\n }\n const ret = false;\n return ret;\n };\n imports.wbg.__wbg_new_16b304a2cfa7ff4a = function() {\n const ret = new Array();\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_push_a5b05aedc7234f9f = function(arg0, arg1) {\n const ret = getObject(arg0).push(getObject(arg1));\n return ret;\n };\n imports.wbg.__wbg_arrayBuffer_29931d52c7206b02 = function() { return handleError(function (arg0) {\n const ret = getObject(arg0).arrayBuffer();\n return addHeapObject(ret);\n }, arguments) };\n imports.wbg.__wbg_new_63b92bc8671ed464 = function(arg0) {\n const ret = new Uint8Array(getObject(arg0));\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_length_c20a40f15020d68a = function(arg0) {\n const ret = getObject(arg0).length;\n return ret;\n };\n imports.wbg.__wbg_new_81740750da40724f = function(arg0, arg1) {\n try {\n var state0 = {a: arg0, b: arg1};\n var cb0 = (arg0, arg1) => {\n const a = state0.a;\n state0.a = 0;\n try {\n return __wbg_adapter_279(a, state0.b, arg0, arg1);\n } finally {\n state0.a = a;\n }\n };\n const ret = new Promise(cb0);\n return addHeapObject(ret);\n } finally {\n state0.a = state0.b = 0;\n }\n };\n imports.wbg.__wbindgen_number_new = function(arg0) {\n const ret = arg0;\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_new_abda76e883ba8a5f = function() {\n const ret = new Error();\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_stack_658279fe44541cf6 = function(arg0, arg1) {\n const ret = getObject(arg1).stack;\n const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len1 = WASM_VECTOR_LEN;\n getInt32Memory0()[arg0 / 4 + 1] = len1;\n getInt32Memory0()[arg0 / 4 + 0] = ptr1;\n };\n imports.wbg.__wbg_error_f851667af71bcfc6 = function(arg0, arg1) {\n let deferred0_0;\n let deferred0_1;\n try {\n deferred0_0 = arg0;\n deferred0_1 = arg1;\n console.error(getStringFromWasm0(arg0, arg1));\n } finally {\n wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);\n }\n };\n imports.wbg.__wbg_buffer_12d079cc21e14bdb = function(arg0) {\n const ret = getObject(arg0).buffer;\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_newwithbyteoffsetandlength_aa4a17c33a06e5cb = function(arg0, arg1, arg2) {\n const ret = new Uint8Array(getObject(arg0), arg1 >>> 0, arg2 >>> 0);\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_randomFillSync_5c9c955aa56b6049 = function() { return handleError(function (arg0, arg1) {\n getObject(arg0).randomFillSync(takeObject(arg1));\n }, arguments) };\n imports.wbg.__wbg_subarray_a1f73cd4b5b42fe1 = function(arg0, arg1, arg2) {\n const ret = getObject(arg0).subarray(arg1 >>> 0, arg2 >>> 0);\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_getRandomValues_3aa56aa6edec874c = function() { return handleError(function (arg0, arg1) {\n getObject(arg0).getRandomValues(getObject(arg1));\n }, arguments) };\n imports.wbg.__wbg_set_a47bac70306a19a7 = function(arg0, arg1, arg2) {\n getObject(arg0).set(getObject(arg1), arg2 >>> 0);\n };\n imports.wbg.__wbg_crypto_1d1f22824a6a080c = function(arg0) {\n const ret = getObject(arg0).crypto;\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_process_4a72847cc503995b = function(arg0) {\n const ret = getObject(arg0).process;\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_versions_f686565e586dd935 = function(arg0) {\n const ret = getObject(arg0).versions;\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_node_104a2ff8d6ea03a2 = function(arg0) {\n const ret = getObject(arg0).node;\n return addHeapObject(ret);\n };\n imports.wbg.__wbindgen_is_string = function(arg0) {\n const ret = typeof(getObject(arg0)) === 'string';\n return ret;\n };\n imports.wbg.__wbg_require_cca90b1a94a0255b = function() { return handleError(function () {\n const ret = module.require;\n return addHeapObject(ret);\n }, arguments) };\n imports.wbg.__wbg_msCrypto_eb05e62b530a1508 = function(arg0) {\n const ret = getObject(arg0).msCrypto;\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_newwithlength_e9b4878cebadb3d3 = function(arg0) {\n const ret = new Uint8Array(arg0 >>> 0);\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_length_cd7af8117672b8b8 = function(arg0) {\n const ret = getObject(arg0).length;\n return ret;\n };\n imports.wbg.__wbg_get_bd8e338fbd5f5cc8 = function(arg0, arg1) {\n const ret = getObject(arg0)[arg1 >>> 0];\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_self_ce0dbfc45cf2f5be = function() { return handleError(function () {\n const ret = self.self;\n return addHeapObject(ret);\n }, arguments) };\n imports.wbg.__wbg_window_c6fb939a7f436783 = function() { return handleError(function () {\n const ret = window.window;\n return addHeapObject(ret);\n }, arguments) };\n imports.wbg.__wbg_globalThis_d1e6af4856ba331b = function() { return handleError(function () {\n const ret = globalThis.globalThis;\n return addHeapObject(ret);\n }, arguments) };\n imports.wbg.__wbg_global_207b558942527489 = function() { return handleError(function () {\n const ret = global.global;\n return addHeapObject(ret);\n }, arguments) };\n imports.wbg.__wbindgen_is_undefined = function(arg0) {\n const ret = getObject(arg0) === undefined;\n return ret;\n };\n imports.wbg.__wbg_newnoargs_e258087cd0daa0ea = function(arg0, arg1) {\n const ret = new Function(getStringFromWasm0(arg0, arg1));\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_has_0af94d20077affa2 = function() { return handleError(function (arg0, arg1) {\n const ret = Reflect.has(getObject(arg0), getObject(arg1));\n return ret;\n }, arguments) };\n imports.wbg.__wbg_fetch_bc7c8e27076a5c84 = function(arg0) {\n const ret = fetch(getObject(arg0));\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_fetch_921fad6ef9e883dd = function(arg0, arg1) {\n const ret = getObject(arg0).fetch(getObject(arg1));\n return addHeapObject(ret);\n };\n imports.wbg.__wbindgen_debug_string = function(arg0, arg1) {\n const ret = debugString(getObject(arg1));\n const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len1 = WASM_VECTOR_LEN;\n getInt32Memory0()[arg0 / 4 + 1] = len1;\n getInt32Memory0()[arg0 / 4 + 0] = ptr1;\n };\n imports.wbg.__wbindgen_throw = function(arg0, arg1) {\n throw new Error(getStringFromWasm0(arg0, arg1));\n };\n imports.wbg.__wbindgen_rethrow = function(arg0) {\n throw takeObject(arg0);\n };\n imports.wbg.__wbg_then_a73caa9a87991566 = function(arg0, arg1, arg2) {\n const ret = getObject(arg0).then(getObject(arg1), getObject(arg2));\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_then_0c86a60e8fcfe9f6 = function(arg0, arg1) {\n const ret = getObject(arg0).then(getObject(arg1));\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_queueMicrotask_481971b0d87f3dd4 = function(arg0) {\n queueMicrotask(getObject(arg0));\n };\n imports.wbg.__wbg_queueMicrotask_3cbae2ec6b6cd3d6 = function(arg0) {\n const ret = getObject(arg0).queueMicrotask;\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_resolve_b0083a7967828ec8 = function(arg0) {\n const ret = Promise.resolve(getObject(arg0));\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_waitAsync_5d743fc9058ba01a = function() {\n const ret = Atomics.waitAsync;\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_new_8cccba86b0f574cb = function(arg0) {\n const ret = new Int32Array(getObject(arg0));\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_waitAsync_46d5c36955b71a79 = function(arg0, arg1, arg2) {\n const ret = Atomics.waitAsync(getObject(arg0), arg1, arg2);\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_async_19c0400d97cc72fe = function(arg0) {\n const ret = getObject(arg0).async;\n return ret;\n };\n imports.wbg.__wbg_value_571d60108110e917 = function(arg0) {\n const ret = getObject(arg0).value;\n return addHeapObject(ret);\n };\n imports.wbg.__wbindgen_link_fc1eedd35dc7e0a6 = function(arg0) {\n const ret = \"data:application/javascript,\" + encodeURIComponent(`onmessage = function (ev) {\n let [ia, index, value] = ev.data;\n ia = new Int32Array(ia.buffer);\n let result = Atomics.wait(ia, index, value);\n postMessage(result);\n };\n `);\n const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len1 = WASM_VECTOR_LEN;\n getInt32Memory0()[arg0 / 4 + 1] = len1;\n getInt32Memory0()[arg0 / 4 + 0] = ptr1;\n };\n imports.wbg.__wbg_new_d1187ae36d662ef9 = function() { return handleError(function (arg0, arg1) {\n const ret = new Worker(getStringFromWasm0(arg0, arg1));\n return addHeapObject(ret);\n }, arguments) };\n imports.wbg.__wbg_setonmessage_503809e5bb51bd33 = function(arg0, arg1) {\n getObject(arg0).onmessage = getObject(arg1);\n };\n imports.wbg.__wbg_of_6a70eed8d41f469c = function(arg0, arg1, arg2) {\n const ret = Array.of(getObject(arg0), getObject(arg1), getObject(arg2));\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_postMessage_7380d10e8b8269df = function() { return handleError(function (arg0, arg1) {\n getObject(arg0).postMessage(getObject(arg1));\n }, arguments) };\n imports.wbg.__wbg_data_3ce7c145ca4fbcdc = function(arg0) {\n const ret = getObject(arg0).data;\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_newwithstrandinit_3fd6fba4083ff2d0 = function() { return handleError(function (arg0, arg1, arg2) {\n const ret = new Request(getStringFromWasm0(arg0, arg1), getObject(arg2));\n return addHeapObject(ret);\n }, arguments) };\n imports.wbg.__wbg_responseText_c67ed2d48db10769 = function() { return handleError(function (arg0, arg1) {\n const ret = getObject(arg1).responseText;\n var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n var len1 = WASM_VECTOR_LEN;\n getInt32Memory0()[arg0 / 4 + 1] = len1;\n getInt32Memory0()[arg0 / 4 + 0] = ptr1;\n }, arguments) };\n imports.wbg.__wbindgen_closure_wrapper5763 = function(arg0, arg1, arg2) {\n const ret = makeMutClosure(arg0, arg1, 538, __wbg_adapter_34);\n return addHeapObject(ret);\n };\n imports.wbg.__wbindgen_closure_wrapper5788 = function(arg0, arg1, arg2) {\n const ret = makeMutClosure(arg0, arg1, 538, __wbg_adapter_34);\n return addHeapObject(ret);\n };\n\n return imports;\n}\n\nfunction __wbg_init_memory(imports, maybe_memory) {\n imports.wbg.memory = maybe_memory || new WebAssembly.Memory({initial:25,maximum:65536,shared:true});\n}\n\nfunction __wbg_finalize_init(instance, module) {\n wasm = instance.exports;\n __wbg_init.__wbindgen_wasm_module = module;\n cachedBigInt64Memory0 = null;\n cachedInt32Memory0 = null;\n cachedUint8Memory0 = null;\n\n wasm.__wbindgen_start();\n return wasm;\n}\n\nfunction initSync(module, maybe_memory) {\n if (wasm !== undefined) return wasm;\n\n const imports = __wbg_get_imports();\n\n __wbg_init_memory(imports, maybe_memory);\n\n if (!(module instanceof WebAssembly.Module)) {\n module = new WebAssembly.Module(module);\n }\n\n const instance = new WebAssembly.Instance(module, imports);\n\n return __wbg_finalize_init(instance, module);\n}\n\nasync function __wbg_init(input, maybe_memory) {\n if (wasm !== undefined) return wasm;\n\n\n const imports = __wbg_get_imports();\n\n if (typeof input === 'string' || (typeof Request === 'function' && input instanceof Request) || (typeof URL === 'function' && input instanceof URL)) {\n input = fetch(input);\n }\n\n __wbg_init_memory(imports, maybe_memory);\n\n const { instance, module } = await __wbg_load(await input, imports);\n\n return __wbg_finalize_init(instance, module);\n}\n\nvar exports = /*#__PURE__*/Object.freeze({\n __proto__: null,\n Address: Address,\n Execution: Execution,\n ExecutionResponse: ExecutionResponse,\n Field: Field,\n KeyPair: KeyPair,\n Metadata: Metadata,\n OfflineQuery: OfflineQuery,\n PrivateKey: PrivateKey,\n PrivateKeyCiphertext: PrivateKeyCiphertext,\n Program: Program,\n ProgramManager: ProgramManager,\n ProvingKey: ProvingKey,\n RecordCiphertext: RecordCiphertext,\n RecordPlaintext: RecordPlaintext,\n Signature: Signature,\n Transaction: Transaction,\n VerifyingKey: VerifyingKey,\n ViewKey: ViewKey,\n default: __wbg_init,\n initSync: initSync,\n initThreadPool: initThreadPool,\n runRayonThread: runRayonThread,\n verifyFunctionExecution: verifyFunctionExecution\n});\n\nconst wasm_path = \"assets/aleo_wasm.wasm\";\n\n \n var Cargo = async (opt = {}) => {\n let {importHook, serverPath, initializeHook} = opt;\n\n let final_path = wasm_path;\n\n if (serverPath != null) {\n final_path = serverPath + /[^\\/\\\\]*$/.exec(final_path)[0];\n }\n\n if (importHook != null) {\n final_path = importHook(final_path);\n }\n\n if (initializeHook != null) {\n await initializeHook(__wbg_init, final_path);\n\n } else {\n await __wbg_init(final_path);\n }\n\n return exports;\n };\n\nexport { Cargo as default };\n//# sourceMappingURL=wasm.js.map\n","import wasm from \"../dist/wasm.js\";\n\nconst {\n initThreadPool: wasmInitThreadPool,\n Address,\n Execution,\n ExecutionResponse,\n Field,\n Metadata,\n OfflineQuery,\n Private,\n PrivateKey,\n PrivateKeyCiphertext,\n Program,\n ProvingKey,\n RecordCiphertext,\n RecordPlaintext,\n ProgramManager,\n Signature,\n Transaction,\n ViewKey,\n VerifyingKey,\n verifyFunctionExecution,\n} = await wasm({\n importHook: () => {\n return new URL(\"assets/aleo_wasm.wasm\", import.meta.url);\n },\n});\n\nasync function initThreadPool(threads) {\n if (threads == null) {\n threads = navigator.hardwareConcurrency;\n }\n\n console.info(`Spawning ${threads} threads`);\n\n await wasmInitThreadPool(new URL(\"worker.js\", import.meta.url), threads);\n}\n\nexport {\n initThreadPool,\n Address,\n Execution,\n ExecutionResponse,\n Field,\n Metadata,\n OfflineQuery,\n PrivateKey,\n PrivateKeyCiphertext,\n Program,\n ProvingKey,\n RecordCiphertext,\n RecordPlaintext,\n ProgramManager,\n Signature,\n Transaction,\n ViewKey,\n VerifyingKey,\n verifyFunctionExecution,\n};\n"],"names":["spawnWorker","url","module","memory","address","Promise","resolve","worker","Worker","type","addEventListener","event","setTimeout","unref","capture","once","postMessage","wasm","heap","Array","fill","undefined","getObject","idx","push","heap_next","length","dropObject","takeObject","ret","cachedTextDecoder","TextDecoder","ignoreBOM","fatal","decode","Error","cachedUint8Memory0","getUint8Memory0","buffer","Uint8Array","getStringFromWasm0","ptr","len","slice","addHeapObject","obj","WASM_VECTOR_LEN","cachedTextEncoder","TextEncoder","encode","encodeString","arg","view","buf","set","read","written","passStringToWasm0","malloc","realloc","subarray","mem","offset","code","charCodeAt","isLikeNone","x","cachedInt32Memory0","getInt32Memory0","Int32Array","debugString","val","description","name","isArray","debug","i","builtInMatches","exec","toString","call","className","JSON","stringify","_","message","stack","CLOSURE_DTORS","FinalizationRegistry","register","unregister","state","__wbindgen_export_3","get","dtor","a","b","makeMutClosure","arg0","arg1","f","cnt","real","args","original","__wbg_adapter_34","arg2","_dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h442b5e922f6f9710","_assertClass","instance","klass","passArray8ToWasm0","verifyFunctionExecution$1","execution","verifying_key","program","function_id","retptr","__wbindgen_add_to_stack_pointer","Execution$1","VerifyingKey$1","Program$1","ptr0","__wbindgen_malloc","__wbindgen_realloc","len0","verifyFunctionExecution","__wbg_ptr","r0","r1","cachedBigInt64Memory0","getBigInt64Memory0","BigInt64Array","getArrayU8FromWasm0","runRayonThread","receiver","initThreadPool$1","num_threads","initThreadPool","handleError","apply","this","e","__wbindgen_exn_store","__wbg_adapter_279","arg3","wasm_bindgen__convert__closures__invoke2_mut__h5ab12ffe4b82d47a","AddressFinalization","__wbg_address_free","Address","__wrap","Object","create","prototype","__destroy_into_raw","free","from_private_key","private_key","PrivateKey$1","address_from_private_key","from_view_key","view_key","ViewKey$1","address_from_view_key","from_string","address_from_string","to_string","deferred1_0","deferred1_1","address_to_string","__wbindgen_free","verify","signature","Signature$1","address_verify","ExecutionFinalization","__wbg_execution_free","Execution","execution_toString","fromString","execution_fromString","ExecutionResponseFinalization","__wbg_executionresponse_free","ExecutionResponse","getOutputs","executionresponse_getOutputs","getExecution","executionresponse_getExecution","getKeys","executionresponse_getKeys","KeyPair","getProvingKey","executionresponse_getProvingKey","ProvingKey$1","getVerifyingKey","executionresponse_getVerifyingKey","getFunctionId","executionresponse_getFunctionId","getProgram","executionresponse_getProgram","FieldFinalization","__wbg_field_free","Field","field_toString","field","field_fromString","KeyPairFinalization","__wbg_keypair_free","constructor","proving_key","ptr1","keypair_new","provingKey","keypair_provingKey","verifyingKey","keypair_verifyingKey","MetadataFinalization","__wbg_metadata_free","Metadata","locator","__wbg_get_metadata_locator","__wbg_set_metadata_locator","prover","__wbg_get_metadata_prover","__wbg_set_metadata_prover","verifier","__wbg_get_metadata_verifier","__wbg_set_metadata_verifier","__wbg_get_metadata_verifyingKey","__wbg_set_metadata_verifyingKey","baseUrl","metadata_baseUrl","bond_public","metadata_bond_public","bond_validator","metadata_bond_validator","claim_unbond_public","metadata_claim_unbond_public","fee_private","metadata_fee_private","fee_public","metadata_fee_public","inclusion","metadata_inclusion","join","metadata_join","set_validator_state","metadata_set_validator_state","split","metadata_split","transfer_private","metadata_transfer_private","transfer_private_to_public","metadata_transfer_private_to_public","transfer_public","metadata_transfer_public","transfer_public_as_signer","metadata_transfer_public_as_signer","transfer_public_to_private","metadata_transfer_public_to_private","unbond_public","metadata_unbond_public","OfflineQueryFinalization","__wbg_offlinequery_free","OfflineQuery","state_root","offlinequery_new","addStatePath","commitment","state_path","len1","offlinequery_addStatePath","offlinequery_toString","s","offlinequery_fromString","PrivateKeyFinalization","__wbg_privatekey_free","PrivateKey","privatekey_new","from_seed_unchecked","seed","privatekey_from_seed_unchecked","privatekey_from_string","privatekey_to_string","to_view_key","privatekey_to_view_key","to_address","privatekey_to_address","Address$1","sign","privatekey_sign","newEncrypted","secret","privatekey_newEncrypted","PrivateKeyCiphertext$1","toCiphertext","privatekey_toCiphertext","fromPrivateKeyCiphertext","ciphertext","privatekey_fromPrivateKeyCiphertext","PrivateKeyCiphertextFinalization","__wbg_privatekeyciphertext_free","PrivateKeyCiphertext","encryptPrivateKey","decryptToPrivateKey","privatekeyciphertext_decryptToPrivateKey","privatekeyciphertext_toString","privatekeyciphertext_fromString","ProgramFinalization","__wbg_program_free","Program","program_fromString","program_toString","hasFunction","function_name","program_hasFunction","getFunctions","program_getFunctions","getFunctionInputs","program_getFunctionInputs","getMappings","program_getMappings","getRecordMembers","record_name","program_getRecordMembers","getStructMembers","struct_name","program_getStructMembers","getCreditsProgram","program_getCreditsProgram","id","program_id","program_address","isEqual","other","program_isEqual","getImports","program_getImports","ProgramManagerFinalization","__wbg_programmanager_free","buildDeploymentTransaction","fee_credits","fee_record","imports","fee_proving_key","fee_verifying_key","offline_query","RecordPlaintext$1","ptr2","len2","ptr3","ptr4","ptr5","OfflineQuery$1","programmanager_buildDeploymentTransaction","estimateDeploymentFee","programmanager_estimateDeploymentFee","estimateProgramNameCost","programmanager_estimateProgramNameCost","r2","BigInt","asUintN","executeFunctionOffline","_function","inputs","prove_execution","cache","len4","programmanager_executeFunctionOffline","buildExecutionTransaction","len3","ptr6","ptr7","ptr8","programmanager_buildExecutionTransaction","estimateExecutionFee","programmanager_estimateExecutionFee","estimateFinalizeFee","programmanager_estimateFinalizeFee","buildJoinTransaction","record_1","record_2","join_proving_key","join_verifying_key","programmanager_buildJoinTransaction","buildSplitTransaction","split_amount","amount_record","split_proving_key","split_verifying_key","programmanager_buildSplitTransaction","buildTransferTransaction","amount_credits","recipient","transfer_type","caller","transfer_proving_key","transfer_verifying_key","len5","ptr9","ptr10","programmanager_buildTransferTransaction","synthesizeKeyPair","programmanager_synthesizeKeyPair","ProvingKeyFinalization","__wbg_provingkey_free","ProvingKey","isBondPublicProver","provingkey_isBondPublicProver","isBondValidatorProver","provingkey_isBondValidatorProver","isClaimUnbondPublicProver","provingkey_isClaimUnbondPublicProver","isFeePrivateProver","provingkey_isFeePrivateProver","isFeePublicProver","provingkey_isFeePublicProver","isInclusionProver","provingkey_isInclusionProver","isJoinProver","provingkey_isJoinProver","isSetValidatorStateProver","provingkey_isSetValidatorStateProver","isSplitProver","provingkey_isSplitProver","isTransferPrivateProver","provingkey_isTransferPrivateProver","isTransferPrivateToPublicProver","provingkey_isTransferPrivateToPublicProver","isTransferPublicProver","provingkey_isTransferPublicProver","isTransferPublicAsSignerProver","provingkey_isTransferPublicAsSignerProver","isTransferPublicToPrivateProver","provingkey_isTransferPublicToPrivateProver","isUnbondPublicProver","provingkey_isUnbondPublicProver","checksum","provingkey_checksum","copy","provingkey_copy","fromBytes","bytes","provingkey_fromBytes","string","provingkey_fromString","toBytes","provingkey_toBytes","v1","provingkey_toString","RecordCiphertextFinalization","__wbg_recordciphertext_free","RecordCiphertext","record","recordciphertext_fromString","recordciphertext_toString","decrypt","recordciphertext_decrypt","isOwner","recordciphertext_isOwner","RecordPlaintextFinalization","__wbg_recordplaintext_free","RecordPlaintext","recordplaintext_commitment","Field$1","recordplaintext_fromString","recordplaintext_toString","microcredits","recordplaintext_microcredits","nonce","recordplaintext_nonce","serialNumberString","deferred4_0","deferred4_1","recordplaintext_serialNumberString","r3","SignatureFinalization","__wbg_signature_free","Signature","signature_verify","signature_from_string","signature_to_string","TransactionFinalization","__wbg_transaction_free","Transaction","transaction","transaction_fromString","transaction_toString","transactionId","transaction_transactionId","transactionType","transaction_transactionType","VerifyingKeyFinalization","__wbg_verifyingkey_free","VerifyingKey","bondPublicVerifier","verifyingkey_bondPublicVerifier","bondValidatorVerifier","verifyingkey_bondValidatorVerifier","claimUnbondPublicVerifier","verifyingkey_claimUnbondPublicVerifier","feePrivateVerifier","verifyingkey_feePrivateVerifier","feePublicVerifier","verifyingkey_feePublicVerifier","inclusionVerifier","verifyingkey_inclusionVerifier","joinVerifier","verifyingkey_joinVerifier","setValidatorStateVerifier","verifyingkey_setValidatorStateVerifier","splitVerifier","verifyingkey_splitVerifier","transferPrivateVerifier","verifyingkey_transferPrivateVerifier","transferPrivateToPublicVerifier","verifyingkey_transferPrivateToPublicVerifier","transferPublicVerifier","verifyingkey_transferPublicVerifier","transferPublicAsSignerVerifier","verifyingkey_transferPublicAsSignerVerifier","transferPublicToPrivateVerifier","verifyingkey_transferPublicToPrivateVerifier","unbondPublicVerifier","verifyingkey_unbondPublicVerifier","isBondPublicVerifier","verifyingkey_isBondPublicVerifier","isBondValidatorVerifier","verifyingkey_isBondValidatorVerifier","isClaimUnbondPublicVerifier","verifyingkey_isClaimUnbondPublicVerifier","isFeePrivateVerifier","verifyingkey_isFeePrivateVerifier","isFeePublicVerifier","verifyingkey_isFeePublicVerifier","isInclusionVerifier","verifyingkey_isInclusionVerifier","isJoinVerifier","verifyingkey_isJoinVerifier","isSetValidatorStateVerifier","verifyingkey_isSetValidatorStateVerifier","isSplitVerifier","verifyingkey_isSplitVerifier","isTransferPrivateVerifier","verifyingkey_isTransferPrivateVerifier","isTransferPrivateToPublicVerifier","verifyingkey_isTransferPrivateToPublicVerifier","isTransferPublicVerifier","verifyingkey_isTransferPublicVerifier","isTransferPublicAsSignerVerifier","verifyingkey_isTransferPublicAsSignerVerifier","isTransferPublicToPrivateVerifier","verifyingkey_isTransferPublicToPrivateVerifier","isUnbondPublicVerifier","verifyingkey_isUnbondPublicVerifier","verifyingkey_checksum","verifyingkey_copy","verifyingkey_fromBytes","verifyingkey_fromString","verifyingkey_toBytes","verifyingkey_toString","ViewKeyFinalization","__wbg_viewkey_free","ViewKey","viewkey_from_string","viewkey_to_string","deferred3_0","deferred3_1","viewkey_decrypt","async","__wbg_load","Response","WebAssembly","instantiateStreaming","headers","console","warn","arrayBuffer","instantiate","Instance","__wbg_get_imports","wbg","__wbindgen_object_drop_ref","__wbg_new_71801a555ad9f2aa","XMLHttpRequest","arguments","__wbg_overrideMimeType_ee9c51919ceb418b","overrideMimeType","__wbg_open_c9eb0cf2c9d95679","arg4","arg5","open","__wbg_send_80d29985093c1ec5","send","__wbg_response_7c2e2759084f7279","response","__wbg_status_d485fb5a478426fb","status","__wbg_new_72fb9a18b5ae2624","__wbindgen_string_new","__wbg_set_1f9b04f170055d33","Reflect","__wbg_new_ab6fd82b10560829","Headers","__wbindgen_object_clone_ref","__wbg_new_0d76b0581eca6298","AbortController","__wbg_signal_a61f78a3478fd9bc","signal","__wbg_append_7bfcb4937d1d5e29","append","__wbg_instanceof_Response_849eb93e75734b6e","result","__wbg_status_61a01141acd3cf74","__wbg_url_5f6dc4009ac5f99d","__wbg_headers_9620bfada380764a","__wbg_iterator_2cee6dadfd956dfa","Symbol","iterator","__wbg_get_e3c254076557e348","__wbindgen_is_function","__wbg_call_27c0f87801dedf93","__wbindgen_is_object","__wbg_next_40fc327bfc8770e6","next","__wbg_next_196c84450b364254","__wbg_done_298b57d23c0fc80c","done","__wbg_value_d93c65011f51a456","value","__wbg_abort_2aa7521d5690750e","abort","__wbg_stringify_8887fe74e1c50d81","__wbindgen_string_get","__wbg_log_0159ca40cddf5b15","log","__wbindgen_bigint_from_u64","__wbg_call_b3ca7c6051f9bec1","__wbg_keypair_new","__wbindgen_module","__wbg_init","__wbindgen_wasm_module","__wbindgen_memory","__wbg_spawnWorker_f6acaddb2e29dc4a","__wbg_executionresponse_new","ExecutionResponse$1","__wbg_transaction_new","Transaction$1","__wbg_newwithlength_66ae46612e7f0234","__wbg_set_d4638f722068f043","__wbindgen_cb_drop","__wbg_new_16b304a2cfa7ff4a","__wbg_push_a5b05aedc7234f9f","__wbg_arrayBuffer_29931d52c7206b02","__wbg_new_63b92bc8671ed464","__wbg_length_c20a40f15020d68a","__wbg_new_81740750da40724f","state0","cb0","__wbindgen_number_new","__wbg_new_abda76e883ba8a5f","__wbg_stack_658279fe44541cf6","__wbg_error_f851667af71bcfc6","deferred0_0","deferred0_1","error","__wbg_buffer_12d079cc21e14bdb","__wbg_newwithbyteoffsetandlength_aa4a17c33a06e5cb","__wbg_randomFillSync_5c9c955aa56b6049","randomFillSync","__wbg_subarray_a1f73cd4b5b42fe1","__wbg_getRandomValues_3aa56aa6edec874c","getRandomValues","__wbg_set_a47bac70306a19a7","__wbg_crypto_1d1f22824a6a080c","crypto","__wbg_process_4a72847cc503995b","process","__wbg_versions_f686565e586dd935","versions","__wbg_node_104a2ff8d6ea03a2","node","__wbindgen_is_string","__wbg_require_cca90b1a94a0255b","require","__wbg_msCrypto_eb05e62b530a1508","msCrypto","__wbg_newwithlength_e9b4878cebadb3d3","__wbg_length_cd7af8117672b8b8","__wbg_get_bd8e338fbd5f5cc8","__wbg_self_ce0dbfc45cf2f5be","self","__wbg_window_c6fb939a7f436783","window","__wbg_globalThis_d1e6af4856ba331b","globalThis","__wbg_global_207b558942527489","global","__wbindgen_is_undefined","__wbg_newnoargs_e258087cd0daa0ea","Function","__wbg_has_0af94d20077affa2","has","__wbg_fetch_bc7c8e27076a5c84","fetch","__wbg_fetch_921fad6ef9e883dd","__wbindgen_debug_string","__wbindgen_throw","__wbindgen_rethrow","__wbg_then_a73caa9a87991566","then","__wbg_then_0c86a60e8fcfe9f6","__wbg_queueMicrotask_481971b0d87f3dd4","queueMicrotask","__wbg_queueMicrotask_3cbae2ec6b6cd3d6","__wbg_resolve_b0083a7967828ec8","__wbg_waitAsync_5d743fc9058ba01a","Atomics","waitAsync","__wbg_new_8cccba86b0f574cb","__wbg_waitAsync_46d5c36955b71a79","__wbg_async_19c0400d97cc72fe","__wbg_value_571d60108110e917","__wbindgen_link_fc1eedd35dc7e0a6","encodeURIComponent","__wbg_new_d1187ae36d662ef9","__wbg_setonmessage_503809e5bb51bd33","onmessage","__wbg_of_6a70eed8d41f469c","of","__wbg_postMessage_7380d10e8b8269df","__wbg_data_3ce7c145ca4fbcdc","data","__wbg_newwithstrandinit_3fd6fba4083ff2d0","Request","__wbg_responseText_c67ed2d48db10769","responseText","__wbindgen_closure_wrapper5763","__wbindgen_closure_wrapper5788","__wbg_init_memory","maybe_memory","Memory","initial","maximum","shared","__wbg_finalize_init","exports","__wbindgen_start","initSync","Module","input","URL","freeze","__proto__","Metadata$1","ProgramManager","ProgramManager$1","RecordCiphertext$1","default","wasm_path","wasmInitThreadPool","Private","opt","importHook","serverPath","initializeHook","final_path","Cargo","threads","navigator","hardwareConcurrency","info"],"sourceRoot":""} \ No newline at end of file diff --git a/52.bundle.js b/52.bundle.js index 852a3716f..27f4d9607 100644 --- a/52.bundle.js +++ b/52.bundle.js @@ -1,3 +1,3 @@ /*! For license information please see 52.bundle.js.LICENSE.txt */ -(self.webpackChunkaleo_website=self.webpackChunkaleo_website||[]).push([[52,933],{2583:(e,t,r)=>{e.exports=r.p+"2d6a4d794221941c07b8.js"},5934:(e,t,r)=>{e.exports=r.p+"58342153fc9a001d7976.wasm"},5052:(e,t,r)=>{r.a(e,(async(e,n)=>{try{r.r(t),r.d(t,{Account:()=>f,Address:()=>i.kL,AleoKeyProvider:()=>p,AleoKeyProviderParams:()=>b,AleoNetworkClient:()=>w,BlockHeightSearch:()=>m,CREDITS_PROGRAM_KEYS:()=>T,ExecutionResponse:()=>i._U,Field:()=>i.gN,FunctionExecution:()=>i.o,KEY_STORE:()=>S,NetworkRecordProvider:()=>v,OfflineKeyProvider:()=>h,OfflineQuery:()=>i.Gd,OfflineSearchParams:()=>y,PRIVATE_TO_PUBLIC_TRANSFER:()=>F,PRIVATE_TRANSFER:()=>R,PRIVATE_TRANSFER_TYPES:()=>E,PUBLIC_TO_PRIVATE_TRANSFER:()=>A,PUBLIC_TRANSFER:()=>x,PUBLIC_TRANSFER_AS_SIGNER:()=>C,PrivateKey:()=>i._q,PrivateKeyCiphertext:()=>i.uq,Program:()=>i.$r,ProgramManager:()=>K,ProgramManagerBase:()=>i.L,ProvingKey:()=>i.zW,RecordCiphertext:()=>i.fW,RecordPlaintext:()=>i.PD,Signature:()=>i.Pc,Transaction:()=>i.YW,VALID_TRANSFER_TYPES:()=>V,VerifyingKey:()=>i.XV,ViewKey:()=>i.IO,createAleoWorker:()=>k,initThreadPool:()=>i.CK,initializeWasm:()=>u,logAndThrow:()=>l,verifyFunctionExecution:()=>i.hz});var i=r(9933),_=r(6891),a=e([i]);i=(a.then?(await a)():a)[0];class f{_privateKey;_viewKey;_address;constructor(e={}){try{this._privateKey=this.privateKeyFromParams(e)}catch(e){throw console.error("Wrong parameter",e),new Error("Wrong Parameter")}this._viewKey=i.IO.from_private_key(this._privateKey),this._address=i.kL.from_private_key(this._privateKey)}static fromCiphertext(e,t){try{e="string"==typeof e?i.uq.fromString(e):e;const r=i._q.fromPrivateKeyCiphertext(e,t);return new f({privateKey:r.to_string()})}catch(e){throw new Error("Wrong password or invalid ciphertext")}}privateKeyFromParams(e){return e.seed?i._q.from_seed_unchecked(e.seed):e.privateKey?i._q.from_string(e.privateKey):new i._q}privateKey(){return this._privateKey}viewKey(){return this._viewKey}address(){return this._address}toString(){return this.address().to_string()}encryptAccount(e){return this._privateKey.toCiphertext(e)}decryptRecord(e){return this._viewKey.decrypt(e)}decryptRecords(e){return e.map((e=>this._viewKey.decrypt(e)))}ownsRecordCiphertext(e){if("string"!=typeof e)return e.isOwner(this._viewKey);try{return i.fW.fromString(e).isOwner(this._viewKey)}catch(e){return!1}}sign(e){return this._privateKey.sign(e)}verify(e,t){return this._address.verify(e,t)}}async function o(e,t){const r=await fetch(e,t);if(!r.ok)throw new Error(r.status+" could not get URL "+e);return r}async function s(e,t){t.method="POST";const r=await fetch(e,t);if(!r.ok)throw new Error(r.status+" could not post URL "+e);return r}class w{host;headers;account;constructor(e,t){this.host=e+"/testnet",t&&t.headers?this.headers=t.headers:this.headers={"X-Aleo-SDK-Version":"0.6.12"}}setAccount(e){this.account=e}getAccount(){return this.account}setHost(e){this.host=e+"/testnet"}async fetchData(e="/"){try{const t=await o(this.host+e,{headers:this.headers});return await t.json()}catch(e){throw new Error("Error fetching data.")}}async findUnspentRecords(e,t,r,n,_,a){if(a=a||[],e<0)throw new Error("Start height must be greater than or equal to 0");const o=new Array;let s,c,d,g,l=0,u=BigInt(0);if(void 0===r){if(void 0===this.account)throw new Error("Private key must be specified in an argument to findOwnedRecords or set in the AleoNetworkClient");d=this.account._privateKey}else try{d=r instanceof i._q?r:i._q.from_string(r)}catch(e){throw new Error("Error parsing private key provided.")}const f=d.to_view_key();try{const e=await this.getLatestHeight();if("number"!=typeof e)throw new Error("Error fetching latest block height.");g=e}catch(e){throw new Error("Error fetching latest block height.")}if(c="number"==typeof t&&t<=g?t:g,e>c)throw new Error("Start height must be less than or equal to end height.");for(;c>e;){s=c-50,s=BigInt(_))))return o;if(void 0!==n&&n.length>0){let e=0;if(t.microcredits()>n[e]){if(e+=1,o.push(t),"number"==typeof _&&(u+=t.microcredits(),u>=BigInt(_)))return o;if(o.length>=n.length)return o}}}}}catch(e){}}}}}}}catch(e){if(console.warn("Error fetching blocks in range: "+s.toString()+"-"+c.toString()),console.warn("Error: ",e),l+=1,l>10)return console.warn("10 failures fetching records reached. Returning records fetched so far"),o}}return o}async getBlock(e){try{return await this.fetchData("/block/"+e)}catch(e){throw new Error("Error fetching block.")}}async getBlockRange(e,t){try{return await this.fetchData("/blocks?start="+e+"&end="+t)}catch(r){throw new Error("Error fetching blocks between "+e+" and "+t+".")}}async getDeploymentTransactionIDForProgram(e){e instanceof i.$r&&(e=e.toString());try{return(await this.fetchData("/find/transactionID/deployment/"+e)).replace('"',"")}catch(e){throw new Error("Error fetching deployment transaction for program.")}}async getDeploymentTransactionForProgram(e){try{const t=await this.getDeploymentTransactionIDForProgram(e);return await this.getTransaction(t)}catch(e){throw new Error("Error fetching deployment transaction for program.")}}async getLatestBlock(){try{return await this.fetchData("/latest/block")}catch(e){throw new Error("Error fetching latest block.")}}async getLatestCommittee(){try{return await this.fetchData("/committee/latest")}catch(e){throw new Error("Error fetching latest block.")}}async getLatestHeight(){try{return await this.fetchData("/latest/height")}catch(e){throw new Error("Error fetching latest height.")}}async getProgram(e){try{return await this.fetchData("/program/"+e)}catch(e){throw new Error("Error fetching program")}}async getProgramObject(e){try{return i.$r.fromString(e)}catch(t){try{return i.$r.fromString(await this.getProgram(e))}catch(t){throw new Error(`${e} is neither a program name or a valid program`)}}}async getProgramImports(e){try{const t={},r=(e instanceof i.$r?e:await this.getProgramObject(e)).getImports();for(let e=0;e{if(void 0===e)r(new Error("No search parameters provided, cannot retrieve keys"));else{const n=e.cacheKey,_=e.verifyCreditsKeys;if(this.cache.has(n)){const[e,a]=this.cache.get(n),o=i.zW.fromBytes(e),s=i.XV.fromBytes(a);if(_){this.verifyCreditsKeys(n,o,s)||r(new Error(`Cached keys do not match expected keys for ${n}`))}t([o,s])}else r(new Error("Keys not found in cache for "+n))}}))}verifyCreditsKeys(e,t,r){switch(e){case T.bond_public.locator:return t.isBondPublicProver()&&r.isBondPublicVerifier();case T.claim_unbond_public.locator:return t.isClaimUnbondPublicProver()&&r.isClaimUnbondPublicVerifier();case T.fee_private.locator:return t.isFeePrivateProver()&&r.isFeePrivateVerifier();case T.fee_public.locator:return t.isFeePublicProver()&&r.isFeePublicVerifier();case T.inclusion.locator:return t.isInclusionProver()&&r.isInclusionVerifier();case T.join.locator:return t.isJoinProver()&&r.isJoinVerifier();case T.set_validator_state.locator:return t.isSetValidatorStateProver()&&r.isSetValidatorStateVerifier();case T.split.locator:return t.isSplitProver()&&r.isSplitVerifier();case T.transfer_private.locator:return t.isTransferPrivateProver()&&r.isTransferPrivateVerifier();case T.transfer_private_to_public.locator:return t.isTransferPrivateToPublicProver()&&r.isTransferPrivateToPublicVerifier();case T.transfer_public.locator:return t.isTransferPublicProver()&&r.isTransferPublicVerifier();case T.transfer_public_to_private.locator:return t.isTransferPublicToPrivateProver()&&r.isTransferPublicToPrivateVerifier();case T.unbond_public.locator:return t.isUnbondPublicProver()&&r.isUnbondPublicVerifier();default:return!1}}feePrivateKeys(){return this.functionKeys(y.feePrivateKeyParams())}feePublicKeys(){return this.functionKeys(y.feePublicKeyParams())}joinKeys(){return this.functionKeys(y.joinKeyParams())}splitKeys(){return this.functionKeys(y.splitKeyParams())}transferKeys(e){if(R.has(e))return this.functionKeys(y.transferPrivateKeyParams());if(F.has(e))return this.functionKeys(y.transferPrivateToPublicKeyParams());if(x.has(e))return this.functionKeys(y.transferPublicKeyParams());if(C.has(e))return this.functionKeys(y.transferPublicAsSignerKeyParams());if(A.has(e))return this.functionKeys(y.transferPublicToPrivateKeyParams());throw new Error("Invalid visibility type")}async unBondPublicKeys(){return this.functionKeys(y.unbondPublicKeyParams())}insertBondPublicKeys(e){if(!e.isBondPublicProver())throw new Error("Attempted to insert invalid proving keys for bond_public");this.cache.set(T.bond_public.locator,[e.toBytes(),i.XV.bondPublicVerifier().toBytes()])}insertClaimUnbondPublicKeys(e){if(!e.isClaimUnbondPublicProver())throw new Error("Attempted to insert invalid proving keys for claim_unbond_public");this.cache.set(T.claim_unbond_public.locator,[e.toBytes(),i.XV.claimUnbondPublicVerifier().toBytes()])}insertFeePrivateKeys(e){if(!e.isFeePrivateProver())throw new Error("Attempted to insert invalid proving keys for fee_private");this.cache.set(T.fee_private.locator,[e.toBytes(),i.XV.feePrivateVerifier().toBytes()])}insertFeePublicKeys(e){if(!e.isFeePublicProver())throw new Error("Attempted to insert invalid proving keys for fee_public");this.cache.set(T.fee_public.locator,[e.toBytes(),i.XV.feePublicVerifier().toBytes()])}insertJoinKeys(e){if(!e.isJoinProver())throw new Error("Attempted to insert invalid proving keys for join");this.cache.set(T.join.locator,[e.toBytes(),i.XV.joinVerifier().toBytes()])}insertSetValidatorStateKeys(e){if(!e.isSetValidatorStateProver())throw new Error("Attempted to insert invalid proving keys for set_validator_state");this.cache.set(T.set_validator_state.locator,[e.toBytes(),i.XV.setValidatorStateVerifier().toBytes()])}insertSplitKeys(e){if(!e.isSplitProver())throw new Error("Attempted to insert invalid proving keys for split");this.cache.set(T.split.locator,[e.toBytes(),i.XV.splitVerifier().toBytes()])}insertTransferPrivateKeys(e){if(!e.isTransferPrivateProver())throw new Error("Attempted to insert invalid proving keys for transfer_private");this.cache.set(T.transfer_private.locator,[e.toBytes(),i.XV.transferPrivateVerifier().toBytes()])}insertTransferPrivateToPublicKeys(e){if(!e.isTransferPrivateToPublicProver())throw new Error("Attempted to insert invalid proving keys for transfer_private_to_public");this.cache.set(T.transfer_private_to_public.locator,[e.toBytes(),i.XV.transferPrivateToPublicVerifier().toBytes()])}insertTransferPublicKeys(e){if(!e.isTransferPublicProver())throw new Error("Attempted to insert invalid proving keys for transfer_public");this.cache.set(T.transfer_public.locator,[e.toBytes(),i.XV.transferPublicVerifier().toBytes()])}insertTransferPublicToPrivateKeys(e){if(!e.isTransferPublicToPrivateProver())throw new Error("Attempted to insert invalid proving keys for transfer_public_to_private");this.cache.set(T.transfer_public_to_private.locator,[e.toBytes(),i.XV.transferPublicToPrivateVerifier().toBytes()])}insertUnbondPublicKeys(e){if(!e.isUnbondPublicProver())throw new Error("Attempted to insert invalid proving keys for unbond_public");this.cache.set(T.unbond_public.locator,[e.toBytes(),i.XV.unbondPublicVerifier().toBytes()])}}class v{account;networkClient;constructor(e,t){this.account=e,this.networkClient=t}setAccount(e){this.account=e}async findCreditsRecords(e,t,r,n){let i=0,_=0;if(n&&("startHeight"in n&&"number"==typeof n.endHeight&&(i=n.startHeight),"endHeight"in n&&"number"==typeof n.endHeight&&(_=n.endHeight)),0==_){const e=await this.networkClient.getLatestHeight();if(e instanceof Error)throw l("Unable to get current block height from the network");_=e}if(i>=_)throw l("Start height must be less than end height");return await this.networkClient.findUnspentRecords(i,_,this.account.privateKey(),e,void 0,r)}async findCreditsRecord(e,t,r,n){const i=await this.findCreditsRecords([e],t,r,n);return!(i instanceof Error)&&i.length>0?i[0]:(console.error("Record not found with error:",i),new Error("Record not found"))}async findRecord(e,t,r){throw new Error("Method not implemented.")}async findRecords(e,t,r){throw new Error("Method not implemented.")}}class m{startHeight;endHeight;constructor(e,t){this.startHeight=e,this.endHeight=t}}let P=null;const k=()=>{if(!P){const e=new Worker(new URL(r.p+r.u(530),r.b),{type:void 0});P=(0,_.Ud)(e)}return P};class K{account;keyProvider;host;networkClient;recordProvider;constructor(e,t,r){this.host=e||"https://api.explorer.aleo.org/v1",this.networkClient=new w(this.host),this.keyProvider=t||new p,this.recordProvider=r}setAccount(e){this.account=e}setKeyProvider(e){this.keyProvider=e}setHost(e){this.host=e,this.networkClient.setHost(e)}setRecordProvider(e){this.recordProvider=e}async deploy(e,t,r,n,_,a){try{const t=i.$r.fromString(e);let r;try{r=await this.networkClient.getProgram(t.id())}catch(e){console.log(`Program ${t.id()} does not exist on the network, deploying...`)}if("string"==typeof r)throw`Program ${t.id()} already exists on the network, please rename your program`}catch(e){throw l(`Error validating program: ${e}`)}let o,s=a;if(void 0===a&&void 0!==this.account&&(s=this.account.privateKey()),void 0===s)throw"No private key provided and no private key set in the ProgramManager";try{_=r?await this.getCreditsRecord(t,[],_,n):void 0}catch(e){throw l(`Error finding fee record. Record finder response: '${e}'. Please ensure you're connected to a valid Aleo network and a record with enough balance exists.`)}try{o=r?await this.keyProvider.feePrivateKeys():await this.keyProvider.feePublicKeys()}catch(e){throw l(`Error finding fee keys. Key finder response: '${e}'. Please ensure your key provider is configured correctly.`)}const[c,d]=o;let g;try{g=await this.networkClient.getProgramImports(e)}catch(e){throw l(`Error finding program imports. Network response: '${e}'. Please ensure you're connected to a valid Aleo network and the program is deployed to the network.`)}const u=await i.L.buildDeploymentTransaction(s,e,t,_,this.host,g,c,d);return await this.networkClient.submitTransaction(u)}async buildExecutionTransaction(e){const{programName:t,functionName:r,fee:n,privateFee:_,inputs:a,recordSearchParams:o,keySearchParams:s,privateKey:c,offlineQuery:d}=e;let g=e.feeRecord,u=e.provingKey,f=e.verifyingKey,w=e.program,b=e.imports;if(void 0===w)try{w=await this.networkClient.getProgram(t)}catch(e){throw l(`Error finding ${t}. Network response: '${e}'. Please ensure you're connected to a valid Aleo network the program is deployed to the network.`)}else w instanceof i.$r&&(w=w.toString());let p,y=c;if(void 0===c&&void 0!==this.account&&(y=this.account.privateKey()),void 0===y)throw"No private key provided and no private key set in the ProgramManager";try{g=_?await this.getCreditsRecord(n,[],g,o):void 0}catch(e){throw l(`Error finding fee record. Record finder response: '${e}'. Please ensure you're connected to a valid Aleo network and a record with enough balance exists.`)}try{p=_?await this.keyProvider.feePrivateKeys():await this.keyProvider.feePublicKeys()}catch(e){throw l(`Error finding fee keys. Key finder response: '${e}'. Please ensure your key provider is configured correctly.`)}const[h,v]=p;if(!u||!f)try{[u,f]=await this.keyProvider.functionKeys(s)}catch(e){console.log(`Function keys not found. Key finder response: '${e}'. The function keys will be synthesized`)}if(i.$r.fromString(w).getImports().length>0&&!b)try{b=await this.networkClient.getProgramImports(t)}catch(e){throw l(`Error finding program imports. Network response: '${e}'. Please ensure you're connected to a valid Aleo network and the program is deployed to the network.`)}return await i.L.buildExecutionTransaction(y,w,r,a,n,g,this.host,b,u,f,h,v,d)}async execute(e){const t=await this.buildExecutionTransaction(e);return await this.networkClient.submitTransaction(t)}async run(e,t,r,n,_,a,o,s,c,d){let g=c;if(void 0===c&&void 0!==this.account&&(g=this.account.privateKey()),void 0===g)throw"No private key provided and no private key set in the ProgramManager";if(!o||!s)try{[o,s]=await this.keyProvider.functionKeys(a)}catch(e){console.log(`Function keys not found. Key finder response: '${e}'. The function keys will be synthesized`)}return console.log("Running program offline"),console.log("Proving key: ",o),console.log("Verifying key: ",s),i.L.executeFunctionOffline(g,e,t,r,n,!1,_,o,s,this.host,d)}async join(e,t,r,n,_,a,o,s){let c,d,g=o;if(void 0===o&&void 0!==this.account&&(g=this.account.privateKey()),void 0===g)throw"No private key provided and no private key set in the ProgramManager";try{c=n?await this.keyProvider.feePrivateKeys():await this.keyProvider.feePublicKeys(),d=await this.keyProvider.joinKeys()}catch(e){throw l(`Error finding fee keys. Key finder response: '${e}'. Please ensure your key provider is configured correctly.`)}const[u,f]=c,[w,b]=d;try{a=n?await this.getCreditsRecord(r,[],a,_):void 0}catch(e){throw l(`Error finding fee record. Record finder response: '${e}'. Please ensure you're connected to a valid Aleo network and a record with enough balance exists.`)}try{e=e instanceof i.PD?e:i.PD.fromString(e),t=t instanceof i.PD?t:i.PD.fromString(t)}catch(e){throw l("Records provided are not valid. Please ensure they are valid plaintext records.")}const p=await i.L.buildJoinTransaction(g,e,t,r,a,this.host,w,b,u,f,s);return await this.networkClient.submitTransaction(p)}async split(e,t,r,n){let _,a=r;if(void 0===a&&void 0!==this.account&&(a=this.account.privateKey()),void 0===a)throw"No private key provided and no private key set in the ProgramManager";try{_=await this.keyProvider.splitKeys()}catch(e){throw l(`Error finding fee keys. Key finder response: '${e}'. Please ensure your key provider is configured correctly.`)}const[o,s]=_;try{t=t instanceof i.PD?t:i.PD.fromString(t)}catch(e){throw l("Record provided is not valid. Please ensure it is a valid plaintext record.")}const c=await i.L.buildSplitTransaction(a,e,t,this.host,o,s,n);return await this.networkClient.submitTransaction(c)}async synthesizeKeys(e,t,r,n){let _,a=n;void 0===a&&(a=void 0!==this.account?this.account.privateKey():new i._q);try{_=await this.networkClient.getProgramImports(e);const n=await i.L.synthesizeKeyPair(a,e,t,r,_);return[n.provingKey(),n.verifyingKey()]}catch(e){throw l(`Could not synthesize keys - error ${e}. Please ensure the program is valid and the inputs are correct.`)}}async buildTransferTransaction(e,t,r,n,_,a,o,s,g,u){r=d(r);let f,w,b=g;if(void 0===b&&void 0!==this.account&&(b=this.account.privateKey()),void 0===b)throw"No private key provided and no private key set in the ProgramManager";try{f=_?await this.keyProvider.feePrivateKeys():await this.keyProvider.feePublicKeys(),w=await this.keyProvider.transferKeys(r)}catch(e){throw l(`Error finding fee keys. Key finder response: '${e}'. Please ensure your key provider is configured correctly.`)}const[p,y]=f,[h,v]=w;try{const e=[];c(r)?(o=await this.getCreditsRecord(n,[],o,a),e.push(o.nonce())):o=void 0,s=_?await this.getCreditsRecord(n,e,s,a):void 0}catch(e){throw l(`Error finding fee record. Record finder response: '${e}'. Please ensure you're connected to a valid Aleo network and a record with enough balance exists.`)}return await i.L.buildTransferTransaction(b,e,t,r,o,n,s,this.host,h,v,p,y,u)}async buildTransferPublicTransaction(e,t,r,n,i){return this.buildTransferTransaction(e,t,"public",r,!1,void 0,void 0,void 0,n,i)}async buildTransferPublicAsSignerTransaction(e,t,r,n,i){return this.buildTransferTransaction(e,t,"public",r,!1,void 0,void 0,void 0,n,i)}async transfer(e,t,r,n,i,_,a,o,s,c){const d=await this.buildTransferTransaction(e,t,r,n,i,_,a,o,s,c);return await this.networkClient.submitTransaction(d)}async buildBondPublicTransaction(e,t,r,n,i={}){const _=Math.trunc(1e6*n),{programName:a="credits.aleo",functionName:o="bond_public",fee:s=i.fee||.86,privateFee:c=!1,inputs:d=[e,t,r,`${_.toString()}u64`],keySearchParams:g=new b({proverUri:T.bond_public.prover,verifierUri:T.bond_public.verifier,cacheKey:"credits.aleo/bond_public"}),program:l=this.creditsProgram(),...u}=i,f={programName:a,functionName:o,fee:s,privateFee:c,inputs:d,keySearchParams:g,...u};return await this.buildExecutionTransaction(f)}async bondPublic(e,t,r,n,i={}){const _=await this.buildBondPublicTransaction(e,t,r,n,i);return await this.networkClient.submitTransaction(_)}async buildBondValidatorTransaction(e,t,r,n,i={}){const _=Math.trunc(1e6*r),a=Math.trunc(n),{programName:o="credits.aleo",functionName:s="bond_validator",fee:c=i.fee||.86,privateFee:d=!1,inputs:g=[e,t,`${_.toString()}u64`,`${a.toString()}u8`],keySearchParams:l=new b({proverUri:T.bond_validator.prover,verifierUri:T.bond_validator.verifier,cacheKey:"credits.aleo/bond_validator"}),program:u=this.creditsProgram(),...f}=i,w={programName:o,functionName:s,fee:c,privateFee:d,inputs:g,keySearchParams:l,...f};return await this.buildExecutionTransaction(w)}async bondValidator(e,t,r,n,i={}){const _=await this.buildBondValidatorTransaction(e,t,r,n,i);return await this.networkClient.submitTransaction(_)}async buildUnbondPublicTransaction(e,t,r={}){const n=Math.trunc(1e6*t),{programName:i="credits.aleo",functionName:_="unbond_public",fee:a=r.fee||1.3,privateFee:o=!1,inputs:s=[e,`${n.toString()}u64`],keySearchParams:c=new b({proverUri:T.unbond_public.prover,verifierUri:T.unbond_public.verifier,cacheKey:"credits.aleo/unbond_public"}),program:d=this.creditsProgram(),...g}=r,l={programName:i,functionName:_,fee:a,privateFee:o,inputs:s,keySearchParams:c,...g};return this.buildExecutionTransaction(l)}async unbondPublic(e,t,r={}){const n=await this.buildUnbondPublicTransaction(e,t,r);return await this.networkClient.submitTransaction(n)}async buildClaimUnbondPublicTransaction(e,t={}){const{programName:r="credits.aleo",functionName:n="claim_unbond_public",fee:i=t.fee||2,privateFee:_=!1,inputs:a=[e],keySearchParams:o=new b({proverUri:T.claim_unbond_public.prover,verifierUri:T.claim_unbond_public.verifier,cacheKey:"credits.aleo/claim_unbond_public"}),program:s=this.creditsProgram(),...c}=t,d={programName:r,functionName:n,fee:i,privateFee:_,inputs:a,keySearchParams:o,...c};return await this.buildExecutionTransaction(d)}async claimUnbondPublic(e,t={}){const r=await this.buildClaimUnbondPublicTransaction(e,t);return await this.networkClient.submitTransaction(r)}async buildSetValidatorStateTransaction(e,t={}){const{programName:r="credits.aleo",functionName:n="set_validator_state",fee:i=1,privateFee:_=!1,inputs:a=[e.toString()],keySearchParams:o=new b({proverUri:T.set_validator_state.prover,verifierUri:T.set_validator_state.verifier,cacheKey:"credits.aleo/set_validator_state"}),...s}=t,c={programName:r,functionName:n,fee:i,privateFee:_,inputs:a,keySearchParams:o,...s};return await this.execute(c)}async setValidatorState(e,t={}){const r=await this.buildSetValidatorStateTransaction(e,t);return this.networkClient.submitTransaction(r)}verifyExecution(e){try{const t=e.getExecution(),r=e.getFunctionId(),n=e.getProgram(),_=e.getVerifyingKey();return(0,i.hz)(t,_,n,r)}catch(e){return console.warn("The execution was not found in the response, cannot verify the execution"),!1}}createProgramFromSource(e){return i.$r.fromString(e)}creditsProgram(){return i.$r.getCreditsProgram()}verifyProgram(e){try{return i.$r.fromString(e),!0}catch(e){return!1}}async getCreditsRecord(e,t,r,n){try{return r instanceof i.PD?r:i.PD.fromString(r)}catch(r){try{const r=this.recordProvider;return await r.findCreditsRecord(e,!0,t,n)}catch(e){throw l(`Error finding fee record. Record finder response: '${e}'. Please ensure you're connected to a valid Aleo network and a record with enough balance exists.`)}}}}function c(e){return E.has(e)}function d(e){return V.has(e)?e:l(`Invalid transfer type '${e}'. Valid transfer types are 'private', 'privateToPublic', 'public', and 'publicToPrivate'.`)}const S=i.SF.baseUrl();function g(e){const t=i.XV[e.verifyingKey];if(!t)throw new Error("Invalid method name: "+e.verifyingKey);return{name:e.name,locator:e.locator,prover:e.prover,verifier:e.verifier,verifyingKey:t}}const T={bond_public:g(i.SF.bond_public()),bond_validator:g(i.SF.bond_validator()),claim_unbond_public:g(i.SF.claim_unbond_public()),fee_private:g(i.SF.fee_private()),fee_public:g(i.SF.fee_public()),inclusion:g(i.SF.inclusion()),join:g(i.SF.join()),set_validator_state:g(i.SF.set_validator_state()),split:g(i.SF.split()),transfer_private:g(i.SF.transfer_private()),transfer_private_to_public:g(i.SF.transfer_private_to_public()),transfer_public:g(i.SF.transfer_public()),transfer_public_as_signer:g(i.SF.transfer_public_as_signer()),transfer_public_to_private:g(i.SF.transfer_public_to_private()),unbond_public:g(i.SF.unbond_public()),getKey:function(e){return this.hasOwnProperty(e)?this[e]:new Error(`Key "${e}" not found.`)}},E=new Set(["transfer_private","private","transferPrivate","transfer_private_to_public","privateToPublic","transferPrivateToPublic"]),V=new Set(["transfer_private","private","transferPrivate","transfer_private_to_public","privateToPublic","transferPrivateToPublic","transfer_public","transfer_public_as_signer","public","public_as_signer","transferPublic","transferPublicAsSigner","transfer_public_to_private","publicToPrivate","publicAsSigner","transferPublicToPrivate"]),R=new Set(["private","transfer_private","transferPrivate"]),F=new Set(["private_to_public","privateToPublic","transfer_private_to_public","transferPrivateToPublic"]),x=new Set(["public","transfer_public","transferPublic"]),C=new Set(["public_as_signer","transfer_public_as_signer","transferPublicAsSigner"]),A=new Set(["public_to_private","publicToPrivate","transfer_public_to_private","transferPublicToPrivate"]);function l(e){throw console.error(e),e}async function u(){console.warn("initializeWasm is deprecated, you no longer need to use it")}n()}catch(B){n(B)}}))},9933:(e,t,r)=>{r.a(e,(async(e,n)=>{try{function i(e,t,r,n){return new Promise((i=>{const _=new Worker(e,{type:"module"});_.addEventListener("message",(e=>{setTimeout((()=>{i(_),_.unref&&_.unref()}),0)}),{capture:!0,once:!0}),_.postMessage({module:t,memory:r,address:n})}))}let B;r.d(t,{$r:()=>Ie,CK:()=>A,Gd:()=>Be,IO:()=>We,L:()=>Me,PD:()=>$e,Pc:()=>De,SF:()=>Ae,XV:()=>qe,YW:()=>Le,_U:()=>xe,_q:()=>Oe,fW:()=>je,gN:()=>Ce,hz:()=>He,kL:()=>Re,o:()=>Fe,uq:()=>ze,zW:()=>Ne});const U=new Array(128).fill(void 0);function _(e){return U[e]}U.push(void 0,null,!0,!1);let O=U.length;function a(e){e<132||(U[e]=O,O=e)}function o(e){const t=_(e);return a(e),t}const z="undefined"!=typeof TextDecoder?new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0}):{decode:()=>{throw Error("TextDecoder not available")}};"undefined"!=typeof TextDecoder&&z.decode();let I=null;function s(){return null!==I&&I.buffer===B.memory.buffer||(I=new Uint8Array(B.memory.buffer)),I}function c(e,t){return e>>>=0,z.decode(s().slice(e,e+t))}function d(e){O===U.length&&U.push(U.length+1);const t=O;return O=U[t],U[t]=e,t}let N=0;const j="undefined"!=typeof TextEncoder?new TextEncoder("utf-8"):{encode:()=>{throw Error("TextEncoder not available")}},$=function(e,t){const r=j.encode(e);return t.set(r),{read:e.length,written:r.length}};function g(e,t,r){if(void 0===r){const r=j.encode(e),n=t(r.length,1)>>>0;return s().subarray(n,n+r.length).set(r),N=r.length,n}let n=e.length,i=t(n,1)>>>0;const _=s();let a=0;for(;a127)break;_[i+a]=t}if(a!==n){0!==a&&(e=e.slice(a)),i=r(i,n,n=a+3*e.length,1)>>>0;const t=s().subarray(i+a,i+n);a+=$(e,t).written,i=r(i,n,a,1)>>>0}return N=a,i}function l(e){return null==e}let M=null;function u(){return null!==M&&M.buffer===B.memory.buffer||(M=new Int32Array(B.memory.buffer)),M}function f(e){const t=typeof e;if("number"==t||"boolean"==t||null==e)return`${e}`;if("string"==t)return`"${e}"`;if("symbol"==t){const t=e.description;return null==t?"Symbol":`Symbol(${t})`}if("function"==t){const t=e.name;return"string"==typeof t&&t.length>0?`Function(${t})`:"Function"}if(Array.isArray(e)){const t=e.length;let r="[";t>0&&(r+=f(e[0]));for(let n=1;n1))return toString.call(e);if(n=r[1],"Object"==n)try{return"Object("+JSON.stringify(e)+")"}catch(e){return"Object"}return e instanceof Error?`${e.name}: ${e.message}\n${e.stack}`:n}const D="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((e=>{B.__wbindgen_export_3.get(e.dtor)(e.a,e.b)}));function w(e,t,r,n){const i={a:e,b:t,cnt:1,dtor:r},_=(...e)=>{i.cnt++;const t=i.a;i.a=0;try{return n(t,i.b,...e)}finally{0==--i.cnt?(B.__wbindgen_export_3.get(i.dtor)(t,i.b),D.unregister(i)):i.a=t}};return _.original=i,D.register(_,i,i),_}function b(e,t,r){B._dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h467700a9696faab3(e,t,d(r))}function p(e,t){if(!(e instanceof t))throw new Error(`expected instance of ${t.name}`);return e.ptr}function y(e,t){const r=t(1*e.length,1)>>>0;return s().set(e,r/1),N=e.length,r}function h(e,t,r,n){try{const a=B.__wbindgen_add_to_stack_pointer(-16);p(e,X),p(t,Ke),p(r,de);const s=g(n,B.__wbindgen_malloc,B.__wbindgen_realloc),c=N;B.verifyFunctionExecution(a,e.__wbg_ptr,t.__wbg_ptr,r.__wbg_ptr,s,c);var i=u()[a/4+0],_=u()[a/4+1];if(u()[a/4+2])throw o(_);return 0!==i}finally{B.__wbindgen_add_to_stack_pointer(16)}}let L=null;function v(){return null!==L&&L.buffer===B.memory.buffer||(L=new BigInt64Array(B.memory.buffer)),L}function m(e,t){return e>>>=0,s().subarray(e/1,e/1+t)}function P(e){B.runRayonThread(e)}function k(e,t){return o(B.initThreadPool(d(e),t))}function K(e,t){try{return e.apply(this,t)}catch(e){B.__wbindgen_exn_store(d(e))}}function S(e,t,r,n){B.wasm_bindgen__convert__closures__invoke2_mut__h381bef3cd886b4c7(e,t,d(r),d(n))}const W="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((e=>B.__wbg_address_free(e>>>0)));let q=class e{static __wrap(t){t>>>=0;const r=Object.create(e.prototype);return r.__wbg_ptr=t,W.register(r,r.__wbg_ptr,r),r}__destroy_into_raw(){const e=this.__wbg_ptr;return this.__wbg_ptr=0,W.unregister(this),e}free(){const e=this.__destroy_into_raw();B.__wbg_address_free(e)}static from_private_key(t){p(t,ae);const r=B.address_from_private_key(t.__wbg_ptr);return e.__wrap(r)}static from_view_key(t){p(t,Te);const r=B.address_from_view_key(t.__wbg_ptr);return e.__wrap(r)}static from_string(t){const r=g(t,B.__wbindgen_malloc,B.__wbindgen_realloc),n=N,i=B.address_from_string(r,n);return e.__wrap(i)}to_string(){let e,t;try{const i=B.__wbindgen_add_to_stack_pointer(-16);B.address_to_string(i,this.__wbg_ptr);var r=u()[i/4+0],n=u()[i/4+1];return e=r,t=n,c(r,n)}finally{B.__wbindgen_add_to_stack_pointer(16),B.__wbindgen_free(e,t,1)}}verify(e,t){const r=y(e,B.__wbindgen_malloc),n=N;p(t,ve);return 0!==B.address_verify(this.__wbg_ptr,r,n,t.__wbg_ptr)}};const H="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((e=>B.__wbg_execution_free(e>>>0)));let X=class e{static __wrap(t){t>>>=0;const r=Object.create(e.prototype);return r.__wbg_ptr=t,H.register(r,r.__wbg_ptr,r),r}__destroy_into_raw(){const e=this.__wbg_ptr;return this.__wbg_ptr=0,H.unregister(this),e}free(){const e=this.__destroy_into_raw();B.__wbg_execution_free(e)}toString(){let e,t;try{const i=B.__wbindgen_add_to_stack_pointer(-16);B.execution_toString(i,this.__wbg_ptr);var r=u()[i/4+0],n=u()[i/4+1];return e=r,t=n,c(r,n)}finally{B.__wbindgen_add_to_stack_pointer(16),B.__wbindgen_free(e,t,1)}}static fromString(t){try{const i=B.__wbindgen_add_to_stack_pointer(-16),_=g(t,B.__wbindgen_malloc,B.__wbindgen_realloc),a=N;B.execution_fromString(i,_,a);var r=u()[i/4+0],n=u()[i/4+1];if(u()[i/4+2])throw o(n);return e.__wrap(r)}finally{B.__wbindgen_add_to_stack_pointer(16)}}};const J="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((e=>B.__wbg_executionresponse_free(e>>>0)));let Y=class e{static __wrap(t){t>>>=0;const r=Object.create(e.prototype);return r.__wbg_ptr=t,J.register(r,r.__wbg_ptr,r),r}__destroy_into_raw(){const e=this.__wbg_ptr;return this.__wbg_ptr=0,J.unregister(this),e}free(){const e=this.__destroy_into_raw();B.__wbg_executionresponse_free(e)}getOutputs(){return o(B.executionresponse_getOutputs(this.__wbg_ptr))}getExecution(){const e=B.executionresponse_getExecution(this.__wbg_ptr);return 0===e?void 0:X.__wrap(e)}getKeys(){try{const r=B.__wbindgen_add_to_stack_pointer(-16);B.executionresponse_getKeys(r,this.__wbg_ptr);var e=u()[r/4+0],t=u()[r/4+1];if(u()[r/4+2])throw o(t);return ee.__wrap(e)}finally{B.__wbindgen_add_to_stack_pointer(16)}}getProvingKey(){const e=B.executionresponse_getProvingKey(this.__wbg_ptr);return 0===e?void 0:fe.__wrap(e)}getVerifyingKey(){const e=B.executionresponse_getVerifyingKey(this.__wbg_ptr);return Ke.__wrap(e)}getFunctionId(){let e,t;try{const i=B.__wbindgen_add_to_stack_pointer(-16);B.executionresponse_getFunctionId(i,this.__wbg_ptr);var r=u()[i/4+0],n=u()[i/4+1];return e=r,t=n,c(r,n)}finally{B.__wbindgen_add_to_stack_pointer(16),B.__wbindgen_free(e,t,1)}}getProgram(){const e=B.executionresponse_getProgram(this.__wbg_ptr);return de.__wrap(e)}};const G="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((e=>B.__wbg_field_free(e>>>0)));let Q=class e{static __wrap(t){t>>>=0;const r=Object.create(e.prototype);return r.__wbg_ptr=t,G.register(r,r.__wbg_ptr,r),r}__destroy_into_raw(){const e=this.__wbg_ptr;return this.__wbg_ptr=0,G.unregister(this),e}free(){const e=this.__destroy_into_raw();B.__wbg_field_free(e)}toString(){let e,t;try{const i=B.__wbindgen_add_to_stack_pointer(-16);B.field_toString(i,this.__wbg_ptr);var r=u()[i/4+0],n=u()[i/4+1];return e=r,t=n,c(r,n)}finally{B.__wbindgen_add_to_stack_pointer(16),B.__wbindgen_free(e,t,1)}}static fromString(t){try{const i=B.__wbindgen_add_to_stack_pointer(-16),_=g(t,B.__wbindgen_malloc,B.__wbindgen_realloc),a=N;B.field_fromString(i,_,a);var r=u()[i/4+0],n=u()[i/4+1];if(u()[i/4+2])throw o(n);return e.__wrap(r)}finally{B.__wbindgen_add_to_stack_pointer(16)}}};const Z="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((e=>B.__wbg_keypair_free(e>>>0)));class ee{static __wrap(e){e>>>=0;const t=Object.create(ee.prototype);return t.__wbg_ptr=e,Z.register(t,t.__wbg_ptr,t),t}__destroy_into_raw(){const e=this.__wbg_ptr;return this.__wbg_ptr=0,Z.unregister(this),e}free(){const e=this.__destroy_into_raw();B.__wbg_keypair_free(e)}constructor(e,t){p(e,fe);var r=e.__destroy_into_raw();p(t,Ke);var n=t.__destroy_into_raw();const i=B.keypair_new(r,n);return this.__wbg_ptr=i>>>0,this}provingKey(){try{const r=B.__wbindgen_add_to_stack_pointer(-16);B.keypair_provingKey(r,this.__wbg_ptr);var e=u()[r/4+0],t=u()[r/4+1];if(u()[r/4+2])throw o(t);return fe.__wrap(e)}finally{B.__wbindgen_add_to_stack_pointer(16)}}verifyingKey(){try{const r=B.__wbindgen_add_to_stack_pointer(-16);B.keypair_verifyingKey(r,this.__wbg_ptr);var e=u()[r/4+0],t=u()[r/4+1];if(u()[r/4+2])throw o(t);return Ke.__wrap(e)}finally{B.__wbindgen_add_to_stack_pointer(16)}}}const te="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((e=>B.__wbg_metadata_free(e>>>0)));let re=class e{static __wrap(t){t>>>=0;const r=Object.create(e.prototype);return r.__wbg_ptr=t,te.register(r,r.__wbg_ptr,r),r}__destroy_into_raw(){const e=this.__wbg_ptr;return this.__wbg_ptr=0,te.unregister(this),e}free(){const e=this.__destroy_into_raw();B.__wbg_metadata_free(e)}get name(){let e,t;try{const i=B.__wbindgen_add_to_stack_pointer(-16);B.__wbg_get_metadata_name(i,this.__wbg_ptr);var r=u()[i/4+0],n=u()[i/4+1];return e=r,t=n,c(r,n)}finally{B.__wbindgen_add_to_stack_pointer(16),B.__wbindgen_free(e,t,1)}}set name(e){const t=g(e,B.__wbindgen_malloc,B.__wbindgen_realloc),r=N;B.__wbg_set_metadata_name(this.__wbg_ptr,t,r)}get locator(){let e,t;try{const i=B.__wbindgen_add_to_stack_pointer(-16);B.__wbg_get_metadata_locator(i,this.__wbg_ptr);var r=u()[i/4+0],n=u()[i/4+1];return e=r,t=n,c(r,n)}finally{B.__wbindgen_add_to_stack_pointer(16),B.__wbindgen_free(e,t,1)}}set locator(e){const t=g(e,B.__wbindgen_malloc,B.__wbindgen_realloc),r=N;B.__wbg_set_metadata_locator(this.__wbg_ptr,t,r)}get prover(){let e,t;try{const i=B.__wbindgen_add_to_stack_pointer(-16);B.__wbg_get_metadata_prover(i,this.__wbg_ptr);var r=u()[i/4+0],n=u()[i/4+1];return e=r,t=n,c(r,n)}finally{B.__wbindgen_add_to_stack_pointer(16),B.__wbindgen_free(e,t,1)}}set prover(e){const t=g(e,B.__wbindgen_malloc,B.__wbindgen_realloc),r=N;B.__wbg_set_metadata_prover(this.__wbg_ptr,t,r)}get verifier(){let e,t;try{const i=B.__wbindgen_add_to_stack_pointer(-16);B.__wbg_get_metadata_verifier(i,this.__wbg_ptr);var r=u()[i/4+0],n=u()[i/4+1];return e=r,t=n,c(r,n)}finally{B.__wbindgen_add_to_stack_pointer(16),B.__wbindgen_free(e,t,1)}}set verifier(e){const t=g(e,B.__wbindgen_malloc,B.__wbindgen_realloc),r=N;B.__wbg_set_metadata_verifier(this.__wbg_ptr,t,r)}get verifyingKey(){let e,t;try{const i=B.__wbindgen_add_to_stack_pointer(-16);B.__wbg_get_metadata_verifyingKey(i,this.__wbg_ptr);var r=u()[i/4+0],n=u()[i/4+1];return e=r,t=n,c(r,n)}finally{B.__wbindgen_add_to_stack_pointer(16),B.__wbindgen_free(e,t,1)}}set verifyingKey(e){const t=g(e,B.__wbindgen_malloc,B.__wbindgen_realloc),r=N;B.__wbg_set_metadata_verifyingKey(this.__wbg_ptr,t,r)}static baseUrl(){let e,t;try{const i=B.__wbindgen_add_to_stack_pointer(-16);B.metadata_baseUrl(i);var r=u()[i/4+0],n=u()[i/4+1];return e=r,t=n,c(r,n)}finally{B.__wbindgen_add_to_stack_pointer(16),B.__wbindgen_free(e,t,1)}}static bond_public(){const t=B.metadata_bond_public();return e.__wrap(t)}static bond_validator(){const t=B.metadata_bond_validator();return e.__wrap(t)}static claim_unbond_public(){const t=B.metadata_claim_unbond_public();return e.__wrap(t)}static fee_private(){const t=B.metadata_fee_private();return e.__wrap(t)}static fee_public(){const t=B.metadata_fee_public();return e.__wrap(t)}static inclusion(){const t=B.metadata_inclusion();return e.__wrap(t)}static join(){const t=B.metadata_join();return e.__wrap(t)}static set_validator_state(){const t=B.metadata_set_validator_state();return e.__wrap(t)}static split(){const t=B.metadata_split();return e.__wrap(t)}static transfer_private(){const t=B.metadata_transfer_private();return e.__wrap(t)}static transfer_private_to_public(){const t=B.metadata_transfer_private_to_public();return e.__wrap(t)}static transfer_public(){const t=B.metadata_transfer_public();return e.__wrap(t)}static transfer_public_as_signer(){const t=B.metadata_transfer_public_as_signer();return e.__wrap(t)}static transfer_public_to_private(){const t=B.metadata_transfer_public_to_private();return e.__wrap(t)}static unbond_public(){const t=B.metadata_unbond_public();return e.__wrap(t)}};const ne="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((e=>B.__wbg_offlinequery_free(e>>>0)));let ie=class e{static __wrap(t){t>>>=0;const r=Object.create(e.prototype);return r.__wbg_ptr=t,ne.register(r,r.__wbg_ptr,r),r}__destroy_into_raw(){const e=this.__wbg_ptr;return this.__wbg_ptr=0,ne.unregister(this),e}free(){const e=this.__destroy_into_raw();B.__wbg_offlinequery_free(e)}constructor(e){try{const n=B.__wbindgen_add_to_stack_pointer(-16),i=g(e,B.__wbindgen_malloc,B.__wbindgen_realloc),_=N;B.offlinequery_new(n,i,_);var t=u()[n/4+0],r=u()[n/4+1];if(u()[n/4+2])throw o(r);return this.__wbg_ptr=t>>>0,this}finally{B.__wbindgen_add_to_stack_pointer(16)}}addStatePath(e,t){try{const n=B.__wbindgen_add_to_stack_pointer(-16),i=g(e,B.__wbindgen_malloc,B.__wbindgen_realloc),_=N,a=g(t,B.__wbindgen_malloc,B.__wbindgen_realloc),s=N;B.offlinequery_addStatePath(n,this.__wbg_ptr,i,_,a,s);var r=u()[n/4+0];if(u()[n/4+1])throw o(r)}finally{B.__wbindgen_add_to_stack_pointer(16)}}toString(){let e,t;try{const i=B.__wbindgen_add_to_stack_pointer(-16);B.offlinequery_toString(i,this.__wbg_ptr);var r=u()[i/4+0],n=u()[i/4+1];return e=r,t=n,c(r,n)}finally{B.__wbindgen_add_to_stack_pointer(16),B.__wbindgen_free(e,t,1)}}static fromString(t){try{const i=B.__wbindgen_add_to_stack_pointer(-16),_=g(t,B.__wbindgen_malloc,B.__wbindgen_realloc),a=N;B.offlinequery_fromString(i,_,a);var r=u()[i/4+0],n=u()[i/4+1];if(u()[i/4+2])throw o(n);return e.__wrap(r)}finally{B.__wbindgen_add_to_stack_pointer(16)}}};const _e="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((e=>B.__wbg_privatekey_free(e>>>0)));let ae=class e{static __wrap(t){t>>>=0;const r=Object.create(e.prototype);return r.__wbg_ptr=t,_e.register(r,r.__wbg_ptr,r),r}__destroy_into_raw(){const e=this.__wbg_ptr;return this.__wbg_ptr=0,_e.unregister(this),e}free(){const e=this.__destroy_into_raw();B.__wbg_privatekey_free(e)}constructor(){const e=B.privatekey_new();return this.__wbg_ptr=e>>>0,this}static from_seed_unchecked(t){const r=y(t,B.__wbindgen_malloc),n=N,i=B.privatekey_from_seed_unchecked(r,n);return e.__wrap(i)}static from_string(t){try{const i=B.__wbindgen_add_to_stack_pointer(-16),_=g(t,B.__wbindgen_malloc,B.__wbindgen_realloc),a=N;B.privatekey_from_string(i,_,a);var r=u()[i/4+0],n=u()[i/4+1];if(u()[i/4+2])throw o(n);return e.__wrap(r)}finally{B.__wbindgen_add_to_stack_pointer(16)}}to_string(){let e,t;try{const i=B.__wbindgen_add_to_stack_pointer(-16);B.privatekey_to_string(i,this.__wbg_ptr);var r=u()[i/4+0],n=u()[i/4+1];return e=r,t=n,c(r,n)}finally{B.__wbindgen_add_to_stack_pointer(16),B.__wbindgen_free(e,t,1)}}to_view_key(){const e=B.privatekey_to_view_key(this.__wbg_ptr);return Te.__wrap(e)}to_address(){const e=B.privatekey_to_address(this.__wbg_ptr);return q.__wrap(e)}sign(e){const t=y(e,B.__wbindgen_malloc),r=N,n=B.privatekey_sign(this.__wbg_ptr,t,r);return ve.__wrap(n)}static newEncrypted(e){try{const n=B.__wbindgen_add_to_stack_pointer(-16),i=g(e,B.__wbindgen_malloc,B.__wbindgen_realloc),_=N;B.privatekey_newEncrypted(n,i,_);var t=u()[n/4+0],r=u()[n/4+1];if(u()[n/4+2])throw o(r);return se.__wrap(t)}finally{B.__wbindgen_add_to_stack_pointer(16)}}toCiphertext(e){try{const n=B.__wbindgen_add_to_stack_pointer(-16),i=g(e,B.__wbindgen_malloc,B.__wbindgen_realloc),_=N;B.privatekey_toCiphertext(n,this.__wbg_ptr,i,_);var t=u()[n/4+0],r=u()[n/4+1];if(u()[n/4+2])throw o(r);return se.__wrap(t)}finally{B.__wbindgen_add_to_stack_pointer(16)}}static fromPrivateKeyCiphertext(t,r){try{const _=B.__wbindgen_add_to_stack_pointer(-16);p(t,se);const a=g(r,B.__wbindgen_malloc,B.__wbindgen_realloc),s=N;B.privatekey_fromPrivateKeyCiphertext(_,t.__wbg_ptr,a,s);var n=u()[_/4+0],i=u()[_/4+1];if(u()[_/4+2])throw o(i);return e.__wrap(n)}finally{B.__wbindgen_add_to_stack_pointer(16)}}};const oe="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((e=>B.__wbg_privatekeyciphertext_free(e>>>0)));let se=class e{static __wrap(t){t>>>=0;const r=Object.create(e.prototype);return r.__wbg_ptr=t,oe.register(r,r.__wbg_ptr,r),r}__destroy_into_raw(){const e=this.__wbg_ptr;return this.__wbg_ptr=0,oe.unregister(this),e}free(){const e=this.__destroy_into_raw();B.__wbg_privatekeyciphertext_free(e)}static encryptPrivateKey(t,r){try{const _=B.__wbindgen_add_to_stack_pointer(-16);p(t,ae);const a=g(r,B.__wbindgen_malloc,B.__wbindgen_realloc),s=N;B.privatekey_toCiphertext(_,t.__wbg_ptr,a,s);var n=u()[_/4+0],i=u()[_/4+1];if(u()[_/4+2])throw o(i);return e.__wrap(n)}finally{B.__wbindgen_add_to_stack_pointer(16)}}decryptToPrivateKey(e){try{const n=B.__wbindgen_add_to_stack_pointer(-16),i=g(e,B.__wbindgen_malloc,B.__wbindgen_realloc),_=N;B.privatekeyciphertext_decryptToPrivateKey(n,this.__wbg_ptr,i,_);var t=u()[n/4+0],r=u()[n/4+1];if(u()[n/4+2])throw o(r);return ae.__wrap(t)}finally{B.__wbindgen_add_to_stack_pointer(16)}}toString(){let e,t;try{const i=B.__wbindgen_add_to_stack_pointer(-16);B.privatekeyciphertext_toString(i,this.__wbg_ptr);var r=u()[i/4+0],n=u()[i/4+1];return e=r,t=n,c(r,n)}finally{B.__wbindgen_add_to_stack_pointer(16),B.__wbindgen_free(e,t,1)}}static fromString(t){try{const i=B.__wbindgen_add_to_stack_pointer(-16),_=g(t,B.__wbindgen_malloc,B.__wbindgen_realloc),a=N;B.privatekeyciphertext_fromString(i,_,a);var r=u()[i/4+0],n=u()[i/4+1];if(u()[i/4+2])throw o(n);return e.__wrap(r)}finally{B.__wbindgen_add_to_stack_pointer(16)}}};const ce="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((e=>B.__wbg_program_free(e>>>0)));let de=class e{static __wrap(t){t>>>=0;const r=Object.create(e.prototype);return r.__wbg_ptr=t,ce.register(r,r.__wbg_ptr,r),r}__destroy_into_raw(){const e=this.__wbg_ptr;return this.__wbg_ptr=0,ce.unregister(this),e}free(){const e=this.__destroy_into_raw();B.__wbg_program_free(e)}static fromString(t){try{const i=B.__wbindgen_add_to_stack_pointer(-16),_=g(t,B.__wbindgen_malloc,B.__wbindgen_realloc),a=N;B.program_fromString(i,_,a);var r=u()[i/4+0],n=u()[i/4+1];if(u()[i/4+2])throw o(n);return e.__wrap(r)}finally{B.__wbindgen_add_to_stack_pointer(16)}}toString(){let e,t;try{const i=B.__wbindgen_add_to_stack_pointer(-16);B.program_toString(i,this.__wbg_ptr);var r=u()[i/4+0],n=u()[i/4+1];return e=r,t=n,c(r,n)}finally{B.__wbindgen_add_to_stack_pointer(16),B.__wbindgen_free(e,t,1)}}hasFunction(e){const t=g(e,B.__wbindgen_malloc,B.__wbindgen_realloc),r=N;return 0!==B.program_hasFunction(this.__wbg_ptr,t,r)}getFunctions(){return o(B.program_getFunctions(this.__wbg_ptr))}getFunctionInputs(e){try{const n=B.__wbindgen_add_to_stack_pointer(-16),i=g(e,B.__wbindgen_malloc,B.__wbindgen_realloc),_=N;B.program_getFunctionInputs(n,this.__wbg_ptr,i,_);var t=u()[n/4+0],r=u()[n/4+1];if(u()[n/4+2])throw o(r);return o(t)}finally{B.__wbindgen_add_to_stack_pointer(16)}}getMappings(){try{const r=B.__wbindgen_add_to_stack_pointer(-16);B.program_getMappings(r,this.__wbg_ptr);var e=u()[r/4+0],t=u()[r/4+1];if(u()[r/4+2])throw o(t);return o(e)}finally{B.__wbindgen_add_to_stack_pointer(16)}}getRecordMembers(e){try{const n=B.__wbindgen_add_to_stack_pointer(-16),i=g(e,B.__wbindgen_malloc,B.__wbindgen_realloc),_=N;B.program_getRecordMembers(n,this.__wbg_ptr,i,_);var t=u()[n/4+0],r=u()[n/4+1];if(u()[n/4+2])throw o(r);return o(t)}finally{B.__wbindgen_add_to_stack_pointer(16)}}getStructMembers(e){try{const n=B.__wbindgen_add_to_stack_pointer(-16),i=g(e,B.__wbindgen_malloc,B.__wbindgen_realloc),_=N;B.program_getStructMembers(n,this.__wbg_ptr,i,_);var t=u()[n/4+0],r=u()[n/4+1];if(u()[n/4+2])throw o(r);return o(t)}finally{B.__wbindgen_add_to_stack_pointer(16)}}static getCreditsProgram(){const t=B.program_getCreditsProgram();return e.__wrap(t)}id(){let e,t;try{const i=B.__wbindgen_add_to_stack_pointer(-16);B.program_id(i,this.__wbg_ptr);var r=u()[i/4+0],n=u()[i/4+1];return e=r,t=n,c(r,n)}finally{B.__wbindgen_add_to_stack_pointer(16),B.__wbindgen_free(e,t,1)}}address(){try{const r=B.__wbindgen_add_to_stack_pointer(-16);B.program_address(r,this.__wbg_ptr);var e=u()[r/4+0],t=u()[r/4+1];if(u()[r/4+2])throw o(t);return q.__wrap(e)}finally{B.__wbindgen_add_to_stack_pointer(16)}}isEqual(t){p(t,e);return 0!==B.program_isEqual(this.__wbg_ptr,t.__wbg_ptr)}getImports(){return o(B.program_getImports(this.__wbg_ptr))}};const ge="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((e=>B.__wbg_programmanager_free(e>>>0)));let le=class{__destroy_into_raw(){const e=this.__wbg_ptr;return this.__wbg_ptr=0,ge.unregister(this),e}free(){const e=this.__destroy_into_raw();B.__wbg_programmanager_free(e)}static buildDeploymentTransaction(e,t,r,n,i,_,a,s,c){p(e,ae);const u=g(t,B.__wbindgen_malloc,B.__wbindgen_realloc),f=N;let w=0;l(n)||(p(n,ye),w=n.__destroy_into_raw());var b=l(i)?0:g(i,B.__wbindgen_malloc,B.__wbindgen_realloc),y=N;let h=0;l(a)||(p(a,fe),h=a.__destroy_into_raw());let v=0;l(s)||(p(s,Ke),v=s.__destroy_into_raw());let m=0;l(c)||(p(c,ie),m=c.__destroy_into_raw());return o(B.programmanager_buildDeploymentTransaction(e.__wbg_ptr,u,f,r,w,b,y,l(_)?0:d(_),h,v,m))}static estimateDeploymentFee(e,t){const r=g(e,B.__wbindgen_malloc,B.__wbindgen_realloc),n=N;return o(B.programmanager_estimateDeploymentFee(r,n,l(t)?0:d(t)))}static estimateProgramNameCost(e){try{const n=B.__wbindgen_add_to_stack_pointer(-16),i=g(e,B.__wbindgen_malloc,B.__wbindgen_realloc),_=N;B.programmanager_estimateProgramNameCost(n,i,_);var t=v()[n/8+0],r=u()[n/4+2];if(u()[n/4+3])throw o(r);return BigInt.asUintN(64,t)}finally{B.__wbindgen_add_to_stack_pointer(16)}}static executeFunctionOffline(e,t,r,n,i,_,a,s,c,u,f){p(e,ae);const w=g(t,B.__wbindgen_malloc,B.__wbindgen_realloc),b=N,y=g(r,B.__wbindgen_malloc,B.__wbindgen_realloc),h=N;let v=0;l(s)||(p(s,fe),v=s.__destroy_into_raw());let m=0;l(c)||(p(c,Ke),m=c.__destroy_into_raw());var P=l(u)?0:g(u,B.__wbindgen_malloc,B.__wbindgen_realloc),k=N;let K=0;l(f)||(p(f,ie),K=f.__destroy_into_raw());return o(B.programmanager_executeFunctionOffline(e.__wbg_ptr,w,b,y,h,d(n),i,_,l(a)?0:d(a),v,m,P,k,K))}static buildExecutionTransaction(e,t,r,n,i,_,a,s,c,u,f,w,b){p(e,ae);const y=g(t,B.__wbindgen_malloc,B.__wbindgen_realloc),h=N,v=g(r,B.__wbindgen_malloc,B.__wbindgen_realloc),m=N;let P=0;l(_)||(p(_,ye),P=_.__destroy_into_raw());var k=l(a)?0:g(a,B.__wbindgen_malloc,B.__wbindgen_realloc),K=N;let S=0;l(c)||(p(c,fe),S=c.__destroy_into_raw());let T=0;l(u)||(p(u,Ke),T=u.__destroy_into_raw());let E=0;l(f)||(p(f,fe),E=f.__destroy_into_raw());let V=0;l(w)||(p(w,Ke),V=w.__destroy_into_raw());let R=0;l(b)||(p(b,ie),R=b.__destroy_into_raw());return o(B.programmanager_buildExecutionTransaction(e.__wbg_ptr,y,h,v,m,d(n),i,P,k,K,l(s)?0:d(s),S,T,E,V,R))}static estimateExecutionFee(e,t,r,n,i,_,a,s,c){p(e,ae);const u=g(t,B.__wbindgen_malloc,B.__wbindgen_realloc),f=N,w=g(r,B.__wbindgen_malloc,B.__wbindgen_realloc),b=N;var y=l(i)?0:g(i,B.__wbindgen_malloc,B.__wbindgen_realloc),h=N;let v=0;l(a)||(p(a,fe),v=a.__destroy_into_raw());let m=0;l(s)||(p(s,Ke),m=s.__destroy_into_raw());let P=0;l(c)||(p(c,ie),P=c.__destroy_into_raw());return o(B.programmanager_estimateExecutionFee(e.__wbg_ptr,u,f,w,b,d(n),y,h,l(_)?0:d(_),v,m,P))}static estimateFinalizeFee(e,t){try{const i=B.__wbindgen_add_to_stack_pointer(-16),_=g(e,B.__wbindgen_malloc,B.__wbindgen_realloc),a=N,s=g(t,B.__wbindgen_malloc,B.__wbindgen_realloc),c=N;B.programmanager_estimateFinalizeFee(i,_,a,s,c);var r=v()[i/8+0],n=u()[i/4+2];if(u()[i/4+3])throw o(n);return BigInt.asUintN(64,r)}finally{B.__wbindgen_add_to_stack_pointer(16)}}static buildJoinTransaction(e,t,r,n,i,_,a,s,c,d,u){p(e,ae),p(t,ye);var f=t.__destroy_into_raw();p(r,ye);var w=r.__destroy_into_raw();let b=0;l(i)||(p(i,ye),b=i.__destroy_into_raw());var y=l(_)?0:g(_,B.__wbindgen_malloc,B.__wbindgen_realloc),h=N;let v=0;l(a)||(p(a,fe),v=a.__destroy_into_raw());let m=0;l(s)||(p(s,Ke),m=s.__destroy_into_raw());let P=0;l(c)||(p(c,fe),P=c.__destroy_into_raw());let k=0;l(d)||(p(d,Ke),k=d.__destroy_into_raw());let K=0;l(u)||(p(u,ie),K=u.__destroy_into_raw());return o(B.programmanager_buildJoinTransaction(e.__wbg_ptr,f,w,n,b,y,h,v,m,P,k,K))}static buildSplitTransaction(e,t,r,n,i,_,a){p(e,ae),p(r,ye);var s=r.__destroy_into_raw(),c=l(n)?0:g(n,B.__wbindgen_malloc,B.__wbindgen_realloc),d=N;let u=0;l(i)||(p(i,fe),u=i.__destroy_into_raw());let f=0;l(_)||(p(_,Ke),f=_.__destroy_into_raw());let w=0;l(a)||(p(a,ie),w=a.__destroy_into_raw());return o(B.programmanager_buildSplitTransaction(e.__wbg_ptr,t,s,c,d,u,f,w))}static buildTransferTransaction(e,t,r,n,i,_,a,s,c,d,u,f,w){p(e,ae);const b=g(r,B.__wbindgen_malloc,B.__wbindgen_realloc),y=N,h=g(n,B.__wbindgen_malloc,B.__wbindgen_realloc),v=N;let m=0;l(i)||(p(i,ye),m=i.__destroy_into_raw());let P=0;l(a)||(p(a,ye),P=a.__destroy_into_raw());var k=l(s)?0:g(s,B.__wbindgen_malloc,B.__wbindgen_realloc),K=N;let S=0;l(c)||(p(c,fe),S=c.__destroy_into_raw());let T=0;l(d)||(p(d,Ke),T=d.__destroy_into_raw());let E=0;l(u)||(p(u,fe),E=u.__destroy_into_raw());let V=0;l(f)||(p(f,Ke),V=f.__destroy_into_raw());let R=0;l(w)||(p(w,ie),R=w.__destroy_into_raw());return o(B.programmanager_buildTransferTransaction(e.__wbg_ptr,t,b,y,h,v,m,_,P,k,K,S,T,E,V,R))}static synthesizeKeyPair(e,t,r,n,i){p(e,ae);const _=g(t,B.__wbindgen_malloc,B.__wbindgen_realloc),a=N,s=g(r,B.__wbindgen_malloc,B.__wbindgen_realloc),c=N;return o(B.programmanager_synthesizeKeyPair(e.__wbg_ptr,_,a,s,c,d(n),l(i)?0:d(i)))}};const ue="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((e=>B.__wbg_provingkey_free(e>>>0)));let fe=class e{static __wrap(t){t>>>=0;const r=Object.create(e.prototype);return r.__wbg_ptr=t,ue.register(r,r.__wbg_ptr,r),r}__destroy_into_raw(){const e=this.__wbg_ptr;return this.__wbg_ptr=0,ue.unregister(this),e}free(){const e=this.__destroy_into_raw();B.__wbg_provingkey_free(e)}isBondPublicProver(){return 0!==B.provingkey_isBondPublicProver(this.__wbg_ptr)}isBondValidatorProver(){return 0!==B.provingkey_isBondValidatorProver(this.__wbg_ptr)}isClaimUnbondPublicProver(){return 0!==B.provingkey_isClaimUnbondPublicProver(this.__wbg_ptr)}isFeePrivateProver(){return 0!==B.provingkey_isFeePrivateProver(this.__wbg_ptr)}isFeePublicProver(){return 0!==B.provingkey_isFeePublicProver(this.__wbg_ptr)}isInclusionProver(){return 0!==B.provingkey_isInclusionProver(this.__wbg_ptr)}isJoinProver(){return 0!==B.provingkey_isJoinProver(this.__wbg_ptr)}isSetValidatorStateProver(){return 0!==B.provingkey_isSetValidatorStateProver(this.__wbg_ptr)}isSplitProver(){return 0!==B.provingkey_isSplitProver(this.__wbg_ptr)}isTransferPrivateProver(){return 0!==B.provingkey_isTransferPrivateProver(this.__wbg_ptr)}isTransferPrivateToPublicProver(){return 0!==B.provingkey_isTransferPrivateToPublicProver(this.__wbg_ptr)}isTransferPublicProver(){return 0!==B.provingkey_isTransferPublicProver(this.__wbg_ptr)}isTransferPublicAsSignerProver(){return 0!==B.provingkey_isTransferPublicAsSignerProver(this.__wbg_ptr)}isTransferPublicToPrivateProver(){return 0!==B.provingkey_isTransferPublicToPrivateProver(this.__wbg_ptr)}isUnbondPublicProver(){return 0!==B.provingkey_isUnbondPublicProver(this.__wbg_ptr)}checksum(){let e,t;try{const i=B.__wbindgen_add_to_stack_pointer(-16);B.provingkey_checksum(i,this.__wbg_ptr);var r=u()[i/4+0],n=u()[i/4+1];return e=r,t=n,c(r,n)}finally{B.__wbindgen_add_to_stack_pointer(16),B.__wbindgen_free(e,t,1)}}copy(){const t=B.provingkey_copy(this.__wbg_ptr);return e.__wrap(t)}static fromBytes(t){try{const i=B.__wbindgen_add_to_stack_pointer(-16),_=y(t,B.__wbindgen_malloc),a=N;B.provingkey_fromBytes(i,_,a);var r=u()[i/4+0],n=u()[i/4+1];if(u()[i/4+2])throw o(n);return e.__wrap(r)}finally{B.__wbindgen_add_to_stack_pointer(16)}}static fromString(t){try{const i=B.__wbindgen_add_to_stack_pointer(-16),_=g(t,B.__wbindgen_malloc,B.__wbindgen_realloc),a=N;B.provingkey_fromString(i,_,a);var r=u()[i/4+0],n=u()[i/4+1];if(u()[i/4+2])throw o(n);return e.__wrap(r)}finally{B.__wbindgen_add_to_stack_pointer(16)}}toBytes(){try{const i=B.__wbindgen_add_to_stack_pointer(-16);B.provingkey_toBytes(i,this.__wbg_ptr);var e=u()[i/4+0],t=u()[i/4+1],r=u()[i/4+2];if(u()[i/4+3])throw o(r);var n=m(e,t).slice();return B.__wbindgen_free(e,1*t,1),n}finally{B.__wbindgen_add_to_stack_pointer(16)}}toString(){let e,t;try{const i=B.__wbindgen_add_to_stack_pointer(-16);B.provingkey_toString(i,this.__wbg_ptr);var r=u()[i/4+0],n=u()[i/4+1];return e=r,t=n,c(r,n)}finally{B.__wbindgen_add_to_stack_pointer(16),B.__wbindgen_free(e,t,1)}}};const we="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((e=>B.__wbg_recordciphertext_free(e>>>0)));let be=class e{static __wrap(t){t>>>=0;const r=Object.create(e.prototype);return r.__wbg_ptr=t,we.register(r,r.__wbg_ptr,r),r}__destroy_into_raw(){const e=this.__wbg_ptr;return this.__wbg_ptr=0,we.unregister(this),e}free(){const e=this.__destroy_into_raw();B.__wbg_recordciphertext_free(e)}static fromString(t){try{const i=B.__wbindgen_add_to_stack_pointer(-16),_=g(t,B.__wbindgen_malloc,B.__wbindgen_realloc),a=N;B.recordciphertext_fromString(i,_,a);var r=u()[i/4+0],n=u()[i/4+1];if(u()[i/4+2])throw o(n);return e.__wrap(r)}finally{B.__wbindgen_add_to_stack_pointer(16)}}toString(){let e,t;try{const i=B.__wbindgen_add_to_stack_pointer(-16);B.recordciphertext_toString(i,this.__wbg_ptr);var r=u()[i/4+0],n=u()[i/4+1];return e=r,t=n,c(r,n)}finally{B.__wbindgen_add_to_stack_pointer(16),B.__wbindgen_free(e,t,1)}}decrypt(e){try{const n=B.__wbindgen_add_to_stack_pointer(-16);p(e,Te),B.recordciphertext_decrypt(n,this.__wbg_ptr,e.__wbg_ptr);var t=u()[n/4+0],r=u()[n/4+1];if(u()[n/4+2])throw o(r);return ye.__wrap(t)}finally{B.__wbindgen_add_to_stack_pointer(16)}}isOwner(e){p(e,Te);return 0!==B.recordciphertext_isOwner(this.__wbg_ptr,e.__wbg_ptr)}};const pe="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((e=>B.__wbg_recordplaintext_free(e>>>0)));let ye=class e{static __wrap(t){t>>>=0;const r=Object.create(e.prototype);return r.__wbg_ptr=t,pe.register(r,r.__wbg_ptr,r),r}__destroy_into_raw(){const e=this.__wbg_ptr;return this.__wbg_ptr=0,pe.unregister(this),e}free(){const e=this.__destroy_into_raw();B.__wbg_recordplaintext_free(e)}commitment(e,t){try{const i=B.__wbindgen_add_to_stack_pointer(-16),_=g(e,B.__wbindgen_malloc,B.__wbindgen_realloc),a=N,s=g(t,B.__wbindgen_malloc,B.__wbindgen_realloc),c=N;B.recordplaintext_commitment(i,this.__wbg_ptr,_,a,s,c);var r=u()[i/4+0],n=u()[i/4+1];if(u()[i/4+2])throw o(n);return Q.__wrap(r)}finally{B.__wbindgen_add_to_stack_pointer(16)}}static fromString(t){try{const i=B.__wbindgen_add_to_stack_pointer(-16),_=g(t,B.__wbindgen_malloc,B.__wbindgen_realloc),a=N;B.recordplaintext_fromString(i,_,a);var r=u()[i/4+0],n=u()[i/4+1];if(u()[i/4+2])throw o(n);return e.__wrap(r)}finally{B.__wbindgen_add_to_stack_pointer(16)}}toString(){let e,t;try{const i=B.__wbindgen_add_to_stack_pointer(-16);B.recordplaintext_toString(i,this.__wbg_ptr);var r=u()[i/4+0],n=u()[i/4+1];return e=r,t=n,c(r,n)}finally{B.__wbindgen_add_to_stack_pointer(16),B.__wbindgen_free(e,t,1)}}microcredits(){const e=B.recordplaintext_microcredits(this.__wbg_ptr);return BigInt.asUintN(64,e)}nonce(){let e,t;try{const i=B.__wbindgen_add_to_stack_pointer(-16);B.recordplaintext_nonce(i,this.__wbg_ptr);var r=u()[i/4+0],n=u()[i/4+1];return e=r,t=n,c(r,n)}finally{B.__wbindgen_add_to_stack_pointer(16),B.__wbindgen_free(e,t,1)}}serialNumberString(e,t,r){let n,i;try{const w=B.__wbindgen_add_to_stack_pointer(-16);p(e,ae);const b=g(t,B.__wbindgen_malloc,B.__wbindgen_realloc),y=N,h=g(r,B.__wbindgen_malloc,B.__wbindgen_realloc),v=N;B.recordplaintext_serialNumberString(w,this.__wbg_ptr,e.__wbg_ptr,b,y,h,v);var _=u()[w/4+0],a=u()[w/4+1],s=u()[w/4+2],d=u()[w/4+3],l=_,f=a;if(d)throw l=0,f=0,o(s);return n=l,i=f,c(l,f)}finally{B.__wbindgen_add_to_stack_pointer(16),B.__wbindgen_free(n,i,1)}}};const he="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((e=>B.__wbg_signature_free(e>>>0)));let ve=class e{static __wrap(t){t>>>=0;const r=Object.create(e.prototype);return r.__wbg_ptr=t,he.register(r,r.__wbg_ptr,r),r}__destroy_into_raw(){const e=this.__wbg_ptr;return this.__wbg_ptr=0,he.unregister(this),e}free(){const e=this.__destroy_into_raw();B.__wbg_signature_free(e)}static sign(t,r){p(t,ae);const n=y(r,B.__wbindgen_malloc),i=N,_=B.privatekey_sign(t.__wbg_ptr,n,i);return e.__wrap(_)}verify(e,t){p(e,q);const r=y(t,B.__wbindgen_malloc),n=N;return 0!==B.signature_verify(this.__wbg_ptr,e.__wbg_ptr,r,n)}static from_string(t){const r=g(t,B.__wbindgen_malloc,B.__wbindgen_realloc),n=N,i=B.signature_from_string(r,n);return e.__wrap(i)}to_string(){let e,t;try{const i=B.__wbindgen_add_to_stack_pointer(-16);B.signature_to_string(i,this.__wbg_ptr);var r=u()[i/4+0],n=u()[i/4+1];return e=r,t=n,c(r,n)}finally{B.__wbindgen_add_to_stack_pointer(16),B.__wbindgen_free(e,t,1)}}};const me="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((e=>B.__wbg_transaction_free(e>>>0)));let Pe=class e{static __wrap(t){t>>>=0;const r=Object.create(e.prototype);return r.__wbg_ptr=t,me.register(r,r.__wbg_ptr,r),r}__destroy_into_raw(){const e=this.__wbg_ptr;return this.__wbg_ptr=0,me.unregister(this),e}free(){const e=this.__destroy_into_raw();B.__wbg_transaction_free(e)}static fromString(t){try{const i=B.__wbindgen_add_to_stack_pointer(-16),_=g(t,B.__wbindgen_malloc,B.__wbindgen_realloc),a=N;B.transaction_fromString(i,_,a);var r=u()[i/4+0],n=u()[i/4+1];if(u()[i/4+2])throw o(n);return e.__wrap(r)}finally{B.__wbindgen_add_to_stack_pointer(16)}}toString(){let e,t;try{const i=B.__wbindgen_add_to_stack_pointer(-16);B.transaction_toString(i,this.__wbg_ptr);var r=u()[i/4+0],n=u()[i/4+1];return e=r,t=n,c(r,n)}finally{B.__wbindgen_add_to_stack_pointer(16),B.__wbindgen_free(e,t,1)}}transactionId(){let e,t;try{const i=B.__wbindgen_add_to_stack_pointer(-16);B.transaction_transactionId(i,this.__wbg_ptr);var r=u()[i/4+0],n=u()[i/4+1];return e=r,t=n,c(r,n)}finally{B.__wbindgen_add_to_stack_pointer(16),B.__wbindgen_free(e,t,1)}}transactionType(){let e,t;try{const i=B.__wbindgen_add_to_stack_pointer(-16);B.transaction_transactionType(i,this.__wbg_ptr);var r=u()[i/4+0],n=u()[i/4+1];return e=r,t=n,c(r,n)}finally{B.__wbindgen_add_to_stack_pointer(16),B.__wbindgen_free(e,t,1)}}};const ke="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((e=>B.__wbg_verifyingkey_free(e>>>0)));let Ke=class e{static __wrap(t){t>>>=0;const r=Object.create(e.prototype);return r.__wbg_ptr=t,ke.register(r,r.__wbg_ptr,r),r}__destroy_into_raw(){const e=this.__wbg_ptr;return this.__wbg_ptr=0,ke.unregister(this),e}free(){const e=this.__destroy_into_raw();B.__wbg_verifyingkey_free(e)}static bondPublicVerifier(){const t=B.verifyingkey_bondPublicVerifier();return e.__wrap(t)}static bondValidatorVerifier(){const t=B.verifyingkey_bondValidatorVerifier();return e.__wrap(t)}static claimUnbondPublicVerifier(){const t=B.verifyingkey_claimUnbondPublicVerifier();return e.__wrap(t)}static feePrivateVerifier(){const t=B.verifyingkey_feePrivateVerifier();return e.__wrap(t)}static feePublicVerifier(){const t=B.verifyingkey_feePublicVerifier();return e.__wrap(t)}static inclusionVerifier(){const t=B.verifyingkey_inclusionVerifier();return e.__wrap(t)}static joinVerifier(){const t=B.verifyingkey_joinVerifier();return e.__wrap(t)}static setValidatorStateVerifier(){const t=B.verifyingkey_setValidatorStateVerifier();return e.__wrap(t)}static splitVerifier(){const t=B.verifyingkey_splitVerifier();return e.__wrap(t)}static transferPrivateVerifier(){const t=B.verifyingkey_transferPrivateVerifier();return e.__wrap(t)}static transferPrivateToPublicVerifier(){const t=B.verifyingkey_transferPrivateToPublicVerifier();return e.__wrap(t)}static transferPublicVerifier(){const t=B.verifyingkey_transferPublicVerifier();return e.__wrap(t)}static transferPublicAsSignerVerifier(){const t=B.verifyingkey_transferPublicAsSignerVerifier();return e.__wrap(t)}static transferPublicToPrivateVerifier(){const t=B.verifyingkey_transferPublicToPrivateVerifier();return e.__wrap(t)}static unbondPublicVerifier(){const t=B.verifyingkey_unbondPublicVerifier();return e.__wrap(t)}isBondPublicVerifier(){return 0!==B.verifyingkey_isBondPublicVerifier(this.__wbg_ptr)}isBondValidatorVerifier(){return 0!==B.verifyingkey_isBondValidatorVerifier(this.__wbg_ptr)}isClaimUnbondPublicVerifier(){return 0!==B.verifyingkey_isClaimUnbondPublicVerifier(this.__wbg_ptr)}isFeePrivateVerifier(){return 0!==B.verifyingkey_isFeePrivateVerifier(this.__wbg_ptr)}isFeePublicVerifier(){return 0!==B.verifyingkey_isFeePublicVerifier(this.__wbg_ptr)}isInclusionVerifier(){return 0!==B.verifyingkey_isInclusionVerifier(this.__wbg_ptr)}isJoinVerifier(){return 0!==B.verifyingkey_isJoinVerifier(this.__wbg_ptr)}isSetValidatorStateVerifier(){return 0!==B.verifyingkey_isSetValidatorStateVerifier(this.__wbg_ptr)}isSplitVerifier(){return 0!==B.verifyingkey_isSplitVerifier(this.__wbg_ptr)}isTransferPrivateVerifier(){return 0!==B.verifyingkey_isTransferPrivateVerifier(this.__wbg_ptr)}isTransferPrivateToPublicVerifier(){return 0!==B.verifyingkey_isTransferPrivateToPublicVerifier(this.__wbg_ptr)}isTransferPublicVerifier(){return 0!==B.verifyingkey_isTransferPublicVerifier(this.__wbg_ptr)}isTransferPublicAsSignerVerifier(){return 0!==B.verifyingkey_isTransferPublicAsSignerVerifier(this.__wbg_ptr)}isTransferPublicToPrivateVerifier(){return 0!==B.verifyingkey_isTransferPublicToPrivateVerifier(this.__wbg_ptr)}isUnbondPublicVerifier(){return 0!==B.verifyingkey_isUnbondPublicVerifier(this.__wbg_ptr)}checksum(){let e,t;try{const i=B.__wbindgen_add_to_stack_pointer(-16);B.verifyingkey_checksum(i,this.__wbg_ptr);var r=u()[i/4+0],n=u()[i/4+1];return e=r,t=n,c(r,n)}finally{B.__wbindgen_add_to_stack_pointer(16),B.__wbindgen_free(e,t,1)}}copy(){const t=B.verifyingkey_copy(this.__wbg_ptr);return e.__wrap(t)}static fromBytes(t){try{const i=B.__wbindgen_add_to_stack_pointer(-16),_=y(t,B.__wbindgen_malloc),a=N;B.verifyingkey_fromBytes(i,_,a);var r=u()[i/4+0],n=u()[i/4+1];if(u()[i/4+2])throw o(n);return e.__wrap(r)}finally{B.__wbindgen_add_to_stack_pointer(16)}}static fromString(t){try{const i=B.__wbindgen_add_to_stack_pointer(-16),_=g(t,B.__wbindgen_malloc,B.__wbindgen_realloc),a=N;B.verifyingkey_fromString(i,_,a);var r=u()[i/4+0],n=u()[i/4+1];if(u()[i/4+2])throw o(n);return e.__wrap(r)}finally{B.__wbindgen_add_to_stack_pointer(16)}}toBytes(){try{const i=B.__wbindgen_add_to_stack_pointer(-16);B.verifyingkey_toBytes(i,this.__wbg_ptr);var e=u()[i/4+0],t=u()[i/4+1],r=u()[i/4+2];if(u()[i/4+3])throw o(r);var n=m(e,t).slice();return B.__wbindgen_free(e,1*t,1),n}finally{B.__wbindgen_add_to_stack_pointer(16)}}toString(){let e,t;try{const i=B.__wbindgen_add_to_stack_pointer(-16);B.verifyingkey_toString(i,this.__wbg_ptr);var r=u()[i/4+0],n=u()[i/4+1];return e=r,t=n,c(r,n)}finally{B.__wbindgen_add_to_stack_pointer(16),B.__wbindgen_free(e,t,1)}}};const Se="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((e=>B.__wbg_viewkey_free(e>>>0)));let Te=class e{static __wrap(t){t>>>=0;const r=Object.create(e.prototype);return r.__wbg_ptr=t,Se.register(r,r.__wbg_ptr,r),r}__destroy_into_raw(){const e=this.__wbg_ptr;return this.__wbg_ptr=0,Se.unregister(this),e}free(){const e=this.__destroy_into_raw();B.__wbg_viewkey_free(e)}static from_private_key(t){p(t,ae);const r=B.privatekey_to_view_key(t.__wbg_ptr);return e.__wrap(r)}static from_string(t){const r=g(t,B.__wbindgen_malloc,B.__wbindgen_realloc),n=N,i=B.viewkey_from_string(r,n);return e.__wrap(i)}to_string(){let e,t;try{const i=B.__wbindgen_add_to_stack_pointer(-16);B.viewkey_to_string(i,this.__wbg_ptr);var r=u()[i/4+0],n=u()[i/4+1];return e=r,t=n,c(r,n)}finally{B.__wbindgen_add_to_stack_pointer(16),B.__wbindgen_free(e,t,1)}}to_address(){const e=B.address_from_view_key(this.__wbg_ptr);return q.__wrap(e)}decrypt(e){let t,r;try{const l=B.__wbindgen_add_to_stack_pointer(-16),f=g(e,B.__wbindgen_malloc,B.__wbindgen_realloc),w=N;B.viewkey_decrypt(l,this.__wbg_ptr,f,w);var n=u()[l/4+0],i=u()[l/4+1],_=u()[l/4+2],a=u()[l/4+3],s=n,d=i;if(a)throw s=0,d=0,o(_);return t=s,r=d,c(s,d)}finally{B.__wbindgen_add_to_stack_pointer(16),B.__wbindgen_free(t,r,1)}}};async function T(e,t){if("function"==typeof Response&&e instanceof Response){if("function"==typeof WebAssembly.instantiateStreaming)try{return await WebAssembly.instantiateStreaming(e,t)}catch(t){if("application/wasm"==e.headers.get("Content-Type"))throw t;console.warn("`WebAssembly.instantiateStreaming` failed because your server does not serve wasm with `application/wasm` MIME type. Falling back to `WebAssembly.instantiate` which is slower. Original error:\n",t)}const r=await e.arrayBuffer();return await WebAssembly.instantiate(r,t)}{const r=await WebAssembly.instantiate(e,t);return r instanceof WebAssembly.Instance?{instance:r,module:e}:r}}function E(){const e={wbg:{}};return e.wbg.__wbindgen_object_drop_ref=function(e){o(e)},e.wbg.__wbg_new_71801a555ad9f2aa=function(){return K((function(){return d(new XMLHttpRequest)}),arguments)},e.wbg.__wbg_overrideMimeType_ee9c51919ceb418b=function(){return K((function(e,t,r){_(e).overrideMimeType(c(t,r))}),arguments)},e.wbg.__wbg_open_c9eb0cf2c9d95679=function(){return K((function(e,t,r,n,i,a){_(e).open(c(t,r),c(n,i),0!==a)}),arguments)},e.wbg.__wbg_send_80d29985093c1ec5=function(){return K((function(e){_(e).send()}),arguments)},e.wbg.__wbg_response_7c2e2759084f7279=function(){return K((function(e){return d(_(e).response)}),arguments)},e.wbg.__wbg_status_d485fb5a478426fb=function(){return K((function(e){return _(e).status}),arguments)},e.wbg.__wbg_new_72fb9a18b5ae2624=function(){return d(new Object)},e.wbg.__wbindgen_string_new=function(e,t){return d(c(e,t))},e.wbg.__wbg_set_1f9b04f170055d33=function(){return K((function(e,t,r){return Reflect.set(_(e),_(t),_(r))}),arguments)},e.wbg.__wbg_new_ab6fd82b10560829=function(){return K((function(){return d(new Headers)}),arguments)},e.wbg.__wbindgen_object_clone_ref=function(e){return d(_(e))},e.wbg.__wbg_new_0d76b0581eca6298=function(){return K((function(){return d(new AbortController)}),arguments)},e.wbg.__wbg_signal_a61f78a3478fd9bc=function(e){return d(_(e).signal)},e.wbg.__wbg_append_7bfcb4937d1d5e29=function(){return K((function(e,t,r,n,i){_(e).append(c(t,r),c(n,i))}),arguments)},e.wbg.__wbg_instanceof_Response_849eb93e75734b6e=function(e){let t;try{t=_(e)instanceof Response}catch(e){t=!1}return t},e.wbg.__wbg_status_61a01141acd3cf74=function(e){return _(e).status},e.wbg.__wbg_url_5f6dc4009ac5f99d=function(e,t){const r=g(_(t).url,B.__wbindgen_malloc,B.__wbindgen_realloc),n=N;u()[e/4+1]=n,u()[e/4+0]=r},e.wbg.__wbg_headers_9620bfada380764a=function(e){return d(_(e).headers)},e.wbg.__wbg_iterator_2cee6dadfd956dfa=function(){return d(Symbol.iterator)},e.wbg.__wbg_get_e3c254076557e348=function(){return K((function(e,t){return d(Reflect.get(_(e),_(t)))}),arguments)},e.wbg.__wbindgen_is_function=function(e){return"function"==typeof _(e)},e.wbg.__wbg_call_27c0f87801dedf93=function(){return K((function(e,t){return d(_(e).call(_(t)))}),arguments)},e.wbg.__wbindgen_is_object=function(e){const t=_(e);return"object"==typeof t&&null!==t},e.wbg.__wbg_next_40fc327bfc8770e6=function(e){return d(_(e).next)},e.wbg.__wbg_next_196c84450b364254=function(){return K((function(e){return d(_(e).next())}),arguments)},e.wbg.__wbg_done_298b57d23c0fc80c=function(e){return _(e).done},e.wbg.__wbg_value_d93c65011f51a456=function(e){return d(_(e).value)},e.wbg.__wbg_abort_2aa7521d5690750e=function(e){_(e).abort()},e.wbg.__wbg_stringify_8887fe74e1c50d81=function(){return K((function(e){return d(JSON.stringify(_(e)))}),arguments)},e.wbg.__wbindgen_string_get=function(e,t){const r=_(t),n="string"==typeof r?r:void 0;var i=l(n)?0:g(n,B.__wbindgen_malloc,B.__wbindgen_realloc),a=N;u()[e/4+1]=a,u()[e/4+0]=i},e.wbg.__wbg_log_0159ca40cddf5b15=function(e,t){console.log(c(e,t))},e.wbg.__wbindgen_bigint_from_u64=function(e){return d(BigInt.asUintN(64,e))},e.wbg.__wbg_call_b3ca7c6051f9bec1=function(){return K((function(e,t,r){return d(_(e).call(_(t),_(r)))}),arguments)},e.wbg.__wbg_transaction_new=function(e){return d(Pe.__wrap(e))},e.wbg.__wbg_keypair_new=function(e){return d(ee.__wrap(e))},e.wbg.__wbindgen_module=function(){return d(x.__wbindgen_wasm_module)},e.wbg.__wbindgen_memory=function(){return d(B.memory)},e.wbg.__wbg_spawnWorker_f6acaddb2e29dc4a=function(e,t,r,n){return d(i(_(e),_(t),_(r),n>>>0))},e.wbg.__wbg_executionresponse_new=function(e){return d(Y.__wrap(e))},e.wbg.__wbg_newwithlength_66ae46612e7f0234=function(e){return d(new Array(e>>>0))},e.wbg.__wbg_set_d4638f722068f043=function(e,t,r){_(e)[t>>>0]=o(r)},e.wbg.__wbindgen_cb_drop=function(e){const t=o(e).original;if(1==t.cnt--)return t.a=0,!0;return!1},e.wbg.__wbg_new_16b304a2cfa7ff4a=function(){return d(new Array)},e.wbg.__wbg_push_a5b05aedc7234f9f=function(e,t){return _(e).push(_(t))},e.wbg.__wbg_arrayBuffer_29931d52c7206b02=function(){return K((function(e){return d(_(e).arrayBuffer())}),arguments)},e.wbg.__wbg_new_63b92bc8671ed464=function(e){return d(new Uint8Array(_(e)))},e.wbg.__wbg_length_c20a40f15020d68a=function(e){return _(e).length},e.wbg.__wbg_new_81740750da40724f=function(e,t){try{var r={a:e,b:t};const n=new Promise(((e,t)=>{const n=r.a;r.a=0;try{return S(n,r.b,e,t)}finally{r.a=n}}));return d(n)}finally{r.a=r.b=0}},e.wbg.__wbindgen_number_new=function(e){return d(e)},e.wbg.__wbg_new_abda76e883ba8a5f=function(){return d(new Error)},e.wbg.__wbg_stack_658279fe44541cf6=function(e,t){const r=g(_(t).stack,B.__wbindgen_malloc,B.__wbindgen_realloc),n=N;u()[e/4+1]=n,u()[e/4+0]=r},e.wbg.__wbg_error_f851667af71bcfc6=function(e,t){let r,n;try{r=e,n=t,console.error(c(e,t))}finally{B.__wbindgen_free(r,n,1)}},e.wbg.__wbg_buffer_12d079cc21e14bdb=function(e){return d(_(e).buffer)},e.wbg.__wbg_newwithbyteoffsetandlength_aa4a17c33a06e5cb=function(e,t,r){return d(new Uint8Array(_(e),t>>>0,r>>>0))},e.wbg.__wbg_randomFillSync_5c9c955aa56b6049=function(){return K((function(e,t){_(e).randomFillSync(o(t))}),arguments)},e.wbg.__wbg_subarray_a1f73cd4b5b42fe1=function(e,t,r){return d(_(e).subarray(t>>>0,r>>>0))},e.wbg.__wbg_getRandomValues_3aa56aa6edec874c=function(){return K((function(e,t){_(e).getRandomValues(_(t))}),arguments)},e.wbg.__wbg_set_a47bac70306a19a7=function(e,t,r){_(e).set(_(t),r>>>0)},e.wbg.__wbg_crypto_1d1f22824a6a080c=function(e){return d(_(e).crypto)},e.wbg.__wbg_process_4a72847cc503995b=function(e){return d(_(e).process)},e.wbg.__wbg_versions_f686565e586dd935=function(e){return d(_(e).versions)},e.wbg.__wbg_node_104a2ff8d6ea03a2=function(e){return d(_(e).node)},e.wbg.__wbindgen_is_string=function(e){return"string"==typeof _(e)},e.wbg.__wbg_require_cca90b1a94a0255b=function(){return K((function(){return d(module.require)}),arguments)},e.wbg.__wbg_msCrypto_eb05e62b530a1508=function(e){return d(_(e).msCrypto)},e.wbg.__wbg_newwithlength_e9b4878cebadb3d3=function(e){return d(new Uint8Array(e>>>0))},e.wbg.__wbg_length_cd7af8117672b8b8=function(e){return _(e).length},e.wbg.__wbg_get_bd8e338fbd5f5cc8=function(e,t){return d(_(e)[t>>>0])},e.wbg.__wbg_self_ce0dbfc45cf2f5be=function(){return K((function(){return d(self.self)}),arguments)},e.wbg.__wbg_window_c6fb939a7f436783=function(){return K((function(){return d(window.window)}),arguments)},e.wbg.__wbg_globalThis_d1e6af4856ba331b=function(){return K((function(){return d(globalThis.globalThis)}),arguments)},e.wbg.__wbg_global_207b558942527489=function(){return K((function(){return d(global.global)}),arguments)},e.wbg.__wbindgen_is_undefined=function(e){return void 0===_(e)},e.wbg.__wbg_newnoargs_e258087cd0daa0ea=function(e,t){return d(new Function(c(e,t)))},e.wbg.__wbg_has_0af94d20077affa2=function(){return K((function(e,t){return Reflect.has(_(e),_(t))}),arguments)},e.wbg.__wbg_fetch_bc7c8e27076a5c84=function(e){return d(fetch(_(e)))},e.wbg.__wbg_fetch_921fad6ef9e883dd=function(e,t){return d(_(e).fetch(_(t)))},e.wbg.__wbindgen_debug_string=function(e,t){const r=g(f(_(t)),B.__wbindgen_malloc,B.__wbindgen_realloc),n=N;u()[e/4+1]=n,u()[e/4+0]=r},e.wbg.__wbindgen_throw=function(e,t){throw new Error(c(e,t))},e.wbg.__wbindgen_rethrow=function(e){throw o(e)},e.wbg.__wbg_then_a73caa9a87991566=function(e,t,r){return d(_(e).then(_(t),_(r)))},e.wbg.__wbg_then_0c86a60e8fcfe9f6=function(e,t){return d(_(e).then(_(t)))},e.wbg.__wbg_queueMicrotask_481971b0d87f3dd4=function(e){queueMicrotask(_(e))},e.wbg.__wbg_queueMicrotask_3cbae2ec6b6cd3d6=function(e){return d(_(e).queueMicrotask)},e.wbg.__wbg_resolve_b0083a7967828ec8=function(e){return d(Promise.resolve(_(e)))},e.wbg.__wbg_waitAsync_5d743fc9058ba01a=function(){return d(Atomics.waitAsync)},e.wbg.__wbg_new_8cccba86b0f574cb=function(e){return d(new Int32Array(_(e)))},e.wbg.__wbg_waitAsync_46d5c36955b71a79=function(e,t,r){return d(Atomics.waitAsync(_(e),t,r))},e.wbg.__wbg_async_19c0400d97cc72fe=function(e){return _(e).async},e.wbg.__wbg_value_571d60108110e917=function(e){return d(_(e).value)},e.wbg.__wbindgen_link_fc1eedd35dc7e0a6=function(e){const t=g("data:application/javascript,"+encodeURIComponent("onmessage = function (ev) {\n let [ia, index, value] = ev.data;\n ia = new Int32Array(ia.buffer);\n let result = Atomics.wait(ia, index, value);\n postMessage(result);\n };\n "),B.__wbindgen_malloc,B.__wbindgen_realloc),r=N;u()[e/4+1]=r,u()[e/4+0]=t},e.wbg.__wbg_new_d1187ae36d662ef9=function(){return K((function(e,t){return d(new Worker(c(e,t)))}),arguments)},e.wbg.__wbg_setonmessage_503809e5bb51bd33=function(e,t){_(e).onmessage=_(t)},e.wbg.__wbg_of_6a70eed8d41f469c=function(e,t,r){return d(Array.of(_(e),_(t),_(r)))},e.wbg.__wbg_postMessage_7380d10e8b8269df=function(){return K((function(e,t){_(e).postMessage(_(t))}),arguments)},e.wbg.__wbg_data_3ce7c145ca4fbcdc=function(e){return d(_(e).data)},e.wbg.__wbg_newwithstrandinit_3fd6fba4083ff2d0=function(){return K((function(e,t,r){return d(new Request(c(e,t),_(r)))}),arguments)},e.wbg.__wbg_responseText_c67ed2d48db10769=function(){return K((function(e,t){const r=_(t).responseText;var n=l(r)?0:g(r,B.__wbindgen_malloc,B.__wbindgen_realloc),i=N;u()[e/4+1]=i,u()[e/4+0]=n}),arguments)},e.wbg.__wbindgen_closure_wrapper5837=function(e,t,r){return d(w(e,t,538,b))},e.wbg.__wbindgen_closure_wrapper5862=function(e,t,r){return d(w(e,t,538,b))},e}function V(e,t){e.wbg.memory=t||new WebAssembly.Memory({initial:25,maximum:65536,shared:!0})}function R(e,t){return B=e.exports,x.__wbindgen_wasm_module=t,L=null,M=null,I=null,B.__wbindgen_start(),B}function F(e,t){if(void 0!==B)return B;const r=E();V(r,t),e instanceof WebAssembly.Module||(e=new WebAssembly.Module(e));return R(new WebAssembly.Instance(e,r),e)}async function x(e,t){if(void 0!==B)return B;const r=E();("string"==typeof e||"function"==typeof Request&&e instanceof Request||"function"==typeof URL&&e instanceof URL)&&(e=fetch(e)),V(r,t);const{instance:n,module:i}=await T(await e,r);return R(n,i)}var C=Object.freeze({__proto__:null,Address:q,Execution:X,ExecutionResponse:Y,Field:Q,KeyPair:ee,Metadata:re,OfflineQuery:ie,PrivateKey:ae,PrivateKeyCiphertext:se,Program:de,ProgramManager:le,ProvingKey:fe,RecordCiphertext:be,RecordPlaintext:ye,Signature:ve,Transaction:Pe,VerifyingKey:Ke,ViewKey:Te,default:x,initSync:F,initThreadPool:k,runRayonThread:P,verifyFunctionExecution:h});const Ee="assets/aleo_wasm.wasm";const{initThreadPool:Ve,Address:Re,Execution:Fe,ExecutionResponse:xe,Field:Ce,Metadata:Ae,OfflineQuery:Be,Private:Ue,PrivateKey:Oe,PrivateKeyCiphertext:ze,Program:Ie,ProvingKey:Ne,RecordCiphertext:je,RecordPlaintext:$e,ProgramManager:Me,Signature:De,Transaction:Le,ViewKey:We,VerifyingKey:qe,verifyFunctionExecution:He}=await(async(e={})=>{let{importHook:t,serverPath:r,initializeHook:n}=e,i=Ee;return null!=r&&(i=r+/[^\/\\]*$/.exec(i)[0]),null!=t&&(i=t(i)),null!=n?await n(x,i):await x(i),C})({importHook:()=>new URL(r(5934),r.b)});async function A(e){null==e&&(e=navigator.hardwareConcurrency),console.info(`Spawning ${e} threads`),await Ve(new URL(r(2583),r.b),e)}n()}catch(Xe){n(Xe)}}),1)},6891:(e,t,r)=>{r.d(t,{Ud:()=>l});const n=Symbol("Comlink.proxy"),i=Symbol("Comlink.endpoint"),_=Symbol("Comlink.releaseProxy"),a=Symbol("Comlink.finalizer"),o=Symbol("Comlink.thrown"),s=e=>"object"==typeof e&&null!==e||"function"==typeof e,c=new Map([["proxy",{canHandle:e=>s(e)&&e[n],serialize(e){const{port1:t,port2:r}=new MessageChannel;return d(e,t),[r,[r]]},deserialize:e=>(e.start(),l(e))}],["throw",{canHandle:e=>s(e)&&o in e,serialize({value:e}){let t;return t=e instanceof Error?{isError:!0,value:{message:e.message,name:e.name,stack:e.stack}}:{isError:!1,value:e},[t,[]]},deserialize(e){if(e.isError)throw Object.assign(new Error(e.value.message),e.value);throw e.value}}]]);function d(e,t=globalThis,r=["*"]){t.addEventListener("message",(function i(_){if(!_||!_.data)return;if(!function(e,t){for(const r of e){if(t===r||"*"===r)return!0;if(r instanceof RegExp&&r.test(t))return!0}return!1}(r,_.origin))return void console.warn(`Invalid origin '${_.origin}' for comlink proxy`);const{id:s,type:c,path:l}=Object.assign({path:[]},_.data),u=(_.data.argumentList||[]).map(m);let f;try{const t=l.slice(0,-1).reduce(((e,t)=>e[t]),e),r=l.reduce(((e,t)=>e[t]),e);switch(c){case"GET":f=r;break;case"SET":t[l.slice(-1)[0]]=m(_.data.value),f=!0;break;case"APPLY":f=r.apply(t,u);break;case"CONSTRUCT":f=function(e){return Object.assign(e,{[n]:!0})}(new r(...u));break;case"ENDPOINT":{const{port1:t,port2:r}=new MessageChannel;d(e,r),f=function(e,t){return h.set(e,t),e}(t,[t])}break;case"RELEASE":f=void 0;break;default:return}}catch(e){f={value:e,[o]:0}}Promise.resolve(f).catch((e=>({value:e,[o]:0}))).then((r=>{const[n,_]=v(r);t.postMessage(Object.assign(Object.assign({},n),{id:s}),_),"RELEASE"===c&&(t.removeEventListener("message",i),g(t),a in e&&"function"==typeof e[a]&&e[a]())})).catch((e=>{const[r,n]=v({value:new TypeError("Unserializable return value"),[o]:0});t.postMessage(Object.assign(Object.assign({},r),{id:s}),n)}))})),t.start&&t.start()}function g(e){(function(e){return"MessagePort"===e.constructor.name})(e)&&e.close()}function l(e,t){return p(e,[],t)}function u(e){if(e)throw new Error("Proxy has been released and is not useable")}function f(e){return P(e,{type:"RELEASE"}).then((()=>{g(e)}))}const w=new WeakMap,b="FinalizationRegistry"in globalThis&&new FinalizationRegistry((e=>{const t=(w.get(e)||0)-1;w.set(e,t),0===t&&f(e)}));function p(e,t=[],r=function(){}){let n=!1;const a=new Proxy(r,{get(r,i){if(u(n),i===_)return()=>{!function(e){b&&b.unregister(e)}(a),f(e),n=!0};if("then"===i){if(0===t.length)return{then:()=>a};const r=P(e,{type:"GET",path:t.map((e=>e.toString()))}).then(m);return r.then.bind(r)}return p(e,[...t,i])},set(r,i,_){u(n);const[a,o]=v(_);return P(e,{type:"SET",path:[...t,i].map((e=>e.toString())),value:a},o).then(m)},apply(r,_,a){u(n);const o=t[t.length-1];if(o===i)return P(e,{type:"ENDPOINT"}).then(m);if("bind"===o)return p(e,t.slice(0,-1));const[s,c]=y(a);return P(e,{type:"APPLY",path:t.map((e=>e.toString())),argumentList:s},c).then(m)},construct(r,i){u(n);const[_,a]=y(i);return P(e,{type:"CONSTRUCT",path:t.map((e=>e.toString())),argumentList:_},a).then(m)}});return function(e,t){const r=(w.get(t)||0)+1;w.set(t,r),b&&b.register(e,t,e)}(a,e),a}function y(e){const t=e.map(v);return[t.map((e=>e[0])),(r=t.map((e=>e[1])),Array.prototype.concat.apply([],r))];var r}const h=new WeakMap;function v(e){for(const[t,r]of c)if(r.canHandle(e)){const[n,i]=r.serialize(e);return[{type:"HANDLER",name:t,value:n},i]}return[{type:"RAW",value:e},h.get(e)||[]]}function m(e){switch(e.type){case"HANDLER":return c.get(e.name).deserialize(e.value);case"RAW":return e.value}}function P(e,t,r){return new Promise((n=>{const i=new Array(4).fill(0).map((()=>Math.floor(Math.random()*Number.MAX_SAFE_INTEGER).toString(16))).join("-");e.addEventListener("message",(function t(r){r.data&&r.data.id&&r.data.id===i&&(e.removeEventListener("message",t),n(r.data))})),e.start&&e.start(),e.postMessage(Object.assign({id:i},t),r)}))}}}]); +(self.webpackChunkaleo_website=self.webpackChunkaleo_website||[]).push([[52,933],{2583:(e,t,r)=>{e.exports=r.p+"3ebf0bb8781b6d786343.js"},5934:(e,t,r)=>{e.exports=r.p+"8cbe7e9b06e560a22f36.wasm"},5052:(e,t,r)=>{r.a(e,(async(e,n)=>{try{r.r(t),r.d(t,{Account:()=>f,Address:()=>i.kL,AleoKeyProvider:()=>p,AleoKeyProviderParams:()=>b,AleoNetworkClient:()=>w,BlockHeightSearch:()=>m,CREDITS_PROGRAM_KEYS:()=>T,ExecutionResponse:()=>i._U,Field:()=>i.gN,FunctionExecution:()=>i.o,KEY_STORE:()=>S,NetworkRecordProvider:()=>v,OfflineKeyProvider:()=>h,OfflineQuery:()=>i.Gd,OfflineSearchParams:()=>y,PRIVATE_TO_PUBLIC_TRANSFER:()=>F,PRIVATE_TRANSFER:()=>R,PRIVATE_TRANSFER_TYPES:()=>E,PUBLIC_TO_PRIVATE_TRANSFER:()=>A,PUBLIC_TRANSFER:()=>x,PUBLIC_TRANSFER_AS_SIGNER:()=>C,PrivateKey:()=>i._q,PrivateKeyCiphertext:()=>i.uq,Program:()=>i.$r,ProgramManager:()=>K,ProgramManagerBase:()=>i.L,ProvingKey:()=>i.zW,RecordCiphertext:()=>i.fW,RecordPlaintext:()=>i.PD,Signature:()=>i.Pc,Transaction:()=>i.YW,VALID_TRANSFER_TYPES:()=>V,VerifyingKey:()=>i.XV,ViewKey:()=>i.IO,createAleoWorker:()=>k,initThreadPool:()=>i.CK,initializeWasm:()=>u,logAndThrow:()=>l,verifyFunctionExecution:()=>i.hz});var i=r(9933),_=r(6891),a=e([i]);i=(a.then?(await a)():a)[0];class f{_privateKey;_viewKey;_address;constructor(e={}){try{this._privateKey=this.privateKeyFromParams(e)}catch(e){throw console.error("Wrong parameter",e),new Error("Wrong Parameter")}this._viewKey=i.IO.from_private_key(this._privateKey),this._address=i.kL.from_private_key(this._privateKey)}static fromCiphertext(e,t){try{e="string"==typeof e?i.uq.fromString(e):e;const r=i._q.fromPrivateKeyCiphertext(e,t);return new f({privateKey:r.to_string()})}catch(e){throw new Error("Wrong password or invalid ciphertext")}}privateKeyFromParams(e){return e.seed?i._q.from_seed_unchecked(e.seed):e.privateKey?i._q.from_string(e.privateKey):new i._q}privateKey(){return this._privateKey}viewKey(){return this._viewKey}address(){return this._address}toString(){return this.address().to_string()}encryptAccount(e){return this._privateKey.toCiphertext(e)}decryptRecord(e){return this._viewKey.decrypt(e)}decryptRecords(e){return e.map((e=>this._viewKey.decrypt(e)))}ownsRecordCiphertext(e){if("string"!=typeof e)return e.isOwner(this._viewKey);try{return i.fW.fromString(e).isOwner(this._viewKey)}catch(e){return!1}}sign(e){return this._privateKey.sign(e)}verify(e,t){return this._address.verify(e,t)}}async function o(e,t){const r=await fetch(e,t);if(!r.ok)throw new Error(r.status+" could not get URL "+e);return r}async function s(e,t){t.method="POST";const r=await fetch(e,t);if(!r.ok)throw new Error(r.status+" could not post URL "+e);return r}class w{host;headers;account;constructor(e,t){this.host=e+"/testnet",t&&t.headers?this.headers=t.headers:this.headers={"X-Aleo-SDK-Version":"0.6.12"}}setAccount(e){this.account=e}getAccount(){return this.account}setHost(e){this.host=e+"/testnet"}async fetchData(e="/"){try{const t=await o(this.host+e,{headers:this.headers});return await t.json()}catch(e){throw new Error("Error fetching data.")}}async findUnspentRecords(e,t,r,n,_,a){if(a=a||[],e<0)throw new Error("Start height must be greater than or equal to 0");const o=new Array;let s,c,d,g,l=0,u=BigInt(0);if(void 0===r){if(void 0===this.account)throw new Error("Private key must be specified in an argument to findOwnedRecords or set in the AleoNetworkClient");d=this.account._privateKey}else try{d=r instanceof i._q?r:i._q.from_string(r)}catch(e){throw new Error("Error parsing private key provided.")}const f=d.to_view_key();try{const e=await this.getLatestHeight();if("number"!=typeof e)throw new Error("Error fetching latest block height.");g=e}catch(e){throw new Error("Error fetching latest block height.")}if(c="number"==typeof t&&t<=g?t:g,e>c)throw new Error("Start height must be less than or equal to end height.");for(;c>e;){s=c-50,s=BigInt(_))))return o;if(void 0!==n&&n.length>0){let e=0;if(t.microcredits()>n[e]){if(e+=1,o.push(t),"number"==typeof _&&(u+=t.microcredits(),u>=BigInt(_)))return o;if(o.length>=n.length)return o}}}}}catch(e){}}}}}}}catch(e){if(console.warn("Error fetching blocks in range: "+s.toString()+"-"+c.toString()),console.warn("Error: ",e),l+=1,l>10)return console.warn("10 failures fetching records reached. Returning records fetched so far"),o}}return o}async getBlock(e){try{return await this.fetchData("/block/"+e)}catch(e){throw new Error("Error fetching block.")}}async getBlockRange(e,t){try{return await this.fetchData("/blocks?start="+e+"&end="+t)}catch(r){throw new Error("Error fetching blocks between "+e+" and "+t+".")}}async getDeploymentTransactionIDForProgram(e){e instanceof i.$r&&(e=e.toString());try{return(await this.fetchData("/find/transactionID/deployment/"+e)).replace('"',"")}catch(e){throw new Error("Error fetching deployment transaction for program.")}}async getDeploymentTransactionForProgram(e){try{const t=await this.getDeploymentTransactionIDForProgram(e);return await this.getTransaction(t)}catch(e){throw new Error("Error fetching deployment transaction for program.")}}async getLatestBlock(){try{return await this.fetchData("/latest/block")}catch(e){throw new Error("Error fetching latest block.")}}async getLatestCommittee(){try{return await this.fetchData("/committee/latest")}catch(e){throw new Error("Error fetching latest block.")}}async getLatestHeight(){try{return await this.fetchData("/latest/height")}catch(e){throw new Error("Error fetching latest height.")}}async getProgram(e){try{return await this.fetchData("/program/"+e)}catch(e){throw new Error("Error fetching program")}}async getProgramObject(e){try{return i.$r.fromString(e)}catch(t){try{return i.$r.fromString(await this.getProgram(e))}catch(t){throw new Error(`${e} is neither a program name or a valid program`)}}}async getProgramImports(e){try{const t={},r=(e instanceof i.$r?e:await this.getProgramObject(e)).getImports();for(let e=0;e{if(void 0===e)r(new Error("No search parameters provided, cannot retrieve keys"));else{const n=e.cacheKey,_=e.verifyCreditsKeys;if(this.cache.has(n)){const[e,a]=this.cache.get(n),o=i.zW.fromBytes(e),s=i.XV.fromBytes(a);if(_){this.verifyCreditsKeys(n,o,s)||r(new Error(`Cached keys do not match expected keys for ${n}`))}t([o,s])}else r(new Error("Keys not found in cache for "+n))}}))}verifyCreditsKeys(e,t,r){switch(e){case T.bond_public.locator:return t.isBondPublicProver()&&r.isBondPublicVerifier();case T.claim_unbond_public.locator:return t.isClaimUnbondPublicProver()&&r.isClaimUnbondPublicVerifier();case T.fee_private.locator:return t.isFeePrivateProver()&&r.isFeePrivateVerifier();case T.fee_public.locator:return t.isFeePublicProver()&&r.isFeePublicVerifier();case T.inclusion.locator:return t.isInclusionProver()&&r.isInclusionVerifier();case T.join.locator:return t.isJoinProver()&&r.isJoinVerifier();case T.set_validator_state.locator:return t.isSetValidatorStateProver()&&r.isSetValidatorStateVerifier();case T.split.locator:return t.isSplitProver()&&r.isSplitVerifier();case T.transfer_private.locator:return t.isTransferPrivateProver()&&r.isTransferPrivateVerifier();case T.transfer_private_to_public.locator:return t.isTransferPrivateToPublicProver()&&r.isTransferPrivateToPublicVerifier();case T.transfer_public.locator:return t.isTransferPublicProver()&&r.isTransferPublicVerifier();case T.transfer_public_to_private.locator:return t.isTransferPublicToPrivateProver()&&r.isTransferPublicToPrivateVerifier();case T.unbond_public.locator:return t.isUnbondPublicProver()&&r.isUnbondPublicVerifier();default:return!1}}feePrivateKeys(){return this.functionKeys(y.feePrivateKeyParams())}feePublicKeys(){return this.functionKeys(y.feePublicKeyParams())}joinKeys(){return this.functionKeys(y.joinKeyParams())}splitKeys(){return this.functionKeys(y.splitKeyParams())}transferKeys(e){if(R.has(e))return this.functionKeys(y.transferPrivateKeyParams());if(F.has(e))return this.functionKeys(y.transferPrivateToPublicKeyParams());if(x.has(e))return this.functionKeys(y.transferPublicKeyParams());if(C.has(e))return this.functionKeys(y.transferPublicAsSignerKeyParams());if(A.has(e))return this.functionKeys(y.transferPublicToPrivateKeyParams());throw new Error("Invalid visibility type")}async unBondPublicKeys(){return this.functionKeys(y.unbondPublicKeyParams())}insertBondPublicKeys(e){if(!e.isBondPublicProver())throw new Error("Attempted to insert invalid proving keys for bond_public");this.cache.set(T.bond_public.locator,[e.toBytes(),i.XV.bondPublicVerifier().toBytes()])}insertClaimUnbondPublicKeys(e){if(!e.isClaimUnbondPublicProver())throw new Error("Attempted to insert invalid proving keys for claim_unbond_public");this.cache.set(T.claim_unbond_public.locator,[e.toBytes(),i.XV.claimUnbondPublicVerifier().toBytes()])}insertFeePrivateKeys(e){if(!e.isFeePrivateProver())throw new Error("Attempted to insert invalid proving keys for fee_private");this.cache.set(T.fee_private.locator,[e.toBytes(),i.XV.feePrivateVerifier().toBytes()])}insertFeePublicKeys(e){if(!e.isFeePublicProver())throw new Error("Attempted to insert invalid proving keys for fee_public");this.cache.set(T.fee_public.locator,[e.toBytes(),i.XV.feePublicVerifier().toBytes()])}insertJoinKeys(e){if(!e.isJoinProver())throw new Error("Attempted to insert invalid proving keys for join");this.cache.set(T.join.locator,[e.toBytes(),i.XV.joinVerifier().toBytes()])}insertSetValidatorStateKeys(e){if(!e.isSetValidatorStateProver())throw new Error("Attempted to insert invalid proving keys for set_validator_state");this.cache.set(T.set_validator_state.locator,[e.toBytes(),i.XV.setValidatorStateVerifier().toBytes()])}insertSplitKeys(e){if(!e.isSplitProver())throw new Error("Attempted to insert invalid proving keys for split");this.cache.set(T.split.locator,[e.toBytes(),i.XV.splitVerifier().toBytes()])}insertTransferPrivateKeys(e){if(!e.isTransferPrivateProver())throw new Error("Attempted to insert invalid proving keys for transfer_private");this.cache.set(T.transfer_private.locator,[e.toBytes(),i.XV.transferPrivateVerifier().toBytes()])}insertTransferPrivateToPublicKeys(e){if(!e.isTransferPrivateToPublicProver())throw new Error("Attempted to insert invalid proving keys for transfer_private_to_public");this.cache.set(T.transfer_private_to_public.locator,[e.toBytes(),i.XV.transferPrivateToPublicVerifier().toBytes()])}insertTransferPublicKeys(e){if(!e.isTransferPublicProver())throw new Error("Attempted to insert invalid proving keys for transfer_public");this.cache.set(T.transfer_public.locator,[e.toBytes(),i.XV.transferPublicVerifier().toBytes()])}insertTransferPublicToPrivateKeys(e){if(!e.isTransferPublicToPrivateProver())throw new Error("Attempted to insert invalid proving keys for transfer_public_to_private");this.cache.set(T.transfer_public_to_private.locator,[e.toBytes(),i.XV.transferPublicToPrivateVerifier().toBytes()])}insertUnbondPublicKeys(e){if(!e.isUnbondPublicProver())throw new Error("Attempted to insert invalid proving keys for unbond_public");this.cache.set(T.unbond_public.locator,[e.toBytes(),i.XV.unbondPublicVerifier().toBytes()])}}class v{account;networkClient;constructor(e,t){this.account=e,this.networkClient=t}setAccount(e){this.account=e}async findCreditsRecords(e,t,r,n){let i=0,_=0;if(n&&("startHeight"in n&&"number"==typeof n.endHeight&&(i=n.startHeight),"endHeight"in n&&"number"==typeof n.endHeight&&(_=n.endHeight)),0==_){const e=await this.networkClient.getLatestHeight();if(e instanceof Error)throw l("Unable to get current block height from the network");_=e}if(i>=_)throw l("Start height must be less than end height");return await this.networkClient.findUnspentRecords(i,_,this.account.privateKey(),e,void 0,r)}async findCreditsRecord(e,t,r,n){const i=await this.findCreditsRecords([e],t,r,n);return!(i instanceof Error)&&i.length>0?i[0]:(console.error("Record not found with error:",i),new Error("Record not found"))}async findRecord(e,t,r){throw new Error("Method not implemented.")}async findRecords(e,t,r){throw new Error("Method not implemented.")}}class m{startHeight;endHeight;constructor(e,t){this.startHeight=e,this.endHeight=t}}let P=null;const k=()=>{if(!P){const e=new Worker(new URL(r.p+r.u(530),r.b),{type:void 0});P=(0,_.Ud)(e)}return P};class K{account;keyProvider;host;networkClient;recordProvider;constructor(e,t,r){this.host=e||"https://api.explorer.aleo.org/v1",this.networkClient=new w(this.host),this.keyProvider=t||new p,this.recordProvider=r}setAccount(e){this.account=e}setKeyProvider(e){this.keyProvider=e}setHost(e){this.host=e,this.networkClient.setHost(e)}setRecordProvider(e){this.recordProvider=e}async deploy(e,t,r,n,_,a){try{const t=i.$r.fromString(e);let r;try{r=await this.networkClient.getProgram(t.id())}catch(e){console.log(`Program ${t.id()} does not exist on the network, deploying...`)}if("string"==typeof r)throw`Program ${t.id()} already exists on the network, please rename your program`}catch(e){throw l(`Error validating program: ${e}`)}let o,s=a;if(void 0===a&&void 0!==this.account&&(s=this.account.privateKey()),void 0===s)throw"No private key provided and no private key set in the ProgramManager";try{_=r?await this.getCreditsRecord(t,[],_,n):void 0}catch(e){throw l(`Error finding fee record. Record finder response: '${e}'. Please ensure you're connected to a valid Aleo network and a record with enough balance exists.`)}try{o=r?await this.keyProvider.feePrivateKeys():await this.keyProvider.feePublicKeys()}catch(e){throw l(`Error finding fee keys. Key finder response: '${e}'. Please ensure your key provider is configured correctly.`)}const[c,d]=o;let g;try{g=await this.networkClient.getProgramImports(e)}catch(e){throw l(`Error finding program imports. Network response: '${e}'. Please ensure you're connected to a valid Aleo network and the program is deployed to the network.`)}const u=await i.L.buildDeploymentTransaction(s,e,t,_,this.host,g,c,d);return await this.networkClient.submitTransaction(u)}async buildExecutionTransaction(e){const{programName:t,functionName:r,fee:n,privateFee:_,inputs:a,recordSearchParams:o,keySearchParams:s,privateKey:c,offlineQuery:d}=e;let g=e.feeRecord,u=e.provingKey,f=e.verifyingKey,w=e.program,b=e.imports;if(void 0===w)try{w=await this.networkClient.getProgram(t)}catch(e){throw l(`Error finding ${t}. Network response: '${e}'. Please ensure you're connected to a valid Aleo network the program is deployed to the network.`)}else w instanceof i.$r&&(w=w.toString());let p,y=c;if(void 0===c&&void 0!==this.account&&(y=this.account.privateKey()),void 0===y)throw"No private key provided and no private key set in the ProgramManager";try{g=_?await this.getCreditsRecord(n,[],g,o):void 0}catch(e){throw l(`Error finding fee record. Record finder response: '${e}'. Please ensure you're connected to a valid Aleo network and a record with enough balance exists.`)}try{p=_?await this.keyProvider.feePrivateKeys():await this.keyProvider.feePublicKeys()}catch(e){throw l(`Error finding fee keys. Key finder response: '${e}'. Please ensure your key provider is configured correctly.`)}const[h,v]=p;if(!u||!f)try{[u,f]=await this.keyProvider.functionKeys(s)}catch(e){console.log(`Function keys not found. Key finder response: '${e}'. The function keys will be synthesized`)}if(i.$r.fromString(w).getImports().length>0&&!b)try{b=await this.networkClient.getProgramImports(t)}catch(e){throw l(`Error finding program imports. Network response: '${e}'. Please ensure you're connected to a valid Aleo network and the program is deployed to the network.`)}return await i.L.buildExecutionTransaction(y,w,r,a,n,g,this.host,b,u,f,h,v,d)}async execute(e){const t=await this.buildExecutionTransaction(e);return await this.networkClient.submitTransaction(t)}async run(e,t,r,n,_,a,o,s,c,d){let g=c;if(void 0===c&&void 0!==this.account&&(g=this.account.privateKey()),void 0===g)throw"No private key provided and no private key set in the ProgramManager";if(!o||!s)try{[o,s]=await this.keyProvider.functionKeys(a)}catch(e){console.log(`Function keys not found. Key finder response: '${e}'. The function keys will be synthesized`)}return console.log("Running program offline"),console.log("Proving key: ",o),console.log("Verifying key: ",s),i.L.executeFunctionOffline(g,e,t,r,n,!1,_,o,s,this.host,d)}async join(e,t,r,n,_,a,o,s){let c,d,g=o;if(void 0===o&&void 0!==this.account&&(g=this.account.privateKey()),void 0===g)throw"No private key provided and no private key set in the ProgramManager";try{c=n?await this.keyProvider.feePrivateKeys():await this.keyProvider.feePublicKeys(),d=await this.keyProvider.joinKeys()}catch(e){throw l(`Error finding fee keys. Key finder response: '${e}'. Please ensure your key provider is configured correctly.`)}const[u,f]=c,[w,b]=d;try{a=n?await this.getCreditsRecord(r,[],a,_):void 0}catch(e){throw l(`Error finding fee record. Record finder response: '${e}'. Please ensure you're connected to a valid Aleo network and a record with enough balance exists.`)}try{e=e instanceof i.PD?e:i.PD.fromString(e),t=t instanceof i.PD?t:i.PD.fromString(t)}catch(e){throw l("Records provided are not valid. Please ensure they are valid plaintext records.")}const p=await i.L.buildJoinTransaction(g,e,t,r,a,this.host,w,b,u,f,s);return await this.networkClient.submitTransaction(p)}async split(e,t,r,n){let _,a=r;if(void 0===a&&void 0!==this.account&&(a=this.account.privateKey()),void 0===a)throw"No private key provided and no private key set in the ProgramManager";try{_=await this.keyProvider.splitKeys()}catch(e){throw l(`Error finding fee keys. Key finder response: '${e}'. Please ensure your key provider is configured correctly.`)}const[o,s]=_;try{t=t instanceof i.PD?t:i.PD.fromString(t)}catch(e){throw l("Record provided is not valid. Please ensure it is a valid plaintext record.")}const c=await i.L.buildSplitTransaction(a,e,t,this.host,o,s,n);return await this.networkClient.submitTransaction(c)}async synthesizeKeys(e,t,r,n){let _,a=n;void 0===a&&(a=void 0!==this.account?this.account.privateKey():new i._q);try{_=await this.networkClient.getProgramImports(e);const n=await i.L.synthesizeKeyPair(a,e,t,r,_);return[n.provingKey(),n.verifyingKey()]}catch(e){throw l(`Could not synthesize keys - error ${e}. Please ensure the program is valid and the inputs are correct.`)}}async buildTransferTransaction(e,t,r,n,_,a,o,s,g,u){r=d(r);let f,w,b=g;if(void 0===b&&void 0!==this.account&&(b=this.account.privateKey()),void 0===b)throw"No private key provided and no private key set in the ProgramManager";try{f=_?await this.keyProvider.feePrivateKeys():await this.keyProvider.feePublicKeys(),w=await this.keyProvider.transferKeys(r)}catch(e){throw l(`Error finding fee keys. Key finder response: '${e}'. Please ensure your key provider is configured correctly.`)}const[p,y]=f,[h,v]=w;try{const e=[];c(r)?(o=await this.getCreditsRecord(n,[],o,a),e.push(o.nonce())):o=void 0,s=_?await this.getCreditsRecord(n,e,s,a):void 0}catch(e){throw l(`Error finding fee record. Record finder response: '${e}'. Please ensure you're connected to a valid Aleo network and a record with enough balance exists.`)}return await i.L.buildTransferTransaction(b,e,t,r,o,n,s,this.host,h,v,p,y,u)}async buildTransferPublicTransaction(e,t,r,n,i){return this.buildTransferTransaction(e,t,"public",r,!1,void 0,void 0,void 0,n,i)}async buildTransferPublicAsSignerTransaction(e,t,r,n,i){return this.buildTransferTransaction(e,t,"public",r,!1,void 0,void 0,void 0,n,i)}async transfer(e,t,r,n,i,_,a,o,s,c){const d=await this.buildTransferTransaction(e,t,r,n,i,_,a,o,s,c);return await this.networkClient.submitTransaction(d)}async buildBondPublicTransaction(e,t,r,n,i={}){const _=Math.trunc(1e6*n),{programName:a="credits.aleo",functionName:o="bond_public",fee:s=i.fee||.86,privateFee:c=!1,inputs:d=[e,t,r,`${_.toString()}u64`],keySearchParams:g=new b({proverUri:T.bond_public.prover,verifierUri:T.bond_public.verifier,cacheKey:"credits.aleo/bond_public"}),program:l=this.creditsProgram(),...u}=i,f={programName:a,functionName:o,fee:s,privateFee:c,inputs:d,keySearchParams:g,...u};return await this.buildExecutionTransaction(f)}async bondPublic(e,t,r,n,i={}){const _=await this.buildBondPublicTransaction(e,t,r,n,i);return await this.networkClient.submitTransaction(_)}async buildBondValidatorTransaction(e,t,r,n,i={}){const _=Math.trunc(1e6*r),a=Math.trunc(n),{programName:o="credits.aleo",functionName:s="bond_validator",fee:c=i.fee||.86,privateFee:d=!1,inputs:g=[e,t,`${_.toString()}u64`,`${a.toString()}u8`],keySearchParams:l=new b({proverUri:T.bond_validator.prover,verifierUri:T.bond_validator.verifier,cacheKey:"credits.aleo/bond_validator"}),program:u=this.creditsProgram(),...f}=i,w={programName:o,functionName:s,fee:c,privateFee:d,inputs:g,keySearchParams:l,...f};return await this.buildExecutionTransaction(w)}async bondValidator(e,t,r,n,i={}){const _=await this.buildBondValidatorTransaction(e,t,r,n,i);return await this.networkClient.submitTransaction(_)}async buildUnbondPublicTransaction(e,t,r={}){const n=Math.trunc(1e6*t),{programName:i="credits.aleo",functionName:_="unbond_public",fee:a=r.fee||1.3,privateFee:o=!1,inputs:s=[e,`${n.toString()}u64`],keySearchParams:c=new b({proverUri:T.unbond_public.prover,verifierUri:T.unbond_public.verifier,cacheKey:"credits.aleo/unbond_public"}),program:d=this.creditsProgram(),...g}=r,l={programName:i,functionName:_,fee:a,privateFee:o,inputs:s,keySearchParams:c,...g};return this.buildExecutionTransaction(l)}async unbondPublic(e,t,r={}){const n=await this.buildUnbondPublicTransaction(e,t,r);return await this.networkClient.submitTransaction(n)}async buildClaimUnbondPublicTransaction(e,t={}){const{programName:r="credits.aleo",functionName:n="claim_unbond_public",fee:i=t.fee||2,privateFee:_=!1,inputs:a=[e],keySearchParams:o=new b({proverUri:T.claim_unbond_public.prover,verifierUri:T.claim_unbond_public.verifier,cacheKey:"credits.aleo/claim_unbond_public"}),program:s=this.creditsProgram(),...c}=t,d={programName:r,functionName:n,fee:i,privateFee:_,inputs:a,keySearchParams:o,...c};return await this.buildExecutionTransaction(d)}async claimUnbondPublic(e,t={}){const r=await this.buildClaimUnbondPublicTransaction(e,t);return await this.networkClient.submitTransaction(r)}async buildSetValidatorStateTransaction(e,t={}){const{programName:r="credits.aleo",functionName:n="set_validator_state",fee:i=1,privateFee:_=!1,inputs:a=[e.toString()],keySearchParams:o=new b({proverUri:T.set_validator_state.prover,verifierUri:T.set_validator_state.verifier,cacheKey:"credits.aleo/set_validator_state"}),...s}=t,c={programName:r,functionName:n,fee:i,privateFee:_,inputs:a,keySearchParams:o,...s};return await this.execute(c)}async setValidatorState(e,t={}){const r=await this.buildSetValidatorStateTransaction(e,t);return this.networkClient.submitTransaction(r)}verifyExecution(e){try{const t=e.getExecution(),r=e.getFunctionId(),n=e.getProgram(),_=e.getVerifyingKey();return(0,i.hz)(t,_,n,r)}catch(e){return console.warn("The execution was not found in the response, cannot verify the execution"),!1}}createProgramFromSource(e){return i.$r.fromString(e)}creditsProgram(){return i.$r.getCreditsProgram()}verifyProgram(e){try{return i.$r.fromString(e),!0}catch(e){return!1}}async getCreditsRecord(e,t,r,n){try{return r instanceof i.PD?r:i.PD.fromString(r)}catch(r){try{const r=this.recordProvider;return await r.findCreditsRecord(e,!0,t,n)}catch(e){throw l(`Error finding fee record. Record finder response: '${e}'. Please ensure you're connected to a valid Aleo network and a record with enough balance exists.`)}}}}function c(e){return E.has(e)}function d(e){return V.has(e)?e:l(`Invalid transfer type '${e}'. Valid transfer types are 'private', 'privateToPublic', 'public', and 'publicToPrivate'.`)}const S=i.SF.baseUrl();function g(e){const t=i.XV[e.verifyingKey];if(!t)throw new Error("Invalid method name: "+e.verifyingKey);return{name:e.name,locator:e.locator,prover:e.prover,verifier:e.verifier,verifyingKey:t}}const T={bond_public:g(i.SF.bond_public()),bond_validator:g(i.SF.bond_validator()),claim_unbond_public:g(i.SF.claim_unbond_public()),fee_private:g(i.SF.fee_private()),fee_public:g(i.SF.fee_public()),inclusion:g(i.SF.inclusion()),join:g(i.SF.join()),set_validator_state:g(i.SF.set_validator_state()),split:g(i.SF.split()),transfer_private:g(i.SF.transfer_private()),transfer_private_to_public:g(i.SF.transfer_private_to_public()),transfer_public:g(i.SF.transfer_public()),transfer_public_as_signer:g(i.SF.transfer_public_as_signer()),transfer_public_to_private:g(i.SF.transfer_public_to_private()),unbond_public:g(i.SF.unbond_public()),getKey:function(e){return this.hasOwnProperty(e)?this[e]:new Error(`Key "${e}" not found.`)}},E=new Set(["transfer_private","private","transferPrivate","transfer_private_to_public","privateToPublic","transferPrivateToPublic"]),V=new Set(["transfer_private","private","transferPrivate","transfer_private_to_public","privateToPublic","transferPrivateToPublic","transfer_public","transfer_public_as_signer","public","public_as_signer","transferPublic","transferPublicAsSigner","transfer_public_to_private","publicToPrivate","publicAsSigner","transferPublicToPrivate"]),R=new Set(["private","transfer_private","transferPrivate"]),F=new Set(["private_to_public","privateToPublic","transfer_private_to_public","transferPrivateToPublic"]),x=new Set(["public","transfer_public","transferPublic"]),C=new Set(["public_as_signer","transfer_public_as_signer","transferPublicAsSigner"]),A=new Set(["public_to_private","publicToPrivate","transfer_public_to_private","transferPublicToPrivate"]);function l(e){throw console.error(e),e}async function u(){console.warn("initializeWasm is deprecated, you no longer need to use it")}n()}catch(B){n(B)}}))},9933:(e,t,r)=>{r.a(e,(async(e,n)=>{try{function i(e,t,r,n){return new Promise((i=>{const _=new Worker(e,{type:"module"});_.addEventListener("message",(e=>{setTimeout((()=>{i(_),_.unref&&_.unref()}),0)}),{capture:!0,once:!0}),_.postMessage({module:t,memory:r,address:n})}))}let B;r.d(t,{$r:()=>Ie,CK:()=>A,Gd:()=>Be,IO:()=>We,L:()=>Me,PD:()=>$e,Pc:()=>De,SF:()=>Ae,XV:()=>qe,YW:()=>Le,_U:()=>xe,_q:()=>Oe,fW:()=>je,gN:()=>Ce,hz:()=>He,kL:()=>Re,o:()=>Fe,uq:()=>ze,zW:()=>Ne});const U=new Array(128).fill(void 0);function _(e){return U[e]}U.push(void 0,null,!0,!1);let O=U.length;function a(e){e<132||(U[e]=O,O=e)}function o(e){const t=_(e);return a(e),t}const z="undefined"!=typeof TextDecoder?new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0}):{decode:()=>{throw Error("TextDecoder not available")}};"undefined"!=typeof TextDecoder&&z.decode();let I=null;function s(){return null!==I&&I.buffer===B.memory.buffer||(I=new Uint8Array(B.memory.buffer)),I}function c(e,t){return e>>>=0,z.decode(s().slice(e,e+t))}function d(e){O===U.length&&U.push(U.length+1);const t=O;return O=U[t],U[t]=e,t}let N=0;const j="undefined"!=typeof TextEncoder?new TextEncoder("utf-8"):{encode:()=>{throw Error("TextEncoder not available")}},$=function(e,t){const r=j.encode(e);return t.set(r),{read:e.length,written:r.length}};function g(e,t,r){if(void 0===r){const r=j.encode(e),n=t(r.length,1)>>>0;return s().subarray(n,n+r.length).set(r),N=r.length,n}let n=e.length,i=t(n,1)>>>0;const _=s();let a=0;for(;a127)break;_[i+a]=t}if(a!==n){0!==a&&(e=e.slice(a)),i=r(i,n,n=a+3*e.length,1)>>>0;const t=s().subarray(i+a,i+n);a+=$(e,t).written,i=r(i,n,a,1)>>>0}return N=a,i}function l(e){return null==e}let M=null;function u(){return null!==M&&M.buffer===B.memory.buffer||(M=new Int32Array(B.memory.buffer)),M}function f(e){const t=typeof e;if("number"==t||"boolean"==t||null==e)return`${e}`;if("string"==t)return`"${e}"`;if("symbol"==t){const t=e.description;return null==t?"Symbol":`Symbol(${t})`}if("function"==t){const t=e.name;return"string"==typeof t&&t.length>0?`Function(${t})`:"Function"}if(Array.isArray(e)){const t=e.length;let r="[";t>0&&(r+=f(e[0]));for(let n=1;n1))return toString.call(e);if(n=r[1],"Object"==n)try{return"Object("+JSON.stringify(e)+")"}catch(e){return"Object"}return e instanceof Error?`${e.name}: ${e.message}\n${e.stack}`:n}const D="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((e=>{B.__wbindgen_export_3.get(e.dtor)(e.a,e.b)}));function w(e,t,r,n){const i={a:e,b:t,cnt:1,dtor:r},_=(...e)=>{i.cnt++;const t=i.a;i.a=0;try{return n(t,i.b,...e)}finally{0==--i.cnt?(B.__wbindgen_export_3.get(i.dtor)(t,i.b),D.unregister(i)):i.a=t}};return _.original=i,D.register(_,i,i),_}function b(e,t,r){B._dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h4428289ce4d5afd9(e,t,d(r))}function p(e,t){if(!(e instanceof t))throw new Error(`expected instance of ${t.name}`);return e.ptr}function y(e,t){const r=t(1*e.length,1)>>>0;return s().set(e,r/1),N=e.length,r}function h(e,t,r,n){try{const a=B.__wbindgen_add_to_stack_pointer(-16);p(e,X),p(t,Ke),p(r,de);const s=g(n,B.__wbindgen_malloc,B.__wbindgen_realloc),c=N;B.verifyFunctionExecution(a,e.__wbg_ptr,t.__wbg_ptr,r.__wbg_ptr,s,c);var i=u()[a/4+0],_=u()[a/4+1];if(u()[a/4+2])throw o(_);return 0!==i}finally{B.__wbindgen_add_to_stack_pointer(16)}}let L=null;function v(){return null!==L&&L.buffer===B.memory.buffer||(L=new BigInt64Array(B.memory.buffer)),L}function m(e,t){return e>>>=0,s().subarray(e/1,e/1+t)}function P(e){B.runRayonThread(e)}function k(e,t){return o(B.initThreadPool(d(e),t))}function K(e,t){try{return e.apply(this,t)}catch(e){B.__wbindgen_exn_store(d(e))}}function S(e,t,r,n){B.wasm_bindgen__convert__closures__invoke2_mut__h2157eed66e6e3fca(e,t,d(r),d(n))}const W="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((e=>B.__wbg_address_free(e>>>0)));let q=class e{static __wrap(t){t>>>=0;const r=Object.create(e.prototype);return r.__wbg_ptr=t,W.register(r,r.__wbg_ptr,r),r}__destroy_into_raw(){const e=this.__wbg_ptr;return this.__wbg_ptr=0,W.unregister(this),e}free(){const e=this.__destroy_into_raw();B.__wbg_address_free(e)}static from_private_key(t){p(t,ae);const r=B.address_from_private_key(t.__wbg_ptr);return e.__wrap(r)}static from_view_key(t){p(t,Te);const r=B.address_from_view_key(t.__wbg_ptr);return e.__wrap(r)}static from_string(t){const r=g(t,B.__wbindgen_malloc,B.__wbindgen_realloc),n=N,i=B.address_from_string(r,n);return e.__wrap(i)}to_string(){let e,t;try{const i=B.__wbindgen_add_to_stack_pointer(-16);B.address_to_string(i,this.__wbg_ptr);var r=u()[i/4+0],n=u()[i/4+1];return e=r,t=n,c(r,n)}finally{B.__wbindgen_add_to_stack_pointer(16),B.__wbindgen_free(e,t,1)}}verify(e,t){const r=y(e,B.__wbindgen_malloc),n=N;p(t,ve);return 0!==B.address_verify(this.__wbg_ptr,r,n,t.__wbg_ptr)}};const H="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((e=>B.__wbg_execution_free(e>>>0)));let X=class e{static __wrap(t){t>>>=0;const r=Object.create(e.prototype);return r.__wbg_ptr=t,H.register(r,r.__wbg_ptr,r),r}__destroy_into_raw(){const e=this.__wbg_ptr;return this.__wbg_ptr=0,H.unregister(this),e}free(){const e=this.__destroy_into_raw();B.__wbg_execution_free(e)}toString(){let e,t;try{const i=B.__wbindgen_add_to_stack_pointer(-16);B.execution_toString(i,this.__wbg_ptr);var r=u()[i/4+0],n=u()[i/4+1];return e=r,t=n,c(r,n)}finally{B.__wbindgen_add_to_stack_pointer(16),B.__wbindgen_free(e,t,1)}}static fromString(t){try{const i=B.__wbindgen_add_to_stack_pointer(-16),_=g(t,B.__wbindgen_malloc,B.__wbindgen_realloc),a=N;B.execution_fromString(i,_,a);var r=u()[i/4+0],n=u()[i/4+1];if(u()[i/4+2])throw o(n);return e.__wrap(r)}finally{B.__wbindgen_add_to_stack_pointer(16)}}};const J="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((e=>B.__wbg_executionresponse_free(e>>>0)));let Y=class e{static __wrap(t){t>>>=0;const r=Object.create(e.prototype);return r.__wbg_ptr=t,J.register(r,r.__wbg_ptr,r),r}__destroy_into_raw(){const e=this.__wbg_ptr;return this.__wbg_ptr=0,J.unregister(this),e}free(){const e=this.__destroy_into_raw();B.__wbg_executionresponse_free(e)}getOutputs(){return o(B.executionresponse_getOutputs(this.__wbg_ptr))}getExecution(){const e=B.executionresponse_getExecution(this.__wbg_ptr);return 0===e?void 0:X.__wrap(e)}getKeys(){try{const r=B.__wbindgen_add_to_stack_pointer(-16);B.executionresponse_getKeys(r,this.__wbg_ptr);var e=u()[r/4+0],t=u()[r/4+1];if(u()[r/4+2])throw o(t);return ee.__wrap(e)}finally{B.__wbindgen_add_to_stack_pointer(16)}}getProvingKey(){const e=B.executionresponse_getProvingKey(this.__wbg_ptr);return 0===e?void 0:fe.__wrap(e)}getVerifyingKey(){const e=B.executionresponse_getVerifyingKey(this.__wbg_ptr);return Ke.__wrap(e)}getFunctionId(){let e,t;try{const i=B.__wbindgen_add_to_stack_pointer(-16);B.executionresponse_getFunctionId(i,this.__wbg_ptr);var r=u()[i/4+0],n=u()[i/4+1];return e=r,t=n,c(r,n)}finally{B.__wbindgen_add_to_stack_pointer(16),B.__wbindgen_free(e,t,1)}}getProgram(){const e=B.executionresponse_getProgram(this.__wbg_ptr);return de.__wrap(e)}};const G="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((e=>B.__wbg_field_free(e>>>0)));let Q=class e{static __wrap(t){t>>>=0;const r=Object.create(e.prototype);return r.__wbg_ptr=t,G.register(r,r.__wbg_ptr,r),r}__destroy_into_raw(){const e=this.__wbg_ptr;return this.__wbg_ptr=0,G.unregister(this),e}free(){const e=this.__destroy_into_raw();B.__wbg_field_free(e)}toString(){let e,t;try{const i=B.__wbindgen_add_to_stack_pointer(-16);B.field_toString(i,this.__wbg_ptr);var r=u()[i/4+0],n=u()[i/4+1];return e=r,t=n,c(r,n)}finally{B.__wbindgen_add_to_stack_pointer(16),B.__wbindgen_free(e,t,1)}}static fromString(t){try{const i=B.__wbindgen_add_to_stack_pointer(-16),_=g(t,B.__wbindgen_malloc,B.__wbindgen_realloc),a=N;B.field_fromString(i,_,a);var r=u()[i/4+0],n=u()[i/4+1];if(u()[i/4+2])throw o(n);return e.__wrap(r)}finally{B.__wbindgen_add_to_stack_pointer(16)}}};const Z="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((e=>B.__wbg_keypair_free(e>>>0)));class ee{static __wrap(e){e>>>=0;const t=Object.create(ee.prototype);return t.__wbg_ptr=e,Z.register(t,t.__wbg_ptr,t),t}__destroy_into_raw(){const e=this.__wbg_ptr;return this.__wbg_ptr=0,Z.unregister(this),e}free(){const e=this.__destroy_into_raw();B.__wbg_keypair_free(e)}constructor(e,t){p(e,fe);var r=e.__destroy_into_raw();p(t,Ke);var n=t.__destroy_into_raw();const i=B.keypair_new(r,n);return this.__wbg_ptr=i>>>0,this}provingKey(){try{const r=B.__wbindgen_add_to_stack_pointer(-16);B.keypair_provingKey(r,this.__wbg_ptr);var e=u()[r/4+0],t=u()[r/4+1];if(u()[r/4+2])throw o(t);return fe.__wrap(e)}finally{B.__wbindgen_add_to_stack_pointer(16)}}verifyingKey(){try{const r=B.__wbindgen_add_to_stack_pointer(-16);B.keypair_verifyingKey(r,this.__wbg_ptr);var e=u()[r/4+0],t=u()[r/4+1];if(u()[r/4+2])throw o(t);return Ke.__wrap(e)}finally{B.__wbindgen_add_to_stack_pointer(16)}}}const te="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((e=>B.__wbg_metadata_free(e>>>0)));let re=class e{static __wrap(t){t>>>=0;const r=Object.create(e.prototype);return r.__wbg_ptr=t,te.register(r,r.__wbg_ptr,r),r}__destroy_into_raw(){const e=this.__wbg_ptr;return this.__wbg_ptr=0,te.unregister(this),e}free(){const e=this.__destroy_into_raw();B.__wbg_metadata_free(e)}get name(){let e,t;try{const i=B.__wbindgen_add_to_stack_pointer(-16);B.__wbg_get_metadata_name(i,this.__wbg_ptr);var r=u()[i/4+0],n=u()[i/4+1];return e=r,t=n,c(r,n)}finally{B.__wbindgen_add_to_stack_pointer(16),B.__wbindgen_free(e,t,1)}}set name(e){const t=g(e,B.__wbindgen_malloc,B.__wbindgen_realloc),r=N;B.__wbg_set_metadata_name(this.__wbg_ptr,t,r)}get locator(){let e,t;try{const i=B.__wbindgen_add_to_stack_pointer(-16);B.__wbg_get_metadata_locator(i,this.__wbg_ptr);var r=u()[i/4+0],n=u()[i/4+1];return e=r,t=n,c(r,n)}finally{B.__wbindgen_add_to_stack_pointer(16),B.__wbindgen_free(e,t,1)}}set locator(e){const t=g(e,B.__wbindgen_malloc,B.__wbindgen_realloc),r=N;B.__wbg_set_metadata_locator(this.__wbg_ptr,t,r)}get prover(){let e,t;try{const i=B.__wbindgen_add_to_stack_pointer(-16);B.__wbg_get_metadata_prover(i,this.__wbg_ptr);var r=u()[i/4+0],n=u()[i/4+1];return e=r,t=n,c(r,n)}finally{B.__wbindgen_add_to_stack_pointer(16),B.__wbindgen_free(e,t,1)}}set prover(e){const t=g(e,B.__wbindgen_malloc,B.__wbindgen_realloc),r=N;B.__wbg_set_metadata_prover(this.__wbg_ptr,t,r)}get verifier(){let e,t;try{const i=B.__wbindgen_add_to_stack_pointer(-16);B.__wbg_get_metadata_verifier(i,this.__wbg_ptr);var r=u()[i/4+0],n=u()[i/4+1];return e=r,t=n,c(r,n)}finally{B.__wbindgen_add_to_stack_pointer(16),B.__wbindgen_free(e,t,1)}}set verifier(e){const t=g(e,B.__wbindgen_malloc,B.__wbindgen_realloc),r=N;B.__wbg_set_metadata_verifier(this.__wbg_ptr,t,r)}get verifyingKey(){let e,t;try{const i=B.__wbindgen_add_to_stack_pointer(-16);B.__wbg_get_metadata_verifyingKey(i,this.__wbg_ptr);var r=u()[i/4+0],n=u()[i/4+1];return e=r,t=n,c(r,n)}finally{B.__wbindgen_add_to_stack_pointer(16),B.__wbindgen_free(e,t,1)}}set verifyingKey(e){const t=g(e,B.__wbindgen_malloc,B.__wbindgen_realloc),r=N;B.__wbg_set_metadata_verifyingKey(this.__wbg_ptr,t,r)}static baseUrl(){let e,t;try{const i=B.__wbindgen_add_to_stack_pointer(-16);B.metadata_baseUrl(i);var r=u()[i/4+0],n=u()[i/4+1];return e=r,t=n,c(r,n)}finally{B.__wbindgen_add_to_stack_pointer(16),B.__wbindgen_free(e,t,1)}}static bond_public(){const t=B.metadata_bond_public();return e.__wrap(t)}static bond_validator(){const t=B.metadata_bond_validator();return e.__wrap(t)}static claim_unbond_public(){const t=B.metadata_claim_unbond_public();return e.__wrap(t)}static fee_private(){const t=B.metadata_fee_private();return e.__wrap(t)}static fee_public(){const t=B.metadata_fee_public();return e.__wrap(t)}static inclusion(){const t=B.metadata_inclusion();return e.__wrap(t)}static join(){const t=B.metadata_join();return e.__wrap(t)}static set_validator_state(){const t=B.metadata_set_validator_state();return e.__wrap(t)}static split(){const t=B.metadata_split();return e.__wrap(t)}static transfer_private(){const t=B.metadata_transfer_private();return e.__wrap(t)}static transfer_private_to_public(){const t=B.metadata_transfer_private_to_public();return e.__wrap(t)}static transfer_public(){const t=B.metadata_transfer_public();return e.__wrap(t)}static transfer_public_as_signer(){const t=B.metadata_transfer_public_as_signer();return e.__wrap(t)}static transfer_public_to_private(){const t=B.metadata_transfer_public_to_private();return e.__wrap(t)}static unbond_public(){const t=B.metadata_unbond_public();return e.__wrap(t)}};const ne="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((e=>B.__wbg_offlinequery_free(e>>>0)));let ie=class e{static __wrap(t){t>>>=0;const r=Object.create(e.prototype);return r.__wbg_ptr=t,ne.register(r,r.__wbg_ptr,r),r}__destroy_into_raw(){const e=this.__wbg_ptr;return this.__wbg_ptr=0,ne.unregister(this),e}free(){const e=this.__destroy_into_raw();B.__wbg_offlinequery_free(e)}constructor(e){try{const n=B.__wbindgen_add_to_stack_pointer(-16),i=g(e,B.__wbindgen_malloc,B.__wbindgen_realloc),_=N;B.offlinequery_new(n,i,_);var t=u()[n/4+0],r=u()[n/4+1];if(u()[n/4+2])throw o(r);return this.__wbg_ptr=t>>>0,this}finally{B.__wbindgen_add_to_stack_pointer(16)}}addStatePath(e,t){try{const n=B.__wbindgen_add_to_stack_pointer(-16),i=g(e,B.__wbindgen_malloc,B.__wbindgen_realloc),_=N,a=g(t,B.__wbindgen_malloc,B.__wbindgen_realloc),s=N;B.offlinequery_addStatePath(n,this.__wbg_ptr,i,_,a,s);var r=u()[n/4+0];if(u()[n/4+1])throw o(r)}finally{B.__wbindgen_add_to_stack_pointer(16)}}toString(){let e,t;try{const i=B.__wbindgen_add_to_stack_pointer(-16);B.offlinequery_toString(i,this.__wbg_ptr);var r=u()[i/4+0],n=u()[i/4+1];return e=r,t=n,c(r,n)}finally{B.__wbindgen_add_to_stack_pointer(16),B.__wbindgen_free(e,t,1)}}static fromString(t){try{const i=B.__wbindgen_add_to_stack_pointer(-16),_=g(t,B.__wbindgen_malloc,B.__wbindgen_realloc),a=N;B.offlinequery_fromString(i,_,a);var r=u()[i/4+0],n=u()[i/4+1];if(u()[i/4+2])throw o(n);return e.__wrap(r)}finally{B.__wbindgen_add_to_stack_pointer(16)}}};const _e="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((e=>B.__wbg_privatekey_free(e>>>0)));let ae=class e{static __wrap(t){t>>>=0;const r=Object.create(e.prototype);return r.__wbg_ptr=t,_e.register(r,r.__wbg_ptr,r),r}__destroy_into_raw(){const e=this.__wbg_ptr;return this.__wbg_ptr=0,_e.unregister(this),e}free(){const e=this.__destroy_into_raw();B.__wbg_privatekey_free(e)}constructor(){const e=B.privatekey_new();return this.__wbg_ptr=e>>>0,this}static from_seed_unchecked(t){const r=y(t,B.__wbindgen_malloc),n=N,i=B.privatekey_from_seed_unchecked(r,n);return e.__wrap(i)}static from_string(t){try{const i=B.__wbindgen_add_to_stack_pointer(-16),_=g(t,B.__wbindgen_malloc,B.__wbindgen_realloc),a=N;B.privatekey_from_string(i,_,a);var r=u()[i/4+0],n=u()[i/4+1];if(u()[i/4+2])throw o(n);return e.__wrap(r)}finally{B.__wbindgen_add_to_stack_pointer(16)}}to_string(){let e,t;try{const i=B.__wbindgen_add_to_stack_pointer(-16);B.privatekey_to_string(i,this.__wbg_ptr);var r=u()[i/4+0],n=u()[i/4+1];return e=r,t=n,c(r,n)}finally{B.__wbindgen_add_to_stack_pointer(16),B.__wbindgen_free(e,t,1)}}to_view_key(){const e=B.privatekey_to_view_key(this.__wbg_ptr);return Te.__wrap(e)}to_address(){const e=B.privatekey_to_address(this.__wbg_ptr);return q.__wrap(e)}sign(e){const t=y(e,B.__wbindgen_malloc),r=N,n=B.privatekey_sign(this.__wbg_ptr,t,r);return ve.__wrap(n)}static newEncrypted(e){try{const n=B.__wbindgen_add_to_stack_pointer(-16),i=g(e,B.__wbindgen_malloc,B.__wbindgen_realloc),_=N;B.privatekey_newEncrypted(n,i,_);var t=u()[n/4+0],r=u()[n/4+1];if(u()[n/4+2])throw o(r);return se.__wrap(t)}finally{B.__wbindgen_add_to_stack_pointer(16)}}toCiphertext(e){try{const n=B.__wbindgen_add_to_stack_pointer(-16),i=g(e,B.__wbindgen_malloc,B.__wbindgen_realloc),_=N;B.privatekey_toCiphertext(n,this.__wbg_ptr,i,_);var t=u()[n/4+0],r=u()[n/4+1];if(u()[n/4+2])throw o(r);return se.__wrap(t)}finally{B.__wbindgen_add_to_stack_pointer(16)}}static fromPrivateKeyCiphertext(t,r){try{const _=B.__wbindgen_add_to_stack_pointer(-16);p(t,se);const a=g(r,B.__wbindgen_malloc,B.__wbindgen_realloc),s=N;B.privatekey_fromPrivateKeyCiphertext(_,t.__wbg_ptr,a,s);var n=u()[_/4+0],i=u()[_/4+1];if(u()[_/4+2])throw o(i);return e.__wrap(n)}finally{B.__wbindgen_add_to_stack_pointer(16)}}};const oe="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((e=>B.__wbg_privatekeyciphertext_free(e>>>0)));let se=class e{static __wrap(t){t>>>=0;const r=Object.create(e.prototype);return r.__wbg_ptr=t,oe.register(r,r.__wbg_ptr,r),r}__destroy_into_raw(){const e=this.__wbg_ptr;return this.__wbg_ptr=0,oe.unregister(this),e}free(){const e=this.__destroy_into_raw();B.__wbg_privatekeyciphertext_free(e)}static encryptPrivateKey(t,r){try{const _=B.__wbindgen_add_to_stack_pointer(-16);p(t,ae);const a=g(r,B.__wbindgen_malloc,B.__wbindgen_realloc),s=N;B.privatekey_toCiphertext(_,t.__wbg_ptr,a,s);var n=u()[_/4+0],i=u()[_/4+1];if(u()[_/4+2])throw o(i);return e.__wrap(n)}finally{B.__wbindgen_add_to_stack_pointer(16)}}decryptToPrivateKey(e){try{const n=B.__wbindgen_add_to_stack_pointer(-16),i=g(e,B.__wbindgen_malloc,B.__wbindgen_realloc),_=N;B.privatekeyciphertext_decryptToPrivateKey(n,this.__wbg_ptr,i,_);var t=u()[n/4+0],r=u()[n/4+1];if(u()[n/4+2])throw o(r);return ae.__wrap(t)}finally{B.__wbindgen_add_to_stack_pointer(16)}}toString(){let e,t;try{const i=B.__wbindgen_add_to_stack_pointer(-16);B.privatekeyciphertext_toString(i,this.__wbg_ptr);var r=u()[i/4+0],n=u()[i/4+1];return e=r,t=n,c(r,n)}finally{B.__wbindgen_add_to_stack_pointer(16),B.__wbindgen_free(e,t,1)}}static fromString(t){try{const i=B.__wbindgen_add_to_stack_pointer(-16),_=g(t,B.__wbindgen_malloc,B.__wbindgen_realloc),a=N;B.privatekeyciphertext_fromString(i,_,a);var r=u()[i/4+0],n=u()[i/4+1];if(u()[i/4+2])throw o(n);return e.__wrap(r)}finally{B.__wbindgen_add_to_stack_pointer(16)}}};const ce="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((e=>B.__wbg_program_free(e>>>0)));let de=class e{static __wrap(t){t>>>=0;const r=Object.create(e.prototype);return r.__wbg_ptr=t,ce.register(r,r.__wbg_ptr,r),r}__destroy_into_raw(){const e=this.__wbg_ptr;return this.__wbg_ptr=0,ce.unregister(this),e}free(){const e=this.__destroy_into_raw();B.__wbg_program_free(e)}static fromString(t){try{const i=B.__wbindgen_add_to_stack_pointer(-16),_=g(t,B.__wbindgen_malloc,B.__wbindgen_realloc),a=N;B.program_fromString(i,_,a);var r=u()[i/4+0],n=u()[i/4+1];if(u()[i/4+2])throw o(n);return e.__wrap(r)}finally{B.__wbindgen_add_to_stack_pointer(16)}}toString(){let e,t;try{const i=B.__wbindgen_add_to_stack_pointer(-16);B.program_toString(i,this.__wbg_ptr);var r=u()[i/4+0],n=u()[i/4+1];return e=r,t=n,c(r,n)}finally{B.__wbindgen_add_to_stack_pointer(16),B.__wbindgen_free(e,t,1)}}hasFunction(e){const t=g(e,B.__wbindgen_malloc,B.__wbindgen_realloc),r=N;return 0!==B.program_hasFunction(this.__wbg_ptr,t,r)}getFunctions(){return o(B.program_getFunctions(this.__wbg_ptr))}getFunctionInputs(e){try{const n=B.__wbindgen_add_to_stack_pointer(-16),i=g(e,B.__wbindgen_malloc,B.__wbindgen_realloc),_=N;B.program_getFunctionInputs(n,this.__wbg_ptr,i,_);var t=u()[n/4+0],r=u()[n/4+1];if(u()[n/4+2])throw o(r);return o(t)}finally{B.__wbindgen_add_to_stack_pointer(16)}}getMappings(){try{const r=B.__wbindgen_add_to_stack_pointer(-16);B.program_getMappings(r,this.__wbg_ptr);var e=u()[r/4+0],t=u()[r/4+1];if(u()[r/4+2])throw o(t);return o(e)}finally{B.__wbindgen_add_to_stack_pointer(16)}}getRecordMembers(e){try{const n=B.__wbindgen_add_to_stack_pointer(-16),i=g(e,B.__wbindgen_malloc,B.__wbindgen_realloc),_=N;B.program_getRecordMembers(n,this.__wbg_ptr,i,_);var t=u()[n/4+0],r=u()[n/4+1];if(u()[n/4+2])throw o(r);return o(t)}finally{B.__wbindgen_add_to_stack_pointer(16)}}getStructMembers(e){try{const n=B.__wbindgen_add_to_stack_pointer(-16),i=g(e,B.__wbindgen_malloc,B.__wbindgen_realloc),_=N;B.program_getStructMembers(n,this.__wbg_ptr,i,_);var t=u()[n/4+0],r=u()[n/4+1];if(u()[n/4+2])throw o(r);return o(t)}finally{B.__wbindgen_add_to_stack_pointer(16)}}static getCreditsProgram(){const t=B.program_getCreditsProgram();return e.__wrap(t)}id(){let e,t;try{const i=B.__wbindgen_add_to_stack_pointer(-16);B.program_id(i,this.__wbg_ptr);var r=u()[i/4+0],n=u()[i/4+1];return e=r,t=n,c(r,n)}finally{B.__wbindgen_add_to_stack_pointer(16),B.__wbindgen_free(e,t,1)}}address(){try{const r=B.__wbindgen_add_to_stack_pointer(-16);B.program_address(r,this.__wbg_ptr);var e=u()[r/4+0],t=u()[r/4+1];if(u()[r/4+2])throw o(t);return q.__wrap(e)}finally{B.__wbindgen_add_to_stack_pointer(16)}}isEqual(t){p(t,e);return 0!==B.program_isEqual(this.__wbg_ptr,t.__wbg_ptr)}getImports(){return o(B.program_getImports(this.__wbg_ptr))}};const ge="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((e=>B.__wbg_programmanager_free(e>>>0)));let le=class{__destroy_into_raw(){const e=this.__wbg_ptr;return this.__wbg_ptr=0,ge.unregister(this),e}free(){const e=this.__destroy_into_raw();B.__wbg_programmanager_free(e)}static buildDeploymentTransaction(e,t,r,n,i,_,a,s,c){p(e,ae);const u=g(t,B.__wbindgen_malloc,B.__wbindgen_realloc),f=N;let w=0;l(n)||(p(n,ye),w=n.__destroy_into_raw());var b=l(i)?0:g(i,B.__wbindgen_malloc,B.__wbindgen_realloc),y=N;let h=0;l(a)||(p(a,fe),h=a.__destroy_into_raw());let v=0;l(s)||(p(s,Ke),v=s.__destroy_into_raw());let m=0;l(c)||(p(c,ie),m=c.__destroy_into_raw());return o(B.programmanager_buildDeploymentTransaction(e.__wbg_ptr,u,f,r,w,b,y,l(_)?0:d(_),h,v,m))}static estimateDeploymentFee(e,t){const r=g(e,B.__wbindgen_malloc,B.__wbindgen_realloc),n=N;return o(B.programmanager_estimateDeploymentFee(r,n,l(t)?0:d(t)))}static estimateProgramNameCost(e){try{const n=B.__wbindgen_add_to_stack_pointer(-16),i=g(e,B.__wbindgen_malloc,B.__wbindgen_realloc),_=N;B.programmanager_estimateProgramNameCost(n,i,_);var t=v()[n/8+0],r=u()[n/4+2];if(u()[n/4+3])throw o(r);return BigInt.asUintN(64,t)}finally{B.__wbindgen_add_to_stack_pointer(16)}}static executeFunctionOffline(e,t,r,n,i,_,a,s,c,u,f){p(e,ae);const w=g(t,B.__wbindgen_malloc,B.__wbindgen_realloc),b=N,y=g(r,B.__wbindgen_malloc,B.__wbindgen_realloc),h=N;let v=0;l(s)||(p(s,fe),v=s.__destroy_into_raw());let m=0;l(c)||(p(c,Ke),m=c.__destroy_into_raw());var P=l(u)?0:g(u,B.__wbindgen_malloc,B.__wbindgen_realloc),k=N;let K=0;l(f)||(p(f,ie),K=f.__destroy_into_raw());return o(B.programmanager_executeFunctionOffline(e.__wbg_ptr,w,b,y,h,d(n),i,_,l(a)?0:d(a),v,m,P,k,K))}static buildExecutionTransaction(e,t,r,n,i,_,a,s,c,u,f,w,b){p(e,ae);const y=g(t,B.__wbindgen_malloc,B.__wbindgen_realloc),h=N,v=g(r,B.__wbindgen_malloc,B.__wbindgen_realloc),m=N;let P=0;l(_)||(p(_,ye),P=_.__destroy_into_raw());var k=l(a)?0:g(a,B.__wbindgen_malloc,B.__wbindgen_realloc),K=N;let S=0;l(c)||(p(c,fe),S=c.__destroy_into_raw());let T=0;l(u)||(p(u,Ke),T=u.__destroy_into_raw());let E=0;l(f)||(p(f,fe),E=f.__destroy_into_raw());let V=0;l(w)||(p(w,Ke),V=w.__destroy_into_raw());let R=0;l(b)||(p(b,ie),R=b.__destroy_into_raw());return o(B.programmanager_buildExecutionTransaction(e.__wbg_ptr,y,h,v,m,d(n),i,P,k,K,l(s)?0:d(s),S,T,E,V,R))}static estimateExecutionFee(e,t,r,n,i,_,a,s,c){p(e,ae);const u=g(t,B.__wbindgen_malloc,B.__wbindgen_realloc),f=N,w=g(r,B.__wbindgen_malloc,B.__wbindgen_realloc),b=N;var y=l(i)?0:g(i,B.__wbindgen_malloc,B.__wbindgen_realloc),h=N;let v=0;l(a)||(p(a,fe),v=a.__destroy_into_raw());let m=0;l(s)||(p(s,Ke),m=s.__destroy_into_raw());let P=0;l(c)||(p(c,ie),P=c.__destroy_into_raw());return o(B.programmanager_estimateExecutionFee(e.__wbg_ptr,u,f,w,b,d(n),y,h,l(_)?0:d(_),v,m,P))}static estimateFinalizeFee(e,t){try{const i=B.__wbindgen_add_to_stack_pointer(-16),_=g(e,B.__wbindgen_malloc,B.__wbindgen_realloc),a=N,s=g(t,B.__wbindgen_malloc,B.__wbindgen_realloc),c=N;B.programmanager_estimateFinalizeFee(i,_,a,s,c);var r=v()[i/8+0],n=u()[i/4+2];if(u()[i/4+3])throw o(n);return BigInt.asUintN(64,r)}finally{B.__wbindgen_add_to_stack_pointer(16)}}static buildJoinTransaction(e,t,r,n,i,_,a,s,c,d,u){p(e,ae),p(t,ye);var f=t.__destroy_into_raw();p(r,ye);var w=r.__destroy_into_raw();let b=0;l(i)||(p(i,ye),b=i.__destroy_into_raw());var y=l(_)?0:g(_,B.__wbindgen_malloc,B.__wbindgen_realloc),h=N;let v=0;l(a)||(p(a,fe),v=a.__destroy_into_raw());let m=0;l(s)||(p(s,Ke),m=s.__destroy_into_raw());let P=0;l(c)||(p(c,fe),P=c.__destroy_into_raw());let k=0;l(d)||(p(d,Ke),k=d.__destroy_into_raw());let K=0;l(u)||(p(u,ie),K=u.__destroy_into_raw());return o(B.programmanager_buildJoinTransaction(e.__wbg_ptr,f,w,n,b,y,h,v,m,P,k,K))}static buildSplitTransaction(e,t,r,n,i,_,a){p(e,ae),p(r,ye);var s=r.__destroy_into_raw(),c=l(n)?0:g(n,B.__wbindgen_malloc,B.__wbindgen_realloc),d=N;let u=0;l(i)||(p(i,fe),u=i.__destroy_into_raw());let f=0;l(_)||(p(_,Ke),f=_.__destroy_into_raw());let w=0;l(a)||(p(a,ie),w=a.__destroy_into_raw());return o(B.programmanager_buildSplitTransaction(e.__wbg_ptr,t,s,c,d,u,f,w))}static buildTransferTransaction(e,t,r,n,i,_,a,s,c,d,u,f,w){p(e,ae);const b=g(r,B.__wbindgen_malloc,B.__wbindgen_realloc),y=N,h=g(n,B.__wbindgen_malloc,B.__wbindgen_realloc),v=N;let m=0;l(i)||(p(i,ye),m=i.__destroy_into_raw());let P=0;l(a)||(p(a,ye),P=a.__destroy_into_raw());var k=l(s)?0:g(s,B.__wbindgen_malloc,B.__wbindgen_realloc),K=N;let S=0;l(c)||(p(c,fe),S=c.__destroy_into_raw());let T=0;l(d)||(p(d,Ke),T=d.__destroy_into_raw());let E=0;l(u)||(p(u,fe),E=u.__destroy_into_raw());let V=0;l(f)||(p(f,Ke),V=f.__destroy_into_raw());let R=0;l(w)||(p(w,ie),R=w.__destroy_into_raw());return o(B.programmanager_buildTransferTransaction(e.__wbg_ptr,t,b,y,h,v,m,_,P,k,K,S,T,E,V,R))}static synthesizeKeyPair(e,t,r,n,i){p(e,ae);const _=g(t,B.__wbindgen_malloc,B.__wbindgen_realloc),a=N,s=g(r,B.__wbindgen_malloc,B.__wbindgen_realloc),c=N;return o(B.programmanager_synthesizeKeyPair(e.__wbg_ptr,_,a,s,c,d(n),l(i)?0:d(i)))}};const ue="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((e=>B.__wbg_provingkey_free(e>>>0)));let fe=class e{static __wrap(t){t>>>=0;const r=Object.create(e.prototype);return r.__wbg_ptr=t,ue.register(r,r.__wbg_ptr,r),r}__destroy_into_raw(){const e=this.__wbg_ptr;return this.__wbg_ptr=0,ue.unregister(this),e}free(){const e=this.__destroy_into_raw();B.__wbg_provingkey_free(e)}isBondPublicProver(){return 0!==B.provingkey_isBondPublicProver(this.__wbg_ptr)}isBondValidatorProver(){return 0!==B.provingkey_isBondValidatorProver(this.__wbg_ptr)}isClaimUnbondPublicProver(){return 0!==B.provingkey_isClaimUnbondPublicProver(this.__wbg_ptr)}isFeePrivateProver(){return 0!==B.provingkey_isFeePrivateProver(this.__wbg_ptr)}isFeePublicProver(){return 0!==B.provingkey_isFeePublicProver(this.__wbg_ptr)}isInclusionProver(){return 0!==B.provingkey_isInclusionProver(this.__wbg_ptr)}isJoinProver(){return 0!==B.provingkey_isJoinProver(this.__wbg_ptr)}isSetValidatorStateProver(){return 0!==B.provingkey_isSetValidatorStateProver(this.__wbg_ptr)}isSplitProver(){return 0!==B.provingkey_isSplitProver(this.__wbg_ptr)}isTransferPrivateProver(){return 0!==B.provingkey_isTransferPrivateProver(this.__wbg_ptr)}isTransferPrivateToPublicProver(){return 0!==B.provingkey_isTransferPrivateToPublicProver(this.__wbg_ptr)}isTransferPublicProver(){return 0!==B.provingkey_isTransferPublicProver(this.__wbg_ptr)}isTransferPublicAsSignerProver(){return 0!==B.provingkey_isTransferPublicAsSignerProver(this.__wbg_ptr)}isTransferPublicToPrivateProver(){return 0!==B.provingkey_isTransferPublicToPrivateProver(this.__wbg_ptr)}isUnbondPublicProver(){return 0!==B.provingkey_isUnbondPublicProver(this.__wbg_ptr)}checksum(){let e,t;try{const i=B.__wbindgen_add_to_stack_pointer(-16);B.provingkey_checksum(i,this.__wbg_ptr);var r=u()[i/4+0],n=u()[i/4+1];return e=r,t=n,c(r,n)}finally{B.__wbindgen_add_to_stack_pointer(16),B.__wbindgen_free(e,t,1)}}copy(){const t=B.provingkey_copy(this.__wbg_ptr);return e.__wrap(t)}static fromBytes(t){try{const i=B.__wbindgen_add_to_stack_pointer(-16),_=y(t,B.__wbindgen_malloc),a=N;B.provingkey_fromBytes(i,_,a);var r=u()[i/4+0],n=u()[i/4+1];if(u()[i/4+2])throw o(n);return e.__wrap(r)}finally{B.__wbindgen_add_to_stack_pointer(16)}}static fromString(t){try{const i=B.__wbindgen_add_to_stack_pointer(-16),_=g(t,B.__wbindgen_malloc,B.__wbindgen_realloc),a=N;B.provingkey_fromString(i,_,a);var r=u()[i/4+0],n=u()[i/4+1];if(u()[i/4+2])throw o(n);return e.__wrap(r)}finally{B.__wbindgen_add_to_stack_pointer(16)}}toBytes(){try{const i=B.__wbindgen_add_to_stack_pointer(-16);B.provingkey_toBytes(i,this.__wbg_ptr);var e=u()[i/4+0],t=u()[i/4+1],r=u()[i/4+2];if(u()[i/4+3])throw o(r);var n=m(e,t).slice();return B.__wbindgen_free(e,1*t,1),n}finally{B.__wbindgen_add_to_stack_pointer(16)}}toString(){let e,t;try{const i=B.__wbindgen_add_to_stack_pointer(-16);B.provingkey_toString(i,this.__wbg_ptr);var r=u()[i/4+0],n=u()[i/4+1];return e=r,t=n,c(r,n)}finally{B.__wbindgen_add_to_stack_pointer(16),B.__wbindgen_free(e,t,1)}}};const we="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((e=>B.__wbg_recordciphertext_free(e>>>0)));let be=class e{static __wrap(t){t>>>=0;const r=Object.create(e.prototype);return r.__wbg_ptr=t,we.register(r,r.__wbg_ptr,r),r}__destroy_into_raw(){const e=this.__wbg_ptr;return this.__wbg_ptr=0,we.unregister(this),e}free(){const e=this.__destroy_into_raw();B.__wbg_recordciphertext_free(e)}static fromString(t){try{const i=B.__wbindgen_add_to_stack_pointer(-16),_=g(t,B.__wbindgen_malloc,B.__wbindgen_realloc),a=N;B.recordciphertext_fromString(i,_,a);var r=u()[i/4+0],n=u()[i/4+1];if(u()[i/4+2])throw o(n);return e.__wrap(r)}finally{B.__wbindgen_add_to_stack_pointer(16)}}toString(){let e,t;try{const i=B.__wbindgen_add_to_stack_pointer(-16);B.recordciphertext_toString(i,this.__wbg_ptr);var r=u()[i/4+0],n=u()[i/4+1];return e=r,t=n,c(r,n)}finally{B.__wbindgen_add_to_stack_pointer(16),B.__wbindgen_free(e,t,1)}}decrypt(e){try{const n=B.__wbindgen_add_to_stack_pointer(-16);p(e,Te),B.recordciphertext_decrypt(n,this.__wbg_ptr,e.__wbg_ptr);var t=u()[n/4+0],r=u()[n/4+1];if(u()[n/4+2])throw o(r);return ye.__wrap(t)}finally{B.__wbindgen_add_to_stack_pointer(16)}}isOwner(e){p(e,Te);return 0!==B.recordciphertext_isOwner(this.__wbg_ptr,e.__wbg_ptr)}};const pe="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((e=>B.__wbg_recordplaintext_free(e>>>0)));let ye=class e{static __wrap(t){t>>>=0;const r=Object.create(e.prototype);return r.__wbg_ptr=t,pe.register(r,r.__wbg_ptr,r),r}__destroy_into_raw(){const e=this.__wbg_ptr;return this.__wbg_ptr=0,pe.unregister(this),e}free(){const e=this.__destroy_into_raw();B.__wbg_recordplaintext_free(e)}commitment(e,t){try{const i=B.__wbindgen_add_to_stack_pointer(-16),_=g(e,B.__wbindgen_malloc,B.__wbindgen_realloc),a=N,s=g(t,B.__wbindgen_malloc,B.__wbindgen_realloc),c=N;B.recordplaintext_commitment(i,this.__wbg_ptr,_,a,s,c);var r=u()[i/4+0],n=u()[i/4+1];if(u()[i/4+2])throw o(n);return Q.__wrap(r)}finally{B.__wbindgen_add_to_stack_pointer(16)}}static fromString(t){try{const i=B.__wbindgen_add_to_stack_pointer(-16),_=g(t,B.__wbindgen_malloc,B.__wbindgen_realloc),a=N;B.recordplaintext_fromString(i,_,a);var r=u()[i/4+0],n=u()[i/4+1];if(u()[i/4+2])throw o(n);return e.__wrap(r)}finally{B.__wbindgen_add_to_stack_pointer(16)}}toString(){let e,t;try{const i=B.__wbindgen_add_to_stack_pointer(-16);B.recordplaintext_toString(i,this.__wbg_ptr);var r=u()[i/4+0],n=u()[i/4+1];return e=r,t=n,c(r,n)}finally{B.__wbindgen_add_to_stack_pointer(16),B.__wbindgen_free(e,t,1)}}microcredits(){const e=B.recordplaintext_microcredits(this.__wbg_ptr);return BigInt.asUintN(64,e)}nonce(){let e,t;try{const i=B.__wbindgen_add_to_stack_pointer(-16);B.recordplaintext_nonce(i,this.__wbg_ptr);var r=u()[i/4+0],n=u()[i/4+1];return e=r,t=n,c(r,n)}finally{B.__wbindgen_add_to_stack_pointer(16),B.__wbindgen_free(e,t,1)}}serialNumberString(e,t,r){let n,i;try{const w=B.__wbindgen_add_to_stack_pointer(-16);p(e,ae);const b=g(t,B.__wbindgen_malloc,B.__wbindgen_realloc),y=N,h=g(r,B.__wbindgen_malloc,B.__wbindgen_realloc),v=N;B.recordplaintext_serialNumberString(w,this.__wbg_ptr,e.__wbg_ptr,b,y,h,v);var _=u()[w/4+0],a=u()[w/4+1],s=u()[w/4+2],d=u()[w/4+3],l=_,f=a;if(d)throw l=0,f=0,o(s);return n=l,i=f,c(l,f)}finally{B.__wbindgen_add_to_stack_pointer(16),B.__wbindgen_free(n,i,1)}}};const he="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((e=>B.__wbg_signature_free(e>>>0)));let ve=class e{static __wrap(t){t>>>=0;const r=Object.create(e.prototype);return r.__wbg_ptr=t,he.register(r,r.__wbg_ptr,r),r}__destroy_into_raw(){const e=this.__wbg_ptr;return this.__wbg_ptr=0,he.unregister(this),e}free(){const e=this.__destroy_into_raw();B.__wbg_signature_free(e)}static sign(t,r){p(t,ae);const n=y(r,B.__wbindgen_malloc),i=N,_=B.privatekey_sign(t.__wbg_ptr,n,i);return e.__wrap(_)}verify(e,t){p(e,q);const r=y(t,B.__wbindgen_malloc),n=N;return 0!==B.signature_verify(this.__wbg_ptr,e.__wbg_ptr,r,n)}static from_string(t){const r=g(t,B.__wbindgen_malloc,B.__wbindgen_realloc),n=N,i=B.signature_from_string(r,n);return e.__wrap(i)}to_string(){let e,t;try{const i=B.__wbindgen_add_to_stack_pointer(-16);B.signature_to_string(i,this.__wbg_ptr);var r=u()[i/4+0],n=u()[i/4+1];return e=r,t=n,c(r,n)}finally{B.__wbindgen_add_to_stack_pointer(16),B.__wbindgen_free(e,t,1)}}};const me="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((e=>B.__wbg_transaction_free(e>>>0)));let Pe=class e{static __wrap(t){t>>>=0;const r=Object.create(e.prototype);return r.__wbg_ptr=t,me.register(r,r.__wbg_ptr,r),r}__destroy_into_raw(){const e=this.__wbg_ptr;return this.__wbg_ptr=0,me.unregister(this),e}free(){const e=this.__destroy_into_raw();B.__wbg_transaction_free(e)}static fromString(t){try{const i=B.__wbindgen_add_to_stack_pointer(-16),_=g(t,B.__wbindgen_malloc,B.__wbindgen_realloc),a=N;B.transaction_fromString(i,_,a);var r=u()[i/4+0],n=u()[i/4+1];if(u()[i/4+2])throw o(n);return e.__wrap(r)}finally{B.__wbindgen_add_to_stack_pointer(16)}}toString(){let e,t;try{const i=B.__wbindgen_add_to_stack_pointer(-16);B.transaction_toString(i,this.__wbg_ptr);var r=u()[i/4+0],n=u()[i/4+1];return e=r,t=n,c(r,n)}finally{B.__wbindgen_add_to_stack_pointer(16),B.__wbindgen_free(e,t,1)}}transactionId(){let e,t;try{const i=B.__wbindgen_add_to_stack_pointer(-16);B.transaction_transactionId(i,this.__wbg_ptr);var r=u()[i/4+0],n=u()[i/4+1];return e=r,t=n,c(r,n)}finally{B.__wbindgen_add_to_stack_pointer(16),B.__wbindgen_free(e,t,1)}}transactionType(){let e,t;try{const i=B.__wbindgen_add_to_stack_pointer(-16);B.transaction_transactionType(i,this.__wbg_ptr);var r=u()[i/4+0],n=u()[i/4+1];return e=r,t=n,c(r,n)}finally{B.__wbindgen_add_to_stack_pointer(16),B.__wbindgen_free(e,t,1)}}};const ke="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((e=>B.__wbg_verifyingkey_free(e>>>0)));let Ke=class e{static __wrap(t){t>>>=0;const r=Object.create(e.prototype);return r.__wbg_ptr=t,ke.register(r,r.__wbg_ptr,r),r}__destroy_into_raw(){const e=this.__wbg_ptr;return this.__wbg_ptr=0,ke.unregister(this),e}free(){const e=this.__destroy_into_raw();B.__wbg_verifyingkey_free(e)}static bondPublicVerifier(){const t=B.verifyingkey_bondPublicVerifier();return e.__wrap(t)}static bondValidatorVerifier(){const t=B.verifyingkey_bondValidatorVerifier();return e.__wrap(t)}static claimUnbondPublicVerifier(){const t=B.verifyingkey_claimUnbondPublicVerifier();return e.__wrap(t)}static feePrivateVerifier(){const t=B.verifyingkey_feePrivateVerifier();return e.__wrap(t)}static feePublicVerifier(){const t=B.verifyingkey_feePublicVerifier();return e.__wrap(t)}static inclusionVerifier(){const t=B.verifyingkey_inclusionVerifier();return e.__wrap(t)}static joinVerifier(){const t=B.verifyingkey_joinVerifier();return e.__wrap(t)}static setValidatorStateVerifier(){const t=B.verifyingkey_setValidatorStateVerifier();return e.__wrap(t)}static splitVerifier(){const t=B.verifyingkey_splitVerifier();return e.__wrap(t)}static transferPrivateVerifier(){const t=B.verifyingkey_transferPrivateVerifier();return e.__wrap(t)}static transferPrivateToPublicVerifier(){const t=B.verifyingkey_transferPrivateToPublicVerifier();return e.__wrap(t)}static transferPublicVerifier(){const t=B.verifyingkey_transferPublicVerifier();return e.__wrap(t)}static transferPublicAsSignerVerifier(){const t=B.verifyingkey_transferPublicAsSignerVerifier();return e.__wrap(t)}static transferPublicToPrivateVerifier(){const t=B.verifyingkey_transferPublicToPrivateVerifier();return e.__wrap(t)}static unbondPublicVerifier(){const t=B.verifyingkey_unbondPublicVerifier();return e.__wrap(t)}isBondPublicVerifier(){return 0!==B.verifyingkey_isBondPublicVerifier(this.__wbg_ptr)}isBondValidatorVerifier(){return 0!==B.verifyingkey_isBondValidatorVerifier(this.__wbg_ptr)}isClaimUnbondPublicVerifier(){return 0!==B.verifyingkey_isClaimUnbondPublicVerifier(this.__wbg_ptr)}isFeePrivateVerifier(){return 0!==B.verifyingkey_isFeePrivateVerifier(this.__wbg_ptr)}isFeePublicVerifier(){return 0!==B.verifyingkey_isFeePublicVerifier(this.__wbg_ptr)}isInclusionVerifier(){return 0!==B.verifyingkey_isInclusionVerifier(this.__wbg_ptr)}isJoinVerifier(){return 0!==B.verifyingkey_isJoinVerifier(this.__wbg_ptr)}isSetValidatorStateVerifier(){return 0!==B.verifyingkey_isSetValidatorStateVerifier(this.__wbg_ptr)}isSplitVerifier(){return 0!==B.verifyingkey_isSplitVerifier(this.__wbg_ptr)}isTransferPrivateVerifier(){return 0!==B.verifyingkey_isTransferPrivateVerifier(this.__wbg_ptr)}isTransferPrivateToPublicVerifier(){return 0!==B.verifyingkey_isTransferPrivateToPublicVerifier(this.__wbg_ptr)}isTransferPublicVerifier(){return 0!==B.verifyingkey_isTransferPublicVerifier(this.__wbg_ptr)}isTransferPublicAsSignerVerifier(){return 0!==B.verifyingkey_isTransferPublicAsSignerVerifier(this.__wbg_ptr)}isTransferPublicToPrivateVerifier(){return 0!==B.verifyingkey_isTransferPublicToPrivateVerifier(this.__wbg_ptr)}isUnbondPublicVerifier(){return 0!==B.verifyingkey_isUnbondPublicVerifier(this.__wbg_ptr)}checksum(){let e,t;try{const i=B.__wbindgen_add_to_stack_pointer(-16);B.verifyingkey_checksum(i,this.__wbg_ptr);var r=u()[i/4+0],n=u()[i/4+1];return e=r,t=n,c(r,n)}finally{B.__wbindgen_add_to_stack_pointer(16),B.__wbindgen_free(e,t,1)}}copy(){const t=B.verifyingkey_copy(this.__wbg_ptr);return e.__wrap(t)}static fromBytes(t){try{const i=B.__wbindgen_add_to_stack_pointer(-16),_=y(t,B.__wbindgen_malloc),a=N;B.verifyingkey_fromBytes(i,_,a);var r=u()[i/4+0],n=u()[i/4+1];if(u()[i/4+2])throw o(n);return e.__wrap(r)}finally{B.__wbindgen_add_to_stack_pointer(16)}}static fromString(t){try{const i=B.__wbindgen_add_to_stack_pointer(-16),_=g(t,B.__wbindgen_malloc,B.__wbindgen_realloc),a=N;B.verifyingkey_fromString(i,_,a);var r=u()[i/4+0],n=u()[i/4+1];if(u()[i/4+2])throw o(n);return e.__wrap(r)}finally{B.__wbindgen_add_to_stack_pointer(16)}}toBytes(){try{const i=B.__wbindgen_add_to_stack_pointer(-16);B.verifyingkey_toBytes(i,this.__wbg_ptr);var e=u()[i/4+0],t=u()[i/4+1],r=u()[i/4+2];if(u()[i/4+3])throw o(r);var n=m(e,t).slice();return B.__wbindgen_free(e,1*t,1),n}finally{B.__wbindgen_add_to_stack_pointer(16)}}toString(){let e,t;try{const i=B.__wbindgen_add_to_stack_pointer(-16);B.verifyingkey_toString(i,this.__wbg_ptr);var r=u()[i/4+0],n=u()[i/4+1];return e=r,t=n,c(r,n)}finally{B.__wbindgen_add_to_stack_pointer(16),B.__wbindgen_free(e,t,1)}}};const Se="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((e=>B.__wbg_viewkey_free(e>>>0)));let Te=class e{static __wrap(t){t>>>=0;const r=Object.create(e.prototype);return r.__wbg_ptr=t,Se.register(r,r.__wbg_ptr,r),r}__destroy_into_raw(){const e=this.__wbg_ptr;return this.__wbg_ptr=0,Se.unregister(this),e}free(){const e=this.__destroy_into_raw();B.__wbg_viewkey_free(e)}static from_private_key(t){p(t,ae);const r=B.privatekey_to_view_key(t.__wbg_ptr);return e.__wrap(r)}static from_string(t){const r=g(t,B.__wbindgen_malloc,B.__wbindgen_realloc),n=N,i=B.viewkey_from_string(r,n);return e.__wrap(i)}to_string(){let e,t;try{const i=B.__wbindgen_add_to_stack_pointer(-16);B.viewkey_to_string(i,this.__wbg_ptr);var r=u()[i/4+0],n=u()[i/4+1];return e=r,t=n,c(r,n)}finally{B.__wbindgen_add_to_stack_pointer(16),B.__wbindgen_free(e,t,1)}}to_address(){const e=B.address_from_view_key(this.__wbg_ptr);return q.__wrap(e)}decrypt(e){let t,r;try{const l=B.__wbindgen_add_to_stack_pointer(-16),f=g(e,B.__wbindgen_malloc,B.__wbindgen_realloc),w=N;B.viewkey_decrypt(l,this.__wbg_ptr,f,w);var n=u()[l/4+0],i=u()[l/4+1],_=u()[l/4+2],a=u()[l/4+3],s=n,d=i;if(a)throw s=0,d=0,o(_);return t=s,r=d,c(s,d)}finally{B.__wbindgen_add_to_stack_pointer(16),B.__wbindgen_free(t,r,1)}}};async function T(e,t){if("function"==typeof Response&&e instanceof Response){if("function"==typeof WebAssembly.instantiateStreaming)try{return await WebAssembly.instantiateStreaming(e,t)}catch(t){if("application/wasm"==e.headers.get("Content-Type"))throw t;console.warn("`WebAssembly.instantiateStreaming` failed because your server does not serve wasm with `application/wasm` MIME type. Falling back to `WebAssembly.instantiate` which is slower. Original error:\n",t)}const r=await e.arrayBuffer();return await WebAssembly.instantiate(r,t)}{const r=await WebAssembly.instantiate(e,t);return r instanceof WebAssembly.Instance?{instance:r,module:e}:r}}function E(){const e={wbg:{}};return e.wbg.__wbindgen_object_drop_ref=function(e){o(e)},e.wbg.__wbg_new_71801a555ad9f2aa=function(){return K((function(){return d(new XMLHttpRequest)}),arguments)},e.wbg.__wbg_overrideMimeType_ee9c51919ceb418b=function(){return K((function(e,t,r){_(e).overrideMimeType(c(t,r))}),arguments)},e.wbg.__wbg_open_c9eb0cf2c9d95679=function(){return K((function(e,t,r,n,i,a){_(e).open(c(t,r),c(n,i),0!==a)}),arguments)},e.wbg.__wbg_send_80d29985093c1ec5=function(){return K((function(e){_(e).send()}),arguments)},e.wbg.__wbg_response_7c2e2759084f7279=function(){return K((function(e){return d(_(e).response)}),arguments)},e.wbg.__wbg_status_d485fb5a478426fb=function(){return K((function(e){return _(e).status}),arguments)},e.wbg.__wbg_new_72fb9a18b5ae2624=function(){return d(new Object)},e.wbg.__wbindgen_string_new=function(e,t){return d(c(e,t))},e.wbg.__wbg_set_1f9b04f170055d33=function(){return K((function(e,t,r){return Reflect.set(_(e),_(t),_(r))}),arguments)},e.wbg.__wbg_new_ab6fd82b10560829=function(){return K((function(){return d(new Headers)}),arguments)},e.wbg.__wbindgen_object_clone_ref=function(e){return d(_(e))},e.wbg.__wbg_new_0d76b0581eca6298=function(){return K((function(){return d(new AbortController)}),arguments)},e.wbg.__wbg_signal_a61f78a3478fd9bc=function(e){return d(_(e).signal)},e.wbg.__wbg_append_7bfcb4937d1d5e29=function(){return K((function(e,t,r,n,i){_(e).append(c(t,r),c(n,i))}),arguments)},e.wbg.__wbg_instanceof_Response_849eb93e75734b6e=function(e){let t;try{t=_(e)instanceof Response}catch(e){t=!1}return t},e.wbg.__wbg_status_61a01141acd3cf74=function(e){return _(e).status},e.wbg.__wbg_url_5f6dc4009ac5f99d=function(e,t){const r=g(_(t).url,B.__wbindgen_malloc,B.__wbindgen_realloc),n=N;u()[e/4+1]=n,u()[e/4+0]=r},e.wbg.__wbg_headers_9620bfada380764a=function(e){return d(_(e).headers)},e.wbg.__wbg_iterator_2cee6dadfd956dfa=function(){return d(Symbol.iterator)},e.wbg.__wbg_get_e3c254076557e348=function(){return K((function(e,t){return d(Reflect.get(_(e),_(t)))}),arguments)},e.wbg.__wbindgen_is_function=function(e){return"function"==typeof _(e)},e.wbg.__wbg_call_27c0f87801dedf93=function(){return K((function(e,t){return d(_(e).call(_(t)))}),arguments)},e.wbg.__wbindgen_is_object=function(e){const t=_(e);return"object"==typeof t&&null!==t},e.wbg.__wbg_next_40fc327bfc8770e6=function(e){return d(_(e).next)},e.wbg.__wbg_next_196c84450b364254=function(){return K((function(e){return d(_(e).next())}),arguments)},e.wbg.__wbg_done_298b57d23c0fc80c=function(e){return _(e).done},e.wbg.__wbg_value_d93c65011f51a456=function(e){return d(_(e).value)},e.wbg.__wbg_abort_2aa7521d5690750e=function(e){_(e).abort()},e.wbg.__wbg_stringify_8887fe74e1c50d81=function(){return K((function(e){return d(JSON.stringify(_(e)))}),arguments)},e.wbg.__wbindgen_string_get=function(e,t){const r=_(t),n="string"==typeof r?r:void 0;var i=l(n)?0:g(n,B.__wbindgen_malloc,B.__wbindgen_realloc),a=N;u()[e/4+1]=a,u()[e/4+0]=i},e.wbg.__wbg_executionresponse_new=function(e){return d(Y.__wrap(e))},e.wbg.__wbg_call_b3ca7c6051f9bec1=function(){return K((function(e,t,r){return d(_(e).call(_(t),_(r)))}),arguments)},e.wbg.__wbg_log_0159ca40cddf5b15=function(e,t){console.log(c(e,t))},e.wbg.__wbg_newwithlength_66ae46612e7f0234=function(e){return d(new Array(e>>>0))},e.wbg.__wbg_set_d4638f722068f043=function(e,t,r){_(e)[t>>>0]=o(r)},e.wbg.__wbg_transaction_new=function(e){return d(Pe.__wrap(e))},e.wbg.__wbindgen_bigint_from_u64=function(e){return d(BigInt.asUintN(64,e))},e.wbg.__wbg_keypair_new=function(e){return d(ee.__wrap(e))},e.wbg.__wbindgen_module=function(){return d(x.__wbindgen_wasm_module)},e.wbg.__wbindgen_memory=function(){return d(B.memory)},e.wbg.__wbg_spawnWorker_f6acaddb2e29dc4a=function(e,t,r,n){return d(i(_(e),_(t),_(r),n>>>0))},e.wbg.__wbindgen_cb_drop=function(e){const t=o(e).original;if(1==t.cnt--)return t.a=0,!0;return!1},e.wbg.__wbg_new_16b304a2cfa7ff4a=function(){return d(new Array)},e.wbg.__wbg_push_a5b05aedc7234f9f=function(e,t){return _(e).push(_(t))},e.wbg.__wbg_arrayBuffer_29931d52c7206b02=function(){return K((function(e){return d(_(e).arrayBuffer())}),arguments)},e.wbg.__wbg_new_63b92bc8671ed464=function(e){return d(new Uint8Array(_(e)))},e.wbg.__wbg_length_c20a40f15020d68a=function(e){return _(e).length},e.wbg.__wbg_new_81740750da40724f=function(e,t){try{var r={a:e,b:t};const n=new Promise(((e,t)=>{const n=r.a;r.a=0;try{return S(n,r.b,e,t)}finally{r.a=n}}));return d(n)}finally{r.a=r.b=0}},e.wbg.__wbindgen_number_new=function(e){return d(e)},e.wbg.__wbg_new_abda76e883ba8a5f=function(){return d(new Error)},e.wbg.__wbg_stack_658279fe44541cf6=function(e,t){const r=g(_(t).stack,B.__wbindgen_malloc,B.__wbindgen_realloc),n=N;u()[e/4+1]=n,u()[e/4+0]=r},e.wbg.__wbg_error_f851667af71bcfc6=function(e,t){let r,n;try{r=e,n=t,console.error(c(e,t))}finally{B.__wbindgen_free(r,n,1)}},e.wbg.__wbg_buffer_12d079cc21e14bdb=function(e){return d(_(e).buffer)},e.wbg.__wbg_newwithbyteoffsetandlength_aa4a17c33a06e5cb=function(e,t,r){return d(new Uint8Array(_(e),t>>>0,r>>>0))},e.wbg.__wbg_randomFillSync_5c9c955aa56b6049=function(){return K((function(e,t){_(e).randomFillSync(o(t))}),arguments)},e.wbg.__wbg_subarray_a1f73cd4b5b42fe1=function(e,t,r){return d(_(e).subarray(t>>>0,r>>>0))},e.wbg.__wbg_getRandomValues_3aa56aa6edec874c=function(){return K((function(e,t){_(e).getRandomValues(_(t))}),arguments)},e.wbg.__wbg_set_a47bac70306a19a7=function(e,t,r){_(e).set(_(t),r>>>0)},e.wbg.__wbg_crypto_1d1f22824a6a080c=function(e){return d(_(e).crypto)},e.wbg.__wbg_process_4a72847cc503995b=function(e){return d(_(e).process)},e.wbg.__wbg_versions_f686565e586dd935=function(e){return d(_(e).versions)},e.wbg.__wbg_node_104a2ff8d6ea03a2=function(e){return d(_(e).node)},e.wbg.__wbindgen_is_string=function(e){return"string"==typeof _(e)},e.wbg.__wbg_require_cca90b1a94a0255b=function(){return K((function(){return d(module.require)}),arguments)},e.wbg.__wbg_msCrypto_eb05e62b530a1508=function(e){return d(_(e).msCrypto)},e.wbg.__wbg_newwithlength_e9b4878cebadb3d3=function(e){return d(new Uint8Array(e>>>0))},e.wbg.__wbg_length_cd7af8117672b8b8=function(e){return _(e).length},e.wbg.__wbg_get_bd8e338fbd5f5cc8=function(e,t){return d(_(e)[t>>>0])},e.wbg.__wbg_self_ce0dbfc45cf2f5be=function(){return K((function(){return d(self.self)}),arguments)},e.wbg.__wbg_window_c6fb939a7f436783=function(){return K((function(){return d(window.window)}),arguments)},e.wbg.__wbg_globalThis_d1e6af4856ba331b=function(){return K((function(){return d(globalThis.globalThis)}),arguments)},e.wbg.__wbg_global_207b558942527489=function(){return K((function(){return d(global.global)}),arguments)},e.wbg.__wbindgen_is_undefined=function(e){return void 0===_(e)},e.wbg.__wbg_newnoargs_e258087cd0daa0ea=function(e,t){return d(new Function(c(e,t)))},e.wbg.__wbg_has_0af94d20077affa2=function(){return K((function(e,t){return Reflect.has(_(e),_(t))}),arguments)},e.wbg.__wbg_fetch_bc7c8e27076a5c84=function(e){return d(fetch(_(e)))},e.wbg.__wbg_fetch_921fad6ef9e883dd=function(e,t){return d(_(e).fetch(_(t)))},e.wbg.__wbindgen_debug_string=function(e,t){const r=g(f(_(t)),B.__wbindgen_malloc,B.__wbindgen_realloc),n=N;u()[e/4+1]=n,u()[e/4+0]=r},e.wbg.__wbindgen_throw=function(e,t){throw new Error(c(e,t))},e.wbg.__wbindgen_rethrow=function(e){throw o(e)},e.wbg.__wbg_then_a73caa9a87991566=function(e,t,r){return d(_(e).then(_(t),_(r)))},e.wbg.__wbg_then_0c86a60e8fcfe9f6=function(e,t){return d(_(e).then(_(t)))},e.wbg.__wbg_queueMicrotask_481971b0d87f3dd4=function(e){queueMicrotask(_(e))},e.wbg.__wbg_queueMicrotask_3cbae2ec6b6cd3d6=function(e){return d(_(e).queueMicrotask)},e.wbg.__wbg_resolve_b0083a7967828ec8=function(e){return d(Promise.resolve(_(e)))},e.wbg.__wbg_waitAsync_5d743fc9058ba01a=function(){return d(Atomics.waitAsync)},e.wbg.__wbg_new_8cccba86b0f574cb=function(e){return d(new Int32Array(_(e)))},e.wbg.__wbg_waitAsync_46d5c36955b71a79=function(e,t,r){return d(Atomics.waitAsync(_(e),t,r))},e.wbg.__wbg_async_19c0400d97cc72fe=function(e){return _(e).async},e.wbg.__wbg_value_571d60108110e917=function(e){return d(_(e).value)},e.wbg.__wbindgen_link_fc1eedd35dc7e0a6=function(e){const t=g("data:application/javascript,"+encodeURIComponent("onmessage = function (ev) {\n let [ia, index, value] = ev.data;\n ia = new Int32Array(ia.buffer);\n let result = Atomics.wait(ia, index, value);\n postMessage(result);\n };\n "),B.__wbindgen_malloc,B.__wbindgen_realloc),r=N;u()[e/4+1]=r,u()[e/4+0]=t},e.wbg.__wbg_new_d1187ae36d662ef9=function(){return K((function(e,t){return d(new Worker(c(e,t)))}),arguments)},e.wbg.__wbg_setonmessage_503809e5bb51bd33=function(e,t){_(e).onmessage=_(t)},e.wbg.__wbg_of_6a70eed8d41f469c=function(e,t,r){return d(Array.of(_(e),_(t),_(r)))},e.wbg.__wbg_postMessage_7380d10e8b8269df=function(){return K((function(e,t){_(e).postMessage(_(t))}),arguments)},e.wbg.__wbg_data_3ce7c145ca4fbcdc=function(e){return d(_(e).data)},e.wbg.__wbg_newwithstrandinit_3fd6fba4083ff2d0=function(){return K((function(e,t,r){return d(new Request(c(e,t),_(r)))}),arguments)},e.wbg.__wbg_responseText_c67ed2d48db10769=function(){return K((function(e,t){const r=_(t).responseText;var n=l(r)?0:g(r,B.__wbindgen_malloc,B.__wbindgen_realloc),i=N;u()[e/4+1]=i,u()[e/4+0]=n}),arguments)},e.wbg.__wbindgen_closure_wrapper5837=function(e,t,r){return d(w(e,t,538,b))},e.wbg.__wbindgen_closure_wrapper5862=function(e,t,r){return d(w(e,t,538,b))},e}function V(e,t){e.wbg.memory=t||new WebAssembly.Memory({initial:25,maximum:65536,shared:!0})}function R(e,t){return B=e.exports,x.__wbindgen_wasm_module=t,L=null,M=null,I=null,B.__wbindgen_start(),B}function F(e,t){if(void 0!==B)return B;const r=E();V(r,t),e instanceof WebAssembly.Module||(e=new WebAssembly.Module(e));return R(new WebAssembly.Instance(e,r),e)}async function x(e,t){if(void 0!==B)return B;const r=E();("string"==typeof e||"function"==typeof Request&&e instanceof Request||"function"==typeof URL&&e instanceof URL)&&(e=fetch(e)),V(r,t);const{instance:n,module:i}=await T(await e,r);return R(n,i)}var C=Object.freeze({__proto__:null,Address:q,Execution:X,ExecutionResponse:Y,Field:Q,KeyPair:ee,Metadata:re,OfflineQuery:ie,PrivateKey:ae,PrivateKeyCiphertext:se,Program:de,ProgramManager:le,ProvingKey:fe,RecordCiphertext:be,RecordPlaintext:ye,Signature:ve,Transaction:Pe,VerifyingKey:Ke,ViewKey:Te,default:x,initSync:F,initThreadPool:k,runRayonThread:P,verifyFunctionExecution:h});const Ee="assets/aleo_wasm.wasm";const{initThreadPool:Ve,Address:Re,Execution:Fe,ExecutionResponse:xe,Field:Ce,Metadata:Ae,OfflineQuery:Be,Private:Ue,PrivateKey:Oe,PrivateKeyCiphertext:ze,Program:Ie,ProvingKey:Ne,RecordCiphertext:je,RecordPlaintext:$e,ProgramManager:Me,Signature:De,Transaction:Le,ViewKey:We,VerifyingKey:qe,verifyFunctionExecution:He}=await(async(e={})=>{let{importHook:t,serverPath:r,initializeHook:n}=e,i=Ee;return null!=r&&(i=r+/[^\/\\]*$/.exec(i)[0]),null!=t&&(i=t(i)),null!=n?await n(x,i):await x(i),C})({importHook:()=>new URL(r(5934),r.b)});async function A(e){null==e&&(e=navigator.hardwareConcurrency),console.info(`Spawning ${e} threads`),await Ve(new URL(r(2583),r.b),e)}n()}catch(Xe){n(Xe)}}),1)},6891:(e,t,r)=>{r.d(t,{Ud:()=>l});const n=Symbol("Comlink.proxy"),i=Symbol("Comlink.endpoint"),_=Symbol("Comlink.releaseProxy"),a=Symbol("Comlink.finalizer"),o=Symbol("Comlink.thrown"),s=e=>"object"==typeof e&&null!==e||"function"==typeof e,c=new Map([["proxy",{canHandle:e=>s(e)&&e[n],serialize(e){const{port1:t,port2:r}=new MessageChannel;return d(e,t),[r,[r]]},deserialize:e=>(e.start(),l(e))}],["throw",{canHandle:e=>s(e)&&o in e,serialize({value:e}){let t;return t=e instanceof Error?{isError:!0,value:{message:e.message,name:e.name,stack:e.stack}}:{isError:!1,value:e},[t,[]]},deserialize(e){if(e.isError)throw Object.assign(new Error(e.value.message),e.value);throw e.value}}]]);function d(e,t=globalThis,r=["*"]){t.addEventListener("message",(function i(_){if(!_||!_.data)return;if(!function(e,t){for(const r of e){if(t===r||"*"===r)return!0;if(r instanceof RegExp&&r.test(t))return!0}return!1}(r,_.origin))return void console.warn(`Invalid origin '${_.origin}' for comlink proxy`);const{id:s,type:c,path:l}=Object.assign({path:[]},_.data),u=(_.data.argumentList||[]).map(m);let f;try{const t=l.slice(0,-1).reduce(((e,t)=>e[t]),e),r=l.reduce(((e,t)=>e[t]),e);switch(c){case"GET":f=r;break;case"SET":t[l.slice(-1)[0]]=m(_.data.value),f=!0;break;case"APPLY":f=r.apply(t,u);break;case"CONSTRUCT":f=function(e){return Object.assign(e,{[n]:!0})}(new r(...u));break;case"ENDPOINT":{const{port1:t,port2:r}=new MessageChannel;d(e,r),f=function(e,t){return h.set(e,t),e}(t,[t])}break;case"RELEASE":f=void 0;break;default:return}}catch(e){f={value:e,[o]:0}}Promise.resolve(f).catch((e=>({value:e,[o]:0}))).then((r=>{const[n,_]=v(r);t.postMessage(Object.assign(Object.assign({},n),{id:s}),_),"RELEASE"===c&&(t.removeEventListener("message",i),g(t),a in e&&"function"==typeof e[a]&&e[a]())})).catch((e=>{const[r,n]=v({value:new TypeError("Unserializable return value"),[o]:0});t.postMessage(Object.assign(Object.assign({},r),{id:s}),n)}))})),t.start&&t.start()}function g(e){(function(e){return"MessagePort"===e.constructor.name})(e)&&e.close()}function l(e,t){return p(e,[],t)}function u(e){if(e)throw new Error("Proxy has been released and is not useable")}function f(e){return P(e,{type:"RELEASE"}).then((()=>{g(e)}))}const w=new WeakMap,b="FinalizationRegistry"in globalThis&&new FinalizationRegistry((e=>{const t=(w.get(e)||0)-1;w.set(e,t),0===t&&f(e)}));function p(e,t=[],r=function(){}){let n=!1;const a=new Proxy(r,{get(r,i){if(u(n),i===_)return()=>{!function(e){b&&b.unregister(e)}(a),f(e),n=!0};if("then"===i){if(0===t.length)return{then:()=>a};const r=P(e,{type:"GET",path:t.map((e=>e.toString()))}).then(m);return r.then.bind(r)}return p(e,[...t,i])},set(r,i,_){u(n);const[a,o]=v(_);return P(e,{type:"SET",path:[...t,i].map((e=>e.toString())),value:a},o).then(m)},apply(r,_,a){u(n);const o=t[t.length-1];if(o===i)return P(e,{type:"ENDPOINT"}).then(m);if("bind"===o)return p(e,t.slice(0,-1));const[s,c]=y(a);return P(e,{type:"APPLY",path:t.map((e=>e.toString())),argumentList:s},c).then(m)},construct(r,i){u(n);const[_,a]=y(i);return P(e,{type:"CONSTRUCT",path:t.map((e=>e.toString())),argumentList:_},a).then(m)}});return function(e,t){const r=(w.get(t)||0)+1;w.set(t,r),b&&b.register(e,t,e)}(a,e),a}function y(e){const t=e.map(v);return[t.map((e=>e[0])),(r=t.map((e=>e[1])),Array.prototype.concat.apply([],r))];var r}const h=new WeakMap;function v(e){for(const[t,r]of c)if(r.canHandle(e)){const[n,i]=r.serialize(e);return[{type:"HANDLER",name:t,value:n},i]}return[{type:"RAW",value:e},h.get(e)||[]]}function m(e){switch(e.type){case"HANDLER":return c.get(e.name).deserialize(e.value);case"RAW":return e.value}}function P(e,t,r){return new Promise((n=>{const i=new Array(4).fill(0).map((()=>Math.floor(Math.random()*Number.MAX_SAFE_INTEGER).toString(16))).join("-");e.addEventListener("message",(function t(r){r.data&&r.data.id&&r.data.id===i&&(e.removeEventListener("message",t),n(r.data))})),e.start&&e.start(),e.postMessage(Object.assign({id:i},t),r)}))}}}]); //# sourceMappingURL=52.bundle.js.map \ No newline at end of file diff --git a/52.bundle.js.map b/52.bundle.js.map index 03a99f3c7..2bb2569e3 100644 --- a/52.bundle.js.map +++ b/52.bundle.js.map @@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Gv3B,KAAKpB,IAAM24B,EAAGv3B,KAAKpB,KAAOA,IAG9Cw4B,EAAGwB,oBAAoB,UAAW38B,GAClC2J,EAAQ2xB,EAAGv3B,MACf,IACIo3B,EAAG58B,OACH48B,EAAG58B,QAEP48B,EAAG5mB,YAAYpR,OAAOC,OAAO,CAAET,MAAMm8B,GAAMzC,EAAU,GAE7D","sources":["webpack://aleo-website/../src/account.ts","webpack://aleo-website/../src/utils.ts","webpack://aleo-website/../src/network-client.ts","webpack://aleo-website/../src/function-key-provider.ts","webpack://aleo-website/../src/offline-key-provider.ts","webpack://aleo-website/../src/record-provider.ts","webpack://aleo-website/../src/managed-worker.ts","webpack://aleo-website/../src/program-manager.ts","webpack://aleo-website/../src/index.ts","webpack://aleo-website/wasm.js","webpack://aleo-website/../js/index.js","webpack://aleo-website/../node_modules/comlink/dist/esm/comlink.mjs"],"sourcesContent":["import {\n Address,\n PrivateKey,\n Signature,\n ViewKey,\n PrivateKeyCiphertext,\n RecordCiphertext,\n} from \"./index\";\n\ninterface AccountParam {\n privateKey?: string;\n seed?: Uint8Array;\n}\n\n/**\n * Key Management class. Enables the creation of a new Aleo Account, importation of an existing account from\n * an existing private key or seed, and message signing and verification functionality.\n *\n * An Aleo Account is generated from a randomly generated seed (number) from which an account private key, view key,\n * and a public account address are derived. The private key lies at the root of an Aleo account. It is a highly\n * sensitive secret and should be protected as it allows for creation of Aleo Program executions and arbitrary value\n * transfers. The View Key allows for decryption of a user's activity on the blockchain. The Address is the public\n * address to which other users of Aleo can send Aleo credits and other records to. This class should only be used\n * environments where the safety of the underlying key material can be assured.\n *\n * @example\n * // Create a new account\n * const myRandomAccount = new Account();\n *\n * // Create an account from a randomly generated seed\n * const seed = new Uint8Array([94, 91, 52, 251, 240, 230, 226, 35, 117, 253, 224, 210, 175, 13, 205, 120, 155, 214, 7, 169, 66, 62, 206, 50, 188, 40, 29, 122, 40, 250, 54, 18]);\n * const mySeededAccount = new Account({seed: seed});\n *\n * // Create an account from an existing private key\n * const myExistingAccount = new Account({privateKey: 'myExistingPrivateKey'})\n *\n * // Sign a message\n * const hello_world = Uint8Array.from([104, 101, 108, 108, 111 119, 111, 114, 108, 100])\n * const signature = myRandomAccount.sign(hello_world)\n *\n * // Verify a signature\n * myRandomAccount.verify(hello_world, signature)\n */\nexport class Account {\n _privateKey: PrivateKey;\n _viewKey: ViewKey;\n _address: Address;\n\n constructor(params: AccountParam = {}) {\n try {\n this._privateKey = this.privateKeyFromParams(params);\n } catch (e) {\n console.error(\"Wrong parameter\", e);\n throw new Error(\"Wrong Parameter\");\n }\n this._viewKey = ViewKey.from_private_key(this._privateKey);\n this._address = Address.from_private_key(this._privateKey);\n }\n\n /**\n * Attempts to create an account from a private key ciphertext\n * @param {PrivateKeyCiphertext | string} ciphertext\n * @param {string} password\n * @returns {PrivateKey | Error}\n *\n * @example\n * const ciphertext = PrivateKey.newEncrypted(\"password\");\n * const account = Account.fromCiphertext(ciphertext, \"password\");\n */\n public static fromCiphertext(ciphertext: PrivateKeyCiphertext | string, password: string) {\n try {\n ciphertext = (typeof ciphertext === \"string\") ? PrivateKeyCiphertext.fromString(ciphertext) : ciphertext;\n const _privateKey = PrivateKey.fromPrivateKeyCiphertext(ciphertext, password);\n return new Account({ privateKey: _privateKey.to_string() });\n } catch(e) {\n throw new Error(\"Wrong password or invalid ciphertext\");\n }\n }\n\n private privateKeyFromParams(params: AccountParam) {\n if (params.seed) {\n return PrivateKey.from_seed_unchecked(params.seed);\n }\n if (params.privateKey) {\n return PrivateKey.from_string(params.privateKey);\n }\n return new PrivateKey();\n }\n\n privateKey() {\n return this._privateKey;\n }\n\n viewKey() {\n return this._viewKey;\n }\n\n address() {\n return this._address;\n }\n\n toString() {\n return this.address().to_string()\n }\n\n /**\n * Encrypt the account's private key with a password\n * @param {string} ciphertext\n * @returns {PrivateKeyCiphertext}\n *\n * @example\n * const account = new Account();\n * const ciphertext = account.encryptAccount(\"password\");\n */\n encryptAccount(password: string) {\n return this._privateKey.toCiphertext(password);\n }\n\n /**\n * Decrypts a Record in ciphertext form into plaintext\n * @param {string} ciphertext\n * @returns {Record}\n *\n * @example\n * const account = new Account();\n * const record = account.decryptRecord(\"record1ciphertext\");\n */\n decryptRecord(ciphertext: string) {\n return this._viewKey.decrypt(ciphertext);\n }\n\n /**\n * Decrypts an array of Records in ciphertext form into plaintext\n * @param {string[]} ciphertexts\n * @returns {Record[]}\n *\n * @example\n * const account = new Account();\n * const record = account.decryptRecords([\"record1ciphertext\", \"record2ciphertext\"]);\n */\n decryptRecords(ciphertexts: string[]) {\n return ciphertexts.map((ciphertext) => this._viewKey.decrypt(ciphertext));\n }\n\n /**\n * Determines whether the account owns a ciphertext record\n * @param {RecordCipherText | string} ciphertext\n * @returns {boolean}\n *\n * @example\n * // Create a connection to the Aleo network and an account\n * const connection = new NodeConnection(\"vm.aleo.org/api\");\n * const account = Account.fromCiphertext(\"ciphertext\", \"password\");\n *\n * // Get a record from the network\n * const record = connection.getBlock(1234);\n * const recordCipherText = record.transactions[0].execution.transitions[0].id;\n *\n * // Check if the account owns the record\n * if account.ownsRecord(recordCipherText) {\n * // Then one can do something like:\n * // Decrypt the record and check if it's spent\n * // Store the record in a local database\n * // Etc.\n * }\n */\n ownsRecordCiphertext(ciphertext: RecordCiphertext | string) {\n if (typeof ciphertext === 'string') {\n try {\n const ciphertextObject = RecordCiphertext.fromString(ciphertext);\n return ciphertextObject.isOwner(this._viewKey);\n }\n catch (e) {\n return false;\n }\n }\n else {\n return ciphertext.isOwner(this._viewKey);\n }\n }\n\n /**\n * Signs a message with the account's private key.\n * Returns a Signature.\n *\n * @param {Uint8Array} message\n * @returns {Signature}\n *\n * @example\n * const account = new Account();\n * const message = Uint8Array.from([104, 101, 108, 108, 111 119, 111, 114, 108, 100])\n * account.sign(message);\n */\n sign(message: Uint8Array) {\n return this._privateKey.sign(message);\n }\n\n /**\n * Verifies the Signature on a message.\n *\n * @param {Uint8Array} message\n * @param {Signature} signature\n * @returns {boolean}\n *\n * @example\n * const account = new Account();\n * const message = Uint8Array.from([104, 101, 108, 108, 111 119, 111, 114, 108, 100])\n * const signature = account.sign(message);\n * account.verify(message, signature);\n */\n verify(message: Uint8Array, signature: Signature) {\n return this._address.verify(message, signature);\n }\n\n}\n","export async function get(url: URL | string, options?: RequestInit) {\n const response = await fetch(url, options);\n\n if (!response.ok) {\n throw new Error(response.status + \" could not get URL \" + url);\n }\n\n return response;\n}\n\n\nexport async function post(url: URL | string, options: RequestInit) {\n options.method = \"POST\";\n\n const response = await fetch(url, options);\n\n if (!response.ok) {\n throw new Error(response.status + \" could not post URL \" + url);\n }\n\n return response;\n}\n","import { get, post } from \"./utils\";\nimport {\n Account,\n Block,\n RecordCiphertext,\n Program,\n RecordPlaintext,\n PrivateKey,\n Transaction,\n TransactionModel,\n logAndThrow\n} from \"./index\";\n\ntype ProgramImports = { [key: string]: string | Program };\n\ninterface AleoNetworkClientOptions {\n headers?: { [key: string]: string };\n}\n\n/**\n * Client library that encapsulates REST calls to publicly exposed endpoints of Aleo nodes. The methods provided in this\n * allow users to query public information from the Aleo blockchain and submit transactions to the network.\n *\n * @param {string} host\n * @example\n * // Connection to a local node\n * const localNetworkClient = new AleoNetworkClient(\"http://localhost:3030\");\n *\n * // Connection to a public beacon node\n * const publicnetworkClient = new AleoNetworkClient(\"https://api.explorer.aleo.org/v1\");\n */\nclass AleoNetworkClient {\n host: string;\n headers: { [key: string]: string };\n account: Account | undefined;\n\n constructor(host: string, options?: AleoNetworkClientOptions) {\n this.host = host + \"/testnet\";\n\n if (options && options.headers) {\n this.headers = options.headers;\n\n } else {\n this.headers = {\n // This is replaced by the actual version by a Rollup plugin\n \"X-Aleo-SDK-Version\": \"%%VERSION%%\",\n };\n }\n }\n\n /**\n * Set an account to use in networkClient calls\n *\n * @param {Account} account\n * @example\n * const account = new Account();\n * networkClient.setAccount(account);\n */\n setAccount(account: Account) {\n this.account = account;\n }\n\n /**\n * Return the Aleo account used in the networkClient\n *\n * @example\n * const account = networkClient.getAccount();\n */\n getAccount(): Account | undefined {\n return this.account;\n }\n\n /**\n * Set a new host for the networkClient\n *\n * @param {string} host The address of a node hosting the Aleo API\n * @param host\n */\n setHost(host: string) {\n this.host = host + \"/testnet\";\n }\n\n async fetchData(\n url = \"/\",\n ): Promise {\n try {\n const response = await get(this.host + url, {\n headers: this.headers\n });\n\n return await response.json();\n } catch (error) {\n throw new Error(\"Error fetching data.\");\n }\n }\n\n /**\n * Attempts to find unspent records in the Aleo blockchain for a specified private key\n * @param {number} startHeight - The height at which to start searching for unspent records\n * @param {number} endHeight - The height at which to stop searching for unspent records\n * @param {string | PrivateKey} privateKey - The private key to use to find unspent records\n * @param {number[]} amounts - The amounts (in microcredits) to search for (eg. [100, 200, 3000])\n * @param {number} maxMicrocredits - The maximum number of microcredits to search for\n * @param {string[]} nonces - The nonces of already found records to exclude from the search\n *\n * @example\n * // Find all unspent records\n * const privateKey = \"[PRIVATE_KEY]\";\n * const records = networkClient.findUnspentRecords(0, undefined, privateKey);\n *\n * // Find specific amounts\n * const startHeight = 500000;\n * const amounts = [600000, 1000000];\n * const records = networkClient.findUnspentRecords(startHeight, undefined, privateKey, amounts);\n *\n * // Find specific amounts with a maximum number of cumulative microcredits\n * const maxMicrocredits = 100000;\n * const records = networkClient.findUnspentRecords(startHeight, undefined, privateKey, undefined, maxMicrocredits);\n */\n async findUnspentRecords(\n startHeight: number,\n endHeight: number | undefined,\n privateKey: string | PrivateKey | undefined,\n amounts: number[] | undefined,\n maxMicrocredits?: number | undefined,\n nonces?: string[] | undefined,\n ): Promise | Error> {\n nonces = nonces || [];\n // Ensure start height is not negative\n if (startHeight < 0) {\n throw new Error(\"Start height must be greater than or equal to 0\");\n }\n\n // Initialize search parameters\n const records = new Array();\n let start;\n let end;\n let resolvedPrivateKey: PrivateKey;\n let failures = 0;\n let totalRecordValue = BigInt(0);\n let latestHeight: number;\n\n // Ensure a private key is present to find owned records\n if (typeof privateKey === \"undefined\") {\n if (typeof this.account === \"undefined\") {\n throw new Error(\"Private key must be specified in an argument to findOwnedRecords or set in the AleoNetworkClient\");\n } else {\n resolvedPrivateKey = this.account._privateKey;\n }\n } else {\n try {\n resolvedPrivateKey = privateKey instanceof PrivateKey ? privateKey : PrivateKey.from_string(privateKey);\n } catch (error) {\n throw new Error(\"Error parsing private key provided.\");\n }\n }\n const viewKey = resolvedPrivateKey.to_view_key();\n\n // Get the latest height to ensure the range being searched is valid\n try {\n const blockHeight = await this.getLatestHeight();\n if (typeof blockHeight === \"number\") {\n latestHeight = blockHeight;\n } else {\n throw new Error(\"Error fetching latest block height.\");\n }\n } catch (error) {\n throw new Error(\"Error fetching latest block height.\");\n }\n\n // If no end height is specified or is greater than the latest height, set the end height to the latest height\n if (typeof endHeight === \"number\" && endHeight <= latestHeight) {\n end = endHeight\n } else {\n end = latestHeight;\n }\n\n // If the starting is greater than the ending height, return an error\n if (startHeight > end) {\n throw new Error(\"Start height must be less than or equal to end height.\");\n }\n\n // Iterate through blocks in reverse order in chunks of 50\n while (end > startHeight) {\n start = end - 50;\n if (start < startHeight) {\n start = startHeight;\n }\n try {\n // Get 50 blocks (or the difference between the start and end if less than 50)\n const blocks = await this.getBlockRange(start, end);\n end = start;\n if (!(blocks instanceof Error)) {\n // Iterate through blocks to find unspent records\n for (let i = 0; i < blocks.length; i++) {\n const block = blocks[i];\n const transactions = block.transactions;\n if (!(typeof transactions === \"undefined\")) {\n for (let j = 0; j < transactions.length; j++) {\n const confirmedTransaction = transactions[j];\n // Search for unspent records in execute transactions of credits.aleo\n if (confirmedTransaction.type == \"execute\") {\n const transaction = confirmedTransaction.transaction;\n if (transaction.execution && !(typeof transaction.execution.transitions == \"undefined\")) {\n for (let k = 0; k < transaction.execution.transitions.length; k++) {\n const transition = transaction.execution.transitions[k];\n // Only search for unspent records in credits.aleo (for now)\n if (transition.program !== \"credits.aleo\") {\n continue;\n }\n if (!(typeof transition.outputs == \"undefined\")) {\n for (let l = 0; l < transition.outputs.length; l++) {\n const output = transition.outputs[l];\n if (output.type === \"record\") {\n try {\n // Create a wasm record ciphertext object from the found output\n const record = RecordCiphertext.fromString(output.value);\n // Determine if the record is owned by the specified view key\n if (record.isOwner(viewKey)) {\n // Decrypt the record and get the serial number\n const recordPlaintext = record.decrypt(viewKey);\n\n // If the record has already been found, skip it\n const nonce = recordPlaintext.nonce();\n if (nonces.includes(nonce)) {\n continue;\n }\n\n // Otherwise record the nonce that has been found\n const serialNumber = recordPlaintext.serialNumberString(resolvedPrivateKey, \"credits.aleo\", \"credits\");\n // Attempt to see if the serial number is spent\n try {\n await this.getTransitionId(serialNumber);\n } catch (error) {\n // If it's not found, add it to the list of unspent records\n if (!amounts) {\n records.push(recordPlaintext);\n // If the user specified a maximum number of microcredits, check if the search has found enough\n if (typeof maxMicrocredits === \"number\") {\n totalRecordValue += recordPlaintext.microcredits();\n // Exit if the search has found the amount specified\n if (totalRecordValue >= BigInt(maxMicrocredits)) {\n return records;\n }\n }\n }\n // If the user specified a list of amounts, check if the search has found them\n if (!(typeof amounts === \"undefined\") && amounts.length > 0) {\n let amounts_found = 0;\n if (recordPlaintext.microcredits() > amounts[amounts_found]) {\n amounts_found += 1;\n records.push(recordPlaintext);\n // If the user specified a maximum number of microcredits, check if the search has found enough\n if (typeof maxMicrocredits === \"number\") {\n totalRecordValue += recordPlaintext.microcredits();\n // Exit if the search has found the amount specified\n if (totalRecordValue >= BigInt(maxMicrocredits)) {\n return records;\n }\n }\n if (records.length >= amounts.length) {\n return records;\n }\n }\n }\n }\n }\n } catch (error) {\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n } catch (error) {\n // If there is an error fetching blocks, log it and keep searching\n console.warn(\"Error fetching blocks in range: \" + start.toString() + \"-\" + end.toString());\n console.warn(\"Error: \", error);\n failures += 1;\n if (failures > 10) {\n console.warn(\"10 failures fetching records reached. Returning records fetched so far\");\n return records;\n }\n }\n }\n return records;\n }\n\n /**\n * Returns the contents of the block at the specified block height\n *\n * @param {number} height\n * @example\n * const block = networkClient.getBlock(1234);\n */\n async getBlock(height: number): Promise {\n try {\n const block = await this.fetchData(\"/block/\" + height);\n return block;\n } catch (error) {\n throw new Error(\"Error fetching block.\");\n }\n }\n\n /**\n * Returns a range of blocks between the specified block heights\n *\n * @param {number} start\n * @param {number} end\n * @example\n * const blockRange = networkClient.getBlockRange(2050, 2100);\n */\n async getBlockRange(start: number, end: number): Promise | Error> {\n try {\n return await this.fetchData>(\"/blocks?start=\" + start + \"&end=\" + end);\n } catch (error) {\n const errorMessage = \"Error fetching blocks between \" + start + \" and \" + end + \".\"\n throw new Error(errorMessage);\n }\n }\n\n /**\n * Returns the deployment transaction id associated with the specified program\n *\n * @param {Program | string} program\n * @returns {TransactionModel | Error}\n */\n async getDeploymentTransactionIDForProgram(program: Program | string): Promise {\n if (program instanceof Program) {\n program = program.toString();\n }\n try {\n const id = await this.fetchData(\"/find/transactionID/deployment/\" + program);\n return id.replace(\"\\\"\", \"\")\n } catch (error) {\n throw new Error(\"Error fetching deployment transaction for program.\");\n }\n }\n\n /**\n * Returns the deployment transaction associated with a specified program\n *\n * @param {Program | string} program\n * @returns {TransactionModel | Error}\n */\n async getDeploymentTransactionForProgram(program: Program | string): Promise {\n try {\n const transaction_id = await this.getDeploymentTransactionIDForProgram(program);\n return await this.getTransaction(transaction_id);\n } catch (error) {\n throw new Error(\"Error fetching deployment transaction for program.\");\n }\n }\n\n /**\n * Returns the contents of the latest block\n *\n * @example\n * const latestHeight = networkClient.getLatestBlock();\n */\n async getLatestBlock(): Promise {\n try {\n return await this.fetchData(\"/latest/block\") as Block;\n } catch (error) {\n throw new Error(\"Error fetching latest block.\");\n }\n }\n\n /**\n * Returns the latest committee\n *\n * @returns {Promise} A javascript object containing the latest committee\n */\n async getLatestCommittee(): Promise {\n try {\n return await this.fetchData(\"/committee/latest\");\n } catch (error) {\n throw new Error(\"Error fetching latest block.\");\n }\n }\n\n /**\n * Returns the latest block height\n *\n * @example\n * const latestHeight = networkClient.getLatestHeight();\n */\n async getLatestHeight(): Promise {\n try {\n return await this.fetchData(\"/latest/height\");\n } catch (error) {\n throw new Error(\"Error fetching latest height.\");\n }\n }\n\n /**\n * Returns the source code of a program given a program ID\n *\n * @param {string} programId The program ID of a program deployed to the Aleo Network\n * @return {Promise} Source code of the program\n *\n * @example\n * const program = networkClient.getProgram(\"hello_hello.aleo\");\n * const expectedSource = \"program hello_hello.aleo;\\n\\nfunction hello:\\n input r0 as u32.public;\\n input r1 as u32.private;\\n add r0 r1 into r2;\\n output r2 as u32.private;\\n\"\n * assert.equal(program, expectedSource);\n */\n async getProgram(programId: string): Promise {\n try {\n return await this.fetchData(\"/program/\" + programId)\n } catch (error) {\n throw new Error(\"Error fetching program\");\n }\n }\n\n /**\n * Returns a program object from a program ID or program source code\n *\n * @param {string} inputProgram The program ID or program source code of a program deployed to the Aleo Network\n * @return {Promise} Source code of the program\n *\n * @example\n * const programID = \"hello_hello.aleo\";\n * const programSource = \"program hello_hello.aleo;\\n\\nfunction hello:\\n input r0 as u32.public;\\n input r1 as u32.private;\\n add r0 r1 into r2;\\n output r2 as u32.private;\\n\"\n *\n * // Get program object from program ID or program source code\n * const programObjectFromID = await networkClient.getProgramObject(programID);\n * const programObjectFromSource = await networkClient.getProgramObject(programSource);\n *\n * // Both program objects should be equal\n * assert.equal(programObjectFromID.to_string(), programObjectFromSource.to_string());\n */\n async getProgramObject(inputProgram: string): Promise {\n try {\n return Program.fromString(inputProgram);\n } catch (error) {\n try {\n return Program.fromString((await this.getProgram(inputProgram)));\n } catch (error) {\n throw new Error(`${inputProgram} is neither a program name or a valid program`);\n }\n }\n }\n\n /**\n * Returns an object containing the source code of a program and the source code of all programs it imports\n *\n * @param {Program | string} inputProgram The program ID or program source code of a program deployed to the Aleo Network\n * @returns {Promise} Object of the form { \"program_id\": \"program_source\", .. } containing program id & source code for all program imports\n *\n * @example\n * const double_test_source = \"import multiply_test.aleo;\\n\\nprogram double_test.aleo;\\n\\nfunction double_it:\\n input r0 as u32.private;\\n call multiply_test.aleo/multiply 2u32 r0 into r1;\\n output r1 as u32.private;\\n\"\n * const double_test = Program.fromString(double_test_source);\n * const expectedImports = {\n * \"multiply_test.aleo\": \"program multiply_test.aleo;\\n\\nfunction multiply:\\n input r0 as u32.public;\\n input r1 as u32.private;\\n mul r0 r1 into r2;\\n output r2 as u32.private;\\n\"\n * }\n *\n * // Imports can be fetched using the program ID, source code, or program object\n * let programImports = await networkClient.getProgramImports(\"double_test.aleo\");\n * assert.deepStrictEqual(programImports, expectedImports);\n *\n * // Using the program source code\n * programImports = await networkClient.getProgramImports(double_test_source);\n * assert.deepStrictEqual(programImports, expectedImports);\n *\n * // Using the program object\n * programImports = await networkClient.getProgramImports(double_test);\n * assert.deepStrictEqual(programImports, expectedImports);\n */\n async getProgramImports(inputProgram: Program | string): Promise {\n try {\n const imports: ProgramImports = {};\n\n // Get the program object or fail if the program is not valid or does not exist\n const program = inputProgram instanceof Program ? inputProgram : (await this.getProgramObject(inputProgram));\n\n // Get the list of programs that the program imports\n const importList = program.getImports();\n\n // Recursively get any imports that the imported programs have in a depth first search order\n for (let i = 0; i < importList.length; i++) {\n const import_id = importList[i];\n if (!imports.hasOwnProperty(import_id)) {\n const programSource = await this.getProgram(import_id);\n const nestedImports = await this.getProgramImports(import_id);\n for (const key in nestedImports) {\n if (!imports.hasOwnProperty(key)) {\n imports[key] = nestedImports[key];\n }\n }\n imports[import_id] = programSource;\n }\n }\n return imports;\n } catch (error) {\n throw logAndThrow(\"Error fetching program imports: \" + error)\n }\n }\n\n /**\n * Get a list of the program names that a program imports\n *\n * @param {Program | string} inputProgram - The program id or program source code to get the imports of\n * @returns {string[]} - The list of program names that the program imports\n *\n * @example\n * const programImportsNames = networkClient.getProgramImports(\"double_test.aleo\");\n * const expectedImportsNames = [\"multiply_test.aleo\"];\n * assert.deepStrictEqual(programImportsNames, expectedImportsNames);\n */\n async getProgramImportNames(inputProgram: Program | string): Promise {\n try {\n const program = inputProgram instanceof Program ? inputProgram : (await this.getProgramObject(inputProgram));\n return program.getImports();\n } catch (error) {\n throw new Error(\"Error fetching program imports with error: \" + error);\n }\n }\n\n /**\n * Returns the names of the mappings of a program\n *\n * @param {string} programId - The program ID to get the mappings of (e.g. \"credits.aleo\")\n * @example\n * const mappings = networkClient.getProgramMappingNames(\"credits.aleo\");\n * const expectedMappings = [\"account\"];\n * assert.deepStrictEqual(mappings, expectedMappings);\n */\n async getProgramMappingNames(programId: string): Promise | Error> {\n try {\n return await this.fetchData>(\"/program/\" + programId + \"/mappings\")\n } catch (error) {\n throw new Error(\"Error fetching program mappings - ensure the program exists on chain before trying again\");\n }\n }\n\n /**\n * Returns the value of a program's mapping for a specific key\n *\n * @param {string} programId - The program ID to get the mapping value of (e.g. \"credits.aleo\")\n * @param {string} mappingName - The name of the mapping to get the value of (e.g. \"account\")\n * @param {string} key - The key of the mapping to get the value of (e.g. \"aleo1rhgdu77hgyqd3xjj8ucu3jj9r2krwz6mnzyd80gncr5fxcwlh5rsvzp9px\")\n * @return {Promise} String representation of the value of the mapping\n *\n * @example\n * // Get public balance of an account\n * const mappingValue = networkClient.getMappingValue(\"credits.aleo\", \"account\", \"aleo1rhgdu77hgyqd3xjj8ucu3jj9r2krwz6mnzyd80gncr5fxcwlh5rsvzp9px\");\n * const expectedValue = \"0u64\";\n * assert.equal(mappingValue, expectedValue);\n */\n async getProgramMappingValue(programId: string, mappingName: string, key: string): Promise {\n try {\n return await this.fetchData(\"/program/\" + programId + \"/mapping/\" + mappingName + \"/\" + key)\n } catch (error) {\n throw new Error(\"Error fetching mapping value - ensure the mapping exists and the key is correct\");\n }\n }\n\n /**\n * Returns the latest state/merkle root of the Aleo blockchain\n *\n * @example\n * const stateRoot = networkClient.getStateRoot();\n */\n async getStateRoot(): Promise {\n try {\n return await this.fetchData(\"/latest/stateRoot\");\n } catch (error) {\n throw new Error(\"Error fetching Aleo state root\");\n }\n }\n\n /**\n * Returns a transaction by its unique identifier\n *\n * @param {string} id\n * @example\n * const transaction = networkClient.getTransaction(\"at1handz9xjrqeynjrr0xay4pcsgtnczdksz3e584vfsgaz0dh0lyxq43a4wj\");\n */\n async getTransaction(id: string): Promise {\n try {\n return await this.fetchData(\"/transaction/\" + id);\n } catch (error) {\n throw new Error(\"Error fetching transaction.\");\n }\n }\n\n /**\n * Returns the transactions present at the specified block height\n *\n * @param {number} height\n * @example\n * const transactions = networkClient.getTransactions(654);\n */\n async getTransactions(height: number): Promise | Error> {\n try {\n return await this.fetchData>(\"/block/\" + height.toString() + \"/transactions\");\n } catch (error) {\n throw new Error(\"Error fetching transactions.\");\n }\n }\n\n /**\n * Returns the transactions in the memory pool.\n *\n * @example\n * const transactions = networkClient.getTransactionsInMempool();\n */\n async getTransactionsInMempool(): Promise | Error> {\n try {\n return await this.fetchData>(\"/memoryPool/transactions\");\n } catch (error) {\n throw new Error(\"Error fetching transactions from mempool.\");\n }\n }\n\n /**\n * Returns the transition ID of the transition corresponding to the ID of the input or output.\n * @param {string} inputOrOutputID - ID of the input or output.\n *\n * @example\n * const transitionId = networkClient.getTransitionId(\"2429232855236830926144356377868449890830704336664550203176918782554219952323field\");\n */\n async getTransitionId(inputOrOutputID: string): Promise {\n try {\n return await this.fetchData(\"/find/transitionID/\" + inputOrOutputID);\n } catch (error) {\n throw new Error(\"Error fetching transition ID.\");\n }\n }\n\n /**\n * Submit an execute or deployment transaction to the Aleo network\n *\n * @param {Transaction | string} transaction - The transaction to submit to the network\n * @returns {string | Error} - The transaction id of the submitted transaction or the resulting error\n */\n async submitTransaction(transaction: Transaction | string): Promise {\n const transaction_string = transaction instanceof Transaction ? transaction.toString() : transaction;\n try {\n const response = await post(this.host + \"/transaction/broadcast\", {\n body: transaction_string,\n headers: Object.assign({}, this.headers, {\n \"Content-Type\": \"application/json\",\n }),\n });\n\n try {\n return await response.json();\n\n } catch (error) {\n throw new Error(`Error posting transaction. Aleo network response: ${(error as Error).message}`);\n }\n } catch (error) {\n throw new Error(`Error posting transaction: No response received: ${(error as Error).message}`);\n }\n }\n}\n\nexport { AleoNetworkClient, AleoNetworkClientOptions, ProgramImports }\n","import {\n ProvingKey,\n VerifyingKey,\n CREDITS_PROGRAM_KEYS,\n KEY_STORE,\n Key,\n PRIVATE_TRANSFER,\n PRIVATE_TO_PUBLIC_TRANSFER,\n PUBLIC_TRANSFER,\n PUBLIC_TO_PRIVATE_TRANSFER,\n PUBLIC_TRANSFER_AS_SIGNER\n} from \"./index\";\nimport { get } from \"./utils\";\n\ntype FunctionKeyPair = [ProvingKey, VerifyingKey];\ntype CachedKeyPair = [Uint8Array, Uint8Array];\ntype AleoKeyProviderInitParams = {\n proverUri?: string;\n verifierUri?: string;\n cacheKey?: string;\n};\n\n/**\n * Interface for record search parameters. This allows for arbitrary search parameters to be passed to record provider\n * implementations.\n */\ninterface KeySearchParams {\n [key: string]: any; // This allows for arbitrary keys with any type values\n}\n\n/**\n * AleoKeyProviderParams search parameter for the AleoKeyProvider. It allows for the specification of a proverUri and\n * verifierUri to fetch keys via HTTP from a remote resource as well as a unique cacheKey to store the keys in memory.\n */\nclass AleoKeyProviderParams implements KeySearchParams {\n name: string | undefined;\n proverUri: string | undefined;\n verifierUri: string | undefined;\n cacheKey: string | undefined;\n\n /**\n * Create a new AleoKeyProviderParams object which implements the KeySearchParams interface. Users can optionally\n * specify a url for the proverUri & verifierUri to fetch keys via HTTP from a remote resource as well as a unique\n * cacheKey to store the keys in memory for future use. If no proverUri or verifierUri is specified, a cachekey must\n * be provided.\n *\n * @param { AleoKeyProviderInitParams } params - Optional search parameters\n */\n constructor(params: {proverUri?: string, verifierUri?: string, cacheKey?: string, name?: string}) {\n this.proverUri = params.proverUri;\n this.verifierUri = params.verifierUri;\n this.cacheKey = params.cacheKey;\n this.name = params.name;\n }\n}\n\n/**\n * KeyProvider interface. Enables the retrieval of public proving and verifying keys for Aleo Programs.\n */\ninterface FunctionKeyProvider {\n /**\n * Get bond_public function keys from the credits.aleo program\n *\n * @returns {Promise} Proving and verifying keys for the bond_public function\n */\n bondPublicKeys(): Promise;\n\n /**\n * Get bond_validator function keys from the credits.aleo program\n *\n * @returns {Promise} Proving and verifying keys for the bond_validator function\n */\n bondValidatorKeys(): Promise;\n\n /**\n * Cache a set of keys. This will overwrite any existing keys with the same keyId. The user can check if a keyId\n * exists in the cache using the containsKeys method prior to calling this method if overwriting is not desired.\n *\n * @param {string} keyId access key for the cache\n * @param {FunctionKeyPair} keys keys to cache\n */\n cacheKeys(keyId: string, keys: FunctionKeyPair): void;\n\n /**\n * Get unbond_public function keys from the credits.aleo program\n *\n * @returns {Promise} Proving and verifying keys for the unbond_public function\n */\n claimUnbondPublicKeys(): Promise;\n\n /**\n * Get arbitrary function keys from a provider\n *\n * @param {KeySearchParams | undefined} params - Optional search parameters for the key provider\n * @returns {Promise} Proving and verifying keys for the specified program\n *\n * @example\n * // Create a search object which implements the KeySearchParams interface\n * class IndexDbSearch implements KeySearchParams {\n * db: string\n * keyId: string\n * constructor(params: {db: string, keyId: string}) {\n * this.db = params.db;\n * this.keyId = params.keyId;\n * }\n * }\n *\n * // Create a new object which implements the KeyProvider interface\n * class IndexDbKeyProvider implements FunctionKeyProvider {\n * async functionKeys(params: KeySearchParams): Promise {\n * return new Promise((resolve, reject) => {\n * const request = indexedDB.open(params.db, 1);\n *\n * request.onupgradeneeded = function(e) {\n * const db = e.target.result;\n * if (!db.objectStoreNames.contains('keys')) {\n * db.createObjectStore('keys', { keyPath: 'id' });\n * }\n * };\n *\n * request.onsuccess = function(e) {\n * const db = e.target.result;\n * const transaction = db.transaction([\"keys\"], \"readonly\");\n * const store = transaction.objectStore(\"keys\");\n * const request = store.get(params.keyId);\n * request.onsuccess = function(e) {\n * if (request.result) {\n * resolve(request.result as FunctionKeyPair);\n * } else {\n * reject(new Error(\"Key not found\"));\n * }\n * };\n * request.onerror = function(e) { reject(new Error(\"Error fetching key\")); };\n * };\n *\n * request.onerror = function(e) { reject(new Error(\"Error opening database\")); };\n * });\n * }\n *\n * // implement the other methods...\n * }\n *\n *\n * const keyProvider = new AleoKeyProvider();\n * const networkClient = new AleoNetworkClient(\"https://api.explorer.aleo.org/v1\");\n * const recordProvider = new NetworkRecordProvider(account, networkClient);\n *\n * // Initialize a program manager with the key provider to automatically fetch keys for value transfers\n * const programManager = new ProgramManager(\"https://api.explorer.aleo.org/v1\", keyProvider, recordProvider);\n * programManager.transfer(1, \"aleo166q6ww6688cug7qxwe7nhctjpymydwzy2h7rscfmatqmfwnjvggqcad0at\", \"public\", 0.5);\n *\n * // Keys can also be fetched manually\n * const searchParams = new IndexDbSearch({db: \"keys\", keyId: \"credits.aleo:transferPrivate\"});\n * const [transferPrivateProvingKey, transferPrivateVerifyingKey] = await keyProvider.functionKeys(searchParams);\n */\n functionKeys(params?: KeySearchParams): Promise;\n\n /**\n * Get fee_private function keys from the credits.aleo program\n *\n * @returns {Promise} Proving and verifying keys for the join function\n */\n feePrivateKeys(): Promise;\n\n /**\n * Get fee_public function keys from the credits.aleo program\n *\n * @returns {Promise} Proving and verifying keys for the join function\n */\n feePublicKeys(): Promise;\n\n /**\n * Get join function keys from the credits.aleo program\n *\n * @returns {Promise} Proving and verifying keys for the join function\n */\n joinKeys(): Promise;\n\n /**\n * Get split function keys from the credits.aleo program\n *\n * @returns {Promise} Proving and verifying keys for the join function\n */\n splitKeys(): Promise;\n\n /**\n * Get keys for a variant of the transfer function from the credits.aleo program\n *\n * @param {string} visibility Visibility of the transfer function (private, public, privateToPublic, publicToPrivate)\n * @returns {Promise} Proving and verifying keys for the specified transfer function\n *\n * @example\n * // Create a new object which implements the KeyProvider interface\n * const networkClient = new AleoNetworkClient(\"https://api.explorer.aleo.org/v1\");\n * const keyProvider = new AleoKeyProvider();\n * const recordProvider = new NetworkRecordProvider(account, networkClient);\n *\n * // Initialize a program manager with the key provider to automatically fetch keys for value transfers\n * const programManager = new ProgramManager(\"https://api.explorer.aleo.org/v1\", keyProvider, recordProvider);\n * programManager.transfer(1, \"aleo166q6ww6688cug7qxwe7nhctjpymydwzy2h7rscfmatqmfwnjvggqcad0at\", \"public\", 0.5);\n *\n * // Keys can also be fetched manually\n * const [transferPublicProvingKey, transferPublicVerifyingKey] = await keyProvider.transferKeys(\"public\");\n */\n transferKeys(visibility: string): Promise;\n\n /**\n * Get unbond_public function keys from the credits.aleo program\n *\n * @returns {Promise} Proving and verifying keys for the join function\n */\n unBondPublicKeys(): Promise;\n\n}\n\n\n/**\n * AleoKeyProvider class. Implements the KeyProvider interface. Enables the retrieval of Aleo program proving and\n * verifying keys for the credits.aleo program over http from official Aleo sources and storing and retrieving function\n * keys from a local memory cache.\n */\nclass AleoKeyProvider implements FunctionKeyProvider {\n cache: Map;\n cacheOption: boolean;\n keyUris: string;\n\n async fetchBytes(\n url = \"/\",\n ): Promise {\n try {\n const response = await get(url);\n const data = await response.arrayBuffer();\n return new Uint8Array(data);\n } catch (error) {\n throw new Error(\"Error fetching data.\" + error);\n }\n }\n\n constructor() {\n this.keyUris = KEY_STORE;\n this.cache = new Map();\n this.cacheOption = false;\n }\n\n /**\n * Use local memory to store keys\n *\n * @param {boolean} useCache whether to store keys in local memory\n */\n useCache(useCache: boolean) {\n this.cacheOption = useCache;\n }\n\n /**\n * Clear the key cache\n */\n clearCache() {\n this.cache.clear();\n }\n\n /**\n * Cache a set of keys. This will overwrite any existing keys with the same keyId. The user can check if a keyId\n * exists in the cache using the containsKeys method prior to calling this method if overwriting is not desired.\n *\n * @param {string} keyId access key for the cache\n * @param {FunctionKeyPair} keys keys to cache\n */\n cacheKeys(keyId: string, keys: FunctionKeyPair) {\n const [provingKey, verifyingKey] = keys;\n this.cache.set(keyId, [provingKey.toBytes(), verifyingKey.toBytes()]);\n }\n\n /**\n * Determine if a keyId exists in the cache\n *\n * @param {string} keyId keyId of a proving and verifying key pair\n * @returns {boolean} true if the keyId exists in the cache, false otherwise\n */\n containsKeys(keyId: string): boolean {\n return this.cache.has(keyId)\n }\n\n /**\n * Delete a set of keys from the cache\n *\n * @param {string} keyId keyId of a proving and verifying key pair to delete from memory\n * @returns {boolean} true if the keyId exists in the cache and was deleted, false if the key did not exist\n */\n deleteKeys(keyId: string): boolean {\n return this.cache.delete(keyId)\n }\n\n /**\n * Get a set of keys from the cache\n * @param keyId keyId of a proving and verifying key pair\n *\n * @returns {FunctionKeyPair | Error} Proving and verifying keys for the specified program\n */\n getKeys(keyId: string): FunctionKeyPair | Error {\n console.debug(`Checking if key exists in cache. KeyId: ${keyId}`)\n if (this.cache.has(keyId)) {\n const [provingKeyBytes, verifyingKeyBytes] = this.cache.get(keyId);\n return [ProvingKey.fromBytes(provingKeyBytes), VerifyingKey.fromBytes(verifyingKeyBytes)];\n } else {\n return new Error(\"Key not found in cache.\");\n }\n }\n\n /**\n * Get arbitrary function keys from a provider\n *\n * @param {KeySearchParams} params parameters for the key search in form of: {proverUri: string, verifierUri: string, cacheKey: string}\n * @returns {Promise} Proving and verifying keys for the specified program\n *\n * @example\n * // Create a new object which implements the KeyProvider interface\n * const networkClient = new AleoNetworkClient(\"https://api.explorer.aleo.org/v1\");\n * const keyProvider = new AleoKeyProvider();\n * const recordProvider = new NetworkRecordProvider(account, networkClient);\n *\n * // Initialize a program manager with the key provider to automatically fetch keys for value transfers\n * const programManager = new ProgramManager(\"https://api.explorer.aleo.org/v1\", keyProvider, recordProvider);\n * programManager.transfer(1, \"aleo166q6ww6688cug7qxwe7nhctjpymydwzy2h7rscfmatqmfwnjvggqcad0at\", \"public\", 0.5);\n *\n * // Keys can also be fetched manually using the key provider\n * const keySearchParams = { \"cacheKey\": \"myProgram:myFunction\" };\n * const [transferPrivateProvingKey, transferPrivateVerifyingKey] = await keyProvider.functionKeys(keySearchParams);\n */\n async functionKeys(params?: KeySearchParams): Promise {\n if (params) {\n let proverUrl;\n let verifierUrl;\n let cacheKey;\n if (\"name\" in params && typeof params[\"name\"] == \"string\") {\n let key = CREDITS_PROGRAM_KEYS.getKey(params[\"name\"]);\n if (!(key instanceof Error)) {\n return this.fetchCreditsKeys(key);\n }\n }\n\n if (\"proverUri\" in params && typeof params[\"proverUri\"] == \"string\") {\n proverUrl = params[\"proverUri\"];\n }\n\n if (\"verifierUri\" in params && typeof params[\"verifierUri\"] == \"string\") {\n verifierUrl = params[\"verifierUri\"];\n }\n\n if (\"cacheKey\" in params && typeof params[\"cacheKey\"] == \"string\") {\n cacheKey = params[\"cacheKey\"];\n }\n\n if (proverUrl && verifierUrl) {\n return await this.fetchRemoteKeys(proverUrl, verifierUrl, cacheKey);\n }\n\n if (cacheKey) {\n return this.getKeys(cacheKey);\n }\n }\n throw Error(\"Invalid parameters provided, must provide either a cacheKey and/or a proverUrl and a verifierUrl\");\n }\n\n /**\n * Returns the proving and verifying keys for a specified program from a specified url.\n *\n * @param {string} verifierUrl Url of the proving key\n * @param {string} proverUrl Url the verifying key\n * @param {string} cacheKey Key to store the keys in the cache\n *\n * @returns {Promise} Proving and verifying keys for the specified program\n *\n * @example\n * // Create a new AleoKeyProvider object\n * const networkClient = new AleoNetworkClient(\"https://api.explorer.aleo.org/v1\");\n * const keyProvider = new AleoKeyProvider();\n * const recordProvider = new NetworkRecordProvider(account, networkClient);\n *\n * // Initialize a program manager with the key provider to automatically fetch keys for value transfers\n * const programManager = new ProgramManager(\"https://api.explorer.aleo.org/v1\", keyProvider, recordProvider);\n * programManager.transfer(1, \"aleo166q6ww6688cug7qxwe7nhctjpymydwzy2h7rscfmatqmfwnjvggqcad0at\", \"public\", 0.5);\n *\n * // Keys can also be fetched manually\n * const [transferPrivateProvingKey, transferPrivateVerifyingKey] = await keyProvider.fetchKeys(\n * CREDITS_PROGRAM_KEYS.transfer_private.prover,\n * CREDITS_PROGRAM_KEYS.transfer_private.verifier,\n * );\n */\n async fetchRemoteKeys(proverUrl: string, verifierUrl: string, cacheKey?: string): Promise {\n try {\n // If cache is enabled, check if the keys have already been fetched and return them if they have\n if (this.cacheOption) {\n if (!cacheKey) {\n cacheKey = proverUrl;\n }\n const value = this.cache.get(cacheKey);\n if (typeof value !== \"undefined\") {\n return [ProvingKey.fromBytes(value[0]), VerifyingKey.fromBytes(value[1])];\n } else {\n console.debug(\"Fetching proving keys from url \" + proverUrl);\n const provingKey = ProvingKey.fromBytes(await this.fetchBytes(proverUrl))\n console.debug(\"Fetching verifying keys \" + verifierUrl);\n const verifyingKey = (await this.getVerifyingKey(verifierUrl));\n this.cache.set(cacheKey, [provingKey.toBytes(), verifyingKey.toBytes()]);\n return [provingKey, verifyingKey];\n }\n }\n else {\n // If cache is disabled, fetch the keys and return them\n const provingKey = ProvingKey.fromBytes(await this.fetchBytes(proverUrl))\n const verifyingKey = (await this.getVerifyingKey(verifierUrl));\n return [provingKey, verifyingKey];\n }\n } catch (error) {\n throw new Error(`Error: ${error} fetching fee proving and verifying keys from ${proverUrl} and ${verifierUrl}.`);\n }\n }\n\n /***\n * Fetches the proving key from a remote source.\n *\n * @param proverUrl\n * @param cacheKey\n *\n * @returns {Promise} Proving key for the specified program\n */\n async fetchProvingKey(proverUrl: string, cacheKey?: string): Promise {\n try {\n // If cache is enabled, check if the keys have already been fetched and return them if they have\n if (this.cacheOption) {\n if (!cacheKey) {\n cacheKey = proverUrl;\n }\n const value = this.cache.get(cacheKey);\n if (typeof value !== \"undefined\") {\n return ProvingKey.fromBytes(value[0]);\n } else {\n console.debug(\"Fetching proving keys from url \" + proverUrl);\n const provingKey = ProvingKey.fromBytes(await this.fetchBytes(proverUrl));\n return provingKey;\n }\n }\n else {\n const provingKey = ProvingKey.fromBytes(await this.fetchBytes(proverUrl));\n return provingKey;\n }\n } catch (error) {\n throw new Error(`Error: ${error} fetching fee proving keys from ${proverUrl}`);\n }\n }\n\n async fetchCreditsKeys(key: Key): Promise {\n try {\n if (!this.cache.has(key.locator) || !this.cacheOption) {\n const verifying_key = key.verifyingKey()\n const proving_key = await this.fetchProvingKey(key.prover, key.locator);\n if (this.cacheOption) {\n this.cache.set(CREDITS_PROGRAM_KEYS.bond_public.locator, [proving_key.toBytes(), verifying_key.toBytes()]);\n }\n return [proving_key, verifying_key];\n } else {\n const keyPair = this.cache.get(key.locator);\n return [ProvingKey.fromBytes(keyPair[0]), VerifyingKey.fromBytes(keyPair[1])];\n }\n } catch (error) {\n throw new Error(`Error: fetching credits.aleo keys: ${error}`);\n }\n }\n\n async bondPublicKeys(): Promise {\n return this.fetchCreditsKeys(CREDITS_PROGRAM_KEYS.bond_public);\n }\n\n bondValidatorKeys(): Promise {\n return this.fetchCreditsKeys(CREDITS_PROGRAM_KEYS.bond_validator);\n }\n\n claimUnbondPublicKeys(): Promise {\n return this.fetchCreditsKeys(CREDITS_PROGRAM_KEYS.claim_unbond_public)\n }\n\n /**\n * Returns the proving and verifying keys for the transfer functions in the credits.aleo program\n * @param {string} visibility Visibility of the transfer function\n * @returns {Promise} Proving and verifying keys for the transfer functions\n *\n * @example\n * // Create a new AleoKeyProvider\n * const networkClient = new AleoNetworkClient(\"https://api.explorer.aleo.org/v1\");\n * const keyProvider = new AleoKeyProvider();\n * const recordProvider = new NetworkRecordProvider(account, networkClient);\n *\n * // Initialize a program manager with the key provider to automatically fetch keys for value transfers\n * const programManager = new ProgramManager(\"https://api.explorer.aleo.org/v1\", keyProvider, recordProvider);\n * programManager.transfer(1, \"aleo166q6ww6688cug7qxwe7nhctjpymydwzy2h7rscfmatqmfwnjvggqcad0at\", \"public\", 0.5);\n *\n * // Keys can also be fetched manually\n * const [transferPublicProvingKey, transferPublicVerifyingKey] = await keyProvider.transferKeys(\"public\");\n */\n async transferKeys(visibility: string): Promise {\n if (PRIVATE_TRANSFER.has(visibility)) {\n return await this.fetchCreditsKeys(CREDITS_PROGRAM_KEYS.transfer_private);\n } else if (PRIVATE_TO_PUBLIC_TRANSFER.has(visibility)) {\n return await this.fetchCreditsKeys(CREDITS_PROGRAM_KEYS.transfer_private_to_public);\n } else if (PUBLIC_TRANSFER.has(visibility)) {\n return await this.fetchCreditsKeys(CREDITS_PROGRAM_KEYS.transfer_public);\n } else if (PUBLIC_TRANSFER_AS_SIGNER.has(visibility)) {\n return await this.fetchCreditsKeys(CREDITS_PROGRAM_KEYS.transfer_public_as_signer);\n } else if (PUBLIC_TO_PRIVATE_TRANSFER.has(visibility)) {\n return await this.fetchCreditsKeys(CREDITS_PROGRAM_KEYS.transfer_public_to_private);\n } else {\n throw new Error(\"Invalid visibility type\");\n }\n }\n\n /**\n * Returns the proving and verifying keys for the join function in the credits.aleo program\n *\n * @returns {Promise} Proving and verifying keys for the join function\n */\n async joinKeys(): Promise {\n return await this.fetchCreditsKeys(CREDITS_PROGRAM_KEYS.join);\n }\n\n /**\n * Returns the proving and verifying keys for the split function in the credits.aleo program\n *\n * @returns {Promise} Proving and verifying keys for the split function\n * */\n async splitKeys(): Promise {\n return await this.fetchCreditsKeys(CREDITS_PROGRAM_KEYS.split);\n }\n\n /**\n * Returns the proving and verifying keys for the fee_private function in the credits.aleo program\n *\n * @returns {Promise} Proving and verifying keys for the fee function\n */\n async feePrivateKeys(): Promise {\n return await this.fetchCreditsKeys(CREDITS_PROGRAM_KEYS.fee_private);\n }\n\n /**\n * Returns the proving and verifying keys for the fee_public function in the credits.aleo program\n *\n * @returns {Promise} Proving and verifying keys for the fee function\n */\n async feePublicKeys(): Promise {\n return await this.fetchCreditsKeys(CREDITS_PROGRAM_KEYS.fee_public);\n }\n\n /**\n * Gets a verifying key. If the verifying key is for a credits.aleo function, get it from the wasm cache otherwise\n *\n * @returns {Promise} Verifying key for the function\n */\n // attempt to fetch it from the network\n async getVerifyingKey(verifierUri: string): Promise {\n switch (verifierUri) {\n case CREDITS_PROGRAM_KEYS.bond_public.verifier:\n return CREDITS_PROGRAM_KEYS.bond_public.verifyingKey();\n case CREDITS_PROGRAM_KEYS.bond_validator.verifier:\n return CREDITS_PROGRAM_KEYS.bond_validator.verifyingKey();\n case CREDITS_PROGRAM_KEYS.claim_unbond_public.verifier:\n return CREDITS_PROGRAM_KEYS.claim_unbond_public.verifyingKey();\n case CREDITS_PROGRAM_KEYS.fee_private.verifier:\n return CREDITS_PROGRAM_KEYS.fee_private.verifyingKey();\n case CREDITS_PROGRAM_KEYS.fee_public.verifier:\n return CREDITS_PROGRAM_KEYS.fee_public.verifyingKey();\n case CREDITS_PROGRAM_KEYS.inclusion.verifier:\n return CREDITS_PROGRAM_KEYS.inclusion.verifyingKey();\n case CREDITS_PROGRAM_KEYS.join.verifier:\n return CREDITS_PROGRAM_KEYS.join.verifyingKey();\n case CREDITS_PROGRAM_KEYS.set_validator_state.verifier:\n return CREDITS_PROGRAM_KEYS.set_validator_state.verifyingKey();\n case CREDITS_PROGRAM_KEYS.split.verifier:\n return CREDITS_PROGRAM_KEYS.split.verifyingKey();\n case CREDITS_PROGRAM_KEYS.transfer_private.verifier:\n return CREDITS_PROGRAM_KEYS.transfer_private.verifyingKey();\n case CREDITS_PROGRAM_KEYS.transfer_private_to_public.verifier:\n return CREDITS_PROGRAM_KEYS.transfer_private_to_public.verifyingKey();\n case CREDITS_PROGRAM_KEYS.transfer_public.verifier:\n return CREDITS_PROGRAM_KEYS.transfer_public.verifyingKey();\n case CREDITS_PROGRAM_KEYS.transfer_public_as_signer.verifier:\n return CREDITS_PROGRAM_KEYS.transfer_public_as_signer.verifyingKey();\n case CREDITS_PROGRAM_KEYS.transfer_public_to_private.verifier:\n return CREDITS_PROGRAM_KEYS.transfer_public_to_private.verifyingKey();\n case CREDITS_PROGRAM_KEYS.unbond_public.verifier:\n return CREDITS_PROGRAM_KEYS.unbond_public.verifyingKey();\n default:\n try {\n /// Try to fetch the verifying key from the network as a string\n const response = await get(verifierUri);\n const text = await response.text();\n return VerifyingKey.fromString(text);\n } catch (e) {\n /// If that fails, try to fetch the verifying key from the network as bytes\n try {\n return VerifyingKey.fromBytes(await this.fetchBytes(verifierUri));\n } catch (inner) {\n return new Error(\"Invalid verifying key. Error: \" + inner);\n }\n }\n }\n }\n\n unBondPublicKeys(): Promise {\n return this.fetchCreditsKeys(CREDITS_PROGRAM_KEYS.unbond_public);\n }\n}\n\nexport {AleoKeyProvider, AleoKeyProviderParams, AleoKeyProviderInitParams, CachedKeyPair, FunctionKeyPair, FunctionKeyProvider, KeySearchParams}\n","import {\n FunctionKeyProvider,\n KeySearchParams,\n FunctionKeyPair,\n CachedKeyPair,\n ProvingKey,\n VerifyingKey,\n CREDITS_PROGRAM_KEYS,\n PRIVATE_TRANSFER,\n PRIVATE_TO_PUBLIC_TRANSFER,\n PUBLIC_TRANSFER,\n PUBLIC_TO_PRIVATE_TRANSFER,\n PUBLIC_TRANSFER_AS_SIGNER\n} from \"./index\";\n\n/**\n * Search parameters for the offline key provider. This class implements the KeySearchParams interface and includes\n * a convenience method for creating a new instance of this class for each function of the credits.aleo program.\n *\n * @example\n * // If storing a key for a custom program function\n * offlineSearchParams = new OfflineSearchParams(\"myprogram.aleo/myfunction\");\n *\n * // If storing a key for a credits.aleo program function\n * bondPublicKeyParams = OfflineSearchParams.bondPublicKeyParams();\n */\nclass OfflineSearchParams implements KeySearchParams {\n cacheKey: string | undefined;\n verifyCreditsKeys: boolean | undefined;\n\n /**\n * Create a new OfflineSearchParams instance.\n *\n * @param {string} cacheKey - Key used to store the local function proving & verifying keys. This should be stored\n * under the naming convention \"programName/functionName\" (i.e. \"myprogram.aleo/myfunction\")\n * @param {boolean} verifyCreditsKeys - Whether to verify the keys against the credits.aleo program,\n * defaults to false, but should be set to true if using keys from the credits.aleo program\n */\n constructor(cacheKey: string, verifyCreditsKeys = false) {\n this.cacheKey = cacheKey;\n this.verifyCreditsKeys = verifyCreditsKeys;\n }\n\n /**\n * Create a new OfflineSearchParams instance for the bond_public function of the credits.aleo program.\n */\n static bondPublicKeyParams(): OfflineSearchParams {\n return new OfflineSearchParams(CREDITS_PROGRAM_KEYS.bond_public.locator, true);\n }\n\n /**\n * Create a new OfflineSearchParams instance for the bond_validator function of the credits.aleo program.\n */\n static bondValidatorKeyParams(): OfflineSearchParams {\n return new OfflineSearchParams(CREDITS_PROGRAM_KEYS.bond_validator.locator, true);\n }\n\n /**\n * Create a new OfflineSearchParams instance for the claim_unbond_public function of the\n */\n static claimUnbondPublicKeyParams(): OfflineSearchParams {\n return new OfflineSearchParams(CREDITS_PROGRAM_KEYS.claim_unbond_public.locator, true);\n }\n\n /**\n * Create a new OfflineSearchParams instance for the fee_private function of the credits.aleo program.\n */\n static feePrivateKeyParams(): OfflineSearchParams {\n return new OfflineSearchParams(CREDITS_PROGRAM_KEYS.fee_private.locator, true);\n }\n\n /**\n * Create a new OfflineSearchParams instance for the fee_public function of the credits.aleo program.\n */\n static feePublicKeyParams(): OfflineSearchParams {\n return new OfflineSearchParams(CREDITS_PROGRAM_KEYS.fee_public.locator, true);\n }\n\n /**\n * Create a new OfflineSearchParams instance for the inclusion prover function.\n */\n static inclusionKeyParams(): OfflineSearchParams {\n return new OfflineSearchParams(CREDITS_PROGRAM_KEYS.inclusion.locator, true);\n }\n\n /**\n * Create a new OfflineSearchParams instance for the join function of the credits.aleo program.\n */\n static joinKeyParams(): OfflineSearchParams {\n return new OfflineSearchParams(CREDITS_PROGRAM_KEYS.join.locator, true);\n }\n\n /**\n * Create a new OfflineSearchParams instance for the set_validator_state function of the credits.aleo program.\n */\n static setValidatorStateKeyParams(): OfflineSearchParams {\n return new OfflineSearchParams(CREDITS_PROGRAM_KEYS.set_validator_state.locator, true);\n }\n\n /**\n * Create a new OfflineSearchParams instance for the split function of the credits.aleo program.\n */\n static splitKeyParams(): OfflineSearchParams {\n return new OfflineSearchParams(CREDITS_PROGRAM_KEYS.split.locator, true);\n }\n\n /**\n * Create a new OfflineSearchParams instance for the transfer_private function of the credits.aleo program.\n */\n static transferPrivateKeyParams(): OfflineSearchParams {\n return new OfflineSearchParams(CREDITS_PROGRAM_KEYS.transfer_private.locator, true);\n }\n\n /**\n * Create a new OfflineSearchParams instance for the transfer_private_to_public function of the credits.aleo program.\n */\n static transferPrivateToPublicKeyParams(): OfflineSearchParams {\n return new OfflineSearchParams(CREDITS_PROGRAM_KEYS.transfer_private_to_public.locator, true);\n }\n\n /**\n * Create a new OfflineSearchParams instance for the transfer_public function of the credits.aleo program.\n */\n static transferPublicKeyParams(): OfflineSearchParams {\n return new OfflineSearchParams(CREDITS_PROGRAM_KEYS.transfer_public.locator, true);\n }\n\n /**\n * Create a new OfflineSearchParams instance for the transfer_public_as_signer function of the credits.aleo program.\n */\n static transferPublicAsSignerKeyParams(): OfflineSearchParams {\n return new OfflineSearchParams(CREDITS_PROGRAM_KEYS.transfer_public_as_signer.locator, true);\n }\n\n /**\n * Create a new OfflineSearchParams instance for the transfer_public_to_private function of the credits.aleo program.\n */\n static transferPublicToPrivateKeyParams(): OfflineSearchParams {\n return new OfflineSearchParams(CREDITS_PROGRAM_KEYS.transfer_public_to_private.locator, true);\n }\n\n /**\n * Create a new OfflineSearchParams instance for the unbond_public function of the credits.aleo program.\n */\n static unbondPublicKeyParams(): OfflineSearchParams {\n return new OfflineSearchParams(CREDITS_PROGRAM_KEYS.unbond_public.locator, true);\n }\n}\n\n/**\n * A key provider meant for building transactions offline on devices such as hardware wallets. This key provider is not\n * able to contact the internet for key material and instead relies on the user to insert Aleo function proving &\n * verifying keys from local storage prior to usage.\n *\n * @example\n * // Create an offline program manager\n * const programManager = new ProgramManager();\n *\n * // Create a temporary account for the execution of the program\n * const account = new Account();\n * programManager.setAccount(account);\n *\n * // Create the proving keys from the key bytes on the offline machine\n * console.log(\"Creating proving keys from local key files\");\n * const program = \"program hello_hello.aleo; function hello: input r0 as u32.public; input r1 as u32.private; add r0 r1 into r2; output r2 as u32.private;\";\n * const myFunctionProver = await getLocalKey(\"/path/to/my/function/hello_hello.prover\");\n * const myFunctionVerifier = await getLocalKey(\"/path/to/my/function/hello_hello.verifier\");\n * const feePublicProvingKeyBytes = await getLocalKey(\"/path/to/credits.aleo/feePublic.prover\");\n *\n * myFunctionProvingKey = ProvingKey.fromBytes(myFunctionProver);\n * myFunctionVerifyingKey = VerifyingKey.fromBytes(myFunctionVerifier);\n * const feePublicProvingKey = ProvingKey.fromBytes(feePublicKeyBytes);\n *\n * // Create an offline key provider\n * console.log(\"Creating offline key provider\");\n * const offlineKeyProvider = new OfflineKeyProvider();\n *\n * // Cache the keys\n * // Cache the proving and verifying keys for the custom hello function\n * OfflineKeyProvider.cacheKeys(\"hello_hello.aleo/hello\", myFunctionProvingKey, myFunctionVerifyingKey);\n *\n * // Cache the proving key for the fee_public function (the verifying key is automatically cached)\n * OfflineKeyProvider.insertFeePublicKey(feePublicProvingKey);\n *\n * // Create an offline query using the latest state root in order to create the inclusion proof\n * const offlineQuery = new OfflineQuery(\"latestStateRoot\");\n *\n * // Insert the key provider into the program manager\n * programManager.setKeyProvider(offlineKeyProvider);\n *\n * // Create the offline search params\n * const offlineSearchParams = new OfflineSearchParams(\"hello_hello.aleo/hello\");\n *\n * // Create the offline transaction\n * const offlineExecuteTx = await this.buildExecutionTransaction(\"hello_hello.aleo\", \"hello\", 1, false, [\"5u32\", \"5u32\"], undefined, offlineSearchParams, undefined, undefined, undefined, undefined, offlineQuery, program);\n *\n * // Broadcast the transaction later on a machine with internet access\n * const networkClient = new AleoNetworkClient(\"https://api.explorer.aleo.org/v1\");\n * const txId = await networkClient.broadcastTransaction(offlineExecuteTx);\n */\nclass OfflineKeyProvider implements FunctionKeyProvider {\n cache: Map;\n\n constructor() {\n this.cache = new Map();\n }\n\n /**\n * Get bond_public function keys from the credits.aleo program. The keys must be cached prior to calling this\n * method for it to work.\n *\n * @returns {Promise} Proving and verifying keys for the bond_public function\n */\n bondPublicKeys(): Promise {\n return this.functionKeys(OfflineSearchParams.bondPublicKeyParams());\n };\n\n /**\n * Get bond_validator function keys from the credits.aleo program. The keys must be cached prior to calling this\n * method for it to work.\n *\n * @returns {Promise} Proving and verifying keys for the bond_public function\n */\n bondValidatorKeys(): Promise {\n return this.functionKeys(OfflineSearchParams.bondValidatorKeyParams());\n };\n\n\n /**\n * Cache a set of keys. This will overwrite any existing keys with the same keyId. The user can check if a keyId\n * exists in the cache using the containsKeys method prior to calling this method if overwriting is not desired.\n *\n * @param {string} keyId access key for the cache\n * @param {FunctionKeyPair} keys keys to cache\n */\n cacheKeys(keyId: string, keys: FunctionKeyPair): void {\n const [provingKey, verifyingKey] = keys;\n this.cache.set(keyId, [provingKey.toBytes(), verifyingKey.toBytes()]);\n };\n\n /**\n * Get unbond_public function keys from the credits.aleo program. The keys must be cached prior to calling this\n * method for it to work.\n *\n * @returns {Promise} Proving and verifying keys for the unbond_public function\n */\n claimUnbondPublicKeys(): Promise {\n return this.functionKeys(OfflineSearchParams.claimUnbondPublicKeyParams());\n };\n\n /**\n * Get arbitrary function key from the offline key provider cache.\n *\n * @param {KeySearchParams | undefined} params - Optional search parameters for the key provider\n * @returns {Promise} Proving and verifying keys for the specified program\n *\n * @example\n * /// First cache the keys from local offline resources\n * const offlineKeyProvider = new OfflineKeyProvider();\n * const myFunctionVerifyingKey = VerifyingKey.fromString(\"verifier...\");\n * const myFunctionProvingKeyBytes = await readBinaryFile('./resources/myfunction.prover');\n * const myFunctionProvingKey = ProvingKey.fromBytes(myFunctionProvingKeyBytes);\n *\n * /// Cache the keys for future use with a memorable locator\n * offlineKeyProvider.cacheKeys(\"myprogram.aleo/myfunction\", [myFunctionProvingKey, myFunctionVerifyingKey]);\n *\n * /// When they're needed, retrieve the keys from the cache\n *\n * /// First create a search parameter object with the same locator used to cache the keys\n * const keyParams = new OfflineSearchParams(\"myprogram.aleo/myfunction\");\n *\n * /// Then retrieve the keys\n * const [myFunctionProver, myFunctionVerifier] = await offlineKeyProvider.functionKeys(keyParams);\n */\n functionKeys(params?: KeySearchParams): Promise {\n return new Promise((resolve, reject) => {\n if (params === undefined) {\n reject(new Error(\"No search parameters provided, cannot retrieve keys\"));\n } else {\n const keyId = params.cacheKey;\n const verifyCreditsKeys = params.verifyCreditsKeys;\n if (this.cache.has(keyId)) {\n const [provingKeyBytes, verifyingKeyBytes] = this.cache.get(keyId) as CachedKeyPair;\n const provingKey = ProvingKey.fromBytes(provingKeyBytes);\n const verifyingKey = VerifyingKey.fromBytes(verifyingKeyBytes);\n if (verifyCreditsKeys) {\n const keysMatchExpected = this.verifyCreditsKeys(keyId, provingKey, verifyingKey)\n if (!keysMatchExpected) {\n reject (new Error(`Cached keys do not match expected keys for ${keyId}`));\n }\n }\n resolve([provingKey, verifyingKey]);\n } else {\n reject(new Error(\"Keys not found in cache for \" + keyId));\n }\n }\n });\n };\n\n /**\n * Determines if the keys for a given credits function match the expected keys.\n *\n * @returns {boolean} Whether the keys match the expected keys\n */\n verifyCreditsKeys(locator: string, provingKey: ProvingKey, verifyingKey: VerifyingKey): boolean {\n switch (locator) {\n case CREDITS_PROGRAM_KEYS.bond_public.locator:\n return provingKey.isBondPublicProver() && verifyingKey.isBondPublicVerifier();\n case CREDITS_PROGRAM_KEYS.claim_unbond_public.locator:\n return provingKey.isClaimUnbondPublicProver() && verifyingKey.isClaimUnbondPublicVerifier();\n case CREDITS_PROGRAM_KEYS.fee_private.locator:\n return provingKey.isFeePrivateProver() && verifyingKey.isFeePrivateVerifier();\n case CREDITS_PROGRAM_KEYS.fee_public.locator:\n return provingKey.isFeePublicProver() && verifyingKey.isFeePublicVerifier();\n case CREDITS_PROGRAM_KEYS.inclusion.locator:\n return provingKey.isInclusionProver() && verifyingKey.isInclusionVerifier();\n case CREDITS_PROGRAM_KEYS.join.locator:\n return provingKey.isJoinProver() && verifyingKey.isJoinVerifier();\n case CREDITS_PROGRAM_KEYS.set_validator_state.locator:\n return provingKey.isSetValidatorStateProver() && verifyingKey.isSetValidatorStateVerifier();\n case CREDITS_PROGRAM_KEYS.split.locator:\n return provingKey.isSplitProver() && verifyingKey.isSplitVerifier();\n case CREDITS_PROGRAM_KEYS.transfer_private.locator:\n return provingKey.isTransferPrivateProver() && verifyingKey.isTransferPrivateVerifier();\n case CREDITS_PROGRAM_KEYS.transfer_private_to_public.locator:\n return provingKey.isTransferPrivateToPublicProver() && verifyingKey.isTransferPrivateToPublicVerifier();\n case CREDITS_PROGRAM_KEYS.transfer_public.locator:\n return provingKey.isTransferPublicProver() && verifyingKey.isTransferPublicVerifier();\n case CREDITS_PROGRAM_KEYS.transfer_public_to_private.locator:\n return provingKey.isTransferPublicToPrivateProver() && verifyingKey.isTransferPublicToPrivateVerifier();\n case CREDITS_PROGRAM_KEYS.unbond_public.locator:\n return provingKey.isUnbondPublicProver() && verifyingKey.isUnbondPublicVerifier();\n default:\n return false;\n }\n }\n\n /**\n * Get fee_private function keys from the credits.aleo program. The keys must be cached prior to calling this\n * method for it to work.\n *\n * @returns {Promise} Proving and verifying keys for the join function\n */\n feePrivateKeys(): Promise {\n return this.functionKeys(OfflineSearchParams.feePrivateKeyParams());\n };\n\n /**\n * Get fee_public function keys from the credits.aleo program. The keys must be cached prior to calling this\n * method for it to work.\n *\n * @returns {Promise} Proving and verifying keys for the join function\n */\n feePublicKeys(): Promise {\n return this.functionKeys(OfflineSearchParams.feePublicKeyParams());\n };\n\n /**\n * Get join function keys from the credits.aleo program. The keys must be cached prior to calling this\n * method for it to work.\n *\n * @returns {Promise} Proving and verifying keys for the join function\n */\n joinKeys(): Promise {\n return this.functionKeys(OfflineSearchParams.joinKeyParams());\n };\n\n /**\n * Get split function keys from the credits.aleo program. The keys must be cached prior to calling this\n * method for it to work.\n *\n * @returns {Promise} Proving and verifying keys for the join function\n */\n splitKeys(): Promise {\n return this.functionKeys(OfflineSearchParams.splitKeyParams());\n };\n\n /**\n * Get keys for a variant of the transfer function from the credits.aleo program.\n *\n *\n * @param {string} visibility Visibility of the transfer function (private, public, privateToPublic, publicToPrivate)\n * @returns {Promise} Proving and verifying keys for the specified transfer function\n *\n * @example\n * // Create a new OfflineKeyProvider\n * const offlineKeyProvider = new OfflineKeyProvider();\n *\n * // Cache the keys for future use with the official locator\n * const transferPublicProvingKeyBytes = await readBinaryFile('./resources/transfer_public.prover.a74565e');\n * const transferPublicProvingKey = ProvingKey.fromBytes(transferPublicProvingKeyBytes);\n *\n * // Cache the transfer_public keys for future use with the OfflinKeyProvider's convenience method for\n * // transfer_public (the verifying key will be cached automatically)\n * offlineKeyProvider.insertTransferPublicKeys(transferPublicProvingKey);\n *\n * /// When they're needed, retrieve the keys from the cache\n * const [transferPublicProvingKey, transferPublicVerifyingKey] = await keyProvider.transferKeys(\"public\");\n */\n transferKeys(visibility: string): Promise {\n if (PRIVATE_TRANSFER.has(visibility)) {\n return this.functionKeys(OfflineSearchParams.transferPrivateKeyParams());\n } else if (PRIVATE_TO_PUBLIC_TRANSFER.has(visibility)) {\n return this.functionKeys(OfflineSearchParams.transferPrivateToPublicKeyParams());\n } else if (PUBLIC_TRANSFER.has(visibility)) {\n return this.functionKeys(OfflineSearchParams.transferPublicKeyParams());\n } else if (PUBLIC_TRANSFER_AS_SIGNER.has(visibility)) {\n return this.functionKeys(OfflineSearchParams.transferPublicAsSignerKeyParams());\n } else if (PUBLIC_TO_PRIVATE_TRANSFER.has(visibility)) {\n return this.functionKeys(OfflineSearchParams.transferPublicToPrivateKeyParams());\n } else {\n throw new Error(\"Invalid visibility type\");\n }\n };\n\n /**\n * Get unbond_public function keys from the credits.aleo program\n *\n * @returns {Promise} Proving and verifying keys for the join function\n */\n async unBondPublicKeys(): Promise {\n return this.functionKeys(OfflineSearchParams.unbondPublicKeyParams());\n };\n\n /**\n * Insert the proving and verifying keys for the bond_public function into the cache. Only the proving key needs\n * to be inserted, the verifying key is automatically inserted by the SDK. This function will automatically check\n * that the keys match the expected checksum for bond_public before inserting them into the cache.\n *\n * @param provingKey\n */\n insertBondPublicKeys(provingKey: ProvingKey) {\n if (provingKey.isBondPublicProver()) {\n this.cache.set(CREDITS_PROGRAM_KEYS.bond_public.locator, [provingKey.toBytes(), VerifyingKey.bondPublicVerifier().toBytes()]);\n } else {\n throw new Error(\"Attempted to insert invalid proving keys for bond_public\");\n }\n }\n\n /**\n * Insert the proving and verifying keys for the claim_unbond_public function into the cache. Only the proving key needs\n * to be inserted, the verifying key is automatically inserted by the SDK. This function will automatically check\n * that the keys match the expected checksum for claim_unbond_public before inserting them into the cache.\n *\n * @param provingKey\n */\n insertClaimUnbondPublicKeys(provingKey: ProvingKey) {\n if (provingKey.isClaimUnbondPublicProver()) {\n this.cache.set(CREDITS_PROGRAM_KEYS.claim_unbond_public.locator, [provingKey.toBytes(), VerifyingKey.claimUnbondPublicVerifier().toBytes()]);\n } else {\n throw new Error(\"Attempted to insert invalid proving keys for claim_unbond_public\");\n }\n }\n\n /**\n * Insert the proving and verifying keys for the fee_private function into the cache. Only the proving key needs\n * to be inserted, the verifying key is automatically inserted by the SDK. This function will automatically check\n * that the keys match the expected checksum for fee_private before inserting them into the cache.\n *\n * @param provingKey\n */\n insertFeePrivateKeys(provingKey: ProvingKey) {\n if (provingKey.isFeePrivateProver()) {\n this.cache.set(CREDITS_PROGRAM_KEYS.fee_private.locator, [provingKey.toBytes(), VerifyingKey.feePrivateVerifier().toBytes()]);\n } else {\n throw new Error(\"Attempted to insert invalid proving keys for fee_private\");\n }\n }\n\n /**\n * Insert the proving and verifying keys for the fee_public function into the cache. Only the proving key needs\n * to be inserted, the verifying key is automatically inserted by the SDK. This function will automatically check\n * that the keys match the expected checksum for fee_public before inserting them into the cache.\n *\n * @param provingKey\n */\n insertFeePublicKeys(provingKey: ProvingKey) {\n if (provingKey.isFeePublicProver()) {\n this.cache.set(CREDITS_PROGRAM_KEYS.fee_public.locator, [provingKey.toBytes(), VerifyingKey.feePublicVerifier().toBytes()]);\n } else {\n throw new Error(\"Attempted to insert invalid proving keys for fee_public\");\n }\n }\n\n /**\n * Insert the proving and verifying keys for the join function into the cache. Only the proving key needs\n * to be inserted, the verifying key is automatically inserted by the SDK. This function will automatically check\n * that the keys match the expected checksum for join before inserting them into the cache.\n *\n * @param provingKey\n */\n insertJoinKeys(provingKey: ProvingKey) {\n if (provingKey.isJoinProver()) {\n this.cache.set(CREDITS_PROGRAM_KEYS.join.locator, [provingKey.toBytes(), VerifyingKey.joinVerifier().toBytes()]);\n } else {\n throw new Error(\"Attempted to insert invalid proving keys for join\");\n }\n }\n\n /**\n * Insert the proving and verifying keys for the set_validator_state function into the cache. Only the proving key needs\n * to be inserted, the verifying key is automatically inserted by the SDK. This function will automatically check\n * that the keys match the expected checksum for set_validator_state before inserting them into the cache.\n *\n * @param provingKey\n */\n insertSetValidatorStateKeys(provingKey: ProvingKey) {\n if (provingKey.isSetValidatorStateProver()) {\n this.cache.set(CREDITS_PROGRAM_KEYS.set_validator_state.locator, [provingKey.toBytes(), VerifyingKey.setValidatorStateVerifier().toBytes()]);\n } else {\n throw new Error(\"Attempted to insert invalid proving keys for set_validator_state\");\n }\n }\n\n /**\n * Insert the proving and verifying keys for the split function into the cache. Only the proving key needs\n * to be inserted, the verifying key is automatically inserted by the SDK. This function will automatically check\n * that the keys match the expected checksum for split before inserting them into the cache.\n *\n * @param provingKey\n */\n insertSplitKeys(provingKey: ProvingKey) {\n if (provingKey.isSplitProver()) {\n this.cache.set(CREDITS_PROGRAM_KEYS.split.locator, [provingKey.toBytes(), VerifyingKey.splitVerifier().toBytes()]);\n } else {\n throw new Error(\"Attempted to insert invalid proving keys for split\");\n }\n }\n\n /**\n * Insert the proving and verifying keys for the transfer_private function into the cache. Only the proving key needs\n * to be inserted, the verifying key is automatically inserted by the SDK. This function will automatically check\n * that the keys match the expected checksum for transfer_private before inserting them into the cache.\n *\n * @param provingKey\n */\n insertTransferPrivateKeys(provingKey: ProvingKey) {\n if (provingKey.isTransferPrivateProver()) {\n this.cache.set(CREDITS_PROGRAM_KEYS.transfer_private.locator, [provingKey.toBytes(), VerifyingKey.transferPrivateVerifier().toBytes()]);\n } else {\n throw new Error(\"Attempted to insert invalid proving keys for transfer_private\");\n }\n }\n\n /**\n * Insert the proving and verifying keys for the transfer_private_to_public function into the cache. Only the proving key needs\n * to be inserted, the verifying key is automatically inserted by the SDK. This function will automatically check\n * that the keys match the expected checksum for transfer_private_to_public before inserting them into the cache.\n *\n * @param provingKey\n */\n insertTransferPrivateToPublicKeys(provingKey: ProvingKey) {\n if (provingKey.isTransferPrivateToPublicProver()) {\n this.cache.set(CREDITS_PROGRAM_KEYS.transfer_private_to_public.locator, [provingKey.toBytes(), VerifyingKey.transferPrivateToPublicVerifier().toBytes()]);\n } else {\n throw new Error(\"Attempted to insert invalid proving keys for transfer_private_to_public\");\n }\n }\n\n /**\n * Insert the proving and verifying keys for the transfer_public function into the cache. Only the proving key needs\n * to be inserted, the verifying key is automatically inserted by the SDK. This function will automatically check\n * that the keys match the expected checksum for transfer_public before inserting them into the cache.\n *\n * @param provingKey\n */\n insertTransferPublicKeys(provingKey: ProvingKey) {\n if (provingKey.isTransferPublicProver()) {\n this.cache.set(CREDITS_PROGRAM_KEYS.transfer_public.locator, [provingKey.toBytes(), VerifyingKey.transferPublicVerifier().toBytes()]);\n } else {\n throw new Error(\"Attempted to insert invalid proving keys for transfer_public\");\n }\n }\n\n /**\n * Insert the proving and verifying keys for the transfer_public_to_private function into the cache. Only the proving key needs\n * to be inserted, the verifying key is automatically inserted by the SDK. This function will automatically check\n * that the keys match the expected checksum for transfer_public_to_private before inserting them into the cache.\n *\n * @param provingKey\n */\n insertTransferPublicToPrivateKeys(provingKey: ProvingKey) {\n if (provingKey.isTransferPublicToPrivateProver()) {\n this.cache.set(CREDITS_PROGRAM_KEYS.transfer_public_to_private.locator, [provingKey.toBytes(), VerifyingKey.transferPublicToPrivateVerifier().toBytes()]);\n } else {\n throw new Error(\"Attempted to insert invalid proving keys for transfer_public_to_private\");\n }\n }\n\n insertUnbondPublicKeys(provingKey: ProvingKey) {\n if (provingKey.isUnbondPublicProver()) {\n this.cache.set(CREDITS_PROGRAM_KEYS.unbond_public.locator, [provingKey.toBytes(), VerifyingKey.unbondPublicVerifier().toBytes()]);\n } else {\n throw new Error(\"Attempted to insert invalid proving keys for unbond_public\");\n }\n }\n}\n\n\nexport {OfflineKeyProvider, OfflineSearchParams}\n","import { logAndThrow, RecordPlaintext } from \"./index\";\nimport { Account } from \"./account\";\nimport { AleoNetworkClient } from \"./network-client\";\n\n/**\n * Interface for record search parameters. This allows for arbitrary search parameters to be passed to record provider\n * implementations.\n */\ninterface RecordSearchParams {\n [key: string]: any; // This allows for arbitrary keys with any type values\n}\n\n/**\n * Interface for a record provider. A record provider is used to find records for use in deployment and execution\n * transactions on the Aleo Network. A default implementation is provided by the NetworkRecordProvider class. However,\n * a custom implementation can be provided (say if records are synced locally to a database from the network) by\n * implementing this interface.\n */\ninterface RecordProvider {\n account: Account\n\n /**\n * Find a credits.aleo record with a given number of microcredits from the chosen provider\n *\n * @param {number} microcredits The number of microcredits to search for\n * @param {boolean} unspent Whether or not the record is unspent\n * @param {string[]} nonces Nonces of records already found so they are not found again\n * @param {RecordSearchParams} searchParameters Additional parameters to search for\n * @returns {Promise} The record if found, otherwise an error\n *\n * @example\n * // A class implementing record provider can be used to find a record with a given number of microcredits\n * const record = await recordProvider.findCreditsRecord(5000, true, []);\n *\n * // When a record is found but not yet used, its nonce should be added to the nonces array so that it is not\n * // found again if a subsequent search is performed\n * const record2 = await recordProvider.findCreditsRecord(5000, true, [record.nonce()]);\n *\n * // When the program manager is initialized with the record provider it will be used to find automatically find\n * // fee records and amount records for value transfers so that they do not need to be specified manually\n * const programManager = new ProgramManager(\"https://api.explorer.aleo.org/v1\", keyProvider, recordProvider);\n * programManager.transfer(1, \"aleo166q6ww6688cug7qxwe7nhctjpymydwzy2h7rscfmatqmfwnjvggqcad0at\", \"public\", 0.5);\n */\n findCreditsRecord(microcredits: number, unspent: boolean, nonces?: string[], searchParameters?: RecordSearchParams): Promise;\n\n /**\n * Find a list of credit.aleo records with a given number of microcredits from the chosen provider\n *\n * @param {number} microcreditAmounts A list of separate microcredit amounts to search for (e.g. [5000, 100000])\n * @param {boolean} unspent Whether or not the record is unspent\n * @param {string[]} nonces Nonces of records already found so that they are not found again\n * @param {RecordSearchParams} searchParameters Additional parameters to search for\n * @returns {Promise} A list of records with a value greater or equal to the amounts specified if such records exist, otherwise an error\n *\n * @example\n * // A class implementing record provider can be used to find a record with a given number of microcredits\n * const records = await recordProvider.findCreditsRecords([5000, 5000], true, []);\n *\n * // When a record is found but not yet used, it's nonce should be added to the nonces array so that it is not\n * // found again if a subsequent search is performed\n * const nonces = [];\n * records.forEach(record => { nonces.push(record.nonce()) });\n * const records2 = await recordProvider.findCreditsRecord(5000, true, nonces);\n *\n * // When the program manager is initialized with the record provider it will be used to find automatically find\n * // fee records and amount records for value transfers so that they do not need to be specified manually\n * const programManager = new ProgramManager(\"https://api.explorer.aleo.org/v1\", keyProvider, recordProvider);\n * programManager.transfer(1, \"aleo166q6ww6688cug7qxwe7nhctjpymydwzy2h7rscfmatqmfwnjvggqcad0at\", \"public\", 0.5);\n */\n findCreditsRecords(microcreditAmounts: number[], unspent: boolean, nonces?: string[], searchParameters?: RecordSearchParams): Promise;\n\n /**\n * Find an arbitrary record\n * @param {boolean} unspent Whether or not the record is unspent\n * @param {string[]} nonces Nonces of records already found so that they are not found again\n * @param {RecordSearchParams} searchParameters Additional parameters to search for\n * @returns {Promise} The record if found, otherwise an error\n *\n * @example\n * // The RecordSearchParams interface can be used to create parameters for custom record searches which can then\n * // be passed to the record provider. An example of how this would be done for the credits.aleo program is shown\n * // below.\n *\n * class CustomRecordSearch implements RecordSearchParams {\n * startHeight: number;\n * endHeight: number;\n * amount: number;\n * program: string;\n * recordName: string;\n * constructor(startHeight: number, endHeight: number, credits: number, maxRecords: number, programName: string, recordName: string) {\n * this.startHeight = startHeight;\n * this.endHeight = endHeight;\n * this.amount = amount;\n * this.program = programName;\n * this.recordName = recordName;\n * }\n * }\n *\n * const params = new CustomRecordSearch(0, 100, 5000, \"credits.aleo\", \"credits\");\n *\n * const record = await recordProvider.findRecord(true, [], params);\n */\n findRecord(unspent: boolean, nonces?: string[], searchParameters?: RecordSearchParams): Promise;\n\n /**\n * Find multiple records from arbitrary programs\n *\n * @param {boolean} unspent Whether or not the record is unspent\n * @param {string[]} nonces Nonces of records already found so that they are not found again\n * @param {RecordSearchParams} searchParameters Additional parameters to search for\n * @returns {Promise} The record if found, otherwise an error\n *\n * // The RecordSearchParams interface can be used to create parameters for custom record searches which can then\n * // be passed to the record provider. An example of how this would be done for the credits.aleo program is shown\n * // below.\n *\n * class CustomRecordSearch implements RecordSearchParams {\n * startHeight: number;\n * endHeight: number;\n * amount: number;\n * maxRecords: number;\n * programName: string;\n * recordName: string;\n * constructor(startHeight: number, endHeight: number, credits: number, maxRecords: number, programName: string, recordName: string) {\n * this.startHeight = startHeight;\n * this.endHeight = endHeight;\n * this.amount = amount;\n * this.maxRecords = maxRecords;\n * this.programName = programName;\n * this.recordName = recordName;\n * }\n * }\n *\n * const params = new CustomRecordSearch(0, 100, 5000, 2, \"credits.aleo\", \"credits\");\n * const records = await recordProvider.findRecord(true, [], params);\n */\n findRecords(unspent: boolean, nonces?: string[], searchParameters?: RecordSearchParams): Promise;\n}\n\n/**\n * A record provider implementation that uses the official Aleo API to find records for usage in program execution and\n * deployment, wallet functionality, and other use cases.\n */\nclass NetworkRecordProvider implements RecordProvider {\n account: Account;\n networkClient: AleoNetworkClient;\n constructor(account: Account, networkClient: AleoNetworkClient) {\n this.account = account;\n this.networkClient = networkClient;\n }\n\n /**\n * Set the account used to search for records\n *\n * @param {Account} account The account to use for searching for records\n */\n setAccount(account: Account) {\n this.account = account;\n }\n\n /**\n * Find a list of credit records with a given number of microcredits by via the official Aleo API\n *\n * @param {number[]} microcredits The number of microcredits to search for\n * @param {boolean} unspent Whether or not the record is unspent\n * @param {string[]} nonces Nonces of records already found so that they are not found again\n * @param {RecordSearchParams} searchParameters Additional parameters to search for\n * @returns {Promise} The record if found, otherwise an error\n *\n * @example\n * // Create a new NetworkRecordProvider\n * const networkClient = new AleoNetworkClient(\"https://api.explorer.aleo.org/v1\");\n * const keyProvider = new AleoKeyProvider();\n * const recordProvider = new NetworkRecordProvider(account, networkClient);\n *\n * // The record provider can be used to find records with a given number of microcredits\n * const record = await recordProvider.findCreditsRecord(5000, true, []);\n *\n * // When a record is found but not yet used, it's nonce should be added to the nonces parameter so that it is not\n * // found again if a subsequent search is performed\n * const records = await recordProvider.findCreditsRecords(5000, true, [record.nonce()]);\n *\n * // When the program manager is initialized with the record provider it will be used to find automatically find\n * // fee records and amount records for value transfers so that they do not need to be specified manually\n * const programManager = new ProgramManager(\"https://api.explorer.aleo.org/v1\", keyProvider, recordProvider);\n * programManager.transfer(1, \"aleo166q6ww6688cug7qxwe7nhctjpymydwzy2h7rscfmatqmfwnjvggqcad0at\", \"public\", 0.5);\n *\n * */\n async findCreditsRecords(microcredits: number[], unspent: boolean, nonces?: string[], searchParameters?: RecordSearchParams): Promise {\n let startHeight = 0;\n let endHeight = 0;\n\n if (searchParameters) {\n if (\"startHeight\" in searchParameters && typeof searchParameters[\"endHeight\"] == \"number\") {\n startHeight = searchParameters[\"startHeight\"];\n }\n\n if (\"endHeight\" in searchParameters && typeof searchParameters[\"endHeight\"] == \"number\") {\n endHeight = searchParameters[\"endHeight\"];\n }\n }\n\n // If the end height is not specified, use the current block height\n if (endHeight == 0) {\n const end = await this.networkClient.getLatestHeight();\n if (end instanceof Error) {\n throw logAndThrow(\"Unable to get current block height from the network\")\n }\n endHeight = end;\n }\n\n // If the start height is greater than the end height, throw an error\n if (startHeight >= endHeight) {\n throw logAndThrow(\"Start height must be less than end height\");\n }\n\n return await this.networkClient.findUnspentRecords(startHeight, endHeight, this.account.privateKey(), microcredits, undefined, nonces);\n }\n\n /**\n * Find a credit record with a given number of microcredits by via the official Aleo API\n *\n * @param {number} microcredits The number of microcredits to search for\n * @param {boolean} unspent Whether or not the record is unspent\n * @param {string[]} nonces Nonces of records already found so that they are not found again\n * @param {RecordSearchParams} searchParameters Additional parameters to search for\n * @returns {Promise} The record if found, otherwise an error\n *\n * @example\n * // Create a new NetworkRecordProvider\n * const networkClient = new AleoNetworkClient(\"https://api.explorer.aleo.org/v1\");\n * const keyProvider = new AleoKeyProvider();\n * const recordProvider = new NetworkRecordProvider(account, networkClient);\n *\n * // The record provider can be used to find records with a given number of microcredits\n * const record = await recordProvider.findCreditsRecord(5000, true, []);\n *\n * // When a record is found but not yet used, it's nonce should be added to the nonces parameter so that it is not\n * // found again if a subsequent search is performed\n * const records = await recordProvider.findCreditsRecords(5000, true, [record.nonce()]);\n *\n * // When the program manager is initialized with the record provider it will be used to find automatically find\n * // fee records and amount records for value transfers so that they do not need to be specified manually\n * const programManager = new ProgramManager(\"https://api.explorer.aleo.org/v1\", keyProvider, recordProvider);\n * programManager.transfer(1, \"aleo166q6ww6688cug7qxwe7nhctjpymydwzy2h7rscfmatqmfwnjvggqcad0at\", \"public\", 0.5);\n */\n async findCreditsRecord(microcredits: number, unspent: boolean, nonces?: string[], searchParameters?: RecordSearchParams): Promise {\n const records = await this.findCreditsRecords([microcredits], unspent, nonces, searchParameters);\n if (!(records instanceof Error) && records.length > 0) {\n return records[0];\n }\n console.error(\"Record not found with error:\", records);\n return new Error(\"Record not found\");\n }\n\n /**\n * Find an arbitrary record. WARNING: This function is not implemented yet and will throw an error.\n */\n async findRecord(unspent: boolean, nonces?: string[], searchParameters?: RecordSearchParams): Promise {\n throw new Error(\"Method not implemented.\");\n }\n\n /**\n * Find multiple arbitrary records. WARNING: This function is not implemented yet and will throw an error.\n */\n async findRecords(unspent: boolean, nonces?: string[], searchParameters?: RecordSearchParams): Promise {\n throw new Error(\"Method not implemented.\");\n }\n\n}\n\n/**\n * BlockHeightSearch is a RecordSearchParams implementation that allows for searching for records within a given\n * block height range.\n *\n * @example\n * // Create a new BlockHeightSearch\n * const params = new BlockHeightSearch(89995, 99995);\n *\n * // Create a new NetworkRecordProvider\n * const networkClient = new AleoNetworkClient(\"https://api.explorer.aleo.org/v1\");\n * const keyProvider = new AleoKeyProvider();\n * const recordProvider = new NetworkRecordProvider(account, networkClient);\n *\n * // The record provider can be used to find records with a given number of microcredits and the block height search\n * // can be used to find records within a given block height range\n * const record = await recordProvider.findCreditsRecord(5000, true, [], params);\n *\n */\nclass BlockHeightSearch implements RecordSearchParams {\n startHeight: number;\n endHeight: number;\n constructor(startHeight: number, endHeight: number) {\n this.startHeight = startHeight;\n this.endHeight = endHeight;\n }\n}\n\nexport { BlockHeightSearch, NetworkRecordProvider, RecordProvider, RecordSearchParams};\n","// Experimental example where SDK manages worker\n\nimport { wrap } from \"comlink\";\nimport { WorkerAPI } from './worker';\n\nlet singletonWorker: WorkerAPI | null = null;\n\nconst createAleoWorker = (): WorkerAPI => {\n if (!singletonWorker) {\n const worker = new Worker(new URL(\"worker.js\", import.meta.url), {\n type: \"module\",\n });\n singletonWorker = wrap(worker);\n }\n return singletonWorker;\n};\n\nexport { createAleoWorker };","import {\n Account,\n AleoKeyProvider,\n AleoNetworkClient,\n ExecutionResponse,\n FunctionKeyProvider,\n FunctionKeyPair,\n OfflineQuery,\n KeySearchParams,\n RecordPlaintext,\n RecordProvider,\n RecordSearchParams,\n PrivateKey,\n Program,\n ProgramImports,\n ProvingKey,\n VerifyingKey,\n Transaction,\n PRIVATE_TRANSFER_TYPES,\n VALID_TRANSFER_TYPES,\n logAndThrow,\n ProgramManagerBase as WasmProgramManager, verifyFunctionExecution, AleoKeyProviderParams, CREDITS_PROGRAM_KEYS,\n} from \"./index\";\nimport {Execution} from \"@provablehq/wasm/dist/crates/aleo_wasm\";\n\n/**\n * Represents the options for executing a transaction in the Aleo network.\n * This interface is used to specify the parameters required for building and submitting an execution transaction.\n *\n * @property {string} programName - The name of the program containing the function to be executed.\n * @property {string} functionName - The name of the function to execute within the program.\n * @property {number} fee - The fee to be paid for the transaction.\n * @property {boolean} privateFee - If true, uses a private record to pay the fee; otherwise, uses the account's public credit balance.\n * @property {string[]} inputs - The inputs to the function being executed.\n * @property {RecordSearchParams} [recordSearchParams] - Optional parameters for searching for a record to pay the execution transaction fee.\n * @property {KeySearchParams} [keySearchParams] - Optional parameters for finding the matching proving & verifying keys for the function.\n * @property {string | RecordPlaintext} [feeRecord] - Optional fee record to use for the transaction.\n * @property {ProvingKey} [provingKey] - Optional proving key to use for the transaction.\n * @property {VerifyingKey} [verifyingKey] - Optional verifying key to use for the transaction.\n * @property {PrivateKey} [privateKey] - Optional private key to use for the transaction.\n * @property {OfflineQuery} [offlineQuery] - Optional offline query if creating transactions in an offline environment.\n * @property {string | Program} [program] - Optional program source code to use for the transaction.\n * @property {ProgramImports} [imports] - Optional programs that the program being executed imports.\n */\ninterface ExecuteOptions {\n programName: string;\n functionName: string;\n fee: number;\n privateFee: boolean;\n inputs: string[];\n recordSearchParams?: RecordSearchParams;\n keySearchParams?: KeySearchParams;\n feeRecord?: string | RecordPlaintext;\n provingKey?: ProvingKey;\n verifyingKey?: VerifyingKey;\n privateKey?: PrivateKey;\n offlineQuery?: OfflineQuery;\n program?: string | Program;\n imports?: ProgramImports;\n}\n\n/**\n * The ProgramManager class is used to execute and deploy programs on the Aleo network and create value transfers.\n */\nclass ProgramManager {\n account: Account | undefined;\n keyProvider: FunctionKeyProvider;\n host: string;\n networkClient: AleoNetworkClient;\n recordProvider: RecordProvider | undefined;\n\n /** Create a new instance of the ProgramManager\n *\n * @param { string | undefined } host A host uri running the official Aleo API\n * @param { FunctionKeyProvider | undefined } keyProvider A key provider that implements {@link FunctionKeyProvider} interface\n * @param { RecordProvider | undefined } recordProvider A record provider that implements {@link RecordProvider} interface\n */\n constructor(host?: string | undefined, keyProvider?: FunctionKeyProvider | undefined, recordProvider?: RecordProvider | undefined) {\n this.host = host ? host : 'https://api.explorer.aleo.org/v1';\n this.networkClient = new AleoNetworkClient(this.host);\n \n this.keyProvider = keyProvider ? keyProvider : new AleoKeyProvider();\n this.recordProvider = recordProvider;\n }\n\n /**\n * Set the account to use for transaction submission to the Aleo network\n *\n * @param {Account} account Account to use for transaction submission\n */\n setAccount(account: Account) {\n this.account = account;\n }\n\n /**\n * Set the key provider that provides the proving and verifying keys for programs\n *\n * @param {FunctionKeyProvider} keyProvider\n */\n setKeyProvider(keyProvider: FunctionKeyProvider) {\n this.keyProvider = keyProvider;\n }\n\n /**\n * Set the host peer to use for transaction submission to the Aleo network\n *\n * @param host {string} Peer url to use for transaction submission\n */\n setHost(host: string) {\n this.host = host;\n this.networkClient.setHost(host);\n }\n\n /**\n * Set the record provider that provides records for transactions\n *\n * @param {RecordProvider} recordProvider\n */\n setRecordProvider(recordProvider: RecordProvider) {\n this.recordProvider = recordProvider;\n }\n\n /**\n * Deploy an Aleo program to the Aleo network\n *\n * @param {string} program Program source code\n * @param {number} fee Fee to pay for the transaction\n * @param {boolean} privateFee Use a private record to pay the fee. If false this will use the account's public credit balance\n * @param {RecordSearchParams | undefined} recordSearchParams Optional parameters for searching for a record to use\n * pay the deployment fee\n * @param {string | RecordPlaintext | undefined} feeRecord Optional Fee record to use for the transaction\n * @param {PrivateKey | undefined} privateKey Optional private key to use for the transaction\n * @returns {string | Error} The transaction id of the deployed program or a failure message from the network\n *\n * @example\n * // Create a new NetworkClient, KeyProvider, and RecordProvider\n * const networkClient = new AleoNetworkClient(\"https://api.explorer.aleo.org/v1\");\n * const keyProvider = new AleoKeyProvider();\n * const recordProvider = new NetworkRecordProvider(account, networkClient);\n *\n * // Initialize a program manager with the key provider to automatically fetch keys for deployments\n * const program = \"program hello_hello.aleo;\\n\\nfunction hello:\\n input r0 as u32.public;\\n input r1 as u32.private;\\n add r0 r1 into r2;\\n output r2 as u32.private;\\n\";\n * const programManager = new ProgramManager(\"https://api.explorer.aleo.org/v1\", keyProvider, recordProvider);\n *\n * // Define a fee in credits\n * const fee = 1.2;\n *\n * // Deploy the program\n * const tx_id = await programManager.deploy(program, fee);\n *\n * // Verify the transaction was successful\n * const transaction = await programManager.networkClient.getTransaction(tx_id);\n */\n async deploy(\n program: string,\n fee: number,\n privateFee: boolean,\n recordSearchParams?: RecordSearchParams,\n feeRecord?: string | RecordPlaintext,\n privateKey?: PrivateKey,\n ): Promise {\n // Ensure the program is valid and does not exist on the network\n try {\n const programObject = Program.fromString(program);\n let programSource;\n try {\n programSource = await this.networkClient.getProgram(programObject.id());\n } catch (e) {\n // Program does not exist on the network, deployment can proceed\n console.log(`Program ${programObject.id()} does not exist on the network, deploying...`);\n }\n if (typeof programSource == \"string\") {\n throw (`Program ${programObject.id()} already exists on the network, please rename your program`);\n }\n } catch (e) {\n throw logAndThrow(`Error validating program: ${e}`);\n }\n\n // Get the private key from the account if it is not provided in the parameters\n let deploymentPrivateKey = privateKey;\n if (typeof privateKey === \"undefined\" && typeof this.account !== \"undefined\") {\n deploymentPrivateKey = this.account.privateKey();\n }\n\n if (typeof deploymentPrivateKey === \"undefined\") {\n throw(\"No private key provided and no private key set in the ProgramManager\");\n }\n\n // Get the fee record from the account if it is not provided in the parameters\n try {\n feeRecord = privateFee ? await this.getCreditsRecord(fee, [], feeRecord, recordSearchParams) : undefined;\n } catch (e) {\n throw logAndThrow(`Error finding fee record. Record finder response: '${e}'. Please ensure you're connected to a valid Aleo network and a record with enough balance exists.`);\n }\n\n // Get the proving and verifying keys from the key provider\n let feeKeys;\n try {\n feeKeys = privateFee ? await this.keyProvider.feePrivateKeys() : await this.keyProvider.feePublicKeys();\n } catch (e) {\n throw logAndThrow(`Error finding fee keys. Key finder response: '${e}'. Please ensure your key provider is configured correctly.`);\n }\n const [feeProvingKey, feeVerifyingKey] = feeKeys;\n\n // Resolve the program imports if they exist\n let imports;\n try {\n imports = await this.networkClient.getProgramImports(program);\n } catch (e) {\n throw logAndThrow(`Error finding program imports. Network response: '${e}'. Please ensure you're connected to a valid Aleo network and the program is deployed to the network.`);\n }\n\n // Build a deployment transaction and submit it to the network\n const tx = await WasmProgramManager.buildDeploymentTransaction(deploymentPrivateKey, program, fee, feeRecord, this.host, imports, feeProvingKey, feeVerifyingKey);\n return await this.networkClient.submitTransaction(tx);\n }\n\n /**\n * Builds an execution transaction for submission to the Aleo network.\n *\n * @param {ExecuteOptions} options - The options for the execution transaction.\n * @returns {Promise} - A promise that resolves to the transaction or an error.\n *\n * @example\n * // Create a new NetworkClient, KeyProvider, and RecordProvider using official Aleo record, key, and network providers\n * const networkClient = new AleoNetworkClient(\"https://api.explorer.aleo.org/v1\");\n * const keyProvider = new AleoKeyProvider();\n * keyProvider.useCache = true;\n * const recordProvider = new NetworkRecordProvider(account, networkClient);\n *\n * // Initialize a program manager with the key provider to automatically fetch keys for executions\n * const programManager = new ProgramManager(\"https://api.explorer.aleo.org/v1\", keyProvider, recordProvider);\n *\n * // Build and execute the transaction\n * const transaction = await programManager.buildExecutionTransaction({\n * programName: \"hello_hello.aleo\",\n * functionName: \"hello_hello\",\n * fee: 0.020,\n * privateFee: false,\n * inputs: [\"5u32\", \"5u32\"],\n * keySearchParams: { \"cacheKey\": \"hello_hello:hello\" }\n * });\n * const result = await programManager.networkClient.submitTransaction(transaction);\n */\n async buildExecutionTransaction(options: ExecuteOptions): Promise {\n // Destructure the options object to access the parameters\n const {\n programName,\n functionName,\n fee,\n privateFee,\n inputs,\n recordSearchParams,\n keySearchParams,\n privateKey,\n offlineQuery\n } = options;\n\n let feeRecord = options.feeRecord;\n let provingKey = options.provingKey;\n let verifyingKey = options.verifyingKey;\n let program = options.program;\n let imports = options.imports;\n\n // Ensure the function exists on the network\n if (program === undefined) {\n try {\n program = (await this.networkClient.getProgram(programName));\n } catch (e) {\n throw logAndThrow(`Error finding ${programName}. Network response: '${e}'. Please ensure you're connected to a valid Aleo network the program is deployed to the network.`);\n }\n } else if (program instanceof Program) {\n program = program.toString();\n }\n\n // Get the private key from the account if it is not provided in the parameters\n let executionPrivateKey = privateKey;\n if (typeof privateKey === \"undefined\" && typeof this.account !== \"undefined\") {\n executionPrivateKey = this.account.privateKey();\n }\n\n if (typeof executionPrivateKey === \"undefined\") {\n throw(\"No private key provided and no private key set in the ProgramManager\");\n }\n\n // Get the fee record from the account if it is not provided in the parameters\n try {\n feeRecord = privateFee ? await this.getCreditsRecord(fee, [], feeRecord, recordSearchParams) : undefined;\n } catch (e) {\n throw logAndThrow(`Error finding fee record. Record finder response: '${e}'. Please ensure you're connected to a valid Aleo network and a record with enough balance exists.`);\n }\n\n // Get the fee proving and verifying keys from the key provider\n let feeKeys;\n try {\n feeKeys = privateFee ? await this.keyProvider.feePrivateKeys() : await this.keyProvider.feePublicKeys();\n } catch (e) {\n throw logAndThrow(`Error finding fee keys. Key finder response: '${e}'. Please ensure your key provider is configured correctly.`);\n }\n const [feeProvingKey, feeVerifyingKey] = feeKeys;\n\n // If the function proving and verifying keys are not provided, attempt to find them using the key provider\n if (!provingKey || !verifyingKey) {\n try {\n [provingKey, verifyingKey] = await this.keyProvider.functionKeys(keySearchParams);\n } catch (e) {\n console.log(`Function keys not found. Key finder response: '${e}'. The function keys will be synthesized`)\n }\n }\n\n // Resolve the program imports if they exist\n const numberOfImports = Program.fromString(program).getImports().length;\n if (numberOfImports > 0 && !imports) {\n try {\n imports = await this.networkClient.getProgramImports(programName);\n } catch (e) {\n throw logAndThrow(`Error finding program imports. Network response: '${e}'. Please ensure you're connected to a valid Aleo network and the program is deployed to the network.`);\n }\n }\n\n // Build an execution transaction and submit it to the network\n return await WasmProgramManager.buildExecutionTransaction(executionPrivateKey, program, functionName, inputs, fee, feeRecord, this.host, imports, provingKey, verifyingKey, feeProvingKey, feeVerifyingKey, offlineQuery);\n }\n\n /**\n * Builds an execution transaction for submission to the Aleo network.\n *\n * @param {ExecuteOptions} options - The options for the execution transaction.\n * @returns {Promise} - A promise that resolves to the transaction or an error.\n *\n * @example\n * // Create a new NetworkClient, KeyProvider, and RecordProvider using official Aleo record, key, and network providers\n * const networkClient = new AleoNetworkClient(\"https://api.explorer.aleo.org/v1\");\n * const keyProvider = new AleoKeyProvider();\n * keyProvider.useCache = true;\n * const recordProvider = new NetworkRecordProvider(account, networkClient);\n *\n * // Initialize a program manager with the key provider to automatically fetch keys for executions\n * const programManager = new ProgramManager(\"https://api.explorer.aleo.org/v1\", keyProvider, recordProvider);\n *\n * // Build and execute the transaction\n * const transaction = await programManager.execute({\n * programName: \"hello_hello.aleo\",\n * functionName: \"hello_hello\",\n * fee: 0.020,\n * privateFee: false,\n * inputs: [\"5u32\", \"5u32\"],\n * keySearchParams: { \"cacheKey\": \"hello_hello:hello\" }\n * });\n * const result = await programManager.networkClient.submitTransaction(transaction);\n */\n async execute(options: ExecuteOptions): Promise {\n const tx = await this.buildExecutionTransaction(options);\n return await this.networkClient.submitTransaction(tx);\n }\n\n /**\n * Run an Aleo program in offline mode\n *\n * @param {string} program Program source code containing the function to be executed\n * @param {string} function_name Function name to execute\n * @param {string[]} inputs Inputs to the function\n * @param {number} proveExecution Whether to prove the execution of the function and return an execution transcript\n * that contains the proof.\n * @param {string[] | undefined} imports Optional imports to the program\n * @param {KeySearchParams | undefined} keySearchParams Optional parameters for finding the matching proving &\n * verifying keys for the function\n * @param {ProvingKey | undefined} provingKey Optional proving key to use for the transaction\n * @param {VerifyingKey | undefined} verifyingKey Optional verifying key to use for the transaction\n * @param {PrivateKey | undefined} privateKey Optional private key to use for the transaction\n * @param {OfflineQuery | undefined} offlineQuery Optional offline query if creating transactions in an offline environment\n * @returns {Promise}\n *\n * @example\n * import { Account, Program } from '@provablehq/sdk';\n *\n * /// Create the source for the \"helloworld\" program\n * const program = \"program helloworld.aleo;\\n\\nfunction hello:\\n input r0 as u32.public;\\n input r1 as u32.private;\\n add r0 r1 into r2;\\n output r2 as u32.private;\\n\";\n * const programManager = new ProgramManager();\n *\n * /// Create a temporary account for the execution of the program\n * const account = new Account();\n * programManager.setAccount(account);\n *\n * /// Get the response and ensure that the program executed correctly\n * const executionResponse = await programManager.run(program, \"hello\", [\"5u32\", \"5u32\"]);\n * const result = executionResponse.getOutputs();\n * assert(result === [\"10u32\"]);\n */\n async run(\n program: string,\n function_name: string,\n inputs: string[],\n proveExecution: boolean,\n imports?: ProgramImports,\n keySearchParams?: KeySearchParams,\n provingKey?: ProvingKey,\n verifyingKey?: VerifyingKey,\n privateKey?: PrivateKey,\n offlineQuery?: OfflineQuery,\n ): Promise {\n // Get the private key from the account if it is not provided in the parameters\n let executionPrivateKey = privateKey;\n if (typeof privateKey === \"undefined\" && typeof this.account !== \"undefined\") {\n executionPrivateKey = this.account.privateKey();\n }\n\n if (typeof executionPrivateKey === \"undefined\") {\n throw(\"No private key provided and no private key set in the ProgramManager\");\n }\n\n // If the function proving and verifying keys are not provided, attempt to find them using the key provider\n if (!provingKey || !verifyingKey) {\n try {\n [provingKey, verifyingKey] = await this.keyProvider.functionKeys(keySearchParams);\n } catch (e) {\n console.log(`Function keys not found. Key finder response: '${e}'. The function keys will be synthesized`)\n }\n }\n\n // Run the program offline and return the result\n console.log(\"Running program offline\")\n console.log(\"Proving key: \", provingKey);\n console.log(\"Verifying key: \", verifyingKey);\n return WasmProgramManager.executeFunctionOffline(executionPrivateKey, program, function_name, inputs, proveExecution, false, imports, provingKey, verifyingKey, this.host, offlineQuery);\n }\n\n /**\n * Join two credits records into a single credits record\n *\n * @param {RecordPlaintext | string} recordOne First credits record to join\n * @param {RecordPlaintext | string} recordTwo Second credits record to join\n * @param {number} fee Fee in credits pay for the join transaction\n * @param {boolean} privateFee Use a private record to pay the fee. If false this will use the account's public credit balance\n * @param {RecordSearchParams | undefined} recordSearchParams Optional parameters for finding the fee record to use\n * to pay the fee for the join transaction\n * @param {RecordPlaintext | string | undefined} feeRecord Fee record to use for the join transaction\n * @param {PrivateKey | undefined} privateKey Private key to use for the join transaction\n * @param {OfflineQuery | undefined} offlineQuery Optional offline query if creating transactions in an offline environment\n * @returns {Promise}\n */\n async join(\n recordOne: RecordPlaintext | string,\n recordTwo: RecordPlaintext | string,\n fee: number,\n privateFee: boolean,\n recordSearchParams?: RecordSearchParams | undefined,\n feeRecord?: RecordPlaintext | string | undefined,\n privateKey?: PrivateKey,\n offlineQuery?: OfflineQuery,\n ): Promise {\n // Get the private key from the account if it is not provided in the parameters\n let executionPrivateKey = privateKey;\n if (typeof privateKey === \"undefined\" && typeof this.account !== \"undefined\") {\n executionPrivateKey = this.account.privateKey();\n }\n\n if (typeof executionPrivateKey === \"undefined\") {\n throw(\"No private key provided and no private key set in the ProgramManager\");\n }\n\n // Get the proving and verifying keys from the key provider\n let feeKeys;\n let joinKeys\n try {\n feeKeys = privateFee ? await this.keyProvider.feePrivateKeys() : await this.keyProvider.feePublicKeys();\n joinKeys = await this.keyProvider.joinKeys();\n } catch (e) {\n throw logAndThrow(`Error finding fee keys. Key finder response: '${e}'. Please ensure your key provider is configured correctly.`);\n }\n const [feeProvingKey, feeVerifyingKey] = feeKeys;\n const [joinProvingKey, joinVerifyingKey] = joinKeys;\n\n // Get the fee record from the account if it is not provided in the parameters\n try {\n feeRecord = privateFee ? await this.getCreditsRecord(fee, [], feeRecord, recordSearchParams) : undefined;\n } catch (e) {\n throw logAndThrow(`Error finding fee record. Record finder response: '${e}'. Please ensure you're connected to a valid Aleo network and a record with enough balance exists.`);\n }\n\n // Validate the records provided are valid plaintext records\n try {\n recordOne = recordOne instanceof RecordPlaintext ? recordOne : RecordPlaintext.fromString(recordOne);\n recordTwo = recordTwo instanceof RecordPlaintext ? recordTwo : RecordPlaintext.fromString(recordTwo);\n } catch (e) {\n throw logAndThrow('Records provided are not valid. Please ensure they are valid plaintext records.')\n }\n\n // Build an execution transaction and submit it to the network\n const tx = await WasmProgramManager.buildJoinTransaction(executionPrivateKey, recordOne, recordTwo, fee, feeRecord, this.host, joinProvingKey, joinVerifyingKey, feeProvingKey, feeVerifyingKey, offlineQuery);\n return await this.networkClient.submitTransaction(tx);\n }\n\n /**\n * Split credits into two new credits records\n *\n * @param {number} splitAmount Amount in microcredits to split from the original credits record\n * @param {RecordPlaintext | string} amountRecord Amount record to use for the split transaction\n * @param {PrivateKey | undefined} privateKey Optional private key to use for the split transaction\n * @param {OfflineQuery | undefined} offlineQuery Optional offline query if creating transactions in an offline environment\n * @returns {Promise}\n *\n * @example\n * // Create a new NetworkClient, KeyProvider, and RecordProvider\n * const networkClient = new AleoNetworkClient(\"https://api.explorer.aleo.org/v1\");\n * const keyProvider = new AleoKeyProvider();\n * const recordProvider = new NetworkRecordProvider(account, networkClient);\n *\n * // Initialize a program manager with the key provider to automatically fetch keys for executions\n * const programName = \"hello_hello.aleo\";\n * const programManager = new ProgramManager(\"https://api.explorer.aleo.org/v1\", keyProvider, recordProvider);\n * const record = \"{ owner: aleo184vuwr5u7u0ha5f5k44067dd2uaqewxx6pe5ltha5pv99wvhfqxqv339h4.private, microcredits: 45000000u64.private, _nonce: 4106205762862305308495708971985748592380064201230396559307556388725936304984group.public}\"\n * const tx_id = await programManager.split(25000000, record);\n * const transaction = await programManager.networkClient.getTransaction(tx_id);\n */\n async split(splitAmount: number, amountRecord: RecordPlaintext | string, privateKey?: PrivateKey, offlineQuery?: OfflineQuery): Promise {\n // Get the private key from the account if it is not provided in the parameters\n let executionPrivateKey = privateKey;\n if (typeof executionPrivateKey === \"undefined\" && typeof this.account !== \"undefined\") {\n executionPrivateKey = this.account.privateKey();\n }\n\n if (typeof executionPrivateKey === \"undefined\") {\n throw(\"No private key provided and no private key set in the ProgramManager\");\n }\n\n // Get the split keys from the key provider\n let splitKeys;\n try {\n splitKeys = await this.keyProvider.splitKeys();\n } catch (e) {\n throw logAndThrow(`Error finding fee keys. Key finder response: '${e}'. Please ensure your key provider is configured correctly.`);\n }\n const [splitProvingKey, splitVerifyingKey] = splitKeys;\n\n // Validate the record to be split\n try {\n amountRecord = amountRecord instanceof RecordPlaintext ? amountRecord : RecordPlaintext.fromString(amountRecord);\n } catch (e) {\n throw logAndThrow(\"Record provided is not valid. Please ensure it is a valid plaintext record.\");\n }\n\n // Build an execution transaction and submit it to the network\n const tx = await WasmProgramManager.buildSplitTransaction(executionPrivateKey, splitAmount, amountRecord, this.host, splitProvingKey, splitVerifyingKey, offlineQuery);\n return await this.networkClient.submitTransaction(tx);\n }\n\n /**\n * Pre-synthesize proving and verifying keys for a program\n *\n * @param program {string} The program source code to synthesize keys for\n * @param function_id {string} The function id to synthesize keys for\n * @param inputs {Array} Sample inputs to the function\n * @param privateKey {PrivateKey | undefined} Optional private key to use for the key synthesis\n *\n * @returns {Promise}\n */\n async synthesizeKeys(\n program: string,\n function_id: string,\n inputs: Array,\n privateKey?: PrivateKey,\n ): Promise {\n // Resolve the program imports if they exist\n let imports;\n\n let executionPrivateKey = privateKey;\n if (typeof executionPrivateKey === \"undefined\") {\n if (typeof this.account !== \"undefined\") {\n executionPrivateKey = this.account.privateKey();\n } else {\n executionPrivateKey = new PrivateKey();\n }\n }\n\n // Attempt to run an offline execution of the program and extract the proving and verifying keys\n try {\n imports = await this.networkClient.getProgramImports(program);\n const keyPair = await WasmProgramManager.synthesizeKeyPair(\n executionPrivateKey,\n program,\n function_id,\n inputs,\n imports\n );\n return [keyPair.provingKey(), keyPair.verifyingKey()];\n } catch (e) {\n throw logAndThrow(`Could not synthesize keys - error ${e}. Please ensure the program is valid and the inputs are correct.`);\n }\n }\n\n /**\n * Build a transaction to transfer credits to another account for later submission to the Aleo network\n *\n * @param {number} amount The amount of credits to transfer\n * @param {string} recipient The recipient of the transfer\n * @param {string} transferType The type of transfer to perform - options: 'private', 'privateToPublic', 'public', 'publicToPrivate'\n * @param {number} fee The fee to pay for the transfer\n * @param {boolean} privateFee Use a private record to pay the fee. If false this will use the account's public credit balance\n * @param {RecordSearchParams | undefined} recordSearchParams Optional parameters for finding the amount and fee\n * records for the transfer transaction\n * @param {RecordPlaintext | string} amountRecord Optional amount record to use for the transfer\n * @param {RecordPlaintext | string} feeRecord Optional fee record to use for the transfer\n * @param {PrivateKey | undefined} privateKey Optional private key to use for the transfer transaction\n * @param {OfflineQuery | undefined} offlineQuery Optional offline query if creating transactions in an offline environment\n * @returns {Promise} The transaction id of the transfer transaction\n *\n * @example\n * // Create a new NetworkClient, KeyProvider, and RecordProvider\n * const networkClient = new AleoNetworkClient(\"https://api.explorer.aleo.org/v1\");\n * const keyProvider = new AleoKeyProvider();\n * const recordProvider = new NetworkRecordProvider(account, networkClient);\n *\n * // Initialize a program manager with the key provider to automatically fetch keys for executions\n * const programName = \"hello_hello.aleo\";\n * const programManager = new ProgramManager(\"https://api.explorer.aleo.org/v1\", keyProvider, recordProvider);\n * await programManager.initialize();\n * const tx_id = await programManager.transfer(1, \"aleo1rhgdu77hgyqd3xjj8ucu3jj9r2krwz6mnzyd80gncr5fxcwlh5rsvzp9px\", \"private\", 0.2)\n * const transaction = await programManager.networkClient.getTransaction(tx_id);\n */\n async buildTransferTransaction(\n amount: number,\n recipient: string,\n transferType: string,\n fee: number,\n privateFee: boolean,\n recordSearchParams?: RecordSearchParams,\n amountRecord?: RecordPlaintext | string,\n feeRecord?: RecordPlaintext | string,\n privateKey?: PrivateKey,\n offlineQuery?: OfflineQuery\n ): Promise {\n // Validate the transfer type\n transferType = validateTransferType(transferType);\n\n // Get the private key from the account if it is not provided in the parameters\n let executionPrivateKey = privateKey;\n if (typeof executionPrivateKey === \"undefined\" && typeof this.account !== \"undefined\") {\n executionPrivateKey = this.account.privateKey();\n }\n\n if (typeof executionPrivateKey === \"undefined\") {\n throw(\"No private key provided and no private key set in the ProgramManager\");\n }\n\n // Get the proving and verifying keys from the key provider\n let feeKeys;\n let transferKeys\n try {\n feeKeys = privateFee ? await this.keyProvider.feePrivateKeys() : await this.keyProvider.feePublicKeys();\n transferKeys = await this.keyProvider.transferKeys(transferType);\n } catch (e) {\n throw logAndThrow(`Error finding fee keys. Key finder response: '${e}'. Please ensure your key provider is configured correctly.`);\n }\n const [feeProvingKey, feeVerifyingKey] = feeKeys;\n const [transferProvingKey, transferVerifyingKey] = transferKeys;\n\n // Get the amount and fee record from the account if it is not provided in the parameters\n try {\n // Track the nonces of the records found so no duplicate records are used\n const nonces: string[] = [];\n if (requiresAmountRecord(transferType)) {\n // If the transfer type is private and requires an amount record, get it from the record provider\n amountRecord = await this.getCreditsRecord(fee, [], amountRecord, recordSearchParams);\n nonces.push(amountRecord.nonce());\n } else {\n amountRecord = undefined;\n }\n feeRecord = privateFee ? await this.getCreditsRecord(fee, nonces, feeRecord, recordSearchParams) : undefined;\n } catch (e) {\n throw logAndThrow(`Error finding fee record. Record finder response: '${e}'. Please ensure you're connected to a valid Aleo network and a record with enough balance exists.`);\n }\n\n // Build an execution transaction and submit it to the network\n return await WasmProgramManager.buildTransferTransaction(executionPrivateKey, amount, recipient, transferType, amountRecord, fee, feeRecord, this.host, transferProvingKey, transferVerifyingKey, feeProvingKey, feeVerifyingKey, offlineQuery);\n }\n\n /**\n * Build a transfer_public transaction to transfer credits to another account for later submission to the Aleo network\n *\n * @param {number} amount The amount of credits to transfer\n * @param {string} recipient The recipient of the transfer\n * @param {string} transferType The type of transfer to perform - options: 'private', 'privateToPublic', 'public', 'publicToPrivate'\n * @param {number} fee The fee to pay for the transfer\n * @param {boolean} privateFee Use a private record to pay the fee. If false this will use the account's public credit balance\n * @param {RecordSearchParams | undefined} recordSearchParams Optional parameters for finding the amount and fee\n * records for the transfer transaction\n * @param {RecordPlaintext | string} amountRecord Optional amount record to use for the transfer\n * @param {RecordPlaintext | string} feeRecord Optional fee record to use for the transfer\n * @param {PrivateKey | undefined} privateKey Optional private key to use for the transfer transaction\n * @param {OfflineQuery | undefined} offlineQuery Optional offline query if creating transactions in an offline environment\n * @returns {Promise} The transaction id of the transfer transaction\n */\n async buildTransferPublicTransaction(\n amount: number,\n recipient: string,\n fee: number,\n privateKey?: PrivateKey,\n offlineQuery?: OfflineQuery\n ): Promise {\n return this.buildTransferTransaction(amount, recipient, \"public\", fee, false, undefined, undefined, undefined, privateKey, offlineQuery);\n }\n\n /**\n * Build a transfer_public_as_signer transaction to transfer credits to another account for later submission to the Aleo network\n *\n * @param {number} amount The amount of credits to transfer\n * @param {string} recipient The recipient of the transfer\n * @param {string} transferType The type of transfer to perform - options: 'private', 'privateToPublic', 'public', 'publicToPrivate'\n * @param {number} fee The fee to pay for the transfer\n * @param {boolean} privateFee Use a private record to pay the fee. If false this will use the account's public credit balance\n * @param {RecordSearchParams | undefined} recordSearchParams Optional parameters for finding the amount and fee\n * records for the transfer transaction\n * @param {RecordPlaintext | string} amountRecord Optional amount record to use for the transfer\n * @param {RecordPlaintext | string} feeRecord Optional fee record to use for the transfer\n * @param {PrivateKey | undefined} privateKey Optional private key to use for the transfer transaction\n * @param {OfflineQuery | undefined} offlineQuery Optional offline query if creating transactions in an offline environment\n * @returns {Promise} The transaction id of the transfer transaction\n */\n async buildTransferPublicAsSignerTransaction(\n amount: number,\n recipient: string,\n fee: number,\n privateKey?: PrivateKey,\n offlineQuery?: OfflineQuery\n ): Promise {\n return this.buildTransferTransaction(amount, recipient, \"public\", fee, false, undefined, undefined, undefined, privateKey, offlineQuery);\n }\n\n /**\n * Transfer credits to another account\n *\n * @param {number} amount The amount of credits to transfer\n * @param {string} recipient The recipient of the transfer\n * @param {string} transferType The type of transfer to perform - options: 'private', 'privateToPublic', 'public', 'publicToPrivate'\n * @param {number} fee The fee to pay for the transfer\n * @param {boolean} privateFee Use a private record to pay the fee. If false this will use the account's public credit balance\n * @param {RecordSearchParams | undefined} recordSearchParams Optional parameters for finding the amount and fee\n * records for the transfer transaction\n * @param {RecordPlaintext | string} amountRecord Optional amount record to use for the transfer\n * @param {RecordPlaintext | string} feeRecord Optional fee record to use for the transfer\n * @param {PrivateKey | undefined} privateKey Optional private key to use for the transfer transaction\n * @param {OfflineQuery | undefined} offlineQuery Optional offline query if creating transactions in an offline environment\n * @returns {Promise} The transaction id of the transfer transaction\n *\n * @example\n * // Create a new NetworkClient, KeyProvider, and RecordProvider\n * const networkClient = new AleoNetworkClient(\"https://api.explorer.aleo.org/v1\");\n * const keyProvider = new AleoKeyProvider();\n * const recordProvider = new NetworkRecordProvider(account, networkClient);\n *\n * // Initialize a program manager with the key provider to automatically fetch keys for executions\n * const programManager = new ProgramManager(\"https://api.explorer.aleo.org/v1\", keyProvider, recordProvider);\n * await programManager.initialize();\n * const tx_id = await programManager.transfer(1, \"aleo1rhgdu77hgyqd3xjj8ucu3jj9r2krwz6mnzyd80gncr5fxcwlh5rsvzp9px\", \"private\", 0.2)\n * const transaction = await programManager.networkClient.getTransaction(tx_id);\n */\n async transfer(\n amount: number,\n recipient: string,\n transferType: string,\n fee: number,\n privateFee: boolean,\n recordSearchParams?: RecordSearchParams,\n amountRecord?: RecordPlaintext | string,\n feeRecord?: RecordPlaintext | string,\n privateKey?: PrivateKey,\n offlineQuery?: OfflineQuery\n ): Promise {\n const tx = await this.buildTransferTransaction(amount, recipient, transferType, fee, privateFee, recordSearchParams, amountRecord, feeRecord, privateKey, offlineQuery);\n return await this.networkClient.submitTransaction(tx);\n }\n\n /**\n * Build transaction to bond credits to a validator for later submission to the Aleo Network\n *\n * @example\n * // Create a keyProvider to handle key management\n * const keyProvider = new AleoKeyProvider();\n * keyProvider.useCache = true;\n *\n * // Create a new ProgramManager with the key that will be used to bond credits\n * const programManager = new ProgramManager(\"https://api.explorer.aleo.org/v1\", keyProvider, undefined);\n * programManager.setAccount(new Account(\"YourPrivateKey\"));\n *\n * // Create the bonding transaction object for later submission\n * const tx = await programManager.buildBondPublicTransaction(\"aleo1jx8s4dvjepculny4wfrzwyhs3tlyv65r58ns3g6q2gm2esh7ps8sqy9s5j\", \"aleo1rhgdu77hgyqd3xjj8ucu3jj9r2krwz6mnzyd80gncr5fxcwlh5rsvzp9px\", \"aleo1feya8sjy9k2zflvl2dx39pdsq5tju28elnp2ektnn588uu9ghv8s84msv9\", 2000000);\n * console.log(tx);\n *\n * // The transaction can be later submitted to the network using the network client.\n * const result = await programManager.networkClient.submitTransaction(tx);\n *\n * @returns string\n * @param {string} staker_address Address of the staker who is bonding the credits\n * @param {string} validator_address Address of the validator to bond to, if this address is the same as the staker (i.e. the\n * executor of this function), it will attempt to bond the credits as a validator. Bonding as a validator currently\n * requires a minimum of 10,000,000 credits to bond (subject to change). If the address is specified is an existing\n * validator and is different from the address of the executor of this function, it will bond the credits to that\n * validator's staking committee as a delegator. A minimum of 10 credits is required to bond as a delegator.\n * @param {string} withdrawal_address Address to withdraw the staked credits to when unbond_public is called.\n * @param {number} amount The amount of credits to bond\n * @param {Partial} options - Override default execution options.\n */\n async buildBondPublicTransaction(staker_address: string, validator_address: string, withdrawal_address: string, amount: number, options: Partial = {}) {\n const scaledAmount = Math.trunc(amount * 1000000);\n\n const {\n programName = \"credits.aleo\",\n functionName = \"bond_public\",\n fee = options.fee || 0.86,\n privateFee = false,\n inputs = [staker_address, validator_address, withdrawal_address, `${scaledAmount.toString()}u64`],\n keySearchParams = new AleoKeyProviderParams({\n proverUri: CREDITS_PROGRAM_KEYS.bond_public.prover,\n verifierUri: CREDITS_PROGRAM_KEYS.bond_public.verifier,\n cacheKey: \"credits.aleo/bond_public\"\n }),\n program = this.creditsProgram(),\n ...additionalOptions\n } = options;\n\n const executeOptions: ExecuteOptions = {\n programName,\n functionName,\n fee,\n privateFee,\n inputs,\n keySearchParams,\n ...additionalOptions\n };\n\n return await this.buildExecutionTransaction(executeOptions);\n }\n\n /**\n * Bond credits to validator.\n *\n * @example\n * // Create a keyProvider to handle key management\n * const keyProvider = new AleoKeyProvider();\n * keyProvider.useCache = true;\n *\n * // Create a new ProgramManager with the key that will be used to bond credits\n * const programManager = new ProgramManager(\"https://api.explorer.aleo.org/v1\", keyProvider, undefined);\n * programManager.setAccount(new Account(\"YourPrivateKey\"));\n *\n * // Create the bonding transaction\n * const tx_id = await programManager.bondPublic(\"aleo1jx8s4dvjepculny4wfrzwyhs3tlyv65r58ns3g6q2gm2esh7ps8sqy9s5j\", \"aleo1rhgdu77hgyqd3xjj8ucu3jj9r2krwz6mnzyd80gncr5fxcwlh5rsvzp9px\", \"aleo1feya8sjy9k2zflvl2dx39pdsq5tju28elnp2ektnn588uu9ghv8s84msv9\", 2000000);\n *\n * @returns string\n * @param {string} staker_address Address of the staker who is bonding the credits\n * @param {string} validator_address Address of the validator to bond to, if this address is the same as the signer (i.e. the\n * executor of this function), it will attempt to bond the credits as a validator. Bonding as a validator currently\n * requires a minimum of 1,000,000 credits to bond (subject to change). If the address is specified is an existing\n * validator and is different from the address of the executor of this function, it will bond the credits to that\n * validator's staking committee as a delegator. A minimum of 10 credits is required to bond as a delegator.\n * @param {string} withdrawal_address Address to withdraw the staked credits to when unbond_public is called.\n * @param {number} amount The amount of credits to bond\n * @param {Options} options Options for the execution\n */\n async bondPublic(staker_address: string, validator_address: string, withdrawal_address:string, amount: number, options: Partial = {}) {\n const tx = await this.buildBondPublicTransaction(staker_address, validator_address, withdrawal_address, amount, options);\n return await this.networkClient.submitTransaction(tx);\n }\n\n /**\n * Build a bond_validator transaction for later submission to the Aleo Network.\n *\n * @example\n * // Create a keyProvider to handle key management\n * const keyProvider = new AleoKeyProvider();\n * keyProvider.useCache = true;\n *\n * // Create a new ProgramManager with the key that will be used to bond credits\n * const programManager = new ProgramManager(\"https://api.explorer.aleo.org/v1\", keyProvider, undefined);\n * programManager.setAccount(new Account(\"YourPrivateKey\"));\n *\n * // Create the bond validator transaction object for later use.\n * const tx = await programManager.buildBondValidatorTransaction(\"aleo1rhgdu77hgyqd3xjj8ucu3jj9r2krwz6mnzyd80gncr5fxcwlh5rsvzp9px\", \"aleo1feya8sjy9k2zflvl2dx39pdsq5tju28elnp2ektnn588uu9ghv8s84msv9\", 2000000);\n * console.log(tx);\n *\n * // The transaction can later be submitted to the network using the network client.\n * const tx_id = await programManager.networkClient.submitTransaction(tx);\n *\n * @returns string\n * @param {string} validator_address Address of the validator to bond to, if this address is the same as the staker (i.e. the\n * executor of this function), it will attempt to bond the credits as a validator. Bonding as a validator currently\n * requires a minimum of 10,000,000 credits to bond (subject to change). If the address is specified is an existing\n * validator and is different from the address of the executor of this function, it will bond the credits to that\n * validator's staking committee as a delegator. A minimum of 10 credits is required to bond as a delegator.\n * @param {string} withdrawal_address Address to withdraw the staked credits to when unbond_public is called.\n * @param {number} amount The amount of credits to bond\n * @param {number} commission The commission rate for the validator (must be between 0 and 100 - an error will be thrown if it is not)\n * @param {Partial} options - Override default execution options.\n */\n async buildBondValidatorTransaction(validator_address: string, withdrawal_address: string, amount: number, commission: number, options: Partial = {}) {\n const scaledAmount = Math.trunc(amount * 1000000);\n\n const adjustedCommission = Math.trunc(commission)\n\n const {\n programName = \"credits.aleo\",\n functionName = \"bond_validator\",\n fee = options.fee || 0.86,\n privateFee = false,\n inputs = [validator_address, withdrawal_address, `${scaledAmount.toString()}u64`, `${adjustedCommission.toString()}u8`],\n keySearchParams = new AleoKeyProviderParams({\n proverUri: CREDITS_PROGRAM_KEYS.bond_validator.prover,\n verifierUri: CREDITS_PROGRAM_KEYS.bond_validator.verifier,\n cacheKey: \"credits.aleo/bond_validator\"\n }),\n program = this.creditsProgram(),\n ...additionalOptions\n } = options;\n\n const executeOptions: ExecuteOptions = {\n programName,\n functionName,\n fee,\n privateFee,\n inputs,\n keySearchParams,\n ...additionalOptions\n };\n\n return await this.buildExecutionTransaction(executeOptions);\n }\n\n /**\n * Build transaction to bond a validator.\n *\n * @example\n * // Create a keyProvider to handle key management\n * const keyProvider = new AleoKeyProvider();\n * keyProvider.useCache = true;\n *\n * // Create a new ProgramManager with the key that will be used to bond credits\n * const programManager = new ProgramManager(\"https://api.explorer.aleo.org/v1\", keyProvider, undefined);\n * programManager.setAccount(new Account(\"YourPrivateKey\"));\n *\n * // Create the bonding transaction\n * const tx_id = await programManager.bondValidator(\"aleo1rhgdu77hgyqd3xjj8ucu3jj9r2krwz6mnzyd80gncr5fxcwlh5rsvzp9px\", \"aleo1feya8sjy9k2zflvl2dx39pdsq5tju28elnp2ektnn588uu9ghv8s84msv9\", 2000000);\n *\n * @returns string\n * @param {string} validator_address Address of the validator to bond to, if this address is the same as the staker (i.e. the\n * executor of this function), it will attempt to bond the credits as a validator. Bonding as a validator currently\n * requires a minimum of 10,000,000 credits to bond (subject to change). If the address is specified is an existing\n * validator and is different from the address of the executor of this function, it will bond the credits to that\n * validator's staking committee as a delegator. A minimum of 10 credits is required to bond as a delegator.\n * @param {string} withdrawal_address Address to withdraw the staked credits to when unbond_public is called.\n * @param {number} amount The amount of credits to bond\n * @param {number} commission The commission rate for the validator (must be between 0 and 100 - an error will be thrown if it is not)\n * @param {Partial} options - Override default execution options.\n */\n async bondValidator(validator_address: string, withdrawal_address: string, amount: number, commission: number, options: Partial = {}) {\n const tx = await this.buildBondValidatorTransaction(validator_address, withdrawal_address, amount, commission, options);\n return await this.networkClient.submitTransaction(tx);\n }\n\n /**\n * Build a transaction to unbond public credits from a validator in the Aleo network.\n *\n * @param {string} staker_address - The address of the staker who is unbonding the credits.\n * @param {number} amount - The amount of credits to unbond (scaled by 1,000,000).\n * @param {Partial} options - Override default execution options.\n * @returns {Promise} - A promise that resolves to the transaction or an error message.\n *\n * @example\n * // Create a keyProvider to handle key management.\n * const keyProvider = new AleoKeyProvider();\n * keyProvider.useCache = true;\n *\n * // Create a new ProgramManager with the key that will be used to unbond credits.\n * const programManager = new ProgramManager(\"https://api.explorer.aleo.org/v1\", keyProvider, undefined);\n * const tx = await programManager.buildUnbondPublicTransaction(\"aleo1jx8s4dvjepculny4wfrzwyhs3tlyv65r58ns3g6q2gm2esh7ps8sqy9s5j\", 2000000);\n * console.log(tx);\n *\n * // The transaction can be submitted later to the network using the network client.\n * programManager.networkClient.submitTransaction(tx);\n */\n async buildUnbondPublicTransaction(staker_address: string, amount: number, options: Partial = {}): Promise {\n const scaledAmount = Math.trunc(amount * 1000000);\n\n const {\n programName = \"credits.aleo\",\n functionName = \"unbond_public\",\n fee = options.fee || 1.3,\n privateFee = false,\n inputs = [staker_address, `${scaledAmount.toString()}u64`],\n keySearchParams = new AleoKeyProviderParams({\n proverUri: CREDITS_PROGRAM_KEYS.unbond_public.prover,\n verifierUri: CREDITS_PROGRAM_KEYS.unbond_public.verifier,\n cacheKey: \"credits.aleo/unbond_public\"\n }),\n program = this.creditsProgram(),\n ...additionalOptions\n } = options;\n\n const executeOptions: ExecuteOptions = {\n programName,\n functionName,\n fee,\n privateFee,\n inputs,\n keySearchParams,\n ...additionalOptions\n };\n\n return this.buildExecutionTransaction(executeOptions);\n }\n\n /**\n * Unbond a specified amount of staked credits.\n *\n * @example\n * // Create a keyProvider to handle key management\n * const keyProvider = new AleoKeyProvider();\n * keyProvider.useCache = true;\n *\n * // Create a new ProgramManager with the key that will be used to bond credits\n * const programManager = new ProgramManager(\"https://api.explorer.aleo.org/v1\", keyProvider, undefined);\n * programManager.setAccount(new Account(\"YourPrivateKey\"));\n *\n * // Create the bonding transaction and send it to the network\n * const tx_id = await programManager.unbondPublic(\"aleo1jx8s4dvjepculny4wfrzwyhs3tlyv65r58ns3g6q2gm2esh7ps8sqy9s5j\", 10);\n *\n * @returns string\n * @param {string} staker_address Address of the staker who is unbonding the credits\n * @param {number} amount Amount of credits to unbond. If the address of the executor of this function is an\n * existing validator, it will subtract this amount of credits from the validator's staked credits. If there are\n * less than 1,000,000 credits staked pool after the unbond, the validator will be removed from the validator set.\n * If the address of the executor of this function is not a validator and has credits bonded as a delegator, it will\n * subtract this amount of credits from the delegator's staked credits. If there are less than 10 credits bonded\n * after the unbond operation, the delegator will be removed from the validator's staking pool.\n * @param {ExecuteOptions} options Options for the execution\n */\n async unbondPublic(staker_address: string, amount: number, options: Partial = {}): Promise {\n const tx = await this.buildUnbondPublicTransaction(staker_address, amount, options);\n return await this.networkClient.submitTransaction(tx);\n }\n\n /**\n * Build a transaction to claim unbonded public credits in the Aleo network.\n *\n * @param {string} staker_address - The address of the staker who is claiming the credits.\n * @param {Partial} options - Override default execution options.\n * @returns {Promise} - A promise that resolves to the transaction or an error message.\n *\n * @example\n * // Create a keyProvider to handle key management\n * const keyProvider = new AleoKeyProvider();\n * keyProvider.useCache = true;\n *\n * // Create a new ProgramManager with the key that will be used to claim unbonded credits.\n * const programManager = new ProgramManager(\"https://api.explorer.aleo.org/v1\", keyProvider, undefined);\n *\n * // Create the claim unbonded transaction object for later use.\n * const tx = await programManager.buildClaimUnbondPublicTransaction(\"aleo1jx8s4dvjepculny4wfrzwyhs3tlyv65r58ns3g6q2gm2esh7ps8sqy9s5j\");\n * console.log(tx);\n *\n * // The transaction can be submitted later to the network using the network client.\n * programManager.networkClient.submitTransaction(tx);\n */\n async buildClaimUnbondPublicTransaction(staker_address: string, options: Partial = {}): Promise {\n const {\n programName = \"credits.aleo\",\n functionName = \"claim_unbond_public\",\n fee = options.fee || 2,\n privateFee = false,\n inputs = [staker_address],\n keySearchParams = new AleoKeyProviderParams({\n proverUri: CREDITS_PROGRAM_KEYS.claim_unbond_public.prover,\n verifierUri: CREDITS_PROGRAM_KEYS.claim_unbond_public.verifier,\n cacheKey: \"credits.aleo/claim_unbond_public\"\n }),\n program = this.creditsProgram(),\n ...additionalOptions\n } = options;\n\n const executeOptions: ExecuteOptions = {\n programName,\n functionName,\n fee,\n privateFee,\n inputs,\n keySearchParams,\n ...additionalOptions\n };\n\n return await this.buildExecutionTransaction(executeOptions);\n }\n\n /**\n * Claim unbonded credits. If credits have been unbonded by the account executing this function, this method will\n * claim them and add them to the public balance of the account.\n *\n * @example\n * // Create a keyProvider to handle key management\n * const keyProvider = new AleoKeyProvider();\n * keyProvider.useCache = true;\n *\n * // Create a new ProgramManager with the key that will be used to bond credits\n * const programManager = new ProgramManager(\"https://api.explorer.aleo.org/v1\", keyProvider, undefined);\n * programManager.setAccount(new Account(\"YourPrivateKey\"));\n *\n * // Create the bonding transaction\n * const tx_id = await programManager.claimUnbondPublic(\"aleo1jx8s4dvjepculny4wfrzwyhs3tlyv65r58ns3g6q2gm2esh7ps8sqy9s5j\");\n *\n * @param {string} staker_address Address of the staker who is claiming the credits\n * @param {ExecuteOptions} options\n * @returns string\n */\n async claimUnbondPublic(staker_address: string, options: Partial = {}): Promise {\n const tx = await this.buildClaimUnbondPublicTransaction(staker_address, options);\n return await this.networkClient.submitTransaction(tx);\n }\n\n /**\n * Build a set_validator_state transaction for later usage.\n *\n * This function allows a validator to set their state to be either opened or closed to new stakers.\n * When the validator is open to new stakers, any staker (including the validator) can bond or unbond from the validator.\n * When the validator is closed to new stakers, existing stakers can still bond or unbond from the validator, but new stakers cannot bond.\n *\n * This function serves two primary purposes:\n * 1. Allow a validator to leave the committee, by closing themselves to stakers and then unbonding all of their stakers.\n * 2. Allow a validator to maintain their % of stake, by closing themselves to allowing more stakers to bond to them.\n *\n * @example\n * // Create a keyProvider to handle key management\n * const keyProvider = new AleoKeyProvider();\n * keyProvider.useCache = true;\n *\n * // Create a new ProgramManager with the key that will be used to bond credits\n * const programManager = new ProgramManager(\"https://api.explorer.aleo.org/v1\", keyProvider, undefined);\n * programManager.setAccount(new Account(\"ValidatorPrivateKey\"));\n *\n * // Create the bonding transaction\n * const tx = await programManager.buildSetValidatorStateTransaction(true);\n *\n * // The transaction can be submitted later to the network using the network client.\n * programManager.networkClient.submitTransaction(tx);\n *\n * @returns string\n * @param {boolean} validator_state\n * @param {Partial} options - Override default execution options\n */\n async buildSetValidatorStateTransaction(validator_state: boolean, options: Partial = {}) {\n const {\n programName = \"credits.aleo\",\n functionName = \"set_validator_state\",\n fee = 1,\n privateFee = false,\n inputs = [validator_state.toString()],\n keySearchParams = new AleoKeyProviderParams({\n proverUri: CREDITS_PROGRAM_KEYS.set_validator_state.prover,\n verifierUri: CREDITS_PROGRAM_KEYS.set_validator_state.verifier,\n cacheKey: \"credits.aleo/set_validator_state\"\n }),\n ...additionalOptions\n } = options;\n\n const executeOptions: ExecuteOptions = {\n programName,\n functionName,\n fee,\n privateFee,\n inputs,\n keySearchParams,\n ...additionalOptions\n };\n\n return await this.execute(executeOptions);\n }\n\n /**\n * Submit a set_validator_state transaction to the Aleo Network.\n *\n * This function allows a validator to set their state to be either opened or closed to new stakers.\n * When the validator is open to new stakers, any staker (including the validator) can bond or unbond from the validator.\n * When the validator is closed to new stakers, existing stakers can still bond or unbond from the validator, but new stakers cannot bond.\n *\n * This function serves two primary purposes:\n * 1. Allow a validator to leave the committee, by closing themselves to stakers and then unbonding all of their stakers.\n * 2. Allow a validator to maintain their % of stake, by closing themselves to allowing more stakers to bond to them.\n *\n * @example\n * // Create a keyProvider to handle key management\n * const keyProvider = new AleoKeyProvider();\n * keyProvider.useCache = true;\n *\n * // Create a new ProgramManager with the key that will be used to bond credits\n * const programManager = new ProgramManager(\"https://api.explorer.aleo.org/v1\", keyProvider, undefined);\n * programManager.setAccount(new Account(\"ValidatorPrivateKey\"));\n *\n * // Create the bonding transaction\n * const tx_id = await programManager.setValidatorState(true);\n *\n * @returns string\n * @param {boolean} validator_state\n * @param {Partial} options - Override default execution options\n */\n async setValidatorState(validator_state: boolean, options: Partial = {}) {\n const tx = await this.buildSetValidatorStateTransaction(validator_state, options);\n return this.networkClient.submitTransaction(tx);\n }\n\n /**\n * Verify a proof of execution from an offline execution\n *\n * @param {executionResponse} executionResponse\n * @returns {boolean} True if the proof is valid, false otherwise\n */\n verifyExecution(executionResponse: ExecutionResponse): boolean {\n try {\n const execution = executionResponse.getExecution();\n const function_id = executionResponse.getFunctionId();\n const program = executionResponse.getProgram();\n const verifyingKey = executionResponse.getVerifyingKey();\n return verifyFunctionExecution(execution, verifyingKey, program, function_id);\n } catch(e) {\n console.warn(\"The execution was not found in the response, cannot verify the execution\");\n return false;\n }\n }\n\n /**\n * Create a program object from a program's source code\n *\n * @param {string} program Program source code\n * @returns {Program | Error} The program object\n */\n createProgramFromSource(program: string): Program | Error {\n return Program.fromString(program);\n }\n\n /**\n * Get the credits program object\n *\n * @returns {Program} The credits program object\n */\n creditsProgram(): Program {\n return Program.getCreditsProgram();\n }\n\n /**\n * Verify a program is valid\n *\n * @param {string} program The program source code\n */\n verifyProgram(program: string): boolean {\n try {\n Program.fromString(program);\n return true;\n } catch (e) {\n return false;\n }\n }\n\n // Internal utility function for getting a credits.aleo record\n async getCreditsRecord(amount: number, nonces: string[], record?: RecordPlaintext | string, params?: RecordSearchParams): Promise {\n try {\n return record instanceof RecordPlaintext ? record : RecordPlaintext.fromString(record);\n } catch (e) {\n try {\n const recordProvider = this.recordProvider;\n return (await recordProvider.findCreditsRecord(amount, true, nonces, params))\n } catch (e) {\n throw logAndThrow(`Error finding fee record. Record finder response: '${e}'. Please ensure you're connected to a valid Aleo network and a record with enough balance exists.`);\n }\n }\n }\n}\n\n// Ensure the transfer type requires an amount record\nfunction requiresAmountRecord(transferType: string): boolean {\n return PRIVATE_TRANSFER_TYPES.has(transferType);\n}\n\n// Validate the transfer type\nfunction validateTransferType(transferType: string): string | Error {\n return VALID_TRANSFER_TYPES.has(transferType) ? transferType :\n logAndThrow(`Invalid transfer type '${transferType}'. Valid transfer types are 'private', 'privateToPublic', 'public', and 'publicToPrivate'.`);\n}\n\nexport { ProgramManager }\n","import {VerifyingKey, Metadata} from \"@provablehq/wasm\";\n\nconst KEY_STORE = Metadata.baseUrl();\n\ninterface Key {\n name: string,\n locator: string,\n prover: string,\n verifier: string,\n verifyingKey: () => VerifyingKey,\n}\n\nfunction convert(metadata: Metadata): Key {\n // This looks up the method name in VerifyingKey\n const verifyingKey = (VerifyingKey as any)[metadata.verifyingKey];\n\n if (!verifyingKey) {\n throw new Error(\"Invalid method name: \" + metadata.verifyingKey);\n }\n\n return {\n name: metadata.name,\n locator: metadata.locator,\n prover: metadata.prover,\n verifier: metadata.verifier,\n verifyingKey,\n };\n}\n\nconst CREDITS_PROGRAM_KEYS = {\n bond_public: convert(Metadata.bond_public()),\n bond_validator: convert(Metadata.bond_validator()),\n claim_unbond_public: convert(Metadata.claim_unbond_public()),\n fee_private: convert(Metadata.fee_private()),\n fee_public: convert(Metadata.fee_public()),\n inclusion: convert(Metadata.inclusion()),\n join: convert(Metadata.join()),\n set_validator_state: convert(Metadata.set_validator_state()),\n split: convert(Metadata.split()),\n transfer_private: convert(Metadata.transfer_private()),\n transfer_private_to_public: convert(Metadata.transfer_private_to_public()),\n transfer_public: convert(Metadata.transfer_public()),\n transfer_public_as_signer: convert(Metadata.transfer_public_as_signer()),\n transfer_public_to_private: convert(Metadata.transfer_public_to_private()),\n unbond_public: convert(Metadata.unbond_public()),\n getKey: function(key: string): Key | Error {\n if (this.hasOwnProperty(key)) {\n return (this as any)[key] as Key;\n } else {\n return new Error(`Key \"${key}\" not found.`);\n }\n }\n};\n\nconst PRIVATE_TRANSFER_TYPES = new Set([\n \"transfer_private\",\n \"private\",\n \"transferPrivate\",\n \"transfer_private_to_public\",\n \"privateToPublic\",\n \"transferPrivateToPublic\",\n]);\nconst VALID_TRANSFER_TYPES = new Set([\n \"transfer_private\",\n \"private\",\n \"transferPrivate\",\n \"transfer_private_to_public\",\n \"privateToPublic\",\n \"transferPrivateToPublic\",\n \"transfer_public\",\n \"transfer_public_as_signer\",\n \"public\",\n \"public_as_signer\",\n \"transferPublic\",\n \"transferPublicAsSigner\",\n \"transfer_public_to_private\",\n \"publicToPrivate\",\n \"publicAsSigner\",\n \"transferPublicToPrivate\",\n]);\nconst PRIVATE_TRANSFER = new Set([\n \"private\",\n \"transfer_private\",\n \"transferPrivate\",\n]);\nconst PRIVATE_TO_PUBLIC_TRANSFER = new Set([\n \"private_to_public\",\n \"privateToPublic\",\n \"transfer_private_to_public\",\n \"transferPrivateToPublic\",\n]);\nconst PUBLIC_TRANSFER = new Set([\n \"public\",\n \"transfer_public\",\n \"transferPublic\",\n]);\nconst PUBLIC_TRANSFER_AS_SIGNER = new Set([\n \"public_as_signer\",\n \"transfer_public_as_signer\",\n \"transferPublicAsSigner\",\n]);\nconst PUBLIC_TO_PRIVATE_TRANSFER = new Set([\n \"public_to_private\",\n \"publicToPrivate\",\n \"transfer_public_to_private\",\n \"transferPublicToPrivate\",\n]);\n\nfunction logAndThrow(message: string): Error {\n console.error(message);\n throw message;\n}\n\nimport { Account } from \"./account\";\nimport { AleoNetworkClient, ProgramImports } from \"./network-client\";\nimport { Block } from \"./models/block\";\nimport { Execution } from \"./models/execution\";\nimport { Input } from \"./models/input\";\nimport { Output } from \"./models/output\";\nimport { TransactionModel } from \"./models/transactionModel\";\nimport { Transition } from \"./models/transition\";\nimport {\n AleoKeyProvider,\n AleoKeyProviderParams,\n AleoKeyProviderInitParams,\n CachedKeyPair,\n FunctionKeyPair,\n FunctionKeyProvider,\n KeySearchParams,\n} from \"./function-key-provider\";\nimport {\n OfflineKeyProvider,\n OfflineSearchParams\n} from \"./offline-key-provider\";\nimport {\n BlockHeightSearch,\n NetworkRecordProvider,\n RecordProvider,\n RecordSearchParams,\n} from \"./record-provider\";\n\n// @TODO: This function is no longer needed, remove it.\nasync function initializeWasm() {\n console.warn(\"initializeWasm is deprecated, you no longer need to use it\");\n}\n\nexport { createAleoWorker } from \"./managed-worker\";\n\nexport { ProgramManager } from \"./program-manager\";\n\nexport {\n Address,\n Execution as FunctionExecution,\n ExecutionResponse,\n Field,\n OfflineQuery,\n PrivateKey,\n PrivateKeyCiphertext,\n Program,\n ProgramManager as ProgramManagerBase,\n ProvingKey,\n RecordCiphertext,\n RecordPlaintext,\n Signature,\n Transaction,\n VerifyingKey,\n ViewKey,\n initThreadPool,\n verifyFunctionExecution,\n} from \"@provablehq/wasm\";\n\nexport { initializeWasm };\n\nexport {\n Account,\n AleoKeyProvider,\n AleoKeyProviderParams,\n AleoKeyProviderInitParams,\n AleoNetworkClient,\n Block,\n BlockHeightSearch,\n CachedKeyPair,\n Execution,\n FunctionKeyPair,\n FunctionKeyProvider,\n Input,\n Key,\n KeySearchParams,\n NetworkRecordProvider,\n ProgramImports,\n OfflineKeyProvider,\n OfflineSearchParams,\n Output,\n RecordProvider,\n RecordSearchParams,\n TransactionModel,\n Transition,\n CREDITS_PROGRAM_KEYS,\n KEY_STORE,\n PRIVATE_TRANSFER,\n PRIVATE_TO_PUBLIC_TRANSFER,\n PRIVATE_TRANSFER_TYPES,\n PUBLIC_TRANSFER,\n PUBLIC_TRANSFER_AS_SIGNER,\n PUBLIC_TO_PRIVATE_TRANSFER,\n VALID_TRANSFER_TYPES,\n logAndThrow,\n};\n","function spawnWorker(url, module, memory, address) {\n return new Promise((resolve) => {\n const worker = new Worker(url, {\n type: \"module\",\n });\n\n worker.addEventListener(\"message\", (event) => {\n // This is needed in Node to wait one extra tick, so that way\n // the Worker can fully initialize before we return.\n setTimeout(() => {\n resolve(worker);\n\n // When running in Node, this allows the process to exit\n // even though the Worker is still running.\n if (worker.unref) {\n worker.unref();\n }\n }, 0);\n }, {\n capture: true,\n once: true,\n });\n\n worker.postMessage({\n module,\n memory,\n address,\n });\n });\n }\n\nlet wasm;\n\nconst heap = new Array(128).fill(undefined);\n\nheap.push(undefined, null, true, false);\n\nfunction getObject(idx) { return heap[idx]; }\n\nlet heap_next = heap.length;\n\nfunction dropObject(idx) {\n if (idx < 132) return;\n heap[idx] = heap_next;\n heap_next = idx;\n}\n\nfunction takeObject(idx) {\n const ret = getObject(idx);\n dropObject(idx);\n return ret;\n}\n\nconst cachedTextDecoder = (typeof TextDecoder !== 'undefined' ? new TextDecoder('utf-8', { ignoreBOM: true, fatal: true }) : { decode: () => { throw Error('TextDecoder not available') } } );\n\nif (typeof TextDecoder !== 'undefined') { cachedTextDecoder.decode(); }\nlet cachedUint8Memory0 = null;\n\nfunction getUint8Memory0() {\n if (cachedUint8Memory0 === null || cachedUint8Memory0.buffer !== wasm.memory.buffer) {\n cachedUint8Memory0 = new Uint8Array(wasm.memory.buffer);\n }\n return cachedUint8Memory0;\n}\n\nfunction getStringFromWasm0(ptr, len) {\n ptr = ptr >>> 0;\n return cachedTextDecoder.decode(getUint8Memory0().slice(ptr, ptr + len));\n}\n\nfunction addHeapObject(obj) {\n if (heap_next === heap.length) heap.push(heap.length + 1);\n const idx = heap_next;\n heap_next = heap[idx];\n\n heap[idx] = obj;\n return idx;\n}\n\nlet WASM_VECTOR_LEN = 0;\n\nconst cachedTextEncoder = (typeof TextEncoder !== 'undefined' ? new TextEncoder('utf-8') : { encode: () => { throw Error('TextEncoder not available') } } );\n\nconst encodeString = function (arg, view) {\n const buf = cachedTextEncoder.encode(arg);\n view.set(buf);\n return {\n read: arg.length,\n written: buf.length\n };\n};\n\nfunction passStringToWasm0(arg, malloc, realloc) {\n\n if (realloc === undefined) {\n const buf = cachedTextEncoder.encode(arg);\n const ptr = malloc(buf.length, 1) >>> 0;\n getUint8Memory0().subarray(ptr, ptr + buf.length).set(buf);\n WASM_VECTOR_LEN = buf.length;\n return ptr;\n }\n\n let len = arg.length;\n let ptr = malloc(len, 1) >>> 0;\n\n const mem = getUint8Memory0();\n\n let offset = 0;\n\n for (; offset < len; offset++) {\n const code = arg.charCodeAt(offset);\n if (code > 0x7F) break;\n mem[ptr + offset] = code;\n }\n\n if (offset !== len) {\n if (offset !== 0) {\n arg = arg.slice(offset);\n }\n ptr = realloc(ptr, len, len = offset + arg.length * 3, 1) >>> 0;\n const view = getUint8Memory0().subarray(ptr + offset, ptr + len);\n const ret = encodeString(arg, view);\n\n offset += ret.written;\n ptr = realloc(ptr, len, offset, 1) >>> 0;\n }\n\n WASM_VECTOR_LEN = offset;\n return ptr;\n}\n\nfunction isLikeNone(x) {\n return x === undefined || x === null;\n}\n\nlet cachedInt32Memory0 = null;\n\nfunction getInt32Memory0() {\n if (cachedInt32Memory0 === null || cachedInt32Memory0.buffer !== wasm.memory.buffer) {\n cachedInt32Memory0 = new Int32Array(wasm.memory.buffer);\n }\n return cachedInt32Memory0;\n}\n\nfunction debugString(val) {\n // primitive types\n const type = typeof val;\n if (type == 'number' || type == 'boolean' || val == null) {\n return `${val}`;\n }\n if (type == 'string') {\n return `\"${val}\"`;\n }\n if (type == 'symbol') {\n const description = val.description;\n if (description == null) {\n return 'Symbol';\n } else {\n return `Symbol(${description})`;\n }\n }\n if (type == 'function') {\n const name = val.name;\n if (typeof name == 'string' && name.length > 0) {\n return `Function(${name})`;\n } else {\n return 'Function';\n }\n }\n // objects\n if (Array.isArray(val)) {\n const length = val.length;\n let debug = '[';\n if (length > 0) {\n debug += debugString(val[0]);\n }\n for(let i = 1; i < length; i++) {\n debug += ', ' + debugString(val[i]);\n }\n debug += ']';\n return debug;\n }\n // Test for built-in\n const builtInMatches = /\\[object ([^\\]]+)\\]/.exec(toString.call(val));\n let className;\n if (builtInMatches.length > 1) {\n className = builtInMatches[1];\n } else {\n // Failed to match the standard '[object ClassName]'\n return toString.call(val);\n }\n if (className == 'Object') {\n // we're a user defined class or Object\n // JSON.stringify avoids problems with cycles, and is generally much\n // easier than looping through ownProperties of `val`.\n try {\n return 'Object(' + JSON.stringify(val) + ')';\n } catch (_) {\n return 'Object';\n }\n }\n // errors\n if (val instanceof Error) {\n return `${val.name}: ${val.message}\\n${val.stack}`;\n }\n // TODO we could test for more things here, like `Set`s and `Map`s.\n return className;\n}\n\nconst CLOSURE_DTORS = (typeof FinalizationRegistry === 'undefined')\n ? { register: () => {}, unregister: () => {} }\n : new FinalizationRegistry(state => {\n wasm.__wbindgen_export_3.get(state.dtor)(state.a, state.b);\n});\n\nfunction makeMutClosure(arg0, arg1, dtor, f) {\n const state = { a: arg0, b: arg1, cnt: 1, dtor };\n const real = (...args) => {\n // First up with a closure we increment the internal reference\n // count. This ensures that the Rust closure environment won't\n // be deallocated while we're invoking it.\n state.cnt++;\n const a = state.a;\n state.a = 0;\n try {\n return f(a, state.b, ...args);\n } finally {\n if (--state.cnt === 0) {\n wasm.__wbindgen_export_3.get(state.dtor)(a, state.b);\n CLOSURE_DTORS.unregister(state);\n } else {\n state.a = a;\n }\n }\n };\n real.original = state;\n CLOSURE_DTORS.register(real, state, state);\n return real;\n}\nfunction __wbg_adapter_34(arg0, arg1, arg2) {\n wasm._dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h467700a9696faab3(arg0, arg1, addHeapObject(arg2));\n}\n\nfunction _assertClass(instance, klass) {\n if (!(instance instanceof klass)) {\n throw new Error(`expected instance of ${klass.name}`);\n }\n return instance.ptr;\n}\n\nfunction passArray8ToWasm0(arg, malloc) {\n const ptr = malloc(arg.length * 1, 1) >>> 0;\n getUint8Memory0().set(arg, ptr / 1);\n WASM_VECTOR_LEN = arg.length;\n return ptr;\n}\n/**\n* Verify an execution with a single function and a single transition. Executions with multiple\n* transitions or functions will fail to verify. Also, this does not verify that the state root of\n* the execution is included in the Aleo Network ledger.\n*\n* @param {Execution} execution The function execution to verify\n* @param {VerifyingKey} verifying_key The verifying key for the function\n* @param {Program} program The program that the function execution belongs to\n* @param {String} function_id The name of the function that was executed\n* @returns {boolean} True if the execution is valid, false otherwise\n* @param {Execution} execution\n* @param {VerifyingKey} verifying_key\n* @param {Program} program\n* @param {string} function_id\n* @returns {boolean}\n*/\nfunction verifyFunctionExecution(execution, verifying_key, program, function_id) {\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n _assertClass(execution, Execution);\n _assertClass(verifying_key, VerifyingKey);\n _assertClass(program, Program);\n const ptr0 = passStringToWasm0(function_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n wasm.verifyFunctionExecution(retptr, execution.__wbg_ptr, verifying_key.__wbg_ptr, program.__wbg_ptr, ptr0, len0);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n var r2 = getInt32Memory0()[retptr / 4 + 2];\n if (r2) {\n throw takeObject(r1);\n }\n return r0 !== 0;\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n }\n}\n\nlet cachedBigInt64Memory0 = null;\n\nfunction getBigInt64Memory0() {\n if (cachedBigInt64Memory0 === null || cachedBigInt64Memory0.buffer !== wasm.memory.buffer) {\n cachedBigInt64Memory0 = new BigInt64Array(wasm.memory.buffer);\n }\n return cachedBigInt64Memory0;\n}\n\nfunction getArrayU8FromWasm0(ptr, len) {\n ptr = ptr >>> 0;\n return getUint8Memory0().subarray(ptr / 1, ptr / 1 + len);\n}\n/**\n* @param {number} receiver\n*/\nfunction runRayonThread(receiver) {\n wasm.runRayonThread(receiver);\n}\n\n/**\n* @param {URL} url\n* @param {number} num_threads\n* @returns {Promise}\n*/\nfunction initThreadPool(url, num_threads) {\n const ret = wasm.initThreadPool(addHeapObject(url), num_threads);\n return takeObject(ret);\n}\n\nfunction handleError(f, args) {\n try {\n return f.apply(this, args);\n } catch (e) {\n wasm.__wbindgen_exn_store(addHeapObject(e));\n }\n}\nfunction __wbg_adapter_281(arg0, arg1, arg2, arg3) {\n wasm.wasm_bindgen__convert__closures__invoke2_mut__h381bef3cd886b4c7(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));\n}\n\nconst AddressFinalization = (typeof FinalizationRegistry === 'undefined')\n ? { register: () => {}, unregister: () => {} }\n : new FinalizationRegistry(ptr => wasm.__wbg_address_free(ptr >>> 0));\n/**\n* Public address of an Aleo account\n*/\nclass Address {\n\n static __wrap(ptr) {\n ptr = ptr >>> 0;\n const obj = Object.create(Address.prototype);\n obj.__wbg_ptr = ptr;\n AddressFinalization.register(obj, obj.__wbg_ptr, obj);\n return obj;\n }\n\n __destroy_into_raw() {\n const ptr = this.__wbg_ptr;\n this.__wbg_ptr = 0;\n AddressFinalization.unregister(this);\n return ptr;\n }\n\n free() {\n const ptr = this.__destroy_into_raw();\n wasm.__wbg_address_free(ptr);\n }\n /**\n * Derive an Aleo address from a private key\n *\n * @param {PrivateKey} private_key The private key to derive the address from\n * @returns {Address} Address corresponding to the private key\n * @param {PrivateKey} private_key\n * @returns {Address}\n */\n static from_private_key(private_key) {\n _assertClass(private_key, PrivateKey);\n const ret = wasm.address_from_private_key(private_key.__wbg_ptr);\n return Address.__wrap(ret);\n }\n /**\n * Derive an Aleo address from a view key\n *\n * @param {ViewKey} view_key The view key to derive the address from\n * @returns {Address} Address corresponding to the view key\n * @param {ViewKey} view_key\n * @returns {Address}\n */\n static from_view_key(view_key) {\n _assertClass(view_key, ViewKey);\n const ret = wasm.address_from_view_key(view_key.__wbg_ptr);\n return Address.__wrap(ret);\n }\n /**\n * Create an aleo address object from a string representation of an address\n *\n * @param {string} address String representation of an addressm\n * @returns {Address} Address\n * @param {string} address\n * @returns {Address}\n */\n static from_string(address) {\n const ptr0 = passStringToWasm0(address, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n const ret = wasm.address_from_string(ptr0, len0);\n return Address.__wrap(ret);\n }\n /**\n * Get a string representation of an Aleo address object\n *\n * @param {Address} Address\n * @returns {string} String representation of the address\n * @returns {string}\n */\n to_string() {\n let deferred1_0;\n let deferred1_1;\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n wasm.address_to_string(retptr, this.__wbg_ptr);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n deferred1_0 = r0;\n deferred1_1 = r1;\n return getStringFromWasm0(r0, r1);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);\n }\n }\n /**\n * Verify a signature for a message signed by the address\n *\n * @param {Uint8Array} Byte array representing a message signed by the address\n * @returns {boolean} Boolean representing whether or not the signature is valid\n * @param {Uint8Array} message\n * @param {Signature} signature\n * @returns {boolean}\n */\n verify(message, signature) {\n const ptr0 = passArray8ToWasm0(message, wasm.__wbindgen_malloc);\n const len0 = WASM_VECTOR_LEN;\n _assertClass(signature, Signature);\n const ret = wasm.address_verify(this.__wbg_ptr, ptr0, len0, signature.__wbg_ptr);\n return ret !== 0;\n }\n}\n\nconst ExecutionFinalization = (typeof FinalizationRegistry === 'undefined')\n ? { register: () => {}, unregister: () => {} }\n : new FinalizationRegistry(ptr => wasm.__wbg_execution_free(ptr >>> 0));\n/**\n* Execution of an Aleo program.\n*/\nclass Execution {\n\n static __wrap(ptr) {\n ptr = ptr >>> 0;\n const obj = Object.create(Execution.prototype);\n obj.__wbg_ptr = ptr;\n ExecutionFinalization.register(obj, obj.__wbg_ptr, obj);\n return obj;\n }\n\n __destroy_into_raw() {\n const ptr = this.__wbg_ptr;\n this.__wbg_ptr = 0;\n ExecutionFinalization.unregister(this);\n return ptr;\n }\n\n free() {\n const ptr = this.__destroy_into_raw();\n wasm.__wbg_execution_free(ptr);\n }\n /**\n * Returns the string representation of the execution.\n * @returns {string}\n */\n toString() {\n let deferred1_0;\n let deferred1_1;\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n wasm.execution_toString(retptr, this.__wbg_ptr);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n deferred1_0 = r0;\n deferred1_1 = r1;\n return getStringFromWasm0(r0, r1);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);\n }\n }\n /**\n * Creates an execution object from a string representation of an execution.\n * @param {string} execution\n * @returns {Execution}\n */\n static fromString(execution) {\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n const ptr0 = passStringToWasm0(execution, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n wasm.execution_fromString(retptr, ptr0, len0);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n var r2 = getInt32Memory0()[retptr / 4 + 2];\n if (r2) {\n throw takeObject(r1);\n }\n return Execution.__wrap(r0);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n }\n }\n}\n\nconst ExecutionResponseFinalization = (typeof FinalizationRegistry === 'undefined')\n ? { register: () => {}, unregister: () => {} }\n : new FinalizationRegistry(ptr => wasm.__wbg_executionresponse_free(ptr >>> 0));\n/**\n* Webassembly Representation of an Aleo function execution response\n*\n* This object is returned by the execution of an Aleo function off-chain. It provides methods for\n* retrieving the outputs of the function execution.\n*/\nclass ExecutionResponse {\n\n static __wrap(ptr) {\n ptr = ptr >>> 0;\n const obj = Object.create(ExecutionResponse.prototype);\n obj.__wbg_ptr = ptr;\n ExecutionResponseFinalization.register(obj, obj.__wbg_ptr, obj);\n return obj;\n }\n\n __destroy_into_raw() {\n const ptr = this.__wbg_ptr;\n this.__wbg_ptr = 0;\n ExecutionResponseFinalization.unregister(this);\n return ptr;\n }\n\n free() {\n const ptr = this.__destroy_into_raw();\n wasm.__wbg_executionresponse_free(ptr);\n }\n /**\n * Get the outputs of the executed function\n *\n * @returns {Array} Array of strings representing the outputs of the function\n * @returns {Array}\n */\n getOutputs() {\n const ret = wasm.executionresponse_getOutputs(this.__wbg_ptr);\n return takeObject(ret);\n }\n /**\n * Returns the execution object if present, null if otherwise.\n *\n * @returns {Execution | undefined} The execution object if present, null if otherwise\n * @returns {Execution | undefined}\n */\n getExecution() {\n const ret = wasm.executionresponse_getExecution(this.__wbg_ptr);\n return ret === 0 ? undefined : Execution.__wrap(ret);\n }\n /**\n * Returns the program keys if present\n * @returns {KeyPair}\n */\n getKeys() {\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n wasm.executionresponse_getKeys(retptr, this.__wbg_ptr);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n var r2 = getInt32Memory0()[retptr / 4 + 2];\n if (r2) {\n throw takeObject(r1);\n }\n return KeyPair.__wrap(r0);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n }\n }\n /**\n * Returns the proving_key if the proving key was cached in the Execution response.\n * Note the proving key is removed from the response object after the first call to this\n * function. Subsequent calls will return null.\n *\n * @returns {ProvingKey | undefined} The proving key\n * @returns {ProvingKey | undefined}\n */\n getProvingKey() {\n const ret = wasm.executionresponse_getProvingKey(this.__wbg_ptr);\n return ret === 0 ? undefined : ProvingKey.__wrap(ret);\n }\n /**\n * Returns the verifying_key associated with the program\n *\n * @returns {VerifyingKey} The verifying key\n * @returns {VerifyingKey}\n */\n getVerifyingKey() {\n const ret = wasm.executionresponse_getVerifyingKey(this.__wbg_ptr);\n return VerifyingKey.__wrap(ret);\n }\n /**\n * Returns the function identifier\n * @returns {string}\n */\n getFunctionId() {\n let deferred1_0;\n let deferred1_1;\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n wasm.executionresponse_getFunctionId(retptr, this.__wbg_ptr);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n deferred1_0 = r0;\n deferred1_1 = r1;\n return getStringFromWasm0(r0, r1);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);\n }\n }\n /**\n * Returns the program\n * @returns {Program}\n */\n getProgram() {\n const ret = wasm.executionresponse_getProgram(this.__wbg_ptr);\n return Program.__wrap(ret);\n }\n}\n\nconst FieldFinalization = (typeof FinalizationRegistry === 'undefined')\n ? { register: () => {}, unregister: () => {} }\n : new FinalizationRegistry(ptr => wasm.__wbg_field_free(ptr >>> 0));\n/**\n*/\nclass Field {\n\n static __wrap(ptr) {\n ptr = ptr >>> 0;\n const obj = Object.create(Field.prototype);\n obj.__wbg_ptr = ptr;\n FieldFinalization.register(obj, obj.__wbg_ptr, obj);\n return obj;\n }\n\n __destroy_into_raw() {\n const ptr = this.__wbg_ptr;\n this.__wbg_ptr = 0;\n FieldFinalization.unregister(this);\n return ptr;\n }\n\n free() {\n const ptr = this.__destroy_into_raw();\n wasm.__wbg_field_free(ptr);\n }\n /**\n * @returns {string}\n */\n toString() {\n let deferred1_0;\n let deferred1_1;\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n wasm.field_toString(retptr, this.__wbg_ptr);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n deferred1_0 = r0;\n deferred1_1 = r1;\n return getStringFromWasm0(r0, r1);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);\n }\n }\n /**\n * @param {string} field\n * @returns {Field}\n */\n static fromString(field) {\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n const ptr0 = passStringToWasm0(field, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n wasm.field_fromString(retptr, ptr0, len0);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n var r2 = getInt32Memory0()[retptr / 4 + 2];\n if (r2) {\n throw takeObject(r1);\n }\n return Field.__wrap(r0);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n }\n }\n}\n\nconst KeyPairFinalization = (typeof FinalizationRegistry === 'undefined')\n ? { register: () => {}, unregister: () => {} }\n : new FinalizationRegistry(ptr => wasm.__wbg_keypair_free(ptr >>> 0));\n/**\n* Key pair object containing both the function proving and verifying keys\n*/\nclass KeyPair {\n\n static __wrap(ptr) {\n ptr = ptr >>> 0;\n const obj = Object.create(KeyPair.prototype);\n obj.__wbg_ptr = ptr;\n KeyPairFinalization.register(obj, obj.__wbg_ptr, obj);\n return obj;\n }\n\n __destroy_into_raw() {\n const ptr = this.__wbg_ptr;\n this.__wbg_ptr = 0;\n KeyPairFinalization.unregister(this);\n return ptr;\n }\n\n free() {\n const ptr = this.__destroy_into_raw();\n wasm.__wbg_keypair_free(ptr);\n }\n /**\n * Create new key pair from proving and verifying keys\n *\n * @param {ProvingKey} proving_key Proving key corresponding to a function in an Aleo program\n * @param {VerifyingKey} verifying_key Verifying key corresponding to a function in an Aleo program\n * @returns {KeyPair} Key pair object containing both the function proving and verifying keys\n * @param {ProvingKey} proving_key\n * @param {VerifyingKey} verifying_key\n */\n constructor(proving_key, verifying_key) {\n _assertClass(proving_key, ProvingKey);\n var ptr0 = proving_key.__destroy_into_raw();\n _assertClass(verifying_key, VerifyingKey);\n var ptr1 = verifying_key.__destroy_into_raw();\n const ret = wasm.keypair_new(ptr0, ptr1);\n this.__wbg_ptr = ret >>> 0;\n return this;\n }\n /**\n * Get the proving key. This method will remove the proving key from the key pair\n *\n * @returns {ProvingKey | Error}\n * @returns {ProvingKey}\n */\n provingKey() {\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n wasm.keypair_provingKey(retptr, this.__wbg_ptr);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n var r2 = getInt32Memory0()[retptr / 4 + 2];\n if (r2) {\n throw takeObject(r1);\n }\n return ProvingKey.__wrap(r0);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n }\n }\n /**\n * Get the verifying key. This method will remove the verifying key from the key pair\n *\n * @returns {VerifyingKey | Error}\n * @returns {VerifyingKey}\n */\n verifyingKey() {\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n wasm.keypair_verifyingKey(retptr, this.__wbg_ptr);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n var r2 = getInt32Memory0()[retptr / 4 + 2];\n if (r2) {\n throw takeObject(r1);\n }\n return VerifyingKey.__wrap(r0);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n }\n }\n}\n\nconst MetadataFinalization = (typeof FinalizationRegistry === 'undefined')\n ? { register: () => {}, unregister: () => {} }\n : new FinalizationRegistry(ptr => wasm.__wbg_metadata_free(ptr >>> 0));\n/**\n*/\nclass Metadata {\n\n static __wrap(ptr) {\n ptr = ptr >>> 0;\n const obj = Object.create(Metadata.prototype);\n obj.__wbg_ptr = ptr;\n MetadataFinalization.register(obj, obj.__wbg_ptr, obj);\n return obj;\n }\n\n __destroy_into_raw() {\n const ptr = this.__wbg_ptr;\n this.__wbg_ptr = 0;\n MetadataFinalization.unregister(this);\n return ptr;\n }\n\n free() {\n const ptr = this.__destroy_into_raw();\n wasm.__wbg_metadata_free(ptr);\n }\n /**\n * @returns {string}\n */\n get name() {\n let deferred1_0;\n let deferred1_1;\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n wasm.__wbg_get_metadata_name(retptr, this.__wbg_ptr);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n deferred1_0 = r0;\n deferred1_1 = r1;\n return getStringFromWasm0(r0, r1);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);\n }\n }\n /**\n * @param {string} arg0\n */\n set name(arg0) {\n const ptr0 = passStringToWasm0(arg0, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n wasm.__wbg_set_metadata_name(this.__wbg_ptr, ptr0, len0);\n }\n /**\n * @returns {string}\n */\n get locator() {\n let deferred1_0;\n let deferred1_1;\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n wasm.__wbg_get_metadata_locator(retptr, this.__wbg_ptr);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n deferred1_0 = r0;\n deferred1_1 = r1;\n return getStringFromWasm0(r0, r1);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);\n }\n }\n /**\n * @param {string} arg0\n */\n set locator(arg0) {\n const ptr0 = passStringToWasm0(arg0, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n wasm.__wbg_set_metadata_locator(this.__wbg_ptr, ptr0, len0);\n }\n /**\n * @returns {string}\n */\n get prover() {\n let deferred1_0;\n let deferred1_1;\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n wasm.__wbg_get_metadata_prover(retptr, this.__wbg_ptr);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n deferred1_0 = r0;\n deferred1_1 = r1;\n return getStringFromWasm0(r0, r1);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);\n }\n }\n /**\n * @param {string} arg0\n */\n set prover(arg0) {\n const ptr0 = passStringToWasm0(arg0, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n wasm.__wbg_set_metadata_prover(this.__wbg_ptr, ptr0, len0);\n }\n /**\n * @returns {string}\n */\n get verifier() {\n let deferred1_0;\n let deferred1_1;\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n wasm.__wbg_get_metadata_verifier(retptr, this.__wbg_ptr);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n deferred1_0 = r0;\n deferred1_1 = r1;\n return getStringFromWasm0(r0, r1);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);\n }\n }\n /**\n * @param {string} arg0\n */\n set verifier(arg0) {\n const ptr0 = passStringToWasm0(arg0, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n wasm.__wbg_set_metadata_verifier(this.__wbg_ptr, ptr0, len0);\n }\n /**\n * @returns {string}\n */\n get verifyingKey() {\n let deferred1_0;\n let deferred1_1;\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n wasm.__wbg_get_metadata_verifyingKey(retptr, this.__wbg_ptr);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n deferred1_0 = r0;\n deferred1_1 = r1;\n return getStringFromWasm0(r0, r1);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);\n }\n }\n /**\n * @param {string} arg0\n */\n set verifyingKey(arg0) {\n const ptr0 = passStringToWasm0(arg0, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n wasm.__wbg_set_metadata_verifyingKey(this.__wbg_ptr, ptr0, len0);\n }\n /**\n * @returns {string}\n */\n static baseUrl() {\n let deferred1_0;\n let deferred1_1;\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n wasm.metadata_baseUrl(retptr);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n deferred1_0 = r0;\n deferred1_1 = r1;\n return getStringFromWasm0(r0, r1);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);\n }\n }\n /**\n * @returns {Metadata}\n */\n static bond_public() {\n const ret = wasm.metadata_bond_public();\n return Metadata.__wrap(ret);\n }\n /**\n * @returns {Metadata}\n */\n static bond_validator() {\n const ret = wasm.metadata_bond_validator();\n return Metadata.__wrap(ret);\n }\n /**\n * @returns {Metadata}\n */\n static claim_unbond_public() {\n const ret = wasm.metadata_claim_unbond_public();\n return Metadata.__wrap(ret);\n }\n /**\n * @returns {Metadata}\n */\n static fee_private() {\n const ret = wasm.metadata_fee_private();\n return Metadata.__wrap(ret);\n }\n /**\n * @returns {Metadata}\n */\n static fee_public() {\n const ret = wasm.metadata_fee_public();\n return Metadata.__wrap(ret);\n }\n /**\n * @returns {Metadata}\n */\n static inclusion() {\n const ret = wasm.metadata_inclusion();\n return Metadata.__wrap(ret);\n }\n /**\n * @returns {Metadata}\n */\n static join() {\n const ret = wasm.metadata_join();\n return Metadata.__wrap(ret);\n }\n /**\n * @returns {Metadata}\n */\n static set_validator_state() {\n const ret = wasm.metadata_set_validator_state();\n return Metadata.__wrap(ret);\n }\n /**\n * @returns {Metadata}\n */\n static split() {\n const ret = wasm.metadata_split();\n return Metadata.__wrap(ret);\n }\n /**\n * @returns {Metadata}\n */\n static transfer_private() {\n const ret = wasm.metadata_transfer_private();\n return Metadata.__wrap(ret);\n }\n /**\n * @returns {Metadata}\n */\n static transfer_private_to_public() {\n const ret = wasm.metadata_transfer_private_to_public();\n return Metadata.__wrap(ret);\n }\n /**\n * @returns {Metadata}\n */\n static transfer_public() {\n const ret = wasm.metadata_transfer_public();\n return Metadata.__wrap(ret);\n }\n /**\n * @returns {Metadata}\n */\n static transfer_public_as_signer() {\n const ret = wasm.metadata_transfer_public_as_signer();\n return Metadata.__wrap(ret);\n }\n /**\n * @returns {Metadata}\n */\n static transfer_public_to_private() {\n const ret = wasm.metadata_transfer_public_to_private();\n return Metadata.__wrap(ret);\n }\n /**\n * @returns {Metadata}\n */\n static unbond_public() {\n const ret = wasm.metadata_unbond_public();\n return Metadata.__wrap(ret);\n }\n}\n\nconst OfflineQueryFinalization = (typeof FinalizationRegistry === 'undefined')\n ? { register: () => {}, unregister: () => {} }\n : new FinalizationRegistry(ptr => wasm.__wbg_offlinequery_free(ptr >>> 0));\n/**\n* An offline query object used to insert the global state root and state paths needed to create\n* a valid inclusion proof offline.\n*/\nclass OfflineQuery {\n\n static __wrap(ptr) {\n ptr = ptr >>> 0;\n const obj = Object.create(OfflineQuery.prototype);\n obj.__wbg_ptr = ptr;\n OfflineQueryFinalization.register(obj, obj.__wbg_ptr, obj);\n return obj;\n }\n\n __destroy_into_raw() {\n const ptr = this.__wbg_ptr;\n this.__wbg_ptr = 0;\n OfflineQueryFinalization.unregister(this);\n return ptr;\n }\n\n free() {\n const ptr = this.__destroy_into_raw();\n wasm.__wbg_offlinequery_free(ptr);\n }\n /**\n * Creates a new offline query object. The state root is required to be passed in as a string\n * @param {string} state_root\n */\n constructor(state_root) {\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n const ptr0 = passStringToWasm0(state_root, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n wasm.offlinequery_new(retptr, ptr0, len0);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n var r2 = getInt32Memory0()[retptr / 4 + 2];\n if (r2) {\n throw takeObject(r1);\n }\n this.__wbg_ptr = r0 >>> 0;\n return this;\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n }\n }\n /**\n * Add a new state path to the offline query object.\n *\n * @param {string} commitment: The commitment corresponding to a record inpout\n * @param {string} state_path: The state path corresponding to the commitment\n * @param {string} commitment\n * @param {string} state_path\n */\n addStatePath(commitment, state_path) {\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n const ptr0 = passStringToWasm0(commitment, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n const ptr1 = passStringToWasm0(state_path, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len1 = WASM_VECTOR_LEN;\n wasm.offlinequery_addStatePath(retptr, this.__wbg_ptr, ptr0, len0, ptr1, len1);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n if (r1) {\n throw takeObject(r0);\n }\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n }\n }\n /**\n * Get a json string representation of the offline query object\n * @returns {string}\n */\n toString() {\n let deferred1_0;\n let deferred1_1;\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n wasm.offlinequery_toString(retptr, this.__wbg_ptr);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n deferred1_0 = r0;\n deferred1_1 = r1;\n return getStringFromWasm0(r0, r1);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);\n }\n }\n /**\n * Create an offline query object from a json string representation\n * @param {string} s\n * @returns {OfflineQuery}\n */\n static fromString(s) {\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n const ptr0 = passStringToWasm0(s, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n wasm.offlinequery_fromString(retptr, ptr0, len0);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n var r2 = getInt32Memory0()[retptr / 4 + 2];\n if (r2) {\n throw takeObject(r1);\n }\n return OfflineQuery.__wrap(r0);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n }\n }\n}\n\nconst PrivateKeyFinalization = (typeof FinalizationRegistry === 'undefined')\n ? { register: () => {}, unregister: () => {} }\n : new FinalizationRegistry(ptr => wasm.__wbg_privatekey_free(ptr >>> 0));\n/**\n* Private key of an Aleo account\n*/\nclass PrivateKey {\n\n static __wrap(ptr) {\n ptr = ptr >>> 0;\n const obj = Object.create(PrivateKey.prototype);\n obj.__wbg_ptr = ptr;\n PrivateKeyFinalization.register(obj, obj.__wbg_ptr, obj);\n return obj;\n }\n\n __destroy_into_raw() {\n const ptr = this.__wbg_ptr;\n this.__wbg_ptr = 0;\n PrivateKeyFinalization.unregister(this);\n return ptr;\n }\n\n free() {\n const ptr = this.__destroy_into_raw();\n wasm.__wbg_privatekey_free(ptr);\n }\n /**\n * Generate a new private key using a cryptographically secure random number generator\n *\n * @returns {PrivateKey}\n */\n constructor() {\n const ret = wasm.privatekey_new();\n this.__wbg_ptr = ret >>> 0;\n return this;\n }\n /**\n * Get a private key from a series of unchecked bytes\n *\n * @param {Uint8Array} seed Unchecked 32 byte long Uint8Array acting as the seed for the private key\n * @returns {PrivateKey}\n * @param {Uint8Array} seed\n * @returns {PrivateKey}\n */\n static from_seed_unchecked(seed) {\n const ptr0 = passArray8ToWasm0(seed, wasm.__wbindgen_malloc);\n const len0 = WASM_VECTOR_LEN;\n const ret = wasm.privatekey_from_seed_unchecked(ptr0, len0);\n return PrivateKey.__wrap(ret);\n }\n /**\n * Get a private key from a string representation of a private key\n *\n * @param {string} seed String representation of a private key\n * @returns {PrivateKey}\n * @param {string} private_key\n * @returns {PrivateKey}\n */\n static from_string(private_key) {\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n const ptr0 = passStringToWasm0(private_key, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n wasm.privatekey_from_string(retptr, ptr0, len0);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n var r2 = getInt32Memory0()[retptr / 4 + 2];\n if (r2) {\n throw takeObject(r1);\n }\n return PrivateKey.__wrap(r0);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n }\n }\n /**\n * Get a string representation of the private key. This function should be used very carefully\n * as it exposes the private key plaintext\n *\n * @returns {string} String representation of a private key\n * @returns {string}\n */\n to_string() {\n let deferred1_0;\n let deferred1_1;\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n wasm.privatekey_to_string(retptr, this.__wbg_ptr);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n deferred1_0 = r0;\n deferred1_1 = r1;\n return getStringFromWasm0(r0, r1);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);\n }\n }\n /**\n * Get the view key corresponding to the private key\n *\n * @returns {ViewKey}\n * @returns {ViewKey}\n */\n to_view_key() {\n const ret = wasm.privatekey_to_view_key(this.__wbg_ptr);\n return ViewKey.__wrap(ret);\n }\n /**\n * Get the address corresponding to the private key\n *\n * @returns {Address}\n * @returns {Address}\n */\n to_address() {\n const ret = wasm.privatekey_to_address(this.__wbg_ptr);\n return Address.__wrap(ret);\n }\n /**\n * Sign a message with the private key\n *\n * @param {Uint8Array} Byte array representing a message signed by the address\n * @returns {Signature} Signature generated by signing the message with the address\n * @param {Uint8Array} message\n * @returns {Signature}\n */\n sign(message) {\n const ptr0 = passArray8ToWasm0(message, wasm.__wbindgen_malloc);\n const len0 = WASM_VECTOR_LEN;\n const ret = wasm.privatekey_sign(this.__wbg_ptr, ptr0, len0);\n return Signature.__wrap(ret);\n }\n /**\n * Get a new randomly generated private key ciphertext using a secret. The secret is sensitive\n * and will be needed to decrypt the private key later, so it should be stored securely\n *\n * @param {string} secret Secret used to encrypt the private key\n * @returns {PrivateKeyCiphertext | Error} Ciphertext representation of the private key\n * @param {string} secret\n * @returns {PrivateKeyCiphertext}\n */\n static newEncrypted(secret) {\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n const ptr0 = passStringToWasm0(secret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n wasm.privatekey_newEncrypted(retptr, ptr0, len0);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n var r2 = getInt32Memory0()[retptr / 4 + 2];\n if (r2) {\n throw takeObject(r1);\n }\n return PrivateKeyCiphertext.__wrap(r0);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n }\n }\n /**\n * Encrypt an existing private key with a secret. The secret is sensitive and will be needed to\n * decrypt the private key later, so it should be stored securely\n *\n * @param {string} secret Secret used to encrypt the private key\n * @returns {PrivateKeyCiphertext | Error} Ciphertext representation of the private key\n * @param {string} secret\n * @returns {PrivateKeyCiphertext}\n */\n toCiphertext(secret) {\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n const ptr0 = passStringToWasm0(secret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n wasm.privatekey_toCiphertext(retptr, this.__wbg_ptr, ptr0, len0);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n var r2 = getInt32Memory0()[retptr / 4 + 2];\n if (r2) {\n throw takeObject(r1);\n }\n return PrivateKeyCiphertext.__wrap(r0);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n }\n }\n /**\n * Get private key from a private key ciphertext and secret originally used to encrypt it\n *\n * @param {PrivateKeyCiphertext} ciphertext Ciphertext representation of the private key\n * @param {string} secret Secret originally used to encrypt the private key\n * @returns {PrivateKey | Error} Private key\n * @param {PrivateKeyCiphertext} ciphertext\n * @param {string} secret\n * @returns {PrivateKey}\n */\n static fromPrivateKeyCiphertext(ciphertext, secret) {\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n _assertClass(ciphertext, PrivateKeyCiphertext);\n const ptr0 = passStringToWasm0(secret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n wasm.privatekey_fromPrivateKeyCiphertext(retptr, ciphertext.__wbg_ptr, ptr0, len0);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n var r2 = getInt32Memory0()[retptr / 4 + 2];\n if (r2) {\n throw takeObject(r1);\n }\n return PrivateKey.__wrap(r0);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n }\n }\n}\n\nconst PrivateKeyCiphertextFinalization = (typeof FinalizationRegistry === 'undefined')\n ? { register: () => {}, unregister: () => {} }\n : new FinalizationRegistry(ptr => wasm.__wbg_privatekeyciphertext_free(ptr >>> 0));\n/**\n* Private Key in ciphertext form\n*/\nclass PrivateKeyCiphertext {\n\n static __wrap(ptr) {\n ptr = ptr >>> 0;\n const obj = Object.create(PrivateKeyCiphertext.prototype);\n obj.__wbg_ptr = ptr;\n PrivateKeyCiphertextFinalization.register(obj, obj.__wbg_ptr, obj);\n return obj;\n }\n\n __destroy_into_raw() {\n const ptr = this.__wbg_ptr;\n this.__wbg_ptr = 0;\n PrivateKeyCiphertextFinalization.unregister(this);\n return ptr;\n }\n\n free() {\n const ptr = this.__destroy_into_raw();\n wasm.__wbg_privatekeyciphertext_free(ptr);\n }\n /**\n * Encrypt a private key using a secret string. The secret is sensitive and will be needed to\n * decrypt the private key later, so it should be stored securely\n *\n * @param {PrivateKey} private_key Private key to encrypt\n * @param {string} secret Secret to encrypt the private key with\n * @returns {PrivateKeyCiphertext | Error} Private key ciphertext\n * @param {PrivateKey} private_key\n * @param {string} secret\n * @returns {PrivateKeyCiphertext}\n */\n static encryptPrivateKey(private_key, secret) {\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n _assertClass(private_key, PrivateKey);\n const ptr0 = passStringToWasm0(secret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n wasm.privatekey_toCiphertext(retptr, private_key.__wbg_ptr, ptr0, len0);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n var r2 = getInt32Memory0()[retptr / 4 + 2];\n if (r2) {\n throw takeObject(r1);\n }\n return PrivateKeyCiphertext.__wrap(r0);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n }\n }\n /**\n * Decrypts a private ciphertext using a secret string. This must be the same secret used to\n * encrypt the private key\n *\n * @param {string} secret Secret used to encrypt the private key\n * @returns {PrivateKey | Error} Private key\n * @param {string} secret\n * @returns {PrivateKey}\n */\n decryptToPrivateKey(secret) {\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n const ptr0 = passStringToWasm0(secret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n wasm.privatekeyciphertext_decryptToPrivateKey(retptr, this.__wbg_ptr, ptr0, len0);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n var r2 = getInt32Memory0()[retptr / 4 + 2];\n if (r2) {\n throw takeObject(r1);\n }\n return PrivateKey.__wrap(r0);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n }\n }\n /**\n * Returns the ciphertext string\n *\n * @returns {string} Ciphertext string\n * @returns {string}\n */\n toString() {\n let deferred1_0;\n let deferred1_1;\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n wasm.privatekeyciphertext_toString(retptr, this.__wbg_ptr);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n deferred1_0 = r0;\n deferred1_1 = r1;\n return getStringFromWasm0(r0, r1);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);\n }\n }\n /**\n * Creates a PrivateKeyCiphertext from a string\n *\n * @param {string} ciphertext Ciphertext string\n * @returns {PrivateKeyCiphertext | Error} Private key ciphertext\n * @param {string} ciphertext\n * @returns {PrivateKeyCiphertext}\n */\n static fromString(ciphertext) {\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n const ptr0 = passStringToWasm0(ciphertext, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n wasm.privatekeyciphertext_fromString(retptr, ptr0, len0);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n var r2 = getInt32Memory0()[retptr / 4 + 2];\n if (r2) {\n throw takeObject(r1);\n }\n return PrivateKeyCiphertext.__wrap(r0);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n }\n }\n}\n\nconst ProgramFinalization = (typeof FinalizationRegistry === 'undefined')\n ? { register: () => {}, unregister: () => {} }\n : new FinalizationRegistry(ptr => wasm.__wbg_program_free(ptr >>> 0));\n/**\n* Webassembly Representation of an Aleo program\n*/\nclass Program {\n\n static __wrap(ptr) {\n ptr = ptr >>> 0;\n const obj = Object.create(Program.prototype);\n obj.__wbg_ptr = ptr;\n ProgramFinalization.register(obj, obj.__wbg_ptr, obj);\n return obj;\n }\n\n __destroy_into_raw() {\n const ptr = this.__wbg_ptr;\n this.__wbg_ptr = 0;\n ProgramFinalization.unregister(this);\n return ptr;\n }\n\n free() {\n const ptr = this.__destroy_into_raw();\n wasm.__wbg_program_free(ptr);\n }\n /**\n * Create a program from a program string\n *\n * @param {string} program Aleo program source code\n * @returns {Program | Error} Program object\n * @param {string} program\n * @returns {Program}\n */\n static fromString(program) {\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n const ptr0 = passStringToWasm0(program, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n wasm.program_fromString(retptr, ptr0, len0);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n var r2 = getInt32Memory0()[retptr / 4 + 2];\n if (r2) {\n throw takeObject(r1);\n }\n return Program.__wrap(r0);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n }\n }\n /**\n * Get a string representation of the program\n *\n * @returns {string} String containing the program source code\n * @returns {string}\n */\n toString() {\n let deferred1_0;\n let deferred1_1;\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n wasm.program_toString(retptr, this.__wbg_ptr);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n deferred1_0 = r0;\n deferred1_1 = r1;\n return getStringFromWasm0(r0, r1);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);\n }\n }\n /**\n * Determine if a function is present in the program\n *\n * @param {string} functionName Name of the function to check for\n * @returns {boolean} True if the program is valid, false otherwise\n * @param {string} function_name\n * @returns {boolean}\n */\n hasFunction(function_name) {\n const ptr0 = passStringToWasm0(function_name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n const ret = wasm.program_hasFunction(this.__wbg_ptr, ptr0, len0);\n return ret !== 0;\n }\n /**\n * Get javascript array of functions names in the program\n *\n * @returns {Array} Array of all function names present in the program\n *\n * @example\n * const expected_functions = [\n * \"mint\",\n * \"transfer_private\",\n * \"transfer_private_to_public\",\n * \"transfer_public\",\n * \"transfer_public_to_private\",\n * \"join\",\n * \"split\",\n * \"fee\"\n * ]\n *\n * const credits_program = aleo_wasm.Program.getCreditsProgram();\n * const credits_functions = credits_program.getFunctions();\n * console.log(credits_functions === expected_functions); // Output should be \"true\"\n * @returns {Array}\n */\n getFunctions() {\n const ret = wasm.program_getFunctions(this.__wbg_ptr);\n return takeObject(ret);\n }\n /**\n * Get a javascript object representation of the function inputs and types. This can be used\n * to generate a web form to capture user inputs for an execution of a function.\n *\n * @param {string} function_name Name of the function to get inputs for\n * @returns {Array | Error} Array of function inputs\n *\n * @example\n * const expected_inputs = [\n * {\n * type:\"record\",\n * visibility:\"private\",\n * record:\"credits\",\n * members:[\n * {\n * name:\"microcredits\",\n * type:\"u64\",\n * visibility:\"private\"\n * }\n * ],\n * register:\"r0\"\n * },\n * {\n * type:\"address\",\n * visibility:\"private\",\n * register:\"r1\"\n * },\n * {\n * type:\"u64\",\n * visibility:\"private\",\n * register:\"r2\"\n * }\n * ];\n *\n * const credits_program = aleo_wasm.Program.getCreditsProgram();\n * const transfer_function_inputs = credits_program.getFunctionInputs(\"transfer_private\");\n * console.log(transfer_function_inputs === expected_inputs); // Output should be \"true\"\n * @param {string} function_name\n * @returns {Array}\n */\n getFunctionInputs(function_name) {\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n const ptr0 = passStringToWasm0(function_name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n wasm.program_getFunctionInputs(retptr, this.__wbg_ptr, ptr0, len0);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n var r2 = getInt32Memory0()[retptr / 4 + 2];\n if (r2) {\n throw takeObject(r1);\n }\n return takeObject(r0);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n }\n }\n /**\n * Get a the list of a program's mappings and the names/types of their keys and values.\n *\n * @returns {Array | Error} - An array of objects representing the mappings in the program\n * @example\n * const expected_mappings = [\n * {\n * name: \"account\",\n * key_name: \"owner\",\n * key_type: \"address\",\n * value_name: \"microcredits\",\n * value_type: \"u64\"\n * }\n * ]\n *\n * const credits_program = aleo_wasm.Program.getCreditsProgram();\n * const credits_mappings = credits_program.getMappings();\n * console.log(credits_mappings === expected_mappings); // Output should be \"true\"\n * @returns {Array}\n */\n getMappings() {\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n wasm.program_getMappings(retptr, this.__wbg_ptr);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n var r2 = getInt32Memory0()[retptr / 4 + 2];\n if (r2) {\n throw takeObject(r1);\n }\n return takeObject(r0);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n }\n }\n /**\n * Get a javascript object representation of a program record and its types\n *\n * @param {string} record_name Name of the record to get members for\n * @returns {Object | Error} Object containing the record name, type, and members\n *\n * @example\n *\n * const expected_record = {\n * type: \"record\",\n * record: \"Credits\",\n * members: [\n * {\n * name: \"owner\",\n * type: \"address\",\n * visibility: \"private\"\n * },\n * {\n * name: \"microcredits\",\n * type: \"u64\",\n * visibility: \"private\"\n * }\n * ];\n * };\n *\n * const credits_program = aleo_wasm.Program.getCreditsProgram();\n * const credits_record = credits_program.getRecordMembers(\"Credits\");\n * console.log(credits_record === expected_record); // Output should be \"true\"\n * @param {string} record_name\n * @returns {object}\n */\n getRecordMembers(record_name) {\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n const ptr0 = passStringToWasm0(record_name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n wasm.program_getRecordMembers(retptr, this.__wbg_ptr, ptr0, len0);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n var r2 = getInt32Memory0()[retptr / 4 + 2];\n if (r2) {\n throw takeObject(r1);\n }\n return takeObject(r0);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n }\n }\n /**\n * Get a javascript object representation of a program struct and its types\n *\n * @param {string} struct_name Name of the struct to get members for\n * @returns {Array | Error} Array containing the struct members\n *\n * @example\n *\n * const STRUCT_PROGRAM = \"program token_issue.aleo;\n *\n * struct token_metadata:\n * network as u32;\n * version as u32;\n *\n * struct token:\n * token_id as u32;\n * metadata as token_metadata;\n *\n * function no_op:\n * input r0 as u64;\n * output r0 as u64;\"\n *\n * const expected_struct_members = [\n * {\n * name: \"token_id\",\n * type: \"u32\",\n * },\n * {\n * name: \"metadata\",\n * type: \"struct\",\n * struct_id: \"token_metadata\",\n * members: [\n * {\n * name: \"network\",\n * type: \"u32\",\n * }\n * {\n * name: \"version\",\n * type: \"u32\",\n * }\n * ]\n * }\n * ];\n *\n * const program = aleo_wasm.Program.fromString(STRUCT_PROGRAM);\n * const struct_members = program.getStructMembers(\"token\");\n * console.log(struct_members === expected_struct_members); // Output should be \"true\"\n * @param {string} struct_name\n * @returns {Array}\n */\n getStructMembers(struct_name) {\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n const ptr0 = passStringToWasm0(struct_name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n wasm.program_getStructMembers(retptr, this.__wbg_ptr, ptr0, len0);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n var r2 = getInt32Memory0()[retptr / 4 + 2];\n if (r2) {\n throw takeObject(r1);\n }\n return takeObject(r0);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n }\n }\n /**\n * Get the credits.aleo program\n *\n * @returns {Program} The credits.aleo program\n * @returns {Program}\n */\n static getCreditsProgram() {\n const ret = wasm.program_getCreditsProgram();\n return Program.__wrap(ret);\n }\n /**\n * Get the id of the program\n *\n * @returns {string} The id of the program\n * @returns {string}\n */\n id() {\n let deferred1_0;\n let deferred1_1;\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n wasm.program_id(retptr, this.__wbg_ptr);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n deferred1_0 = r0;\n deferred1_1 = r1;\n return getStringFromWasm0(r0, r1);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);\n }\n }\n /**\n * Get a unique address of the program\n *\n * @returns {Address} The address of the program\n * @returns {Address}\n */\n address() {\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n wasm.program_address(retptr, this.__wbg_ptr);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n var r2 = getInt32Memory0()[retptr / 4 + 2];\n if (r2) {\n throw takeObject(r1);\n }\n return Address.__wrap(r0);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n }\n }\n /**\n * Determine equality with another program\n *\n * @param {Program} other The other program to compare\n * @returns {boolean} True if the programs are equal, false otherwise\n * @param {Program} other\n * @returns {boolean}\n */\n isEqual(other) {\n _assertClass(other, Program);\n const ret = wasm.program_isEqual(this.__wbg_ptr, other.__wbg_ptr);\n return ret !== 0;\n }\n /**\n * Get program_imports\n *\n * @returns {Array} The program imports\n *\n * @example\n *\n * const DOUBLE_TEST = \"import multiply_test.aleo;\n *\n * program double_test.aleo;\n *\n * function double_it:\n * input r0 as u32.private;\n * call multiply_test.aleo/multiply 2u32 r0 into r1;\n * output r1 as u32.private;\";\n *\n * const expected_imports = [\n * \"multiply_test.aleo\"\n * ];\n *\n * const program = aleo_wasm.Program.fromString(DOUBLE_TEST_PROGRAM);\n * const imports = program.getImports();\n * console.log(imports === expected_imports); // Output should be \"true\"\n * @returns {Array}\n */\n getImports() {\n const ret = wasm.program_getImports(this.__wbg_ptr);\n return takeObject(ret);\n }\n}\n\nconst ProgramManagerFinalization = (typeof FinalizationRegistry === 'undefined')\n ? { register: () => {}, unregister: () => {} }\n : new FinalizationRegistry(ptr => wasm.__wbg_programmanager_free(ptr >>> 0));\n/**\n*/\nclass ProgramManager {\n\n __destroy_into_raw() {\n const ptr = this.__wbg_ptr;\n this.__wbg_ptr = 0;\n ProgramManagerFinalization.unregister(this);\n return ptr;\n }\n\n free() {\n const ptr = this.__destroy_into_raw();\n wasm.__wbg_programmanager_free(ptr);\n }\n /**\n * Deploy an Aleo program\n *\n * @param private_key The private key of the sender\n * @param program The source code of the program being deployed\n * @param imports A javascript object holding the source code of any imported programs in the\n * form \\{\"program_name1\": \"program_source_code\", \"program_name2\": \"program_source_code\", ..\\}.\n * Note that all imported programs must be deployed on chain before the main program in order\n * for the deployment to succeed\n * @param fee_credits The amount of credits to pay as a fee\n * @param fee_record The record to spend the fee from\n * @param url The url of the Aleo network node to send the transaction to\n * @param imports (optional) Provide a list of imports to use for the program deployment in the\n * form of a javascript object where the keys are a string of the program name and the values\n * are a string representing the program source code \\{ \"hello.aleo\": \"hello.aleo source code\" \\}\n * @param fee_proving_key (optional) Provide a proving key to use for the fee execution\n * @param fee_verifying_key (optional) Provide a verifying key to use for the fee execution\n * @returns {Transaction | Error}\n * @param {PrivateKey} private_key\n * @param {string} program\n * @param {number} fee_credits\n * @param {RecordPlaintext | undefined} [fee_record]\n * @param {string | undefined} [url]\n * @param {object | undefined} [imports]\n * @param {ProvingKey | undefined} [fee_proving_key]\n * @param {VerifyingKey | undefined} [fee_verifying_key]\n * @param {OfflineQuery | undefined} [offline_query]\n * @returns {Promise}\n */\n static buildDeploymentTransaction(private_key, program, fee_credits, fee_record, url, imports, fee_proving_key, fee_verifying_key, offline_query) {\n _assertClass(private_key, PrivateKey);\n const ptr0 = passStringToWasm0(program, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n let ptr1 = 0;\n if (!isLikeNone(fee_record)) {\n _assertClass(fee_record, RecordPlaintext);\n ptr1 = fee_record.__destroy_into_raw();\n }\n var ptr2 = isLikeNone(url) ? 0 : passStringToWasm0(url, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n var len2 = WASM_VECTOR_LEN;\n let ptr3 = 0;\n if (!isLikeNone(fee_proving_key)) {\n _assertClass(fee_proving_key, ProvingKey);\n ptr3 = fee_proving_key.__destroy_into_raw();\n }\n let ptr4 = 0;\n if (!isLikeNone(fee_verifying_key)) {\n _assertClass(fee_verifying_key, VerifyingKey);\n ptr4 = fee_verifying_key.__destroy_into_raw();\n }\n let ptr5 = 0;\n if (!isLikeNone(offline_query)) {\n _assertClass(offline_query, OfflineQuery);\n ptr5 = offline_query.__destroy_into_raw();\n }\n const ret = wasm.programmanager_buildDeploymentTransaction(private_key.__wbg_ptr, ptr0, len0, fee_credits, ptr1, ptr2, len2, isLikeNone(imports) ? 0 : addHeapObject(imports), ptr3, ptr4, ptr5);\n return takeObject(ret);\n }\n /**\n * Estimate the fee for a program deployment\n *\n * Disclaimer: Fee estimation is experimental and may not represent a correct estimate on any current or future network\n *\n * @param program The source code of the program being deployed\n * @param imports (optional) Provide a list of imports to use for the deployment fee estimation\n * in the form of a javascript object where the keys are a string of the program name and the values\n * are a string representing the program source code \\{ \"hello.aleo\": \"hello.aleo source code\" \\}\n * @returns {u64 | Error}\n * @param {string} program\n * @param {object | undefined} [imports]\n * @returns {Promise}\n */\n static estimateDeploymentFee(program, imports) {\n const ptr0 = passStringToWasm0(program, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n const ret = wasm.programmanager_estimateDeploymentFee(ptr0, len0, isLikeNone(imports) ? 0 : addHeapObject(imports));\n return takeObject(ret);\n }\n /**\n * Estimate the component of the deployment cost which comes from the fee for the program name.\n * Note that this cost does not represent the entire cost of deployment. It is additional to\n * the cost of the size (in bytes) of the deployment.\n *\n * Disclaimer: Fee estimation is experimental and may not represent a correct estimate on any current or future network\n *\n * @param name The name of the program to be deployed\n * @returns {u64 | Error}\n * @param {string} name\n * @returns {bigint}\n */\n static estimateProgramNameCost(name) {\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n const ptr0 = passStringToWasm0(name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n wasm.programmanager_estimateProgramNameCost(retptr, ptr0, len0);\n var r0 = getBigInt64Memory0()[retptr / 8 + 0];\n var r2 = getInt32Memory0()[retptr / 4 + 2];\n var r3 = getInt32Memory0()[retptr / 4 + 3];\n if (r3) {\n throw takeObject(r2);\n }\n return BigInt.asUintN(64, r0);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n }\n }\n /**\n * Execute an arbitrary function locally\n *\n * @param {PrivateKey} private_key The private key of the sender\n * @param {string} program The source code of the program being executed\n * @param {string} function The name of the function to execute\n * @param {Array} inputs A javascript array of inputs to the function\n * @param {boolean} prove_execution If true, the execution will be proven and an execution object\n * containing the proof and the encrypted inputs and outputs needed to verify the proof offline\n * will be returned.\n * @param {boolean} cache Cache the proving and verifying keys in the Execution response.\n * If this is set to 'true' the keys synthesized will be stored in the Execution Response\n * and the `ProvingKey` and `VerifyingKey` can be retrieved from the response via the `.getKeys()`\n * method.\n * @param {Object | undefined} imports (optional) Provide a list of imports to use for the function execution in the\n * form of a javascript object where the keys are a string of the program name and the values\n * are a string representing the program source code \\{ \"hello.aleo\": \"hello.aleo source code\" \\}\n * @param {ProvingKey | undefined} proving_key (optional) Provide a verifying key to use for the function execution\n * @param {VerifyingKey | undefined} verifying_key (optional) Provide a verifying key to use for the function execution\n * @param {PrivateKey} private_key\n * @param {string} program\n * @param {string} _function\n * @param {Array} inputs\n * @param {boolean} prove_execution\n * @param {boolean} cache\n * @param {object | undefined} [imports]\n * @param {ProvingKey | undefined} [proving_key]\n * @param {VerifyingKey | undefined} [verifying_key]\n * @param {string | undefined} [url]\n * @param {OfflineQuery | undefined} [offline_query]\n * @returns {Promise}\n */\n static executeFunctionOffline(private_key, program, _function, inputs, prove_execution, cache, imports, proving_key, verifying_key, url, offline_query) {\n _assertClass(private_key, PrivateKey);\n const ptr0 = passStringToWasm0(program, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n const ptr1 = passStringToWasm0(_function, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len1 = WASM_VECTOR_LEN;\n let ptr2 = 0;\n if (!isLikeNone(proving_key)) {\n _assertClass(proving_key, ProvingKey);\n ptr2 = proving_key.__destroy_into_raw();\n }\n let ptr3 = 0;\n if (!isLikeNone(verifying_key)) {\n _assertClass(verifying_key, VerifyingKey);\n ptr3 = verifying_key.__destroy_into_raw();\n }\n var ptr4 = isLikeNone(url) ? 0 : passStringToWasm0(url, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n var len4 = WASM_VECTOR_LEN;\n let ptr5 = 0;\n if (!isLikeNone(offline_query)) {\n _assertClass(offline_query, OfflineQuery);\n ptr5 = offline_query.__destroy_into_raw();\n }\n const ret = wasm.programmanager_executeFunctionOffline(private_key.__wbg_ptr, ptr0, len0, ptr1, len1, addHeapObject(inputs), prove_execution, cache, isLikeNone(imports) ? 0 : addHeapObject(imports), ptr2, ptr3, ptr4, len4, ptr5);\n return takeObject(ret);\n }\n /**\n * Execute Aleo function and create an Aleo execution transaction\n *\n * @param private_key The private key of the sender\n * @param program The source code of the program being executed\n * @param function The name of the function to execute\n * @param inputs A javascript array of inputs to the function\n * @param fee_credits The amount of credits to pay as a fee\n * @param fee_record The record to spend the fee from\n * @param url The url of the Aleo network node to send the transaction to\n * If this is set to 'true' the keys synthesized (or passed in as optional parameters via the\n * `proving_key` and `verifying_key` arguments) will be stored in the ProgramManager's memory\n * and used for subsequent transactions. If this is set to 'false' the proving and verifying\n * keys will be deallocated from memory after the transaction is executed.\n * @param imports (optional) Provide a list of imports to use for the function execution in the\n * form of a javascript object where the keys are a string of the program name and the values\n * are a string representing the program source code \\{ \"hello.aleo\": \"hello.aleo source code\" \\}\n * @param proving_key (optional) Provide a verifying key to use for the function execution\n * @param verifying_key (optional) Provide a verifying key to use for the function execution\n * @param fee_proving_key (optional) Provide a proving key to use for the fee execution\n * @param fee_verifying_key (optional) Provide a verifying key to use for the fee execution\n * @returns {Transaction | Error}\n * @param {PrivateKey} private_key\n * @param {string} program\n * @param {string} _function\n * @param {Array} inputs\n * @param {number} fee_credits\n * @param {RecordPlaintext | undefined} [fee_record]\n * @param {string | undefined} [url]\n * @param {object | undefined} [imports]\n * @param {ProvingKey | undefined} [proving_key]\n * @param {VerifyingKey | undefined} [verifying_key]\n * @param {ProvingKey | undefined} [fee_proving_key]\n * @param {VerifyingKey | undefined} [fee_verifying_key]\n * @param {OfflineQuery | undefined} [offline_query]\n * @returns {Promise}\n */\n static buildExecutionTransaction(private_key, program, _function, inputs, fee_credits, fee_record, url, imports, proving_key, verifying_key, fee_proving_key, fee_verifying_key, offline_query) {\n _assertClass(private_key, PrivateKey);\n const ptr0 = passStringToWasm0(program, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n const ptr1 = passStringToWasm0(_function, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len1 = WASM_VECTOR_LEN;\n let ptr2 = 0;\n if (!isLikeNone(fee_record)) {\n _assertClass(fee_record, RecordPlaintext);\n ptr2 = fee_record.__destroy_into_raw();\n }\n var ptr3 = isLikeNone(url) ? 0 : passStringToWasm0(url, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n var len3 = WASM_VECTOR_LEN;\n let ptr4 = 0;\n if (!isLikeNone(proving_key)) {\n _assertClass(proving_key, ProvingKey);\n ptr4 = proving_key.__destroy_into_raw();\n }\n let ptr5 = 0;\n if (!isLikeNone(verifying_key)) {\n _assertClass(verifying_key, VerifyingKey);\n ptr5 = verifying_key.__destroy_into_raw();\n }\n let ptr6 = 0;\n if (!isLikeNone(fee_proving_key)) {\n _assertClass(fee_proving_key, ProvingKey);\n ptr6 = fee_proving_key.__destroy_into_raw();\n }\n let ptr7 = 0;\n if (!isLikeNone(fee_verifying_key)) {\n _assertClass(fee_verifying_key, VerifyingKey);\n ptr7 = fee_verifying_key.__destroy_into_raw();\n }\n let ptr8 = 0;\n if (!isLikeNone(offline_query)) {\n _assertClass(offline_query, OfflineQuery);\n ptr8 = offline_query.__destroy_into_raw();\n }\n const ret = wasm.programmanager_buildExecutionTransaction(private_key.__wbg_ptr, ptr0, len0, ptr1, len1, addHeapObject(inputs), fee_credits, ptr2, ptr3, len3, isLikeNone(imports) ? 0 : addHeapObject(imports), ptr4, ptr5, ptr6, ptr7, ptr8);\n return takeObject(ret);\n }\n /**\n * Estimate Fee for Aleo function execution. Note if \"cache\" is set to true, the proving and\n * verifying keys will be stored in the ProgramManager's memory and used for subsequent\n * program executions.\n *\n * Disclaimer: Fee estimation is experimental and may not represent a correct estimate on any current or future network\n *\n * @param private_key The private key of the sender\n * @param program The source code of the program to estimate the execution fee for\n * @param function The name of the function to execute\n * @param inputs A javascript array of inputs to the function\n * @param url The url of the Aleo network node to send the transaction to\n * @param imports (optional) Provide a list of imports to use for the fee estimation in the\n * form of a javascript object where the keys are a string of the program name and the values\n * are a string representing the program source code \\{ \"hello.aleo\": \"hello.aleo source code\" \\}\n * @param proving_key (optional) Provide a verifying key to use for the fee estimation\n * @param verifying_key (optional) Provide a verifying key to use for the fee estimation\n * @returns {u64 | Error} Fee in microcredits\n * @param {PrivateKey} private_key\n * @param {string} program\n * @param {string} _function\n * @param {Array} inputs\n * @param {string | undefined} [url]\n * @param {object | undefined} [imports]\n * @param {ProvingKey | undefined} [proving_key]\n * @param {VerifyingKey | undefined} [verifying_key]\n * @param {OfflineQuery | undefined} [offline_query]\n * @returns {Promise}\n */\n static estimateExecutionFee(private_key, program, _function, inputs, url, imports, proving_key, verifying_key, offline_query) {\n _assertClass(private_key, PrivateKey);\n const ptr0 = passStringToWasm0(program, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n const ptr1 = passStringToWasm0(_function, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len1 = WASM_VECTOR_LEN;\n var ptr2 = isLikeNone(url) ? 0 : passStringToWasm0(url, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n var len2 = WASM_VECTOR_LEN;\n let ptr3 = 0;\n if (!isLikeNone(proving_key)) {\n _assertClass(proving_key, ProvingKey);\n ptr3 = proving_key.__destroy_into_raw();\n }\n let ptr4 = 0;\n if (!isLikeNone(verifying_key)) {\n _assertClass(verifying_key, VerifyingKey);\n ptr4 = verifying_key.__destroy_into_raw();\n }\n let ptr5 = 0;\n if (!isLikeNone(offline_query)) {\n _assertClass(offline_query, OfflineQuery);\n ptr5 = offline_query.__destroy_into_raw();\n }\n const ret = wasm.programmanager_estimateExecutionFee(private_key.__wbg_ptr, ptr0, len0, ptr1, len1, addHeapObject(inputs), ptr2, len2, isLikeNone(imports) ? 0 : addHeapObject(imports), ptr3, ptr4, ptr5);\n return takeObject(ret);\n }\n /**\n * Estimate the finalize fee component for executing a function. This fee is additional to the\n * size of the execution of the program in bytes. If the function does not have a finalize\n * step, then the finalize fee is 0.\n *\n * Disclaimer: Fee estimation is experimental and may not represent a correct estimate on any current or future network\n *\n * @param program The program containing the function to estimate the finalize fee for\n * @param function The function to estimate the finalize fee for\n * @returns {u64 | Error} Fee in microcredits\n * @param {string} program\n * @param {string} _function\n * @returns {bigint}\n */\n static estimateFinalizeFee(program, _function) {\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n const ptr0 = passStringToWasm0(program, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n const ptr1 = passStringToWasm0(_function, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len1 = WASM_VECTOR_LEN;\n wasm.programmanager_estimateFinalizeFee(retptr, ptr0, len0, ptr1, len1);\n var r0 = getBigInt64Memory0()[retptr / 8 + 0];\n var r2 = getInt32Memory0()[retptr / 4 + 2];\n var r3 = getInt32Memory0()[retptr / 4 + 3];\n if (r3) {\n throw takeObject(r2);\n }\n return BigInt.asUintN(64, r0);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n }\n }\n /**\n * Join two records together to create a new record with an amount of credits equal to the sum\n * of the credits of the two original records\n *\n * @param private_key The private key of the sender\n * @param record_1 The first record to combine\n * @param record_2 The second record to combine\n * @param fee_credits The amount of credits to pay as a fee\n * @param fee_record The record to spend the fee from\n * @param url The url of the Aleo network node to send the transaction to\n * @param join_proving_key (optional) Provide a proving key to use for the join function\n * @param join_verifying_key (optional) Provide a verifying key to use for the join function\n * @param fee_proving_key (optional) Provide a proving key to use for the fee execution\n * @param fee_verifying_key (optional) Provide a verifying key to use for the fee execution\n * @returns {Transaction | Error} Transaction object\n * @param {PrivateKey} private_key\n * @param {RecordPlaintext} record_1\n * @param {RecordPlaintext} record_2\n * @param {number} fee_credits\n * @param {RecordPlaintext | undefined} [fee_record]\n * @param {string | undefined} [url]\n * @param {ProvingKey | undefined} [join_proving_key]\n * @param {VerifyingKey | undefined} [join_verifying_key]\n * @param {ProvingKey | undefined} [fee_proving_key]\n * @param {VerifyingKey | undefined} [fee_verifying_key]\n * @param {OfflineQuery | undefined} [offline_query]\n * @returns {Promise}\n */\n static buildJoinTransaction(private_key, record_1, record_2, fee_credits, fee_record, url, join_proving_key, join_verifying_key, fee_proving_key, fee_verifying_key, offline_query) {\n _assertClass(private_key, PrivateKey);\n _assertClass(record_1, RecordPlaintext);\n var ptr0 = record_1.__destroy_into_raw();\n _assertClass(record_2, RecordPlaintext);\n var ptr1 = record_2.__destroy_into_raw();\n let ptr2 = 0;\n if (!isLikeNone(fee_record)) {\n _assertClass(fee_record, RecordPlaintext);\n ptr2 = fee_record.__destroy_into_raw();\n }\n var ptr3 = isLikeNone(url) ? 0 : passStringToWasm0(url, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n var len3 = WASM_VECTOR_LEN;\n let ptr4 = 0;\n if (!isLikeNone(join_proving_key)) {\n _assertClass(join_proving_key, ProvingKey);\n ptr4 = join_proving_key.__destroy_into_raw();\n }\n let ptr5 = 0;\n if (!isLikeNone(join_verifying_key)) {\n _assertClass(join_verifying_key, VerifyingKey);\n ptr5 = join_verifying_key.__destroy_into_raw();\n }\n let ptr6 = 0;\n if (!isLikeNone(fee_proving_key)) {\n _assertClass(fee_proving_key, ProvingKey);\n ptr6 = fee_proving_key.__destroy_into_raw();\n }\n let ptr7 = 0;\n if (!isLikeNone(fee_verifying_key)) {\n _assertClass(fee_verifying_key, VerifyingKey);\n ptr7 = fee_verifying_key.__destroy_into_raw();\n }\n let ptr8 = 0;\n if (!isLikeNone(offline_query)) {\n _assertClass(offline_query, OfflineQuery);\n ptr8 = offline_query.__destroy_into_raw();\n }\n const ret = wasm.programmanager_buildJoinTransaction(private_key.__wbg_ptr, ptr0, ptr1, fee_credits, ptr2, ptr3, len3, ptr4, ptr5, ptr6, ptr7, ptr8);\n return takeObject(ret);\n }\n /**\n * Split an Aleo credits record into two separate records. This function does not require a fee.\n *\n * @param private_key The private key of the sender\n * @param split_amount The amount of the credit split. This amount will be subtracted from the\n * value of the record and two new records will be created with the split amount and the remainder\n * @param amount_record The record to split\n * @param url The url of the Aleo network node to send the transaction to\n * @param split_proving_key (optional) Provide a proving key to use for the split function\n * @param split_verifying_key (optional) Provide a verifying key to use for the split function\n * @returns {Transaction | Error} Transaction object\n * @param {PrivateKey} private_key\n * @param {number} split_amount\n * @param {RecordPlaintext} amount_record\n * @param {string | undefined} [url]\n * @param {ProvingKey | undefined} [split_proving_key]\n * @param {VerifyingKey | undefined} [split_verifying_key]\n * @param {OfflineQuery | undefined} [offline_query]\n * @returns {Promise}\n */\n static buildSplitTransaction(private_key, split_amount, amount_record, url, split_proving_key, split_verifying_key, offline_query) {\n _assertClass(private_key, PrivateKey);\n _assertClass(amount_record, RecordPlaintext);\n var ptr0 = amount_record.__destroy_into_raw();\n var ptr1 = isLikeNone(url) ? 0 : passStringToWasm0(url, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n var len1 = WASM_VECTOR_LEN;\n let ptr2 = 0;\n if (!isLikeNone(split_proving_key)) {\n _assertClass(split_proving_key, ProvingKey);\n ptr2 = split_proving_key.__destroy_into_raw();\n }\n let ptr3 = 0;\n if (!isLikeNone(split_verifying_key)) {\n _assertClass(split_verifying_key, VerifyingKey);\n ptr3 = split_verifying_key.__destroy_into_raw();\n }\n let ptr4 = 0;\n if (!isLikeNone(offline_query)) {\n _assertClass(offline_query, OfflineQuery);\n ptr4 = offline_query.__destroy_into_raw();\n }\n const ret = wasm.programmanager_buildSplitTransaction(private_key.__wbg_ptr, split_amount, ptr0, ptr1, len1, ptr2, ptr3, ptr4);\n return takeObject(ret);\n }\n /**\n * Send credits from one Aleo account to another\n *\n * @param private_key The private key of the sender\n * @param amount_credits The amount of credits to send\n * @param recipient The recipient of the transaction\n * @param transfer_type The type of the transfer (options: \"private\", \"public\", \"private_to_public\", \"public_to_private\")\n * @param amount_record The record to fund the amount from\n * @param fee_credits The amount of credits to pay as a fee\n * @param fee_record The record to spend the fee from\n * @param url The url of the Aleo network node to send the transaction to\n * @param transfer_verifying_key (optional) Provide a verifying key to use for the transfer\n * function\n * @param fee_proving_key (optional) Provide a proving key to use for the fee execution\n * @param fee_verifying_key (optional) Provide a verifying key to use for the fee execution\n * @returns {Transaction | Error}\n * @param {PrivateKey} private_key\n * @param {number} amount_credits\n * @param {string} recipient\n * @param {string} transfer_type\n * @param {RecordPlaintext | undefined} amount_record\n * @param {number} fee_credits\n * @param {RecordPlaintext | undefined} [fee_record]\n * @param {string | undefined} [url]\n * @param {ProvingKey | undefined} [transfer_proving_key]\n * @param {VerifyingKey | undefined} [transfer_verifying_key]\n * @param {ProvingKey | undefined} [fee_proving_key]\n * @param {VerifyingKey | undefined} [fee_verifying_key]\n * @param {OfflineQuery | undefined} [offline_query]\n * @returns {Promise}\n */\n static buildTransferTransaction(private_key, amount_credits, recipient, transfer_type, amount_record, fee_credits, fee_record, url, transfer_proving_key, transfer_verifying_key, fee_proving_key, fee_verifying_key, offline_query) {\n _assertClass(private_key, PrivateKey);\n const ptr0 = passStringToWasm0(recipient, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n const ptr1 = passStringToWasm0(transfer_type, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len1 = WASM_VECTOR_LEN;\n let ptr2 = 0;\n if (!isLikeNone(amount_record)) {\n _assertClass(amount_record, RecordPlaintext);\n ptr2 = amount_record.__destroy_into_raw();\n }\n let ptr3 = 0;\n if (!isLikeNone(fee_record)) {\n _assertClass(fee_record, RecordPlaintext);\n ptr3 = fee_record.__destroy_into_raw();\n }\n var ptr4 = isLikeNone(url) ? 0 : passStringToWasm0(url, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n var len4 = WASM_VECTOR_LEN;\n let ptr5 = 0;\n if (!isLikeNone(transfer_proving_key)) {\n _assertClass(transfer_proving_key, ProvingKey);\n ptr5 = transfer_proving_key.__destroy_into_raw();\n }\n let ptr6 = 0;\n if (!isLikeNone(transfer_verifying_key)) {\n _assertClass(transfer_verifying_key, VerifyingKey);\n ptr6 = transfer_verifying_key.__destroy_into_raw();\n }\n let ptr7 = 0;\n if (!isLikeNone(fee_proving_key)) {\n _assertClass(fee_proving_key, ProvingKey);\n ptr7 = fee_proving_key.__destroy_into_raw();\n }\n let ptr8 = 0;\n if (!isLikeNone(fee_verifying_key)) {\n _assertClass(fee_verifying_key, VerifyingKey);\n ptr8 = fee_verifying_key.__destroy_into_raw();\n }\n let ptr9 = 0;\n if (!isLikeNone(offline_query)) {\n _assertClass(offline_query, OfflineQuery);\n ptr9 = offline_query.__destroy_into_raw();\n }\n const ret = wasm.programmanager_buildTransferTransaction(private_key.__wbg_ptr, amount_credits, ptr0, len0, ptr1, len1, ptr2, fee_credits, ptr3, ptr4, len4, ptr5, ptr6, ptr7, ptr8, ptr9);\n return takeObject(ret);\n }\n /**\n * Synthesize proving and verifying keys for a program\n *\n * @param program {string} The program source code of the program to synthesize keys for\n * @param function_id {string} The function to synthesize keys for\n * @param inputs {Array} The inputs to the function\n * @param imports {Object | undefined} The imports for the program\n * @param {PrivateKey} private_key\n * @param {string} program\n * @param {string} function_id\n * @param {Array} inputs\n * @param {object | undefined} [imports]\n * @returns {Promise}\n */\n static synthesizeKeyPair(private_key, program, function_id, inputs, imports) {\n _assertClass(private_key, PrivateKey);\n const ptr0 = passStringToWasm0(program, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n const ptr1 = passStringToWasm0(function_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len1 = WASM_VECTOR_LEN;\n const ret = wasm.programmanager_synthesizeKeyPair(private_key.__wbg_ptr, ptr0, len0, ptr1, len1, addHeapObject(inputs), isLikeNone(imports) ? 0 : addHeapObject(imports));\n return takeObject(ret);\n }\n}\n\nconst ProvingKeyFinalization = (typeof FinalizationRegistry === 'undefined')\n ? { register: () => {}, unregister: () => {} }\n : new FinalizationRegistry(ptr => wasm.__wbg_provingkey_free(ptr >>> 0));\n/**\n* Proving key for a function within an Aleo program\n*/\nclass ProvingKey {\n\n static __wrap(ptr) {\n ptr = ptr >>> 0;\n const obj = Object.create(ProvingKey.prototype);\n obj.__wbg_ptr = ptr;\n ProvingKeyFinalization.register(obj, obj.__wbg_ptr, obj);\n return obj;\n }\n\n __destroy_into_raw() {\n const ptr = this.__wbg_ptr;\n this.__wbg_ptr = 0;\n ProvingKeyFinalization.unregister(this);\n return ptr;\n }\n\n free() {\n const ptr = this.__destroy_into_raw();\n wasm.__wbg_provingkey_free(ptr);\n }\n /**\n * Verify if the proving key is for the bond_public function\n *\n * @example\n * const provingKey = ProvingKey.fromBytes(\"bond_public_proving_key.bin\");\n * provingKey.isBondPublicProver() ? console.log(\"Key verified\") : throw new Error(\"Invalid key\");\n *\n * @returns {boolean} returns true if the proving key is for the bond_public function, false if otherwise\n * @returns {boolean}\n */\n isBondPublicProver() {\n const ret = wasm.provingkey_isBondPublicProver(this.__wbg_ptr);\n return ret !== 0;\n }\n /**\n * Verify if the proving key is for the bond_validator function\n *\n * @example\n * const provingKey = ProvingKey.fromBytes(\"bond_validator_proving_key.bin\");\n * provingKey.isBondPublicProver() ? console.log(\"Key verified\") : throw new Error(\"Invalid key\");\n *\n * @returns {boolean} returns true if the proving key is for the bond_validator function, false if otherwise\n * @returns {boolean}\n */\n isBondValidatorProver() {\n const ret = wasm.provingkey_isBondValidatorProver(this.__wbg_ptr);\n return ret !== 0;\n }\n /**\n * Verify if the proving key is for the claim_unbond function\n *\n * @example\n * const provingKey = ProvingKey.fromBytes(\"claim_unbond_proving_key.bin\");\n * provingKey.isClaimUnbondProver() ? console.log(\"Key verified\") : throw new Error(\"Invalid key\");\n *\n * @returns {boolean} returns true if the proving key is for the claim_unbond function, false if otherwise\n * @returns {boolean}\n */\n isClaimUnbondPublicProver() {\n const ret = wasm.provingkey_isClaimUnbondPublicProver(this.__wbg_ptr);\n return ret !== 0;\n }\n /**\n * Verify if the proving key is for the fee_private function\n *\n * @example\n * const provingKey = ProvingKey.fromBytes(\"fee_private_proving_key.bin\");\n * provingKey.isFeePrivateProver() ? console.log(\"Key verified\") : throw new Error(\"Invalid key\");\n *\n * @returns {boolean} returns true if the proving key is for the fee_private function, false if otherwise\n * @returns {boolean}\n */\n isFeePrivateProver() {\n const ret = wasm.provingkey_isFeePrivateProver(this.__wbg_ptr);\n return ret !== 0;\n }\n /**\n * Verify if the proving key is for the fee_public function\n *\n * @example\n * const provingKey = ProvingKey.fromBytes(\"fee_public_proving_key.bin\");\n * provingKey.isFeePublicProver() ? console.log(\"Key verified\") : throw new Error(\"Invalid key\");\n *\n * @returns {boolean} returns true if the proving key is for the fee_public function, false if otherwise\n * @returns {boolean}\n */\n isFeePublicProver() {\n const ret = wasm.provingkey_isFeePublicProver(this.__wbg_ptr);\n return ret !== 0;\n }\n /**\n * Verify if the proving key is for the inclusion function\n *\n * @example\n * const provingKey = ProvingKey.fromBytes(\"inclusion_proving_key.bin\");\n * provingKey.isInclusionProver() ? console.log(\"Key verified\") : throw new Error(\"Invalid key\");\n *\n * @returns {boolean} returns true if the proving key is for the inclusion function, false if otherwise\n * @returns {boolean}\n */\n isInclusionProver() {\n const ret = wasm.provingkey_isInclusionProver(this.__wbg_ptr);\n return ret !== 0;\n }\n /**\n * Verify if the proving key is for the join function\n *\n * @example\n * const provingKey = ProvingKey.fromBytes(\"join_proving_key.bin\");\n * provingKey.isJoinProver() ? console.log(\"Key verified\") : throw new Error(\"Invalid key\");\n *\n * @returns {boolean} returns true if the proving key is for the join function, false if otherwise\n * @returns {boolean}\n */\n isJoinProver() {\n const ret = wasm.provingkey_isJoinProver(this.__wbg_ptr);\n return ret !== 0;\n }\n /**\n * Verify if the proving key is for the set_validator_state function\n *\n * @example\n * const provingKey = ProvingKey.fromBytes(\"set_validator_set_proving_key.bin\");\n * provingKey.isSetValidatorStateProver() ? console.log(\"Key verified\") : throw new Error(\"Invalid key\");\n *\n * @returns {boolean} returns true if the proving key is for the set_validator_state function, false if otherwise\n * @returns {boolean}\n */\n isSetValidatorStateProver() {\n const ret = wasm.provingkey_isSetValidatorStateProver(this.__wbg_ptr);\n return ret !== 0;\n }\n /**\n * Verify if the proving key is for the split function\n *\n * @example\n * const provingKey = ProvingKey.fromBytes(\"split_proving_key.bin\");\n * provingKey.isSplitProver() ? console.log(\"Key verified\") : throw new Error(\"Invalid key\");\n *\n * @returns {boolean} returns true if the proving key is for the split function, false if otherwise\n * @returns {boolean}\n */\n isSplitProver() {\n const ret = wasm.provingkey_isSplitProver(this.__wbg_ptr);\n return ret !== 0;\n }\n /**\n * Verify if the proving key is for the transfer_private function\n *\n * @example\n * const provingKey = ProvingKey.fromBytes(\"transfer_private_proving_key.bin\");\n * provingKey.isTransferPrivateProver() ? console.log(\"Key verified\") : throw new Error(\"Invalid key\");\n *\n * @returns {boolean} returns true if the proving key is for the transfer_private function, false if otherwise\n * @returns {boolean}\n */\n isTransferPrivateProver() {\n const ret = wasm.provingkey_isTransferPrivateProver(this.__wbg_ptr);\n return ret !== 0;\n }\n /**\n * Verify if the proving key is for the transfer_private_to_public function\n *\n * @example\n * const provingKey = ProvingKey.fromBytes(\"transfer_private_to_public_proving_key.bin\");\n * provingKey.isTransferPrivateToPublicProver() ? console.log(\"Key verified\") : throw new Error(\"Invalid key\");\n *\n * @returns {boolean} returns true if the proving key is for the transfer_private_to_public function, false if otherwise\n * @returns {boolean}\n */\n isTransferPrivateToPublicProver() {\n const ret = wasm.provingkey_isTransferPrivateToPublicProver(this.__wbg_ptr);\n return ret !== 0;\n }\n /**\n * Verify if the proving key is for the transfer_public function\n *\n * @example\n * const provingKey = ProvingKey.fromBytes(\"transfer_public_proving_key.bin\");\n * provingKey.isTransferPublicProver() ? console.log(\"Key verified\") : throw new Error(\"Invalid key\");\n *\n * @returns {boolean} returns true if the proving key is for the transfer_public function, false if otherwise\n * @returns {boolean}\n */\n isTransferPublicProver() {\n const ret = wasm.provingkey_isTransferPublicProver(this.__wbg_ptr);\n return ret !== 0;\n }\n /**\n * Verify if the proving key is for the transfer_public_as_signer function\n *\n * @example\n * const provingKey = ProvingKey.fromBytes(\"transfer_public_as_signer_proving_key.bin\");\n * provingKey.isTransferPublicAsSignerProver() ? console.log(\"Key verified\") : throw new Error(\"Invalid key\");\n *\n * @returns {boolean} returns true if the proving key is for the transfer_public function, false if otherwise\n * @returns {boolean}\n */\n isTransferPublicAsSignerProver() {\n const ret = wasm.provingkey_isTransferPublicAsSignerProver(this.__wbg_ptr);\n return ret !== 0;\n }\n /**\n * Verify if the proving key is for the transfer_public_to_private function\n *\n * @example\n * const provingKey = ProvingKey.fromBytes(\"transfer_public_to_private_proving_key.bin\");\n * provingKey.isTransferPublicToPrivateProver() ? console.log(\"Key verified\") : throw new Error(\"Invalid key\");\n *\n * @returns {boolean} returns true if the proving key is for the transfer_public_to_private function, false if otherwise\n * @returns {boolean}\n */\n isTransferPublicToPrivateProver() {\n const ret = wasm.provingkey_isTransferPublicToPrivateProver(this.__wbg_ptr);\n return ret !== 0;\n }\n /**\n * Verify if the proving key is for the unbond_public function\n *\n * @example\n * const provingKey = ProvingKey.fromBytes(\"unbond_public.bin\");\n * provingKey.isUnbondPublicProver() ? console.log(\"Key verified\") : throw new Error(\"Invalid key\");\n *\n * @returns {boolean} returns true if the proving key is for the unbond_public_prover function, false if otherwise\n * @returns {boolean}\n */\n isUnbondPublicProver() {\n const ret = wasm.provingkey_isUnbondPublicProver(this.__wbg_ptr);\n return ret !== 0;\n }\n /**\n * Return the checksum of the proving key\n *\n * @returns {string} Checksum of the proving key\n * @returns {string}\n */\n checksum() {\n let deferred1_0;\n let deferred1_1;\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n wasm.provingkey_checksum(retptr, this.__wbg_ptr);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n deferred1_0 = r0;\n deferred1_1 = r1;\n return getStringFromWasm0(r0, r1);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);\n }\n }\n /**\n * Create a copy of the proving key\n *\n * @returns {ProvingKey} A copy of the proving key\n * @returns {ProvingKey}\n */\n copy() {\n const ret = wasm.provingkey_copy(this.__wbg_ptr);\n return ProvingKey.__wrap(ret);\n }\n /**\n * Construct a new proving key from a byte array\n *\n * @param {Uint8Array} bytes Byte array representation of a proving key\n * @returns {ProvingKey | Error}\n * @param {Uint8Array} bytes\n * @returns {ProvingKey}\n */\n static fromBytes(bytes) {\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n const ptr0 = passArray8ToWasm0(bytes, wasm.__wbindgen_malloc);\n const len0 = WASM_VECTOR_LEN;\n wasm.provingkey_fromBytes(retptr, ptr0, len0);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n var r2 = getInt32Memory0()[retptr / 4 + 2];\n if (r2) {\n throw takeObject(r1);\n }\n return ProvingKey.__wrap(r0);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n }\n }\n /**\n * Create a proving key from string\n *\n * @param {string | Error} String representation of the proving key\n * @param {string} string\n * @returns {ProvingKey}\n */\n static fromString(string) {\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n const ptr0 = passStringToWasm0(string, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n wasm.provingkey_fromString(retptr, ptr0, len0);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n var r2 = getInt32Memory0()[retptr / 4 + 2];\n if (r2) {\n throw takeObject(r1);\n }\n return ProvingKey.__wrap(r0);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n }\n }\n /**\n * Return the byte representation of a proving key\n *\n * @returns {Uint8Array | Error} Byte array representation of a proving key\n * @returns {Uint8Array}\n */\n toBytes() {\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n wasm.provingkey_toBytes(retptr, this.__wbg_ptr);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n var r2 = getInt32Memory0()[retptr / 4 + 2];\n var r3 = getInt32Memory0()[retptr / 4 + 3];\n if (r3) {\n throw takeObject(r2);\n }\n var v1 = getArrayU8FromWasm0(r0, r1).slice();\n wasm.__wbindgen_free(r0, r1 * 1, 1);\n return v1;\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n }\n }\n /**\n * Get a string representation of the proving key\n *\n * @returns {string} String representation of the proving key\n * @returns {string}\n */\n toString() {\n let deferred1_0;\n let deferred1_1;\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n wasm.provingkey_toString(retptr, this.__wbg_ptr);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n deferred1_0 = r0;\n deferred1_1 = r1;\n return getStringFromWasm0(r0, r1);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);\n }\n }\n}\n\nconst RecordCiphertextFinalization = (typeof FinalizationRegistry === 'undefined')\n ? { register: () => {}, unregister: () => {} }\n : new FinalizationRegistry(ptr => wasm.__wbg_recordciphertext_free(ptr >>> 0));\n/**\n* Encrypted Aleo record\n*/\nclass RecordCiphertext {\n\n static __wrap(ptr) {\n ptr = ptr >>> 0;\n const obj = Object.create(RecordCiphertext.prototype);\n obj.__wbg_ptr = ptr;\n RecordCiphertextFinalization.register(obj, obj.__wbg_ptr, obj);\n return obj;\n }\n\n __destroy_into_raw() {\n const ptr = this.__wbg_ptr;\n this.__wbg_ptr = 0;\n RecordCiphertextFinalization.unregister(this);\n return ptr;\n }\n\n free() {\n const ptr = this.__destroy_into_raw();\n wasm.__wbg_recordciphertext_free(ptr);\n }\n /**\n * Create a record ciphertext from a string\n *\n * @param {string} record String representation of a record ciphertext\n * @returns {RecordCiphertext | Error} Record ciphertext\n * @param {string} record\n * @returns {RecordCiphertext}\n */\n static fromString(record) {\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n const ptr0 = passStringToWasm0(record, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n wasm.recordciphertext_fromString(retptr, ptr0, len0);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n var r2 = getInt32Memory0()[retptr / 4 + 2];\n if (r2) {\n throw takeObject(r1);\n }\n return RecordCiphertext.__wrap(r0);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n }\n }\n /**\n * Return the string reprensentation of the record ciphertext\n *\n * @returns {string} String representation of the record ciphertext\n * @returns {string}\n */\n toString() {\n let deferred1_0;\n let deferred1_1;\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n wasm.recordciphertext_toString(retptr, this.__wbg_ptr);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n deferred1_0 = r0;\n deferred1_1 = r1;\n return getStringFromWasm0(r0, r1);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);\n }\n }\n /**\n * Decrypt the record ciphertext into plaintext using the view key. The record will only\n * decrypt if the record was encrypted by the account corresponding to the view key\n *\n * @param {ViewKey} view_key View key used to decrypt the ciphertext\n * @returns {RecordPlaintext | Error} Record plaintext object\n * @param {ViewKey} view_key\n * @returns {RecordPlaintext}\n */\n decrypt(view_key) {\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n _assertClass(view_key, ViewKey);\n wasm.recordciphertext_decrypt(retptr, this.__wbg_ptr, view_key.__wbg_ptr);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n var r2 = getInt32Memory0()[retptr / 4 + 2];\n if (r2) {\n throw takeObject(r1);\n }\n return RecordPlaintext.__wrap(r0);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n }\n }\n /**\n * Determines if the account corresponding to the view key is the owner of the record\n *\n * @param {ViewKey} view_key View key used to decrypt the ciphertext\n * @returns {boolean}\n * @param {ViewKey} view_key\n * @returns {boolean}\n */\n isOwner(view_key) {\n _assertClass(view_key, ViewKey);\n const ret = wasm.recordciphertext_isOwner(this.__wbg_ptr, view_key.__wbg_ptr);\n return ret !== 0;\n }\n}\n\nconst RecordPlaintextFinalization = (typeof FinalizationRegistry === 'undefined')\n ? { register: () => {}, unregister: () => {} }\n : new FinalizationRegistry(ptr => wasm.__wbg_recordplaintext_free(ptr >>> 0));\n/**\n* Plaintext representation of an Aleo record\n*/\nclass RecordPlaintext {\n\n static __wrap(ptr) {\n ptr = ptr >>> 0;\n const obj = Object.create(RecordPlaintext.prototype);\n obj.__wbg_ptr = ptr;\n RecordPlaintextFinalization.register(obj, obj.__wbg_ptr, obj);\n return obj;\n }\n\n __destroy_into_raw() {\n const ptr = this.__wbg_ptr;\n this.__wbg_ptr = 0;\n RecordPlaintextFinalization.unregister(this);\n return ptr;\n }\n\n free() {\n const ptr = this.__destroy_into_raw();\n wasm.__wbg_recordplaintext_free(ptr);\n }\n /**\n * @param {string} program_id\n * @param {string} record_name\n * @returns {Field}\n */\n commitment(program_id, record_name) {\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n const ptr0 = passStringToWasm0(program_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n const ptr1 = passStringToWasm0(record_name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len1 = WASM_VECTOR_LEN;\n wasm.recordplaintext_commitment(retptr, this.__wbg_ptr, ptr0, len0, ptr1, len1);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n var r2 = getInt32Memory0()[retptr / 4 + 2];\n if (r2) {\n throw takeObject(r1);\n }\n return Field.__wrap(r0);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n }\n }\n /**\n * Return a record plaintext from a string.\n *\n * @param {string} record String representation of a plaintext representation of an Aleo record\n * @returns {RecordPlaintext | Error} Record plaintext\n * @param {string} record\n * @returns {RecordPlaintext}\n */\n static fromString(record) {\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n const ptr0 = passStringToWasm0(record, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n wasm.recordplaintext_fromString(retptr, ptr0, len0);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n var r2 = getInt32Memory0()[retptr / 4 + 2];\n if (r2) {\n throw takeObject(r1);\n }\n return RecordPlaintext.__wrap(r0);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n }\n }\n /**\n * Returns the record plaintext string\n *\n * @returns {string} String representation of the record plaintext\n * @returns {string}\n */\n toString() {\n let deferred1_0;\n let deferred1_1;\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n wasm.recordplaintext_toString(retptr, this.__wbg_ptr);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n deferred1_0 = r0;\n deferred1_1 = r1;\n return getStringFromWasm0(r0, r1);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);\n }\n }\n /**\n * Returns the amount of microcredits in the record\n *\n * @returns {u64} Amount of microcredits in the record\n * @returns {bigint}\n */\n microcredits() {\n const ret = wasm.recordplaintext_microcredits(this.__wbg_ptr);\n return BigInt.asUintN(64, ret);\n }\n /**\n * Returns the nonce of the record. This can be used to uniquely identify a record.\n *\n * @returns {string} Nonce of the record\n * @returns {string}\n */\n nonce() {\n let deferred1_0;\n let deferred1_1;\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n wasm.recordplaintext_nonce(retptr, this.__wbg_ptr);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n deferred1_0 = r0;\n deferred1_1 = r1;\n return getStringFromWasm0(r0, r1);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);\n }\n }\n /**\n * Attempt to get the serial number of a record to determine whether or not is has been spent\n *\n * @param {PrivateKey} private_key Private key of the account that owns the record\n * @param {string} program_id Program ID of the program that the record is associated with\n * @param {string} record_name Name of the record\n * @returns {string | Error} Serial number of the record\n * @param {PrivateKey} private_key\n * @param {string} program_id\n * @param {string} record_name\n * @returns {string}\n */\n serialNumberString(private_key, program_id, record_name) {\n let deferred4_0;\n let deferred4_1;\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n _assertClass(private_key, PrivateKey);\n const ptr0 = passStringToWasm0(program_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n const ptr1 = passStringToWasm0(record_name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len1 = WASM_VECTOR_LEN;\n wasm.recordplaintext_serialNumberString(retptr, this.__wbg_ptr, private_key.__wbg_ptr, ptr0, len0, ptr1, len1);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n var r2 = getInt32Memory0()[retptr / 4 + 2];\n var r3 = getInt32Memory0()[retptr / 4 + 3];\n var ptr3 = r0;\n var len3 = r1;\n if (r3) {\n ptr3 = 0; len3 = 0;\n throw takeObject(r2);\n }\n deferred4_0 = ptr3;\n deferred4_1 = len3;\n return getStringFromWasm0(ptr3, len3);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n wasm.__wbindgen_free(deferred4_0, deferred4_1, 1);\n }\n }\n}\n\nconst SignatureFinalization = (typeof FinalizationRegistry === 'undefined')\n ? { register: () => {}, unregister: () => {} }\n : new FinalizationRegistry(ptr => wasm.__wbg_signature_free(ptr >>> 0));\n/**\n* Cryptographic signature of a message signed by an Aleo account\n*/\nclass Signature {\n\n static __wrap(ptr) {\n ptr = ptr >>> 0;\n const obj = Object.create(Signature.prototype);\n obj.__wbg_ptr = ptr;\n SignatureFinalization.register(obj, obj.__wbg_ptr, obj);\n return obj;\n }\n\n __destroy_into_raw() {\n const ptr = this.__wbg_ptr;\n this.__wbg_ptr = 0;\n SignatureFinalization.unregister(this);\n return ptr;\n }\n\n free() {\n const ptr = this.__destroy_into_raw();\n wasm.__wbg_signature_free(ptr);\n }\n /**\n * Sign a message with a private key\n *\n * @param {PrivateKey} private_key The private key to sign the message with\n * @param {Uint8Array} message Byte representation of the message to sign\n * @returns {Signature} Signature of the message\n * @param {PrivateKey} private_key\n * @param {Uint8Array} message\n * @returns {Signature}\n */\n static sign(private_key, message) {\n _assertClass(private_key, PrivateKey);\n const ptr0 = passArray8ToWasm0(message, wasm.__wbindgen_malloc);\n const len0 = WASM_VECTOR_LEN;\n const ret = wasm.privatekey_sign(private_key.__wbg_ptr, ptr0, len0);\n return Signature.__wrap(ret);\n }\n /**\n * Verify a signature of a message with an address\n *\n * @param {Address} address The address to verify the signature with\n * @param {Uint8Array} message Byte representation of the message to verify\n * @returns {boolean} True if the signature is valid, false otherwise\n * @param {Address} address\n * @param {Uint8Array} message\n * @returns {boolean}\n */\n verify(address, message) {\n _assertClass(address, Address);\n const ptr0 = passArray8ToWasm0(message, wasm.__wbindgen_malloc);\n const len0 = WASM_VECTOR_LEN;\n const ret = wasm.signature_verify(this.__wbg_ptr, address.__wbg_ptr, ptr0, len0);\n return ret !== 0;\n }\n /**\n * Get a signature from a string representation of a signature\n *\n * @param {string} signature String representation of a signature\n * @returns {Signature} Signature\n * @param {string} signature\n * @returns {Signature}\n */\n static from_string(signature) {\n const ptr0 = passStringToWasm0(signature, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n const ret = wasm.signature_from_string(ptr0, len0);\n return Signature.__wrap(ret);\n }\n /**\n * Get a string representation of a signature\n *\n * @returns {string} String representation of a signature\n * @returns {string}\n */\n to_string() {\n let deferred1_0;\n let deferred1_1;\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n wasm.signature_to_string(retptr, this.__wbg_ptr);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n deferred1_0 = r0;\n deferred1_1 = r1;\n return getStringFromWasm0(r0, r1);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);\n }\n }\n}\n\nconst TransactionFinalization = (typeof FinalizationRegistry === 'undefined')\n ? { register: () => {}, unregister: () => {} }\n : new FinalizationRegistry(ptr => wasm.__wbg_transaction_free(ptr >>> 0));\n/**\n* Webassembly Representation of an Aleo transaction\n*\n* This object is created when generating an on-chain function deployment or execution and is the\n* object that should be submitted to the Aleo Network in order to deploy or execute a function.\n*/\nclass Transaction {\n\n static __wrap(ptr) {\n ptr = ptr >>> 0;\n const obj = Object.create(Transaction.prototype);\n obj.__wbg_ptr = ptr;\n TransactionFinalization.register(obj, obj.__wbg_ptr, obj);\n return obj;\n }\n\n __destroy_into_raw() {\n const ptr = this.__wbg_ptr;\n this.__wbg_ptr = 0;\n TransactionFinalization.unregister(this);\n return ptr;\n }\n\n free() {\n const ptr = this.__destroy_into_raw();\n wasm.__wbg_transaction_free(ptr);\n }\n /**\n * Create a transaction from a string\n *\n * @param {string} transaction String representation of a transaction\n * @returns {Transaction | Error}\n * @param {string} transaction\n * @returns {Transaction}\n */\n static fromString(transaction) {\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n const ptr0 = passStringToWasm0(transaction, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n wasm.transaction_fromString(retptr, ptr0, len0);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n var r2 = getInt32Memory0()[retptr / 4 + 2];\n if (r2) {\n throw takeObject(r1);\n }\n return Transaction.__wrap(r0);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n }\n }\n /**\n * Get the transaction as a string. If you want to submit this transaction to the Aleo Network\n * this function will create the string that should be submitted in the `POST` data.\n *\n * @returns {string} String representation of the transaction\n * @returns {string}\n */\n toString() {\n let deferred1_0;\n let deferred1_1;\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n wasm.transaction_toString(retptr, this.__wbg_ptr);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n deferred1_0 = r0;\n deferred1_1 = r1;\n return getStringFromWasm0(r0, r1);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);\n }\n }\n /**\n * Get the id of the transaction. This is the merkle root of the transaction's inclusion proof.\n *\n * This value can be used to query the status of the transaction on the Aleo Network to see\n * if it was successful. If successful, the transaction will be included in a block and this\n * value can be used to lookup the transaction data on-chain.\n *\n * @returns {string} Transaction id\n * @returns {string}\n */\n transactionId() {\n let deferred1_0;\n let deferred1_1;\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n wasm.transaction_transactionId(retptr, this.__wbg_ptr);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n deferred1_0 = r0;\n deferred1_1 = r1;\n return getStringFromWasm0(r0, r1);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);\n }\n }\n /**\n * Get the type of the transaction (will return \"deploy\" or \"execute\")\n *\n * @returns {string} Transaction type\n * @returns {string}\n */\n transactionType() {\n let deferred1_0;\n let deferred1_1;\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n wasm.transaction_transactionType(retptr, this.__wbg_ptr);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n deferred1_0 = r0;\n deferred1_1 = r1;\n return getStringFromWasm0(r0, r1);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);\n }\n }\n}\n\nconst VerifyingKeyFinalization = (typeof FinalizationRegistry === 'undefined')\n ? { register: () => {}, unregister: () => {} }\n : new FinalizationRegistry(ptr => wasm.__wbg_verifyingkey_free(ptr >>> 0));\n/**\n* Verifying key for a function within an Aleo program\n*/\nclass VerifyingKey {\n\n static __wrap(ptr) {\n ptr = ptr >>> 0;\n const obj = Object.create(VerifyingKey.prototype);\n obj.__wbg_ptr = ptr;\n VerifyingKeyFinalization.register(obj, obj.__wbg_ptr, obj);\n return obj;\n }\n\n __destroy_into_raw() {\n const ptr = this.__wbg_ptr;\n this.__wbg_ptr = 0;\n VerifyingKeyFinalization.unregister(this);\n return ptr;\n }\n\n free() {\n const ptr = this.__destroy_into_raw();\n wasm.__wbg_verifyingkey_free(ptr);\n }\n /**\n * Returns the verifying key for the bond_public function\n *\n * @returns {VerifyingKey} Verifying key for the bond_public function\n * @returns {VerifyingKey}\n */\n static bondPublicVerifier() {\n const ret = wasm.verifyingkey_bondPublicVerifier();\n return VerifyingKey.__wrap(ret);\n }\n /**\n * Returns the verifying key for the bond_validator function\n *\n * @returns {VerifyingKey} Verifying key for the bond_validator function\n * @returns {VerifyingKey}\n */\n static bondValidatorVerifier() {\n const ret = wasm.verifyingkey_bondValidatorVerifier();\n return VerifyingKey.__wrap(ret);\n }\n /**\n * Returns the verifying key for the claim_delegator function\n *\n * @returns {VerifyingKey} Verifying key for the claim_unbond_public function\n * @returns {VerifyingKey}\n */\n static claimUnbondPublicVerifier() {\n const ret = wasm.verifyingkey_claimUnbondPublicVerifier();\n return VerifyingKey.__wrap(ret);\n }\n /**\n * Returns the verifying key for the fee_private function\n *\n * @returns {VerifyingKey} Verifying key for the fee_private function\n * @returns {VerifyingKey}\n */\n static feePrivateVerifier() {\n const ret = wasm.verifyingkey_feePrivateVerifier();\n return VerifyingKey.__wrap(ret);\n }\n /**\n * Returns the verifying key for the fee_public function\n *\n * @returns {VerifyingKey} Verifying key for the fee_public function\n * @returns {VerifyingKey}\n */\n static feePublicVerifier() {\n const ret = wasm.verifyingkey_feePublicVerifier();\n return VerifyingKey.__wrap(ret);\n }\n /**\n * Returns the verifying key for the inclusion function\n *\n * @returns {VerifyingKey} Verifying key for the inclusion function\n * @returns {VerifyingKey}\n */\n static inclusionVerifier() {\n const ret = wasm.verifyingkey_inclusionVerifier();\n return VerifyingKey.__wrap(ret);\n }\n /**\n * Returns the verifying key for the join function\n *\n * @returns {VerifyingKey} Verifying key for the join function\n * @returns {VerifyingKey}\n */\n static joinVerifier() {\n const ret = wasm.verifyingkey_joinVerifier();\n return VerifyingKey.__wrap(ret);\n }\n /**\n * Returns the verifying key for the set_validator_state function\n *\n * @returns {VerifyingKey} Verifying key for the set_validator_state function\n * @returns {VerifyingKey}\n */\n static setValidatorStateVerifier() {\n const ret = wasm.verifyingkey_setValidatorStateVerifier();\n return VerifyingKey.__wrap(ret);\n }\n /**\n * Returns the verifying key for the split function\n *\n * @returns {VerifyingKey} Verifying key for the split function\n * @returns {VerifyingKey}\n */\n static splitVerifier() {\n const ret = wasm.verifyingkey_splitVerifier();\n return VerifyingKey.__wrap(ret);\n }\n /**\n * Returns the verifying key for the transfer_private function\n *\n * @returns {VerifyingKey} Verifying key for the transfer_private function\n * @returns {VerifyingKey}\n */\n static transferPrivateVerifier() {\n const ret = wasm.verifyingkey_transferPrivateVerifier();\n return VerifyingKey.__wrap(ret);\n }\n /**\n * Returns the verifying key for the transfer_private_to_public function\n *\n * @returns {VerifyingKey} Verifying key for the transfer_private_to_public function\n * @returns {VerifyingKey}\n */\n static transferPrivateToPublicVerifier() {\n const ret = wasm.verifyingkey_transferPrivateToPublicVerifier();\n return VerifyingKey.__wrap(ret);\n }\n /**\n * Returns the verifying key for the transfer_public function\n *\n * @returns {VerifyingKey} Verifying key for the transfer_public function\n * @returns {VerifyingKey}\n */\n static transferPublicVerifier() {\n const ret = wasm.verifyingkey_transferPublicVerifier();\n return VerifyingKey.__wrap(ret);\n }\n /**\n * Returns the verifying key for the transfer_public_as_signer function\n *\n * @returns {VerifyingKey} Verifying key for the transfer_public_as_signer function\n * @returns {VerifyingKey}\n */\n static transferPublicAsSignerVerifier() {\n const ret = wasm.verifyingkey_transferPublicAsSignerVerifier();\n return VerifyingKey.__wrap(ret);\n }\n /**\n * Returns the verifying key for the transfer_public_to_private function\n *\n * @returns {VerifyingKey} Verifying key for the transfer_public_to_private function\n * @returns {VerifyingKey}\n */\n static transferPublicToPrivateVerifier() {\n const ret = wasm.verifyingkey_transferPublicToPrivateVerifier();\n return VerifyingKey.__wrap(ret);\n }\n /**\n * Returns the verifying key for the unbond_public function\n *\n * @returns {VerifyingKey} Verifying key for the unbond_public function\n * @returns {VerifyingKey}\n */\n static unbondPublicVerifier() {\n const ret = wasm.verifyingkey_unbondPublicVerifier();\n return VerifyingKey.__wrap(ret);\n }\n /**\n * Returns the verifying key for the bond_public function\n *\n * @returns {VerifyingKey} Verifying key for the bond_public function\n * @returns {boolean}\n */\n isBondPublicVerifier() {\n const ret = wasm.verifyingkey_isBondPublicVerifier(this.__wbg_ptr);\n return ret !== 0;\n }\n /**\n * Returns the verifying key for the bond_validator function\n *\n * @returns {VerifyingKey} Verifying key for the bond_validator function\n * @returns {boolean}\n */\n isBondValidatorVerifier() {\n const ret = wasm.verifyingkey_isBondValidatorVerifier(this.__wbg_ptr);\n return ret !== 0;\n }\n /**\n * Verifies the verifying key is for the claim_delegator function\n *\n * @returns {bool}\n * @returns {boolean}\n */\n isClaimUnbondPublicVerifier() {\n const ret = wasm.verifyingkey_isClaimUnbondPublicVerifier(this.__wbg_ptr);\n return ret !== 0;\n }\n /**\n * Verifies the verifying key is for the fee_private function\n *\n * @returns {bool}\n * @returns {boolean}\n */\n isFeePrivateVerifier() {\n const ret = wasm.verifyingkey_isFeePrivateVerifier(this.__wbg_ptr);\n return ret !== 0;\n }\n /**\n * Verifies the verifying key is for the fee_public function\n *\n * @returns {bool}\n * @returns {boolean}\n */\n isFeePublicVerifier() {\n const ret = wasm.verifyingkey_isFeePublicVerifier(this.__wbg_ptr);\n return ret !== 0;\n }\n /**\n * Verifies the verifying key is for the inclusion function\n *\n * @returns {bool}\n * @returns {boolean}\n */\n isInclusionVerifier() {\n const ret = wasm.verifyingkey_isInclusionVerifier(this.__wbg_ptr);\n return ret !== 0;\n }\n /**\n * Verifies the verifying key is for the join function\n *\n * @returns {bool}\n * @returns {boolean}\n */\n isJoinVerifier() {\n const ret = wasm.verifyingkey_isJoinVerifier(this.__wbg_ptr);\n return ret !== 0;\n }\n /**\n * Verifies the verifying key is for the set_validator_state function\n *\n * @returns {bool}\n * @returns {boolean}\n */\n isSetValidatorStateVerifier() {\n const ret = wasm.verifyingkey_isSetValidatorStateVerifier(this.__wbg_ptr);\n return ret !== 0;\n }\n /**\n * Verifies the verifying key is for the split function\n *\n * @returns {bool}\n * @returns {boolean}\n */\n isSplitVerifier() {\n const ret = wasm.verifyingkey_isSplitVerifier(this.__wbg_ptr);\n return ret !== 0;\n }\n /**\n * Verifies the verifying key is for the transfer_private function\n *\n * @returns {bool}\n * @returns {boolean}\n */\n isTransferPrivateVerifier() {\n const ret = wasm.verifyingkey_isTransferPrivateVerifier(this.__wbg_ptr);\n return ret !== 0;\n }\n /**\n * Verifies the verifying key is for the transfer_private_to_public function\n *\n * @returns {bool}\n * @returns {boolean}\n */\n isTransferPrivateToPublicVerifier() {\n const ret = wasm.verifyingkey_isTransferPrivateToPublicVerifier(this.__wbg_ptr);\n return ret !== 0;\n }\n /**\n * Verifies the verifying key is for the transfer_public function\n *\n * @returns {bool}\n * @returns {boolean}\n */\n isTransferPublicVerifier() {\n const ret = wasm.verifyingkey_isTransferPublicVerifier(this.__wbg_ptr);\n return ret !== 0;\n }\n /**\n * Verifies the verifying key is for the transfer_public_as_signer function\n *\n * @returns {bool}\n * @returns {boolean}\n */\n isTransferPublicAsSignerVerifier() {\n const ret = wasm.verifyingkey_isTransferPublicAsSignerVerifier(this.__wbg_ptr);\n return ret !== 0;\n }\n /**\n * Verifies the verifying key is for the transfer_public_to_private function\n *\n * @returns {bool}\n * @returns {boolean}\n */\n isTransferPublicToPrivateVerifier() {\n const ret = wasm.verifyingkey_isTransferPublicToPrivateVerifier(this.__wbg_ptr);\n return ret !== 0;\n }\n /**\n * Verifies the verifying key is for the unbond_public function\n *\n * @returns {bool}\n * @returns {boolean}\n */\n isUnbondPublicVerifier() {\n const ret = wasm.verifyingkey_isUnbondPublicVerifier(this.__wbg_ptr);\n return ret !== 0;\n }\n /**\n * Get the checksum of the verifying key\n *\n * @returns {string} Checksum of the verifying key\n * @returns {string}\n */\n checksum() {\n let deferred1_0;\n let deferred1_1;\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n wasm.verifyingkey_checksum(retptr, this.__wbg_ptr);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n deferred1_0 = r0;\n deferred1_1 = r1;\n return getStringFromWasm0(r0, r1);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);\n }\n }\n /**\n * Create a copy of the verifying key\n *\n * @returns {VerifyingKey} A copy of the verifying key\n * @returns {VerifyingKey}\n */\n copy() {\n const ret = wasm.verifyingkey_copy(this.__wbg_ptr);\n return VerifyingKey.__wrap(ret);\n }\n /**\n * Construct a new verifying key from a byte array\n *\n * @param {Uint8Array} bytes Byte representation of a verifying key\n * @returns {VerifyingKey | Error}\n * @param {Uint8Array} bytes\n * @returns {VerifyingKey}\n */\n static fromBytes(bytes) {\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n const ptr0 = passArray8ToWasm0(bytes, wasm.__wbindgen_malloc);\n const len0 = WASM_VECTOR_LEN;\n wasm.verifyingkey_fromBytes(retptr, ptr0, len0);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n var r2 = getInt32Memory0()[retptr / 4 + 2];\n if (r2) {\n throw takeObject(r1);\n }\n return VerifyingKey.__wrap(r0);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n }\n }\n /**\n * Create a verifying key from string\n *\n * @param {String} string String representation of a verifying key\n * @returns {VerifyingKey | Error}\n * @param {string} string\n * @returns {VerifyingKey}\n */\n static fromString(string) {\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n const ptr0 = passStringToWasm0(string, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n wasm.verifyingkey_fromString(retptr, ptr0, len0);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n var r2 = getInt32Memory0()[retptr / 4 + 2];\n if (r2) {\n throw takeObject(r1);\n }\n return VerifyingKey.__wrap(r0);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n }\n }\n /**\n * Create a byte array from a verifying key\n *\n * @returns {Uint8Array | Error} Byte representation of a verifying key\n * @returns {Uint8Array}\n */\n toBytes() {\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n wasm.verifyingkey_toBytes(retptr, this.__wbg_ptr);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n var r2 = getInt32Memory0()[retptr / 4 + 2];\n var r3 = getInt32Memory0()[retptr / 4 + 3];\n if (r3) {\n throw takeObject(r2);\n }\n var v1 = getArrayU8FromWasm0(r0, r1).slice();\n wasm.__wbindgen_free(r0, r1 * 1, 1);\n return v1;\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n }\n }\n /**\n * Get a string representation of the verifying key\n *\n * @returns {String} String representation of the verifying key\n * @returns {string}\n */\n toString() {\n let deferred1_0;\n let deferred1_1;\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n wasm.verifyingkey_toString(retptr, this.__wbg_ptr);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n deferred1_0 = r0;\n deferred1_1 = r1;\n return getStringFromWasm0(r0, r1);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);\n }\n }\n}\n\nconst ViewKeyFinalization = (typeof FinalizationRegistry === 'undefined')\n ? { register: () => {}, unregister: () => {} }\n : new FinalizationRegistry(ptr => wasm.__wbg_viewkey_free(ptr >>> 0));\n/**\n*/\nclass ViewKey {\n\n static __wrap(ptr) {\n ptr = ptr >>> 0;\n const obj = Object.create(ViewKey.prototype);\n obj.__wbg_ptr = ptr;\n ViewKeyFinalization.register(obj, obj.__wbg_ptr, obj);\n return obj;\n }\n\n __destroy_into_raw() {\n const ptr = this.__wbg_ptr;\n this.__wbg_ptr = 0;\n ViewKeyFinalization.unregister(this);\n return ptr;\n }\n\n free() {\n const ptr = this.__destroy_into_raw();\n wasm.__wbg_viewkey_free(ptr);\n }\n /**\n * Create a new view key from a private key\n *\n * @param {PrivateKey} private_key Private key\n * @returns {ViewKey} View key\n * @param {PrivateKey} private_key\n * @returns {ViewKey}\n */\n static from_private_key(private_key) {\n _assertClass(private_key, PrivateKey);\n const ret = wasm.privatekey_to_view_key(private_key.__wbg_ptr);\n return ViewKey.__wrap(ret);\n }\n /**\n * Create a new view key from a string representation of a view key\n *\n * @param {string} view_key String representation of a view key\n * @returns {ViewKey} View key\n * @param {string} view_key\n * @returns {ViewKey}\n */\n static from_string(view_key) {\n const ptr0 = passStringToWasm0(view_key, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n const ret = wasm.viewkey_from_string(ptr0, len0);\n return ViewKey.__wrap(ret);\n }\n /**\n * Get a string representation of a view key\n *\n * @returns {string} String representation of a view key\n * @returns {string}\n */\n to_string() {\n let deferred1_0;\n let deferred1_1;\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n wasm.viewkey_to_string(retptr, this.__wbg_ptr);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n deferred1_0 = r0;\n deferred1_1 = r1;\n return getStringFromWasm0(r0, r1);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);\n }\n }\n /**\n * Get the address corresponding to a view key\n *\n * @returns {Address} Address\n * @returns {Address}\n */\n to_address() {\n const ret = wasm.address_from_view_key(this.__wbg_ptr);\n return Address.__wrap(ret);\n }\n /**\n * Decrypt a record ciphertext with a view key\n *\n * @param {string} ciphertext String representation of a record ciphertext\n * @returns {string} String representation of a record plaintext\n * @param {string} ciphertext\n * @returns {string}\n */\n decrypt(ciphertext) {\n let deferred3_0;\n let deferred3_1;\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n const ptr0 = passStringToWasm0(ciphertext, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n wasm.viewkey_decrypt(retptr, this.__wbg_ptr, ptr0, len0);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n var r2 = getInt32Memory0()[retptr / 4 + 2];\n var r3 = getInt32Memory0()[retptr / 4 + 3];\n var ptr2 = r0;\n var len2 = r1;\n if (r3) {\n ptr2 = 0; len2 = 0;\n throw takeObject(r2);\n }\n deferred3_0 = ptr2;\n deferred3_1 = len2;\n return getStringFromWasm0(ptr2, len2);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n wasm.__wbindgen_free(deferred3_0, deferred3_1, 1);\n }\n }\n}\n\nasync function __wbg_load(module, imports) {\n if (typeof Response === 'function' && module instanceof Response) {\n if (typeof WebAssembly.instantiateStreaming === 'function') {\n try {\n return await WebAssembly.instantiateStreaming(module, imports);\n\n } catch (e) {\n if (module.headers.get('Content-Type') != 'application/wasm') {\n console.warn(\"`WebAssembly.instantiateStreaming` failed because your server does not serve wasm with `application/wasm` MIME type. Falling back to `WebAssembly.instantiate` which is slower. Original error:\\n\", e);\n\n } else {\n throw e;\n }\n }\n }\n\n const bytes = await module.arrayBuffer();\n return await WebAssembly.instantiate(bytes, imports);\n\n } else {\n const instance = await WebAssembly.instantiate(module, imports);\n\n if (instance instanceof WebAssembly.Instance) {\n return { instance, module };\n\n } else {\n return instance;\n }\n }\n}\n\nfunction __wbg_get_imports() {\n const imports = {};\n imports.wbg = {};\n imports.wbg.__wbindgen_object_drop_ref = function(arg0) {\n takeObject(arg0);\n };\n imports.wbg.__wbg_new_71801a555ad9f2aa = function() { return handleError(function () {\n const ret = new XMLHttpRequest();\n return addHeapObject(ret);\n }, arguments) };\n imports.wbg.__wbg_overrideMimeType_ee9c51919ceb418b = function() { return handleError(function (arg0, arg1, arg2) {\n getObject(arg0).overrideMimeType(getStringFromWasm0(arg1, arg2));\n }, arguments) };\n imports.wbg.__wbg_open_c9eb0cf2c9d95679 = function() { return handleError(function (arg0, arg1, arg2, arg3, arg4, arg5) {\n getObject(arg0).open(getStringFromWasm0(arg1, arg2), getStringFromWasm0(arg3, arg4), arg5 !== 0);\n }, arguments) };\n imports.wbg.__wbg_send_80d29985093c1ec5 = function() { return handleError(function (arg0) {\n getObject(arg0).send();\n }, arguments) };\n imports.wbg.__wbg_response_7c2e2759084f7279 = function() { return handleError(function (arg0) {\n const ret = getObject(arg0).response;\n return addHeapObject(ret);\n }, arguments) };\n imports.wbg.__wbg_status_d485fb5a478426fb = function() { return handleError(function (arg0) {\n const ret = getObject(arg0).status;\n return ret;\n }, arguments) };\n imports.wbg.__wbg_new_72fb9a18b5ae2624 = function() {\n const ret = new Object();\n return addHeapObject(ret);\n };\n imports.wbg.__wbindgen_string_new = function(arg0, arg1) {\n const ret = getStringFromWasm0(arg0, arg1);\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_set_1f9b04f170055d33 = function() { return handleError(function (arg0, arg1, arg2) {\n const ret = Reflect.set(getObject(arg0), getObject(arg1), getObject(arg2));\n return ret;\n }, arguments) };\n imports.wbg.__wbg_new_ab6fd82b10560829 = function() { return handleError(function () {\n const ret = new Headers();\n return addHeapObject(ret);\n }, arguments) };\n imports.wbg.__wbindgen_object_clone_ref = function(arg0) {\n const ret = getObject(arg0);\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_new_0d76b0581eca6298 = function() { return handleError(function () {\n const ret = new AbortController();\n return addHeapObject(ret);\n }, arguments) };\n imports.wbg.__wbg_signal_a61f78a3478fd9bc = function(arg0) {\n const ret = getObject(arg0).signal;\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_append_7bfcb4937d1d5e29 = function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {\n getObject(arg0).append(getStringFromWasm0(arg1, arg2), getStringFromWasm0(arg3, arg4));\n }, arguments) };\n imports.wbg.__wbg_instanceof_Response_849eb93e75734b6e = function(arg0) {\n let result;\n try {\n result = getObject(arg0) instanceof Response;\n } catch (_) {\n result = false;\n }\n const ret = result;\n return ret;\n };\n imports.wbg.__wbg_status_61a01141acd3cf74 = function(arg0) {\n const ret = getObject(arg0).status;\n return ret;\n };\n imports.wbg.__wbg_url_5f6dc4009ac5f99d = function(arg0, arg1) {\n const ret = getObject(arg1).url;\n const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len1 = WASM_VECTOR_LEN;\n getInt32Memory0()[arg0 / 4 + 1] = len1;\n getInt32Memory0()[arg0 / 4 + 0] = ptr1;\n };\n imports.wbg.__wbg_headers_9620bfada380764a = function(arg0) {\n const ret = getObject(arg0).headers;\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_iterator_2cee6dadfd956dfa = function() {\n const ret = Symbol.iterator;\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_get_e3c254076557e348 = function() { return handleError(function (arg0, arg1) {\n const ret = Reflect.get(getObject(arg0), getObject(arg1));\n return addHeapObject(ret);\n }, arguments) };\n imports.wbg.__wbindgen_is_function = function(arg0) {\n const ret = typeof(getObject(arg0)) === 'function';\n return ret;\n };\n imports.wbg.__wbg_call_27c0f87801dedf93 = function() { return handleError(function (arg0, arg1) {\n const ret = getObject(arg0).call(getObject(arg1));\n return addHeapObject(ret);\n }, arguments) };\n imports.wbg.__wbindgen_is_object = function(arg0) {\n const val = getObject(arg0);\n const ret = typeof(val) === 'object' && val !== null;\n return ret;\n };\n imports.wbg.__wbg_next_40fc327bfc8770e6 = function(arg0) {\n const ret = getObject(arg0).next;\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_next_196c84450b364254 = function() { return handleError(function (arg0) {\n const ret = getObject(arg0).next();\n return addHeapObject(ret);\n }, arguments) };\n imports.wbg.__wbg_done_298b57d23c0fc80c = function(arg0) {\n const ret = getObject(arg0).done;\n return ret;\n };\n imports.wbg.__wbg_value_d93c65011f51a456 = function(arg0) {\n const ret = getObject(arg0).value;\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_abort_2aa7521d5690750e = function(arg0) {\n getObject(arg0).abort();\n };\n imports.wbg.__wbg_stringify_8887fe74e1c50d81 = function() { return handleError(function (arg0) {\n const ret = JSON.stringify(getObject(arg0));\n return addHeapObject(ret);\n }, arguments) };\n imports.wbg.__wbindgen_string_get = function(arg0, arg1) {\n const obj = getObject(arg1);\n const ret = typeof(obj) === 'string' ? obj : undefined;\n var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n var len1 = WASM_VECTOR_LEN;\n getInt32Memory0()[arg0 / 4 + 1] = len1;\n getInt32Memory0()[arg0 / 4 + 0] = ptr1;\n };\n imports.wbg.__wbg_log_0159ca40cddf5b15 = function(arg0, arg1) {\n console.log(getStringFromWasm0(arg0, arg1));\n };\n imports.wbg.__wbindgen_bigint_from_u64 = function(arg0) {\n const ret = BigInt.asUintN(64, arg0);\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_call_b3ca7c6051f9bec1 = function() { return handleError(function (arg0, arg1, arg2) {\n const ret = getObject(arg0).call(getObject(arg1), getObject(arg2));\n return addHeapObject(ret);\n }, arguments) };\n imports.wbg.__wbg_transaction_new = function(arg0) {\n const ret = Transaction.__wrap(arg0);\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_keypair_new = function(arg0) {\n const ret = KeyPair.__wrap(arg0);\n return addHeapObject(ret);\n };\n imports.wbg.__wbindgen_module = function() {\n const ret = __wbg_init.__wbindgen_wasm_module;\n return addHeapObject(ret);\n };\n imports.wbg.__wbindgen_memory = function() {\n const ret = wasm.memory;\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_spawnWorker_f6acaddb2e29dc4a = function(arg0, arg1, arg2, arg3) {\n const ret = spawnWorker(getObject(arg0), getObject(arg1), getObject(arg2), arg3 >>> 0);\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_executionresponse_new = function(arg0) {\n const ret = ExecutionResponse.__wrap(arg0);\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_newwithlength_66ae46612e7f0234 = function(arg0) {\n const ret = new Array(arg0 >>> 0);\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_set_d4638f722068f043 = function(arg0, arg1, arg2) {\n getObject(arg0)[arg1 >>> 0] = takeObject(arg2);\n };\n imports.wbg.__wbindgen_cb_drop = function(arg0) {\n const obj = takeObject(arg0).original;\n if (obj.cnt-- == 1) {\n obj.a = 0;\n return true;\n }\n const ret = false;\n return ret;\n };\n imports.wbg.__wbg_new_16b304a2cfa7ff4a = function() {\n const ret = new Array();\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_push_a5b05aedc7234f9f = function(arg0, arg1) {\n const ret = getObject(arg0).push(getObject(arg1));\n return ret;\n };\n imports.wbg.__wbg_arrayBuffer_29931d52c7206b02 = function() { return handleError(function (arg0) {\n const ret = getObject(arg0).arrayBuffer();\n return addHeapObject(ret);\n }, arguments) };\n imports.wbg.__wbg_new_63b92bc8671ed464 = function(arg0) {\n const ret = new Uint8Array(getObject(arg0));\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_length_c20a40f15020d68a = function(arg0) {\n const ret = getObject(arg0).length;\n return ret;\n };\n imports.wbg.__wbg_new_81740750da40724f = function(arg0, arg1) {\n try {\n var state0 = {a: arg0, b: arg1};\n var cb0 = (arg0, arg1) => {\n const a = state0.a;\n state0.a = 0;\n try {\n return __wbg_adapter_281(a, state0.b, arg0, arg1);\n } finally {\n state0.a = a;\n }\n };\n const ret = new Promise(cb0);\n return addHeapObject(ret);\n } finally {\n state0.a = state0.b = 0;\n }\n };\n imports.wbg.__wbindgen_number_new = function(arg0) {\n const ret = arg0;\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_new_abda76e883ba8a5f = function() {\n const ret = new Error();\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_stack_658279fe44541cf6 = function(arg0, arg1) {\n const ret = getObject(arg1).stack;\n const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len1 = WASM_VECTOR_LEN;\n getInt32Memory0()[arg0 / 4 + 1] = len1;\n getInt32Memory0()[arg0 / 4 + 0] = ptr1;\n };\n imports.wbg.__wbg_error_f851667af71bcfc6 = function(arg0, arg1) {\n let deferred0_0;\n let deferred0_1;\n try {\n deferred0_0 = arg0;\n deferred0_1 = arg1;\n console.error(getStringFromWasm0(arg0, arg1));\n } finally {\n wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);\n }\n };\n imports.wbg.__wbg_buffer_12d079cc21e14bdb = function(arg0) {\n const ret = getObject(arg0).buffer;\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_newwithbyteoffsetandlength_aa4a17c33a06e5cb = function(arg0, arg1, arg2) {\n const ret = new Uint8Array(getObject(arg0), arg1 >>> 0, arg2 >>> 0);\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_randomFillSync_5c9c955aa56b6049 = function() { return handleError(function (arg0, arg1) {\n getObject(arg0).randomFillSync(takeObject(arg1));\n }, arguments) };\n imports.wbg.__wbg_subarray_a1f73cd4b5b42fe1 = function(arg0, arg1, arg2) {\n const ret = getObject(arg0).subarray(arg1 >>> 0, arg2 >>> 0);\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_getRandomValues_3aa56aa6edec874c = function() { return handleError(function (arg0, arg1) {\n getObject(arg0).getRandomValues(getObject(arg1));\n }, arguments) };\n imports.wbg.__wbg_set_a47bac70306a19a7 = function(arg0, arg1, arg2) {\n getObject(arg0).set(getObject(arg1), arg2 >>> 0);\n };\n imports.wbg.__wbg_crypto_1d1f22824a6a080c = function(arg0) {\n const ret = getObject(arg0).crypto;\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_process_4a72847cc503995b = function(arg0) {\n const ret = getObject(arg0).process;\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_versions_f686565e586dd935 = function(arg0) {\n const ret = getObject(arg0).versions;\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_node_104a2ff8d6ea03a2 = function(arg0) {\n const ret = getObject(arg0).node;\n return addHeapObject(ret);\n };\n imports.wbg.__wbindgen_is_string = function(arg0) {\n const ret = typeof(getObject(arg0)) === 'string';\n return ret;\n };\n imports.wbg.__wbg_require_cca90b1a94a0255b = function() { return handleError(function () {\n const ret = module.require;\n return addHeapObject(ret);\n }, arguments) };\n imports.wbg.__wbg_msCrypto_eb05e62b530a1508 = function(arg0) {\n const ret = getObject(arg0).msCrypto;\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_newwithlength_e9b4878cebadb3d3 = function(arg0) {\n const ret = new Uint8Array(arg0 >>> 0);\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_length_cd7af8117672b8b8 = function(arg0) {\n const ret = getObject(arg0).length;\n return ret;\n };\n imports.wbg.__wbg_get_bd8e338fbd5f5cc8 = function(arg0, arg1) {\n const ret = getObject(arg0)[arg1 >>> 0];\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_self_ce0dbfc45cf2f5be = function() { return handleError(function () {\n const ret = self.self;\n return addHeapObject(ret);\n }, arguments) };\n imports.wbg.__wbg_window_c6fb939a7f436783 = function() { return handleError(function () {\n const ret = window.window;\n return addHeapObject(ret);\n }, arguments) };\n imports.wbg.__wbg_globalThis_d1e6af4856ba331b = function() { return handleError(function () {\n const ret = globalThis.globalThis;\n return addHeapObject(ret);\n }, arguments) };\n imports.wbg.__wbg_global_207b558942527489 = function() { return handleError(function () {\n const ret = global.global;\n return addHeapObject(ret);\n }, arguments) };\n imports.wbg.__wbindgen_is_undefined = function(arg0) {\n const ret = getObject(arg0) === undefined;\n return ret;\n };\n imports.wbg.__wbg_newnoargs_e258087cd0daa0ea = function(arg0, arg1) {\n const ret = new Function(getStringFromWasm0(arg0, arg1));\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_has_0af94d20077affa2 = function() { return handleError(function (arg0, arg1) {\n const ret = Reflect.has(getObject(arg0), getObject(arg1));\n return ret;\n }, arguments) };\n imports.wbg.__wbg_fetch_bc7c8e27076a5c84 = function(arg0) {\n const ret = fetch(getObject(arg0));\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_fetch_921fad6ef9e883dd = function(arg0, arg1) {\n const ret = getObject(arg0).fetch(getObject(arg1));\n return addHeapObject(ret);\n };\n imports.wbg.__wbindgen_debug_string = function(arg0, arg1) {\n const ret = debugString(getObject(arg1));\n const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len1 = WASM_VECTOR_LEN;\n getInt32Memory0()[arg0 / 4 + 1] = len1;\n getInt32Memory0()[arg0 / 4 + 0] = ptr1;\n };\n imports.wbg.__wbindgen_throw = function(arg0, arg1) {\n throw new Error(getStringFromWasm0(arg0, arg1));\n };\n imports.wbg.__wbindgen_rethrow = function(arg0) {\n throw takeObject(arg0);\n };\n imports.wbg.__wbg_then_a73caa9a87991566 = function(arg0, arg1, arg2) {\n const ret = getObject(arg0).then(getObject(arg1), getObject(arg2));\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_then_0c86a60e8fcfe9f6 = function(arg0, arg1) {\n const ret = getObject(arg0).then(getObject(arg1));\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_queueMicrotask_481971b0d87f3dd4 = function(arg0) {\n queueMicrotask(getObject(arg0));\n };\n imports.wbg.__wbg_queueMicrotask_3cbae2ec6b6cd3d6 = function(arg0) {\n const ret = getObject(arg0).queueMicrotask;\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_resolve_b0083a7967828ec8 = function(arg0) {\n const ret = Promise.resolve(getObject(arg0));\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_waitAsync_5d743fc9058ba01a = function() {\n const ret = Atomics.waitAsync;\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_new_8cccba86b0f574cb = function(arg0) {\n const ret = new Int32Array(getObject(arg0));\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_waitAsync_46d5c36955b71a79 = function(arg0, arg1, arg2) {\n const ret = Atomics.waitAsync(getObject(arg0), arg1, arg2);\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_async_19c0400d97cc72fe = function(arg0) {\n const ret = getObject(arg0).async;\n return ret;\n };\n imports.wbg.__wbg_value_571d60108110e917 = function(arg0) {\n const ret = getObject(arg0).value;\n return addHeapObject(ret);\n };\n imports.wbg.__wbindgen_link_fc1eedd35dc7e0a6 = function(arg0) {\n const ret = \"data:application/javascript,\" + encodeURIComponent(`onmessage = function (ev) {\n let [ia, index, value] = ev.data;\n ia = new Int32Array(ia.buffer);\n let result = Atomics.wait(ia, index, value);\n postMessage(result);\n };\n `);\n const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len1 = WASM_VECTOR_LEN;\n getInt32Memory0()[arg0 / 4 + 1] = len1;\n getInt32Memory0()[arg0 / 4 + 0] = ptr1;\n };\n imports.wbg.__wbg_new_d1187ae36d662ef9 = function() { return handleError(function (arg0, arg1) {\n const ret = new Worker(getStringFromWasm0(arg0, arg1));\n return addHeapObject(ret);\n }, arguments) };\n imports.wbg.__wbg_setonmessage_503809e5bb51bd33 = function(arg0, arg1) {\n getObject(arg0).onmessage = getObject(arg1);\n };\n imports.wbg.__wbg_of_6a70eed8d41f469c = function(arg0, arg1, arg2) {\n const ret = Array.of(getObject(arg0), getObject(arg1), getObject(arg2));\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_postMessage_7380d10e8b8269df = function() { return handleError(function (arg0, arg1) {\n getObject(arg0).postMessage(getObject(arg1));\n }, arguments) };\n imports.wbg.__wbg_data_3ce7c145ca4fbcdc = function(arg0) {\n const ret = getObject(arg0).data;\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_newwithstrandinit_3fd6fba4083ff2d0 = function() { return handleError(function (arg0, arg1, arg2) {\n const ret = new Request(getStringFromWasm0(arg0, arg1), getObject(arg2));\n return addHeapObject(ret);\n }, arguments) };\n imports.wbg.__wbg_responseText_c67ed2d48db10769 = function() { return handleError(function (arg0, arg1) {\n const ret = getObject(arg1).responseText;\n var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n var len1 = WASM_VECTOR_LEN;\n getInt32Memory0()[arg0 / 4 + 1] = len1;\n getInt32Memory0()[arg0 / 4 + 0] = ptr1;\n }, arguments) };\n imports.wbg.__wbindgen_closure_wrapper5837 = function(arg0, arg1, arg2) {\n const ret = makeMutClosure(arg0, arg1, 538, __wbg_adapter_34);\n return addHeapObject(ret);\n };\n imports.wbg.__wbindgen_closure_wrapper5862 = function(arg0, arg1, arg2) {\n const ret = makeMutClosure(arg0, arg1, 538, __wbg_adapter_34);\n return addHeapObject(ret);\n };\n\n return imports;\n}\n\nfunction __wbg_init_memory(imports, maybe_memory) {\n imports.wbg.memory = maybe_memory || new WebAssembly.Memory({initial:25,maximum:65536,shared:true});\n}\n\nfunction __wbg_finalize_init(instance, module) {\n wasm = instance.exports;\n __wbg_init.__wbindgen_wasm_module = module;\n cachedBigInt64Memory0 = null;\n cachedInt32Memory0 = null;\n cachedUint8Memory0 = null;\n\n wasm.__wbindgen_start();\n return wasm;\n}\n\nfunction initSync(module, maybe_memory) {\n if (wasm !== undefined) return wasm;\n\n const imports = __wbg_get_imports();\n\n __wbg_init_memory(imports, maybe_memory);\n\n if (!(module instanceof WebAssembly.Module)) {\n module = new WebAssembly.Module(module);\n }\n\n const instance = new WebAssembly.Instance(module, imports);\n\n return __wbg_finalize_init(instance, module);\n}\n\nasync function __wbg_init(input, maybe_memory) {\n if (wasm !== undefined) return wasm;\n\n\n const imports = __wbg_get_imports();\n\n if (typeof input === 'string' || (typeof Request === 'function' && input instanceof Request) || (typeof URL === 'function' && input instanceof URL)) {\n input = fetch(input);\n }\n\n __wbg_init_memory(imports, maybe_memory);\n\n const { instance, module } = await __wbg_load(await input, imports);\n\n return __wbg_finalize_init(instance, module);\n}\n\nvar exports = /*#__PURE__*/Object.freeze({\n __proto__: null,\n Address: Address,\n Execution: Execution,\n ExecutionResponse: ExecutionResponse,\n Field: Field,\n KeyPair: KeyPair,\n Metadata: Metadata,\n OfflineQuery: OfflineQuery,\n PrivateKey: PrivateKey,\n PrivateKeyCiphertext: PrivateKeyCiphertext,\n Program: Program,\n ProgramManager: ProgramManager,\n ProvingKey: ProvingKey,\n RecordCiphertext: RecordCiphertext,\n RecordPlaintext: RecordPlaintext,\n Signature: Signature,\n Transaction: Transaction,\n VerifyingKey: VerifyingKey,\n ViewKey: ViewKey,\n default: __wbg_init,\n initSync: initSync,\n initThreadPool: initThreadPool,\n runRayonThread: runRayonThread,\n verifyFunctionExecution: verifyFunctionExecution\n});\n\nconst wasm_path = \"assets/aleo_wasm.wasm\";\n\n \n var Cargo = async (opt = {}) => {\n let {importHook, serverPath, initializeHook} = opt;\n\n let final_path = wasm_path;\n\n if (serverPath != null) {\n final_path = serverPath + /[^\\/\\\\]*$/.exec(final_path)[0];\n }\n\n if (importHook != null) {\n final_path = importHook(final_path);\n }\n\n if (initializeHook != null) {\n await initializeHook(__wbg_init, final_path);\n\n } else {\n await __wbg_init(final_path);\n }\n\n return exports;\n };\n\nexport { Cargo as default };\n//# sourceMappingURL=wasm.js.map\n","import wasm from \"../dist/wasm.js\";\n\nconst {\n initThreadPool: wasmInitThreadPool,\n Address,\n Execution,\n ExecutionResponse,\n Field,\n Metadata,\n OfflineQuery,\n Private,\n PrivateKey,\n PrivateKeyCiphertext,\n Program,\n ProvingKey,\n RecordCiphertext,\n RecordPlaintext,\n ProgramManager,\n Signature,\n Transaction,\n ViewKey,\n VerifyingKey,\n verifyFunctionExecution,\n} = await wasm({\n importHook: () => {\n return new URL(\"assets/aleo_wasm.wasm\", import.meta.url);\n },\n});\n\nasync function initThreadPool(threads) {\n if (threads == null) {\n threads = navigator.hardwareConcurrency;\n }\n\n console.info(`Spawning ${threads} threads`);\n\n await wasmInitThreadPool(new URL(\"worker.js\", import.meta.url), threads);\n}\n\nexport {\n initThreadPool,\n Address,\n Execution,\n ExecutionResponse,\n Field,\n Metadata,\n OfflineQuery,\n PrivateKey,\n PrivateKeyCiphertext,\n Program,\n ProvingKey,\n RecordCiphertext,\n RecordPlaintext,\n ProgramManager,\n Signature,\n Transaction,\n ViewKey,\n VerifyingKey,\n verifyFunctionExecution,\n};\n","/**\n * @license\n * Copyright 2019 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\nconst proxyMarker = Symbol(\"Comlink.proxy\");\nconst createEndpoint = Symbol(\"Comlink.endpoint\");\nconst releaseProxy = Symbol(\"Comlink.releaseProxy\");\nconst finalizer = Symbol(\"Comlink.finalizer\");\nconst throwMarker = Symbol(\"Comlink.thrown\");\nconst isObject = (val) => (typeof val === \"object\" && val !== null) || typeof val === \"function\";\n/**\n * Internal transfer handle to handle objects marked to proxy.\n */\nconst proxyTransferHandler = {\n canHandle: (val) => isObject(val) && val[proxyMarker],\n serialize(obj) {\n const { port1, port2 } = new MessageChannel();\n expose(obj, port1);\n return [port2, [port2]];\n },\n deserialize(port) {\n port.start();\n return wrap(port);\n },\n};\n/**\n * Internal transfer handler to handle thrown exceptions.\n */\nconst throwTransferHandler = {\n canHandle: (value) => isObject(value) && throwMarker in value,\n serialize({ value }) {\n let serialized;\n if (value instanceof Error) {\n serialized = {\n isError: true,\n value: {\n message: value.message,\n name: value.name,\n stack: value.stack,\n },\n };\n }\n else {\n serialized = { isError: false, value };\n }\n return [serialized, []];\n },\n deserialize(serialized) {\n if (serialized.isError) {\n throw Object.assign(new Error(serialized.value.message), serialized.value);\n }\n throw serialized.value;\n },\n};\n/**\n * Allows customizing the serialization of certain values.\n */\nconst transferHandlers = new Map([\n [\"proxy\", proxyTransferHandler],\n [\"throw\", throwTransferHandler],\n]);\nfunction isAllowedOrigin(allowedOrigins, origin) {\n for (const allowedOrigin of allowedOrigins) {\n if (origin === allowedOrigin || allowedOrigin === \"*\") {\n return true;\n }\n if (allowedOrigin instanceof RegExp && allowedOrigin.test(origin)) {\n return true;\n }\n }\n return false;\n}\nfunction expose(obj, ep = globalThis, allowedOrigins = [\"*\"]) {\n ep.addEventListener(\"message\", function callback(ev) {\n if (!ev || !ev.data) {\n return;\n }\n if (!isAllowedOrigin(allowedOrigins, ev.origin)) {\n console.warn(`Invalid origin '${ev.origin}' for comlink proxy`);\n return;\n }\n const { id, type, path } = Object.assign({ path: [] }, ev.data);\n const argumentList = (ev.data.argumentList || []).map(fromWireValue);\n let returnValue;\n try {\n const parent = path.slice(0, -1).reduce((obj, prop) => obj[prop], obj);\n const rawValue = path.reduce((obj, prop) => obj[prop], obj);\n switch (type) {\n case \"GET\" /* MessageType.GET */:\n {\n returnValue = rawValue;\n }\n break;\n case \"SET\" /* MessageType.SET */:\n {\n parent[path.slice(-1)[0]] = fromWireValue(ev.data.value);\n returnValue = true;\n }\n break;\n case \"APPLY\" /* MessageType.APPLY */:\n {\n returnValue = rawValue.apply(parent, argumentList);\n }\n break;\n case \"CONSTRUCT\" /* MessageType.CONSTRUCT */:\n {\n const value = new rawValue(...argumentList);\n returnValue = proxy(value);\n }\n break;\n case \"ENDPOINT\" /* MessageType.ENDPOINT */:\n {\n const { port1, port2 } = new MessageChannel();\n expose(obj, port2);\n returnValue = transfer(port1, [port1]);\n }\n break;\n case \"RELEASE\" /* MessageType.RELEASE */:\n {\n returnValue = undefined;\n }\n break;\n default:\n return;\n }\n }\n catch (value) {\n returnValue = { value, [throwMarker]: 0 };\n }\n Promise.resolve(returnValue)\n .catch((value) => {\n return { value, [throwMarker]: 0 };\n })\n .then((returnValue) => {\n const [wireValue, transferables] = toWireValue(returnValue);\n ep.postMessage(Object.assign(Object.assign({}, wireValue), { id }), transferables);\n if (type === \"RELEASE\" /* MessageType.RELEASE */) {\n // detach and deactive after sending release response above.\n ep.removeEventListener(\"message\", callback);\n closeEndPoint(ep);\n if (finalizer in obj && typeof obj[finalizer] === \"function\") {\n obj[finalizer]();\n }\n }\n })\n .catch((error) => {\n // Send Serialization Error To Caller\n const [wireValue, transferables] = toWireValue({\n value: new TypeError(\"Unserializable return value\"),\n [throwMarker]: 0,\n });\n ep.postMessage(Object.assign(Object.assign({}, wireValue), { id }), transferables);\n });\n });\n if (ep.start) {\n ep.start();\n }\n}\nfunction isMessagePort(endpoint) {\n return endpoint.constructor.name === \"MessagePort\";\n}\nfunction closeEndPoint(endpoint) {\n if (isMessagePort(endpoint))\n endpoint.close();\n}\nfunction wrap(ep, target) {\n return createProxy(ep, [], target);\n}\nfunction throwIfProxyReleased(isReleased) {\n if (isReleased) {\n throw new Error(\"Proxy has been released and is not useable\");\n }\n}\nfunction releaseEndpoint(ep) {\n return requestResponseMessage(ep, {\n type: \"RELEASE\" /* MessageType.RELEASE */,\n }).then(() => {\n closeEndPoint(ep);\n });\n}\nconst proxyCounter = new WeakMap();\nconst proxyFinalizers = \"FinalizationRegistry\" in globalThis &&\n new FinalizationRegistry((ep) => {\n const newCount = (proxyCounter.get(ep) || 0) - 1;\n proxyCounter.set(ep, newCount);\n if (newCount === 0) {\n releaseEndpoint(ep);\n }\n });\nfunction registerProxy(proxy, ep) {\n const newCount = (proxyCounter.get(ep) || 0) + 1;\n proxyCounter.set(ep, newCount);\n if (proxyFinalizers) {\n proxyFinalizers.register(proxy, ep, proxy);\n }\n}\nfunction unregisterProxy(proxy) {\n if (proxyFinalizers) {\n proxyFinalizers.unregister(proxy);\n }\n}\nfunction createProxy(ep, path = [], target = function () { }) {\n let isProxyReleased = false;\n const proxy = new Proxy(target, {\n get(_target, prop) {\n throwIfProxyReleased(isProxyReleased);\n if (prop === releaseProxy) {\n return () => {\n unregisterProxy(proxy);\n releaseEndpoint(ep);\n isProxyReleased = true;\n };\n }\n if (prop === \"then\") {\n if (path.length === 0) {\n return { then: () => proxy };\n }\n const r = requestResponseMessage(ep, {\n type: \"GET\" /* MessageType.GET */,\n path: path.map((p) => p.toString()),\n }).then(fromWireValue);\n return r.then.bind(r);\n }\n return createProxy(ep, [...path, prop]);\n },\n set(_target, prop, rawValue) {\n throwIfProxyReleased(isProxyReleased);\n // FIXME: ES6 Proxy Handler `set` methods are supposed to return a\n // boolean. To show good will, we return true asynchronously ¯\\_(ツ)_/¯\n const [value, transferables] = toWireValue(rawValue);\n return requestResponseMessage(ep, {\n type: \"SET\" /* MessageType.SET */,\n path: [...path, prop].map((p) => p.toString()),\n value,\n }, transferables).then(fromWireValue);\n },\n apply(_target, _thisArg, rawArgumentList) {\n throwIfProxyReleased(isProxyReleased);\n const last = path[path.length - 1];\n if (last === createEndpoint) {\n return requestResponseMessage(ep, {\n type: \"ENDPOINT\" /* MessageType.ENDPOINT */,\n }).then(fromWireValue);\n }\n // We just pretend that `bind()` didn’t happen.\n if (last === \"bind\") {\n return createProxy(ep, path.slice(0, -1));\n }\n const [argumentList, transferables] = processArguments(rawArgumentList);\n return requestResponseMessage(ep, {\n type: \"APPLY\" /* MessageType.APPLY */,\n path: path.map((p) => p.toString()),\n argumentList,\n }, transferables).then(fromWireValue);\n },\n construct(_target, rawArgumentList) {\n throwIfProxyReleased(isProxyReleased);\n const [argumentList, transferables] = processArguments(rawArgumentList);\n return requestResponseMessage(ep, {\n type: \"CONSTRUCT\" /* MessageType.CONSTRUCT */,\n path: path.map((p) => p.toString()),\n argumentList,\n }, transferables).then(fromWireValue);\n },\n });\n registerProxy(proxy, ep);\n return proxy;\n}\nfunction myFlat(arr) {\n return Array.prototype.concat.apply([], arr);\n}\nfunction processArguments(argumentList) {\n const processed = argumentList.map(toWireValue);\n return [processed.map((v) => v[0]), myFlat(processed.map((v) => v[1]))];\n}\nconst transferCache = new WeakMap();\nfunction transfer(obj, transfers) {\n transferCache.set(obj, transfers);\n return obj;\n}\nfunction proxy(obj) {\n return Object.assign(obj, { [proxyMarker]: true });\n}\nfunction windowEndpoint(w, context = globalThis, targetOrigin = \"*\") {\n return {\n postMessage: (msg, transferables) => w.postMessage(msg, targetOrigin, transferables),\n addEventListener: context.addEventListener.bind(context),\n removeEventListener: context.removeEventListener.bind(context),\n };\n}\nfunction toWireValue(value) {\n for (const [name, handler] of transferHandlers) {\n if (handler.canHandle(value)) {\n const [serializedValue, transferables] = handler.serialize(value);\n return [\n {\n type: \"HANDLER\" /* WireValueType.HANDLER */,\n name,\n value: serializedValue,\n },\n transferables,\n ];\n }\n }\n return [\n {\n type: \"RAW\" /* WireValueType.RAW */,\n value,\n },\n transferCache.get(value) || [],\n ];\n}\nfunction fromWireValue(value) {\n switch (value.type) {\n case \"HANDLER\" /* WireValueType.HANDLER */:\n return transferHandlers.get(value.name).deserialize(value.value);\n case \"RAW\" /* WireValueType.RAW */:\n return value.value;\n }\n}\nfunction requestResponseMessage(ep, msg, transfers) {\n return new Promise((resolve) => {\n const id = generateUUID();\n ep.addEventListener(\"message\", function l(ev) {\n if (!ev.data || !ev.data.id || ev.data.id !== id) {\n return;\n }\n ep.removeEventListener(\"message\", l);\n resolve(ev.data);\n });\n if (ep.start) {\n ep.start();\n }\n ep.postMessage(Object.assign({ id }, msg), transfers);\n });\n}\nfunction generateUUID() {\n return new Array(4)\n .fill(0)\n .map(() => Math.floor(Math.random() * Number.MAX_SAFE_INTEGER).toString(16))\n .join(\"-\");\n}\n\nexport { createEndpoint, expose, finalizer, proxy, proxyMarker, releaseProxy, transfer, transferHandlers, windowEndpoint, wrap };\n//# sourceMappingURL=comlink.mjs.map\n"],"names":["Account","_privateKey","_viewKey","_address","constructor","params","this","privateKeyFromParams","e","console","error","Error","ViewKey","from_private_key","Address","fromCiphertext","ciphertext","password","PrivateKeyCiphertext","fromString","PrivateKey","fromPrivateKeyCiphertext","privateKey","to_string","seed","from_seed_unchecked","from_string","viewKey","address","toString","encryptAccount","toCiphertext","decryptRecord","decrypt","decryptRecords","ciphertexts","map","ownsRecordCiphertext","isOwner","RecordCiphertext","sign","message","verify","signature","async","get","url","options","response","fetch","ok","status","post","method","AleoNetworkClient","host","headers","account","setAccount","getAccount","setHost","fetchData","json","findUnspentRecords","startHeight","endHeight","amounts","maxMicrocredits","nonces","records","Array","start","end","resolvedPrivateKey","latestHeight","failures","totalRecordValue","BigInt","to_view_key","blockHeight","getLatestHeight","blocks","getBlockRange","i","length","transactions","j","confirmedTransaction","type","transaction","execution","transitions","k","transition","program","outputs","l","output","record","value","recordPlaintext","nonce","includes","serialNumber","serialNumberString","getTransitionId","push","microcredits","amounts_found","warn","getBlock","height","getDeploymentTransactionIDForProgram","Program","replace","getDeploymentTransactionForProgram","transaction_id","getTransaction","getLatestBlock","getLatestCommittee","getProgram","programId","getProgramObject","inputProgram","getProgramImports","imports","importList","getImports","import_id","hasOwnProperty","programSource","nestedImports","key","logAndThrow","getProgramImportNames","getProgramMappingNames","getProgramMappingValue","mappingName","getStateRoot","id","getTransactions","getTransactionsInMempool","inputOrOutputID","submitTransaction","transaction_string","Transaction","body","Object","assign","AleoKeyProviderParams","name","proverUri","verifierUri","cacheKey","AleoKeyProvider","cache","cacheOption","keyUris","fetchBytes","data","arrayBuffer","Uint8Array","KEY_STORE","Map","useCache","clearCache","clear","cacheKeys","keyId","keys","provingKey","verifyingKey","set","toBytes","containsKeys","has","deleteKeys","delete","getKeys","debug","provingKeyBytes","verifyingKeyBytes","ProvingKey","fromBytes","VerifyingKey","functionKeys","proverUrl","verifierUrl","CREDITS_PROGRAM_KEYS","getKey","fetchCreditsKeys","fetchRemoteKeys","getVerifyingKey","fetchProvingKey","locator","keyPair","verifying_key","proving_key","prover","bond_public","bondPublicKeys","bondValidatorKeys","bond_validator","claimUnbondPublicKeys","claim_unbond_public","transferKeys","visibility","PRIVATE_TRANSFER","transfer_private","PRIVATE_TO_PUBLIC_TRANSFER","transfer_private_to_public","PUBLIC_TRANSFER","transfer_public","PUBLIC_TRANSFER_AS_SIGNER","transfer_public_as_signer","PUBLIC_TO_PRIVATE_TRANSFER","transfer_public_to_private","joinKeys","join","splitKeys","split","feePrivateKeys","fee_private","feePublicKeys","fee_public","verifier","inclusion","set_validator_state","unbond_public","text","inner","unBondPublicKeys","OfflineSearchParams","verifyCreditsKeys","bondPublicKeyParams","bondValidatorKeyParams","claimUnbondPublicKeyParams","feePrivateKeyParams","feePublicKeyParams","inclusionKeyParams","joinKeyParams","setValidatorStateKeyParams","splitKeyParams","transferPrivateKeyParams","transferPrivateToPublicKeyParams","transferPublicKeyParams","transferPublicAsSignerKeyParams","transferPublicToPrivateKeyParams","unbondPublicKeyParams","OfflineKeyProvider","Promise","resolve","reject","undefined","isBondPublicProver","isBondPublicVerifier","isClaimUnbondPublicProver","isClaimUnbondPublicVerifier","isFeePrivateProver","isFeePrivateVerifier","isFeePublicProver","isFeePublicVerifier","isInclusionProver","isInclusionVerifier","isJoinProver","isJoinVerifier","isSetValidatorStateProver","isSetValidatorStateVerifier","isSplitProver","isSplitVerifier","isTransferPrivateProver","isTransferPrivateVerifier","isTransferPrivateToPublicProver","isTransferPrivateToPublicVerifier","isTransferPublicProver","isTransferPublicVerifier","isTransferPublicToPrivateProver","isTransferPublicToPrivateVerifier","isUnbondPublicProver","isUnbondPublicVerifier","insertBondPublicKeys","bondPublicVerifier","insertClaimUnbondPublicKeys","claimUnbondPublicVerifier","insertFeePrivateKeys","feePrivateVerifier","insertFeePublicKeys","feePublicVerifier","insertJoinKeys","joinVerifier","insertSetValidatorStateKeys","setValidatorStateVerifier","insertSplitKeys","splitVerifier","insertTransferPrivateKeys","transferPrivateVerifier","insertTransferPrivateToPublicKeys","transferPrivateToPublicVerifier","insertTransferPublicKeys","transferPublicVerifier","insertTransferPublicToPrivateKeys","transferPublicToPrivateVerifier","insertUnbondPublicKeys","unbondPublicVerifier","NetworkRecordProvider","networkClient","findCreditsRecords","unspent","searchParameters","findCreditsRecord","findRecord","findRecords","BlockHeightSearch","singletonWorker","createAleoWorker","worker","Worker","URL","wrap","ProgramManager","keyProvider","recordProvider","setKeyProvider","setRecordProvider","deploy","fee","privateFee","recordSearchParams","feeRecord","programObject","log","feeKeys","deploymentPrivateKey","getCreditsRecord","feeProvingKey","feeVerifyingKey","tx","ProgramManager$1","buildDeploymentTransaction","buildExecutionTransaction","programName","functionName","inputs","keySearchParams","offlineQuery","executionPrivateKey","execute","run","function_name","proveExecution","executeFunctionOffline","recordOne","recordTwo","joinProvingKey","joinVerifyingKey","RecordPlaintext","buildJoinTransaction","splitAmount","amountRecord","splitProvingKey","splitVerifyingKey","buildSplitTransaction","synthesizeKeys","function_id","synthesizeKeyPair","buildTransferTransaction","amount","recipient","transferType","validateTransferType","transferProvingKey","transferVerifyingKey","requiresAmountRecord","buildTransferPublicTransaction","buildTransferPublicAsSignerTransaction","transfer","buildBondPublicTransaction","staker_address","validator_address","withdrawal_address","scaledAmount","Math","trunc","creditsProgram","additionalOptions","executeOptions","bondPublic","buildBondValidatorTransaction","commission","adjustedCommission","bondValidator","buildUnbondPublicTransaction","unbondPublic","buildClaimUnbondPublicTransaction","claimUnbondPublic","buildSetValidatorStateTransaction","validator_state","setValidatorState","verifyExecution","executionResponse","getExecution","getFunctionId","verifyFunctionExecution","createProgramFromSource","getCreditsProgram","verifyProgram","PRIVATE_TRANSFER_TYPES","VALID_TRANSFER_TYPES","Metadata","baseUrl","convert","metadata","Set","initializeWasm","spawnWorker","module","memory","addEventListener","event","setTimeout","unref","capture","once","postMessage","wasm","heap","fill","getObject","idx","heap_next","dropObject","takeObject","ret","cachedTextDecoder","TextDecoder","ignoreBOM","fatal","decode","cachedUint8Memory0","getUint8Memory0","buffer","getStringFromWasm0","ptr","len","slice","addHeapObject","obj","WASM_VECTOR_LEN","cachedTextEncoder","TextEncoder","encode","encodeString","arg","view","buf","read","written","passStringToWasm0","malloc","realloc","subarray","mem","offset","code","charCodeAt","isLikeNone","x","cachedInt32Memory0","getInt32Memory0","Int32Array","debugString","val","description","isArray","builtInMatches","exec","call","className","JSON","stringify","_","stack","CLOSURE_DTORS","FinalizationRegistry","register","unregister","state","__wbindgen_export_3","dtor","a","b","makeMutClosure","arg0","arg1","f","cnt","real","args","original","__wbg_adapter_34","arg2","_dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h467700a9696faab3","_assertClass","instance","klass","passArray8ToWasm0","verifyFunctionExecution$1","retptr","__wbindgen_add_to_stack_pointer","Execution$1","VerifyingKey$1","Program$1","ptr0","__wbindgen_malloc","__wbindgen_realloc","len0","__wbg_ptr","r0","r1","cachedBigInt64Memory0","getBigInt64Memory0","BigInt64Array","getArrayU8FromWasm0","runRayonThread","receiver","initThreadPool$1","num_threads","initThreadPool","handleError","apply","__wbindgen_exn_store","__wbg_adapter_281","arg3","wasm_bindgen__convert__closures__invoke2_mut__h381bef3cd886b4c7","AddressFinalization","__wbg_address_free","__wrap","create","prototype","__destroy_into_raw","free","private_key","PrivateKey$1","address_from_private_key","from_view_key","view_key","ViewKey$1","address_from_view_key","address_from_string","deferred1_0","deferred1_1","address_to_string","__wbindgen_free","Signature$1","address_verify","ExecutionFinalization","__wbg_execution_free","Execution","execution_toString","execution_fromString","ExecutionResponseFinalization","__wbg_executionresponse_free","ExecutionResponse","getOutputs","executionresponse_getOutputs","executionresponse_getExecution","executionresponse_getKeys","KeyPair","getProvingKey","executionresponse_getProvingKey","ProvingKey$1","executionresponse_getVerifyingKey","executionresponse_getFunctionId","executionresponse_getProgram","FieldFinalization","__wbg_field_free","Field","field_toString","field","field_fromString","KeyPairFinalization","__wbg_keypair_free","ptr1","keypair_new","keypair_provingKey","keypair_verifyingKey","MetadataFinalization","__wbg_metadata_free","__wbg_get_metadata_name","__wbg_set_metadata_name","__wbg_get_metadata_locator","__wbg_set_metadata_locator","__wbg_get_metadata_prover","__wbg_set_metadata_prover","__wbg_get_metadata_verifier","__wbg_set_metadata_verifier","__wbg_get_metadata_verifyingKey","__wbg_set_metadata_verifyingKey","metadata_baseUrl","metadata_bond_public","metadata_bond_validator","metadata_claim_unbond_public","metadata_fee_private","metadata_fee_public","metadata_inclusion","metadata_join","metadata_set_validator_state","metadata_split","metadata_transfer_private","metadata_transfer_private_to_public","metadata_transfer_public","metadata_transfer_public_as_signer","metadata_transfer_public_to_private","metadata_unbond_public","OfflineQueryFinalization","__wbg_offlinequery_free","OfflineQuery","state_root","offlinequery_new","addStatePath","commitment","state_path","len1","offlinequery_addStatePath","offlinequery_toString","s","offlinequery_fromString","PrivateKeyFinalization","__wbg_privatekey_free","privatekey_new","privatekey_from_seed_unchecked","privatekey_from_string","privatekey_to_string","privatekey_to_view_key","to_address","privatekey_to_address","Address$1","privatekey_sign","newEncrypted","secret","privatekey_newEncrypted","PrivateKeyCiphertext$1","privatekey_toCiphertext","privatekey_fromPrivateKeyCiphertext","PrivateKeyCiphertextFinalization","__wbg_privatekeyciphertext_free","encryptPrivateKey","decryptToPrivateKey","privatekeyciphertext_decryptToPrivateKey","privatekeyciphertext_toString","privatekeyciphertext_fromString","ProgramFinalization","__wbg_program_free","program_fromString","program_toString","hasFunction","program_hasFunction","getFunctions","program_getFunctions","getFunctionInputs","program_getFunctionInputs","getMappings","program_getMappings","getRecordMembers","record_name","program_getRecordMembers","getStructMembers","struct_name","program_getStructMembers","program_getCreditsProgram","program_id","program_address","isEqual","other","program_isEqual","program_getImports","ProgramManagerFinalization","__wbg_programmanager_free","fee_credits","fee_record","fee_proving_key","fee_verifying_key","offline_query","RecordPlaintext$1","ptr2","len2","ptr3","ptr4","ptr5","OfflineQuery$1","programmanager_buildDeploymentTransaction","estimateDeploymentFee","programmanager_estimateDeploymentFee","estimateProgramNameCost","programmanager_estimateProgramNameCost","r2","asUintN","_function","prove_execution","len4","programmanager_executeFunctionOffline","len3","ptr6","ptr7","ptr8","programmanager_buildExecutionTransaction","estimateExecutionFee","programmanager_estimateExecutionFee","estimateFinalizeFee","programmanager_estimateFinalizeFee","record_1","record_2","join_proving_key","join_verifying_key","programmanager_buildJoinTransaction","split_amount","amount_record","split_proving_key","split_verifying_key","programmanager_buildSplitTransaction","amount_credits","transfer_type","transfer_proving_key","transfer_verifying_key","ptr9","programmanager_buildTransferTransaction","programmanager_synthesizeKeyPair","ProvingKeyFinalization","__wbg_provingkey_free","provingkey_isBondPublicProver","isBondValidatorProver","provingkey_isBondValidatorProver","provingkey_isClaimUnbondPublicProver","provingkey_isFeePrivateProver","provingkey_isFeePublicProver","provingkey_isInclusionProver","provingkey_isJoinProver","provingkey_isSetValidatorStateProver","provingkey_isSplitProver","provingkey_isTransferPrivateProver","provingkey_isTransferPrivateToPublicProver","provingkey_isTransferPublicProver","isTransferPublicAsSignerProver","provingkey_isTransferPublicAsSignerProver","provingkey_isTransferPublicToPrivateProver","provingkey_isUnbondPublicProver","checksum","provingkey_checksum","copy","provingkey_copy","bytes","provingkey_fromBytes","string","provingkey_fromString","provingkey_toBytes","v1","provingkey_toString","RecordCiphertextFinalization","__wbg_recordciphertext_free","recordciphertext_fromString","recordciphertext_toString","recordciphertext_decrypt","recordciphertext_isOwner","RecordPlaintextFinalization","__wbg_recordplaintext_free","recordplaintext_commitment","Field$1","recordplaintext_fromString","recordplaintext_toString","recordplaintext_microcredits","recordplaintext_nonce","deferred4_0","deferred4_1","recordplaintext_serialNumberString","r3","SignatureFinalization","__wbg_signature_free","Signature","signature_verify","signature_from_string","signature_to_string","TransactionFinalization","__wbg_transaction_free","transaction_fromString","transaction_toString","transactionId","transaction_transactionId","transactionType","transaction_transactionType","VerifyingKeyFinalization","__wbg_verifyingkey_free","verifyingkey_bondPublicVerifier","bondValidatorVerifier","verifyingkey_bondValidatorVerifier","verifyingkey_claimUnbondPublicVerifier","verifyingkey_feePrivateVerifier","verifyingkey_feePublicVerifier","inclusionVerifier","verifyingkey_inclusionVerifier","verifyingkey_joinVerifier","verifyingkey_setValidatorStateVerifier","verifyingkey_splitVerifier","verifyingkey_transferPrivateVerifier","verifyingkey_transferPrivateToPublicVerifier","verifyingkey_transferPublicVerifier","transferPublicAsSignerVerifier","verifyingkey_transferPublicAsSignerVerifier","verifyingkey_transferPublicToPrivateVerifier","verifyingkey_unbondPublicVerifier","verifyingkey_isBondPublicVerifier","isBondValidatorVerifier","verifyingkey_isBondValidatorVerifier","verifyingkey_isClaimUnbondPublicVerifier","verifyingkey_isFeePrivateVerifier","verifyingkey_isFeePublicVerifier","verifyingkey_isInclusionVerifier","verifyingkey_isJoinVerifier","verifyingkey_isSetValidatorStateVerifier","verifyingkey_isSplitVerifier","verifyingkey_isTransferPrivateVerifier","verifyingkey_isTransferPrivateToPublicVerifier","verifyingkey_isTransferPublicVerifier","isTransferPublicAsSignerVerifier","verifyingkey_isTransferPublicAsSignerVerifier","verifyingkey_isTransferPublicToPrivateVerifier","verifyingkey_isUnbondPublicVerifier","verifyingkey_checksum","verifyingkey_copy","verifyingkey_fromBytes","verifyingkey_fromString","verifyingkey_toBytes","verifyingkey_toString","ViewKeyFinalization","__wbg_viewkey_free","viewkey_from_string","viewkey_to_string","deferred3_0","deferred3_1","viewkey_decrypt","__wbg_load","Response","WebAssembly","instantiateStreaming","instantiate","Instance","__wbg_get_imports","wbg","__wbindgen_object_drop_ref","__wbg_new_71801a555ad9f2aa","XMLHttpRequest","arguments","__wbg_overrideMimeType_ee9c51919ceb418b","overrideMimeType","__wbg_open_c9eb0cf2c9d95679","arg4","arg5","open","__wbg_send_80d29985093c1ec5","send","__wbg_response_7c2e2759084f7279","__wbg_status_d485fb5a478426fb","__wbg_new_72fb9a18b5ae2624","__wbindgen_string_new","__wbg_set_1f9b04f170055d33","Reflect","__wbg_new_ab6fd82b10560829","Headers","__wbindgen_object_clone_ref","__wbg_new_0d76b0581eca6298","AbortController","__wbg_signal_a61f78a3478fd9bc","signal","__wbg_append_7bfcb4937d1d5e29","append","__wbg_instanceof_Response_849eb93e75734b6e","result","__wbg_status_61a01141acd3cf74","__wbg_url_5f6dc4009ac5f99d","__wbg_headers_9620bfada380764a","__wbg_iterator_2cee6dadfd956dfa","Symbol","iterator","__wbg_get_e3c254076557e348","__wbindgen_is_function","__wbg_call_27c0f87801dedf93","__wbindgen_is_object","__wbg_next_40fc327bfc8770e6","next","__wbg_next_196c84450b364254","__wbg_done_298b57d23c0fc80c","done","__wbg_value_d93c65011f51a456","__wbg_abort_2aa7521d5690750e","abort","__wbg_stringify_8887fe74e1c50d81","__wbindgen_string_get","__wbg_log_0159ca40cddf5b15","__wbindgen_bigint_from_u64","__wbg_call_b3ca7c6051f9bec1","__wbg_transaction_new","Transaction$1","__wbg_keypair_new","__wbindgen_module","__wbg_init","__wbindgen_wasm_module","__wbindgen_memory","__wbg_spawnWorker_f6acaddb2e29dc4a","__wbg_executionresponse_new","ExecutionResponse$1","__wbg_newwithlength_66ae46612e7f0234","__wbg_set_d4638f722068f043","__wbindgen_cb_drop","__wbg_new_16b304a2cfa7ff4a","__wbg_push_a5b05aedc7234f9f","__wbg_arrayBuffer_29931d52c7206b02","__wbg_new_63b92bc8671ed464","__wbg_length_c20a40f15020d68a","__wbg_new_81740750da40724f","state0","cb0","__wbindgen_number_new","__wbg_new_abda76e883ba8a5f","__wbg_stack_658279fe44541cf6","__wbg_error_f851667af71bcfc6","deferred0_0","deferred0_1","__wbg_buffer_12d079cc21e14bdb","__wbg_newwithbyteoffsetandlength_aa4a17c33a06e5cb","__wbg_randomFillSync_5c9c955aa56b6049","randomFillSync","__wbg_subarray_a1f73cd4b5b42fe1","__wbg_getRandomValues_3aa56aa6edec874c","getRandomValues","__wbg_set_a47bac70306a19a7","__wbg_crypto_1d1f22824a6a080c","crypto","__wbg_process_4a72847cc503995b","process","__wbg_versions_f686565e586dd935","versions","__wbg_node_104a2ff8d6ea03a2","node","__wbindgen_is_string","__wbg_require_cca90b1a94a0255b","require","__wbg_msCrypto_eb05e62b530a1508","msCrypto","__wbg_newwithlength_e9b4878cebadb3d3","__wbg_length_cd7af8117672b8b8","__wbg_get_bd8e338fbd5f5cc8","__wbg_self_ce0dbfc45cf2f5be","self","__wbg_window_c6fb939a7f436783","window","__wbg_globalThis_d1e6af4856ba331b","globalThis","__wbg_global_207b558942527489","global","__wbindgen_is_undefined","__wbg_newnoargs_e258087cd0daa0ea","Function","__wbg_has_0af94d20077affa2","__wbg_fetch_bc7c8e27076a5c84","__wbg_fetch_921fad6ef9e883dd","__wbindgen_debug_string","__wbindgen_throw","__wbindgen_rethrow","__wbg_then_a73caa9a87991566","then","__wbg_then_0c86a60e8fcfe9f6","__wbg_queueMicrotask_481971b0d87f3dd4","queueMicrotask","__wbg_queueMicrotask_3cbae2ec6b6cd3d6","__wbg_resolve_b0083a7967828ec8","__wbg_waitAsync_5d743fc9058ba01a","Atomics","waitAsync","__wbg_new_8cccba86b0f574cb","__wbg_waitAsync_46d5c36955b71a79","__wbg_async_19c0400d97cc72fe","__wbg_value_571d60108110e917","__wbindgen_link_fc1eedd35dc7e0a6","encodeURIComponent","__wbg_new_d1187ae36d662ef9","__wbg_setonmessage_503809e5bb51bd33","onmessage","__wbg_of_6a70eed8d41f469c","of","__wbg_postMessage_7380d10e8b8269df","__wbg_data_3ce7c145ca4fbcdc","__wbg_newwithstrandinit_3fd6fba4083ff2d0","Request","__wbg_responseText_c67ed2d48db10769","responseText","__wbindgen_closure_wrapper5837","__wbindgen_closure_wrapper5862","__wbg_init_memory","maybe_memory","Memory","initial","maximum","shared","__wbg_finalize_init","exports","__wbindgen_start","initSync","Module","input","freeze","__proto__","Metadata$1","RecordCiphertext$1","default","wasm_path","wasmInitThreadPool","Private","opt","importHook","serverPath","initializeHook","final_path","Cargo","threads","navigator","hardwareConcurrency","info","proxyMarker","createEndpoint","releaseProxy","finalizer","throwMarker","isObject","transferHandlers","canHandle","serialize","port1","port2","MessageChannel","expose","deserialize","port","serialized","isError","ep","allowedOrigins","callback","ev","origin","allowedOrigin","RegExp","test","isAllowedOrigin","path","argumentList","fromWireValue","returnValue","parent","reduce","prop","rawValue","proxy","transfers","transferCache","catch","wireValue","transferables","toWireValue","removeEventListener","closeEndPoint","TypeError","endpoint","isMessagePort","close","target","createProxy","throwIfProxyReleased","isReleased","releaseEndpoint","requestResponseMessage","proxyCounter","WeakMap","proxyFinalizers","newCount","isProxyReleased","Proxy","_target","unregisterProxy","r","p","bind","_thisArg","rawArgumentList","last","processArguments","construct","registerProxy","processed","v","arr","concat","handler","serializedValue","msg","floor","random","Number","MAX_SAFE_INTEGER"],"sourceRoot":""} \ No newline at end of file +{"version":3,"file":"52.bundle.js","mappings":";0tCA2CaA,EACXC,YACAC,SACAC,SAEAC,WAAAA,CAAYC,EAAuB,CAAC,GAClC,IACEC,KAAKL,YAAcK,KAAKC,qBAAqBF,EAC9C,CAAC,MAAOG,GAEP,MADAC,QAAQC,MAAM,kBAAmBF,GAC3B,IAAIG,MAAM,kBACjB,CACDL,KAAKJ,SAAWU,EAAAA,GAAQC,iBAAiBP,KAAKL,aAC9CK,KAAKH,SAAWW,EAAAA,GAAQD,iBAAiBP,KAAKL,aAazC,qBAAOc,CAAeC,EAA2CC,GACtE,IACED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,OAAOg7B,EAAiB39B,IAAIsD,EAAMmD,MAAMy3B,YAAY56B,EAAMA,OAC9D,IAAK,MACD,OAAOA,EAAMA,MAEzB,CACA,SAASm9B,EAAuBnC,EAAI2D,EAAKzC,GACrC,OAAO,IAAI3yB,SAASC,IAChB,MAAMhH,EAeH,IAAIrE,MAAM,GACZoW,KAAK,GACLtY,KAAI,IAAMyV,KAAKktB,MAAMltB,KAAKmtB,SAAWC,OAAOC,kBAAkBrjC,SAAS,MACvE6L,KAAK,KAjBNyzB,EAAGlnB,iBAAiB,WAAW,SAASjU,EAAEs7B,GACjCA,EAAGv3B,MAASu3B,EAAGv3B,KAAKpB,IAAM24B,EAAGv3B,KAAKpB,KAAOA,IAG9Cw4B,EAAGwB,oBAAoB,UAAW38B,GAClC2J,EAAQ2xB,EAAGv3B,MACf,IACIo3B,EAAG58B,OACH48B,EAAG58B,QAEP48B,EAAG5mB,YAAYpR,OAAOC,OAAO,CAAET,MAAMm8B,GAAMzC,EAAU,GAE7D","sources":["webpack://aleo-website/../src/account.ts","webpack://aleo-website/../src/utils.ts","webpack://aleo-website/../src/network-client.ts","webpack://aleo-website/../src/function-key-provider.ts","webpack://aleo-website/../src/offline-key-provider.ts","webpack://aleo-website/../src/record-provider.ts","webpack://aleo-website/../src/managed-worker.ts","webpack://aleo-website/../src/program-manager.ts","webpack://aleo-website/../src/index.ts","webpack://aleo-website/wasm.js","webpack://aleo-website/../js/index.js","webpack://aleo-website/../node_modules/comlink/dist/esm/comlink.mjs"],"sourcesContent":["import {\n Address,\n PrivateKey,\n Signature,\n ViewKey,\n PrivateKeyCiphertext,\n RecordCiphertext,\n} from \"./index\";\n\ninterface AccountParam {\n privateKey?: string;\n seed?: Uint8Array;\n}\n\n/**\n * Key Management class. Enables the creation of a new Aleo Account, importation of an existing account from\n * an existing private key or seed, and message signing and verification functionality.\n *\n * An Aleo Account is generated from a randomly generated seed (number) from which an account private key, view key,\n * and a public account address are derived. The private key lies at the root of an Aleo account. It is a highly\n * sensitive secret and should be protected as it allows for creation of Aleo Program executions and arbitrary value\n * transfers. The View Key allows for decryption of a user's activity on the blockchain. The Address is the public\n * address to which other users of Aleo can send Aleo credits and other records to. This class should only be used\n * environments where the safety of the underlying key material can be assured.\n *\n * @example\n * // Create a new account\n * const myRandomAccount = new Account();\n *\n * // Create an account from a randomly generated seed\n * const seed = new Uint8Array([94, 91, 52, 251, 240, 230, 226, 35, 117, 253, 224, 210, 175, 13, 205, 120, 155, 214, 7, 169, 66, 62, 206, 50, 188, 40, 29, 122, 40, 250, 54, 18]);\n * const mySeededAccount = new Account({seed: seed});\n *\n * // Create an account from an existing private key\n * const myExistingAccount = new Account({privateKey: 'myExistingPrivateKey'})\n *\n * // Sign a message\n * const hello_world = Uint8Array.from([104, 101, 108, 108, 111 119, 111, 114, 108, 100])\n * const signature = myRandomAccount.sign(hello_world)\n *\n * // Verify a signature\n * myRandomAccount.verify(hello_world, signature)\n */\nexport class Account {\n _privateKey: PrivateKey;\n _viewKey: ViewKey;\n _address: Address;\n\n constructor(params: AccountParam = {}) {\n try {\n this._privateKey = this.privateKeyFromParams(params);\n } catch (e) {\n console.error(\"Wrong parameter\", e);\n throw new Error(\"Wrong Parameter\");\n }\n this._viewKey = ViewKey.from_private_key(this._privateKey);\n this._address = Address.from_private_key(this._privateKey);\n }\n\n /**\n * Attempts to create an account from a private key ciphertext\n * @param {PrivateKeyCiphertext | string} ciphertext\n * @param {string} password\n * @returns {PrivateKey | Error}\n *\n * @example\n * const ciphertext = PrivateKey.newEncrypted(\"password\");\n * const account = Account.fromCiphertext(ciphertext, \"password\");\n */\n public static fromCiphertext(ciphertext: PrivateKeyCiphertext | string, password: string) {\n try {\n ciphertext = (typeof ciphertext === \"string\") ? PrivateKeyCiphertext.fromString(ciphertext) : ciphertext;\n const _privateKey = PrivateKey.fromPrivateKeyCiphertext(ciphertext, password);\n return new Account({ privateKey: _privateKey.to_string() });\n } catch(e) {\n throw new Error(\"Wrong password or invalid ciphertext\");\n }\n }\n\n private privateKeyFromParams(params: AccountParam) {\n if (params.seed) {\n return PrivateKey.from_seed_unchecked(params.seed);\n }\n if (params.privateKey) {\n return PrivateKey.from_string(params.privateKey);\n }\n return new PrivateKey();\n }\n\n privateKey() {\n return this._privateKey;\n }\n\n viewKey() {\n return this._viewKey;\n }\n\n address() {\n return this._address;\n }\n\n toString() {\n return this.address().to_string()\n }\n\n /**\n * Encrypt the account's private key with a password\n * @param {string} ciphertext\n * @returns {PrivateKeyCiphertext}\n *\n * @example\n * const account = new Account();\n * const ciphertext = account.encryptAccount(\"password\");\n */\n encryptAccount(password: string) {\n return this._privateKey.toCiphertext(password);\n }\n\n /**\n * Decrypts a Record in ciphertext form into plaintext\n * @param {string} ciphertext\n * @returns {Record}\n *\n * @example\n * const account = new Account();\n * const record = account.decryptRecord(\"record1ciphertext\");\n */\n decryptRecord(ciphertext: string) {\n return this._viewKey.decrypt(ciphertext);\n }\n\n /**\n * Decrypts an array of Records in ciphertext form into plaintext\n * @param {string[]} ciphertexts\n * @returns {Record[]}\n *\n * @example\n * const account = new Account();\n * const record = account.decryptRecords([\"record1ciphertext\", \"record2ciphertext\"]);\n */\n decryptRecords(ciphertexts: string[]) {\n return ciphertexts.map((ciphertext) => this._viewKey.decrypt(ciphertext));\n }\n\n /**\n * Determines whether the account owns a ciphertext record\n * @param {RecordCipherText | string} ciphertext\n * @returns {boolean}\n *\n * @example\n * // Create a connection to the Aleo network and an account\n * const connection = new NodeConnection(\"vm.aleo.org/api\");\n * const account = Account.fromCiphertext(\"ciphertext\", \"password\");\n *\n * // Get a record from the network\n * const record = connection.getBlock(1234);\n * const recordCipherText = record.transactions[0].execution.transitions[0].id;\n *\n * // Check if the account owns the record\n * if account.ownsRecord(recordCipherText) {\n * // Then one can do something like:\n * // Decrypt the record and check if it's spent\n * // Store the record in a local database\n * // Etc.\n * }\n */\n ownsRecordCiphertext(ciphertext: RecordCiphertext | string) {\n if (typeof ciphertext === 'string') {\n try {\n const ciphertextObject = RecordCiphertext.fromString(ciphertext);\n return ciphertextObject.isOwner(this._viewKey);\n }\n catch (e) {\n return false;\n }\n }\n else {\n return ciphertext.isOwner(this._viewKey);\n }\n }\n\n /**\n * Signs a message with the account's private key.\n * Returns a Signature.\n *\n * @param {Uint8Array} message\n * @returns {Signature}\n *\n * @example\n * const account = new Account();\n * const message = Uint8Array.from([104, 101, 108, 108, 111 119, 111, 114, 108, 100])\n * account.sign(message);\n */\n sign(message: Uint8Array) {\n return this._privateKey.sign(message);\n }\n\n /**\n * Verifies the Signature on a message.\n *\n * @param {Uint8Array} message\n * @param {Signature} signature\n * @returns {boolean}\n *\n * @example\n * const account = new Account();\n * const message = Uint8Array.from([104, 101, 108, 108, 111 119, 111, 114, 108, 100])\n * const signature = account.sign(message);\n * account.verify(message, signature);\n */\n verify(message: Uint8Array, signature: Signature) {\n return this._address.verify(message, signature);\n }\n\n}\n","export async function get(url: URL | string, options?: RequestInit) {\n const response = await fetch(url, options);\n\n if (!response.ok) {\n throw new Error(response.status + \" could not get URL \" + url);\n }\n\n return response;\n}\n\n\nexport async function post(url: URL | string, options: RequestInit) {\n options.method = \"POST\";\n\n const response = await fetch(url, options);\n\n if (!response.ok) {\n throw new Error(response.status + \" could not post URL \" + url);\n }\n\n return response;\n}\n","import { get, post } from \"./utils\";\nimport {\n Account,\n Block,\n RecordCiphertext,\n Program,\n RecordPlaintext,\n PrivateKey,\n Transaction,\n TransactionModel,\n logAndThrow\n} from \"./index\";\n\ntype ProgramImports = { [key: string]: string | Program };\n\ninterface AleoNetworkClientOptions {\n headers?: { [key: string]: string };\n}\n\n/**\n * Client library that encapsulates REST calls to publicly exposed endpoints of Aleo nodes. The methods provided in this\n * allow users to query public information from the Aleo blockchain and submit transactions to the network.\n *\n * @param {string} host\n * @example\n * // Connection to a local node\n * const localNetworkClient = new AleoNetworkClient(\"http://localhost:3030\");\n *\n * // Connection to a public beacon node\n * const publicnetworkClient = new AleoNetworkClient(\"https://api.explorer.aleo.org/v1\");\n */\nclass AleoNetworkClient {\n host: string;\n headers: { [key: string]: string };\n account: Account | undefined;\n\n constructor(host: string, options?: AleoNetworkClientOptions) {\n this.host = host + \"/testnet\";\n\n if (options && options.headers) {\n this.headers = options.headers;\n\n } else {\n this.headers = {\n // This is replaced by the actual version by a Rollup plugin\n \"X-Aleo-SDK-Version\": \"%%VERSION%%\",\n };\n }\n }\n\n /**\n * Set an account to use in networkClient calls\n *\n * @param {Account} account\n * @example\n * const account = new Account();\n * networkClient.setAccount(account);\n */\n setAccount(account: Account) {\n this.account = account;\n }\n\n /**\n * Return the Aleo account used in the networkClient\n *\n * @example\n * const account = networkClient.getAccount();\n */\n getAccount(): Account | undefined {\n return this.account;\n }\n\n /**\n * Set a new host for the networkClient\n *\n * @param {string} host The address of a node hosting the Aleo API\n * @param host\n */\n setHost(host: string) {\n this.host = host + \"/testnet\";\n }\n\n async fetchData(\n url = \"/\",\n ): Promise {\n try {\n const response = await get(this.host + url, {\n headers: this.headers\n });\n\n return await response.json();\n } catch (error) {\n throw new Error(\"Error fetching data.\");\n }\n }\n\n /**\n * Attempts to find unspent records in the Aleo blockchain for a specified private key\n * @param {number} startHeight - The height at which to start searching for unspent records\n * @param {number} endHeight - The height at which to stop searching for unspent records\n * @param {string | PrivateKey} privateKey - The private key to use to find unspent records\n * @param {number[]} amounts - The amounts (in microcredits) to search for (eg. [100, 200, 3000])\n * @param {number} maxMicrocredits - The maximum number of microcredits to search for\n * @param {string[]} nonces - The nonces of already found records to exclude from the search\n *\n * @example\n * // Find all unspent records\n * const privateKey = \"[PRIVATE_KEY]\";\n * const records = networkClient.findUnspentRecords(0, undefined, privateKey);\n *\n * // Find specific amounts\n * const startHeight = 500000;\n * const amounts = [600000, 1000000];\n * const records = networkClient.findUnspentRecords(startHeight, undefined, privateKey, amounts);\n *\n * // Find specific amounts with a maximum number of cumulative microcredits\n * const maxMicrocredits = 100000;\n * const records = networkClient.findUnspentRecords(startHeight, undefined, privateKey, undefined, maxMicrocredits);\n */\n async findUnspentRecords(\n startHeight: number,\n endHeight: number | undefined,\n privateKey: string | PrivateKey | undefined,\n amounts: number[] | undefined,\n maxMicrocredits?: number | undefined,\n nonces?: string[] | undefined,\n ): Promise | Error> {\n nonces = nonces || [];\n // Ensure start height is not negative\n if (startHeight < 0) {\n throw new Error(\"Start height must be greater than or equal to 0\");\n }\n\n // Initialize search parameters\n const records = new Array();\n let start;\n let end;\n let resolvedPrivateKey: PrivateKey;\n let failures = 0;\n let totalRecordValue = BigInt(0);\n let latestHeight: number;\n\n // Ensure a private key is present to find owned records\n if (typeof privateKey === \"undefined\") {\n if (typeof this.account === \"undefined\") {\n throw new Error(\"Private key must be specified in an argument to findOwnedRecords or set in the AleoNetworkClient\");\n } else {\n resolvedPrivateKey = this.account._privateKey;\n }\n } else {\n try {\n resolvedPrivateKey = privateKey instanceof PrivateKey ? privateKey : PrivateKey.from_string(privateKey);\n } catch (error) {\n throw new Error(\"Error parsing private key provided.\");\n }\n }\n const viewKey = resolvedPrivateKey.to_view_key();\n\n // Get the latest height to ensure the range being searched is valid\n try {\n const blockHeight = await this.getLatestHeight();\n if (typeof blockHeight === \"number\") {\n latestHeight = blockHeight;\n } else {\n throw new Error(\"Error fetching latest block height.\");\n }\n } catch (error) {\n throw new Error(\"Error fetching latest block height.\");\n }\n\n // If no end height is specified or is greater than the latest height, set the end height to the latest height\n if (typeof endHeight === \"number\" && endHeight <= latestHeight) {\n end = endHeight\n } else {\n end = latestHeight;\n }\n\n // If the starting is greater than the ending height, return an error\n if (startHeight > end) {\n throw new Error(\"Start height must be less than or equal to end height.\");\n }\n\n // Iterate through blocks in reverse order in chunks of 50\n while (end > startHeight) {\n start = end - 50;\n if (start < startHeight) {\n start = startHeight;\n }\n try {\n // Get 50 blocks (or the difference between the start and end if less than 50)\n const blocks = await this.getBlockRange(start, end);\n end = start;\n if (!(blocks instanceof Error)) {\n // Iterate through blocks to find unspent records\n for (let i = 0; i < blocks.length; i++) {\n const block = blocks[i];\n const transactions = block.transactions;\n if (!(typeof transactions === \"undefined\")) {\n for (let j = 0; j < transactions.length; j++) {\n const confirmedTransaction = transactions[j];\n // Search for unspent records in execute transactions of credits.aleo\n if (confirmedTransaction.type == \"execute\") {\n const transaction = confirmedTransaction.transaction;\n if (transaction.execution && !(typeof transaction.execution.transitions == \"undefined\")) {\n for (let k = 0; k < transaction.execution.transitions.length; k++) {\n const transition = transaction.execution.transitions[k];\n // Only search for unspent records in credits.aleo (for now)\n if (transition.program !== \"credits.aleo\") {\n continue;\n }\n if (!(typeof transition.outputs == \"undefined\")) {\n for (let l = 0; l < transition.outputs.length; l++) {\n const output = transition.outputs[l];\n if (output.type === \"record\") {\n try {\n // Create a wasm record ciphertext object from the found output\n const record = RecordCiphertext.fromString(output.value);\n // Determine if the record is owned by the specified view key\n if (record.isOwner(viewKey)) {\n // Decrypt the record and get the serial number\n const recordPlaintext = record.decrypt(viewKey);\n\n // If the record has already been found, skip it\n const nonce = recordPlaintext.nonce();\n if (nonces.includes(nonce)) {\n continue;\n }\n\n // Otherwise record the nonce that has been found\n const serialNumber = recordPlaintext.serialNumberString(resolvedPrivateKey, \"credits.aleo\", \"credits\");\n // Attempt to see if the serial number is spent\n try {\n await this.getTransitionId(serialNumber);\n } catch (error) {\n // If it's not found, add it to the list of unspent records\n if (!amounts) {\n records.push(recordPlaintext);\n // If the user specified a maximum number of microcredits, check if the search has found enough\n if (typeof maxMicrocredits === \"number\") {\n totalRecordValue += recordPlaintext.microcredits();\n // Exit if the search has found the amount specified\n if (totalRecordValue >= BigInt(maxMicrocredits)) {\n return records;\n }\n }\n }\n // If the user specified a list of amounts, check if the search has found them\n if (!(typeof amounts === \"undefined\") && amounts.length > 0) {\n let amounts_found = 0;\n if (recordPlaintext.microcredits() > amounts[amounts_found]) {\n amounts_found += 1;\n records.push(recordPlaintext);\n // If the user specified a maximum number of microcredits, check if the search has found enough\n if (typeof maxMicrocredits === \"number\") {\n totalRecordValue += recordPlaintext.microcredits();\n // Exit if the search has found the amount specified\n if (totalRecordValue >= BigInt(maxMicrocredits)) {\n return records;\n }\n }\n if (records.length >= amounts.length) {\n return records;\n }\n }\n }\n }\n }\n } catch (error) {\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n } catch (error) {\n // If there is an error fetching blocks, log it and keep searching\n console.warn(\"Error fetching blocks in range: \" + start.toString() + \"-\" + end.toString());\n console.warn(\"Error: \", error);\n failures += 1;\n if (failures > 10) {\n console.warn(\"10 failures fetching records reached. Returning records fetched so far\");\n return records;\n }\n }\n }\n return records;\n }\n\n /**\n * Returns the contents of the block at the specified block height\n *\n * @param {number} height\n * @example\n * const block = networkClient.getBlock(1234);\n */\n async getBlock(height: number): Promise {\n try {\n const block = await this.fetchData(\"/block/\" + height);\n return block;\n } catch (error) {\n throw new Error(\"Error fetching block.\");\n }\n }\n\n /**\n * Returns a range of blocks between the specified block heights\n *\n * @param {number} start\n * @param {number} end\n * @example\n * const blockRange = networkClient.getBlockRange(2050, 2100);\n */\n async getBlockRange(start: number, end: number): Promise | Error> {\n try {\n return await this.fetchData>(\"/blocks?start=\" + start + \"&end=\" + end);\n } catch (error) {\n const errorMessage = \"Error fetching blocks between \" + start + \" and \" + end + \".\"\n throw new Error(errorMessage);\n }\n }\n\n /**\n * Returns the deployment transaction id associated with the specified program\n *\n * @param {Program | string} program\n * @returns {TransactionModel | Error}\n */\n async getDeploymentTransactionIDForProgram(program: Program | string): Promise {\n if (program instanceof Program) {\n program = program.toString();\n }\n try {\n const id = await this.fetchData(\"/find/transactionID/deployment/\" + program);\n return id.replace(\"\\\"\", \"\")\n } catch (error) {\n throw new Error(\"Error fetching deployment transaction for program.\");\n }\n }\n\n /**\n * Returns the deployment transaction associated with a specified program\n *\n * @param {Program | string} program\n * @returns {TransactionModel | Error}\n */\n async getDeploymentTransactionForProgram(program: Program | string): Promise {\n try {\n const transaction_id = await this.getDeploymentTransactionIDForProgram(program);\n return await this.getTransaction(transaction_id);\n } catch (error) {\n throw new Error(\"Error fetching deployment transaction for program.\");\n }\n }\n\n /**\n * Returns the contents of the latest block\n *\n * @example\n * const latestHeight = networkClient.getLatestBlock();\n */\n async getLatestBlock(): Promise {\n try {\n return await this.fetchData(\"/latest/block\") as Block;\n } catch (error) {\n throw new Error(\"Error fetching latest block.\");\n }\n }\n\n /**\n * Returns the latest committee\n *\n * @returns {Promise} A javascript object containing the latest committee\n */\n async getLatestCommittee(): Promise {\n try {\n return await this.fetchData(\"/committee/latest\");\n } catch (error) {\n throw new Error(\"Error fetching latest block.\");\n }\n }\n\n /**\n * Returns the latest block height\n *\n * @example\n * const latestHeight = networkClient.getLatestHeight();\n */\n async getLatestHeight(): Promise {\n try {\n return await this.fetchData(\"/latest/height\");\n } catch (error) {\n throw new Error(\"Error fetching latest height.\");\n }\n }\n\n /**\n * Returns the source code of a program given a program ID\n *\n * @param {string} programId The program ID of a program deployed to the Aleo Network\n * @return {Promise} Source code of the program\n *\n * @example\n * const program = networkClient.getProgram(\"hello_hello.aleo\");\n * const expectedSource = \"program hello_hello.aleo;\\n\\nfunction hello:\\n input r0 as u32.public;\\n input r1 as u32.private;\\n add r0 r1 into r2;\\n output r2 as u32.private;\\n\"\n * assert.equal(program, expectedSource);\n */\n async getProgram(programId: string): Promise {\n try {\n return await this.fetchData(\"/program/\" + programId)\n } catch (error) {\n throw new Error(\"Error fetching program\");\n }\n }\n\n /**\n * Returns a program object from a program ID or program source code\n *\n * @param {string} inputProgram The program ID or program source code of a program deployed to the Aleo Network\n * @return {Promise} Source code of the program\n *\n * @example\n * const programID = \"hello_hello.aleo\";\n * const programSource = \"program hello_hello.aleo;\\n\\nfunction hello:\\n input r0 as u32.public;\\n input r1 as u32.private;\\n add r0 r1 into r2;\\n output r2 as u32.private;\\n\"\n *\n * // Get program object from program ID or program source code\n * const programObjectFromID = await networkClient.getProgramObject(programID);\n * const programObjectFromSource = await networkClient.getProgramObject(programSource);\n *\n * // Both program objects should be equal\n * assert.equal(programObjectFromID.to_string(), programObjectFromSource.to_string());\n */\n async getProgramObject(inputProgram: string): Promise {\n try {\n return Program.fromString(inputProgram);\n } catch (error) {\n try {\n return Program.fromString((await this.getProgram(inputProgram)));\n } catch (error) {\n throw new Error(`${inputProgram} is neither a program name or a valid program`);\n }\n }\n }\n\n /**\n * Returns an object containing the source code of a program and the source code of all programs it imports\n *\n * @param {Program | string} inputProgram The program ID or program source code of a program deployed to the Aleo Network\n * @returns {Promise} Object of the form { \"program_id\": \"program_source\", .. } containing program id & source code for all program imports\n *\n * @example\n * const double_test_source = \"import multiply_test.aleo;\\n\\nprogram double_test.aleo;\\n\\nfunction double_it:\\n input r0 as u32.private;\\n call multiply_test.aleo/multiply 2u32 r0 into r1;\\n output r1 as u32.private;\\n\"\n * const double_test = Program.fromString(double_test_source);\n * const expectedImports = {\n * \"multiply_test.aleo\": \"program multiply_test.aleo;\\n\\nfunction multiply:\\n input r0 as u32.public;\\n input r1 as u32.private;\\n mul r0 r1 into r2;\\n output r2 as u32.private;\\n\"\n * }\n *\n * // Imports can be fetched using the program ID, source code, or program object\n * let programImports = await networkClient.getProgramImports(\"double_test.aleo\");\n * assert.deepStrictEqual(programImports, expectedImports);\n *\n * // Using the program source code\n * programImports = await networkClient.getProgramImports(double_test_source);\n * assert.deepStrictEqual(programImports, expectedImports);\n *\n * // Using the program object\n * programImports = await networkClient.getProgramImports(double_test);\n * assert.deepStrictEqual(programImports, expectedImports);\n */\n async getProgramImports(inputProgram: Program | string): Promise {\n try {\n const imports: ProgramImports = {};\n\n // Get the program object or fail if the program is not valid or does not exist\n const program = inputProgram instanceof Program ? inputProgram : (await this.getProgramObject(inputProgram));\n\n // Get the list of programs that the program imports\n const importList = program.getImports();\n\n // Recursively get any imports that the imported programs have in a depth first search order\n for (let i = 0; i < importList.length; i++) {\n const import_id = importList[i];\n if (!imports.hasOwnProperty(import_id)) {\n const programSource = await this.getProgram(import_id);\n const nestedImports = await this.getProgramImports(import_id);\n for (const key in nestedImports) {\n if (!imports.hasOwnProperty(key)) {\n imports[key] = nestedImports[key];\n }\n }\n imports[import_id] = programSource;\n }\n }\n return imports;\n } catch (error) {\n throw logAndThrow(\"Error fetching program imports: \" + error)\n }\n }\n\n /**\n * Get a list of the program names that a program imports\n *\n * @param {Program | string} inputProgram - The program id or program source code to get the imports of\n * @returns {string[]} - The list of program names that the program imports\n *\n * @example\n * const programImportsNames = networkClient.getProgramImports(\"double_test.aleo\");\n * const expectedImportsNames = [\"multiply_test.aleo\"];\n * assert.deepStrictEqual(programImportsNames, expectedImportsNames);\n */\n async getProgramImportNames(inputProgram: Program | string): Promise {\n try {\n const program = inputProgram instanceof Program ? inputProgram : (await this.getProgramObject(inputProgram));\n return program.getImports();\n } catch (error) {\n throw new Error(\"Error fetching program imports with error: \" + error);\n }\n }\n\n /**\n * Returns the names of the mappings of a program\n *\n * @param {string} programId - The program ID to get the mappings of (e.g. \"credits.aleo\")\n * @example\n * const mappings = networkClient.getProgramMappingNames(\"credits.aleo\");\n * const expectedMappings = [\"account\"];\n * assert.deepStrictEqual(mappings, expectedMappings);\n */\n async getProgramMappingNames(programId: string): Promise | Error> {\n try {\n return await this.fetchData>(\"/program/\" + programId + \"/mappings\")\n } catch (error) {\n throw new Error(\"Error fetching program mappings - ensure the program exists on chain before trying again\");\n }\n }\n\n /**\n * Returns the value of a program's mapping for a specific key\n *\n * @param {string} programId - The program ID to get the mapping value of (e.g. \"credits.aleo\")\n * @param {string} mappingName - The name of the mapping to get the value of (e.g. \"account\")\n * @param {string} key - The key of the mapping to get the value of (e.g. \"aleo1rhgdu77hgyqd3xjj8ucu3jj9r2krwz6mnzyd80gncr5fxcwlh5rsvzp9px\")\n * @return {Promise} String representation of the value of the mapping\n *\n * @example\n * // Get public balance of an account\n * const mappingValue = networkClient.getMappingValue(\"credits.aleo\", \"account\", \"aleo1rhgdu77hgyqd3xjj8ucu3jj9r2krwz6mnzyd80gncr5fxcwlh5rsvzp9px\");\n * const expectedValue = \"0u64\";\n * assert.equal(mappingValue, expectedValue);\n */\n async getProgramMappingValue(programId: string, mappingName: string, key: string): Promise {\n try {\n return await this.fetchData(\"/program/\" + programId + \"/mapping/\" + mappingName + \"/\" + key)\n } catch (error) {\n throw new Error(\"Error fetching mapping value - ensure the mapping exists and the key is correct\");\n }\n }\n\n /**\n * Returns the latest state/merkle root of the Aleo blockchain\n *\n * @example\n * const stateRoot = networkClient.getStateRoot();\n */\n async getStateRoot(): Promise {\n try {\n return await this.fetchData(\"/latest/stateRoot\");\n } catch (error) {\n throw new Error(\"Error fetching Aleo state root\");\n }\n }\n\n /**\n * Returns a transaction by its unique identifier\n *\n * @param {string} id\n * @example\n * const transaction = networkClient.getTransaction(\"at1handz9xjrqeynjrr0xay4pcsgtnczdksz3e584vfsgaz0dh0lyxq43a4wj\");\n */\n async getTransaction(id: string): Promise {\n try {\n return await this.fetchData(\"/transaction/\" + id);\n } catch (error) {\n throw new Error(\"Error fetching transaction.\");\n }\n }\n\n /**\n * Returns the transactions present at the specified block height\n *\n * @param {number} height\n * @example\n * const transactions = networkClient.getTransactions(654);\n */\n async getTransactions(height: number): Promise | Error> {\n try {\n return await this.fetchData>(\"/block/\" + height.toString() + \"/transactions\");\n } catch (error) {\n throw new Error(\"Error fetching transactions.\");\n }\n }\n\n /**\n * Returns the transactions in the memory pool.\n *\n * @example\n * const transactions = networkClient.getTransactionsInMempool();\n */\n async getTransactionsInMempool(): Promise | Error> {\n try {\n return await this.fetchData>(\"/memoryPool/transactions\");\n } catch (error) {\n throw new Error(\"Error fetching transactions from mempool.\");\n }\n }\n\n /**\n * Returns the transition ID of the transition corresponding to the ID of the input or output.\n * @param {string} inputOrOutputID - ID of the input or output.\n *\n * @example\n * const transitionId = networkClient.getTransitionId(\"2429232855236830926144356377868449890830704336664550203176918782554219952323field\");\n */\n async getTransitionId(inputOrOutputID: string): Promise {\n try {\n return await this.fetchData(\"/find/transitionID/\" + inputOrOutputID);\n } catch (error) {\n throw new Error(\"Error fetching transition ID.\");\n }\n }\n\n /**\n * Submit an execute or deployment transaction to the Aleo network\n *\n * @param {Transaction | string} transaction - The transaction to submit to the network\n * @returns {string | Error} - The transaction id of the submitted transaction or the resulting error\n */\n async submitTransaction(transaction: Transaction | string): Promise {\n const transaction_string = transaction instanceof Transaction ? transaction.toString() : transaction;\n try {\n const response = await post(this.host + \"/transaction/broadcast\", {\n body: transaction_string,\n headers: Object.assign({}, this.headers, {\n \"Content-Type\": \"application/json\",\n }),\n });\n\n try {\n return await response.json();\n\n } catch (error) {\n throw new Error(`Error posting transaction. Aleo network response: ${(error as Error).message}`);\n }\n } catch (error) {\n throw new Error(`Error posting transaction: No response received: ${(error as Error).message}`);\n }\n }\n}\n\nexport { AleoNetworkClient, AleoNetworkClientOptions, ProgramImports }\n","import {\n ProvingKey,\n VerifyingKey,\n CREDITS_PROGRAM_KEYS,\n KEY_STORE,\n Key,\n PRIVATE_TRANSFER,\n PRIVATE_TO_PUBLIC_TRANSFER,\n PUBLIC_TRANSFER,\n PUBLIC_TO_PRIVATE_TRANSFER,\n PUBLIC_TRANSFER_AS_SIGNER\n} from \"./index\";\nimport { get } from \"./utils\";\n\ntype FunctionKeyPair = [ProvingKey, VerifyingKey];\ntype CachedKeyPair = [Uint8Array, Uint8Array];\ntype AleoKeyProviderInitParams = {\n proverUri?: string;\n verifierUri?: string;\n cacheKey?: string;\n};\n\n/**\n * Interface for record search parameters. This allows for arbitrary search parameters to be passed to record provider\n * implementations.\n */\ninterface KeySearchParams {\n [key: string]: any; // This allows for arbitrary keys with any type values\n}\n\n/**\n * AleoKeyProviderParams search parameter for the AleoKeyProvider. It allows for the specification of a proverUri and\n * verifierUri to fetch keys via HTTP from a remote resource as well as a unique cacheKey to store the keys in memory.\n */\nclass AleoKeyProviderParams implements KeySearchParams {\n name: string | undefined;\n proverUri: string | undefined;\n verifierUri: string | undefined;\n cacheKey: string | undefined;\n\n /**\n * Create a new AleoKeyProviderParams object which implements the KeySearchParams interface. Users can optionally\n * specify a url for the proverUri & verifierUri to fetch keys via HTTP from a remote resource as well as a unique\n * cacheKey to store the keys in memory for future use. If no proverUri or verifierUri is specified, a cachekey must\n * be provided.\n *\n * @param { AleoKeyProviderInitParams } params - Optional search parameters\n */\n constructor(params: {proverUri?: string, verifierUri?: string, cacheKey?: string, name?: string}) {\n this.proverUri = params.proverUri;\n this.verifierUri = params.verifierUri;\n this.cacheKey = params.cacheKey;\n this.name = params.name;\n }\n}\n\n/**\n * KeyProvider interface. Enables the retrieval of public proving and verifying keys for Aleo Programs.\n */\ninterface FunctionKeyProvider {\n /**\n * Get bond_public function keys from the credits.aleo program\n *\n * @returns {Promise} Proving and verifying keys for the bond_public function\n */\n bondPublicKeys(): Promise;\n\n /**\n * Get bond_validator function keys from the credits.aleo program\n *\n * @returns {Promise} Proving and verifying keys for the bond_validator function\n */\n bondValidatorKeys(): Promise;\n\n /**\n * Cache a set of keys. This will overwrite any existing keys with the same keyId. The user can check if a keyId\n * exists in the cache using the containsKeys method prior to calling this method if overwriting is not desired.\n *\n * @param {string} keyId access key for the cache\n * @param {FunctionKeyPair} keys keys to cache\n */\n cacheKeys(keyId: string, keys: FunctionKeyPair): void;\n\n /**\n * Get unbond_public function keys from the credits.aleo program\n *\n * @returns {Promise} Proving and verifying keys for the unbond_public function\n */\n claimUnbondPublicKeys(): Promise;\n\n /**\n * Get arbitrary function keys from a provider\n *\n * @param {KeySearchParams | undefined} params - Optional search parameters for the key provider\n * @returns {Promise} Proving and verifying keys for the specified program\n *\n * @example\n * // Create a search object which implements the KeySearchParams interface\n * class IndexDbSearch implements KeySearchParams {\n * db: string\n * keyId: string\n * constructor(params: {db: string, keyId: string}) {\n * this.db = params.db;\n * this.keyId = params.keyId;\n * }\n * }\n *\n * // Create a new object which implements the KeyProvider interface\n * class IndexDbKeyProvider implements FunctionKeyProvider {\n * async functionKeys(params: KeySearchParams): Promise {\n * return new Promise((resolve, reject) => {\n * const request = indexedDB.open(params.db, 1);\n *\n * request.onupgradeneeded = function(e) {\n * const db = e.target.result;\n * if (!db.objectStoreNames.contains('keys')) {\n * db.createObjectStore('keys', { keyPath: 'id' });\n * }\n * };\n *\n * request.onsuccess = function(e) {\n * const db = e.target.result;\n * const transaction = db.transaction([\"keys\"], \"readonly\");\n * const store = transaction.objectStore(\"keys\");\n * const request = store.get(params.keyId);\n * request.onsuccess = function(e) {\n * if (request.result) {\n * resolve(request.result as FunctionKeyPair);\n * } else {\n * reject(new Error(\"Key not found\"));\n * }\n * };\n * request.onerror = function(e) { reject(new Error(\"Error fetching key\")); };\n * };\n *\n * request.onerror = function(e) { reject(new Error(\"Error opening database\")); };\n * });\n * }\n *\n * // implement the other methods...\n * }\n *\n *\n * const keyProvider = new AleoKeyProvider();\n * const networkClient = new AleoNetworkClient(\"https://api.explorer.aleo.org/v1\");\n * const recordProvider = new NetworkRecordProvider(account, networkClient);\n *\n * // Initialize a program manager with the key provider to automatically fetch keys for value transfers\n * const programManager = new ProgramManager(\"https://api.explorer.aleo.org/v1\", keyProvider, recordProvider);\n * programManager.transfer(1, \"aleo166q6ww6688cug7qxwe7nhctjpymydwzy2h7rscfmatqmfwnjvggqcad0at\", \"public\", 0.5);\n *\n * // Keys can also be fetched manually\n * const searchParams = new IndexDbSearch({db: \"keys\", keyId: \"credits.aleo:transferPrivate\"});\n * const [transferPrivateProvingKey, transferPrivateVerifyingKey] = await keyProvider.functionKeys(searchParams);\n */\n functionKeys(params?: KeySearchParams): Promise;\n\n /**\n * Get fee_private function keys from the credits.aleo program\n *\n * @returns {Promise} Proving and verifying keys for the join function\n */\n feePrivateKeys(): Promise;\n\n /**\n * Get fee_public function keys from the credits.aleo program\n *\n * @returns {Promise} Proving and verifying keys for the join function\n */\n feePublicKeys(): Promise;\n\n /**\n * Get join function keys from the credits.aleo program\n *\n * @returns {Promise} Proving and verifying keys for the join function\n */\n joinKeys(): Promise;\n\n /**\n * Get split function keys from the credits.aleo program\n *\n * @returns {Promise} Proving and verifying keys for the join function\n */\n splitKeys(): Promise;\n\n /**\n * Get keys for a variant of the transfer function from the credits.aleo program\n *\n * @param {string} visibility Visibility of the transfer function (private, public, privateToPublic, publicToPrivate)\n * @returns {Promise} Proving and verifying keys for the specified transfer function\n *\n * @example\n * // Create a new object which implements the KeyProvider interface\n * const networkClient = new AleoNetworkClient(\"https://api.explorer.aleo.org/v1\");\n * const keyProvider = new AleoKeyProvider();\n * const recordProvider = new NetworkRecordProvider(account, networkClient);\n *\n * // Initialize a program manager with the key provider to automatically fetch keys for value transfers\n * const programManager = new ProgramManager(\"https://api.explorer.aleo.org/v1\", keyProvider, recordProvider);\n * programManager.transfer(1, \"aleo166q6ww6688cug7qxwe7nhctjpymydwzy2h7rscfmatqmfwnjvggqcad0at\", \"public\", 0.5);\n *\n * // Keys can also be fetched manually\n * const [transferPublicProvingKey, transferPublicVerifyingKey] = await keyProvider.transferKeys(\"public\");\n */\n transferKeys(visibility: string): Promise;\n\n /**\n * Get unbond_public function keys from the credits.aleo program\n *\n * @returns {Promise} Proving and verifying keys for the join function\n */\n unBondPublicKeys(): Promise;\n\n}\n\n\n/**\n * AleoKeyProvider class. Implements the KeyProvider interface. Enables the retrieval of Aleo program proving and\n * verifying keys for the credits.aleo program over http from official Aleo sources and storing and retrieving function\n * keys from a local memory cache.\n */\nclass AleoKeyProvider implements FunctionKeyProvider {\n cache: Map;\n cacheOption: boolean;\n keyUris: string;\n\n async fetchBytes(\n url = \"/\",\n ): Promise {\n try {\n const response = await get(url);\n const data = await response.arrayBuffer();\n return new Uint8Array(data);\n } catch (error) {\n throw new Error(\"Error fetching data.\" + error);\n }\n }\n\n constructor() {\n this.keyUris = KEY_STORE;\n this.cache = new Map();\n this.cacheOption = false;\n }\n\n /**\n * Use local memory to store keys\n *\n * @param {boolean} useCache whether to store keys in local memory\n */\n useCache(useCache: boolean) {\n this.cacheOption = useCache;\n }\n\n /**\n * Clear the key cache\n */\n clearCache() {\n this.cache.clear();\n }\n\n /**\n * Cache a set of keys. This will overwrite any existing keys with the same keyId. The user can check if a keyId\n * exists in the cache using the containsKeys method prior to calling this method if overwriting is not desired.\n *\n * @param {string} keyId access key for the cache\n * @param {FunctionKeyPair} keys keys to cache\n */\n cacheKeys(keyId: string, keys: FunctionKeyPair) {\n const [provingKey, verifyingKey] = keys;\n this.cache.set(keyId, [provingKey.toBytes(), verifyingKey.toBytes()]);\n }\n\n /**\n * Determine if a keyId exists in the cache\n *\n * @param {string} keyId keyId of a proving and verifying key pair\n * @returns {boolean} true if the keyId exists in the cache, false otherwise\n */\n containsKeys(keyId: string): boolean {\n return this.cache.has(keyId)\n }\n\n /**\n * Delete a set of keys from the cache\n *\n * @param {string} keyId keyId of a proving and verifying key pair to delete from memory\n * @returns {boolean} true if the keyId exists in the cache and was deleted, false if the key did not exist\n */\n deleteKeys(keyId: string): boolean {\n return this.cache.delete(keyId)\n }\n\n /**\n * Get a set of keys from the cache\n * @param keyId keyId of a proving and verifying key pair\n *\n * @returns {FunctionKeyPair | Error} Proving and verifying keys for the specified program\n */\n getKeys(keyId: string): FunctionKeyPair | Error {\n console.debug(`Checking if key exists in cache. KeyId: ${keyId}`)\n if (this.cache.has(keyId)) {\n const [provingKeyBytes, verifyingKeyBytes] = this.cache.get(keyId);\n return [ProvingKey.fromBytes(provingKeyBytes), VerifyingKey.fromBytes(verifyingKeyBytes)];\n } else {\n return new Error(\"Key not found in cache.\");\n }\n }\n\n /**\n * Get arbitrary function keys from a provider\n *\n * @param {KeySearchParams} params parameters for the key search in form of: {proverUri: string, verifierUri: string, cacheKey: string}\n * @returns {Promise} Proving and verifying keys for the specified program\n *\n * @example\n * // Create a new object which implements the KeyProvider interface\n * const networkClient = new AleoNetworkClient(\"https://api.explorer.aleo.org/v1\");\n * const keyProvider = new AleoKeyProvider();\n * const recordProvider = new NetworkRecordProvider(account, networkClient);\n *\n * // Initialize a program manager with the key provider to automatically fetch keys for value transfers\n * const programManager = new ProgramManager(\"https://api.explorer.aleo.org/v1\", keyProvider, recordProvider);\n * programManager.transfer(1, \"aleo166q6ww6688cug7qxwe7nhctjpymydwzy2h7rscfmatqmfwnjvggqcad0at\", \"public\", 0.5);\n *\n * // Keys can also be fetched manually using the key provider\n * const keySearchParams = { \"cacheKey\": \"myProgram:myFunction\" };\n * const [transferPrivateProvingKey, transferPrivateVerifyingKey] = await keyProvider.functionKeys(keySearchParams);\n */\n async functionKeys(params?: KeySearchParams): Promise {\n if (params) {\n let proverUrl;\n let verifierUrl;\n let cacheKey;\n if (\"name\" in params && typeof params[\"name\"] == \"string\") {\n let key = CREDITS_PROGRAM_KEYS.getKey(params[\"name\"]);\n if (!(key instanceof Error)) {\n return this.fetchCreditsKeys(key);\n }\n }\n\n if (\"proverUri\" in params && typeof params[\"proverUri\"] == \"string\") {\n proverUrl = params[\"proverUri\"];\n }\n\n if (\"verifierUri\" in params && typeof params[\"verifierUri\"] == \"string\") {\n verifierUrl = params[\"verifierUri\"];\n }\n\n if (\"cacheKey\" in params && typeof params[\"cacheKey\"] == \"string\") {\n cacheKey = params[\"cacheKey\"];\n }\n\n if (proverUrl && verifierUrl) {\n return await this.fetchRemoteKeys(proverUrl, verifierUrl, cacheKey);\n }\n\n if (cacheKey) {\n return this.getKeys(cacheKey);\n }\n }\n throw Error(\"Invalid parameters provided, must provide either a cacheKey and/or a proverUrl and a verifierUrl\");\n }\n\n /**\n * Returns the proving and verifying keys for a specified program from a specified url.\n *\n * @param {string} verifierUrl Url of the proving key\n * @param {string} proverUrl Url the verifying key\n * @param {string} cacheKey Key to store the keys in the cache\n *\n * @returns {Promise} Proving and verifying keys for the specified program\n *\n * @example\n * // Create a new AleoKeyProvider object\n * const networkClient = new AleoNetworkClient(\"https://api.explorer.aleo.org/v1\");\n * const keyProvider = new AleoKeyProvider();\n * const recordProvider = new NetworkRecordProvider(account, networkClient);\n *\n * // Initialize a program manager with the key provider to automatically fetch keys for value transfers\n * const programManager = new ProgramManager(\"https://api.explorer.aleo.org/v1\", keyProvider, recordProvider);\n * programManager.transfer(1, \"aleo166q6ww6688cug7qxwe7nhctjpymydwzy2h7rscfmatqmfwnjvggqcad0at\", \"public\", 0.5);\n *\n * // Keys can also be fetched manually\n * const [transferPrivateProvingKey, transferPrivateVerifyingKey] = await keyProvider.fetchKeys(\n * CREDITS_PROGRAM_KEYS.transfer_private.prover,\n * CREDITS_PROGRAM_KEYS.transfer_private.verifier,\n * );\n */\n async fetchRemoteKeys(proverUrl: string, verifierUrl: string, cacheKey?: string): Promise {\n try {\n // If cache is enabled, check if the keys have already been fetched and return them if they have\n if (this.cacheOption) {\n if (!cacheKey) {\n cacheKey = proverUrl;\n }\n const value = this.cache.get(cacheKey);\n if (typeof value !== \"undefined\") {\n return [ProvingKey.fromBytes(value[0]), VerifyingKey.fromBytes(value[1])];\n } else {\n console.debug(\"Fetching proving keys from url \" + proverUrl);\n const provingKey = ProvingKey.fromBytes(await this.fetchBytes(proverUrl))\n console.debug(\"Fetching verifying keys \" + verifierUrl);\n const verifyingKey = (await this.getVerifyingKey(verifierUrl));\n this.cache.set(cacheKey, [provingKey.toBytes(), verifyingKey.toBytes()]);\n return [provingKey, verifyingKey];\n }\n }\n else {\n // If cache is disabled, fetch the keys and return them\n const provingKey = ProvingKey.fromBytes(await this.fetchBytes(proverUrl))\n const verifyingKey = (await this.getVerifyingKey(verifierUrl));\n return [provingKey, verifyingKey];\n }\n } catch (error) {\n throw new Error(`Error: ${error} fetching fee proving and verifying keys from ${proverUrl} and ${verifierUrl}.`);\n }\n }\n\n /***\n * Fetches the proving key from a remote source.\n *\n * @param proverUrl\n * @param cacheKey\n *\n * @returns {Promise} Proving key for the specified program\n */\n async fetchProvingKey(proverUrl: string, cacheKey?: string): Promise {\n try {\n // If cache is enabled, check if the keys have already been fetched and return them if they have\n if (this.cacheOption) {\n if (!cacheKey) {\n cacheKey = proverUrl;\n }\n const value = this.cache.get(cacheKey);\n if (typeof value !== \"undefined\") {\n return ProvingKey.fromBytes(value[0]);\n } else {\n console.debug(\"Fetching proving keys from url \" + proverUrl);\n const provingKey = ProvingKey.fromBytes(await this.fetchBytes(proverUrl));\n return provingKey;\n }\n }\n else {\n const provingKey = ProvingKey.fromBytes(await this.fetchBytes(proverUrl));\n return provingKey;\n }\n } catch (error) {\n throw new Error(`Error: ${error} fetching fee proving keys from ${proverUrl}`);\n }\n }\n\n async fetchCreditsKeys(key: Key): Promise {\n try {\n if (!this.cache.has(key.locator) || !this.cacheOption) {\n const verifying_key = key.verifyingKey()\n const proving_key = await this.fetchProvingKey(key.prover, key.locator);\n if (this.cacheOption) {\n this.cache.set(CREDITS_PROGRAM_KEYS.bond_public.locator, [proving_key.toBytes(), verifying_key.toBytes()]);\n }\n return [proving_key, verifying_key];\n } else {\n const keyPair = this.cache.get(key.locator);\n return [ProvingKey.fromBytes(keyPair[0]), VerifyingKey.fromBytes(keyPair[1])];\n }\n } catch (error) {\n throw new Error(`Error: fetching credits.aleo keys: ${error}`);\n }\n }\n\n async bondPublicKeys(): Promise {\n return this.fetchCreditsKeys(CREDITS_PROGRAM_KEYS.bond_public);\n }\n\n bondValidatorKeys(): Promise {\n return this.fetchCreditsKeys(CREDITS_PROGRAM_KEYS.bond_validator);\n }\n\n claimUnbondPublicKeys(): Promise {\n return this.fetchCreditsKeys(CREDITS_PROGRAM_KEYS.claim_unbond_public)\n }\n\n /**\n * Returns the proving and verifying keys for the transfer functions in the credits.aleo program\n * @param {string} visibility Visibility of the transfer function\n * @returns {Promise} Proving and verifying keys for the transfer functions\n *\n * @example\n * // Create a new AleoKeyProvider\n * const networkClient = new AleoNetworkClient(\"https://api.explorer.aleo.org/v1\");\n * const keyProvider = new AleoKeyProvider();\n * const recordProvider = new NetworkRecordProvider(account, networkClient);\n *\n * // Initialize a program manager with the key provider to automatically fetch keys for value transfers\n * const programManager = new ProgramManager(\"https://api.explorer.aleo.org/v1\", keyProvider, recordProvider);\n * programManager.transfer(1, \"aleo166q6ww6688cug7qxwe7nhctjpymydwzy2h7rscfmatqmfwnjvggqcad0at\", \"public\", 0.5);\n *\n * // Keys can also be fetched manually\n * const [transferPublicProvingKey, transferPublicVerifyingKey] = await keyProvider.transferKeys(\"public\");\n */\n async transferKeys(visibility: string): Promise {\n if (PRIVATE_TRANSFER.has(visibility)) {\n return await this.fetchCreditsKeys(CREDITS_PROGRAM_KEYS.transfer_private);\n } else if (PRIVATE_TO_PUBLIC_TRANSFER.has(visibility)) {\n return await this.fetchCreditsKeys(CREDITS_PROGRAM_KEYS.transfer_private_to_public);\n } else if (PUBLIC_TRANSFER.has(visibility)) {\n return await this.fetchCreditsKeys(CREDITS_PROGRAM_KEYS.transfer_public);\n } else if (PUBLIC_TRANSFER_AS_SIGNER.has(visibility)) {\n return await this.fetchCreditsKeys(CREDITS_PROGRAM_KEYS.transfer_public_as_signer);\n } else if (PUBLIC_TO_PRIVATE_TRANSFER.has(visibility)) {\n return await this.fetchCreditsKeys(CREDITS_PROGRAM_KEYS.transfer_public_to_private);\n } else {\n throw new Error(\"Invalid visibility type\");\n }\n }\n\n /**\n * Returns the proving and verifying keys for the join function in the credits.aleo program\n *\n * @returns {Promise} Proving and verifying keys for the join function\n */\n async joinKeys(): Promise {\n return await this.fetchCreditsKeys(CREDITS_PROGRAM_KEYS.join);\n }\n\n /**\n * Returns the proving and verifying keys for the split function in the credits.aleo program\n *\n * @returns {Promise} Proving and verifying keys for the split function\n * */\n async splitKeys(): Promise {\n return await this.fetchCreditsKeys(CREDITS_PROGRAM_KEYS.split);\n }\n\n /**\n * Returns the proving and verifying keys for the fee_private function in the credits.aleo program\n *\n * @returns {Promise} Proving and verifying keys for the fee function\n */\n async feePrivateKeys(): Promise {\n return await this.fetchCreditsKeys(CREDITS_PROGRAM_KEYS.fee_private);\n }\n\n /**\n * Returns the proving and verifying keys for the fee_public function in the credits.aleo program\n *\n * @returns {Promise} Proving and verifying keys for the fee function\n */\n async feePublicKeys(): Promise {\n return await this.fetchCreditsKeys(CREDITS_PROGRAM_KEYS.fee_public);\n }\n\n /**\n * Gets a verifying key. If the verifying key is for a credits.aleo function, get it from the wasm cache otherwise\n *\n * @returns {Promise} Verifying key for the function\n */\n // attempt to fetch it from the network\n async getVerifyingKey(verifierUri: string): Promise {\n switch (verifierUri) {\n case CREDITS_PROGRAM_KEYS.bond_public.verifier:\n return CREDITS_PROGRAM_KEYS.bond_public.verifyingKey();\n case CREDITS_PROGRAM_KEYS.bond_validator.verifier:\n return CREDITS_PROGRAM_KEYS.bond_validator.verifyingKey();\n case CREDITS_PROGRAM_KEYS.claim_unbond_public.verifier:\n return CREDITS_PROGRAM_KEYS.claim_unbond_public.verifyingKey();\n case CREDITS_PROGRAM_KEYS.fee_private.verifier:\n return CREDITS_PROGRAM_KEYS.fee_private.verifyingKey();\n case CREDITS_PROGRAM_KEYS.fee_public.verifier:\n return CREDITS_PROGRAM_KEYS.fee_public.verifyingKey();\n case CREDITS_PROGRAM_KEYS.inclusion.verifier:\n return CREDITS_PROGRAM_KEYS.inclusion.verifyingKey();\n case CREDITS_PROGRAM_KEYS.join.verifier:\n return CREDITS_PROGRAM_KEYS.join.verifyingKey();\n case CREDITS_PROGRAM_KEYS.set_validator_state.verifier:\n return CREDITS_PROGRAM_KEYS.set_validator_state.verifyingKey();\n case CREDITS_PROGRAM_KEYS.split.verifier:\n return CREDITS_PROGRAM_KEYS.split.verifyingKey();\n case CREDITS_PROGRAM_KEYS.transfer_private.verifier:\n return CREDITS_PROGRAM_KEYS.transfer_private.verifyingKey();\n case CREDITS_PROGRAM_KEYS.transfer_private_to_public.verifier:\n return CREDITS_PROGRAM_KEYS.transfer_private_to_public.verifyingKey();\n case CREDITS_PROGRAM_KEYS.transfer_public.verifier:\n return CREDITS_PROGRAM_KEYS.transfer_public.verifyingKey();\n case CREDITS_PROGRAM_KEYS.transfer_public_as_signer.verifier:\n return CREDITS_PROGRAM_KEYS.transfer_public_as_signer.verifyingKey();\n case CREDITS_PROGRAM_KEYS.transfer_public_to_private.verifier:\n return CREDITS_PROGRAM_KEYS.transfer_public_to_private.verifyingKey();\n case CREDITS_PROGRAM_KEYS.unbond_public.verifier:\n return CREDITS_PROGRAM_KEYS.unbond_public.verifyingKey();\n default:\n try {\n /// Try to fetch the verifying key from the network as a string\n const response = await get(verifierUri);\n const text = await response.text();\n return VerifyingKey.fromString(text);\n } catch (e) {\n /// If that fails, try to fetch the verifying key from the network as bytes\n try {\n return VerifyingKey.fromBytes(await this.fetchBytes(verifierUri));\n } catch (inner) {\n return new Error(\"Invalid verifying key. Error: \" + inner);\n }\n }\n }\n }\n\n unBondPublicKeys(): Promise {\n return this.fetchCreditsKeys(CREDITS_PROGRAM_KEYS.unbond_public);\n }\n}\n\nexport {AleoKeyProvider, AleoKeyProviderParams, AleoKeyProviderInitParams, CachedKeyPair, FunctionKeyPair, FunctionKeyProvider, KeySearchParams}\n","import {\n FunctionKeyProvider,\n KeySearchParams,\n FunctionKeyPair,\n CachedKeyPair,\n ProvingKey,\n VerifyingKey,\n CREDITS_PROGRAM_KEYS,\n PRIVATE_TRANSFER,\n PRIVATE_TO_PUBLIC_TRANSFER,\n PUBLIC_TRANSFER,\n PUBLIC_TO_PRIVATE_TRANSFER,\n PUBLIC_TRANSFER_AS_SIGNER\n} from \"./index\";\n\n/**\n * Search parameters for the offline key provider. This class implements the KeySearchParams interface and includes\n * a convenience method for creating a new instance of this class for each function of the credits.aleo program.\n *\n * @example\n * // If storing a key for a custom program function\n * offlineSearchParams = new OfflineSearchParams(\"myprogram.aleo/myfunction\");\n *\n * // If storing a key for a credits.aleo program function\n * bondPublicKeyParams = OfflineSearchParams.bondPublicKeyParams();\n */\nclass OfflineSearchParams implements KeySearchParams {\n cacheKey: string | undefined;\n verifyCreditsKeys: boolean | undefined;\n\n /**\n * Create a new OfflineSearchParams instance.\n *\n * @param {string} cacheKey - Key used to store the local function proving & verifying keys. This should be stored\n * under the naming convention \"programName/functionName\" (i.e. \"myprogram.aleo/myfunction\")\n * @param {boolean} verifyCreditsKeys - Whether to verify the keys against the credits.aleo program,\n * defaults to false, but should be set to true if using keys from the credits.aleo program\n */\n constructor(cacheKey: string, verifyCreditsKeys = false) {\n this.cacheKey = cacheKey;\n this.verifyCreditsKeys = verifyCreditsKeys;\n }\n\n /**\n * Create a new OfflineSearchParams instance for the bond_public function of the credits.aleo program.\n */\n static bondPublicKeyParams(): OfflineSearchParams {\n return new OfflineSearchParams(CREDITS_PROGRAM_KEYS.bond_public.locator, true);\n }\n\n /**\n * Create a new OfflineSearchParams instance for the bond_validator function of the credits.aleo program.\n */\n static bondValidatorKeyParams(): OfflineSearchParams {\n return new OfflineSearchParams(CREDITS_PROGRAM_KEYS.bond_validator.locator, true);\n }\n\n /**\n * Create a new OfflineSearchParams instance for the claim_unbond_public function of the\n */\n static claimUnbondPublicKeyParams(): OfflineSearchParams {\n return new OfflineSearchParams(CREDITS_PROGRAM_KEYS.claim_unbond_public.locator, true);\n }\n\n /**\n * Create a new OfflineSearchParams instance for the fee_private function of the credits.aleo program.\n */\n static feePrivateKeyParams(): OfflineSearchParams {\n return new OfflineSearchParams(CREDITS_PROGRAM_KEYS.fee_private.locator, true);\n }\n\n /**\n * Create a new OfflineSearchParams instance for the fee_public function of the credits.aleo program.\n */\n static feePublicKeyParams(): OfflineSearchParams {\n return new OfflineSearchParams(CREDITS_PROGRAM_KEYS.fee_public.locator, true);\n }\n\n /**\n * Create a new OfflineSearchParams instance for the inclusion prover function.\n */\n static inclusionKeyParams(): OfflineSearchParams {\n return new OfflineSearchParams(CREDITS_PROGRAM_KEYS.inclusion.locator, true);\n }\n\n /**\n * Create a new OfflineSearchParams instance for the join function of the credits.aleo program.\n */\n static joinKeyParams(): OfflineSearchParams {\n return new OfflineSearchParams(CREDITS_PROGRAM_KEYS.join.locator, true);\n }\n\n /**\n * Create a new OfflineSearchParams instance for the set_validator_state function of the credits.aleo program.\n */\n static setValidatorStateKeyParams(): OfflineSearchParams {\n return new OfflineSearchParams(CREDITS_PROGRAM_KEYS.set_validator_state.locator, true);\n }\n\n /**\n * Create a new OfflineSearchParams instance for the split function of the credits.aleo program.\n */\n static splitKeyParams(): OfflineSearchParams {\n return new OfflineSearchParams(CREDITS_PROGRAM_KEYS.split.locator, true);\n }\n\n /**\n * Create a new OfflineSearchParams instance for the transfer_private function of the credits.aleo program.\n */\n static transferPrivateKeyParams(): OfflineSearchParams {\n return new OfflineSearchParams(CREDITS_PROGRAM_KEYS.transfer_private.locator, true);\n }\n\n /**\n * Create a new OfflineSearchParams instance for the transfer_private_to_public function of the credits.aleo program.\n */\n static transferPrivateToPublicKeyParams(): OfflineSearchParams {\n return new OfflineSearchParams(CREDITS_PROGRAM_KEYS.transfer_private_to_public.locator, true);\n }\n\n /**\n * Create a new OfflineSearchParams instance for the transfer_public function of the credits.aleo program.\n */\n static transferPublicKeyParams(): OfflineSearchParams {\n return new OfflineSearchParams(CREDITS_PROGRAM_KEYS.transfer_public.locator, true);\n }\n\n /**\n * Create a new OfflineSearchParams instance for the transfer_public_as_signer function of the credits.aleo program.\n */\n static transferPublicAsSignerKeyParams(): OfflineSearchParams {\n return new OfflineSearchParams(CREDITS_PROGRAM_KEYS.transfer_public_as_signer.locator, true);\n }\n\n /**\n * Create a new OfflineSearchParams instance for the transfer_public_to_private function of the credits.aleo program.\n */\n static transferPublicToPrivateKeyParams(): OfflineSearchParams {\n return new OfflineSearchParams(CREDITS_PROGRAM_KEYS.transfer_public_to_private.locator, true);\n }\n\n /**\n * Create a new OfflineSearchParams instance for the unbond_public function of the credits.aleo program.\n */\n static unbondPublicKeyParams(): OfflineSearchParams {\n return new OfflineSearchParams(CREDITS_PROGRAM_KEYS.unbond_public.locator, true);\n }\n}\n\n/**\n * A key provider meant for building transactions offline on devices such as hardware wallets. This key provider is not\n * able to contact the internet for key material and instead relies on the user to insert Aleo function proving &\n * verifying keys from local storage prior to usage.\n *\n * @example\n * // Create an offline program manager\n * const programManager = new ProgramManager();\n *\n * // Create a temporary account for the execution of the program\n * const account = new Account();\n * programManager.setAccount(account);\n *\n * // Create the proving keys from the key bytes on the offline machine\n * console.log(\"Creating proving keys from local key files\");\n * const program = \"program hello_hello.aleo; function hello: input r0 as u32.public; input r1 as u32.private; add r0 r1 into r2; output r2 as u32.private;\";\n * const myFunctionProver = await getLocalKey(\"/path/to/my/function/hello_hello.prover\");\n * const myFunctionVerifier = await getLocalKey(\"/path/to/my/function/hello_hello.verifier\");\n * const feePublicProvingKeyBytes = await getLocalKey(\"/path/to/credits.aleo/feePublic.prover\");\n *\n * myFunctionProvingKey = ProvingKey.fromBytes(myFunctionProver);\n * myFunctionVerifyingKey = VerifyingKey.fromBytes(myFunctionVerifier);\n * const feePublicProvingKey = ProvingKey.fromBytes(feePublicKeyBytes);\n *\n * // Create an offline key provider\n * console.log(\"Creating offline key provider\");\n * const offlineKeyProvider = new OfflineKeyProvider();\n *\n * // Cache the keys\n * // Cache the proving and verifying keys for the custom hello function\n * OfflineKeyProvider.cacheKeys(\"hello_hello.aleo/hello\", myFunctionProvingKey, myFunctionVerifyingKey);\n *\n * // Cache the proving key for the fee_public function (the verifying key is automatically cached)\n * OfflineKeyProvider.insertFeePublicKey(feePublicProvingKey);\n *\n * // Create an offline query using the latest state root in order to create the inclusion proof\n * const offlineQuery = new OfflineQuery(\"latestStateRoot\");\n *\n * // Insert the key provider into the program manager\n * programManager.setKeyProvider(offlineKeyProvider);\n *\n * // Create the offline search params\n * const offlineSearchParams = new OfflineSearchParams(\"hello_hello.aleo/hello\");\n *\n * // Create the offline transaction\n * const offlineExecuteTx = await this.buildExecutionTransaction(\"hello_hello.aleo\", \"hello\", 1, false, [\"5u32\", \"5u32\"], undefined, offlineSearchParams, undefined, undefined, undefined, undefined, offlineQuery, program);\n *\n * // Broadcast the transaction later on a machine with internet access\n * const networkClient = new AleoNetworkClient(\"https://api.explorer.aleo.org/v1\");\n * const txId = await networkClient.broadcastTransaction(offlineExecuteTx);\n */\nclass OfflineKeyProvider implements FunctionKeyProvider {\n cache: Map;\n\n constructor() {\n this.cache = new Map();\n }\n\n /**\n * Get bond_public function keys from the credits.aleo program. The keys must be cached prior to calling this\n * method for it to work.\n *\n * @returns {Promise} Proving and verifying keys for the bond_public function\n */\n bondPublicKeys(): Promise {\n return this.functionKeys(OfflineSearchParams.bondPublicKeyParams());\n };\n\n /**\n * Get bond_validator function keys from the credits.aleo program. The keys must be cached prior to calling this\n * method for it to work.\n *\n * @returns {Promise} Proving and verifying keys for the bond_public function\n */\n bondValidatorKeys(): Promise {\n return this.functionKeys(OfflineSearchParams.bondValidatorKeyParams());\n };\n\n\n /**\n * Cache a set of keys. This will overwrite any existing keys with the same keyId. The user can check if a keyId\n * exists in the cache using the containsKeys method prior to calling this method if overwriting is not desired.\n *\n * @param {string} keyId access key for the cache\n * @param {FunctionKeyPair} keys keys to cache\n */\n cacheKeys(keyId: string, keys: FunctionKeyPair): void {\n const [provingKey, verifyingKey] = keys;\n this.cache.set(keyId, [provingKey.toBytes(), verifyingKey.toBytes()]);\n };\n\n /**\n * Get unbond_public function keys from the credits.aleo program. The keys must be cached prior to calling this\n * method for it to work.\n *\n * @returns {Promise} Proving and verifying keys for the unbond_public function\n */\n claimUnbondPublicKeys(): Promise {\n return this.functionKeys(OfflineSearchParams.claimUnbondPublicKeyParams());\n };\n\n /**\n * Get arbitrary function key from the offline key provider cache.\n *\n * @param {KeySearchParams | undefined} params - Optional search parameters for the key provider\n * @returns {Promise} Proving and verifying keys for the specified program\n *\n * @example\n * /// First cache the keys from local offline resources\n * const offlineKeyProvider = new OfflineKeyProvider();\n * const myFunctionVerifyingKey = VerifyingKey.fromString(\"verifier...\");\n * const myFunctionProvingKeyBytes = await readBinaryFile('./resources/myfunction.prover');\n * const myFunctionProvingKey = ProvingKey.fromBytes(myFunctionProvingKeyBytes);\n *\n * /// Cache the keys for future use with a memorable locator\n * offlineKeyProvider.cacheKeys(\"myprogram.aleo/myfunction\", [myFunctionProvingKey, myFunctionVerifyingKey]);\n *\n * /// When they're needed, retrieve the keys from the cache\n *\n * /// First create a search parameter object with the same locator used to cache the keys\n * const keyParams = new OfflineSearchParams(\"myprogram.aleo/myfunction\");\n *\n * /// Then retrieve the keys\n * const [myFunctionProver, myFunctionVerifier] = await offlineKeyProvider.functionKeys(keyParams);\n */\n functionKeys(params?: KeySearchParams): Promise {\n return new Promise((resolve, reject) => {\n if (params === undefined) {\n reject(new Error(\"No search parameters provided, cannot retrieve keys\"));\n } else {\n const keyId = params.cacheKey;\n const verifyCreditsKeys = params.verifyCreditsKeys;\n if (this.cache.has(keyId)) {\n const [provingKeyBytes, verifyingKeyBytes] = this.cache.get(keyId) as CachedKeyPair;\n const provingKey = ProvingKey.fromBytes(provingKeyBytes);\n const verifyingKey = VerifyingKey.fromBytes(verifyingKeyBytes);\n if (verifyCreditsKeys) {\n const keysMatchExpected = this.verifyCreditsKeys(keyId, provingKey, verifyingKey)\n if (!keysMatchExpected) {\n reject (new Error(`Cached keys do not match expected keys for ${keyId}`));\n }\n }\n resolve([provingKey, verifyingKey]);\n } else {\n reject(new Error(\"Keys not found in cache for \" + keyId));\n }\n }\n });\n };\n\n /**\n * Determines if the keys for a given credits function match the expected keys.\n *\n * @returns {boolean} Whether the keys match the expected keys\n */\n verifyCreditsKeys(locator: string, provingKey: ProvingKey, verifyingKey: VerifyingKey): boolean {\n switch (locator) {\n case CREDITS_PROGRAM_KEYS.bond_public.locator:\n return provingKey.isBondPublicProver() && verifyingKey.isBondPublicVerifier();\n case CREDITS_PROGRAM_KEYS.claim_unbond_public.locator:\n return provingKey.isClaimUnbondPublicProver() && verifyingKey.isClaimUnbondPublicVerifier();\n case CREDITS_PROGRAM_KEYS.fee_private.locator:\n return provingKey.isFeePrivateProver() && verifyingKey.isFeePrivateVerifier();\n case CREDITS_PROGRAM_KEYS.fee_public.locator:\n return provingKey.isFeePublicProver() && verifyingKey.isFeePublicVerifier();\n case CREDITS_PROGRAM_KEYS.inclusion.locator:\n return provingKey.isInclusionProver() && verifyingKey.isInclusionVerifier();\n case CREDITS_PROGRAM_KEYS.join.locator:\n return provingKey.isJoinProver() && verifyingKey.isJoinVerifier();\n case CREDITS_PROGRAM_KEYS.set_validator_state.locator:\n return provingKey.isSetValidatorStateProver() && verifyingKey.isSetValidatorStateVerifier();\n case CREDITS_PROGRAM_KEYS.split.locator:\n return provingKey.isSplitProver() && verifyingKey.isSplitVerifier();\n case CREDITS_PROGRAM_KEYS.transfer_private.locator:\n return provingKey.isTransferPrivateProver() && verifyingKey.isTransferPrivateVerifier();\n case CREDITS_PROGRAM_KEYS.transfer_private_to_public.locator:\n return provingKey.isTransferPrivateToPublicProver() && verifyingKey.isTransferPrivateToPublicVerifier();\n case CREDITS_PROGRAM_KEYS.transfer_public.locator:\n return provingKey.isTransferPublicProver() && verifyingKey.isTransferPublicVerifier();\n case CREDITS_PROGRAM_KEYS.transfer_public_to_private.locator:\n return provingKey.isTransferPublicToPrivateProver() && verifyingKey.isTransferPublicToPrivateVerifier();\n case CREDITS_PROGRAM_KEYS.unbond_public.locator:\n return provingKey.isUnbondPublicProver() && verifyingKey.isUnbondPublicVerifier();\n default:\n return false;\n }\n }\n\n /**\n * Get fee_private function keys from the credits.aleo program. The keys must be cached prior to calling this\n * method for it to work.\n *\n * @returns {Promise} Proving and verifying keys for the join function\n */\n feePrivateKeys(): Promise {\n return this.functionKeys(OfflineSearchParams.feePrivateKeyParams());\n };\n\n /**\n * Get fee_public function keys from the credits.aleo program. The keys must be cached prior to calling this\n * method for it to work.\n *\n * @returns {Promise} Proving and verifying keys for the join function\n */\n feePublicKeys(): Promise {\n return this.functionKeys(OfflineSearchParams.feePublicKeyParams());\n };\n\n /**\n * Get join function keys from the credits.aleo program. The keys must be cached prior to calling this\n * method for it to work.\n *\n * @returns {Promise} Proving and verifying keys for the join function\n */\n joinKeys(): Promise {\n return this.functionKeys(OfflineSearchParams.joinKeyParams());\n };\n\n /**\n * Get split function keys from the credits.aleo program. The keys must be cached prior to calling this\n * method for it to work.\n *\n * @returns {Promise} Proving and verifying keys for the join function\n */\n splitKeys(): Promise {\n return this.functionKeys(OfflineSearchParams.splitKeyParams());\n };\n\n /**\n * Get keys for a variant of the transfer function from the credits.aleo program.\n *\n *\n * @param {string} visibility Visibility of the transfer function (private, public, privateToPublic, publicToPrivate)\n * @returns {Promise} Proving and verifying keys for the specified transfer function\n *\n * @example\n * // Create a new OfflineKeyProvider\n * const offlineKeyProvider = new OfflineKeyProvider();\n *\n * // Cache the keys for future use with the official locator\n * const transferPublicProvingKeyBytes = await readBinaryFile('./resources/transfer_public.prover.a74565e');\n * const transferPublicProvingKey = ProvingKey.fromBytes(transferPublicProvingKeyBytes);\n *\n * // Cache the transfer_public keys for future use with the OfflinKeyProvider's convenience method for\n * // transfer_public (the verifying key will be cached automatically)\n * offlineKeyProvider.insertTransferPublicKeys(transferPublicProvingKey);\n *\n * /// When they're needed, retrieve the keys from the cache\n * const [transferPublicProvingKey, transferPublicVerifyingKey] = await keyProvider.transferKeys(\"public\");\n */\n transferKeys(visibility: string): Promise {\n if (PRIVATE_TRANSFER.has(visibility)) {\n return this.functionKeys(OfflineSearchParams.transferPrivateKeyParams());\n } else if (PRIVATE_TO_PUBLIC_TRANSFER.has(visibility)) {\n return this.functionKeys(OfflineSearchParams.transferPrivateToPublicKeyParams());\n } else if (PUBLIC_TRANSFER.has(visibility)) {\n return this.functionKeys(OfflineSearchParams.transferPublicKeyParams());\n } else if (PUBLIC_TRANSFER_AS_SIGNER.has(visibility)) {\n return this.functionKeys(OfflineSearchParams.transferPublicAsSignerKeyParams());\n } else if (PUBLIC_TO_PRIVATE_TRANSFER.has(visibility)) {\n return this.functionKeys(OfflineSearchParams.transferPublicToPrivateKeyParams());\n } else {\n throw new Error(\"Invalid visibility type\");\n }\n };\n\n /**\n * Get unbond_public function keys from the credits.aleo program\n *\n * @returns {Promise} Proving and verifying keys for the join function\n */\n async unBondPublicKeys(): Promise {\n return this.functionKeys(OfflineSearchParams.unbondPublicKeyParams());\n };\n\n /**\n * Insert the proving and verifying keys for the bond_public function into the cache. Only the proving key needs\n * to be inserted, the verifying key is automatically inserted by the SDK. This function will automatically check\n * that the keys match the expected checksum for bond_public before inserting them into the cache.\n *\n * @param provingKey\n */\n insertBondPublicKeys(provingKey: ProvingKey) {\n if (provingKey.isBondPublicProver()) {\n this.cache.set(CREDITS_PROGRAM_KEYS.bond_public.locator, [provingKey.toBytes(), VerifyingKey.bondPublicVerifier().toBytes()]);\n } else {\n throw new Error(\"Attempted to insert invalid proving keys for bond_public\");\n }\n }\n\n /**\n * Insert the proving and verifying keys for the claim_unbond_public function into the cache. Only the proving key needs\n * to be inserted, the verifying key is automatically inserted by the SDK. This function will automatically check\n * that the keys match the expected checksum for claim_unbond_public before inserting them into the cache.\n *\n * @param provingKey\n */\n insertClaimUnbondPublicKeys(provingKey: ProvingKey) {\n if (provingKey.isClaimUnbondPublicProver()) {\n this.cache.set(CREDITS_PROGRAM_KEYS.claim_unbond_public.locator, [provingKey.toBytes(), VerifyingKey.claimUnbondPublicVerifier().toBytes()]);\n } else {\n throw new Error(\"Attempted to insert invalid proving keys for claim_unbond_public\");\n }\n }\n\n /**\n * Insert the proving and verifying keys for the fee_private function into the cache. Only the proving key needs\n * to be inserted, the verifying key is automatically inserted by the SDK. This function will automatically check\n * that the keys match the expected checksum for fee_private before inserting them into the cache.\n *\n * @param provingKey\n */\n insertFeePrivateKeys(provingKey: ProvingKey) {\n if (provingKey.isFeePrivateProver()) {\n this.cache.set(CREDITS_PROGRAM_KEYS.fee_private.locator, [provingKey.toBytes(), VerifyingKey.feePrivateVerifier().toBytes()]);\n } else {\n throw new Error(\"Attempted to insert invalid proving keys for fee_private\");\n }\n }\n\n /**\n * Insert the proving and verifying keys for the fee_public function into the cache. Only the proving key needs\n * to be inserted, the verifying key is automatically inserted by the SDK. This function will automatically check\n * that the keys match the expected checksum for fee_public before inserting them into the cache.\n *\n * @param provingKey\n */\n insertFeePublicKeys(provingKey: ProvingKey) {\n if (provingKey.isFeePublicProver()) {\n this.cache.set(CREDITS_PROGRAM_KEYS.fee_public.locator, [provingKey.toBytes(), VerifyingKey.feePublicVerifier().toBytes()]);\n } else {\n throw new Error(\"Attempted to insert invalid proving keys for fee_public\");\n }\n }\n\n /**\n * Insert the proving and verifying keys for the join function into the cache. Only the proving key needs\n * to be inserted, the verifying key is automatically inserted by the SDK. This function will automatically check\n * that the keys match the expected checksum for join before inserting them into the cache.\n *\n * @param provingKey\n */\n insertJoinKeys(provingKey: ProvingKey) {\n if (provingKey.isJoinProver()) {\n this.cache.set(CREDITS_PROGRAM_KEYS.join.locator, [provingKey.toBytes(), VerifyingKey.joinVerifier().toBytes()]);\n } else {\n throw new Error(\"Attempted to insert invalid proving keys for join\");\n }\n }\n\n /**\n * Insert the proving and verifying keys for the set_validator_state function into the cache. Only the proving key needs\n * to be inserted, the verifying key is automatically inserted by the SDK. This function will automatically check\n * that the keys match the expected checksum for set_validator_state before inserting them into the cache.\n *\n * @param provingKey\n */\n insertSetValidatorStateKeys(provingKey: ProvingKey) {\n if (provingKey.isSetValidatorStateProver()) {\n this.cache.set(CREDITS_PROGRAM_KEYS.set_validator_state.locator, [provingKey.toBytes(), VerifyingKey.setValidatorStateVerifier().toBytes()]);\n } else {\n throw new Error(\"Attempted to insert invalid proving keys for set_validator_state\");\n }\n }\n\n /**\n * Insert the proving and verifying keys for the split function into the cache. Only the proving key needs\n * to be inserted, the verifying key is automatically inserted by the SDK. This function will automatically check\n * that the keys match the expected checksum for split before inserting them into the cache.\n *\n * @param provingKey\n */\n insertSplitKeys(provingKey: ProvingKey) {\n if (provingKey.isSplitProver()) {\n this.cache.set(CREDITS_PROGRAM_KEYS.split.locator, [provingKey.toBytes(), VerifyingKey.splitVerifier().toBytes()]);\n } else {\n throw new Error(\"Attempted to insert invalid proving keys for split\");\n }\n }\n\n /**\n * Insert the proving and verifying keys for the transfer_private function into the cache. Only the proving key needs\n * to be inserted, the verifying key is automatically inserted by the SDK. This function will automatically check\n * that the keys match the expected checksum for transfer_private before inserting them into the cache.\n *\n * @param provingKey\n */\n insertTransferPrivateKeys(provingKey: ProvingKey) {\n if (provingKey.isTransferPrivateProver()) {\n this.cache.set(CREDITS_PROGRAM_KEYS.transfer_private.locator, [provingKey.toBytes(), VerifyingKey.transferPrivateVerifier().toBytes()]);\n } else {\n throw new Error(\"Attempted to insert invalid proving keys for transfer_private\");\n }\n }\n\n /**\n * Insert the proving and verifying keys for the transfer_private_to_public function into the cache. Only the proving key needs\n * to be inserted, the verifying key is automatically inserted by the SDK. This function will automatically check\n * that the keys match the expected checksum for transfer_private_to_public before inserting them into the cache.\n *\n * @param provingKey\n */\n insertTransferPrivateToPublicKeys(provingKey: ProvingKey) {\n if (provingKey.isTransferPrivateToPublicProver()) {\n this.cache.set(CREDITS_PROGRAM_KEYS.transfer_private_to_public.locator, [provingKey.toBytes(), VerifyingKey.transferPrivateToPublicVerifier().toBytes()]);\n } else {\n throw new Error(\"Attempted to insert invalid proving keys for transfer_private_to_public\");\n }\n }\n\n /**\n * Insert the proving and verifying keys for the transfer_public function into the cache. Only the proving key needs\n * to be inserted, the verifying key is automatically inserted by the SDK. This function will automatically check\n * that the keys match the expected checksum for transfer_public before inserting them into the cache.\n *\n * @param provingKey\n */\n insertTransferPublicKeys(provingKey: ProvingKey) {\n if (provingKey.isTransferPublicProver()) {\n this.cache.set(CREDITS_PROGRAM_KEYS.transfer_public.locator, [provingKey.toBytes(), VerifyingKey.transferPublicVerifier().toBytes()]);\n } else {\n throw new Error(\"Attempted to insert invalid proving keys for transfer_public\");\n }\n }\n\n /**\n * Insert the proving and verifying keys for the transfer_public_to_private function into the cache. Only the proving key needs\n * to be inserted, the verifying key is automatically inserted by the SDK. This function will automatically check\n * that the keys match the expected checksum for transfer_public_to_private before inserting them into the cache.\n *\n * @param provingKey\n */\n insertTransferPublicToPrivateKeys(provingKey: ProvingKey) {\n if (provingKey.isTransferPublicToPrivateProver()) {\n this.cache.set(CREDITS_PROGRAM_KEYS.transfer_public_to_private.locator, [provingKey.toBytes(), VerifyingKey.transferPublicToPrivateVerifier().toBytes()]);\n } else {\n throw new Error(\"Attempted to insert invalid proving keys for transfer_public_to_private\");\n }\n }\n\n insertUnbondPublicKeys(provingKey: ProvingKey) {\n if (provingKey.isUnbondPublicProver()) {\n this.cache.set(CREDITS_PROGRAM_KEYS.unbond_public.locator, [provingKey.toBytes(), VerifyingKey.unbondPublicVerifier().toBytes()]);\n } else {\n throw new Error(\"Attempted to insert invalid proving keys for unbond_public\");\n }\n }\n}\n\n\nexport {OfflineKeyProvider, OfflineSearchParams}\n","import { logAndThrow, RecordPlaintext } from \"./index\";\nimport { Account } from \"./account\";\nimport { AleoNetworkClient } from \"./network-client\";\n\n/**\n * Interface for record search parameters. This allows for arbitrary search parameters to be passed to record provider\n * implementations.\n */\ninterface RecordSearchParams {\n [key: string]: any; // This allows for arbitrary keys with any type values\n}\n\n/**\n * Interface for a record provider. A record provider is used to find records for use in deployment and execution\n * transactions on the Aleo Network. A default implementation is provided by the NetworkRecordProvider class. However,\n * a custom implementation can be provided (say if records are synced locally to a database from the network) by\n * implementing this interface.\n */\ninterface RecordProvider {\n account: Account\n\n /**\n * Find a credits.aleo record with a given number of microcredits from the chosen provider\n *\n * @param {number} microcredits The number of microcredits to search for\n * @param {boolean} unspent Whether or not the record is unspent\n * @param {string[]} nonces Nonces of records already found so they are not found again\n * @param {RecordSearchParams} searchParameters Additional parameters to search for\n * @returns {Promise} The record if found, otherwise an error\n *\n * @example\n * // A class implementing record provider can be used to find a record with a given number of microcredits\n * const record = await recordProvider.findCreditsRecord(5000, true, []);\n *\n * // When a record is found but not yet used, its nonce should be added to the nonces array so that it is not\n * // found again if a subsequent search is performed\n * const record2 = await recordProvider.findCreditsRecord(5000, true, [record.nonce()]);\n *\n * // When the program manager is initialized with the record provider it will be used to find automatically find\n * // fee records and amount records for value transfers so that they do not need to be specified manually\n * const programManager = new ProgramManager(\"https://api.explorer.aleo.org/v1\", keyProvider, recordProvider);\n * programManager.transfer(1, \"aleo166q6ww6688cug7qxwe7nhctjpymydwzy2h7rscfmatqmfwnjvggqcad0at\", \"public\", 0.5);\n */\n findCreditsRecord(microcredits: number, unspent: boolean, nonces?: string[], searchParameters?: RecordSearchParams): Promise;\n\n /**\n * Find a list of credit.aleo records with a given number of microcredits from the chosen provider\n *\n * @param {number} microcreditAmounts A list of separate microcredit amounts to search for (e.g. [5000, 100000])\n * @param {boolean} unspent Whether or not the record is unspent\n * @param {string[]} nonces Nonces of records already found so that they are not found again\n * @param {RecordSearchParams} searchParameters Additional parameters to search for\n * @returns {Promise} A list of records with a value greater or equal to the amounts specified if such records exist, otherwise an error\n *\n * @example\n * // A class implementing record provider can be used to find a record with a given number of microcredits\n * const records = await recordProvider.findCreditsRecords([5000, 5000], true, []);\n *\n * // When a record is found but not yet used, it's nonce should be added to the nonces array so that it is not\n * // found again if a subsequent search is performed\n * const nonces = [];\n * records.forEach(record => { nonces.push(record.nonce()) });\n * const records2 = await recordProvider.findCreditsRecord(5000, true, nonces);\n *\n * // When the program manager is initialized with the record provider it will be used to find automatically find\n * // fee records and amount records for value transfers so that they do not need to be specified manually\n * const programManager = new ProgramManager(\"https://api.explorer.aleo.org/v1\", keyProvider, recordProvider);\n * programManager.transfer(1, \"aleo166q6ww6688cug7qxwe7nhctjpymydwzy2h7rscfmatqmfwnjvggqcad0at\", \"public\", 0.5);\n */\n findCreditsRecords(microcreditAmounts: number[], unspent: boolean, nonces?: string[], searchParameters?: RecordSearchParams): Promise;\n\n /**\n * Find an arbitrary record\n * @param {boolean} unspent Whether or not the record is unspent\n * @param {string[]} nonces Nonces of records already found so that they are not found again\n * @param {RecordSearchParams} searchParameters Additional parameters to search for\n * @returns {Promise} The record if found, otherwise an error\n *\n * @example\n * // The RecordSearchParams interface can be used to create parameters for custom record searches which can then\n * // be passed to the record provider. An example of how this would be done for the credits.aleo program is shown\n * // below.\n *\n * class CustomRecordSearch implements RecordSearchParams {\n * startHeight: number;\n * endHeight: number;\n * amount: number;\n * program: string;\n * recordName: string;\n * constructor(startHeight: number, endHeight: number, credits: number, maxRecords: number, programName: string, recordName: string) {\n * this.startHeight = startHeight;\n * this.endHeight = endHeight;\n * this.amount = amount;\n * this.program = programName;\n * this.recordName = recordName;\n * }\n * }\n *\n * const params = new CustomRecordSearch(0, 100, 5000, \"credits.aleo\", \"credits\");\n *\n * const record = await recordProvider.findRecord(true, [], params);\n */\n findRecord(unspent: boolean, nonces?: string[], searchParameters?: RecordSearchParams): Promise;\n\n /**\n * Find multiple records from arbitrary programs\n *\n * @param {boolean} unspent Whether or not the record is unspent\n * @param {string[]} nonces Nonces of records already found so that they are not found again\n * @param {RecordSearchParams} searchParameters Additional parameters to search for\n * @returns {Promise} The record if found, otherwise an error\n *\n * // The RecordSearchParams interface can be used to create parameters for custom record searches which can then\n * // be passed to the record provider. An example of how this would be done for the credits.aleo program is shown\n * // below.\n *\n * class CustomRecordSearch implements RecordSearchParams {\n * startHeight: number;\n * endHeight: number;\n * amount: number;\n * maxRecords: number;\n * programName: string;\n * recordName: string;\n * constructor(startHeight: number, endHeight: number, credits: number, maxRecords: number, programName: string, recordName: string) {\n * this.startHeight = startHeight;\n * this.endHeight = endHeight;\n * this.amount = amount;\n * this.maxRecords = maxRecords;\n * this.programName = programName;\n * this.recordName = recordName;\n * }\n * }\n *\n * const params = new CustomRecordSearch(0, 100, 5000, 2, \"credits.aleo\", \"credits\");\n * const records = await recordProvider.findRecord(true, [], params);\n */\n findRecords(unspent: boolean, nonces?: string[], searchParameters?: RecordSearchParams): Promise;\n}\n\n/**\n * A record provider implementation that uses the official Aleo API to find records for usage in program execution and\n * deployment, wallet functionality, and other use cases.\n */\nclass NetworkRecordProvider implements RecordProvider {\n account: Account;\n networkClient: AleoNetworkClient;\n constructor(account: Account, networkClient: AleoNetworkClient) {\n this.account = account;\n this.networkClient = networkClient;\n }\n\n /**\n * Set the account used to search for records\n *\n * @param {Account} account The account to use for searching for records\n */\n setAccount(account: Account) {\n this.account = account;\n }\n\n /**\n * Find a list of credit records with a given number of microcredits by via the official Aleo API\n *\n * @param {number[]} microcredits The number of microcredits to search for\n * @param {boolean} unspent Whether or not the record is unspent\n * @param {string[]} nonces Nonces of records already found so that they are not found again\n * @param {RecordSearchParams} searchParameters Additional parameters to search for\n * @returns {Promise} The record if found, otherwise an error\n *\n * @example\n * // Create a new NetworkRecordProvider\n * const networkClient = new AleoNetworkClient(\"https://api.explorer.aleo.org/v1\");\n * const keyProvider = new AleoKeyProvider();\n * const recordProvider = new NetworkRecordProvider(account, networkClient);\n *\n * // The record provider can be used to find records with a given number of microcredits\n * const record = await recordProvider.findCreditsRecord(5000, true, []);\n *\n * // When a record is found but not yet used, it's nonce should be added to the nonces parameter so that it is not\n * // found again if a subsequent search is performed\n * const records = await recordProvider.findCreditsRecords(5000, true, [record.nonce()]);\n *\n * // When the program manager is initialized with the record provider it will be used to find automatically find\n * // fee records and amount records for value transfers so that they do not need to be specified manually\n * const programManager = new ProgramManager(\"https://api.explorer.aleo.org/v1\", keyProvider, recordProvider);\n * programManager.transfer(1, \"aleo166q6ww6688cug7qxwe7nhctjpymydwzy2h7rscfmatqmfwnjvggqcad0at\", \"public\", 0.5);\n *\n * */\n async findCreditsRecords(microcredits: number[], unspent: boolean, nonces?: string[], searchParameters?: RecordSearchParams): Promise {\n let startHeight = 0;\n let endHeight = 0;\n\n if (searchParameters) {\n if (\"startHeight\" in searchParameters && typeof searchParameters[\"endHeight\"] == \"number\") {\n startHeight = searchParameters[\"startHeight\"];\n }\n\n if (\"endHeight\" in searchParameters && typeof searchParameters[\"endHeight\"] == \"number\") {\n endHeight = searchParameters[\"endHeight\"];\n }\n }\n\n // If the end height is not specified, use the current block height\n if (endHeight == 0) {\n const end = await this.networkClient.getLatestHeight();\n if (end instanceof Error) {\n throw logAndThrow(\"Unable to get current block height from the network\")\n }\n endHeight = end;\n }\n\n // If the start height is greater than the end height, throw an error\n if (startHeight >= endHeight) {\n throw logAndThrow(\"Start height must be less than end height\");\n }\n\n return await this.networkClient.findUnspentRecords(startHeight, endHeight, this.account.privateKey(), microcredits, undefined, nonces);\n }\n\n /**\n * Find a credit record with a given number of microcredits by via the official Aleo API\n *\n * @param {number} microcredits The number of microcredits to search for\n * @param {boolean} unspent Whether or not the record is unspent\n * @param {string[]} nonces Nonces of records already found so that they are not found again\n * @param {RecordSearchParams} searchParameters Additional parameters to search for\n * @returns {Promise} The record if found, otherwise an error\n *\n * @example\n * // Create a new NetworkRecordProvider\n * const networkClient = new AleoNetworkClient(\"https://api.explorer.aleo.org/v1\");\n * const keyProvider = new AleoKeyProvider();\n * const recordProvider = new NetworkRecordProvider(account, networkClient);\n *\n * // The record provider can be used to find records with a given number of microcredits\n * const record = await recordProvider.findCreditsRecord(5000, true, []);\n *\n * // When a record is found but not yet used, it's nonce should be added to the nonces parameter so that it is not\n * // found again if a subsequent search is performed\n * const records = await recordProvider.findCreditsRecords(5000, true, [record.nonce()]);\n *\n * // When the program manager is initialized with the record provider it will be used to find automatically find\n * // fee records and amount records for value transfers so that they do not need to be specified manually\n * const programManager = new ProgramManager(\"https://api.explorer.aleo.org/v1\", keyProvider, recordProvider);\n * programManager.transfer(1, \"aleo166q6ww6688cug7qxwe7nhctjpymydwzy2h7rscfmatqmfwnjvggqcad0at\", \"public\", 0.5);\n */\n async findCreditsRecord(microcredits: number, unspent: boolean, nonces?: string[], searchParameters?: RecordSearchParams): Promise {\n const records = await this.findCreditsRecords([microcredits], unspent, nonces, searchParameters);\n if (!(records instanceof Error) && records.length > 0) {\n return records[0];\n }\n console.error(\"Record not found with error:\", records);\n return new Error(\"Record not found\");\n }\n\n /**\n * Find an arbitrary record. WARNING: This function is not implemented yet and will throw an error.\n */\n async findRecord(unspent: boolean, nonces?: string[], searchParameters?: RecordSearchParams): Promise {\n throw new Error(\"Method not implemented.\");\n }\n\n /**\n * Find multiple arbitrary records. WARNING: This function is not implemented yet and will throw an error.\n */\n async findRecords(unspent: boolean, nonces?: string[], searchParameters?: RecordSearchParams): Promise {\n throw new Error(\"Method not implemented.\");\n }\n\n}\n\n/**\n * BlockHeightSearch is a RecordSearchParams implementation that allows for searching for records within a given\n * block height range.\n *\n * @example\n * // Create a new BlockHeightSearch\n * const params = new BlockHeightSearch(89995, 99995);\n *\n * // Create a new NetworkRecordProvider\n * const networkClient = new AleoNetworkClient(\"https://api.explorer.aleo.org/v1\");\n * const keyProvider = new AleoKeyProvider();\n * const recordProvider = new NetworkRecordProvider(account, networkClient);\n *\n * // The record provider can be used to find records with a given number of microcredits and the block height search\n * // can be used to find records within a given block height range\n * const record = await recordProvider.findCreditsRecord(5000, true, [], params);\n *\n */\nclass BlockHeightSearch implements RecordSearchParams {\n startHeight: number;\n endHeight: number;\n constructor(startHeight: number, endHeight: number) {\n this.startHeight = startHeight;\n this.endHeight = endHeight;\n }\n}\n\nexport { BlockHeightSearch, NetworkRecordProvider, RecordProvider, RecordSearchParams};\n","// Experimental example where SDK manages worker\n\nimport { wrap } from \"comlink\";\nimport { WorkerAPI } from './worker';\n\nlet singletonWorker: WorkerAPI | null = null;\n\nconst createAleoWorker = (): WorkerAPI => {\n if (!singletonWorker) {\n const worker = new Worker(new URL(\"worker.js\", import.meta.url), {\n type: \"module\",\n });\n singletonWorker = wrap(worker);\n }\n return singletonWorker;\n};\n\nexport { createAleoWorker };","import {\n Account,\n AleoKeyProvider,\n AleoNetworkClient,\n ExecutionResponse,\n FunctionKeyProvider,\n FunctionKeyPair,\n OfflineQuery,\n KeySearchParams,\n RecordPlaintext,\n RecordProvider,\n RecordSearchParams,\n PrivateKey,\n Program,\n ProgramImports,\n ProvingKey,\n VerifyingKey,\n Transaction,\n PRIVATE_TRANSFER_TYPES,\n VALID_TRANSFER_TYPES,\n logAndThrow,\n ProgramManagerBase as WasmProgramManager, verifyFunctionExecution, AleoKeyProviderParams, CREDITS_PROGRAM_KEYS,\n} from \"./index\";\nimport {Execution} from \"@provablehq/wasm/dist/crates/aleo_wasm\";\n\n/**\n * Represents the options for executing a transaction in the Aleo network.\n * This interface is used to specify the parameters required for building and submitting an execution transaction.\n *\n * @property {string} programName - The name of the program containing the function to be executed.\n * @property {string} functionName - The name of the function to execute within the program.\n * @property {number} fee - The fee to be paid for the transaction.\n * @property {boolean} privateFee - If true, uses a private record to pay the fee; otherwise, uses the account's public credit balance.\n * @property {string[]} inputs - The inputs to the function being executed.\n * @property {RecordSearchParams} [recordSearchParams] - Optional parameters for searching for a record to pay the execution transaction fee.\n * @property {KeySearchParams} [keySearchParams] - Optional parameters for finding the matching proving & verifying keys for the function.\n * @property {string | RecordPlaintext} [feeRecord] - Optional fee record to use for the transaction.\n * @property {ProvingKey} [provingKey] - Optional proving key to use for the transaction.\n * @property {VerifyingKey} [verifyingKey] - Optional verifying key to use for the transaction.\n * @property {PrivateKey} [privateKey] - Optional private key to use for the transaction.\n * @property {OfflineQuery} [offlineQuery] - Optional offline query if creating transactions in an offline environment.\n * @property {string | Program} [program] - Optional program source code to use for the transaction.\n * @property {ProgramImports} [imports] - Optional programs that the program being executed imports.\n */\ninterface ExecuteOptions {\n programName: string;\n functionName: string;\n fee: number;\n privateFee: boolean;\n inputs: string[];\n recordSearchParams?: RecordSearchParams;\n keySearchParams?: KeySearchParams;\n feeRecord?: string | RecordPlaintext;\n provingKey?: ProvingKey;\n verifyingKey?: VerifyingKey;\n privateKey?: PrivateKey;\n offlineQuery?: OfflineQuery;\n program?: string | Program;\n imports?: ProgramImports;\n}\n\n/**\n * The ProgramManager class is used to execute and deploy programs on the Aleo network and create value transfers.\n */\nclass ProgramManager {\n account: Account | undefined;\n keyProvider: FunctionKeyProvider;\n host: string;\n networkClient: AleoNetworkClient;\n recordProvider: RecordProvider | undefined;\n\n /** Create a new instance of the ProgramManager\n *\n * @param { string | undefined } host A host uri running the official Aleo API\n * @param { FunctionKeyProvider | undefined } keyProvider A key provider that implements {@link FunctionKeyProvider} interface\n * @param { RecordProvider | undefined } recordProvider A record provider that implements {@link RecordProvider} interface\n */\n constructor(host?: string | undefined, keyProvider?: FunctionKeyProvider | undefined, recordProvider?: RecordProvider | undefined) {\n this.host = host ? host : 'https://api.explorer.aleo.org/v1';\n this.networkClient = new AleoNetworkClient(this.host);\n \n this.keyProvider = keyProvider ? keyProvider : new AleoKeyProvider();\n this.recordProvider = recordProvider;\n }\n\n /**\n * Set the account to use for transaction submission to the Aleo network\n *\n * @param {Account} account Account to use for transaction submission\n */\n setAccount(account: Account) {\n this.account = account;\n }\n\n /**\n * Set the key provider that provides the proving and verifying keys for programs\n *\n * @param {FunctionKeyProvider} keyProvider\n */\n setKeyProvider(keyProvider: FunctionKeyProvider) {\n this.keyProvider = keyProvider;\n }\n\n /**\n * Set the host peer to use for transaction submission to the Aleo network\n *\n * @param host {string} Peer url to use for transaction submission\n */\n setHost(host: string) {\n this.host = host;\n this.networkClient.setHost(host);\n }\n\n /**\n * Set the record provider that provides records for transactions\n *\n * @param {RecordProvider} recordProvider\n */\n setRecordProvider(recordProvider: RecordProvider) {\n this.recordProvider = recordProvider;\n }\n\n /**\n * Deploy an Aleo program to the Aleo network\n *\n * @param {string} program Program source code\n * @param {number} fee Fee to pay for the transaction\n * @param {boolean} privateFee Use a private record to pay the fee. If false this will use the account's public credit balance\n * @param {RecordSearchParams | undefined} recordSearchParams Optional parameters for searching for a record to use\n * pay the deployment fee\n * @param {string | RecordPlaintext | undefined} feeRecord Optional Fee record to use for the transaction\n * @param {PrivateKey | undefined} privateKey Optional private key to use for the transaction\n * @returns {string | Error} The transaction id of the deployed program or a failure message from the network\n *\n * @example\n * // Create a new NetworkClient, KeyProvider, and RecordProvider\n * const networkClient = new AleoNetworkClient(\"https://api.explorer.aleo.org/v1\");\n * const keyProvider = new AleoKeyProvider();\n * const recordProvider = new NetworkRecordProvider(account, networkClient);\n *\n * // Initialize a program manager with the key provider to automatically fetch keys for deployments\n * const program = \"program hello_hello.aleo;\\n\\nfunction hello:\\n input r0 as u32.public;\\n input r1 as u32.private;\\n add r0 r1 into r2;\\n output r2 as u32.private;\\n\";\n * const programManager = new ProgramManager(\"https://api.explorer.aleo.org/v1\", keyProvider, recordProvider);\n *\n * // Define a fee in credits\n * const fee = 1.2;\n *\n * // Deploy the program\n * const tx_id = await programManager.deploy(program, fee);\n *\n * // Verify the transaction was successful\n * const transaction = await programManager.networkClient.getTransaction(tx_id);\n */\n async deploy(\n program: string,\n fee: number,\n privateFee: boolean,\n recordSearchParams?: RecordSearchParams,\n feeRecord?: string | RecordPlaintext,\n privateKey?: PrivateKey,\n ): Promise {\n // Ensure the program is valid and does not exist on the network\n try {\n const programObject = Program.fromString(program);\n let programSource;\n try {\n programSource = await this.networkClient.getProgram(programObject.id());\n } catch (e) {\n // Program does not exist on the network, deployment can proceed\n console.log(`Program ${programObject.id()} does not exist on the network, deploying...`);\n }\n if (typeof programSource == \"string\") {\n throw (`Program ${programObject.id()} already exists on the network, please rename your program`);\n }\n } catch (e) {\n throw logAndThrow(`Error validating program: ${e}`);\n }\n\n // Get the private key from the account if it is not provided in the parameters\n let deploymentPrivateKey = privateKey;\n if (typeof privateKey === \"undefined\" && typeof this.account !== \"undefined\") {\n deploymentPrivateKey = this.account.privateKey();\n }\n\n if (typeof deploymentPrivateKey === \"undefined\") {\n throw(\"No private key provided and no private key set in the ProgramManager\");\n }\n\n // Get the fee record from the account if it is not provided in the parameters\n try {\n feeRecord = privateFee ? await this.getCreditsRecord(fee, [], feeRecord, recordSearchParams) : undefined;\n } catch (e) {\n throw logAndThrow(`Error finding fee record. Record finder response: '${e}'. Please ensure you're connected to a valid Aleo network and a record with enough balance exists.`);\n }\n\n // Get the proving and verifying keys from the key provider\n let feeKeys;\n try {\n feeKeys = privateFee ? await this.keyProvider.feePrivateKeys() : await this.keyProvider.feePublicKeys();\n } catch (e) {\n throw logAndThrow(`Error finding fee keys. Key finder response: '${e}'. Please ensure your key provider is configured correctly.`);\n }\n const [feeProvingKey, feeVerifyingKey] = feeKeys;\n\n // Resolve the program imports if they exist\n let imports;\n try {\n imports = await this.networkClient.getProgramImports(program);\n } catch (e) {\n throw logAndThrow(`Error finding program imports. Network response: '${e}'. Please ensure you're connected to a valid Aleo network and the program is deployed to the network.`);\n }\n\n // Build a deployment transaction and submit it to the network\n const tx = await WasmProgramManager.buildDeploymentTransaction(deploymentPrivateKey, program, fee, feeRecord, this.host, imports, feeProvingKey, feeVerifyingKey);\n return await this.networkClient.submitTransaction(tx);\n }\n\n /**\n * Builds an execution transaction for submission to the Aleo network.\n *\n * @param {ExecuteOptions} options - The options for the execution transaction.\n * @returns {Promise} - A promise that resolves to the transaction or an error.\n *\n * @example\n * // Create a new NetworkClient, KeyProvider, and RecordProvider using official Aleo record, key, and network providers\n * const networkClient = new AleoNetworkClient(\"https://api.explorer.aleo.org/v1\");\n * const keyProvider = new AleoKeyProvider();\n * keyProvider.useCache = true;\n * const recordProvider = new NetworkRecordProvider(account, networkClient);\n *\n * // Initialize a program manager with the key provider to automatically fetch keys for executions\n * const programManager = new ProgramManager(\"https://api.explorer.aleo.org/v1\", keyProvider, recordProvider);\n *\n * // Build and execute the transaction\n * const transaction = await programManager.buildExecutionTransaction({\n * programName: \"hello_hello.aleo\",\n * functionName: \"hello_hello\",\n * fee: 0.020,\n * privateFee: false,\n * inputs: [\"5u32\", \"5u32\"],\n * keySearchParams: { \"cacheKey\": \"hello_hello:hello\" }\n * });\n * const result = await programManager.networkClient.submitTransaction(transaction);\n */\n async buildExecutionTransaction(options: ExecuteOptions): Promise {\n // Destructure the options object to access the parameters\n const {\n programName,\n functionName,\n fee,\n privateFee,\n inputs,\n recordSearchParams,\n keySearchParams,\n privateKey,\n offlineQuery\n } = options;\n\n let feeRecord = options.feeRecord;\n let provingKey = options.provingKey;\n let verifyingKey = options.verifyingKey;\n let program = options.program;\n let imports = options.imports;\n\n // Ensure the function exists on the network\n if (program === undefined) {\n try {\n program = (await this.networkClient.getProgram(programName));\n } catch (e) {\n throw logAndThrow(`Error finding ${programName}. Network response: '${e}'. Please ensure you're connected to a valid Aleo network the program is deployed to the network.`);\n }\n } else if (program instanceof Program) {\n program = program.toString();\n }\n\n // Get the private key from the account if it is not provided in the parameters\n let executionPrivateKey = privateKey;\n if (typeof privateKey === \"undefined\" && typeof this.account !== \"undefined\") {\n executionPrivateKey = this.account.privateKey();\n }\n\n if (typeof executionPrivateKey === \"undefined\") {\n throw(\"No private key provided and no private key set in the ProgramManager\");\n }\n\n // Get the fee record from the account if it is not provided in the parameters\n try {\n feeRecord = privateFee ? await this.getCreditsRecord(fee, [], feeRecord, recordSearchParams) : undefined;\n } catch (e) {\n throw logAndThrow(`Error finding fee record. Record finder response: '${e}'. Please ensure you're connected to a valid Aleo network and a record with enough balance exists.`);\n }\n\n // Get the fee proving and verifying keys from the key provider\n let feeKeys;\n try {\n feeKeys = privateFee ? await this.keyProvider.feePrivateKeys() : await this.keyProvider.feePublicKeys();\n } catch (e) {\n throw logAndThrow(`Error finding fee keys. Key finder response: '${e}'. Please ensure your key provider is configured correctly.`);\n }\n const [feeProvingKey, feeVerifyingKey] = feeKeys;\n\n // If the function proving and verifying keys are not provided, attempt to find them using the key provider\n if (!provingKey || !verifyingKey) {\n try {\n [provingKey, verifyingKey] = await this.keyProvider.functionKeys(keySearchParams);\n } catch (e) {\n console.log(`Function keys not found. Key finder response: '${e}'. The function keys will be synthesized`)\n }\n }\n\n // Resolve the program imports if they exist\n const numberOfImports = Program.fromString(program).getImports().length;\n if (numberOfImports > 0 && !imports) {\n try {\n imports = await this.networkClient.getProgramImports(programName);\n } catch (e) {\n throw logAndThrow(`Error finding program imports. Network response: '${e}'. Please ensure you're connected to a valid Aleo network and the program is deployed to the network.`);\n }\n }\n\n // Build an execution transaction and submit it to the network\n return await WasmProgramManager.buildExecutionTransaction(executionPrivateKey, program, functionName, inputs, fee, feeRecord, this.host, imports, provingKey, verifyingKey, feeProvingKey, feeVerifyingKey, offlineQuery);\n }\n\n /**\n * Builds an execution transaction for submission to the Aleo network.\n *\n * @param {ExecuteOptions} options - The options for the execution transaction.\n * @returns {Promise} - A promise that resolves to the transaction or an error.\n *\n * @example\n * // Create a new NetworkClient, KeyProvider, and RecordProvider using official Aleo record, key, and network providers\n * const networkClient = new AleoNetworkClient(\"https://api.explorer.aleo.org/v1\");\n * const keyProvider = new AleoKeyProvider();\n * keyProvider.useCache = true;\n * const recordProvider = new NetworkRecordProvider(account, networkClient);\n *\n * // Initialize a program manager with the key provider to automatically fetch keys for executions\n * const programManager = new ProgramManager(\"https://api.explorer.aleo.org/v1\", keyProvider, recordProvider);\n *\n * // Build and execute the transaction\n * const transaction = await programManager.execute({\n * programName: \"hello_hello.aleo\",\n * functionName: \"hello_hello\",\n * fee: 0.020,\n * privateFee: false,\n * inputs: [\"5u32\", \"5u32\"],\n * keySearchParams: { \"cacheKey\": \"hello_hello:hello\" }\n * });\n * const result = await programManager.networkClient.submitTransaction(transaction);\n */\n async execute(options: ExecuteOptions): Promise {\n const tx = await this.buildExecutionTransaction(options);\n return await this.networkClient.submitTransaction(tx);\n }\n\n /**\n * Run an Aleo program in offline mode\n *\n * @param {string} program Program source code containing the function to be executed\n * @param {string} function_name Function name to execute\n * @param {string[]} inputs Inputs to the function\n * @param {number} proveExecution Whether to prove the execution of the function and return an execution transcript\n * that contains the proof.\n * @param {string[] | undefined} imports Optional imports to the program\n * @param {KeySearchParams | undefined} keySearchParams Optional parameters for finding the matching proving &\n * verifying keys for the function\n * @param {ProvingKey | undefined} provingKey Optional proving key to use for the transaction\n * @param {VerifyingKey | undefined} verifyingKey Optional verifying key to use for the transaction\n * @param {PrivateKey | undefined} privateKey Optional private key to use for the transaction\n * @param {OfflineQuery | undefined} offlineQuery Optional offline query if creating transactions in an offline environment\n * @returns {Promise}\n *\n * @example\n * import { Account, Program } from '@provablehq/sdk';\n *\n * /// Create the source for the \"helloworld\" program\n * const program = \"program helloworld.aleo;\\n\\nfunction hello:\\n input r0 as u32.public;\\n input r1 as u32.private;\\n add r0 r1 into r2;\\n output r2 as u32.private;\\n\";\n * const programManager = new ProgramManager();\n *\n * /// Create a temporary account for the execution of the program\n * const account = new Account();\n * programManager.setAccount(account);\n *\n * /// Get the response and ensure that the program executed correctly\n * const executionResponse = await programManager.run(program, \"hello\", [\"5u32\", \"5u32\"]);\n * const result = executionResponse.getOutputs();\n * assert(result === [\"10u32\"]);\n */\n async run(\n program: string,\n function_name: string,\n inputs: string[],\n proveExecution: boolean,\n imports?: ProgramImports,\n keySearchParams?: KeySearchParams,\n provingKey?: ProvingKey,\n verifyingKey?: VerifyingKey,\n privateKey?: PrivateKey,\n offlineQuery?: OfflineQuery,\n ): Promise {\n // Get the private key from the account if it is not provided in the parameters\n let executionPrivateKey = privateKey;\n if (typeof privateKey === \"undefined\" && typeof this.account !== \"undefined\") {\n executionPrivateKey = this.account.privateKey();\n }\n\n if (typeof executionPrivateKey === \"undefined\") {\n throw(\"No private key provided and no private key set in the ProgramManager\");\n }\n\n // If the function proving and verifying keys are not provided, attempt to find them using the key provider\n if (!provingKey || !verifyingKey) {\n try {\n [provingKey, verifyingKey] = await this.keyProvider.functionKeys(keySearchParams);\n } catch (e) {\n console.log(`Function keys not found. Key finder response: '${e}'. The function keys will be synthesized`)\n }\n }\n\n // Run the program offline and return the result\n console.log(\"Running program offline\")\n console.log(\"Proving key: \", provingKey);\n console.log(\"Verifying key: \", verifyingKey);\n return WasmProgramManager.executeFunctionOffline(executionPrivateKey, program, function_name, inputs, proveExecution, false, imports, provingKey, verifyingKey, this.host, offlineQuery);\n }\n\n /**\n * Join two credits records into a single credits record\n *\n * @param {RecordPlaintext | string} recordOne First credits record to join\n * @param {RecordPlaintext | string} recordTwo Second credits record to join\n * @param {number} fee Fee in credits pay for the join transaction\n * @param {boolean} privateFee Use a private record to pay the fee. If false this will use the account's public credit balance\n * @param {RecordSearchParams | undefined} recordSearchParams Optional parameters for finding the fee record to use\n * to pay the fee for the join transaction\n * @param {RecordPlaintext | string | undefined} feeRecord Fee record to use for the join transaction\n * @param {PrivateKey | undefined} privateKey Private key to use for the join transaction\n * @param {OfflineQuery | undefined} offlineQuery Optional offline query if creating transactions in an offline environment\n * @returns {Promise}\n */\n async join(\n recordOne: RecordPlaintext | string,\n recordTwo: RecordPlaintext | string,\n fee: number,\n privateFee: boolean,\n recordSearchParams?: RecordSearchParams | undefined,\n feeRecord?: RecordPlaintext | string | undefined,\n privateKey?: PrivateKey,\n offlineQuery?: OfflineQuery,\n ): Promise {\n // Get the private key from the account if it is not provided in the parameters\n let executionPrivateKey = privateKey;\n if (typeof privateKey === \"undefined\" && typeof this.account !== \"undefined\") {\n executionPrivateKey = this.account.privateKey();\n }\n\n if (typeof executionPrivateKey === \"undefined\") {\n throw(\"No private key provided and no private key set in the ProgramManager\");\n }\n\n // Get the proving and verifying keys from the key provider\n let feeKeys;\n let joinKeys\n try {\n feeKeys = privateFee ? await this.keyProvider.feePrivateKeys() : await this.keyProvider.feePublicKeys();\n joinKeys = await this.keyProvider.joinKeys();\n } catch (e) {\n throw logAndThrow(`Error finding fee keys. Key finder response: '${e}'. Please ensure your key provider is configured correctly.`);\n }\n const [feeProvingKey, feeVerifyingKey] = feeKeys;\n const [joinProvingKey, joinVerifyingKey] = joinKeys;\n\n // Get the fee record from the account if it is not provided in the parameters\n try {\n feeRecord = privateFee ? await this.getCreditsRecord(fee, [], feeRecord, recordSearchParams) : undefined;\n } catch (e) {\n throw logAndThrow(`Error finding fee record. Record finder response: '${e}'. Please ensure you're connected to a valid Aleo network and a record with enough balance exists.`);\n }\n\n // Validate the records provided are valid plaintext records\n try {\n recordOne = recordOne instanceof RecordPlaintext ? recordOne : RecordPlaintext.fromString(recordOne);\n recordTwo = recordTwo instanceof RecordPlaintext ? recordTwo : RecordPlaintext.fromString(recordTwo);\n } catch (e) {\n throw logAndThrow('Records provided are not valid. Please ensure they are valid plaintext records.')\n }\n\n // Build an execution transaction and submit it to the network\n const tx = await WasmProgramManager.buildJoinTransaction(executionPrivateKey, recordOne, recordTwo, fee, feeRecord, this.host, joinProvingKey, joinVerifyingKey, feeProvingKey, feeVerifyingKey, offlineQuery);\n return await this.networkClient.submitTransaction(tx);\n }\n\n /**\n * Split credits into two new credits records\n *\n * @param {number} splitAmount Amount in microcredits to split from the original credits record\n * @param {RecordPlaintext | string} amountRecord Amount record to use for the split transaction\n * @param {PrivateKey | undefined} privateKey Optional private key to use for the split transaction\n * @param {OfflineQuery | undefined} offlineQuery Optional offline query if creating transactions in an offline environment\n * @returns {Promise}\n *\n * @example\n * // Create a new NetworkClient, KeyProvider, and RecordProvider\n * const networkClient = new AleoNetworkClient(\"https://api.explorer.aleo.org/v1\");\n * const keyProvider = new AleoKeyProvider();\n * const recordProvider = new NetworkRecordProvider(account, networkClient);\n *\n * // Initialize a program manager with the key provider to automatically fetch keys for executions\n * const programName = \"hello_hello.aleo\";\n * const programManager = new ProgramManager(\"https://api.explorer.aleo.org/v1\", keyProvider, recordProvider);\n * const record = \"{ owner: aleo184vuwr5u7u0ha5f5k44067dd2uaqewxx6pe5ltha5pv99wvhfqxqv339h4.private, microcredits: 45000000u64.private, _nonce: 4106205762862305308495708971985748592380064201230396559307556388725936304984group.public}\"\n * const tx_id = await programManager.split(25000000, record);\n * const transaction = await programManager.networkClient.getTransaction(tx_id);\n */\n async split(splitAmount: number, amountRecord: RecordPlaintext | string, privateKey?: PrivateKey, offlineQuery?: OfflineQuery): Promise {\n // Get the private key from the account if it is not provided in the parameters\n let executionPrivateKey = privateKey;\n if (typeof executionPrivateKey === \"undefined\" && typeof this.account !== \"undefined\") {\n executionPrivateKey = this.account.privateKey();\n }\n\n if (typeof executionPrivateKey === \"undefined\") {\n throw(\"No private key provided and no private key set in the ProgramManager\");\n }\n\n // Get the split keys from the key provider\n let splitKeys;\n try {\n splitKeys = await this.keyProvider.splitKeys();\n } catch (e) {\n throw logAndThrow(`Error finding fee keys. Key finder response: '${e}'. Please ensure your key provider is configured correctly.`);\n }\n const [splitProvingKey, splitVerifyingKey] = splitKeys;\n\n // Validate the record to be split\n try {\n amountRecord = amountRecord instanceof RecordPlaintext ? amountRecord : RecordPlaintext.fromString(amountRecord);\n } catch (e) {\n throw logAndThrow(\"Record provided is not valid. Please ensure it is a valid plaintext record.\");\n }\n\n // Build an execution transaction and submit it to the network\n const tx = await WasmProgramManager.buildSplitTransaction(executionPrivateKey, splitAmount, amountRecord, this.host, splitProvingKey, splitVerifyingKey, offlineQuery);\n return await this.networkClient.submitTransaction(tx);\n }\n\n /**\n * Pre-synthesize proving and verifying keys for a program\n *\n * @param program {string} The program source code to synthesize keys for\n * @param function_id {string} The function id to synthesize keys for\n * @param inputs {Array} Sample inputs to the function\n * @param privateKey {PrivateKey | undefined} Optional private key to use for the key synthesis\n *\n * @returns {Promise}\n */\n async synthesizeKeys(\n program: string,\n function_id: string,\n inputs: Array,\n privateKey?: PrivateKey,\n ): Promise {\n // Resolve the program imports if they exist\n let imports;\n\n let executionPrivateKey = privateKey;\n if (typeof executionPrivateKey === \"undefined\") {\n if (typeof this.account !== \"undefined\") {\n executionPrivateKey = this.account.privateKey();\n } else {\n executionPrivateKey = new PrivateKey();\n }\n }\n\n // Attempt to run an offline execution of the program and extract the proving and verifying keys\n try {\n imports = await this.networkClient.getProgramImports(program);\n const keyPair = await WasmProgramManager.synthesizeKeyPair(\n executionPrivateKey,\n program,\n function_id,\n inputs,\n imports\n );\n return [keyPair.provingKey(), keyPair.verifyingKey()];\n } catch (e) {\n throw logAndThrow(`Could not synthesize keys - error ${e}. Please ensure the program is valid and the inputs are correct.`);\n }\n }\n\n /**\n * Build a transaction to transfer credits to another account for later submission to the Aleo network\n *\n * @param {number} amount The amount of credits to transfer\n * @param {string} recipient The recipient of the transfer\n * @param {string} transferType The type of transfer to perform - options: 'private', 'privateToPublic', 'public', 'publicToPrivate'\n * @param {number} fee The fee to pay for the transfer\n * @param {boolean} privateFee Use a private record to pay the fee. If false this will use the account's public credit balance\n * @param {RecordSearchParams | undefined} recordSearchParams Optional parameters for finding the amount and fee\n * records for the transfer transaction\n * @param {RecordPlaintext | string} amountRecord Optional amount record to use for the transfer\n * @param {RecordPlaintext | string} feeRecord Optional fee record to use for the transfer\n * @param {PrivateKey | undefined} privateKey Optional private key to use for the transfer transaction\n * @param {OfflineQuery | undefined} offlineQuery Optional offline query if creating transactions in an offline environment\n * @returns {Promise} The transaction id of the transfer transaction\n *\n * @example\n * // Create a new NetworkClient, KeyProvider, and RecordProvider\n * const networkClient = new AleoNetworkClient(\"https://api.explorer.aleo.org/v1\");\n * const keyProvider = new AleoKeyProvider();\n * const recordProvider = new NetworkRecordProvider(account, networkClient);\n *\n * // Initialize a program manager with the key provider to automatically fetch keys for executions\n * const programName = \"hello_hello.aleo\";\n * const programManager = new ProgramManager(\"https://api.explorer.aleo.org/v1\", keyProvider, recordProvider);\n * await programManager.initialize();\n * const tx_id = await programManager.transfer(1, \"aleo1rhgdu77hgyqd3xjj8ucu3jj9r2krwz6mnzyd80gncr5fxcwlh5rsvzp9px\", \"private\", 0.2)\n * const transaction = await programManager.networkClient.getTransaction(tx_id);\n */\n async buildTransferTransaction(\n amount: number,\n recipient: string,\n transferType: string,\n fee: number,\n privateFee: boolean,\n recordSearchParams?: RecordSearchParams,\n amountRecord?: RecordPlaintext | string,\n feeRecord?: RecordPlaintext | string,\n privateKey?: PrivateKey,\n offlineQuery?: OfflineQuery\n ): Promise {\n // Validate the transfer type\n transferType = validateTransferType(transferType);\n\n // Get the private key from the account if it is not provided in the parameters\n let executionPrivateKey = privateKey;\n if (typeof executionPrivateKey === \"undefined\" && typeof this.account !== \"undefined\") {\n executionPrivateKey = this.account.privateKey();\n }\n\n if (typeof executionPrivateKey === \"undefined\") {\n throw(\"No private key provided and no private key set in the ProgramManager\");\n }\n\n // Get the proving and verifying keys from the key provider\n let feeKeys;\n let transferKeys\n try {\n feeKeys = privateFee ? await this.keyProvider.feePrivateKeys() : await this.keyProvider.feePublicKeys();\n transferKeys = await this.keyProvider.transferKeys(transferType);\n } catch (e) {\n throw logAndThrow(`Error finding fee keys. Key finder response: '${e}'. Please ensure your key provider is configured correctly.`);\n }\n const [feeProvingKey, feeVerifyingKey] = feeKeys;\n const [transferProvingKey, transferVerifyingKey] = transferKeys;\n\n // Get the amount and fee record from the account if it is not provided in the parameters\n try {\n // Track the nonces of the records found so no duplicate records are used\n const nonces: string[] = [];\n if (requiresAmountRecord(transferType)) {\n // If the transfer type is private and requires an amount record, get it from the record provider\n amountRecord = await this.getCreditsRecord(fee, [], amountRecord, recordSearchParams);\n nonces.push(amountRecord.nonce());\n } else {\n amountRecord = undefined;\n }\n feeRecord = privateFee ? await this.getCreditsRecord(fee, nonces, feeRecord, recordSearchParams) : undefined;\n } catch (e) {\n throw logAndThrow(`Error finding fee record. Record finder response: '${e}'. Please ensure you're connected to a valid Aleo network and a record with enough balance exists.`);\n }\n\n // Build an execution transaction and submit it to the network\n return await WasmProgramManager.buildTransferTransaction(executionPrivateKey, amount, recipient, transferType, amountRecord, fee, feeRecord, this.host, transferProvingKey, transferVerifyingKey, feeProvingKey, feeVerifyingKey, offlineQuery);\n }\n\n /**\n * Build a transfer_public transaction to transfer credits to another account for later submission to the Aleo network\n *\n * @param {number} amount The amount of credits to transfer\n * @param {string} recipient The recipient of the transfer\n * @param {string} transferType The type of transfer to perform - options: 'private', 'privateToPublic', 'public', 'publicToPrivate'\n * @param {number} fee The fee to pay for the transfer\n * @param {boolean} privateFee Use a private record to pay the fee. If false this will use the account's public credit balance\n * @param {RecordSearchParams | undefined} recordSearchParams Optional parameters for finding the amount and fee\n * records for the transfer transaction\n * @param {RecordPlaintext | string} amountRecord Optional amount record to use for the transfer\n * @param {RecordPlaintext | string} feeRecord Optional fee record to use for the transfer\n * @param {PrivateKey | undefined} privateKey Optional private key to use for the transfer transaction\n * @param {OfflineQuery | undefined} offlineQuery Optional offline query if creating transactions in an offline environment\n * @returns {Promise} The transaction id of the transfer transaction\n */\n async buildTransferPublicTransaction(\n amount: number,\n recipient: string,\n fee: number,\n privateKey?: PrivateKey,\n offlineQuery?: OfflineQuery\n ): Promise {\n return this.buildTransferTransaction(amount, recipient, \"public\", fee, false, undefined, undefined, undefined, privateKey, offlineQuery);\n }\n\n /**\n * Build a transfer_public_as_signer transaction to transfer credits to another account for later submission to the Aleo network\n *\n * @param {number} amount The amount of credits to transfer\n * @param {string} recipient The recipient of the transfer\n * @param {string} transferType The type of transfer to perform - options: 'private', 'privateToPublic', 'public', 'publicToPrivate'\n * @param {number} fee The fee to pay for the transfer\n * @param {boolean} privateFee Use a private record to pay the fee. If false this will use the account's public credit balance\n * @param {RecordSearchParams | undefined} recordSearchParams Optional parameters for finding the amount and fee\n * records for the transfer transaction\n * @param {RecordPlaintext | string} amountRecord Optional amount record to use for the transfer\n * @param {RecordPlaintext | string} feeRecord Optional fee record to use for the transfer\n * @param {PrivateKey | undefined} privateKey Optional private key to use for the transfer transaction\n * @param {OfflineQuery | undefined} offlineQuery Optional offline query if creating transactions in an offline environment\n * @returns {Promise} The transaction id of the transfer transaction\n */\n async buildTransferPublicAsSignerTransaction(\n amount: number,\n recipient: string,\n fee: number,\n privateKey?: PrivateKey,\n offlineQuery?: OfflineQuery\n ): Promise {\n return this.buildTransferTransaction(amount, recipient, \"public\", fee, false, undefined, undefined, undefined, privateKey, offlineQuery);\n }\n\n /**\n * Transfer credits to another account\n *\n * @param {number} amount The amount of credits to transfer\n * @param {string} recipient The recipient of the transfer\n * @param {string} transferType The type of transfer to perform - options: 'private', 'privateToPublic', 'public', 'publicToPrivate'\n * @param {number} fee The fee to pay for the transfer\n * @param {boolean} privateFee Use a private record to pay the fee. If false this will use the account's public credit balance\n * @param {RecordSearchParams | undefined} recordSearchParams Optional parameters for finding the amount and fee\n * records for the transfer transaction\n * @param {RecordPlaintext | string} amountRecord Optional amount record to use for the transfer\n * @param {RecordPlaintext | string} feeRecord Optional fee record to use for the transfer\n * @param {PrivateKey | undefined} privateKey Optional private key to use for the transfer transaction\n * @param {OfflineQuery | undefined} offlineQuery Optional offline query if creating transactions in an offline environment\n * @returns {Promise} The transaction id of the transfer transaction\n *\n * @example\n * // Create a new NetworkClient, KeyProvider, and RecordProvider\n * const networkClient = new AleoNetworkClient(\"https://api.explorer.aleo.org/v1\");\n * const keyProvider = new AleoKeyProvider();\n * const recordProvider = new NetworkRecordProvider(account, networkClient);\n *\n * // Initialize a program manager with the key provider to automatically fetch keys for executions\n * const programManager = new ProgramManager(\"https://api.explorer.aleo.org/v1\", keyProvider, recordProvider);\n * await programManager.initialize();\n * const tx_id = await programManager.transfer(1, \"aleo1rhgdu77hgyqd3xjj8ucu3jj9r2krwz6mnzyd80gncr5fxcwlh5rsvzp9px\", \"private\", 0.2)\n * const transaction = await programManager.networkClient.getTransaction(tx_id);\n */\n async transfer(\n amount: number,\n recipient: string,\n transferType: string,\n fee: number,\n privateFee: boolean,\n recordSearchParams?: RecordSearchParams,\n amountRecord?: RecordPlaintext | string,\n feeRecord?: RecordPlaintext | string,\n privateKey?: PrivateKey,\n offlineQuery?: OfflineQuery\n ): Promise {\n const tx = await this.buildTransferTransaction(amount, recipient, transferType, fee, privateFee, recordSearchParams, amountRecord, feeRecord, privateKey, offlineQuery);\n return await this.networkClient.submitTransaction(tx);\n }\n\n /**\n * Build transaction to bond credits to a validator for later submission to the Aleo Network\n *\n * @example\n * // Create a keyProvider to handle key management\n * const keyProvider = new AleoKeyProvider();\n * keyProvider.useCache = true;\n *\n * // Create a new ProgramManager with the key that will be used to bond credits\n * const programManager = new ProgramManager(\"https://api.explorer.aleo.org/v1\", keyProvider, undefined);\n * programManager.setAccount(new Account(\"YourPrivateKey\"));\n *\n * // Create the bonding transaction object for later submission\n * const tx = await programManager.buildBondPublicTransaction(\"aleo1jx8s4dvjepculny4wfrzwyhs3tlyv65r58ns3g6q2gm2esh7ps8sqy9s5j\", \"aleo1rhgdu77hgyqd3xjj8ucu3jj9r2krwz6mnzyd80gncr5fxcwlh5rsvzp9px\", \"aleo1feya8sjy9k2zflvl2dx39pdsq5tju28elnp2ektnn588uu9ghv8s84msv9\", 2000000);\n * console.log(tx);\n *\n * // The transaction can be later submitted to the network using the network client.\n * const result = await programManager.networkClient.submitTransaction(tx);\n *\n * @returns string\n * @param {string} staker_address Address of the staker who is bonding the credits\n * @param {string} validator_address Address of the validator to bond to, if this address is the same as the staker (i.e. the\n * executor of this function), it will attempt to bond the credits as a validator. Bonding as a validator currently\n * requires a minimum of 10,000,000 credits to bond (subject to change). If the address is specified is an existing\n * validator and is different from the address of the executor of this function, it will bond the credits to that\n * validator's staking committee as a delegator. A minimum of 10 credits is required to bond as a delegator.\n * @param {string} withdrawal_address Address to withdraw the staked credits to when unbond_public is called.\n * @param {number} amount The amount of credits to bond\n * @param {Partial} options - Override default execution options.\n */\n async buildBondPublicTransaction(staker_address: string, validator_address: string, withdrawal_address: string, amount: number, options: Partial = {}) {\n const scaledAmount = Math.trunc(amount * 1000000);\n\n const {\n programName = \"credits.aleo\",\n functionName = \"bond_public\",\n fee = options.fee || 0.86,\n privateFee = false,\n inputs = [staker_address, validator_address, withdrawal_address, `${scaledAmount.toString()}u64`],\n keySearchParams = new AleoKeyProviderParams({\n proverUri: CREDITS_PROGRAM_KEYS.bond_public.prover,\n verifierUri: CREDITS_PROGRAM_KEYS.bond_public.verifier,\n cacheKey: \"credits.aleo/bond_public\"\n }),\n program = this.creditsProgram(),\n ...additionalOptions\n } = options;\n\n const executeOptions: ExecuteOptions = {\n programName,\n functionName,\n fee,\n privateFee,\n inputs,\n keySearchParams,\n ...additionalOptions\n };\n\n return await this.buildExecutionTransaction(executeOptions);\n }\n\n /**\n * Bond credits to validator.\n *\n * @example\n * // Create a keyProvider to handle key management\n * const keyProvider = new AleoKeyProvider();\n * keyProvider.useCache = true;\n *\n * // Create a new ProgramManager with the key that will be used to bond credits\n * const programManager = new ProgramManager(\"https://api.explorer.aleo.org/v1\", keyProvider, undefined);\n * programManager.setAccount(new Account(\"YourPrivateKey\"));\n *\n * // Create the bonding transaction\n * const tx_id = await programManager.bondPublic(\"aleo1jx8s4dvjepculny4wfrzwyhs3tlyv65r58ns3g6q2gm2esh7ps8sqy9s5j\", \"aleo1rhgdu77hgyqd3xjj8ucu3jj9r2krwz6mnzyd80gncr5fxcwlh5rsvzp9px\", \"aleo1feya8sjy9k2zflvl2dx39pdsq5tju28elnp2ektnn588uu9ghv8s84msv9\", 2000000);\n *\n * @returns string\n * @param {string} staker_address Address of the staker who is bonding the credits\n * @param {string} validator_address Address of the validator to bond to, if this address is the same as the signer (i.e. the\n * executor of this function), it will attempt to bond the credits as a validator. Bonding as a validator currently\n * requires a minimum of 1,000,000 credits to bond (subject to change). If the address is specified is an existing\n * validator and is different from the address of the executor of this function, it will bond the credits to that\n * validator's staking committee as a delegator. A minimum of 10 credits is required to bond as a delegator.\n * @param {string} withdrawal_address Address to withdraw the staked credits to when unbond_public is called.\n * @param {number} amount The amount of credits to bond\n * @param {Options} options Options for the execution\n */\n async bondPublic(staker_address: string, validator_address: string, withdrawal_address:string, amount: number, options: Partial = {}) {\n const tx = await this.buildBondPublicTransaction(staker_address, validator_address, withdrawal_address, amount, options);\n return await this.networkClient.submitTransaction(tx);\n }\n\n /**\n * Build a bond_validator transaction for later submission to the Aleo Network.\n *\n * @example\n * // Create a keyProvider to handle key management\n * const keyProvider = new AleoKeyProvider();\n * keyProvider.useCache = true;\n *\n * // Create a new ProgramManager with the key that will be used to bond credits\n * const programManager = new ProgramManager(\"https://api.explorer.aleo.org/v1\", keyProvider, undefined);\n * programManager.setAccount(new Account(\"YourPrivateKey\"));\n *\n * // Create the bond validator transaction object for later use.\n * const tx = await programManager.buildBondValidatorTransaction(\"aleo1rhgdu77hgyqd3xjj8ucu3jj9r2krwz6mnzyd80gncr5fxcwlh5rsvzp9px\", \"aleo1feya8sjy9k2zflvl2dx39pdsq5tju28elnp2ektnn588uu9ghv8s84msv9\", 2000000);\n * console.log(tx);\n *\n * // The transaction can later be submitted to the network using the network client.\n * const tx_id = await programManager.networkClient.submitTransaction(tx);\n *\n * @returns string\n * @param {string} validator_address Address of the validator to bond to, if this address is the same as the staker (i.e. the\n * executor of this function), it will attempt to bond the credits as a validator. Bonding as a validator currently\n * requires a minimum of 10,000,000 credits to bond (subject to change). If the address is specified is an existing\n * validator and is different from the address of the executor of this function, it will bond the credits to that\n * validator's staking committee as a delegator. A minimum of 10 credits is required to bond as a delegator.\n * @param {string} withdrawal_address Address to withdraw the staked credits to when unbond_public is called.\n * @param {number} amount The amount of credits to bond\n * @param {number} commission The commission rate for the validator (must be between 0 and 100 - an error will be thrown if it is not)\n * @param {Partial} options - Override default execution options.\n */\n async buildBondValidatorTransaction(validator_address: string, withdrawal_address: string, amount: number, commission: number, options: Partial = {}) {\n const scaledAmount = Math.trunc(amount * 1000000);\n\n const adjustedCommission = Math.trunc(commission)\n\n const {\n programName = \"credits.aleo\",\n functionName = \"bond_validator\",\n fee = options.fee || 0.86,\n privateFee = false,\n inputs = [validator_address, withdrawal_address, `${scaledAmount.toString()}u64`, `${adjustedCommission.toString()}u8`],\n keySearchParams = new AleoKeyProviderParams({\n proverUri: CREDITS_PROGRAM_KEYS.bond_validator.prover,\n verifierUri: CREDITS_PROGRAM_KEYS.bond_validator.verifier,\n cacheKey: \"credits.aleo/bond_validator\"\n }),\n program = this.creditsProgram(),\n ...additionalOptions\n } = options;\n\n const executeOptions: ExecuteOptions = {\n programName,\n functionName,\n fee,\n privateFee,\n inputs,\n keySearchParams,\n ...additionalOptions\n };\n\n return await this.buildExecutionTransaction(executeOptions);\n }\n\n /**\n * Build transaction to bond a validator.\n *\n * @example\n * // Create a keyProvider to handle key management\n * const keyProvider = new AleoKeyProvider();\n * keyProvider.useCache = true;\n *\n * // Create a new ProgramManager with the key that will be used to bond credits\n * const programManager = new ProgramManager(\"https://api.explorer.aleo.org/v1\", keyProvider, undefined);\n * programManager.setAccount(new Account(\"YourPrivateKey\"));\n *\n * // Create the bonding transaction\n * const tx_id = await programManager.bondValidator(\"aleo1rhgdu77hgyqd3xjj8ucu3jj9r2krwz6mnzyd80gncr5fxcwlh5rsvzp9px\", \"aleo1feya8sjy9k2zflvl2dx39pdsq5tju28elnp2ektnn588uu9ghv8s84msv9\", 2000000);\n *\n * @returns string\n * @param {string} validator_address Address of the validator to bond to, if this address is the same as the staker (i.e. the\n * executor of this function), it will attempt to bond the credits as a validator. Bonding as a validator currently\n * requires a minimum of 10,000,000 credits to bond (subject to change). If the address is specified is an existing\n * validator and is different from the address of the executor of this function, it will bond the credits to that\n * validator's staking committee as a delegator. A minimum of 10 credits is required to bond as a delegator.\n * @param {string} withdrawal_address Address to withdraw the staked credits to when unbond_public is called.\n * @param {number} amount The amount of credits to bond\n * @param {number} commission The commission rate for the validator (must be between 0 and 100 - an error will be thrown if it is not)\n * @param {Partial} options - Override default execution options.\n */\n async bondValidator(validator_address: string, withdrawal_address: string, amount: number, commission: number, options: Partial = {}) {\n const tx = await this.buildBondValidatorTransaction(validator_address, withdrawal_address, amount, commission, options);\n return await this.networkClient.submitTransaction(tx);\n }\n\n /**\n * Build a transaction to unbond public credits from a validator in the Aleo network.\n *\n * @param {string} staker_address - The address of the staker who is unbonding the credits.\n * @param {number} amount - The amount of credits to unbond (scaled by 1,000,000).\n * @param {Partial} options - Override default execution options.\n * @returns {Promise} - A promise that resolves to the transaction or an error message.\n *\n * @example\n * // Create a keyProvider to handle key management.\n * const keyProvider = new AleoKeyProvider();\n * keyProvider.useCache = true;\n *\n * // Create a new ProgramManager with the key that will be used to unbond credits.\n * const programManager = new ProgramManager(\"https://api.explorer.aleo.org/v1\", keyProvider, undefined);\n * const tx = await programManager.buildUnbondPublicTransaction(\"aleo1jx8s4dvjepculny4wfrzwyhs3tlyv65r58ns3g6q2gm2esh7ps8sqy9s5j\", 2000000);\n * console.log(tx);\n *\n * // The transaction can be submitted later to the network using the network client.\n * programManager.networkClient.submitTransaction(tx);\n */\n async buildUnbondPublicTransaction(staker_address: string, amount: number, options: Partial = {}): Promise {\n const scaledAmount = Math.trunc(amount * 1000000);\n\n const {\n programName = \"credits.aleo\",\n functionName = \"unbond_public\",\n fee = options.fee || 1.3,\n privateFee = false,\n inputs = [staker_address, `${scaledAmount.toString()}u64`],\n keySearchParams = new AleoKeyProviderParams({\n proverUri: CREDITS_PROGRAM_KEYS.unbond_public.prover,\n verifierUri: CREDITS_PROGRAM_KEYS.unbond_public.verifier,\n cacheKey: \"credits.aleo/unbond_public\"\n }),\n program = this.creditsProgram(),\n ...additionalOptions\n } = options;\n\n const executeOptions: ExecuteOptions = {\n programName,\n functionName,\n fee,\n privateFee,\n inputs,\n keySearchParams,\n ...additionalOptions\n };\n\n return this.buildExecutionTransaction(executeOptions);\n }\n\n /**\n * Unbond a specified amount of staked credits.\n *\n * @example\n * // Create a keyProvider to handle key management\n * const keyProvider = new AleoKeyProvider();\n * keyProvider.useCache = true;\n *\n * // Create a new ProgramManager with the key that will be used to bond credits\n * const programManager = new ProgramManager(\"https://api.explorer.aleo.org/v1\", keyProvider, undefined);\n * programManager.setAccount(new Account(\"YourPrivateKey\"));\n *\n * // Create the bonding transaction and send it to the network\n * const tx_id = await programManager.unbondPublic(\"aleo1jx8s4dvjepculny4wfrzwyhs3tlyv65r58ns3g6q2gm2esh7ps8sqy9s5j\", 10);\n *\n * @returns string\n * @param {string} staker_address Address of the staker who is unbonding the credits\n * @param {number} amount Amount of credits to unbond. If the address of the executor of this function is an\n * existing validator, it will subtract this amount of credits from the validator's staked credits. If there are\n * less than 1,000,000 credits staked pool after the unbond, the validator will be removed from the validator set.\n * If the address of the executor of this function is not a validator and has credits bonded as a delegator, it will\n * subtract this amount of credits from the delegator's staked credits. If there are less than 10 credits bonded\n * after the unbond operation, the delegator will be removed from the validator's staking pool.\n * @param {ExecuteOptions} options Options for the execution\n */\n async unbondPublic(staker_address: string, amount: number, options: Partial = {}): Promise {\n const tx = await this.buildUnbondPublicTransaction(staker_address, amount, options);\n return await this.networkClient.submitTransaction(tx);\n }\n\n /**\n * Build a transaction to claim unbonded public credits in the Aleo network.\n *\n * @param {string} staker_address - The address of the staker who is claiming the credits.\n * @param {Partial} options - Override default execution options.\n * @returns {Promise} - A promise that resolves to the transaction or an error message.\n *\n * @example\n * // Create a keyProvider to handle key management\n * const keyProvider = new AleoKeyProvider();\n * keyProvider.useCache = true;\n *\n * // Create a new ProgramManager with the key that will be used to claim unbonded credits.\n * const programManager = new ProgramManager(\"https://api.explorer.aleo.org/v1\", keyProvider, undefined);\n *\n * // Create the claim unbonded transaction object for later use.\n * const tx = await programManager.buildClaimUnbondPublicTransaction(\"aleo1jx8s4dvjepculny4wfrzwyhs3tlyv65r58ns3g6q2gm2esh7ps8sqy9s5j\");\n * console.log(tx);\n *\n * // The transaction can be submitted later to the network using the network client.\n * programManager.networkClient.submitTransaction(tx);\n */\n async buildClaimUnbondPublicTransaction(staker_address: string, options: Partial = {}): Promise {\n const {\n programName = \"credits.aleo\",\n functionName = \"claim_unbond_public\",\n fee = options.fee || 2,\n privateFee = false,\n inputs = [staker_address],\n keySearchParams = new AleoKeyProviderParams({\n proverUri: CREDITS_PROGRAM_KEYS.claim_unbond_public.prover,\n verifierUri: CREDITS_PROGRAM_KEYS.claim_unbond_public.verifier,\n cacheKey: \"credits.aleo/claim_unbond_public\"\n }),\n program = this.creditsProgram(),\n ...additionalOptions\n } = options;\n\n const executeOptions: ExecuteOptions = {\n programName,\n functionName,\n fee,\n privateFee,\n inputs,\n keySearchParams,\n ...additionalOptions\n };\n\n return await this.buildExecutionTransaction(executeOptions);\n }\n\n /**\n * Claim unbonded credits. If credits have been unbonded by the account executing this function, this method will\n * claim them and add them to the public balance of the account.\n *\n * @example\n * // Create a keyProvider to handle key management\n * const keyProvider = new AleoKeyProvider();\n * keyProvider.useCache = true;\n *\n * // Create a new ProgramManager with the key that will be used to bond credits\n * const programManager = new ProgramManager(\"https://api.explorer.aleo.org/v1\", keyProvider, undefined);\n * programManager.setAccount(new Account(\"YourPrivateKey\"));\n *\n * // Create the bonding transaction\n * const tx_id = await programManager.claimUnbondPublic(\"aleo1jx8s4dvjepculny4wfrzwyhs3tlyv65r58ns3g6q2gm2esh7ps8sqy9s5j\");\n *\n * @param {string} staker_address Address of the staker who is claiming the credits\n * @param {ExecuteOptions} options\n * @returns string\n */\n async claimUnbondPublic(staker_address: string, options: Partial = {}): Promise {\n const tx = await this.buildClaimUnbondPublicTransaction(staker_address, options);\n return await this.networkClient.submitTransaction(tx);\n }\n\n /**\n * Build a set_validator_state transaction for later usage.\n *\n * This function allows a validator to set their state to be either opened or closed to new stakers.\n * When the validator is open to new stakers, any staker (including the validator) can bond or unbond from the validator.\n * When the validator is closed to new stakers, existing stakers can still bond or unbond from the validator, but new stakers cannot bond.\n *\n * This function serves two primary purposes:\n * 1. Allow a validator to leave the committee, by closing themselves to stakers and then unbonding all of their stakers.\n * 2. Allow a validator to maintain their % of stake, by closing themselves to allowing more stakers to bond to them.\n *\n * @example\n * // Create a keyProvider to handle key management\n * const keyProvider = new AleoKeyProvider();\n * keyProvider.useCache = true;\n *\n * // Create a new ProgramManager with the key that will be used to bond credits\n * const programManager = new ProgramManager(\"https://api.explorer.aleo.org/v1\", keyProvider, undefined);\n * programManager.setAccount(new Account(\"ValidatorPrivateKey\"));\n *\n * // Create the bonding transaction\n * const tx = await programManager.buildSetValidatorStateTransaction(true);\n *\n * // The transaction can be submitted later to the network using the network client.\n * programManager.networkClient.submitTransaction(tx);\n *\n * @returns string\n * @param {boolean} validator_state\n * @param {Partial} options - Override default execution options\n */\n async buildSetValidatorStateTransaction(validator_state: boolean, options: Partial = {}) {\n const {\n programName = \"credits.aleo\",\n functionName = \"set_validator_state\",\n fee = 1,\n privateFee = false,\n inputs = [validator_state.toString()],\n keySearchParams = new AleoKeyProviderParams({\n proverUri: CREDITS_PROGRAM_KEYS.set_validator_state.prover,\n verifierUri: CREDITS_PROGRAM_KEYS.set_validator_state.verifier,\n cacheKey: \"credits.aleo/set_validator_state\"\n }),\n ...additionalOptions\n } = options;\n\n const executeOptions: ExecuteOptions = {\n programName,\n functionName,\n fee,\n privateFee,\n inputs,\n keySearchParams,\n ...additionalOptions\n };\n\n return await this.execute(executeOptions);\n }\n\n /**\n * Submit a set_validator_state transaction to the Aleo Network.\n *\n * This function allows a validator to set their state to be either opened or closed to new stakers.\n * When the validator is open to new stakers, any staker (including the validator) can bond or unbond from the validator.\n * When the validator is closed to new stakers, existing stakers can still bond or unbond from the validator, but new stakers cannot bond.\n *\n * This function serves two primary purposes:\n * 1. Allow a validator to leave the committee, by closing themselves to stakers and then unbonding all of their stakers.\n * 2. Allow a validator to maintain their % of stake, by closing themselves to allowing more stakers to bond to them.\n *\n * @example\n * // Create a keyProvider to handle key management\n * const keyProvider = new AleoKeyProvider();\n * keyProvider.useCache = true;\n *\n * // Create a new ProgramManager with the key that will be used to bond credits\n * const programManager = new ProgramManager(\"https://api.explorer.aleo.org/v1\", keyProvider, undefined);\n * programManager.setAccount(new Account(\"ValidatorPrivateKey\"));\n *\n * // Create the bonding transaction\n * const tx_id = await programManager.setValidatorState(true);\n *\n * @returns string\n * @param {boolean} validator_state\n * @param {Partial} options - Override default execution options\n */\n async setValidatorState(validator_state: boolean, options: Partial = {}) {\n const tx = await this.buildSetValidatorStateTransaction(validator_state, options);\n return this.networkClient.submitTransaction(tx);\n }\n\n /**\n * Verify a proof of execution from an offline execution\n *\n * @param {executionResponse} executionResponse\n * @returns {boolean} True if the proof is valid, false otherwise\n */\n verifyExecution(executionResponse: ExecutionResponse): boolean {\n try {\n const execution = executionResponse.getExecution();\n const function_id = executionResponse.getFunctionId();\n const program = executionResponse.getProgram();\n const verifyingKey = executionResponse.getVerifyingKey();\n return verifyFunctionExecution(execution, verifyingKey, program, function_id);\n } catch(e) {\n console.warn(\"The execution was not found in the response, cannot verify the execution\");\n return false;\n }\n }\n\n /**\n * Create a program object from a program's source code\n *\n * @param {string} program Program source code\n * @returns {Program | Error} The program object\n */\n createProgramFromSource(program: string): Program | Error {\n return Program.fromString(program);\n }\n\n /**\n * Get the credits program object\n *\n * @returns {Program} The credits program object\n */\n creditsProgram(): Program {\n return Program.getCreditsProgram();\n }\n\n /**\n * Verify a program is valid\n *\n * @param {string} program The program source code\n */\n verifyProgram(program: string): boolean {\n try {\n Program.fromString(program);\n return true;\n } catch (e) {\n return false;\n }\n }\n\n // Internal utility function for getting a credits.aleo record\n async getCreditsRecord(amount: number, nonces: string[], record?: RecordPlaintext | string, params?: RecordSearchParams): Promise {\n try {\n return record instanceof RecordPlaintext ? record : RecordPlaintext.fromString(record);\n } catch (e) {\n try {\n const recordProvider = this.recordProvider;\n return (await recordProvider.findCreditsRecord(amount, true, nonces, params))\n } catch (e) {\n throw logAndThrow(`Error finding fee record. Record finder response: '${e}'. Please ensure you're connected to a valid Aleo network and a record with enough balance exists.`);\n }\n }\n }\n}\n\n// Ensure the transfer type requires an amount record\nfunction requiresAmountRecord(transferType: string): boolean {\n return PRIVATE_TRANSFER_TYPES.has(transferType);\n}\n\n// Validate the transfer type\nfunction validateTransferType(transferType: string): string | Error {\n return VALID_TRANSFER_TYPES.has(transferType) ? transferType :\n logAndThrow(`Invalid transfer type '${transferType}'. Valid transfer types are 'private', 'privateToPublic', 'public', and 'publicToPrivate'.`);\n}\n\nexport { ProgramManager }\n","import {VerifyingKey, Metadata} from \"@provablehq/wasm\";\n\nconst KEY_STORE = Metadata.baseUrl();\n\ninterface Key {\n name: string,\n locator: string,\n prover: string,\n verifier: string,\n verifyingKey: () => VerifyingKey,\n}\n\nfunction convert(metadata: Metadata): Key {\n // This looks up the method name in VerifyingKey\n const verifyingKey = (VerifyingKey as any)[metadata.verifyingKey];\n\n if (!verifyingKey) {\n throw new Error(\"Invalid method name: \" + metadata.verifyingKey);\n }\n\n return {\n name: metadata.name,\n locator: metadata.locator,\n prover: metadata.prover,\n verifier: metadata.verifier,\n verifyingKey,\n };\n}\n\nconst CREDITS_PROGRAM_KEYS = {\n bond_public: convert(Metadata.bond_public()),\n bond_validator: convert(Metadata.bond_validator()),\n claim_unbond_public: convert(Metadata.claim_unbond_public()),\n fee_private: convert(Metadata.fee_private()),\n fee_public: convert(Metadata.fee_public()),\n inclusion: convert(Metadata.inclusion()),\n join: convert(Metadata.join()),\n set_validator_state: convert(Metadata.set_validator_state()),\n split: convert(Metadata.split()),\n transfer_private: convert(Metadata.transfer_private()),\n transfer_private_to_public: convert(Metadata.transfer_private_to_public()),\n transfer_public: convert(Metadata.transfer_public()),\n transfer_public_as_signer: convert(Metadata.transfer_public_as_signer()),\n transfer_public_to_private: convert(Metadata.transfer_public_to_private()),\n unbond_public: convert(Metadata.unbond_public()),\n getKey: function(key: string): Key | Error {\n if (this.hasOwnProperty(key)) {\n return (this as any)[key] as Key;\n } else {\n return new Error(`Key \"${key}\" not found.`);\n }\n }\n};\n\nconst PRIVATE_TRANSFER_TYPES = new Set([\n \"transfer_private\",\n \"private\",\n \"transferPrivate\",\n \"transfer_private_to_public\",\n \"privateToPublic\",\n \"transferPrivateToPublic\",\n]);\nconst VALID_TRANSFER_TYPES = new Set([\n \"transfer_private\",\n \"private\",\n \"transferPrivate\",\n \"transfer_private_to_public\",\n \"privateToPublic\",\n \"transferPrivateToPublic\",\n \"transfer_public\",\n \"transfer_public_as_signer\",\n \"public\",\n \"public_as_signer\",\n \"transferPublic\",\n \"transferPublicAsSigner\",\n \"transfer_public_to_private\",\n \"publicToPrivate\",\n \"publicAsSigner\",\n \"transferPublicToPrivate\",\n]);\nconst PRIVATE_TRANSFER = new Set([\n \"private\",\n \"transfer_private\",\n \"transferPrivate\",\n]);\nconst PRIVATE_TO_PUBLIC_TRANSFER = new Set([\n \"private_to_public\",\n \"privateToPublic\",\n \"transfer_private_to_public\",\n \"transferPrivateToPublic\",\n]);\nconst PUBLIC_TRANSFER = new Set([\n \"public\",\n \"transfer_public\",\n \"transferPublic\",\n]);\nconst PUBLIC_TRANSFER_AS_SIGNER = new Set([\n \"public_as_signer\",\n \"transfer_public_as_signer\",\n \"transferPublicAsSigner\",\n]);\nconst PUBLIC_TO_PRIVATE_TRANSFER = new Set([\n \"public_to_private\",\n \"publicToPrivate\",\n \"transfer_public_to_private\",\n \"transferPublicToPrivate\",\n]);\n\nfunction logAndThrow(message: string): Error {\n console.error(message);\n throw message;\n}\n\nimport { Account } from \"./account\";\nimport { AleoNetworkClient, ProgramImports } from \"./network-client\";\nimport { Block } from \"./models/block\";\nimport { Execution } from \"./models/execution\";\nimport { Input } from \"./models/input\";\nimport { Output } from \"./models/output\";\nimport { TransactionModel } from \"./models/transactionModel\";\nimport { Transition } from \"./models/transition\";\nimport {\n AleoKeyProvider,\n AleoKeyProviderParams,\n AleoKeyProviderInitParams,\n CachedKeyPair,\n FunctionKeyPair,\n FunctionKeyProvider,\n KeySearchParams,\n} from \"./function-key-provider\";\nimport {\n OfflineKeyProvider,\n OfflineSearchParams\n} from \"./offline-key-provider\";\nimport {\n BlockHeightSearch,\n NetworkRecordProvider,\n RecordProvider,\n RecordSearchParams,\n} from \"./record-provider\";\n\n// @TODO: This function is no longer needed, remove it.\nasync function initializeWasm() {\n console.warn(\"initializeWasm is deprecated, you no longer need to use it\");\n}\n\nexport { createAleoWorker } from \"./managed-worker\";\n\nexport { ProgramManager } from \"./program-manager\";\n\nexport {\n Address,\n Execution as FunctionExecution,\n ExecutionResponse,\n Field,\n OfflineQuery,\n PrivateKey,\n PrivateKeyCiphertext,\n Program,\n ProgramManager as ProgramManagerBase,\n ProvingKey,\n RecordCiphertext,\n RecordPlaintext,\n Signature,\n Transaction,\n VerifyingKey,\n ViewKey,\n initThreadPool,\n verifyFunctionExecution,\n} from \"@provablehq/wasm\";\n\nexport { initializeWasm };\n\nexport {\n Account,\n AleoKeyProvider,\n AleoKeyProviderParams,\n AleoKeyProviderInitParams,\n AleoNetworkClient,\n Block,\n BlockHeightSearch,\n CachedKeyPair,\n Execution,\n FunctionKeyPair,\n FunctionKeyProvider,\n Input,\n Key,\n KeySearchParams,\n NetworkRecordProvider,\n ProgramImports,\n OfflineKeyProvider,\n OfflineSearchParams,\n Output,\n RecordProvider,\n RecordSearchParams,\n TransactionModel,\n Transition,\n CREDITS_PROGRAM_KEYS,\n KEY_STORE,\n PRIVATE_TRANSFER,\n PRIVATE_TO_PUBLIC_TRANSFER,\n PRIVATE_TRANSFER_TYPES,\n PUBLIC_TRANSFER,\n PUBLIC_TRANSFER_AS_SIGNER,\n PUBLIC_TO_PRIVATE_TRANSFER,\n VALID_TRANSFER_TYPES,\n logAndThrow,\n};\n","function spawnWorker(url, module, memory, address) {\n return new Promise((resolve) => {\n const worker = new Worker(url, {\n type: \"module\",\n });\n\n worker.addEventListener(\"message\", (event) => {\n // This is needed in Node to wait one extra tick, so that way\n // the Worker can fully initialize before we return.\n setTimeout(() => {\n resolve(worker);\n\n // When running in Node, this allows the process to exit\n // even though the Worker is still running.\n if (worker.unref) {\n worker.unref();\n }\n }, 0);\n }, {\n capture: true,\n once: true,\n });\n\n worker.postMessage({\n module,\n memory,\n address,\n });\n });\n }\n\nlet wasm;\n\nconst heap = new Array(128).fill(undefined);\n\nheap.push(undefined, null, true, false);\n\nfunction getObject(idx) { return heap[idx]; }\n\nlet heap_next = heap.length;\n\nfunction dropObject(idx) {\n if (idx < 132) return;\n heap[idx] = heap_next;\n heap_next = idx;\n}\n\nfunction takeObject(idx) {\n const ret = getObject(idx);\n dropObject(idx);\n return ret;\n}\n\nconst cachedTextDecoder = (typeof TextDecoder !== 'undefined' ? new TextDecoder('utf-8', { ignoreBOM: true, fatal: true }) : { decode: () => { throw Error('TextDecoder not available') } } );\n\nif (typeof TextDecoder !== 'undefined') { cachedTextDecoder.decode(); }\nlet cachedUint8Memory0 = null;\n\nfunction getUint8Memory0() {\n if (cachedUint8Memory0 === null || cachedUint8Memory0.buffer !== wasm.memory.buffer) {\n cachedUint8Memory0 = new Uint8Array(wasm.memory.buffer);\n }\n return cachedUint8Memory0;\n}\n\nfunction getStringFromWasm0(ptr, len) {\n ptr = ptr >>> 0;\n return cachedTextDecoder.decode(getUint8Memory0().slice(ptr, ptr + len));\n}\n\nfunction addHeapObject(obj) {\n if (heap_next === heap.length) heap.push(heap.length + 1);\n const idx = heap_next;\n heap_next = heap[idx];\n\n heap[idx] = obj;\n return idx;\n}\n\nlet WASM_VECTOR_LEN = 0;\n\nconst cachedTextEncoder = (typeof TextEncoder !== 'undefined' ? new TextEncoder('utf-8') : { encode: () => { throw Error('TextEncoder not available') } } );\n\nconst encodeString = function (arg, view) {\n const buf = cachedTextEncoder.encode(arg);\n view.set(buf);\n return {\n read: arg.length,\n written: buf.length\n };\n};\n\nfunction passStringToWasm0(arg, malloc, realloc) {\n\n if (realloc === undefined) {\n const buf = cachedTextEncoder.encode(arg);\n const ptr = malloc(buf.length, 1) >>> 0;\n getUint8Memory0().subarray(ptr, ptr + buf.length).set(buf);\n WASM_VECTOR_LEN = buf.length;\n return ptr;\n }\n\n let len = arg.length;\n let ptr = malloc(len, 1) >>> 0;\n\n const mem = getUint8Memory0();\n\n let offset = 0;\n\n for (; offset < len; offset++) {\n const code = arg.charCodeAt(offset);\n if (code > 0x7F) break;\n mem[ptr + offset] = code;\n }\n\n if (offset !== len) {\n if (offset !== 0) {\n arg = arg.slice(offset);\n }\n ptr = realloc(ptr, len, len = offset + arg.length * 3, 1) >>> 0;\n const view = getUint8Memory0().subarray(ptr + offset, ptr + len);\n const ret = encodeString(arg, view);\n\n offset += ret.written;\n ptr = realloc(ptr, len, offset, 1) >>> 0;\n }\n\n WASM_VECTOR_LEN = offset;\n return ptr;\n}\n\nfunction isLikeNone(x) {\n return x === undefined || x === null;\n}\n\nlet cachedInt32Memory0 = null;\n\nfunction getInt32Memory0() {\n if (cachedInt32Memory0 === null || cachedInt32Memory0.buffer !== wasm.memory.buffer) {\n cachedInt32Memory0 = new Int32Array(wasm.memory.buffer);\n }\n return cachedInt32Memory0;\n}\n\nfunction debugString(val) {\n // primitive types\n const type = typeof val;\n if (type == 'number' || type == 'boolean' || val == null) {\n return `${val}`;\n }\n if (type == 'string') {\n return `\"${val}\"`;\n }\n if (type == 'symbol') {\n const description = val.description;\n if (description == null) {\n return 'Symbol';\n } else {\n return `Symbol(${description})`;\n }\n }\n if (type == 'function') {\n const name = val.name;\n if (typeof name == 'string' && name.length > 0) {\n return `Function(${name})`;\n } else {\n return 'Function';\n }\n }\n // objects\n if (Array.isArray(val)) {\n const length = val.length;\n let debug = '[';\n if (length > 0) {\n debug += debugString(val[0]);\n }\n for(let i = 1; i < length; i++) {\n debug += ', ' + debugString(val[i]);\n }\n debug += ']';\n return debug;\n }\n // Test for built-in\n const builtInMatches = /\\[object ([^\\]]+)\\]/.exec(toString.call(val));\n let className;\n if (builtInMatches.length > 1) {\n className = builtInMatches[1];\n } else {\n // Failed to match the standard '[object ClassName]'\n return toString.call(val);\n }\n if (className == 'Object') {\n // we're a user defined class or Object\n // JSON.stringify avoids problems with cycles, and is generally much\n // easier than looping through ownProperties of `val`.\n try {\n return 'Object(' + JSON.stringify(val) + ')';\n } catch (_) {\n return 'Object';\n }\n }\n // errors\n if (val instanceof Error) {\n return `${val.name}: ${val.message}\\n${val.stack}`;\n }\n // TODO we could test for more things here, like `Set`s and `Map`s.\n return className;\n}\n\nconst CLOSURE_DTORS = (typeof FinalizationRegistry === 'undefined')\n ? { register: () => {}, unregister: () => {} }\n : new FinalizationRegistry(state => {\n wasm.__wbindgen_export_3.get(state.dtor)(state.a, state.b);\n});\n\nfunction makeMutClosure(arg0, arg1, dtor, f) {\n const state = { a: arg0, b: arg1, cnt: 1, dtor };\n const real = (...args) => {\n // First up with a closure we increment the internal reference\n // count. This ensures that the Rust closure environment won't\n // be deallocated while we're invoking it.\n state.cnt++;\n const a = state.a;\n state.a = 0;\n try {\n return f(a, state.b, ...args);\n } finally {\n if (--state.cnt === 0) {\n wasm.__wbindgen_export_3.get(state.dtor)(a, state.b);\n CLOSURE_DTORS.unregister(state);\n } else {\n state.a = a;\n }\n }\n };\n real.original = state;\n CLOSURE_DTORS.register(real, state, state);\n return real;\n}\nfunction __wbg_adapter_34(arg0, arg1, arg2) {\n wasm._dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h4428289ce4d5afd9(arg0, arg1, addHeapObject(arg2));\n}\n\nfunction _assertClass(instance, klass) {\n if (!(instance instanceof klass)) {\n throw new Error(`expected instance of ${klass.name}`);\n }\n return instance.ptr;\n}\n\nfunction passArray8ToWasm0(arg, malloc) {\n const ptr = malloc(arg.length * 1, 1) >>> 0;\n getUint8Memory0().set(arg, ptr / 1);\n WASM_VECTOR_LEN = arg.length;\n return ptr;\n}\n/**\n* Verify an execution with a single function and a single transition. Executions with multiple\n* transitions or functions will fail to verify. Also, this does not verify that the state root of\n* the execution is included in the Aleo Network ledger.\n*\n* @param {Execution} execution The function execution to verify\n* @param {VerifyingKey} verifying_key The verifying key for the function\n* @param {Program} program The program that the function execution belongs to\n* @param {String} function_id The name of the function that was executed\n* @returns {boolean} True if the execution is valid, false otherwise\n* @param {Execution} execution\n* @param {VerifyingKey} verifying_key\n* @param {Program} program\n* @param {string} function_id\n* @returns {boolean}\n*/\nfunction verifyFunctionExecution(execution, verifying_key, program, function_id) {\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n _assertClass(execution, Execution);\n _assertClass(verifying_key, VerifyingKey);\n _assertClass(program, Program);\n const ptr0 = passStringToWasm0(function_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n wasm.verifyFunctionExecution(retptr, execution.__wbg_ptr, verifying_key.__wbg_ptr, program.__wbg_ptr, ptr0, len0);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n var r2 = getInt32Memory0()[retptr / 4 + 2];\n if (r2) {\n throw takeObject(r1);\n }\n return r0 !== 0;\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n }\n}\n\nlet cachedBigInt64Memory0 = null;\n\nfunction getBigInt64Memory0() {\n if (cachedBigInt64Memory0 === null || cachedBigInt64Memory0.buffer !== wasm.memory.buffer) {\n cachedBigInt64Memory0 = new BigInt64Array(wasm.memory.buffer);\n }\n return cachedBigInt64Memory0;\n}\n\nfunction getArrayU8FromWasm0(ptr, len) {\n ptr = ptr >>> 0;\n return getUint8Memory0().subarray(ptr / 1, ptr / 1 + len);\n}\n/**\n* @param {number} receiver\n*/\nfunction runRayonThread(receiver) {\n wasm.runRayonThread(receiver);\n}\n\n/**\n* @param {URL} url\n* @param {number} num_threads\n* @returns {Promise}\n*/\nfunction initThreadPool(url, num_threads) {\n const ret = wasm.initThreadPool(addHeapObject(url), num_threads);\n return takeObject(ret);\n}\n\nfunction handleError(f, args) {\n try {\n return f.apply(this, args);\n } catch (e) {\n wasm.__wbindgen_exn_store(addHeapObject(e));\n }\n}\nfunction __wbg_adapter_281(arg0, arg1, arg2, arg3) {\n wasm.wasm_bindgen__convert__closures__invoke2_mut__h2157eed66e6e3fca(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));\n}\n\nconst AddressFinalization = (typeof FinalizationRegistry === 'undefined')\n ? { register: () => {}, unregister: () => {} }\n : new FinalizationRegistry(ptr => wasm.__wbg_address_free(ptr >>> 0));\n/**\n* Public address of an Aleo account\n*/\nclass Address {\n\n static __wrap(ptr) {\n ptr = ptr >>> 0;\n const obj = Object.create(Address.prototype);\n obj.__wbg_ptr = ptr;\n AddressFinalization.register(obj, obj.__wbg_ptr, obj);\n return obj;\n }\n\n __destroy_into_raw() {\n const ptr = this.__wbg_ptr;\n this.__wbg_ptr = 0;\n AddressFinalization.unregister(this);\n return ptr;\n }\n\n free() {\n const ptr = this.__destroy_into_raw();\n wasm.__wbg_address_free(ptr);\n }\n /**\n * Derive an Aleo address from a private key\n *\n * @param {PrivateKey} private_key The private key to derive the address from\n * @returns {Address} Address corresponding to the private key\n * @param {PrivateKey} private_key\n * @returns {Address}\n */\n static from_private_key(private_key) {\n _assertClass(private_key, PrivateKey);\n const ret = wasm.address_from_private_key(private_key.__wbg_ptr);\n return Address.__wrap(ret);\n }\n /**\n * Derive an Aleo address from a view key\n *\n * @param {ViewKey} view_key The view key to derive the address from\n * @returns {Address} Address corresponding to the view key\n * @param {ViewKey} view_key\n * @returns {Address}\n */\n static from_view_key(view_key) {\n _assertClass(view_key, ViewKey);\n const ret = wasm.address_from_view_key(view_key.__wbg_ptr);\n return Address.__wrap(ret);\n }\n /**\n * Create an aleo address object from a string representation of an address\n *\n * @param {string} address String representation of an addressm\n * @returns {Address} Address\n * @param {string} address\n * @returns {Address}\n */\n static from_string(address) {\n const ptr0 = passStringToWasm0(address, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n const ret = wasm.address_from_string(ptr0, len0);\n return Address.__wrap(ret);\n }\n /**\n * Get a string representation of an Aleo address object\n *\n * @param {Address} Address\n * @returns {string} String representation of the address\n * @returns {string}\n */\n to_string() {\n let deferred1_0;\n let deferred1_1;\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n wasm.address_to_string(retptr, this.__wbg_ptr);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n deferred1_0 = r0;\n deferred1_1 = r1;\n return getStringFromWasm0(r0, r1);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);\n }\n }\n /**\n * Verify a signature for a message signed by the address\n *\n * @param {Uint8Array} Byte array representing a message signed by the address\n * @returns {boolean} Boolean representing whether or not the signature is valid\n * @param {Uint8Array} message\n * @param {Signature} signature\n * @returns {boolean}\n */\n verify(message, signature) {\n const ptr0 = passArray8ToWasm0(message, wasm.__wbindgen_malloc);\n const len0 = WASM_VECTOR_LEN;\n _assertClass(signature, Signature);\n const ret = wasm.address_verify(this.__wbg_ptr, ptr0, len0, signature.__wbg_ptr);\n return ret !== 0;\n }\n}\n\nconst ExecutionFinalization = (typeof FinalizationRegistry === 'undefined')\n ? { register: () => {}, unregister: () => {} }\n : new FinalizationRegistry(ptr => wasm.__wbg_execution_free(ptr >>> 0));\n/**\n* Execution of an Aleo program.\n*/\nclass Execution {\n\n static __wrap(ptr) {\n ptr = ptr >>> 0;\n const obj = Object.create(Execution.prototype);\n obj.__wbg_ptr = ptr;\n ExecutionFinalization.register(obj, obj.__wbg_ptr, obj);\n return obj;\n }\n\n __destroy_into_raw() {\n const ptr = this.__wbg_ptr;\n this.__wbg_ptr = 0;\n ExecutionFinalization.unregister(this);\n return ptr;\n }\n\n free() {\n const ptr = this.__destroy_into_raw();\n wasm.__wbg_execution_free(ptr);\n }\n /**\n * Returns the string representation of the execution.\n * @returns {string}\n */\n toString() {\n let deferred1_0;\n let deferred1_1;\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n wasm.execution_toString(retptr, this.__wbg_ptr);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n deferred1_0 = r0;\n deferred1_1 = r1;\n return getStringFromWasm0(r0, r1);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);\n }\n }\n /**\n * Creates an execution object from a string representation of an execution.\n * @param {string} execution\n * @returns {Execution}\n */\n static fromString(execution) {\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n const ptr0 = passStringToWasm0(execution, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n wasm.execution_fromString(retptr, ptr0, len0);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n var r2 = getInt32Memory0()[retptr / 4 + 2];\n if (r2) {\n throw takeObject(r1);\n }\n return Execution.__wrap(r0);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n }\n }\n}\n\nconst ExecutionResponseFinalization = (typeof FinalizationRegistry === 'undefined')\n ? { register: () => {}, unregister: () => {} }\n : new FinalizationRegistry(ptr => wasm.__wbg_executionresponse_free(ptr >>> 0));\n/**\n* Webassembly Representation of an Aleo function execution response\n*\n* This object is returned by the execution of an Aleo function off-chain. It provides methods for\n* retrieving the outputs of the function execution.\n*/\nclass ExecutionResponse {\n\n static __wrap(ptr) {\n ptr = ptr >>> 0;\n const obj = Object.create(ExecutionResponse.prototype);\n obj.__wbg_ptr = ptr;\n ExecutionResponseFinalization.register(obj, obj.__wbg_ptr, obj);\n return obj;\n }\n\n __destroy_into_raw() {\n const ptr = this.__wbg_ptr;\n this.__wbg_ptr = 0;\n ExecutionResponseFinalization.unregister(this);\n return ptr;\n }\n\n free() {\n const ptr = this.__destroy_into_raw();\n wasm.__wbg_executionresponse_free(ptr);\n }\n /**\n * Get the outputs of the executed function\n *\n * @returns {Array} Array of strings representing the outputs of the function\n * @returns {Array}\n */\n getOutputs() {\n const ret = wasm.executionresponse_getOutputs(this.__wbg_ptr);\n return takeObject(ret);\n }\n /**\n * Returns the execution object if present, null if otherwise.\n *\n * @returns {Execution | undefined} The execution object if present, null if otherwise\n * @returns {Execution | undefined}\n */\n getExecution() {\n const ret = wasm.executionresponse_getExecution(this.__wbg_ptr);\n return ret === 0 ? undefined : Execution.__wrap(ret);\n }\n /**\n * Returns the program keys if present\n * @returns {KeyPair}\n */\n getKeys() {\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n wasm.executionresponse_getKeys(retptr, this.__wbg_ptr);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n var r2 = getInt32Memory0()[retptr / 4 + 2];\n if (r2) {\n throw takeObject(r1);\n }\n return KeyPair.__wrap(r0);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n }\n }\n /**\n * Returns the proving_key if the proving key was cached in the Execution response.\n * Note the proving key is removed from the response object after the first call to this\n * function. Subsequent calls will return null.\n *\n * @returns {ProvingKey | undefined} The proving key\n * @returns {ProvingKey | undefined}\n */\n getProvingKey() {\n const ret = wasm.executionresponse_getProvingKey(this.__wbg_ptr);\n return ret === 0 ? undefined : ProvingKey.__wrap(ret);\n }\n /**\n * Returns the verifying_key associated with the program\n *\n * @returns {VerifyingKey} The verifying key\n * @returns {VerifyingKey}\n */\n getVerifyingKey() {\n const ret = wasm.executionresponse_getVerifyingKey(this.__wbg_ptr);\n return VerifyingKey.__wrap(ret);\n }\n /**\n * Returns the function identifier\n * @returns {string}\n */\n getFunctionId() {\n let deferred1_0;\n let deferred1_1;\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n wasm.executionresponse_getFunctionId(retptr, this.__wbg_ptr);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n deferred1_0 = r0;\n deferred1_1 = r1;\n return getStringFromWasm0(r0, r1);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);\n }\n }\n /**\n * Returns the program\n * @returns {Program}\n */\n getProgram() {\n const ret = wasm.executionresponse_getProgram(this.__wbg_ptr);\n return Program.__wrap(ret);\n }\n}\n\nconst FieldFinalization = (typeof FinalizationRegistry === 'undefined')\n ? { register: () => {}, unregister: () => {} }\n : new FinalizationRegistry(ptr => wasm.__wbg_field_free(ptr >>> 0));\n/**\n*/\nclass Field {\n\n static __wrap(ptr) {\n ptr = ptr >>> 0;\n const obj = Object.create(Field.prototype);\n obj.__wbg_ptr = ptr;\n FieldFinalization.register(obj, obj.__wbg_ptr, obj);\n return obj;\n }\n\n __destroy_into_raw() {\n const ptr = this.__wbg_ptr;\n this.__wbg_ptr = 0;\n FieldFinalization.unregister(this);\n return ptr;\n }\n\n free() {\n const ptr = this.__destroy_into_raw();\n wasm.__wbg_field_free(ptr);\n }\n /**\n * @returns {string}\n */\n toString() {\n let deferred1_0;\n let deferred1_1;\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n wasm.field_toString(retptr, this.__wbg_ptr);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n deferred1_0 = r0;\n deferred1_1 = r1;\n return getStringFromWasm0(r0, r1);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);\n }\n }\n /**\n * @param {string} field\n * @returns {Field}\n */\n static fromString(field) {\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n const ptr0 = passStringToWasm0(field, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n wasm.field_fromString(retptr, ptr0, len0);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n var r2 = getInt32Memory0()[retptr / 4 + 2];\n if (r2) {\n throw takeObject(r1);\n }\n return Field.__wrap(r0);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n }\n }\n}\n\nconst KeyPairFinalization = (typeof FinalizationRegistry === 'undefined')\n ? { register: () => {}, unregister: () => {} }\n : new FinalizationRegistry(ptr => wasm.__wbg_keypair_free(ptr >>> 0));\n/**\n* Key pair object containing both the function proving and verifying keys\n*/\nclass KeyPair {\n\n static __wrap(ptr) {\n ptr = ptr >>> 0;\n const obj = Object.create(KeyPair.prototype);\n obj.__wbg_ptr = ptr;\n KeyPairFinalization.register(obj, obj.__wbg_ptr, obj);\n return obj;\n }\n\n __destroy_into_raw() {\n const ptr = this.__wbg_ptr;\n this.__wbg_ptr = 0;\n KeyPairFinalization.unregister(this);\n return ptr;\n }\n\n free() {\n const ptr = this.__destroy_into_raw();\n wasm.__wbg_keypair_free(ptr);\n }\n /**\n * Create new key pair from proving and verifying keys\n *\n * @param {ProvingKey} proving_key Proving key corresponding to a function in an Aleo program\n * @param {VerifyingKey} verifying_key Verifying key corresponding to a function in an Aleo program\n * @returns {KeyPair} Key pair object containing both the function proving and verifying keys\n * @param {ProvingKey} proving_key\n * @param {VerifyingKey} verifying_key\n */\n constructor(proving_key, verifying_key) {\n _assertClass(proving_key, ProvingKey);\n var ptr0 = proving_key.__destroy_into_raw();\n _assertClass(verifying_key, VerifyingKey);\n var ptr1 = verifying_key.__destroy_into_raw();\n const ret = wasm.keypair_new(ptr0, ptr1);\n this.__wbg_ptr = ret >>> 0;\n return this;\n }\n /**\n * Get the proving key. This method will remove the proving key from the key pair\n *\n * @returns {ProvingKey | Error}\n * @returns {ProvingKey}\n */\n provingKey() {\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n wasm.keypair_provingKey(retptr, this.__wbg_ptr);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n var r2 = getInt32Memory0()[retptr / 4 + 2];\n if (r2) {\n throw takeObject(r1);\n }\n return ProvingKey.__wrap(r0);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n }\n }\n /**\n * Get the verifying key. This method will remove the verifying key from the key pair\n *\n * @returns {VerifyingKey | Error}\n * @returns {VerifyingKey}\n */\n verifyingKey() {\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n wasm.keypair_verifyingKey(retptr, this.__wbg_ptr);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n var r2 = getInt32Memory0()[retptr / 4 + 2];\n if (r2) {\n throw takeObject(r1);\n }\n return VerifyingKey.__wrap(r0);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n }\n }\n}\n\nconst MetadataFinalization = (typeof FinalizationRegistry === 'undefined')\n ? { register: () => {}, unregister: () => {} }\n : new FinalizationRegistry(ptr => wasm.__wbg_metadata_free(ptr >>> 0));\n/**\n*/\nclass Metadata {\n\n static __wrap(ptr) {\n ptr = ptr >>> 0;\n const obj = Object.create(Metadata.prototype);\n obj.__wbg_ptr = ptr;\n MetadataFinalization.register(obj, obj.__wbg_ptr, obj);\n return obj;\n }\n\n __destroy_into_raw() {\n const ptr = this.__wbg_ptr;\n this.__wbg_ptr = 0;\n MetadataFinalization.unregister(this);\n return ptr;\n }\n\n free() {\n const ptr = this.__destroy_into_raw();\n wasm.__wbg_metadata_free(ptr);\n }\n /**\n * @returns {string}\n */\n get name() {\n let deferred1_0;\n let deferred1_1;\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n wasm.__wbg_get_metadata_name(retptr, this.__wbg_ptr);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n deferred1_0 = r0;\n deferred1_1 = r1;\n return getStringFromWasm0(r0, r1);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);\n }\n }\n /**\n * @param {string} arg0\n */\n set name(arg0) {\n const ptr0 = passStringToWasm0(arg0, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n wasm.__wbg_set_metadata_name(this.__wbg_ptr, ptr0, len0);\n }\n /**\n * @returns {string}\n */\n get locator() {\n let deferred1_0;\n let deferred1_1;\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n wasm.__wbg_get_metadata_locator(retptr, this.__wbg_ptr);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n deferred1_0 = r0;\n deferred1_1 = r1;\n return getStringFromWasm0(r0, r1);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);\n }\n }\n /**\n * @param {string} arg0\n */\n set locator(arg0) {\n const ptr0 = passStringToWasm0(arg0, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n wasm.__wbg_set_metadata_locator(this.__wbg_ptr, ptr0, len0);\n }\n /**\n * @returns {string}\n */\n get prover() {\n let deferred1_0;\n let deferred1_1;\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n wasm.__wbg_get_metadata_prover(retptr, this.__wbg_ptr);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n deferred1_0 = r0;\n deferred1_1 = r1;\n return getStringFromWasm0(r0, r1);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);\n }\n }\n /**\n * @param {string} arg0\n */\n set prover(arg0) {\n const ptr0 = passStringToWasm0(arg0, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n wasm.__wbg_set_metadata_prover(this.__wbg_ptr, ptr0, len0);\n }\n /**\n * @returns {string}\n */\n get verifier() {\n let deferred1_0;\n let deferred1_1;\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n wasm.__wbg_get_metadata_verifier(retptr, this.__wbg_ptr);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n deferred1_0 = r0;\n deferred1_1 = r1;\n return getStringFromWasm0(r0, r1);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);\n }\n }\n /**\n * @param {string} arg0\n */\n set verifier(arg0) {\n const ptr0 = passStringToWasm0(arg0, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n wasm.__wbg_set_metadata_verifier(this.__wbg_ptr, ptr0, len0);\n }\n /**\n * @returns {string}\n */\n get verifyingKey() {\n let deferred1_0;\n let deferred1_1;\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n wasm.__wbg_get_metadata_verifyingKey(retptr, this.__wbg_ptr);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n deferred1_0 = r0;\n deferred1_1 = r1;\n return getStringFromWasm0(r0, r1);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);\n }\n }\n /**\n * @param {string} arg0\n */\n set verifyingKey(arg0) {\n const ptr0 = passStringToWasm0(arg0, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n wasm.__wbg_set_metadata_verifyingKey(this.__wbg_ptr, ptr0, len0);\n }\n /**\n * @returns {string}\n */\n static baseUrl() {\n let deferred1_0;\n let deferred1_1;\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n wasm.metadata_baseUrl(retptr);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n deferred1_0 = r0;\n deferred1_1 = r1;\n return getStringFromWasm0(r0, r1);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);\n }\n }\n /**\n * @returns {Metadata}\n */\n static bond_public() {\n const ret = wasm.metadata_bond_public();\n return Metadata.__wrap(ret);\n }\n /**\n * @returns {Metadata}\n */\n static bond_validator() {\n const ret = wasm.metadata_bond_validator();\n return Metadata.__wrap(ret);\n }\n /**\n * @returns {Metadata}\n */\n static claim_unbond_public() {\n const ret = wasm.metadata_claim_unbond_public();\n return Metadata.__wrap(ret);\n }\n /**\n * @returns {Metadata}\n */\n static fee_private() {\n const ret = wasm.metadata_fee_private();\n return Metadata.__wrap(ret);\n }\n /**\n * @returns {Metadata}\n */\n static fee_public() {\n const ret = wasm.metadata_fee_public();\n return Metadata.__wrap(ret);\n }\n /**\n * @returns {Metadata}\n */\n static inclusion() {\n const ret = wasm.metadata_inclusion();\n return Metadata.__wrap(ret);\n }\n /**\n * @returns {Metadata}\n */\n static join() {\n const ret = wasm.metadata_join();\n return Metadata.__wrap(ret);\n }\n /**\n * @returns {Metadata}\n */\n static set_validator_state() {\n const ret = wasm.metadata_set_validator_state();\n return Metadata.__wrap(ret);\n }\n /**\n * @returns {Metadata}\n */\n static split() {\n const ret = wasm.metadata_split();\n return Metadata.__wrap(ret);\n }\n /**\n * @returns {Metadata}\n */\n static transfer_private() {\n const ret = wasm.metadata_transfer_private();\n return Metadata.__wrap(ret);\n }\n /**\n * @returns {Metadata}\n */\n static transfer_private_to_public() {\n const ret = wasm.metadata_transfer_private_to_public();\n return Metadata.__wrap(ret);\n }\n /**\n * @returns {Metadata}\n */\n static transfer_public() {\n const ret = wasm.metadata_transfer_public();\n return Metadata.__wrap(ret);\n }\n /**\n * @returns {Metadata}\n */\n static transfer_public_as_signer() {\n const ret = wasm.metadata_transfer_public_as_signer();\n return Metadata.__wrap(ret);\n }\n /**\n * @returns {Metadata}\n */\n static transfer_public_to_private() {\n const ret = wasm.metadata_transfer_public_to_private();\n return Metadata.__wrap(ret);\n }\n /**\n * @returns {Metadata}\n */\n static unbond_public() {\n const ret = wasm.metadata_unbond_public();\n return Metadata.__wrap(ret);\n }\n}\n\nconst OfflineQueryFinalization = (typeof FinalizationRegistry === 'undefined')\n ? { register: () => {}, unregister: () => {} }\n : new FinalizationRegistry(ptr => wasm.__wbg_offlinequery_free(ptr >>> 0));\n/**\n* An offline query object used to insert the global state root and state paths needed to create\n* a valid inclusion proof offline.\n*/\nclass OfflineQuery {\n\n static __wrap(ptr) {\n ptr = ptr >>> 0;\n const obj = Object.create(OfflineQuery.prototype);\n obj.__wbg_ptr = ptr;\n OfflineQueryFinalization.register(obj, obj.__wbg_ptr, obj);\n return obj;\n }\n\n __destroy_into_raw() {\n const ptr = this.__wbg_ptr;\n this.__wbg_ptr = 0;\n OfflineQueryFinalization.unregister(this);\n return ptr;\n }\n\n free() {\n const ptr = this.__destroy_into_raw();\n wasm.__wbg_offlinequery_free(ptr);\n }\n /**\n * Creates a new offline query object. The state root is required to be passed in as a string\n * @param {string} state_root\n */\n constructor(state_root) {\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n const ptr0 = passStringToWasm0(state_root, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n wasm.offlinequery_new(retptr, ptr0, len0);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n var r2 = getInt32Memory0()[retptr / 4 + 2];\n if (r2) {\n throw takeObject(r1);\n }\n this.__wbg_ptr = r0 >>> 0;\n return this;\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n }\n }\n /**\n * Add a new state path to the offline query object.\n *\n * @param {string} commitment: The commitment corresponding to a record inpout\n * @param {string} state_path: The state path corresponding to the commitment\n * @param {string} commitment\n * @param {string} state_path\n */\n addStatePath(commitment, state_path) {\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n const ptr0 = passStringToWasm0(commitment, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n const ptr1 = passStringToWasm0(state_path, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len1 = WASM_VECTOR_LEN;\n wasm.offlinequery_addStatePath(retptr, this.__wbg_ptr, ptr0, len0, ptr1, len1);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n if (r1) {\n throw takeObject(r0);\n }\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n }\n }\n /**\n * Get a json string representation of the offline query object\n * @returns {string}\n */\n toString() {\n let deferred1_0;\n let deferred1_1;\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n wasm.offlinequery_toString(retptr, this.__wbg_ptr);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n deferred1_0 = r0;\n deferred1_1 = r1;\n return getStringFromWasm0(r0, r1);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);\n }\n }\n /**\n * Create an offline query object from a json string representation\n * @param {string} s\n * @returns {OfflineQuery}\n */\n static fromString(s) {\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n const ptr0 = passStringToWasm0(s, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n wasm.offlinequery_fromString(retptr, ptr0, len0);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n var r2 = getInt32Memory0()[retptr / 4 + 2];\n if (r2) {\n throw takeObject(r1);\n }\n return OfflineQuery.__wrap(r0);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n }\n }\n}\n\nconst PrivateKeyFinalization = (typeof FinalizationRegistry === 'undefined')\n ? { register: () => {}, unregister: () => {} }\n : new FinalizationRegistry(ptr => wasm.__wbg_privatekey_free(ptr >>> 0));\n/**\n* Private key of an Aleo account\n*/\nclass PrivateKey {\n\n static __wrap(ptr) {\n ptr = ptr >>> 0;\n const obj = Object.create(PrivateKey.prototype);\n obj.__wbg_ptr = ptr;\n PrivateKeyFinalization.register(obj, obj.__wbg_ptr, obj);\n return obj;\n }\n\n __destroy_into_raw() {\n const ptr = this.__wbg_ptr;\n this.__wbg_ptr = 0;\n PrivateKeyFinalization.unregister(this);\n return ptr;\n }\n\n free() {\n const ptr = this.__destroy_into_raw();\n wasm.__wbg_privatekey_free(ptr);\n }\n /**\n * Generate a new private key using a cryptographically secure random number generator\n *\n * @returns {PrivateKey}\n */\n constructor() {\n const ret = wasm.privatekey_new();\n this.__wbg_ptr = ret >>> 0;\n return this;\n }\n /**\n * Get a private key from a series of unchecked bytes\n *\n * @param {Uint8Array} seed Unchecked 32 byte long Uint8Array acting as the seed for the private key\n * @returns {PrivateKey}\n * @param {Uint8Array} seed\n * @returns {PrivateKey}\n */\n static from_seed_unchecked(seed) {\n const ptr0 = passArray8ToWasm0(seed, wasm.__wbindgen_malloc);\n const len0 = WASM_VECTOR_LEN;\n const ret = wasm.privatekey_from_seed_unchecked(ptr0, len0);\n return PrivateKey.__wrap(ret);\n }\n /**\n * Get a private key from a string representation of a private key\n *\n * @param {string} seed String representation of a private key\n * @returns {PrivateKey}\n * @param {string} private_key\n * @returns {PrivateKey}\n */\n static from_string(private_key) {\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n const ptr0 = passStringToWasm0(private_key, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n wasm.privatekey_from_string(retptr, ptr0, len0);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n var r2 = getInt32Memory0()[retptr / 4 + 2];\n if (r2) {\n throw takeObject(r1);\n }\n return PrivateKey.__wrap(r0);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n }\n }\n /**\n * Get a string representation of the private key. This function should be used very carefully\n * as it exposes the private key plaintext\n *\n * @returns {string} String representation of a private key\n * @returns {string}\n */\n to_string() {\n let deferred1_0;\n let deferred1_1;\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n wasm.privatekey_to_string(retptr, this.__wbg_ptr);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n deferred1_0 = r0;\n deferred1_1 = r1;\n return getStringFromWasm0(r0, r1);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);\n }\n }\n /**\n * Get the view key corresponding to the private key\n *\n * @returns {ViewKey}\n * @returns {ViewKey}\n */\n to_view_key() {\n const ret = wasm.privatekey_to_view_key(this.__wbg_ptr);\n return ViewKey.__wrap(ret);\n }\n /**\n * Get the address corresponding to the private key\n *\n * @returns {Address}\n * @returns {Address}\n */\n to_address() {\n const ret = wasm.privatekey_to_address(this.__wbg_ptr);\n return Address.__wrap(ret);\n }\n /**\n * Sign a message with the private key\n *\n * @param {Uint8Array} Byte array representing a message signed by the address\n * @returns {Signature} Signature generated by signing the message with the address\n * @param {Uint8Array} message\n * @returns {Signature}\n */\n sign(message) {\n const ptr0 = passArray8ToWasm0(message, wasm.__wbindgen_malloc);\n const len0 = WASM_VECTOR_LEN;\n const ret = wasm.privatekey_sign(this.__wbg_ptr, ptr0, len0);\n return Signature.__wrap(ret);\n }\n /**\n * Get a new randomly generated private key ciphertext using a secret. The secret is sensitive\n * and will be needed to decrypt the private key later, so it should be stored securely\n *\n * @param {string} secret Secret used to encrypt the private key\n * @returns {PrivateKeyCiphertext | Error} Ciphertext representation of the private key\n * @param {string} secret\n * @returns {PrivateKeyCiphertext}\n */\n static newEncrypted(secret) {\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n const ptr0 = passStringToWasm0(secret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n wasm.privatekey_newEncrypted(retptr, ptr0, len0);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n var r2 = getInt32Memory0()[retptr / 4 + 2];\n if (r2) {\n throw takeObject(r1);\n }\n return PrivateKeyCiphertext.__wrap(r0);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n }\n }\n /**\n * Encrypt an existing private key with a secret. The secret is sensitive and will be needed to\n * decrypt the private key later, so it should be stored securely\n *\n * @param {string} secret Secret used to encrypt the private key\n * @returns {PrivateKeyCiphertext | Error} Ciphertext representation of the private key\n * @param {string} secret\n * @returns {PrivateKeyCiphertext}\n */\n toCiphertext(secret) {\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n const ptr0 = passStringToWasm0(secret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n wasm.privatekey_toCiphertext(retptr, this.__wbg_ptr, ptr0, len0);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n var r2 = getInt32Memory0()[retptr / 4 + 2];\n if (r2) {\n throw takeObject(r1);\n }\n return PrivateKeyCiphertext.__wrap(r0);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n }\n }\n /**\n * Get private key from a private key ciphertext and secret originally used to encrypt it\n *\n * @param {PrivateKeyCiphertext} ciphertext Ciphertext representation of the private key\n * @param {string} secret Secret originally used to encrypt the private key\n * @returns {PrivateKey | Error} Private key\n * @param {PrivateKeyCiphertext} ciphertext\n * @param {string} secret\n * @returns {PrivateKey}\n */\n static fromPrivateKeyCiphertext(ciphertext, secret) {\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n _assertClass(ciphertext, PrivateKeyCiphertext);\n const ptr0 = passStringToWasm0(secret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n wasm.privatekey_fromPrivateKeyCiphertext(retptr, ciphertext.__wbg_ptr, ptr0, len0);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n var r2 = getInt32Memory0()[retptr / 4 + 2];\n if (r2) {\n throw takeObject(r1);\n }\n return PrivateKey.__wrap(r0);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n }\n }\n}\n\nconst PrivateKeyCiphertextFinalization = (typeof FinalizationRegistry === 'undefined')\n ? { register: () => {}, unregister: () => {} }\n : new FinalizationRegistry(ptr => wasm.__wbg_privatekeyciphertext_free(ptr >>> 0));\n/**\n* Private Key in ciphertext form\n*/\nclass PrivateKeyCiphertext {\n\n static __wrap(ptr) {\n ptr = ptr >>> 0;\n const obj = Object.create(PrivateKeyCiphertext.prototype);\n obj.__wbg_ptr = ptr;\n PrivateKeyCiphertextFinalization.register(obj, obj.__wbg_ptr, obj);\n return obj;\n }\n\n __destroy_into_raw() {\n const ptr = this.__wbg_ptr;\n this.__wbg_ptr = 0;\n PrivateKeyCiphertextFinalization.unregister(this);\n return ptr;\n }\n\n free() {\n const ptr = this.__destroy_into_raw();\n wasm.__wbg_privatekeyciphertext_free(ptr);\n }\n /**\n * Encrypt a private key using a secret string. The secret is sensitive and will be needed to\n * decrypt the private key later, so it should be stored securely\n *\n * @param {PrivateKey} private_key Private key to encrypt\n * @param {string} secret Secret to encrypt the private key with\n * @returns {PrivateKeyCiphertext | Error} Private key ciphertext\n * @param {PrivateKey} private_key\n * @param {string} secret\n * @returns {PrivateKeyCiphertext}\n */\n static encryptPrivateKey(private_key, secret) {\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n _assertClass(private_key, PrivateKey);\n const ptr0 = passStringToWasm0(secret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n wasm.privatekey_toCiphertext(retptr, private_key.__wbg_ptr, ptr0, len0);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n var r2 = getInt32Memory0()[retptr / 4 + 2];\n if (r2) {\n throw takeObject(r1);\n }\n return PrivateKeyCiphertext.__wrap(r0);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n }\n }\n /**\n * Decrypts a private ciphertext using a secret string. This must be the same secret used to\n * encrypt the private key\n *\n * @param {string} secret Secret used to encrypt the private key\n * @returns {PrivateKey | Error} Private key\n * @param {string} secret\n * @returns {PrivateKey}\n */\n decryptToPrivateKey(secret) {\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n const ptr0 = passStringToWasm0(secret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n wasm.privatekeyciphertext_decryptToPrivateKey(retptr, this.__wbg_ptr, ptr0, len0);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n var r2 = getInt32Memory0()[retptr / 4 + 2];\n if (r2) {\n throw takeObject(r1);\n }\n return PrivateKey.__wrap(r0);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n }\n }\n /**\n * Returns the ciphertext string\n *\n * @returns {string} Ciphertext string\n * @returns {string}\n */\n toString() {\n let deferred1_0;\n let deferred1_1;\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n wasm.privatekeyciphertext_toString(retptr, this.__wbg_ptr);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n deferred1_0 = r0;\n deferred1_1 = r1;\n return getStringFromWasm0(r0, r1);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);\n }\n }\n /**\n * Creates a PrivateKeyCiphertext from a string\n *\n * @param {string} ciphertext Ciphertext string\n * @returns {PrivateKeyCiphertext | Error} Private key ciphertext\n * @param {string} ciphertext\n * @returns {PrivateKeyCiphertext}\n */\n static fromString(ciphertext) {\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n const ptr0 = passStringToWasm0(ciphertext, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n wasm.privatekeyciphertext_fromString(retptr, ptr0, len0);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n var r2 = getInt32Memory0()[retptr / 4 + 2];\n if (r2) {\n throw takeObject(r1);\n }\n return PrivateKeyCiphertext.__wrap(r0);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n }\n }\n}\n\nconst ProgramFinalization = (typeof FinalizationRegistry === 'undefined')\n ? { register: () => {}, unregister: () => {} }\n : new FinalizationRegistry(ptr => wasm.__wbg_program_free(ptr >>> 0));\n/**\n* Webassembly Representation of an Aleo program\n*/\nclass Program {\n\n static __wrap(ptr) {\n ptr = ptr >>> 0;\n const obj = Object.create(Program.prototype);\n obj.__wbg_ptr = ptr;\n ProgramFinalization.register(obj, obj.__wbg_ptr, obj);\n return obj;\n }\n\n __destroy_into_raw() {\n const ptr = this.__wbg_ptr;\n this.__wbg_ptr = 0;\n ProgramFinalization.unregister(this);\n return ptr;\n }\n\n free() {\n const ptr = this.__destroy_into_raw();\n wasm.__wbg_program_free(ptr);\n }\n /**\n * Create a program from a program string\n *\n * @param {string} program Aleo program source code\n * @returns {Program | Error} Program object\n * @param {string} program\n * @returns {Program}\n */\n static fromString(program) {\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n const ptr0 = passStringToWasm0(program, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n wasm.program_fromString(retptr, ptr0, len0);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n var r2 = getInt32Memory0()[retptr / 4 + 2];\n if (r2) {\n throw takeObject(r1);\n }\n return Program.__wrap(r0);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n }\n }\n /**\n * Get a string representation of the program\n *\n * @returns {string} String containing the program source code\n * @returns {string}\n */\n toString() {\n let deferred1_0;\n let deferred1_1;\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n wasm.program_toString(retptr, this.__wbg_ptr);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n deferred1_0 = r0;\n deferred1_1 = r1;\n return getStringFromWasm0(r0, r1);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);\n }\n }\n /**\n * Determine if a function is present in the program\n *\n * @param {string} functionName Name of the function to check for\n * @returns {boolean} True if the program is valid, false otherwise\n * @param {string} function_name\n * @returns {boolean}\n */\n hasFunction(function_name) {\n const ptr0 = passStringToWasm0(function_name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n const ret = wasm.program_hasFunction(this.__wbg_ptr, ptr0, len0);\n return ret !== 0;\n }\n /**\n * Get javascript array of functions names in the program\n *\n * @returns {Array} Array of all function names present in the program\n *\n * @example\n * const expected_functions = [\n * \"mint\",\n * \"transfer_private\",\n * \"transfer_private_to_public\",\n * \"transfer_public\",\n * \"transfer_public_to_private\",\n * \"join\",\n * \"split\",\n * \"fee\"\n * ]\n *\n * const credits_program = aleo_wasm.Program.getCreditsProgram();\n * const credits_functions = credits_program.getFunctions();\n * console.log(credits_functions === expected_functions); // Output should be \"true\"\n * @returns {Array}\n */\n getFunctions() {\n const ret = wasm.program_getFunctions(this.__wbg_ptr);\n return takeObject(ret);\n }\n /**\n * Get a javascript object representation of the function inputs and types. This can be used\n * to generate a web form to capture user inputs for an execution of a function.\n *\n * @param {string} function_name Name of the function to get inputs for\n * @returns {Array | Error} Array of function inputs\n *\n * @example\n * const expected_inputs = [\n * {\n * type:\"record\",\n * visibility:\"private\",\n * record:\"credits\",\n * members:[\n * {\n * name:\"microcredits\",\n * type:\"u64\",\n * visibility:\"private\"\n * }\n * ],\n * register:\"r0\"\n * },\n * {\n * type:\"address\",\n * visibility:\"private\",\n * register:\"r1\"\n * },\n * {\n * type:\"u64\",\n * visibility:\"private\",\n * register:\"r2\"\n * }\n * ];\n *\n * const credits_program = aleo_wasm.Program.getCreditsProgram();\n * const transfer_function_inputs = credits_program.getFunctionInputs(\"transfer_private\");\n * console.log(transfer_function_inputs === expected_inputs); // Output should be \"true\"\n * @param {string} function_name\n * @returns {Array}\n */\n getFunctionInputs(function_name) {\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n const ptr0 = passStringToWasm0(function_name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n wasm.program_getFunctionInputs(retptr, this.__wbg_ptr, ptr0, len0);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n var r2 = getInt32Memory0()[retptr / 4 + 2];\n if (r2) {\n throw takeObject(r1);\n }\n return takeObject(r0);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n }\n }\n /**\n * Get a the list of a program's mappings and the names/types of their keys and values.\n *\n * @returns {Array | Error} - An array of objects representing the mappings in the program\n * @example\n * const expected_mappings = [\n * {\n * name: \"account\",\n * key_name: \"owner\",\n * key_type: \"address\",\n * value_name: \"microcredits\",\n * value_type: \"u64\"\n * }\n * ]\n *\n * const credits_program = aleo_wasm.Program.getCreditsProgram();\n * const credits_mappings = credits_program.getMappings();\n * console.log(credits_mappings === expected_mappings); // Output should be \"true\"\n * @returns {Array}\n */\n getMappings() {\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n wasm.program_getMappings(retptr, this.__wbg_ptr);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n var r2 = getInt32Memory0()[retptr / 4 + 2];\n if (r2) {\n throw takeObject(r1);\n }\n return takeObject(r0);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n }\n }\n /**\n * Get a javascript object representation of a program record and its types\n *\n * @param {string} record_name Name of the record to get members for\n * @returns {Object | Error} Object containing the record name, type, and members\n *\n * @example\n *\n * const expected_record = {\n * type: \"record\",\n * record: \"Credits\",\n * members: [\n * {\n * name: \"owner\",\n * type: \"address\",\n * visibility: \"private\"\n * },\n * {\n * name: \"microcredits\",\n * type: \"u64\",\n * visibility: \"private\"\n * }\n * ];\n * };\n *\n * const credits_program = aleo_wasm.Program.getCreditsProgram();\n * const credits_record = credits_program.getRecordMembers(\"Credits\");\n * console.log(credits_record === expected_record); // Output should be \"true\"\n * @param {string} record_name\n * @returns {object}\n */\n getRecordMembers(record_name) {\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n const ptr0 = passStringToWasm0(record_name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n wasm.program_getRecordMembers(retptr, this.__wbg_ptr, ptr0, len0);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n var r2 = getInt32Memory0()[retptr / 4 + 2];\n if (r2) {\n throw takeObject(r1);\n }\n return takeObject(r0);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n }\n }\n /**\n * Get a javascript object representation of a program struct and its types\n *\n * @param {string} struct_name Name of the struct to get members for\n * @returns {Array | Error} Array containing the struct members\n *\n * @example\n *\n * const STRUCT_PROGRAM = \"program token_issue.aleo;\n *\n * struct token_metadata:\n * network as u32;\n * version as u32;\n *\n * struct token:\n * token_id as u32;\n * metadata as token_metadata;\n *\n * function no_op:\n * input r0 as u64;\n * output r0 as u64;\"\n *\n * const expected_struct_members = [\n * {\n * name: \"token_id\",\n * type: \"u32\",\n * },\n * {\n * name: \"metadata\",\n * type: \"struct\",\n * struct_id: \"token_metadata\",\n * members: [\n * {\n * name: \"network\",\n * type: \"u32\",\n * }\n * {\n * name: \"version\",\n * type: \"u32\",\n * }\n * ]\n * }\n * ];\n *\n * const program = aleo_wasm.Program.fromString(STRUCT_PROGRAM);\n * const struct_members = program.getStructMembers(\"token\");\n * console.log(struct_members === expected_struct_members); // Output should be \"true\"\n * @param {string} struct_name\n * @returns {Array}\n */\n getStructMembers(struct_name) {\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n const ptr0 = passStringToWasm0(struct_name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n wasm.program_getStructMembers(retptr, this.__wbg_ptr, ptr0, len0);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n var r2 = getInt32Memory0()[retptr / 4 + 2];\n if (r2) {\n throw takeObject(r1);\n }\n return takeObject(r0);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n }\n }\n /**\n * Get the credits.aleo program\n *\n * @returns {Program} The credits.aleo program\n * @returns {Program}\n */\n static getCreditsProgram() {\n const ret = wasm.program_getCreditsProgram();\n return Program.__wrap(ret);\n }\n /**\n * Get the id of the program\n *\n * @returns {string} The id of the program\n * @returns {string}\n */\n id() {\n let deferred1_0;\n let deferred1_1;\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n wasm.program_id(retptr, this.__wbg_ptr);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n deferred1_0 = r0;\n deferred1_1 = r1;\n return getStringFromWasm0(r0, r1);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);\n }\n }\n /**\n * Get a unique address of the program\n *\n * @returns {Address} The address of the program\n * @returns {Address}\n */\n address() {\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n wasm.program_address(retptr, this.__wbg_ptr);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n var r2 = getInt32Memory0()[retptr / 4 + 2];\n if (r2) {\n throw takeObject(r1);\n }\n return Address.__wrap(r0);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n }\n }\n /**\n * Determine equality with another program\n *\n * @param {Program} other The other program to compare\n * @returns {boolean} True if the programs are equal, false otherwise\n * @param {Program} other\n * @returns {boolean}\n */\n isEqual(other) {\n _assertClass(other, Program);\n const ret = wasm.program_isEqual(this.__wbg_ptr, other.__wbg_ptr);\n return ret !== 0;\n }\n /**\n * Get program_imports\n *\n * @returns {Array} The program imports\n *\n * @example\n *\n * const DOUBLE_TEST = \"import multiply_test.aleo;\n *\n * program double_test.aleo;\n *\n * function double_it:\n * input r0 as u32.private;\n * call multiply_test.aleo/multiply 2u32 r0 into r1;\n * output r1 as u32.private;\";\n *\n * const expected_imports = [\n * \"multiply_test.aleo\"\n * ];\n *\n * const program = aleo_wasm.Program.fromString(DOUBLE_TEST_PROGRAM);\n * const imports = program.getImports();\n * console.log(imports === expected_imports); // Output should be \"true\"\n * @returns {Array}\n */\n getImports() {\n const ret = wasm.program_getImports(this.__wbg_ptr);\n return takeObject(ret);\n }\n}\n\nconst ProgramManagerFinalization = (typeof FinalizationRegistry === 'undefined')\n ? { register: () => {}, unregister: () => {} }\n : new FinalizationRegistry(ptr => wasm.__wbg_programmanager_free(ptr >>> 0));\n/**\n*/\nclass ProgramManager {\n\n __destroy_into_raw() {\n const ptr = this.__wbg_ptr;\n this.__wbg_ptr = 0;\n ProgramManagerFinalization.unregister(this);\n return ptr;\n }\n\n free() {\n const ptr = this.__destroy_into_raw();\n wasm.__wbg_programmanager_free(ptr);\n }\n /**\n * Deploy an Aleo program\n *\n * @param private_key The private key of the sender\n * @param program The source code of the program being deployed\n * @param imports A javascript object holding the source code of any imported programs in the\n * form \\{\"program_name1\": \"program_source_code\", \"program_name2\": \"program_source_code\", ..\\}.\n * Note that all imported programs must be deployed on chain before the main program in order\n * for the deployment to succeed\n * @param fee_credits The amount of credits to pay as a fee\n * @param fee_record The record to spend the fee from\n * @param url The url of the Aleo network node to send the transaction to\n * @param imports (optional) Provide a list of imports to use for the program deployment in the\n * form of a javascript object where the keys are a string of the program name and the values\n * are a string representing the program source code \\{ \"hello.aleo\": \"hello.aleo source code\" \\}\n * @param fee_proving_key (optional) Provide a proving key to use for the fee execution\n * @param fee_verifying_key (optional) Provide a verifying key to use for the fee execution\n * @returns {Transaction | Error}\n * @param {PrivateKey} private_key\n * @param {string} program\n * @param {number} fee_credits\n * @param {RecordPlaintext | undefined} [fee_record]\n * @param {string | undefined} [url]\n * @param {object | undefined} [imports]\n * @param {ProvingKey | undefined} [fee_proving_key]\n * @param {VerifyingKey | undefined} [fee_verifying_key]\n * @param {OfflineQuery | undefined} [offline_query]\n * @returns {Promise}\n */\n static buildDeploymentTransaction(private_key, program, fee_credits, fee_record, url, imports, fee_proving_key, fee_verifying_key, offline_query) {\n _assertClass(private_key, PrivateKey);\n const ptr0 = passStringToWasm0(program, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n let ptr1 = 0;\n if (!isLikeNone(fee_record)) {\n _assertClass(fee_record, RecordPlaintext);\n ptr1 = fee_record.__destroy_into_raw();\n }\n var ptr2 = isLikeNone(url) ? 0 : passStringToWasm0(url, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n var len2 = WASM_VECTOR_LEN;\n let ptr3 = 0;\n if (!isLikeNone(fee_proving_key)) {\n _assertClass(fee_proving_key, ProvingKey);\n ptr3 = fee_proving_key.__destroy_into_raw();\n }\n let ptr4 = 0;\n if (!isLikeNone(fee_verifying_key)) {\n _assertClass(fee_verifying_key, VerifyingKey);\n ptr4 = fee_verifying_key.__destroy_into_raw();\n }\n let ptr5 = 0;\n if (!isLikeNone(offline_query)) {\n _assertClass(offline_query, OfflineQuery);\n ptr5 = offline_query.__destroy_into_raw();\n }\n const ret = wasm.programmanager_buildDeploymentTransaction(private_key.__wbg_ptr, ptr0, len0, fee_credits, ptr1, ptr2, len2, isLikeNone(imports) ? 0 : addHeapObject(imports), ptr3, ptr4, ptr5);\n return takeObject(ret);\n }\n /**\n * Estimate the fee for a program deployment\n *\n * Disclaimer: Fee estimation is experimental and may not represent a correct estimate on any current or future network\n *\n * @param program The source code of the program being deployed\n * @param imports (optional) Provide a list of imports to use for the deployment fee estimation\n * in the form of a javascript object where the keys are a string of the program name and the values\n * are a string representing the program source code \\{ \"hello.aleo\": \"hello.aleo source code\" \\}\n * @returns {u64 | Error}\n * @param {string} program\n * @param {object | undefined} [imports]\n * @returns {Promise}\n */\n static estimateDeploymentFee(program, imports) {\n const ptr0 = passStringToWasm0(program, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n const ret = wasm.programmanager_estimateDeploymentFee(ptr0, len0, isLikeNone(imports) ? 0 : addHeapObject(imports));\n return takeObject(ret);\n }\n /**\n * Estimate the component of the deployment cost which comes from the fee for the program name.\n * Note that this cost does not represent the entire cost of deployment. It is additional to\n * the cost of the size (in bytes) of the deployment.\n *\n * Disclaimer: Fee estimation is experimental and may not represent a correct estimate on any current or future network\n *\n * @param name The name of the program to be deployed\n * @returns {u64 | Error}\n * @param {string} name\n * @returns {bigint}\n */\n static estimateProgramNameCost(name) {\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n const ptr0 = passStringToWasm0(name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n wasm.programmanager_estimateProgramNameCost(retptr, ptr0, len0);\n var r0 = getBigInt64Memory0()[retptr / 8 + 0];\n var r2 = getInt32Memory0()[retptr / 4 + 2];\n var r3 = getInt32Memory0()[retptr / 4 + 3];\n if (r3) {\n throw takeObject(r2);\n }\n return BigInt.asUintN(64, r0);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n }\n }\n /**\n * Execute an arbitrary function locally\n *\n * @param {PrivateKey} private_key The private key of the sender\n * @param {string} program The source code of the program being executed\n * @param {string} function The name of the function to execute\n * @param {Array} inputs A javascript array of inputs to the function\n * @param {boolean} prove_execution If true, the execution will be proven and an execution object\n * containing the proof and the encrypted inputs and outputs needed to verify the proof offline\n * will be returned.\n * @param {boolean} cache Cache the proving and verifying keys in the Execution response.\n * If this is set to 'true' the keys synthesized will be stored in the Execution Response\n * and the `ProvingKey` and `VerifyingKey` can be retrieved from the response via the `.getKeys()`\n * method.\n * @param {Object | undefined} imports (optional) Provide a list of imports to use for the function execution in the\n * form of a javascript object where the keys are a string of the program name and the values\n * are a string representing the program source code \\{ \"hello.aleo\": \"hello.aleo source code\" \\}\n * @param {ProvingKey | undefined} proving_key (optional) Provide a verifying key to use for the function execution\n * @param {VerifyingKey | undefined} verifying_key (optional) Provide a verifying key to use for the function execution\n * @param {PrivateKey} private_key\n * @param {string} program\n * @param {string} _function\n * @param {Array} inputs\n * @param {boolean} prove_execution\n * @param {boolean} cache\n * @param {object | undefined} [imports]\n * @param {ProvingKey | undefined} [proving_key]\n * @param {VerifyingKey | undefined} [verifying_key]\n * @param {string | undefined} [url]\n * @param {OfflineQuery | undefined} [offline_query]\n * @returns {Promise}\n */\n static executeFunctionOffline(private_key, program, _function, inputs, prove_execution, cache, imports, proving_key, verifying_key, url, offline_query) {\n _assertClass(private_key, PrivateKey);\n const ptr0 = passStringToWasm0(program, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n const ptr1 = passStringToWasm0(_function, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len1 = WASM_VECTOR_LEN;\n let ptr2 = 0;\n if (!isLikeNone(proving_key)) {\n _assertClass(proving_key, ProvingKey);\n ptr2 = proving_key.__destroy_into_raw();\n }\n let ptr3 = 0;\n if (!isLikeNone(verifying_key)) {\n _assertClass(verifying_key, VerifyingKey);\n ptr3 = verifying_key.__destroy_into_raw();\n }\n var ptr4 = isLikeNone(url) ? 0 : passStringToWasm0(url, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n var len4 = WASM_VECTOR_LEN;\n let ptr5 = 0;\n if (!isLikeNone(offline_query)) {\n _assertClass(offline_query, OfflineQuery);\n ptr5 = offline_query.__destroy_into_raw();\n }\n const ret = wasm.programmanager_executeFunctionOffline(private_key.__wbg_ptr, ptr0, len0, ptr1, len1, addHeapObject(inputs), prove_execution, cache, isLikeNone(imports) ? 0 : addHeapObject(imports), ptr2, ptr3, ptr4, len4, ptr5);\n return takeObject(ret);\n }\n /**\n * Execute Aleo function and create an Aleo execution transaction\n *\n * @param private_key The private key of the sender\n * @param program The source code of the program being executed\n * @param function The name of the function to execute\n * @param inputs A javascript array of inputs to the function\n * @param fee_credits The amount of credits to pay as a fee\n * @param fee_record The record to spend the fee from\n * @param url The url of the Aleo network node to send the transaction to\n * If this is set to 'true' the keys synthesized (or passed in as optional parameters via the\n * `proving_key` and `verifying_key` arguments) will be stored in the ProgramManager's memory\n * and used for subsequent transactions. If this is set to 'false' the proving and verifying\n * keys will be deallocated from memory after the transaction is executed.\n * @param imports (optional) Provide a list of imports to use for the function execution in the\n * form of a javascript object where the keys are a string of the program name and the values\n * are a string representing the program source code \\{ \"hello.aleo\": \"hello.aleo source code\" \\}\n * @param proving_key (optional) Provide a verifying key to use for the function execution\n * @param verifying_key (optional) Provide a verifying key to use for the function execution\n * @param fee_proving_key (optional) Provide a proving key to use for the fee execution\n * @param fee_verifying_key (optional) Provide a verifying key to use for the fee execution\n * @returns {Transaction | Error}\n * @param {PrivateKey} private_key\n * @param {string} program\n * @param {string} _function\n * @param {Array} inputs\n * @param {number} fee_credits\n * @param {RecordPlaintext | undefined} [fee_record]\n * @param {string | undefined} [url]\n * @param {object | undefined} [imports]\n * @param {ProvingKey | undefined} [proving_key]\n * @param {VerifyingKey | undefined} [verifying_key]\n * @param {ProvingKey | undefined} [fee_proving_key]\n * @param {VerifyingKey | undefined} [fee_verifying_key]\n * @param {OfflineQuery | undefined} [offline_query]\n * @returns {Promise}\n */\n static buildExecutionTransaction(private_key, program, _function, inputs, fee_credits, fee_record, url, imports, proving_key, verifying_key, fee_proving_key, fee_verifying_key, offline_query) {\n _assertClass(private_key, PrivateKey);\n const ptr0 = passStringToWasm0(program, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n const ptr1 = passStringToWasm0(_function, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len1 = WASM_VECTOR_LEN;\n let ptr2 = 0;\n if (!isLikeNone(fee_record)) {\n _assertClass(fee_record, RecordPlaintext);\n ptr2 = fee_record.__destroy_into_raw();\n }\n var ptr3 = isLikeNone(url) ? 0 : passStringToWasm0(url, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n var len3 = WASM_VECTOR_LEN;\n let ptr4 = 0;\n if (!isLikeNone(proving_key)) {\n _assertClass(proving_key, ProvingKey);\n ptr4 = proving_key.__destroy_into_raw();\n }\n let ptr5 = 0;\n if (!isLikeNone(verifying_key)) {\n _assertClass(verifying_key, VerifyingKey);\n ptr5 = verifying_key.__destroy_into_raw();\n }\n let ptr6 = 0;\n if (!isLikeNone(fee_proving_key)) {\n _assertClass(fee_proving_key, ProvingKey);\n ptr6 = fee_proving_key.__destroy_into_raw();\n }\n let ptr7 = 0;\n if (!isLikeNone(fee_verifying_key)) {\n _assertClass(fee_verifying_key, VerifyingKey);\n ptr7 = fee_verifying_key.__destroy_into_raw();\n }\n let ptr8 = 0;\n if (!isLikeNone(offline_query)) {\n _assertClass(offline_query, OfflineQuery);\n ptr8 = offline_query.__destroy_into_raw();\n }\n const ret = wasm.programmanager_buildExecutionTransaction(private_key.__wbg_ptr, ptr0, len0, ptr1, len1, addHeapObject(inputs), fee_credits, ptr2, ptr3, len3, isLikeNone(imports) ? 0 : addHeapObject(imports), ptr4, ptr5, ptr6, ptr7, ptr8);\n return takeObject(ret);\n }\n /**\n * Estimate Fee for Aleo function execution. Note if \"cache\" is set to true, the proving and\n * verifying keys will be stored in the ProgramManager's memory and used for subsequent\n * program executions.\n *\n * Disclaimer: Fee estimation is experimental and may not represent a correct estimate on any current or future network\n *\n * @param private_key The private key of the sender\n * @param program The source code of the program to estimate the execution fee for\n * @param function The name of the function to execute\n * @param inputs A javascript array of inputs to the function\n * @param url The url of the Aleo network node to send the transaction to\n * @param imports (optional) Provide a list of imports to use for the fee estimation in the\n * form of a javascript object where the keys are a string of the program name and the values\n * are a string representing the program source code \\{ \"hello.aleo\": \"hello.aleo source code\" \\}\n * @param proving_key (optional) Provide a verifying key to use for the fee estimation\n * @param verifying_key (optional) Provide a verifying key to use for the fee estimation\n * @returns {u64 | Error} Fee in microcredits\n * @param {PrivateKey} private_key\n * @param {string} program\n * @param {string} _function\n * @param {Array} inputs\n * @param {string | undefined} [url]\n * @param {object | undefined} [imports]\n * @param {ProvingKey | undefined} [proving_key]\n * @param {VerifyingKey | undefined} [verifying_key]\n * @param {OfflineQuery | undefined} [offline_query]\n * @returns {Promise}\n */\n static estimateExecutionFee(private_key, program, _function, inputs, url, imports, proving_key, verifying_key, offline_query) {\n _assertClass(private_key, PrivateKey);\n const ptr0 = passStringToWasm0(program, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n const ptr1 = passStringToWasm0(_function, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len1 = WASM_VECTOR_LEN;\n var ptr2 = isLikeNone(url) ? 0 : passStringToWasm0(url, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n var len2 = WASM_VECTOR_LEN;\n let ptr3 = 0;\n if (!isLikeNone(proving_key)) {\n _assertClass(proving_key, ProvingKey);\n ptr3 = proving_key.__destroy_into_raw();\n }\n let ptr4 = 0;\n if (!isLikeNone(verifying_key)) {\n _assertClass(verifying_key, VerifyingKey);\n ptr4 = verifying_key.__destroy_into_raw();\n }\n let ptr5 = 0;\n if (!isLikeNone(offline_query)) {\n _assertClass(offline_query, OfflineQuery);\n ptr5 = offline_query.__destroy_into_raw();\n }\n const ret = wasm.programmanager_estimateExecutionFee(private_key.__wbg_ptr, ptr0, len0, ptr1, len1, addHeapObject(inputs), ptr2, len2, isLikeNone(imports) ? 0 : addHeapObject(imports), ptr3, ptr4, ptr5);\n return takeObject(ret);\n }\n /**\n * Estimate the finalize fee component for executing a function. This fee is additional to the\n * size of the execution of the program in bytes. If the function does not have a finalize\n * step, then the finalize fee is 0.\n *\n * Disclaimer: Fee estimation is experimental and may not represent a correct estimate on any current or future network\n *\n * @param program The program containing the function to estimate the finalize fee for\n * @param function The function to estimate the finalize fee for\n * @returns {u64 | Error} Fee in microcredits\n * @param {string} program\n * @param {string} _function\n * @returns {bigint}\n */\n static estimateFinalizeFee(program, _function) {\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n const ptr0 = passStringToWasm0(program, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n const ptr1 = passStringToWasm0(_function, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len1 = WASM_VECTOR_LEN;\n wasm.programmanager_estimateFinalizeFee(retptr, ptr0, len0, ptr1, len1);\n var r0 = getBigInt64Memory0()[retptr / 8 + 0];\n var r2 = getInt32Memory0()[retptr / 4 + 2];\n var r3 = getInt32Memory0()[retptr / 4 + 3];\n if (r3) {\n throw takeObject(r2);\n }\n return BigInt.asUintN(64, r0);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n }\n }\n /**\n * Join two records together to create a new record with an amount of credits equal to the sum\n * of the credits of the two original records\n *\n * @param private_key The private key of the sender\n * @param record_1 The first record to combine\n * @param record_2 The second record to combine\n * @param fee_credits The amount of credits to pay as a fee\n * @param fee_record The record to spend the fee from\n * @param url The url of the Aleo network node to send the transaction to\n * @param join_proving_key (optional) Provide a proving key to use for the join function\n * @param join_verifying_key (optional) Provide a verifying key to use for the join function\n * @param fee_proving_key (optional) Provide a proving key to use for the fee execution\n * @param fee_verifying_key (optional) Provide a verifying key to use for the fee execution\n * @returns {Transaction | Error} Transaction object\n * @param {PrivateKey} private_key\n * @param {RecordPlaintext} record_1\n * @param {RecordPlaintext} record_2\n * @param {number} fee_credits\n * @param {RecordPlaintext | undefined} [fee_record]\n * @param {string | undefined} [url]\n * @param {ProvingKey | undefined} [join_proving_key]\n * @param {VerifyingKey | undefined} [join_verifying_key]\n * @param {ProvingKey | undefined} [fee_proving_key]\n * @param {VerifyingKey | undefined} [fee_verifying_key]\n * @param {OfflineQuery | undefined} [offline_query]\n * @returns {Promise}\n */\n static buildJoinTransaction(private_key, record_1, record_2, fee_credits, fee_record, url, join_proving_key, join_verifying_key, fee_proving_key, fee_verifying_key, offline_query) {\n _assertClass(private_key, PrivateKey);\n _assertClass(record_1, RecordPlaintext);\n var ptr0 = record_1.__destroy_into_raw();\n _assertClass(record_2, RecordPlaintext);\n var ptr1 = record_2.__destroy_into_raw();\n let ptr2 = 0;\n if (!isLikeNone(fee_record)) {\n _assertClass(fee_record, RecordPlaintext);\n ptr2 = fee_record.__destroy_into_raw();\n }\n var ptr3 = isLikeNone(url) ? 0 : passStringToWasm0(url, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n var len3 = WASM_VECTOR_LEN;\n let ptr4 = 0;\n if (!isLikeNone(join_proving_key)) {\n _assertClass(join_proving_key, ProvingKey);\n ptr4 = join_proving_key.__destroy_into_raw();\n }\n let ptr5 = 0;\n if (!isLikeNone(join_verifying_key)) {\n _assertClass(join_verifying_key, VerifyingKey);\n ptr5 = join_verifying_key.__destroy_into_raw();\n }\n let ptr6 = 0;\n if (!isLikeNone(fee_proving_key)) {\n _assertClass(fee_proving_key, ProvingKey);\n ptr6 = fee_proving_key.__destroy_into_raw();\n }\n let ptr7 = 0;\n if (!isLikeNone(fee_verifying_key)) {\n _assertClass(fee_verifying_key, VerifyingKey);\n ptr7 = fee_verifying_key.__destroy_into_raw();\n }\n let ptr8 = 0;\n if (!isLikeNone(offline_query)) {\n _assertClass(offline_query, OfflineQuery);\n ptr8 = offline_query.__destroy_into_raw();\n }\n const ret = wasm.programmanager_buildJoinTransaction(private_key.__wbg_ptr, ptr0, ptr1, fee_credits, ptr2, ptr3, len3, ptr4, ptr5, ptr6, ptr7, ptr8);\n return takeObject(ret);\n }\n /**\n * Split an Aleo credits record into two separate records. This function does not require a fee.\n *\n * @param private_key The private key of the sender\n * @param split_amount The amount of the credit split. This amount will be subtracted from the\n * value of the record and two new records will be created with the split amount and the remainder\n * @param amount_record The record to split\n * @param url The url of the Aleo network node to send the transaction to\n * @param split_proving_key (optional) Provide a proving key to use for the split function\n * @param split_verifying_key (optional) Provide a verifying key to use for the split function\n * @returns {Transaction | Error} Transaction object\n * @param {PrivateKey} private_key\n * @param {number} split_amount\n * @param {RecordPlaintext} amount_record\n * @param {string | undefined} [url]\n * @param {ProvingKey | undefined} [split_proving_key]\n * @param {VerifyingKey | undefined} [split_verifying_key]\n * @param {OfflineQuery | undefined} [offline_query]\n * @returns {Promise}\n */\n static buildSplitTransaction(private_key, split_amount, amount_record, url, split_proving_key, split_verifying_key, offline_query) {\n _assertClass(private_key, PrivateKey);\n _assertClass(amount_record, RecordPlaintext);\n var ptr0 = amount_record.__destroy_into_raw();\n var ptr1 = isLikeNone(url) ? 0 : passStringToWasm0(url, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n var len1 = WASM_VECTOR_LEN;\n let ptr2 = 0;\n if (!isLikeNone(split_proving_key)) {\n _assertClass(split_proving_key, ProvingKey);\n ptr2 = split_proving_key.__destroy_into_raw();\n }\n let ptr3 = 0;\n if (!isLikeNone(split_verifying_key)) {\n _assertClass(split_verifying_key, VerifyingKey);\n ptr3 = split_verifying_key.__destroy_into_raw();\n }\n let ptr4 = 0;\n if (!isLikeNone(offline_query)) {\n _assertClass(offline_query, OfflineQuery);\n ptr4 = offline_query.__destroy_into_raw();\n }\n const ret = wasm.programmanager_buildSplitTransaction(private_key.__wbg_ptr, split_amount, ptr0, ptr1, len1, ptr2, ptr3, ptr4);\n return takeObject(ret);\n }\n /**\n * Send credits from one Aleo account to another\n *\n * @param private_key The private key of the sender\n * @param amount_credits The amount of credits to send\n * @param recipient The recipient of the transaction\n * @param transfer_type The type of the transfer (options: \"private\", \"public\", \"private_to_public\", \"public_to_private\")\n * @param amount_record The record to fund the amount from\n * @param fee_credits The amount of credits to pay as a fee\n * @param fee_record The record to spend the fee from\n * @param url The url of the Aleo network node to send the transaction to\n * @param transfer_verifying_key (optional) Provide a verifying key to use for the transfer\n * function\n * @param fee_proving_key (optional) Provide a proving key to use for the fee execution\n * @param fee_verifying_key (optional) Provide a verifying key to use for the fee execution\n * @returns {Transaction | Error}\n * @param {PrivateKey} private_key\n * @param {number} amount_credits\n * @param {string} recipient\n * @param {string} transfer_type\n * @param {RecordPlaintext | undefined} amount_record\n * @param {number} fee_credits\n * @param {RecordPlaintext | undefined} [fee_record]\n * @param {string | undefined} [url]\n * @param {ProvingKey | undefined} [transfer_proving_key]\n * @param {VerifyingKey | undefined} [transfer_verifying_key]\n * @param {ProvingKey | undefined} [fee_proving_key]\n * @param {VerifyingKey | undefined} [fee_verifying_key]\n * @param {OfflineQuery | undefined} [offline_query]\n * @returns {Promise}\n */\n static buildTransferTransaction(private_key, amount_credits, recipient, transfer_type, amount_record, fee_credits, fee_record, url, transfer_proving_key, transfer_verifying_key, fee_proving_key, fee_verifying_key, offline_query) {\n _assertClass(private_key, PrivateKey);\n const ptr0 = passStringToWasm0(recipient, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n const ptr1 = passStringToWasm0(transfer_type, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len1 = WASM_VECTOR_LEN;\n let ptr2 = 0;\n if (!isLikeNone(amount_record)) {\n _assertClass(amount_record, RecordPlaintext);\n ptr2 = amount_record.__destroy_into_raw();\n }\n let ptr3 = 0;\n if (!isLikeNone(fee_record)) {\n _assertClass(fee_record, RecordPlaintext);\n ptr3 = fee_record.__destroy_into_raw();\n }\n var ptr4 = isLikeNone(url) ? 0 : passStringToWasm0(url, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n var len4 = WASM_VECTOR_LEN;\n let ptr5 = 0;\n if (!isLikeNone(transfer_proving_key)) {\n _assertClass(transfer_proving_key, ProvingKey);\n ptr5 = transfer_proving_key.__destroy_into_raw();\n }\n let ptr6 = 0;\n if (!isLikeNone(transfer_verifying_key)) {\n _assertClass(transfer_verifying_key, VerifyingKey);\n ptr6 = transfer_verifying_key.__destroy_into_raw();\n }\n let ptr7 = 0;\n if (!isLikeNone(fee_proving_key)) {\n _assertClass(fee_proving_key, ProvingKey);\n ptr7 = fee_proving_key.__destroy_into_raw();\n }\n let ptr8 = 0;\n if (!isLikeNone(fee_verifying_key)) {\n _assertClass(fee_verifying_key, VerifyingKey);\n ptr8 = fee_verifying_key.__destroy_into_raw();\n }\n let ptr9 = 0;\n if (!isLikeNone(offline_query)) {\n _assertClass(offline_query, OfflineQuery);\n ptr9 = offline_query.__destroy_into_raw();\n }\n const ret = wasm.programmanager_buildTransferTransaction(private_key.__wbg_ptr, amount_credits, ptr0, len0, ptr1, len1, ptr2, fee_credits, ptr3, ptr4, len4, ptr5, ptr6, ptr7, ptr8, ptr9);\n return takeObject(ret);\n }\n /**\n * Synthesize proving and verifying keys for a program\n *\n * @param program {string} The program source code of the program to synthesize keys for\n * @param function_id {string} The function to synthesize keys for\n * @param inputs {Array} The inputs to the function\n * @param imports {Object | undefined} The imports for the program\n * @param {PrivateKey} private_key\n * @param {string} program\n * @param {string} function_id\n * @param {Array} inputs\n * @param {object | undefined} [imports]\n * @returns {Promise}\n */\n static synthesizeKeyPair(private_key, program, function_id, inputs, imports) {\n _assertClass(private_key, PrivateKey);\n const ptr0 = passStringToWasm0(program, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n const ptr1 = passStringToWasm0(function_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len1 = WASM_VECTOR_LEN;\n const ret = wasm.programmanager_synthesizeKeyPair(private_key.__wbg_ptr, ptr0, len0, ptr1, len1, addHeapObject(inputs), isLikeNone(imports) ? 0 : addHeapObject(imports));\n return takeObject(ret);\n }\n}\n\nconst ProvingKeyFinalization = (typeof FinalizationRegistry === 'undefined')\n ? { register: () => {}, unregister: () => {} }\n : new FinalizationRegistry(ptr => wasm.__wbg_provingkey_free(ptr >>> 0));\n/**\n* Proving key for a function within an Aleo program\n*/\nclass ProvingKey {\n\n static __wrap(ptr) {\n ptr = ptr >>> 0;\n const obj = Object.create(ProvingKey.prototype);\n obj.__wbg_ptr = ptr;\n ProvingKeyFinalization.register(obj, obj.__wbg_ptr, obj);\n return obj;\n }\n\n __destroy_into_raw() {\n const ptr = this.__wbg_ptr;\n this.__wbg_ptr = 0;\n ProvingKeyFinalization.unregister(this);\n return ptr;\n }\n\n free() {\n const ptr = this.__destroy_into_raw();\n wasm.__wbg_provingkey_free(ptr);\n }\n /**\n * Verify if the proving key is for the bond_public function\n *\n * @example\n * const provingKey = ProvingKey.fromBytes(\"bond_public_proving_key.bin\");\n * provingKey.isBondPublicProver() ? console.log(\"Key verified\") : throw new Error(\"Invalid key\");\n *\n * @returns {boolean} returns true if the proving key is for the bond_public function, false if otherwise\n * @returns {boolean}\n */\n isBondPublicProver() {\n const ret = wasm.provingkey_isBondPublicProver(this.__wbg_ptr);\n return ret !== 0;\n }\n /**\n * Verify if the proving key is for the bond_validator function\n *\n * @example\n * const provingKey = ProvingKey.fromBytes(\"bond_validator_proving_key.bin\");\n * provingKey.isBondPublicProver() ? console.log(\"Key verified\") : throw new Error(\"Invalid key\");\n *\n * @returns {boolean} returns true if the proving key is for the bond_validator function, false if otherwise\n * @returns {boolean}\n */\n isBondValidatorProver() {\n const ret = wasm.provingkey_isBondValidatorProver(this.__wbg_ptr);\n return ret !== 0;\n }\n /**\n * Verify if the proving key is for the claim_unbond function\n *\n * @example\n * const provingKey = ProvingKey.fromBytes(\"claim_unbond_proving_key.bin\");\n * provingKey.isClaimUnbondProver() ? console.log(\"Key verified\") : throw new Error(\"Invalid key\");\n *\n * @returns {boolean} returns true if the proving key is for the claim_unbond function, false if otherwise\n * @returns {boolean}\n */\n isClaimUnbondPublicProver() {\n const ret = wasm.provingkey_isClaimUnbondPublicProver(this.__wbg_ptr);\n return ret !== 0;\n }\n /**\n * Verify if the proving key is for the fee_private function\n *\n * @example\n * const provingKey = ProvingKey.fromBytes(\"fee_private_proving_key.bin\");\n * provingKey.isFeePrivateProver() ? console.log(\"Key verified\") : throw new Error(\"Invalid key\");\n *\n * @returns {boolean} returns true if the proving key is for the fee_private function, false if otherwise\n * @returns {boolean}\n */\n isFeePrivateProver() {\n const ret = wasm.provingkey_isFeePrivateProver(this.__wbg_ptr);\n return ret !== 0;\n }\n /**\n * Verify if the proving key is for the fee_public function\n *\n * @example\n * const provingKey = ProvingKey.fromBytes(\"fee_public_proving_key.bin\");\n * provingKey.isFeePublicProver() ? console.log(\"Key verified\") : throw new Error(\"Invalid key\");\n *\n * @returns {boolean} returns true if the proving key is for the fee_public function, false if otherwise\n * @returns {boolean}\n */\n isFeePublicProver() {\n const ret = wasm.provingkey_isFeePublicProver(this.__wbg_ptr);\n return ret !== 0;\n }\n /**\n * Verify if the proving key is for the inclusion function\n *\n * @example\n * const provingKey = ProvingKey.fromBytes(\"inclusion_proving_key.bin\");\n * provingKey.isInclusionProver() ? console.log(\"Key verified\") : throw new Error(\"Invalid key\");\n *\n * @returns {boolean} returns true if the proving key is for the inclusion function, false if otherwise\n * @returns {boolean}\n */\n isInclusionProver() {\n const ret = wasm.provingkey_isInclusionProver(this.__wbg_ptr);\n return ret !== 0;\n }\n /**\n * Verify if the proving key is for the join function\n *\n * @example\n * const provingKey = ProvingKey.fromBytes(\"join_proving_key.bin\");\n * provingKey.isJoinProver() ? console.log(\"Key verified\") : throw new Error(\"Invalid key\");\n *\n * @returns {boolean} returns true if the proving key is for the join function, false if otherwise\n * @returns {boolean}\n */\n isJoinProver() {\n const ret = wasm.provingkey_isJoinProver(this.__wbg_ptr);\n return ret !== 0;\n }\n /**\n * Verify if the proving key is for the set_validator_state function\n *\n * @example\n * const provingKey = ProvingKey.fromBytes(\"set_validator_set_proving_key.bin\");\n * provingKey.isSetValidatorStateProver() ? console.log(\"Key verified\") : throw new Error(\"Invalid key\");\n *\n * @returns {boolean} returns true if the proving key is for the set_validator_state function, false if otherwise\n * @returns {boolean}\n */\n isSetValidatorStateProver() {\n const ret = wasm.provingkey_isSetValidatorStateProver(this.__wbg_ptr);\n return ret !== 0;\n }\n /**\n * Verify if the proving key is for the split function\n *\n * @example\n * const provingKey = ProvingKey.fromBytes(\"split_proving_key.bin\");\n * provingKey.isSplitProver() ? console.log(\"Key verified\") : throw new Error(\"Invalid key\");\n *\n * @returns {boolean} returns true if the proving key is for the split function, false if otherwise\n * @returns {boolean}\n */\n isSplitProver() {\n const ret = wasm.provingkey_isSplitProver(this.__wbg_ptr);\n return ret !== 0;\n }\n /**\n * Verify if the proving key is for the transfer_private function\n *\n * @example\n * const provingKey = ProvingKey.fromBytes(\"transfer_private_proving_key.bin\");\n * provingKey.isTransferPrivateProver() ? console.log(\"Key verified\") : throw new Error(\"Invalid key\");\n *\n * @returns {boolean} returns true if the proving key is for the transfer_private function, false if otherwise\n * @returns {boolean}\n */\n isTransferPrivateProver() {\n const ret = wasm.provingkey_isTransferPrivateProver(this.__wbg_ptr);\n return ret !== 0;\n }\n /**\n * Verify if the proving key is for the transfer_private_to_public function\n *\n * @example\n * const provingKey = ProvingKey.fromBytes(\"transfer_private_to_public_proving_key.bin\");\n * provingKey.isTransferPrivateToPublicProver() ? console.log(\"Key verified\") : throw new Error(\"Invalid key\");\n *\n * @returns {boolean} returns true if the proving key is for the transfer_private_to_public function, false if otherwise\n * @returns {boolean}\n */\n isTransferPrivateToPublicProver() {\n const ret = wasm.provingkey_isTransferPrivateToPublicProver(this.__wbg_ptr);\n return ret !== 0;\n }\n /**\n * Verify if the proving key is for the transfer_public function\n *\n * @example\n * const provingKey = ProvingKey.fromBytes(\"transfer_public_proving_key.bin\");\n * provingKey.isTransferPublicProver() ? console.log(\"Key verified\") : throw new Error(\"Invalid key\");\n *\n * @returns {boolean} returns true if the proving key is for the transfer_public function, false if otherwise\n * @returns {boolean}\n */\n isTransferPublicProver() {\n const ret = wasm.provingkey_isTransferPublicProver(this.__wbg_ptr);\n return ret !== 0;\n }\n /**\n * Verify if the proving key is for the transfer_public_as_signer function\n *\n * @example\n * const provingKey = ProvingKey.fromBytes(\"transfer_public_as_signer_proving_key.bin\");\n * provingKey.isTransferPublicAsSignerProver() ? console.log(\"Key verified\") : throw new Error(\"Invalid key\");\n *\n * @returns {boolean} returns true if the proving key is for the transfer_public function, false if otherwise\n * @returns {boolean}\n */\n isTransferPublicAsSignerProver() {\n const ret = wasm.provingkey_isTransferPublicAsSignerProver(this.__wbg_ptr);\n return ret !== 0;\n }\n /**\n * Verify if the proving key is for the transfer_public_to_private function\n *\n * @example\n * const provingKey = ProvingKey.fromBytes(\"transfer_public_to_private_proving_key.bin\");\n * provingKey.isTransferPublicToPrivateProver() ? console.log(\"Key verified\") : throw new Error(\"Invalid key\");\n *\n * @returns {boolean} returns true if the proving key is for the transfer_public_to_private function, false if otherwise\n * @returns {boolean}\n */\n isTransferPublicToPrivateProver() {\n const ret = wasm.provingkey_isTransferPublicToPrivateProver(this.__wbg_ptr);\n return ret !== 0;\n }\n /**\n * Verify if the proving key is for the unbond_public function\n *\n * @example\n * const provingKey = ProvingKey.fromBytes(\"unbond_public.bin\");\n * provingKey.isUnbondPublicProver() ? console.log(\"Key verified\") : throw new Error(\"Invalid key\");\n *\n * @returns {boolean} returns true if the proving key is for the unbond_public_prover function, false if otherwise\n * @returns {boolean}\n */\n isUnbondPublicProver() {\n const ret = wasm.provingkey_isUnbondPublicProver(this.__wbg_ptr);\n return ret !== 0;\n }\n /**\n * Return the checksum of the proving key\n *\n * @returns {string} Checksum of the proving key\n * @returns {string}\n */\n checksum() {\n let deferred1_0;\n let deferred1_1;\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n wasm.provingkey_checksum(retptr, this.__wbg_ptr);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n deferred1_0 = r0;\n deferred1_1 = r1;\n return getStringFromWasm0(r0, r1);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);\n }\n }\n /**\n * Create a copy of the proving key\n *\n * @returns {ProvingKey} A copy of the proving key\n * @returns {ProvingKey}\n */\n copy() {\n const ret = wasm.provingkey_copy(this.__wbg_ptr);\n return ProvingKey.__wrap(ret);\n }\n /**\n * Construct a new proving key from a byte array\n *\n * @param {Uint8Array} bytes Byte array representation of a proving key\n * @returns {ProvingKey | Error}\n * @param {Uint8Array} bytes\n * @returns {ProvingKey}\n */\n static fromBytes(bytes) {\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n const ptr0 = passArray8ToWasm0(bytes, wasm.__wbindgen_malloc);\n const len0 = WASM_VECTOR_LEN;\n wasm.provingkey_fromBytes(retptr, ptr0, len0);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n var r2 = getInt32Memory0()[retptr / 4 + 2];\n if (r2) {\n throw takeObject(r1);\n }\n return ProvingKey.__wrap(r0);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n }\n }\n /**\n * Create a proving key from string\n *\n * @param {string | Error} String representation of the proving key\n * @param {string} string\n * @returns {ProvingKey}\n */\n static fromString(string) {\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n const ptr0 = passStringToWasm0(string, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n wasm.provingkey_fromString(retptr, ptr0, len0);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n var r2 = getInt32Memory0()[retptr / 4 + 2];\n if (r2) {\n throw takeObject(r1);\n }\n return ProvingKey.__wrap(r0);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n }\n }\n /**\n * Return the byte representation of a proving key\n *\n * @returns {Uint8Array | Error} Byte array representation of a proving key\n * @returns {Uint8Array}\n */\n toBytes() {\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n wasm.provingkey_toBytes(retptr, this.__wbg_ptr);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n var r2 = getInt32Memory0()[retptr / 4 + 2];\n var r3 = getInt32Memory0()[retptr / 4 + 3];\n if (r3) {\n throw takeObject(r2);\n }\n var v1 = getArrayU8FromWasm0(r0, r1).slice();\n wasm.__wbindgen_free(r0, r1 * 1, 1);\n return v1;\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n }\n }\n /**\n * Get a string representation of the proving key\n *\n * @returns {string} String representation of the proving key\n * @returns {string}\n */\n toString() {\n let deferred1_0;\n let deferred1_1;\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n wasm.provingkey_toString(retptr, this.__wbg_ptr);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n deferred1_0 = r0;\n deferred1_1 = r1;\n return getStringFromWasm0(r0, r1);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);\n }\n }\n}\n\nconst RecordCiphertextFinalization = (typeof FinalizationRegistry === 'undefined')\n ? { register: () => {}, unregister: () => {} }\n : new FinalizationRegistry(ptr => wasm.__wbg_recordciphertext_free(ptr >>> 0));\n/**\n* Encrypted Aleo record\n*/\nclass RecordCiphertext {\n\n static __wrap(ptr) {\n ptr = ptr >>> 0;\n const obj = Object.create(RecordCiphertext.prototype);\n obj.__wbg_ptr = ptr;\n RecordCiphertextFinalization.register(obj, obj.__wbg_ptr, obj);\n return obj;\n }\n\n __destroy_into_raw() {\n const ptr = this.__wbg_ptr;\n this.__wbg_ptr = 0;\n RecordCiphertextFinalization.unregister(this);\n return ptr;\n }\n\n free() {\n const ptr = this.__destroy_into_raw();\n wasm.__wbg_recordciphertext_free(ptr);\n }\n /**\n * Create a record ciphertext from a string\n *\n * @param {string} record String representation of a record ciphertext\n * @returns {RecordCiphertext | Error} Record ciphertext\n * @param {string} record\n * @returns {RecordCiphertext}\n */\n static fromString(record) {\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n const ptr0 = passStringToWasm0(record, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n wasm.recordciphertext_fromString(retptr, ptr0, len0);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n var r2 = getInt32Memory0()[retptr / 4 + 2];\n if (r2) {\n throw takeObject(r1);\n }\n return RecordCiphertext.__wrap(r0);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n }\n }\n /**\n * Return the string reprensentation of the record ciphertext\n *\n * @returns {string} String representation of the record ciphertext\n * @returns {string}\n */\n toString() {\n let deferred1_0;\n let deferred1_1;\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n wasm.recordciphertext_toString(retptr, this.__wbg_ptr);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n deferred1_0 = r0;\n deferred1_1 = r1;\n return getStringFromWasm0(r0, r1);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);\n }\n }\n /**\n * Decrypt the record ciphertext into plaintext using the view key. The record will only\n * decrypt if the record was encrypted by the account corresponding to the view key\n *\n * @param {ViewKey} view_key View key used to decrypt the ciphertext\n * @returns {RecordPlaintext | Error} Record plaintext object\n * @param {ViewKey} view_key\n * @returns {RecordPlaintext}\n */\n decrypt(view_key) {\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n _assertClass(view_key, ViewKey);\n wasm.recordciphertext_decrypt(retptr, this.__wbg_ptr, view_key.__wbg_ptr);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n var r2 = getInt32Memory0()[retptr / 4 + 2];\n if (r2) {\n throw takeObject(r1);\n }\n return RecordPlaintext.__wrap(r0);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n }\n }\n /**\n * Determines if the account corresponding to the view key is the owner of the record\n *\n * @param {ViewKey} view_key View key used to decrypt the ciphertext\n * @returns {boolean}\n * @param {ViewKey} view_key\n * @returns {boolean}\n */\n isOwner(view_key) {\n _assertClass(view_key, ViewKey);\n const ret = wasm.recordciphertext_isOwner(this.__wbg_ptr, view_key.__wbg_ptr);\n return ret !== 0;\n }\n}\n\nconst RecordPlaintextFinalization = (typeof FinalizationRegistry === 'undefined')\n ? { register: () => {}, unregister: () => {} }\n : new FinalizationRegistry(ptr => wasm.__wbg_recordplaintext_free(ptr >>> 0));\n/**\n* Plaintext representation of an Aleo record\n*/\nclass RecordPlaintext {\n\n static __wrap(ptr) {\n ptr = ptr >>> 0;\n const obj = Object.create(RecordPlaintext.prototype);\n obj.__wbg_ptr = ptr;\n RecordPlaintextFinalization.register(obj, obj.__wbg_ptr, obj);\n return obj;\n }\n\n __destroy_into_raw() {\n const ptr = this.__wbg_ptr;\n this.__wbg_ptr = 0;\n RecordPlaintextFinalization.unregister(this);\n return ptr;\n }\n\n free() {\n const ptr = this.__destroy_into_raw();\n wasm.__wbg_recordplaintext_free(ptr);\n }\n /**\n * @param {string} program_id\n * @param {string} record_name\n * @returns {Field}\n */\n commitment(program_id, record_name) {\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n const ptr0 = passStringToWasm0(program_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n const ptr1 = passStringToWasm0(record_name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len1 = WASM_VECTOR_LEN;\n wasm.recordplaintext_commitment(retptr, this.__wbg_ptr, ptr0, len0, ptr1, len1);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n var r2 = getInt32Memory0()[retptr / 4 + 2];\n if (r2) {\n throw takeObject(r1);\n }\n return Field.__wrap(r0);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n }\n }\n /**\n * Return a record plaintext from a string.\n *\n * @param {string} record String representation of a plaintext representation of an Aleo record\n * @returns {RecordPlaintext | Error} Record plaintext\n * @param {string} record\n * @returns {RecordPlaintext}\n */\n static fromString(record) {\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n const ptr0 = passStringToWasm0(record, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n wasm.recordplaintext_fromString(retptr, ptr0, len0);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n var r2 = getInt32Memory0()[retptr / 4 + 2];\n if (r2) {\n throw takeObject(r1);\n }\n return RecordPlaintext.__wrap(r0);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n }\n }\n /**\n * Returns the record plaintext string\n *\n * @returns {string} String representation of the record plaintext\n * @returns {string}\n */\n toString() {\n let deferred1_0;\n let deferred1_1;\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n wasm.recordplaintext_toString(retptr, this.__wbg_ptr);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n deferred1_0 = r0;\n deferred1_1 = r1;\n return getStringFromWasm0(r0, r1);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);\n }\n }\n /**\n * Returns the amount of microcredits in the record\n *\n * @returns {u64} Amount of microcredits in the record\n * @returns {bigint}\n */\n microcredits() {\n const ret = wasm.recordplaintext_microcredits(this.__wbg_ptr);\n return BigInt.asUintN(64, ret);\n }\n /**\n * Returns the nonce of the record. This can be used to uniquely identify a record.\n *\n * @returns {string} Nonce of the record\n * @returns {string}\n */\n nonce() {\n let deferred1_0;\n let deferred1_1;\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n wasm.recordplaintext_nonce(retptr, this.__wbg_ptr);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n deferred1_0 = r0;\n deferred1_1 = r1;\n return getStringFromWasm0(r0, r1);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);\n }\n }\n /**\n * Attempt to get the serial number of a record to determine whether or not is has been spent\n *\n * @param {PrivateKey} private_key Private key of the account that owns the record\n * @param {string} program_id Program ID of the program that the record is associated with\n * @param {string} record_name Name of the record\n * @returns {string | Error} Serial number of the record\n * @param {PrivateKey} private_key\n * @param {string} program_id\n * @param {string} record_name\n * @returns {string}\n */\n serialNumberString(private_key, program_id, record_name) {\n let deferred4_0;\n let deferred4_1;\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n _assertClass(private_key, PrivateKey);\n const ptr0 = passStringToWasm0(program_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n const ptr1 = passStringToWasm0(record_name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len1 = WASM_VECTOR_LEN;\n wasm.recordplaintext_serialNumberString(retptr, this.__wbg_ptr, private_key.__wbg_ptr, ptr0, len0, ptr1, len1);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n var r2 = getInt32Memory0()[retptr / 4 + 2];\n var r3 = getInt32Memory0()[retptr / 4 + 3];\n var ptr3 = r0;\n var len3 = r1;\n if (r3) {\n ptr3 = 0; len3 = 0;\n throw takeObject(r2);\n }\n deferred4_0 = ptr3;\n deferred4_1 = len3;\n return getStringFromWasm0(ptr3, len3);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n wasm.__wbindgen_free(deferred4_0, deferred4_1, 1);\n }\n }\n}\n\nconst SignatureFinalization = (typeof FinalizationRegistry === 'undefined')\n ? { register: () => {}, unregister: () => {} }\n : new FinalizationRegistry(ptr => wasm.__wbg_signature_free(ptr >>> 0));\n/**\n* Cryptographic signature of a message signed by an Aleo account\n*/\nclass Signature {\n\n static __wrap(ptr) {\n ptr = ptr >>> 0;\n const obj = Object.create(Signature.prototype);\n obj.__wbg_ptr = ptr;\n SignatureFinalization.register(obj, obj.__wbg_ptr, obj);\n return obj;\n }\n\n __destroy_into_raw() {\n const ptr = this.__wbg_ptr;\n this.__wbg_ptr = 0;\n SignatureFinalization.unregister(this);\n return ptr;\n }\n\n free() {\n const ptr = this.__destroy_into_raw();\n wasm.__wbg_signature_free(ptr);\n }\n /**\n * Sign a message with a private key\n *\n * @param {PrivateKey} private_key The private key to sign the message with\n * @param {Uint8Array} message Byte representation of the message to sign\n * @returns {Signature} Signature of the message\n * @param {PrivateKey} private_key\n * @param {Uint8Array} message\n * @returns {Signature}\n */\n static sign(private_key, message) {\n _assertClass(private_key, PrivateKey);\n const ptr0 = passArray8ToWasm0(message, wasm.__wbindgen_malloc);\n const len0 = WASM_VECTOR_LEN;\n const ret = wasm.privatekey_sign(private_key.__wbg_ptr, ptr0, len0);\n return Signature.__wrap(ret);\n }\n /**\n * Verify a signature of a message with an address\n *\n * @param {Address} address The address to verify the signature with\n * @param {Uint8Array} message Byte representation of the message to verify\n * @returns {boolean} True if the signature is valid, false otherwise\n * @param {Address} address\n * @param {Uint8Array} message\n * @returns {boolean}\n */\n verify(address, message) {\n _assertClass(address, Address);\n const ptr0 = passArray8ToWasm0(message, wasm.__wbindgen_malloc);\n const len0 = WASM_VECTOR_LEN;\n const ret = wasm.signature_verify(this.__wbg_ptr, address.__wbg_ptr, ptr0, len0);\n return ret !== 0;\n }\n /**\n * Get a signature from a string representation of a signature\n *\n * @param {string} signature String representation of a signature\n * @returns {Signature} Signature\n * @param {string} signature\n * @returns {Signature}\n */\n static from_string(signature) {\n const ptr0 = passStringToWasm0(signature, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n const ret = wasm.signature_from_string(ptr0, len0);\n return Signature.__wrap(ret);\n }\n /**\n * Get a string representation of a signature\n *\n * @returns {string} String representation of a signature\n * @returns {string}\n */\n to_string() {\n let deferred1_0;\n let deferred1_1;\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n wasm.signature_to_string(retptr, this.__wbg_ptr);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n deferred1_0 = r0;\n deferred1_1 = r1;\n return getStringFromWasm0(r0, r1);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);\n }\n }\n}\n\nconst TransactionFinalization = (typeof FinalizationRegistry === 'undefined')\n ? { register: () => {}, unregister: () => {} }\n : new FinalizationRegistry(ptr => wasm.__wbg_transaction_free(ptr >>> 0));\n/**\n* Webassembly Representation of an Aleo transaction\n*\n* This object is created when generating an on-chain function deployment or execution and is the\n* object that should be submitted to the Aleo Network in order to deploy or execute a function.\n*/\nclass Transaction {\n\n static __wrap(ptr) {\n ptr = ptr >>> 0;\n const obj = Object.create(Transaction.prototype);\n obj.__wbg_ptr = ptr;\n TransactionFinalization.register(obj, obj.__wbg_ptr, obj);\n return obj;\n }\n\n __destroy_into_raw() {\n const ptr = this.__wbg_ptr;\n this.__wbg_ptr = 0;\n TransactionFinalization.unregister(this);\n return ptr;\n }\n\n free() {\n const ptr = this.__destroy_into_raw();\n wasm.__wbg_transaction_free(ptr);\n }\n /**\n * Create a transaction from a string\n *\n * @param {string} transaction String representation of a transaction\n * @returns {Transaction | Error}\n * @param {string} transaction\n * @returns {Transaction}\n */\n static fromString(transaction) {\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n const ptr0 = passStringToWasm0(transaction, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n wasm.transaction_fromString(retptr, ptr0, len0);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n var r2 = getInt32Memory0()[retptr / 4 + 2];\n if (r2) {\n throw takeObject(r1);\n }\n return Transaction.__wrap(r0);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n }\n }\n /**\n * Get the transaction as a string. If you want to submit this transaction to the Aleo Network\n * this function will create the string that should be submitted in the `POST` data.\n *\n * @returns {string} String representation of the transaction\n * @returns {string}\n */\n toString() {\n let deferred1_0;\n let deferred1_1;\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n wasm.transaction_toString(retptr, this.__wbg_ptr);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n deferred1_0 = r0;\n deferred1_1 = r1;\n return getStringFromWasm0(r0, r1);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);\n }\n }\n /**\n * Get the id of the transaction. This is the merkle root of the transaction's inclusion proof.\n *\n * This value can be used to query the status of the transaction on the Aleo Network to see\n * if it was successful. If successful, the transaction will be included in a block and this\n * value can be used to lookup the transaction data on-chain.\n *\n * @returns {string} Transaction id\n * @returns {string}\n */\n transactionId() {\n let deferred1_0;\n let deferred1_1;\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n wasm.transaction_transactionId(retptr, this.__wbg_ptr);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n deferred1_0 = r0;\n deferred1_1 = r1;\n return getStringFromWasm0(r0, r1);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);\n }\n }\n /**\n * Get the type of the transaction (will return \"deploy\" or \"execute\")\n *\n * @returns {string} Transaction type\n * @returns {string}\n */\n transactionType() {\n let deferred1_0;\n let deferred1_1;\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n wasm.transaction_transactionType(retptr, this.__wbg_ptr);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n deferred1_0 = r0;\n deferred1_1 = r1;\n return getStringFromWasm0(r0, r1);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);\n }\n }\n}\n\nconst VerifyingKeyFinalization = (typeof FinalizationRegistry === 'undefined')\n ? { register: () => {}, unregister: () => {} }\n : new FinalizationRegistry(ptr => wasm.__wbg_verifyingkey_free(ptr >>> 0));\n/**\n* Verifying key for a function within an Aleo program\n*/\nclass VerifyingKey {\n\n static __wrap(ptr) {\n ptr = ptr >>> 0;\n const obj = Object.create(VerifyingKey.prototype);\n obj.__wbg_ptr = ptr;\n VerifyingKeyFinalization.register(obj, obj.__wbg_ptr, obj);\n return obj;\n }\n\n __destroy_into_raw() {\n const ptr = this.__wbg_ptr;\n this.__wbg_ptr = 0;\n VerifyingKeyFinalization.unregister(this);\n return ptr;\n }\n\n free() {\n const ptr = this.__destroy_into_raw();\n wasm.__wbg_verifyingkey_free(ptr);\n }\n /**\n * Returns the verifying key for the bond_public function\n *\n * @returns {VerifyingKey} Verifying key for the bond_public function\n * @returns {VerifyingKey}\n */\n static bondPublicVerifier() {\n const ret = wasm.verifyingkey_bondPublicVerifier();\n return VerifyingKey.__wrap(ret);\n }\n /**\n * Returns the verifying key for the bond_validator function\n *\n * @returns {VerifyingKey} Verifying key for the bond_validator function\n * @returns {VerifyingKey}\n */\n static bondValidatorVerifier() {\n const ret = wasm.verifyingkey_bondValidatorVerifier();\n return VerifyingKey.__wrap(ret);\n }\n /**\n * Returns the verifying key for the claim_delegator function\n *\n * @returns {VerifyingKey} Verifying key for the claim_unbond_public function\n * @returns {VerifyingKey}\n */\n static claimUnbondPublicVerifier() {\n const ret = wasm.verifyingkey_claimUnbondPublicVerifier();\n return VerifyingKey.__wrap(ret);\n }\n /**\n * Returns the verifying key for the fee_private function\n *\n * @returns {VerifyingKey} Verifying key for the fee_private function\n * @returns {VerifyingKey}\n */\n static feePrivateVerifier() {\n const ret = wasm.verifyingkey_feePrivateVerifier();\n return VerifyingKey.__wrap(ret);\n }\n /**\n * Returns the verifying key for the fee_public function\n *\n * @returns {VerifyingKey} Verifying key for the fee_public function\n * @returns {VerifyingKey}\n */\n static feePublicVerifier() {\n const ret = wasm.verifyingkey_feePublicVerifier();\n return VerifyingKey.__wrap(ret);\n }\n /**\n * Returns the verifying key for the inclusion function\n *\n * @returns {VerifyingKey} Verifying key for the inclusion function\n * @returns {VerifyingKey}\n */\n static inclusionVerifier() {\n const ret = wasm.verifyingkey_inclusionVerifier();\n return VerifyingKey.__wrap(ret);\n }\n /**\n * Returns the verifying key for the join function\n *\n * @returns {VerifyingKey} Verifying key for the join function\n * @returns {VerifyingKey}\n */\n static joinVerifier() {\n const ret = wasm.verifyingkey_joinVerifier();\n return VerifyingKey.__wrap(ret);\n }\n /**\n * Returns the verifying key for the set_validator_state function\n *\n * @returns {VerifyingKey} Verifying key for the set_validator_state function\n * @returns {VerifyingKey}\n */\n static setValidatorStateVerifier() {\n const ret = wasm.verifyingkey_setValidatorStateVerifier();\n return VerifyingKey.__wrap(ret);\n }\n /**\n * Returns the verifying key for the split function\n *\n * @returns {VerifyingKey} Verifying key for the split function\n * @returns {VerifyingKey}\n */\n static splitVerifier() {\n const ret = wasm.verifyingkey_splitVerifier();\n return VerifyingKey.__wrap(ret);\n }\n /**\n * Returns the verifying key for the transfer_private function\n *\n * @returns {VerifyingKey} Verifying key for the transfer_private function\n * @returns {VerifyingKey}\n */\n static transferPrivateVerifier() {\n const ret = wasm.verifyingkey_transferPrivateVerifier();\n return VerifyingKey.__wrap(ret);\n }\n /**\n * Returns the verifying key for the transfer_private_to_public function\n *\n * @returns {VerifyingKey} Verifying key for the transfer_private_to_public function\n * @returns {VerifyingKey}\n */\n static transferPrivateToPublicVerifier() {\n const ret = wasm.verifyingkey_transferPrivateToPublicVerifier();\n return VerifyingKey.__wrap(ret);\n }\n /**\n * Returns the verifying key for the transfer_public function\n *\n * @returns {VerifyingKey} Verifying key for the transfer_public function\n * @returns {VerifyingKey}\n */\n static transferPublicVerifier() {\n const ret = wasm.verifyingkey_transferPublicVerifier();\n return VerifyingKey.__wrap(ret);\n }\n /**\n * Returns the verifying key for the transfer_public_as_signer function\n *\n * @returns {VerifyingKey} Verifying key for the transfer_public_as_signer function\n * @returns {VerifyingKey}\n */\n static transferPublicAsSignerVerifier() {\n const ret = wasm.verifyingkey_transferPublicAsSignerVerifier();\n return VerifyingKey.__wrap(ret);\n }\n /**\n * Returns the verifying key for the transfer_public_to_private function\n *\n * @returns {VerifyingKey} Verifying key for the transfer_public_to_private function\n * @returns {VerifyingKey}\n */\n static transferPublicToPrivateVerifier() {\n const ret = wasm.verifyingkey_transferPublicToPrivateVerifier();\n return VerifyingKey.__wrap(ret);\n }\n /**\n * Returns the verifying key for the unbond_public function\n *\n * @returns {VerifyingKey} Verifying key for the unbond_public function\n * @returns {VerifyingKey}\n */\n static unbondPublicVerifier() {\n const ret = wasm.verifyingkey_unbondPublicVerifier();\n return VerifyingKey.__wrap(ret);\n }\n /**\n * Returns the verifying key for the bond_public function\n *\n * @returns {VerifyingKey} Verifying key for the bond_public function\n * @returns {boolean}\n */\n isBondPublicVerifier() {\n const ret = wasm.verifyingkey_isBondPublicVerifier(this.__wbg_ptr);\n return ret !== 0;\n }\n /**\n * Returns the verifying key for the bond_validator function\n *\n * @returns {VerifyingKey} Verifying key for the bond_validator function\n * @returns {boolean}\n */\n isBondValidatorVerifier() {\n const ret = wasm.verifyingkey_isBondValidatorVerifier(this.__wbg_ptr);\n return ret !== 0;\n }\n /**\n * Verifies the verifying key is for the claim_delegator function\n *\n * @returns {bool}\n * @returns {boolean}\n */\n isClaimUnbondPublicVerifier() {\n const ret = wasm.verifyingkey_isClaimUnbondPublicVerifier(this.__wbg_ptr);\n return ret !== 0;\n }\n /**\n * Verifies the verifying key is for the fee_private function\n *\n * @returns {bool}\n * @returns {boolean}\n */\n isFeePrivateVerifier() {\n const ret = wasm.verifyingkey_isFeePrivateVerifier(this.__wbg_ptr);\n return ret !== 0;\n }\n /**\n * Verifies the verifying key is for the fee_public function\n *\n * @returns {bool}\n * @returns {boolean}\n */\n isFeePublicVerifier() {\n const ret = wasm.verifyingkey_isFeePublicVerifier(this.__wbg_ptr);\n return ret !== 0;\n }\n /**\n * Verifies the verifying key is for the inclusion function\n *\n * @returns {bool}\n * @returns {boolean}\n */\n isInclusionVerifier() {\n const ret = wasm.verifyingkey_isInclusionVerifier(this.__wbg_ptr);\n return ret !== 0;\n }\n /**\n * Verifies the verifying key is for the join function\n *\n * @returns {bool}\n * @returns {boolean}\n */\n isJoinVerifier() {\n const ret = wasm.verifyingkey_isJoinVerifier(this.__wbg_ptr);\n return ret !== 0;\n }\n /**\n * Verifies the verifying key is for the set_validator_state function\n *\n * @returns {bool}\n * @returns {boolean}\n */\n isSetValidatorStateVerifier() {\n const ret = wasm.verifyingkey_isSetValidatorStateVerifier(this.__wbg_ptr);\n return ret !== 0;\n }\n /**\n * Verifies the verifying key is for the split function\n *\n * @returns {bool}\n * @returns {boolean}\n */\n isSplitVerifier() {\n const ret = wasm.verifyingkey_isSplitVerifier(this.__wbg_ptr);\n return ret !== 0;\n }\n /**\n * Verifies the verifying key is for the transfer_private function\n *\n * @returns {bool}\n * @returns {boolean}\n */\n isTransferPrivateVerifier() {\n const ret = wasm.verifyingkey_isTransferPrivateVerifier(this.__wbg_ptr);\n return ret !== 0;\n }\n /**\n * Verifies the verifying key is for the transfer_private_to_public function\n *\n * @returns {bool}\n * @returns {boolean}\n */\n isTransferPrivateToPublicVerifier() {\n const ret = wasm.verifyingkey_isTransferPrivateToPublicVerifier(this.__wbg_ptr);\n return ret !== 0;\n }\n /**\n * Verifies the verifying key is for the transfer_public function\n *\n * @returns {bool}\n * @returns {boolean}\n */\n isTransferPublicVerifier() {\n const ret = wasm.verifyingkey_isTransferPublicVerifier(this.__wbg_ptr);\n return ret !== 0;\n }\n /**\n * Verifies the verifying key is for the transfer_public_as_signer function\n *\n * @returns {bool}\n * @returns {boolean}\n */\n isTransferPublicAsSignerVerifier() {\n const ret = wasm.verifyingkey_isTransferPublicAsSignerVerifier(this.__wbg_ptr);\n return ret !== 0;\n }\n /**\n * Verifies the verifying key is for the transfer_public_to_private function\n *\n * @returns {bool}\n * @returns {boolean}\n */\n isTransferPublicToPrivateVerifier() {\n const ret = wasm.verifyingkey_isTransferPublicToPrivateVerifier(this.__wbg_ptr);\n return ret !== 0;\n }\n /**\n * Verifies the verifying key is for the unbond_public function\n *\n * @returns {bool}\n * @returns {boolean}\n */\n isUnbondPublicVerifier() {\n const ret = wasm.verifyingkey_isUnbondPublicVerifier(this.__wbg_ptr);\n return ret !== 0;\n }\n /**\n * Get the checksum of the verifying key\n *\n * @returns {string} Checksum of the verifying key\n * @returns {string}\n */\n checksum() {\n let deferred1_0;\n let deferred1_1;\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n wasm.verifyingkey_checksum(retptr, this.__wbg_ptr);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n deferred1_0 = r0;\n deferred1_1 = r1;\n return getStringFromWasm0(r0, r1);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);\n }\n }\n /**\n * Create a copy of the verifying key\n *\n * @returns {VerifyingKey} A copy of the verifying key\n * @returns {VerifyingKey}\n */\n copy() {\n const ret = wasm.verifyingkey_copy(this.__wbg_ptr);\n return VerifyingKey.__wrap(ret);\n }\n /**\n * Construct a new verifying key from a byte array\n *\n * @param {Uint8Array} bytes Byte representation of a verifying key\n * @returns {VerifyingKey | Error}\n * @param {Uint8Array} bytes\n * @returns {VerifyingKey}\n */\n static fromBytes(bytes) {\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n const ptr0 = passArray8ToWasm0(bytes, wasm.__wbindgen_malloc);\n const len0 = WASM_VECTOR_LEN;\n wasm.verifyingkey_fromBytes(retptr, ptr0, len0);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n var r2 = getInt32Memory0()[retptr / 4 + 2];\n if (r2) {\n throw takeObject(r1);\n }\n return VerifyingKey.__wrap(r0);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n }\n }\n /**\n * Create a verifying key from string\n *\n * @param {String} string String representation of a verifying key\n * @returns {VerifyingKey | Error}\n * @param {string} string\n * @returns {VerifyingKey}\n */\n static fromString(string) {\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n const ptr0 = passStringToWasm0(string, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n wasm.verifyingkey_fromString(retptr, ptr0, len0);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n var r2 = getInt32Memory0()[retptr / 4 + 2];\n if (r2) {\n throw takeObject(r1);\n }\n return VerifyingKey.__wrap(r0);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n }\n }\n /**\n * Create a byte array from a verifying key\n *\n * @returns {Uint8Array | Error} Byte representation of a verifying key\n * @returns {Uint8Array}\n */\n toBytes() {\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n wasm.verifyingkey_toBytes(retptr, this.__wbg_ptr);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n var r2 = getInt32Memory0()[retptr / 4 + 2];\n var r3 = getInt32Memory0()[retptr / 4 + 3];\n if (r3) {\n throw takeObject(r2);\n }\n var v1 = getArrayU8FromWasm0(r0, r1).slice();\n wasm.__wbindgen_free(r0, r1 * 1, 1);\n return v1;\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n }\n }\n /**\n * Get a string representation of the verifying key\n *\n * @returns {String} String representation of the verifying key\n * @returns {string}\n */\n toString() {\n let deferred1_0;\n let deferred1_1;\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n wasm.verifyingkey_toString(retptr, this.__wbg_ptr);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n deferred1_0 = r0;\n deferred1_1 = r1;\n return getStringFromWasm0(r0, r1);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);\n }\n }\n}\n\nconst ViewKeyFinalization = (typeof FinalizationRegistry === 'undefined')\n ? { register: () => {}, unregister: () => {} }\n : new FinalizationRegistry(ptr => wasm.__wbg_viewkey_free(ptr >>> 0));\n/**\n*/\nclass ViewKey {\n\n static __wrap(ptr) {\n ptr = ptr >>> 0;\n const obj = Object.create(ViewKey.prototype);\n obj.__wbg_ptr = ptr;\n ViewKeyFinalization.register(obj, obj.__wbg_ptr, obj);\n return obj;\n }\n\n __destroy_into_raw() {\n const ptr = this.__wbg_ptr;\n this.__wbg_ptr = 0;\n ViewKeyFinalization.unregister(this);\n return ptr;\n }\n\n free() {\n const ptr = this.__destroy_into_raw();\n wasm.__wbg_viewkey_free(ptr);\n }\n /**\n * Create a new view key from a private key\n *\n * @param {PrivateKey} private_key Private key\n * @returns {ViewKey} View key\n * @param {PrivateKey} private_key\n * @returns {ViewKey}\n */\n static from_private_key(private_key) {\n _assertClass(private_key, PrivateKey);\n const ret = wasm.privatekey_to_view_key(private_key.__wbg_ptr);\n return ViewKey.__wrap(ret);\n }\n /**\n * Create a new view key from a string representation of a view key\n *\n * @param {string} view_key String representation of a view key\n * @returns {ViewKey} View key\n * @param {string} view_key\n * @returns {ViewKey}\n */\n static from_string(view_key) {\n const ptr0 = passStringToWasm0(view_key, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n const ret = wasm.viewkey_from_string(ptr0, len0);\n return ViewKey.__wrap(ret);\n }\n /**\n * Get a string representation of a view key\n *\n * @returns {string} String representation of a view key\n * @returns {string}\n */\n to_string() {\n let deferred1_0;\n let deferred1_1;\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n wasm.viewkey_to_string(retptr, this.__wbg_ptr);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n deferred1_0 = r0;\n deferred1_1 = r1;\n return getStringFromWasm0(r0, r1);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);\n }\n }\n /**\n * Get the address corresponding to a view key\n *\n * @returns {Address} Address\n * @returns {Address}\n */\n to_address() {\n const ret = wasm.address_from_view_key(this.__wbg_ptr);\n return Address.__wrap(ret);\n }\n /**\n * Decrypt a record ciphertext with a view key\n *\n * @param {string} ciphertext String representation of a record ciphertext\n * @returns {string} String representation of a record plaintext\n * @param {string} ciphertext\n * @returns {string}\n */\n decrypt(ciphertext) {\n let deferred3_0;\n let deferred3_1;\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n const ptr0 = passStringToWasm0(ciphertext, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n wasm.viewkey_decrypt(retptr, this.__wbg_ptr, ptr0, len0);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n var r2 = getInt32Memory0()[retptr / 4 + 2];\n var r3 = getInt32Memory0()[retptr / 4 + 3];\n var ptr2 = r0;\n var len2 = r1;\n if (r3) {\n ptr2 = 0; len2 = 0;\n throw takeObject(r2);\n }\n deferred3_0 = ptr2;\n deferred3_1 = len2;\n return getStringFromWasm0(ptr2, len2);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n wasm.__wbindgen_free(deferred3_0, deferred3_1, 1);\n }\n }\n}\n\nasync function __wbg_load(module, imports) {\n if (typeof Response === 'function' && module instanceof Response) {\n if (typeof WebAssembly.instantiateStreaming === 'function') {\n try {\n return await WebAssembly.instantiateStreaming(module, imports);\n\n } catch (e) {\n if (module.headers.get('Content-Type') != 'application/wasm') {\n console.warn(\"`WebAssembly.instantiateStreaming` failed because your server does not serve wasm with `application/wasm` MIME type. Falling back to `WebAssembly.instantiate` which is slower. Original error:\\n\", e);\n\n } else {\n throw e;\n }\n }\n }\n\n const bytes = await module.arrayBuffer();\n return await WebAssembly.instantiate(bytes, imports);\n\n } else {\n const instance = await WebAssembly.instantiate(module, imports);\n\n if (instance instanceof WebAssembly.Instance) {\n return { instance, module };\n\n } else {\n return instance;\n }\n }\n}\n\nfunction __wbg_get_imports() {\n const imports = {};\n imports.wbg = {};\n imports.wbg.__wbindgen_object_drop_ref = function(arg0) {\n takeObject(arg0);\n };\n imports.wbg.__wbg_new_71801a555ad9f2aa = function() { return handleError(function () {\n const ret = new XMLHttpRequest();\n return addHeapObject(ret);\n }, arguments) };\n imports.wbg.__wbg_overrideMimeType_ee9c51919ceb418b = function() { return handleError(function (arg0, arg1, arg2) {\n getObject(arg0).overrideMimeType(getStringFromWasm0(arg1, arg2));\n }, arguments) };\n imports.wbg.__wbg_open_c9eb0cf2c9d95679 = function() { return handleError(function (arg0, arg1, arg2, arg3, arg4, arg5) {\n getObject(arg0).open(getStringFromWasm0(arg1, arg2), getStringFromWasm0(arg3, arg4), arg5 !== 0);\n }, arguments) };\n imports.wbg.__wbg_send_80d29985093c1ec5 = function() { return handleError(function (arg0) {\n getObject(arg0).send();\n }, arguments) };\n imports.wbg.__wbg_response_7c2e2759084f7279 = function() { return handleError(function (arg0) {\n const ret = getObject(arg0).response;\n return addHeapObject(ret);\n }, arguments) };\n imports.wbg.__wbg_status_d485fb5a478426fb = function() { return handleError(function (arg0) {\n const ret = getObject(arg0).status;\n return ret;\n }, arguments) };\n imports.wbg.__wbg_new_72fb9a18b5ae2624 = function() {\n const ret = new Object();\n return addHeapObject(ret);\n };\n imports.wbg.__wbindgen_string_new = function(arg0, arg1) {\n const ret = getStringFromWasm0(arg0, arg1);\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_set_1f9b04f170055d33 = function() { return handleError(function (arg0, arg1, arg2) {\n const ret = Reflect.set(getObject(arg0), getObject(arg1), getObject(arg2));\n return ret;\n }, arguments) };\n imports.wbg.__wbg_new_ab6fd82b10560829 = function() { return handleError(function () {\n const ret = new Headers();\n return addHeapObject(ret);\n }, arguments) };\n imports.wbg.__wbindgen_object_clone_ref = function(arg0) {\n const ret = getObject(arg0);\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_new_0d76b0581eca6298 = function() { return handleError(function () {\n const ret = new AbortController();\n return addHeapObject(ret);\n }, arguments) };\n imports.wbg.__wbg_signal_a61f78a3478fd9bc = function(arg0) {\n const ret = getObject(arg0).signal;\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_append_7bfcb4937d1d5e29 = function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {\n getObject(arg0).append(getStringFromWasm0(arg1, arg2), getStringFromWasm0(arg3, arg4));\n }, arguments) };\n imports.wbg.__wbg_instanceof_Response_849eb93e75734b6e = function(arg0) {\n let result;\n try {\n result = getObject(arg0) instanceof Response;\n } catch (_) {\n result = false;\n }\n const ret = result;\n return ret;\n };\n imports.wbg.__wbg_status_61a01141acd3cf74 = function(arg0) {\n const ret = getObject(arg0).status;\n return ret;\n };\n imports.wbg.__wbg_url_5f6dc4009ac5f99d = function(arg0, arg1) {\n const ret = getObject(arg1).url;\n const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len1 = WASM_VECTOR_LEN;\n getInt32Memory0()[arg0 / 4 + 1] = len1;\n getInt32Memory0()[arg0 / 4 + 0] = ptr1;\n };\n imports.wbg.__wbg_headers_9620bfada380764a = function(arg0) {\n const ret = getObject(arg0).headers;\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_iterator_2cee6dadfd956dfa = function() {\n const ret = Symbol.iterator;\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_get_e3c254076557e348 = function() { return handleError(function (arg0, arg1) {\n const ret = Reflect.get(getObject(arg0), getObject(arg1));\n return addHeapObject(ret);\n }, arguments) };\n imports.wbg.__wbindgen_is_function = function(arg0) {\n const ret = typeof(getObject(arg0)) === 'function';\n return ret;\n };\n imports.wbg.__wbg_call_27c0f87801dedf93 = function() { return handleError(function (arg0, arg1) {\n const ret = getObject(arg0).call(getObject(arg1));\n return addHeapObject(ret);\n }, arguments) };\n imports.wbg.__wbindgen_is_object = function(arg0) {\n const val = getObject(arg0);\n const ret = typeof(val) === 'object' && val !== null;\n return ret;\n };\n imports.wbg.__wbg_next_40fc327bfc8770e6 = function(arg0) {\n const ret = getObject(arg0).next;\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_next_196c84450b364254 = function() { return handleError(function (arg0) {\n const ret = getObject(arg0).next();\n return addHeapObject(ret);\n }, arguments) };\n imports.wbg.__wbg_done_298b57d23c0fc80c = function(arg0) {\n const ret = getObject(arg0).done;\n return ret;\n };\n imports.wbg.__wbg_value_d93c65011f51a456 = function(arg0) {\n const ret = getObject(arg0).value;\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_abort_2aa7521d5690750e = function(arg0) {\n getObject(arg0).abort();\n };\n imports.wbg.__wbg_stringify_8887fe74e1c50d81 = function() { return handleError(function (arg0) {\n const ret = JSON.stringify(getObject(arg0));\n return addHeapObject(ret);\n }, arguments) };\n imports.wbg.__wbindgen_string_get = function(arg0, arg1) {\n const obj = getObject(arg1);\n const ret = typeof(obj) === 'string' ? obj : undefined;\n var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n var len1 = WASM_VECTOR_LEN;\n getInt32Memory0()[arg0 / 4 + 1] = len1;\n getInt32Memory0()[arg0 / 4 + 0] = ptr1;\n };\n imports.wbg.__wbg_executionresponse_new = function(arg0) {\n const ret = ExecutionResponse.__wrap(arg0);\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_call_b3ca7c6051f9bec1 = function() { return handleError(function (arg0, arg1, arg2) {\n const ret = getObject(arg0).call(getObject(arg1), getObject(arg2));\n return addHeapObject(ret);\n }, arguments) };\n imports.wbg.__wbg_log_0159ca40cddf5b15 = function(arg0, arg1) {\n console.log(getStringFromWasm0(arg0, arg1));\n };\n imports.wbg.__wbg_newwithlength_66ae46612e7f0234 = function(arg0) {\n const ret = new Array(arg0 >>> 0);\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_set_d4638f722068f043 = function(arg0, arg1, arg2) {\n getObject(arg0)[arg1 >>> 0] = takeObject(arg2);\n };\n imports.wbg.__wbg_transaction_new = function(arg0) {\n const ret = Transaction.__wrap(arg0);\n return addHeapObject(ret);\n };\n imports.wbg.__wbindgen_bigint_from_u64 = function(arg0) {\n const ret = BigInt.asUintN(64, arg0);\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_keypair_new = function(arg0) {\n const ret = KeyPair.__wrap(arg0);\n return addHeapObject(ret);\n };\n imports.wbg.__wbindgen_module = function() {\n const ret = __wbg_init.__wbindgen_wasm_module;\n return addHeapObject(ret);\n };\n imports.wbg.__wbindgen_memory = function() {\n const ret = wasm.memory;\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_spawnWorker_f6acaddb2e29dc4a = function(arg0, arg1, arg2, arg3) {\n const ret = spawnWorker(getObject(arg0), getObject(arg1), getObject(arg2), arg3 >>> 0);\n return addHeapObject(ret);\n };\n imports.wbg.__wbindgen_cb_drop = function(arg0) {\n const obj = takeObject(arg0).original;\n if (obj.cnt-- == 1) {\n obj.a = 0;\n return true;\n }\n const ret = false;\n return ret;\n };\n imports.wbg.__wbg_new_16b304a2cfa7ff4a = function() {\n const ret = new Array();\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_push_a5b05aedc7234f9f = function(arg0, arg1) {\n const ret = getObject(arg0).push(getObject(arg1));\n return ret;\n };\n imports.wbg.__wbg_arrayBuffer_29931d52c7206b02 = function() { return handleError(function (arg0) {\n const ret = getObject(arg0).arrayBuffer();\n return addHeapObject(ret);\n }, arguments) };\n imports.wbg.__wbg_new_63b92bc8671ed464 = function(arg0) {\n const ret = new Uint8Array(getObject(arg0));\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_length_c20a40f15020d68a = function(arg0) {\n const ret = getObject(arg0).length;\n return ret;\n };\n imports.wbg.__wbg_new_81740750da40724f = function(arg0, arg1) {\n try {\n var state0 = {a: arg0, b: arg1};\n var cb0 = (arg0, arg1) => {\n const a = state0.a;\n state0.a = 0;\n try {\n return __wbg_adapter_281(a, state0.b, arg0, arg1);\n } finally {\n state0.a = a;\n }\n };\n const ret = new Promise(cb0);\n return addHeapObject(ret);\n } finally {\n state0.a = state0.b = 0;\n }\n };\n imports.wbg.__wbindgen_number_new = function(arg0) {\n const ret = arg0;\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_new_abda76e883ba8a5f = function() {\n const ret = new Error();\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_stack_658279fe44541cf6 = function(arg0, arg1) {\n const ret = getObject(arg1).stack;\n const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len1 = WASM_VECTOR_LEN;\n getInt32Memory0()[arg0 / 4 + 1] = len1;\n getInt32Memory0()[arg0 / 4 + 0] = ptr1;\n };\n imports.wbg.__wbg_error_f851667af71bcfc6 = function(arg0, arg1) {\n let deferred0_0;\n let deferred0_1;\n try {\n deferred0_0 = arg0;\n deferred0_1 = arg1;\n console.error(getStringFromWasm0(arg0, arg1));\n } finally {\n wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);\n }\n };\n imports.wbg.__wbg_buffer_12d079cc21e14bdb = function(arg0) {\n const ret = getObject(arg0).buffer;\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_newwithbyteoffsetandlength_aa4a17c33a06e5cb = function(arg0, arg1, arg2) {\n const ret = new Uint8Array(getObject(arg0), arg1 >>> 0, arg2 >>> 0);\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_randomFillSync_5c9c955aa56b6049 = function() { return handleError(function (arg0, arg1) {\n getObject(arg0).randomFillSync(takeObject(arg1));\n }, arguments) };\n imports.wbg.__wbg_subarray_a1f73cd4b5b42fe1 = function(arg0, arg1, arg2) {\n const ret = getObject(arg0).subarray(arg1 >>> 0, arg2 >>> 0);\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_getRandomValues_3aa56aa6edec874c = function() { return handleError(function (arg0, arg1) {\n getObject(arg0).getRandomValues(getObject(arg1));\n }, arguments) };\n imports.wbg.__wbg_set_a47bac70306a19a7 = function(arg0, arg1, arg2) {\n getObject(arg0).set(getObject(arg1), arg2 >>> 0);\n };\n imports.wbg.__wbg_crypto_1d1f22824a6a080c = function(arg0) {\n const ret = getObject(arg0).crypto;\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_process_4a72847cc503995b = function(arg0) {\n const ret = getObject(arg0).process;\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_versions_f686565e586dd935 = function(arg0) {\n const ret = getObject(arg0).versions;\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_node_104a2ff8d6ea03a2 = function(arg0) {\n const ret = getObject(arg0).node;\n return addHeapObject(ret);\n };\n imports.wbg.__wbindgen_is_string = function(arg0) {\n const ret = typeof(getObject(arg0)) === 'string';\n return ret;\n };\n imports.wbg.__wbg_require_cca90b1a94a0255b = function() { return handleError(function () {\n const ret = module.require;\n return addHeapObject(ret);\n }, arguments) };\n imports.wbg.__wbg_msCrypto_eb05e62b530a1508 = function(arg0) {\n const ret = getObject(arg0).msCrypto;\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_newwithlength_e9b4878cebadb3d3 = function(arg0) {\n const ret = new Uint8Array(arg0 >>> 0);\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_length_cd7af8117672b8b8 = function(arg0) {\n const ret = getObject(arg0).length;\n return ret;\n };\n imports.wbg.__wbg_get_bd8e338fbd5f5cc8 = function(arg0, arg1) {\n const ret = getObject(arg0)[arg1 >>> 0];\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_self_ce0dbfc45cf2f5be = function() { return handleError(function () {\n const ret = self.self;\n return addHeapObject(ret);\n }, arguments) };\n imports.wbg.__wbg_window_c6fb939a7f436783 = function() { return handleError(function () {\n const ret = window.window;\n return addHeapObject(ret);\n }, arguments) };\n imports.wbg.__wbg_globalThis_d1e6af4856ba331b = function() { return handleError(function () {\n const ret = globalThis.globalThis;\n return addHeapObject(ret);\n }, arguments) };\n imports.wbg.__wbg_global_207b558942527489 = function() { return handleError(function () {\n const ret = global.global;\n return addHeapObject(ret);\n }, arguments) };\n imports.wbg.__wbindgen_is_undefined = function(arg0) {\n const ret = getObject(arg0) === undefined;\n return ret;\n };\n imports.wbg.__wbg_newnoargs_e258087cd0daa0ea = function(arg0, arg1) {\n const ret = new Function(getStringFromWasm0(arg0, arg1));\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_has_0af94d20077affa2 = function() { return handleError(function (arg0, arg1) {\n const ret = Reflect.has(getObject(arg0), getObject(arg1));\n return ret;\n }, arguments) };\n imports.wbg.__wbg_fetch_bc7c8e27076a5c84 = function(arg0) {\n const ret = fetch(getObject(arg0));\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_fetch_921fad6ef9e883dd = function(arg0, arg1) {\n const ret = getObject(arg0).fetch(getObject(arg1));\n return addHeapObject(ret);\n };\n imports.wbg.__wbindgen_debug_string = function(arg0, arg1) {\n const ret = debugString(getObject(arg1));\n const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len1 = WASM_VECTOR_LEN;\n getInt32Memory0()[arg0 / 4 + 1] = len1;\n getInt32Memory0()[arg0 / 4 + 0] = ptr1;\n };\n imports.wbg.__wbindgen_throw = function(arg0, arg1) {\n throw new Error(getStringFromWasm0(arg0, arg1));\n };\n imports.wbg.__wbindgen_rethrow = function(arg0) {\n throw takeObject(arg0);\n };\n imports.wbg.__wbg_then_a73caa9a87991566 = function(arg0, arg1, arg2) {\n const ret = getObject(arg0).then(getObject(arg1), getObject(arg2));\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_then_0c86a60e8fcfe9f6 = function(arg0, arg1) {\n const ret = getObject(arg0).then(getObject(arg1));\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_queueMicrotask_481971b0d87f3dd4 = function(arg0) {\n queueMicrotask(getObject(arg0));\n };\n imports.wbg.__wbg_queueMicrotask_3cbae2ec6b6cd3d6 = function(arg0) {\n const ret = getObject(arg0).queueMicrotask;\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_resolve_b0083a7967828ec8 = function(arg0) {\n const ret = Promise.resolve(getObject(arg0));\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_waitAsync_5d743fc9058ba01a = function() {\n const ret = Atomics.waitAsync;\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_new_8cccba86b0f574cb = function(arg0) {\n const ret = new Int32Array(getObject(arg0));\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_waitAsync_46d5c36955b71a79 = function(arg0, arg1, arg2) {\n const ret = Atomics.waitAsync(getObject(arg0), arg1, arg2);\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_async_19c0400d97cc72fe = function(arg0) {\n const ret = getObject(arg0).async;\n return ret;\n };\n imports.wbg.__wbg_value_571d60108110e917 = function(arg0) {\n const ret = getObject(arg0).value;\n return addHeapObject(ret);\n };\n imports.wbg.__wbindgen_link_fc1eedd35dc7e0a6 = function(arg0) {\n const ret = \"data:application/javascript,\" + encodeURIComponent(`onmessage = function (ev) {\n let [ia, index, value] = ev.data;\n ia = new Int32Array(ia.buffer);\n let result = Atomics.wait(ia, index, value);\n postMessage(result);\n };\n `);\n const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len1 = WASM_VECTOR_LEN;\n getInt32Memory0()[arg0 / 4 + 1] = len1;\n getInt32Memory0()[arg0 / 4 + 0] = ptr1;\n };\n imports.wbg.__wbg_new_d1187ae36d662ef9 = function() { return handleError(function (arg0, arg1) {\n const ret = new Worker(getStringFromWasm0(arg0, arg1));\n return addHeapObject(ret);\n }, arguments) };\n imports.wbg.__wbg_setonmessage_503809e5bb51bd33 = function(arg0, arg1) {\n getObject(arg0).onmessage = getObject(arg1);\n };\n imports.wbg.__wbg_of_6a70eed8d41f469c = function(arg0, arg1, arg2) {\n const ret = Array.of(getObject(arg0), getObject(arg1), getObject(arg2));\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_postMessage_7380d10e8b8269df = function() { return handleError(function (arg0, arg1) {\n getObject(arg0).postMessage(getObject(arg1));\n }, arguments) };\n imports.wbg.__wbg_data_3ce7c145ca4fbcdc = function(arg0) {\n const ret = getObject(arg0).data;\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_newwithstrandinit_3fd6fba4083ff2d0 = function() { return handleError(function (arg0, arg1, arg2) {\n const ret = new Request(getStringFromWasm0(arg0, arg1), getObject(arg2));\n return addHeapObject(ret);\n }, arguments) };\n imports.wbg.__wbg_responseText_c67ed2d48db10769 = function() { return handleError(function (arg0, arg1) {\n const ret = getObject(arg1).responseText;\n var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n var len1 = WASM_VECTOR_LEN;\n getInt32Memory0()[arg0 / 4 + 1] = len1;\n getInt32Memory0()[arg0 / 4 + 0] = ptr1;\n }, arguments) };\n imports.wbg.__wbindgen_closure_wrapper5837 = function(arg0, arg1, arg2) {\n const ret = makeMutClosure(arg0, arg1, 538, __wbg_adapter_34);\n return addHeapObject(ret);\n };\n imports.wbg.__wbindgen_closure_wrapper5862 = function(arg0, arg1, arg2) {\n const ret = makeMutClosure(arg0, arg1, 538, __wbg_adapter_34);\n return addHeapObject(ret);\n };\n\n return imports;\n}\n\nfunction __wbg_init_memory(imports, maybe_memory) {\n imports.wbg.memory = maybe_memory || new WebAssembly.Memory({initial:25,maximum:65536,shared:true});\n}\n\nfunction __wbg_finalize_init(instance, module) {\n wasm = instance.exports;\n __wbg_init.__wbindgen_wasm_module = module;\n cachedBigInt64Memory0 = null;\n cachedInt32Memory0 = null;\n cachedUint8Memory0 = null;\n\n wasm.__wbindgen_start();\n return wasm;\n}\n\nfunction initSync(module, maybe_memory) {\n if (wasm !== undefined) return wasm;\n\n const imports = __wbg_get_imports();\n\n __wbg_init_memory(imports, maybe_memory);\n\n if (!(module instanceof WebAssembly.Module)) {\n module = new WebAssembly.Module(module);\n }\n\n const instance = new WebAssembly.Instance(module, imports);\n\n return __wbg_finalize_init(instance, module);\n}\n\nasync function __wbg_init(input, maybe_memory) {\n if (wasm !== undefined) return wasm;\n\n\n const imports = __wbg_get_imports();\n\n if (typeof input === 'string' || (typeof Request === 'function' && input instanceof Request) || (typeof URL === 'function' && input instanceof URL)) {\n input = fetch(input);\n }\n\n __wbg_init_memory(imports, maybe_memory);\n\n const { instance, module } = await __wbg_load(await input, imports);\n\n return __wbg_finalize_init(instance, module);\n}\n\nvar exports = /*#__PURE__*/Object.freeze({\n __proto__: null,\n Address: Address,\n Execution: Execution,\n ExecutionResponse: ExecutionResponse,\n Field: Field,\n KeyPair: KeyPair,\n Metadata: Metadata,\n OfflineQuery: OfflineQuery,\n PrivateKey: PrivateKey,\n PrivateKeyCiphertext: PrivateKeyCiphertext,\n Program: Program,\n ProgramManager: ProgramManager,\n ProvingKey: ProvingKey,\n RecordCiphertext: RecordCiphertext,\n RecordPlaintext: RecordPlaintext,\n Signature: Signature,\n Transaction: Transaction,\n VerifyingKey: VerifyingKey,\n ViewKey: ViewKey,\n default: __wbg_init,\n initSync: initSync,\n initThreadPool: initThreadPool,\n runRayonThread: runRayonThread,\n verifyFunctionExecution: verifyFunctionExecution\n});\n\nconst wasm_path = \"assets/aleo_wasm.wasm\";\n\n \n var Cargo = async (opt = {}) => {\n let {importHook, serverPath, initializeHook} = opt;\n\n let final_path = wasm_path;\n\n if (serverPath != null) {\n final_path = serverPath + /[^\\/\\\\]*$/.exec(final_path)[0];\n }\n\n if (importHook != null) {\n final_path = importHook(final_path);\n }\n\n if (initializeHook != null) {\n await initializeHook(__wbg_init, final_path);\n\n } else {\n await __wbg_init(final_path);\n }\n\n return exports;\n };\n\nexport { Cargo as default };\n//# sourceMappingURL=wasm.js.map\n","import wasm from \"../dist/wasm.js\";\n\nconst {\n initThreadPool: wasmInitThreadPool,\n Address,\n Execution,\n ExecutionResponse,\n Field,\n Metadata,\n OfflineQuery,\n Private,\n PrivateKey,\n PrivateKeyCiphertext,\n Program,\n ProvingKey,\n RecordCiphertext,\n RecordPlaintext,\n ProgramManager,\n Signature,\n Transaction,\n ViewKey,\n VerifyingKey,\n verifyFunctionExecution,\n} = await wasm({\n importHook: () => {\n return new URL(\"assets/aleo_wasm.wasm\", import.meta.url);\n },\n});\n\nasync function initThreadPool(threads) {\n if (threads == null) {\n threads = navigator.hardwareConcurrency;\n }\n\n console.info(`Spawning ${threads} threads`);\n\n await wasmInitThreadPool(new URL(\"worker.js\", import.meta.url), threads);\n}\n\nexport {\n initThreadPool,\n Address,\n Execution,\n ExecutionResponse,\n Field,\n Metadata,\n OfflineQuery,\n PrivateKey,\n PrivateKeyCiphertext,\n Program,\n ProvingKey,\n RecordCiphertext,\n RecordPlaintext,\n ProgramManager,\n Signature,\n Transaction,\n ViewKey,\n VerifyingKey,\n verifyFunctionExecution,\n};\n","/**\n * @license\n * Copyright 2019 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\nconst proxyMarker = Symbol(\"Comlink.proxy\");\nconst createEndpoint = Symbol(\"Comlink.endpoint\");\nconst releaseProxy = Symbol(\"Comlink.releaseProxy\");\nconst finalizer = Symbol(\"Comlink.finalizer\");\nconst throwMarker = Symbol(\"Comlink.thrown\");\nconst isObject = (val) => (typeof val === \"object\" && val !== null) || typeof val === \"function\";\n/**\n * Internal transfer handle to handle objects marked to proxy.\n */\nconst proxyTransferHandler = {\n canHandle: (val) => isObject(val) && val[proxyMarker],\n serialize(obj) {\n const { port1, port2 } = new MessageChannel();\n expose(obj, port1);\n return [port2, [port2]];\n },\n deserialize(port) {\n port.start();\n return wrap(port);\n },\n};\n/**\n * Internal transfer handler to handle thrown exceptions.\n */\nconst throwTransferHandler = {\n canHandle: (value) => isObject(value) && throwMarker in value,\n serialize({ value }) {\n let serialized;\n if (value instanceof Error) {\n serialized = {\n isError: true,\n value: {\n message: value.message,\n name: value.name,\n stack: value.stack,\n },\n };\n }\n else {\n serialized = { isError: false, value };\n }\n return [serialized, []];\n },\n deserialize(serialized) {\n if (serialized.isError) {\n throw Object.assign(new Error(serialized.value.message), serialized.value);\n }\n throw serialized.value;\n },\n};\n/**\n * Allows customizing the serialization of certain values.\n */\nconst transferHandlers = new Map([\n [\"proxy\", proxyTransferHandler],\n [\"throw\", throwTransferHandler],\n]);\nfunction isAllowedOrigin(allowedOrigins, origin) {\n for (const allowedOrigin of allowedOrigins) {\n if (origin === allowedOrigin || allowedOrigin === \"*\") {\n return true;\n }\n if (allowedOrigin instanceof RegExp && allowedOrigin.test(origin)) {\n return true;\n }\n }\n return false;\n}\nfunction expose(obj, ep = globalThis, allowedOrigins = [\"*\"]) {\n ep.addEventListener(\"message\", function callback(ev) {\n if (!ev || !ev.data) {\n return;\n }\n if (!isAllowedOrigin(allowedOrigins, ev.origin)) {\n console.warn(`Invalid origin '${ev.origin}' for comlink proxy`);\n return;\n }\n const { id, type, path } = Object.assign({ path: [] }, ev.data);\n const argumentList = (ev.data.argumentList || []).map(fromWireValue);\n let returnValue;\n try {\n const parent = path.slice(0, -1).reduce((obj, prop) => obj[prop], obj);\n const rawValue = path.reduce((obj, prop) => obj[prop], obj);\n switch (type) {\n case \"GET\" /* MessageType.GET */:\n {\n returnValue = rawValue;\n }\n break;\n case \"SET\" /* MessageType.SET */:\n {\n parent[path.slice(-1)[0]] = fromWireValue(ev.data.value);\n returnValue = true;\n }\n break;\n case \"APPLY\" /* MessageType.APPLY */:\n {\n returnValue = rawValue.apply(parent, argumentList);\n }\n break;\n case \"CONSTRUCT\" /* MessageType.CONSTRUCT */:\n {\n const value = new rawValue(...argumentList);\n returnValue = proxy(value);\n }\n break;\n case \"ENDPOINT\" /* MessageType.ENDPOINT */:\n {\n const { port1, port2 } = new MessageChannel();\n expose(obj, port2);\n returnValue = transfer(port1, [port1]);\n }\n break;\n case \"RELEASE\" /* MessageType.RELEASE */:\n {\n returnValue = undefined;\n }\n break;\n default:\n return;\n }\n }\n catch (value) {\n returnValue = { value, [throwMarker]: 0 };\n }\n Promise.resolve(returnValue)\n .catch((value) => {\n return { value, [throwMarker]: 0 };\n })\n .then((returnValue) => {\n const [wireValue, transferables] = toWireValue(returnValue);\n ep.postMessage(Object.assign(Object.assign({}, wireValue), { id }), transferables);\n if (type === \"RELEASE\" /* MessageType.RELEASE */) {\n // detach and deactive after sending release response above.\n ep.removeEventListener(\"message\", callback);\n closeEndPoint(ep);\n if (finalizer in obj && typeof obj[finalizer] === \"function\") {\n obj[finalizer]();\n }\n }\n })\n .catch((error) => {\n // Send Serialization Error To Caller\n const [wireValue, transferables] = toWireValue({\n value: new TypeError(\"Unserializable return value\"),\n [throwMarker]: 0,\n });\n ep.postMessage(Object.assign(Object.assign({}, wireValue), { id }), transferables);\n });\n });\n if (ep.start) {\n ep.start();\n }\n}\nfunction isMessagePort(endpoint) {\n return endpoint.constructor.name === \"MessagePort\";\n}\nfunction closeEndPoint(endpoint) {\n if (isMessagePort(endpoint))\n endpoint.close();\n}\nfunction wrap(ep, target) {\n return createProxy(ep, [], target);\n}\nfunction throwIfProxyReleased(isReleased) {\n if (isReleased) {\n throw new Error(\"Proxy has been released and is not useable\");\n }\n}\nfunction releaseEndpoint(ep) {\n return requestResponseMessage(ep, {\n type: \"RELEASE\" /* MessageType.RELEASE */,\n }).then(() => {\n closeEndPoint(ep);\n });\n}\nconst proxyCounter = new WeakMap();\nconst proxyFinalizers = \"FinalizationRegistry\" in globalThis &&\n new FinalizationRegistry((ep) => {\n const newCount = (proxyCounter.get(ep) || 0) - 1;\n proxyCounter.set(ep, newCount);\n if (newCount === 0) {\n releaseEndpoint(ep);\n }\n });\nfunction registerProxy(proxy, ep) {\n const newCount = (proxyCounter.get(ep) || 0) + 1;\n proxyCounter.set(ep, newCount);\n if (proxyFinalizers) {\n proxyFinalizers.register(proxy, ep, proxy);\n }\n}\nfunction unregisterProxy(proxy) {\n if (proxyFinalizers) {\n proxyFinalizers.unregister(proxy);\n }\n}\nfunction createProxy(ep, path = [], target = function () { }) {\n let isProxyReleased = false;\n const proxy = new Proxy(target, {\n get(_target, prop) {\n throwIfProxyReleased(isProxyReleased);\n if (prop === releaseProxy) {\n return () => {\n unregisterProxy(proxy);\n releaseEndpoint(ep);\n isProxyReleased = true;\n };\n }\n if (prop === \"then\") {\n if (path.length === 0) {\n return { then: () => proxy };\n }\n const r = requestResponseMessage(ep, {\n type: \"GET\" /* MessageType.GET */,\n path: path.map((p) => p.toString()),\n }).then(fromWireValue);\n return r.then.bind(r);\n }\n return createProxy(ep, [...path, prop]);\n },\n set(_target, prop, rawValue) {\n throwIfProxyReleased(isProxyReleased);\n // FIXME: ES6 Proxy Handler `set` methods are supposed to return a\n // boolean. To show good will, we return true asynchronously ¯\\_(ツ)_/¯\n const [value, transferables] = toWireValue(rawValue);\n return requestResponseMessage(ep, {\n type: \"SET\" /* MessageType.SET */,\n path: [...path, prop].map((p) => p.toString()),\n value,\n }, transferables).then(fromWireValue);\n },\n apply(_target, _thisArg, rawArgumentList) {\n throwIfProxyReleased(isProxyReleased);\n const last = path[path.length - 1];\n if (last === createEndpoint) {\n return requestResponseMessage(ep, {\n type: \"ENDPOINT\" /* MessageType.ENDPOINT */,\n }).then(fromWireValue);\n }\n // We just pretend that `bind()` didn’t happen.\n if (last === \"bind\") {\n return createProxy(ep, path.slice(0, -1));\n }\n const [argumentList, transferables] = processArguments(rawArgumentList);\n return requestResponseMessage(ep, {\n type: \"APPLY\" /* MessageType.APPLY */,\n path: path.map((p) => p.toString()),\n argumentList,\n }, transferables).then(fromWireValue);\n },\n construct(_target, rawArgumentList) {\n throwIfProxyReleased(isProxyReleased);\n const [argumentList, transferables] = processArguments(rawArgumentList);\n return requestResponseMessage(ep, {\n type: \"CONSTRUCT\" /* MessageType.CONSTRUCT */,\n path: path.map((p) => p.toString()),\n argumentList,\n }, transferables).then(fromWireValue);\n },\n });\n registerProxy(proxy, ep);\n return proxy;\n}\nfunction myFlat(arr) {\n return Array.prototype.concat.apply([], arr);\n}\nfunction processArguments(argumentList) {\n const processed = argumentList.map(toWireValue);\n return [processed.map((v) => v[0]), myFlat(processed.map((v) => v[1]))];\n}\nconst transferCache = new WeakMap();\nfunction transfer(obj, transfers) {\n transferCache.set(obj, transfers);\n return obj;\n}\nfunction proxy(obj) {\n return Object.assign(obj, { [proxyMarker]: true });\n}\nfunction windowEndpoint(w, context = globalThis, targetOrigin = \"*\") {\n return {\n postMessage: (msg, transferables) => w.postMessage(msg, targetOrigin, transferables),\n addEventListener: context.addEventListener.bind(context),\n removeEventListener: context.removeEventListener.bind(context),\n };\n}\nfunction toWireValue(value) {\n for (const [name, handler] of transferHandlers) {\n if (handler.canHandle(value)) {\n const [serializedValue, transferables] = handler.serialize(value);\n return [\n {\n type: \"HANDLER\" /* WireValueType.HANDLER */,\n name,\n value: serializedValue,\n },\n transferables,\n ];\n }\n }\n return [\n {\n type: \"RAW\" /* WireValueType.RAW */,\n value,\n },\n transferCache.get(value) || [],\n ];\n}\nfunction fromWireValue(value) {\n switch (value.type) {\n case \"HANDLER\" /* WireValueType.HANDLER */:\n return transferHandlers.get(value.name).deserialize(value.value);\n case \"RAW\" /* WireValueType.RAW */:\n return value.value;\n }\n}\nfunction requestResponseMessage(ep, msg, transfers) {\n return new Promise((resolve) => {\n const id = generateUUID();\n ep.addEventListener(\"message\", function l(ev) {\n if (!ev.data || !ev.data.id || ev.data.id !== id) {\n return;\n }\n ep.removeEventListener(\"message\", l);\n resolve(ev.data);\n });\n if (ep.start) {\n ep.start();\n }\n ep.postMessage(Object.assign({ id }, msg), transfers);\n });\n}\nfunction generateUUID() {\n return new Array(4)\n .fill(0)\n .map(() => Math.floor(Math.random() * Number.MAX_SAFE_INTEGER).toString(16))\n .join(\"-\");\n}\n\nexport { createEndpoint, expose, finalizer, proxy, proxyMarker, releaseProxy, transfer, transferHandlers, windowEndpoint, wrap };\n//# sourceMappingURL=comlink.mjs.map\n"],"names":["Account","_privateKey","_viewKey","_address","constructor","params","this","privateKeyFromParams","e","console","error","Error","ViewKey","from_private_key","Address","fromCiphertext","ciphertext","password","PrivateKeyCiphertext","fromString","PrivateKey","fromPrivateKeyCiphertext","privateKey","to_string","seed","from_seed_unchecked","from_string","viewKey","address","toString","encryptAccount","toCiphertext","decryptRecord","decrypt","decryptRecords","ciphertexts","map","ownsRecordCiphertext","isOwner","RecordCiphertext","sign","message","verify","signature","async","get","url","options","response","fetch","ok","status","post","method","AleoNetworkClient","host","headers","account","setAccount","getAccount","setHost","fetchData","json","findUnspentRecords","startHeight","endHeight","amounts","maxMicrocredits","nonces","records","Array","start","end","resolvedPrivateKey","latestHeight","failures","totalRecordValue","BigInt","to_view_key","blockHeight","getLatestHeight","blocks","getBlockRange","i","length","transactions","j","confirmedTransaction","type","transaction","execution","transitions","k","transition","program","outputs","l","output","record","value","recordPlaintext","nonce","includes","serialNumber","serialNumberString","getTransitionId","push","microcredits","amounts_found","warn","getBlock","height","getDeploymentTransactionIDForProgram","Program","replace","getDeploymentTransactionForProgram","transaction_id","getTransaction","getLatestBlock","getLatestCommittee","getProgram","programId","getProgramObject","inputProgram","getProgramImports","imports","importList","getImports","import_id","hasOwnProperty","programSource","nestedImports","key","logAndThrow","getProgramImportNames","getProgramMappingNames","getProgramMappingValue","mappingName","getStateRoot","id","getTransactions","getTransactionsInMempool","inputOrOutputID","submitTransaction","transaction_string","Transaction","body","Object","assign","AleoKeyProviderParams","name","proverUri","verifierUri","cacheKey","AleoKeyProvider","cache","cacheOption","keyUris","fetchBytes","data","arrayBuffer","Uint8Array","KEY_STORE","Map","useCache","clearCache","clear","cacheKeys","keyId","keys","provingKey","verifyingKey","set","toBytes","containsKeys","has","deleteKeys","delete","getKeys","debug","provingKeyBytes","verifyingKeyBytes","ProvingKey","fromBytes","VerifyingKey","functionKeys","proverUrl","verifierUrl","CREDITS_PROGRAM_KEYS","getKey","fetchCreditsKeys","fetchRemoteKeys","getVerifyingKey","fetchProvingKey","locator","keyPair","verifying_key","proving_key","prover","bond_public","bondPublicKeys","bondValidatorKeys","bond_validator","claimUnbondPublicKeys","claim_unbond_public","transferKeys","visibility","PRIVATE_TRANSFER","transfer_private","PRIVATE_TO_PUBLIC_TRANSFER","transfer_private_to_public","PUBLIC_TRANSFER","transfer_public","PUBLIC_TRANSFER_AS_SIGNER","transfer_public_as_signer","PUBLIC_TO_PRIVATE_TRANSFER","transfer_public_to_private","joinKeys","join","splitKeys","split","feePrivateKeys","fee_private","feePublicKeys","fee_public","verifier","inclusion","set_validator_state","unbond_public","text","inner","unBondPublicKeys","OfflineSearchParams","verifyCreditsKeys","bondPublicKeyParams","bondValidatorKeyParams","claimUnbondPublicKeyParams","feePrivateKeyParams","feePublicKeyParams","inclusionKeyParams","joinKeyParams","setValidatorStateKeyParams","splitKeyParams","transferPrivateKeyParams","transferPrivateToPublicKeyParams","transferPublicKeyParams","transferPublicAsSignerKeyParams","transferPublicToPrivateKeyParams","unbondPublicKeyParams","OfflineKeyProvider","Promise","resolve","reject","undefined","isBondPublicProver","isBondPublicVerifier","isClaimUnbondPublicProver","isClaimUnbondPublicVerifier","isFeePrivateProver","isFeePrivateVerifier","isFeePublicProver","isFeePublicVerifier","isInclusionProver","isInclusionVerifier","isJoinProver","isJoinVerifier","isSetValidatorStateProver","isSetValidatorStateVerifier","isSplitProver","isSplitVerifier","isTransferPrivateProver","isTransferPrivateVerifier","isTransferPrivateToPublicProver","isTransferPrivateToPublicVerifier","isTransferPublicProver","isTransferPublicVerifier","isTransferPublicToPrivateProver","isTransferPublicToPrivateVerifier","isUnbondPublicProver","isUnbondPublicVerifier","insertBondPublicKeys","bondPublicVerifier","insertClaimUnbondPublicKeys","claimUnbondPublicVerifier","insertFeePrivateKeys","feePrivateVerifier","insertFeePublicKeys","feePublicVerifier","insertJoinKeys","joinVerifier","insertSetValidatorStateKeys","setValidatorStateVerifier","insertSplitKeys","splitVerifier","insertTransferPrivateKeys","transferPrivateVerifier","insertTransferPrivateToPublicKeys","transferPrivateToPublicVerifier","insertTransferPublicKeys","transferPublicVerifier","insertTransferPublicToPrivateKeys","transferPublicToPrivateVerifier","insertUnbondPublicKeys","unbondPublicVerifier","NetworkRecordProvider","networkClient","findCreditsRecords","unspent","searchParameters","findCreditsRecord","findRecord","findRecords","BlockHeightSearch","singletonWorker","createAleoWorker","worker","Worker","URL","wrap","ProgramManager","keyProvider","recordProvider","setKeyProvider","setRecordProvider","deploy","fee","privateFee","recordSearchParams","feeRecord","programObject","log","feeKeys","deploymentPrivateKey","getCreditsRecord","feeProvingKey","feeVerifyingKey","tx","ProgramManager$1","buildDeploymentTransaction","buildExecutionTransaction","programName","functionName","inputs","keySearchParams","offlineQuery","executionPrivateKey","execute","run","function_name","proveExecution","executeFunctionOffline","recordOne","recordTwo","joinProvingKey","joinVerifyingKey","RecordPlaintext","buildJoinTransaction","splitAmount","amountRecord","splitProvingKey","splitVerifyingKey","buildSplitTransaction","synthesizeKeys","function_id","synthesizeKeyPair","buildTransferTransaction","amount","recipient","transferType","validateTransferType","transferProvingKey","transferVerifyingKey","requiresAmountRecord","buildTransferPublicTransaction","buildTransferPublicAsSignerTransaction","transfer","buildBondPublicTransaction","staker_address","validator_address","withdrawal_address","scaledAmount","Math","trunc","creditsProgram","additionalOptions","executeOptions","bondPublic","buildBondValidatorTransaction","commission","adjustedCommission","bondValidator","buildUnbondPublicTransaction","unbondPublic","buildClaimUnbondPublicTransaction","claimUnbondPublic","buildSetValidatorStateTransaction","validator_state","setValidatorState","verifyExecution","executionResponse","getExecution","getFunctionId","verifyFunctionExecution","createProgramFromSource","getCreditsProgram","verifyProgram","PRIVATE_TRANSFER_TYPES","VALID_TRANSFER_TYPES","Metadata","baseUrl","convert","metadata","Set","initializeWasm","spawnWorker","module","memory","addEventListener","event","setTimeout","unref","capture","once","postMessage","wasm","heap","fill","getObject","idx","heap_next","dropObject","takeObject","ret","cachedTextDecoder","TextDecoder","ignoreBOM","fatal","decode","cachedUint8Memory0","getUint8Memory0","buffer","getStringFromWasm0","ptr","len","slice","addHeapObject","obj","WASM_VECTOR_LEN","cachedTextEncoder","TextEncoder","encode","encodeString","arg","view","buf","read","written","passStringToWasm0","malloc","realloc","subarray","mem","offset","code","charCodeAt","isLikeNone","x","cachedInt32Memory0","getInt32Memory0","Int32Array","debugString","val","description","isArray","builtInMatches","exec","call","className","JSON","stringify","_","stack","CLOSURE_DTORS","FinalizationRegistry","register","unregister","state","__wbindgen_export_3","dtor","a","b","makeMutClosure","arg0","arg1","f","cnt","real","args","original","__wbg_adapter_34","arg2","_dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h4428289ce4d5afd9","_assertClass","instance","klass","passArray8ToWasm0","verifyFunctionExecution$1","retptr","__wbindgen_add_to_stack_pointer","Execution$1","VerifyingKey$1","Program$1","ptr0","__wbindgen_malloc","__wbindgen_realloc","len0","__wbg_ptr","r0","r1","cachedBigInt64Memory0","getBigInt64Memory0","BigInt64Array","getArrayU8FromWasm0","runRayonThread","receiver","initThreadPool$1","num_threads","initThreadPool","handleError","apply","__wbindgen_exn_store","__wbg_adapter_281","arg3","wasm_bindgen__convert__closures__invoke2_mut__h2157eed66e6e3fca","AddressFinalization","__wbg_address_free","__wrap","create","prototype","__destroy_into_raw","free","private_key","PrivateKey$1","address_from_private_key","from_view_key","view_key","ViewKey$1","address_from_view_key","address_from_string","deferred1_0","deferred1_1","address_to_string","__wbindgen_free","Signature$1","address_verify","ExecutionFinalization","__wbg_execution_free","Execution","execution_toString","execution_fromString","ExecutionResponseFinalization","__wbg_executionresponse_free","ExecutionResponse","getOutputs","executionresponse_getOutputs","executionresponse_getExecution","executionresponse_getKeys","KeyPair","getProvingKey","executionresponse_getProvingKey","ProvingKey$1","executionresponse_getVerifyingKey","executionresponse_getFunctionId","executionresponse_getProgram","FieldFinalization","__wbg_field_free","Field","field_toString","field","field_fromString","KeyPairFinalization","__wbg_keypair_free","ptr1","keypair_new","keypair_provingKey","keypair_verifyingKey","MetadataFinalization","__wbg_metadata_free","__wbg_get_metadata_name","__wbg_set_metadata_name","__wbg_get_metadata_locator","__wbg_set_metadata_locator","__wbg_get_metadata_prover","__wbg_set_metadata_prover","__wbg_get_metadata_verifier","__wbg_set_metadata_verifier","__wbg_get_metadata_verifyingKey","__wbg_set_metadata_verifyingKey","metadata_baseUrl","metadata_bond_public","metadata_bond_validator","metadata_claim_unbond_public","metadata_fee_private","metadata_fee_public","metadata_inclusion","metadata_join","metadata_set_validator_state","metadata_split","metadata_transfer_private","metadata_transfer_private_to_public","metadata_transfer_public","metadata_transfer_public_as_signer","metadata_transfer_public_to_private","metadata_unbond_public","OfflineQueryFinalization","__wbg_offlinequery_free","OfflineQuery","state_root","offlinequery_new","addStatePath","commitment","state_path","len1","offlinequery_addStatePath","offlinequery_toString","s","offlinequery_fromString","PrivateKeyFinalization","__wbg_privatekey_free","privatekey_new","privatekey_from_seed_unchecked","privatekey_from_string","privatekey_to_string","privatekey_to_view_key","to_address","privatekey_to_address","Address$1","privatekey_sign","newEncrypted","secret","privatekey_newEncrypted","PrivateKeyCiphertext$1","privatekey_toCiphertext","privatekey_fromPrivateKeyCiphertext","PrivateKeyCiphertextFinalization","__wbg_privatekeyciphertext_free","encryptPrivateKey","decryptToPrivateKey","privatekeyciphertext_decryptToPrivateKey","privatekeyciphertext_toString","privatekeyciphertext_fromString","ProgramFinalization","__wbg_program_free","program_fromString","program_toString","hasFunction","program_hasFunction","getFunctions","program_getFunctions","getFunctionInputs","program_getFunctionInputs","getMappings","program_getMappings","getRecordMembers","record_name","program_getRecordMembers","getStructMembers","struct_name","program_getStructMembers","program_getCreditsProgram","program_id","program_address","isEqual","other","program_isEqual","program_getImports","ProgramManagerFinalization","__wbg_programmanager_free","fee_credits","fee_record","fee_proving_key","fee_verifying_key","offline_query","RecordPlaintext$1","ptr2","len2","ptr3","ptr4","ptr5","OfflineQuery$1","programmanager_buildDeploymentTransaction","estimateDeploymentFee","programmanager_estimateDeploymentFee","estimateProgramNameCost","programmanager_estimateProgramNameCost","r2","asUintN","_function","prove_execution","len4","programmanager_executeFunctionOffline","len3","ptr6","ptr7","ptr8","programmanager_buildExecutionTransaction","estimateExecutionFee","programmanager_estimateExecutionFee","estimateFinalizeFee","programmanager_estimateFinalizeFee","record_1","record_2","join_proving_key","join_verifying_key","programmanager_buildJoinTransaction","split_amount","amount_record","split_proving_key","split_verifying_key","programmanager_buildSplitTransaction","amount_credits","transfer_type","transfer_proving_key","transfer_verifying_key","ptr9","programmanager_buildTransferTransaction","programmanager_synthesizeKeyPair","ProvingKeyFinalization","__wbg_provingkey_free","provingkey_isBondPublicProver","isBondValidatorProver","provingkey_isBondValidatorProver","provingkey_isClaimUnbondPublicProver","provingkey_isFeePrivateProver","provingkey_isFeePublicProver","provingkey_isInclusionProver","provingkey_isJoinProver","provingkey_isSetValidatorStateProver","provingkey_isSplitProver","provingkey_isTransferPrivateProver","provingkey_isTransferPrivateToPublicProver","provingkey_isTransferPublicProver","isTransferPublicAsSignerProver","provingkey_isTransferPublicAsSignerProver","provingkey_isTransferPublicToPrivateProver","provingkey_isUnbondPublicProver","checksum","provingkey_checksum","copy","provingkey_copy","bytes","provingkey_fromBytes","string","provingkey_fromString","provingkey_toBytes","v1","provingkey_toString","RecordCiphertextFinalization","__wbg_recordciphertext_free","recordciphertext_fromString","recordciphertext_toString","recordciphertext_decrypt","recordciphertext_isOwner","RecordPlaintextFinalization","__wbg_recordplaintext_free","recordplaintext_commitment","Field$1","recordplaintext_fromString","recordplaintext_toString","recordplaintext_microcredits","recordplaintext_nonce","deferred4_0","deferred4_1","recordplaintext_serialNumberString","r3","SignatureFinalization","__wbg_signature_free","Signature","signature_verify","signature_from_string","signature_to_string","TransactionFinalization","__wbg_transaction_free","transaction_fromString","transaction_toString","transactionId","transaction_transactionId","transactionType","transaction_transactionType","VerifyingKeyFinalization","__wbg_verifyingkey_free","verifyingkey_bondPublicVerifier","bondValidatorVerifier","verifyingkey_bondValidatorVerifier","verifyingkey_claimUnbondPublicVerifier","verifyingkey_feePrivateVerifier","verifyingkey_feePublicVerifier","inclusionVerifier","verifyingkey_inclusionVerifier","verifyingkey_joinVerifier","verifyingkey_setValidatorStateVerifier","verifyingkey_splitVerifier","verifyingkey_transferPrivateVerifier","verifyingkey_transferPrivateToPublicVerifier","verifyingkey_transferPublicVerifier","transferPublicAsSignerVerifier","verifyingkey_transferPublicAsSignerVerifier","verifyingkey_transferPublicToPrivateVerifier","verifyingkey_unbondPublicVerifier","verifyingkey_isBondPublicVerifier","isBondValidatorVerifier","verifyingkey_isBondValidatorVerifier","verifyingkey_isClaimUnbondPublicVerifier","verifyingkey_isFeePrivateVerifier","verifyingkey_isFeePublicVerifier","verifyingkey_isInclusionVerifier","verifyingkey_isJoinVerifier","verifyingkey_isSetValidatorStateVerifier","verifyingkey_isSplitVerifier","verifyingkey_isTransferPrivateVerifier","verifyingkey_isTransferPrivateToPublicVerifier","verifyingkey_isTransferPublicVerifier","isTransferPublicAsSignerVerifier","verifyingkey_isTransferPublicAsSignerVerifier","verifyingkey_isTransferPublicToPrivateVerifier","verifyingkey_isUnbondPublicVerifier","verifyingkey_checksum","verifyingkey_copy","verifyingkey_fromBytes","verifyingkey_fromString","verifyingkey_toBytes","verifyingkey_toString","ViewKeyFinalization","__wbg_viewkey_free","viewkey_from_string","viewkey_to_string","deferred3_0","deferred3_1","viewkey_decrypt","__wbg_load","Response","WebAssembly","instantiateStreaming","instantiate","Instance","__wbg_get_imports","wbg","__wbindgen_object_drop_ref","__wbg_new_71801a555ad9f2aa","XMLHttpRequest","arguments","__wbg_overrideMimeType_ee9c51919ceb418b","overrideMimeType","__wbg_open_c9eb0cf2c9d95679","arg4","arg5","open","__wbg_send_80d29985093c1ec5","send","__wbg_response_7c2e2759084f7279","__wbg_status_d485fb5a478426fb","__wbg_new_72fb9a18b5ae2624","__wbindgen_string_new","__wbg_set_1f9b04f170055d33","Reflect","__wbg_new_ab6fd82b10560829","Headers","__wbindgen_object_clone_ref","__wbg_new_0d76b0581eca6298","AbortController","__wbg_signal_a61f78a3478fd9bc","signal","__wbg_append_7bfcb4937d1d5e29","append","__wbg_instanceof_Response_849eb93e75734b6e","result","__wbg_status_61a01141acd3cf74","__wbg_url_5f6dc4009ac5f99d","__wbg_headers_9620bfada380764a","__wbg_iterator_2cee6dadfd956dfa","Symbol","iterator","__wbg_get_e3c254076557e348","__wbindgen_is_function","__wbg_call_27c0f87801dedf93","__wbindgen_is_object","__wbg_next_40fc327bfc8770e6","next","__wbg_next_196c84450b364254","__wbg_done_298b57d23c0fc80c","done","__wbg_value_d93c65011f51a456","__wbg_abort_2aa7521d5690750e","abort","__wbg_stringify_8887fe74e1c50d81","__wbindgen_string_get","__wbg_executionresponse_new","ExecutionResponse$1","__wbg_call_b3ca7c6051f9bec1","__wbg_log_0159ca40cddf5b15","__wbg_newwithlength_66ae46612e7f0234","__wbg_set_d4638f722068f043","__wbg_transaction_new","Transaction$1","__wbindgen_bigint_from_u64","__wbg_keypair_new","__wbindgen_module","__wbg_init","__wbindgen_wasm_module","__wbindgen_memory","__wbg_spawnWorker_f6acaddb2e29dc4a","__wbindgen_cb_drop","__wbg_new_16b304a2cfa7ff4a","__wbg_push_a5b05aedc7234f9f","__wbg_arrayBuffer_29931d52c7206b02","__wbg_new_63b92bc8671ed464","__wbg_length_c20a40f15020d68a","__wbg_new_81740750da40724f","state0","cb0","__wbindgen_number_new","__wbg_new_abda76e883ba8a5f","__wbg_stack_658279fe44541cf6","__wbg_error_f851667af71bcfc6","deferred0_0","deferred0_1","__wbg_buffer_12d079cc21e14bdb","__wbg_newwithbyteoffsetandlength_aa4a17c33a06e5cb","__wbg_randomFillSync_5c9c955aa56b6049","randomFillSync","__wbg_subarray_a1f73cd4b5b42fe1","__wbg_getRandomValues_3aa56aa6edec874c","getRandomValues","__wbg_set_a47bac70306a19a7","__wbg_crypto_1d1f22824a6a080c","crypto","__wbg_process_4a72847cc503995b","process","__wbg_versions_f686565e586dd935","versions","__wbg_node_104a2ff8d6ea03a2","node","__wbindgen_is_string","__wbg_require_cca90b1a94a0255b","require","__wbg_msCrypto_eb05e62b530a1508","msCrypto","__wbg_newwithlength_e9b4878cebadb3d3","__wbg_length_cd7af8117672b8b8","__wbg_get_bd8e338fbd5f5cc8","__wbg_self_ce0dbfc45cf2f5be","self","__wbg_window_c6fb939a7f436783","window","__wbg_globalThis_d1e6af4856ba331b","globalThis","__wbg_global_207b558942527489","global","__wbindgen_is_undefined","__wbg_newnoargs_e258087cd0daa0ea","Function","__wbg_has_0af94d20077affa2","__wbg_fetch_bc7c8e27076a5c84","__wbg_fetch_921fad6ef9e883dd","__wbindgen_debug_string","__wbindgen_throw","__wbindgen_rethrow","__wbg_then_a73caa9a87991566","then","__wbg_then_0c86a60e8fcfe9f6","__wbg_queueMicrotask_481971b0d87f3dd4","queueMicrotask","__wbg_queueMicrotask_3cbae2ec6b6cd3d6","__wbg_resolve_b0083a7967828ec8","__wbg_waitAsync_5d743fc9058ba01a","Atomics","waitAsync","__wbg_new_8cccba86b0f574cb","__wbg_waitAsync_46d5c36955b71a79","__wbg_async_19c0400d97cc72fe","__wbg_value_571d60108110e917","__wbindgen_link_fc1eedd35dc7e0a6","encodeURIComponent","__wbg_new_d1187ae36d662ef9","__wbg_setonmessage_503809e5bb51bd33","onmessage","__wbg_of_6a70eed8d41f469c","of","__wbg_postMessage_7380d10e8b8269df","__wbg_data_3ce7c145ca4fbcdc","__wbg_newwithstrandinit_3fd6fba4083ff2d0","Request","__wbg_responseText_c67ed2d48db10769","responseText","__wbindgen_closure_wrapper5837","__wbindgen_closure_wrapper5862","__wbg_init_memory","maybe_memory","Memory","initial","maximum","shared","__wbg_finalize_init","exports","__wbindgen_start","initSync","Module","input","freeze","__proto__","Metadata$1","RecordCiphertext$1","default","wasm_path","wasmInitThreadPool","Private","opt","importHook","serverPath","initializeHook","final_path","Cargo","threads","navigator","hardwareConcurrency","info","proxyMarker","createEndpoint","releaseProxy","finalizer","throwMarker","isObject","transferHandlers","canHandle","serialize","port1","port2","MessageChannel","expose","deserialize","port","serialized","isError","ep","allowedOrigins","callback","ev","origin","allowedOrigin","RegExp","test","isAllowedOrigin","path","argumentList","fromWireValue","returnValue","parent","reduce","prop","rawValue","proxy","transfers","transferCache","catch","wireValue","transferables","toWireValue","removeEventListener","closeEndPoint","TypeError","endpoint","isMessagePort","close","target","createProxy","throwIfProxyReleased","isReleased","releaseEndpoint","requestResponseMessage","proxyCounter","WeakMap","proxyFinalizers","newCount","isProxyReleased","Proxy","_target","unregisterProxy","r","p","bind","_thisArg","rawArgumentList","last","processArguments","construct","registerProxy","processed","v","arr","concat","handler","serializedValue","msg","floor","random","Number","MAX_SAFE_INTEGER"],"sourceRoot":""} \ No newline at end of file diff --git a/530.bundle.js.map b/530.bundle.js.map index fe5449411..855b05b5a 100644 --- a/530.bundle.js.map +++ b/530.bundle.js.map @@ -1 +1 @@ -{"version":3,"file":"530.bundle.js","mappings":";UAAIA,EACAC,EACAC,EACAC,ECHAC,ECAAC,+KCAGC,eAAeC,EAAIC,EAAmBC,GACzC,MAAMC,QAAiBC,MAAMH,EAAKC,GAElC,IAAKC,EAASE,GACV,MAAM,IAAIC,MAAMH,EAASI,OAAS,sBAAwBN,GAG9D,OAAOE,CACX,CAGOJ,eAAeS,EAAKP,EAAmBC,GAC1CA,EAAQO,OAAS,OAEjB,MAAMN,QAAiBC,MAAMH,EAAKC,GAElC,IAAKC,EAASE,GACV,MAAM,IAAIC,MAAMH,EAASI,OAAS,uBAAyBN,GAG/D,OAAOE,CACX,CCUA,MAAMO,EACJC,KACAC,QACAC,QAEAC,WAAAA,CAAYH,EAAcT,GACxBa,KAAKJ,KAAOA,EAAO,WAEfT,GAAWA,EAAQU,QACrBG,KAAKH,QAAUV,EAAQU,QAGvBG,KAAKH,QAAU,CAEb,qBAAsB,UAa5BI,UAAAA,CAAWH,GACTE,KAAKF,QAAUA,EASjBI,UAAAA,GACE,OAAOF,KAAKF,QASdK,OAAAA,CAAQP,GACNI,KAAKJ,KAAOA,EAAO,WAGrB,eAAMQ,CACFlB,EAAM,KAER,IACA,MAAME,QAAiBH,EAAIe,KAAKJ,KAAOV,EAAK,CAC1CW,QAASG,KAAKH,UAGhB,aAAaT,EAASiB,OACpB,MAAOC,GACP,MAAM,IAAIf,MAAM,yBA2BpB,wBAAMgB,CACFC,EACAC,EACAC,EACAC,EACAC,EACAC,GAIF,GAFAA,EAASA,GAAU,GAEfL,EAAc,EAChB,MAAM,IAAIjB,MAAM,mDAIlB,MAAMuB,EAAU,IAAIC,MACpB,IAAIC,EACAC,EACAC,EAGAC,EAFAC,EAAW,EACXC,EAAmBC,OAAO,GAI9B,QAA0B,IAAfZ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BCyD,IACnB,IAAKgU,EAAUiC,EAAaC,GAAWlW,EACvC,IAAI,IAAIiS,KAAYgE,EAChBjE,EAAoBwC,EAAEyB,EAAahE,KACrCD,EAAoBM,EAAEL,GAAYgE,EAAYhE,IAIhD,IADGiE,GAASA,EAAQlE,GACdgC,EAASnZ,QACdib,EAAgB9B,EAASmC,OAAS,EACnCH,EAA2BhW,EAAK,MfnB7BrI,EAAOqa,EAAoBO,EAC/BP,EAAoBO,EAAI,IAChBP,EAAoBzN,EAAE,KAAKwK,KAAKpX,GgBDdqa,EAAoBO","sources":["webpack://aleo-website/webpack/runtime/async module","webpack://aleo-website/webpack/runtime/chunk loaded","webpack://aleo-website/webpack/runtime/startup chunk dependencies","webpack://aleo-website/../src/utils.ts","webpack://aleo-website/../src/network-client.ts","webpack://aleo-website/../src/function-key-provider.ts","webpack://aleo-website/../src/program-manager.ts","webpack://aleo-website/../src/index.ts","webpack://aleo-website/../src/worker.ts","webpack://aleo-website/../node_modules/comlink/dist/esm/comlink.mjs","webpack://aleo-website/webpack/bootstrap","webpack://aleo-website/webpack/runtime/define property getters","webpack://aleo-website/webpack/runtime/ensure chunk","webpack://aleo-website/webpack/runtime/get javascript chunk filename","webpack://aleo-website/webpack/runtime/global","webpack://aleo-website/webpack/runtime/hasOwnProperty shorthand","webpack://aleo-website/webpack/runtime/publicPath","webpack://aleo-website/webpack/runtime/importScripts chunk loading","webpack://aleo-website/webpack/startup"],"sourcesContent":["var webpackQueues = typeof Symbol === \"function\" ? Symbol(\"webpack queues\") : \"__webpack_queues__\";\nvar webpackExports = typeof Symbol === \"function\" ? Symbol(\"webpack exports\") : \"__webpack_exports__\";\nvar webpackError = typeof Symbol === \"function\" ? Symbol(\"webpack error\") : \"__webpack_error__\";\nvar resolveQueue = (queue) => {\n\tif(queue && queue.d < 1) {\n\t\tqueue.d = 1;\n\t\tqueue.forEach((fn) => (fn.r--));\n\t\tqueue.forEach((fn) => (fn.r-- ? fn.r++ : fn()));\n\t}\n}\nvar wrapDeps = (deps) => (deps.map((dep) => {\n\tif(dep !== null && typeof dep === \"object\") {\n\t\tif(dep[webpackQueues]) return dep;\n\t\tif(dep.then) {\n\t\t\tvar queue = [];\n\t\t\tqueue.d = 0;\n\t\t\tdep.then((r) => {\n\t\t\t\tobj[webpackExports] = r;\n\t\t\t\tresolveQueue(queue);\n\t\t\t}, (e) => {\n\t\t\t\tobj[webpackError] = e;\n\t\t\t\tresolveQueue(queue);\n\t\t\t});\n\t\t\tvar obj = {};\n\t\t\tobj[webpackQueues] = (fn) => (fn(queue));\n\t\t\treturn obj;\n\t\t}\n\t}\n\tvar ret = {};\n\tret[webpackQueues] = x => {};\n\tret[webpackExports] = dep;\n\treturn ret;\n}));\n__webpack_require__.a = (module, body, hasAwait) => {\n\tvar queue;\n\thasAwait && ((queue = []).d = -1);\n\tvar depQueues = new Set();\n\tvar exports = module.exports;\n\tvar currentDeps;\n\tvar outerResolve;\n\tvar reject;\n\tvar promise = new Promise((resolve, rej) => {\n\t\treject = rej;\n\t\touterResolve = resolve;\n\t});\n\tpromise[webpackExports] = exports;\n\tpromise[webpackQueues] = (fn) => (queue && fn(queue), depQueues.forEach(fn), promise[\"catch\"](x => {}));\n\tmodule.exports = promise;\n\tbody((deps) => {\n\t\tcurrentDeps = wrapDeps(deps);\n\t\tvar fn;\n\t\tvar getResult = () => (currentDeps.map((d) => {\n\t\t\tif(d[webpackError]) throw d[webpackError];\n\t\t\treturn d[webpackExports];\n\t\t}))\n\t\tvar promise = new Promise((resolve) => {\n\t\t\tfn = () => (resolve(getResult));\n\t\t\tfn.r = 0;\n\t\t\tvar fnQueue = (q) => (q !== queue && !depQueues.has(q) && (depQueues.add(q), q && !q.d && (fn.r++, q.push(fn))));\n\t\t\tcurrentDeps.map((dep) => (dep[webpackQueues](fnQueue)));\n\t\t});\n\t\treturn fn.r ? promise : getResult();\n\t}, (err) => ((err ? reject(promise[webpackError] = err) : outerResolve(exports)), resolveQueue(queue)));\n\tqueue && queue.d < 0 && (queue.d = 0);\n};","var deferred = [];\n__webpack_require__.O = (result, chunkIds, fn, priority) => {\n\tif(chunkIds) {\n\t\tpriority = priority || 0;\n\t\tfor(var i = deferred.length; i > 0 && deferred[i - 1][2] > priority; i--) deferred[i] = deferred[i - 1];\n\t\tdeferred[i] = [chunkIds, fn, priority];\n\t\treturn;\n\t}\n\tvar notFulfilled = Infinity;\n\tfor (var i = 0; i < deferred.length; i++) {\n\t\tvar [chunkIds, fn, priority] = deferred[i];\n\t\tvar fulfilled = true;\n\t\tfor (var j = 0; j < chunkIds.length; j++) {\n\t\t\tif ((priority & 1 === 0 || notFulfilled >= priority) && Object.keys(__webpack_require__.O).every((key) => (__webpack_require__.O[key](chunkIds[j])))) {\n\t\t\t\tchunkIds.splice(j--, 1);\n\t\t\t} else {\n\t\t\t\tfulfilled = false;\n\t\t\t\tif(priority < notFulfilled) notFulfilled = priority;\n\t\t\t}\n\t\t}\n\t\tif(fulfilled) {\n\t\t\tdeferred.splice(i--, 1)\n\t\t\tvar r = fn();\n\t\t\tif (r !== undefined) result = r;\n\t\t}\n\t}\n\treturn result;\n};","var next = __webpack_require__.x;\n__webpack_require__.x = () => {\n\treturn __webpack_require__.e(933).then(next);\n};","export async function get(url: URL | string, options?: RequestInit) {\n const response = await fetch(url, options);\n\n if (!response.ok) {\n throw new Error(response.status + \" could not get URL \" + url);\n }\n\n return response;\n}\n\n\nexport async function post(url: URL | string, options: RequestInit) {\n options.method = \"POST\";\n\n const response = await fetch(url, options);\n\n if (!response.ok) {\n throw new Error(response.status + \" could not post URL \" + url);\n }\n\n return response;\n}\n","import { get, post } from \"./utils\";\nimport {\n Account,\n Block,\n RecordCiphertext,\n Program,\n RecordPlaintext,\n PrivateKey,\n Transaction,\n TransactionModel,\n logAndThrow\n} from \"./index\";\n\ntype ProgramImports = { [key: string]: string | Program };\n\ninterface AleoNetworkClientOptions {\n headers?: { [key: string]: string };\n}\n\n/**\n * Client library that encapsulates REST calls to publicly exposed endpoints of Aleo nodes. The methods provided in this\n * allow users to query public information from the Aleo blockchain and submit transactions to the network.\n *\n * @param {string} host\n * @example\n * // Connection to a local node\n * const localNetworkClient = new AleoNetworkClient(\"http://localhost:3030\");\n *\n * // Connection to a public beacon node\n * const publicnetworkClient = new AleoNetworkClient(\"https://api.explorer.aleo.org/v1\");\n */\nclass AleoNetworkClient {\n host: string;\n headers: { [key: string]: string };\n account: Account | undefined;\n\n constructor(host: string, options?: AleoNetworkClientOptions) {\n this.host = host + \"/testnet\";\n\n if (options && options.headers) {\n this.headers = options.headers;\n\n } else {\n this.headers = {\n // This is replaced by the actual version by a Rollup plugin\n \"X-Aleo-SDK-Version\": \"%%VERSION%%\",\n };\n }\n }\n\n /**\n * Set an account to use in networkClient calls\n *\n * @param {Account} account\n * @example\n * const account = new Account();\n * networkClient.setAccount(account);\n */\n setAccount(account: Account) {\n this.account = account;\n }\n\n /**\n * Return the Aleo account used in the networkClient\n *\n * @example\n * const account = networkClient.getAccount();\n */\n getAccount(): Account | undefined {\n return this.account;\n }\n\n /**\n * Set a new host for the networkClient\n *\n * @param {string} host The address of a node hosting the Aleo API\n * @param host\n */\n setHost(host: string) {\n this.host = host + \"/testnet\";\n }\n\n async fetchData(\n url = \"/\",\n ): Promise {\n try {\n const response = await get(this.host + url, {\n headers: this.headers\n });\n\n return await response.json();\n } catch (error) {\n throw new Error(\"Error fetching data.\");\n }\n }\n\n /**\n * Attempts to find unspent records in the Aleo blockchain for a specified private key\n * @param {number} startHeight - The height at which to start searching for unspent records\n * @param {number} endHeight - The height at which to stop searching for unspent records\n * @param {string | PrivateKey} privateKey - The private key to use to find unspent records\n * @param {number[]} amounts - The amounts (in microcredits) to search for (eg. [100, 200, 3000])\n * @param {number} maxMicrocredits - The maximum number of microcredits to search for\n * @param {string[]} nonces - The nonces of already found records to exclude from the search\n *\n * @example\n * // Find all unspent records\n * const privateKey = \"[PRIVATE_KEY]\";\n * const records = networkClient.findUnspentRecords(0, undefined, privateKey);\n *\n * // Find specific amounts\n * const startHeight = 500000;\n * const amounts = [600000, 1000000];\n * const records = networkClient.findUnspentRecords(startHeight, undefined, privateKey, amounts);\n *\n * // Find specific amounts with a maximum number of cumulative microcredits\n * const maxMicrocredits = 100000;\n * const records = networkClient.findUnspentRecords(startHeight, undefined, privateKey, undefined, maxMicrocredits);\n */\n async findUnspentRecords(\n startHeight: number,\n endHeight: number | undefined,\n privateKey: string | PrivateKey | undefined,\n amounts: number[] | undefined,\n maxMicrocredits?: number | undefined,\n nonces?: string[] | undefined,\n ): Promise | Error> {\n nonces = nonces || [];\n // Ensure start height is not negative\n if (startHeight < 0) {\n throw new Error(\"Start height must be greater than or equal to 0\");\n }\n\n // Initialize search parameters\n const records = new Array();\n let start;\n let end;\n let resolvedPrivateKey: PrivateKey;\n let failures = 0;\n let totalRecordValue = BigInt(0);\n let latestHeight: number;\n\n // Ensure a private key is present to find owned records\n if (typeof privateKey === \"undefined\") {\n if (typeof this.account === \"undefined\") {\n throw new Error(\"Private key must be specified in an argument to findOwnedRecords or set in the AleoNetworkClient\");\n } else {\n resolvedPrivateKey = this.account._privateKey;\n }\n } else {\n try {\n resolvedPrivateKey = privateKey instanceof PrivateKey ? privateKey : PrivateKey.from_string(privateKey);\n } catch (error) {\n throw new Error(\"Error parsing private key provided.\");\n }\n }\n const viewKey = resolvedPrivateKey.to_view_key();\n\n // Get the latest height to ensure the range being searched is valid\n try {\n const blockHeight = await this.getLatestHeight();\n if (typeof blockHeight === \"number\") {\n latestHeight = blockHeight;\n } else {\n throw new Error(\"Error fetching latest block height.\");\n }\n } catch (error) {\n throw new Error(\"Error fetching latest block height.\");\n }\n\n // If no end height is specified or is greater than the latest height, set the end height to the latest height\n if (typeof endHeight === \"number\" && endHeight <= latestHeight) {\n end = endHeight\n } else {\n end = latestHeight;\n }\n\n // If the starting is greater than the ending height, return an error\n if (startHeight > end) {\n throw new Error(\"Start height must be less than or equal to end height.\");\n }\n\n // Iterate through blocks in reverse order in chunks of 50\n while (end > startHeight) {\n start = end - 50;\n if (start < startHeight) {\n start = startHeight;\n }\n try {\n // Get 50 blocks (or the difference between the start and end if less than 50)\n const blocks = await this.getBlockRange(start, end);\n end = start;\n if (!(blocks instanceof Error)) {\n // Iterate through blocks to find unspent records\n for (let i = 0; i < blocks.length; i++) {\n const block = blocks[i];\n const transactions = block.transactions;\n if (!(typeof transactions === \"undefined\")) {\n for (let j = 0; j < transactions.length; j++) {\n const confirmedTransaction = transactions[j];\n // Search for unspent records in execute transactions of credits.aleo\n if (confirmedTransaction.type == \"execute\") {\n const transaction = confirmedTransaction.transaction;\n if (transaction.execution && !(typeof transaction.execution.transitions == \"undefined\")) {\n for (let k = 0; k < transaction.execution.transitions.length; k++) {\n const transition = transaction.execution.transitions[k];\n // Only search for unspent records in credits.aleo (for now)\n if (transition.program !== \"credits.aleo\") {\n continue;\n }\n if (!(typeof transition.outputs == \"undefined\")) {\n for (let l = 0; l < transition.outputs.length; l++) {\n const output = transition.outputs[l];\n if (output.type === \"record\") {\n try {\n // Create a wasm record ciphertext object from the found output\n const record = RecordCiphertext.fromString(output.value);\n // Determine if the record is owned by the specified view key\n if (record.isOwner(viewKey)) {\n // Decrypt the record and get the serial number\n const recordPlaintext = record.decrypt(viewKey);\n\n // If the record has already been found, skip it\n const nonce = recordPlaintext.nonce();\n if (nonces.includes(nonce)) {\n continue;\n }\n\n // Otherwise record the nonce that has been found\n const serialNumber = recordPlaintext.serialNumberString(resolvedPrivateKey, \"credits.aleo\", \"credits\");\n // Attempt to see if the serial number is spent\n try {\n await this.getTransitionId(serialNumber);\n } catch (error) {\n // If it's not found, add it to the list of unspent records\n if (!amounts) {\n records.push(recordPlaintext);\n // If the user specified a maximum number of microcredits, check if the search has found enough\n if (typeof maxMicrocredits === \"number\") {\n totalRecordValue += recordPlaintext.microcredits();\n // Exit if the search has found the amount specified\n if (totalRecordValue >= BigInt(maxMicrocredits)) {\n return records;\n }\n }\n }\n // If the user specified a list of amounts, check if the search has found them\n if (!(typeof amounts === \"undefined\") && amounts.length > 0) {\n let amounts_found = 0;\n if (recordPlaintext.microcredits() > amounts[amounts_found]) {\n amounts_found += 1;\n records.push(recordPlaintext);\n // If the user specified a maximum number of microcredits, check if the search has found enough\n if (typeof maxMicrocredits === \"number\") {\n totalRecordValue += recordPlaintext.microcredits();\n // Exit if the search has found the amount specified\n if (totalRecordValue >= BigInt(maxMicrocredits)) {\n return records;\n }\n }\n if (records.length >= amounts.length) {\n return records;\n }\n }\n }\n }\n }\n } catch (error) {\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n } catch (error) {\n // If there is an error fetching blocks, log it and keep searching\n console.warn(\"Error fetching blocks in range: \" + start.toString() + \"-\" + end.toString());\n console.warn(\"Error: \", error);\n failures += 1;\n if (failures > 10) {\n console.warn(\"10 failures fetching records reached. Returning records fetched so far\");\n return records;\n }\n }\n }\n return records;\n }\n\n /**\n * Returns the contents of the block at the specified block height\n *\n * @param {number} height\n * @example\n * const block = networkClient.getBlock(1234);\n */\n async getBlock(height: number): Promise {\n try {\n const block = await this.fetchData(\"/block/\" + height);\n return block;\n } catch (error) {\n throw new Error(\"Error fetching block.\");\n }\n }\n\n /**\n * Returns a range of blocks between the specified block heights\n *\n * @param {number} start\n * @param {number} end\n * @example\n * const blockRange = networkClient.getBlockRange(2050, 2100);\n */\n async getBlockRange(start: number, end: number): Promise | Error> {\n try {\n return await this.fetchData>(\"/blocks?start=\" + start + \"&end=\" + end);\n } catch (error) {\n const errorMessage = \"Error fetching blocks between \" + start + \" and \" + end + \".\"\n throw new Error(errorMessage);\n }\n }\n\n /**\n * Returns the deployment transaction id associated with the specified program\n *\n * @param {Program | string} program\n * @returns {TransactionModel | Error}\n */\n async getDeploymentTransactionIDForProgram(program: Program | string): Promise {\n if (program instanceof Program) {\n program = program.toString();\n }\n try {\n const id = await this.fetchData(\"/find/transactionID/deployment/\" + program);\n return id.replace(\"\\\"\", \"\")\n } catch (error) {\n throw new Error(\"Error fetching deployment transaction for program.\");\n }\n }\n\n /**\n * Returns the deployment transaction associated with a specified program\n *\n * @param {Program | string} program\n * @returns {TransactionModel | Error}\n */\n async getDeploymentTransactionForProgram(program: Program | string): Promise {\n try {\n const transaction_id = await this.getDeploymentTransactionIDForProgram(program);\n return await this.getTransaction(transaction_id);\n } catch (error) {\n throw new Error(\"Error fetching deployment transaction for program.\");\n }\n }\n\n /**\n * Returns the contents of the latest block\n *\n * @example\n * const latestHeight = networkClient.getLatestBlock();\n */\n async getLatestBlock(): Promise {\n try {\n return await this.fetchData(\"/latest/block\") as Block;\n } catch (error) {\n throw new Error(\"Error fetching latest block.\");\n }\n }\n\n /**\n * Returns the latest committee\n *\n * @returns {Promise} A javascript object containing the latest committee\n */\n async getLatestCommittee(): Promise {\n try {\n return await this.fetchData(\"/committee/latest\");\n } catch (error) {\n throw new Error(\"Error fetching latest block.\");\n }\n }\n\n /**\n * Returns the latest block height\n *\n * @example\n * const latestHeight = networkClient.getLatestHeight();\n */\n async getLatestHeight(): Promise {\n try {\n return await this.fetchData(\"/latest/height\");\n } catch (error) {\n throw new Error(\"Error fetching latest height.\");\n }\n }\n\n /**\n * Returns the source code of a program given a program ID\n *\n * @param {string} programId The program ID of a program deployed to the Aleo Network\n * @return {Promise} Source code of the program\n *\n * @example\n * const program = networkClient.getProgram(\"hello_hello.aleo\");\n * const expectedSource = \"program hello_hello.aleo;\\n\\nfunction hello:\\n input r0 as u32.public;\\n input r1 as u32.private;\\n add r0 r1 into r2;\\n output r2 as u32.private;\\n\"\n * assert.equal(program, expectedSource);\n */\n async getProgram(programId: string): Promise {\n try {\n return await this.fetchData(\"/program/\" + programId)\n } catch (error) {\n throw new Error(\"Error fetching program\");\n }\n }\n\n /**\n * Returns a program object from a program ID or program source code\n *\n * @param {string} inputProgram The program ID or program source code of a program deployed to the Aleo Network\n * @return {Promise} Source code of the program\n *\n * @example\n * const programID = \"hello_hello.aleo\";\n * const programSource = \"program hello_hello.aleo;\\n\\nfunction hello:\\n input r0 as u32.public;\\n input r1 as u32.private;\\n add r0 r1 into r2;\\n output r2 as u32.private;\\n\"\n *\n * // Get program object from program ID or program source code\n * const programObjectFromID = await networkClient.getProgramObject(programID);\n * const programObjectFromSource = await networkClient.getProgramObject(programSource);\n *\n * // Both program objects should be equal\n * assert.equal(programObjectFromID.to_string(), programObjectFromSource.to_string());\n */\n async getProgramObject(inputProgram: string): Promise {\n try {\n return Program.fromString(inputProgram);\n } catch (error) {\n try {\n return Program.fromString((await this.getProgram(inputProgram)));\n } catch (error) {\n throw new Error(`${inputProgram} is neither a program name or a valid program`);\n }\n }\n }\n\n /**\n * Returns an object containing the source code of a program and the source code of all programs it imports\n *\n * @param {Program | string} inputProgram The program ID or program source code of a program deployed to the Aleo Network\n * @returns {Promise} Object of the form { \"program_id\": \"program_source\", .. } containing program id & source code for all program imports\n *\n * @example\n * const double_test_source = \"import multiply_test.aleo;\\n\\nprogram double_test.aleo;\\n\\nfunction double_it:\\n input r0 as u32.private;\\n call multiply_test.aleo/multiply 2u32 r0 into r1;\\n output r1 as u32.private;\\n\"\n * const double_test = Program.fromString(double_test_source);\n * const expectedImports = {\n * \"multiply_test.aleo\": \"program multiply_test.aleo;\\n\\nfunction multiply:\\n input r0 as u32.public;\\n input r1 as u32.private;\\n mul r0 r1 into r2;\\n output r2 as u32.private;\\n\"\n * }\n *\n * // Imports can be fetched using the program ID, source code, or program object\n * let programImports = await networkClient.getProgramImports(\"double_test.aleo\");\n * assert.deepStrictEqual(programImports, expectedImports);\n *\n * // Using the program source code\n * programImports = await networkClient.getProgramImports(double_test_source);\n * assert.deepStrictEqual(programImports, expectedImports);\n *\n * // Using the program object\n * programImports = await networkClient.getProgramImports(double_test);\n * assert.deepStrictEqual(programImports, expectedImports);\n */\n async getProgramImports(inputProgram: Program | string): Promise {\n try {\n const imports: ProgramImports = {};\n\n // Get the program object or fail if the program is not valid or does not exist\n const program = inputProgram instanceof Program ? inputProgram : (await this.getProgramObject(inputProgram));\n\n // Get the list of programs that the program imports\n const importList = program.getImports();\n\n // Recursively get any imports that the imported programs have in a depth first search order\n for (let i = 0; i < importList.length; i++) {\n const import_id = importList[i];\n if (!imports.hasOwnProperty(import_id)) {\n const programSource = await this.getProgram(import_id);\n const nestedImports = await this.getProgramImports(import_id);\n for (const key in nestedImports) {\n if (!imports.hasOwnProperty(key)) {\n imports[key] = nestedImports[key];\n }\n }\n imports[import_id] = programSource;\n }\n }\n return imports;\n } catch (error) {\n throw logAndThrow(\"Error fetching program imports: \" + error)\n }\n }\n\n /**\n * Get a list of the program names that a program imports\n *\n * @param {Program | string} inputProgram - The program id or program source code to get the imports of\n * @returns {string[]} - The list of program names that the program imports\n *\n * @example\n * const programImportsNames = networkClient.getProgramImports(\"double_test.aleo\");\n * const expectedImportsNames = [\"multiply_test.aleo\"];\n * assert.deepStrictEqual(programImportsNames, expectedImportsNames);\n */\n async getProgramImportNames(inputProgram: Program | string): Promise {\n try {\n const program = inputProgram instanceof Program ? inputProgram : (await this.getProgramObject(inputProgram));\n return program.getImports();\n } catch (error) {\n throw new Error(\"Error fetching program imports with error: \" + error);\n }\n }\n\n /**\n * Returns the names of the mappings of a program\n *\n * @param {string} programId - The program ID to get the mappings of (e.g. \"credits.aleo\")\n * @example\n * const mappings = networkClient.getProgramMappingNames(\"credits.aleo\");\n * const expectedMappings = [\"account\"];\n * assert.deepStrictEqual(mappings, expectedMappings);\n */\n async getProgramMappingNames(programId: string): Promise | Error> {\n try {\n return await this.fetchData>(\"/program/\" + programId + \"/mappings\")\n } catch (error) {\n throw new Error(\"Error fetching program mappings - ensure the program exists on chain before trying again\");\n }\n }\n\n /**\n * Returns the value of a program's mapping for a specific key\n *\n * @param {string} programId - The program ID to get the mapping value of (e.g. \"credits.aleo\")\n * @param {string} mappingName - The name of the mapping to get the value of (e.g. \"account\")\n * @param {string} key - The key of the mapping to get the value of (e.g. \"aleo1rhgdu77hgyqd3xjj8ucu3jj9r2krwz6mnzyd80gncr5fxcwlh5rsvzp9px\")\n * @return {Promise} String representation of the value of the mapping\n *\n * @example\n * // Get public balance of an account\n * const mappingValue = networkClient.getMappingValue(\"credits.aleo\", \"account\", \"aleo1rhgdu77hgyqd3xjj8ucu3jj9r2krwz6mnzyd80gncr5fxcwlh5rsvzp9px\");\n * const expectedValue = \"0u64\";\n * assert.equal(mappingValue, expectedValue);\n */\n async getProgramMappingValue(programId: string, mappingName: string, key: string): Promise {\n try {\n return await this.fetchData(\"/program/\" + programId + \"/mapping/\" + mappingName + \"/\" + key)\n } catch (error) {\n throw new Error(\"Error fetching mapping value - ensure the mapping exists and the key is correct\");\n }\n }\n\n /**\n * Returns the latest state/merkle root of the Aleo blockchain\n *\n * @example\n * const stateRoot = networkClient.getStateRoot();\n */\n async getStateRoot(): Promise {\n try {\n return await this.fetchData(\"/latest/stateRoot\");\n } catch (error) {\n throw new Error(\"Error fetching Aleo state root\");\n }\n }\n\n /**\n * Returns a transaction by its unique identifier\n *\n * @param {string} id\n * @example\n * const transaction = networkClient.getTransaction(\"at1handz9xjrqeynjrr0xay4pcsgtnczdksz3e584vfsgaz0dh0lyxq43a4wj\");\n */\n async getTransaction(id: string): Promise {\n try {\n return await this.fetchData(\"/transaction/\" + id);\n } catch (error) {\n throw new Error(\"Error fetching transaction.\");\n }\n }\n\n /**\n * Returns the transactions present at the specified block height\n *\n * @param {number} height\n * @example\n * const transactions = networkClient.getTransactions(654);\n */\n async getTransactions(height: number): Promise | Error> {\n try {\n return await this.fetchData>(\"/block/\" + height.toString() + \"/transactions\");\n } catch (error) {\n throw new Error(\"Error fetching transactions.\");\n }\n }\n\n /**\n * Returns the transactions in the memory pool.\n *\n * @example\n * const transactions = networkClient.getTransactionsInMempool();\n */\n async getTransactionsInMempool(): Promise | Error> {\n try {\n return await this.fetchData>(\"/memoryPool/transactions\");\n } catch (error) {\n throw new Error(\"Error fetching transactions from mempool.\");\n }\n }\n\n /**\n * Returns the transition ID of the transition corresponding to the ID of the input or output.\n * @param {string} inputOrOutputID - ID of the input or output.\n *\n * @example\n * const transitionId = networkClient.getTransitionId(\"2429232855236830926144356377868449890830704336664550203176918782554219952323field\");\n */\n async getTransitionId(inputOrOutputID: string): Promise {\n try {\n return await this.fetchData(\"/find/transitionID/\" + inputOrOutputID);\n } catch (error) {\n throw new Error(\"Error fetching transition ID.\");\n }\n }\n\n /**\n * Submit an execute or deployment transaction to the Aleo network\n *\n * @param {Transaction | string} transaction - The transaction to submit to the network\n * @returns {string | Error} - The transaction id of the submitted transaction or the resulting error\n */\n async submitTransaction(transaction: Transaction | string): Promise {\n const transaction_string = transaction instanceof Transaction ? transaction.toString() : transaction;\n try {\n const response = await post(this.host + \"/transaction/broadcast\", {\n body: transaction_string,\n headers: Object.assign({}, this.headers, {\n \"Content-Type\": \"application/json\",\n }),\n });\n\n try {\n return await response.json();\n\n } catch (error) {\n throw new Error(`Error posting transaction. Aleo network response: ${(error as Error).message}`);\n }\n } catch (error) {\n throw new Error(`Error posting transaction: No response received: ${(error as Error).message}`);\n }\n }\n}\n\nexport { AleoNetworkClient, AleoNetworkClientOptions, ProgramImports }\n","import {\n ProvingKey,\n VerifyingKey,\n CREDITS_PROGRAM_KEYS,\n KEY_STORE,\n Key,\n PRIVATE_TRANSFER,\n PRIVATE_TO_PUBLIC_TRANSFER,\n PUBLIC_TRANSFER,\n PUBLIC_TO_PRIVATE_TRANSFER,\n PUBLIC_TRANSFER_AS_SIGNER\n} from \"./index\";\nimport { get } from \"./utils\";\n\ntype FunctionKeyPair = [ProvingKey, VerifyingKey];\ntype CachedKeyPair = [Uint8Array, Uint8Array];\ntype AleoKeyProviderInitParams = {\n proverUri?: string;\n verifierUri?: string;\n cacheKey?: string;\n};\n\n/**\n * Interface for record search parameters. This allows for arbitrary search parameters to be passed to record provider\n * implementations.\n */\ninterface KeySearchParams {\n [key: string]: any; // This allows for arbitrary keys with any type values\n}\n\n/**\n * AleoKeyProviderParams search parameter for the AleoKeyProvider. It allows for the specification of a proverUri and\n * verifierUri to fetch keys via HTTP from a remote resource as well as a unique cacheKey to store the keys in memory.\n */\nclass AleoKeyProviderParams implements KeySearchParams {\n name: string | undefined;\n proverUri: string | undefined;\n verifierUri: string | undefined;\n cacheKey: string | undefined;\n\n /**\n * Create a new AleoKeyProviderParams object which implements the KeySearchParams interface. Users can optionally\n * specify a url for the proverUri & verifierUri to fetch keys via HTTP from a remote resource as well as a unique\n * cacheKey to store the keys in memory for future use. If no proverUri or verifierUri is specified, a cachekey must\n * be provided.\n *\n * @param { AleoKeyProviderInitParams } params - Optional search parameters\n */\n constructor(params: {proverUri?: string, verifierUri?: string, cacheKey?: string, name?: string}) {\n this.proverUri = params.proverUri;\n this.verifierUri = params.verifierUri;\n this.cacheKey = params.cacheKey;\n this.name = params.name;\n }\n}\n\n/**\n * KeyProvider interface. Enables the retrieval of public proving and verifying keys for Aleo Programs.\n */\ninterface FunctionKeyProvider {\n /**\n * Get bond_public function keys from the credits.aleo program\n *\n * @returns {Promise} Proving and verifying keys for the bond_public function\n */\n bondPublicKeys(): Promise;\n\n /**\n * Get bond_validator function keys from the credits.aleo program\n *\n * @returns {Promise} Proving and verifying keys for the bond_validator function\n */\n bondValidatorKeys(): Promise;\n\n /**\n * Cache a set of keys. This will overwrite any existing keys with the same keyId. The user can check if a keyId\n * exists in the cache using the containsKeys method prior to calling this method if overwriting is not desired.\n *\n * @param {string} keyId access key for the cache\n * @param {FunctionKeyPair} keys keys to cache\n */\n cacheKeys(keyId: string, keys: FunctionKeyPair): void;\n\n /**\n * Get unbond_public function keys from the credits.aleo program\n *\n * @returns {Promise} Proving and verifying keys for the unbond_public function\n */\n claimUnbondPublicKeys(): Promise;\n\n /**\n * Get arbitrary function keys from a provider\n *\n * @param {KeySearchParams | undefined} params - Optional search parameters for the key provider\n * @returns {Promise} Proving and verifying keys for the specified program\n *\n * @example\n * // Create a search object which implements the KeySearchParams interface\n * class IndexDbSearch implements KeySearchParams {\n * db: string\n * keyId: string\n * constructor(params: {db: string, keyId: string}) {\n * this.db = params.db;\n * this.keyId = params.keyId;\n * }\n * }\n *\n * // Create a new object which implements the KeyProvider interface\n * class IndexDbKeyProvider implements FunctionKeyProvider {\n * async functionKeys(params: KeySearchParams): Promise {\n * return new Promise((resolve, reject) => {\n * const request = indexedDB.open(params.db, 1);\n *\n * request.onupgradeneeded = function(e) {\n * const db = e.target.result;\n * if (!db.objectStoreNames.contains('keys')) {\n * db.createObjectStore('keys', { keyPath: 'id' });\n * }\n * };\n *\n * request.onsuccess = function(e) {\n * const db = e.target.result;\n * const transaction = db.transaction([\"keys\"], \"readonly\");\n * const store = transaction.objectStore(\"keys\");\n * const request = store.get(params.keyId);\n * request.onsuccess = function(e) {\n * if (request.result) {\n * resolve(request.result as FunctionKeyPair);\n * } else {\n * reject(new Error(\"Key not found\"));\n * }\n * };\n * request.onerror = function(e) { reject(new Error(\"Error fetching key\")); };\n * };\n *\n * request.onerror = function(e) { reject(new Error(\"Error opening database\")); };\n * });\n * }\n *\n * // implement the other methods...\n * }\n *\n *\n * const keyProvider = new AleoKeyProvider();\n * const networkClient = new AleoNetworkClient(\"https://api.explorer.aleo.org/v1\");\n * const recordProvider = new NetworkRecordProvider(account, networkClient);\n *\n * // Initialize a program manager with the key provider to automatically fetch keys for value transfers\n * const programManager = new ProgramManager(\"https://api.explorer.aleo.org/v1\", keyProvider, recordProvider);\n * programManager.transfer(1, \"aleo166q6ww6688cug7qxwe7nhctjpymydwzy2h7rscfmatqmfwnjvggqcad0at\", \"public\", 0.5);\n *\n * // Keys can also be fetched manually\n * const searchParams = new IndexDbSearch({db: \"keys\", keyId: \"credits.aleo:transferPrivate\"});\n * const [transferPrivateProvingKey, transferPrivateVerifyingKey] = await keyProvider.functionKeys(searchParams);\n */\n functionKeys(params?: KeySearchParams): Promise;\n\n /**\n * Get fee_private function keys from the credits.aleo program\n *\n * @returns {Promise} Proving and verifying keys for the join function\n */\n feePrivateKeys(): Promise;\n\n /**\n * Get fee_public function keys from the credits.aleo program\n *\n * @returns {Promise} Proving and verifying keys for the join function\n */\n feePublicKeys(): Promise;\n\n /**\n * Get join function keys from the credits.aleo program\n *\n * @returns {Promise} Proving and verifying keys for the join function\n */\n joinKeys(): Promise;\n\n /**\n * Get split function keys from the credits.aleo program\n *\n * @returns {Promise} Proving and verifying keys for the join function\n */\n splitKeys(): Promise;\n\n /**\n * Get keys for a variant of the transfer function from the credits.aleo program\n *\n * @param {string} visibility Visibility of the transfer function (private, public, privateToPublic, publicToPrivate)\n * @returns {Promise} Proving and verifying keys for the specified transfer function\n *\n * @example\n * // Create a new object which implements the KeyProvider interface\n * const networkClient = new AleoNetworkClient(\"https://api.explorer.aleo.org/v1\");\n * const keyProvider = new AleoKeyProvider();\n * const recordProvider = new NetworkRecordProvider(account, networkClient);\n *\n * // Initialize a program manager with the key provider to automatically fetch keys for value transfers\n * const programManager = new ProgramManager(\"https://api.explorer.aleo.org/v1\", keyProvider, recordProvider);\n * programManager.transfer(1, \"aleo166q6ww6688cug7qxwe7nhctjpymydwzy2h7rscfmatqmfwnjvggqcad0at\", \"public\", 0.5);\n *\n * // Keys can also be fetched manually\n * const [transferPublicProvingKey, transferPublicVerifyingKey] = await keyProvider.transferKeys(\"public\");\n */\n transferKeys(visibility: string): Promise;\n\n /**\n * Get unbond_public function keys from the credits.aleo program\n *\n * @returns {Promise} Proving and verifying keys for the join function\n */\n unBondPublicKeys(): Promise;\n\n}\n\n\n/**\n * AleoKeyProvider class. Implements the KeyProvider interface. Enables the retrieval of Aleo program proving and\n * verifying keys for the credits.aleo program over http from official Aleo sources and storing and retrieving function\n * keys from a local memory cache.\n */\nclass AleoKeyProvider implements FunctionKeyProvider {\n cache: Map;\n cacheOption: boolean;\n keyUris: string;\n\n async fetchBytes(\n url = \"/\",\n ): Promise {\n try {\n const response = await get(url);\n const data = await response.arrayBuffer();\n return new Uint8Array(data);\n } catch (error) {\n throw new Error(\"Error fetching data.\" + error);\n }\n }\n\n constructor() {\n this.keyUris = KEY_STORE;\n this.cache = new Map();\n this.cacheOption = false;\n }\n\n /**\n * Use local memory to store keys\n *\n * @param {boolean} useCache whether to store keys in local memory\n */\n useCache(useCache: boolean) {\n this.cacheOption = useCache;\n }\n\n /**\n * Clear the key cache\n */\n clearCache() {\n this.cache.clear();\n }\n\n /**\n * Cache a set of keys. This will overwrite any existing keys with the same keyId. The user can check if a keyId\n * exists in the cache using the containsKeys method prior to calling this method if overwriting is not desired.\n *\n * @param {string} keyId access key for the cache\n * @param {FunctionKeyPair} keys keys to cache\n */\n cacheKeys(keyId: string, keys: FunctionKeyPair) {\n const [provingKey, verifyingKey] = keys;\n this.cache.set(keyId, [provingKey.toBytes(), verifyingKey.toBytes()]);\n }\n\n /**\n * Determine if a keyId exists in the cache\n *\n * @param {string} keyId keyId of a proving and verifying key pair\n * @returns {boolean} true if the keyId exists in the cache, false otherwise\n */\n containsKeys(keyId: string): boolean {\n return this.cache.has(keyId)\n }\n\n /**\n * Delete a set of keys from the cache\n *\n * @param {string} keyId keyId of a proving and verifying key pair to delete from memory\n * @returns {boolean} true if the keyId exists in the cache and was deleted, false if the key did not exist\n */\n deleteKeys(keyId: string): boolean {\n return this.cache.delete(keyId)\n }\n\n /**\n * Get a set of keys from the cache\n * @param keyId keyId of a proving and verifying key pair\n *\n * @returns {FunctionKeyPair | Error} Proving and verifying keys for the specified program\n */\n getKeys(keyId: string): FunctionKeyPair | Error {\n console.debug(`Checking if key exists in cache. KeyId: ${keyId}`)\n if (this.cache.has(keyId)) {\n const [provingKeyBytes, verifyingKeyBytes] = this.cache.get(keyId);\n return [ProvingKey.fromBytes(provingKeyBytes), VerifyingKey.fromBytes(verifyingKeyBytes)];\n } else {\n return new Error(\"Key not found in cache.\");\n }\n }\n\n /**\n * Get arbitrary function keys from a provider\n *\n * @param {KeySearchParams} params parameters for the key search in form of: {proverUri: string, verifierUri: string, cacheKey: string}\n * @returns {Promise} Proving and verifying keys for the specified program\n *\n * @example\n * // Create a new object which implements the KeyProvider interface\n * const networkClient = new AleoNetworkClient(\"https://api.explorer.aleo.org/v1\");\n * const keyProvider = new AleoKeyProvider();\n * const recordProvider = new NetworkRecordProvider(account, networkClient);\n *\n * // Initialize a program manager with the key provider to automatically fetch keys for value transfers\n * const programManager = new ProgramManager(\"https://api.explorer.aleo.org/v1\", keyProvider, recordProvider);\n * programManager.transfer(1, \"aleo166q6ww6688cug7qxwe7nhctjpymydwzy2h7rscfmatqmfwnjvggqcad0at\", \"public\", 0.5);\n *\n * // Keys can also be fetched manually using the key provider\n * const keySearchParams = { \"cacheKey\": \"myProgram:myFunction\" };\n * const [transferPrivateProvingKey, transferPrivateVerifyingKey] = await keyProvider.functionKeys(keySearchParams);\n */\n async functionKeys(params?: KeySearchParams): Promise {\n if (params) {\n let proverUrl;\n let verifierUrl;\n let cacheKey;\n if (\"name\" in params && typeof params[\"name\"] == \"string\") {\n let key = CREDITS_PROGRAM_KEYS.getKey(params[\"name\"]);\n if (!(key instanceof Error)) {\n return this.fetchCreditsKeys(key);\n }\n }\n\n if (\"proverUri\" in params && typeof params[\"proverUri\"] == \"string\") {\n proverUrl = params[\"proverUri\"];\n }\n\n if (\"verifierUri\" in params && typeof params[\"verifierUri\"] == \"string\") {\n verifierUrl = params[\"verifierUri\"];\n }\n\n if (\"cacheKey\" in params && typeof params[\"cacheKey\"] == \"string\") {\n cacheKey = params[\"cacheKey\"];\n }\n\n if (proverUrl && verifierUrl) {\n return await this.fetchRemoteKeys(proverUrl, verifierUrl, cacheKey);\n }\n\n if (cacheKey) {\n return this.getKeys(cacheKey);\n }\n }\n throw Error(\"Invalid parameters provided, must provide either a cacheKey and/or a proverUrl and a verifierUrl\");\n }\n\n /**\n * Returns the proving and verifying keys for a specified program from a specified url.\n *\n * @param {string} verifierUrl Url of the proving key\n * @param {string} proverUrl Url the verifying key\n * @param {string} cacheKey Key to store the keys in the cache\n *\n * @returns {Promise} Proving and verifying keys for the specified program\n *\n * @example\n * // Create a new AleoKeyProvider object\n * const networkClient = new AleoNetworkClient(\"https://api.explorer.aleo.org/v1\");\n * const keyProvider = new AleoKeyProvider();\n * const recordProvider = new NetworkRecordProvider(account, networkClient);\n *\n * // Initialize a program manager with the key provider to automatically fetch keys for value transfers\n * const programManager = new ProgramManager(\"https://api.explorer.aleo.org/v1\", keyProvider, recordProvider);\n * programManager.transfer(1, \"aleo166q6ww6688cug7qxwe7nhctjpymydwzy2h7rscfmatqmfwnjvggqcad0at\", \"public\", 0.5);\n *\n * // Keys can also be fetched manually\n * const [transferPrivateProvingKey, transferPrivateVerifyingKey] = await keyProvider.fetchKeys(\n * CREDITS_PROGRAM_KEYS.transfer_private.prover,\n * CREDITS_PROGRAM_KEYS.transfer_private.verifier,\n * );\n */\n async fetchRemoteKeys(proverUrl: string, verifierUrl: string, cacheKey?: string): Promise {\n try {\n // If cache is enabled, check if the keys have already been fetched and return them if they have\n if (this.cacheOption) {\n if (!cacheKey) {\n cacheKey = proverUrl;\n }\n const value = this.cache.get(cacheKey);\n if (typeof value !== \"undefined\") {\n return [ProvingKey.fromBytes(value[0]), VerifyingKey.fromBytes(value[1])];\n } else {\n console.debug(\"Fetching proving keys from url \" + proverUrl);\n const provingKey = ProvingKey.fromBytes(await this.fetchBytes(proverUrl))\n console.debug(\"Fetching verifying keys \" + verifierUrl);\n const verifyingKey = (await this.getVerifyingKey(verifierUrl));\n this.cache.set(cacheKey, [provingKey.toBytes(), verifyingKey.toBytes()]);\n return [provingKey, verifyingKey];\n }\n }\n else {\n // If cache is disabled, fetch the keys and return them\n const provingKey = ProvingKey.fromBytes(await this.fetchBytes(proverUrl))\n const verifyingKey = (await this.getVerifyingKey(verifierUrl));\n return [provingKey, verifyingKey];\n }\n } catch (error) {\n throw new Error(`Error: ${error} fetching fee proving and verifying keys from ${proverUrl} and ${verifierUrl}.`);\n }\n }\n\n /***\n * Fetches the proving key from a remote source.\n *\n * @param proverUrl\n * @param cacheKey\n *\n * @returns {Promise} Proving key for the specified program\n */\n async fetchProvingKey(proverUrl: string, cacheKey?: string): Promise {\n try {\n // If cache is enabled, check if the keys have already been fetched and return them if they have\n if (this.cacheOption) {\n if (!cacheKey) {\n cacheKey = proverUrl;\n }\n const value = this.cache.get(cacheKey);\n if (typeof value !== \"undefined\") {\n return ProvingKey.fromBytes(value[0]);\n } else {\n console.debug(\"Fetching proving keys from url \" + proverUrl);\n const provingKey = ProvingKey.fromBytes(await this.fetchBytes(proverUrl));\n return provingKey;\n }\n }\n else {\n const provingKey = ProvingKey.fromBytes(await this.fetchBytes(proverUrl));\n return provingKey;\n }\n } catch (error) {\n throw new Error(`Error: ${error} fetching fee proving keys from ${proverUrl}`);\n }\n }\n\n async fetchCreditsKeys(key: Key): Promise {\n try {\n if (!this.cache.has(key.locator) || !this.cacheOption) {\n const verifying_key = key.verifyingKey()\n const proving_key = await this.fetchProvingKey(key.prover, key.locator);\n if (this.cacheOption) {\n this.cache.set(CREDITS_PROGRAM_KEYS.bond_public.locator, [proving_key.toBytes(), verifying_key.toBytes()]);\n }\n return [proving_key, verifying_key];\n } else {\n const keyPair = this.cache.get(key.locator);\n return [ProvingKey.fromBytes(keyPair[0]), VerifyingKey.fromBytes(keyPair[1])];\n }\n } catch (error) {\n throw new Error(`Error: fetching credits.aleo keys: ${error}`);\n }\n }\n\n async bondPublicKeys(): Promise {\n return this.fetchCreditsKeys(CREDITS_PROGRAM_KEYS.bond_public);\n }\n\n bondValidatorKeys(): Promise {\n return this.fetchCreditsKeys(CREDITS_PROGRAM_KEYS.bond_validator);\n }\n\n claimUnbondPublicKeys(): Promise {\n return this.fetchCreditsKeys(CREDITS_PROGRAM_KEYS.claim_unbond_public)\n }\n\n /**\n * Returns the proving and verifying keys for the transfer functions in the credits.aleo program\n * @param {string} visibility Visibility of the transfer function\n * @returns {Promise} Proving and verifying keys for the transfer functions\n *\n * @example\n * // Create a new AleoKeyProvider\n * const networkClient = new AleoNetworkClient(\"https://api.explorer.aleo.org/v1\");\n * const keyProvider = new AleoKeyProvider();\n * const recordProvider = new NetworkRecordProvider(account, networkClient);\n *\n * // Initialize a program manager with the key provider to automatically fetch keys for value transfers\n * const programManager = new ProgramManager(\"https://api.explorer.aleo.org/v1\", keyProvider, recordProvider);\n * programManager.transfer(1, \"aleo166q6ww6688cug7qxwe7nhctjpymydwzy2h7rscfmatqmfwnjvggqcad0at\", \"public\", 0.5);\n *\n * // Keys can also be fetched manually\n * const [transferPublicProvingKey, transferPublicVerifyingKey] = await keyProvider.transferKeys(\"public\");\n */\n async transferKeys(visibility: string): Promise {\n if (PRIVATE_TRANSFER.has(visibility)) {\n return await this.fetchCreditsKeys(CREDITS_PROGRAM_KEYS.transfer_private);\n } else if (PRIVATE_TO_PUBLIC_TRANSFER.has(visibility)) {\n return await this.fetchCreditsKeys(CREDITS_PROGRAM_KEYS.transfer_private_to_public);\n } else if (PUBLIC_TRANSFER.has(visibility)) {\n return await this.fetchCreditsKeys(CREDITS_PROGRAM_KEYS.transfer_public);\n } else if (PUBLIC_TRANSFER_AS_SIGNER.has(visibility)) {\n return await this.fetchCreditsKeys(CREDITS_PROGRAM_KEYS.transfer_public_as_signer);\n } else if (PUBLIC_TO_PRIVATE_TRANSFER.has(visibility)) {\n return await this.fetchCreditsKeys(CREDITS_PROGRAM_KEYS.transfer_public_to_private);\n } else {\n throw new Error(\"Invalid visibility type\");\n }\n }\n\n /**\n * Returns the proving and verifying keys for the join function in the credits.aleo program\n *\n * @returns {Promise} Proving and verifying keys for the join function\n */\n async joinKeys(): Promise {\n return await this.fetchCreditsKeys(CREDITS_PROGRAM_KEYS.join);\n }\n\n /**\n * Returns the proving and verifying keys for the split function in the credits.aleo program\n *\n * @returns {Promise} Proving and verifying keys for the split function\n * */\n async splitKeys(): Promise {\n return await this.fetchCreditsKeys(CREDITS_PROGRAM_KEYS.split);\n }\n\n /**\n * Returns the proving and verifying keys for the fee_private function in the credits.aleo program\n *\n * @returns {Promise} Proving and verifying keys for the fee function\n */\n async feePrivateKeys(): Promise {\n return await this.fetchCreditsKeys(CREDITS_PROGRAM_KEYS.fee_private);\n }\n\n /**\n * Returns the proving and verifying keys for the fee_public function in the credits.aleo program\n *\n * @returns {Promise} Proving and verifying keys for the fee function\n */\n async feePublicKeys(): Promise {\n return await this.fetchCreditsKeys(CREDITS_PROGRAM_KEYS.fee_public);\n }\n\n /**\n * Gets a verifying key. If the verifying key is for a credits.aleo function, get it from the wasm cache otherwise\n *\n * @returns {Promise} Verifying key for the function\n */\n // attempt to fetch it from the network\n async getVerifyingKey(verifierUri: string): Promise {\n switch (verifierUri) {\n case CREDITS_PROGRAM_KEYS.bond_public.verifier:\n return CREDITS_PROGRAM_KEYS.bond_public.verifyingKey();\n case CREDITS_PROGRAM_KEYS.bond_validator.verifier:\n return CREDITS_PROGRAM_KEYS.bond_validator.verifyingKey();\n case CREDITS_PROGRAM_KEYS.claim_unbond_public.verifier:\n return CREDITS_PROGRAM_KEYS.claim_unbond_public.verifyingKey();\n case CREDITS_PROGRAM_KEYS.fee_private.verifier:\n return CREDITS_PROGRAM_KEYS.fee_private.verifyingKey();\n case CREDITS_PROGRAM_KEYS.fee_public.verifier:\n return CREDITS_PROGRAM_KEYS.fee_public.verifyingKey();\n case CREDITS_PROGRAM_KEYS.inclusion.verifier:\n return CREDITS_PROGRAM_KEYS.inclusion.verifyingKey();\n case CREDITS_PROGRAM_KEYS.join.verifier:\n return CREDITS_PROGRAM_KEYS.join.verifyingKey();\n case CREDITS_PROGRAM_KEYS.set_validator_state.verifier:\n return CREDITS_PROGRAM_KEYS.set_validator_state.verifyingKey();\n case CREDITS_PROGRAM_KEYS.split.verifier:\n return CREDITS_PROGRAM_KEYS.split.verifyingKey();\n case CREDITS_PROGRAM_KEYS.transfer_private.verifier:\n return CREDITS_PROGRAM_KEYS.transfer_private.verifyingKey();\n case CREDITS_PROGRAM_KEYS.transfer_private_to_public.verifier:\n return CREDITS_PROGRAM_KEYS.transfer_private_to_public.verifyingKey();\n case CREDITS_PROGRAM_KEYS.transfer_public.verifier:\n return CREDITS_PROGRAM_KEYS.transfer_public.verifyingKey();\n case CREDITS_PROGRAM_KEYS.transfer_public_as_signer.verifier:\n return CREDITS_PROGRAM_KEYS.transfer_public_as_signer.verifyingKey();\n case CREDITS_PROGRAM_KEYS.transfer_public_to_private.verifier:\n return CREDITS_PROGRAM_KEYS.transfer_public_to_private.verifyingKey();\n case CREDITS_PROGRAM_KEYS.unbond_public.verifier:\n return CREDITS_PROGRAM_KEYS.unbond_public.verifyingKey();\n default:\n try {\n /// Try to fetch the verifying key from the network as a string\n const response = await get(verifierUri);\n const text = await response.text();\n return VerifyingKey.fromString(text);\n } catch (e) {\n /// If that fails, try to fetch the verifying key from the network as bytes\n try {\n return VerifyingKey.fromBytes(await this.fetchBytes(verifierUri));\n } catch (inner) {\n return new Error(\"Invalid verifying key. Error: \" + inner);\n }\n }\n }\n }\n\n unBondPublicKeys(): Promise {\n return this.fetchCreditsKeys(CREDITS_PROGRAM_KEYS.unbond_public);\n }\n}\n\nexport {AleoKeyProvider, AleoKeyProviderParams, AleoKeyProviderInitParams, CachedKeyPair, FunctionKeyPair, FunctionKeyProvider, KeySearchParams}\n","import {\n Account,\n AleoKeyProvider,\n AleoNetworkClient,\n ExecutionResponse,\n FunctionKeyProvider,\n FunctionKeyPair,\n OfflineQuery,\n KeySearchParams,\n RecordPlaintext,\n RecordProvider,\n RecordSearchParams,\n PrivateKey,\n Program,\n ProgramImports,\n ProvingKey,\n VerifyingKey,\n Transaction,\n PRIVATE_TRANSFER_TYPES,\n VALID_TRANSFER_TYPES,\n logAndThrow,\n ProgramManagerBase as WasmProgramManager, verifyFunctionExecution, AleoKeyProviderParams, CREDITS_PROGRAM_KEYS,\n} from \"./index\";\nimport {Execution} from \"@provablehq/wasm/dist/crates/aleo_wasm\";\n\n/**\n * Represents the options for executing a transaction in the Aleo network.\n * This interface is used to specify the parameters required for building and submitting an execution transaction.\n *\n * @property {string} programName - The name of the program containing the function to be executed.\n * @property {string} functionName - The name of the function to execute within the program.\n * @property {number} fee - The fee to be paid for the transaction.\n * @property {boolean} privateFee - If true, uses a private record to pay the fee; otherwise, uses the account's public credit balance.\n * @property {string[]} inputs - The inputs to the function being executed.\n * @property {RecordSearchParams} [recordSearchParams] - Optional parameters for searching for a record to pay the execution transaction fee.\n * @property {KeySearchParams} [keySearchParams] - Optional parameters for finding the matching proving & verifying keys for the function.\n * @property {string | RecordPlaintext} [feeRecord] - Optional fee record to use for the transaction.\n * @property {ProvingKey} [provingKey] - Optional proving key to use for the transaction.\n * @property {VerifyingKey} [verifyingKey] - Optional verifying key to use for the transaction.\n * @property {PrivateKey} [privateKey] - Optional private key to use for the transaction.\n * @property {OfflineQuery} [offlineQuery] - Optional offline query if creating transactions in an offline environment.\n * @property {string | Program} [program] - Optional program source code to use for the transaction.\n * @property {ProgramImports} [imports] - Optional programs that the program being executed imports.\n */\ninterface ExecuteOptions {\n programName: string;\n functionName: string;\n fee: number;\n privateFee: boolean;\n inputs: string[];\n recordSearchParams?: RecordSearchParams;\n keySearchParams?: KeySearchParams;\n feeRecord?: string | RecordPlaintext;\n provingKey?: ProvingKey;\n verifyingKey?: VerifyingKey;\n privateKey?: PrivateKey;\n offlineQuery?: OfflineQuery;\n program?: string | Program;\n imports?: ProgramImports;\n}\n\n/**\n * The ProgramManager class is used to execute and deploy programs on the Aleo network and create value transfers.\n */\nclass ProgramManager {\n account: Account | undefined;\n keyProvider: FunctionKeyProvider;\n host: string;\n networkClient: AleoNetworkClient;\n recordProvider: RecordProvider | undefined;\n\n /** Create a new instance of the ProgramManager\n *\n * @param { string | undefined } host A host uri running the official Aleo API\n * @param { FunctionKeyProvider | undefined } keyProvider A key provider that implements {@link FunctionKeyProvider} interface\n * @param { RecordProvider | undefined } recordProvider A record provider that implements {@link RecordProvider} interface\n */\n constructor(host?: string | undefined, keyProvider?: FunctionKeyProvider | undefined, recordProvider?: RecordProvider | undefined) {\n this.host = host ? host : 'https://api.explorer.aleo.org/v1';\n this.networkClient = new AleoNetworkClient(this.host);\n \n this.keyProvider = keyProvider ? keyProvider : new AleoKeyProvider();\n this.recordProvider = recordProvider;\n }\n\n /**\n * Set the account to use for transaction submission to the Aleo network\n *\n * @param {Account} account Account to use for transaction submission\n */\n setAccount(account: Account) {\n this.account = account;\n }\n\n /**\n * Set the key provider that provides the proving and verifying keys for programs\n *\n * @param {FunctionKeyProvider} keyProvider\n */\n setKeyProvider(keyProvider: FunctionKeyProvider) {\n this.keyProvider = keyProvider;\n }\n\n /**\n * Set the host peer to use for transaction submission to the Aleo network\n *\n * @param host {string} Peer url to use for transaction submission\n */\n setHost(host: string) {\n this.host = host;\n this.networkClient.setHost(host);\n }\n\n /**\n * Set the record provider that provides records for transactions\n *\n * @param {RecordProvider} recordProvider\n */\n setRecordProvider(recordProvider: RecordProvider) {\n this.recordProvider = recordProvider;\n }\n\n /**\n * Deploy an Aleo program to the Aleo network\n *\n * @param {string} program Program source code\n * @param {number} fee Fee to pay for the transaction\n * @param {boolean} privateFee Use a private record to pay the fee. If false this will use the account's public credit balance\n * @param {RecordSearchParams | undefined} recordSearchParams Optional parameters for searching for a record to use\n * pay the deployment fee\n * @param {string | RecordPlaintext | undefined} feeRecord Optional Fee record to use for the transaction\n * @param {PrivateKey | undefined} privateKey Optional private key to use for the transaction\n * @returns {string | Error} The transaction id of the deployed program or a failure message from the network\n *\n * @example\n * // Create a new NetworkClient, KeyProvider, and RecordProvider\n * const networkClient = new AleoNetworkClient(\"https://api.explorer.aleo.org/v1\");\n * const keyProvider = new AleoKeyProvider();\n * const recordProvider = new NetworkRecordProvider(account, networkClient);\n *\n * // Initialize a program manager with the key provider to automatically fetch keys for deployments\n * const program = \"program hello_hello.aleo;\\n\\nfunction hello:\\n input r0 as u32.public;\\n input r1 as u32.private;\\n add r0 r1 into r2;\\n output r2 as u32.private;\\n\";\n * const programManager = new ProgramManager(\"https://api.explorer.aleo.org/v1\", keyProvider, recordProvider);\n *\n * // Define a fee in credits\n * const fee = 1.2;\n *\n * // Deploy the program\n * const tx_id = await programManager.deploy(program, fee);\n *\n * // Verify the transaction was successful\n * const transaction = await programManager.networkClient.getTransaction(tx_id);\n */\n async deploy(\n program: string,\n fee: number,\n privateFee: boolean,\n recordSearchParams?: RecordSearchParams,\n feeRecord?: string | RecordPlaintext,\n privateKey?: PrivateKey,\n ): Promise {\n // Ensure the program is valid and does not exist on the network\n try {\n const programObject = Program.fromString(program);\n let programSource;\n try {\n programSource = await this.networkClient.getProgram(programObject.id());\n } catch (e) {\n // Program does not exist on the network, deployment can proceed\n console.log(`Program ${programObject.id()} does not exist on the network, deploying...`);\n }\n if (typeof programSource == \"string\") {\n throw (`Program ${programObject.id()} already exists on the network, please rename your program`);\n }\n } catch (e) {\n throw logAndThrow(`Error validating program: ${e}`);\n }\n\n // Get the private key from the account if it is not provided in the parameters\n let deploymentPrivateKey = privateKey;\n if (typeof privateKey === \"undefined\" && typeof this.account !== \"undefined\") {\n deploymentPrivateKey = this.account.privateKey();\n }\n\n if (typeof deploymentPrivateKey === \"undefined\") {\n throw(\"No private key provided and no private key set in the ProgramManager\");\n }\n\n // Get the fee record from the account if it is not provided in the parameters\n try {\n feeRecord = privateFee ? await this.getCreditsRecord(fee, [], feeRecord, recordSearchParams) : undefined;\n } catch (e) {\n throw logAndThrow(`Error finding fee record. Record finder response: '${e}'. Please ensure you're connected to a valid Aleo network and a record with enough balance exists.`);\n }\n\n // Get the proving and verifying keys from the key provider\n let feeKeys;\n try {\n feeKeys = privateFee ? await this.keyProvider.feePrivateKeys() : await this.keyProvider.feePublicKeys();\n } catch (e) {\n throw logAndThrow(`Error finding fee keys. Key finder response: '${e}'. Please ensure your key provider is configured correctly.`);\n }\n const [feeProvingKey, feeVerifyingKey] = feeKeys;\n\n // Resolve the program imports if they exist\n let imports;\n try {\n imports = await this.networkClient.getProgramImports(program);\n } catch (e) {\n throw logAndThrow(`Error finding program imports. Network response: '${e}'. Please ensure you're connected to a valid Aleo network and the program is deployed to the network.`);\n }\n\n // Build a deployment transaction and submit it to the network\n const tx = await WasmProgramManager.buildDeploymentTransaction(deploymentPrivateKey, program, fee, feeRecord, this.host, imports, feeProvingKey, feeVerifyingKey);\n return await this.networkClient.submitTransaction(tx);\n }\n\n /**\n * Builds an execution transaction for submission to the Aleo network.\n *\n * @param {ExecuteOptions} options - The options for the execution transaction.\n * @returns {Promise} - A promise that resolves to the transaction or an error.\n *\n * @example\n * // Create a new NetworkClient, KeyProvider, and RecordProvider using official Aleo record, key, and network providers\n * const networkClient = new AleoNetworkClient(\"https://api.explorer.aleo.org/v1\");\n * const keyProvider = new AleoKeyProvider();\n * keyProvider.useCache = true;\n * const recordProvider = new NetworkRecordProvider(account, networkClient);\n *\n * // Initialize a program manager with the key provider to automatically fetch keys for executions\n * const programManager = new ProgramManager(\"https://api.explorer.aleo.org/v1\", keyProvider, recordProvider);\n *\n * // Build and execute the transaction\n * const transaction = await programManager.buildExecutionTransaction({\n * programName: \"hello_hello.aleo\",\n * functionName: \"hello_hello\",\n * fee: 0.020,\n * privateFee: false,\n * inputs: [\"5u32\", \"5u32\"],\n * keySearchParams: { \"cacheKey\": \"hello_hello:hello\" }\n * });\n * const result = await programManager.networkClient.submitTransaction(transaction);\n */\n async buildExecutionTransaction(options: ExecuteOptions): Promise {\n // Destructure the options object to access the parameters\n const {\n programName,\n functionName,\n fee,\n privateFee,\n inputs,\n recordSearchParams,\n keySearchParams,\n privateKey,\n offlineQuery\n } = options;\n\n let feeRecord = options.feeRecord;\n let provingKey = options.provingKey;\n let verifyingKey = options.verifyingKey;\n let program = options.program;\n let imports = options.imports;\n\n // Ensure the function exists on the network\n if (program === undefined) {\n try {\n program = (await this.networkClient.getProgram(programName));\n } catch (e) {\n throw logAndThrow(`Error finding ${programName}. Network response: '${e}'. Please ensure you're connected to a valid Aleo network the program is deployed to the network.`);\n }\n } else if (program instanceof Program) {\n program = program.toString();\n }\n\n // Get the private key from the account if it is not provided in the parameters\n let executionPrivateKey = privateKey;\n if (typeof privateKey === \"undefined\" && typeof this.account !== \"undefined\") {\n executionPrivateKey = this.account.privateKey();\n }\n\n if (typeof executionPrivateKey === \"undefined\") {\n throw(\"No private key provided and no private key set in the ProgramManager\");\n }\n\n // Get the fee record from the account if it is not provided in the parameters\n try {\n feeRecord = privateFee ? await this.getCreditsRecord(fee, [], feeRecord, recordSearchParams) : undefined;\n } catch (e) {\n throw logAndThrow(`Error finding fee record. Record finder response: '${e}'. Please ensure you're connected to a valid Aleo network and a record with enough balance exists.`);\n }\n\n // Get the fee proving and verifying keys from the key provider\n let feeKeys;\n try {\n feeKeys = privateFee ? await this.keyProvider.feePrivateKeys() : await this.keyProvider.feePublicKeys();\n } catch (e) {\n throw logAndThrow(`Error finding fee keys. Key finder response: '${e}'. Please ensure your key provider is configured correctly.`);\n }\n const [feeProvingKey, feeVerifyingKey] = feeKeys;\n\n // If the function proving and verifying keys are not provided, attempt to find them using the key provider\n if (!provingKey || !verifyingKey) {\n try {\n [provingKey, verifyingKey] = await this.keyProvider.functionKeys(keySearchParams);\n } catch (e) {\n console.log(`Function keys not found. Key finder response: '${e}'. The function keys will be synthesized`)\n }\n }\n\n // Resolve the program imports if they exist\n const numberOfImports = Program.fromString(program).getImports().length;\n if (numberOfImports > 0 && !imports) {\n try {\n imports = await this.networkClient.getProgramImports(programName);\n } catch (e) {\n throw logAndThrow(`Error finding program imports. Network response: '${e}'. Please ensure you're connected to a valid Aleo network and the program is deployed to the network.`);\n }\n }\n\n // Build an execution transaction and submit it to the network\n return await WasmProgramManager.buildExecutionTransaction(executionPrivateKey, program, functionName, inputs, fee, feeRecord, this.host, imports, provingKey, verifyingKey, feeProvingKey, feeVerifyingKey, offlineQuery);\n }\n\n /**\n * Builds an execution transaction for submission to the Aleo network.\n *\n * @param {ExecuteOptions} options - The options for the execution transaction.\n * @returns {Promise} - A promise that resolves to the transaction or an error.\n *\n * @example\n * // Create a new NetworkClient, KeyProvider, and RecordProvider using official Aleo record, key, and network providers\n * const networkClient = new AleoNetworkClient(\"https://api.explorer.aleo.org/v1\");\n * const keyProvider = new AleoKeyProvider();\n * keyProvider.useCache = true;\n * const recordProvider = new NetworkRecordProvider(account, networkClient);\n *\n * // Initialize a program manager with the key provider to automatically fetch keys for executions\n * const programManager = new ProgramManager(\"https://api.explorer.aleo.org/v1\", keyProvider, recordProvider);\n *\n * // Build and execute the transaction\n * const transaction = await programManager.execute({\n * programName: \"hello_hello.aleo\",\n * functionName: \"hello_hello\",\n * fee: 0.020,\n * privateFee: false,\n * inputs: [\"5u32\", \"5u32\"],\n * keySearchParams: { \"cacheKey\": \"hello_hello:hello\" }\n * });\n * const result = await programManager.networkClient.submitTransaction(transaction);\n */\n async execute(options: ExecuteOptions): Promise {\n const tx = await this.buildExecutionTransaction(options);\n return await this.networkClient.submitTransaction(tx);\n }\n\n /**\n * Run an Aleo program in offline mode\n *\n * @param {string} program Program source code containing the function to be executed\n * @param {string} function_name Function name to execute\n * @param {string[]} inputs Inputs to the function\n * @param {number} proveExecution Whether to prove the execution of the function and return an execution transcript\n * that contains the proof.\n * @param {string[] | undefined} imports Optional imports to the program\n * @param {KeySearchParams | undefined} keySearchParams Optional parameters for finding the matching proving &\n * verifying keys for the function\n * @param {ProvingKey | undefined} provingKey Optional proving key to use for the transaction\n * @param {VerifyingKey | undefined} verifyingKey Optional verifying key to use for the transaction\n * @param {PrivateKey | undefined} privateKey Optional private key to use for the transaction\n * @param {OfflineQuery | undefined} offlineQuery Optional offline query if creating transactions in an offline environment\n * @returns {Promise}\n *\n * @example\n * import { Account, Program } from '@provablehq/sdk';\n *\n * /// Create the source for the \"helloworld\" program\n * const program = \"program helloworld.aleo;\\n\\nfunction hello:\\n input r0 as u32.public;\\n input r1 as u32.private;\\n add r0 r1 into r2;\\n output r2 as u32.private;\\n\";\n * const programManager = new ProgramManager();\n *\n * /// Create a temporary account for the execution of the program\n * const account = new Account();\n * programManager.setAccount(account);\n *\n * /// Get the response and ensure that the program executed correctly\n * const executionResponse = await programManager.run(program, \"hello\", [\"5u32\", \"5u32\"]);\n * const result = executionResponse.getOutputs();\n * assert(result === [\"10u32\"]);\n */\n async run(\n program: string,\n function_name: string,\n inputs: string[],\n proveExecution: boolean,\n imports?: ProgramImports,\n keySearchParams?: KeySearchParams,\n provingKey?: ProvingKey,\n verifyingKey?: VerifyingKey,\n privateKey?: PrivateKey,\n offlineQuery?: OfflineQuery,\n ): Promise {\n // Get the private key from the account if it is not provided in the parameters\n let executionPrivateKey = privateKey;\n if (typeof privateKey === \"undefined\" && typeof this.account !== \"undefined\") {\n executionPrivateKey = this.account.privateKey();\n }\n\n if (typeof executionPrivateKey === \"undefined\") {\n throw(\"No private key provided and no private key set in the ProgramManager\");\n }\n\n // If the function proving and verifying keys are not provided, attempt to find them using the key provider\n if (!provingKey || !verifyingKey) {\n try {\n [provingKey, verifyingKey] = await this.keyProvider.functionKeys(keySearchParams);\n } catch (e) {\n console.log(`Function keys not found. Key finder response: '${e}'. The function keys will be synthesized`)\n }\n }\n\n // Run the program offline and return the result\n console.log(\"Running program offline\")\n console.log(\"Proving key: \", provingKey);\n console.log(\"Verifying key: \", verifyingKey);\n return WasmProgramManager.executeFunctionOffline(executionPrivateKey, program, function_name, inputs, proveExecution, false, imports, provingKey, verifyingKey, this.host, offlineQuery);\n }\n\n /**\n * Join two credits records into a single credits record\n *\n * @param {RecordPlaintext | string} recordOne First credits record to join\n * @param {RecordPlaintext | string} recordTwo Second credits record to join\n * @param {number} fee Fee in credits pay for the join transaction\n * @param {boolean} privateFee Use a private record to pay the fee. If false this will use the account's public credit balance\n * @param {RecordSearchParams | undefined} recordSearchParams Optional parameters for finding the fee record to use\n * to pay the fee for the join transaction\n * @param {RecordPlaintext | string | undefined} feeRecord Fee record to use for the join transaction\n * @param {PrivateKey | undefined} privateKey Private key to use for the join transaction\n * @param {OfflineQuery | undefined} offlineQuery Optional offline query if creating transactions in an offline environment\n * @returns {Promise}\n */\n async join(\n recordOne: RecordPlaintext | string,\n recordTwo: RecordPlaintext | string,\n fee: number,\n privateFee: boolean,\n recordSearchParams?: RecordSearchParams | undefined,\n feeRecord?: RecordPlaintext | string | undefined,\n privateKey?: PrivateKey,\n offlineQuery?: OfflineQuery,\n ): Promise {\n // Get the private key from the account if it is not provided in the parameters\n let executionPrivateKey = privateKey;\n if (typeof privateKey === \"undefined\" && typeof this.account !== \"undefined\") {\n executionPrivateKey = this.account.privateKey();\n }\n\n if (typeof executionPrivateKey === \"undefined\") {\n throw(\"No private key provided and no private key set in the ProgramManager\");\n }\n\n // Get the proving and verifying keys from the key provider\n let feeKeys;\n let joinKeys\n try {\n feeKeys = privateFee ? await this.keyProvider.feePrivateKeys() : await this.keyProvider.feePublicKeys();\n joinKeys = await this.keyProvider.joinKeys();\n } catch (e) {\n throw logAndThrow(`Error finding fee keys. Key finder response: '${e}'. Please ensure your key provider is configured correctly.`);\n }\n const [feeProvingKey, feeVerifyingKey] = feeKeys;\n const [joinProvingKey, joinVerifyingKey] = joinKeys;\n\n // Get the fee record from the account if it is not provided in the parameters\n try {\n feeRecord = privateFee ? await this.getCreditsRecord(fee, [], feeRecord, recordSearchParams) : undefined;\n } catch (e) {\n throw logAndThrow(`Error finding fee record. Record finder response: '${e}'. Please ensure you're connected to a valid Aleo network and a record with enough balance exists.`);\n }\n\n // Validate the records provided are valid plaintext records\n try {\n recordOne = recordOne instanceof RecordPlaintext ? recordOne : RecordPlaintext.fromString(recordOne);\n recordTwo = recordTwo instanceof RecordPlaintext ? recordTwo : RecordPlaintext.fromString(recordTwo);\n } catch (e) {\n throw logAndThrow('Records provided are not valid. Please ensure they are valid plaintext records.')\n }\n\n // Build an execution transaction and submit it to the network\n const tx = await WasmProgramManager.buildJoinTransaction(executionPrivateKey, recordOne, recordTwo, fee, feeRecord, this.host, joinProvingKey, joinVerifyingKey, feeProvingKey, feeVerifyingKey, offlineQuery);\n return await this.networkClient.submitTransaction(tx);\n }\n\n /**\n * Split credits into two new credits records\n *\n * @param {number} splitAmount Amount in microcredits to split from the original credits record\n * @param {RecordPlaintext | string} amountRecord Amount record to use for the split transaction\n * @param {PrivateKey | undefined} privateKey Optional private key to use for the split transaction\n * @param {OfflineQuery | undefined} offlineQuery Optional offline query if creating transactions in an offline environment\n * @returns {Promise}\n *\n * @example\n * // Create a new NetworkClient, KeyProvider, and RecordProvider\n * const networkClient = new AleoNetworkClient(\"https://api.explorer.aleo.org/v1\");\n * const keyProvider = new AleoKeyProvider();\n * const recordProvider = new NetworkRecordProvider(account, networkClient);\n *\n * // Initialize a program manager with the key provider to automatically fetch keys for executions\n * const programName = \"hello_hello.aleo\";\n * const programManager = new ProgramManager(\"https://api.explorer.aleo.org/v1\", keyProvider, recordProvider);\n * const record = \"{ owner: aleo184vuwr5u7u0ha5f5k44067dd2uaqewxx6pe5ltha5pv99wvhfqxqv339h4.private, microcredits: 45000000u64.private, _nonce: 4106205762862305308495708971985748592380064201230396559307556388725936304984group.public}\"\n * const tx_id = await programManager.split(25000000, record);\n * const transaction = await programManager.networkClient.getTransaction(tx_id);\n */\n async split(splitAmount: number, amountRecord: RecordPlaintext | string, privateKey?: PrivateKey, offlineQuery?: OfflineQuery): Promise {\n // Get the private key from the account if it is not provided in the parameters\n let executionPrivateKey = privateKey;\n if (typeof executionPrivateKey === \"undefined\" && typeof this.account !== \"undefined\") {\n executionPrivateKey = this.account.privateKey();\n }\n\n if (typeof executionPrivateKey === \"undefined\") {\n throw(\"No private key provided and no private key set in the ProgramManager\");\n }\n\n // Get the split keys from the key provider\n let splitKeys;\n try {\n splitKeys = await this.keyProvider.splitKeys();\n } catch (e) {\n throw logAndThrow(`Error finding fee keys. Key finder response: '${e}'. Please ensure your key provider is configured correctly.`);\n }\n const [splitProvingKey, splitVerifyingKey] = splitKeys;\n\n // Validate the record to be split\n try {\n amountRecord = amountRecord instanceof RecordPlaintext ? amountRecord : RecordPlaintext.fromString(amountRecord);\n } catch (e) {\n throw logAndThrow(\"Record provided is not valid. Please ensure it is a valid plaintext record.\");\n }\n\n // Build an execution transaction and submit it to the network\n const tx = await WasmProgramManager.buildSplitTransaction(executionPrivateKey, splitAmount, amountRecord, this.host, splitProvingKey, splitVerifyingKey, offlineQuery);\n return await this.networkClient.submitTransaction(tx);\n }\n\n /**\n * Pre-synthesize proving and verifying keys for a program\n *\n * @param program {string} The program source code to synthesize keys for\n * @param function_id {string} The function id to synthesize keys for\n * @param inputs {Array} Sample inputs to the function\n * @param privateKey {PrivateKey | undefined} Optional private key to use for the key synthesis\n *\n * @returns {Promise}\n */\n async synthesizeKeys(\n program: string,\n function_id: string,\n inputs: Array,\n privateKey?: PrivateKey,\n ): Promise {\n // Resolve the program imports if they exist\n let imports;\n\n let executionPrivateKey = privateKey;\n if (typeof executionPrivateKey === \"undefined\") {\n if (typeof this.account !== \"undefined\") {\n executionPrivateKey = this.account.privateKey();\n } else {\n executionPrivateKey = new PrivateKey();\n }\n }\n\n // Attempt to run an offline execution of the program and extract the proving and verifying keys\n try {\n imports = await this.networkClient.getProgramImports(program);\n const keyPair = await WasmProgramManager.synthesizeKeyPair(\n executionPrivateKey,\n program,\n function_id,\n inputs,\n imports\n );\n return [keyPair.provingKey(), keyPair.verifyingKey()];\n } catch (e) {\n throw logAndThrow(`Could not synthesize keys - error ${e}. Please ensure the program is valid and the inputs are correct.`);\n }\n }\n\n /**\n * Build a transaction to transfer credits to another account for later submission to the Aleo network\n *\n * @param {number} amount The amount of credits to transfer\n * @param {string} recipient The recipient of the transfer\n * @param {string} transferType The type of transfer to perform - options: 'private', 'privateToPublic', 'public', 'publicToPrivate'\n * @param {number} fee The fee to pay for the transfer\n * @param {boolean} privateFee Use a private record to pay the fee. If false this will use the account's public credit balance\n * @param {RecordSearchParams | undefined} recordSearchParams Optional parameters for finding the amount and fee\n * records for the transfer transaction\n * @param {RecordPlaintext | string} amountRecord Optional amount record to use for the transfer\n * @param {RecordPlaintext | string} feeRecord Optional fee record to use for the transfer\n * @param {PrivateKey | undefined} privateKey Optional private key to use for the transfer transaction\n * @param {OfflineQuery | undefined} offlineQuery Optional offline query if creating transactions in an offline environment\n * @returns {Promise} The transaction id of the transfer transaction\n *\n * @example\n * // Create a new NetworkClient, KeyProvider, and RecordProvider\n * const networkClient = new AleoNetworkClient(\"https://api.explorer.aleo.org/v1\");\n * const keyProvider = new AleoKeyProvider();\n * const recordProvider = new NetworkRecordProvider(account, networkClient);\n *\n * // Initialize a program manager with the key provider to automatically fetch keys for executions\n * const programName = \"hello_hello.aleo\";\n * const programManager = new ProgramManager(\"https://api.explorer.aleo.org/v1\", keyProvider, recordProvider);\n * await programManager.initialize();\n * const tx_id = await programManager.transfer(1, \"aleo1rhgdu77hgyqd3xjj8ucu3jj9r2krwz6mnzyd80gncr5fxcwlh5rsvzp9px\", \"private\", 0.2)\n * const transaction = await programManager.networkClient.getTransaction(tx_id);\n */\n async buildTransferTransaction(\n amount: number,\n recipient: string,\n transferType: string,\n fee: number,\n privateFee: boolean,\n recordSearchParams?: RecordSearchParams,\n amountRecord?: RecordPlaintext | string,\n feeRecord?: RecordPlaintext | string,\n privateKey?: PrivateKey,\n offlineQuery?: OfflineQuery\n ): Promise {\n // Validate the transfer type\n transferType = validateTransferType(transferType);\n\n // Get the private key from the account if it is not provided in the parameters\n let executionPrivateKey = privateKey;\n if (typeof executionPrivateKey === \"undefined\" && typeof this.account !== \"undefined\") {\n executionPrivateKey = this.account.privateKey();\n }\n\n if (typeof executionPrivateKey === \"undefined\") {\n throw(\"No private key provided and no private key set in the ProgramManager\");\n }\n\n // Get the proving and verifying keys from the key provider\n let feeKeys;\n let transferKeys\n try {\n feeKeys = privateFee ? await this.keyProvider.feePrivateKeys() : await this.keyProvider.feePublicKeys();\n transferKeys = await this.keyProvider.transferKeys(transferType);\n } catch (e) {\n throw logAndThrow(`Error finding fee keys. Key finder response: '${e}'. Please ensure your key provider is configured correctly.`);\n }\n const [feeProvingKey, feeVerifyingKey] = feeKeys;\n const [transferProvingKey, transferVerifyingKey] = transferKeys;\n\n // Get the amount and fee record from the account if it is not provided in the parameters\n try {\n // Track the nonces of the records found so no duplicate records are used\n const nonces: string[] = [];\n if (requiresAmountRecord(transferType)) {\n // If the transfer type is private and requires an amount record, get it from the record provider\n amountRecord = await this.getCreditsRecord(fee, [], amountRecord, recordSearchParams);\n nonces.push(amountRecord.nonce());\n } else {\n amountRecord = undefined;\n }\n feeRecord = privateFee ? await this.getCreditsRecord(fee, nonces, feeRecord, recordSearchParams) : undefined;\n } catch (e) {\n throw logAndThrow(`Error finding fee record. Record finder response: '${e}'. Please ensure you're connected to a valid Aleo network and a record with enough balance exists.`);\n }\n\n // Build an execution transaction and submit it to the network\n return await WasmProgramManager.buildTransferTransaction(executionPrivateKey, amount, recipient, transferType, amountRecord, fee, feeRecord, this.host, transferProvingKey, transferVerifyingKey, feeProvingKey, feeVerifyingKey, offlineQuery);\n }\n\n /**\n * Build a transfer_public transaction to transfer credits to another account for later submission to the Aleo network\n *\n * @param {number} amount The amount of credits to transfer\n * @param {string} recipient The recipient of the transfer\n * @param {string} transferType The type of transfer to perform - options: 'private', 'privateToPublic', 'public', 'publicToPrivate'\n * @param {number} fee The fee to pay for the transfer\n * @param {boolean} privateFee Use a private record to pay the fee. If false this will use the account's public credit balance\n * @param {RecordSearchParams | undefined} recordSearchParams Optional parameters for finding the amount and fee\n * records for the transfer transaction\n * @param {RecordPlaintext | string} amountRecord Optional amount record to use for the transfer\n * @param {RecordPlaintext | string} feeRecord Optional fee record to use for the transfer\n * @param {PrivateKey | undefined} privateKey Optional private key to use for the transfer transaction\n * @param {OfflineQuery | undefined} offlineQuery Optional offline query if creating transactions in an offline environment\n * @returns {Promise} The transaction id of the transfer transaction\n */\n async buildTransferPublicTransaction(\n amount: number,\n recipient: string,\n fee: number,\n privateKey?: PrivateKey,\n offlineQuery?: OfflineQuery\n ): Promise {\n return this.buildTransferTransaction(amount, recipient, \"public\", fee, false, undefined, undefined, undefined, privateKey, offlineQuery);\n }\n\n /**\n * Build a transfer_public_as_signer transaction to transfer credits to another account for later submission to the Aleo network\n *\n * @param {number} amount The amount of credits to transfer\n * @param {string} recipient The recipient of the transfer\n * @param {string} transferType The type of transfer to perform - options: 'private', 'privateToPublic', 'public', 'publicToPrivate'\n * @param {number} fee The fee to pay for the transfer\n * @param {boolean} privateFee Use a private record to pay the fee. If false this will use the account's public credit balance\n * @param {RecordSearchParams | undefined} recordSearchParams Optional parameters for finding the amount and fee\n * records for the transfer transaction\n * @param {RecordPlaintext | string} amountRecord Optional amount record to use for the transfer\n * @param {RecordPlaintext | string} feeRecord Optional fee record to use for the transfer\n * @param {PrivateKey | undefined} privateKey Optional private key to use for the transfer transaction\n * @param {OfflineQuery | undefined} offlineQuery Optional offline query if creating transactions in an offline environment\n * @returns {Promise} The transaction id of the transfer transaction\n */\n async buildTransferPublicAsSignerTransaction(\n amount: number,\n recipient: string,\n fee: number,\n privateKey?: PrivateKey,\n offlineQuery?: OfflineQuery\n ): Promise {\n return this.buildTransferTransaction(amount, recipient, \"public\", fee, false, undefined, undefined, undefined, privateKey, offlineQuery);\n }\n\n /**\n * Transfer credits to another account\n *\n * @param {number} amount The amount of credits to transfer\n * @param {string} recipient The recipient of the transfer\n * @param {string} transferType The type of transfer to perform - options: 'private', 'privateToPublic', 'public', 'publicToPrivate'\n * @param {number} fee The fee to pay for the transfer\n * @param {boolean} privateFee Use a private record to pay the fee. If false this will use the account's public credit balance\n * @param {RecordSearchParams | undefined} recordSearchParams Optional parameters for finding the amount and fee\n * records for the transfer transaction\n * @param {RecordPlaintext | string} amountRecord Optional amount record to use for the transfer\n * @param {RecordPlaintext | string} feeRecord Optional fee record to use for the transfer\n * @param {PrivateKey | undefined} privateKey Optional private key to use for the transfer transaction\n * @param {OfflineQuery | undefined} offlineQuery Optional offline query if creating transactions in an offline environment\n * @returns {Promise} The transaction id of the transfer transaction\n *\n * @example\n * // Create a new NetworkClient, KeyProvider, and RecordProvider\n * const networkClient = new AleoNetworkClient(\"https://api.explorer.aleo.org/v1\");\n * const keyProvider = new AleoKeyProvider();\n * const recordProvider = new NetworkRecordProvider(account, networkClient);\n *\n * // Initialize a program manager with the key provider to automatically fetch keys for executions\n * const programManager = new ProgramManager(\"https://api.explorer.aleo.org/v1\", keyProvider, recordProvider);\n * await programManager.initialize();\n * const tx_id = await programManager.transfer(1, \"aleo1rhgdu77hgyqd3xjj8ucu3jj9r2krwz6mnzyd80gncr5fxcwlh5rsvzp9px\", \"private\", 0.2)\n * const transaction = await programManager.networkClient.getTransaction(tx_id);\n */\n async transfer(\n amount: number,\n recipient: string,\n transferType: string,\n fee: number,\n privateFee: boolean,\n recordSearchParams?: RecordSearchParams,\n amountRecord?: RecordPlaintext | string,\n feeRecord?: RecordPlaintext | string,\n privateKey?: PrivateKey,\n offlineQuery?: OfflineQuery\n ): Promise {\n const tx = await this.buildTransferTransaction(amount, recipient, transferType, fee, privateFee, recordSearchParams, amountRecord, feeRecord, privateKey, offlineQuery);\n return await this.networkClient.submitTransaction(tx);\n }\n\n /**\n * Build transaction to bond credits to a validator for later submission to the Aleo Network\n *\n * @example\n * // Create a keyProvider to handle key management\n * const keyProvider = new AleoKeyProvider();\n * keyProvider.useCache = true;\n *\n * // Create a new ProgramManager with the key that will be used to bond credits\n * const programManager = new ProgramManager(\"https://api.explorer.aleo.org/v1\", keyProvider, undefined);\n * programManager.setAccount(new Account(\"YourPrivateKey\"));\n *\n * // Create the bonding transaction object for later submission\n * const tx = await programManager.buildBondPublicTransaction(\"aleo1jx8s4dvjepculny4wfrzwyhs3tlyv65r58ns3g6q2gm2esh7ps8sqy9s5j\", \"aleo1rhgdu77hgyqd3xjj8ucu3jj9r2krwz6mnzyd80gncr5fxcwlh5rsvzp9px\", \"aleo1feya8sjy9k2zflvl2dx39pdsq5tju28elnp2ektnn588uu9ghv8s84msv9\", 2000000);\n * console.log(tx);\n *\n * // The transaction can be later submitted to the network using the network client.\n * const result = await programManager.networkClient.submitTransaction(tx);\n *\n * @returns string\n * @param {string} staker_address Address of the staker who is bonding the credits\n * @param {string} validator_address Address of the validator to bond to, if this address is the same as the staker (i.e. the\n * executor of this function), it will attempt to bond the credits as a validator. Bonding as a validator currently\n * requires a minimum of 10,000,000 credits to bond (subject to change). If the address is specified is an existing\n * validator and is different from the address of the executor of this function, it will bond the credits to that\n * validator's staking committee as a delegator. A minimum of 10 credits is required to bond as a delegator.\n * @param {string} withdrawal_address Address to withdraw the staked credits to when unbond_public is called.\n * @param {number} amount The amount of credits to bond\n * @param {Partial} options - Override default execution options.\n */\n async buildBondPublicTransaction(staker_address: string, validator_address: string, withdrawal_address: string, amount: number, options: Partial = {}) {\n const scaledAmount = Math.trunc(amount * 1000000);\n\n const {\n programName = \"credits.aleo\",\n functionName = \"bond_public\",\n fee = options.fee || 0.86,\n privateFee = false,\n inputs = [staker_address, validator_address, withdrawal_address, `${scaledAmount.toString()}u64`],\n keySearchParams = new AleoKeyProviderParams({\n proverUri: CREDITS_PROGRAM_KEYS.bond_public.prover,\n verifierUri: CREDITS_PROGRAM_KEYS.bond_public.verifier,\n cacheKey: \"credits.aleo/bond_public\"\n }),\n program = this.creditsProgram(),\n ...additionalOptions\n } = options;\n\n const executeOptions: ExecuteOptions = {\n programName,\n functionName,\n fee,\n privateFee,\n inputs,\n keySearchParams,\n ...additionalOptions\n };\n\n return await this.buildExecutionTransaction(executeOptions);\n }\n\n /**\n * Bond credits to validator.\n *\n * @example\n * // Create a keyProvider to handle key management\n * const keyProvider = new AleoKeyProvider();\n * keyProvider.useCache = true;\n *\n * // Create a new ProgramManager with the key that will be used to bond credits\n * const programManager = new ProgramManager(\"https://api.explorer.aleo.org/v1\", keyProvider, undefined);\n * programManager.setAccount(new Account(\"YourPrivateKey\"));\n *\n * // Create the bonding transaction\n * const tx_id = await programManager.bondPublic(\"aleo1jx8s4dvjepculny4wfrzwyhs3tlyv65r58ns3g6q2gm2esh7ps8sqy9s5j\", \"aleo1rhgdu77hgyqd3xjj8ucu3jj9r2krwz6mnzyd80gncr5fxcwlh5rsvzp9px\", \"aleo1feya8sjy9k2zflvl2dx39pdsq5tju28elnp2ektnn588uu9ghv8s84msv9\", 2000000);\n *\n * @returns string\n * @param {string} staker_address Address of the staker who is bonding the credits\n * @param {string} validator_address Address of the validator to bond to, if this address is the same as the signer (i.e. the\n * executor of this function), it will attempt to bond the credits as a validator. Bonding as a validator currently\n * requires a minimum of 1,000,000 credits to bond (subject to change). If the address is specified is an existing\n * validator and is different from the address of the executor of this function, it will bond the credits to that\n * validator's staking committee as a delegator. A minimum of 10 credits is required to bond as a delegator.\n * @param {string} withdrawal_address Address to withdraw the staked credits to when unbond_public is called.\n * @param {number} amount The amount of credits to bond\n * @param {Options} options Options for the execution\n */\n async bondPublic(staker_address: string, validator_address: string, withdrawal_address:string, amount: number, options: Partial = {}) {\n const tx = await this.buildBondPublicTransaction(staker_address, validator_address, withdrawal_address, amount, options);\n return await this.networkClient.submitTransaction(tx);\n }\n\n /**\n * Build a bond_validator transaction for later submission to the Aleo Network.\n *\n * @example\n * // Create a keyProvider to handle key management\n * const keyProvider = new AleoKeyProvider();\n * keyProvider.useCache = true;\n *\n * // Create a new ProgramManager with the key that will be used to bond credits\n * const programManager = new ProgramManager(\"https://api.explorer.aleo.org/v1\", keyProvider, undefined);\n * programManager.setAccount(new Account(\"YourPrivateKey\"));\n *\n * // Create the bond validator transaction object for later use.\n * const tx = await programManager.buildBondValidatorTransaction(\"aleo1rhgdu77hgyqd3xjj8ucu3jj9r2krwz6mnzyd80gncr5fxcwlh5rsvzp9px\", \"aleo1feya8sjy9k2zflvl2dx39pdsq5tju28elnp2ektnn588uu9ghv8s84msv9\", 2000000);\n * console.log(tx);\n *\n * // The transaction can later be submitted to the network using the network client.\n * const tx_id = await programManager.networkClient.submitTransaction(tx);\n *\n * @returns string\n * @param {string} validator_address Address of the validator to bond to, if this address is the same as the staker (i.e. the\n * executor of this function), it will attempt to bond the credits as a validator. Bonding as a validator currently\n * requires a minimum of 10,000,000 credits to bond (subject to change). If the address is specified is an existing\n * validator and is different from the address of the executor of this function, it will bond the credits to that\n * validator's staking committee as a delegator. A minimum of 10 credits is required to bond as a delegator.\n * @param {string} withdrawal_address Address to withdraw the staked credits to when unbond_public is called.\n * @param {number} amount The amount of credits to bond\n * @param {number} commission The commission rate for the validator (must be between 0 and 100 - an error will be thrown if it is not)\n * @param {Partial} options - Override default execution options.\n */\n async buildBondValidatorTransaction(validator_address: string, withdrawal_address: string, amount: number, commission: number, options: Partial = {}) {\n const scaledAmount = Math.trunc(amount * 1000000);\n\n const adjustedCommission = Math.trunc(commission)\n\n const {\n programName = \"credits.aleo\",\n functionName = \"bond_validator\",\n fee = options.fee || 0.86,\n privateFee = false,\n inputs = [validator_address, withdrawal_address, `${scaledAmount.toString()}u64`, `${adjustedCommission.toString()}u8`],\n keySearchParams = new AleoKeyProviderParams({\n proverUri: CREDITS_PROGRAM_KEYS.bond_validator.prover,\n verifierUri: CREDITS_PROGRAM_KEYS.bond_validator.verifier,\n cacheKey: \"credits.aleo/bond_validator\"\n }),\n program = this.creditsProgram(),\n ...additionalOptions\n } = options;\n\n const executeOptions: ExecuteOptions = {\n programName,\n functionName,\n fee,\n privateFee,\n inputs,\n keySearchParams,\n ...additionalOptions\n };\n\n return await this.buildExecutionTransaction(executeOptions);\n }\n\n /**\n * Build transaction to bond a validator.\n *\n * @example\n * // Create a keyProvider to handle key management\n * const keyProvider = new AleoKeyProvider();\n * keyProvider.useCache = true;\n *\n * // Create a new ProgramManager with the key that will be used to bond credits\n * const programManager = new ProgramManager(\"https://api.explorer.aleo.org/v1\", keyProvider, undefined);\n * programManager.setAccount(new Account(\"YourPrivateKey\"));\n *\n * // Create the bonding transaction\n * const tx_id = await programManager.bondValidator(\"aleo1rhgdu77hgyqd3xjj8ucu3jj9r2krwz6mnzyd80gncr5fxcwlh5rsvzp9px\", \"aleo1feya8sjy9k2zflvl2dx39pdsq5tju28elnp2ektnn588uu9ghv8s84msv9\", 2000000);\n *\n * @returns string\n * @param {string} validator_address Address of the validator to bond to, if this address is the same as the staker (i.e. the\n * executor of this function), it will attempt to bond the credits as a validator. Bonding as a validator currently\n * requires a minimum of 10,000,000 credits to bond (subject to change). If the address is specified is an existing\n * validator and is different from the address of the executor of this function, it will bond the credits to that\n * validator's staking committee as a delegator. A minimum of 10 credits is required to bond as a delegator.\n * @param {string} withdrawal_address Address to withdraw the staked credits to when unbond_public is called.\n * @param {number} amount The amount of credits to bond\n * @param {number} commission The commission rate for the validator (must be between 0 and 100 - an error will be thrown if it is not)\n * @param {Partial} options - Override default execution options.\n */\n async bondValidator(validator_address: string, withdrawal_address: string, amount: number, commission: number, options: Partial = {}) {\n const tx = await this.buildBondValidatorTransaction(validator_address, withdrawal_address, amount, commission, options);\n return await this.networkClient.submitTransaction(tx);\n }\n\n /**\n * Build a transaction to unbond public credits from a validator in the Aleo network.\n *\n * @param {string} staker_address - The address of the staker who is unbonding the credits.\n * @param {number} amount - The amount of credits to unbond (scaled by 1,000,000).\n * @param {Partial} options - Override default execution options.\n * @returns {Promise} - A promise that resolves to the transaction or an error message.\n *\n * @example\n * // Create a keyProvider to handle key management.\n * const keyProvider = new AleoKeyProvider();\n * keyProvider.useCache = true;\n *\n * // Create a new ProgramManager with the key that will be used to unbond credits.\n * const programManager = new ProgramManager(\"https://api.explorer.aleo.org/v1\", keyProvider, undefined);\n * const tx = await programManager.buildUnbondPublicTransaction(\"aleo1jx8s4dvjepculny4wfrzwyhs3tlyv65r58ns3g6q2gm2esh7ps8sqy9s5j\", 2000000);\n * console.log(tx);\n *\n * // The transaction can be submitted later to the network using the network client.\n * programManager.networkClient.submitTransaction(tx);\n */\n async buildUnbondPublicTransaction(staker_address: string, amount: number, options: Partial = {}): Promise {\n const scaledAmount = Math.trunc(amount * 1000000);\n\n const {\n programName = \"credits.aleo\",\n functionName = \"unbond_public\",\n fee = options.fee || 1.3,\n privateFee = false,\n inputs = [staker_address, `${scaledAmount.toString()}u64`],\n keySearchParams = new AleoKeyProviderParams({\n proverUri: CREDITS_PROGRAM_KEYS.unbond_public.prover,\n verifierUri: CREDITS_PROGRAM_KEYS.unbond_public.verifier,\n cacheKey: \"credits.aleo/unbond_public\"\n }),\n program = this.creditsProgram(),\n ...additionalOptions\n } = options;\n\n const executeOptions: ExecuteOptions = {\n programName,\n functionName,\n fee,\n privateFee,\n inputs,\n keySearchParams,\n ...additionalOptions\n };\n\n return this.buildExecutionTransaction(executeOptions);\n }\n\n /**\n * Unbond a specified amount of staked credits.\n *\n * @example\n * // Create a keyProvider to handle key management\n * const keyProvider = new AleoKeyProvider();\n * keyProvider.useCache = true;\n *\n * // Create a new ProgramManager with the key that will be used to bond credits\n * const programManager = new ProgramManager(\"https://api.explorer.aleo.org/v1\", keyProvider, undefined);\n * programManager.setAccount(new Account(\"YourPrivateKey\"));\n *\n * // Create the bonding transaction and send it to the network\n * const tx_id = await programManager.unbondPublic(\"aleo1jx8s4dvjepculny4wfrzwyhs3tlyv65r58ns3g6q2gm2esh7ps8sqy9s5j\", 10);\n *\n * @returns string\n * @param {string} staker_address Address of the staker who is unbonding the credits\n * @param {number} amount Amount of credits to unbond. If the address of the executor of this function is an\n * existing validator, it will subtract this amount of credits from the validator's staked credits. If there are\n * less than 1,000,000 credits staked pool after the unbond, the validator will be removed from the validator set.\n * If the address of the executor of this function is not a validator and has credits bonded as a delegator, it will\n * subtract this amount of credits from the delegator's staked credits. If there are less than 10 credits bonded\n * after the unbond operation, the delegator will be removed from the validator's staking pool.\n * @param {ExecuteOptions} options Options for the execution\n */\n async unbondPublic(staker_address: string, amount: number, options: Partial = {}): Promise {\n const tx = await this.buildUnbondPublicTransaction(staker_address, amount, options);\n return await this.networkClient.submitTransaction(tx);\n }\n\n /**\n * Build a transaction to claim unbonded public credits in the Aleo network.\n *\n * @param {string} staker_address - The address of the staker who is claiming the credits.\n * @param {Partial} options - Override default execution options.\n * @returns {Promise} - A promise that resolves to the transaction or an error message.\n *\n * @example\n * // Create a keyProvider to handle key management\n * const keyProvider = new AleoKeyProvider();\n * keyProvider.useCache = true;\n *\n * // Create a new ProgramManager with the key that will be used to claim unbonded credits.\n * const programManager = new ProgramManager(\"https://api.explorer.aleo.org/v1\", keyProvider, undefined);\n *\n * // Create the claim unbonded transaction object for later use.\n * const tx = await programManager.buildClaimUnbondPublicTransaction(\"aleo1jx8s4dvjepculny4wfrzwyhs3tlyv65r58ns3g6q2gm2esh7ps8sqy9s5j\");\n * console.log(tx);\n *\n * // The transaction can be submitted later to the network using the network client.\n * programManager.networkClient.submitTransaction(tx);\n */\n async buildClaimUnbondPublicTransaction(staker_address: string, options: Partial = {}): Promise {\n const {\n programName = \"credits.aleo\",\n functionName = \"claim_unbond_public\",\n fee = options.fee || 2,\n privateFee = false,\n inputs = [staker_address],\n keySearchParams = new AleoKeyProviderParams({\n proverUri: CREDITS_PROGRAM_KEYS.claim_unbond_public.prover,\n verifierUri: CREDITS_PROGRAM_KEYS.claim_unbond_public.verifier,\n cacheKey: \"credits.aleo/claim_unbond_public\"\n }),\n program = this.creditsProgram(),\n ...additionalOptions\n } = options;\n\n const executeOptions: ExecuteOptions = {\n programName,\n functionName,\n fee,\n privateFee,\n inputs,\n keySearchParams,\n ...additionalOptions\n };\n\n return await this.buildExecutionTransaction(executeOptions);\n }\n\n /**\n * Claim unbonded credits. If credits have been unbonded by the account executing this function, this method will\n * claim them and add them to the public balance of the account.\n *\n * @example\n * // Create a keyProvider to handle key management\n * const keyProvider = new AleoKeyProvider();\n * keyProvider.useCache = true;\n *\n * // Create a new ProgramManager with the key that will be used to bond credits\n * const programManager = new ProgramManager(\"https://api.explorer.aleo.org/v1\", keyProvider, undefined);\n * programManager.setAccount(new Account(\"YourPrivateKey\"));\n *\n * // Create the bonding transaction\n * const tx_id = await programManager.claimUnbondPublic(\"aleo1jx8s4dvjepculny4wfrzwyhs3tlyv65r58ns3g6q2gm2esh7ps8sqy9s5j\");\n *\n * @param {string} staker_address Address of the staker who is claiming the credits\n * @param {ExecuteOptions} options\n * @returns string\n */\n async claimUnbondPublic(staker_address: string, options: Partial = {}): Promise {\n const tx = await this.buildClaimUnbondPublicTransaction(staker_address, options);\n return await this.networkClient.submitTransaction(tx);\n }\n\n /**\n * Build a set_validator_state transaction for later usage.\n *\n * This function allows a validator to set their state to be either opened or closed to new stakers.\n * When the validator is open to new stakers, any staker (including the validator) can bond or unbond from the validator.\n * When the validator is closed to new stakers, existing stakers can still bond or unbond from the validator, but new stakers cannot bond.\n *\n * This function serves two primary purposes:\n * 1. Allow a validator to leave the committee, by closing themselves to stakers and then unbonding all of their stakers.\n * 2. Allow a validator to maintain their % of stake, by closing themselves to allowing more stakers to bond to them.\n *\n * @example\n * // Create a keyProvider to handle key management\n * const keyProvider = new AleoKeyProvider();\n * keyProvider.useCache = true;\n *\n * // Create a new ProgramManager with the key that will be used to bond credits\n * const programManager = new ProgramManager(\"https://api.explorer.aleo.org/v1\", keyProvider, undefined);\n * programManager.setAccount(new Account(\"ValidatorPrivateKey\"));\n *\n * // Create the bonding transaction\n * const tx = await programManager.buildSetValidatorStateTransaction(true);\n *\n * // The transaction can be submitted later to the network using the network client.\n * programManager.networkClient.submitTransaction(tx);\n *\n * @returns string\n * @param {boolean} validator_state\n * @param {Partial} options - Override default execution options\n */\n async buildSetValidatorStateTransaction(validator_state: boolean, options: Partial = {}) {\n const {\n programName = \"credits.aleo\",\n functionName = \"set_validator_state\",\n fee = 1,\n privateFee = false,\n inputs = [validator_state.toString()],\n keySearchParams = new AleoKeyProviderParams({\n proverUri: CREDITS_PROGRAM_KEYS.set_validator_state.prover,\n verifierUri: CREDITS_PROGRAM_KEYS.set_validator_state.verifier,\n cacheKey: \"credits.aleo/set_validator_state\"\n }),\n ...additionalOptions\n } = options;\n\n const executeOptions: ExecuteOptions = {\n programName,\n functionName,\n fee,\n privateFee,\n inputs,\n keySearchParams,\n ...additionalOptions\n };\n\n return await this.execute(executeOptions);\n }\n\n /**\n * Submit a set_validator_state transaction to the Aleo Network.\n *\n * This function allows a validator to set their state to be either opened or closed to new stakers.\n * When the validator is open to new stakers, any staker (including the validator) can bond or unbond from the validator.\n * When the validator is closed to new stakers, existing stakers can still bond or unbond from the validator, but new stakers cannot bond.\n *\n * This function serves two primary purposes:\n * 1. Allow a validator to leave the committee, by closing themselves to stakers and then unbonding all of their stakers.\n * 2. Allow a validator to maintain their % of stake, by closing themselves to allowing more stakers to bond to them.\n *\n * @example\n * // Create a keyProvider to handle key management\n * const keyProvider = new AleoKeyProvider();\n * keyProvider.useCache = true;\n *\n * // Create a new ProgramManager with the key that will be used to bond credits\n * const programManager = new ProgramManager(\"https://api.explorer.aleo.org/v1\", keyProvider, undefined);\n * programManager.setAccount(new Account(\"ValidatorPrivateKey\"));\n *\n * // Create the bonding transaction\n * const tx_id = await programManager.setValidatorState(true);\n *\n * @returns string\n * @param {boolean} validator_state\n * @param {Partial} options - Override default execution options\n */\n async setValidatorState(validator_state: boolean, options: Partial = {}) {\n const tx = await this.buildSetValidatorStateTransaction(validator_state, options);\n return this.networkClient.submitTransaction(tx);\n }\n\n /**\n * Verify a proof of execution from an offline execution\n *\n * @param {executionResponse} executionResponse\n * @returns {boolean} True if the proof is valid, false otherwise\n */\n verifyExecution(executionResponse: ExecutionResponse): boolean {\n try {\n const execution = executionResponse.getExecution();\n const function_id = executionResponse.getFunctionId();\n const program = executionResponse.getProgram();\n const verifyingKey = executionResponse.getVerifyingKey();\n return verifyFunctionExecution(execution, verifyingKey, program, function_id);\n } catch(e) {\n console.warn(\"The execution was not found in the response, cannot verify the execution\");\n return false;\n }\n }\n\n /**\n * Create a program object from a program's source code\n *\n * @param {string} program Program source code\n * @returns {Program | Error} The program object\n */\n createProgramFromSource(program: string): Program | Error {\n return Program.fromString(program);\n }\n\n /**\n * Get the credits program object\n *\n * @returns {Program} The credits program object\n */\n creditsProgram(): Program {\n return Program.getCreditsProgram();\n }\n\n /**\n * Verify a program is valid\n *\n * @param {string} program The program source code\n */\n verifyProgram(program: string): boolean {\n try {\n Program.fromString(program);\n return true;\n } catch (e) {\n return false;\n }\n }\n\n // Internal utility function for getting a credits.aleo record\n async getCreditsRecord(amount: number, nonces: string[], record?: RecordPlaintext | string, params?: RecordSearchParams): Promise {\n try {\n return record instanceof RecordPlaintext ? record : RecordPlaintext.fromString(record);\n } catch (e) {\n try {\n const recordProvider = this.recordProvider;\n return (await recordProvider.findCreditsRecord(amount, true, nonces, params))\n } catch (e) {\n throw logAndThrow(`Error finding fee record. Record finder response: '${e}'. Please ensure you're connected to a valid Aleo network and a record with enough balance exists.`);\n }\n }\n }\n}\n\n// Ensure the transfer type requires an amount record\nfunction requiresAmountRecord(transferType: string): boolean {\n return PRIVATE_TRANSFER_TYPES.has(transferType);\n}\n\n// Validate the transfer type\nfunction validateTransferType(transferType: string): string | Error {\n return VALID_TRANSFER_TYPES.has(transferType) ? transferType :\n logAndThrow(`Invalid transfer type '${transferType}'. Valid transfer types are 'private', 'privateToPublic', 'public', and 'publicToPrivate'.`);\n}\n\nexport { ProgramManager }\n","import {VerifyingKey, Metadata} from \"@provablehq/wasm\";\n\nconst KEY_STORE = Metadata.baseUrl();\n\ninterface Key {\n name: string,\n locator: string,\n prover: string,\n verifier: string,\n verifyingKey: () => VerifyingKey,\n}\n\nfunction convert(metadata: Metadata): Key {\n // This looks up the method name in VerifyingKey\n const verifyingKey = (VerifyingKey as any)[metadata.verifyingKey];\n\n if (!verifyingKey) {\n throw new Error(\"Invalid method name: \" + metadata.verifyingKey);\n }\n\n return {\n name: metadata.name,\n locator: metadata.locator,\n prover: metadata.prover,\n verifier: metadata.verifier,\n verifyingKey,\n };\n}\n\nconst CREDITS_PROGRAM_KEYS = {\n bond_public: convert(Metadata.bond_public()),\n bond_validator: convert(Metadata.bond_validator()),\n claim_unbond_public: convert(Metadata.claim_unbond_public()),\n fee_private: convert(Metadata.fee_private()),\n fee_public: convert(Metadata.fee_public()),\n inclusion: convert(Metadata.inclusion()),\n join: convert(Metadata.join()),\n set_validator_state: convert(Metadata.set_validator_state()),\n split: convert(Metadata.split()),\n transfer_private: convert(Metadata.transfer_private()),\n transfer_private_to_public: convert(Metadata.transfer_private_to_public()),\n transfer_public: convert(Metadata.transfer_public()),\n transfer_public_as_signer: convert(Metadata.transfer_public_as_signer()),\n transfer_public_to_private: convert(Metadata.transfer_public_to_private()),\n unbond_public: convert(Metadata.unbond_public()),\n getKey: function(key: string): Key | Error {\n if (this.hasOwnProperty(key)) {\n return (this as any)[key] as Key;\n } else {\n return new Error(`Key \"${key}\" not found.`);\n }\n }\n};\n\nconst PRIVATE_TRANSFER_TYPES = new Set([\n \"transfer_private\",\n \"private\",\n \"transferPrivate\",\n \"transfer_private_to_public\",\n \"privateToPublic\",\n \"transferPrivateToPublic\",\n]);\nconst VALID_TRANSFER_TYPES = new Set([\n \"transfer_private\",\n \"private\",\n \"transferPrivate\",\n \"transfer_private_to_public\",\n \"privateToPublic\",\n \"transferPrivateToPublic\",\n \"transfer_public\",\n \"transfer_public_as_signer\",\n \"public\",\n \"public_as_signer\",\n \"transferPublic\",\n \"transferPublicAsSigner\",\n \"transfer_public_to_private\",\n \"publicToPrivate\",\n \"publicAsSigner\",\n \"transferPublicToPrivate\",\n]);\nconst PRIVATE_TRANSFER = new Set([\n \"private\",\n \"transfer_private\",\n \"transferPrivate\",\n]);\nconst PRIVATE_TO_PUBLIC_TRANSFER = new Set([\n \"private_to_public\",\n \"privateToPublic\",\n \"transfer_private_to_public\",\n \"transferPrivateToPublic\",\n]);\nconst PUBLIC_TRANSFER = new Set([\n \"public\",\n \"transfer_public\",\n \"transferPublic\",\n]);\nconst PUBLIC_TRANSFER_AS_SIGNER = new Set([\n \"public_as_signer\",\n \"transfer_public_as_signer\",\n \"transferPublicAsSigner\",\n]);\nconst PUBLIC_TO_PRIVATE_TRANSFER = new Set([\n \"public_to_private\",\n \"publicToPrivate\",\n \"transfer_public_to_private\",\n \"transferPublicToPrivate\",\n]);\n\nfunction logAndThrow(message: string): Error {\n console.error(message);\n throw message;\n}\n\nimport { Account } from \"./account\";\nimport { AleoNetworkClient, ProgramImports } from \"./network-client\";\nimport { Block } from \"./models/block\";\nimport { Execution } from \"./models/execution\";\nimport { Input } from \"./models/input\";\nimport { Output } from \"./models/output\";\nimport { TransactionModel } from \"./models/transactionModel\";\nimport { Transition } from \"./models/transition\";\nimport {\n AleoKeyProvider,\n AleoKeyProviderParams,\n AleoKeyProviderInitParams,\n CachedKeyPair,\n FunctionKeyPair,\n FunctionKeyProvider,\n KeySearchParams,\n} from \"./function-key-provider\";\nimport {\n OfflineKeyProvider,\n OfflineSearchParams\n} from \"./offline-key-provider\";\nimport {\n BlockHeightSearch,\n NetworkRecordProvider,\n RecordProvider,\n RecordSearchParams,\n} from \"./record-provider\";\n\n// @TODO: This function is no longer needed, remove it.\nasync function initializeWasm() {\n console.warn(\"initializeWasm is deprecated, you no longer need to use it\");\n}\n\nexport { createAleoWorker } from \"./managed-worker\";\n\nexport { ProgramManager } from \"./program-manager\";\n\nexport {\n Address,\n Execution as FunctionExecution,\n ExecutionResponse,\n Field,\n OfflineQuery,\n PrivateKey,\n PrivateKeyCiphertext,\n Program,\n ProgramManager as ProgramManagerBase,\n ProvingKey,\n RecordCiphertext,\n RecordPlaintext,\n Signature,\n Transaction,\n VerifyingKey,\n ViewKey,\n initThreadPool,\n verifyFunctionExecution,\n} from \"@provablehq/wasm\";\n\nexport { initializeWasm };\n\nexport {\n Account,\n AleoKeyProvider,\n AleoKeyProviderParams,\n AleoKeyProviderInitParams,\n AleoNetworkClient,\n Block,\n BlockHeightSearch,\n CachedKeyPair,\n Execution,\n FunctionKeyPair,\n FunctionKeyProvider,\n Input,\n Key,\n KeySearchParams,\n NetworkRecordProvider,\n ProgramImports,\n OfflineKeyProvider,\n OfflineSearchParams,\n Output,\n RecordProvider,\n RecordSearchParams,\n TransactionModel,\n Transition,\n CREDITS_PROGRAM_KEYS,\n KEY_STORE,\n PRIVATE_TRANSFER,\n PRIVATE_TO_PUBLIC_TRANSFER,\n PRIVATE_TRANSFER_TYPES,\n PUBLIC_TRANSFER,\n PUBLIC_TRANSFER_AS_SIGNER,\n PUBLIC_TO_PRIVATE_TRANSFER,\n VALID_TRANSFER_TYPES,\n logAndThrow,\n};\n","import {initThreadPool, ProgramManager, PrivateKey, verifyFunctionExecution, FunctionKeyPair} from \"./index\";\nimport { AleoKeyProvider, AleoKeyProviderParams} from \"./function-key-provider\";\nimport { expose } from \"comlink\";\n\nawait initThreadPool();\n\nconst defaultHost = \"https://api.explorer.aleo.org/v1\";\nconst keyProvider = new AleoKeyProvider();\nconst programManager = new ProgramManager(\n defaultHost,\n keyProvider,\n undefined\n);\n\nkeyProvider.useCache(true);\n\nlet lastLocalProgram: string = \"\";\n\nexport interface WorkerAPI {\n run: (\n localProgram: string,\n aleoFunction: string,\n inputs: string[],\n privateKey: string\n ) => Promise<{ outputs: any; execution: string } | string>;\n\n getPrivateKey: () => Promise;\n}\nasync function run(\n localProgram: string,\n aleoFunction: string,\n inputs: string[],\n privateKey: string,\n proveExecution = false\n) {\n console.log(\"Web worker: Executing function locally...\");\n const startTime = performance.now();\n\n try {\n // Ensure the program is valid and that it contains the function specified\n const program = programManager.createProgramFromSource(localProgram);\n if (program instanceof Error) {\n throw \"Error creating program from source\";\n }\n const program_id = program.id();\n if (!program.hasFunction(aleoFunction)) {\n throw `Program ${program_id} does not contain function ${aleoFunction}`;\n }\n const cacheKey = `${program_id}:${aleoFunction}`;\n\n // Get the program imports\n const imports = await programManager.networkClient.getProgramImports(\n localProgram\n );\n\n if (imports instanceof Error) {\n throw \"Error getting program imports\";\n }\n // Get the proving and verifying keys for the function\n if (lastLocalProgram !== localProgram) {\n const keys = await programManager.synthesizeKeys(\n localProgram,\n aleoFunction,\n inputs,\n PrivateKey.from_string(privateKey)\n );\n programManager.keyProvider.cacheKeys(cacheKey, keys);\n lastLocalProgram = localProgram;\n }\n\n // Pass the cache key to the execute function\n const keyParams = new AleoKeyProviderParams({\n cacheKey: cacheKey,\n });\n\n // Execute the function locally\n const response = await programManager.run(\n localProgram,\n aleoFunction,\n inputs,\n proveExecution,\n imports,\n keyParams,\n undefined,\n undefined,\n PrivateKey.from_string(privateKey),\n );\n\n // Return the outputs to the main thread\n console.log(\n `Web worker: Local execution completed in ${\n performance.now() - startTime\n } ms`\n );\n const outputs = response.getOutputs();\n const execution = response.getExecution();\n let executionString = \"\";\n\n const keys = keyProvider.getKeys(cacheKey);\n\n if (keys instanceof Error) {\n throw \"Could not get verifying key\";\n }\n\n const verifyingKey = keys[1];\n\n if (execution) {\n verifyFunctionExecution(\n execution,\n verifyingKey,\n program,\n \"hello\"\n );\n executionString = execution.toString();\n console.log(\"Execution verified successfully: \" + execution);\n } else {\n executionString = \"\";\n }\n\n console.log(`Function execution response: ${outputs}`);\n\n return { outputs: outputs, execution: executionString };\n } catch (error) {\n console.error(error);\n return error ? error.toString() : \"Unknown error\";\n }\n}\n\nasync function getPrivateKey() {\n const privateKey = new PrivateKey();\n return privateKey.to_string();\n}\n\nconst workerAPI = { run, getPrivateKey };\nexpose(workerAPI);\n","/**\n * @license\n * Copyright 2019 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\nconst proxyMarker = Symbol(\"Comlink.proxy\");\nconst createEndpoint = Symbol(\"Comlink.endpoint\");\nconst releaseProxy = Symbol(\"Comlink.releaseProxy\");\nconst finalizer = Symbol(\"Comlink.finalizer\");\nconst throwMarker = Symbol(\"Comlink.thrown\");\nconst isObject = (val) => (typeof val === \"object\" && val !== null) || typeof val === \"function\";\n/**\n * Internal transfer handle to handle objects marked to proxy.\n */\nconst proxyTransferHandler = {\n canHandle: (val) => isObject(val) && val[proxyMarker],\n serialize(obj) {\n const { port1, port2 } = new MessageChannel();\n expose(obj, port1);\n return [port2, [port2]];\n },\n deserialize(port) {\n port.start();\n return wrap(port);\n },\n};\n/**\n * Internal transfer handler to handle thrown exceptions.\n */\nconst throwTransferHandler = {\n canHandle: (value) => isObject(value) && throwMarker in value,\n serialize({ value }) {\n let serialized;\n if (value instanceof Error) {\n serialized = {\n isError: true,\n value: {\n message: value.message,\n name: value.name,\n stack: value.stack,\n },\n };\n }\n else {\n serialized = { isError: false, value };\n }\n return [serialized, []];\n },\n deserialize(serialized) {\n if (serialized.isError) {\n throw Object.assign(new Error(serialized.value.message), serialized.value);\n }\n throw serialized.value;\n },\n};\n/**\n * Allows customizing the serialization of certain values.\n */\nconst transferHandlers = new Map([\n [\"proxy\", proxyTransferHandler],\n [\"throw\", throwTransferHandler],\n]);\nfunction isAllowedOrigin(allowedOrigins, origin) {\n for (const allowedOrigin of allowedOrigins) {\n if (origin === allowedOrigin || allowedOrigin === \"*\") {\n return true;\n }\n if (allowedOrigin instanceof RegExp && allowedOrigin.test(origin)) {\n return true;\n }\n }\n return false;\n}\nfunction expose(obj, ep = globalThis, allowedOrigins = [\"*\"]) {\n ep.addEventListener(\"message\", function callback(ev) {\n if (!ev || !ev.data) {\n return;\n }\n if (!isAllowedOrigin(allowedOrigins, ev.origin)) {\n console.warn(`Invalid origin '${ev.origin}' for comlink proxy`);\n return;\n }\n const { id, type, path } = Object.assign({ path: [] }, ev.data);\n const argumentList = (ev.data.argumentList || []).map(fromWireValue);\n let returnValue;\n try {\n const parent = path.slice(0, -1).reduce((obj, prop) => obj[prop], obj);\n const rawValue = path.reduce((obj, prop) => obj[prop], obj);\n switch (type) {\n case \"GET\" /* MessageType.GET */:\n {\n returnValue = rawValue;\n }\n break;\n case \"SET\" /* MessageType.SET */:\n {\n parent[path.slice(-1)[0]] = fromWireValue(ev.data.value);\n returnValue = true;\n }\n break;\n case \"APPLY\" /* MessageType.APPLY */:\n {\n returnValue = rawValue.apply(parent, argumentList);\n }\n break;\n case \"CONSTRUCT\" /* MessageType.CONSTRUCT */:\n {\n const value = new rawValue(...argumentList);\n returnValue = proxy(value);\n }\n break;\n case \"ENDPOINT\" /* MessageType.ENDPOINT */:\n {\n const { port1, port2 } = new MessageChannel();\n expose(obj, port2);\n returnValue = transfer(port1, [port1]);\n }\n break;\n case \"RELEASE\" /* MessageType.RELEASE */:\n {\n returnValue = undefined;\n }\n break;\n default:\n return;\n }\n }\n catch (value) {\n returnValue = { value, [throwMarker]: 0 };\n }\n Promise.resolve(returnValue)\n .catch((value) => {\n return { value, [throwMarker]: 0 };\n })\n .then((returnValue) => {\n const [wireValue, transferables] = toWireValue(returnValue);\n ep.postMessage(Object.assign(Object.assign({}, wireValue), { id }), transferables);\n if (type === \"RELEASE\" /* MessageType.RELEASE */) {\n // detach and deactive after sending release response above.\n ep.removeEventListener(\"message\", callback);\n closeEndPoint(ep);\n if (finalizer in obj && typeof obj[finalizer] === \"function\") {\n obj[finalizer]();\n }\n }\n })\n .catch((error) => {\n // Send Serialization Error To Caller\n const [wireValue, transferables] = toWireValue({\n value: new TypeError(\"Unserializable return value\"),\n [throwMarker]: 0,\n });\n ep.postMessage(Object.assign(Object.assign({}, wireValue), { id }), transferables);\n });\n });\n if (ep.start) {\n ep.start();\n }\n}\nfunction isMessagePort(endpoint) {\n return endpoint.constructor.name === \"MessagePort\";\n}\nfunction closeEndPoint(endpoint) {\n if (isMessagePort(endpoint))\n endpoint.close();\n}\nfunction wrap(ep, target) {\n return createProxy(ep, [], target);\n}\nfunction throwIfProxyReleased(isReleased) {\n if (isReleased) {\n throw new Error(\"Proxy has been released and is not useable\");\n }\n}\nfunction releaseEndpoint(ep) {\n return requestResponseMessage(ep, {\n type: \"RELEASE\" /* MessageType.RELEASE */,\n }).then(() => {\n closeEndPoint(ep);\n });\n}\nconst proxyCounter = new WeakMap();\nconst proxyFinalizers = \"FinalizationRegistry\" in globalThis &&\n new FinalizationRegistry((ep) => {\n const newCount = (proxyCounter.get(ep) || 0) - 1;\n proxyCounter.set(ep, newCount);\n if (newCount === 0) {\n releaseEndpoint(ep);\n }\n });\nfunction registerProxy(proxy, ep) {\n const newCount = (proxyCounter.get(ep) || 0) + 1;\n proxyCounter.set(ep, newCount);\n if (proxyFinalizers) {\n proxyFinalizers.register(proxy, ep, proxy);\n }\n}\nfunction unregisterProxy(proxy) {\n if (proxyFinalizers) {\n proxyFinalizers.unregister(proxy);\n }\n}\nfunction createProxy(ep, path = [], target = function () { }) {\n let isProxyReleased = false;\n const proxy = new Proxy(target, {\n get(_target, prop) {\n throwIfProxyReleased(isProxyReleased);\n if (prop === releaseProxy) {\n return () => {\n unregisterProxy(proxy);\n releaseEndpoint(ep);\n isProxyReleased = true;\n };\n }\n if (prop === \"then\") {\n if (path.length === 0) {\n return { then: () => proxy };\n }\n const r = requestResponseMessage(ep, {\n type: \"GET\" /* MessageType.GET */,\n path: path.map((p) => p.toString()),\n }).then(fromWireValue);\n return r.then.bind(r);\n }\n return createProxy(ep, [...path, prop]);\n },\n set(_target, prop, rawValue) {\n throwIfProxyReleased(isProxyReleased);\n // FIXME: ES6 Proxy Handler `set` methods are supposed to return a\n // boolean. To show good will, we return true asynchronously ¯\\_(ツ)_/¯\n const [value, transferables] = toWireValue(rawValue);\n return requestResponseMessage(ep, {\n type: \"SET\" /* MessageType.SET */,\n path: [...path, prop].map((p) => p.toString()),\n value,\n }, transferables).then(fromWireValue);\n },\n apply(_target, _thisArg, rawArgumentList) {\n throwIfProxyReleased(isProxyReleased);\n const last = path[path.length - 1];\n if (last === createEndpoint) {\n return requestResponseMessage(ep, {\n type: \"ENDPOINT\" /* MessageType.ENDPOINT */,\n }).then(fromWireValue);\n }\n // We just pretend that `bind()` didn’t happen.\n if (last === \"bind\") {\n return createProxy(ep, path.slice(0, -1));\n }\n const [argumentList, transferables] = processArguments(rawArgumentList);\n return requestResponseMessage(ep, {\n type: \"APPLY\" /* MessageType.APPLY */,\n path: path.map((p) => p.toString()),\n argumentList,\n }, transferables).then(fromWireValue);\n },\n construct(_target, rawArgumentList) {\n throwIfProxyReleased(isProxyReleased);\n const [argumentList, transferables] = processArguments(rawArgumentList);\n return requestResponseMessage(ep, {\n type: \"CONSTRUCT\" /* MessageType.CONSTRUCT */,\n path: path.map((p) => p.toString()),\n argumentList,\n }, transferables).then(fromWireValue);\n },\n });\n registerProxy(proxy, ep);\n return proxy;\n}\nfunction myFlat(arr) {\n return Array.prototype.concat.apply([], arr);\n}\nfunction processArguments(argumentList) {\n const processed = argumentList.map(toWireValue);\n return [processed.map((v) => v[0]), myFlat(processed.map((v) => v[1]))];\n}\nconst transferCache = new WeakMap();\nfunction transfer(obj, transfers) {\n transferCache.set(obj, transfers);\n return obj;\n}\nfunction proxy(obj) {\n return Object.assign(obj, { [proxyMarker]: true });\n}\nfunction windowEndpoint(w, context = globalThis, targetOrigin = \"*\") {\n return {\n postMessage: (msg, transferables) => w.postMessage(msg, targetOrigin, transferables),\n addEventListener: context.addEventListener.bind(context),\n removeEventListener: context.removeEventListener.bind(context),\n };\n}\nfunction toWireValue(value) {\n for (const [name, handler] of transferHandlers) {\n if (handler.canHandle(value)) {\n const [serializedValue, transferables] = handler.serialize(value);\n return [\n {\n type: \"HANDLER\" /* WireValueType.HANDLER */,\n name,\n value: serializedValue,\n },\n transferables,\n ];\n }\n }\n return [\n {\n type: \"RAW\" /* WireValueType.RAW */,\n value,\n },\n transferCache.get(value) || [],\n ];\n}\nfunction fromWireValue(value) {\n switch (value.type) {\n case \"HANDLER\" /* WireValueType.HANDLER */:\n return transferHandlers.get(value.name).deserialize(value.value);\n case \"RAW\" /* WireValueType.RAW */:\n return value.value;\n }\n}\nfunction requestResponseMessage(ep, msg, transfers) {\n return new Promise((resolve) => {\n const id = generateUUID();\n ep.addEventListener(\"message\", function l(ev) {\n if (!ev.data || !ev.data.id || ev.data.id !== id) {\n return;\n }\n ep.removeEventListener(\"message\", l);\n resolve(ev.data);\n });\n if (ep.start) {\n ep.start();\n }\n ep.postMessage(Object.assign({ id }, msg), transfers);\n });\n}\nfunction generateUUID() {\n return new Array(4)\n .fill(0)\n .map(() => Math.floor(Math.random() * Number.MAX_SAFE_INTEGER).toString(16))\n .join(\"-\");\n}\n\nexport { createEndpoint, expose, finalizer, proxy, proxyMarker, releaseProxy, transfer, transferHandlers, windowEndpoint, wrap };\n//# sourceMappingURL=comlink.mjs.map\n","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n// expose the modules object (__webpack_modules__)\n__webpack_require__.m = __webpack_modules__;\n\n// the startup function\n__webpack_require__.x = () => {\n\t// Load entry module and return exports\n\t// This entry module depends on other loaded chunks and execution need to be delayed\n\tvar __webpack_exports__ = __webpack_require__.O(undefined, [933], () => (__webpack_require__(9669)))\n\t__webpack_exports__ = __webpack_require__.O(__webpack_exports__);\n\treturn __webpack_exports__;\n};\n\n","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.f = {};\n// This file contains only the entry chunk.\n// The chunk loading function for additional chunks\n__webpack_require__.e = (chunkId) => {\n\treturn Promise.all(Object.keys(__webpack_require__.f).reduce((promises, key) => {\n\t\t__webpack_require__.f[key](chunkId, promises);\n\t\treturn promises;\n\t}, []));\n};","// This function allow to reference async chunks and sibling chunks for the entrypoint\n__webpack_require__.u = (chunkId) => {\n\t// return url for filenames based on template\n\treturn \"\" + chunkId + \".bundle.js\";\n};","__webpack_require__.g = (function() {\n\tif (typeof globalThis === 'object') return globalThis;\n\ttry {\n\t\treturn this || new Function('return this')();\n\t} catch (e) {\n\t\tif (typeof window === 'object') return window;\n\t}\n})();","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","var scriptUrl;\nif (__webpack_require__.g.importScripts) scriptUrl = __webpack_require__.g.location + \"\";\nvar document = __webpack_require__.g.document;\nif (!scriptUrl && document) {\n\tif (document.currentScript)\n\t\tscriptUrl = document.currentScript.src;\n\tif (!scriptUrl) {\n\t\tvar scripts = document.getElementsByTagName(\"script\");\n\t\tif(scripts.length) {\n\t\t\tvar i = scripts.length - 1;\n\t\t\twhile (i > -1 && !scriptUrl) scriptUrl = scripts[i--].src;\n\t\t}\n\t}\n}\n// When supporting browsers where an automatic publicPath is not supported you must specify an output.publicPath manually via configuration\n// or pass an empty string (\"\") and set the __webpack_public_path__ variable from your code to use your own logic.\nif (!scriptUrl) throw new Error(\"Automatic publicPath is not supported in this browser\");\nscriptUrl = scriptUrl.replace(/#.*$/, \"\").replace(/\\?.*$/, \"\").replace(/\\/[^\\/]+$/, \"/\");\n__webpack_require__.p = scriptUrl;","__webpack_require__.b = self.location + \"\";\n\n// object to store loaded chunks\n// \"1\" means \"already loaded\"\nvar installedChunks = {\n\t530: 1\n};\n\n// importScripts chunk loading\nvar installChunk = (data) => {\n\tvar [chunkIds, moreModules, runtime] = data;\n\tfor(var moduleId in moreModules) {\n\t\tif(__webpack_require__.o(moreModules, moduleId)) {\n\t\t\t__webpack_require__.m[moduleId] = moreModules[moduleId];\n\t\t}\n\t}\n\tif(runtime) runtime(__webpack_require__);\n\twhile(chunkIds.length)\n\t\tinstalledChunks[chunkIds.pop()] = 1;\n\tparentChunkLoadingFunction(data);\n};\n__webpack_require__.f.i = (chunkId, promises) => {\n\t// \"1\" is the signal for \"already loaded\"\n\tif(!installedChunks[chunkId]) {\n\t\tif(true) { // all chunks have JS\n\t\t\timportScripts(__webpack_require__.p + __webpack_require__.u(chunkId));\n\t\t}\n\t}\n};\n\nvar chunkLoadingGlobal = self[\"webpackChunkaleo_website\"] = self[\"webpackChunkaleo_website\"] || [];\nvar parentChunkLoadingFunction = chunkLoadingGlobal.push.bind(chunkLoadingGlobal);\nchunkLoadingGlobal.push = installChunk;\n\n// no HMR\n\n// no HMR manifest","// run startup\nvar __webpack_exports__ = __webpack_require__.x();\n"],"names":["webpackQueues","webpackExports","webpackError","resolveQueue","deferred","next","async","get","url","options","response","fetch","ok","Error","status","post","method","AleoNetworkClient","host","headers","account","constructor","this","setAccount","getAccount","setHost","fetchData","json","error","findUnspentRecords","startHeight","endHeight","privateKey","amounts","maxMicrocredits","nonces","records","Array","start","end","resolvedPrivateKey","latestHeight","failures","totalRecordValue","BigInt","_privateKey","PrivateKey","from_string","viewKey","to_view_key","blockHeight","getLatestHeight","blocks","getBlockRange","i","length","transactions","j","confirmedTransaction","type","transaction","execution","transitions","k","transition","program","outputs","l","output","record","RecordCiphertext","fromString","value","isOwner","recordPlaintext","decrypt","nonce","includes","serialNumber","serialNumberString","getTransitionId","push","microcredits","amounts_found","console","warn","toString","getBlock","height","getDeploymentTransactionIDForProgram","Program","replace","getDeploymentTransactionForProgram","transaction_id","getTransaction","getLatestBlock","getLatestCommittee","getProgram","programId","getProgramObject","inputProgram","getProgramImports","imports","importList","getImports","import_id","hasOwnProperty","programSource","nestedImports","key","logAndThrow","getProgramImportNames","getProgramMappingNames","getProgramMappingValue","mappingName","getStateRoot","id","getTransactions","getTransactionsInMempool","inputOrOutputID","submitTransaction","transaction_string","Transaction","body","Object","assign","message","AleoKeyProviderParams","name","proverUri","verifierUri","cacheKey","params","AleoKeyProvider","cache","cacheOption","keyUris","fetchBytes","data","arrayBuffer","Uint8Array","KEY_STORE","Map","useCache","clearCache","clear","cacheKeys","keyId","keys","provingKey","verifyingKey","set","toBytes","containsKeys","has","deleteKeys","delete","getKeys","debug","provingKeyBytes","verifyingKeyBytes","ProvingKey","fromBytes","VerifyingKey","functionKeys","proverUrl","verifierUrl","CREDITS_PROGRAM_KEYS","getKey","fetchCreditsKeys","fetchRemoteKeys","getVerifyingKey","fetchProvingKey","locator","keyPair","verifying_key","proving_key","prover","bond_public","bondPublicKeys","bondValidatorKeys","bond_validator","claimUnbondPublicKeys","claim_unbond_public","transferKeys","visibility","PRIVATE_TRANSFER","transfer_private","PRIVATE_TO_PUBLIC_TRANSFER","transfer_private_to_public","PUBLIC_TRANSFER","transfer_public","PUBLIC_TRANSFER_AS_SIGNER","transfer_public_as_signer","PUBLIC_TO_PRIVATE_TRANSFER","transfer_public_to_private","joinKeys","join","splitKeys","split","feePrivateKeys","fee_private","feePublicKeys","fee_public","verifier","inclusion","set_validator_state","unbond_public","text","e","inner","unBondPublicKeys","ProgramManager","keyProvider","networkClient","recordProvider","setKeyProvider","setRecordProvider","deploy","fee","privateFee","recordSearchParams","feeRecord","programObject","log","feeKeys","deploymentPrivateKey","getCreditsRecord","undefined","feeProvingKey","feeVerifyingKey","tx","ProgramManager$1","buildDeploymentTransaction","buildExecutionTransaction","programName","functionName","inputs","keySearchParams","offlineQuery","executionPrivateKey","execute","run","function_name","proveExecution","executeFunctionOffline","recordOne","recordTwo","joinProvingKey","joinVerifyingKey","RecordPlaintext","buildJoinTransaction","splitAmount","amountRecord","splitProvingKey","splitVerifyingKey","buildSplitTransaction","synthesizeKeys","function_id","synthesizeKeyPair","buildTransferTransaction","amount","recipient","transferType","validateTransferType","transferProvingKey","transferVerifyingKey","requiresAmountRecord","buildTransferPublicTransaction","buildTransferPublicAsSignerTransaction","transfer","buildBondPublicTransaction","staker_address","validator_address","withdrawal_address","scaledAmount","Math","trunc","creditsProgram","additionalOptions","executeOptions","bondPublic","buildBondValidatorTransaction","commission","adjustedCommission","bondValidator","buildUnbondPublicTransaction","unbondPublic","buildClaimUnbondPublicTransaction","claimUnbondPublic","buildSetValidatorStateTransaction","validator_state","setValidatorState","verifyExecution","executionResponse","getExecution","getFunctionId","verifyFunctionExecution","createProgramFromSource","getCreditsProgram","verifyProgram","findCreditsRecord","PRIVATE_TRANSFER_TYPES","VALID_TRANSFER_TYPES","Metadata","baseUrl","convert","metadata","Set","initThreadPool","defaultHost","programManager","lastLocalProgram","localProgram","aleoFunction","startTime","performance","now","program_id","hasFunction","keyParams","getOutputs","executionString","getPrivateKey","to_string","workerAPI","expose","proxyMarker","Symbol","createEndpoint","releaseProxy","finalizer","throwMarker","isObject","val","transferHandlers","canHandle","serialize","obj","port1","port2","MessageChannel","deserialize","port","createProxy","target","serialized","isError","stack","ep","globalThis","allowedOrigins","addEventListener","callback","ev","origin","allowedOrigin","RegExp","test","isAllowedOrigin","path","argumentList","map","fromWireValue","returnValue","parent","slice","reduce","prop","rawValue","apply","proxy","transfers","transferCache","Promise","resolve","catch","then","wireValue","transferables","toWireValue","postMessage","removeEventListener","closeEndPoint","TypeError","endpoint","isMessagePort","close","throwIfProxyReleased","isReleased","releaseEndpoint","requestResponseMessage","proxyCounter","WeakMap","proxyFinalizers","FinalizationRegistry","newCount","isProxyReleased","Proxy","_target","unregister","unregisterProxy","r","p","bind","_thisArg","rawArgumentList","last","processArguments","construct","register","registerProxy","processed","v","arr","prototype","concat","handler","serializedValue","msg","fill","floor","random","Number","MAX_SAFE_INTEGER","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","exports","module","__webpack_modules__","m","x","__webpack_exports__","O","queue","d","forEach","fn","a","hasAwait","currentDeps","outerResolve","reject","depQueues","promise","rej","deps","dep","ret","wrapDeps","getResult","fnQueue","q","add","err","result","chunkIds","priority","notFulfilled","Infinity","fulfilled","every","splice","definition","o","defineProperty","enumerable","f","chunkId","all","promises","u","g","Function","window","call","scriptUrl","importScripts","location","document","currentScript","src","scripts","getElementsByTagName","b","self","installedChunks","chunkLoadingGlobal","parentChunkLoadingFunction","moreModules","runtime","pop"],"sourceRoot":""} \ No newline at end of file +{"version":3,"file":"530.bundle.js","mappings":";UAAIA,EACAC,EACAC,EACAC,ECHAC,ECAAC,+KCAGC,eAAeC,EAAIC,EAAmBC,GACzC,MAAMC,QAAiBC,MAAMH,EAAKC,GAElC,IAAKC,EAASE,GACV,MAAM,IAAIC,MAAMH,EAASI,OAAS,sBAAwBN,GAG9D,OAAOE,CACX,CAGOJ,eAAeS,EAAKP,EAAmBC,GAC1CA,EAAQO,OAAS,OAEjB,MAAMN,QAAiBC,MAAMH,EAAKC,GAElC,IAAKC,EAASE,GACV,MAAM,IAAIC,MAAMH,EAASI,OAAS,uBAAyBN,GAG/D,OAAOE,CACX,CCUA,MAAMO,EACJC,KACAC,QACAC,QAEAC,WAAAA,CAAYH,EAAcT,GACxBa,KAAKJ,KAAOA,EAAO,WAEfT,GAAWA,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,yBAAIA,KAA+B,0BAAK,GAC5FG,EAA6BD,EAAmBxZ,KAAKmU,KAAKqF,GAC9DA,EAAmBxZ,KAvBCyD,IACnB,IAAKgU,EAAUiC,EAAaC,GAAWlW,EACvC,IAAI,IAAIiS,KAAYgE,EAChBjE,EAAoBwC,EAAEyB,EAAahE,KACrCD,EAAoBM,EAAEL,GAAYgE,EAAYhE,IAIhD,IADGiE,GAASA,EAAQlE,GACdgC,EAASnZ,QACdib,EAAgB9B,EAASmC,OAAS,EACnCH,EAA2BhW,EAAK,MfnB7BrI,EAAOqa,EAAoBO,EAC/BP,EAAoBO,EAAI,IAChBP,EAAoBzN,EAAE,KAAKwK,KAAKpX,GgBDdqa,EAAoBO","sources":["webpack://aleo-website/webpack/runtime/async module","webpack://aleo-website/webpack/runtime/chunk loaded","webpack://aleo-website/webpack/runtime/startup chunk dependencies","webpack://aleo-website/../src/utils.ts","webpack://aleo-website/../src/network-client.ts","webpack://aleo-website/../src/function-key-provider.ts","webpack://aleo-website/../src/program-manager.ts","webpack://aleo-website/../src/index.ts","webpack://aleo-website/../src/worker.ts","webpack://aleo-website/../node_modules/comlink/dist/esm/comlink.mjs","webpack://aleo-website/webpack/bootstrap","webpack://aleo-website/webpack/runtime/define property getters","webpack://aleo-website/webpack/runtime/ensure chunk","webpack://aleo-website/webpack/runtime/get javascript chunk filename","webpack://aleo-website/webpack/runtime/global","webpack://aleo-website/webpack/runtime/hasOwnProperty shorthand","webpack://aleo-website/webpack/runtime/publicPath","webpack://aleo-website/webpack/runtime/importScripts chunk loading","webpack://aleo-website/webpack/startup"],"sourcesContent":["var webpackQueues = typeof Symbol === \"function\" ? Symbol(\"webpack queues\") : \"__webpack_queues__\";\nvar webpackExports = typeof Symbol === \"function\" ? Symbol(\"webpack exports\") : \"__webpack_exports__\";\nvar webpackError = typeof Symbol === \"function\" ? Symbol(\"webpack error\") : \"__webpack_error__\";\nvar resolveQueue = (queue) => {\n\tif(queue && queue.d < 1) {\n\t\tqueue.d = 1;\n\t\tqueue.forEach((fn) => (fn.r--));\n\t\tqueue.forEach((fn) => (fn.r-- ? fn.r++ : fn()));\n\t}\n}\nvar wrapDeps = (deps) => (deps.map((dep) => {\n\tif(dep !== null && typeof dep === \"object\") {\n\t\tif(dep[webpackQueues]) return dep;\n\t\tif(dep.then) {\n\t\t\tvar queue = [];\n\t\t\tqueue.d = 0;\n\t\t\tdep.then((r) => {\n\t\t\t\tobj[webpackExports] = r;\n\t\t\t\tresolveQueue(queue);\n\t\t\t}, (e) => {\n\t\t\t\tobj[webpackError] = e;\n\t\t\t\tresolveQueue(queue);\n\t\t\t});\n\t\t\tvar obj = {};\n\t\t\tobj[webpackQueues] = (fn) => (fn(queue));\n\t\t\treturn obj;\n\t\t}\n\t}\n\tvar ret = {};\n\tret[webpackQueues] = x => {};\n\tret[webpackExports] = dep;\n\treturn ret;\n}));\n__webpack_require__.a = (module, body, hasAwait) => {\n\tvar queue;\n\thasAwait && ((queue = []).d = -1);\n\tvar depQueues = new Set();\n\tvar exports = module.exports;\n\tvar currentDeps;\n\tvar outerResolve;\n\tvar reject;\n\tvar promise = new Promise((resolve, rej) => {\n\t\treject = rej;\n\t\touterResolve = resolve;\n\t});\n\tpromise[webpackExports] = exports;\n\tpromise[webpackQueues] = (fn) => (queue && fn(queue), depQueues.forEach(fn), promise[\"catch\"](x => {}));\n\tmodule.exports = promise;\n\tbody((deps) => {\n\t\tcurrentDeps = wrapDeps(deps);\n\t\tvar fn;\n\t\tvar getResult = () => (currentDeps.map((d) => {\n\t\t\tif(d[webpackError]) throw d[webpackError];\n\t\t\treturn d[webpackExports];\n\t\t}))\n\t\tvar promise = new Promise((resolve) => {\n\t\t\tfn = () => (resolve(getResult));\n\t\t\tfn.r = 0;\n\t\t\tvar fnQueue = (q) => (q !== queue && !depQueues.has(q) && (depQueues.add(q), q && !q.d && (fn.r++, q.push(fn))));\n\t\t\tcurrentDeps.map((dep) => (dep[webpackQueues](fnQueue)));\n\t\t});\n\t\treturn fn.r ? promise : getResult();\n\t}, (err) => ((err ? reject(promise[webpackError] = err) : outerResolve(exports)), resolveQueue(queue)));\n\tqueue && queue.d < 0 && (queue.d = 0);\n};","var deferred = [];\n__webpack_require__.O = (result, chunkIds, fn, priority) => {\n\tif(chunkIds) {\n\t\tpriority = priority || 0;\n\t\tfor(var i = deferred.length; i > 0 && deferred[i - 1][2] > priority; i--) deferred[i] = deferred[i - 1];\n\t\tdeferred[i] = [chunkIds, fn, priority];\n\t\treturn;\n\t}\n\tvar notFulfilled = Infinity;\n\tfor (var i = 0; i < deferred.length; i++) {\n\t\tvar [chunkIds, fn, priority] = deferred[i];\n\t\tvar fulfilled = true;\n\t\tfor (var j = 0; j < chunkIds.length; j++) {\n\t\t\tif ((priority & 1 === 0 || notFulfilled >= priority) && Object.keys(__webpack_require__.O).every((key) => (__webpack_require__.O[key](chunkIds[j])))) {\n\t\t\t\tchunkIds.splice(j--, 1);\n\t\t\t} else {\n\t\t\t\tfulfilled = false;\n\t\t\t\tif(priority < notFulfilled) notFulfilled = priority;\n\t\t\t}\n\t\t}\n\t\tif(fulfilled) {\n\t\t\tdeferred.splice(i--, 1)\n\t\t\tvar r = fn();\n\t\t\tif (r !== undefined) result = r;\n\t\t}\n\t}\n\treturn result;\n};","var next = __webpack_require__.x;\n__webpack_require__.x = () => {\n\treturn __webpack_require__.e(933).then(next);\n};","export async function get(url: URL | string, options?: RequestInit) {\n const response = await fetch(url, options);\n\n if (!response.ok) {\n throw new Error(response.status + \" could not get URL \" + url);\n }\n\n return response;\n}\n\n\nexport async function post(url: URL | string, options: RequestInit) {\n options.method = \"POST\";\n\n const response = await fetch(url, options);\n\n if (!response.ok) {\n throw new Error(response.status + \" could not post URL \" + url);\n }\n\n return response;\n}\n","import { get, post } from \"./utils\";\nimport {\n Account,\n Block,\n RecordCiphertext,\n Program,\n RecordPlaintext,\n PrivateKey,\n Transaction,\n TransactionModel,\n logAndThrow\n} from \"./index\";\n\ntype ProgramImports = { [key: string]: string | Program };\n\ninterface AleoNetworkClientOptions {\n headers?: { [key: string]: string };\n}\n\n/**\n * Client library that encapsulates REST calls to publicly exposed endpoints of Aleo nodes. The methods provided in this\n * allow users to query public information from the Aleo blockchain and submit transactions to the network.\n *\n * @param {string} host\n * @example\n * // Connection to a local node\n * const localNetworkClient = new AleoNetworkClient(\"http://localhost:3030\");\n *\n * // Connection to a public beacon node\n * const publicnetworkClient = new AleoNetworkClient(\"https://api.explorer.aleo.org/v1\");\n */\nclass AleoNetworkClient {\n host: string;\n headers: { [key: string]: string };\n account: Account | undefined;\n\n constructor(host: string, options?: AleoNetworkClientOptions) {\n this.host = host + \"/testnet\";\n\n if (options && options.headers) {\n this.headers = options.headers;\n\n } else {\n this.headers = {\n // This is replaced by the actual version by a Rollup plugin\n \"X-Aleo-SDK-Version\": \"%%VERSION%%\",\n };\n }\n }\n\n /**\n * Set an account to use in networkClient calls\n *\n * @param {Account} account\n * @example\n * const account = new Account();\n * networkClient.setAccount(account);\n */\n setAccount(account: Account) {\n this.account = account;\n }\n\n /**\n * Return the Aleo account used in the networkClient\n *\n * @example\n * const account = networkClient.getAccount();\n */\n getAccount(): Account | undefined {\n return this.account;\n }\n\n /**\n * Set a new host for the networkClient\n *\n * @param {string} host The address of a node hosting the Aleo API\n * @param host\n */\n setHost(host: string) {\n this.host = host + \"/testnet\";\n }\n\n async fetchData(\n url = \"/\",\n ): Promise {\n try {\n const response = await get(this.host + url, {\n headers: this.headers\n });\n\n return await response.json();\n } catch (error) {\n throw new Error(\"Error fetching data.\");\n }\n }\n\n /**\n * Attempts to find unspent records in the Aleo blockchain for a specified private key\n * @param {number} startHeight - The height at which to start searching for unspent records\n * @param {number} endHeight - The height at which to stop searching for unspent records\n * @param {string | PrivateKey} privateKey - The private key to use to find unspent records\n * @param {number[]} amounts - The amounts (in microcredits) to search for (eg. [100, 200, 3000])\n * @param {number} maxMicrocredits - The maximum number of microcredits to search for\n * @param {string[]} nonces - The nonces of already found records to exclude from the search\n *\n * @example\n * // Find all unspent records\n * const privateKey = \"[PRIVATE_KEY]\";\n * const records = networkClient.findUnspentRecords(0, undefined, privateKey);\n *\n * // Find specific amounts\n * const startHeight = 500000;\n * const amounts = [600000, 1000000];\n * const records = networkClient.findUnspentRecords(startHeight, undefined, privateKey, amounts);\n *\n * // Find specific amounts with a maximum number of cumulative microcredits\n * const maxMicrocredits = 100000;\n * const records = networkClient.findUnspentRecords(startHeight, undefined, privateKey, undefined, maxMicrocredits);\n */\n async findUnspentRecords(\n startHeight: number,\n endHeight: number | undefined,\n privateKey: string | PrivateKey | undefined,\n amounts: number[] | undefined,\n maxMicrocredits?: number | undefined,\n nonces?: string[] | undefined,\n ): Promise | Error> {\n nonces = nonces || [];\n // Ensure start height is not negative\n if (startHeight < 0) {\n throw new Error(\"Start height must be greater than or equal to 0\");\n }\n\n // Initialize search parameters\n const records = new Array();\n let start;\n let end;\n let resolvedPrivateKey: PrivateKey;\n let failures = 0;\n let totalRecordValue = BigInt(0);\n let latestHeight: number;\n\n // Ensure a private key is present to find owned records\n if (typeof privateKey === \"undefined\") {\n if (typeof this.account === \"undefined\") {\n throw new Error(\"Private key must be specified in an argument to findOwnedRecords or set in the AleoNetworkClient\");\n } else {\n resolvedPrivateKey = this.account._privateKey;\n }\n } else {\n try {\n resolvedPrivateKey = privateKey instanceof PrivateKey ? privateKey : PrivateKey.from_string(privateKey);\n } catch (error) {\n throw new Error(\"Error parsing private key provided.\");\n }\n }\n const viewKey = resolvedPrivateKey.to_view_key();\n\n // Get the latest height to ensure the range being searched is valid\n try {\n const blockHeight = await this.getLatestHeight();\n if (typeof blockHeight === \"number\") {\n latestHeight = blockHeight;\n } else {\n throw new Error(\"Error fetching latest block height.\");\n }\n } catch (error) {\n throw new Error(\"Error fetching latest block height.\");\n }\n\n // If no end height is specified or is greater than the latest height, set the end height to the latest height\n if (typeof endHeight === \"number\" && endHeight <= latestHeight) {\n end = endHeight\n } else {\n end = latestHeight;\n }\n\n // If the starting is greater than the ending height, return an error\n if (startHeight > end) {\n throw new Error(\"Start height must be less than or equal to end height.\");\n }\n\n // Iterate through blocks in reverse order in chunks of 50\n while (end > startHeight) {\n start = end - 50;\n if (start < startHeight) {\n start = startHeight;\n }\n try {\n // Get 50 blocks (or the difference between the start and end if less than 50)\n const blocks = await this.getBlockRange(start, end);\n end = start;\n if (!(blocks instanceof Error)) {\n // Iterate through blocks to find unspent records\n for (let i = 0; i < blocks.length; i++) {\n const block = blocks[i];\n const transactions = block.transactions;\n if (!(typeof transactions === \"undefined\")) {\n for (let j = 0; j < transactions.length; j++) {\n const confirmedTransaction = transactions[j];\n // Search for unspent records in execute transactions of credits.aleo\n if (confirmedTransaction.type == \"execute\") {\n const transaction = confirmedTransaction.transaction;\n if (transaction.execution && !(typeof transaction.execution.transitions == \"undefined\")) {\n for (let k = 0; k < transaction.execution.transitions.length; k++) {\n const transition = transaction.execution.transitions[k];\n // Only search for unspent records in credits.aleo (for now)\n if (transition.program !== \"credits.aleo\") {\n continue;\n }\n if (!(typeof transition.outputs == \"undefined\")) {\n for (let l = 0; l < transition.outputs.length; l++) {\n const output = transition.outputs[l];\n if (output.type === \"record\") {\n try {\n // Create a wasm record ciphertext object from the found output\n const record = RecordCiphertext.fromString(output.value);\n // Determine if the record is owned by the specified view key\n if (record.isOwner(viewKey)) {\n // Decrypt the record and get the serial number\n const recordPlaintext = record.decrypt(viewKey);\n\n // If the record has already been found, skip it\n const nonce = recordPlaintext.nonce();\n if (nonces.includes(nonce)) {\n continue;\n }\n\n // Otherwise record the nonce that has been found\n const serialNumber = recordPlaintext.serialNumberString(resolvedPrivateKey, \"credits.aleo\", \"credits\");\n // Attempt to see if the serial number is spent\n try {\n await this.getTransitionId(serialNumber);\n } catch (error) {\n // If it's not found, add it to the list of unspent records\n if (!amounts) {\n records.push(recordPlaintext);\n // If the user specified a maximum number of microcredits, check if the search has found enough\n if (typeof maxMicrocredits === \"number\") {\n totalRecordValue += recordPlaintext.microcredits();\n // Exit if the search has found the amount specified\n if (totalRecordValue >= BigInt(maxMicrocredits)) {\n return records;\n }\n }\n }\n // If the user specified a list of amounts, check if the search has found them\n if (!(typeof amounts === \"undefined\") && amounts.length > 0) {\n let amounts_found = 0;\n if (recordPlaintext.microcredits() > amounts[amounts_found]) {\n amounts_found += 1;\n records.push(recordPlaintext);\n // If the user specified a maximum number of microcredits, check if the search has found enough\n if (typeof maxMicrocredits === \"number\") {\n totalRecordValue += recordPlaintext.microcredits();\n // Exit if the search has found the amount specified\n if (totalRecordValue >= BigInt(maxMicrocredits)) {\n return records;\n }\n }\n if (records.length >= amounts.length) {\n return records;\n }\n }\n }\n }\n }\n } catch (error) {\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n } catch (error) {\n // If there is an error fetching blocks, log it and keep searching\n console.warn(\"Error fetching blocks in range: \" + start.toString() + \"-\" + end.toString());\n console.warn(\"Error: \", error);\n failures += 1;\n if (failures > 10) {\n console.warn(\"10 failures fetching records reached. Returning records fetched so far\");\n return records;\n }\n }\n }\n return records;\n }\n\n /**\n * Returns the contents of the block at the specified block height\n *\n * @param {number} height\n * @example\n * const block = networkClient.getBlock(1234);\n */\n async getBlock(height: number): Promise {\n try {\n const block = await this.fetchData(\"/block/\" + height);\n return block;\n } catch (error) {\n throw new Error(\"Error fetching block.\");\n }\n }\n\n /**\n * Returns a range of blocks between the specified block heights\n *\n * @param {number} start\n * @param {number} end\n * @example\n * const blockRange = networkClient.getBlockRange(2050, 2100);\n */\n async getBlockRange(start: number, end: number): Promise | Error> {\n try {\n return await this.fetchData>(\"/blocks?start=\" + start + \"&end=\" + end);\n } catch (error) {\n const errorMessage = \"Error fetching blocks between \" + start + \" and \" + end + \".\"\n throw new Error(errorMessage);\n }\n }\n\n /**\n * Returns the deployment transaction id associated with the specified program\n *\n * @param {Program | string} program\n * @returns {TransactionModel | Error}\n */\n async getDeploymentTransactionIDForProgram(program: Program | string): Promise {\n if (program instanceof Program) {\n program = program.toString();\n }\n try {\n const id = await this.fetchData(\"/find/transactionID/deployment/\" + program);\n return id.replace(\"\\\"\", \"\")\n } catch (error) {\n throw new Error(\"Error fetching deployment transaction for program.\");\n }\n }\n\n /**\n * Returns the deployment transaction associated with a specified program\n *\n * @param {Program | string} program\n * @returns {TransactionModel | Error}\n */\n async getDeploymentTransactionForProgram(program: Program | string): Promise {\n try {\n const transaction_id = await this.getDeploymentTransactionIDForProgram(program);\n return await this.getTransaction(transaction_id);\n } catch (error) {\n throw new Error(\"Error fetching deployment transaction for program.\");\n }\n }\n\n /**\n * Returns the contents of the latest block\n *\n * @example\n * const latestHeight = networkClient.getLatestBlock();\n */\n async getLatestBlock(): Promise {\n try {\n return await this.fetchData(\"/latest/block\") as Block;\n } catch (error) {\n throw new Error(\"Error fetching latest block.\");\n }\n }\n\n /**\n * Returns the latest committee\n *\n * @returns {Promise} A javascript object containing the latest committee\n */\n async getLatestCommittee(): Promise {\n try {\n return await this.fetchData(\"/committee/latest\");\n } catch (error) {\n throw new Error(\"Error fetching latest block.\");\n }\n }\n\n /**\n * Returns the latest block height\n *\n * @example\n * const latestHeight = networkClient.getLatestHeight();\n */\n async getLatestHeight(): Promise {\n try {\n return await this.fetchData(\"/latest/height\");\n } catch (error) {\n throw new Error(\"Error fetching latest height.\");\n }\n }\n\n /**\n * Returns the source code of a program given a program ID\n *\n * @param {string} programId The program ID of a program deployed to the Aleo Network\n * @return {Promise} Source code of the program\n *\n * @example\n * const program = networkClient.getProgram(\"hello_hello.aleo\");\n * const expectedSource = \"program hello_hello.aleo;\\n\\nfunction hello:\\n input r0 as u32.public;\\n input r1 as u32.private;\\n add r0 r1 into r2;\\n output r2 as u32.private;\\n\"\n * assert.equal(program, expectedSource);\n */\n async getProgram(programId: string): Promise {\n try {\n return await this.fetchData(\"/program/\" + programId)\n } catch (error) {\n throw new Error(\"Error fetching program\");\n }\n }\n\n /**\n * Returns a program object from a program ID or program source code\n *\n * @param {string} inputProgram The program ID or program source code of a program deployed to the Aleo Network\n * @return {Promise} Source code of the program\n *\n * @example\n * const programID = \"hello_hello.aleo\";\n * const programSource = \"program hello_hello.aleo;\\n\\nfunction hello:\\n input r0 as u32.public;\\n input r1 as u32.private;\\n add r0 r1 into r2;\\n output r2 as u32.private;\\n\"\n *\n * // Get program object from program ID or program source code\n * const programObjectFromID = await networkClient.getProgramObject(programID);\n * const programObjectFromSource = await networkClient.getProgramObject(programSource);\n *\n * // Both program objects should be equal\n * assert.equal(programObjectFromID.to_string(), programObjectFromSource.to_string());\n */\n async getProgramObject(inputProgram: string): Promise {\n try {\n return Program.fromString(inputProgram);\n } catch (error) {\n try {\n return Program.fromString((await this.getProgram(inputProgram)));\n } catch (error) {\n throw new Error(`${inputProgram} is neither a program name or a valid program`);\n }\n }\n }\n\n /**\n * Returns an object containing the source code of a program and the source code of all programs it imports\n *\n * @param {Program | string} inputProgram The program ID or program source code of a program deployed to the Aleo Network\n * @returns {Promise} Object of the form { \"program_id\": \"program_source\", .. } containing program id & source code for all program imports\n *\n * @example\n * const double_test_source = \"import multiply_test.aleo;\\n\\nprogram double_test.aleo;\\n\\nfunction double_it:\\n input r0 as u32.private;\\n call multiply_test.aleo/multiply 2u32 r0 into r1;\\n output r1 as u32.private;\\n\"\n * const double_test = Program.fromString(double_test_source);\n * const expectedImports = {\n * \"multiply_test.aleo\": \"program multiply_test.aleo;\\n\\nfunction multiply:\\n input r0 as u32.public;\\n input r1 as u32.private;\\n mul r0 r1 into r2;\\n output r2 as u32.private;\\n\"\n * }\n *\n * // Imports can be fetched using the program ID, source code, or program object\n * let programImports = await networkClient.getProgramImports(\"double_test.aleo\");\n * assert.deepStrictEqual(programImports, expectedImports);\n *\n * // Using the program source code\n * programImports = await networkClient.getProgramImports(double_test_source);\n * assert.deepStrictEqual(programImports, expectedImports);\n *\n * // Using the program object\n * programImports = await networkClient.getProgramImports(double_test);\n * assert.deepStrictEqual(programImports, expectedImports);\n */\n async getProgramImports(inputProgram: Program | string): Promise {\n try {\n const imports: ProgramImports = {};\n\n // Get the program object or fail if the program is not valid or does not exist\n const program = inputProgram instanceof Program ? inputProgram : (await this.getProgramObject(inputProgram));\n\n // Get the list of programs that the program imports\n const importList = program.getImports();\n\n // Recursively get any imports that the imported programs have in a depth first search order\n for (let i = 0; i < importList.length; i++) {\n const import_id = importList[i];\n if (!imports.hasOwnProperty(import_id)) {\n const programSource = await this.getProgram(import_id);\n const nestedImports = await this.getProgramImports(import_id);\n for (const key in nestedImports) {\n if (!imports.hasOwnProperty(key)) {\n imports[key] = nestedImports[key];\n }\n }\n imports[import_id] = programSource;\n }\n }\n return imports;\n } catch (error) {\n throw logAndThrow(\"Error fetching program imports: \" + error)\n }\n }\n\n /**\n * Get a list of the program names that a program imports\n *\n * @param {Program | string} inputProgram - The program id or program source code to get the imports of\n * @returns {string[]} - The list of program names that the program imports\n *\n * @example\n * const programImportsNames = networkClient.getProgramImports(\"double_test.aleo\");\n * const expectedImportsNames = [\"multiply_test.aleo\"];\n * assert.deepStrictEqual(programImportsNames, expectedImportsNames);\n */\n async getProgramImportNames(inputProgram: Program | string): Promise {\n try {\n const program = inputProgram instanceof Program ? inputProgram : (await this.getProgramObject(inputProgram));\n return program.getImports();\n } catch (error) {\n throw new Error(\"Error fetching program imports with error: \" + error);\n }\n }\n\n /**\n * Returns the names of the mappings of a program\n *\n * @param {string} programId - The program ID to get the mappings of (e.g. \"credits.aleo\")\n * @example\n * const mappings = networkClient.getProgramMappingNames(\"credits.aleo\");\n * const expectedMappings = [\"account\"];\n * assert.deepStrictEqual(mappings, expectedMappings);\n */\n async getProgramMappingNames(programId: string): Promise | Error> {\n try {\n return await this.fetchData>(\"/program/\" + programId + \"/mappings\")\n } catch (error) {\n throw new Error(\"Error fetching program mappings - ensure the program exists on chain before trying again\");\n }\n }\n\n /**\n * Returns the value of a program's mapping for a specific key\n *\n * @param {string} programId - The program ID to get the mapping value of (e.g. \"credits.aleo\")\n * @param {string} mappingName - The name of the mapping to get the value of (e.g. \"account\")\n * @param {string} key - The key of the mapping to get the value of (e.g. \"aleo1rhgdu77hgyqd3xjj8ucu3jj9r2krwz6mnzyd80gncr5fxcwlh5rsvzp9px\")\n * @return {Promise} String representation of the value of the mapping\n *\n * @example\n * // Get public balance of an account\n * const mappingValue = networkClient.getMappingValue(\"credits.aleo\", \"account\", \"aleo1rhgdu77hgyqd3xjj8ucu3jj9r2krwz6mnzyd80gncr5fxcwlh5rsvzp9px\");\n * const expectedValue = \"0u64\";\n * assert.equal(mappingValue, expectedValue);\n */\n async getProgramMappingValue(programId: string, mappingName: string, key: string): Promise {\n try {\n return await this.fetchData(\"/program/\" + programId + \"/mapping/\" + mappingName + \"/\" + key)\n } catch (error) {\n throw new Error(\"Error fetching mapping value - ensure the mapping exists and the key is correct\");\n }\n }\n\n /**\n * Returns the latest state/merkle root of the Aleo blockchain\n *\n * @example\n * const stateRoot = networkClient.getStateRoot();\n */\n async getStateRoot(): Promise {\n try {\n return await this.fetchData(\"/latest/stateRoot\");\n } catch (error) {\n throw new Error(\"Error fetching Aleo state root\");\n }\n }\n\n /**\n * Returns a transaction by its unique identifier\n *\n * @param {string} id\n * @example\n * const transaction = networkClient.getTransaction(\"at1handz9xjrqeynjrr0xay4pcsgtnczdksz3e584vfsgaz0dh0lyxq43a4wj\");\n */\n async getTransaction(id: string): Promise {\n try {\n return await this.fetchData(\"/transaction/\" + id);\n } catch (error) {\n throw new Error(\"Error fetching transaction.\");\n }\n }\n\n /**\n * Returns the transactions present at the specified block height\n *\n * @param {number} height\n * @example\n * const transactions = networkClient.getTransactions(654);\n */\n async getTransactions(height: number): Promise | Error> {\n try {\n return await this.fetchData>(\"/block/\" + height.toString() + \"/transactions\");\n } catch (error) {\n throw new Error(\"Error fetching transactions.\");\n }\n }\n\n /**\n * Returns the transactions in the memory pool.\n *\n * @example\n * const transactions = networkClient.getTransactionsInMempool();\n */\n async getTransactionsInMempool(): Promise | Error> {\n try {\n return await this.fetchData>(\"/memoryPool/transactions\");\n } catch (error) {\n throw new Error(\"Error fetching transactions from mempool.\");\n }\n }\n\n /**\n * Returns the transition ID of the transition corresponding to the ID of the input or output.\n * @param {string} inputOrOutputID - ID of the input or output.\n *\n * @example\n * const transitionId = networkClient.getTransitionId(\"2429232855236830926144356377868449890830704336664550203176918782554219952323field\");\n */\n async getTransitionId(inputOrOutputID: string): Promise {\n try {\n return await this.fetchData(\"/find/transitionID/\" + inputOrOutputID);\n } catch (error) {\n throw new Error(\"Error fetching transition ID.\");\n }\n }\n\n /**\n * Submit an execute or deployment transaction to the Aleo network\n *\n * @param {Transaction | string} transaction - The transaction to submit to the network\n * @returns {string | Error} - The transaction id of the submitted transaction or the resulting error\n */\n async submitTransaction(transaction: Transaction | string): Promise {\n const transaction_string = transaction instanceof Transaction ? transaction.toString() : transaction;\n try {\n const response = await post(this.host + \"/transaction/broadcast\", {\n body: transaction_string,\n headers: Object.assign({}, this.headers, {\n \"Content-Type\": \"application/json\",\n }),\n });\n\n try {\n return await response.json();\n\n } catch (error) {\n throw new Error(`Error posting transaction. Aleo network response: ${(error as Error).message}`);\n }\n } catch (error) {\n throw new Error(`Error posting transaction: No response received: ${(error as Error).message}`);\n }\n }\n}\n\nexport { AleoNetworkClient, AleoNetworkClientOptions, ProgramImports }\n","import {\n ProvingKey,\n VerifyingKey,\n CREDITS_PROGRAM_KEYS,\n KEY_STORE,\n Key,\n PRIVATE_TRANSFER,\n PRIVATE_TO_PUBLIC_TRANSFER,\n PUBLIC_TRANSFER,\n PUBLIC_TO_PRIVATE_TRANSFER,\n PUBLIC_TRANSFER_AS_SIGNER\n} from \"./index\";\nimport { get } from \"./utils\";\n\ntype FunctionKeyPair = [ProvingKey, VerifyingKey];\ntype CachedKeyPair = [Uint8Array, Uint8Array];\ntype AleoKeyProviderInitParams = {\n proverUri?: string;\n verifierUri?: string;\n cacheKey?: string;\n};\n\n/**\n * Interface for record search parameters. This allows for arbitrary search parameters to be passed to record provider\n * implementations.\n */\ninterface KeySearchParams {\n [key: string]: any; // This allows for arbitrary keys with any type values\n}\n\n/**\n * AleoKeyProviderParams search parameter for the AleoKeyProvider. It allows for the specification of a proverUri and\n * verifierUri to fetch keys via HTTP from a remote resource as well as a unique cacheKey to store the keys in memory.\n */\nclass AleoKeyProviderParams implements KeySearchParams {\n name: string | undefined;\n proverUri: string | undefined;\n verifierUri: string | undefined;\n cacheKey: string | undefined;\n\n /**\n * Create a new AleoKeyProviderParams object which implements the KeySearchParams interface. Users can optionally\n * specify a url for the proverUri & verifierUri to fetch keys via HTTP from a remote resource as well as a unique\n * cacheKey to store the keys in memory for future use. If no proverUri or verifierUri is specified, a cachekey must\n * be provided.\n *\n * @param { AleoKeyProviderInitParams } params - Optional search parameters\n */\n constructor(params: {proverUri?: string, verifierUri?: string, cacheKey?: string, name?: string}) {\n this.proverUri = params.proverUri;\n this.verifierUri = params.verifierUri;\n this.cacheKey = params.cacheKey;\n this.name = params.name;\n }\n}\n\n/**\n * KeyProvider interface. Enables the retrieval of public proving and verifying keys for Aleo Programs.\n */\ninterface FunctionKeyProvider {\n /**\n * Get bond_public function keys from the credits.aleo program\n *\n * @returns {Promise} Proving and verifying keys for the bond_public function\n */\n bondPublicKeys(): Promise;\n\n /**\n * Get bond_validator function keys from the credits.aleo program\n *\n * @returns {Promise} Proving and verifying keys for the bond_validator function\n */\n bondValidatorKeys(): Promise;\n\n /**\n * Cache a set of keys. This will overwrite any existing keys with the same keyId. The user can check if a keyId\n * exists in the cache using the containsKeys method prior to calling this method if overwriting is not desired.\n *\n * @param {string} keyId access key for the cache\n * @param {FunctionKeyPair} keys keys to cache\n */\n cacheKeys(keyId: string, keys: FunctionKeyPair): void;\n\n /**\n * Get unbond_public function keys from the credits.aleo program\n *\n * @returns {Promise} Proving and verifying keys for the unbond_public function\n */\n claimUnbondPublicKeys(): Promise;\n\n /**\n * Get arbitrary function keys from a provider\n *\n * @param {KeySearchParams | undefined} params - Optional search parameters for the key provider\n * @returns {Promise} Proving and verifying keys for the specified program\n *\n * @example\n * // Create a search object which implements the KeySearchParams interface\n * class IndexDbSearch implements KeySearchParams {\n * db: string\n * keyId: string\n * constructor(params: {db: string, keyId: string}) {\n * this.db = params.db;\n * this.keyId = params.keyId;\n * }\n * }\n *\n * // Create a new object which implements the KeyProvider interface\n * class IndexDbKeyProvider implements FunctionKeyProvider {\n * async functionKeys(params: KeySearchParams): Promise {\n * return new Promise((resolve, reject) => {\n * const request = indexedDB.open(params.db, 1);\n *\n * request.onupgradeneeded = function(e) {\n * const db = e.target.result;\n * if (!db.objectStoreNames.contains('keys')) {\n * db.createObjectStore('keys', { keyPath: 'id' });\n * }\n * };\n *\n * request.onsuccess = function(e) {\n * const db = e.target.result;\n * const transaction = db.transaction([\"keys\"], \"readonly\");\n * const store = transaction.objectStore(\"keys\");\n * const request = store.get(params.keyId);\n * request.onsuccess = function(e) {\n * if (request.result) {\n * resolve(request.result as FunctionKeyPair);\n * } else {\n * reject(new Error(\"Key not found\"));\n * }\n * };\n * request.onerror = function(e) { reject(new Error(\"Error fetching key\")); };\n * };\n *\n * request.onerror = function(e) { reject(new Error(\"Error opening database\")); };\n * });\n * }\n *\n * // implement the other methods...\n * }\n *\n *\n * const keyProvider = new AleoKeyProvider();\n * const networkClient = new AleoNetworkClient(\"https://api.explorer.aleo.org/v1\");\n * const recordProvider = new NetworkRecordProvider(account, networkClient);\n *\n * // Initialize a program manager with the key provider to automatically fetch keys for value transfers\n * const programManager = new ProgramManager(\"https://api.explorer.aleo.org/v1\", keyProvider, recordProvider);\n * programManager.transfer(1, \"aleo166q6ww6688cug7qxwe7nhctjpymydwzy2h7rscfmatqmfwnjvggqcad0at\", \"public\", 0.5);\n *\n * // Keys can also be fetched manually\n * const searchParams = new IndexDbSearch({db: \"keys\", keyId: \"credits.aleo:transferPrivate\"});\n * const [transferPrivateProvingKey, transferPrivateVerifyingKey] = await keyProvider.functionKeys(searchParams);\n */\n functionKeys(params?: KeySearchParams): Promise;\n\n /**\n * Get fee_private function keys from the credits.aleo program\n *\n * @returns {Promise} Proving and verifying keys for the join function\n */\n feePrivateKeys(): Promise;\n\n /**\n * Get fee_public function keys from the credits.aleo program\n *\n * @returns {Promise} Proving and verifying keys for the join function\n */\n feePublicKeys(): Promise;\n\n /**\n * Get join function keys from the credits.aleo program\n *\n * @returns {Promise} Proving and verifying keys for the join function\n */\n joinKeys(): Promise;\n\n /**\n * Get split function keys from the credits.aleo program\n *\n * @returns {Promise} Proving and verifying keys for the join function\n */\n splitKeys(): Promise;\n\n /**\n * Get keys for a variant of the transfer function from the credits.aleo program\n *\n * @param {string} visibility Visibility of the transfer function (private, public, privateToPublic, publicToPrivate)\n * @returns {Promise} Proving and verifying keys for the specified transfer function\n *\n * @example\n * // Create a new object which implements the KeyProvider interface\n * const networkClient = new AleoNetworkClient(\"https://api.explorer.aleo.org/v1\");\n * const keyProvider = new AleoKeyProvider();\n * const recordProvider = new NetworkRecordProvider(account, networkClient);\n *\n * // Initialize a program manager with the key provider to automatically fetch keys for value transfers\n * const programManager = new ProgramManager(\"https://api.explorer.aleo.org/v1\", keyProvider, recordProvider);\n * programManager.transfer(1, \"aleo166q6ww6688cug7qxwe7nhctjpymydwzy2h7rscfmatqmfwnjvggqcad0at\", \"public\", 0.5);\n *\n * // Keys can also be fetched manually\n * const [transferPublicProvingKey, transferPublicVerifyingKey] = await keyProvider.transferKeys(\"public\");\n */\n transferKeys(visibility: string): Promise;\n\n /**\n * Get unbond_public function keys from the credits.aleo program\n *\n * @returns {Promise} Proving and verifying keys for the join function\n */\n unBondPublicKeys(): Promise;\n\n}\n\n\n/**\n * AleoKeyProvider class. Implements the KeyProvider interface. Enables the retrieval of Aleo program proving and\n * verifying keys for the credits.aleo program over http from official Aleo sources and storing and retrieving function\n * keys from a local memory cache.\n */\nclass AleoKeyProvider implements FunctionKeyProvider {\n cache: Map;\n cacheOption: boolean;\n keyUris: string;\n\n async fetchBytes(\n url = \"/\",\n ): Promise {\n try {\n const response = await get(url);\n const data = await response.arrayBuffer();\n return new Uint8Array(data);\n } catch (error) {\n throw new Error(\"Error fetching data.\" + error);\n }\n }\n\n constructor() {\n this.keyUris = KEY_STORE;\n this.cache = new Map();\n this.cacheOption = false;\n }\n\n /**\n * Use local memory to store keys\n *\n * @param {boolean} useCache whether to store keys in local memory\n */\n useCache(useCache: boolean) {\n this.cacheOption = useCache;\n }\n\n /**\n * Clear the key cache\n */\n clearCache() {\n this.cache.clear();\n }\n\n /**\n * Cache a set of keys. This will overwrite any existing keys with the same keyId. The user can check if a keyId\n * exists in the cache using the containsKeys method prior to calling this method if overwriting is not desired.\n *\n * @param {string} keyId access key for the cache\n * @param {FunctionKeyPair} keys keys to cache\n */\n cacheKeys(keyId: string, keys: FunctionKeyPair) {\n const [provingKey, verifyingKey] = keys;\n this.cache.set(keyId, [provingKey.toBytes(), verifyingKey.toBytes()]);\n }\n\n /**\n * Determine if a keyId exists in the cache\n *\n * @param {string} keyId keyId of a proving and verifying key pair\n * @returns {boolean} true if the keyId exists in the cache, false otherwise\n */\n containsKeys(keyId: string): boolean {\n return this.cache.has(keyId)\n }\n\n /**\n * Delete a set of keys from the cache\n *\n * @param {string} keyId keyId of a proving and verifying key pair to delete from memory\n * @returns {boolean} true if the keyId exists in the cache and was deleted, false if the key did not exist\n */\n deleteKeys(keyId: string): boolean {\n return this.cache.delete(keyId)\n }\n\n /**\n * Get a set of keys from the cache\n * @param keyId keyId of a proving and verifying key pair\n *\n * @returns {FunctionKeyPair | Error} Proving and verifying keys for the specified program\n */\n getKeys(keyId: string): FunctionKeyPair | Error {\n console.debug(`Checking if key exists in cache. KeyId: ${keyId}`)\n if (this.cache.has(keyId)) {\n const [provingKeyBytes, verifyingKeyBytes] = this.cache.get(keyId);\n return [ProvingKey.fromBytes(provingKeyBytes), VerifyingKey.fromBytes(verifyingKeyBytes)];\n } else {\n return new Error(\"Key not found in cache.\");\n }\n }\n\n /**\n * Get arbitrary function keys from a provider\n *\n * @param {KeySearchParams} params parameters for the key search in form of: {proverUri: string, verifierUri: string, cacheKey: string}\n * @returns {Promise} Proving and verifying keys for the specified program\n *\n * @example\n * // Create a new object which implements the KeyProvider interface\n * const networkClient = new AleoNetworkClient(\"https://api.explorer.aleo.org/v1\");\n * const keyProvider = new AleoKeyProvider();\n * const recordProvider = new NetworkRecordProvider(account, networkClient);\n *\n * // Initialize a program manager with the key provider to automatically fetch keys for value transfers\n * const programManager = new ProgramManager(\"https://api.explorer.aleo.org/v1\", keyProvider, recordProvider);\n * programManager.transfer(1, \"aleo166q6ww6688cug7qxwe7nhctjpymydwzy2h7rscfmatqmfwnjvggqcad0at\", \"public\", 0.5);\n *\n * // Keys can also be fetched manually using the key provider\n * const keySearchParams = { \"cacheKey\": \"myProgram:myFunction\" };\n * const [transferPrivateProvingKey, transferPrivateVerifyingKey] = await keyProvider.functionKeys(keySearchParams);\n */\n async functionKeys(params?: KeySearchParams): Promise {\n if (params) {\n let proverUrl;\n let verifierUrl;\n let cacheKey;\n if (\"name\" in params && typeof params[\"name\"] == \"string\") {\n let key = CREDITS_PROGRAM_KEYS.getKey(params[\"name\"]);\n if (!(key instanceof Error)) {\n return this.fetchCreditsKeys(key);\n }\n }\n\n if (\"proverUri\" in params && typeof params[\"proverUri\"] == \"string\") {\n proverUrl = params[\"proverUri\"];\n }\n\n if (\"verifierUri\" in params && typeof params[\"verifierUri\"] == \"string\") {\n verifierUrl = params[\"verifierUri\"];\n }\n\n if (\"cacheKey\" in params && typeof params[\"cacheKey\"] == \"string\") {\n cacheKey = params[\"cacheKey\"];\n }\n\n if (proverUrl && verifierUrl) {\n return await this.fetchRemoteKeys(proverUrl, verifierUrl, cacheKey);\n }\n\n if (cacheKey) {\n return this.getKeys(cacheKey);\n }\n }\n throw Error(\"Invalid parameters provided, must provide either a cacheKey and/or a proverUrl and a verifierUrl\");\n }\n\n /**\n * Returns the proving and verifying keys for a specified program from a specified url.\n *\n * @param {string} verifierUrl Url of the proving key\n * @param {string} proverUrl Url the verifying key\n * @param {string} cacheKey Key to store the keys in the cache\n *\n * @returns {Promise} Proving and verifying keys for the specified program\n *\n * @example\n * // Create a new AleoKeyProvider object\n * const networkClient = new AleoNetworkClient(\"https://api.explorer.aleo.org/v1\");\n * const keyProvider = new AleoKeyProvider();\n * const recordProvider = new NetworkRecordProvider(account, networkClient);\n *\n * // Initialize a program manager with the key provider to automatically fetch keys for value transfers\n * const programManager = new ProgramManager(\"https://api.explorer.aleo.org/v1\", keyProvider, recordProvider);\n * programManager.transfer(1, \"aleo166q6ww6688cug7qxwe7nhctjpymydwzy2h7rscfmatqmfwnjvggqcad0at\", \"public\", 0.5);\n *\n * // Keys can also be fetched manually\n * const [transferPrivateProvingKey, transferPrivateVerifyingKey] = await keyProvider.fetchKeys(\n * CREDITS_PROGRAM_KEYS.transfer_private.prover,\n * CREDITS_PROGRAM_KEYS.transfer_private.verifier,\n * );\n */\n async fetchRemoteKeys(proverUrl: string, verifierUrl: string, cacheKey?: string): Promise {\n try {\n // If cache is enabled, check if the keys have already been fetched and return them if they have\n if (this.cacheOption) {\n if (!cacheKey) {\n cacheKey = proverUrl;\n }\n const value = this.cache.get(cacheKey);\n if (typeof value !== \"undefined\") {\n return [ProvingKey.fromBytes(value[0]), VerifyingKey.fromBytes(value[1])];\n } else {\n console.debug(\"Fetching proving keys from url \" + proverUrl);\n const provingKey = ProvingKey.fromBytes(await this.fetchBytes(proverUrl))\n console.debug(\"Fetching verifying keys \" + verifierUrl);\n const verifyingKey = (await this.getVerifyingKey(verifierUrl));\n this.cache.set(cacheKey, [provingKey.toBytes(), verifyingKey.toBytes()]);\n return [provingKey, verifyingKey];\n }\n }\n else {\n // If cache is disabled, fetch the keys and return them\n const provingKey = ProvingKey.fromBytes(await this.fetchBytes(proverUrl))\n const verifyingKey = (await this.getVerifyingKey(verifierUrl));\n return [provingKey, verifyingKey];\n }\n } catch (error) {\n throw new Error(`Error: ${error} fetching fee proving and verifying keys from ${proverUrl} and ${verifierUrl}.`);\n }\n }\n\n /***\n * Fetches the proving key from a remote source.\n *\n * @param proverUrl\n * @param cacheKey\n *\n * @returns {Promise} Proving key for the specified program\n */\n async fetchProvingKey(proverUrl: string, cacheKey?: string): Promise {\n try {\n // If cache is enabled, check if the keys have already been fetched and return them if they have\n if (this.cacheOption) {\n if (!cacheKey) {\n cacheKey = proverUrl;\n }\n const value = this.cache.get(cacheKey);\n if (typeof value !== \"undefined\") {\n return ProvingKey.fromBytes(value[0]);\n } else {\n console.debug(\"Fetching proving keys from url \" + proverUrl);\n const provingKey = ProvingKey.fromBytes(await this.fetchBytes(proverUrl));\n return provingKey;\n }\n }\n else {\n const provingKey = ProvingKey.fromBytes(await this.fetchBytes(proverUrl));\n return provingKey;\n }\n } catch (error) {\n throw new Error(`Error: ${error} fetching fee proving keys from ${proverUrl}`);\n }\n }\n\n async fetchCreditsKeys(key: Key): Promise {\n try {\n if (!this.cache.has(key.locator) || !this.cacheOption) {\n const verifying_key = key.verifyingKey()\n const proving_key = await this.fetchProvingKey(key.prover, key.locator);\n if (this.cacheOption) {\n this.cache.set(CREDITS_PROGRAM_KEYS.bond_public.locator, [proving_key.toBytes(), verifying_key.toBytes()]);\n }\n return [proving_key, verifying_key];\n } else {\n const keyPair = this.cache.get(key.locator);\n return [ProvingKey.fromBytes(keyPair[0]), VerifyingKey.fromBytes(keyPair[1])];\n }\n } catch (error) {\n throw new Error(`Error: fetching credits.aleo keys: ${error}`);\n }\n }\n\n async bondPublicKeys(): Promise {\n return this.fetchCreditsKeys(CREDITS_PROGRAM_KEYS.bond_public);\n }\n\n bondValidatorKeys(): Promise {\n return this.fetchCreditsKeys(CREDITS_PROGRAM_KEYS.bond_validator);\n }\n\n claimUnbondPublicKeys(): Promise {\n return this.fetchCreditsKeys(CREDITS_PROGRAM_KEYS.claim_unbond_public)\n }\n\n /**\n * Returns the proving and verifying keys for the transfer functions in the credits.aleo program\n * @param {string} visibility Visibility of the transfer function\n * @returns {Promise} Proving and verifying keys for the transfer functions\n *\n * @example\n * // Create a new AleoKeyProvider\n * const networkClient = new AleoNetworkClient(\"https://api.explorer.aleo.org/v1\");\n * const keyProvider = new AleoKeyProvider();\n * const recordProvider = new NetworkRecordProvider(account, networkClient);\n *\n * // Initialize a program manager with the key provider to automatically fetch keys for value transfers\n * const programManager = new ProgramManager(\"https://api.explorer.aleo.org/v1\", keyProvider, recordProvider);\n * programManager.transfer(1, \"aleo166q6ww6688cug7qxwe7nhctjpymydwzy2h7rscfmatqmfwnjvggqcad0at\", \"public\", 0.5);\n *\n * // Keys can also be fetched manually\n * const [transferPublicProvingKey, transferPublicVerifyingKey] = await keyProvider.transferKeys(\"public\");\n */\n async transferKeys(visibility: string): Promise {\n if (PRIVATE_TRANSFER.has(visibility)) {\n return await this.fetchCreditsKeys(CREDITS_PROGRAM_KEYS.transfer_private);\n } else if (PRIVATE_TO_PUBLIC_TRANSFER.has(visibility)) {\n return await this.fetchCreditsKeys(CREDITS_PROGRAM_KEYS.transfer_private_to_public);\n } else if (PUBLIC_TRANSFER.has(visibility)) {\n return await this.fetchCreditsKeys(CREDITS_PROGRAM_KEYS.transfer_public);\n } else if (PUBLIC_TRANSFER_AS_SIGNER.has(visibility)) {\n return await this.fetchCreditsKeys(CREDITS_PROGRAM_KEYS.transfer_public_as_signer);\n } else if (PUBLIC_TO_PRIVATE_TRANSFER.has(visibility)) {\n return await this.fetchCreditsKeys(CREDITS_PROGRAM_KEYS.transfer_public_to_private);\n } else {\n throw new Error(\"Invalid visibility type\");\n }\n }\n\n /**\n * Returns the proving and verifying keys for the join function in the credits.aleo program\n *\n * @returns {Promise} Proving and verifying keys for the join function\n */\n async joinKeys(): Promise {\n return await this.fetchCreditsKeys(CREDITS_PROGRAM_KEYS.join);\n }\n\n /**\n * Returns the proving and verifying keys for the split function in the credits.aleo program\n *\n * @returns {Promise} Proving and verifying keys for the split function\n * */\n async splitKeys(): Promise {\n return await this.fetchCreditsKeys(CREDITS_PROGRAM_KEYS.split);\n }\n\n /**\n * Returns the proving and verifying keys for the fee_private function in the credits.aleo program\n *\n * @returns {Promise} Proving and verifying keys for the fee function\n */\n async feePrivateKeys(): Promise {\n return await this.fetchCreditsKeys(CREDITS_PROGRAM_KEYS.fee_private);\n }\n\n /**\n * Returns the proving and verifying keys for the fee_public function in the credits.aleo program\n *\n * @returns {Promise} Proving and verifying keys for the fee function\n */\n async feePublicKeys(): Promise {\n return await this.fetchCreditsKeys(CREDITS_PROGRAM_KEYS.fee_public);\n }\n\n /**\n * Gets a verifying key. If the verifying key is for a credits.aleo function, get it from the wasm cache otherwise\n *\n * @returns {Promise} Verifying key for the function\n */\n // attempt to fetch it from the network\n async getVerifyingKey(verifierUri: string): Promise {\n switch (verifierUri) {\n case CREDITS_PROGRAM_KEYS.bond_public.verifier:\n return CREDITS_PROGRAM_KEYS.bond_public.verifyingKey();\n case CREDITS_PROGRAM_KEYS.bond_validator.verifier:\n return CREDITS_PROGRAM_KEYS.bond_validator.verifyingKey();\n case CREDITS_PROGRAM_KEYS.claim_unbond_public.verifier:\n return CREDITS_PROGRAM_KEYS.claim_unbond_public.verifyingKey();\n case CREDITS_PROGRAM_KEYS.fee_private.verifier:\n return CREDITS_PROGRAM_KEYS.fee_private.verifyingKey();\n case CREDITS_PROGRAM_KEYS.fee_public.verifier:\n return CREDITS_PROGRAM_KEYS.fee_public.verifyingKey();\n case CREDITS_PROGRAM_KEYS.inclusion.verifier:\n return CREDITS_PROGRAM_KEYS.inclusion.verifyingKey();\n case CREDITS_PROGRAM_KEYS.join.verifier:\n return CREDITS_PROGRAM_KEYS.join.verifyingKey();\n case CREDITS_PROGRAM_KEYS.set_validator_state.verifier:\n return CREDITS_PROGRAM_KEYS.set_validator_state.verifyingKey();\n case CREDITS_PROGRAM_KEYS.split.verifier:\n return CREDITS_PROGRAM_KEYS.split.verifyingKey();\n case CREDITS_PROGRAM_KEYS.transfer_private.verifier:\n return CREDITS_PROGRAM_KEYS.transfer_private.verifyingKey();\n case CREDITS_PROGRAM_KEYS.transfer_private_to_public.verifier:\n return CREDITS_PROGRAM_KEYS.transfer_private_to_public.verifyingKey();\n case CREDITS_PROGRAM_KEYS.transfer_public.verifier:\n return CREDITS_PROGRAM_KEYS.transfer_public.verifyingKey();\n case CREDITS_PROGRAM_KEYS.transfer_public_as_signer.verifier:\n return CREDITS_PROGRAM_KEYS.transfer_public_as_signer.verifyingKey();\n case CREDITS_PROGRAM_KEYS.transfer_public_to_private.verifier:\n return CREDITS_PROGRAM_KEYS.transfer_public_to_private.verifyingKey();\n case CREDITS_PROGRAM_KEYS.unbond_public.verifier:\n return CREDITS_PROGRAM_KEYS.unbond_public.verifyingKey();\n default:\n try {\n /// Try to fetch the verifying key from the network as a string\n const response = await get(verifierUri);\n const text = await response.text();\n return VerifyingKey.fromString(text);\n } catch (e) {\n /// If that fails, try to fetch the verifying key from the network as bytes\n try {\n return VerifyingKey.fromBytes(await this.fetchBytes(verifierUri));\n } catch (inner) {\n return new Error(\"Invalid verifying key. Error: \" + inner);\n }\n }\n }\n }\n\n unBondPublicKeys(): Promise {\n return this.fetchCreditsKeys(CREDITS_PROGRAM_KEYS.unbond_public);\n }\n}\n\nexport {AleoKeyProvider, AleoKeyProviderParams, AleoKeyProviderInitParams, CachedKeyPair, FunctionKeyPair, FunctionKeyProvider, KeySearchParams}\n","import {\n Account,\n AleoKeyProvider,\n AleoNetworkClient,\n ExecutionResponse,\n FunctionKeyProvider,\n FunctionKeyPair,\n OfflineQuery,\n KeySearchParams,\n RecordPlaintext,\n RecordProvider,\n RecordSearchParams,\n PrivateKey,\n Program,\n ProgramImports,\n ProvingKey,\n VerifyingKey,\n Transaction,\n PRIVATE_TRANSFER_TYPES,\n VALID_TRANSFER_TYPES,\n logAndThrow,\n ProgramManagerBase as WasmProgramManager, verifyFunctionExecution, AleoKeyProviderParams, CREDITS_PROGRAM_KEYS,\n} from \"./index\";\nimport {Execution} from \"@provablehq/wasm/dist/crates/aleo_wasm\";\n\n/**\n * Represents the options for executing a transaction in the Aleo network.\n * This interface is used to specify the parameters required for building and submitting an execution transaction.\n *\n * @property {string} programName - The name of the program containing the function to be executed.\n * @property {string} functionName - The name of the function to execute within the program.\n * @property {number} fee - The fee to be paid for the transaction.\n * @property {boolean} privateFee - If true, uses a private record to pay the fee; otherwise, uses the account's public credit balance.\n * @property {string[]} inputs - The inputs to the function being executed.\n * @property {RecordSearchParams} [recordSearchParams] - Optional parameters for searching for a record to pay the execution transaction fee.\n * @property {KeySearchParams} [keySearchParams] - Optional parameters for finding the matching proving & verifying keys for the function.\n * @property {string | RecordPlaintext} [feeRecord] - Optional fee record to use for the transaction.\n * @property {ProvingKey} [provingKey] - Optional proving key to use for the transaction.\n * @property {VerifyingKey} [verifyingKey] - Optional verifying key to use for the transaction.\n * @property {PrivateKey} [privateKey] - Optional private key to use for the transaction.\n * @property {OfflineQuery} [offlineQuery] - Optional offline query if creating transactions in an offline environment.\n * @property {string | Program} [program] - Optional program source code to use for the transaction.\n * @property {ProgramImports} [imports] - Optional programs that the program being executed imports.\n */\ninterface ExecuteOptions {\n programName: string;\n functionName: string;\n fee: number;\n privateFee: boolean;\n inputs: string[];\n recordSearchParams?: RecordSearchParams;\n keySearchParams?: KeySearchParams;\n feeRecord?: string | RecordPlaintext;\n provingKey?: ProvingKey;\n verifyingKey?: VerifyingKey;\n privateKey?: PrivateKey;\n offlineQuery?: OfflineQuery;\n program?: string | Program;\n imports?: ProgramImports;\n}\n\n/**\n * The ProgramManager class is used to execute and deploy programs on the Aleo network and create value transfers.\n */\nclass ProgramManager {\n account: Account | undefined;\n keyProvider: FunctionKeyProvider;\n host: string;\n networkClient: AleoNetworkClient;\n recordProvider: RecordProvider | undefined;\n\n /** Create a new instance of the ProgramManager\n *\n * @param { string | undefined } host A host uri running the official Aleo API\n * @param { FunctionKeyProvider | undefined } keyProvider A key provider that implements {@link FunctionKeyProvider} interface\n * @param { RecordProvider | undefined } recordProvider A record provider that implements {@link RecordProvider} interface\n */\n constructor(host?: string | undefined, keyProvider?: FunctionKeyProvider | undefined, recordProvider?: RecordProvider | undefined) {\n this.host = host ? host : 'https://api.explorer.aleo.org/v1';\n this.networkClient = new AleoNetworkClient(this.host);\n \n this.keyProvider = keyProvider ? keyProvider : new AleoKeyProvider();\n this.recordProvider = recordProvider;\n }\n\n /**\n * Set the account to use for transaction submission to the Aleo network\n *\n * @param {Account} account Account to use for transaction submission\n */\n setAccount(account: Account) {\n this.account = account;\n }\n\n /**\n * Set the key provider that provides the proving and verifying keys for programs\n *\n * @param {FunctionKeyProvider} keyProvider\n */\n setKeyProvider(keyProvider: FunctionKeyProvider) {\n this.keyProvider = keyProvider;\n }\n\n /**\n * Set the host peer to use for transaction submission to the Aleo network\n *\n * @param host {string} Peer url to use for transaction submission\n */\n setHost(host: string) {\n this.host = host;\n this.networkClient.setHost(host);\n }\n\n /**\n * Set the record provider that provides records for transactions\n *\n * @param {RecordProvider} recordProvider\n */\n setRecordProvider(recordProvider: RecordProvider) {\n this.recordProvider = recordProvider;\n }\n\n /**\n * Deploy an Aleo program to the Aleo network\n *\n * @param {string} program Program source code\n * @param {number} fee Fee to pay for the transaction\n * @param {boolean} privateFee Use a private record to pay the fee. If false this will use the account's public credit balance\n * @param {RecordSearchParams | undefined} recordSearchParams Optional parameters for searching for a record to use\n * pay the deployment fee\n * @param {string | RecordPlaintext | undefined} feeRecord Optional Fee record to use for the transaction\n * @param {PrivateKey | undefined} privateKey Optional private key to use for the transaction\n * @returns {string | Error} The transaction id of the deployed program or a failure message from the network\n *\n * @example\n * // Create a new NetworkClient, KeyProvider, and RecordProvider\n * const networkClient = new AleoNetworkClient(\"https://api.explorer.aleo.org/v1\");\n * const keyProvider = new AleoKeyProvider();\n * const recordProvider = new NetworkRecordProvider(account, networkClient);\n *\n * // Initialize a program manager with the key provider to automatically fetch keys for deployments\n * const program = \"program hello_hello.aleo;\\n\\nfunction hello:\\n input r0 as u32.public;\\n input r1 as u32.private;\\n add r0 r1 into r2;\\n output r2 as u32.private;\\n\";\n * const programManager = new ProgramManager(\"https://api.explorer.aleo.org/v1\", keyProvider, recordProvider);\n *\n * // Define a fee in credits\n * const fee = 1.2;\n *\n * // Deploy the program\n * const tx_id = await programManager.deploy(program, fee);\n *\n * // Verify the transaction was successful\n * const transaction = await programManager.networkClient.getTransaction(tx_id);\n */\n async deploy(\n program: string,\n fee: number,\n privateFee: boolean,\n recordSearchParams?: RecordSearchParams,\n feeRecord?: string | RecordPlaintext,\n privateKey?: PrivateKey,\n ): Promise {\n // Ensure the program is valid and does not exist on the network\n try {\n const programObject = Program.fromString(program);\n let programSource;\n try {\n programSource = await this.networkClient.getProgram(programObject.id());\n } catch (e) {\n // Program does not exist on the network, deployment can proceed\n console.log(`Program ${programObject.id()} does not exist on the network, deploying...`);\n }\n if (typeof programSource == \"string\") {\n throw (`Program ${programObject.id()} already exists on the network, please rename your program`);\n }\n } catch (e) {\n throw logAndThrow(`Error validating program: ${e}`);\n }\n\n // Get the private key from the account if it is not provided in the parameters\n let deploymentPrivateKey = privateKey;\n if (typeof privateKey === \"undefined\" && typeof this.account !== \"undefined\") {\n deploymentPrivateKey = this.account.privateKey();\n }\n\n if (typeof deploymentPrivateKey === \"undefined\") {\n throw(\"No private key provided and no private key set in the ProgramManager\");\n }\n\n // Get the fee record from the account if it is not provided in the parameters\n try {\n feeRecord = privateFee ? await this.getCreditsRecord(fee, [], feeRecord, recordSearchParams) : undefined;\n } catch (e) {\n throw logAndThrow(`Error finding fee record. Record finder response: '${e}'. Please ensure you're connected to a valid Aleo network and a record with enough balance exists.`);\n }\n\n // Get the proving and verifying keys from the key provider\n let feeKeys;\n try {\n feeKeys = privateFee ? await this.keyProvider.feePrivateKeys() : await this.keyProvider.feePublicKeys();\n } catch (e) {\n throw logAndThrow(`Error finding fee keys. Key finder response: '${e}'. Please ensure your key provider is configured correctly.`);\n }\n const [feeProvingKey, feeVerifyingKey] = feeKeys;\n\n // Resolve the program imports if they exist\n let imports;\n try {\n imports = await this.networkClient.getProgramImports(program);\n } catch (e) {\n throw logAndThrow(`Error finding program imports. Network response: '${e}'. Please ensure you're connected to a valid Aleo network and the program is deployed to the network.`);\n }\n\n // Build a deployment transaction and submit it to the network\n const tx = await WasmProgramManager.buildDeploymentTransaction(deploymentPrivateKey, program, fee, feeRecord, this.host, imports, feeProvingKey, feeVerifyingKey);\n return await this.networkClient.submitTransaction(tx);\n }\n\n /**\n * Builds an execution transaction for submission to the Aleo network.\n *\n * @param {ExecuteOptions} options - The options for the execution transaction.\n * @returns {Promise} - A promise that resolves to the transaction or an error.\n *\n * @example\n * // Create a new NetworkClient, KeyProvider, and RecordProvider using official Aleo record, key, and network providers\n * const networkClient = new AleoNetworkClient(\"https://api.explorer.aleo.org/v1\");\n * const keyProvider = new AleoKeyProvider();\n * keyProvider.useCache = true;\n * const recordProvider = new NetworkRecordProvider(account, networkClient);\n *\n * // Initialize a program manager with the key provider to automatically fetch keys for executions\n * const programManager = new ProgramManager(\"https://api.explorer.aleo.org/v1\", keyProvider, recordProvider);\n *\n * // Build and execute the transaction\n * const transaction = await programManager.buildExecutionTransaction({\n * programName: \"hello_hello.aleo\",\n * functionName: \"hello_hello\",\n * fee: 0.020,\n * privateFee: false,\n * inputs: [\"5u32\", \"5u32\"],\n * keySearchParams: { \"cacheKey\": \"hello_hello:hello\" }\n * });\n * const result = await programManager.networkClient.submitTransaction(transaction);\n */\n async buildExecutionTransaction(options: ExecuteOptions): Promise {\n // Destructure the options object to access the parameters\n const {\n programName,\n functionName,\n fee,\n privateFee,\n inputs,\n recordSearchParams,\n keySearchParams,\n privateKey,\n offlineQuery\n } = options;\n\n let feeRecord = options.feeRecord;\n let provingKey = options.provingKey;\n let verifyingKey = options.verifyingKey;\n let program = options.program;\n let imports = options.imports;\n\n // Ensure the function exists on the network\n if (program === undefined) {\n try {\n program = (await this.networkClient.getProgram(programName));\n } catch (e) {\n throw logAndThrow(`Error finding ${programName}. Network response: '${e}'. Please ensure you're connected to a valid Aleo network the program is deployed to the network.`);\n }\n } else if (program instanceof Program) {\n program = program.toString();\n }\n\n // Get the private key from the account if it is not provided in the parameters\n let executionPrivateKey = privateKey;\n if (typeof privateKey === \"undefined\" && typeof this.account !== \"undefined\") {\n executionPrivateKey = this.account.privateKey();\n }\n\n if (typeof executionPrivateKey === \"undefined\") {\n throw(\"No private key provided and no private key set in the ProgramManager\");\n }\n\n // Get the fee record from the account if it is not provided in the parameters\n try {\n feeRecord = privateFee ? await this.getCreditsRecord(fee, [], feeRecord, recordSearchParams) : undefined;\n } catch (e) {\n throw logAndThrow(`Error finding fee record. Record finder response: '${e}'. Please ensure you're connected to a valid Aleo network and a record with enough balance exists.`);\n }\n\n // Get the fee proving and verifying keys from the key provider\n let feeKeys;\n try {\n feeKeys = privateFee ? await this.keyProvider.feePrivateKeys() : await this.keyProvider.feePublicKeys();\n } catch (e) {\n throw logAndThrow(`Error finding fee keys. Key finder response: '${e}'. Please ensure your key provider is configured correctly.`);\n }\n const [feeProvingKey, feeVerifyingKey] = feeKeys;\n\n // If the function proving and verifying keys are not provided, attempt to find them using the key provider\n if (!provingKey || !verifyingKey) {\n try {\n [provingKey, verifyingKey] = await this.keyProvider.functionKeys(keySearchParams);\n } catch (e) {\n console.log(`Function keys not found. Key finder response: '${e}'. The function keys will be synthesized`)\n }\n }\n\n // Resolve the program imports if they exist\n const numberOfImports = Program.fromString(program).getImports().length;\n if (numberOfImports > 0 && !imports) {\n try {\n imports = await this.networkClient.getProgramImports(programName);\n } catch (e) {\n throw logAndThrow(`Error finding program imports. Network response: '${e}'. Please ensure you're connected to a valid Aleo network and the program is deployed to the network.`);\n }\n }\n\n // Build an execution transaction and submit it to the network\n return await WasmProgramManager.buildExecutionTransaction(executionPrivateKey, program, functionName, inputs, fee, feeRecord, this.host, imports, provingKey, verifyingKey, feeProvingKey, feeVerifyingKey, offlineQuery);\n }\n\n /**\n * Builds an execution transaction for submission to the Aleo network.\n *\n * @param {ExecuteOptions} options - The options for the execution transaction.\n * @returns {Promise} - A promise that resolves to the transaction or an error.\n *\n * @example\n * // Create a new NetworkClient, KeyProvider, and RecordProvider using official Aleo record, key, and network providers\n * const networkClient = new AleoNetworkClient(\"https://api.explorer.aleo.org/v1\");\n * const keyProvider = new AleoKeyProvider();\n * keyProvider.useCache = true;\n * const recordProvider = new NetworkRecordProvider(account, networkClient);\n *\n * // Initialize a program manager with the key provider to automatically fetch keys for executions\n * const programManager = new ProgramManager(\"https://api.explorer.aleo.org/v1\", keyProvider, recordProvider);\n *\n * // Build and execute the transaction\n * const transaction = await programManager.execute({\n * programName: \"hello_hello.aleo\",\n * functionName: \"hello_hello\",\n * fee: 0.020,\n * privateFee: false,\n * inputs: [\"5u32\", \"5u32\"],\n * keySearchParams: { \"cacheKey\": \"hello_hello:hello\" }\n * });\n * const result = await programManager.networkClient.submitTransaction(transaction);\n */\n async execute(options: ExecuteOptions): Promise {\n const tx = await this.buildExecutionTransaction(options);\n return await this.networkClient.submitTransaction(tx);\n }\n\n /**\n * Run an Aleo program in offline mode\n *\n * @param {string} program Program source code containing the function to be executed\n * @param {string} function_name Function name to execute\n * @param {string[]} inputs Inputs to the function\n * @param {number} proveExecution Whether to prove the execution of the function and return an execution transcript\n * that contains the proof.\n * @param {string[] | undefined} imports Optional imports to the program\n * @param {KeySearchParams | undefined} keySearchParams Optional parameters for finding the matching proving &\n * verifying keys for the function\n * @param {ProvingKey | undefined} provingKey Optional proving key to use for the transaction\n * @param {VerifyingKey | undefined} verifyingKey Optional verifying key to use for the transaction\n * @param {PrivateKey | undefined} privateKey Optional private key to use for the transaction\n * @param {OfflineQuery | undefined} offlineQuery Optional offline query if creating transactions in an offline environment\n * @returns {Promise}\n *\n * @example\n * import { Account, Program } from '@provablehq/sdk';\n *\n * /// Create the source for the \"helloworld\" program\n * const program = \"program helloworld.aleo;\\n\\nfunction hello:\\n input r0 as u32.public;\\n input r1 as u32.private;\\n add r0 r1 into r2;\\n output r2 as u32.private;\\n\";\n * const programManager = new ProgramManager();\n *\n * /// Create a temporary account for the execution of the program\n * const account = new Account();\n * programManager.setAccount(account);\n *\n * /// Get the response and ensure that the program executed correctly\n * const executionResponse = await programManager.run(program, \"hello\", [\"5u32\", \"5u32\"]);\n * const result = executionResponse.getOutputs();\n * assert(result === [\"10u32\"]);\n */\n async run(\n program: string,\n function_name: string,\n inputs: string[],\n proveExecution: boolean,\n imports?: ProgramImports,\n keySearchParams?: KeySearchParams,\n provingKey?: ProvingKey,\n verifyingKey?: VerifyingKey,\n privateKey?: PrivateKey,\n offlineQuery?: OfflineQuery,\n ): Promise {\n // Get the private key from the account if it is not provided in the parameters\n let executionPrivateKey = privateKey;\n if (typeof privateKey === \"undefined\" && typeof this.account !== \"undefined\") {\n executionPrivateKey = this.account.privateKey();\n }\n\n if (typeof executionPrivateKey === \"undefined\") {\n throw(\"No private key provided and no private key set in the ProgramManager\");\n }\n\n // If the function proving and verifying keys are not provided, attempt to find them using the key provider\n if (!provingKey || !verifyingKey) {\n try {\n [provingKey, verifyingKey] = await this.keyProvider.functionKeys(keySearchParams);\n } catch (e) {\n console.log(`Function keys not found. Key finder response: '${e}'. The function keys will be synthesized`)\n }\n }\n\n // Run the program offline and return the result\n console.log(\"Running program offline\")\n console.log(\"Proving key: \", provingKey);\n console.log(\"Verifying key: \", verifyingKey);\n return WasmProgramManager.executeFunctionOffline(executionPrivateKey, program, function_name, inputs, proveExecution, false, imports, provingKey, verifyingKey, this.host, offlineQuery);\n }\n\n /**\n * Join two credits records into a single credits record\n *\n * @param {RecordPlaintext | string} recordOne First credits record to join\n * @param {RecordPlaintext | string} recordTwo Second credits record to join\n * @param {number} fee Fee in credits pay for the join transaction\n * @param {boolean} privateFee Use a private record to pay the fee. If false this will use the account's public credit balance\n * @param {RecordSearchParams | undefined} recordSearchParams Optional parameters for finding the fee record to use\n * to pay the fee for the join transaction\n * @param {RecordPlaintext | string | undefined} feeRecord Fee record to use for the join transaction\n * @param {PrivateKey | undefined} privateKey Private key to use for the join transaction\n * @param {OfflineQuery | undefined} offlineQuery Optional offline query if creating transactions in an offline environment\n * @returns {Promise}\n */\n async join(\n recordOne: RecordPlaintext | string,\n recordTwo: RecordPlaintext | string,\n fee: number,\n privateFee: boolean,\n recordSearchParams?: RecordSearchParams | undefined,\n feeRecord?: RecordPlaintext | string | undefined,\n privateKey?: PrivateKey,\n offlineQuery?: OfflineQuery,\n ): Promise {\n // Get the private key from the account if it is not provided in the parameters\n let executionPrivateKey = privateKey;\n if (typeof privateKey === \"undefined\" && typeof this.account !== \"undefined\") {\n executionPrivateKey = this.account.privateKey();\n }\n\n if (typeof executionPrivateKey === \"undefined\") {\n throw(\"No private key provided and no private key set in the ProgramManager\");\n }\n\n // Get the proving and verifying keys from the key provider\n let feeKeys;\n let joinKeys\n try {\n feeKeys = privateFee ? await this.keyProvider.feePrivateKeys() : await this.keyProvider.feePublicKeys();\n joinKeys = await this.keyProvider.joinKeys();\n } catch (e) {\n throw logAndThrow(`Error finding fee keys. Key finder response: '${e}'. Please ensure your key provider is configured correctly.`);\n }\n const [feeProvingKey, feeVerifyingKey] = feeKeys;\n const [joinProvingKey, joinVerifyingKey] = joinKeys;\n\n // Get the fee record from the account if it is not provided in the parameters\n try {\n feeRecord = privateFee ? await this.getCreditsRecord(fee, [], feeRecord, recordSearchParams) : undefined;\n } catch (e) {\n throw logAndThrow(`Error finding fee record. Record finder response: '${e}'. Please ensure you're connected to a valid Aleo network and a record with enough balance exists.`);\n }\n\n // Validate the records provided are valid plaintext records\n try {\n recordOne = recordOne instanceof RecordPlaintext ? recordOne : RecordPlaintext.fromString(recordOne);\n recordTwo = recordTwo instanceof RecordPlaintext ? recordTwo : RecordPlaintext.fromString(recordTwo);\n } catch (e) {\n throw logAndThrow('Records provided are not valid. Please ensure they are valid plaintext records.')\n }\n\n // Build an execution transaction and submit it to the network\n const tx = await WasmProgramManager.buildJoinTransaction(executionPrivateKey, recordOne, recordTwo, fee, feeRecord, this.host, joinProvingKey, joinVerifyingKey, feeProvingKey, feeVerifyingKey, offlineQuery);\n return await this.networkClient.submitTransaction(tx);\n }\n\n /**\n * Split credits into two new credits records\n *\n * @param {number} splitAmount Amount in microcredits to split from the original credits record\n * @param {RecordPlaintext | string} amountRecord Amount record to use for the split transaction\n * @param {PrivateKey | undefined} privateKey Optional private key to use for the split transaction\n * @param {OfflineQuery | undefined} offlineQuery Optional offline query if creating transactions in an offline environment\n * @returns {Promise}\n *\n * @example\n * // Create a new NetworkClient, KeyProvider, and RecordProvider\n * const networkClient = new AleoNetworkClient(\"https://api.explorer.aleo.org/v1\");\n * const keyProvider = new AleoKeyProvider();\n * const recordProvider = new NetworkRecordProvider(account, networkClient);\n *\n * // Initialize a program manager with the key provider to automatically fetch keys for executions\n * const programName = \"hello_hello.aleo\";\n * const programManager = new ProgramManager(\"https://api.explorer.aleo.org/v1\", keyProvider, recordProvider);\n * const record = \"{ owner: aleo184vuwr5u7u0ha5f5k44067dd2uaqewxx6pe5ltha5pv99wvhfqxqv339h4.private, microcredits: 45000000u64.private, _nonce: 4106205762862305308495708971985748592380064201230396559307556388725936304984group.public}\"\n * const tx_id = await programManager.split(25000000, record);\n * const transaction = await programManager.networkClient.getTransaction(tx_id);\n */\n async split(splitAmount: number, amountRecord: RecordPlaintext | string, privateKey?: PrivateKey, offlineQuery?: OfflineQuery): Promise {\n // Get the private key from the account if it is not provided in the parameters\n let executionPrivateKey = privateKey;\n if (typeof executionPrivateKey === \"undefined\" && typeof this.account !== \"undefined\") {\n executionPrivateKey = this.account.privateKey();\n }\n\n if (typeof executionPrivateKey === \"undefined\") {\n throw(\"No private key provided and no private key set in the ProgramManager\");\n }\n\n // Get the split keys from the key provider\n let splitKeys;\n try {\n splitKeys = await this.keyProvider.splitKeys();\n } catch (e) {\n throw logAndThrow(`Error finding fee keys. Key finder response: '${e}'. Please ensure your key provider is configured correctly.`);\n }\n const [splitProvingKey, splitVerifyingKey] = splitKeys;\n\n // Validate the record to be split\n try {\n amountRecord = amountRecord instanceof RecordPlaintext ? amountRecord : RecordPlaintext.fromString(amountRecord);\n } catch (e) {\n throw logAndThrow(\"Record provided is not valid. Please ensure it is a valid plaintext record.\");\n }\n\n // Build an execution transaction and submit it to the network\n const tx = await WasmProgramManager.buildSplitTransaction(executionPrivateKey, splitAmount, amountRecord, this.host, splitProvingKey, splitVerifyingKey, offlineQuery);\n return await this.networkClient.submitTransaction(tx);\n }\n\n /**\n * Pre-synthesize proving and verifying keys for a program\n *\n * @param program {string} The program source code to synthesize keys for\n * @param function_id {string} The function id to synthesize keys for\n * @param inputs {Array} Sample inputs to the function\n * @param privateKey {PrivateKey | undefined} Optional private key to use for the key synthesis\n *\n * @returns {Promise}\n */\n async synthesizeKeys(\n program: string,\n function_id: string,\n inputs: Array,\n privateKey?: PrivateKey,\n ): Promise {\n // Resolve the program imports if they exist\n let imports;\n\n let executionPrivateKey = privateKey;\n if (typeof executionPrivateKey === \"undefined\") {\n if (typeof this.account !== \"undefined\") {\n executionPrivateKey = this.account.privateKey();\n } else {\n executionPrivateKey = new PrivateKey();\n }\n }\n\n // Attempt to run an offline execution of the program and extract the proving and verifying keys\n try {\n imports = await this.networkClient.getProgramImports(program);\n const keyPair = await WasmProgramManager.synthesizeKeyPair(\n executionPrivateKey,\n program,\n function_id,\n inputs,\n imports\n );\n return [keyPair.provingKey(), keyPair.verifyingKey()];\n } catch (e) {\n throw logAndThrow(`Could not synthesize keys - error ${e}. Please ensure the program is valid and the inputs are correct.`);\n }\n }\n\n /**\n * Build a transaction to transfer credits to another account for later submission to the Aleo network\n *\n * @param {number} amount The amount of credits to transfer\n * @param {string} recipient The recipient of the transfer\n * @param {string} transferType The type of transfer to perform - options: 'private', 'privateToPublic', 'public', 'publicToPrivate'\n * @param {number} fee The fee to pay for the transfer\n * @param {boolean} privateFee Use a private record to pay the fee. If false this will use the account's public credit balance\n * @param {RecordSearchParams | undefined} recordSearchParams Optional parameters for finding the amount and fee\n * records for the transfer transaction\n * @param {RecordPlaintext | string} amountRecord Optional amount record to use for the transfer\n * @param {RecordPlaintext | string} feeRecord Optional fee record to use for the transfer\n * @param {PrivateKey | undefined} privateKey Optional private key to use for the transfer transaction\n * @param {OfflineQuery | undefined} offlineQuery Optional offline query if creating transactions in an offline environment\n * @returns {Promise} The transaction id of the transfer transaction\n *\n * @example\n * // Create a new NetworkClient, KeyProvider, and RecordProvider\n * const networkClient = new AleoNetworkClient(\"https://api.explorer.aleo.org/v1\");\n * const keyProvider = new AleoKeyProvider();\n * const recordProvider = new NetworkRecordProvider(account, networkClient);\n *\n * // Initialize a program manager with the key provider to automatically fetch keys for executions\n * const programName = \"hello_hello.aleo\";\n * const programManager = new ProgramManager(\"https://api.explorer.aleo.org/v1\", keyProvider, recordProvider);\n * await programManager.initialize();\n * const tx_id = await programManager.transfer(1, \"aleo1rhgdu77hgyqd3xjj8ucu3jj9r2krwz6mnzyd80gncr5fxcwlh5rsvzp9px\", \"private\", 0.2)\n * const transaction = await programManager.networkClient.getTransaction(tx_id);\n */\n async buildTransferTransaction(\n amount: number,\n recipient: string,\n transferType: string,\n fee: number,\n privateFee: boolean,\n recordSearchParams?: RecordSearchParams,\n amountRecord?: RecordPlaintext | string,\n feeRecord?: RecordPlaintext | string,\n privateKey?: PrivateKey,\n offlineQuery?: OfflineQuery\n ): Promise {\n // Validate the transfer type\n transferType = validateTransferType(transferType);\n\n // Get the private key from the account if it is not provided in the parameters\n let executionPrivateKey = privateKey;\n if (typeof executionPrivateKey === \"undefined\" && typeof this.account !== \"undefined\") {\n executionPrivateKey = this.account.privateKey();\n }\n\n if (typeof executionPrivateKey === \"undefined\") {\n throw(\"No private key provided and no private key set in the ProgramManager\");\n }\n\n // Get the proving and verifying keys from the key provider\n let feeKeys;\n let transferKeys\n try {\n feeKeys = privateFee ? await this.keyProvider.feePrivateKeys() : await this.keyProvider.feePublicKeys();\n transferKeys = await this.keyProvider.transferKeys(transferType);\n } catch (e) {\n throw logAndThrow(`Error finding fee keys. Key finder response: '${e}'. Please ensure your key provider is configured correctly.`);\n }\n const [feeProvingKey, feeVerifyingKey] = feeKeys;\n const [transferProvingKey, transferVerifyingKey] = transferKeys;\n\n // Get the amount and fee record from the account if it is not provided in the parameters\n try {\n // Track the nonces of the records found so no duplicate records are used\n const nonces: string[] = [];\n if (requiresAmountRecord(transferType)) {\n // If the transfer type is private and requires an amount record, get it from the record provider\n amountRecord = await this.getCreditsRecord(fee, [], amountRecord, recordSearchParams);\n nonces.push(amountRecord.nonce());\n } else {\n amountRecord = undefined;\n }\n feeRecord = privateFee ? await this.getCreditsRecord(fee, nonces, feeRecord, recordSearchParams) : undefined;\n } catch (e) {\n throw logAndThrow(`Error finding fee record. Record finder response: '${e}'. Please ensure you're connected to a valid Aleo network and a record with enough balance exists.`);\n }\n\n // Build an execution transaction and submit it to the network\n return await WasmProgramManager.buildTransferTransaction(executionPrivateKey, amount, recipient, transferType, amountRecord, fee, feeRecord, this.host, transferProvingKey, transferVerifyingKey, feeProvingKey, feeVerifyingKey, offlineQuery);\n }\n\n /**\n * Build a transfer_public transaction to transfer credits to another account for later submission to the Aleo network\n *\n * @param {number} amount The amount of credits to transfer\n * @param {string} recipient The recipient of the transfer\n * @param {string} transferType The type of transfer to perform - options: 'private', 'privateToPublic', 'public', 'publicToPrivate'\n * @param {number} fee The fee to pay for the transfer\n * @param {boolean} privateFee Use a private record to pay the fee. If false this will use the account's public credit balance\n * @param {RecordSearchParams | undefined} recordSearchParams Optional parameters for finding the amount and fee\n * records for the transfer transaction\n * @param {RecordPlaintext | string} amountRecord Optional amount record to use for the transfer\n * @param {RecordPlaintext | string} feeRecord Optional fee record to use for the transfer\n * @param {PrivateKey | undefined} privateKey Optional private key to use for the transfer transaction\n * @param {OfflineQuery | undefined} offlineQuery Optional offline query if creating transactions in an offline environment\n * @returns {Promise} The transaction id of the transfer transaction\n */\n async buildTransferPublicTransaction(\n amount: number,\n recipient: string,\n fee: number,\n privateKey?: PrivateKey,\n offlineQuery?: OfflineQuery\n ): Promise {\n return this.buildTransferTransaction(amount, recipient, \"public\", fee, false, undefined, undefined, undefined, privateKey, offlineQuery);\n }\n\n /**\n * Build a transfer_public_as_signer transaction to transfer credits to another account for later submission to the Aleo network\n *\n * @param {number} amount The amount of credits to transfer\n * @param {string} recipient The recipient of the transfer\n * @param {string} transferType The type of transfer to perform - options: 'private', 'privateToPublic', 'public', 'publicToPrivate'\n * @param {number} fee The fee to pay for the transfer\n * @param {boolean} privateFee Use a private record to pay the fee. If false this will use the account's public credit balance\n * @param {RecordSearchParams | undefined} recordSearchParams Optional parameters for finding the amount and fee\n * records for the transfer transaction\n * @param {RecordPlaintext | string} amountRecord Optional amount record to use for the transfer\n * @param {RecordPlaintext | string} feeRecord Optional fee record to use for the transfer\n * @param {PrivateKey | undefined} privateKey Optional private key to use for the transfer transaction\n * @param {OfflineQuery | undefined} offlineQuery Optional offline query if creating transactions in an offline environment\n * @returns {Promise} The transaction id of the transfer transaction\n */\n async buildTransferPublicAsSignerTransaction(\n amount: number,\n recipient: string,\n fee: number,\n privateKey?: PrivateKey,\n offlineQuery?: OfflineQuery\n ): Promise {\n return this.buildTransferTransaction(amount, recipient, \"public\", fee, false, undefined, undefined, undefined, privateKey, offlineQuery);\n }\n\n /**\n * Transfer credits to another account\n *\n * @param {number} amount The amount of credits to transfer\n * @param {string} recipient The recipient of the transfer\n * @param {string} transferType The type of transfer to perform - options: 'private', 'privateToPublic', 'public', 'publicToPrivate'\n * @param {number} fee The fee to pay for the transfer\n * @param {boolean} privateFee Use a private record to pay the fee. If false this will use the account's public credit balance\n * @param {RecordSearchParams | undefined} recordSearchParams Optional parameters for finding the amount and fee\n * records for the transfer transaction\n * @param {RecordPlaintext | string} amountRecord Optional amount record to use for the transfer\n * @param {RecordPlaintext | string} feeRecord Optional fee record to use for the transfer\n * @param {PrivateKey | undefined} privateKey Optional private key to use for the transfer transaction\n * @param {OfflineQuery | undefined} offlineQuery Optional offline query if creating transactions in an offline environment\n * @returns {Promise} The transaction id of the transfer transaction\n *\n * @example\n * // Create a new NetworkClient, KeyProvider, and RecordProvider\n * const networkClient = new AleoNetworkClient(\"https://api.explorer.aleo.org/v1\");\n * const keyProvider = new AleoKeyProvider();\n * const recordProvider = new NetworkRecordProvider(account, networkClient);\n *\n * // Initialize a program manager with the key provider to automatically fetch keys for executions\n * const programManager = new ProgramManager(\"https://api.explorer.aleo.org/v1\", keyProvider, recordProvider);\n * await programManager.initialize();\n * const tx_id = await programManager.transfer(1, \"aleo1rhgdu77hgyqd3xjj8ucu3jj9r2krwz6mnzyd80gncr5fxcwlh5rsvzp9px\", \"private\", 0.2)\n * const transaction = await programManager.networkClient.getTransaction(tx_id);\n */\n async transfer(\n amount: number,\n recipient: string,\n transferType: string,\n fee: number,\n privateFee: boolean,\n recordSearchParams?: RecordSearchParams,\n amountRecord?: RecordPlaintext | string,\n feeRecord?: RecordPlaintext | string,\n privateKey?: PrivateKey,\n offlineQuery?: OfflineQuery\n ): Promise {\n const tx = await this.buildTransferTransaction(amount, recipient, transferType, fee, privateFee, recordSearchParams, amountRecord, feeRecord, privateKey, offlineQuery);\n return await this.networkClient.submitTransaction(tx);\n }\n\n /**\n * Build transaction to bond credits to a validator for later submission to the Aleo Network\n *\n * @example\n * // Create a keyProvider to handle key management\n * const keyProvider = new AleoKeyProvider();\n * keyProvider.useCache = true;\n *\n * // Create a new ProgramManager with the key that will be used to bond credits\n * const programManager = new ProgramManager(\"https://api.explorer.aleo.org/v1\", keyProvider, undefined);\n * programManager.setAccount(new Account(\"YourPrivateKey\"));\n *\n * // Create the bonding transaction object for later submission\n * const tx = await programManager.buildBondPublicTransaction(\"aleo1jx8s4dvjepculny4wfrzwyhs3tlyv65r58ns3g6q2gm2esh7ps8sqy9s5j\", \"aleo1rhgdu77hgyqd3xjj8ucu3jj9r2krwz6mnzyd80gncr5fxcwlh5rsvzp9px\", \"aleo1feya8sjy9k2zflvl2dx39pdsq5tju28elnp2ektnn588uu9ghv8s84msv9\", 2000000);\n * console.log(tx);\n *\n * // The transaction can be later submitted to the network using the network client.\n * const result = await programManager.networkClient.submitTransaction(tx);\n *\n * @returns string\n * @param {string} staker_address Address of the staker who is bonding the credits\n * @param {string} validator_address Address of the validator to bond to, if this address is the same as the staker (i.e. the\n * executor of this function), it will attempt to bond the credits as a validator. Bonding as a validator currently\n * requires a minimum of 10,000,000 credits to bond (subject to change). If the address is specified is an existing\n * validator and is different from the address of the executor of this function, it will bond the credits to that\n * validator's staking committee as a delegator. A minimum of 10 credits is required to bond as a delegator.\n * @param {string} withdrawal_address Address to withdraw the staked credits to when unbond_public is called.\n * @param {number} amount The amount of credits to bond\n * @param {Partial} options - Override default execution options.\n */\n async buildBondPublicTransaction(staker_address: string, validator_address: string, withdrawal_address: string, amount: number, options: Partial = {}) {\n const scaledAmount = Math.trunc(amount * 1000000);\n\n const {\n programName = \"credits.aleo\",\n functionName = \"bond_public\",\n fee = options.fee || 0.86,\n privateFee = false,\n inputs = [staker_address, validator_address, withdrawal_address, `${scaledAmount.toString()}u64`],\n keySearchParams = new AleoKeyProviderParams({\n proverUri: CREDITS_PROGRAM_KEYS.bond_public.prover,\n verifierUri: CREDITS_PROGRAM_KEYS.bond_public.verifier,\n cacheKey: \"credits.aleo/bond_public\"\n }),\n program = this.creditsProgram(),\n ...additionalOptions\n } = options;\n\n const executeOptions: ExecuteOptions = {\n programName,\n functionName,\n fee,\n privateFee,\n inputs,\n keySearchParams,\n ...additionalOptions\n };\n\n return await this.buildExecutionTransaction(executeOptions);\n }\n\n /**\n * Bond credits to validator.\n *\n * @example\n * // Create a keyProvider to handle key management\n * const keyProvider = new AleoKeyProvider();\n * keyProvider.useCache = true;\n *\n * // Create a new ProgramManager with the key that will be used to bond credits\n * const programManager = new ProgramManager(\"https://api.explorer.aleo.org/v1\", keyProvider, undefined);\n * programManager.setAccount(new Account(\"YourPrivateKey\"));\n *\n * // Create the bonding transaction\n * const tx_id = await programManager.bondPublic(\"aleo1jx8s4dvjepculny4wfrzwyhs3tlyv65r58ns3g6q2gm2esh7ps8sqy9s5j\", \"aleo1rhgdu77hgyqd3xjj8ucu3jj9r2krwz6mnzyd80gncr5fxcwlh5rsvzp9px\", \"aleo1feya8sjy9k2zflvl2dx39pdsq5tju28elnp2ektnn588uu9ghv8s84msv9\", 2000000);\n *\n * @returns string\n * @param {string} staker_address Address of the staker who is bonding the credits\n * @param {string} validator_address Address of the validator to bond to, if this address is the same as the signer (i.e. the\n * executor of this function), it will attempt to bond the credits as a validator. Bonding as a validator currently\n * requires a minimum of 1,000,000 credits to bond (subject to change). If the address is specified is an existing\n * validator and is different from the address of the executor of this function, it will bond the credits to that\n * validator's staking committee as a delegator. A minimum of 10 credits is required to bond as a delegator.\n * @param {string} withdrawal_address Address to withdraw the staked credits to when unbond_public is called.\n * @param {number} amount The amount of credits to bond\n * @param {Options} options Options for the execution\n */\n async bondPublic(staker_address: string, validator_address: string, withdrawal_address:string, amount: number, options: Partial = {}) {\n const tx = await this.buildBondPublicTransaction(staker_address, validator_address, withdrawal_address, amount, options);\n return await this.networkClient.submitTransaction(tx);\n }\n\n /**\n * Build a bond_validator transaction for later submission to the Aleo Network.\n *\n * @example\n * // Create a keyProvider to handle key management\n * const keyProvider = new AleoKeyProvider();\n * keyProvider.useCache = true;\n *\n * // Create a new ProgramManager with the key that will be used to bond credits\n * const programManager = new ProgramManager(\"https://api.explorer.aleo.org/v1\", keyProvider, undefined);\n * programManager.setAccount(new Account(\"YourPrivateKey\"));\n *\n * // Create the bond validator transaction object for later use.\n * const tx = await programManager.buildBondValidatorTransaction(\"aleo1rhgdu77hgyqd3xjj8ucu3jj9r2krwz6mnzyd80gncr5fxcwlh5rsvzp9px\", \"aleo1feya8sjy9k2zflvl2dx39pdsq5tju28elnp2ektnn588uu9ghv8s84msv9\", 2000000);\n * console.log(tx);\n *\n * // The transaction can later be submitted to the network using the network client.\n * const tx_id = await programManager.networkClient.submitTransaction(tx);\n *\n * @returns string\n * @param {string} validator_address Address of the validator to bond to, if this address is the same as the staker (i.e. the\n * executor of this function), it will attempt to bond the credits as a validator. Bonding as a validator currently\n * requires a minimum of 10,000,000 credits to bond (subject to change). If the address is specified is an existing\n * validator and is different from the address of the executor of this function, it will bond the credits to that\n * validator's staking committee as a delegator. A minimum of 10 credits is required to bond as a delegator.\n * @param {string} withdrawal_address Address to withdraw the staked credits to when unbond_public is called.\n * @param {number} amount The amount of credits to bond\n * @param {number} commission The commission rate for the validator (must be between 0 and 100 - an error will be thrown if it is not)\n * @param {Partial} options - Override default execution options.\n */\n async buildBondValidatorTransaction(validator_address: string, withdrawal_address: string, amount: number, commission: number, options: Partial = {}) {\n const scaledAmount = Math.trunc(amount * 1000000);\n\n const adjustedCommission = Math.trunc(commission)\n\n const {\n programName = \"credits.aleo\",\n functionName = \"bond_validator\",\n fee = options.fee || 0.86,\n privateFee = false,\n inputs = [validator_address, withdrawal_address, `${scaledAmount.toString()}u64`, `${adjustedCommission.toString()}u8`],\n keySearchParams = new AleoKeyProviderParams({\n proverUri: CREDITS_PROGRAM_KEYS.bond_validator.prover,\n verifierUri: CREDITS_PROGRAM_KEYS.bond_validator.verifier,\n cacheKey: \"credits.aleo/bond_validator\"\n }),\n program = this.creditsProgram(),\n ...additionalOptions\n } = options;\n\n const executeOptions: ExecuteOptions = {\n programName,\n functionName,\n fee,\n privateFee,\n inputs,\n keySearchParams,\n ...additionalOptions\n };\n\n return await this.buildExecutionTransaction(executeOptions);\n }\n\n /**\n * Build transaction to bond a validator.\n *\n * @example\n * // Create a keyProvider to handle key management\n * const keyProvider = new AleoKeyProvider();\n * keyProvider.useCache = true;\n *\n * // Create a new ProgramManager with the key that will be used to bond credits\n * const programManager = new ProgramManager(\"https://api.explorer.aleo.org/v1\", keyProvider, undefined);\n * programManager.setAccount(new Account(\"YourPrivateKey\"));\n *\n * // Create the bonding transaction\n * const tx_id = await programManager.bondValidator(\"aleo1rhgdu77hgyqd3xjj8ucu3jj9r2krwz6mnzyd80gncr5fxcwlh5rsvzp9px\", \"aleo1feya8sjy9k2zflvl2dx39pdsq5tju28elnp2ektnn588uu9ghv8s84msv9\", 2000000);\n *\n * @returns string\n * @param {string} validator_address Address of the validator to bond to, if this address is the same as the staker (i.e. the\n * executor of this function), it will attempt to bond the credits as a validator. Bonding as a validator currently\n * requires a minimum of 10,000,000 credits to bond (subject to change). If the address is specified is an existing\n * validator and is different from the address of the executor of this function, it will bond the credits to that\n * validator's staking committee as a delegator. A minimum of 10 credits is required to bond as a delegator.\n * @param {string} withdrawal_address Address to withdraw the staked credits to when unbond_public is called.\n * @param {number} amount The amount of credits to bond\n * @param {number} commission The commission rate for the validator (must be between 0 and 100 - an error will be thrown if it is not)\n * @param {Partial} options - Override default execution options.\n */\n async bondValidator(validator_address: string, withdrawal_address: string, amount: number, commission: number, options: Partial = {}) {\n const tx = await this.buildBondValidatorTransaction(validator_address, withdrawal_address, amount, commission, options);\n return await this.networkClient.submitTransaction(tx);\n }\n\n /**\n * Build a transaction to unbond public credits from a validator in the Aleo network.\n *\n * @param {string} staker_address - The address of the staker who is unbonding the credits.\n * @param {number} amount - The amount of credits to unbond (scaled by 1,000,000).\n * @param {Partial} options - Override default execution options.\n * @returns {Promise} - A promise that resolves to the transaction or an error message.\n *\n * @example\n * // Create a keyProvider to handle key management.\n * const keyProvider = new AleoKeyProvider();\n * keyProvider.useCache = true;\n *\n * // Create a new ProgramManager with the key that will be used to unbond credits.\n * const programManager = new ProgramManager(\"https://api.explorer.aleo.org/v1\", keyProvider, undefined);\n * const tx = await programManager.buildUnbondPublicTransaction(\"aleo1jx8s4dvjepculny4wfrzwyhs3tlyv65r58ns3g6q2gm2esh7ps8sqy9s5j\", 2000000);\n * console.log(tx);\n *\n * // The transaction can be submitted later to the network using the network client.\n * programManager.networkClient.submitTransaction(tx);\n */\n async buildUnbondPublicTransaction(staker_address: string, amount: number, options: Partial = {}): Promise {\n const scaledAmount = Math.trunc(amount * 1000000);\n\n const {\n programName = \"credits.aleo\",\n functionName = \"unbond_public\",\n fee = options.fee || 1.3,\n privateFee = false,\n inputs = [staker_address, `${scaledAmount.toString()}u64`],\n keySearchParams = new AleoKeyProviderParams({\n proverUri: CREDITS_PROGRAM_KEYS.unbond_public.prover,\n verifierUri: CREDITS_PROGRAM_KEYS.unbond_public.verifier,\n cacheKey: \"credits.aleo/unbond_public\"\n }),\n program = this.creditsProgram(),\n ...additionalOptions\n } = options;\n\n const executeOptions: ExecuteOptions = {\n programName,\n functionName,\n fee,\n privateFee,\n inputs,\n keySearchParams,\n ...additionalOptions\n };\n\n return this.buildExecutionTransaction(executeOptions);\n }\n\n /**\n * Unbond a specified amount of staked credits.\n *\n * @example\n * // Create a keyProvider to handle key management\n * const keyProvider = new AleoKeyProvider();\n * keyProvider.useCache = true;\n *\n * // Create a new ProgramManager with the key that will be used to bond credits\n * const programManager = new ProgramManager(\"https://api.explorer.aleo.org/v1\", keyProvider, undefined);\n * programManager.setAccount(new Account(\"YourPrivateKey\"));\n *\n * // Create the bonding transaction and send it to the network\n * const tx_id = await programManager.unbondPublic(\"aleo1jx8s4dvjepculny4wfrzwyhs3tlyv65r58ns3g6q2gm2esh7ps8sqy9s5j\", 10);\n *\n * @returns string\n * @param {string} staker_address Address of the staker who is unbonding the credits\n * @param {number} amount Amount of credits to unbond. If the address of the executor of this function is an\n * existing validator, it will subtract this amount of credits from the validator's staked credits. If there are\n * less than 1,000,000 credits staked pool after the unbond, the validator will be removed from the validator set.\n * If the address of the executor of this function is not a validator and has credits bonded as a delegator, it will\n * subtract this amount of credits from the delegator's staked credits. If there are less than 10 credits bonded\n * after the unbond operation, the delegator will be removed from the validator's staking pool.\n * @param {ExecuteOptions} options Options for the execution\n */\n async unbondPublic(staker_address: string, amount: number, options: Partial = {}): Promise {\n const tx = await this.buildUnbondPublicTransaction(staker_address, amount, options);\n return await this.networkClient.submitTransaction(tx);\n }\n\n /**\n * Build a transaction to claim unbonded public credits in the Aleo network.\n *\n * @param {string} staker_address - The address of the staker who is claiming the credits.\n * @param {Partial} options - Override default execution options.\n * @returns {Promise} - A promise that resolves to the transaction or an error message.\n *\n * @example\n * // Create a keyProvider to handle key management\n * const keyProvider = new AleoKeyProvider();\n * keyProvider.useCache = true;\n *\n * // Create a new ProgramManager with the key that will be used to claim unbonded credits.\n * const programManager = new ProgramManager(\"https://api.explorer.aleo.org/v1\", keyProvider, undefined);\n *\n * // Create the claim unbonded transaction object for later use.\n * const tx = await programManager.buildClaimUnbondPublicTransaction(\"aleo1jx8s4dvjepculny4wfrzwyhs3tlyv65r58ns3g6q2gm2esh7ps8sqy9s5j\");\n * console.log(tx);\n *\n * // The transaction can be submitted later to the network using the network client.\n * programManager.networkClient.submitTransaction(tx);\n */\n async buildClaimUnbondPublicTransaction(staker_address: string, options: Partial = {}): Promise {\n const {\n programName = \"credits.aleo\",\n functionName = \"claim_unbond_public\",\n fee = options.fee || 2,\n privateFee = false,\n inputs = [staker_address],\n keySearchParams = new AleoKeyProviderParams({\n proverUri: CREDITS_PROGRAM_KEYS.claim_unbond_public.prover,\n verifierUri: CREDITS_PROGRAM_KEYS.claim_unbond_public.verifier,\n cacheKey: \"credits.aleo/claim_unbond_public\"\n }),\n program = this.creditsProgram(),\n ...additionalOptions\n } = options;\n\n const executeOptions: ExecuteOptions = {\n programName,\n functionName,\n fee,\n privateFee,\n inputs,\n keySearchParams,\n ...additionalOptions\n };\n\n return await this.buildExecutionTransaction(executeOptions);\n }\n\n /**\n * Claim unbonded credits. If credits have been unbonded by the account executing this function, this method will\n * claim them and add them to the public balance of the account.\n *\n * @example\n * // Create a keyProvider to handle key management\n * const keyProvider = new AleoKeyProvider();\n * keyProvider.useCache = true;\n *\n * // Create a new ProgramManager with the key that will be used to bond credits\n * const programManager = new ProgramManager(\"https://api.explorer.aleo.org/v1\", keyProvider, undefined);\n * programManager.setAccount(new Account(\"YourPrivateKey\"));\n *\n * // Create the bonding transaction\n * const tx_id = await programManager.claimUnbondPublic(\"aleo1jx8s4dvjepculny4wfrzwyhs3tlyv65r58ns3g6q2gm2esh7ps8sqy9s5j\");\n *\n * @param {string} staker_address Address of the staker who is claiming the credits\n * @param {ExecuteOptions} options\n * @returns string\n */\n async claimUnbondPublic(staker_address: string, options: Partial = {}): Promise {\n const tx = await this.buildClaimUnbondPublicTransaction(staker_address, options);\n return await this.networkClient.submitTransaction(tx);\n }\n\n /**\n * Build a set_validator_state transaction for later usage.\n *\n * This function allows a validator to set their state to be either opened or closed to new stakers.\n * When the validator is open to new stakers, any staker (including the validator) can bond or unbond from the validator.\n * When the validator is closed to new stakers, existing stakers can still bond or unbond from the validator, but new stakers cannot bond.\n *\n * This function serves two primary purposes:\n * 1. Allow a validator to leave the committee, by closing themselves to stakers and then unbonding all of their stakers.\n * 2. Allow a validator to maintain their % of stake, by closing themselves to allowing more stakers to bond to them.\n *\n * @example\n * // Create a keyProvider to handle key management\n * const keyProvider = new AleoKeyProvider();\n * keyProvider.useCache = true;\n *\n * // Create a new ProgramManager with the key that will be used to bond credits\n * const programManager = new ProgramManager(\"https://api.explorer.aleo.org/v1\", keyProvider, undefined);\n * programManager.setAccount(new Account(\"ValidatorPrivateKey\"));\n *\n * // Create the bonding transaction\n * const tx = await programManager.buildSetValidatorStateTransaction(true);\n *\n * // The transaction can be submitted later to the network using the network client.\n * programManager.networkClient.submitTransaction(tx);\n *\n * @returns string\n * @param {boolean} validator_state\n * @param {Partial} options - Override default execution options\n */\n async buildSetValidatorStateTransaction(validator_state: boolean, options: Partial = {}) {\n const {\n programName = \"credits.aleo\",\n functionName = \"set_validator_state\",\n fee = 1,\n privateFee = false,\n inputs = [validator_state.toString()],\n keySearchParams = new AleoKeyProviderParams({\n proverUri: CREDITS_PROGRAM_KEYS.set_validator_state.prover,\n verifierUri: CREDITS_PROGRAM_KEYS.set_validator_state.verifier,\n cacheKey: \"credits.aleo/set_validator_state\"\n }),\n ...additionalOptions\n } = options;\n\n const executeOptions: ExecuteOptions = {\n programName,\n functionName,\n fee,\n privateFee,\n inputs,\n keySearchParams,\n ...additionalOptions\n };\n\n return await this.execute(executeOptions);\n }\n\n /**\n * Submit a set_validator_state transaction to the Aleo Network.\n *\n * This function allows a validator to set their state to be either opened or closed to new stakers.\n * When the validator is open to new stakers, any staker (including the validator) can bond or unbond from the validator.\n * When the validator is closed to new stakers, existing stakers can still bond or unbond from the validator, but new stakers cannot bond.\n *\n * This function serves two primary purposes:\n * 1. Allow a validator to leave the committee, by closing themselves to stakers and then unbonding all of their stakers.\n * 2. Allow a validator to maintain their % of stake, by closing themselves to allowing more stakers to bond to them.\n *\n * @example\n * // Create a keyProvider to handle key management\n * const keyProvider = new AleoKeyProvider();\n * keyProvider.useCache = true;\n *\n * // Create a new ProgramManager with the key that will be used to bond credits\n * const programManager = new ProgramManager(\"https://api.explorer.aleo.org/v1\", keyProvider, undefined);\n * programManager.setAccount(new Account(\"ValidatorPrivateKey\"));\n *\n * // Create the bonding transaction\n * const tx_id = await programManager.setValidatorState(true);\n *\n * @returns string\n * @param {boolean} validator_state\n * @param {Partial} options - Override default execution options\n */\n async setValidatorState(validator_state: boolean, options: Partial = {}) {\n const tx = await this.buildSetValidatorStateTransaction(validator_state, options);\n return this.networkClient.submitTransaction(tx);\n }\n\n /**\n * Verify a proof of execution from an offline execution\n *\n * @param {executionResponse} executionResponse\n * @returns {boolean} True if the proof is valid, false otherwise\n */\n verifyExecution(executionResponse: ExecutionResponse): boolean {\n try {\n const execution = executionResponse.getExecution();\n const function_id = executionResponse.getFunctionId();\n const program = executionResponse.getProgram();\n const verifyingKey = executionResponse.getVerifyingKey();\n return verifyFunctionExecution(execution, verifyingKey, program, function_id);\n } catch(e) {\n console.warn(\"The execution was not found in the response, cannot verify the execution\");\n return false;\n }\n }\n\n /**\n * Create a program object from a program's source code\n *\n * @param {string} program Program source code\n * @returns {Program | Error} The program object\n */\n createProgramFromSource(program: string): Program | Error {\n return Program.fromString(program);\n }\n\n /**\n * Get the credits program object\n *\n * @returns {Program} The credits program object\n */\n creditsProgram(): Program {\n return Program.getCreditsProgram();\n }\n\n /**\n * Verify a program is valid\n *\n * @param {string} program The program source code\n */\n verifyProgram(program: string): boolean {\n try {\n Program.fromString(program);\n return true;\n } catch (e) {\n return false;\n }\n }\n\n // Internal utility function for getting a credits.aleo record\n async getCreditsRecord(amount: number, nonces: string[], record?: RecordPlaintext | string, params?: RecordSearchParams): Promise {\n try {\n return record instanceof RecordPlaintext ? record : RecordPlaintext.fromString(record);\n } catch (e) {\n try {\n const recordProvider = this.recordProvider;\n return (await recordProvider.findCreditsRecord(amount, true, nonces, params))\n } catch (e) {\n throw logAndThrow(`Error finding fee record. Record finder response: '${e}'. Please ensure you're connected to a valid Aleo network and a record with enough balance exists.`);\n }\n }\n }\n}\n\n// Ensure the transfer type requires an amount record\nfunction requiresAmountRecord(transferType: string): boolean {\n return PRIVATE_TRANSFER_TYPES.has(transferType);\n}\n\n// Validate the transfer type\nfunction validateTransferType(transferType: string): string | Error {\n return VALID_TRANSFER_TYPES.has(transferType) ? transferType :\n logAndThrow(`Invalid transfer type '${transferType}'. Valid transfer types are 'private', 'privateToPublic', 'public', and 'publicToPrivate'.`);\n}\n\nexport { ProgramManager }\n","import {VerifyingKey, Metadata} from \"@provablehq/wasm\";\n\nconst KEY_STORE = Metadata.baseUrl();\n\ninterface Key {\n name: string,\n locator: string,\n prover: string,\n verifier: string,\n verifyingKey: () => VerifyingKey,\n}\n\nfunction convert(metadata: Metadata): Key {\n // This looks up the method name in VerifyingKey\n const verifyingKey = (VerifyingKey as any)[metadata.verifyingKey];\n\n if (!verifyingKey) {\n throw new Error(\"Invalid method name: \" + metadata.verifyingKey);\n }\n\n return {\n name: metadata.name,\n locator: metadata.locator,\n prover: metadata.prover,\n verifier: metadata.verifier,\n verifyingKey,\n };\n}\n\nconst CREDITS_PROGRAM_KEYS = {\n bond_public: convert(Metadata.bond_public()),\n bond_validator: convert(Metadata.bond_validator()),\n claim_unbond_public: convert(Metadata.claim_unbond_public()),\n fee_private: convert(Metadata.fee_private()),\n fee_public: convert(Metadata.fee_public()),\n inclusion: convert(Metadata.inclusion()),\n join: convert(Metadata.join()),\n set_validator_state: convert(Metadata.set_validator_state()),\n split: convert(Metadata.split()),\n transfer_private: convert(Metadata.transfer_private()),\n transfer_private_to_public: convert(Metadata.transfer_private_to_public()),\n transfer_public: convert(Metadata.transfer_public()),\n transfer_public_as_signer: convert(Metadata.transfer_public_as_signer()),\n transfer_public_to_private: convert(Metadata.transfer_public_to_private()),\n unbond_public: convert(Metadata.unbond_public()),\n getKey: function(key: string): Key | Error {\n if (this.hasOwnProperty(key)) {\n return (this as any)[key] as Key;\n } else {\n return new Error(`Key \"${key}\" not found.`);\n }\n }\n};\n\nconst PRIVATE_TRANSFER_TYPES = new Set([\n \"transfer_private\",\n \"private\",\n \"transferPrivate\",\n \"transfer_private_to_public\",\n \"privateToPublic\",\n \"transferPrivateToPublic\",\n]);\nconst VALID_TRANSFER_TYPES = new Set([\n \"transfer_private\",\n \"private\",\n \"transferPrivate\",\n \"transfer_private_to_public\",\n \"privateToPublic\",\n \"transferPrivateToPublic\",\n \"transfer_public\",\n \"transfer_public_as_signer\",\n \"public\",\n \"public_as_signer\",\n \"transferPublic\",\n \"transferPublicAsSigner\",\n \"transfer_public_to_private\",\n \"publicToPrivate\",\n \"publicAsSigner\",\n \"transferPublicToPrivate\",\n]);\nconst PRIVATE_TRANSFER = new Set([\n \"private\",\n \"transfer_private\",\n \"transferPrivate\",\n]);\nconst PRIVATE_TO_PUBLIC_TRANSFER = new Set([\n \"private_to_public\",\n \"privateToPublic\",\n \"transfer_private_to_public\",\n \"transferPrivateToPublic\",\n]);\nconst PUBLIC_TRANSFER = new Set([\n \"public\",\n \"transfer_public\",\n \"transferPublic\",\n]);\nconst PUBLIC_TRANSFER_AS_SIGNER = new Set([\n \"public_as_signer\",\n \"transfer_public_as_signer\",\n \"transferPublicAsSigner\",\n]);\nconst PUBLIC_TO_PRIVATE_TRANSFER = new Set([\n \"public_to_private\",\n \"publicToPrivate\",\n \"transfer_public_to_private\",\n \"transferPublicToPrivate\",\n]);\n\nfunction logAndThrow(message: string): Error {\n console.error(message);\n throw message;\n}\n\nimport { Account } from \"./account\";\nimport { AleoNetworkClient, ProgramImports } from \"./network-client\";\nimport { Block } from \"./models/block\";\nimport { Execution } from \"./models/execution\";\nimport { Input } from \"./models/input\";\nimport { Output } from \"./models/output\";\nimport { TransactionModel } from \"./models/transactionModel\";\nimport { Transition } from \"./models/transition\";\nimport {\n AleoKeyProvider,\n AleoKeyProviderParams,\n AleoKeyProviderInitParams,\n CachedKeyPair,\n FunctionKeyPair,\n FunctionKeyProvider,\n KeySearchParams,\n} from \"./function-key-provider\";\nimport {\n OfflineKeyProvider,\n OfflineSearchParams\n} from \"./offline-key-provider\";\nimport {\n BlockHeightSearch,\n NetworkRecordProvider,\n RecordProvider,\n RecordSearchParams,\n} from \"./record-provider\";\n\n// @TODO: This function is no longer needed, remove it.\nasync function initializeWasm() {\n console.warn(\"initializeWasm is deprecated, you no longer need to use it\");\n}\n\nexport { createAleoWorker } from \"./managed-worker\";\n\nexport { ProgramManager } from \"./program-manager\";\n\nexport {\n Address,\n Execution as FunctionExecution,\n ExecutionResponse,\n Field,\n OfflineQuery,\n PrivateKey,\n PrivateKeyCiphertext,\n Program,\n ProgramManager as ProgramManagerBase,\n ProvingKey,\n RecordCiphertext,\n RecordPlaintext,\n Signature,\n Transaction,\n VerifyingKey,\n ViewKey,\n initThreadPool,\n verifyFunctionExecution,\n} from \"@provablehq/wasm\";\n\nexport { initializeWasm };\n\nexport {\n Account,\n AleoKeyProvider,\n AleoKeyProviderParams,\n AleoKeyProviderInitParams,\n AleoNetworkClient,\n Block,\n BlockHeightSearch,\n CachedKeyPair,\n Execution,\n FunctionKeyPair,\n FunctionKeyProvider,\n Input,\n Key,\n KeySearchParams,\n NetworkRecordProvider,\n ProgramImports,\n OfflineKeyProvider,\n OfflineSearchParams,\n Output,\n RecordProvider,\n RecordSearchParams,\n TransactionModel,\n Transition,\n CREDITS_PROGRAM_KEYS,\n KEY_STORE,\n PRIVATE_TRANSFER,\n PRIVATE_TO_PUBLIC_TRANSFER,\n PRIVATE_TRANSFER_TYPES,\n PUBLIC_TRANSFER,\n PUBLIC_TRANSFER_AS_SIGNER,\n PUBLIC_TO_PRIVATE_TRANSFER,\n VALID_TRANSFER_TYPES,\n logAndThrow,\n};\n","import {initThreadPool, ProgramManager, PrivateKey, verifyFunctionExecution, FunctionKeyPair} from \"./index\";\nimport { AleoKeyProvider, AleoKeyProviderParams} from \"./function-key-provider\";\nimport { expose } from \"comlink\";\n\nawait initThreadPool();\n\nconst defaultHost = \"https://api.explorer.aleo.org/v1\";\nconst keyProvider = new AleoKeyProvider();\nconst programManager = new ProgramManager(\n defaultHost,\n keyProvider,\n undefined\n);\n\nkeyProvider.useCache(true);\n\nlet lastLocalProgram: string = \"\";\n\nexport interface WorkerAPI {\n run: (\n localProgram: string,\n aleoFunction: string,\n inputs: string[],\n privateKey: string\n ) => Promise<{ outputs: any; execution: string } | string>;\n\n getPrivateKey: () => Promise;\n}\nasync function run(\n localProgram: string,\n aleoFunction: string,\n inputs: string[],\n privateKey: string,\n proveExecution = false\n) {\n console.log(\"Web worker: Executing function locally...\");\n const startTime = performance.now();\n\n try {\n // Ensure the program is valid and that it contains the function specified\n const program = programManager.createProgramFromSource(localProgram);\n if (program instanceof Error) {\n throw \"Error creating program from source\";\n }\n const program_id = program.id();\n if (!program.hasFunction(aleoFunction)) {\n throw `Program ${program_id} does not contain function ${aleoFunction}`;\n }\n const cacheKey = `${program_id}:${aleoFunction}`;\n\n // Get the program imports\n const imports = await programManager.networkClient.getProgramImports(\n localProgram\n );\n\n if (imports instanceof Error) {\n throw \"Error getting program imports\";\n }\n // Get the proving and verifying keys for the function\n if (lastLocalProgram !== localProgram) {\n const keys = await programManager.synthesizeKeys(\n localProgram,\n aleoFunction,\n inputs,\n PrivateKey.from_string(privateKey)\n );\n programManager.keyProvider.cacheKeys(cacheKey, keys);\n lastLocalProgram = localProgram;\n }\n\n // Pass the cache key to the execute function\n const keyParams = new AleoKeyProviderParams({\n cacheKey: cacheKey,\n });\n\n // Execute the function locally\n const response = await programManager.run(\n localProgram,\n aleoFunction,\n inputs,\n proveExecution,\n imports,\n keyParams,\n undefined,\n undefined,\n PrivateKey.from_string(privateKey),\n );\n\n // Return the outputs to the main thread\n console.log(\n `Web worker: Local execution completed in ${\n performance.now() - startTime\n } ms`\n );\n const outputs = response.getOutputs();\n const execution = response.getExecution();\n let executionString = \"\";\n\n const keys = keyProvider.getKeys(cacheKey);\n\n if (keys instanceof Error) {\n throw \"Could not get verifying key\";\n }\n\n const verifyingKey = keys[1];\n\n if (execution) {\n verifyFunctionExecution(\n execution,\n verifyingKey,\n program,\n \"hello\"\n );\n executionString = execution.toString();\n console.log(\"Execution verified successfully: \" + execution);\n } else {\n executionString = \"\";\n }\n\n console.log(`Function execution response: ${outputs}`);\n\n return { outputs: outputs, execution: executionString };\n } catch (error) {\n console.error(error);\n return error ? error.toString() : \"Unknown error\";\n }\n}\n\nasync function getPrivateKey() {\n const privateKey = new PrivateKey();\n return privateKey.to_string();\n}\n\nconst workerAPI = { run, getPrivateKey };\nexpose(workerAPI);\n","/**\n * @license\n * Copyright 2019 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\nconst proxyMarker = Symbol(\"Comlink.proxy\");\nconst createEndpoint = Symbol(\"Comlink.endpoint\");\nconst releaseProxy = Symbol(\"Comlink.releaseProxy\");\nconst finalizer = Symbol(\"Comlink.finalizer\");\nconst throwMarker = Symbol(\"Comlink.thrown\");\nconst isObject = (val) => (typeof val === \"object\" && val !== null) || typeof val === \"function\";\n/**\n * Internal transfer handle to handle objects marked to proxy.\n */\nconst proxyTransferHandler = {\n canHandle: (val) => isObject(val) && val[proxyMarker],\n serialize(obj) {\n const { port1, port2 } = new MessageChannel();\n expose(obj, port1);\n return [port2, [port2]];\n },\n deserialize(port) {\n port.start();\n return wrap(port);\n },\n};\n/**\n * Internal transfer handler to handle thrown exceptions.\n */\nconst throwTransferHandler = {\n canHandle: (value) => isObject(value) && throwMarker in value,\n serialize({ value }) {\n let serialized;\n if (value instanceof Error) {\n serialized = {\n isError: true,\n value: {\n message: value.message,\n name: value.name,\n stack: value.stack,\n },\n };\n }\n else {\n serialized = { isError: false, value };\n }\n return [serialized, []];\n },\n deserialize(serialized) {\n if (serialized.isError) {\n throw Object.assign(new Error(serialized.value.message), serialized.value);\n }\n throw serialized.value;\n },\n};\n/**\n * Allows customizing the serialization of certain values.\n */\nconst transferHandlers = new Map([\n [\"proxy\", proxyTransferHandler],\n [\"throw\", throwTransferHandler],\n]);\nfunction isAllowedOrigin(allowedOrigins, origin) {\n for (const allowedOrigin of allowedOrigins) {\n if (origin === allowedOrigin || allowedOrigin === \"*\") {\n return true;\n }\n if (allowedOrigin instanceof RegExp && allowedOrigin.test(origin)) {\n return true;\n }\n }\n return false;\n}\nfunction expose(obj, ep = globalThis, allowedOrigins = [\"*\"]) {\n ep.addEventListener(\"message\", function callback(ev) {\n if (!ev || !ev.data) {\n return;\n }\n if (!isAllowedOrigin(allowedOrigins, ev.origin)) {\n console.warn(`Invalid origin '${ev.origin}' for comlink proxy`);\n return;\n }\n const { id, type, path } = Object.assign({ path: [] }, ev.data);\n const argumentList = (ev.data.argumentList || []).map(fromWireValue);\n let returnValue;\n try {\n const parent = path.slice(0, -1).reduce((obj, prop) => obj[prop], obj);\n const rawValue = path.reduce((obj, prop) => obj[prop], obj);\n switch (type) {\n case \"GET\" /* MessageType.GET */:\n {\n returnValue = rawValue;\n }\n break;\n case \"SET\" /* MessageType.SET */:\n {\n parent[path.slice(-1)[0]] = fromWireValue(ev.data.value);\n returnValue = true;\n }\n break;\n case \"APPLY\" /* MessageType.APPLY */:\n {\n returnValue = rawValue.apply(parent, argumentList);\n }\n break;\n case \"CONSTRUCT\" /* MessageType.CONSTRUCT */:\n {\n const value = new rawValue(...argumentList);\n returnValue = proxy(value);\n }\n break;\n case \"ENDPOINT\" /* MessageType.ENDPOINT */:\n {\n const { port1, port2 } = new MessageChannel();\n expose(obj, port2);\n returnValue = transfer(port1, [port1]);\n }\n break;\n case \"RELEASE\" /* MessageType.RELEASE */:\n {\n returnValue = undefined;\n }\n break;\n default:\n return;\n }\n }\n catch (value) {\n returnValue = { value, [throwMarker]: 0 };\n }\n Promise.resolve(returnValue)\n .catch((value) => {\n return { value, [throwMarker]: 0 };\n })\n .then((returnValue) => {\n const [wireValue, transferables] = toWireValue(returnValue);\n ep.postMessage(Object.assign(Object.assign({}, wireValue), { id }), transferables);\n if (type === \"RELEASE\" /* MessageType.RELEASE */) {\n // detach and deactive after sending release response above.\n ep.removeEventListener(\"message\", callback);\n closeEndPoint(ep);\n if (finalizer in obj && typeof obj[finalizer] === \"function\") {\n obj[finalizer]();\n }\n }\n })\n .catch((error) => {\n // Send Serialization Error To Caller\n const [wireValue, transferables] = toWireValue({\n value: new TypeError(\"Unserializable return value\"),\n [throwMarker]: 0,\n });\n ep.postMessage(Object.assign(Object.assign({}, wireValue), { id }), transferables);\n });\n });\n if (ep.start) {\n ep.start();\n }\n}\nfunction isMessagePort(endpoint) {\n return endpoint.constructor.name === \"MessagePort\";\n}\nfunction closeEndPoint(endpoint) {\n if (isMessagePort(endpoint))\n endpoint.close();\n}\nfunction wrap(ep, target) {\n return createProxy(ep, [], target);\n}\nfunction throwIfProxyReleased(isReleased) {\n if (isReleased) {\n throw new Error(\"Proxy has been released and is not useable\");\n }\n}\nfunction releaseEndpoint(ep) {\n return requestResponseMessage(ep, {\n type: \"RELEASE\" /* MessageType.RELEASE */,\n }).then(() => {\n closeEndPoint(ep);\n });\n}\nconst proxyCounter = new WeakMap();\nconst proxyFinalizers = \"FinalizationRegistry\" in globalThis &&\n new FinalizationRegistry((ep) => {\n const newCount = (proxyCounter.get(ep) || 0) - 1;\n proxyCounter.set(ep, newCount);\n if (newCount === 0) {\n releaseEndpoint(ep);\n }\n });\nfunction registerProxy(proxy, ep) {\n const newCount = (proxyCounter.get(ep) || 0) + 1;\n proxyCounter.set(ep, newCount);\n if (proxyFinalizers) {\n proxyFinalizers.register(proxy, ep, proxy);\n }\n}\nfunction unregisterProxy(proxy) {\n if (proxyFinalizers) {\n proxyFinalizers.unregister(proxy);\n }\n}\nfunction createProxy(ep, path = [], target = function () { }) {\n let isProxyReleased = false;\n const proxy = new Proxy(target, {\n get(_target, prop) {\n throwIfProxyReleased(isProxyReleased);\n if (prop === releaseProxy) {\n return () => {\n unregisterProxy(proxy);\n releaseEndpoint(ep);\n isProxyReleased = true;\n };\n }\n if (prop === \"then\") {\n if (path.length === 0) {\n return { then: () => proxy };\n }\n const r = requestResponseMessage(ep, {\n type: \"GET\" /* MessageType.GET */,\n path: path.map((p) => p.toString()),\n }).then(fromWireValue);\n return r.then.bind(r);\n }\n return createProxy(ep, [...path, prop]);\n },\n set(_target, prop, rawValue) {\n throwIfProxyReleased(isProxyReleased);\n // FIXME: ES6 Proxy Handler `set` methods are supposed to return a\n // boolean. To show good will, we return true asynchronously ¯\\_(ツ)_/¯\n const [value, transferables] = toWireValue(rawValue);\n return requestResponseMessage(ep, {\n type: \"SET\" /* MessageType.SET */,\n path: [...path, prop].map((p) => p.toString()),\n value,\n }, transferables).then(fromWireValue);\n },\n apply(_target, _thisArg, rawArgumentList) {\n throwIfProxyReleased(isProxyReleased);\n const last = path[path.length - 1];\n if (last === createEndpoint) {\n return requestResponseMessage(ep, {\n type: \"ENDPOINT\" /* MessageType.ENDPOINT */,\n }).then(fromWireValue);\n }\n // We just pretend that `bind()` didn’t happen.\n if (last === \"bind\") {\n return createProxy(ep, path.slice(0, -1));\n }\n const [argumentList, transferables] = processArguments(rawArgumentList);\n return requestResponseMessage(ep, {\n type: \"APPLY\" /* MessageType.APPLY */,\n path: path.map((p) => p.toString()),\n argumentList,\n }, transferables).then(fromWireValue);\n },\n construct(_target, rawArgumentList) {\n throwIfProxyReleased(isProxyReleased);\n const [argumentList, transferables] = processArguments(rawArgumentList);\n return requestResponseMessage(ep, {\n type: \"CONSTRUCT\" /* MessageType.CONSTRUCT */,\n path: path.map((p) => p.toString()),\n argumentList,\n }, transferables).then(fromWireValue);\n },\n });\n registerProxy(proxy, ep);\n return proxy;\n}\nfunction myFlat(arr) {\n return Array.prototype.concat.apply([], arr);\n}\nfunction processArguments(argumentList) {\n const processed = argumentList.map(toWireValue);\n return [processed.map((v) => v[0]), myFlat(processed.map((v) => v[1]))];\n}\nconst transferCache = new WeakMap();\nfunction transfer(obj, transfers) {\n transferCache.set(obj, transfers);\n return obj;\n}\nfunction proxy(obj) {\n return Object.assign(obj, { [proxyMarker]: true });\n}\nfunction windowEndpoint(w, context = globalThis, targetOrigin = \"*\") {\n return {\n postMessage: (msg, transferables) => w.postMessage(msg, targetOrigin, transferables),\n addEventListener: context.addEventListener.bind(context),\n removeEventListener: context.removeEventListener.bind(context),\n };\n}\nfunction toWireValue(value) {\n for (const [name, handler] of transferHandlers) {\n if (handler.canHandle(value)) {\n const [serializedValue, transferables] = handler.serialize(value);\n return [\n {\n type: \"HANDLER\" /* WireValueType.HANDLER */,\n name,\n value: serializedValue,\n },\n transferables,\n ];\n }\n }\n return [\n {\n type: \"RAW\" /* WireValueType.RAW */,\n value,\n },\n transferCache.get(value) || [],\n ];\n}\nfunction fromWireValue(value) {\n switch (value.type) {\n case \"HANDLER\" /* WireValueType.HANDLER */:\n return transferHandlers.get(value.name).deserialize(value.value);\n case \"RAW\" /* WireValueType.RAW */:\n return value.value;\n }\n}\nfunction requestResponseMessage(ep, msg, transfers) {\n return new Promise((resolve) => {\n const id = generateUUID();\n ep.addEventListener(\"message\", function l(ev) {\n if (!ev.data || !ev.data.id || ev.data.id !== id) {\n return;\n }\n ep.removeEventListener(\"message\", l);\n resolve(ev.data);\n });\n if (ep.start) {\n ep.start();\n }\n ep.postMessage(Object.assign({ id }, msg), transfers);\n });\n}\nfunction generateUUID() {\n return new Array(4)\n .fill(0)\n .map(() => Math.floor(Math.random() * Number.MAX_SAFE_INTEGER).toString(16))\n .join(\"-\");\n}\n\nexport { createEndpoint, expose, finalizer, proxy, proxyMarker, releaseProxy, transfer, transferHandlers, windowEndpoint, wrap };\n//# sourceMappingURL=comlink.mjs.map\n","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n// expose the modules object (__webpack_modules__)\n__webpack_require__.m = __webpack_modules__;\n\n// the startup function\n__webpack_require__.x = () => {\n\t// Load entry module and return exports\n\t// This entry module depends on other loaded chunks and execution need to be delayed\n\tvar __webpack_exports__ = __webpack_require__.O(undefined, [933], () => (__webpack_require__(9669)))\n\t__webpack_exports__ = __webpack_require__.O(__webpack_exports__);\n\treturn __webpack_exports__;\n};\n\n","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.f = {};\n// This file contains only the entry chunk.\n// The chunk loading function for additional chunks\n__webpack_require__.e = (chunkId) => {\n\treturn Promise.all(Object.keys(__webpack_require__.f).reduce((promises, key) => {\n\t\t__webpack_require__.f[key](chunkId, promises);\n\t\treturn promises;\n\t}, []));\n};","// This function allow to reference async chunks and sibling chunks for the entrypoint\n__webpack_require__.u = (chunkId) => {\n\t// return url for filenames based on template\n\treturn \"\" + chunkId + \".bundle.js\";\n};","__webpack_require__.g = (function() {\n\tif (typeof globalThis === 'object') return globalThis;\n\ttry {\n\t\treturn this || new Function('return this')();\n\t} catch (e) {\n\t\tif (typeof window === 'object') return window;\n\t}\n})();","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","var scriptUrl;\nif (__webpack_require__.g.importScripts) scriptUrl = __webpack_require__.g.location + \"\";\nvar document = __webpack_require__.g.document;\nif (!scriptUrl && document) {\n\tif (document.currentScript)\n\t\tscriptUrl = document.currentScript.src;\n\tif (!scriptUrl) {\n\t\tvar scripts = document.getElementsByTagName(\"script\");\n\t\tif(scripts.length) {\n\t\t\tvar i = scripts.length - 1;\n\t\t\twhile (i > -1 && !scriptUrl) scriptUrl = scripts[i--].src;\n\t\t}\n\t}\n}\n// When supporting browsers where an automatic publicPath is not supported you must specify an output.publicPath manually via configuration\n// or pass an empty string (\"\") and set the __webpack_public_path__ variable from your code to use your own logic.\nif (!scriptUrl) throw new Error(\"Automatic publicPath is not supported in this browser\");\nscriptUrl = scriptUrl.replace(/#.*$/, \"\").replace(/\\?.*$/, \"\").replace(/\\/[^\\/]+$/, \"/\");\n__webpack_require__.p = scriptUrl;","__webpack_require__.b = self.location + \"\";\n\n// object to store loaded chunks\n// \"1\" means \"already loaded\"\nvar installedChunks = {\n\t530: 1\n};\n\n// importScripts chunk loading\nvar installChunk = (data) => {\n\tvar [chunkIds, moreModules, runtime] = data;\n\tfor(var moduleId in moreModules) {\n\t\tif(__webpack_require__.o(moreModules, moduleId)) {\n\t\t\t__webpack_require__.m[moduleId] = moreModules[moduleId];\n\t\t}\n\t}\n\tif(runtime) runtime(__webpack_require__);\n\twhile(chunkIds.length)\n\t\tinstalledChunks[chunkIds.pop()] = 1;\n\tparentChunkLoadingFunction(data);\n};\n__webpack_require__.f.i = (chunkId, promises) => {\n\t// \"1\" is the signal for \"already loaded\"\n\tif(!installedChunks[chunkId]) {\n\t\tif(true) { // all chunks have JS\n\t\t\timportScripts(__webpack_require__.p + __webpack_require__.u(chunkId));\n\t\t}\n\t}\n};\n\nvar chunkLoadingGlobal = self[\"webpackChunkaleo_website\"] = self[\"webpackChunkaleo_website\"] || [];\nvar parentChunkLoadingFunction = chunkLoadingGlobal.push.bind(chunkLoadingGlobal);\nchunkLoadingGlobal.push = installChunk;\n\n// no HMR\n\n// no HMR manifest","// run startup\nvar __webpack_exports__ = __webpack_require__.x();\n"],"names":["webpackQueues","webpackExports","webpackError","resolveQueue","deferred","next","async","get","url","options","response","fetch","ok","Error","status","post","method","AleoNetworkClient","host","headers","account","constructor","this","setAccount","getAccount","setHost","fetchData","json","error","findUnspentRecords","startHeight","endHeight","privateKey","amounts","maxMicrocredits","nonces","records","Array","start","end","resolvedPrivateKey","latestHeight","failures","totalRecordValue","BigInt","_privateKey","PrivateKey","from_string","viewKey","to_view_key","blockHeight","getLatestHeight","blocks","getBlockRange","i","length","transactions","j","confirmedTransaction","type","transaction","execution","transitions","k","transition","program","outputs","l","output","record","RecordCiphertext","fromString","value","isOwner","recordPlaintext","decrypt","nonce","includes","serialNumber","serialNumberString","getTransitionId","push","microcredits","amounts_found","console","warn","toString","getBlock","height","getDeploymentTransactionIDForProgram","Program","replace","getDeploymentTransactionForProgram","transaction_id","getTransaction","getLatestBlock","getLatestCommittee","getProgram","programId","getProgramObject","inputProgram","getProgramImports","imports","importList","getImports","import_id","hasOwnProperty","programSource","nestedImports","key","logAndThrow","getProgramImportNames","getProgramMappingNames","getProgramMappingValue","mappingName","getStateRoot","id","getTransactions","getTransactionsInMempool","inputOrOutputID","submitTransaction","transaction_string","Transaction","body","Object","assign","message","AleoKeyProviderParams","name","proverUri","verifierUri","cacheKey","params","AleoKeyProvider","cache","cacheOption","keyUris","fetchBytes","data","arrayBuffer","Uint8Array","KEY_STORE","Map","useCache","clearCache","clear","cacheKeys","keyId","keys","provingKey","verifyingKey","set","toBytes","containsKeys","has","deleteKeys","delete","getKeys","debug","provingKeyBytes","verifyingKeyBytes","ProvingKey","fromBytes","VerifyingKey","functionKeys","proverUrl","verifierUrl","CREDITS_PROGRAM_KEYS","getKey","fetchCreditsKeys","fetchRemoteKeys","getVerifyingKey","fetchProvingKey","locator","keyPair","verifying_key","proving_key","prover","bond_public","bondPublicKeys","bondValidatorKeys","bond_validator","claimUnbondPublicKeys","claim_unbond_public","transferKeys","visibility","PRIVATE_TRANSFER","transfer_private","PRIVATE_TO_PUBLIC_TRANSFER","transfer_private_to_public","PUBLIC_TRANSFER","transfer_public","PUBLIC_TRANSFER_AS_SIGNER","transfer_public_as_signer","PUBLIC_TO_PRIVATE_TRANSFER","transfer_public_to_private","joinKeys","join","splitKeys","split","feePrivateKeys","fee_private","feePublicKeys","fee_public","verifier","inclusion","set_validator_state","unbond_public","text","e","inner","unBondPublicKeys","ProgramManager","keyProvider","networkClient","recordProvider","setKeyProvider","setRecordProvider","deploy","fee","privateFee","recordSearchParams","feeRecord","programObject","log","feeKeys","deploymentPrivateKey","getCreditsRecord","undefined","feeProvingKey","feeVerifyingKey","tx","ProgramManager$1","buildDeploymentTransaction","buildExecutionTransaction","programName","functionName","inputs","keySearchParams","offlineQuery","executionPrivateKey","execute","run","function_name","proveExecution","executeFunctionOffline","recordOne","recordTwo","joinProvingKey","joinVerifyingKey","RecordPlaintext","buildJoinTransaction","splitAmount","amountRecord","splitProvingKey","splitVerifyingKey","buildSplitTransaction","synthesizeKeys","function_id","synthesizeKeyPair","buildTransferTransaction","amount","recipient","transferType","validateTransferType","transferProvingKey","transferVerifyingKey","requiresAmountRecord","buildTransferPublicTransaction","buildTransferPublicAsSignerTransaction","transfer","buildBondPublicTransaction","staker_address","validator_address","withdrawal_address","scaledAmount","Math","trunc","creditsProgram","additionalOptions","executeOptions","bondPublic","buildBondValidatorTransaction","commission","adjustedCommission","bondValidator","buildUnbondPublicTransaction","unbondPublic","buildClaimUnbondPublicTransaction","claimUnbondPublic","buildSetValidatorStateTransaction","validator_state","setValidatorState","verifyExecution","executionResponse","getExecution","getFunctionId","verifyFunctionExecution","createProgramFromSource","getCreditsProgram","verifyProgram","findCreditsRecord","PRIVATE_TRANSFER_TYPES","VALID_TRANSFER_TYPES","Metadata","baseUrl","convert","metadata","Set","initThreadPool","defaultHost","programManager","lastLocalProgram","localProgram","aleoFunction","startTime","performance","now","program_id","hasFunction","keyParams","getOutputs","executionString","getPrivateKey","to_string","workerAPI","expose","proxyMarker","Symbol","createEndpoint","releaseProxy","finalizer","throwMarker","isObject","val","transferHandlers","canHandle","serialize","obj","port1","port2","MessageChannel","deserialize","port","createProxy","target","serialized","isError","stack","ep","globalThis","allowedOrigins","addEventListener","callback","ev","origin","allowedOrigin","RegExp","test","isAllowedOrigin","path","argumentList","map","fromWireValue","returnValue","parent","slice","reduce","prop","rawValue","apply","proxy","transfers","transferCache","Promise","resolve","catch","then","wireValue","transferables","toWireValue","postMessage","removeEventListener","closeEndPoint","TypeError","endpoint","isMessagePort","close","throwIfProxyReleased","isReleased","releaseEndpoint","requestResponseMessage","proxyCounter","WeakMap","proxyFinalizers","FinalizationRegistry","newCount","isProxyReleased","Proxy","_target","unregister","unregisterProxy","r","p","bind","_thisArg","rawArgumentList","last","processArguments","construct","register","registerProxy","processed","v","arr","prototype","concat","handler","serializedValue","msg","fill","floor","random","Number","MAX_SAFE_INTEGER","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","exports","module","__webpack_modules__","m","x","__webpack_exports__","O","queue","d","forEach","fn","a","hasAwait","currentDeps","outerResolve","reject","depQueues","promise","rej","deps","dep","ret","wrapDeps","getResult","fnQueue","q","add","err","result","chunkIds","priority","notFulfilled","Infinity","fulfilled","every","splice","definition","o","defineProperty","enumerable","f","chunkId","all","promises","u","g","Function","window","call","scriptUrl","importScripts","location","document","currentScript","src","scripts","getElementsByTagName","b","self","installedChunks","chunkLoadingGlobal","parentChunkLoadingFunction","moreModules","runtime","pop"],"sourceRoot":""} \ No newline at end of file diff --git a/587.bundle.js b/587.bundle.js deleted file mode 100644 index 6068afe4d..000000000 --- a/587.bundle.js +++ /dev/null @@ -1,2 +0,0 @@ -(()=>{var r,e,t,o,a,n,i={},p={};function c(r){var e=p[r];if(void 0!==e)return e.exports;var t=p[r]={exports:{}};return i[r](t,t.exports,c),t.exports}c.m=i,c.x=()=>{var r=c.O(void 0,[907,877],(()=>c(341)));return r=c.O(r)},r="function"==typeof Symbol?Symbol("webpack queues"):"__webpack_queues__",e="function"==typeof Symbol?Symbol("webpack exports"):"__webpack_exports__",t="function"==typeof Symbol?Symbol("webpack error"):"__webpack_error__",o=r=>{r&&r.d<1&&(r.d=1,r.forEach((r=>r.r--)),r.forEach((r=>r.r--?r.r++:r())))},c.a=(a,n,i)=>{var p;i&&((p=[]).d=-1);var c,s,f,l=new Set,u=a.exports,b=new Promise(((r,e)=>{f=e,s=r}));b[e]=u,b[r]=r=>(p&&r(p),l.forEach(r),b.catch((r=>{}))),a.exports=b,n((a=>{var n;c=(a=>a.map((a=>{if(null!==a&&"object"==typeof a){if(a[r])return a;if(a.then){var n=[];n.d=0,a.then((r=>{i[e]=r,o(n)}),(r=>{i[t]=r,o(n)}));var i={};return i[r]=r=>r(n),i}}var p={};return p[r]=r=>{},p[e]=a,p})))(a);var i=()=>c.map((r=>{if(r[t])throw r[t];return r[e]})),s=new Promise((e=>{(n=()=>e(i)).r=0;var t=r=>r!==p&&!l.has(r)&&(l.add(r),r&&!r.d&&(n.r++,r.push(n)));c.map((e=>e[r](t)))}));return n.r?s:i()}),(r=>(r?f(b[t]=r):s(u),o(p)))),p&&p.d<0&&(p.d=0)},a=[],c.O=(r,e,t,o)=>{if(!e){var n=1/0;for(f=0;f=o)&&Object.keys(c.O).every((r=>c.O[r](e[p])))?e.splice(p--,1):(i=!1,o0&&a[f-1][2]>o;f--)a[f]=a[f-1];a[f]=[e,t,o]},c.d=(r,e)=>{for(var t in e)c.o(e,t)&&!c.o(r,t)&&Object.defineProperty(r,t,{enumerable:!0,get:e[t]})},c.f={},c.e=r=>Promise.all(Object.keys(c.f).reduce(((e,t)=>(c.f[t](r,e),e)),[])),c.u=r=>r+".bundle.js",c.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(r){if("object"==typeof window)return window}}(),c.o=(r,e)=>Object.prototype.hasOwnProperty.call(r,e),(()=>{var r;c.g.importScripts&&(r=c.g.location+"");var e=c.g.document;if(!r&&e&&(e.currentScript&&(r=e.currentScript.src),!r)){var t=e.getElementsByTagName("script");if(t.length)for(var o=t.length-1;o>-1&&(!r||!/^http(s?):/.test(r));)r=t[o--].src}if(!r)throw new Error("Automatic publicPath is not supported in this browser");r=r.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),c.p=r})(),(()=>{c.b=self.location+"";var r={587:1};c.f.i=(e,t)=>{r[e]||importScripts(c.p+c.u(e))};var e=self.webpackChunkaleo_website=self.webpackChunkaleo_website||[],t=e.push.bind(e);e.push=e=>{var[o,a,n]=e;for(var i in a)c.o(a,i)&&(c.m[i]=a[i]);for(n&&n(c);o.length;)r[o.pop()]=1;t(e)}})(),n=c.x,c.x=()=>Promise.all([c.e(907),c.e(877)]).then(n);c.x()})(); -//# sourceMappingURL=587.bundle.js.map \ No newline at end of file diff --git a/587.bundle.js.map b/587.bundle.js.map deleted file mode 100644 index b3aa6bb16..000000000 --- a/587.bundle.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"587.bundle.js","mappings":"UAAIA,EACAC,EACAC,EACAC,ECHAC,ECAAC,E,KCCAC,EAA2B,CAAC,EAGhC,SAASC,EAAoBC,GAE5B,IAAIC,EAAeH,EAAyBE,GAC5C,QAAqBE,IAAjBD,EACH,OAAOA,EAAaE,QAGrB,IAAIC,EAASN,EAAyBE,GAAY,CAGjDG,QAAS,CAAC,GAOX,OAHAE,EAAoBL,GAAUI,EAAQA,EAAOD,QAASJ,GAG/CK,EAAOD,OACf,CAGAJ,EAAoBO,EAAID,EAGxBN,EAAoBQ,EAAI,KAGvB,IAAIC,EAAsBT,EAAoBU,OAAEP,EAAW,CAAC,IAAI,MAAM,IAAOH,EAAoB,OAEjG,OADAS,EAAsBT,EAAoBU,EAAED,EAClB,EHjCvBhB,EAAkC,mBAAXkB,OAAwBA,OAAO,kBAAoB,qBAC1EjB,EAAmC,mBAAXiB,OAAwBA,OAAO,mBAAqB,sBAC5EhB,EAAiC,mBAAXgB,OAAwBA,OAAO,iBAAmB,oBACxEf,EAAgBgB,IAChBA,GAASA,EAAMC,EAAI,IACrBD,EAAMC,EAAI,EACVD,EAAME,SAASC,GAAQA,EAAGC,MAC1BJ,EAAME,SAASC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oE,EAAEJ,GAE9D,EAGD,IAAI6B,EAAqBF,KAA+B,yBAAIA,KAA+B,0BAAK,GAC5FG,EAA6BD,EAAmBnD,KAAKqD,KAAKF,GAC9DA,EAAmBnD,KAvBCsD,IACnB,IAAKnD,EAAUoD,EAAaC,GAAWF,EACvC,IAAI,IAAI/F,KAAYgG,EAChBjG,EAAoB2D,EAAEsC,EAAahG,KACrCD,EAAoBO,EAAEN,GAAYgG,EAAYhG,IAIhD,IADGiG,GAASA,EAAQlG,GACd6C,EAASK,QACd0C,EAAgB/C,EAASsD,OAAS,EACnCL,EAA2BE,EAAK,C,KRnB7BlG,EAAOE,EAAoBQ,EAC/BR,EAAoBQ,EAAI,IAChBkB,QAAQuC,IAAI,CAClBjE,EAAoBkC,EAAE,KACtBlC,EAAoBkC,EAAE,OACpBF,KAAKlC,GSJiBE,EAAoBQ,G","sources":["webpack://aleo-website/webpack/runtime/async module","webpack://aleo-website/webpack/runtime/chunk loaded","webpack://aleo-website/webpack/runtime/startup chunk dependencies","webpack://aleo-website/webpack/bootstrap","webpack://aleo-website/webpack/runtime/define property getters","webpack://aleo-website/webpack/runtime/ensure chunk","webpack://aleo-website/webpack/runtime/get javascript chunk filename","webpack://aleo-website/webpack/runtime/global","webpack://aleo-website/webpack/runtime/hasOwnProperty shorthand","webpack://aleo-website/webpack/runtime/publicPath","webpack://aleo-website/webpack/runtime/importScripts chunk loading","webpack://aleo-website/webpack/startup"],"sourcesContent":["var webpackQueues = typeof Symbol === \"function\" ? Symbol(\"webpack queues\") : \"__webpack_queues__\";\nvar webpackExports = typeof Symbol === \"function\" ? Symbol(\"webpack exports\") : \"__webpack_exports__\";\nvar webpackError = typeof Symbol === \"function\" ? Symbol(\"webpack error\") : \"__webpack_error__\";\nvar resolveQueue = (queue) => {\n\tif(queue && queue.d < 1) {\n\t\tqueue.d = 1;\n\t\tqueue.forEach((fn) => (fn.r--));\n\t\tqueue.forEach((fn) => (fn.r-- ? fn.r++ : fn()));\n\t}\n}\nvar wrapDeps = (deps) => (deps.map((dep) => {\n\tif(dep !== null && typeof dep === \"object\") {\n\t\tif(dep[webpackQueues]) return dep;\n\t\tif(dep.then) {\n\t\t\tvar queue = [];\n\t\t\tqueue.d = 0;\n\t\t\tdep.then((r) => {\n\t\t\t\tobj[webpackExports] = r;\n\t\t\t\tresolveQueue(queue);\n\t\t\t}, (e) => {\n\t\t\t\tobj[webpackError] = e;\n\t\t\t\tresolveQueue(queue);\n\t\t\t});\n\t\t\tvar obj = {};\n\t\t\tobj[webpackQueues] = (fn) => (fn(queue));\n\t\t\treturn obj;\n\t\t}\n\t}\n\tvar ret = {};\n\tret[webpackQueues] = x => {};\n\tret[webpackExports] = dep;\n\treturn ret;\n}));\n__webpack_require__.a = (module, body, hasAwait) => {\n\tvar queue;\n\thasAwait && ((queue = []).d = -1);\n\tvar depQueues = new Set();\n\tvar exports = module.exports;\n\tvar currentDeps;\n\tvar outerResolve;\n\tvar reject;\n\tvar promise = new Promise((resolve, rej) => {\n\t\treject = rej;\n\t\touterResolve = resolve;\n\t});\n\tpromise[webpackExports] = exports;\n\tpromise[webpackQueues] = (fn) => (queue && fn(queue), depQueues.forEach(fn), promise[\"catch\"](x => {}));\n\tmodule.exports = promise;\n\tbody((deps) => {\n\t\tcurrentDeps = wrapDeps(deps);\n\t\tvar fn;\n\t\tvar getResult = () => (currentDeps.map((d) => {\n\t\t\tif(d[webpackError]) throw d[webpackError];\n\t\t\treturn d[webpackExports];\n\t\t}))\n\t\tvar promise = new Promise((resolve) => {\n\t\t\tfn = () => (resolve(getResult));\n\t\t\tfn.r = 0;\n\t\t\tvar fnQueue = (q) => (q !== queue && !depQueues.has(q) && (depQueues.add(q), q && !q.d && (fn.r++, q.push(fn))));\n\t\t\tcurrentDeps.map((dep) => (dep[webpackQueues](fnQueue)));\n\t\t});\n\t\treturn fn.r ? promise : getResult();\n\t}, (err) => ((err ? reject(promise[webpackError] = err) : outerResolve(exports)), resolveQueue(queue)));\n\tqueue && queue.d < 0 && (queue.d = 0);\n};","var deferred = [];\n__webpack_require__.O = (result, chunkIds, fn, priority) => {\n\tif(chunkIds) {\n\t\tpriority = priority || 0;\n\t\tfor(var i = deferred.length; i > 0 && deferred[i - 1][2] > priority; i--) deferred[i] = deferred[i - 1];\n\t\tdeferred[i] = [chunkIds, fn, priority];\n\t\treturn;\n\t}\n\tvar notFulfilled = Infinity;\n\tfor (var i = 0; i < deferred.length; i++) {\n\t\tvar [chunkIds, fn, priority] = deferred[i];\n\t\tvar fulfilled = true;\n\t\tfor (var j = 0; j < chunkIds.length; j++) {\n\t\t\tif ((priority & 1 === 0 || notFulfilled >= priority) && Object.keys(__webpack_require__.O).every((key) => (__webpack_require__.O[key](chunkIds[j])))) {\n\t\t\t\tchunkIds.splice(j--, 1);\n\t\t\t} else {\n\t\t\t\tfulfilled = false;\n\t\t\t\tif(priority < notFulfilled) notFulfilled = priority;\n\t\t\t}\n\t\t}\n\t\tif(fulfilled) {\n\t\t\tdeferred.splice(i--, 1)\n\t\t\tvar r = fn();\n\t\t\tif (r !== undefined) result = r;\n\t\t}\n\t}\n\treturn result;\n};","var next = __webpack_require__.x;\n__webpack_require__.x = () => {\n\treturn Promise.all([\n\t\t__webpack_require__.e(907),\n\t\t__webpack_require__.e(877)\n\t]).then(next);\n};","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n// expose the modules object (__webpack_modules__)\n__webpack_require__.m = __webpack_modules__;\n\n// the startup function\n__webpack_require__.x = () => {\n\t// Load entry module and return exports\n\t// This entry module depends on other loaded chunks and execution need to be delayed\n\tvar __webpack_exports__ = __webpack_require__.O(undefined, [907,877], () => (__webpack_require__(341)))\n\t__webpack_exports__ = __webpack_require__.O(__webpack_exports__);\n\treturn __webpack_exports__;\n};\n\n","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.f = {};\n// This file contains only the entry chunk.\n// The chunk loading function for additional chunks\n__webpack_require__.e = (chunkId) => {\n\treturn Promise.all(Object.keys(__webpack_require__.f).reduce((promises, key) => {\n\t\t__webpack_require__.f[key](chunkId, promises);\n\t\treturn promises;\n\t}, []));\n};","// This function allow to reference async chunks and sibling chunks for the entrypoint\n__webpack_require__.u = (chunkId) => {\n\t// return url for filenames based on template\n\treturn \"\" + chunkId + \".bundle.js\";\n};","__webpack_require__.g = (function() {\n\tif (typeof globalThis === 'object') return globalThis;\n\ttry {\n\t\treturn this || new Function('return this')();\n\t} catch (e) {\n\t\tif (typeof window === 'object') return window;\n\t}\n})();","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","var scriptUrl;\nif (__webpack_require__.g.importScripts) scriptUrl = __webpack_require__.g.location + \"\";\nvar document = __webpack_require__.g.document;\nif (!scriptUrl && document) {\n\tif (document.currentScript)\n\t\tscriptUrl = document.currentScript.src;\n\tif (!scriptUrl) {\n\t\tvar scripts = document.getElementsByTagName(\"script\");\n\t\tif(scripts.length) {\n\t\t\tvar i = scripts.length - 1;\n\t\t\twhile (i > -1 && (!scriptUrl || !/^http(s?):/.test(scriptUrl))) scriptUrl = scripts[i--].src;\n\t\t}\n\t}\n}\n// When supporting browsers where an automatic publicPath is not supported you must specify an output.publicPath manually via configuration\n// or pass an empty string (\"\") and set the __webpack_public_path__ variable from your code to use your own logic.\nif (!scriptUrl) throw new Error(\"Automatic publicPath is not supported in this browser\");\nscriptUrl = scriptUrl.replace(/#.*$/, \"\").replace(/\\?.*$/, \"\").replace(/\\/[^\\/]+$/, \"/\");\n__webpack_require__.p = scriptUrl;","__webpack_require__.b = self.location + \"\";\n\n// object to store loaded chunks\n// \"1\" means \"already loaded\"\nvar installedChunks = {\n\t587: 1\n};\n\n// importScripts chunk loading\nvar installChunk = (data) => {\n\tvar [chunkIds, moreModules, runtime] = data;\n\tfor(var moduleId in moreModules) {\n\t\tif(__webpack_require__.o(moreModules, moduleId)) {\n\t\t\t__webpack_require__.m[moduleId] = moreModules[moduleId];\n\t\t}\n\t}\n\tif(runtime) runtime(__webpack_require__);\n\twhile(chunkIds.length)\n\t\tinstalledChunks[chunkIds.pop()] = 1;\n\tparentChunkLoadingFunction(data);\n};\n__webpack_require__.f.i = (chunkId, promises) => {\n\t// \"1\" is the signal for \"already loaded\"\n\tif(!installedChunks[chunkId]) {\n\t\tif(true) { // all chunks have JS\n\t\t\timportScripts(__webpack_require__.p + __webpack_require__.u(chunkId));\n\t\t}\n\t}\n};\n\nvar chunkLoadingGlobal = self[\"webpackChunkaleo_website\"] = self[\"webpackChunkaleo_website\"] || [];\nvar parentChunkLoadingFunction = chunkLoadingGlobal.push.bind(chunkLoadingGlobal);\nchunkLoadingGlobal.push = installChunk;\n\n// no HMR\n\n// no HMR manifest","// run startup\nvar __webpack_exports__ = __webpack_require__.x();\n"],"names":["webpackQueues","webpackExports","webpackError","resolveQueue","deferred","next","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","undefined","exports","module","__webpack_modules__","m","x","__webpack_exports__","O","Symbol","queue","d","forEach","fn","r","a","body","hasAwait","currentDeps","outerResolve","reject","depQueues","Set","promise","Promise","resolve","rej","deps","map","dep","then","obj","e","ret","wrapDeps","getResult","fnQueue","q","has","add","push","err","result","chunkIds","priority","notFulfilled","Infinity","i","length","fulfilled","j","Object","keys","every","key","splice","definition","o","defineProperty","enumerable","get","f","chunkId","all","reduce","promises","u","g","globalThis","this","Function","window","prop","prototype","hasOwnProperty","call","scriptUrl","importScripts","location","document","currentScript","src","scripts","getElementsByTagName","test","Error","replace","p","b","self","installedChunks","chunkLoadingGlobal","parentChunkLoadingFunction","bind","data","moreModules","runtime","pop"],"sourceRoot":""} \ No newline at end of file diff --git a/63.bundle.js b/63.bundle.js deleted file mode 100644 index c2eb763a6..000000000 --- a/63.bundle.js +++ /dev/null @@ -1,2 +0,0 @@ -(()=>{var r,e,t,o,a,n,i={},p={};function c(r){var e=p[r];if(void 0!==e)return e.exports;var t=p[r]={exports:{}};return i[r](t,t.exports,c),t.exports}c.m=i,c.x=()=>{var r=c.O(void 0,[495,877,66],(()=>c(66)));return r=c.O(r)},r="function"==typeof Symbol?Symbol("webpack queues"):"__webpack_queues__",e="function"==typeof Symbol?Symbol("webpack exports"):"__webpack_exports__",t="function"==typeof Symbol?Symbol("webpack error"):"__webpack_error__",o=r=>{r&&r.d<1&&(r.d=1,r.forEach((r=>r.r--)),r.forEach((r=>r.r--?r.r++:r())))},c.a=(a,n,i)=>{var p;i&&((p=[]).d=-1);var c,s,f,l=new Set,u=a.exports,b=new Promise(((r,e)=>{f=e,s=r}));b[e]=u,b[r]=r=>(p&&r(p),l.forEach(r),b.catch((r=>{}))),a.exports=b,n((a=>{var n;c=(a=>a.map((a=>{if(null!==a&&"object"==typeof a){if(a[r])return a;if(a.then){var n=[];n.d=0,a.then((r=>{i[e]=r,o(n)}),(r=>{i[t]=r,o(n)}));var i={};return i[r]=r=>r(n),i}}var p={};return p[r]=r=>{},p[e]=a,p})))(a);var i=()=>c.map((r=>{if(r[t])throw r[t];return r[e]})),s=new Promise((e=>{(n=()=>e(i)).r=0;var t=r=>r!==p&&!l.has(r)&&(l.add(r),r&&!r.d&&(n.r++,r.push(n)));c.map((e=>e[r](t)))}));return n.r?s:i()}),(r=>(r?f(b[t]=r):s(u),o(p)))),p&&p.d<0&&(p.d=0)},a=[],c.O=(r,e,t,o)=>{if(!e){var n=1/0;for(f=0;f=o)&&Object.keys(c.O).every((r=>c.O[r](e[p])))?e.splice(p--,1):(i=!1,o0&&a[f-1][2]>o;f--)a[f]=a[f-1];a[f]=[e,t,o]},c.d=(r,e)=>{for(var t in e)c.o(e,t)&&!c.o(r,t)&&Object.defineProperty(r,t,{enumerable:!0,get:e[t]})},c.f={},c.e=r=>Promise.all(Object.keys(c.f).reduce(((e,t)=>(c.f[t](r,e),e)),[])),c.u=r=>r+".bundle.js",c.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(r){if("object"==typeof window)return window}}(),c.o=(r,e)=>Object.prototype.hasOwnProperty.call(r,e),(()=>{var r;c.g.importScripts&&(r=c.g.location+"");var e=c.g.document;if(!r&&e&&(e.currentScript&&(r=e.currentScript.src),!r)){var t=e.getElementsByTagName("script");if(t.length)for(var o=t.length-1;o>-1&&(!r||!/^http(s?):/.test(r));)r=t[o--].src}if(!r)throw new Error("Automatic publicPath is not supported in this browser");r=r.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),c.p=r})(),(()=>{c.b=self.location+"";var r={63:1};c.f.i=(e,t)=>{r[e]||importScripts(c.p+c.u(e))};var e=self.webpackChunkaleo_website=self.webpackChunkaleo_website||[],t=e.push.bind(e);e.push=e=>{var[o,a,n]=e;for(var i in a)c.o(a,i)&&(c.m[i]=a[i]);for(n&&n(c);o.length;)r[o.pop()]=1;t(e)}})(),n=c.x,c.x=()=>Promise.all([495,877,66].map(c.e,c)).then(n);c.x()})(); -//# sourceMappingURL=63.bundle.js.map \ No newline at end of file diff --git a/63.bundle.js.map b/63.bundle.js.map deleted file mode 100644 index 124deca87..000000000 --- a/63.bundle.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"63.bundle.js","mappings":"UAAIA,EACAC,EACAC,EACAC,ECHAC,ECAAC,E,KCCAC,EAA2B,CAAC,EAGhC,SAASC,EAAoBC,GAE5B,IAAIC,E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://aleo-website/webpack/runtime/startup chunk dependencies","webpack://aleo-website/webpack/bootstrap","webpack://aleo-website/webpack/runtime/define property getters","webpack://aleo-website/webpack/runtime/ensure chunk","webpack://aleo-website/webpack/runtime/get javascript chunk filename","webpack://aleo-website/webpack/runtime/global","webpack://aleo-website/webpack/runtime/hasOwnProperty shorthand","webpack://aleo-website/webpack/runtime/publicPath","webpack://aleo-website/webpack/runtime/importScripts chunk loading","webpack://aleo-website/webpack/startup"],"sourcesContent":["var webpackQueues = typeof Symbol === \"function\" ? Symbol(\"webpack queues\") : \"__webpack_queues__\";\nvar webpackExports = typeof Symbol === \"function\" ? Symbol(\"webpack exports\") : \"__webpack_exports__\";\nvar webpackError = typeof Symbol === \"function\" ? Symbol(\"webpack error\") : \"__webpack_error__\";\nvar resolveQueue = (queue) => {\n\tif(queue && queue.d < 1) {\n\t\tqueue.d = 1;\n\t\tqueue.forEach((fn) => (fn.r--));\n\t\tqueue.forEach((fn) => (fn.r-- ? fn.r++ : fn()));\n\t}\n}\nvar wrapDeps = (deps) => (deps.map((dep) => {\n\tif(dep !== null && typeof dep === \"object\") {\n\t\tif(dep[webpackQueues]) return dep;\n\t\tif(dep.then) {\n\t\t\tvar queue = [];\n\t\t\tqueue.d = 0;\n\t\t\tdep.then((r) => {\n\t\t\t\tobj[webpackExports] = r;\n\t\t\t\tresolveQueue(queue);\n\t\t\t}, (e) => {\n\t\t\t\tobj[webpackError] = e;\n\t\t\t\tresolveQueue(queue);\n\t\t\t});\n\t\t\tvar obj = {};\n\t\t\tobj[webpackQueues] = (fn) => (fn(queue));\n\t\t\treturn obj;\n\t\t}\n\t}\n\tvar ret = {};\n\tret[webpackQueues] = x => {};\n\tret[webpackExports] = dep;\n\treturn ret;\n}));\n__webpack_require__.a = (module, body, hasAwait) => {\n\tvar queue;\n\thasAwait && ((queue = []).d = -1);\n\tvar depQueues = new Set();\n\tvar exports = module.exports;\n\tvar currentDeps;\n\tvar outerResolve;\n\tvar reject;\n\tvar promise = new Promise((resolve, rej) => {\n\t\treject = rej;\n\t\touterResolve = resolve;\n\t});\n\tpromise[webpackExports] = exports;\n\tpromise[webpackQueues] = (fn) => (queue && fn(queue), depQueues.forEach(fn), promise[\"catch\"](x => {}));\n\tmodule.exports = promise;\n\tbody((deps) => {\n\t\tcurrentDeps = wrapDeps(deps);\n\t\tvar fn;\n\t\tvar getResult = () => (currentDeps.map((d) => {\n\t\t\tif(d[webpackError]) throw d[webpackError];\n\t\t\treturn d[webpackExports];\n\t\t}))\n\t\tvar promise = new Promise((resolve) => {\n\t\t\tfn = () => (resolve(getResult));\n\t\t\tfn.r = 0;\n\t\t\tvar fnQueue = (q) => (q !== queue && !depQueues.has(q) && (depQueues.add(q), q && !q.d && (fn.r++, q.push(fn))));\n\t\t\tcurrentDeps.map((dep) => (dep[webpackQueues](fnQueue)));\n\t\t});\n\t\treturn fn.r ? promise : getResult();\n\t}, (err) => ((err ? reject(promise[webpackError] = err) : outerResolve(exports)), resolveQueue(queue)));\n\tqueue && queue.d < 0 && (queue.d = 0);\n};","var deferred = [];\n__webpack_require__.O = (result, chunkIds, fn, priority) => {\n\tif(chunkIds) {\n\t\tpriority = priority || 0;\n\t\tfor(var i = deferred.length; i > 0 && deferred[i - 1][2] > priority; i--) deferred[i] = deferred[i - 1];\n\t\tdeferred[i] = [chunkIds, fn, priority];\n\t\treturn;\n\t}\n\tvar notFulfilled = Infinity;\n\tfor (var i = 0; i < deferred.length; i++) {\n\t\tvar [chunkIds, fn, priority] = deferred[i];\n\t\tvar fulfilled = true;\n\t\tfor (var j = 0; j < chunkIds.length; j++) {\n\t\t\tif ((priority & 1 === 0 || notFulfilled >= priority) && Object.keys(__webpack_require__.O).every((key) => (__webpack_require__.O[key](chunkIds[j])))) {\n\t\t\t\tchunkIds.splice(j--, 1);\n\t\t\t} else {\n\t\t\t\tfulfilled = false;\n\t\t\t\tif(priority < notFulfilled) notFulfilled = priority;\n\t\t\t}\n\t\t}\n\t\tif(fulfilled) {\n\t\t\tdeferred.splice(i--, 1)\n\t\t\tvar r = fn();\n\t\t\tif (r !== undefined) result = r;\n\t\t}\n\t}\n\treturn result;\n};","var next = __webpack_require__.x;\n__webpack_require__.x = () => {\n\treturn Promise.all([495,877,66].map(__webpack_require__.e, __webpack_require__)).then(next);\n};","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n// expose the modules object (__webpack_modules__)\n__webpack_require__.m = __webpack_modules__;\n\n// the startup function\n__webpack_require__.x = () => {\n\t// Load entry module and return exports\n\t// This entry module depends on other loaded chunks and execution need to be delayed\n\tvar __webpack_exports__ = __webpack_require__.O(undefined, [495,877,66], () => (__webpack_require__(66)))\n\t__webpack_exports__ = __webpack_require__.O(__webpack_exports__);\n\treturn __webpack_exports__;\n};\n\n","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.f = {};\n// This file contains only the entry chunk.\n// The chunk loading function for additional chunks\n__webpack_require__.e = (chunkId) => {\n\treturn Promise.all(Object.keys(__webpack_require__.f).reduce((promises, key) => {\n\t\t__webpack_require__.f[key](chunkId, promises);\n\t\treturn promises;\n\t}, []));\n};","// This function allow to reference async chunks and sibling chunks for the entrypoint\n__webpack_require__.u = (chunkId) => {\n\t// return url for filenames based on template\n\treturn \"\" + chunkId + \".bundle.js\";\n};","__webpack_require__.g = (function() {\n\tif (typeof globalThis === 'object') return globalThis;\n\ttry {\n\t\treturn this || new Function('return this')();\n\t} catch (e) {\n\t\tif (typeof window === 'object') return window;\n\t}\n})();","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","var scriptUrl;\nif (__webpack_require__.g.importScripts) scriptUrl = __webpack_require__.g.location + \"\";\nvar document = __webpack_require__.g.document;\nif (!scriptUrl && document) {\n\tif (document.currentScript)\n\t\tscriptUrl = document.currentScript.src;\n\tif (!scriptUrl) {\n\t\tvar scripts = document.getElementsByTagName(\"script\");\n\t\tif(scripts.length) {\n\t\t\tvar i = scripts.length - 1;\n\t\t\twhile (i > -1 && (!scriptUrl || !/^http(s?):/.test(scriptUrl))) scriptUrl = scripts[i--].src;\n\t\t}\n\t}\n}\n// When supporting browsers where an automatic publicPath is not supported you must specify an output.publicPath manually via configuration\n// or pass an empty string (\"\") and set the __webpack_public_path__ variable from your code to use your own logic.\nif (!scriptUrl) throw new Error(\"Automatic publicPath is not supported in this browser\");\nscriptUrl = scriptUrl.replace(/#.*$/, \"\").replace(/\\?.*$/, \"\").replace(/\\/[^\\/]+$/, \"/\");\n__webpack_require__.p = scriptUrl;","__webpack_require__.b = self.location + \"\";\n\n// object to store loaded chunks\n// \"1\" means \"already loaded\"\nvar installedChunks = {\n\t63: 1\n};\n\n// importScripts chunk loading\nvar installChunk = (data) => {\n\tvar [chunkIds, moreModules, runtime] = data;\n\tfor(var moduleId in moreModules) {\n\t\tif(__webpack_require__.o(moreModules, moduleId)) {\n\t\t\t__webpack_require__.m[moduleId] = moreModules[moduleId];\n\t\t}\n\t}\n\tif(runtime) runtime(__webpack_require__);\n\twhile(chunkIds.length)\n\t\tinstalledChunks[chunkIds.pop()] = 1;\n\tparentChunkLoadingFunction(data);\n};\n__webpack_require__.f.i = (chunkId, promises) => {\n\t// \"1\" is the signal for \"already loaded\"\n\tif(!installedChunks[chunkId]) {\n\t\tif(true) { // all chunks have JS\n\t\t\timportScripts(__webpack_require__.p + __webpack_require__.u(chunkId));\n\t\t}\n\t}\n};\n\nvar chunkLoadingGlobal = self[\"webpackChunkaleo_website\"] = self[\"webpackChunkaleo_website\"] || [];\nvar parentChunkLoadingFunction = chunkLoadingGlobal.push.bind(chunkLoadingGlobal);\nchunkLoadingGlobal.push = installChunk;\n\n// no HMR\n\n// no HMR manifest","// run startup\nvar __webpack_exports__ = __webpack_require__.x();\n"],"names":["webpackQueues","webpackExports","webpackError","resolveQueue","deferred","next","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","undefined","exports","module","__webpack_modules__","m","x","__webpack_exports__","O","Symbol","queue","d","forEach","fn","r","a","body","hasAwait","currentDeps","outerResolve","reject","depQueues","Set","promise","Promise","resolve","rej","deps","map","dep","then","obj","e","ret","wrapDeps","getResult","fnQueue","q","has","add","push","err","result","chunkIds","priority","notFulfilled","Infinity","i","length","fulfilled","j","Object","keys","every","key","splice","definition","o","defineProperty","enumerable","get","f","chunkId","all","reduce","promises","u","g","globalThis","this","Function","window","prop","prototype","hasOwnProperty","call","scriptUrl","importScripts","location","document","currentScript","src","scripts","getElementsByTagName","test","Error","replace","p","b","self","installedChunks","chunkLoadingGlobal","parentChunkLoadingFunction","bind","data","moreModules","runtime","pop"],"sourceRoot":""} \ No newline at end of file diff --git a/66.bundle.js b/66.bundle.js deleted file mode 100644 index e8643a8d9..000000000 --- a/66.bundle.js +++ /dev/null @@ -1,3 +0,0 @@ -/*! For license information please see 66.bundle.js.LICENSE.txt */ -(self.webpackChunkaleo_website=self.webpackChunkaleo_website||[]).push([[66],{66:(e,t,r)=>{r.a(e,(async(e,t)=>{try{var n=r(495),o=e([n]);function u(e){return u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},u(e)}function l(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function f(e,t){if(e){if("string"==typeof e)return p(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?p(e,t):void 0}}function p(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r=0;--a){var c=this.tryEntries[a],i=c.completion;if("root"===c.tryLoc)return o("end");if(c.tryLoc<=this.prev){var s=n.call(c,"catchLoc"),u=n.call(c,"finallyLoc");if(s&&u){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),S(r),d}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;S(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:N(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),d}},t}function g(e,t,r,n,o,a,c){try{var i=e[a](c),s=i.value}catch(e){return void r(e)}i.done?t(s):Promise.resolve(s).then(n,o)}function m(e){return function(){var t=this,r=arguments;return new Promise((function(n,o){var a=e.apply(t,r);function c(e){g(a,n,o,c,i,"next",e)}function i(e){g(a,n,o,c,i,"throw",e)}c(void 0)}))}}n=(o.then?(await o)():o)[0],await n.initThreadPool();var a="https://api.explorer.aleo.org/v1",c=new n.AleoKeyProvider,i=new n.ProgramManager(a,c,void 0);c.useCache(!0),self.postMessage({type:"ALEO_WORKER_READY"});var s=null;self.addEventListener("message",(function(e){if("ALEO_EXECUTE_PROGRAM_LOCAL"===e.data.type){var t=e.data,r=t.localProgram,o=t.aleoFunction,u=t.inputs,p=t.privateKey;console.log("Web worker: Executing function locally...");var g=performance.now();m(v().mark((function e(){var t,a,l,f,y,h,m,d,w,E;return v().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,t=n.PrivateKey.from_string(p),a=i.createProgramFromSource(r),l=a.id(),a.hasFunction(o)){e.next=6;break}throw"Program ".concat(l," does not contain function ").concat(o);case 6:if(f="".concat(l,":").concat(o),y=i.networkClient.getProgramImports(r),s===r){e.next=14;break}return e.next=11,i.synthesizeKeys(r,o,u,t);case 11:h=e.sent,i.keyProvider.cacheKeys(f,h),s=r;case 14:return m=new n.AleoKeyProviderParams({cacheKey:f}),e.next=17,i.run(r,o,u,!1,y,m,void 0,void 0,t,void 0);case 17:d=e.sent,console.log("Web worker: Local execution completed in ".concat(performance.now()-g," ms")),w=d.getOutputs(),(E=d.getExecution())?(n.verifyFunctionExecution(E,c.getKeys(f)[1],a,"hello"),E=E.toString(),console.log("Execution verified successfully: "+E)):E="",console.log("Function execution response: ".concat(w)),self.postMessage({type:"OFFLINE_EXECUTION_COMPLETED",outputs:{outputs:w,execution:E}}),e.next=30;break;case 26:e.prev=26,e.t0=e.catch(0),console.error(e.t0),self.postMessage({type:"ERROR",errorMessage:e.t0.toString()});case 30:case"end":return e.stop()}}),e,null,[[0,26]])})))()}else if("ALEO_EXECUTE_PROGRAM_ON_CHAIN"===e.data.type){var d=e.data,w=d.remoteProgram,E=d.aleoFunction,b=d.inputs,x=d.privateKey,k=d.fee,O=d.privateFee,P=d.feeRecord,_=d.url;console.log("Web worker: Creating execution...");var L=performance.now();m(v().mark((function e(){var t,r,o,c,s,u,l;return v().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,t=n.PrivateKey.from_string(x),e.next=4,i.networkClient.getProgramObject(w);case 4:if(r=e.sent,o=r.id(),r.hasFunction(E)){e.next=8;break}throw"Program ".concat(o," does not contain function ").concat(E);case 8:if(c="".concat(o,":").concat(E),i.keyProvider.containsKeys(c)){e.next=15;break}return console.log("Web worker: Synthesizing proving & verifying keys for: '".concat(o,":").concat(E,"'")),e.next=13,i.synthesizeKeys(w,E,b,t);case 13:s=e.sent,i.keyProvider.cacheKeys(c,s);case 15:return u=new n.AleoKeyProviderParams({cacheKey:c}),"string"==typeof _&&i.setHost(_),e.next=19,i.execute({programName:o,functionName:E,fee:k,privateFee:O,inputs:b,keySearchParams:u,feeRecord:P,privateKey:t});case 19:l=e.sent,console.log("Web worker: On-chain execution transaction created in ".concat(performance.now()-L," ms")),self.postMessage({type:"EXECUTION_TRANSACTION_COMPLETED",executeTransaction:l}),e.next=28;break;case 24:e.prev=24,e.t0=e.catch(0),console.error("Error creating execution transaction: ".concat(e.t0)),self.postMessage({type:"ERROR",errorMessage:e.t0.toString()});case 28:return e.prev=28,i.setHost(a),e.finish(28);case 31:case"end":return e.stop()}}),e,null,[[0,24,28,31]])})))()}else if("ALEO_ESTIMATE_EXECUTION_FEE"===e.data.type){var T=e.data,R=T.remoteProgram,M=T.privateKey,S=T.aleoFunction,A=T.inputs,N=T.url;console.log("Web worker: Estimating execution fee...");var C=performance.now();m(v().mark((function e(){var t,r,o,a,c,s,u,p,g,m,d;return v().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,t=n.PrivateKey.from_string(M),e.next=4,i.networkClient.getProgramObject(R);case 4:if(r=e.sent,o=r.id(),r.getFunctions().includes(S)){e.next=8;break}throw"Program ".concat(o," does not contain function ").concat(S);case 8:return a="".concat(o,":").concat(S),e.next=11,i.networkClient.getProgramImports(R);case 11:if(c=e.sent,i.keyProvider.containsKeys(a)){e.next=18;break}return console.log("Web worker: Synthesizing proving & verifying keys for: '".concat(o,":").concat(S,"'")),e.next=16,i.synthesizeKeys(r.toString(),S,A,t);case 16:s=e.sent,i.keyProvider.cacheKeys(a,s);case 18:return u=i.keyProvider.getKeys(a),w=2,p=h(v=u)||y(v,w)||f(v,w)||l(),g=p[0],m=p[1],e.next=21,n.ProgramManagerBase.estimateExecutionFee(t,R,S,A,N,c,g,m,void 0);case 21:d=e.sent,console.log("Web worker: Execution fee estimated in ".concat(performance.now()-C," ms")),console.log("Execution Fee Estimation: ".concat(d," microcredits")),self.postMessage({type:"EXECUTION_FEE_ESTIMATION_COMPLETED",executionFee:Number(d)/1e6+.01}),e.next=31;break;case 27:e.prev=27,e.t0=e.catch(0),console.error(e.t0),self.postMessage({type:"ERROR",errorMessage:e.t0.toString()});case 31:case"end":return e.stop()}var v,w}),e,null,[[0,27]])})))()}else if("ALEO_ESTIMATE_DEPLOYMENT_FEE"===e.data.type){var F=e.data,K=F.program;F.url;console.log("Web worker: Estimating deployment fee...");var I=performance.now();m(v().mark((function e(){var t,r;return v().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,i.networkClient.getProgramImports(K);case 3:return t=e.sent,console.log("Estimating deployment fee.."),e.next=7,n.ProgramManagerBase.estimateDeploymentFee(K,t);case 7:r=e.sent,console.log("Web worker: Deployment fee estimation completed in ".concat(performance.now()-I," ms")),console.log("Deployment Fee Estimation: ".concat(r," microcredits")),self.postMessage({type:"DEPLOYMENT_FEE_ESTIMATION_COMPLETED",deploymentFee:Number(r)/1e6+.01}),e.next=17;break;case 13:e.prev=13,e.t0=e.catch(0),console.error(e.t0),self.postMessage({type:"ERROR",errorMessage:e.t0.toString()});case 17:case"end":return e.stop()}}),e,null,[[0,13]])})))()}else if("ALEO_TRANSFER"===e.data.type){var j=e.data,W=j.privateKey,D=j.amountCredits,H=j.recipient,G=j.transfer_type,U=j.amountRecord,Y=j.fee,X=j.privateFee,z=j.feeRecord,J=j.url;console.log("Web worker: Creating transfer of type ".concat(G,"..."));var B=performance.now();m(v().mark((function e(){var t;return v().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,"string"==typeof J&&i.setHost(J),e.next=4,i.transfer(D,H,G,Y,X,void 0,U,z,n.PrivateKey.from_string(W),void 0);case 4:t=e.sent,console.log("Web worker: Transfer transaction ".concat(t," created in ").concat(performance.now()-B," ms")),self.postMessage({type:"TRANSFER_TRANSACTION_COMPLETED",transferTransaction:t}),e.next=13;break;case 9:e.prev=9,e.t0=e.catch(0),console.error(e.t0),self.postMessage({type:"ERROR",errorMessage:e.t0.toString()});case 13:return e.prev=13,i.setHost(a),e.finish(13);case 16:case"end":return e.stop()}}),e,null,[[0,9,13,16]])})))()}else if("ALEO_DEPLOY"===e.data.type){var $=e.data,q=$.program,Q=$.privateKey,V=$.fee,Z=$.privateFee,ee=$.feeRecord,te=$.url;console.log("Web worker: Creating deployment...");var re=performance.now();m(v().mark((function e(){var t,r,o;return v().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,"string"==typeof te&&i.setHost(te),t=i.createProgramFromSource(q),r=!1,e.prev=4,e.next=7,i.networkClient.getProgram(t.id());case 7:r=!0,e.next=13;break;case 10:e.prev=10,e.t0=e.catch(4),console.log("Program not found on the Aleo Network - proceeding with deployment...");case 13:if(!r){e.next=15;break}throw"Program ".concat(t.id()," already exists on the network");case 15:return console.log("fee is: ",V),e.next=18,i.deploy(q,V,Z,void 0,ee,n.PrivateKey.from_string(Q));case 18:o=e.sent,console.log("Web worker: Deployment transaction ".concat(o," created in ").concat(performance.now()-re," ms")),self.postMessage({type:"DEPLOY_TRANSACTION_COMPLETED",deployTransaction:o}),e.next=27;break;case 23:e.prev=23,e.t1=e.catch(0),console.log(e.t1),self.postMessage({type:"ERROR",errorMessage:e.t1.toString()});case 27:return e.prev=27,i.setHost(a),e.finish(27);case 30:case"end":return e.stop()}}),e,null,[[0,23,27,30],[4,10]])})))()}else if("ALEO_SPLIT"===e.data.type){var ne=e.data,oe=ne.splitAmount,ae=ne.record,ce=ne.privateKey,ie=ne.url;console.log("Web worker: Creating split...");var se=performance.now();m(v().mark((function e(){var t;return v().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,"string"==typeof ie&&i.setHost(ie),e.next=4,i.split(oe,ae,n.PrivateKey.from_string(ce),void 0);case 4:t=e.sent,console.log("Web worker: Split transaction ".concat(t," created in ").concat(performance.now()-se," ms")),self.postMessage({type:"SPLIT_TRANSACTION_COMPLETED",splitTransaction:t}),e.next=13;break;case 9:e.prev=9,e.t0=e.catch(0),console.log(e.t0),self.postMessage({type:"ERROR",errorMessage:e.t0.toString()});case 13:return e.prev=13,i.setHost(a),e.finish(13);case 16:case"end":return e.stop()}}),e,null,[[0,9,13,16]])})))()}else if("ALEO_JOIN"===e.data.type){var ue=e.data,le=ue.recordOne,fe=ue.recordTwo,pe=ue.fee,ye=ue.privateFee,he=ue.feeRecord,ve=ue.privateKey,ge=ue.url;console.log("Web worker: Creating join...");var me=performance.now();m(v().mark((function e(){var t;return v().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,"string"==typeof ge&&i.setHost(ge),e.next=4,i.join(le,fe,pe,ye,void 0,he,n.PrivateKey.from_string(ve),void 0);case 4:t=e.sent,console.log("Web worker: Join transaction ".concat(t," created in ").concat(performance.now()-me," ms")),self.postMessage({type:"JOIN_TRANSACTION_COMPLETED",joinTransaction:t}),e.next=13;break;case 9:e.prev=9,e.t0=e.catch(0),console.log(e.t0),self.postMessage({type:"ERROR",errorMessage:e.t0.toString()});case 13:return e.prev=13,i.setHost(a),e.finish(13);case 16:case"end":return e.stop()}}),e,null,[[0,9,13,16]])})))()}})),t()}catch(d){t(d)}}),1)}}]); -//# sourceMappingURL=66.bundle.js.map \ No newline at end of file diff --git a/66.bundle.js.LICENSE.txt b/66.bundle.js.LICENSE.txt deleted file mode 100644 index ae386fb79..000000000 --- a/66.bundle.js.LICENSE.txt +++ /dev/null @@ -1 +0,0 @@ -/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ diff --git a/66.bundle.js.map b/66.bundle.js.map deleted file mode 100644 index 9650655c8..000000000 --- a/66.bundle.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"66.bundle.js","mappings":";u1CACAA,EAAA,kBAAAC,CAAA,MAAAC,EAAAD,EAAA,GA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kB,EAAe0D,QAAQ5D,GAAaiH,EAAA1H,OAAA,6BAAA0H,EAAA9H,OAAA,GAAA6H,EAAA,uBA/B5CtH,EAkCJ,CACJ","sources":["webpack://aleo-website/./src/workers/worker.js"],"sourcesContent":["import * as aleo from \"@provablehq/sdk\";\n\nawait aleo.initThreadPool();\n\nconst defaultHost = \"https://api.explorer.aleo.org/v1\";\nconst keyProvider = new aleo.AleoKeyProvider();\nconst programManager = new aleo.ProgramManager(defaultHost, keyProvider, undefined);\nkeyProvider.useCache(true);\n\nself.postMessage({\n type: \"ALEO_WORKER_READY\",\n});\n\nlet lastLocalProgram = null;\nself.addEventListener(\"message\", (ev) => {\n if (ev.data.type === \"ALEO_EXECUTE_PROGRAM_LOCAL\") {\n const { localProgram, aleoFunction, inputs, privateKey } = ev.data;\n\n console.log(\"Web worker: Executing function locally...\");\n let startTime = performance.now();\n\n (async function () {\n try {\n const privateKeyObject = aleo.PrivateKey.from_string(privateKey);\n // Ensure the program is valid and that it contains the function specified\n const program = programManager.createProgramFromSource(localProgram);\n const program_id = program.id();\n if (!program.hasFunction(aleoFunction)) {\n throw `Program ${program_id} does not contain function ${aleoFunction}`;\n }\n const cacheKey = `${program_id}:${aleoFunction}`;\n\n // Get the program imports\n const imports = programManager.networkClient.getProgramImports(localProgram);\n\n // Get the proving and verifying keys for the function\n if (lastLocalProgram !== localProgram) {\n const keys = await programManager.synthesizeKeys(localProgram, aleoFunction, inputs, privateKeyObject);\n programManager.keyProvider.cacheKeys(cacheKey, keys);\n lastLocalProgram = localProgram;\n }\n\n // Pass the cache key to the execute function\n const keyParams = new aleo.AleoKeyProviderParams({\"cacheKey\": cacheKey});\n\n // Execute the function locally\n let response = await programManager.run(\n localProgram,\n aleoFunction,\n inputs,\n false,\n imports,\n keyParams,\n undefined,\n undefined,\n privateKeyObject,\n undefined\n );\n\n // Return the outputs to the main thread\n console.log(`Web worker: Local execution completed in ${performance.now() - startTime} ms`);\n const outputs = response.getOutputs();\n let execution = response.getExecution();\n if (execution) {\n aleo.verifyFunctionExecution(execution, keyProvider.getKeys(cacheKey)[1], program, \"hello\");\n execution = execution.toString();\n console.log(\"Execution verified successfully: \" + execution);\n } else {\n execution = \"\";\n }\n\n console.log(`Function execution response: ${outputs}`);\n self.postMessage({\n type: \"OFFLINE_EXECUTION_COMPLETED\",\n outputs: {outputs: outputs, execution: execution}\n });\n } catch (error) {\n console.error(error);\n self.postMessage({\n type: \"ERROR\",\n errorMessage: error.toString(),\n });\n }\n })();\n } else if (ev.data.type === \"ALEO_EXECUTE_PROGRAM_ON_CHAIN\") {\n const {\n remoteProgram,\n aleoFunction,\n inputs,\n privateKey,\n fee,\n privateFee,\n feeRecord,\n url,\n } = ev.data;\n\n console.log(\"Web worker: Creating execution...\");\n let startTime = performance.now();\n\n (async function () {\n try {\n const privateKeyObject = aleo.PrivateKey.from_string(privateKey)\n // Ensure the program is valid and that it contains the function specified\n const program = await programManager.networkClient.getProgramObject(remoteProgram);\n const program_id = program.id();\n if (!program.hasFunction(aleoFunction)) {\n throw `Program ${program_id} does not contain function ${aleoFunction}`;\n }\n\n // Get the proving and verifying keys for the function\n const cacheKey = `${program_id}:${aleoFunction}`;\n if (!programManager.keyProvider.containsKeys(cacheKey)) {\n console.log(`Web worker: Synthesizing proving & verifying keys for: '${program_id}:${aleoFunction}'`);\n const keys = await programManager.synthesizeKeys(remoteProgram, aleoFunction, inputs, privateKeyObject);\n programManager.keyProvider.cacheKeys(cacheKey, keys);\n }\n\n // Pass the cache key to the execute function\n const keyParams = new aleo.AleoKeyProviderParams({\"cacheKey\": cacheKey})\n\n // Set the host to the provided URL if provided\n if (typeof url === \"string\") { programManager.setHost(url); }\n const transaction = await programManager.execute({\n programName: program_id,\n functionName: aleoFunction,\n fee: fee,\n privateFee: privateFee,\n inputs: inputs,\n keySearchParams: keyParams,\n feeRecord: feeRecord,\n privateKey: privateKeyObject\n });\n\n // Return the transaction id to the main thread\n console.log(`Web worker: On-chain execution transaction created in ${performance.now() - startTime} ms`);\n self.postMessage({\n type: \"EXECUTION_TRANSACTION_COMPLETED\",\n executeTransaction: transaction,\n });\n } catch (error) {\n console.error(`Error creating execution transaction: ${error}`);\n self.postMessage({\n type: \"ERROR\",\n errorMessage: error.toString(),\n });\n } finally {\n programManager.setHost(defaultHost);\n }\n })();\n } else if (ev.data.type === \"ALEO_ESTIMATE_EXECUTION_FEE\") {\n const { remoteProgram, privateKey, aleoFunction, inputs, url } =\n ev.data;\n\n console.log(\"Web worker: Estimating execution fee...\");\n let startTime = performance.now();\n\n (async function () {\n try {\n const privateKeyObject = aleo.PrivateKey.from_string(privateKey);\n // Ensure the program is valid and that it contains the function specified\n const program = await programManager.networkClient.getProgramObject(remoteProgram);\n const program_id = program.id();\n if (!program.getFunctions().includes(aleoFunction)) {\n throw `Program ${program_id} does not contain function ${aleoFunction}`;\n }\n const cacheKey = `${program_id}:${aleoFunction}`;\n const imports = await programManager.networkClient.getProgramImports(remoteProgram);\n\n // Get the proving and verifying keys for the function\n if (!programManager.keyProvider.containsKeys(cacheKey)) {\n console.log(`Web worker: Synthesizing proving & verifying keys for: '${program_id}:${aleoFunction}'`);\n const keys = await programManager.synthesizeKeys(program.toString(), aleoFunction, inputs, privateKeyObject);\n programManager.keyProvider.cacheKeys(cacheKey, keys);\n }\n\n // Estimate the execution fee\n const [provingKey, verifyingKey] = programManager.keyProvider.getKeys(cacheKey);\n let executeFee = await aleo.ProgramManagerBase.estimateExecutionFee(\n privateKeyObject,\n remoteProgram,\n aleoFunction,\n inputs,\n url,\n imports,\n provingKey,\n verifyingKey,\n undefined\n );\n\n // Return the execution fee estimate to the main thread\n console.log(`Web worker: Execution fee estimated in ${performance.now() - startTime} ms`);\n console.log(`Execution Fee Estimation: ${executeFee} microcredits`);\n self.postMessage({\n type: \"EXECUTION_FEE_ESTIMATION_COMPLETED\",\n executionFee: Number(executeFee) / 1000000 + 0.01,\n });\n } catch (error) {\n console.error(error);\n self.postMessage({\n type: \"ERROR\",\n errorMessage: error.toString(),\n });\n }\n })();\n } else if (ev.data.type === \"ALEO_ESTIMATE_DEPLOYMENT_FEE\") {\n const { program, url } = ev.data;\n\n console.log(\"Web worker: Estimating deployment fee...\");\n\n let startTime = performance.now();\n (async function () {\n try {\n const imports = await programManager.networkClient.getProgramImports(program);\n console.log(\"Estimating deployment fee..\");\n let deploymentFee =\n await aleo.ProgramManagerBase.estimateDeploymentFee(\n program,\n imports,\n );\n\n // Return the deployment fee estimate to the main thread\n console.log(`Web worker: Deployment fee estimation completed in ${performance.now() - startTime} ms`);\n console.log(`Deployment Fee Estimation: ${deploymentFee} microcredits`);\n self.postMessage({\n type: \"DEPLOYMENT_FEE_ESTIMATION_COMPLETED\",\n deploymentFee: Number(deploymentFee) / 1000000 + 0.01,\n });\n } catch (error) {\n console.error(error);\n self.postMessage({\n type: \"ERROR\",\n errorMessage: error.toString(),\n });\n }\n })();\n } else if (ev.data.type === \"ALEO_TRANSFER\") {\n const {\n privateKey,\n amountCredits,\n recipient,\n transfer_type,\n amountRecord,\n fee,\n privateFee,\n feeRecord,\n url,\n } = ev.data;\n\n console.log(\n `Web worker: Creating transfer of type ${transfer_type}...`,\n );\n let startTime = performance.now();\n\n (async function () {\n try {\n // Set the host to the provided URL if provided\n if (typeof url === \"string\") { programManager.setHost(url); }\n\n // Create the transfer transaction and submit it to the network\n const transaction = await programManager.transfer(\n amountCredits,\n recipient,\n transfer_type,\n fee,\n privateFee,\n undefined,\n amountRecord,\n feeRecord,\n aleo.PrivateKey.from_string(privateKey),\n undefined\n );\n\n // Return the transaction id to the main thread\n console.log(`Web worker: Transfer transaction ${transaction} created in ${performance.now() - startTime} ms`);\n self.postMessage({\n type: \"TRANSFER_TRANSACTION_COMPLETED\",\n transferTransaction: transaction,\n });\n } catch (error) {\n console.error(error);\n self.postMessage({\n type: \"ERROR\",\n errorMessage: error.toString(),\n });\n } finally {\n programManager.setHost(defaultHost);\n }\n })();\n } else if (ev.data.type === \"ALEO_DEPLOY\") {\n const { program, privateKey, fee, privateFee, feeRecord, url } = ev.data;\n\n console.log(\"Web worker: Creating deployment...\");\n\n let startTime = performance.now();\n (async function () {\n try {\n // Set the network client host if specified\n if (typeof url === \"string\") { programManager.setHost(url); }\n\n // Check if the program is valid\n const programObject = programManager.createProgramFromSource(program);\n\n // Check if the program already exists on the network. If so, throw an error\n let programExists = false;\n try {\n await programManager.networkClient.getProgram(programObject.id());\n programExists = true;\n } catch (e) {\n console.log(\n `Program not found on the Aleo Network - proceeding with deployment...`,\n );\n }\n\n if (programExists) {\n throw `Program ${programObject.id()} already exists on the network`;\n }\n\n console.log(\"fee is: \", fee);\n // Create the deployment transaction and submit it to the network\n let transaction = await programManager.deploy(\n program,\n fee,\n privateFee,\n undefined,\n feeRecord,\n aleo.PrivateKey.from_string(privateKey),\n )\n\n // Return the transaction id to the main thread\n console.log(`Web worker: Deployment transaction ${transaction} created in ${performance.now() - startTime} ms`);\n self.postMessage({\n type: \"DEPLOY_TRANSACTION_COMPLETED\",\n deployTransaction: transaction,\n });\n } catch (error) {\n console.log(error);\n self.postMessage({\n type: \"ERROR\",\n errorMessage: error.toString(),\n });\n } finally {\n programManager.setHost(defaultHost);\n }\n })();\n } else if (ev.data.type === \"ALEO_SPLIT\") {\n const { splitAmount, record, privateKey, url } = ev.data;\n\n console.log(\"Web worker: Creating split...\");\n\n let startTime = performance.now();\n (async function () {\n try {\n // Set the network client host if specified\n if (typeof url === \"string\") { programManager.setHost(url); }\n\n // Create the split transaction and submit to the network\n const transaction = await programManager.split(\n splitAmount,\n record,\n aleo.PrivateKey.from_string(privateKey),\n undefined\n );\n\n // Return the transaction id to the main thread\n console.log(`Web worker: Split transaction ${transaction} created in ${performance.now() - startTime} ms`);\n self.postMessage({\n type: \"SPLIT_TRANSACTION_COMPLETED\",\n splitTransaction: transaction,\n });\n } catch (error) {\n console.log(error);\n self.postMessage({\n type: \"ERROR\",\n errorMessage: error.toString(),\n });\n } finally {\n programManager.setHost(defaultHost);\n }\n })();\n } else if (ev.data.type === \"ALEO_JOIN\") {\n const { recordOne, recordTwo, fee, privateFee, feeRecord, privateKey, url } =\n ev.data;\n\n console.log(\"Web worker: Creating join...\");\n\n let startTime = performance.now();\n (async function () {\n\n try {\n // Set the network client host if specified\n if (typeof url === \"string\") { programManager.setHost(url); }\n\n // Create the join transaction and submit it to the network\n const transaction = await programManager.join(\n recordOne,\n recordTwo,\n fee,\n privateFee,\n undefined,\n feeRecord,\n aleo.PrivateKey.from_string(privateKey),\n undefined\n );\n\n // Return the transaction id to the main thread\n console.log(`Web worker: Join transaction ${transaction} created in ${performance.now() - startTime} ms`);\n self.postMessage({\n type: \"JOIN_TRANSACTION_COMPLETED\",\n joinTransaction: transaction,\n });\n } catch (error) {\n console.log(error);\n self.postMessage({\n type: \"ERROR\",\n errorMessage: error.toString(),\n });\n } finally {\n programManager.setHost(defaultHost);\n }\n })();\n }\n});\n"],"names":["_regeneratorRuntime","e","t","r","Object","prototype","n","hasOwnProperty","o","defineProperty","value","i","Symbol","a","iterator","c","asyncIterator","u","toStringTag","define","enumerable","configurable","writable","wrap","Generator","create","Context","makeInvokeMethod","tryCatch","type","arg","call","h","l","f","s","y","GeneratorFunction","GeneratorFunctionPrototype","p","d","getPrototypeOf","v","values","g","defineIteratorMethods","forEach","_invoke","AsyncIterator","invoke","_typeof","resolve","__await","then","callInvokeWithMethodAndArg","Error","done","method","delegate","maybeInvokeDelegate","sent","_sent","dispatchException","abrupt","TypeError","resultName","next","nextLoc","pushTryEntry","tryLoc","catchLoc","finallyLoc","afterLoc","tryEntries","push","resetTryEntry","completion","reset","isNaN","length","displayName","isGeneratorFunction","constructor","name","mark","setPrototypeOf","__proto__","awrap","async","Promise","keys","reverse","pop","prev","charAt","slice","stop","rval","handle","complete","finish","delegateYield","asyncGeneratorStep","_asyncToGenerator","arguments","apply","_next","_throw","aleo","defaultHost","keyProvider","programManager","undefined","useCache","self","postMessage","lastLocalProgram","addEventListener","ev","data","_ev$data","localProgram","aleoFunction","inputs","privateKey","console","log","startTime","performance","now","_callee","privateKeyObject","program","program_id","cacheKey","imports","keyParams","response","outputs","execution","_context","from_string","createProgramFromSource","id","hasFunction","concat","networkClient","getProgramImports","synthesizeKeys","cacheKeys","run","getOutputs","getExecution","getKeys","toString","t0","error","errorMessage","_ev$data2","remoteProgram","fee","privateFee","feeRecord","url","_callee2","transaction","_context2","getProgramObject","containsKeys","setHost","execute","programName","functionName","keySearchParams","executeTransaction","_ev$data3","_callee3","_programManager$keyPr","_programManager$keyPr2","provingKey","verifyingKey","executeFee","_context3","getFunctions","includes","estimateExecutionFee","executionFee","Number","_ev$data4","_callee4","deploymentFee","_context4","estimateDeploymentFee","_ev$data5","amountCredits","recipient","transfer_type","amountRecord","_callee5","_context5","transfer","transferTransaction","_ev$data6","_callee6","programObject","programExists","_context6","getProgram","deploy","deployTransaction","t1","_ev$data7","splitAmount","record","_callee7","_context7","split","splitTransaction","_ev$data8","recordOne","recordTwo","_callee8","_context8","join","joinTransaction"],"sourceRoot":""} \ No newline at end of file diff --git a/682.bundle.js b/682.bundle.js deleted file mode 100644 index a958fdc75..000000000 --- a/682.bundle.js +++ /dev/null @@ -1,2 +0,0 @@ -(()=>{var r,e,t,o,a,n,i={},p={};function c(r){var e=p[r];if(void 0!==e)return e.exports;var t=p[r]={exports:{}};return i[r](t,t.exports,c),t.exports}c.m=i,c.x=()=>{var r=c.O(void 0,[495,877,66],(()=>c(66)));return r=c.O(r)},r="function"==typeof Symbol?Symbol("webpack queues"):"__webpack_queues__",e="function"==typeof Symbol?Symbol("webpack exports"):"__webpack_exports__",t="function"==typeof Symbol?Symbol("webpack error"):"__webpack_error__",o=r=>{r&&r.d<1&&(r.d=1,r.forEach((r=>r.r--)),r.forEach((r=>r.r--?r.r++:r())))},c.a=(a,n,i)=>{var p;i&&((p=[]).d=-1);var c,s,f,l=new Set,u=a.exports,b=new Promise(((r,e)=>{f=e,s=r}));b[e]=u,b[r]=r=>(p&&r(p),l.forEach(r),b.catch((r=>{}))),a.exports=b,n((a=>{var n;c=(a=>a.map((a=>{if(null!==a&&"object"==typeof a){if(a[r])return a;if(a.then){var n=[];n.d=0,a.then((r=>{i[e]=r,o(n)}),(r=>{i[t]=r,o(n)}));var i={};return i[r]=r=>r(n),i}}var p={};return p[r]=r=>{},p[e]=a,p})))(a);var i=()=>c.map((r=>{if(r[t])throw r[t];return r[e]})),s=new Promise((e=>{(n=()=>e(i)).r=0;var t=r=>r!==p&&!l.has(r)&&(l.add(r),r&&!r.d&&(n.r++,r.push(n)));c.map((e=>e[r](t)))}));return n.r?s:i()}),(r=>(r?f(b[t]=r):s(u),o(p)))),p&&p.d<0&&(p.d=0)},a=[],c.O=(r,e,t,o)=>{if(!e){var n=1/0;for(f=0;f=o)&&Object.keys(c.O).every((r=>c.O[r](e[p])))?e.splice(p--,1):(i=!1,o0&&a[f-1][2]>o;f--)a[f]=a[f-1];a[f]=[e,t,o]},c.d=(r,e)=>{for(var t in e)c.o(e,t)&&!c.o(r,t)&&Object.defineProperty(r,t,{enumerable:!0,get:e[t]})},c.f={},c.e=r=>Promise.all(Object.keys(c.f).reduce(((e,t)=>(c.f[t](r,e),e)),[])),c.u=r=>r+".bundle.js",c.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(r){if("object"==typeof window)return window}}(),c.o=(r,e)=>Object.prototype.hasOwnProperty.call(r,e),(()=>{var r;c.g.importScripts&&(r=c.g.location+"");var e=c.g.document;if(!r&&e&&(e.currentScript&&(r=e.currentScript.src),!r)){var t=e.getElementsByTagName("script");if(t.length)for(var o=t.length-1;o>-1&&(!r||!/^http(s?):/.test(r));)r=t[o--].src}if(!r)throw new Error("Automatic publicPath is not supported in this browser");r=r.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),c.p=r})(),(()=>{c.b=self.location+"";var r={682:1};c.f.i=(e,t)=>{r[e]||importScripts(c.p+c.u(e))};var e=self.webpackChunkaleo_website=self.webpackChunkaleo_website||[],t=e.push.bind(e);e.push=e=>{var[o,a,n]=e;for(var i in a)c.o(a,i)&&(c.m[i]=a[i]);for(n&&n(c);o.length;)r[o.pop()]=1;t(e)}})(),n=c.x,c.x=()=>Promise.all([495,877,66].map(c.e,c)).then(n);c.x()})(); -//# sourceMappingURL=682.bundle.js.map \ No newline at end of file diff --git a/682.bundle.js.map b/682.bundle.js.map deleted file mode 100644 index 61a2b3961..000000000 --- a/682.bundle.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"682.bundle.js","mappings":"UAAIA,EACAC,EACAC,EACAC,ECHAC,ECAAC,E,KCCAC,EAA2B,CAAC,EAGhC,SAASC,EAAoBC,GAE5B,IAAIC,EAAeH,EAAyBE,GAC5C,QAAqBE,IAAjBD,EACH,OAAOA,EAAaE,QAGrB,IAAIC,EAASN,EAAyBE,GAAY,CAGjDG,QAAS,CAAC,GAOX,OAHAE,EAAoBL,GAAUI,EAAQA,EAAOD,QAASJ,GAG/CK,EAAOD,OACf,CAGAJ,EAAoBO,EAAID,EAGxBN,EAAoBQ,EAAI,KAGvB,IAAIC,EAAsBT,EAAoBU,OAAEP,EAAW,CAAC,IAAI,IAAI,KAAK,IAAOH,EAAoB,MAEpG,OADAS,EAAsBT,EAAoBU,EAAED,EAClB,EHjCvBhB,EAAkC,mBAAXkB,OAAwBA,OAAO,kBAAoB,qBAC1EjB,EAAmC,mBAAXiB,OAAwBA,OAAO,mBAAqB,sBAC5EhB,EAAiC,mBAAXgB,OAAwBA,OAAO,iBAAmB,oBACxEf,EAAgBgB,IAChBA,GAASA,EAAMC,EAAI,IACrBD,EAAMC,EAAI,EACVD,EAAME,SAASC,GAAQA,EAAGC,MAC1BJ,EAAME,SAASC,GAAQA,EAAGC,IAAMD,EAAGC,IAAMD,MAC1C,EAyBDf,EAAoBiB,EAAI,CAACZ,EAAQa,EAAMC,KACtC,IAAIP,EACJO,KAAcP,EAAQ,IAAIC,GAAK,GAC/B,IAEIO,EACAC,EACAC,EAJAC,EAAY,IAAIC,IAChBpB,EAAUC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,KAAYgG,EAChBjG,EAAoB2D,EAAEsC,EAAahG,KACrCD,EAAoBO,EAAEN,GAAYgG,EAAYhG,IAIhD,IADGiG,GAASA,EAAQlG,GACd6C,EAASK,QACd0C,EAAgB/C,EAASsD,OAAS,EACnCL,EAA2BE,EAAK,C,KRnB7BlG,EAAOE,EAAoBQ,EAC/BR,EAAoBQ,EAAI,IAChBkB,QAAQuC,IAAI,CAAC,IAAI,IAAI,IAAInC,IAAI9B,EAAoBkC,EAAGlC,IAAsBgC,KAAKlC,GSD7DE,EAAoBQ,G","sources":["webpack://aleo-website/webpack/runtime/async module","webpack://aleo-website/webpack/runtime/chunk loaded","webpack://aleo-website/webpack/runtime/startup chunk dependencies","webpack://aleo-website/webpack/bootstrap","webpack://aleo-website/webpack/runtime/define property getters","webpack://aleo-website/webpack/runtime/ensure chunk","webpack://aleo-website/webpack/runtime/get javascript chunk filename","webpack://aleo-website/webpack/runtime/global","webpack://aleo-website/webpack/runtime/hasOwnProperty shorthand","webpack://aleo-website/webpack/runtime/publicPath","webpack://aleo-website/webpack/runtime/importScripts chunk loading","webpack://aleo-website/webpack/startup"],"sourcesContent":["var webpackQueues = typeof Symbol === \"function\" ? Symbol(\"webpack queues\") : \"__webpack_queues__\";\nvar webpackExports = typeof Symbol === \"function\" ? Symbol(\"webpack exports\") : \"__webpack_exports__\";\nvar webpackError = typeof Symbol === \"function\" ? Symbol(\"webpack error\") : \"__webpack_error__\";\nvar resolveQueue = (queue) => {\n\tif(queue && queue.d < 1) {\n\t\tqueue.d = 1;\n\t\tqueue.forEach((fn) => (fn.r--));\n\t\tqueue.forEach((fn) => (fn.r-- ? fn.r++ : fn()));\n\t}\n}\nvar wrapDeps = (deps) => (deps.map((dep) => {\n\tif(dep !== null && typeof dep === \"object\") {\n\t\tif(dep[webpackQueues]) return dep;\n\t\tif(dep.then) {\n\t\t\tvar queue = [];\n\t\t\tqueue.d = 0;\n\t\t\tdep.then((r) => {\n\t\t\t\tobj[webpackExports] = r;\n\t\t\t\tresolveQueue(queue);\n\t\t\t}, (e) => {\n\t\t\t\tobj[webpackError] = e;\n\t\t\t\tresolveQueue(queue);\n\t\t\t});\n\t\t\tvar obj = {};\n\t\t\tobj[webpackQueues] = (fn) => (fn(queue));\n\t\t\treturn obj;\n\t\t}\n\t}\n\tvar ret = {};\n\tret[webpackQueues] = x => {};\n\tret[webpackExports] = dep;\n\treturn ret;\n}));\n__webpack_require__.a = (module, body, hasAwait) => {\n\tvar queue;\n\thasAwait && ((queue = []).d = -1);\n\tvar depQueues = new Set();\n\tvar exports = module.exports;\n\tvar currentDeps;\n\tvar outerResolve;\n\tvar reject;\n\tvar promise = new Promise((resolve, rej) => {\n\t\treject = rej;\n\t\touterResolve = resolve;\n\t});\n\tpromise[webpackExports] = exports;\n\tpromise[webpackQueues] = (fn) => (queue && fn(queue), depQueues.forEach(fn), promise[\"catch\"](x => {}));\n\tmodule.exports = promise;\n\tbody((deps) => {\n\t\tcurrentDeps = wrapDeps(deps);\n\t\tvar fn;\n\t\tvar getResult = () => (currentDeps.map((d) => {\n\t\t\tif(d[webpackError]) throw d[webpackError];\n\t\t\treturn d[webpackExports];\n\t\t}))\n\t\tvar promise = new Promise((resolve) => {\n\t\t\tfn = () => (resolve(getResult));\n\t\t\tfn.r = 0;\n\t\t\tvar fnQueue = (q) => (q !== queue && !depQueues.has(q) && (depQueues.add(q), q && !q.d && (fn.r++, q.push(fn))));\n\t\t\tcurrentDeps.map((dep) => (dep[webpackQueues](fnQueue)));\n\t\t});\n\t\treturn fn.r ? promise : getResult();\n\t}, (err) => ((err ? reject(promise[webpackError] = err) : outerResolve(exports)), resolveQueue(queue)));\n\tqueue && queue.d < 0 && (queue.d = 0);\n};","var deferred = [];\n__webpack_require__.O = (result, chunkIds, fn, priority) => {\n\tif(chunkIds) {\n\t\tpriority = priority || 0;\n\t\tfor(var i = deferred.length; i > 0 && deferred[i - 1][2] > priority; i--) deferred[i] = deferred[i - 1];\n\t\tdeferred[i] = [chunkIds, fn, priority];\n\t\treturn;\n\t}\n\tvar notFulfilled = Infinity;\n\tfor (var i = 0; i < deferred.length; i++) {\n\t\tvar [chunkIds, fn, priority] = deferred[i];\n\t\tvar fulfilled = true;\n\t\tfor (var j = 0; j < chunkIds.length; j++) {\n\t\t\tif ((priority & 1 === 0 || notFulfilled >= priority) && Object.keys(__webpack_require__.O).every((key) => (__webpack_require__.O[key](chunkIds[j])))) {\n\t\t\t\tchunkIds.splice(j--, 1);\n\t\t\t} else {\n\t\t\t\tfulfilled = false;\n\t\t\t\tif(priority < notFulfilled) notFulfilled = priority;\n\t\t\t}\n\t\t}\n\t\tif(fulfilled) {\n\t\t\tdeferred.splice(i--, 1)\n\t\t\tvar r = fn();\n\t\t\tif (r !== undefined) result = r;\n\t\t}\n\t}\n\treturn result;\n};","var next = __webpack_require__.x;\n__webpack_require__.x = () => {\n\treturn Promise.all([495,877,66].map(__webpack_require__.e, __webpack_require__)).then(next);\n};","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n// expose the modules object (__webpack_modules__)\n__webpack_require__.m = __webpack_modules__;\n\n// the startup function\n__webpack_require__.x = () => {\n\t// Load entry module and return exports\n\t// This entry module depends on other loaded chunks and execution need to be delayed\n\tvar __webpack_exports__ = __webpack_require__.O(undefined, [495,877,66], () => (__webpack_require__(66)))\n\t__webpack_exports__ = __webpack_require__.O(__webpack_exports__);\n\treturn __webpack_exports__;\n};\n\n","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.f = {};\n// This file contains only the entry chunk.\n// The chunk loading function for additional chunks\n__webpack_require__.e = (chunkId) => {\n\treturn Promise.all(Object.keys(__webpack_require__.f).reduce((promises, key) => {\n\t\t__webpack_require__.f[key](chunkId, promises);\n\t\treturn promises;\n\t}, []));\n};","// This function allow to reference async chunks and sibling chunks for the entrypoint\n__webpack_require__.u = (chunkId) => {\n\t// return url for filenames based on template\n\treturn \"\" + chunkId + \".bundle.js\";\n};","__webpack_require__.g = (function() {\n\tif (typeof globalThis === 'object') return globalThis;\n\ttry {\n\t\treturn this || new Function('return this')();\n\t} catch (e) {\n\t\tif (typeof window === 'object') return window;\n\t}\n})();","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","var scriptUrl;\nif (__webpack_require__.g.importScripts) scriptUrl = __webpack_require__.g.location + \"\";\nvar document = __webpack_require__.g.document;\nif (!scriptUrl && document) {\n\tif (document.currentScript)\n\t\tscriptUrl = document.currentScript.src;\n\tif (!scriptUrl) {\n\t\tvar scripts = document.getElementsByTagName(\"script\");\n\t\tif(scripts.length) {\n\t\t\tvar i = scripts.length - 1;\n\t\t\twhile (i > -1 && (!scriptUrl || !/^http(s?):/.test(scriptUrl))) scriptUrl = scripts[i--].src;\n\t\t}\n\t}\n}\n// When supporting browsers where an automatic publicPath is not supported you must specify an output.publicPath manually via configuration\n// or pass an empty string (\"\") and set the __webpack_public_path__ variable from your code to use your own logic.\nif (!scriptUrl) throw new Error(\"Automatic publicPath is not supported in this browser\");\nscriptUrl = scriptUrl.replace(/#.*$/, \"\").replace(/\\?.*$/, \"\").replace(/\\/[^\\/]+$/, \"/\");\n__webpack_require__.p = scriptUrl;","__webpack_require__.b = self.location + \"\";\n\n// object to store loaded chunks\n// \"1\" means \"already loaded\"\nvar installedChunks = {\n\t682: 1\n};\n\n// importScripts chunk loading\nvar installChunk = (data) => {\n\tvar [chunkIds, moreModules, runtime] = data;\n\tfor(var moduleId in moreModules) {\n\t\tif(__webpack_require__.o(moreModules, moduleId)) {\n\t\t\t__webpack_require__.m[moduleId] = moreModules[moduleId];\n\t\t}\n\t}\n\tif(runtime) runtime(__webpack_require__);\n\twhile(chunkIds.length)\n\t\tinstalledChunks[chunkIds.pop()] = 1;\n\tparentChunkLoadingFunction(data);\n};\n__webpack_require__.f.i = (chunkId, promises) => {\n\t// \"1\" is the signal for \"already loaded\"\n\tif(!installedChunks[chunkId]) {\n\t\tif(true) { // all chunks have JS\n\t\t\timportScripts(__webpack_require__.p + __webpack_require__.u(chunkId));\n\t\t}\n\t}\n};\n\nvar chunkLoadingGlobal = self[\"webpackChunkaleo_website\"] = self[\"webpackChunkaleo_website\"] || [];\nvar parentChunkLoadingFunction = chunkLoadingGlobal.push.bind(chunkLoadingGlobal);\nchunkLoadingGlobal.push = installChunk;\n\n// no HMR\n\n// no HMR manifest","// run startup\nvar __webpack_exports__ = __webpack_require__.x();\n"],"names":["webpackQueues","webpackExports","webpackError","resolveQueue","deferred","next","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","undefined","exports","module","__webpack_modules__","m","x","__webpack_exports__","O","Symbol","queue","d","forEach","fn","r","a","body","hasAwait","currentDeps","outerResolve","reject","depQueues","Set","promise","Promise","resolve","rej","deps","map","dep","then","obj","e","ret","wrapDeps","getResult","fnQueue","q","has","add","push","err","result","chunkIds","priority","notFulfilled","Infinity","i","length","fulfilled","j","Object","keys","every","key","splice","definition","o","defineProperty","enumerable","get","f","chunkId","all","reduce","promises","u","g","globalThis","this","Function","window","prop","prototype","hasOwnProperty","call","scriptUrl","importScripts","location","document","currentScript","src","scripts","getElementsByTagName","test","Error","replace","p","b","self","installedChunks","chunkLoadingGlobal","parentChunkLoadingFunction","bind","data","moreModules","runtime","pop"],"sourceRoot":""} \ No newline at end of file diff --git a/820.bundle.js b/820.bundle.js new file mode 100644 index 000000000..f5e2865c8 --- /dev/null +++ b/820.bundle.js @@ -0,0 +1,3 @@ +/*! For license information please see 820.bundle.js.LICENSE.txt */ +(self.webpackChunkaleo_website=self.webpackChunkaleo_website||[]).push([[820,511],{4494:(t,e,_)=>{t.exports=_.p+"38c18e22c4f37629c446.wasm"},3645:(t,e,_)=>{t.exports=_.p+"f62b366a9b5fa66a5bcc.js"},6511:(t,e,_)=>{_.a(t,(async(t,r)=>{try{function n(t,e,_,r){return new Promise((n=>{const i=new Worker(t,{type:"module"});i.addEventListener("message",(t=>{setTimeout((()=>{n(i),i.unref&&i.unref()}),0)}),{capture:!0,once:!0}),i.postMessage({module:e,memory:_,address:r})}))}let j;_.d(e,{$r:()=>Ut,CK:()=>O,Gd:()=>jt,IO:()=>Dt,L:()=>Wt,PD:()=>Lt,Pc:()=>Nt,SF:()=>Ot,XV:()=>$t,YW:()=>qt,_U:()=>zt,_q:()=>Ct,fW:()=>Bt,gN:()=>At,hz:()=>Ht,kL:()=>Rt,o:()=>Et,uq:()=>Kt,zW:()=>It});const M=new Array(128).fill(void 0);function i(t){return M[t]}M.push(void 0,null,!0,!1);let C=M.length;function o(t){t<132||(M[t]=C,C=t)}function a(t){const e=i(t);return o(t),e}const K="undefined"!=typeof TextDecoder?new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0}):{decode:()=>{throw Error("TextDecoder not available")}};"undefined"!=typeof TextDecoder&&K.decode();let U=null;function s(){return null!==U&&U.buffer===j.memory.buffer||(U=new Uint8Array(j.memory.buffer)),U}function c(t,e){return t>>>=0,K.decode(s().slice(t,t+e))}function g(t){C===M.length&&M.push(M.length+1);const e=C;return C=M[e],M[e]=t,e}let I=0;const B="undefined"!=typeof TextEncoder?new TextEncoder("utf-8"):{encode:()=>{throw Error("TextEncoder not available")}},L=function(t,e){const _=B.encode(t);return e.set(_),{read:t.length,written:_.length}};function w(t,e,_){if(void 0===_){const _=B.encode(t),r=e(_.length,1)>>>0;return s().subarray(r,r+_.length).set(_),I=_.length,r}let r=t.length,n=e(r,1)>>>0;const i=s();let o=0;for(;o127)break;i[n+o]=e}if(o!==r){0!==o&&(t=t.slice(o)),n=_(n,r,r=o+3*t.length,1)>>>0;const e=s().subarray(n+o,n+r);o+=L(t,e).written,n=_(n,r,o,1)>>>0}return I=o,n}function d(t){return null==t}let W=null;function b(){return null!==W&&W.buffer===j.memory.buffer||(W=new Int32Array(j.memory.buffer)),W}function l(t){const e=typeof t;if("number"==e||"boolean"==e||null==t)return`${t}`;if("string"==e)return`"${t}"`;if("symbol"==e){const e=t.description;return null==e?"Symbol":`Symbol(${e})`}if("function"==e){const e=t.name;return"string"==typeof e&&e.length>0?`Function(${e})`:"Function"}if(Array.isArray(t)){const e=t.length;let _="[";e>0&&(_+=l(t[0]));for(let r=1;r1))return toString.call(t);if(r=_[1],"Object"==r)try{return"Object("+JSON.stringify(t)+")"}catch(t){return"Object"}return t instanceof Error?`${t.name}: ${t.message}\n${t.stack}`:r}const N="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((t=>{j.__wbindgen_export_3.get(t.dtor)(t.a,t.b)}));function u(t,e,_,r){const n={a:t,b:e,cnt:1,dtor:_},i=(...t)=>{n.cnt++;const e=n.a;n.a=0;try{return r(e,n.b,...t)}finally{0==--n.cnt?(j.__wbindgen_export_3.get(n.dtor)(e,n.b),N.unregister(n)):n.a=e}};return i.original=n,N.register(i,n,n),i}function f(t,e,_){j._dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h442b5e922f6f9710(t,e,g(_))}function p(t,e){if(!(t instanceof e))throw new Error(`expected instance of ${e.name}`);return t.ptr}function y(t,e){const _=e(1*t.length,1)>>>0;return s().set(t,_/1),I=t.length,_}function m(t,e,_,r){try{const o=j.__wbindgen_add_to_stack_pointer(-16);p(t,J),p(e,St),p(_,gt);const s=w(r,j.__wbindgen_malloc,j.__wbindgen_realloc),c=I;j.verifyFunctionExecution(o,t.__wbg_ptr,e.__wbg_ptr,_.__wbg_ptr,s,c);var n=b()[o/4+0],i=b()[o/4+1];if(b()[o/4+2])throw a(i);return 0!==n}finally{j.__wbindgen_add_to_stack_pointer(16)}}let q=null;function h(){return null!==q&&q.buffer===j.memory.buffer||(q=new BigInt64Array(j.memory.buffer)),q}function v(t,e){return t>>>=0,s().subarray(t/1,t/1+e)}function k(t){j.runRayonThread(t)}function P(t,e){return a(j.initThreadPool(g(t),e))}function S(t,e){try{return t.apply(this,e)}catch(t){j.__wbindgen_exn_store(g(t))}}function x(t,e,_,r){j.wasm_bindgen__convert__closures__invoke2_mut__h5ab12ffe4b82d47a(t,e,g(_),g(r))}const D="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((t=>j.__wbg_address_free(t>>>0)));let $=class t{static __wrap(e){e>>>=0;const _=Object.create(t.prototype);return _.__wbg_ptr=e,D.register(_,_.__wbg_ptr,_),_}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,D.unregister(this),t}free(){const t=this.__destroy_into_raw();j.__wbg_address_free(t)}static from_private_key(e){p(e,ot);const _=j.address_from_private_key(e.__wbg_ptr);return t.__wrap(_)}static from_view_key(e){p(e,Tt);const _=j.address_from_view_key(e.__wbg_ptr);return t.__wrap(_)}static from_string(e){const _=w(e,j.__wbindgen_malloc,j.__wbindgen_realloc),r=I,n=j.address_from_string(_,r);return t.__wrap(n)}to_string(){let t,e;try{const n=j.__wbindgen_add_to_stack_pointer(-16);j.address_to_string(n,this.__wbg_ptr);var _=b()[n/4+0],r=b()[n/4+1];return t=_,e=r,c(_,r)}finally{j.__wbindgen_add_to_stack_pointer(16),j.__wbindgen_free(t,e,1)}}verify(t,e){const _=y(t,j.__wbindgen_malloc),r=I;p(e,ht);return 0!==j.address_verify(this.__wbg_ptr,_,r,e.__wbg_ptr)}};const H="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((t=>j.__wbg_execution_free(t>>>0)));let J=class t{static __wrap(e){e>>>=0;const _=Object.create(t.prototype);return _.__wbg_ptr=e,H.register(_,_.__wbg_ptr,_),_}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,H.unregister(this),t}free(){const t=this.__destroy_into_raw();j.__wbg_execution_free(t)}toString(){let t,e;try{const n=j.__wbindgen_add_to_stack_pointer(-16);j.execution_toString(n,this.__wbg_ptr);var _=b()[n/4+0],r=b()[n/4+1];return t=_,e=r,c(_,r)}finally{j.__wbindgen_add_to_stack_pointer(16),j.__wbindgen_free(t,e,1)}}static fromString(e){try{const n=j.__wbindgen_add_to_stack_pointer(-16),i=w(e,j.__wbindgen_malloc,j.__wbindgen_realloc),o=I;j.execution_fromString(n,i,o);var _=b()[n/4+0],r=b()[n/4+1];if(b()[n/4+2])throw a(r);return t.__wrap(_)}finally{j.__wbindgen_add_to_stack_pointer(16)}}};const G="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((t=>j.__wbg_executionresponse_free(t>>>0)));let X=class t{static __wrap(e){e>>>=0;const _=Object.create(t.prototype);return _.__wbg_ptr=e,G.register(_,_.__wbg_ptr,_),_}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,G.unregister(this),t}free(){const t=this.__destroy_into_raw();j.__wbg_executionresponse_free(t)}getOutputs(){return a(j.executionresponse_getOutputs(this.__wbg_ptr))}getExecution(){const t=j.executionresponse_getExecution(this.__wbg_ptr);return 0===t?void 0:J.__wrap(t)}getKeys(){try{const _=j.__wbindgen_add_to_stack_pointer(-16);j.executionresponse_getKeys(_,this.__wbg_ptr);var t=b()[_/4+0],e=b()[_/4+1];if(b()[_/4+2])throw a(e);return tt.__wrap(t)}finally{j.__wbindgen_add_to_stack_pointer(16)}}getProvingKey(){const t=j.executionresponse_getProvingKey(this.__wbg_ptr);return 0===t?void 0:lt.__wrap(t)}getVerifyingKey(){const t=j.executionresponse_getVerifyingKey(this.__wbg_ptr);return St.__wrap(t)}getFunctionId(){let t,e;try{const n=j.__wbindgen_add_to_stack_pointer(-16);j.executionresponse_getFunctionId(n,this.__wbg_ptr);var _=b()[n/4+0],r=b()[n/4+1];return t=_,e=r,c(_,r)}finally{j.__wbindgen_add_to_stack_pointer(16),j.__wbindgen_free(t,e,1)}}getProgram(){const t=j.executionresponse_getProgram(this.__wbg_ptr);return gt.__wrap(t)}};const Y="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((t=>j.__wbg_field_free(t>>>0)));let Q=class t{static __wrap(e){e>>>=0;const _=Object.create(t.prototype);return _.__wbg_ptr=e,Y.register(_,_.__wbg_ptr,_),_}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,Y.unregister(this),t}free(){const t=this.__destroy_into_raw();j.__wbg_field_free(t)}toString(){let t,e;try{const n=j.__wbindgen_add_to_stack_pointer(-16);j.field_toString(n,this.__wbg_ptr);var _=b()[n/4+0],r=b()[n/4+1];return t=_,e=r,c(_,r)}finally{j.__wbindgen_add_to_stack_pointer(16),j.__wbindgen_free(t,e,1)}}static fromString(e){try{const n=j.__wbindgen_add_to_stack_pointer(-16),i=w(e,j.__wbindgen_malloc,j.__wbindgen_realloc),o=I;j.field_fromString(n,i,o);var _=b()[n/4+0],r=b()[n/4+1];if(b()[n/4+2])throw a(r);return t.__wrap(_)}finally{j.__wbindgen_add_to_stack_pointer(16)}}};const Z="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((t=>j.__wbg_keypair_free(t>>>0)));class tt{static __wrap(t){t>>>=0;const e=Object.create(tt.prototype);return e.__wbg_ptr=t,Z.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,Z.unregister(this),t}free(){const t=this.__destroy_into_raw();j.__wbg_keypair_free(t)}constructor(t,e){p(t,lt);var _=t.__destroy_into_raw();p(e,St);var r=e.__destroy_into_raw();const n=j.keypair_new(_,r);return this.__wbg_ptr=n>>>0,this}provingKey(){try{const _=j.__wbindgen_add_to_stack_pointer(-16);j.keypair_provingKey(_,this.__wbg_ptr);var t=b()[_/4+0],e=b()[_/4+1];if(b()[_/4+2])throw a(e);return lt.__wrap(t)}finally{j.__wbindgen_add_to_stack_pointer(16)}}verifyingKey(){try{const _=j.__wbindgen_add_to_stack_pointer(-16);j.keypair_verifyingKey(_,this.__wbg_ptr);var t=b()[_/4+0],e=b()[_/4+1];if(b()[_/4+2])throw a(e);return St.__wrap(t)}finally{j.__wbindgen_add_to_stack_pointer(16)}}}const et="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((t=>j.__wbg_metadata_free(t>>>0)));let _t=class t{static __wrap(e){e>>>=0;const _=Object.create(t.prototype);return _.__wbg_ptr=e,et.register(_,_.__wbg_ptr,_),_}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,et.unregister(this),t}free(){const t=this.__destroy_into_raw();j.__wbg_metadata_free(t)}get locator(){let t,e;try{const n=j.__wbindgen_add_to_stack_pointer(-16);j.__wbg_get_metadata_locator(n,this.__wbg_ptr);var _=b()[n/4+0],r=b()[n/4+1];return t=_,e=r,c(_,r)}finally{j.__wbindgen_add_to_stack_pointer(16),j.__wbindgen_free(t,e,1)}}set locator(t){const e=w(t,j.__wbindgen_malloc,j.__wbindgen_realloc),_=I;j.__wbg_set_metadata_locator(this.__wbg_ptr,e,_)}get prover(){let t,e;try{const n=j.__wbindgen_add_to_stack_pointer(-16);j.__wbg_get_metadata_prover(n,this.__wbg_ptr);var _=b()[n/4+0],r=b()[n/4+1];return t=_,e=r,c(_,r)}finally{j.__wbindgen_add_to_stack_pointer(16),j.__wbindgen_free(t,e,1)}}set prover(t){const e=w(t,j.__wbindgen_malloc,j.__wbindgen_realloc),_=I;j.__wbg_set_metadata_prover(this.__wbg_ptr,e,_)}get verifier(){let t,e;try{const n=j.__wbindgen_add_to_stack_pointer(-16);j.__wbg_get_metadata_verifier(n,this.__wbg_ptr);var _=b()[n/4+0],r=b()[n/4+1];return t=_,e=r,c(_,r)}finally{j.__wbindgen_add_to_stack_pointer(16),j.__wbindgen_free(t,e,1)}}set verifier(t){const e=w(t,j.__wbindgen_malloc,j.__wbindgen_realloc),_=I;j.__wbg_set_metadata_verifier(this.__wbg_ptr,e,_)}get verifyingKey(){let t,e;try{const n=j.__wbindgen_add_to_stack_pointer(-16);j.__wbg_get_metadata_verifyingKey(n,this.__wbg_ptr);var _=b()[n/4+0],r=b()[n/4+1];return t=_,e=r,c(_,r)}finally{j.__wbindgen_add_to_stack_pointer(16),j.__wbindgen_free(t,e,1)}}set verifyingKey(t){const e=w(t,j.__wbindgen_malloc,j.__wbindgen_realloc),_=I;j.__wbg_set_metadata_verifyingKey(this.__wbg_ptr,e,_)}static baseUrl(){let t,e;try{const n=j.__wbindgen_add_to_stack_pointer(-16);j.metadata_baseUrl(n);var _=b()[n/4+0],r=b()[n/4+1];return t=_,e=r,c(_,r)}finally{j.__wbindgen_add_to_stack_pointer(16),j.__wbindgen_free(t,e,1)}}static bond_public(){const e=j.metadata_bond_public();return t.__wrap(e)}static bond_validator(){const e=j.metadata_bond_validator();return t.__wrap(e)}static claim_unbond_public(){const e=j.metadata_claim_unbond_public();return t.__wrap(e)}static fee_private(){const e=j.metadata_fee_private();return t.__wrap(e)}static fee_public(){const e=j.metadata_fee_public();return t.__wrap(e)}static inclusion(){const e=j.metadata_inclusion();return t.__wrap(e)}static join(){const e=j.metadata_join();return t.__wrap(e)}static set_validator_state(){const e=j.metadata_set_validator_state();return t.__wrap(e)}static split(){const e=j.metadata_split();return t.__wrap(e)}static transfer_private(){const e=j.metadata_transfer_private();return t.__wrap(e)}static transfer_private_to_public(){const e=j.metadata_transfer_private_to_public();return t.__wrap(e)}static transfer_public(){const e=j.metadata_transfer_public();return t.__wrap(e)}static transfer_public_as_signer(){const e=j.metadata_transfer_public_as_signer();return t.__wrap(e)}static transfer_public_to_private(){const e=j.metadata_transfer_public_to_private();return t.__wrap(e)}static unbond_public(){const e=j.metadata_unbond_public();return t.__wrap(e)}};const rt="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((t=>j.__wbg_offlinequery_free(t>>>0)));let nt=class t{static __wrap(e){e>>>=0;const _=Object.create(t.prototype);return _.__wbg_ptr=e,rt.register(_,_.__wbg_ptr,_),_}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,rt.unregister(this),t}free(){const t=this.__destroy_into_raw();j.__wbg_offlinequery_free(t)}constructor(t){try{const r=j.__wbindgen_add_to_stack_pointer(-16),n=w(t,j.__wbindgen_malloc,j.__wbindgen_realloc),i=I;j.offlinequery_new(r,n,i);var e=b()[r/4+0],_=b()[r/4+1];if(b()[r/4+2])throw a(_);return this.__wbg_ptr=e>>>0,this}finally{j.__wbindgen_add_to_stack_pointer(16)}}addStatePath(t,e){try{const r=j.__wbindgen_add_to_stack_pointer(-16),n=w(t,j.__wbindgen_malloc,j.__wbindgen_realloc),i=I,o=w(e,j.__wbindgen_malloc,j.__wbindgen_realloc),s=I;j.offlinequery_addStatePath(r,this.__wbg_ptr,n,i,o,s);var _=b()[r/4+0];if(b()[r/4+1])throw a(_)}finally{j.__wbindgen_add_to_stack_pointer(16)}}toString(){let t,e;try{const n=j.__wbindgen_add_to_stack_pointer(-16);j.offlinequery_toString(n,this.__wbg_ptr);var _=b()[n/4+0],r=b()[n/4+1];return t=_,e=r,c(_,r)}finally{j.__wbindgen_add_to_stack_pointer(16),j.__wbindgen_free(t,e,1)}}static fromString(e){try{const n=j.__wbindgen_add_to_stack_pointer(-16),i=w(e,j.__wbindgen_malloc,j.__wbindgen_realloc),o=I;j.offlinequery_fromString(n,i,o);var _=b()[n/4+0],r=b()[n/4+1];if(b()[n/4+2])throw a(r);return t.__wrap(_)}finally{j.__wbindgen_add_to_stack_pointer(16)}}};const it="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((t=>j.__wbg_privatekey_free(t>>>0)));let ot=class t{static __wrap(e){e>>>=0;const _=Object.create(t.prototype);return _.__wbg_ptr=e,it.register(_,_.__wbg_ptr,_),_}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,it.unregister(this),t}free(){const t=this.__destroy_into_raw();j.__wbg_privatekey_free(t)}constructor(){const t=j.privatekey_new();return this.__wbg_ptr=t>>>0,this}static from_seed_unchecked(e){const _=y(e,j.__wbindgen_malloc),r=I,n=j.privatekey_from_seed_unchecked(_,r);return t.__wrap(n)}static from_string(e){try{const n=j.__wbindgen_add_to_stack_pointer(-16),i=w(e,j.__wbindgen_malloc,j.__wbindgen_realloc),o=I;j.privatekey_from_string(n,i,o);var _=b()[n/4+0],r=b()[n/4+1];if(b()[n/4+2])throw a(r);return t.__wrap(_)}finally{j.__wbindgen_add_to_stack_pointer(16)}}to_string(){let t,e;try{const n=j.__wbindgen_add_to_stack_pointer(-16);j.privatekey_to_string(n,this.__wbg_ptr);var _=b()[n/4+0],r=b()[n/4+1];return t=_,e=r,c(_,r)}finally{j.__wbindgen_add_to_stack_pointer(16),j.__wbindgen_free(t,e,1)}}to_view_key(){const t=j.privatekey_to_view_key(this.__wbg_ptr);return Tt.__wrap(t)}to_address(){const t=j.privatekey_to_address(this.__wbg_ptr);return $.__wrap(t)}sign(t){const e=y(t,j.__wbindgen_malloc),_=I,r=j.privatekey_sign(this.__wbg_ptr,e,_);return ht.__wrap(r)}static newEncrypted(t){try{const r=j.__wbindgen_add_to_stack_pointer(-16),n=w(t,j.__wbindgen_malloc,j.__wbindgen_realloc),i=I;j.privatekey_newEncrypted(r,n,i);var e=b()[r/4+0],_=b()[r/4+1];if(b()[r/4+2])throw a(_);return st.__wrap(e)}finally{j.__wbindgen_add_to_stack_pointer(16)}}toCiphertext(t){try{const r=j.__wbindgen_add_to_stack_pointer(-16),n=w(t,j.__wbindgen_malloc,j.__wbindgen_realloc),i=I;j.privatekey_toCiphertext(r,this.__wbg_ptr,n,i);var e=b()[r/4+0],_=b()[r/4+1];if(b()[r/4+2])throw a(_);return st.__wrap(e)}finally{j.__wbindgen_add_to_stack_pointer(16)}}static fromPrivateKeyCiphertext(e,_){try{const i=j.__wbindgen_add_to_stack_pointer(-16);p(e,st);const o=w(_,j.__wbindgen_malloc,j.__wbindgen_realloc),s=I;j.privatekey_fromPrivateKeyCiphertext(i,e.__wbg_ptr,o,s);var r=b()[i/4+0],n=b()[i/4+1];if(b()[i/4+2])throw a(n);return t.__wrap(r)}finally{j.__wbindgen_add_to_stack_pointer(16)}}};const at="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((t=>j.__wbg_privatekeyciphertext_free(t>>>0)));let st=class t{static __wrap(e){e>>>=0;const _=Object.create(t.prototype);return _.__wbg_ptr=e,at.register(_,_.__wbg_ptr,_),_}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,at.unregister(this),t}free(){const t=this.__destroy_into_raw();j.__wbg_privatekeyciphertext_free(t)}static encryptPrivateKey(e,_){try{const i=j.__wbindgen_add_to_stack_pointer(-16);p(e,ot);const o=w(_,j.__wbindgen_malloc,j.__wbindgen_realloc),s=I;j.privatekey_toCiphertext(i,e.__wbg_ptr,o,s);var r=b()[i/4+0],n=b()[i/4+1];if(b()[i/4+2])throw a(n);return t.__wrap(r)}finally{j.__wbindgen_add_to_stack_pointer(16)}}decryptToPrivateKey(t){try{const r=j.__wbindgen_add_to_stack_pointer(-16),n=w(t,j.__wbindgen_malloc,j.__wbindgen_realloc),i=I;j.privatekeyciphertext_decryptToPrivateKey(r,this.__wbg_ptr,n,i);var e=b()[r/4+0],_=b()[r/4+1];if(b()[r/4+2])throw a(_);return ot.__wrap(e)}finally{j.__wbindgen_add_to_stack_pointer(16)}}toString(){let t,e;try{const n=j.__wbindgen_add_to_stack_pointer(-16);j.privatekeyciphertext_toString(n,this.__wbg_ptr);var _=b()[n/4+0],r=b()[n/4+1];return t=_,e=r,c(_,r)}finally{j.__wbindgen_add_to_stack_pointer(16),j.__wbindgen_free(t,e,1)}}static fromString(e){try{const n=j.__wbindgen_add_to_stack_pointer(-16),i=w(e,j.__wbindgen_malloc,j.__wbindgen_realloc),o=I;j.privatekeyciphertext_fromString(n,i,o);var _=b()[n/4+0],r=b()[n/4+1];if(b()[n/4+2])throw a(r);return t.__wrap(_)}finally{j.__wbindgen_add_to_stack_pointer(16)}}};const ct="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((t=>j.__wbg_program_free(t>>>0)));let gt=class t{static __wrap(e){e>>>=0;const _=Object.create(t.prototype);return _.__wbg_ptr=e,ct.register(_,_.__wbg_ptr,_),_}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,ct.unregister(this),t}free(){const t=this.__destroy_into_raw();j.__wbg_program_free(t)}static fromString(e){try{const n=j.__wbindgen_add_to_stack_pointer(-16),i=w(e,j.__wbindgen_malloc,j.__wbindgen_realloc),o=I;j.program_fromString(n,i,o);var _=b()[n/4+0],r=b()[n/4+1];if(b()[n/4+2])throw a(r);return t.__wrap(_)}finally{j.__wbindgen_add_to_stack_pointer(16)}}toString(){let t,e;try{const n=j.__wbindgen_add_to_stack_pointer(-16);j.program_toString(n,this.__wbg_ptr);var _=b()[n/4+0],r=b()[n/4+1];return t=_,e=r,c(_,r)}finally{j.__wbindgen_add_to_stack_pointer(16),j.__wbindgen_free(t,e,1)}}hasFunction(t){const e=w(t,j.__wbindgen_malloc,j.__wbindgen_realloc),_=I;return 0!==j.program_hasFunction(this.__wbg_ptr,e,_)}getFunctions(){return a(j.program_getFunctions(this.__wbg_ptr))}getFunctionInputs(t){try{const r=j.__wbindgen_add_to_stack_pointer(-16),n=w(t,j.__wbindgen_malloc,j.__wbindgen_realloc),i=I;j.program_getFunctionInputs(r,this.__wbg_ptr,n,i);var e=b()[r/4+0],_=b()[r/4+1];if(b()[r/4+2])throw a(_);return a(e)}finally{j.__wbindgen_add_to_stack_pointer(16)}}getMappings(){try{const _=j.__wbindgen_add_to_stack_pointer(-16);j.program_getMappings(_,this.__wbg_ptr);var t=b()[_/4+0],e=b()[_/4+1];if(b()[_/4+2])throw a(e);return a(t)}finally{j.__wbindgen_add_to_stack_pointer(16)}}getRecordMembers(t){try{const r=j.__wbindgen_add_to_stack_pointer(-16),n=w(t,j.__wbindgen_malloc,j.__wbindgen_realloc),i=I;j.program_getRecordMembers(r,this.__wbg_ptr,n,i);var e=b()[r/4+0],_=b()[r/4+1];if(b()[r/4+2])throw a(_);return a(e)}finally{j.__wbindgen_add_to_stack_pointer(16)}}getStructMembers(t){try{const r=j.__wbindgen_add_to_stack_pointer(-16),n=w(t,j.__wbindgen_malloc,j.__wbindgen_realloc),i=I;j.program_getStructMembers(r,this.__wbg_ptr,n,i);var e=b()[r/4+0],_=b()[r/4+1];if(b()[r/4+2])throw a(_);return a(e)}finally{j.__wbindgen_add_to_stack_pointer(16)}}static getCreditsProgram(){const e=j.program_getCreditsProgram();return t.__wrap(e)}id(){let t,e;try{const n=j.__wbindgen_add_to_stack_pointer(-16);j.program_id(n,this.__wbg_ptr);var _=b()[n/4+0],r=b()[n/4+1];return t=_,e=r,c(_,r)}finally{j.__wbindgen_add_to_stack_pointer(16),j.__wbindgen_free(t,e,1)}}address(){try{const _=j.__wbindgen_add_to_stack_pointer(-16);j.program_address(_,this.__wbg_ptr);var t=b()[_/4+0],e=b()[_/4+1];if(b()[_/4+2])throw a(e);return $.__wrap(t)}finally{j.__wbindgen_add_to_stack_pointer(16)}}isEqual(e){p(e,t);return 0!==j.program_isEqual(this.__wbg_ptr,e.__wbg_ptr)}getImports(){return a(j.program_getImports(this.__wbg_ptr))}};const wt="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((t=>j.__wbg_programmanager_free(t>>>0)));let dt=class{__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,wt.unregister(this),t}free(){const t=this.__destroy_into_raw();j.__wbg_programmanager_free(t)}static buildDeploymentTransaction(t,e,_,r,n,i,o,s,c){p(t,ot);const b=w(e,j.__wbindgen_malloc,j.__wbindgen_realloc),l=I;let u=0;d(r)||(p(r,yt),u=r.__destroy_into_raw());var f=d(n)?0:w(n,j.__wbindgen_malloc,j.__wbindgen_realloc),y=I;let m=0;d(o)||(p(o,lt),m=o.__destroy_into_raw());let h=0;d(s)||(p(s,St),h=s.__destroy_into_raw());let v=0;d(c)||(p(c,nt),v=c.__destroy_into_raw());return a(j.programmanager_buildDeploymentTransaction(t.__wbg_ptr,b,l,_,u,f,y,d(i)?0:g(i),m,h,v))}static estimateDeploymentFee(t,e){const _=w(t,j.__wbindgen_malloc,j.__wbindgen_realloc),r=I;return a(j.programmanager_estimateDeploymentFee(_,r,d(e)?0:g(e)))}static estimateProgramNameCost(t){try{const r=j.__wbindgen_add_to_stack_pointer(-16),n=w(t,j.__wbindgen_malloc,j.__wbindgen_realloc),i=I;j.programmanager_estimateProgramNameCost(r,n,i);var e=h()[r/8+0],_=b()[r/4+2];if(b()[r/4+3])throw a(_);return BigInt.asUintN(64,e)}finally{j.__wbindgen_add_to_stack_pointer(16)}}static executeFunctionOffline(t,e,_,r,n,i,o,s,c,b,l){p(t,ot);const u=w(e,j.__wbindgen_malloc,j.__wbindgen_realloc),f=I,y=w(_,j.__wbindgen_malloc,j.__wbindgen_realloc),m=I;let h=0;d(s)||(p(s,lt),h=s.__destroy_into_raw());let v=0;d(c)||(p(c,St),v=c.__destroy_into_raw());var k=d(b)?0:w(b,j.__wbindgen_malloc,j.__wbindgen_realloc),P=I;let S=0;d(l)||(p(l,nt),S=l.__destroy_into_raw());return a(j.programmanager_executeFunctionOffline(t.__wbg_ptr,u,f,y,m,g(r),n,i,d(o)?0:g(o),h,v,k,P,S))}static buildExecutionTransaction(t,e,_,r,n,i,o,s,c,b,l,u,f){p(t,ot);const y=w(e,j.__wbindgen_malloc,j.__wbindgen_realloc),m=I,h=w(_,j.__wbindgen_malloc,j.__wbindgen_realloc),v=I;let k=0;d(i)||(p(i,yt),k=i.__destroy_into_raw());var P=d(o)?0:w(o,j.__wbindgen_malloc,j.__wbindgen_realloc),S=I;let x=0;d(c)||(p(c,lt),x=c.__destroy_into_raw());let T=0;d(b)||(p(b,St),T=b.__destroy_into_raw());let V=0;d(l)||(p(l,lt),V=l.__destroy_into_raw());let F=0;d(u)||(p(u,St),F=u.__destroy_into_raw());let R=0;d(f)||(p(f,nt),R=f.__destroy_into_raw());return a(j.programmanager_buildExecutionTransaction(t.__wbg_ptr,y,m,h,v,g(r),n,k,P,S,d(s)?0:g(s),x,T,V,F,R))}static estimateExecutionFee(t,e,_,r,n,i,o,s,c){p(t,ot);const b=w(e,j.__wbindgen_malloc,j.__wbindgen_realloc),l=I,u=w(_,j.__wbindgen_malloc,j.__wbindgen_realloc),f=I;var y=d(n)?0:w(n,j.__wbindgen_malloc,j.__wbindgen_realloc),m=I;let h=0;d(o)||(p(o,lt),h=o.__destroy_into_raw());let v=0;d(s)||(p(s,St),v=s.__destroy_into_raw());let k=0;d(c)||(p(c,nt),k=c.__destroy_into_raw());return a(j.programmanager_estimateExecutionFee(t.__wbg_ptr,b,l,u,f,g(r),y,m,d(i)?0:g(i),h,v,k))}static estimateFinalizeFee(t,e){try{const n=j.__wbindgen_add_to_stack_pointer(-16),i=w(t,j.__wbindgen_malloc,j.__wbindgen_realloc),o=I,s=w(e,j.__wbindgen_malloc,j.__wbindgen_realloc),c=I;j.programmanager_estimateFinalizeFee(n,i,o,s,c);var _=h()[n/8+0],r=b()[n/4+2];if(b()[n/4+3])throw a(r);return BigInt.asUintN(64,_)}finally{j.__wbindgen_add_to_stack_pointer(16)}}static buildJoinTransaction(t,e,_,r,n,i,o,s,c,g,b){p(t,ot),p(e,yt);var l=e.__destroy_into_raw();p(_,yt);var u=_.__destroy_into_raw();let f=0;d(n)||(p(n,yt),f=n.__destroy_into_raw());var y=d(i)?0:w(i,j.__wbindgen_malloc,j.__wbindgen_realloc),m=I;let h=0;d(o)||(p(o,lt),h=o.__destroy_into_raw());let v=0;d(s)||(p(s,St),v=s.__destroy_into_raw());let k=0;d(c)||(p(c,lt),k=c.__destroy_into_raw());let P=0;d(g)||(p(g,St),P=g.__destroy_into_raw());let S=0;d(b)||(p(b,nt),S=b.__destroy_into_raw());return a(j.programmanager_buildJoinTransaction(t.__wbg_ptr,l,u,r,f,y,m,h,v,k,P,S))}static buildSplitTransaction(t,e,_,r,n,i,o){p(t,ot),p(_,yt);var s=_.__destroy_into_raw(),c=d(r)?0:w(r,j.__wbindgen_malloc,j.__wbindgen_realloc),g=I;let b=0;d(n)||(p(n,lt),b=n.__destroy_into_raw());let l=0;d(i)||(p(i,St),l=i.__destroy_into_raw());let u=0;d(o)||(p(o,nt),u=o.__destroy_into_raw());return a(j.programmanager_buildSplitTransaction(t.__wbg_ptr,e,s,c,g,b,l,u))}static buildTransferTransaction(t,e,_,r,n,i,o,s,c,g,b,l,u,f){p(t,ot);const y=w(_,j.__wbindgen_malloc,j.__wbindgen_realloc),m=I,h=w(r,j.__wbindgen_malloc,j.__wbindgen_realloc),v=I;var k=d(n)?0:w(n,j.__wbindgen_malloc,j.__wbindgen_realloc),P=I;let S=0;d(i)||(p(i,yt),S=i.__destroy_into_raw());let x=0;d(s)||(p(s,yt),x=s.__destroy_into_raw());var T=d(c)?0:w(c,j.__wbindgen_malloc,j.__wbindgen_realloc),V=I;let F=0;d(g)||(p(g,lt),F=g.__destroy_into_raw());let R=0;d(b)||(p(b,St),R=b.__destroy_into_raw());let E=0;d(l)||(p(l,lt),E=l.__destroy_into_raw());let z=0;d(u)||(p(u,St),z=u.__destroy_into_raw());let A=0;d(f)||(p(f,nt),A=f.__destroy_into_raw());return a(j.programmanager_buildTransferTransaction(t.__wbg_ptr,e,y,m,h,v,k,P,S,o,x,T,V,F,R,E,z,A))}static synthesizeKeyPair(t,e,_,r,n){p(t,ot);const i=w(e,j.__wbindgen_malloc,j.__wbindgen_realloc),o=I,s=w(_,j.__wbindgen_malloc,j.__wbindgen_realloc),c=I;return a(j.programmanager_synthesizeKeyPair(t.__wbg_ptr,i,o,s,c,g(r),d(n)?0:g(n)))}};const bt="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((t=>j.__wbg_provingkey_free(t>>>0)));let lt=class t{static __wrap(e){e>>>=0;const _=Object.create(t.prototype);return _.__wbg_ptr=e,bt.register(_,_.__wbg_ptr,_),_}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,bt.unregister(this),t}free(){const t=this.__destroy_into_raw();j.__wbg_provingkey_free(t)}isBondPublicProver(){return 0!==j.provingkey_isBondPublicProver(this.__wbg_ptr)}isBondValidatorProver(){return 0!==j.provingkey_isBondValidatorProver(this.__wbg_ptr)}isClaimUnbondPublicProver(){return 0!==j.provingkey_isClaimUnbondPublicProver(this.__wbg_ptr)}isFeePrivateProver(){return 0!==j.provingkey_isFeePrivateProver(this.__wbg_ptr)}isFeePublicProver(){return 0!==j.provingkey_isFeePublicProver(this.__wbg_ptr)}isInclusionProver(){return 0!==j.provingkey_isInclusionProver(this.__wbg_ptr)}isJoinProver(){return 0!==j.provingkey_isJoinProver(this.__wbg_ptr)}isSetValidatorStateProver(){return 0!==j.provingkey_isSetValidatorStateProver(this.__wbg_ptr)}isSplitProver(){return 0!==j.provingkey_isSplitProver(this.__wbg_ptr)}isTransferPrivateProver(){return 0!==j.provingkey_isTransferPrivateProver(this.__wbg_ptr)}isTransferPrivateToPublicProver(){return 0!==j.provingkey_isTransferPrivateToPublicProver(this.__wbg_ptr)}isTransferPublicProver(){return 0!==j.provingkey_isTransferPublicProver(this.__wbg_ptr)}isTransferPublicAsSignerProver(){return 0!==j.provingkey_isTransferPublicAsSignerProver(this.__wbg_ptr)}isTransferPublicToPrivateProver(){return 0!==j.provingkey_isTransferPublicToPrivateProver(this.__wbg_ptr)}isUnbondPublicProver(){return 0!==j.provingkey_isUnbondPublicProver(this.__wbg_ptr)}checksum(){let t,e;try{const n=j.__wbindgen_add_to_stack_pointer(-16);j.provingkey_checksum(n,this.__wbg_ptr);var _=b()[n/4+0],r=b()[n/4+1];return t=_,e=r,c(_,r)}finally{j.__wbindgen_add_to_stack_pointer(16),j.__wbindgen_free(t,e,1)}}copy(){const e=j.provingkey_copy(this.__wbg_ptr);return t.__wrap(e)}static fromBytes(e){try{const n=j.__wbindgen_add_to_stack_pointer(-16),i=y(e,j.__wbindgen_malloc),o=I;j.provingkey_fromBytes(n,i,o);var _=b()[n/4+0],r=b()[n/4+1];if(b()[n/4+2])throw a(r);return t.__wrap(_)}finally{j.__wbindgen_add_to_stack_pointer(16)}}static fromString(e){try{const n=j.__wbindgen_add_to_stack_pointer(-16),i=w(e,j.__wbindgen_malloc,j.__wbindgen_realloc),o=I;j.provingkey_fromString(n,i,o);var _=b()[n/4+0],r=b()[n/4+1];if(b()[n/4+2])throw a(r);return t.__wrap(_)}finally{j.__wbindgen_add_to_stack_pointer(16)}}toBytes(){try{const n=j.__wbindgen_add_to_stack_pointer(-16);j.provingkey_toBytes(n,this.__wbg_ptr);var t=b()[n/4+0],e=b()[n/4+1],_=b()[n/4+2];if(b()[n/4+3])throw a(_);var r=v(t,e).slice();return j.__wbindgen_free(t,1*e,1),r}finally{j.__wbindgen_add_to_stack_pointer(16)}}toString(){let t,e;try{const n=j.__wbindgen_add_to_stack_pointer(-16);j.provingkey_toString(n,this.__wbg_ptr);var _=b()[n/4+0],r=b()[n/4+1];return t=_,e=r,c(_,r)}finally{j.__wbindgen_add_to_stack_pointer(16),j.__wbindgen_free(t,e,1)}}};const ut="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((t=>j.__wbg_recordciphertext_free(t>>>0)));let ft=class t{static __wrap(e){e>>>=0;const _=Object.create(t.prototype);return _.__wbg_ptr=e,ut.register(_,_.__wbg_ptr,_),_}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,ut.unregister(this),t}free(){const t=this.__destroy_into_raw();j.__wbg_recordciphertext_free(t)}static fromString(e){try{const n=j.__wbindgen_add_to_stack_pointer(-16),i=w(e,j.__wbindgen_malloc,j.__wbindgen_realloc),o=I;j.recordciphertext_fromString(n,i,o);var _=b()[n/4+0],r=b()[n/4+1];if(b()[n/4+2])throw a(r);return t.__wrap(_)}finally{j.__wbindgen_add_to_stack_pointer(16)}}toString(){let t,e;try{const n=j.__wbindgen_add_to_stack_pointer(-16);j.recordciphertext_toString(n,this.__wbg_ptr);var _=b()[n/4+0],r=b()[n/4+1];return t=_,e=r,c(_,r)}finally{j.__wbindgen_add_to_stack_pointer(16),j.__wbindgen_free(t,e,1)}}decrypt(t){try{const r=j.__wbindgen_add_to_stack_pointer(-16);p(t,Tt),j.recordciphertext_decrypt(r,this.__wbg_ptr,t.__wbg_ptr);var e=b()[r/4+0],_=b()[r/4+1];if(b()[r/4+2])throw a(_);return yt.__wrap(e)}finally{j.__wbindgen_add_to_stack_pointer(16)}}isOwner(t){p(t,Tt);return 0!==j.recordciphertext_isOwner(this.__wbg_ptr,t.__wbg_ptr)}};const pt="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((t=>j.__wbg_recordplaintext_free(t>>>0)));let yt=class t{static __wrap(e){e>>>=0;const _=Object.create(t.prototype);return _.__wbg_ptr=e,pt.register(_,_.__wbg_ptr,_),_}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,pt.unregister(this),t}free(){const t=this.__destroy_into_raw();j.__wbg_recordplaintext_free(t)}commitment(t,e){try{const n=j.__wbindgen_add_to_stack_pointer(-16),i=w(t,j.__wbindgen_malloc,j.__wbindgen_realloc),o=I,s=w(e,j.__wbindgen_malloc,j.__wbindgen_realloc),c=I;j.recordplaintext_commitment(n,this.__wbg_ptr,i,o,s,c);var _=b()[n/4+0],r=b()[n/4+1];if(b()[n/4+2])throw a(r);return Q.__wrap(_)}finally{j.__wbindgen_add_to_stack_pointer(16)}}static fromString(e){try{const n=j.__wbindgen_add_to_stack_pointer(-16),i=w(e,j.__wbindgen_malloc,j.__wbindgen_realloc),o=I;j.recordplaintext_fromString(n,i,o);var _=b()[n/4+0],r=b()[n/4+1];if(b()[n/4+2])throw a(r);return t.__wrap(_)}finally{j.__wbindgen_add_to_stack_pointer(16)}}toString(){let t,e;try{const n=j.__wbindgen_add_to_stack_pointer(-16);j.recordplaintext_toString(n,this.__wbg_ptr);var _=b()[n/4+0],r=b()[n/4+1];return t=_,e=r,c(_,r)}finally{j.__wbindgen_add_to_stack_pointer(16),j.__wbindgen_free(t,e,1)}}microcredits(){const t=j.recordplaintext_microcredits(this.__wbg_ptr);return BigInt.asUintN(64,t)}nonce(){let t,e;try{const n=j.__wbindgen_add_to_stack_pointer(-16);j.recordplaintext_nonce(n,this.__wbg_ptr);var _=b()[n/4+0],r=b()[n/4+1];return t=_,e=r,c(_,r)}finally{j.__wbindgen_add_to_stack_pointer(16),j.__wbindgen_free(t,e,1)}}serialNumberString(t,e,_){let r,n;try{const u=j.__wbindgen_add_to_stack_pointer(-16);p(t,ot);const f=w(e,j.__wbindgen_malloc,j.__wbindgen_realloc),y=I,m=w(_,j.__wbindgen_malloc,j.__wbindgen_realloc),h=I;j.recordplaintext_serialNumberString(u,this.__wbg_ptr,t.__wbg_ptr,f,y,m,h);var i=b()[u/4+0],o=b()[u/4+1],s=b()[u/4+2],g=b()[u/4+3],d=i,l=o;if(g)throw d=0,l=0,a(s);return r=d,n=l,c(d,l)}finally{j.__wbindgen_add_to_stack_pointer(16),j.__wbindgen_free(r,n,1)}}};const mt="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((t=>j.__wbg_signature_free(t>>>0)));let ht=class t{static __wrap(e){e>>>=0;const _=Object.create(t.prototype);return _.__wbg_ptr=e,mt.register(_,_.__wbg_ptr,_),_}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,mt.unregister(this),t}free(){const t=this.__destroy_into_raw();j.__wbg_signature_free(t)}static sign(e,_){p(e,ot);const r=y(_,j.__wbindgen_malloc),n=I,i=j.privatekey_sign(e.__wbg_ptr,r,n);return t.__wrap(i)}verify(t,e){p(t,$);const _=y(e,j.__wbindgen_malloc),r=I;return 0!==j.signature_verify(this.__wbg_ptr,t.__wbg_ptr,_,r)}static from_string(e){const _=w(e,j.__wbindgen_malloc,j.__wbindgen_realloc),r=I,n=j.signature_from_string(_,r);return t.__wrap(n)}to_string(){let t,e;try{const n=j.__wbindgen_add_to_stack_pointer(-16);j.signature_to_string(n,this.__wbg_ptr);var _=b()[n/4+0],r=b()[n/4+1];return t=_,e=r,c(_,r)}finally{j.__wbindgen_add_to_stack_pointer(16),j.__wbindgen_free(t,e,1)}}};const vt="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((t=>j.__wbg_transaction_free(t>>>0)));let kt=class t{static __wrap(e){e>>>=0;const _=Object.create(t.prototype);return _.__wbg_ptr=e,vt.register(_,_.__wbg_ptr,_),_}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,vt.unregister(this),t}free(){const t=this.__destroy_into_raw();j.__wbg_transaction_free(t)}static fromString(e){try{const n=j.__wbindgen_add_to_stack_pointer(-16),i=w(e,j.__wbindgen_malloc,j.__wbindgen_realloc),o=I;j.transaction_fromString(n,i,o);var _=b()[n/4+0],r=b()[n/4+1];if(b()[n/4+2])throw a(r);return t.__wrap(_)}finally{j.__wbindgen_add_to_stack_pointer(16)}}toString(){let t,e;try{const n=j.__wbindgen_add_to_stack_pointer(-16);j.transaction_toString(n,this.__wbg_ptr);var _=b()[n/4+0],r=b()[n/4+1];return t=_,e=r,c(_,r)}finally{j.__wbindgen_add_to_stack_pointer(16),j.__wbindgen_free(t,e,1)}}transactionId(){let t,e;try{const n=j.__wbindgen_add_to_stack_pointer(-16);j.transaction_transactionId(n,this.__wbg_ptr);var _=b()[n/4+0],r=b()[n/4+1];return t=_,e=r,c(_,r)}finally{j.__wbindgen_add_to_stack_pointer(16),j.__wbindgen_free(t,e,1)}}transactionType(){let t,e;try{const n=j.__wbindgen_add_to_stack_pointer(-16);j.transaction_transactionType(n,this.__wbg_ptr);var _=b()[n/4+0],r=b()[n/4+1];return t=_,e=r,c(_,r)}finally{j.__wbindgen_add_to_stack_pointer(16),j.__wbindgen_free(t,e,1)}}};const Pt="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((t=>j.__wbg_verifyingkey_free(t>>>0)));let St=class t{static __wrap(e){e>>>=0;const _=Object.create(t.prototype);return _.__wbg_ptr=e,Pt.register(_,_.__wbg_ptr,_),_}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,Pt.unregister(this),t}free(){const t=this.__destroy_into_raw();j.__wbg_verifyingkey_free(t)}static bondPublicVerifier(){const e=j.verifyingkey_bondPublicVerifier();return t.__wrap(e)}static bondValidatorVerifier(){const e=j.verifyingkey_bondValidatorVerifier();return t.__wrap(e)}static claimUnbondPublicVerifier(){const e=j.verifyingkey_claimUnbondPublicVerifier();return t.__wrap(e)}static feePrivateVerifier(){const e=j.verifyingkey_feePrivateVerifier();return t.__wrap(e)}static feePublicVerifier(){const e=j.verifyingkey_feePublicVerifier();return t.__wrap(e)}static inclusionVerifier(){const e=j.verifyingkey_inclusionVerifier();return t.__wrap(e)}static joinVerifier(){const e=j.verifyingkey_joinVerifier();return t.__wrap(e)}static setValidatorStateVerifier(){const e=j.verifyingkey_setValidatorStateVerifier();return t.__wrap(e)}static splitVerifier(){const e=j.verifyingkey_splitVerifier();return t.__wrap(e)}static transferPrivateVerifier(){const e=j.verifyingkey_transferPrivateVerifier();return t.__wrap(e)}static transferPrivateToPublicVerifier(){const e=j.verifyingkey_transferPrivateToPublicVerifier();return t.__wrap(e)}static transferPublicVerifier(){const e=j.verifyingkey_transferPublicVerifier();return t.__wrap(e)}static transferPublicAsSignerVerifier(){const e=j.verifyingkey_transferPublicAsSignerVerifier();return t.__wrap(e)}static transferPublicToPrivateVerifier(){const e=j.verifyingkey_transferPublicToPrivateVerifier();return t.__wrap(e)}static unbondPublicVerifier(){const e=j.verifyingkey_unbondPublicVerifier();return t.__wrap(e)}isBondPublicVerifier(){return 0!==j.verifyingkey_isBondPublicVerifier(this.__wbg_ptr)}isBondValidatorVerifier(){return 0!==j.verifyingkey_isBondValidatorVerifier(this.__wbg_ptr)}isClaimUnbondPublicVerifier(){return 0!==j.verifyingkey_isClaimUnbondPublicVerifier(this.__wbg_ptr)}isFeePrivateVerifier(){return 0!==j.verifyingkey_isFeePrivateVerifier(this.__wbg_ptr)}isFeePublicVerifier(){return 0!==j.verifyingkey_isFeePublicVerifier(this.__wbg_ptr)}isInclusionVerifier(){return 0!==j.verifyingkey_isInclusionVerifier(this.__wbg_ptr)}isJoinVerifier(){return 0!==j.verifyingkey_isJoinVerifier(this.__wbg_ptr)}isSetValidatorStateVerifier(){return 0!==j.verifyingkey_isSetValidatorStateVerifier(this.__wbg_ptr)}isSplitVerifier(){return 0!==j.verifyingkey_isSplitVerifier(this.__wbg_ptr)}isTransferPrivateVerifier(){return 0!==j.verifyingkey_isTransferPrivateVerifier(this.__wbg_ptr)}isTransferPrivateToPublicVerifier(){return 0!==j.verifyingkey_isTransferPrivateToPublicVerifier(this.__wbg_ptr)}isTransferPublicVerifier(){return 0!==j.verifyingkey_isTransferPublicVerifier(this.__wbg_ptr)}isTransferPublicAsSignerVerifier(){return 0!==j.verifyingkey_isTransferPublicAsSignerVerifier(this.__wbg_ptr)}isTransferPublicToPrivateVerifier(){return 0!==j.verifyingkey_isTransferPublicToPrivateVerifier(this.__wbg_ptr)}isUnbondPublicVerifier(){return 0!==j.verifyingkey_isUnbondPublicVerifier(this.__wbg_ptr)}checksum(){let t,e;try{const n=j.__wbindgen_add_to_stack_pointer(-16);j.verifyingkey_checksum(n,this.__wbg_ptr);var _=b()[n/4+0],r=b()[n/4+1];return t=_,e=r,c(_,r)}finally{j.__wbindgen_add_to_stack_pointer(16),j.__wbindgen_free(t,e,1)}}copy(){const e=j.verifyingkey_copy(this.__wbg_ptr);return t.__wrap(e)}static fromBytes(e){try{const n=j.__wbindgen_add_to_stack_pointer(-16),i=y(e,j.__wbindgen_malloc),o=I;j.verifyingkey_fromBytes(n,i,o);var _=b()[n/4+0],r=b()[n/4+1];if(b()[n/4+2])throw a(r);return t.__wrap(_)}finally{j.__wbindgen_add_to_stack_pointer(16)}}static fromString(e){try{const n=j.__wbindgen_add_to_stack_pointer(-16),i=w(e,j.__wbindgen_malloc,j.__wbindgen_realloc),o=I;j.verifyingkey_fromString(n,i,o);var _=b()[n/4+0],r=b()[n/4+1];if(b()[n/4+2])throw a(r);return t.__wrap(_)}finally{j.__wbindgen_add_to_stack_pointer(16)}}toBytes(){try{const n=j.__wbindgen_add_to_stack_pointer(-16);j.verifyingkey_toBytes(n,this.__wbg_ptr);var t=b()[n/4+0],e=b()[n/4+1],_=b()[n/4+2];if(b()[n/4+3])throw a(_);var r=v(t,e).slice();return j.__wbindgen_free(t,1*e,1),r}finally{j.__wbindgen_add_to_stack_pointer(16)}}toString(){let t,e;try{const n=j.__wbindgen_add_to_stack_pointer(-16);j.verifyingkey_toString(n,this.__wbg_ptr);var _=b()[n/4+0],r=b()[n/4+1];return t=_,e=r,c(_,r)}finally{j.__wbindgen_add_to_stack_pointer(16),j.__wbindgen_free(t,e,1)}}};const xt="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((t=>j.__wbg_viewkey_free(t>>>0)));let Tt=class t{static __wrap(e){e>>>=0;const _=Object.create(t.prototype);return _.__wbg_ptr=e,xt.register(_,_.__wbg_ptr,_),_}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,xt.unregister(this),t}free(){const t=this.__destroy_into_raw();j.__wbg_viewkey_free(t)}static from_private_key(e){p(e,ot);const _=j.privatekey_to_view_key(e.__wbg_ptr);return t.__wrap(_)}static from_string(e){const _=w(e,j.__wbindgen_malloc,j.__wbindgen_realloc),r=I,n=j.viewkey_from_string(_,r);return t.__wrap(n)}to_string(){let t,e;try{const n=j.__wbindgen_add_to_stack_pointer(-16);j.viewkey_to_string(n,this.__wbg_ptr);var _=b()[n/4+0],r=b()[n/4+1];return t=_,e=r,c(_,r)}finally{j.__wbindgen_add_to_stack_pointer(16),j.__wbindgen_free(t,e,1)}}to_address(){const t=j.address_from_view_key(this.__wbg_ptr);return $.__wrap(t)}decrypt(t){let e,_;try{const d=j.__wbindgen_add_to_stack_pointer(-16),l=w(t,j.__wbindgen_malloc,j.__wbindgen_realloc),u=I;j.viewkey_decrypt(d,this.__wbg_ptr,l,u);var r=b()[d/4+0],n=b()[d/4+1],i=b()[d/4+2],o=b()[d/4+3],s=r,g=n;if(o)throw s=0,g=0,a(i);return e=s,_=g,c(s,g)}finally{j.__wbindgen_add_to_stack_pointer(16),j.__wbindgen_free(e,_,1)}}};async function T(t,e){if("function"==typeof Response&&t instanceof Response){if("function"==typeof WebAssembly.instantiateStreaming)try{return await WebAssembly.instantiateStreaming(t,e)}catch(e){if("application/wasm"==t.headers.get("Content-Type"))throw e;console.warn("`WebAssembly.instantiateStreaming` failed because your server does not serve wasm with `application/wasm` MIME type. Falling back to `WebAssembly.instantiate` which is slower. Original error:\n",e)}const _=await t.arrayBuffer();return await WebAssembly.instantiate(_,e)}{const _=await WebAssembly.instantiate(t,e);return _ instanceof WebAssembly.Instance?{instance:_,module:t}:_}}function V(){const t={wbg:{}};return t.wbg.__wbindgen_object_drop_ref=function(t){a(t)},t.wbg.__wbg_new_71801a555ad9f2aa=function(){return S((function(){return g(new XMLHttpRequest)}),arguments)},t.wbg.__wbg_overrideMimeType_ee9c51919ceb418b=function(){return S((function(t,e,_){i(t).overrideMimeType(c(e,_))}),arguments)},t.wbg.__wbg_open_c9eb0cf2c9d95679=function(){return S((function(t,e,_,r,n,o){i(t).open(c(e,_),c(r,n),0!==o)}),arguments)},t.wbg.__wbg_send_80d29985093c1ec5=function(){return S((function(t){i(t).send()}),arguments)},t.wbg.__wbg_response_7c2e2759084f7279=function(){return S((function(t){return g(i(t).response)}),arguments)},t.wbg.__wbg_status_d485fb5a478426fb=function(){return S((function(t){return i(t).status}),arguments)},t.wbg.__wbg_new_72fb9a18b5ae2624=function(){return g(new Object)},t.wbg.__wbindgen_string_new=function(t,e){return g(c(t,e))},t.wbg.__wbg_set_1f9b04f170055d33=function(){return S((function(t,e,_){return Reflect.set(i(t),i(e),i(_))}),arguments)},t.wbg.__wbg_new_ab6fd82b10560829=function(){return S((function(){return g(new Headers)}),arguments)},t.wbg.__wbindgen_object_clone_ref=function(t){return g(i(t))},t.wbg.__wbg_new_0d76b0581eca6298=function(){return S((function(){return g(new AbortController)}),arguments)},t.wbg.__wbg_signal_a61f78a3478fd9bc=function(t){return g(i(t).signal)},t.wbg.__wbg_append_7bfcb4937d1d5e29=function(){return S((function(t,e,_,r,n){i(t).append(c(e,_),c(r,n))}),arguments)},t.wbg.__wbg_instanceof_Response_849eb93e75734b6e=function(t){let e;try{e=i(t)instanceof Response}catch(t){e=!1}return e},t.wbg.__wbg_status_61a01141acd3cf74=function(t){return i(t).status},t.wbg.__wbg_url_5f6dc4009ac5f99d=function(t,e){const _=w(i(e).url,j.__wbindgen_malloc,j.__wbindgen_realloc),r=I;b()[t/4+1]=r,b()[t/4+0]=_},t.wbg.__wbg_headers_9620bfada380764a=function(t){return g(i(t).headers)},t.wbg.__wbg_iterator_2cee6dadfd956dfa=function(){return g(Symbol.iterator)},t.wbg.__wbg_get_e3c254076557e348=function(){return S((function(t,e){return g(Reflect.get(i(t),i(e)))}),arguments)},t.wbg.__wbindgen_is_function=function(t){return"function"==typeof i(t)},t.wbg.__wbg_call_27c0f87801dedf93=function(){return S((function(t,e){return g(i(t).call(i(e)))}),arguments)},t.wbg.__wbindgen_is_object=function(t){const e=i(t);return"object"==typeof e&&null!==e},t.wbg.__wbg_next_40fc327bfc8770e6=function(t){return g(i(t).next)},t.wbg.__wbg_next_196c84450b364254=function(){return S((function(t){return g(i(t).next())}),arguments)},t.wbg.__wbg_done_298b57d23c0fc80c=function(t){return i(t).done},t.wbg.__wbg_value_d93c65011f51a456=function(t){return g(i(t).value)},t.wbg.__wbg_abort_2aa7521d5690750e=function(t){i(t).abort()},t.wbg.__wbg_stringify_8887fe74e1c50d81=function(){return S((function(t){return g(JSON.stringify(i(t)))}),arguments)},t.wbg.__wbindgen_string_get=function(t,e){const _=i(e),r="string"==typeof _?_:void 0;var n=d(r)?0:w(r,j.__wbindgen_malloc,j.__wbindgen_realloc),o=I;b()[t/4+1]=o,b()[t/4+0]=n},t.wbg.__wbg_log_0159ca40cddf5b15=function(t,e){console.log(c(t,e))},t.wbg.__wbindgen_bigint_from_u64=function(t){return g(BigInt.asUintN(64,t))},t.wbg.__wbg_call_b3ca7c6051f9bec1=function(){return S((function(t,e,_){return g(i(t).call(i(e),i(_)))}),arguments)},t.wbg.__wbg_keypair_new=function(t){return g(tt.__wrap(t))},t.wbg.__wbindgen_module=function(){return g(z.__wbindgen_wasm_module)},t.wbg.__wbindgen_memory=function(){return g(j.memory)},t.wbg.__wbg_spawnWorker_f6acaddb2e29dc4a=function(t,e,_,r){return g(n(i(t),i(e),i(_),r>>>0))},t.wbg.__wbg_executionresponse_new=function(t){return g(X.__wrap(t))},t.wbg.__wbg_transaction_new=function(t){return g(kt.__wrap(t))},t.wbg.__wbg_newwithlength_66ae46612e7f0234=function(t){return g(new Array(t>>>0))},t.wbg.__wbg_set_d4638f722068f043=function(t,e,_){i(t)[e>>>0]=a(_)},t.wbg.__wbindgen_cb_drop=function(t){const e=a(t).original;if(1==e.cnt--)return e.a=0,!0;return!1},t.wbg.__wbg_new_16b304a2cfa7ff4a=function(){return g(new Array)},t.wbg.__wbg_push_a5b05aedc7234f9f=function(t,e){return i(t).push(i(e))},t.wbg.__wbg_arrayBuffer_29931d52c7206b02=function(){return S((function(t){return g(i(t).arrayBuffer())}),arguments)},t.wbg.__wbg_new_63b92bc8671ed464=function(t){return g(new Uint8Array(i(t)))},t.wbg.__wbg_length_c20a40f15020d68a=function(t){return i(t).length},t.wbg.__wbg_new_81740750da40724f=function(t,e){try{var _={a:t,b:e};const r=new Promise(((t,e)=>{const r=_.a;_.a=0;try{return x(r,_.b,t,e)}finally{_.a=r}}));return g(r)}finally{_.a=_.b=0}},t.wbg.__wbindgen_number_new=function(t){return g(t)},t.wbg.__wbg_new_abda76e883ba8a5f=function(){return g(new Error)},t.wbg.__wbg_stack_658279fe44541cf6=function(t,e){const _=w(i(e).stack,j.__wbindgen_malloc,j.__wbindgen_realloc),r=I;b()[t/4+1]=r,b()[t/4+0]=_},t.wbg.__wbg_error_f851667af71bcfc6=function(t,e){let _,r;try{_=t,r=e,console.error(c(t,e))}finally{j.__wbindgen_free(_,r,1)}},t.wbg.__wbg_buffer_12d079cc21e14bdb=function(t){return g(i(t).buffer)},t.wbg.__wbg_newwithbyteoffsetandlength_aa4a17c33a06e5cb=function(t,e,_){return g(new Uint8Array(i(t),e>>>0,_>>>0))},t.wbg.__wbg_randomFillSync_5c9c955aa56b6049=function(){return S((function(t,e){i(t).randomFillSync(a(e))}),arguments)},t.wbg.__wbg_subarray_a1f73cd4b5b42fe1=function(t,e,_){return g(i(t).subarray(e>>>0,_>>>0))},t.wbg.__wbg_getRandomValues_3aa56aa6edec874c=function(){return S((function(t,e){i(t).getRandomValues(i(e))}),arguments)},t.wbg.__wbg_set_a47bac70306a19a7=function(t,e,_){i(t).set(i(e),_>>>0)},t.wbg.__wbg_crypto_1d1f22824a6a080c=function(t){return g(i(t).crypto)},t.wbg.__wbg_process_4a72847cc503995b=function(t){return g(i(t).process)},t.wbg.__wbg_versions_f686565e586dd935=function(t){return g(i(t).versions)},t.wbg.__wbg_node_104a2ff8d6ea03a2=function(t){return g(i(t).node)},t.wbg.__wbindgen_is_string=function(t){return"string"==typeof i(t)},t.wbg.__wbg_require_cca90b1a94a0255b=function(){return S((function(){return g(module.require)}),arguments)},t.wbg.__wbg_msCrypto_eb05e62b530a1508=function(t){return g(i(t).msCrypto)},t.wbg.__wbg_newwithlength_e9b4878cebadb3d3=function(t){return g(new Uint8Array(t>>>0))},t.wbg.__wbg_length_cd7af8117672b8b8=function(t){return i(t).length},t.wbg.__wbg_get_bd8e338fbd5f5cc8=function(t,e){return g(i(t)[e>>>0])},t.wbg.__wbg_self_ce0dbfc45cf2f5be=function(){return S((function(){return g(self.self)}),arguments)},t.wbg.__wbg_window_c6fb939a7f436783=function(){return S((function(){return g(window.window)}),arguments)},t.wbg.__wbg_globalThis_d1e6af4856ba331b=function(){return S((function(){return g(globalThis.globalThis)}),arguments)},t.wbg.__wbg_global_207b558942527489=function(){return S((function(){return g(global.global)}),arguments)},t.wbg.__wbindgen_is_undefined=function(t){return void 0===i(t)},t.wbg.__wbg_newnoargs_e258087cd0daa0ea=function(t,e){return g(new Function(c(t,e)))},t.wbg.__wbg_has_0af94d20077affa2=function(){return S((function(t,e){return Reflect.has(i(t),i(e))}),arguments)},t.wbg.__wbg_fetch_bc7c8e27076a5c84=function(t){return g(fetch(i(t)))},t.wbg.__wbg_fetch_921fad6ef9e883dd=function(t,e){return g(i(t).fetch(i(e)))},t.wbg.__wbindgen_debug_string=function(t,e){const _=w(l(i(e)),j.__wbindgen_malloc,j.__wbindgen_realloc),r=I;b()[t/4+1]=r,b()[t/4+0]=_},t.wbg.__wbindgen_throw=function(t,e){throw new Error(c(t,e))},t.wbg.__wbindgen_rethrow=function(t){throw a(t)},t.wbg.__wbg_then_a73caa9a87991566=function(t,e,_){return g(i(t).then(i(e),i(_)))},t.wbg.__wbg_then_0c86a60e8fcfe9f6=function(t,e){return g(i(t).then(i(e)))},t.wbg.__wbg_queueMicrotask_481971b0d87f3dd4=function(t){queueMicrotask(i(t))},t.wbg.__wbg_queueMicrotask_3cbae2ec6b6cd3d6=function(t){return g(i(t).queueMicrotask)},t.wbg.__wbg_resolve_b0083a7967828ec8=function(t){return g(Promise.resolve(i(t)))},t.wbg.__wbg_waitAsync_5d743fc9058ba01a=function(){return g(Atomics.waitAsync)},t.wbg.__wbg_new_8cccba86b0f574cb=function(t){return g(new Int32Array(i(t)))},t.wbg.__wbg_waitAsync_46d5c36955b71a79=function(t,e,_){return g(Atomics.waitAsync(i(t),e,_))},t.wbg.__wbg_async_19c0400d97cc72fe=function(t){return i(t).async},t.wbg.__wbg_value_571d60108110e917=function(t){return g(i(t).value)},t.wbg.__wbindgen_link_fc1eedd35dc7e0a6=function(t){const e=w("data:application/javascript,"+encodeURIComponent("onmessage = function (ev) {\n let [ia, index, value] = ev.data;\n ia = new Int32Array(ia.buffer);\n let result = Atomics.wait(ia, index, value);\n postMessage(result);\n };\n "),j.__wbindgen_malloc,j.__wbindgen_realloc),_=I;b()[t/4+1]=_,b()[t/4+0]=e},t.wbg.__wbg_new_d1187ae36d662ef9=function(){return S((function(t,e){return g(new Worker(c(t,e)))}),arguments)},t.wbg.__wbg_setonmessage_503809e5bb51bd33=function(t,e){i(t).onmessage=i(e)},t.wbg.__wbg_of_6a70eed8d41f469c=function(t,e,_){return g(Array.of(i(t),i(e),i(_)))},t.wbg.__wbg_postMessage_7380d10e8b8269df=function(){return S((function(t,e){i(t).postMessage(i(e))}),arguments)},t.wbg.__wbg_data_3ce7c145ca4fbcdc=function(t){return g(i(t).data)},t.wbg.__wbg_newwithstrandinit_3fd6fba4083ff2d0=function(){return S((function(t,e,_){return g(new Request(c(t,e),i(_)))}),arguments)},t.wbg.__wbg_responseText_c67ed2d48db10769=function(){return S((function(t,e){const _=i(e).responseText;var r=d(_)?0:w(_,j.__wbindgen_malloc,j.__wbindgen_realloc),n=I;b()[t/4+1]=n,b()[t/4+0]=r}),arguments)},t.wbg.__wbindgen_closure_wrapper5763=function(t,e,_){return g(u(t,e,538,f))},t.wbg.__wbindgen_closure_wrapper5788=function(t,e,_){return g(u(t,e,538,f))},t}function F(t,e){t.wbg.memory=e||new WebAssembly.Memory({initial:25,maximum:65536,shared:!0})}function R(t,e){return j=t.exports,z.__wbindgen_wasm_module=e,q=null,W=null,U=null,j.__wbindgen_start(),j}function E(t,e){if(void 0!==j)return j;const _=V();F(_,e),t instanceof WebAssembly.Module||(t=new WebAssembly.Module(t));return R(new WebAssembly.Instance(t,_),t)}async function z(t,e){if(void 0!==j)return j;const _=V();("string"==typeof t||"function"==typeof Request&&t instanceof Request||"function"==typeof URL&&t instanceof URL)&&(t=fetch(t)),F(_,e);const{instance:r,module:n}=await T(await t,_);return R(r,n)}var A=Object.freeze({__proto__:null,Address:$,Execution:J,ExecutionResponse:X,Field:Q,KeyPair:tt,Metadata:_t,OfflineQuery:nt,PrivateKey:ot,PrivateKeyCiphertext:st,Program:gt,ProgramManager:dt,ProvingKey:lt,RecordCiphertext:ft,RecordPlaintext:yt,Signature:ht,Transaction:kt,VerifyingKey:St,ViewKey:Tt,default:z,initSync:E,initThreadPool:P,runRayonThread:k,verifyFunctionExecution:m});const Vt="assets/aleo_wasm.wasm";const{initThreadPool:Ft,Address:Rt,Execution:Et,ExecutionResponse:zt,Field:At,Metadata:Ot,OfflineQuery:jt,Private:Mt,PrivateKey:Ct,PrivateKeyCiphertext:Kt,Program:Ut,ProvingKey:It,RecordCiphertext:Bt,RecordPlaintext:Lt,ProgramManager:Wt,Signature:Nt,Transaction:qt,ViewKey:Dt,VerifyingKey:$t,verifyFunctionExecution:Ht}=await(async(t={})=>{let{importHook:e,serverPath:_,initializeHook:r}=t,n=Vt;return null!=_&&(n=_+/[^\/\\]*$/.exec(n)[0]),null!=e&&(n=e(n)),null!=r?await r(z,n):await z(n),A})({importHook:()=>new URL(_(4494),_.b)});async function O(t){null==t&&(t=navigator.hardwareConcurrency),console.info(`Spawning ${t} threads`),await Ft(new URL(_(3645),_.b),t)}r()}catch(Jt){r(Jt)}}),1)},6891:(t,e,_)=>{_.d(e,{Ud:()=>d});const r=Symbol("Comlink.proxy"),n=Symbol("Comlink.endpoint"),i=Symbol("Comlink.releaseProxy"),o=Symbol("Comlink.finalizer"),a=Symbol("Comlink.thrown"),s=t=>"object"==typeof t&&null!==t||"function"==typeof t,c=new Map([["proxy",{canHandle:t=>s(t)&&t[r],serialize(t){const{port1:e,port2:_}=new MessageChannel;return g(t,e),[_,[_]]},deserialize:t=>(t.start(),d(t))}],["throw",{canHandle:t=>s(t)&&a in t,serialize({value:t}){let e;return e=t instanceof Error?{isError:!0,value:{message:t.message,name:t.name,stack:t.stack}}:{isError:!1,value:t},[e,[]]},deserialize(t){if(t.isError)throw Object.assign(new Error(t.value.message),t.value);throw t.value}}]]);function g(t,e=globalThis,_=["*"]){e.addEventListener("message",(function n(i){if(!i||!i.data)return;if(!function(t,e){for(const _ of t){if(e===_||"*"===_)return!0;if(_ instanceof RegExp&&_.test(e))return!0}return!1}(_,i.origin))return void console.warn(`Invalid origin '${i.origin}' for comlink proxy`);const{id:s,type:c,path:d}=Object.assign({path:[]},i.data),b=(i.data.argumentList||[]).map(v);let l;try{const e=d.slice(0,-1).reduce(((t,e)=>t[e]),t),_=d.reduce(((t,e)=>t[e]),t);switch(c){case"GET":l=_;break;case"SET":e[d.slice(-1)[0]]=v(i.data.value),l=!0;break;case"APPLY":l=_.apply(e,b);break;case"CONSTRUCT":l=function(t){return Object.assign(t,{[r]:!0})}(new _(...b));break;case"ENDPOINT":{const{port1:e,port2:_}=new MessageChannel;g(t,_),l=function(t,e){return m.set(t,e),t}(e,[e])}break;case"RELEASE":l=void 0;break;default:return}}catch(t){l={value:t,[a]:0}}Promise.resolve(l).catch((t=>({value:t,[a]:0}))).then((_=>{const[r,i]=h(_);e.postMessage(Object.assign(Object.assign({},r),{id:s}),i),"RELEASE"===c&&(e.removeEventListener("message",n),w(e),o in t&&"function"==typeof t[o]&&t[o]())})).catch((t=>{const[_,r]=h({value:new TypeError("Unserializable return value"),[a]:0});e.postMessage(Object.assign(Object.assign({},_),{id:s}),r)}))})),e.start&&e.start()}function w(t){(function(t){return"MessagePort"===t.constructor.name})(t)&&t.close()}function d(t,e){return p(t,[],e)}function b(t){if(t)throw new Error("Proxy has been released and is not useable")}function l(t){return k(t,{type:"RELEASE"}).then((()=>{w(t)}))}const u=new WeakMap,f="FinalizationRegistry"in globalThis&&new FinalizationRegistry((t=>{const e=(u.get(t)||0)-1;u.set(t,e),0===e&&l(t)}));function p(t,e=[],_=function(){}){let r=!1;const o=new Proxy(_,{get(_,n){if(b(r),n===i)return()=>{!function(t){f&&f.unregister(t)}(o),l(t),r=!0};if("then"===n){if(0===e.length)return{then:()=>o};const _=k(t,{type:"GET",path:e.map((t=>t.toString()))}).then(v);return _.then.bind(_)}return p(t,[...e,n])},set(_,n,i){b(r);const[o,a]=h(i);return k(t,{type:"SET",path:[...e,n].map((t=>t.toString())),value:o},a).then(v)},apply(_,i,o){b(r);const a=e[e.length-1];if(a===n)return k(t,{type:"ENDPOINT"}).then(v);if("bind"===a)return p(t,e.slice(0,-1));const[s,c]=y(o);return k(t,{type:"APPLY",path:e.map((t=>t.toString())),argumentList:s},c).then(v)},construct(_,n){b(r);const[i,o]=y(n);return k(t,{type:"CONSTRUCT",path:e.map((t=>t.toString())),argumentList:i},o).then(v)}});return function(t,e){const _=(u.get(e)||0)+1;u.set(e,_),f&&f.register(t,e,t)}(o,t),o}function y(t){const e=t.map(h);return[e.map((t=>t[0])),(_=e.map((t=>t[1])),Array.prototype.concat.apply([],_))];var _}const m=new WeakMap;function h(t){for(const[e,_]of c)if(_.canHandle(t)){const[r,n]=_.serialize(t);return[{type:"HANDLER",name:e,value:r},n]}return[{type:"RAW",value:t},m.get(t)||[]]}function v(t){switch(t.type){case"HANDLER":return c.get(t.name).deserialize(t.value);case"RAW":return t.value}}function k(t,e,_){return new Promise((r=>{const n=new Array(4).fill(0).map((()=>Math.floor(Math.random()*Number.MAX_SAFE_INTEGER).toString(16))).join("-");t.addEventListener("message",(function e(_){_.data&&_.data.id&&_.data.id===n&&(t.removeEventListener("message",e),r(_.data))})),t.start&&t.start(),t.postMessage(Object.assign({id:n},e),_)}))}}}]); +//# sourceMappingURL=820.bundle.js.map \ No newline at end of file diff --git a/876.bundle.js.LICENSE.txt b/820.bundle.js.LICENSE.txt similarity index 100% rename from 876.bundle.js.LICENSE.txt rename to 820.bundle.js.LICENSE.txt diff --git a/820.bundle.js.map b/820.bundle.js.map new file mode 100644 index 000000000..b35040861 --- /dev/null +++ b/820.bundle.js.map @@ -0,0 +1 @@ +{"version":3,"file":"820.bundle.js","mappings":";4OAAA,SAASA,EAAYC,EAAKC,EAAQC,EAAQC,GAClC,OAAO,IAAIC,SAASC,IAChB,MAAMC,EAAS,IAAIC,OAAOP,EAAK,CAC3BQ,KAAM,WAGVF,EAAOG,iBAAiB,WAAYC,IAGhCC,YAAW,KACPN,EAAQC,GAIJA,EAAOM,OACPN,EAAOM,OAC/B,GACmB,EAAE,GACN,CACCC,SAAS,EACTC,MAAM,IAGVR,EAAOS,YAAY,CACfd,SACAC,SACAC,WACF,GAEd,CAEA,IAAIa,sMAEJ,MAAMC,EAAO,IAAIC,MAAM,KAAKC,UAAKC,GAIjC,SAASC,EAAUC,GAAO,OAAOL,EAAKK,EAAK,CAF3CL,EAAKM,UAAKH,EAAW,MAAM,GAAM,GAIjC,IAAII,EAAYP,EAAKQ,OAErB,SAASC,EAAWJ,GACZA,EAAM,MACVL,EAAKK,GAAOE,EACZA,EAAYF,EAChB,CAEA,SAASK,EAAWL,GAChB,MAAMM,EAAMP,EAAUC,GAEtB,OADAI,EAAWJ,GACJM,CACX,CAEA,MAAMC,EAA4C,oBAAhBC,YAA8B,IAAIA,YAAY,QAAS,CAAEC,WAAW,EAAMC,OAAO,IAAU,CAAEC,OAAQA,KAAQ,MAAMC,MAAM,4BAA4B,GAE5J,oBAAhBJ,aAA+BD,EAAkBI,SAC5D,IAAIE,EAAqB,KAEzB,SAASC,IAIL,OAH2B,OAAvBD,GAA+BA,EAAmBE,SAAWrB,EAAKd,OAAOmC,SACzEF,EAAqB,IAAIG,WAAWtB,EAAKd,OAAOmC,SAE7CF,CAC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o-website/wasm.js","webpack://aleo-website/../js/index.js","webpack://aleo-website/../node_modules/comlink/dist/esm/comlink.mjs"],"sourcesContent":["function spawnWorker(url, module, memory, address) {\n return new Promise((resolve) => {\n const worker = new Worker(url, {\n type: \"module\",\n });\n\n worker.addEventListener(\"message\", (event) => {\n // This is needed in Node to wait one extra tick, so that way\n // the Worker can fully initialize before we return.\n setTimeout(() => {\n resolve(worker);\n\n // When running in Node, this allows the process to exit\n // even though the Worker is still running.\n if (worker.unref) {\n worker.unref();\n }\n }, 0);\n }, {\n capture: true,\n once: true,\n });\n\n worker.postMessage({\n module,\n memory,\n address,\n });\n });\n }\n\nlet wasm;\n\nconst heap = new Array(128).fill(undefined);\n\nheap.push(undefined, null, true, false);\n\nfunction getObject(idx) { return heap[idx]; }\n\nlet heap_next = heap.length;\n\nfunction dropObject(idx) {\n if (idx < 132) return;\n heap[idx] = heap_next;\n heap_next = idx;\n}\n\nfunction takeObject(idx) {\n const ret = getObject(idx);\n dropObject(idx);\n return ret;\n}\n\nconst cachedTextDecoder = (typeof TextDecoder !== 'undefined' ? new TextDecoder('utf-8', { ignoreBOM: true, fatal: true }) : { decode: () => { throw Error('TextDecoder not available') } } );\n\nif (typeof TextDecoder !== 'undefined') { cachedTextDecoder.decode(); }\nlet cachedUint8Memory0 = null;\n\nfunction getUint8Memory0() {\n if (cachedUint8Memory0 === null || cachedUint8Memory0.buffer !== wasm.memory.buffer) {\n cachedUint8Memory0 = new Uint8Array(wasm.memory.buffer);\n }\n return cachedUint8Memory0;\n}\n\nfunction getStringFromWasm0(ptr, len) {\n ptr = ptr >>> 0;\n return cachedTextDecoder.decode(getUint8Memory0().slice(ptr, ptr + len));\n}\n\nfunction addHeapObject(obj) {\n if (heap_next === heap.length) heap.push(heap.length + 1);\n const idx = heap_next;\n heap_next = heap[idx];\n\n heap[idx] = obj;\n return idx;\n}\n\nlet WASM_VECTOR_LEN = 0;\n\nconst cachedTextEncoder = (typeof TextEncoder !== 'undefined' ? new TextEncoder('utf-8') : { encode: () => { throw Error('TextEncoder not available') } } );\n\nconst encodeString = function (arg, view) {\n const buf = cachedTextEncoder.encode(arg);\n view.set(buf);\n return {\n read: arg.length,\n written: buf.length\n };\n};\n\nfunction passStringToWasm0(arg, malloc, realloc) {\n\n if (realloc === undefined) {\n const buf = cachedTextEncoder.encode(arg);\n const ptr = malloc(buf.length, 1) >>> 0;\n getUint8Memory0().subarray(ptr, ptr + buf.length).set(buf);\n WASM_VECTOR_LEN = buf.length;\n return ptr;\n }\n\n let len = arg.length;\n let ptr = malloc(len, 1) >>> 0;\n\n const mem = getUint8Memory0();\n\n let offset = 0;\n\n for (; offset < len; offset++) {\n const code = arg.charCodeAt(offset);\n if (code > 0x7F) break;\n mem[ptr + offset] = code;\n }\n\n if (offset !== len) {\n if (offset !== 0) {\n arg = arg.slice(offset);\n }\n ptr = realloc(ptr, len, len = offset + arg.length * 3, 1) >>> 0;\n const view = getUint8Memory0().subarray(ptr + offset, ptr + len);\n const ret = encodeString(arg, view);\n\n offset += ret.written;\n ptr = realloc(ptr, len, offset, 1) >>> 0;\n }\n\n WASM_VECTOR_LEN = offset;\n return ptr;\n}\n\nfunction isLikeNone(x) {\n return x === undefined || x === null;\n}\n\nlet cachedInt32Memory0 = null;\n\nfunction getInt32Memory0() {\n if (cachedInt32Memory0 === null || cachedInt32Memory0.buffer !== wasm.memory.buffer) {\n cachedInt32Memory0 = new Int32Array(wasm.memory.buffer);\n }\n return cachedInt32Memory0;\n}\n\nfunction debugString(val) {\n // primitive types\n const type = typeof val;\n if (type == 'number' || type == 'boolean' || val == null) {\n return `${val}`;\n }\n if (type == 'string') {\n return `\"${val}\"`;\n }\n if (type == 'symbol') {\n const description = val.description;\n if (description == null) {\n return 'Symbol';\n } else {\n return `Symbol(${description})`;\n }\n }\n if (type == 'function') {\n const name = val.name;\n if (typeof name == 'string' && name.length > 0) {\n return `Function(${name})`;\n } else {\n return 'Function';\n }\n }\n // objects\n if (Array.isArray(val)) {\n const length = val.length;\n let debug = '[';\n if (length > 0) {\n debug += debugString(val[0]);\n }\n for(let i = 1; i < length; i++) {\n debug += ', ' + debugString(val[i]);\n }\n debug += ']';\n return debug;\n }\n // Test for built-in\n const builtInMatches = /\\[object ([^\\]]+)\\]/.exec(toString.call(val));\n let className;\n if (builtInMatches.length > 1) {\n className = builtInMatches[1];\n } else {\n // Failed to match the standard '[object ClassName]'\n return toString.call(val);\n }\n if (className == 'Object') {\n // we're a user defined class or Object\n // JSON.stringify avoids problems with cycles, and is generally much\n // easier than looping through ownProperties of `val`.\n try {\n return 'Object(' + JSON.stringify(val) + ')';\n } catch (_) {\n return 'Object';\n }\n }\n // errors\n if (val instanceof Error) {\n return `${val.name}: ${val.message}\\n${val.stack}`;\n }\n // TODO we could test for more things here, like `Set`s and `Map`s.\n return className;\n}\n\nconst CLOSURE_DTORS = (typeof FinalizationRegistry === 'undefined')\n ? { register: () => {}, unregister: () => {} }\n : new FinalizationRegistry(state => {\n wasm.__wbindgen_export_3.get(state.dtor)(state.a, state.b);\n});\n\nfunction makeMutClosure(arg0, arg1, dtor, f) {\n const state = { a: arg0, b: arg1, cnt: 1, dtor };\n const real = (...args) => {\n // First up with a closure we increment the internal reference\n // count. This ensures that the Rust closure environment won't\n // be deallocated while we're invoking it.\n state.cnt++;\n const a = state.a;\n state.a = 0;\n try {\n return f(a, state.b, ...args);\n } finally {\n if (--state.cnt === 0) {\n wasm.__wbindgen_export_3.get(state.dtor)(a, state.b);\n CLOSURE_DTORS.unregister(state);\n } else {\n state.a = a;\n }\n }\n };\n real.original = state;\n CLOSURE_DTORS.register(real, state, state);\n return real;\n}\nfunction __wbg_adapter_34(arg0, arg1, arg2) {\n wasm._dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h442b5e922f6f9710(arg0, arg1, addHeapObject(arg2));\n}\n\nfunction _assertClass(instance, klass) {\n if (!(instance instanceof klass)) {\n throw new Error(`expected instance of ${klass.name}`);\n }\n return instance.ptr;\n}\n\nfunction passArray8ToWasm0(arg, malloc) {\n const ptr = malloc(arg.length * 1, 1) >>> 0;\n getUint8Memory0().set(arg, ptr / 1);\n WASM_VECTOR_LEN = arg.length;\n return ptr;\n}\n/**\n* Verify an execution with a single function and a single transition. Executions with multiple\n* transitions or functions will fail to verify. Also, this does not verify that the state root of\n* the execution is included in the Aleo Network ledger.\n*\n* @param {Execution} execution The function execution to verify\n* @param {VerifyingKey} verifying_key The verifying key for the function\n* @param {Program} program The program that the function execution belongs to\n* @param {String} function_id The name of the function that was executed\n* @returns {boolean} True if the execution is valid, false otherwise\n* @param {Execution} execution\n* @param {VerifyingKey} verifying_key\n* @param {Program} program\n* @param {string} function_id\n* @returns {boolean}\n*/\nfunction verifyFunctionExecution(execution, verifying_key, program, function_id) {\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n _assertClass(execution, Execution);\n _assertClass(verifying_key, VerifyingKey);\n _assertClass(program, Program);\n const ptr0 = passStringToWasm0(function_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n wasm.verifyFunctionExecution(retptr, execution.__wbg_ptr, verifying_key.__wbg_ptr, program.__wbg_ptr, ptr0, len0);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n var r2 = getInt32Memory0()[retptr / 4 + 2];\n if (r2) {\n throw takeObject(r1);\n }\n return r0 !== 0;\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n }\n}\n\nlet cachedBigInt64Memory0 = null;\n\nfunction getBigInt64Memory0() {\n if (cachedBigInt64Memory0 === null || cachedBigInt64Memory0.buffer !== wasm.memory.buffer) {\n cachedBigInt64Memory0 = new BigInt64Array(wasm.memory.buffer);\n }\n return cachedBigInt64Memory0;\n}\n\nfunction getArrayU8FromWasm0(ptr, len) {\n ptr = ptr >>> 0;\n return getUint8Memory0().subarray(ptr / 1, ptr / 1 + len);\n}\n/**\n* @param {number} receiver\n*/\nfunction runRayonThread(receiver) {\n wasm.runRayonThread(receiver);\n}\n\n/**\n* @param {URL} url\n* @param {number} num_threads\n* @returns {Promise}\n*/\nfunction initThreadPool(url, num_threads) {\n const ret = wasm.initThreadPool(addHeapObject(url), num_threads);\n return takeObject(ret);\n}\n\nfunction handleError(f, args) {\n try {\n return f.apply(this, args);\n } catch (e) {\n wasm.__wbindgen_exn_store(addHeapObject(e));\n }\n}\nfunction __wbg_adapter_279(arg0, arg1, arg2, arg3) {\n wasm.wasm_bindgen__convert__closures__invoke2_mut__h5ab12ffe4b82d47a(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));\n}\n\nconst AddressFinalization = (typeof FinalizationRegistry === 'undefined')\n ? { register: () => {}, unregister: () => {} }\n : new FinalizationRegistry(ptr => wasm.__wbg_address_free(ptr >>> 0));\n/**\n* Public address of an Aleo account\n*/\nclass Address {\n\n static __wrap(ptr) {\n ptr = ptr >>> 0;\n const obj = Object.create(Address.prototype);\n obj.__wbg_ptr = ptr;\n AddressFinalization.register(obj, obj.__wbg_ptr, obj);\n return obj;\n }\n\n __destroy_into_raw() {\n const ptr = this.__wbg_ptr;\n this.__wbg_ptr = 0;\n AddressFinalization.unregister(this);\n return ptr;\n }\n\n free() {\n const ptr = this.__destroy_into_raw();\n wasm.__wbg_address_free(ptr);\n }\n /**\n * Derive an Aleo address from a private key\n *\n * @param {PrivateKey} private_key The private key to derive the address from\n * @returns {Address} Address corresponding to the private key\n * @param {PrivateKey} private_key\n * @returns {Address}\n */\n static from_private_key(private_key) {\n _assertClass(private_key, PrivateKey);\n const ret = wasm.address_from_private_key(private_key.__wbg_ptr);\n return Address.__wrap(ret);\n }\n /**\n * Derive an Aleo address from a view key\n *\n * @param {ViewKey} view_key The view key to derive the address from\n * @returns {Address} Address corresponding to the view key\n * @param {ViewKey} view_key\n * @returns {Address}\n */\n static from_view_key(view_key) {\n _assertClass(view_key, ViewKey);\n const ret = wasm.address_from_view_key(view_key.__wbg_ptr);\n return Address.__wrap(ret);\n }\n /**\n * Create an aleo address object from a string representation of an address\n *\n * @param {string} address String representation of an addressm\n * @returns {Address} Address\n * @param {string} address\n * @returns {Address}\n */\n static from_string(address) {\n const ptr0 = passStringToWasm0(address, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n const ret = wasm.address_from_string(ptr0, len0);\n return Address.__wrap(ret);\n }\n /**\n * Get a string representation of an Aleo address object\n *\n * @param {Address} Address\n * @returns {string} String representation of the address\n * @returns {string}\n */\n to_string() {\n let deferred1_0;\n let deferred1_1;\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n wasm.address_to_string(retptr, this.__wbg_ptr);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n deferred1_0 = r0;\n deferred1_1 = r1;\n return getStringFromWasm0(r0, r1);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);\n }\n }\n /**\n * Verify a signature for a message signed by the address\n *\n * @param {Uint8Array} Byte array representing a message signed by the address\n * @returns {boolean} Boolean representing whether or not the signature is valid\n * @param {Uint8Array} message\n * @param {Signature} signature\n * @returns {boolean}\n */\n verify(message, signature) {\n const ptr0 = passArray8ToWasm0(message, wasm.__wbindgen_malloc);\n const len0 = WASM_VECTOR_LEN;\n _assertClass(signature, Signature);\n const ret = wasm.address_verify(this.__wbg_ptr, ptr0, len0, signature.__wbg_ptr);\n return ret !== 0;\n }\n}\n\nconst ExecutionFinalization = (typeof FinalizationRegistry === 'undefined')\n ? { register: () => {}, unregister: () => {} }\n : new FinalizationRegistry(ptr => wasm.__wbg_execution_free(ptr >>> 0));\n/**\n* Execution of an Aleo program.\n*/\nclass Execution {\n\n static __wrap(ptr) {\n ptr = ptr >>> 0;\n const obj = Object.create(Execution.prototype);\n obj.__wbg_ptr = ptr;\n ExecutionFinalization.register(obj, obj.__wbg_ptr, obj);\n return obj;\n }\n\n __destroy_into_raw() {\n const ptr = this.__wbg_ptr;\n this.__wbg_ptr = 0;\n ExecutionFinalization.unregister(this);\n return ptr;\n }\n\n free() {\n const ptr = this.__destroy_into_raw();\n wasm.__wbg_execution_free(ptr);\n }\n /**\n * Returns the string representation of the execution.\n * @returns {string}\n */\n toString() {\n let deferred1_0;\n let deferred1_1;\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n wasm.execution_toString(retptr, this.__wbg_ptr);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n deferred1_0 = r0;\n deferred1_1 = r1;\n return getStringFromWasm0(r0, r1);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);\n }\n }\n /**\n * Creates an execution object from a string representation of an execution.\n * @param {string} execution\n * @returns {Execution}\n */\n static fromString(execution) {\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n const ptr0 = passStringToWasm0(execution, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n wasm.execution_fromString(retptr, ptr0, len0);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n var r2 = getInt32Memory0()[retptr / 4 + 2];\n if (r2) {\n throw takeObject(r1);\n }\n return Execution.__wrap(r0);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n }\n }\n}\n\nconst ExecutionResponseFinalization = (typeof FinalizationRegistry === 'undefined')\n ? { register: () => {}, unregister: () => {} }\n : new FinalizationRegistry(ptr => wasm.__wbg_executionresponse_free(ptr >>> 0));\n/**\n* Webassembly Representation of an Aleo function execution response\n*\n* This object is returned by the execution of an Aleo function off-chain. It provides methods for\n* retrieving the outputs of the function execution.\n*/\nclass ExecutionResponse {\n\n static __wrap(ptr) {\n ptr = ptr >>> 0;\n const obj = Object.create(ExecutionResponse.prototype);\n obj.__wbg_ptr = ptr;\n ExecutionResponseFinalization.register(obj, obj.__wbg_ptr, obj);\n return obj;\n }\n\n __destroy_into_raw() {\n const ptr = this.__wbg_ptr;\n this.__wbg_ptr = 0;\n ExecutionResponseFinalization.unregister(this);\n return ptr;\n }\n\n free() {\n const ptr = this.__destroy_into_raw();\n wasm.__wbg_executionresponse_free(ptr);\n }\n /**\n * Get the outputs of the executed function\n *\n * @returns {Array} Array of strings representing the outputs of the function\n * @returns {Array}\n */\n getOutputs() {\n const ret = wasm.executionresponse_getOutputs(this.__wbg_ptr);\n return takeObject(ret);\n }\n /**\n * Returns the execution object if present, null if otherwise.\n *\n * @returns {Execution | undefined} The execution object if present, null if otherwise\n * @returns {Execution | undefined}\n */\n getExecution() {\n const ret = wasm.executionresponse_getExecution(this.__wbg_ptr);\n return ret === 0 ? undefined : Execution.__wrap(ret);\n }\n /**\n * Returns the program keys if present\n * @returns {KeyPair}\n */\n getKeys() {\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n wasm.executionresponse_getKeys(retptr, this.__wbg_ptr);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n var r2 = getInt32Memory0()[retptr / 4 + 2];\n if (r2) {\n throw takeObject(r1);\n }\n return KeyPair.__wrap(r0);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n }\n }\n /**\n * Returns the proving_key if the proving key was cached in the Execution response.\n * Note the proving key is removed from the response object after the first call to this\n * function. Subsequent calls will return null.\n *\n * @returns {ProvingKey | undefined} The proving key\n * @returns {ProvingKey | undefined}\n */\n getProvingKey() {\n const ret = wasm.executionresponse_getProvingKey(this.__wbg_ptr);\n return ret === 0 ? undefined : ProvingKey.__wrap(ret);\n }\n /**\n * Returns the verifying_key associated with the program\n *\n * @returns {VerifyingKey} The verifying key\n * @returns {VerifyingKey}\n */\n getVerifyingKey() {\n const ret = wasm.executionresponse_getVerifyingKey(this.__wbg_ptr);\n return VerifyingKey.__wrap(ret);\n }\n /**\n * Returns the function identifier\n * @returns {string}\n */\n getFunctionId() {\n let deferred1_0;\n let deferred1_1;\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n wasm.executionresponse_getFunctionId(retptr, this.__wbg_ptr);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n deferred1_0 = r0;\n deferred1_1 = r1;\n return getStringFromWasm0(r0, r1);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);\n }\n }\n /**\n * Returns the program\n * @returns {Program}\n */\n getProgram() {\n const ret = wasm.executionresponse_getProgram(this.__wbg_ptr);\n return Program.__wrap(ret);\n }\n}\n\nconst FieldFinalization = (typeof FinalizationRegistry === 'undefined')\n ? { register: () => {}, unregister: () => {} }\n : new FinalizationRegistry(ptr => wasm.__wbg_field_free(ptr >>> 0));\n/**\n*/\nclass Field {\n\n static __wrap(ptr) {\n ptr = ptr >>> 0;\n const obj = Object.create(Field.prototype);\n obj.__wbg_ptr = ptr;\n FieldFinalization.register(obj, obj.__wbg_ptr, obj);\n return obj;\n }\n\n __destroy_into_raw() {\n const ptr = this.__wbg_ptr;\n this.__wbg_ptr = 0;\n FieldFinalization.unregister(this);\n return ptr;\n }\n\n free() {\n const ptr = this.__destroy_into_raw();\n wasm.__wbg_field_free(ptr);\n }\n /**\n * @returns {string}\n */\n toString() {\n let deferred1_0;\n let deferred1_1;\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n wasm.field_toString(retptr, this.__wbg_ptr);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n deferred1_0 = r0;\n deferred1_1 = r1;\n return getStringFromWasm0(r0, r1);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);\n }\n }\n /**\n * @param {string} field\n * @returns {Field}\n */\n static fromString(field) {\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n const ptr0 = passStringToWasm0(field, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n wasm.field_fromString(retptr, ptr0, len0);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n var r2 = getInt32Memory0()[retptr / 4 + 2];\n if (r2) {\n throw takeObject(r1);\n }\n return Field.__wrap(r0);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n }\n }\n}\n\nconst KeyPairFinalization = (typeof FinalizationRegistry === 'undefined')\n ? { register: () => {}, unregister: () => {} }\n : new FinalizationRegistry(ptr => wasm.__wbg_keypair_free(ptr >>> 0));\n/**\n* Key pair object containing both the function proving and verifying keys\n*/\nclass KeyPair {\n\n static __wrap(ptr) {\n ptr = ptr >>> 0;\n const obj = Object.create(KeyPair.prototype);\n obj.__wbg_ptr = ptr;\n KeyPairFinalization.register(obj, obj.__wbg_ptr, obj);\n return obj;\n }\n\n __destroy_into_raw() {\n const ptr = this.__wbg_ptr;\n this.__wbg_ptr = 0;\n KeyPairFinalization.unregister(this);\n return ptr;\n }\n\n free() {\n const ptr = this.__destroy_into_raw();\n wasm.__wbg_keypair_free(ptr);\n }\n /**\n * Create new key pair from proving and verifying keys\n *\n * @param {ProvingKey} proving_key Proving key corresponding to a function in an Aleo program\n * @param {VerifyingKey} verifying_key Verifying key corresponding to a function in an Aleo program\n * @returns {KeyPair} Key pair object containing both the function proving and verifying keys\n * @param {ProvingKey} proving_key\n * @param {VerifyingKey} verifying_key\n */\n constructor(proving_key, verifying_key) {\n _assertClass(proving_key, ProvingKey);\n var ptr0 = proving_key.__destroy_into_raw();\n _assertClass(verifying_key, VerifyingKey);\n var ptr1 = verifying_key.__destroy_into_raw();\n const ret = wasm.keypair_new(ptr0, ptr1);\n this.__wbg_ptr = ret >>> 0;\n return this;\n }\n /**\n * Get the proving key. This method will remove the proving key from the key pair\n *\n * @returns {ProvingKey | Error}\n * @returns {ProvingKey}\n */\n provingKey() {\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n wasm.keypair_provingKey(retptr, this.__wbg_ptr);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n var r2 = getInt32Memory0()[retptr / 4 + 2];\n if (r2) {\n throw takeObject(r1);\n }\n return ProvingKey.__wrap(r0);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n }\n }\n /**\n * Get the verifying key. This method will remove the verifying key from the key pair\n *\n * @returns {VerifyingKey | Error}\n * @returns {VerifyingKey}\n */\n verifyingKey() {\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n wasm.keypair_verifyingKey(retptr, this.__wbg_ptr);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n var r2 = getInt32Memory0()[retptr / 4 + 2];\n if (r2) {\n throw takeObject(r1);\n }\n return VerifyingKey.__wrap(r0);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n }\n }\n}\n\nconst MetadataFinalization = (typeof FinalizationRegistry === 'undefined')\n ? { register: () => {}, unregister: () => {} }\n : new FinalizationRegistry(ptr => wasm.__wbg_metadata_free(ptr >>> 0));\n/**\n*/\nclass Metadata {\n\n static __wrap(ptr) {\n ptr = ptr >>> 0;\n const obj = Object.create(Metadata.prototype);\n obj.__wbg_ptr = ptr;\n MetadataFinalization.register(obj, obj.__wbg_ptr, obj);\n return obj;\n }\n\n __destroy_into_raw() {\n const ptr = this.__wbg_ptr;\n this.__wbg_ptr = 0;\n MetadataFinalization.unregister(this);\n return ptr;\n }\n\n free() {\n const ptr = this.__destroy_into_raw();\n wasm.__wbg_metadata_free(ptr);\n }\n /**\n * @returns {string}\n */\n get locator() {\n let deferred1_0;\n let deferred1_1;\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n wasm.__wbg_get_metadata_locator(retptr, this.__wbg_ptr);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n deferred1_0 = r0;\n deferred1_1 = r1;\n return getStringFromWasm0(r0, r1);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);\n }\n }\n /**\n * @param {string} arg0\n */\n set locator(arg0) {\n const ptr0 = passStringToWasm0(arg0, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n wasm.__wbg_set_metadata_locator(this.__wbg_ptr, ptr0, len0);\n }\n /**\n * @returns {string}\n */\n get prover() {\n let deferred1_0;\n let deferred1_1;\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n wasm.__wbg_get_metadata_prover(retptr, this.__wbg_ptr);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n deferred1_0 = r0;\n deferred1_1 = r1;\n return getStringFromWasm0(r0, r1);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);\n }\n }\n /**\n * @param {string} arg0\n */\n set prover(arg0) {\n const ptr0 = passStringToWasm0(arg0, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n wasm.__wbg_set_metadata_prover(this.__wbg_ptr, ptr0, len0);\n }\n /**\n * @returns {string}\n */\n get verifier() {\n let deferred1_0;\n let deferred1_1;\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n wasm.__wbg_get_metadata_verifier(retptr, this.__wbg_ptr);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n deferred1_0 = r0;\n deferred1_1 = r1;\n return getStringFromWasm0(r0, r1);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);\n }\n }\n /**\n * @param {string} arg0\n */\n set verifier(arg0) {\n const ptr0 = passStringToWasm0(arg0, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n wasm.__wbg_set_metadata_verifier(this.__wbg_ptr, ptr0, len0);\n }\n /**\n * @returns {string}\n */\n get verifyingKey() {\n let deferred1_0;\n let deferred1_1;\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n wasm.__wbg_get_metadata_verifyingKey(retptr, this.__wbg_ptr);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n deferred1_0 = r0;\n deferred1_1 = r1;\n return getStringFromWasm0(r0, r1);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);\n }\n }\n /**\n * @param {string} arg0\n */\n set verifyingKey(arg0) {\n const ptr0 = passStringToWasm0(arg0, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n wasm.__wbg_set_metadata_verifyingKey(this.__wbg_ptr, ptr0, len0);\n }\n /**\n * @returns {string}\n */\n static baseUrl() {\n let deferred1_0;\n let deferred1_1;\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n wasm.metadata_baseUrl(retptr);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n deferred1_0 = r0;\n deferred1_1 = r1;\n return getStringFromWasm0(r0, r1);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);\n }\n }\n /**\n * @returns {Metadata}\n */\n static bond_public() {\n const ret = wasm.metadata_bond_public();\n return Metadata.__wrap(ret);\n }\n /**\n * @returns {Metadata}\n */\n static bond_validator() {\n const ret = wasm.metadata_bond_validator();\n return Metadata.__wrap(ret);\n }\n /**\n * @returns {Metadata}\n */\n static claim_unbond_public() {\n const ret = wasm.metadata_claim_unbond_public();\n return Metadata.__wrap(ret);\n }\n /**\n * @returns {Metadata}\n */\n static fee_private() {\n const ret = wasm.metadata_fee_private();\n return Metadata.__wrap(ret);\n }\n /**\n * @returns {Metadata}\n */\n static fee_public() {\n const ret = wasm.metadata_fee_public();\n return Metadata.__wrap(ret);\n }\n /**\n * @returns {Metadata}\n */\n static inclusion() {\n const ret = wasm.metadata_inclusion();\n return Metadata.__wrap(ret);\n }\n /**\n * @returns {Metadata}\n */\n static join() {\n const ret = wasm.metadata_join();\n return Metadata.__wrap(ret);\n }\n /**\n * @returns {Metadata}\n */\n static set_validator_state() {\n const ret = wasm.metadata_set_validator_state();\n return Metadata.__wrap(ret);\n }\n /**\n * @returns {Metadata}\n */\n static split() {\n const ret = wasm.metadata_split();\n return Metadata.__wrap(ret);\n }\n /**\n * @returns {Metadata}\n */\n static transfer_private() {\n const ret = wasm.metadata_transfer_private();\n return Metadata.__wrap(ret);\n }\n /**\n * @returns {Metadata}\n */\n static transfer_private_to_public() {\n const ret = wasm.metadata_transfer_private_to_public();\n return Metadata.__wrap(ret);\n }\n /**\n * @returns {Metadata}\n */\n static transfer_public() {\n const ret = wasm.metadata_transfer_public();\n return Metadata.__wrap(ret);\n }\n /**\n * @returns {Metadata}\n */\n static transfer_public_as_signer() {\n const ret = wasm.metadata_transfer_public_as_signer();\n return Metadata.__wrap(ret);\n }\n /**\n * @returns {Metadata}\n */\n static transfer_public_to_private() {\n const ret = wasm.metadata_transfer_public_to_private();\n return Metadata.__wrap(ret);\n }\n /**\n * @returns {Metadata}\n */\n static unbond_public() {\n const ret = wasm.metadata_unbond_public();\n return Metadata.__wrap(ret);\n }\n}\n\nconst OfflineQueryFinalization = (typeof FinalizationRegistry === 'undefined')\n ? { register: () => {}, unregister: () => {} }\n : new FinalizationRegistry(ptr => wasm.__wbg_offlinequery_free(ptr >>> 0));\n/**\n* An offline query object used to insert the global state root and state paths needed to create\n* a valid inclusion proof offline.\n*/\nclass OfflineQuery {\n\n static __wrap(ptr) {\n ptr = ptr >>> 0;\n const obj = Object.create(OfflineQuery.prototype);\n obj.__wbg_ptr = ptr;\n OfflineQueryFinalization.register(obj, obj.__wbg_ptr, obj);\n return obj;\n }\n\n __destroy_into_raw() {\n const ptr = this.__wbg_ptr;\n this.__wbg_ptr = 0;\n OfflineQueryFinalization.unregister(this);\n return ptr;\n }\n\n free() {\n const ptr = this.__destroy_into_raw();\n wasm.__wbg_offlinequery_free(ptr);\n }\n /**\n * Creates a new offline query object. The state root is required to be passed in as a string\n * @param {string} state_root\n */\n constructor(state_root) {\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n const ptr0 = passStringToWasm0(state_root, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n wasm.offlinequery_new(retptr, ptr0, len0);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n var r2 = getInt32Memory0()[retptr / 4 + 2];\n if (r2) {\n throw takeObject(r1);\n }\n this.__wbg_ptr = r0 >>> 0;\n return this;\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n }\n }\n /**\n * Add a new state path to the offline query object.\n *\n * @param {string} commitment: The commitment corresponding to a record inpout\n * @param {string} state_path: The state path corresponding to the commitment\n * @param {string} commitment\n * @param {string} state_path\n */\n addStatePath(commitment, state_path) {\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n const ptr0 = passStringToWasm0(commitment, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n const ptr1 = passStringToWasm0(state_path, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len1 = WASM_VECTOR_LEN;\n wasm.offlinequery_addStatePath(retptr, this.__wbg_ptr, ptr0, len0, ptr1, len1);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n if (r1) {\n throw takeObject(r0);\n }\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n }\n }\n /**\n * Get a json string representation of the offline query object\n * @returns {string}\n */\n toString() {\n let deferred1_0;\n let deferred1_1;\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n wasm.offlinequery_toString(retptr, this.__wbg_ptr);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n deferred1_0 = r0;\n deferred1_1 = r1;\n return getStringFromWasm0(r0, r1);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);\n }\n }\n /**\n * Create an offline query object from a json string representation\n * @param {string} s\n * @returns {OfflineQuery}\n */\n static fromString(s) {\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n const ptr0 = passStringToWasm0(s, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n wasm.offlinequery_fromString(retptr, ptr0, len0);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n var r2 = getInt32Memory0()[retptr / 4 + 2];\n if (r2) {\n throw takeObject(r1);\n }\n return OfflineQuery.__wrap(r0);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n }\n }\n}\n\nconst PrivateKeyFinalization = (typeof FinalizationRegistry === 'undefined')\n ? { register: () => {}, unregister: () => {} }\n : new FinalizationRegistry(ptr => wasm.__wbg_privatekey_free(ptr >>> 0));\n/**\n* Private key of an Aleo account\n*/\nclass PrivateKey {\n\n static __wrap(ptr) {\n ptr = ptr >>> 0;\n const obj = Object.create(PrivateKey.prototype);\n obj.__wbg_ptr = ptr;\n PrivateKeyFinalization.register(obj, obj.__wbg_ptr, obj);\n return obj;\n }\n\n __destroy_into_raw() {\n const ptr = this.__wbg_ptr;\n this.__wbg_ptr = 0;\n PrivateKeyFinalization.unregister(this);\n return ptr;\n }\n\n free() {\n const ptr = this.__destroy_into_raw();\n wasm.__wbg_privatekey_free(ptr);\n }\n /**\n * Generate a new private key using a cryptographically secure random number generator\n *\n * @returns {PrivateKey}\n */\n constructor() {\n const ret = wasm.privatekey_new();\n this.__wbg_ptr = ret >>> 0;\n return this;\n }\n /**\n * Get a private key from a series of unchecked bytes\n *\n * @param {Uint8Array} seed Unchecked 32 byte long Uint8Array acting as the seed for the private key\n * @returns {PrivateKey}\n * @param {Uint8Array} seed\n * @returns {PrivateKey}\n */\n static from_seed_unchecked(seed) {\n const ptr0 = passArray8ToWasm0(seed, wasm.__wbindgen_malloc);\n const len0 = WASM_VECTOR_LEN;\n const ret = wasm.privatekey_from_seed_unchecked(ptr0, len0);\n return PrivateKey.__wrap(ret);\n }\n /**\n * Get a private key from a string representation of a private key\n *\n * @param {string} seed String representation of a private key\n * @returns {PrivateKey}\n * @param {string} private_key\n * @returns {PrivateKey}\n */\n static from_string(private_key) {\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n const ptr0 = passStringToWasm0(private_key, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n wasm.privatekey_from_string(retptr, ptr0, len0);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n var r2 = getInt32Memory0()[retptr / 4 + 2];\n if (r2) {\n throw takeObject(r1);\n }\n return PrivateKey.__wrap(r0);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n }\n }\n /**\n * Get a string representation of the private key. This function should be used very carefully\n * as it exposes the private key plaintext\n *\n * @returns {string} String representation of a private key\n * @returns {string}\n */\n to_string() {\n let deferred1_0;\n let deferred1_1;\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n wasm.privatekey_to_string(retptr, this.__wbg_ptr);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n deferred1_0 = r0;\n deferred1_1 = r1;\n return getStringFromWasm0(r0, r1);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);\n }\n }\n /**\n * Get the view key corresponding to the private key\n *\n * @returns {ViewKey}\n * @returns {ViewKey}\n */\n to_view_key() {\n const ret = wasm.privatekey_to_view_key(this.__wbg_ptr);\n return ViewKey.__wrap(ret);\n }\n /**\n * Get the address corresponding to the private key\n *\n * @returns {Address}\n * @returns {Address}\n */\n to_address() {\n const ret = wasm.privatekey_to_address(this.__wbg_ptr);\n return Address.__wrap(ret);\n }\n /**\n * Sign a message with the private key\n *\n * @param {Uint8Array} Byte array representing a message signed by the address\n * @returns {Signature} Signature generated by signing the message with the address\n * @param {Uint8Array} message\n * @returns {Signature}\n */\n sign(message) {\n const ptr0 = passArray8ToWasm0(message, wasm.__wbindgen_malloc);\n const len0 = WASM_VECTOR_LEN;\n const ret = wasm.privatekey_sign(this.__wbg_ptr, ptr0, len0);\n return Signature.__wrap(ret);\n }\n /**\n * Get a new randomly generated private key ciphertext using a secret. The secret is sensitive\n * and will be needed to decrypt the private key later, so it should be stored securely\n *\n * @param {string} secret Secret used to encrypt the private key\n * @returns {PrivateKeyCiphertext | Error} Ciphertext representation of the private key\n * @param {string} secret\n * @returns {PrivateKeyCiphertext}\n */\n static newEncrypted(secret) {\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n const ptr0 = passStringToWasm0(secret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n wasm.privatekey_newEncrypted(retptr, ptr0, len0);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n var r2 = getInt32Memory0()[retptr / 4 + 2];\n if (r2) {\n throw takeObject(r1);\n }\n return PrivateKeyCiphertext.__wrap(r0);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n }\n }\n /**\n * Encrypt an existing private key with a secret. The secret is sensitive and will be needed to\n * decrypt the private key later, so it should be stored securely\n *\n * @param {string} secret Secret used to encrypt the private key\n * @returns {PrivateKeyCiphertext | Error} Ciphertext representation of the private key\n * @param {string} secret\n * @returns {PrivateKeyCiphertext}\n */\n toCiphertext(secret) {\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n const ptr0 = passStringToWasm0(secret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n wasm.privatekey_toCiphertext(retptr, this.__wbg_ptr, ptr0, len0);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n var r2 = getInt32Memory0()[retptr / 4 + 2];\n if (r2) {\n throw takeObject(r1);\n }\n return PrivateKeyCiphertext.__wrap(r0);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n }\n }\n /**\n * Get private key from a private key ciphertext and secret originally used to encrypt it\n *\n * @param {PrivateKeyCiphertext} ciphertext Ciphertext representation of the private key\n * @param {string} secret Secret originally used to encrypt the private key\n * @returns {PrivateKey | Error} Private key\n * @param {PrivateKeyCiphertext} ciphertext\n * @param {string} secret\n * @returns {PrivateKey}\n */\n static fromPrivateKeyCiphertext(ciphertext, secret) {\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n _assertClass(ciphertext, PrivateKeyCiphertext);\n const ptr0 = passStringToWasm0(secret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n wasm.privatekey_fromPrivateKeyCiphertext(retptr, ciphertext.__wbg_ptr, ptr0, len0);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n var r2 = getInt32Memory0()[retptr / 4 + 2];\n if (r2) {\n throw takeObject(r1);\n }\n return PrivateKey.__wrap(r0);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n }\n }\n}\n\nconst PrivateKeyCiphertextFinalization = (typeof FinalizationRegistry === 'undefined')\n ? { register: () => {}, unregister: () => {} }\n : new FinalizationRegistry(ptr => wasm.__wbg_privatekeyciphertext_free(ptr >>> 0));\n/**\n* Private Key in ciphertext form\n*/\nclass PrivateKeyCiphertext {\n\n static __wrap(ptr) {\n ptr = ptr >>> 0;\n const obj = Object.create(PrivateKeyCiphertext.prototype);\n obj.__wbg_ptr = ptr;\n PrivateKeyCiphertextFinalization.register(obj, obj.__wbg_ptr, obj);\n return obj;\n }\n\n __destroy_into_raw() {\n const ptr = this.__wbg_ptr;\n this.__wbg_ptr = 0;\n PrivateKeyCiphertextFinalization.unregister(this);\n return ptr;\n }\n\n free() {\n const ptr = this.__destroy_into_raw();\n wasm.__wbg_privatekeyciphertext_free(ptr);\n }\n /**\n * Encrypt a private key using a secret string. The secret is sensitive and will be needed to\n * decrypt the private key later, so it should be stored securely\n *\n * @param {PrivateKey} private_key Private key to encrypt\n * @param {string} secret Secret to encrypt the private key with\n * @returns {PrivateKeyCiphertext | Error} Private key ciphertext\n * @param {PrivateKey} private_key\n * @param {string} secret\n * @returns {PrivateKeyCiphertext}\n */\n static encryptPrivateKey(private_key, secret) {\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n _assertClass(private_key, PrivateKey);\n const ptr0 = passStringToWasm0(secret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n wasm.privatekey_toCiphertext(retptr, private_key.__wbg_ptr, ptr0, len0);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n var r2 = getInt32Memory0()[retptr / 4 + 2];\n if (r2) {\n throw takeObject(r1);\n }\n return PrivateKeyCiphertext.__wrap(r0);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n }\n }\n /**\n * Decrypts a private ciphertext using a secret string. This must be the same secret used to\n * encrypt the private key\n *\n * @param {string} secret Secret used to encrypt the private key\n * @returns {PrivateKey | Error} Private key\n * @param {string} secret\n * @returns {PrivateKey}\n */\n decryptToPrivateKey(secret) {\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n const ptr0 = passStringToWasm0(secret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n wasm.privatekeyciphertext_decryptToPrivateKey(retptr, this.__wbg_ptr, ptr0, len0);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n var r2 = getInt32Memory0()[retptr / 4 + 2];\n if (r2) {\n throw takeObject(r1);\n }\n return PrivateKey.__wrap(r0);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n }\n }\n /**\n * Returns the ciphertext string\n *\n * @returns {string} Ciphertext string\n * @returns {string}\n */\n toString() {\n let deferred1_0;\n let deferred1_1;\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n wasm.privatekeyciphertext_toString(retptr, this.__wbg_ptr);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n deferred1_0 = r0;\n deferred1_1 = r1;\n return getStringFromWasm0(r0, r1);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);\n }\n }\n /**\n * Creates a PrivateKeyCiphertext from a string\n *\n * @param {string} ciphertext Ciphertext string\n * @returns {PrivateKeyCiphertext | Error} Private key ciphertext\n * @param {string} ciphertext\n * @returns {PrivateKeyCiphertext}\n */\n static fromString(ciphertext) {\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n const ptr0 = passStringToWasm0(ciphertext, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n wasm.privatekeyciphertext_fromString(retptr, ptr0, len0);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n var r2 = getInt32Memory0()[retptr / 4 + 2];\n if (r2) {\n throw takeObject(r1);\n }\n return PrivateKeyCiphertext.__wrap(r0);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n }\n }\n}\n\nconst ProgramFinalization = (typeof FinalizationRegistry === 'undefined')\n ? { register: () => {}, unregister: () => {} }\n : new FinalizationRegistry(ptr => wasm.__wbg_program_free(ptr >>> 0));\n/**\n* Webassembly Representation of an Aleo program\n*/\nclass Program {\n\n static __wrap(ptr) {\n ptr = ptr >>> 0;\n const obj = Object.create(Program.prototype);\n obj.__wbg_ptr = ptr;\n ProgramFinalization.register(obj, obj.__wbg_ptr, obj);\n return obj;\n }\n\n __destroy_into_raw() {\n const ptr = this.__wbg_ptr;\n this.__wbg_ptr = 0;\n ProgramFinalization.unregister(this);\n return ptr;\n }\n\n free() {\n const ptr = this.__destroy_into_raw();\n wasm.__wbg_program_free(ptr);\n }\n /**\n * Create a program from a program string\n *\n * @param {string} program Aleo program source code\n * @returns {Program | Error} Program object\n * @param {string} program\n * @returns {Program}\n */\n static fromString(program) {\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n const ptr0 = passStringToWasm0(program, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n wasm.program_fromString(retptr, ptr0, len0);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n var r2 = getInt32Memory0()[retptr / 4 + 2];\n if (r2) {\n throw takeObject(r1);\n }\n return Program.__wrap(r0);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n }\n }\n /**\n * Get a string representation of the program\n *\n * @returns {string} String containing the program source code\n * @returns {string}\n */\n toString() {\n let deferred1_0;\n let deferred1_1;\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n wasm.program_toString(retptr, this.__wbg_ptr);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n deferred1_0 = r0;\n deferred1_1 = r1;\n return getStringFromWasm0(r0, r1);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);\n }\n }\n /**\n * Determine if a function is present in the program\n *\n * @param {string} functionName Name of the function to check for\n * @returns {boolean} True if the program is valid, false otherwise\n * @param {string} function_name\n * @returns {boolean}\n */\n hasFunction(function_name) {\n const ptr0 = passStringToWasm0(function_name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n const ret = wasm.program_hasFunction(this.__wbg_ptr, ptr0, len0);\n return ret !== 0;\n }\n /**\n * Get javascript array of functions names in the program\n *\n * @returns {Array} Array of all function names present in the program\n *\n * @example\n * const expected_functions = [\n * \"mint\",\n * \"transfer_private\",\n * \"transfer_private_to_public\",\n * \"transfer_public\",\n * \"transfer_public_to_private\",\n * \"join\",\n * \"split\",\n * \"fee\"\n * ]\n *\n * const credits_program = aleo_wasm.Program.getCreditsProgram();\n * const credits_functions = credits_program.getFunctions();\n * console.log(credits_functions === expected_functions); // Output should be \"true\"\n * @returns {Array}\n */\n getFunctions() {\n const ret = wasm.program_getFunctions(this.__wbg_ptr);\n return takeObject(ret);\n }\n /**\n * Get a javascript object representation of the function inputs and types. This can be used\n * to generate a web form to capture user inputs for an execution of a function.\n *\n * @param {string} function_name Name of the function to get inputs for\n * @returns {Array | Error} Array of function inputs\n *\n * @example\n * const expected_inputs = [\n * {\n * type:\"record\",\n * visibility:\"private\",\n * record:\"credits\",\n * members:[\n * {\n * name:\"microcredits\",\n * type:\"u64\",\n * visibility:\"private\"\n * }\n * ],\n * register:\"r0\"\n * },\n * {\n * type:\"address\",\n * visibility:\"private\",\n * register:\"r1\"\n * },\n * {\n * type:\"u64\",\n * visibility:\"private\",\n * register:\"r2\"\n * }\n * ];\n *\n * const credits_program = aleo_wasm.Program.getCreditsProgram();\n * const transfer_function_inputs = credits_program.getFunctionInputs(\"transfer_private\");\n * console.log(transfer_function_inputs === expected_inputs); // Output should be \"true\"\n * @param {string} function_name\n * @returns {Array}\n */\n getFunctionInputs(function_name) {\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n const ptr0 = passStringToWasm0(function_name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n wasm.program_getFunctionInputs(retptr, this.__wbg_ptr, ptr0, len0);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n var r2 = getInt32Memory0()[retptr / 4 + 2];\n if (r2) {\n throw takeObject(r1);\n }\n return takeObject(r0);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n }\n }\n /**\n * Get a the list of a program's mappings and the names/types of their keys and values.\n *\n * @returns {Array | Error} - An array of objects representing the mappings in the program\n * @example\n * const expected_mappings = [\n * {\n * name: \"account\",\n * key_name: \"owner\",\n * key_type: \"address\",\n * value_name: \"microcredits\",\n * value_type: \"u64\"\n * }\n * ]\n *\n * const credits_program = aleo_wasm.Program.getCreditsProgram();\n * const credits_mappings = credits_program.getMappings();\n * console.log(credits_mappings === expected_mappings); // Output should be \"true\"\n * @returns {Array}\n */\n getMappings() {\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n wasm.program_getMappings(retptr, this.__wbg_ptr);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n var r2 = getInt32Memory0()[retptr / 4 + 2];\n if (r2) {\n throw takeObject(r1);\n }\n return takeObject(r0);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n }\n }\n /**\n * Get a javascript object representation of a program record and its types\n *\n * @param {string} record_name Name of the record to get members for\n * @returns {Object | Error} Object containing the record name, type, and members\n *\n * @example\n *\n * const expected_record = {\n * type: \"record\",\n * record: \"Credits\",\n * members: [\n * {\n * name: \"owner\",\n * type: \"address\",\n * visibility: \"private\"\n * },\n * {\n * name: \"microcredits\",\n * type: \"u64\",\n * visibility: \"private\"\n * }\n * ];\n * };\n *\n * const credits_program = aleo_wasm.Program.getCreditsProgram();\n * const credits_record = credits_program.getRecordMembers(\"Credits\");\n * console.log(credits_record === expected_record); // Output should be \"true\"\n * @param {string} record_name\n * @returns {object}\n */\n getRecordMembers(record_name) {\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n const ptr0 = passStringToWasm0(record_name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n wasm.program_getRecordMembers(retptr, this.__wbg_ptr, ptr0, len0);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n var r2 = getInt32Memory0()[retptr / 4 + 2];\n if (r2) {\n throw takeObject(r1);\n }\n return takeObject(r0);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n }\n }\n /**\n * Get a javascript object representation of a program struct and its types\n *\n * @param {string} struct_name Name of the struct to get members for\n * @returns {Array | Error} Array containing the struct members\n *\n * @example\n *\n * const STRUCT_PROGRAM = \"program token_issue.aleo;\n *\n * struct token_metadata:\n * network as u32;\n * version as u32;\n *\n * struct token:\n * token_id as u32;\n * metadata as token_metadata;\n *\n * function no_op:\n * input r0 as u64;\n * output r0 as u64;\"\n *\n * const expected_struct_members = [\n * {\n * name: \"token_id\",\n * type: \"u32\",\n * },\n * {\n * name: \"metadata\",\n * type: \"struct\",\n * struct_id: \"token_metadata\",\n * members: [\n * {\n * name: \"network\",\n * type: \"u32\",\n * }\n * {\n * name: \"version\",\n * type: \"u32\",\n * }\n * ]\n * }\n * ];\n *\n * const program = aleo_wasm.Program.fromString(STRUCT_PROGRAM);\n * const struct_members = program.getStructMembers(\"token\");\n * console.log(struct_members === expected_struct_members); // Output should be \"true\"\n * @param {string} struct_name\n * @returns {Array}\n */\n getStructMembers(struct_name) {\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n const ptr0 = passStringToWasm0(struct_name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n wasm.program_getStructMembers(retptr, this.__wbg_ptr, ptr0, len0);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n var r2 = getInt32Memory0()[retptr / 4 + 2];\n if (r2) {\n throw takeObject(r1);\n }\n return takeObject(r0);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n }\n }\n /**\n * Get the credits.aleo program\n *\n * @returns {Program} The credits.aleo program\n * @returns {Program}\n */\n static getCreditsProgram() {\n const ret = wasm.program_getCreditsProgram();\n return Program.__wrap(ret);\n }\n /**\n * Get the id of the program\n *\n * @returns {string} The id of the program\n * @returns {string}\n */\n id() {\n let deferred1_0;\n let deferred1_1;\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n wasm.program_id(retptr, this.__wbg_ptr);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n deferred1_0 = r0;\n deferred1_1 = r1;\n return getStringFromWasm0(r0, r1);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);\n }\n }\n /**\n * Get a unique address of the program\n *\n * @returns {Address} The address of the program\n * @returns {Address}\n */\n address() {\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n wasm.program_address(retptr, this.__wbg_ptr);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n var r2 = getInt32Memory0()[retptr / 4 + 2];\n if (r2) {\n throw takeObject(r1);\n }\n return Address.__wrap(r0);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n }\n }\n /**\n * Determine equality with another program\n *\n * @param {Program} other The other program to compare\n * @returns {boolean} True if the programs are equal, false otherwise\n * @param {Program} other\n * @returns {boolean}\n */\n isEqual(other) {\n _assertClass(other, Program);\n const ret = wasm.program_isEqual(this.__wbg_ptr, other.__wbg_ptr);\n return ret !== 0;\n }\n /**\n * Get program_imports\n *\n * @returns {Array} The program imports\n *\n * @example\n *\n * const DOUBLE_TEST = \"import multiply_test.aleo;\n *\n * program double_test.aleo;\n *\n * function double_it:\n * input r0 as u32.private;\n * call multiply_test.aleo/multiply 2u32 r0 into r1;\n * output r1 as u32.private;\";\n *\n * const expected_imports = [\n * \"multiply_test.aleo\"\n * ];\n *\n * const program = aleo_wasm.Program.fromString(DOUBLE_TEST_PROGRAM);\n * const imports = program.getImports();\n * console.log(imports === expected_imports); // Output should be \"true\"\n * @returns {Array}\n */\n getImports() {\n const ret = wasm.program_getImports(this.__wbg_ptr);\n return takeObject(ret);\n }\n}\n\nconst ProgramManagerFinalization = (typeof FinalizationRegistry === 'undefined')\n ? { register: () => {}, unregister: () => {} }\n : new FinalizationRegistry(ptr => wasm.__wbg_programmanager_free(ptr >>> 0));\n/**\n*/\nclass ProgramManager {\n\n __destroy_into_raw() {\n const ptr = this.__wbg_ptr;\n this.__wbg_ptr = 0;\n ProgramManagerFinalization.unregister(this);\n return ptr;\n }\n\n free() {\n const ptr = this.__destroy_into_raw();\n wasm.__wbg_programmanager_free(ptr);\n }\n /**\n * Deploy an Aleo program\n *\n * @param private_key The private key of the sender\n * @param program The source code of the program being deployed\n * @param imports A javascript object holding the source code of any imported programs in the\n * form \\{\"program_name1\": \"program_source_code\", \"program_name2\": \"program_source_code\", ..\\}.\n * Note that all imported programs must be deployed on chain before the main program in order\n * for the deployment to succeed\n * @param fee_credits The amount of credits to pay as a fee\n * @param fee_record The record to spend the fee from\n * @param url The url of the Aleo network node to send the transaction to\n * @param imports (optional) Provide a list of imports to use for the program deployment in the\n * form of a javascript object where the keys are a string of the program name and the values\n * are a string representing the program source code \\{ \"hello.aleo\": \"hello.aleo source code\" \\}\n * @param fee_proving_key (optional) Provide a proving key to use for the fee execution\n * @param fee_verifying_key (optional) Provide a verifying key to use for the fee execution\n * @returns {Transaction | Error}\n * @param {PrivateKey} private_key\n * @param {string} program\n * @param {number} fee_credits\n * @param {RecordPlaintext | undefined} [fee_record]\n * @param {string | undefined} [url]\n * @param {object | undefined} [imports]\n * @param {ProvingKey | undefined} [fee_proving_key]\n * @param {VerifyingKey | undefined} [fee_verifying_key]\n * @param {OfflineQuery | undefined} [offline_query]\n * @returns {Promise}\n */\n static buildDeploymentTransaction(private_key, program, fee_credits, fee_record, url, imports, fee_proving_key, fee_verifying_key, offline_query) {\n _assertClass(private_key, PrivateKey);\n const ptr0 = passStringToWasm0(program, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n let ptr1 = 0;\n if (!isLikeNone(fee_record)) {\n _assertClass(fee_record, RecordPlaintext);\n ptr1 = fee_record.__destroy_into_raw();\n }\n var ptr2 = isLikeNone(url) ? 0 : passStringToWasm0(url, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n var len2 = WASM_VECTOR_LEN;\n let ptr3 = 0;\n if (!isLikeNone(fee_proving_key)) {\n _assertClass(fee_proving_key, ProvingKey);\n ptr3 = fee_proving_key.__destroy_into_raw();\n }\n let ptr4 = 0;\n if (!isLikeNone(fee_verifying_key)) {\n _assertClass(fee_verifying_key, VerifyingKey);\n ptr4 = fee_verifying_key.__destroy_into_raw();\n }\n let ptr5 = 0;\n if (!isLikeNone(offline_query)) {\n _assertClass(offline_query, OfflineQuery);\n ptr5 = offline_query.__destroy_into_raw();\n }\n const ret = wasm.programmanager_buildDeploymentTransaction(private_key.__wbg_ptr, ptr0, len0, fee_credits, ptr1, ptr2, len2, isLikeNone(imports) ? 0 : addHeapObject(imports), ptr3, ptr4, ptr5);\n return takeObject(ret);\n }\n /**\n * Estimate the fee for a program deployment\n *\n * Disclaimer: Fee estimation is experimental and may not represent a correct estimate on any current or future network\n *\n * @param program The source code of the program being deployed\n * @param imports (optional) Provide a list of imports to use for the deployment fee estimation\n * in the form of a javascript object where the keys are a string of the program name and the values\n * are a string representing the program source code \\{ \"hello.aleo\": \"hello.aleo source code\" \\}\n * @returns {u64 | Error}\n * @param {string} program\n * @param {object | undefined} [imports]\n * @returns {Promise}\n */\n static estimateDeploymentFee(program, imports) {\n const ptr0 = passStringToWasm0(program, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n const ret = wasm.programmanager_estimateDeploymentFee(ptr0, len0, isLikeNone(imports) ? 0 : addHeapObject(imports));\n return takeObject(ret);\n }\n /**\n * Estimate the component of the deployment cost which comes from the fee for the program name.\n * Note that this cost does not represent the entire cost of deployment. It is additional to\n * the cost of the size (in bytes) of the deployment.\n *\n * Disclaimer: Fee estimation is experimental and may not represent a correct estimate on any current or future network\n *\n * @param name The name of the program to be deployed\n * @returns {u64 | Error}\n * @param {string} name\n * @returns {bigint}\n */\n static estimateProgramNameCost(name) {\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n const ptr0 = passStringToWasm0(name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n wasm.programmanager_estimateProgramNameCost(retptr, ptr0, len0);\n var r0 = getBigInt64Memory0()[retptr / 8 + 0];\n var r2 = getInt32Memory0()[retptr / 4 + 2];\n var r3 = getInt32Memory0()[retptr / 4 + 3];\n if (r3) {\n throw takeObject(r2);\n }\n return BigInt.asUintN(64, r0);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n }\n }\n /**\n * Execute an arbitrary function locally\n *\n * @param {PrivateKey} private_key The private key of the sender\n * @param {string} program The source code of the program being executed\n * @param {string} function The name of the function to execute\n * @param {Array} inputs A javascript array of inputs to the function\n * @param {boolean} prove_execution If true, the execution will be proven and an execution object\n * containing the proof and the encrypted inputs and outputs needed to verify the proof offline\n * will be returned.\n * @param {boolean} cache Cache the proving and verifying keys in the Execution response.\n * If this is set to 'true' the keys synthesized will be stored in the Execution Response\n * and the `ProvingKey` and `VerifyingKey` can be retrieved from the response via the `.getKeys()`\n * method.\n * @param {Object | undefined} imports (optional) Provide a list of imports to use for the function execution in the\n * form of a javascript object where the keys are a string of the program name and the values\n * are a string representing the program source code \\{ \"hello.aleo\": \"hello.aleo source code\" \\}\n * @param {ProvingKey | undefined} proving_key (optional) Provide a verifying key to use for the function execution\n * @param {VerifyingKey | undefined} verifying_key (optional) Provide a verifying key to use for the function execution\n * @param {PrivateKey} private_key\n * @param {string} program\n * @param {string} _function\n * @param {Array} inputs\n * @param {boolean} prove_execution\n * @param {boolean} cache\n * @param {object | undefined} [imports]\n * @param {ProvingKey | undefined} [proving_key]\n * @param {VerifyingKey | undefined} [verifying_key]\n * @param {string | undefined} [url]\n * @param {OfflineQuery | undefined} [offline_query]\n * @returns {Promise}\n */\n static executeFunctionOffline(private_key, program, _function, inputs, prove_execution, cache, imports, proving_key, verifying_key, url, offline_query) {\n _assertClass(private_key, PrivateKey);\n const ptr0 = passStringToWasm0(program, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n const ptr1 = passStringToWasm0(_function, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len1 = WASM_VECTOR_LEN;\n let ptr2 = 0;\n if (!isLikeNone(proving_key)) {\n _assertClass(proving_key, ProvingKey);\n ptr2 = proving_key.__destroy_into_raw();\n }\n let ptr3 = 0;\n if (!isLikeNone(verifying_key)) {\n _assertClass(verifying_key, VerifyingKey);\n ptr3 = verifying_key.__destroy_into_raw();\n }\n var ptr4 = isLikeNone(url) ? 0 : passStringToWasm0(url, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n var len4 = WASM_VECTOR_LEN;\n let ptr5 = 0;\n if (!isLikeNone(offline_query)) {\n _assertClass(offline_query, OfflineQuery);\n ptr5 = offline_query.__destroy_into_raw();\n }\n const ret = wasm.programmanager_executeFunctionOffline(private_key.__wbg_ptr, ptr0, len0, ptr1, len1, addHeapObject(inputs), prove_execution, cache, isLikeNone(imports) ? 0 : addHeapObject(imports), ptr2, ptr3, ptr4, len4, ptr5);\n return takeObject(ret);\n }\n /**\n * Execute Aleo function and create an Aleo execution transaction\n *\n * @param private_key The private key of the sender\n * @param program The source code of the program being executed\n * @param function The name of the function to execute\n * @param inputs A javascript array of inputs to the function\n * @param fee_credits The amount of credits to pay as a fee\n * @param fee_record The record to spend the fee from\n * @param url The url of the Aleo network node to send the transaction to\n * If this is set to 'true' the keys synthesized (or passed in as optional parameters via the\n * `proving_key` and `verifying_key` arguments) will be stored in the ProgramManager's memory\n * and used for subsequent transactions. If this is set to 'false' the proving and verifying\n * keys will be deallocated from memory after the transaction is executed.\n * @param imports (optional) Provide a list of imports to use for the function execution in the\n * form of a javascript object where the keys are a string of the program name and the values\n * are a string representing the program source code \\{ \"hello.aleo\": \"hello.aleo source code\" \\}\n * @param proving_key (optional) Provide a verifying key to use for the function execution\n * @param verifying_key (optional) Provide a verifying key to use for the function execution\n * @param fee_proving_key (optional) Provide a proving key to use for the fee execution\n * @param fee_verifying_key (optional) Provide a verifying key to use for the fee execution\n * @returns {Transaction | Error}\n * @param {PrivateKey} private_key\n * @param {string} program\n * @param {string} _function\n * @param {Array} inputs\n * @param {number} fee_credits\n * @param {RecordPlaintext | undefined} [fee_record]\n * @param {string | undefined} [url]\n * @param {object | undefined} [imports]\n * @param {ProvingKey | undefined} [proving_key]\n * @param {VerifyingKey | undefined} [verifying_key]\n * @param {ProvingKey | undefined} [fee_proving_key]\n * @param {VerifyingKey | undefined} [fee_verifying_key]\n * @param {OfflineQuery | undefined} [offline_query]\n * @returns {Promise}\n */\n static buildExecutionTransaction(private_key, program, _function, inputs, fee_credits, fee_record, url, imports, proving_key, verifying_key, fee_proving_key, fee_verifying_key, offline_query) {\n _assertClass(private_key, PrivateKey);\n const ptr0 = passStringToWasm0(program, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n const ptr1 = passStringToWasm0(_function, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len1 = WASM_VECTOR_LEN;\n let ptr2 = 0;\n if (!isLikeNone(fee_record)) {\n _assertClass(fee_record, RecordPlaintext);\n ptr2 = fee_record.__destroy_into_raw();\n }\n var ptr3 = isLikeNone(url) ? 0 : passStringToWasm0(url, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n var len3 = WASM_VECTOR_LEN;\n let ptr4 = 0;\n if (!isLikeNone(proving_key)) {\n _assertClass(proving_key, ProvingKey);\n ptr4 = proving_key.__destroy_into_raw();\n }\n let ptr5 = 0;\n if (!isLikeNone(verifying_key)) {\n _assertClass(verifying_key, VerifyingKey);\n ptr5 = verifying_key.__destroy_into_raw();\n }\n let ptr6 = 0;\n if (!isLikeNone(fee_proving_key)) {\n _assertClass(fee_proving_key, ProvingKey);\n ptr6 = fee_proving_key.__destroy_into_raw();\n }\n let ptr7 = 0;\n if (!isLikeNone(fee_verifying_key)) {\n _assertClass(fee_verifying_key, VerifyingKey);\n ptr7 = fee_verifying_key.__destroy_into_raw();\n }\n let ptr8 = 0;\n if (!isLikeNone(offline_query)) {\n _assertClass(offline_query, OfflineQuery);\n ptr8 = offline_query.__destroy_into_raw();\n }\n const ret = wasm.programmanager_buildExecutionTransaction(private_key.__wbg_ptr, ptr0, len0, ptr1, len1, addHeapObject(inputs), fee_credits, ptr2, ptr3, len3, isLikeNone(imports) ? 0 : addHeapObject(imports), ptr4, ptr5, ptr6, ptr7, ptr8);\n return takeObject(ret);\n }\n /**\n * Estimate Fee for Aleo function execution. Note if \"cache\" is set to true, the proving and\n * verifying keys will be stored in the ProgramManager's memory and used for subsequent\n * program executions.\n *\n * Disclaimer: Fee estimation is experimental and may not represent a correct estimate on any current or future network\n *\n * @param private_key The private key of the sender\n * @param program The source code of the program to estimate the execution fee for\n * @param function The name of the function to execute\n * @param inputs A javascript array of inputs to the function\n * @param url The url of the Aleo network node to send the transaction to\n * @param imports (optional) Provide a list of imports to use for the fee estimation in the\n * form of a javascript object where the keys are a string of the program name and the values\n * are a string representing the program source code \\{ \"hello.aleo\": \"hello.aleo source code\" \\}\n * @param proving_key (optional) Provide a verifying key to use for the fee estimation\n * @param verifying_key (optional) Provide a verifying key to use for the fee estimation\n * @returns {u64 | Error} Fee in microcredits\n * @param {PrivateKey} private_key\n * @param {string} program\n * @param {string} _function\n * @param {Array} inputs\n * @param {string | undefined} [url]\n * @param {object | undefined} [imports]\n * @param {ProvingKey | undefined} [proving_key]\n * @param {VerifyingKey | undefined} [verifying_key]\n * @param {OfflineQuery | undefined} [offline_query]\n * @returns {Promise}\n */\n static estimateExecutionFee(private_key, program, _function, inputs, url, imports, proving_key, verifying_key, offline_query) {\n _assertClass(private_key, PrivateKey);\n const ptr0 = passStringToWasm0(program, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n const ptr1 = passStringToWasm0(_function, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len1 = WASM_VECTOR_LEN;\n var ptr2 = isLikeNone(url) ? 0 : passStringToWasm0(url, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n var len2 = WASM_VECTOR_LEN;\n let ptr3 = 0;\n if (!isLikeNone(proving_key)) {\n _assertClass(proving_key, ProvingKey);\n ptr3 = proving_key.__destroy_into_raw();\n }\n let ptr4 = 0;\n if (!isLikeNone(verifying_key)) {\n _assertClass(verifying_key, VerifyingKey);\n ptr4 = verifying_key.__destroy_into_raw();\n }\n let ptr5 = 0;\n if (!isLikeNone(offline_query)) {\n _assertClass(offline_query, OfflineQuery);\n ptr5 = offline_query.__destroy_into_raw();\n }\n const ret = wasm.programmanager_estimateExecutionFee(private_key.__wbg_ptr, ptr0, len0, ptr1, len1, addHeapObject(inputs), ptr2, len2, isLikeNone(imports) ? 0 : addHeapObject(imports), ptr3, ptr4, ptr5);\n return takeObject(ret);\n }\n /**\n * Estimate the finalize fee component for executing a function. This fee is additional to the\n * size of the execution of the program in bytes. If the function does not have a finalize\n * step, then the finalize fee is 0.\n *\n * Disclaimer: Fee estimation is experimental and may not represent a correct estimate on any current or future network\n *\n * @param program The program containing the function to estimate the finalize fee for\n * @param function The function to estimate the finalize fee for\n * @returns {u64 | Error} Fee in microcredits\n * @param {string} program\n * @param {string} _function\n * @returns {bigint}\n */\n static estimateFinalizeFee(program, _function) {\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n const ptr0 = passStringToWasm0(program, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n const ptr1 = passStringToWasm0(_function, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len1 = WASM_VECTOR_LEN;\n wasm.programmanager_estimateFinalizeFee(retptr, ptr0, len0, ptr1, len1);\n var r0 = getBigInt64Memory0()[retptr / 8 + 0];\n var r2 = getInt32Memory0()[retptr / 4 + 2];\n var r3 = getInt32Memory0()[retptr / 4 + 3];\n if (r3) {\n throw takeObject(r2);\n }\n return BigInt.asUintN(64, r0);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n }\n }\n /**\n * Join two records together to create a new record with an amount of credits equal to the sum\n * of the credits of the two original records\n *\n * @param private_key The private key of the sender\n * @param record_1 The first record to combine\n * @param record_2 The second record to combine\n * @param fee_credits The amount of credits to pay as a fee\n * @param fee_record The record to spend the fee from\n * @param url The url of the Aleo network node to send the transaction to\n * @param join_proving_key (optional) Provide a proving key to use for the join function\n * @param join_verifying_key (optional) Provide a verifying key to use for the join function\n * @param fee_proving_key (optional) Provide a proving key to use for the fee execution\n * @param fee_verifying_key (optional) Provide a verifying key to use for the fee execution\n * @returns {Transaction | Error} Transaction object\n * @param {PrivateKey} private_key\n * @param {RecordPlaintext} record_1\n * @param {RecordPlaintext} record_2\n * @param {number} fee_credits\n * @param {RecordPlaintext | undefined} [fee_record]\n * @param {string | undefined} [url]\n * @param {ProvingKey | undefined} [join_proving_key]\n * @param {VerifyingKey | undefined} [join_verifying_key]\n * @param {ProvingKey | undefined} [fee_proving_key]\n * @param {VerifyingKey | undefined} [fee_verifying_key]\n * @param {OfflineQuery | undefined} [offline_query]\n * @returns {Promise}\n */\n static buildJoinTransaction(private_key, record_1, record_2, fee_credits, fee_record, url, join_proving_key, join_verifying_key, fee_proving_key, fee_verifying_key, offline_query) {\n _assertClass(private_key, PrivateKey);\n _assertClass(record_1, RecordPlaintext);\n var ptr0 = record_1.__destroy_into_raw();\n _assertClass(record_2, RecordPlaintext);\n var ptr1 = record_2.__destroy_into_raw();\n let ptr2 = 0;\n if (!isLikeNone(fee_record)) {\n _assertClass(fee_record, RecordPlaintext);\n ptr2 = fee_record.__destroy_into_raw();\n }\n var ptr3 = isLikeNone(url) ? 0 : passStringToWasm0(url, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n var len3 = WASM_VECTOR_LEN;\n let ptr4 = 0;\n if (!isLikeNone(join_proving_key)) {\n _assertClass(join_proving_key, ProvingKey);\n ptr4 = join_proving_key.__destroy_into_raw();\n }\n let ptr5 = 0;\n if (!isLikeNone(join_verifying_key)) {\n _assertClass(join_verifying_key, VerifyingKey);\n ptr5 = join_verifying_key.__destroy_into_raw();\n }\n let ptr6 = 0;\n if (!isLikeNone(fee_proving_key)) {\n _assertClass(fee_proving_key, ProvingKey);\n ptr6 = fee_proving_key.__destroy_into_raw();\n }\n let ptr7 = 0;\n if (!isLikeNone(fee_verifying_key)) {\n _assertClass(fee_verifying_key, VerifyingKey);\n ptr7 = fee_verifying_key.__destroy_into_raw();\n }\n let ptr8 = 0;\n if (!isLikeNone(offline_query)) {\n _assertClass(offline_query, OfflineQuery);\n ptr8 = offline_query.__destroy_into_raw();\n }\n const ret = wasm.programmanager_buildJoinTransaction(private_key.__wbg_ptr, ptr0, ptr1, fee_credits, ptr2, ptr3, len3, ptr4, ptr5, ptr6, ptr7, ptr8);\n return takeObject(ret);\n }\n /**\n * Split an Aleo credits record into two separate records. This function does not require a fee.\n *\n * @param private_key The private key of the sender\n * @param split_amount The amount of the credit split. This amount will be subtracted from the\n * value of the record and two new records will be created with the split amount and the remainder\n * @param amount_record The record to split\n * @param url The url of the Aleo network node to send the transaction to\n * @param split_proving_key (optional) Provide a proving key to use for the split function\n * @param split_verifying_key (optional) Provide a verifying key to use for the split function\n * @returns {Transaction | Error} Transaction object\n * @param {PrivateKey} private_key\n * @param {number} split_amount\n * @param {RecordPlaintext} amount_record\n * @param {string | undefined} [url]\n * @param {ProvingKey | undefined} [split_proving_key]\n * @param {VerifyingKey | undefined} [split_verifying_key]\n * @param {OfflineQuery | undefined} [offline_query]\n * @returns {Promise}\n */\n static buildSplitTransaction(private_key, split_amount, amount_record, url, split_proving_key, split_verifying_key, offline_query) {\n _assertClass(private_key, PrivateKey);\n _assertClass(amount_record, RecordPlaintext);\n var ptr0 = amount_record.__destroy_into_raw();\n var ptr1 = isLikeNone(url) ? 0 : passStringToWasm0(url, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n var len1 = WASM_VECTOR_LEN;\n let ptr2 = 0;\n if (!isLikeNone(split_proving_key)) {\n _assertClass(split_proving_key, ProvingKey);\n ptr2 = split_proving_key.__destroy_into_raw();\n }\n let ptr3 = 0;\n if (!isLikeNone(split_verifying_key)) {\n _assertClass(split_verifying_key, VerifyingKey);\n ptr3 = split_verifying_key.__destroy_into_raw();\n }\n let ptr4 = 0;\n if (!isLikeNone(offline_query)) {\n _assertClass(offline_query, OfflineQuery);\n ptr4 = offline_query.__destroy_into_raw();\n }\n const ret = wasm.programmanager_buildSplitTransaction(private_key.__wbg_ptr, split_amount, ptr0, ptr1, len1, ptr2, ptr3, ptr4);\n return takeObject(ret);\n }\n /**\n * Send credits from one Aleo account to another\n *\n * @param private_key The private key of the sender\n * @param amount_credits The amount of credits to send\n * @param recipient The recipient of the transaction\n * @param transfer_type The type of the transfer (options: \"private\", \"public\", \"private_to_public\", \"public_to_private\")\n * @param amount_record The record to fund the amount from\n * @param fee_credits The amount of credits to pay as a fee\n * @param fee_record The record to spend the fee from\n * @param url The url of the Aleo network node to send the transaction to\n * @param transfer_verifying_key (optional) Provide a verifying key to use for the transfer\n * function\n * @param fee_proving_key (optional) Provide a proving key to use for the fee execution\n * @param fee_verifying_key (optional) Provide a verifying key to use for the fee execution\n * @returns {Transaction | Error}\n * @param {PrivateKey} private_key\n * @param {number} amount_credits\n * @param {string} recipient\n * @param {string} transfer_type\n * @param {string | undefined} caller\n * @param {RecordPlaintext | undefined} amount_record\n * @param {number} fee_credits\n * @param {RecordPlaintext | undefined} [fee_record]\n * @param {string | undefined} [url]\n * @param {ProvingKey | undefined} [transfer_proving_key]\n * @param {VerifyingKey | undefined} [transfer_verifying_key]\n * @param {ProvingKey | undefined} [fee_proving_key]\n * @param {VerifyingKey | undefined} [fee_verifying_key]\n * @param {OfflineQuery | undefined} [offline_query]\n * @returns {Promise}\n */\n static buildTransferTransaction(private_key, amount_credits, recipient, transfer_type, caller, amount_record, fee_credits, fee_record, url, transfer_proving_key, transfer_verifying_key, fee_proving_key, fee_verifying_key, offline_query) {\n _assertClass(private_key, PrivateKey);\n const ptr0 = passStringToWasm0(recipient, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n const ptr1 = passStringToWasm0(transfer_type, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len1 = WASM_VECTOR_LEN;\n var ptr2 = isLikeNone(caller) ? 0 : passStringToWasm0(caller, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n var len2 = WASM_VECTOR_LEN;\n let ptr3 = 0;\n if (!isLikeNone(amount_record)) {\n _assertClass(amount_record, RecordPlaintext);\n ptr3 = amount_record.__destroy_into_raw();\n }\n let ptr4 = 0;\n if (!isLikeNone(fee_record)) {\n _assertClass(fee_record, RecordPlaintext);\n ptr4 = fee_record.__destroy_into_raw();\n }\n var ptr5 = isLikeNone(url) ? 0 : passStringToWasm0(url, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n var len5 = WASM_VECTOR_LEN;\n let ptr6 = 0;\n if (!isLikeNone(transfer_proving_key)) {\n _assertClass(transfer_proving_key, ProvingKey);\n ptr6 = transfer_proving_key.__destroy_into_raw();\n }\n let ptr7 = 0;\n if (!isLikeNone(transfer_verifying_key)) {\n _assertClass(transfer_verifying_key, VerifyingKey);\n ptr7 = transfer_verifying_key.__destroy_into_raw();\n }\n let ptr8 = 0;\n if (!isLikeNone(fee_proving_key)) {\n _assertClass(fee_proving_key, ProvingKey);\n ptr8 = fee_proving_key.__destroy_into_raw();\n }\n let ptr9 = 0;\n if (!isLikeNone(fee_verifying_key)) {\n _assertClass(fee_verifying_key, VerifyingKey);\n ptr9 = fee_verifying_key.__destroy_into_raw();\n }\n let ptr10 = 0;\n if (!isLikeNone(offline_query)) {\n _assertClass(offline_query, OfflineQuery);\n ptr10 = offline_query.__destroy_into_raw();\n }\n const ret = wasm.programmanager_buildTransferTransaction(private_key.__wbg_ptr, amount_credits, ptr0, len0, ptr1, len1, ptr2, len2, ptr3, fee_credits, ptr4, ptr5, len5, ptr6, ptr7, ptr8, ptr9, ptr10);\n return takeObject(ret);\n }\n /**\n * Synthesize proving and verifying keys for a program\n *\n * @param program {string} The program source code of the program to synthesize keys for\n * @param function_id {string} The function to synthesize keys for\n * @param inputs {Array} The inputs to the function\n * @param imports {Object | undefined} The imports for the program\n * @param {PrivateKey} private_key\n * @param {string} program\n * @param {string} function_id\n * @param {Array} inputs\n * @param {object | undefined} [imports]\n * @returns {Promise}\n */\n static synthesizeKeyPair(private_key, program, function_id, inputs, imports) {\n _assertClass(private_key, PrivateKey);\n const ptr0 = passStringToWasm0(program, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n const ptr1 = passStringToWasm0(function_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len1 = WASM_VECTOR_LEN;\n const ret = wasm.programmanager_synthesizeKeyPair(private_key.__wbg_ptr, ptr0, len0, ptr1, len1, addHeapObject(inputs), isLikeNone(imports) ? 0 : addHeapObject(imports));\n return takeObject(ret);\n }\n}\n\nconst ProvingKeyFinalization = (typeof FinalizationRegistry === 'undefined')\n ? { register: () => {}, unregister: () => {} }\n : new FinalizationRegistry(ptr => wasm.__wbg_provingkey_free(ptr >>> 0));\n/**\n* Proving key for a function within an Aleo program\n*/\nclass ProvingKey {\n\n static __wrap(ptr) {\n ptr = ptr >>> 0;\n const obj = Object.create(ProvingKey.prototype);\n obj.__wbg_ptr = ptr;\n ProvingKeyFinalization.register(obj, obj.__wbg_ptr, obj);\n return obj;\n }\n\n __destroy_into_raw() {\n const ptr = this.__wbg_ptr;\n this.__wbg_ptr = 0;\n ProvingKeyFinalization.unregister(this);\n return ptr;\n }\n\n free() {\n const ptr = this.__destroy_into_raw();\n wasm.__wbg_provingkey_free(ptr);\n }\n /**\n * Verify if the proving key is for the bond_public function\n *\n * @example\n * const provingKey = ProvingKey.fromBytes(\"bond_public_proving_key.bin\");\n * provingKey.isBondPublicProver() ? console.log(\"Key verified\") : throw new Error(\"Invalid key\");\n *\n * @returns {boolean} returns true if the proving key is for the bond_public function, false if otherwise\n * @returns {boolean}\n */\n isBondPublicProver() {\n const ret = wasm.provingkey_isBondPublicProver(this.__wbg_ptr);\n return ret !== 0;\n }\n /**\n * Verify if the proving key is for the bond_validator function\n *\n * @example\n * const provingKey = ProvingKey.fromBytes(\"bond_validator_proving_key.bin\");\n * provingKey.isBondPublicProver() ? console.log(\"Key verified\") : throw new Error(\"Invalid key\");\n *\n * @returns {boolean} returns true if the proving key is for the bond_validator function, false if otherwise\n * @returns {boolean}\n */\n isBondValidatorProver() {\n const ret = wasm.provingkey_isBondValidatorProver(this.__wbg_ptr);\n return ret !== 0;\n }\n /**\n * Verify if the proving key is for the claim_unbond function\n *\n * @example\n * const provingKey = ProvingKey.fromBytes(\"claim_unbond_proving_key.bin\");\n * provingKey.isClaimUnbondProver() ? console.log(\"Key verified\") : throw new Error(\"Invalid key\");\n *\n * @returns {boolean} returns true if the proving key is for the claim_unbond function, false if otherwise\n * @returns {boolean}\n */\n isClaimUnbondPublicProver() {\n const ret = wasm.provingkey_isClaimUnbondPublicProver(this.__wbg_ptr);\n return ret !== 0;\n }\n /**\n * Verify if the proving key is for the fee_private function\n *\n * @example\n * const provingKey = ProvingKey.fromBytes(\"fee_private_proving_key.bin\");\n * provingKey.isFeePrivateProver() ? console.log(\"Key verified\") : throw new Error(\"Invalid key\");\n *\n * @returns {boolean} returns true if the proving key is for the fee_private function, false if otherwise\n * @returns {boolean}\n */\n isFeePrivateProver() {\n const ret = wasm.provingkey_isFeePrivateProver(this.__wbg_ptr);\n return ret !== 0;\n }\n /**\n * Verify if the proving key is for the fee_public function\n *\n * @example\n * const provingKey = ProvingKey.fromBytes(\"fee_public_proving_key.bin\");\n * provingKey.isFeePublicProver() ? console.log(\"Key verified\") : throw new Error(\"Invalid key\");\n *\n * @returns {boolean} returns true if the proving key is for the fee_public function, false if otherwise\n * @returns {boolean}\n */\n isFeePublicProver() {\n const ret = wasm.provingkey_isFeePublicProver(this.__wbg_ptr);\n return ret !== 0;\n }\n /**\n * Verify if the proving key is for the inclusion function\n *\n * @example\n * const provingKey = ProvingKey.fromBytes(\"inclusion_proving_key.bin\");\n * provingKey.isInclusionProver() ? console.log(\"Key verified\") : throw new Error(\"Invalid key\");\n *\n * @returns {boolean} returns true if the proving key is for the inclusion function, false if otherwise\n * @returns {boolean}\n */\n isInclusionProver() {\n const ret = wasm.provingkey_isInclusionProver(this.__wbg_ptr);\n return ret !== 0;\n }\n /**\n * Verify if the proving key is for the join function\n *\n * @example\n * const provingKey = ProvingKey.fromBytes(\"join_proving_key.bin\");\n * provingKey.isJoinProver() ? console.log(\"Key verified\") : throw new Error(\"Invalid key\");\n *\n * @returns {boolean} returns true if the proving key is for the join function, false if otherwise\n * @returns {boolean}\n */\n isJoinProver() {\n const ret = wasm.provingkey_isJoinProver(this.__wbg_ptr);\n return ret !== 0;\n }\n /**\n * Verify if the proving key is for the set_validator_state function\n *\n * @example\n * const provingKey = ProvingKey.fromBytes(\"set_validator_set_proving_key.bin\");\n * provingKey.isSetValidatorStateProver() ? console.log(\"Key verified\") : throw new Error(\"Invalid key\");\n *\n * @returns {boolean} returns true if the proving key is for the set_validator_state function, false if otherwise\n * @returns {boolean}\n */\n isSetValidatorStateProver() {\n const ret = wasm.provingkey_isSetValidatorStateProver(this.__wbg_ptr);\n return ret !== 0;\n }\n /**\n * Verify if the proving key is for the split function\n *\n * @example\n * const provingKey = ProvingKey.fromBytes(\"split_proving_key.bin\");\n * provingKey.isSplitProver() ? console.log(\"Key verified\") : throw new Error(\"Invalid key\");\n *\n * @returns {boolean} returns true if the proving key is for the split function, false if otherwise\n * @returns {boolean}\n */\n isSplitProver() {\n const ret = wasm.provingkey_isSplitProver(this.__wbg_ptr);\n return ret !== 0;\n }\n /**\n * Verify if the proving key is for the transfer_private function\n *\n * @example\n * const provingKey = ProvingKey.fromBytes(\"transfer_private_proving_key.bin\");\n * provingKey.isTransferPrivateProver() ? console.log(\"Key verified\") : throw new Error(\"Invalid key\");\n *\n * @returns {boolean} returns true if the proving key is for the transfer_private function, false if otherwise\n * @returns {boolean}\n */\n isTransferPrivateProver() {\n const ret = wasm.provingkey_isTransferPrivateProver(this.__wbg_ptr);\n return ret !== 0;\n }\n /**\n * Verify if the proving key is for the transfer_private_to_public function\n *\n * @example\n * const provingKey = ProvingKey.fromBytes(\"transfer_private_to_public_proving_key.bin\");\n * provingKey.isTransferPrivateToPublicProver() ? console.log(\"Key verified\") : throw new Error(\"Invalid key\");\n *\n * @returns {boolean} returns true if the proving key is for the transfer_private_to_public function, false if otherwise\n * @returns {boolean}\n */\n isTransferPrivateToPublicProver() {\n const ret = wasm.provingkey_isTransferPrivateToPublicProver(this.__wbg_ptr);\n return ret !== 0;\n }\n /**\n * Verify if the proving key is for the transfer_public function\n *\n * @example\n * const provingKey = ProvingKey.fromBytes(\"transfer_public_proving_key.bin\");\n * provingKey.isTransferPublicProver() ? console.log(\"Key verified\") : throw new Error(\"Invalid key\");\n *\n * @returns {boolean} returns true if the proving key is for the transfer_public function, false if otherwise\n * @returns {boolean}\n */\n isTransferPublicProver() {\n const ret = wasm.provingkey_isTransferPublicProver(this.__wbg_ptr);\n return ret !== 0;\n }\n /**\n * Verify if the proving key is for the transfer_public_as_signer function\n *\n * @example\n * const provingKey = ProvingKey.fromBytes(\"transfer_public_as_signer_proving_key.bin\");\n * provingKey.isTransferPublicAsSignerProver() ? console.log(\"Key verified\") : throw new Error(\"Invalid key\");\n *\n * @returns {boolean} returns true if the proving key is for the transfer_public function, false if otherwise\n * @returns {boolean}\n */\n isTransferPublicAsSignerProver() {\n const ret = wasm.provingkey_isTransferPublicAsSignerProver(this.__wbg_ptr);\n return ret !== 0;\n }\n /**\n * Verify if the proving key is for the transfer_public_to_private function\n *\n * @example\n * const provingKey = ProvingKey.fromBytes(\"transfer_public_to_private_proving_key.bin\");\n * provingKey.isTransferPublicToPrivateProver() ? console.log(\"Key verified\") : throw new Error(\"Invalid key\");\n *\n * @returns {boolean} returns true if the proving key is for the transfer_public_to_private function, false if otherwise\n * @returns {boolean}\n */\n isTransferPublicToPrivateProver() {\n const ret = wasm.provingkey_isTransferPublicToPrivateProver(this.__wbg_ptr);\n return ret !== 0;\n }\n /**\n * Verify if the proving key is for the unbond_public function\n *\n * @example\n * const provingKey = ProvingKey.fromBytes(\"unbond_public.bin\");\n * provingKey.isUnbondPublicProver() ? console.log(\"Key verified\") : throw new Error(\"Invalid key\");\n *\n * @returns {boolean} returns true if the proving key is for the unbond_public_prover function, false if otherwise\n * @returns {boolean}\n */\n isUnbondPublicProver() {\n const ret = wasm.provingkey_isUnbondPublicProver(this.__wbg_ptr);\n return ret !== 0;\n }\n /**\n * Return the checksum of the proving key\n *\n * @returns {string} Checksum of the proving key\n * @returns {string}\n */\n checksum() {\n let deferred1_0;\n let deferred1_1;\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n wasm.provingkey_checksum(retptr, this.__wbg_ptr);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n deferred1_0 = r0;\n deferred1_1 = r1;\n return getStringFromWasm0(r0, r1);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);\n }\n }\n /**\n * Create a copy of the proving key\n *\n * @returns {ProvingKey} A copy of the proving key\n * @returns {ProvingKey}\n */\n copy() {\n const ret = wasm.provingkey_copy(this.__wbg_ptr);\n return ProvingKey.__wrap(ret);\n }\n /**\n * Construct a new proving key from a byte array\n *\n * @param {Uint8Array} bytes Byte array representation of a proving key\n * @returns {ProvingKey | Error}\n * @param {Uint8Array} bytes\n * @returns {ProvingKey}\n */\n static fromBytes(bytes) {\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n const ptr0 = passArray8ToWasm0(bytes, wasm.__wbindgen_malloc);\n const len0 = WASM_VECTOR_LEN;\n wasm.provingkey_fromBytes(retptr, ptr0, len0);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n var r2 = getInt32Memory0()[retptr / 4 + 2];\n if (r2) {\n throw takeObject(r1);\n }\n return ProvingKey.__wrap(r0);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n }\n }\n /**\n * Create a proving key from string\n *\n * @param {string | Error} String representation of the proving key\n * @param {string} string\n * @returns {ProvingKey}\n */\n static fromString(string) {\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n const ptr0 = passStringToWasm0(string, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n wasm.provingkey_fromString(retptr, ptr0, len0);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n var r2 = getInt32Memory0()[retptr / 4 + 2];\n if (r2) {\n throw takeObject(r1);\n }\n return ProvingKey.__wrap(r0);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n }\n }\n /**\n * Return the byte representation of a proving key\n *\n * @returns {Uint8Array | Error} Byte array representation of a proving key\n * @returns {Uint8Array}\n */\n toBytes() {\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n wasm.provingkey_toBytes(retptr, this.__wbg_ptr);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n var r2 = getInt32Memory0()[retptr / 4 + 2];\n var r3 = getInt32Memory0()[retptr / 4 + 3];\n if (r3) {\n throw takeObject(r2);\n }\n var v1 = getArrayU8FromWasm0(r0, r1).slice();\n wasm.__wbindgen_free(r0, r1 * 1, 1);\n return v1;\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n }\n }\n /**\n * Get a string representation of the proving key\n *\n * @returns {string} String representation of the proving key\n * @returns {string}\n */\n toString() {\n let deferred1_0;\n let deferred1_1;\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n wasm.provingkey_toString(retptr, this.__wbg_ptr);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n deferred1_0 = r0;\n deferred1_1 = r1;\n return getStringFromWasm0(r0, r1);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);\n }\n }\n}\n\nconst RecordCiphertextFinalization = (typeof FinalizationRegistry === 'undefined')\n ? { register: () => {}, unregister: () => {} }\n : new FinalizationRegistry(ptr => wasm.__wbg_recordciphertext_free(ptr >>> 0));\n/**\n* Encrypted Aleo record\n*/\nclass RecordCiphertext {\n\n static __wrap(ptr) {\n ptr = ptr >>> 0;\n const obj = Object.create(RecordCiphertext.prototype);\n obj.__wbg_ptr = ptr;\n RecordCiphertextFinalization.register(obj, obj.__wbg_ptr, obj);\n return obj;\n }\n\n __destroy_into_raw() {\n const ptr = this.__wbg_ptr;\n this.__wbg_ptr = 0;\n RecordCiphertextFinalization.unregister(this);\n return ptr;\n }\n\n free() {\n const ptr = this.__destroy_into_raw();\n wasm.__wbg_recordciphertext_free(ptr);\n }\n /**\n * Create a record ciphertext from a string\n *\n * @param {string} record String representation of a record ciphertext\n * @returns {RecordCiphertext | Error} Record ciphertext\n * @param {string} record\n * @returns {RecordCiphertext}\n */\n static fromString(record) {\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n const ptr0 = passStringToWasm0(record, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n wasm.recordciphertext_fromString(retptr, ptr0, len0);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n var r2 = getInt32Memory0()[retptr / 4 + 2];\n if (r2) {\n throw takeObject(r1);\n }\n return RecordCiphertext.__wrap(r0);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n }\n }\n /**\n * Return the string reprensentation of the record ciphertext\n *\n * @returns {string} String representation of the record ciphertext\n * @returns {string}\n */\n toString() {\n let deferred1_0;\n let deferred1_1;\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n wasm.recordciphertext_toString(retptr, this.__wbg_ptr);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n deferred1_0 = r0;\n deferred1_1 = r1;\n return getStringFromWasm0(r0, r1);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);\n }\n }\n /**\n * Decrypt the record ciphertext into plaintext using the view key. The record will only\n * decrypt if the record was encrypted by the account corresponding to the view key\n *\n * @param {ViewKey} view_key View key used to decrypt the ciphertext\n * @returns {RecordPlaintext | Error} Record plaintext object\n * @param {ViewKey} view_key\n * @returns {RecordPlaintext}\n */\n decrypt(view_key) {\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n _assertClass(view_key, ViewKey);\n wasm.recordciphertext_decrypt(retptr, this.__wbg_ptr, view_key.__wbg_ptr);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n var r2 = getInt32Memory0()[retptr / 4 + 2];\n if (r2) {\n throw takeObject(r1);\n }\n return RecordPlaintext.__wrap(r0);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n }\n }\n /**\n * Determines if the account corresponding to the view key is the owner of the record\n *\n * @param {ViewKey} view_key View key used to decrypt the ciphertext\n * @returns {boolean}\n * @param {ViewKey} view_key\n * @returns {boolean}\n */\n isOwner(view_key) {\n _assertClass(view_key, ViewKey);\n const ret = wasm.recordciphertext_isOwner(this.__wbg_ptr, view_key.__wbg_ptr);\n return ret !== 0;\n }\n}\n\nconst RecordPlaintextFinalization = (typeof FinalizationRegistry === 'undefined')\n ? { register: () => {}, unregister: () => {} }\n : new FinalizationRegistry(ptr => wasm.__wbg_recordplaintext_free(ptr >>> 0));\n/**\n* Plaintext representation of an Aleo record\n*/\nclass RecordPlaintext {\n\n static __wrap(ptr) {\n ptr = ptr >>> 0;\n const obj = Object.create(RecordPlaintext.prototype);\n obj.__wbg_ptr = ptr;\n RecordPlaintextFinalization.register(obj, obj.__wbg_ptr, obj);\n return obj;\n }\n\n __destroy_into_raw() {\n const ptr = this.__wbg_ptr;\n this.__wbg_ptr = 0;\n RecordPlaintextFinalization.unregister(this);\n return ptr;\n }\n\n free() {\n const ptr = this.__destroy_into_raw();\n wasm.__wbg_recordplaintext_free(ptr);\n }\n /**\n * @param {string} program_id\n * @param {string} record_name\n * @returns {Field}\n */\n commitment(program_id, record_name) {\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n const ptr0 = passStringToWasm0(program_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n const ptr1 = passStringToWasm0(record_name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len1 = WASM_VECTOR_LEN;\n wasm.recordplaintext_commitment(retptr, this.__wbg_ptr, ptr0, len0, ptr1, len1);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n var r2 = getInt32Memory0()[retptr / 4 + 2];\n if (r2) {\n throw takeObject(r1);\n }\n return Field.__wrap(r0);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n }\n }\n /**\n * Return a record plaintext from a string.\n *\n * @param {string} record String representation of a plaintext representation of an Aleo record\n * @returns {RecordPlaintext | Error} Record plaintext\n * @param {string} record\n * @returns {RecordPlaintext}\n */\n static fromString(record) {\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n const ptr0 = passStringToWasm0(record, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n wasm.recordplaintext_fromString(retptr, ptr0, len0);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n var r2 = getInt32Memory0()[retptr / 4 + 2];\n if (r2) {\n throw takeObject(r1);\n }\n return RecordPlaintext.__wrap(r0);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n }\n }\n /**\n * Returns the record plaintext string\n *\n * @returns {string} String representation of the record plaintext\n * @returns {string}\n */\n toString() {\n let deferred1_0;\n let deferred1_1;\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n wasm.recordplaintext_toString(retptr, this.__wbg_ptr);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n deferred1_0 = r0;\n deferred1_1 = r1;\n return getStringFromWasm0(r0, r1);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);\n }\n }\n /**\n * Returns the amount of microcredits in the record\n *\n * @returns {u64} Amount of microcredits in the record\n * @returns {bigint}\n */\n microcredits() {\n const ret = wasm.recordplaintext_microcredits(this.__wbg_ptr);\n return BigInt.asUintN(64, ret);\n }\n /**\n * Returns the nonce of the record. This can be used to uniquely identify a record.\n *\n * @returns {string} Nonce of the record\n * @returns {string}\n */\n nonce() {\n let deferred1_0;\n let deferred1_1;\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n wasm.recordplaintext_nonce(retptr, this.__wbg_ptr);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n deferred1_0 = r0;\n deferred1_1 = r1;\n return getStringFromWasm0(r0, r1);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);\n }\n }\n /**\n * Attempt to get the serial number of a record to determine whether or not is has been spent\n *\n * @param {PrivateKey} private_key Private key of the account that owns the record\n * @param {string} program_id Program ID of the program that the record is associated with\n * @param {string} record_name Name of the record\n * @returns {string | Error} Serial number of the record\n * @param {PrivateKey} private_key\n * @param {string} program_id\n * @param {string} record_name\n * @returns {string}\n */\n serialNumberString(private_key, program_id, record_name) {\n let deferred4_0;\n let deferred4_1;\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n _assertClass(private_key, PrivateKey);\n const ptr0 = passStringToWasm0(program_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n const ptr1 = passStringToWasm0(record_name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len1 = WASM_VECTOR_LEN;\n wasm.recordplaintext_serialNumberString(retptr, this.__wbg_ptr, private_key.__wbg_ptr, ptr0, len0, ptr1, len1);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n var r2 = getInt32Memory0()[retptr / 4 + 2];\n var r3 = getInt32Memory0()[retptr / 4 + 3];\n var ptr3 = r0;\n var len3 = r1;\n if (r3) {\n ptr3 = 0; len3 = 0;\n throw takeObject(r2);\n }\n deferred4_0 = ptr3;\n deferred4_1 = len3;\n return getStringFromWasm0(ptr3, len3);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n wasm.__wbindgen_free(deferred4_0, deferred4_1, 1);\n }\n }\n}\n\nconst SignatureFinalization = (typeof FinalizationRegistry === 'undefined')\n ? { register: () => {}, unregister: () => {} }\n : new FinalizationRegistry(ptr => wasm.__wbg_signature_free(ptr >>> 0));\n/**\n* Cryptographic signature of a message signed by an Aleo account\n*/\nclass Signature {\n\n static __wrap(ptr) {\n ptr = ptr >>> 0;\n const obj = Object.create(Signature.prototype);\n obj.__wbg_ptr = ptr;\n SignatureFinalization.register(obj, obj.__wbg_ptr, obj);\n return obj;\n }\n\n __destroy_into_raw() {\n const ptr = this.__wbg_ptr;\n this.__wbg_ptr = 0;\n SignatureFinalization.unregister(this);\n return ptr;\n }\n\n free() {\n const ptr = this.__destroy_into_raw();\n wasm.__wbg_signature_free(ptr);\n }\n /**\n * Sign a message with a private key\n *\n * @param {PrivateKey} private_key The private key to sign the message with\n * @param {Uint8Array} message Byte representation of the message to sign\n * @returns {Signature} Signature of the message\n * @param {PrivateKey} private_key\n * @param {Uint8Array} message\n * @returns {Signature}\n */\n static sign(private_key, message) {\n _assertClass(private_key, PrivateKey);\n const ptr0 = passArray8ToWasm0(message, wasm.__wbindgen_malloc);\n const len0 = WASM_VECTOR_LEN;\n const ret = wasm.privatekey_sign(private_key.__wbg_ptr, ptr0, len0);\n return Signature.__wrap(ret);\n }\n /**\n * Verify a signature of a message with an address\n *\n * @param {Address} address The address to verify the signature with\n * @param {Uint8Array} message Byte representation of the message to verify\n * @returns {boolean} True if the signature is valid, false otherwise\n * @param {Address} address\n * @param {Uint8Array} message\n * @returns {boolean}\n */\n verify(address, message) {\n _assertClass(address, Address);\n const ptr0 = passArray8ToWasm0(message, wasm.__wbindgen_malloc);\n const len0 = WASM_VECTOR_LEN;\n const ret = wasm.signature_verify(this.__wbg_ptr, address.__wbg_ptr, ptr0, len0);\n return ret !== 0;\n }\n /**\n * Get a signature from a string representation of a signature\n *\n * @param {string} signature String representation of a signature\n * @returns {Signature} Signature\n * @param {string} signature\n * @returns {Signature}\n */\n static from_string(signature) {\n const ptr0 = passStringToWasm0(signature, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n const ret = wasm.signature_from_string(ptr0, len0);\n return Signature.__wrap(ret);\n }\n /**\n * Get a string representation of a signature\n *\n * @returns {string} String representation of a signature\n * @returns {string}\n */\n to_string() {\n let deferred1_0;\n let deferred1_1;\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n wasm.signature_to_string(retptr, this.__wbg_ptr);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n deferred1_0 = r0;\n deferred1_1 = r1;\n return getStringFromWasm0(r0, r1);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);\n }\n }\n}\n\nconst TransactionFinalization = (typeof FinalizationRegistry === 'undefined')\n ? { register: () => {}, unregister: () => {} }\n : new FinalizationRegistry(ptr => wasm.__wbg_transaction_free(ptr >>> 0));\n/**\n* Webassembly Representation of an Aleo transaction\n*\n* This object is created when generating an on-chain function deployment or execution and is the\n* object that should be submitted to the Aleo Network in order to deploy or execute a function.\n*/\nclass Transaction {\n\n static __wrap(ptr) {\n ptr = ptr >>> 0;\n const obj = Object.create(Transaction.prototype);\n obj.__wbg_ptr = ptr;\n TransactionFinalization.register(obj, obj.__wbg_ptr, obj);\n return obj;\n }\n\n __destroy_into_raw() {\n const ptr = this.__wbg_ptr;\n this.__wbg_ptr = 0;\n TransactionFinalization.unregister(this);\n return ptr;\n }\n\n free() {\n const ptr = this.__destroy_into_raw();\n wasm.__wbg_transaction_free(ptr);\n }\n /**\n * Create a transaction from a string\n *\n * @param {string} transaction String representation of a transaction\n * @returns {Transaction | Error}\n * @param {string} transaction\n * @returns {Transaction}\n */\n static fromString(transaction) {\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n const ptr0 = passStringToWasm0(transaction, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n wasm.transaction_fromString(retptr, ptr0, len0);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n var r2 = getInt32Memory0()[retptr / 4 + 2];\n if (r2) {\n throw takeObject(r1);\n }\n return Transaction.__wrap(r0);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n }\n }\n /**\n * Get the transaction as a string. If you want to submit this transaction to the Aleo Network\n * this function will create the string that should be submitted in the `POST` data.\n *\n * @returns {string} String representation of the transaction\n * @returns {string}\n */\n toString() {\n let deferred1_0;\n let deferred1_1;\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n wasm.transaction_toString(retptr, this.__wbg_ptr);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n deferred1_0 = r0;\n deferred1_1 = r1;\n return getStringFromWasm0(r0, r1);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);\n }\n }\n /**\n * Get the id of the transaction. This is the merkle root of the transaction's inclusion proof.\n *\n * This value can be used to query the status of the transaction on the Aleo Network to see\n * if it was successful. If successful, the transaction will be included in a block and this\n * value can be used to lookup the transaction data on-chain.\n *\n * @returns {string} Transaction id\n * @returns {string}\n */\n transactionId() {\n let deferred1_0;\n let deferred1_1;\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n wasm.transaction_transactionId(retptr, this.__wbg_ptr);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n deferred1_0 = r0;\n deferred1_1 = r1;\n return getStringFromWasm0(r0, r1);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);\n }\n }\n /**\n * Get the type of the transaction (will return \"deploy\" or \"execute\")\n *\n * @returns {string} Transaction type\n * @returns {string}\n */\n transactionType() {\n let deferred1_0;\n let deferred1_1;\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n wasm.transaction_transactionType(retptr, this.__wbg_ptr);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n deferred1_0 = r0;\n deferred1_1 = r1;\n return getStringFromWasm0(r0, r1);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);\n }\n }\n}\n\nconst VerifyingKeyFinalization = (typeof FinalizationRegistry === 'undefined')\n ? { register: () => {}, unregister: () => {} }\n : new FinalizationRegistry(ptr => wasm.__wbg_verifyingkey_free(ptr >>> 0));\n/**\n* Verifying key for a function within an Aleo program\n*/\nclass VerifyingKey {\n\n static __wrap(ptr) {\n ptr = ptr >>> 0;\n const obj = Object.create(VerifyingKey.prototype);\n obj.__wbg_ptr = ptr;\n VerifyingKeyFinalization.register(obj, obj.__wbg_ptr, obj);\n return obj;\n }\n\n __destroy_into_raw() {\n const ptr = this.__wbg_ptr;\n this.__wbg_ptr = 0;\n VerifyingKeyFinalization.unregister(this);\n return ptr;\n }\n\n free() {\n const ptr = this.__destroy_into_raw();\n wasm.__wbg_verifyingkey_free(ptr);\n }\n /**\n * Returns the verifying key for the bond_public function\n *\n * @returns {VerifyingKey} Verifying key for the bond_public function\n * @returns {VerifyingKey}\n */\n static bondPublicVerifier() {\n const ret = wasm.verifyingkey_bondPublicVerifier();\n return VerifyingKey.__wrap(ret);\n }\n /**\n * Returns the verifying key for the bond_validator function\n *\n * @returns {VerifyingKey} Verifying key for the bond_validator function\n * @returns {VerifyingKey}\n */\n static bondValidatorVerifier() {\n const ret = wasm.verifyingkey_bondValidatorVerifier();\n return VerifyingKey.__wrap(ret);\n }\n /**\n * Returns the verifying key for the claim_delegator function\n *\n * @returns {VerifyingKey} Verifying key for the claim_unbond_public function\n * @returns {VerifyingKey}\n */\n static claimUnbondPublicVerifier() {\n const ret = wasm.verifyingkey_claimUnbondPublicVerifier();\n return VerifyingKey.__wrap(ret);\n }\n /**\n * Returns the verifying key for the fee_private function\n *\n * @returns {VerifyingKey} Verifying key for the fee_private function\n * @returns {VerifyingKey}\n */\n static feePrivateVerifier() {\n const ret = wasm.verifyingkey_feePrivateVerifier();\n return VerifyingKey.__wrap(ret);\n }\n /**\n * Returns the verifying key for the fee_public function\n *\n * @returns {VerifyingKey} Verifying key for the fee_public function\n * @returns {VerifyingKey}\n */\n static feePublicVerifier() {\n const ret = wasm.verifyingkey_feePublicVerifier();\n return VerifyingKey.__wrap(ret);\n }\n /**\n * Returns the verifying key for the inclusion function\n *\n * @returns {VerifyingKey} Verifying key for the inclusion function\n * @returns {VerifyingKey}\n */\n static inclusionVerifier() {\n const ret = wasm.verifyingkey_inclusionVerifier();\n return VerifyingKey.__wrap(ret);\n }\n /**\n * Returns the verifying key for the join function\n *\n * @returns {VerifyingKey} Verifying key for the join function\n * @returns {VerifyingKey}\n */\n static joinVerifier() {\n const ret = wasm.verifyingkey_joinVerifier();\n return VerifyingKey.__wrap(ret);\n }\n /**\n * Returns the verifying key for the set_validator_state function\n *\n * @returns {VerifyingKey} Verifying key for the set_validator_state function\n * @returns {VerifyingKey}\n */\n static setValidatorStateVerifier() {\n const ret = wasm.verifyingkey_setValidatorStateVerifier();\n return VerifyingKey.__wrap(ret);\n }\n /**\n * Returns the verifying key for the split function\n *\n * @returns {VerifyingKey} Verifying key for the split function\n * @returns {VerifyingKey}\n */\n static splitVerifier() {\n const ret = wasm.verifyingkey_splitVerifier();\n return VerifyingKey.__wrap(ret);\n }\n /**\n * Returns the verifying key for the transfer_private function\n *\n * @returns {VerifyingKey} Verifying key for the transfer_private function\n * @returns {VerifyingKey}\n */\n static transferPrivateVerifier() {\n const ret = wasm.verifyingkey_transferPrivateVerifier();\n return VerifyingKey.__wrap(ret);\n }\n /**\n * Returns the verifying key for the transfer_private_to_public function\n *\n * @returns {VerifyingKey} Verifying key for the transfer_private_to_public function\n * @returns {VerifyingKey}\n */\n static transferPrivateToPublicVerifier() {\n const ret = wasm.verifyingkey_transferPrivateToPublicVerifier();\n return VerifyingKey.__wrap(ret);\n }\n /**\n * Returns the verifying key for the transfer_public function\n *\n * @returns {VerifyingKey} Verifying key for the transfer_public function\n * @returns {VerifyingKey}\n */\n static transferPublicVerifier() {\n const ret = wasm.verifyingkey_transferPublicVerifier();\n return VerifyingKey.__wrap(ret);\n }\n /**\n * Returns the verifying key for the transfer_public_as_signer function\n *\n * @returns {VerifyingKey} Verifying key for the transfer_public_as_signer function\n * @returns {VerifyingKey}\n */\n static transferPublicAsSignerVerifier() {\n const ret = wasm.verifyingkey_transferPublicAsSignerVerifier();\n return VerifyingKey.__wrap(ret);\n }\n /**\n * Returns the verifying key for the transfer_public_to_private function\n *\n * @returns {VerifyingKey} Verifying key for the transfer_public_to_private function\n * @returns {VerifyingKey}\n */\n static transferPublicToPrivateVerifier() {\n const ret = wasm.verifyingkey_transferPublicToPrivateVerifier();\n return VerifyingKey.__wrap(ret);\n }\n /**\n * Returns the verifying key for the unbond_public function\n *\n * @returns {VerifyingKey} Verifying key for the unbond_public function\n * @returns {VerifyingKey}\n */\n static unbondPublicVerifier() {\n const ret = wasm.verifyingkey_unbondPublicVerifier();\n return VerifyingKey.__wrap(ret);\n }\n /**\n * Returns the verifying key for the bond_public function\n *\n * @returns {VerifyingKey} Verifying key for the bond_public function\n * @returns {boolean}\n */\n isBondPublicVerifier() {\n const ret = wasm.verifyingkey_isBondPublicVerifier(this.__wbg_ptr);\n return ret !== 0;\n }\n /**\n * Returns the verifying key for the bond_validator function\n *\n * @returns {VerifyingKey} Verifying key for the bond_validator function\n * @returns {boolean}\n */\n isBondValidatorVerifier() {\n const ret = wasm.verifyingkey_isBondValidatorVerifier(this.__wbg_ptr);\n return ret !== 0;\n }\n /**\n * Verifies the verifying key is for the claim_delegator function\n *\n * @returns {bool}\n * @returns {boolean}\n */\n isClaimUnbondPublicVerifier() {\n const ret = wasm.verifyingkey_isClaimUnbondPublicVerifier(this.__wbg_ptr);\n return ret !== 0;\n }\n /**\n * Verifies the verifying key is for the fee_private function\n *\n * @returns {bool}\n * @returns {boolean}\n */\n isFeePrivateVerifier() {\n const ret = wasm.verifyingkey_isFeePrivateVerifier(this.__wbg_ptr);\n return ret !== 0;\n }\n /**\n * Verifies the verifying key is for the fee_public function\n *\n * @returns {bool}\n * @returns {boolean}\n */\n isFeePublicVerifier() {\n const ret = wasm.verifyingkey_isFeePublicVerifier(this.__wbg_ptr);\n return ret !== 0;\n }\n /**\n * Verifies the verifying key is for the inclusion function\n *\n * @returns {bool}\n * @returns {boolean}\n */\n isInclusionVerifier() {\n const ret = wasm.verifyingkey_isInclusionVerifier(this.__wbg_ptr);\n return ret !== 0;\n }\n /**\n * Verifies the verifying key is for the join function\n *\n * @returns {bool}\n * @returns {boolean}\n */\n isJoinVerifier() {\n const ret = wasm.verifyingkey_isJoinVerifier(this.__wbg_ptr);\n return ret !== 0;\n }\n /**\n * Verifies the verifying key is for the set_validator_state function\n *\n * @returns {bool}\n * @returns {boolean}\n */\n isSetValidatorStateVerifier() {\n const ret = wasm.verifyingkey_isSetValidatorStateVerifier(this.__wbg_ptr);\n return ret !== 0;\n }\n /**\n * Verifies the verifying key is for the split function\n *\n * @returns {bool}\n * @returns {boolean}\n */\n isSplitVerifier() {\n const ret = wasm.verifyingkey_isSplitVerifier(this.__wbg_ptr);\n return ret !== 0;\n }\n /**\n * Verifies the verifying key is for the transfer_private function\n *\n * @returns {bool}\n * @returns {boolean}\n */\n isTransferPrivateVerifier() {\n const ret = wasm.verifyingkey_isTransferPrivateVerifier(this.__wbg_ptr);\n return ret !== 0;\n }\n /**\n * Verifies the verifying key is for the transfer_private_to_public function\n *\n * @returns {bool}\n * @returns {boolean}\n */\n isTransferPrivateToPublicVerifier() {\n const ret = wasm.verifyingkey_isTransferPrivateToPublicVerifier(this.__wbg_ptr);\n return ret !== 0;\n }\n /**\n * Verifies the verifying key is for the transfer_public function\n *\n * @returns {bool}\n * @returns {boolean}\n */\n isTransferPublicVerifier() {\n const ret = wasm.verifyingkey_isTransferPublicVerifier(this.__wbg_ptr);\n return ret !== 0;\n }\n /**\n * Verifies the verifying key is for the transfer_public_as_signer function\n *\n * @returns {bool}\n * @returns {boolean}\n */\n isTransferPublicAsSignerVerifier() {\n const ret = wasm.verifyingkey_isTransferPublicAsSignerVerifier(this.__wbg_ptr);\n return ret !== 0;\n }\n /**\n * Verifies the verifying key is for the transfer_public_to_private function\n *\n * @returns {bool}\n * @returns {boolean}\n */\n isTransferPublicToPrivateVerifier() {\n const ret = wasm.verifyingkey_isTransferPublicToPrivateVerifier(this.__wbg_ptr);\n return ret !== 0;\n }\n /**\n * Verifies the verifying key is for the unbond_public function\n *\n * @returns {bool}\n * @returns {boolean}\n */\n isUnbondPublicVerifier() {\n const ret = wasm.verifyingkey_isUnbondPublicVerifier(this.__wbg_ptr);\n return ret !== 0;\n }\n /**\n * Get the checksum of the verifying key\n *\n * @returns {string} Checksum of the verifying key\n * @returns {string}\n */\n checksum() {\n let deferred1_0;\n let deferred1_1;\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n wasm.verifyingkey_checksum(retptr, this.__wbg_ptr);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n deferred1_0 = r0;\n deferred1_1 = r1;\n return getStringFromWasm0(r0, r1);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);\n }\n }\n /**\n * Create a copy of the verifying key\n *\n * @returns {VerifyingKey} A copy of the verifying key\n * @returns {VerifyingKey}\n */\n copy() {\n const ret = wasm.verifyingkey_copy(this.__wbg_ptr);\n return VerifyingKey.__wrap(ret);\n }\n /**\n * Construct a new verifying key from a byte array\n *\n * @param {Uint8Array} bytes Byte representation of a verifying key\n * @returns {VerifyingKey | Error}\n * @param {Uint8Array} bytes\n * @returns {VerifyingKey}\n */\n static fromBytes(bytes) {\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n const ptr0 = passArray8ToWasm0(bytes, wasm.__wbindgen_malloc);\n const len0 = WASM_VECTOR_LEN;\n wasm.verifyingkey_fromBytes(retptr, ptr0, len0);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n var r2 = getInt32Memory0()[retptr / 4 + 2];\n if (r2) {\n throw takeObject(r1);\n }\n return VerifyingKey.__wrap(r0);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n }\n }\n /**\n * Create a verifying key from string\n *\n * @param {String} string String representation of a verifying key\n * @returns {VerifyingKey | Error}\n * @param {string} string\n * @returns {VerifyingKey}\n */\n static fromString(string) {\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n const ptr0 = passStringToWasm0(string, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n wasm.verifyingkey_fromString(retptr, ptr0, len0);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n var r2 = getInt32Memory0()[retptr / 4 + 2];\n if (r2) {\n throw takeObject(r1);\n }\n return VerifyingKey.__wrap(r0);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n }\n }\n /**\n * Create a byte array from a verifying key\n *\n * @returns {Uint8Array | Error} Byte representation of a verifying key\n * @returns {Uint8Array}\n */\n toBytes() {\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n wasm.verifyingkey_toBytes(retptr, this.__wbg_ptr);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n var r2 = getInt32Memory0()[retptr / 4 + 2];\n var r3 = getInt32Memory0()[retptr / 4 + 3];\n if (r3) {\n throw takeObject(r2);\n }\n var v1 = getArrayU8FromWasm0(r0, r1).slice();\n wasm.__wbindgen_free(r0, r1 * 1, 1);\n return v1;\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n }\n }\n /**\n * Get a string representation of the verifying key\n *\n * @returns {String} String representation of the verifying key\n * @returns {string}\n */\n toString() {\n let deferred1_0;\n let deferred1_1;\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n wasm.verifyingkey_toString(retptr, this.__wbg_ptr);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n deferred1_0 = r0;\n deferred1_1 = r1;\n return getStringFromWasm0(r0, r1);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);\n }\n }\n}\n\nconst ViewKeyFinalization = (typeof FinalizationRegistry === 'undefined')\n ? { register: () => {}, unregister: () => {} }\n : new FinalizationRegistry(ptr => wasm.__wbg_viewkey_free(ptr >>> 0));\n/**\n*/\nclass ViewKey {\n\n static __wrap(ptr) {\n ptr = ptr >>> 0;\n const obj = Object.create(ViewKey.prototype);\n obj.__wbg_ptr = ptr;\n ViewKeyFinalization.register(obj, obj.__wbg_ptr, obj);\n return obj;\n }\n\n __destroy_into_raw() {\n const ptr = this.__wbg_ptr;\n this.__wbg_ptr = 0;\n ViewKeyFinalization.unregister(this);\n return ptr;\n }\n\n free() {\n const ptr = this.__destroy_into_raw();\n wasm.__wbg_viewkey_free(ptr);\n }\n /**\n * Create a new view key from a private key\n *\n * @param {PrivateKey} private_key Private key\n * @returns {ViewKey} View key\n * @param {PrivateKey} private_key\n * @returns {ViewKey}\n */\n static from_private_key(private_key) {\n _assertClass(private_key, PrivateKey);\n const ret = wasm.privatekey_to_view_key(private_key.__wbg_ptr);\n return ViewKey.__wrap(ret);\n }\n /**\n * Create a new view key from a string representation of a view key\n *\n * @param {string} view_key String representation of a view key\n * @returns {ViewKey} View key\n * @param {string} view_key\n * @returns {ViewKey}\n */\n static from_string(view_key) {\n const ptr0 = passStringToWasm0(view_key, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n const ret = wasm.viewkey_from_string(ptr0, len0);\n return ViewKey.__wrap(ret);\n }\n /**\n * Get a string representation of a view key\n *\n * @returns {string} String representation of a view key\n * @returns {string}\n */\n to_string() {\n let deferred1_0;\n let deferred1_1;\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n wasm.viewkey_to_string(retptr, this.__wbg_ptr);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n deferred1_0 = r0;\n deferred1_1 = r1;\n return getStringFromWasm0(r0, r1);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);\n }\n }\n /**\n * Get the address corresponding to a view key\n *\n * @returns {Address} Address\n * @returns {Address}\n */\n to_address() {\n const ret = wasm.address_from_view_key(this.__wbg_ptr);\n return Address.__wrap(ret);\n }\n /**\n * Decrypt a record ciphertext with a view key\n *\n * @param {string} ciphertext String representation of a record ciphertext\n * @returns {string} String representation of a record plaintext\n * @param {string} ciphertext\n * @returns {string}\n */\n decrypt(ciphertext) {\n let deferred3_0;\n let deferred3_1;\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n const ptr0 = passStringToWasm0(ciphertext, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n wasm.viewkey_decrypt(retptr, this.__wbg_ptr, ptr0, len0);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n var r2 = getInt32Memory0()[retptr / 4 + 2];\n var r3 = getInt32Memory0()[retptr / 4 + 3];\n var ptr2 = r0;\n var len2 = r1;\n if (r3) {\n ptr2 = 0; len2 = 0;\n throw takeObject(r2);\n }\n deferred3_0 = ptr2;\n deferred3_1 = len2;\n return getStringFromWasm0(ptr2, len2);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n wasm.__wbindgen_free(deferred3_0, deferred3_1, 1);\n }\n }\n}\n\nasync function __wbg_load(module, imports) {\n if (typeof Response === 'function' && module instanceof Response) {\n if (typeof WebAssembly.instantiateStreaming === 'function') {\n try {\n return await WebAssembly.instantiateStreaming(module, imports);\n\n } catch (e) {\n if (module.headers.get('Content-Type') != 'application/wasm') {\n console.warn(\"`WebAssembly.instantiateStreaming` failed because your server does not serve wasm with `application/wasm` MIME type. Falling back to `WebAssembly.instantiate` which is slower. Original error:\\n\", e);\n\n } else {\n throw e;\n }\n }\n }\n\n const bytes = await module.arrayBuffer();\n return await WebAssembly.instantiate(bytes, imports);\n\n } else {\n const instance = await WebAssembly.instantiate(module, imports);\n\n if (instance instanceof WebAssembly.Instance) {\n return { instance, module };\n\n } else {\n return instance;\n }\n }\n}\n\nfunction __wbg_get_imports() {\n const imports = {};\n imports.wbg = {};\n imports.wbg.__wbindgen_object_drop_ref = function(arg0) {\n takeObject(arg0);\n };\n imports.wbg.__wbg_new_71801a555ad9f2aa = function() { return handleError(function () {\n const ret = new XMLHttpRequest();\n return addHeapObject(ret);\n }, arguments) };\n imports.wbg.__wbg_overrideMimeType_ee9c51919ceb418b = function() { return handleError(function (arg0, arg1, arg2) {\n getObject(arg0).overrideMimeType(getStringFromWasm0(arg1, arg2));\n }, arguments) };\n imports.wbg.__wbg_open_c9eb0cf2c9d95679 = function() { return handleError(function (arg0, arg1, arg2, arg3, arg4, arg5) {\n getObject(arg0).open(getStringFromWasm0(arg1, arg2), getStringFromWasm0(arg3, arg4), arg5 !== 0);\n }, arguments) };\n imports.wbg.__wbg_send_80d29985093c1ec5 = function() { return handleError(function (arg0) {\n getObject(arg0).send();\n }, arguments) };\n imports.wbg.__wbg_response_7c2e2759084f7279 = function() { return handleError(function (arg0) {\n const ret = getObject(arg0).response;\n return addHeapObject(ret);\n }, arguments) };\n imports.wbg.__wbg_status_d485fb5a478426fb = function() { return handleError(function (arg0) {\n const ret = getObject(arg0).status;\n return ret;\n }, arguments) };\n imports.wbg.__wbg_new_72fb9a18b5ae2624 = function() {\n const ret = new Object();\n return addHeapObject(ret);\n };\n imports.wbg.__wbindgen_string_new = function(arg0, arg1) {\n const ret = getStringFromWasm0(arg0, arg1);\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_set_1f9b04f170055d33 = function() { return handleError(function (arg0, arg1, arg2) {\n const ret = Reflect.set(getObject(arg0), getObject(arg1), getObject(arg2));\n return ret;\n }, arguments) };\n imports.wbg.__wbg_new_ab6fd82b10560829 = function() { return handleError(function () {\n const ret = new Headers();\n return addHeapObject(ret);\n }, arguments) };\n imports.wbg.__wbindgen_object_clone_ref = function(arg0) {\n const ret = getObject(arg0);\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_new_0d76b0581eca6298 = function() { return handleError(function () {\n const ret = new AbortController();\n return addHeapObject(ret);\n }, arguments) };\n imports.wbg.__wbg_signal_a61f78a3478fd9bc = function(arg0) {\n const ret = getObject(arg0).signal;\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_append_7bfcb4937d1d5e29 = function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {\n getObject(arg0).append(getStringFromWasm0(arg1, arg2), getStringFromWasm0(arg3, arg4));\n }, arguments) };\n imports.wbg.__wbg_instanceof_Response_849eb93e75734b6e = function(arg0) {\n let result;\n try {\n result = getObject(arg0) instanceof Response;\n } catch (_) {\n result = false;\n }\n const ret = result;\n return ret;\n };\n imports.wbg.__wbg_status_61a01141acd3cf74 = function(arg0) {\n const ret = getObject(arg0).status;\n return ret;\n };\n imports.wbg.__wbg_url_5f6dc4009ac5f99d = function(arg0, arg1) {\n const ret = getObject(arg1).url;\n const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len1 = WASM_VECTOR_LEN;\n getInt32Memory0()[arg0 / 4 + 1] = len1;\n getInt32Memory0()[arg0 / 4 + 0] = ptr1;\n };\n imports.wbg.__wbg_headers_9620bfada380764a = function(arg0) {\n const ret = getObject(arg0).headers;\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_iterator_2cee6dadfd956dfa = function() {\n const ret = Symbol.iterator;\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_get_e3c254076557e348 = function() { return handleError(function (arg0, arg1) {\n const ret = Reflect.get(getObject(arg0), getObject(arg1));\n return addHeapObject(ret);\n }, arguments) };\n imports.wbg.__wbindgen_is_function = function(arg0) {\n const ret = typeof(getObject(arg0)) === 'function';\n return ret;\n };\n imports.wbg.__wbg_call_27c0f87801dedf93 = function() { return handleError(function (arg0, arg1) {\n const ret = getObject(arg0).call(getObject(arg1));\n return addHeapObject(ret);\n }, arguments) };\n imports.wbg.__wbindgen_is_object = function(arg0) {\n const val = getObject(arg0);\n const ret = typeof(val) === 'object' && val !== null;\n return ret;\n };\n imports.wbg.__wbg_next_40fc327bfc8770e6 = function(arg0) {\n const ret = getObject(arg0).next;\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_next_196c84450b364254 = function() { return handleError(function (arg0) {\n const ret = getObject(arg0).next();\n return addHeapObject(ret);\n }, arguments) };\n imports.wbg.__wbg_done_298b57d23c0fc80c = function(arg0) {\n const ret = getObject(arg0).done;\n return ret;\n };\n imports.wbg.__wbg_value_d93c65011f51a456 = function(arg0) {\n const ret = getObject(arg0).value;\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_abort_2aa7521d5690750e = function(arg0) {\n getObject(arg0).abort();\n };\n imports.wbg.__wbg_stringify_8887fe74e1c50d81 = function() { return handleError(function (arg0) {\n const ret = JSON.stringify(getObject(arg0));\n return addHeapObject(ret);\n }, arguments) };\n imports.wbg.__wbindgen_string_get = function(arg0, arg1) {\n const obj = getObject(arg1);\n const ret = typeof(obj) === 'string' ? obj : undefined;\n var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n var len1 = WASM_VECTOR_LEN;\n getInt32Memory0()[arg0 / 4 + 1] = len1;\n getInt32Memory0()[arg0 / 4 + 0] = ptr1;\n };\n imports.wbg.__wbg_log_0159ca40cddf5b15 = function(arg0, arg1) {\n console.log(getStringFromWasm0(arg0, arg1));\n };\n imports.wbg.__wbindgen_bigint_from_u64 = function(arg0) {\n const ret = BigInt.asUintN(64, arg0);\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_call_b3ca7c6051f9bec1 = function() { return handleError(function (arg0, arg1, arg2) {\n const ret = getObject(arg0).call(getObject(arg1), getObject(arg2));\n return addHeapObject(ret);\n }, arguments) };\n imports.wbg.__wbg_keypair_new = function(arg0) {\n const ret = KeyPair.__wrap(arg0);\n return addHeapObject(ret);\n };\n imports.wbg.__wbindgen_module = function() {\n const ret = __wbg_init.__wbindgen_wasm_module;\n return addHeapObject(ret);\n };\n imports.wbg.__wbindgen_memory = function() {\n const ret = wasm.memory;\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_spawnWorker_f6acaddb2e29dc4a = function(arg0, arg1, arg2, arg3) {\n const ret = spawnWorker(getObject(arg0), getObject(arg1), getObject(arg2), arg3 >>> 0);\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_executionresponse_new = function(arg0) {\n const ret = ExecutionResponse.__wrap(arg0);\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_transaction_new = function(arg0) {\n const ret = Transaction.__wrap(arg0);\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_newwithlength_66ae46612e7f0234 = function(arg0) {\n const ret = new Array(arg0 >>> 0);\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_set_d4638f722068f043 = function(arg0, arg1, arg2) {\n getObject(arg0)[arg1 >>> 0] = takeObject(arg2);\n };\n imports.wbg.__wbindgen_cb_drop = function(arg0) {\n const obj = takeObject(arg0).original;\n if (obj.cnt-- == 1) {\n obj.a = 0;\n return true;\n }\n const ret = false;\n return ret;\n };\n imports.wbg.__wbg_new_16b304a2cfa7ff4a = function() {\n const ret = new Array();\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_push_a5b05aedc7234f9f = function(arg0, arg1) {\n const ret = getObject(arg0).push(getObject(arg1));\n return ret;\n };\n imports.wbg.__wbg_arrayBuffer_29931d52c7206b02 = function() { return handleError(function (arg0) {\n const ret = getObject(arg0).arrayBuffer();\n return addHeapObject(ret);\n }, arguments) };\n imports.wbg.__wbg_new_63b92bc8671ed464 = function(arg0) {\n const ret = new Uint8Array(getObject(arg0));\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_length_c20a40f15020d68a = function(arg0) {\n const ret = getObject(arg0).length;\n return ret;\n };\n imports.wbg.__wbg_new_81740750da40724f = function(arg0, arg1) {\n try {\n var state0 = {a: arg0, b: arg1};\n var cb0 = (arg0, arg1) => {\n const a = state0.a;\n state0.a = 0;\n try {\n return __wbg_adapter_279(a, state0.b, arg0, arg1);\n } finally {\n state0.a = a;\n }\n };\n const ret = new Promise(cb0);\n return addHeapObject(ret);\n } finally {\n state0.a = state0.b = 0;\n }\n };\n imports.wbg.__wbindgen_number_new = function(arg0) {\n const ret = arg0;\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_new_abda76e883ba8a5f = function() {\n const ret = new Error();\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_stack_658279fe44541cf6 = function(arg0, arg1) {\n const ret = getObject(arg1).stack;\n const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len1 = WASM_VECTOR_LEN;\n getInt32Memory0()[arg0 / 4 + 1] = len1;\n getInt32Memory0()[arg0 / 4 + 0] = ptr1;\n };\n imports.wbg.__wbg_error_f851667af71bcfc6 = function(arg0, arg1) {\n let deferred0_0;\n let deferred0_1;\n try {\n deferred0_0 = arg0;\n deferred0_1 = arg1;\n console.error(getStringFromWasm0(arg0, arg1));\n } finally {\n wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);\n }\n };\n imports.wbg.__wbg_buffer_12d079cc21e14bdb = function(arg0) {\n const ret = getObject(arg0).buffer;\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_newwithbyteoffsetandlength_aa4a17c33a06e5cb = function(arg0, arg1, arg2) {\n const ret = new Uint8Array(getObject(arg0), arg1 >>> 0, arg2 >>> 0);\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_randomFillSync_5c9c955aa56b6049 = function() { return handleError(function (arg0, arg1) {\n getObject(arg0).randomFillSync(takeObject(arg1));\n }, arguments) };\n imports.wbg.__wbg_subarray_a1f73cd4b5b42fe1 = function(arg0, arg1, arg2) {\n const ret = getObject(arg0).subarray(arg1 >>> 0, arg2 >>> 0);\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_getRandomValues_3aa56aa6edec874c = function() { return handleError(function (arg0, arg1) {\n getObject(arg0).getRandomValues(getObject(arg1));\n }, arguments) };\n imports.wbg.__wbg_set_a47bac70306a19a7 = function(arg0, arg1, arg2) {\n getObject(arg0).set(getObject(arg1), arg2 >>> 0);\n };\n imports.wbg.__wbg_crypto_1d1f22824a6a080c = function(arg0) {\n const ret = getObject(arg0).crypto;\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_process_4a72847cc503995b = function(arg0) {\n const ret = getObject(arg0).process;\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_versions_f686565e586dd935 = function(arg0) {\n const ret = getObject(arg0).versions;\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_node_104a2ff8d6ea03a2 = function(arg0) {\n const ret = getObject(arg0).node;\n return addHeapObject(ret);\n };\n imports.wbg.__wbindgen_is_string = function(arg0) {\n const ret = typeof(getObject(arg0)) === 'string';\n return ret;\n };\n imports.wbg.__wbg_require_cca90b1a94a0255b = function() { return handleError(function () {\n const ret = module.require;\n return addHeapObject(ret);\n }, arguments) };\n imports.wbg.__wbg_msCrypto_eb05e62b530a1508 = function(arg0) {\n const ret = getObject(arg0).msCrypto;\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_newwithlength_e9b4878cebadb3d3 = function(arg0) {\n const ret = new Uint8Array(arg0 >>> 0);\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_length_cd7af8117672b8b8 = function(arg0) {\n const ret = getObject(arg0).length;\n return ret;\n };\n imports.wbg.__wbg_get_bd8e338fbd5f5cc8 = function(arg0, arg1) {\n const ret = getObject(arg0)[arg1 >>> 0];\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_self_ce0dbfc45cf2f5be = function() { return handleError(function () {\n const ret = self.self;\n return addHeapObject(ret);\n }, arguments) };\n imports.wbg.__wbg_window_c6fb939a7f436783 = function() { return handleError(function () {\n const ret = window.window;\n return addHeapObject(ret);\n }, arguments) };\n imports.wbg.__wbg_globalThis_d1e6af4856ba331b = function() { return handleError(function () {\n const ret = globalThis.globalThis;\n return addHeapObject(ret);\n }, arguments) };\n imports.wbg.__wbg_global_207b558942527489 = function() { return handleError(function () {\n const ret = global.global;\n return addHeapObject(ret);\n }, arguments) };\n imports.wbg.__wbindgen_is_undefined = function(arg0) {\n const ret = getObject(arg0) === undefined;\n return ret;\n };\n imports.wbg.__wbg_newnoargs_e258087cd0daa0ea = function(arg0, arg1) {\n const ret = new Function(getStringFromWasm0(arg0, arg1));\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_has_0af94d20077affa2 = function() { return handleError(function (arg0, arg1) {\n const ret = Reflect.has(getObject(arg0), getObject(arg1));\n return ret;\n }, arguments) };\n imports.wbg.__wbg_fetch_bc7c8e27076a5c84 = function(arg0) {\n const ret = fetch(getObject(arg0));\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_fetch_921fad6ef9e883dd = function(arg0, arg1) {\n const ret = getObject(arg0).fetch(getObject(arg1));\n return addHeapObject(ret);\n };\n imports.wbg.__wbindgen_debug_string = function(arg0, arg1) {\n const ret = debugString(getObject(arg1));\n const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len1 = WASM_VECTOR_LEN;\n getInt32Memory0()[arg0 / 4 + 1] = len1;\n getInt32Memory0()[arg0 / 4 + 0] = ptr1;\n };\n imports.wbg.__wbindgen_throw = function(arg0, arg1) {\n throw new Error(getStringFromWasm0(arg0, arg1));\n };\n imports.wbg.__wbindgen_rethrow = function(arg0) {\n throw takeObject(arg0);\n };\n imports.wbg.__wbg_then_a73caa9a87991566 = function(arg0, arg1, arg2) {\n const ret = getObject(arg0).then(getObject(arg1), getObject(arg2));\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_then_0c86a60e8fcfe9f6 = function(arg0, arg1) {\n const ret = getObject(arg0).then(getObject(arg1));\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_queueMicrotask_481971b0d87f3dd4 = function(arg0) {\n queueMicrotask(getObject(arg0));\n };\n imports.wbg.__wbg_queueMicrotask_3cbae2ec6b6cd3d6 = function(arg0) {\n const ret = getObject(arg0).queueMicrotask;\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_resolve_b0083a7967828ec8 = function(arg0) {\n const ret = Promise.resolve(getObject(arg0));\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_waitAsync_5d743fc9058ba01a = function() {\n const ret = Atomics.waitAsync;\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_new_8cccba86b0f574cb = function(arg0) {\n const ret = new Int32Array(getObject(arg0));\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_waitAsync_46d5c36955b71a79 = function(arg0, arg1, arg2) {\n const ret = Atomics.waitAsync(getObject(arg0), arg1, arg2);\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_async_19c0400d97cc72fe = function(arg0) {\n const ret = getObject(arg0).async;\n return ret;\n };\n imports.wbg.__wbg_value_571d60108110e917 = function(arg0) {\n const ret = getObject(arg0).value;\n return addHeapObject(ret);\n };\n imports.wbg.__wbindgen_link_fc1eedd35dc7e0a6 = function(arg0) {\n const ret = \"data:application/javascript,\" + encodeURIComponent(`onmessage = function (ev) {\n let [ia, index, value] = ev.data;\n ia = new Int32Array(ia.buffer);\n let result = Atomics.wait(ia, index, value);\n postMessage(result);\n };\n `);\n const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len1 = WASM_VECTOR_LEN;\n getInt32Memory0()[arg0 / 4 + 1] = len1;\n getInt32Memory0()[arg0 / 4 + 0] = ptr1;\n };\n imports.wbg.__wbg_new_d1187ae36d662ef9 = function() { return handleError(function (arg0, arg1) {\n const ret = new Worker(getStringFromWasm0(arg0, arg1));\n return addHeapObject(ret);\n }, arguments) };\n imports.wbg.__wbg_setonmessage_503809e5bb51bd33 = function(arg0, arg1) {\n getObject(arg0).onmessage = getObject(arg1);\n };\n imports.wbg.__wbg_of_6a70eed8d41f469c = function(arg0, arg1, arg2) {\n const ret = Array.of(getObject(arg0), getObject(arg1), getObject(arg2));\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_postMessage_7380d10e8b8269df = function() { return handleError(function (arg0, arg1) {\n getObject(arg0).postMessage(getObject(arg1));\n }, arguments) };\n imports.wbg.__wbg_data_3ce7c145ca4fbcdc = function(arg0) {\n const ret = getObject(arg0).data;\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_newwithstrandinit_3fd6fba4083ff2d0 = function() { return handleError(function (arg0, arg1, arg2) {\n const ret = new Request(getStringFromWasm0(arg0, arg1), getObject(arg2));\n return addHeapObject(ret);\n }, arguments) };\n imports.wbg.__wbg_responseText_c67ed2d48db10769 = function() { return handleError(function (arg0, arg1) {\n const ret = getObject(arg1).responseText;\n var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n var len1 = WASM_VECTOR_LEN;\n getInt32Memory0()[arg0 / 4 + 1] = len1;\n getInt32Memory0()[arg0 / 4 + 0] = ptr1;\n }, arguments) };\n imports.wbg.__wbindgen_closure_wrapper5763 = function(arg0, arg1, arg2) {\n const ret = makeMutClosure(arg0, arg1, 538, __wbg_adapter_34);\n return addHeapObject(ret);\n };\n imports.wbg.__wbindgen_closure_wrapper5788 = function(arg0, arg1, arg2) {\n const ret = makeMutClosure(arg0, arg1, 538, __wbg_adapter_34);\n return addHeapObject(ret);\n };\n\n return imports;\n}\n\nfunction __wbg_init_memory(imports, maybe_memory) {\n imports.wbg.memory = maybe_memory || new WebAssembly.Memory({initial:25,maximum:65536,shared:true});\n}\n\nfunction __wbg_finalize_init(instance, module) {\n wasm = instance.exports;\n __wbg_init.__wbindgen_wasm_module = module;\n cachedBigInt64Memory0 = null;\n cachedInt32Memory0 = null;\n cachedUint8Memory0 = null;\n\n wasm.__wbindgen_start();\n return wasm;\n}\n\nfunction initSync(module, maybe_memory) {\n if (wasm !== undefined) return wasm;\n\n const imports = __wbg_get_imports();\n\n __wbg_init_memory(imports, maybe_memory);\n\n if (!(module instanceof WebAssembly.Module)) {\n module = new WebAssembly.Module(module);\n }\n\n const instance = new WebAssembly.Instance(module, imports);\n\n return __wbg_finalize_init(instance, module);\n}\n\nasync function __wbg_init(input, maybe_memory) {\n if (wasm !== undefined) return wasm;\n\n\n const imports = __wbg_get_imports();\n\n if (typeof input === 'string' || (typeof Request === 'function' && input instanceof Request) || (typeof URL === 'function' && input instanceof URL)) {\n input = fetch(input);\n }\n\n __wbg_init_memory(imports, maybe_memory);\n\n const { instance, module } = await __wbg_load(await input, imports);\n\n return __wbg_finalize_init(instance, module);\n}\n\nvar exports = /*#__PURE__*/Object.freeze({\n __proto__: null,\n Address: Address,\n Execution: Execution,\n ExecutionResponse: ExecutionResponse,\n Field: Field,\n KeyPair: KeyPair,\n Metadata: Metadata,\n OfflineQuery: OfflineQuery,\n PrivateKey: PrivateKey,\n PrivateKeyCiphertext: PrivateKeyCiphertext,\n Program: Program,\n ProgramManager: ProgramManager,\n ProvingKey: ProvingKey,\n RecordCiphertext: RecordCiphertext,\n RecordPlaintext: RecordPlaintext,\n Signature: Signature,\n Transaction: Transaction,\n VerifyingKey: VerifyingKey,\n ViewKey: ViewKey,\n default: __wbg_init,\n initSync: initSync,\n initThreadPool: initThreadPool,\n runRayonThread: runRayonThread,\n verifyFunctionExecution: verifyFunctionExecution\n});\n\nconst wasm_path = \"assets/aleo_wasm.wasm\";\n\n \n var Cargo = async (opt = {}) => {\n let {importHook, serverPath, initializeHook} = opt;\n\n let final_path = wasm_path;\n\n if (serverPath != null) {\n final_path = serverPath + /[^\\/\\\\]*$/.exec(final_path)[0];\n }\n\n if (importHook != null) {\n final_path = importHook(final_path);\n }\n\n if (initializeHook != null) {\n await initializeHook(__wbg_init, final_path);\n\n } else {\n await __wbg_init(final_path);\n }\n\n return exports;\n };\n\nexport { Cargo as default };\n//# sourceMappingURL=wasm.js.map\n","import wasm from \"../dist/wasm.js\";\n\nconst {\n initThreadPool: wasmInitThreadPool,\n Address,\n Execution,\n ExecutionResponse,\n Field,\n Metadata,\n OfflineQuery,\n Private,\n PrivateKey,\n PrivateKeyCiphertext,\n Program,\n ProvingKey,\n RecordCiphertext,\n RecordPlaintext,\n ProgramManager,\n Signature,\n Transaction,\n ViewKey,\n VerifyingKey,\n verifyFunctionExecution,\n} = await wasm({\n importHook: () => {\n return new URL(\"assets/aleo_wasm.wasm\", import.meta.url);\n },\n});\n\nasync function initThreadPool(threads) {\n if (threads == null) {\n threads = navigator.hardwareConcurrency;\n }\n\n console.info(`Spawning ${threads} threads`);\n\n await wasmInitThreadPool(new URL(\"worker.js\", import.meta.url), threads);\n}\n\nexport {\n initThreadPool,\n Address,\n Execution,\n ExecutionResponse,\n Field,\n Metadata,\n OfflineQuery,\n PrivateKey,\n PrivateKeyCiphertext,\n Program,\n ProvingKey,\n RecordCiphertext,\n RecordPlaintext,\n ProgramManager,\n Signature,\n Transaction,\n ViewKey,\n VerifyingKey,\n verifyFunctionExecution,\n};\n","/**\n * @license\n * Copyright 2019 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\nconst proxyMarker = Symbol(\"Comlink.proxy\");\nconst createEndpoint = Symbol(\"Comlink.endpoint\");\nconst releaseProxy = Symbol(\"Comlink.releaseProxy\");\nconst finalizer = Symbol(\"Comlink.finalizer\");\nconst throwMarker = Symbol(\"Comlink.thrown\");\nconst isObject = (val) => (typeof val === \"object\" && val !== null) || typeof val === \"function\";\n/**\n * Internal transfer handle to handle objects marked to proxy.\n */\nconst proxyTransferHandler = {\n canHandle: (val) => isObject(val) && val[proxyMarker],\n serialize(obj) {\n const { port1, port2 } = new MessageChannel();\n expose(obj, port1);\n return [port2, [port2]];\n },\n deserialize(port) {\n port.start();\n return wrap(port);\n },\n};\n/**\n * Internal transfer handler to handle thrown exceptions.\n */\nconst throwTransferHandler = {\n canHandle: (value) => isObject(value) && throwMarker in value,\n serialize({ value }) {\n let serialized;\n if (value instanceof Error) {\n serialized = {\n isError: true,\n value: {\n message: value.message,\n name: value.name,\n stack: value.stack,\n },\n };\n }\n else {\n serialized = { isError: false, value };\n }\n return [serialized, []];\n },\n deserialize(serialized) {\n if (serialized.isError) {\n throw Object.assign(new Error(serialized.value.message), serialized.value);\n }\n throw serialized.value;\n },\n};\n/**\n * Allows customizing the serialization of certain values.\n */\nconst transferHandlers = new Map([\n [\"proxy\", proxyTransferHandler],\n [\"throw\", throwTransferHandler],\n]);\nfunction isAllowedOrigin(allowedOrigins, origin) {\n for (const allowedOrigin of allowedOrigins) {\n if (origin === allowedOrigin || allowedOrigin === \"*\") {\n return true;\n }\n if (allowedOrigin instanceof RegExp && allowedOrigin.test(origin)) {\n return true;\n }\n }\n return false;\n}\nfunction expose(obj, ep = globalThis, allowedOrigins = [\"*\"]) {\n ep.addEventListener(\"message\", function callback(ev) {\n if (!ev || !ev.data) {\n return;\n }\n if (!isAllowedOrigin(allowedOrigins, ev.origin)) {\n console.warn(`Invalid origin '${ev.origin}' for comlink proxy`);\n return;\n }\n const { id, type, path } = Object.assign({ path: [] }, ev.data);\n const argumentList = (ev.data.argumentList || []).map(fromWireValue);\n let returnValue;\n try {\n const parent = path.slice(0, -1).reduce((obj, prop) => obj[prop], obj);\n const rawValue = path.reduce((obj, prop) => obj[prop], obj);\n switch (type) {\n case \"GET\" /* MessageType.GET */:\n {\n returnValue = rawValue;\n }\n break;\n case \"SET\" /* MessageType.SET */:\n {\n parent[path.slice(-1)[0]] = fromWireValue(ev.data.value);\n returnValue = true;\n }\n break;\n case \"APPLY\" /* MessageType.APPLY */:\n {\n returnValue = rawValue.apply(parent, argumentList);\n }\n break;\n case \"CONSTRUCT\" /* MessageType.CONSTRUCT */:\n {\n const value = new rawValue(...argumentList);\n returnValue = proxy(value);\n }\n break;\n case \"ENDPOINT\" /* MessageType.ENDPOINT */:\n {\n const { port1, port2 } = new MessageChannel();\n expose(obj, port2);\n returnValue = transfer(port1, [port1]);\n }\n break;\n case \"RELEASE\" /* MessageType.RELEASE */:\n {\n returnValue = undefined;\n }\n break;\n default:\n return;\n }\n }\n catch (value) {\n returnValue = { value, [throwMarker]: 0 };\n }\n Promise.resolve(returnValue)\n .catch((value) => {\n return { value, [throwMarker]: 0 };\n })\n .then((returnValue) => {\n const [wireValue, transferables] = toWireValue(returnValue);\n ep.postMessage(Object.assign(Object.assign({}, wireValue), { id }), transferables);\n if (type === \"RELEASE\" /* MessageType.RELEASE */) {\n // detach and deactive after sending release response above.\n ep.removeEventListener(\"message\", callback);\n closeEndPoint(ep);\n if (finalizer in obj && typeof obj[finalizer] === \"function\") {\n obj[finalizer]();\n }\n }\n })\n .catch((error) => {\n // Send Serialization Error To Caller\n const [wireValue, transferables] = toWireValue({\n value: new TypeError(\"Unserializable return value\"),\n [throwMarker]: 0,\n });\n ep.postMessage(Object.assign(Object.assign({}, wireValue), { id }), transferables);\n });\n });\n if (ep.start) {\n ep.start();\n }\n}\nfunction isMessagePort(endpoint) {\n return endpoint.constructor.name === \"MessagePort\";\n}\nfunction closeEndPoint(endpoint) {\n if (isMessagePort(endpoint))\n endpoint.close();\n}\nfunction wrap(ep, target) {\n return createProxy(ep, [], target);\n}\nfunction throwIfProxyReleased(isReleased) {\n if (isReleased) {\n throw new Error(\"Proxy has been released and is not useable\");\n }\n}\nfunction releaseEndpoint(ep) {\n return requestResponseMessage(ep, {\n type: \"RELEASE\" /* MessageType.RELEASE */,\n }).then(() => {\n closeEndPoint(ep);\n });\n}\nconst proxyCounter = new WeakMap();\nconst proxyFinalizers = \"FinalizationRegistry\" in globalThis &&\n new FinalizationRegistry((ep) => {\n const newCount = (proxyCounter.get(ep) || 0) - 1;\n proxyCounter.set(ep, newCount);\n if (newCount === 0) {\n releaseEndpoint(ep);\n }\n });\nfunction registerProxy(proxy, ep) {\n const newCount = (proxyCounter.get(ep) || 0) + 1;\n proxyCounter.set(ep, newCount);\n if (proxyFinalizers) {\n proxyFinalizers.register(proxy, ep, proxy);\n }\n}\nfunction unregisterProxy(proxy) {\n if (proxyFinalizers) {\n proxyFinalizers.unregister(proxy);\n }\n}\nfunction createProxy(ep, path = [], target = function () { }) {\n let isProxyReleased = false;\n const proxy = new Proxy(target, {\n get(_target, prop) {\n throwIfProxyReleased(isProxyReleased);\n if (prop === releaseProxy) {\n return () => {\n unregisterProxy(proxy);\n releaseEndpoint(ep);\n isProxyReleased = true;\n };\n }\n if (prop === \"then\") {\n if (path.length === 0) {\n return { then: () => proxy };\n }\n const r = requestResponseMessage(ep, {\n type: \"GET\" /* MessageType.GET */,\n path: path.map((p) => p.toString()),\n }).then(fromWireValue);\n return r.then.bind(r);\n }\n return createProxy(ep, [...path, prop]);\n },\n set(_target, prop, rawValue) {\n throwIfProxyReleased(isProxyReleased);\n // FIXME: ES6 Proxy Handler `set` methods are supposed to return a\n // boolean. To show good will, we return true asynchronously ¯\\_(ツ)_/¯\n const [value, transferables] = toWireValue(rawValue);\n return requestResponseMessage(ep, {\n type: \"SET\" /* MessageType.SET */,\n path: [...path, prop].map((p) => p.toString()),\n value,\n }, transferables).then(fromWireValue);\n },\n apply(_target, _thisArg, rawArgumentList) {\n throwIfProxyReleased(isProxyReleased);\n const last = path[path.length - 1];\n if (last === createEndpoint) {\n return requestResponseMessage(ep, {\n type: \"ENDPOINT\" /* MessageType.ENDPOINT */,\n }).then(fromWireValue);\n }\n // We just pretend that `bind()` didn’t happen.\n if (last === \"bind\") {\n return createProxy(ep, path.slice(0, -1));\n }\n const [argumentList, transferables] = processArguments(rawArgumentList);\n return requestResponseMessage(ep, {\n type: \"APPLY\" /* MessageType.APPLY */,\n path: path.map((p) => p.toString()),\n argumentList,\n }, transferables).then(fromWireValue);\n },\n construct(_target, rawArgumentList) {\n throwIfProxyReleased(isProxyReleased);\n const [argumentList, transferables] = processArguments(rawArgumentList);\n return requestResponseMessage(ep, {\n type: \"CONSTRUCT\" /* MessageType.CONSTRUCT */,\n path: path.map((p) => p.toString()),\n argumentList,\n }, transferables).then(fromWireValue);\n },\n });\n registerProxy(proxy, ep);\n return proxy;\n}\nfunction myFlat(arr) {\n return Array.prototype.concat.apply([], arr);\n}\nfunction processArguments(argumentList) {\n const processed = argumentList.map(toWireValue);\n return [processed.map((v) => v[0]), myFlat(processed.map((v) => v[1]))];\n}\nconst transferCache = new WeakMap();\nfunction transfer(obj, transfers) {\n transferCache.set(obj, transfers);\n return obj;\n}\nfunction proxy(obj) {\n return Object.assign(obj, { [proxyMarker]: true });\n}\nfunction windowEndpoint(w, context = globalThis, targetOrigin = \"*\") {\n return {\n postMessage: (msg, transferables) => w.postMessage(msg, targetOrigin, transferables),\n addEventListener: context.addEventListener.bind(context),\n removeEventListener: context.removeEventListener.bind(context),\n };\n}\nfunction toWireValue(value) {\n for (const [name, handler] of transferHandlers) {\n if (handler.canHandle(value)) {\n const [serializedValue, transferables] = handler.serialize(value);\n return [\n {\n type: \"HANDLER\" /* WireValueType.HANDLER */,\n name,\n value: serializedValue,\n },\n transferables,\n ];\n }\n }\n return [\n {\n type: \"RAW\" /* WireValueType.RAW */,\n value,\n },\n transferCache.get(value) || [],\n ];\n}\nfunction fromWireValue(value) {\n switch (value.type) {\n case \"HANDLER\" /* WireValueType.HANDLER */:\n return transferHandlers.get(value.name).deserialize(value.value);\n case \"RAW\" /* WireValueType.RAW */:\n return value.value;\n }\n}\nfunction requestResponseMessage(ep, msg, transfers) {\n return new Promise((resolve) => {\n const id = generateUUID();\n ep.addEventListener(\"message\", function l(ev) {\n if (!ev.data || !ev.data.id || ev.data.id !== id) {\n return;\n }\n ep.removeEventListener(\"message\", l);\n resolve(ev.data);\n });\n if (ep.start) {\n ep.start();\n }\n ep.postMessage(Object.assign({ id }, msg), transfers);\n });\n}\nfunction generateUUID() {\n return new Array(4)\n .fill(0)\n .map(() => Math.floor(Math.random() * Number.MAX_SAFE_INTEGER).toString(16))\n .join(\"-\");\n}\n\nexport { createEndpoint, expose, finalizer, proxy, proxyMarker, releaseProxy, transfer, transferHandlers, windowEndpoint, wrap };\n//# sourceMappingURL=comlink.mjs.map\n"],"names":["spawnWorker","url","module","memory","address","Promise","resolve","worker","Worker","type","addEventListener","event","setTimeout","unref","capture","once","postMessage","wasm","heap","Array","fill","undefined","getObject","idx","push","heap_next","length","dropObject","takeObject","ret","cachedTextDecoder","TextDecoder","ignoreBOM","fatal","decode","Error","cachedUint8Memory0","getUint8Memory0","buffer","Uint8Array","getStringFromWasm0","ptr","len","slice","addHeapObject","obj","WASM_VECTOR_LEN","cachedTextEncoder","TextEncoder","encode","encodeString","arg","view","buf","set","read","written","passStringToWasm0","malloc","realloc","subarray","mem","offset","code","charCodeAt","isLikeNone","x","cachedInt32Memory0","getInt32Memory0","Int32Array","debugString","val","description","name","isArray","debug","i","builtInMatches","exec","toString","call","className","JSON","stringify","_","message","stack","CLOSURE_DTORS","FinalizationRegistry","register","unregister","state","__wbindgen_export_3","get","dtor","a","b","makeMutClosure","arg0","arg1","f","cnt","real","args","original","__wbg_adapter_34","arg2","_dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h442b5e922f6f9710","_assertClass","instance","klass","passArray8ToWasm0","verifyFunctionExecution$1","execution","verifying_key","program","function_id","retptr","__wbindgen_add_to_stack_pointer","Execution$1","VerifyingKey$1","Program$1","ptr0","__wbindgen_malloc","__wbindgen_realloc","len0","verifyFunctionExecution","__wbg_ptr","r0","r1","cachedBigInt64Memory0","getBigInt64Memory0","BigInt64Array","getArrayU8FromWasm0","runRayonThread","receiver","initThreadPool$1","num_threads","initThreadPool","handleError","apply","this","e","__wbindgen_exn_store","__wbg_adapter_279","arg3","wasm_bindgen__convert__closures__invoke2_mut__h5ab12ffe4b82d47a","AddressFinalization","__wbg_address_free","Address","__wrap","Object","create","prototype","__destroy_into_raw","free","from_private_key","private_key","PrivateKey$1","address_from_private_key","from_view_key","view_key","ViewKey$1","address_from_view_key","from_string","address_from_string","to_string","deferred1_0","deferred1_1","address_to_string","__wbindgen_free","verify","signature","Signature$1","address_verify","ExecutionFinalization","__wbg_execution_free","Execution","execution_toString","fromString","execution_fromString","ExecutionResponseFinalization","__wbg_executionresponse_free","ExecutionResponse","getOutputs","executionresponse_getOutputs","getExecution","executionresponse_getExecution","getKeys","executionresponse_getKeys","KeyPair","getProvingKey","executionresponse_getProvingKey","ProvingKey$1","getVerifyingKey","executionresponse_getVerifyingKey","getFunctionId","executionresponse_getFunctionId","getProgram","executionresponse_getProgram","FieldFinalization","__wbg_field_free","Field","field_toString","field","field_fromString","KeyPairFinalization","__wbg_keypair_free","constructor","proving_key","ptr1","keypair_new","provingKey","keypair_provingKey","verifyingKey","keypair_verifyingKey","MetadataFinalization","__wbg_metadata_free","Metadata","locator","__wbg_get_metadata_locator","__wbg_set_metadata_locator","prover","__wbg_get_metadata_prover","__wbg_set_metadata_prover","verifier","__wbg_get_metadata_verifier","__wbg_set_metadata_verifier","__wbg_get_metadata_verifyingKey","__wbg_set_metadata_verifyingKey","baseUrl","metadata_baseUrl","bond_public","metadata_bond_public","bond_validator","metadata_bond_validator","claim_unbond_public","metadata_claim_unbond_public","fee_private","metadata_fee_private","fee_public","metadata_fee_public","inclusion","metadata_inclusion","join","metadata_join","set_validator_state","metadata_set_validator_state","split","metadata_split","transfer_private","metadata_transfer_private","transfer_private_to_public","metadata_transfer_private_to_public","transfer_public","metadata_transfer_public","transfer_public_as_signer","metadata_transfer_public_as_signer","transfer_public_to_private","metadata_transfer_public_to_private","unbond_public","metadata_unbond_public","OfflineQueryFinalization","__wbg_offlinequery_free","OfflineQuery","state_root","offlinequery_new","addStatePath","commitment","state_path","len1","offlinequery_addStatePath","offlinequery_toString","s","offlinequery_fromString","PrivateKeyFinalization","__wbg_privatekey_free","PrivateKey","privatekey_new","from_seed_unchecked","seed","privatekey_from_seed_unchecked","privatekey_from_string","privatekey_to_string","to_view_key","privatekey_to_view_key","to_address","privatekey_to_address","Address$1","sign","privatekey_sign","newEncrypted","secret","privatekey_newEncrypted","PrivateKeyCiphertext$1","toCiphertext","privatekey_toCiphertext","fromPrivateKeyCiphertext","ciphertext","privatekey_fromPrivateKeyCiphertext","PrivateKeyCiphertextFinalization","__wbg_privatekeyciphertext_free","PrivateKeyCiphertext","encryptPrivateKey","decryptToPrivateKey","privatekeyciphertext_decryptToPrivateKey","privatekeyciphertext_toString","privatekeyciphertext_fromString","ProgramFinalization","__wbg_program_free","Program","program_fromString","program_toString","hasFunction","function_name","program_hasFunction","getFunctions","program_getFunctions","getFunctionInputs","program_getFunctionInputs","getMappings","program_getMappings","getRecordMembers","record_name","program_getRecordMembers","getStructMembers","struct_name","program_getStructMembers","getCreditsProgram","program_getCreditsProgram","id","program_id","program_address","isEqual","other","program_isEqual","getImports","program_getImports","ProgramManagerFinalization","__wbg_programmanager_free","buildDeploymentTransaction","fee_credits","fee_record","imports","fee_proving_key","fee_verifying_key","offline_query","RecordPlaintext$1","ptr2","len2","ptr3","ptr4","ptr5","OfflineQuery$1","programmanager_buildDeploymentTransaction","estimateDeploymentFee","programmanager_estimateDeploymentFee","estimateProgramNameCost","programmanager_estimateProgramNameCost","r2","BigInt","asUintN","executeFunctionOffline","_function","inputs","prove_execution","cache","len4","programmanager_executeFunctionOffline","buildExecutionTransaction","len3","ptr6","ptr7","ptr8","programmanager_buildExecutionTransaction","estimateExecutionFee","programmanager_estimateExecutionFee","estimateFinalizeFee","programmanager_estimateFinalizeFee","buildJoinTransaction","record_1","record_2","join_proving_key","join_verifying_key","programmanager_buildJoinTransaction","buildSplitTransaction","split_amount","amount_record","split_proving_key","split_verifying_key","programmanager_buildSplitTransaction","buildTransferTransaction","amount_credits","recipient","transfer_type","caller","transfer_proving_key","transfer_verifying_key","len5","ptr9","ptr10","programmanager_buildTransferTransaction","synthesizeKeyPair","programmanager_synthesizeKeyPair","ProvingKeyFinalization","__wbg_provingkey_free","ProvingKey","isBondPublicProver","provingkey_isBondPublicProver","isBondValidatorProver","provingkey_isBondValidatorProver","isClaimUnbondPublicProver","provingkey_isClaimUnbondPublicProver","isFeePrivateProver","provingkey_isFeePrivateProver","isFeePublicProver","provingkey_isFeePublicProver","isInclusionProver","provingkey_isInclusionProver","isJoinProver","provingkey_isJoinProver","isSetValidatorStateProver","provingkey_isSetValidatorStateProver","isSplitProver","provingkey_isSplitProver","isTransferPrivateProver","provingkey_isTransferPrivateProver","isTransferPrivateToPublicProver","provingkey_isTransferPrivateToPublicProver","isTransferPublicProver","provingkey_isTransferPublicProver","isTransferPublicAsSignerProver","provingkey_isTransferPublicAsSignerProver","isTransferPublicToPrivateProver","provingkey_isTransferPublicToPrivateProver","isUnbondPublicProver","provingkey_isUnbondPublicProver","checksum","provingkey_checksum","copy","provingkey_copy","fromBytes","bytes","provingkey_fromBytes","string","provingkey_fromString","toBytes","provingkey_toBytes","v1","provingkey_toString","RecordCiphertextFinalization","__wbg_recordciphertext_free","RecordCiphertext","record","recordciphertext_fromString","recordciphertext_toString","decrypt","recordciphertext_decrypt","isOwner","recordciphertext_isOwner","RecordPlaintextFinalization","__wbg_recordplaintext_free","RecordPlaintext","recordplaintext_commitment","Field$1","recordplaintext_fromString","recordplaintext_toString","microcredits","recordplaintext_microcredits","nonce","recordplaintext_nonce","serialNumberString","deferred4_0","deferred4_1","recordplaintext_serialNumberString","r3","SignatureFinalization","__wbg_signature_free","Signature","signature_verify","signature_from_string","signature_to_string","TransactionFinalization","__wbg_transaction_free","Transaction","transaction","transaction_fromString","transaction_toString","transactionId","transaction_transactionId","transactionType","transaction_transactionType","VerifyingKeyFinalization","__wbg_verifyingkey_free","VerifyingKey","bondPublicVerifier","verifyingkey_bondPublicVerifier","bondValidatorVerifier","verifyingkey_bondValidatorVerifier","claimUnbondPublicVerifier","verifyingkey_claimUnbondPublicVerifier","feePrivateVerifier","verifyingkey_feePrivateVerifier","feePublicVerifier","verifyingkey_feePublicVerifier","inclusionVerifier","verifyingkey_inclusionVerifier","joinVerifier","verifyingkey_joinVerifier","setValidatorStateVerifier","verifyingkey_setValidatorStateVerifier","splitVerifier","verifyingkey_splitVerifier","transferPrivateVerifier","verifyingkey_transferPrivateVerifier","transferPrivateToPublicVerifier","verifyingkey_transferPrivateToPublicVerifier","transferPublicVerifier","verifyingkey_transferPublicVerifier","transferPublicAsSignerVerifier","verifyingkey_transferPublicAsSignerVerifier","transferPublicToPrivateVerifier","verifyingkey_transferPublicToPrivateVerifier","unbondPublicVerifier","verifyingkey_unbondPublicVerifier","isBondPublicVerifier","verifyingkey_isBondPublicVerifier","isBondValidatorVerifier","verifyingkey_isBondValidatorVerifier","isClaimUnbondPublicVerifier","verifyingkey_isClaimUnbondPublicVerifier","isFeePrivateVerifier","verifyingkey_isFeePrivateVerifier","isFeePublicVerifier","verifyingkey_isFeePublicVerifier","isInclusionVerifier","verifyingkey_isInclusionVerifier","isJoinVerifier","verifyingkey_isJoinVerifier","isSetValidatorStateVerifier","verifyingkey_isSetValidatorStateVerifier","isSplitVerifier","verifyingkey_isSplitVerifier","isTransferPrivateVerifier","verifyingkey_isTransferPrivateVerifier","isTransferPrivateToPublicVerifier","verifyingkey_isTransferPrivateToPublicVerifier","isTransferPublicVerifier","verifyingkey_isTransferPublicVerifier","isTransferPublicAsSignerVerifier","verifyingkey_isTransferPublicAsSignerVerifier","isTransferPublicToPrivateVerifier","verifyingkey_isTransferPublicToPrivateVerifier","isUnbondPublicVerifier","verifyingkey_isUnbondPublicVerifier","verifyingkey_checksum","verifyingkey_copy","verifyingkey_fromBytes","verifyingkey_fromString","verifyingkey_toBytes","verifyingkey_toString","ViewKeyFinalization","__wbg_viewkey_free","ViewKey","viewkey_from_string","viewkey_to_string","deferred3_0","deferred3_1","viewkey_decrypt","async","__wbg_load","Response","WebAssembly","instantiateStreaming","headers","console","warn","arrayBuffer","instantiate","Instance","__wbg_get_imports","wbg","__wbindgen_object_drop_ref","__wbg_new_71801a555ad9f2aa","XMLHttpRequest","arguments","__wbg_overrideMimeType_ee9c51919ceb418b","overrideMimeType","__wbg_open_c9eb0cf2c9d95679","arg4","arg5","open","__wbg_send_80d29985093c1ec5","send","__wbg_response_7c2e2759084f7279","response","__wbg_status_d485fb5a478426fb","status","__wbg_new_72fb9a18b5ae2624","__wbindgen_string_new","__wbg_set_1f9b04f170055d33","Reflect","__wbg_new_ab6fd82b10560829","Headers","__wbindgen_object_clone_ref","__wbg_new_0d76b0581eca6298","AbortController","__wbg_signal_a61f78a3478fd9bc","signal","__wbg_append_7bfcb4937d1d5e29","append","__wbg_instanceof_Response_849eb93e75734b6e","result","__wbg_status_61a01141acd3cf74","__wbg_url_5f6dc4009ac5f99d","__wbg_headers_9620bfada380764a","__wbg_iterator_2cee6dadfd956dfa","Symbol","iterator","__wbg_get_e3c254076557e348","__wbindgen_is_function","__wbg_call_27c0f87801dedf93","__wbindgen_is_object","__wbg_next_40fc327bfc8770e6","next","__wbg_next_196c84450b364254","__wbg_done_298b57d23c0fc80c","done","__wbg_value_d93c65011f51a456","value","__wbg_abort_2aa7521d5690750e","abort","__wbg_stringify_8887fe74e1c50d81","__wbindgen_string_get","__wbg_log_0159ca40cddf5b15","log","__wbindgen_bigint_from_u64","__wbg_call_b3ca7c6051f9bec1","__wbg_keypair_new","__wbindgen_module","__wbg_init","__wbindgen_wasm_module","__wbindgen_memory","__wbg_spawnWorker_f6acaddb2e29dc4a","__wbg_executionresponse_new","ExecutionResponse$1","__wbg_transaction_new","Transaction$1","__wbg_newwithlength_66ae46612e7f0234","__wbg_set_d4638f722068f043","__wbindgen_cb_drop","__wbg_new_16b304a2cfa7ff4a","__wbg_push_a5b05aedc7234f9f","__wbg_arrayBuffer_29931d52c7206b02","__wbg_new_63b92bc8671ed464","__wbg_length_c20a40f15020d68a","__wbg_new_81740750da40724f","state0","cb0","__wbindgen_number_new","__wbg_new_abda76e883ba8a5f","__wbg_stack_658279fe44541cf6","__wbg_error_f851667af71bcfc6","deferred0_0","deferred0_1","error","__wbg_buffer_12d079cc21e14bdb","__wbg_newwithbyteoffsetandlength_aa4a17c33a06e5cb","__wbg_randomFillSync_5c9c955aa56b6049","randomFillSync","__wbg_subarray_a1f73cd4b5b42fe1","__wbg_getRandomValues_3aa56aa6edec874c","getRandomValues","__wbg_set_a47bac70306a19a7","__wbg_crypto_1d1f22824a6a080c","crypto","__wbg_process_4a72847cc503995b","process","__wbg_versions_f686565e586dd935","versions","__wbg_node_104a2ff8d6ea03a2","node","__wbindgen_is_string","__wbg_require_cca90b1a94a0255b","require","__wbg_msCrypto_eb05e62b530a1508","msCrypto","__wbg_newwithlength_e9b4878cebadb3d3","__wbg_length_cd7af8117672b8b8","__wbg_get_bd8e338fbd5f5cc8","__wbg_self_ce0dbfc45cf2f5be","self","__wbg_window_c6fb939a7f436783","window","__wbg_globalThis_d1e6af4856ba331b","globalThis","__wbg_global_207b558942527489","global","__wbindgen_is_undefined","__wbg_newnoargs_e258087cd0daa0ea","Function","__wbg_has_0af94d20077affa2","has","__wbg_fetch_bc7c8e27076a5c84","fetch","__wbg_fetch_921fad6ef9e883dd","__wbindgen_debug_string","__wbindgen_throw","__wbindgen_rethrow","__wbg_then_a73caa9a87991566","then","__wbg_then_0c86a60e8fcfe9f6","__wbg_queueMicrotask_481971b0d87f3dd4","queueMicrotask","__wbg_queueMicrotask_3cbae2ec6b6cd3d6","__wbg_resolve_b0083a7967828ec8","__wbg_waitAsync_5d743fc9058ba01a","Atomics","waitAsync","__wbg_new_8cccba86b0f574cb","__wbg_waitAsync_46d5c36955b71a79","__wbg_async_19c0400d97cc72fe","__wbg_value_571d60108110e917","__wbindgen_link_fc1eedd35dc7e0a6","encodeURIComponent","__wbg_new_d1187ae36d662ef9","__wbg_setonmessage_503809e5bb51bd33","onmessage","__wbg_of_6a70eed8d41f469c","of","__wbg_postMessage_7380d10e8b8269df","__wbg_data_3ce7c145ca4fbcdc","data","__wbg_newwithstrandinit_3fd6fba4083ff2d0","Request","__wbg_responseText_c67ed2d48db10769","responseText","__wbindgen_closure_wrapper5763","__wbindgen_closure_wrapper5788","__wbg_init_memory","maybe_memory","Memory","initial","maximum","shared","__wbg_finalize_init","exports","__wbindgen_start","initSync","Module","input","URL","freeze","__proto__","Metadata$1","ProgramManager","ProgramManager$1","RecordCiphertext$1","default","wasm_path","wasmInitThreadPool","Private","opt","importHook","serverPath","initializeHook","final_path","Cargo","threads","navigator","hardwareConcurrency","info","proxyMarker","createEndpoint","releaseProxy","finalizer","throwMarker","isObject","transferHandlers","Map","canHandle","serialize","port1","port2","MessageChannel","expose","deserialize","port","start","wrap","serialized","isError","assign","ep","allowedOrigins","callback","ev","origin","allowedOrigin","RegExp","test","isAllowedOrigin","path","argumentList","map","fromWireValue","returnValue","parent","reduce","prop","rawValue","proxy","transfers","transferCache","transfer","catch","wireValue","transferables","toWireValue","removeEventListener","closeEndPoint","TypeError","endpoint","isMessagePort","close","target","createProxy","throwIfProxyReleased","isReleased","releaseEndpoint","requestResponseMessage","proxyCounter","WeakMap","proxyFinalizers","newCount","isProxyReleased","Proxy","_target","unregisterProxy","r","p","bind","_thisArg","rawArgumentList","last","processArguments","construct","registerProxy","processed","v","arr","concat","handler","serializedValue","msg","Math","floor","random","Number","MAX_SAFE_INTEGER","l"],"sourceRoot":""} \ No newline at end of file diff --git a/825.bundle.js b/825.bundle.js deleted file mode 100644 index fb0070b9f..000000000 --- a/825.bundle.js +++ /dev/null @@ -1,2 +0,0 @@ -(()=>{var r,e,t,o,a,n,i={},p={};function c(r){var e=p[r];if(void 0!==e)return e.exports;var t=p[r]={exports:{}};return i[r](t,t.exports,c),t.exports}c.m=i,c.x=()=>{var r=c.O(void 0,[495,877,66],(()=>c(66)));return r=c.O(r)},r="function"==typeof Symbol?Symbol("webpack queues"):"__webpack_queues__",e="function"==typeof Symbol?Symbol("webpack exports"):"__webpack_exports__",t="function"==typeof Symbol?Symbol("webpack error"):"__webpack_error__",o=r=>{r&&r.d<1&&(r.d=1,r.forEach((r=>r.r--)),r.forEach((r=>r.r--?r.r++:r())))},c.a=(a,n,i)=>{var p;i&&((p=[]).d=-1);var c,s,f,l=new Set,u=a.exports,b=new Promise(((r,e)=>{f=e,s=r}));b[e]=u,b[r]=r=>(p&&r(p),l.forEach(r),b.catch((r=>{}))),a.exports=b,n((a=>{var n;c=(a=>a.map((a=>{if(null!==a&&"object"==typeof a){if(a[r])return a;if(a.then){var n=[];n.d=0,a.then((r=>{i[e]=r,o(n)}),(r=>{i[t]=r,o(n)}));var i={};return i[r]=r=>r(n),i}}var p={};return p[r]=r=>{},p[e]=a,p})))(a);var i=()=>c.map((r=>{if(r[t])throw r[t];return r[e]})),s=new Promise((e=>{(n=()=>e(i)).r=0;var t=r=>r!==p&&!l.has(r)&&(l.add(r),r&&!r.d&&(n.r++,r.push(n)));c.map((e=>e[r](t)))}));return n.r?s:i()}),(r=>(r?f(b[t]=r):s(u),o(p)))),p&&p.d<0&&(p.d=0)},a=[],c.O=(r,e,t,o)=>{if(!e){var n=1/0;for(f=0;f=o)&&Object.keys(c.O).every((r=>c.O[r](e[p])))?e.splice(p--,1):(i=!1,o0&&a[f-1][2]>o;f--)a[f]=a[f-1];a[f]=[e,t,o]},c.d=(r,e)=>{for(var t in e)c.o(e,t)&&!c.o(r,t)&&Object.defineProperty(r,t,{enumerable:!0,get:e[t]})},c.f={},c.e=r=>Promise.all(Object.keys(c.f).reduce(((e,t)=>(c.f[t](r,e),e)),[])),c.u=r=>r+".bundle.js",c.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(r){if("object"==typeof window)return window}}(),c.o=(r,e)=>Object.prototype.hasOwnProperty.call(r,e),(()=>{var r;c.g.importScripts&&(r=c.g.location+"");var e=c.g.document;if(!r&&e&&(e.currentScript&&(r=e.currentScript.src),!r)){var t=e.getElementsByTagName("script");if(t.length)for(var o=t.length-1;o>-1&&(!r||!/^http(s?):/.test(r));)r=t[o--].src}if(!r)throw new Error("Automatic publicPath is not supported in this browser");r=r.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),c.p=r})(),(()=>{c.b=self.location+"";var r={825:1};c.f.i=(e,t)=>{r[e]||importScripts(c.p+c.u(e))};var e=self.webpackChunkaleo_website=self.webpackChunkaleo_website||[],t=e.push.bind(e);e.push=e=>{var[o,a,n]=e;for(var i in a)c.o(a,i)&&(c.m[i]=a[i]);for(n&&n(c);o.length;)r[o.pop()]=1;t(e)}})(),n=c.x,c.x=()=>Promise.all([495,877,66].map(c.e,c)).then(n);c.x()})(); -//# sourceMappingURL=825.bundle.js.map \ No newline at end of file diff --git a/825.bundle.js.map b/825.bundle.js.map deleted file mode 100644 index fd392131e..000000000 --- a/825.bundle.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"825.bundle.js","mappings":"UAAIA,EACAC,EACAC,EACAC,ECHAC,ECAAC,E,KCCAC,EAA2B,CAAC,EAGhC,SAASC,EAAoBC,GAE5B,IAAIC,EAAeH,EAAyBE,GAC5C,QAAqBE,IAAjBD,EACH,OAAOA,EAAaE,QAGrB,IAAIC,EAASN,EAAyBE,GAAY,CAGjDG,QAAS,CAAC,GAOX,OAHAE,EAAoBL,GAAUI,EAAQA,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,EAASI,qBAAqB,UAC5C,GAAGD,EAAQlC,OAEV,IADA,IAAID,EAAImC,EAAQlC,OAAS,EAClBD,GAAK,KAAO6B,IAAc,aAAaQ,KAAKR,KAAaA,EAAYM,EAAQnC,KAAKkC,GAE3F,CAID,IAAKL,EAAW,MAAM,IAAIS,MAAM,yDAChCT,EAAYA,EAAUU,QAAQ,OAAQ,IAAIA,QAAQ,QAAS,IAAIA,QAAQ,YAAa,KACpFxF,EAAoByF,EAAIX,C,WClBxB9E,EAAoB0F,EAAIC,KAAKX,SAAW,GAIxC,IAAIY,EAAkB,CACrB,IAAK,GAgBN5F,EAAoB+D,EAAEd,EAAI,CAACe,EAASG,KAE/ByB,EAAgB5B,IAElBe,cAAc/E,EAAoByF,EAAIzF,EAAoBoE,EAAEJ,GAE9D,EAGD,IAAI6B,EAAqBF,KAA+B,yBAAIA,KAA+B,0BAAK,GAC5FG,EAA6BD,EAAmBnD,KAAKqD,KAAKF,GAC9DA,EAAmBnD,KAvBCsD,IACnB,IAAKnD,EAAUoD,EAAaC,GAAWF,EACvC,IAAI,IAAI/F,KAAYgG,EAChBjG,EAAoB2D,EAAEsC,EAAahG,KACrCD,EAAoBO,EAAEN,GAAYgG,EAAYhG,IAIhD,IADGiG,GAASA,EAAQlG,GACd6C,EAASK,QACd0C,EAAgB/C,EAASsD,OAAS,EACnCL,EAA2BE,EAAK,C,KRnB7BlG,EAAOE,EAAoBQ,EAC/BR,EAAoBQ,EAAI,IAChBkB,QAAQuC,IAAI,CAAC,IAAI,IAAI,IAAInC,IAAI9B,EAAoBkC,EAAGlC,IAAsBgC,KAAKlC,GSD7DE,EAAoBQ,G","sources":["webpack://aleo-website/webpack/runtime/async module","webpack://aleo-website/webpack/runtime/chunk loaded","webpack://aleo-website/webpack/runtime/startup chunk dependencies","webpack://aleo-website/webpack/bootstrap","webpack://aleo-website/webpack/runtime/define property getters","webpack://aleo-website/webpack/runtime/ensure chunk","webpack://aleo-website/webpack/runtime/get javascript chunk filename","webpack://aleo-website/webpack/runtime/global","webpack://aleo-website/webpack/runtime/hasOwnProperty shorthand","webpack://aleo-website/webpack/runtime/publicPath","webpack://aleo-website/webpack/runtime/importScripts chunk loading","webpack://aleo-website/webpack/startup"],"sourcesContent":["var webpackQueues = typeof Symbol === \"function\" ? Symbol(\"webpack queues\") : \"__webpack_queues__\";\nvar webpackExports = typeof Symbol === \"function\" ? Symbol(\"webpack exports\") : \"__webpack_exports__\";\nvar webpackError = typeof Symbol === \"function\" ? Symbol(\"webpack error\") : \"__webpack_error__\";\nvar resolveQueue = (queue) => {\n\tif(queue && queue.d < 1) {\n\t\tqueue.d = 1;\n\t\tqueue.forEach((fn) => (fn.r--));\n\t\tqueue.forEach((fn) => (fn.r-- ? fn.r++ : fn()));\n\t}\n}\nvar wrapDeps = (deps) => (deps.map((dep) => {\n\tif(dep !== null && typeof dep === \"object\") {\n\t\tif(dep[webpackQueues]) return dep;\n\t\tif(dep.then) {\n\t\t\tvar queue = [];\n\t\t\tqueue.d = 0;\n\t\t\tdep.then((r) => {\n\t\t\t\tobj[webpackExports] = r;\n\t\t\t\tresolveQueue(queue);\n\t\t\t}, (e) => {\n\t\t\t\tobj[webpackError] = e;\n\t\t\t\tresolveQueue(queue);\n\t\t\t});\n\t\t\tvar obj = {};\n\t\t\tobj[webpackQueues] = (fn) => (fn(queue));\n\t\t\treturn obj;\n\t\t}\n\t}\n\tvar ret = {};\n\tret[webpackQueues] = x => {};\n\tret[webpackExports] = dep;\n\treturn ret;\n}));\n__webpack_require__.a = (module, body, hasAwait) => {\n\tvar queue;\n\thasAwait && ((queue = []).d = -1);\n\tvar depQueues = new Set();\n\tvar exports = module.exports;\n\tvar currentDeps;\n\tvar outerResolve;\n\tvar reject;\n\tvar promise = new Promise((resolve, rej) => {\n\t\treject = rej;\n\t\touterResolve = resolve;\n\t});\n\tpromise[webpackExports] = exports;\n\tpromise[webpackQueues] = (fn) => (queue && fn(queue), depQueues.forEach(fn), promise[\"catch\"](x => {}));\n\tmodule.exports = promise;\n\tbody((deps) => {\n\t\tcurrentDeps = wrapDeps(deps);\n\t\tvar fn;\n\t\tvar getResult = () => (currentDeps.map((d) => {\n\t\t\tif(d[webpackError]) throw d[webpackError];\n\t\t\treturn d[webpackExports];\n\t\t}))\n\t\tvar promise = new Promise((resolve) => {\n\t\t\tfn = () => (resolve(getResult));\n\t\t\tfn.r = 0;\n\t\t\tvar fnQueue = (q) => (q !== queue && !depQueues.has(q) && (depQueues.add(q), q && !q.d && (fn.r++, q.push(fn))));\n\t\t\tcurrentDeps.map((dep) => (dep[webpackQueues](fnQueue)));\n\t\t});\n\t\treturn fn.r ? promise : getResult();\n\t}, (err) => ((err ? reject(promise[webpackError] = err) : outerResolve(exports)), resolveQueue(queue)));\n\tqueue && queue.d < 0 && (queue.d = 0);\n};","var deferred = [];\n__webpack_require__.O = (result, chunkIds, fn, priority) => {\n\tif(chunkIds) {\n\t\tpriority = priority || 0;\n\t\tfor(var i = deferred.length; i > 0 && deferred[i - 1][2] > priority; i--) deferred[i] = deferred[i - 1];\n\t\tdeferred[i] = [chunkIds, fn, priority];\n\t\treturn;\n\t}\n\tvar notFulfilled = Infinity;\n\tfor (var i = 0; i < deferred.length; i++) {\n\t\tvar [chunkIds, fn, priority] = deferred[i];\n\t\tvar fulfilled = true;\n\t\tfor (var j = 0; j < chunkIds.length; j++) {\n\t\t\tif ((priority & 1 === 0 || notFulfilled >= priority) && Object.keys(__webpack_require__.O).every((key) => (__webpack_require__.O[key](chunkIds[j])))) {\n\t\t\t\tchunkIds.splice(j--, 1);\n\t\t\t} else {\n\t\t\t\tfulfilled = false;\n\t\t\t\tif(priority < notFulfilled) notFulfilled = priority;\n\t\t\t}\n\t\t}\n\t\tif(fulfilled) {\n\t\t\tdeferred.splice(i--, 1)\n\t\t\tvar r = fn();\n\t\t\tif (r !== undefined) result = r;\n\t\t}\n\t}\n\treturn result;\n};","var next = __webpack_require__.x;\n__webpack_require__.x = () => {\n\treturn Promise.all([495,877,66].map(__webpack_require__.e, __webpack_require__)).then(next);\n};","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n// expose the modules object (__webpack_modules__)\n__webpack_require__.m = __webpack_modules__;\n\n// the startup function\n__webpack_require__.x = () => {\n\t// Load entry module and return exports\n\t// This entry module depends on other loaded chunks and execution need to be delayed\n\tvar __webpack_exports__ = __webpack_require__.O(undefined, [495,877,66], () => (__webpack_require__(66)))\n\t__webpack_exports__ = __webpack_require__.O(__webpack_exports__);\n\treturn __webpack_exports__;\n};\n\n","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.f = {};\n// This file contains only the entry chunk.\n// The chunk loading function for additional chunks\n__webpack_require__.e = (chunkId) => {\n\treturn Promise.all(Object.keys(__webpack_require__.f).reduce((promises, key) => {\n\t\t__webpack_require__.f[key](chunkId, promises);\n\t\treturn promises;\n\t}, []));\n};","// This function allow to reference async chunks and sibling chunks for the entrypoint\n__webpack_require__.u = (chunkId) => {\n\t// return url for filenames based on template\n\treturn \"\" + chunkId + \".bundle.js\";\n};","__webpack_require__.g = (function() {\n\tif (typeof globalThis === 'object') return globalThis;\n\ttry {\n\t\treturn this || new Function('return this')();\n\t} catch (e) {\n\t\tif (typeof window === 'object') return window;\n\t}\n})();","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","var scriptUrl;\nif (__webpack_require__.g.importScripts) scriptUrl = __webpack_require__.g.location + \"\";\nvar document = __webpack_require__.g.document;\nif (!scriptUrl && document) {\n\tif (document.currentScript)\n\t\tscriptUrl = document.currentScript.src;\n\tif (!scriptUrl) {\n\t\tvar scripts = document.getElementsByTagName(\"script\");\n\t\tif(scripts.length) {\n\t\t\tvar i = scripts.length - 1;\n\t\t\twhile (i > -1 && (!scriptUrl || !/^http(s?):/.test(scriptUrl))) scriptUrl = scripts[i--].src;\n\t\t}\n\t}\n}\n// When supporting browsers where an automatic publicPath is not supported you must specify an output.publicPath manually via configuration\n// or pass an empty string (\"\") and set the __webpack_public_path__ variable from your code to use your own logic.\nif (!scriptUrl) throw new Error(\"Automatic publicPath is not supported in this browser\");\nscriptUrl = scriptUrl.replace(/#.*$/, \"\").replace(/\\?.*$/, \"\").replace(/\\/[^\\/]+$/, \"/\");\n__webpack_require__.p = scriptUrl;","__webpack_require__.b = self.location + \"\";\n\n// object to store loaded chunks\n// \"1\" means \"already loaded\"\nvar installedChunks = {\n\t825: 1\n};\n\n// importScripts chunk loading\nvar installChunk = (data) => {\n\tvar [chunkIds, moreModules, runtime] = data;\n\tfor(var moduleId in moreModules) {\n\t\tif(__webpack_require__.o(moreModules, moduleId)) {\n\t\t\t__webpack_require__.m[moduleId] = moreModules[moduleId];\n\t\t}\n\t}\n\tif(runtime) runtime(__webpack_require__);\n\twhile(chunkIds.length)\n\t\tinstalledChunks[chunkIds.pop()] = 1;\n\tparentChunkLoadingFunction(data);\n};\n__webpack_require__.f.i = (chunkId, promises) => {\n\t// \"1\" is the signal for \"already loaded\"\n\tif(!installedChunks[chunkId]) {\n\t\tif(true) { // all chunks have JS\n\t\t\timportScripts(__webpack_require__.p + __webpack_require__.u(chunkId));\n\t\t}\n\t}\n};\n\nvar chunkLoadingGlobal = self[\"webpackChunkaleo_website\"] = self[\"webpackChunkaleo_website\"] || [];\nvar parentChunkLoadingFunction = chunkLoadingGlobal.push.bind(chunkLoadingGlobal);\nchunkLoadingGlobal.push = installChunk;\n\n// no HMR\n\n// no HMR manifest","// run startup\nvar __webpack_exports__ = __webpack_require__.x();\n"],"names":["webpackQueues","webpackExports","webpackError","resolveQueue","deferred","next","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","undefined","exports","module","__webpack_modules__","m","x","__webpack_exports__","O","Symbol","queue","d","forEach","fn","r","a","body","hasAwait","currentDeps","outerResolve","reject","depQueues","Set","promise","Promise","resolve","rej","deps","map","dep","then","obj","e","ret","wrapDeps","getResult","fnQueue","q","has","add","push","err","result","chunkIds","priority","notFulfilled","Infinity","i","length","fulfilled","j","Object","keys","every","key","splice","definition","o","defineProperty","enumerable","get","f","chunkId","all","reduce","promises","u","g","globalThis","this","Function","window","prop","prototype","hasOwnProperty","call","scriptUrl","importScripts","location","document","currentScript","src","scripts","getElementsByTagName","test","Error","replace","p","b","self","installedChunks","chunkLoadingGlobal","parentChunkLoadingFunction","bind","data","moreModules","runtime","pop"],"sourceRoot":""} \ No newline at end of file diff --git a/876.bundle.js b/876.bundle.js deleted file mode 100644 index 506ceae0f..000000000 --- a/876.bundle.js +++ /dev/null @@ -1,3 +0,0 @@ -/*! For license information please see 876.bundle.js.LICENSE.txt */ -(self.webpackChunkaleo_website=self.webpackChunkaleo_website||[]).push([[876,495],{720:(e,r,t)=>{t.d(r,{LV:()=>f});const i=Symbol("Comlink.proxy"),n=Symbol("Comlink.endpoint"),a=Symbol("Comlink.releaseProxy"),o=Symbol("Comlink.finalizer"),s=Symbol("Comlink.thrown"),c=e=>"object"==typeof e&&null!==e||"function"==typeof e,u=new Map([["proxy",{canHandle:e=>c(e)&&e[i],serialize(e){const{port1:r,port2:t}=new MessageChannel;return h(e,r),[t,[t]]},deserialize:e=>(e.start(),f(e))}],["throw",{canHandle:e=>c(e)&&s in e,serialize({value:e}){let r;return r=e instanceof Error?{isError:!0,value:{message:e.message,name:e.name,stack:e.stack}}:{isError:!1,value:e},[r,[]]},deserialize(e){if(e.isError)throw Object.assign(new Error(e.value.message),e.value);throw e.value}}]]);function h(e,r=globalThis,t=["*"]){r.addEventListener("message",(function n(a){if(!a||!a.data)return;if(!function(e,r){for(const t of e){if(r===t||"*"===t)return!0;if(t instanceof RegExp&&t.test(r))return!0}return!1}(t,a.origin))return void console.warn(`Invalid origin '${a.origin}' for comlink proxy`);const{id:c,type:u,path:f}=Object.assign({path:[]},a.data),y=(a.data.argumentList||[]).map(P);let d;try{const r=f.slice(0,-1).reduce(((e,r)=>e[r]),e),t=f.reduce(((e,r)=>e[r]),e);switch(u){case"GET":d=t;break;case"SET":r[f.slice(-1)[0]]=P(a.data.value),d=!0;break;case"APPLY":d=t.apply(r,y);break;case"CONSTRUCT":d=function(e){return Object.assign(e,{[i]:!0})}(new t(...y));break;case"ENDPOINT":{const{port1:r,port2:t}=new MessageChannel;h(e,t),d=function(e,r){return w.set(e,r),e}(r,[r])}break;case"RELEASE":d=void 0;break;default:return}}catch(e){d={value:e,[s]:0}}Promise.resolve(d).catch((e=>({value:e,[s]:0}))).then((t=>{const[i,a]=m(t);r.postMessage(Object.assign(Object.assign({},i),{id:c}),a),"RELEASE"===u&&(r.removeEventListener("message",n),l(r),o in e&&"function"==typeof e[o]&&e[o]())})).catch((e=>{const[t,i]=m({value:new TypeError("Unserializable return value"),[s]:0});r.postMessage(Object.assign(Object.assign({},t),{id:c}),i)}))})),r.start&&r.start()}function l(e){(function(e){return"MessagePort"===e.constructor.name})(e)&&e.close()}function f(e,r){return g(e,[],r)}function y(e){if(e)throw new Error("Proxy has been released and is not useable")}function d(e){return _(e,{type:"RELEASE"}).then((()=>{l(e)}))}const p=new WeakMap,v="FinalizationRegistry"in globalThis&&new FinalizationRegistry((e=>{const r=(p.get(e)||0)-1;p.set(e,r),0===r&&d(e)}));function g(e,r=[],t=function(){}){let i=!1;const o=new Proxy(t,{get(t,n){if(y(i),n===a)return()=>{!function(e){v&&v.unregister(e)}(o),d(e),i=!0};if("then"===n){if(0===r.length)return{then:()=>o};const t=_(e,{type:"GET",path:r.map((e=>e.toString()))}).then(P);return t.then.bind(t)}return g(e,[...r,n])},set(t,n,a){y(i);const[o,s]=m(a);return _(e,{type:"SET",path:[...r,n].map((e=>e.toString())),value:o},s).then(P)},apply(t,a,o){y(i);const s=r[r.length-1];if(s===n)return _(e,{type:"ENDPOINT"}).then(P);if("bind"===s)return g(e,r.slice(0,-1));const[c,u]=b(o);return _(e,{type:"APPLY",path:r.map((e=>e.toString())),argumentList:c},u).then(P)},construct(t,n){y(i);const[a,o]=b(n);return _(e,{type:"CONSTRUCT",path:r.map((e=>e.toString())),argumentList:a},o).then(P)}});return function(e,r){const t=(p.get(r)||0)+1;p.set(r,t),v&&v.register(e,r,e)}(o,e),o}function b(e){const r=e.map(m);return[r.map((e=>e[0])),(t=r.map((e=>e[1])),Array.prototype.concat.apply([],t))];var t}const w=new WeakMap;function m(e){for(const[r,t]of u)if(t.canHandle(e)){const[i,n]=t.serialize(e);return[{type:"HANDLER",name:r,value:i},n]}return[{type:"RAW",value:e},w.get(e)||[]]}function P(e){switch(e.type){case"HANDLER":return u.get(e.name).deserialize(e.value);case"RAW":return e.value}}function _(e,r,t){return new Promise((i=>{const n=new Array(4).fill(0).map((()=>Math.floor(Math.random()*Number.MAX_SAFE_INTEGER).toString(16))).join("-");e.addEventListener("message",(function r(t){t.data&&t.data.id&&t.data.id===n&&(e.removeEventListener("message",r),i(t.data))})),e.start&&e.start(),e.postMessage(Object.assign({id:n},r),t)}))}},495:(e,r,t)=>{t.a(e,(async(e,i)=>{try{t.r(r),t.d(r,{Account:()=>s,Address:()=>n.pV,AleoKeyProvider:()=>f,AleoKeyProviderParams:()=>l,AleoNetworkClient:()=>h,BlockHeightSearch:()=>v,CREDITS_PROGRAM_KEYS:()=>k,ExecutionResponse:()=>n.qp,Field:()=>n.D0,FunctionExecution:()=>n.Zc,KEY_STORE:()=>_,NetworkRecordProvider:()=>p,OfflineKeyProvider:()=>d,OfflineQuery:()=>n.c7,OfflineSearchParams:()=>y,PRIVATE_TO_PUBLIC_TRANSFER:()=>C,PRIVATE_TRANSFER:()=>S,PRIVATE_TRANSFER_TYPES:()=>E,PUBLIC_TO_PRIVATE_TRANSFER:()=>A,PUBLIC_TRANSFER:()=>B,PUBLIC_TRANSFER_AS_SIGNER:()=>R,PrivateKey:()=>n.ZD,PrivateKeyCiphertext:()=>n.LW,Program:()=>n.BP,ProgramManager:()=>w,ProgramManagerBase:()=>n.Ao,ProvingKey:()=>n.$7,RecordCiphertext:()=>n.KC,RecordPlaintext:()=>n.ZF,Signature:()=>n.to,Transaction:()=>n.ZX,VALID_TRANSFER_TYPES:()=>T,VerifyingKey:()=>n.pF,ViewKey:()=>n.hv,createAleoWorker:()=>b,initThreadPool:()=>n.Fs,initializeWasm:()=>V,logAndThrow:()=>F,verifyFunctionExecution:()=>n.Yc});var n=t(877),a=t(720),o=e([n]);n=(o.then?(await o)():o)[0];class s{_privateKey;_viewKey;_address;constructor(e={}){try{this._privateKey=this.privateKeyFromParams(e)}catch(e){throw console.error("Wrong parameter",e),new Error("Wrong Parameter")}this._viewKey=n.hv.from_private_key(this._privateKey),this._address=n.pV.from_private_key(this._privateKey)}static fromCiphertext(e,r){try{e="string"==typeof e?n.LW.fromString(e):e;const t=n.ZD.fromPrivateKeyCiphertext(e,r);return new s({privateKey:t.to_string()})}catch(e){throw new Error("Wrong password or invalid ciphertext")}}privateKeyFromParams(e){return e.seed?n.ZD.from_seed_unchecked(e.seed):e.privateKey?n.ZD.from_string(e.privateKey):new n.ZD}privateKey(){return this._privateKey}viewKey(){return this._viewKey}address(){return this._address}toString(){return this.address().to_string()}encryptAccount(e){return this._privateKey.toCiphertext(e)}decryptRecord(e){return this._viewKey.decrypt(e)}decryptRecords(e){return e.map((e=>this._viewKey.decrypt(e)))}ownsRecordCiphertext(e){if("string"!=typeof e)return e.isOwner(this._viewKey);try{return n.KC.fromString(e).isOwner(this._viewKey)}catch(e){return!1}}sign(e){return this._privateKey.sign(e)}verify(e,r){return this._address.verify(e,r)}}async function c(e,r){const t=await fetch(e,r);if(!t.ok)throw new Error(t.status+" could not get URL "+e);return t}async function u(e,r){r.method="POST";const t=await fetch(e,r);if(!t.ok)throw new Error(t.status+" could not post URL "+e);return t}class h{host;headers;account;constructor(e,r){this.host=e+"/testnet",r&&r.headers?this.headers=r.headers:this.headers={"X-Aleo-SDK-Version":"0.6.12"}}setAccount(e){this.account=e}getAccount(){return this.account}setHost(e){this.host=e+"/testnet"}async fetchData(e="/"){try{const r=await c(this.host+e,{headers:this.headers});return await r.json()}catch(e){throw new Error("Error fetching data.")}}async findUnspentRecords(e,r,t,i,a,o){if(o=o||[],e<0)throw new Error("Start height must be greater than or equal to 0");const s=new Array;let c,u,h,l,f=0,y=BigInt(0);if(void 0===t){if(void 0===this.account)throw new Error("Private key must be specified in an argument to findOwnedRecords or set in the AleoNetworkClient");h=this.account._privateKey}else try{h=t instanceof n.ZD?t:n.ZD.from_string(t)}catch(e){throw new Error("Error parsing private key provided.")}const d=h.to_view_key();try{const e=await this.getLatestHeight();if("number"!=typeof e)throw new Error("Error fetching latest block height.");l=e}catch(e){throw new Error("Error fetching latest block height.")}if(u="number"==typeof r&&r<=l?r:l,e>u)throw new Error("Start height must be less than or equal to end height.");for(;u>e;){c=u-50,c=BigInt(a))))return s;if(void 0!==i&&i.length>0){let e=0;if(r.microcredits()>i[e]){if(e+=1,s.push(r),"number"==typeof a&&(y+=r.microcredits(),y>=BigInt(a)))return s;if(s.length>=i.length)return s}}}}}catch(e){}}}}}}}catch(e){if(console.warn("Error fetching blocks in range: "+c.toString()+"-"+u.toString()),console.warn("Error: ",e),f+=1,f>10)return console.warn("10 failures fetching records reached. Returning records fetched so far"),s}}return s}async getBlock(e){try{return await this.fetchData("/block/"+e)}catch(e){throw new Error("Error fetching block.")}}async getBlockRange(e,r){try{return await this.fetchData("/blocks?start="+e+"&end="+r)}catch(t){throw new Error("Error fetching blocks between "+e+" and "+r+".")}}async getDeploymentTransactionIDForProgram(e){e instanceof n.BP&&(e=e.toString());try{return(await this.fetchData("/find/transactionID/deployment/"+e)).replace('"',"")}catch(e){throw new Error("Error fetching deployment transaction for program.")}}async getDeploymentTransactionForProgram(e){try{const r=await this.getDeploymentTransactionIDForProgram(e);return await this.getTransaction(r)}catch(e){throw new Error("Error fetching deployment transaction for program.")}}async getLatestBlock(){try{return await this.fetchData("/latest/block")}catch(e){throw new Error("Error fetching latest block.")}}async getLatestCommittee(){try{return await this.fetchData("/committee/latest")}catch(e){throw new Error("Error fetching latest block.")}}async getLatestHeight(){try{return await this.fetchData("/latest/height")}catch(e){throw new Error("Error fetching latest height.")}}async getProgram(e){try{return await this.fetchData("/program/"+e)}catch(e){throw new Error("Error fetching program")}}async getProgramObject(e){try{return n.BP.fromString(e)}catch(r){try{return n.BP.fromString(await this.getProgram(e))}catch(r){throw new Error(`${e} is neither a program name or a valid program`)}}}async getProgramImports(e){try{const r={},t=(e instanceof n.BP?e:await this.getProgramObject(e)).getImports();for(let e=0;e{if(void 0===e)t(new Error("No search parameters provided, cannot retrieve keys"));else{const i=e.cacheKey,a=e.verifyCreditsKeys;if(this.cache.has(i)){const[e,o]=this.cache.get(i),s=n.$7.fromBytes(e),c=n.pF.fromBytes(o);if(a){this.verifyCreditsKeys(i,s,c)||t(new Error(`Cached keys do not match expected keys for ${i}`))}r([s,c])}else t(new Error("Keys not found in cache for "+i))}}))}verifyCreditsKeys(e,r,t){switch(e){case k.bond_public.locator:return r.isBondPublicProver()&&t.isBondPublicVerifier();case k.claim_unbond_public.locator:return r.isClaimUnbondPublicProver()&&t.isClaimUnbondPublicVerifier();case k.fee_private.locator:return r.isFeePrivateProver()&&t.isFeePrivateVerifier();case k.fee_public.locator:return r.isFeePublicProver()&&t.isFeePublicVerifier();case k.inclusion.locator:return r.isInclusionProver()&&t.isInclusionVerifier();case k.join.locator:return r.isJoinProver()&&t.isJoinVerifier();case k.set_validator_state.locator:return r.isSetValidatorStateProver()&&t.isSetValidatorStateVerifier();case k.split.locator:return r.isSplitProver()&&t.isSplitVerifier();case k.transfer_private.locator:return r.isTransferPrivateProver()&&t.isTransferPrivateVerifier();case k.transfer_private_to_public.locator:return r.isTransferPrivateToPublicProver()&&t.isTransferPrivateToPublicVerifier();case k.transfer_public.locator:return r.isTransferPublicProver()&&t.isTransferPublicVerifier();case k.transfer_public_to_private.locator:return r.isTransferPublicToPrivateProver()&&t.isTransferPublicToPrivateVerifier();case k.unbond_public.locator:return r.isUnbondPublicProver()&&t.isUnbondPublicVerifier();default:return!1}}feePrivateKeys(){return this.functionKeys(y.feePrivateKeyParams())}feePublicKeys(){return this.functionKeys(y.feePublicKeyParams())}joinKeys(){return this.functionKeys(y.joinKeyParams())}splitKeys(){return this.functionKeys(y.splitKeyParams())}transferKeys(e){if(S.has(e))return this.functionKeys(y.transferPrivateKeyParams());if(C.has(e))return this.functionKeys(y.transferPrivateToPublicKeyParams());if(B.has(e))return this.functionKeys(y.transferPublicKeyParams());if(R.has(e))return this.functionKeys(y.transferPublicAsSignerKeyParams());if(A.has(e))return this.functionKeys(y.transferPublicToPrivateKeyParams());throw new Error("Invalid visibility type")}async unBondPublicKeys(){return this.functionKeys(y.unbondPublicKeyParams())}insertBondPublicKeys(e){if(!e.isBondPublicProver())throw new Error("Attempted to insert invalid proving keys for bond_public");this.cache.set(k.bond_public.locator,[e.toBytes(),n.pF.bondPublicVerifier().toBytes()])}insertClaimUnbondPublicKeys(e){if(!e.isClaimUnbondPublicProver())throw new Error("Attempted to insert invalid proving keys for claim_unbond_public");this.cache.set(k.claim_unbond_public.locator,[e.toBytes(),n.pF.claimUnbondPublicVerifier().toBytes()])}insertFeePrivateKeys(e){if(!e.isFeePrivateProver())throw new Error("Attempted to insert invalid proving keys for fee_private");this.cache.set(k.fee_private.locator,[e.toBytes(),n.pF.feePrivateVerifier().toBytes()])}insertFeePublicKeys(e){if(!e.isFeePublicProver())throw new Error("Attempted to insert invalid proving keys for fee_public");this.cache.set(k.fee_public.locator,[e.toBytes(),n.pF.feePublicVerifier().toBytes()])}insertJoinKeys(e){if(!e.isJoinProver())throw new Error("Attempted to insert invalid proving keys for join");this.cache.set(k.join.locator,[e.toBytes(),n.pF.joinVerifier().toBytes()])}insertSetValidatorStateKeys(e){if(!e.isSetValidatorStateProver())throw new Error("Attempted to insert invalid proving keys for set_validator_state");this.cache.set(k.set_validator_state.locator,[e.toBytes(),n.pF.setValidatorStateVerifier().toBytes()])}insertSplitKeys(e){if(!e.isSplitProver())throw new Error("Attempted to insert invalid proving keys for split");this.cache.set(k.split.locator,[e.toBytes(),n.pF.splitVerifier().toBytes()])}insertTransferPrivateKeys(e){if(!e.isTransferPrivateProver())throw new Error("Attempted to insert invalid proving keys for transfer_private");this.cache.set(k.transfer_private.locator,[e.toBytes(),n.pF.transferPrivateVerifier().toBytes()])}insertTransferPrivateToPublicKeys(e){if(!e.isTransferPrivateToPublicProver())throw new Error("Attempted to insert invalid proving keys for transfer_private_to_public");this.cache.set(k.transfer_private_to_public.locator,[e.toBytes(),n.pF.transferPrivateToPublicVerifier().toBytes()])}insertTransferPublicKeys(e){if(!e.isTransferPublicProver())throw new Error("Attempted to insert invalid proving keys for transfer_public");this.cache.set(k.transfer_public.locator,[e.toBytes(),n.pF.transferPublicVerifier().toBytes()])}insertTransferPublicToPrivateKeys(e){if(!e.isTransferPublicToPrivateProver())throw new Error("Attempted to insert invalid proving keys for transfer_public_to_private");this.cache.set(k.transfer_public_to_private.locator,[e.toBytes(),n.pF.transferPublicToPrivateVerifier().toBytes()])}insertUnbondPublicKeys(e){if(!e.isUnbondPublicProver())throw new Error("Attempted to insert invalid proving keys for unbond_public");this.cache.set(k.unbond_public.locator,[e.toBytes(),n.pF.unbondPublicVerifier().toBytes()])}}class p{account;networkClient;constructor(e,r){this.account=e,this.networkClient=r}setAccount(e){this.account=e}async findCreditsRecords(e,r,t,i){let n=0,a=0;if(i&&("startHeight"in i&&"number"==typeof i.endHeight&&(n=i.startHeight),"endHeight"in i&&"number"==typeof i.endHeight&&(a=i.endHeight)),0==a){const e=await this.networkClient.getLatestHeight();if(e instanceof Error)throw F("Unable to get current block height from the network");a=e}if(n>=a)throw F("Start height must be less than end height");return await this.networkClient.findUnspentRecords(n,a,this.account.privateKey(),e,void 0,t)}async findCreditsRecord(e,r,t,i){const n=await this.findCreditsRecords([e],r,t,i);return!(n instanceof Error)&&n.length>0?n[0]:(console.error("Record not found with error:",n),new Error("Record not found"))}async findRecord(e,r,t){throw new Error("Method not implemented.")}async findRecords(e,r,t){throw new Error("Method not implemented.")}}class v{startHeight;endHeight;constructor(e,r){this.startHeight=e,this.endHeight=r}}let g=null;const b=()=>{if(!g){const e=new Worker(new URL(t.p+t.u(587),t.b),{type:void 0});g=(0,a.LV)(e)}return g};class w{account;keyProvider;host;networkClient;recordProvider;constructor(e,r,t){this.host=e||"https://api.explorer.aleo.org/v1",this.networkClient=new h(this.host),this.keyProvider=r||new f,this.recordProvider=t}setAccount(e){this.account=e}setKeyProvider(e){this.keyProvider=e}setHost(e){this.host=e,this.networkClient.setHost(e)}setRecordProvider(e){this.recordProvider=e}async deploy(e,r,t,i,a,o){try{const r=n.BP.fromString(e);let t;try{t=await this.networkClient.getProgram(r.id())}catch(e){console.log(`Program ${r.id()} does not exist on the network, deploying...`)}if("string"==typeof t)throw`Program ${r.id()} already exists on the network, please rename your program`}catch(e){throw F(`Error validating program: ${e}`)}let s,c=o;if(void 0===o&&void 0!==this.account&&(c=this.account.privateKey()),void 0===c)throw"No private key provided and no private key set in the ProgramManager";try{a=t?await this.getCreditsRecord(r,[],a,i):void 0}catch(e){throw F(`Error finding fee record. Record finder response: '${e}'. Please ensure you're connected to a valid Aleo network and a record with enough balance exists.`)}try{s=t?await this.keyProvider.feePrivateKeys():await this.keyProvider.feePublicKeys()}catch(e){throw F(`Error finding fee keys. Key finder response: '${e}'. Please ensure your key provider is configured correctly.`)}const[u,h]=s;let l;try{l=await this.networkClient.getProgramImports(e)}catch(e){throw F(`Error finding program imports. Network response: '${e}'. Please ensure you're connected to a valid Aleo network and the program is deployed to the network.`)}const f=await n.Ao.buildDeploymentTransaction(c,e,r,a,this.host,l,u,h);return await this.networkClient.submitTransaction(f)}async buildExecutionTransaction(e){const{programName:r,functionName:t,fee:i,privateFee:a,inputs:o,recordSearchParams:s,keySearchParams:c,privateKey:u,offlineQuery:h}=e;let l=e.feeRecord,f=e.provingKey,y=e.verifyingKey,d=e.program,p=e.imports;if(void 0===d)try{d=await this.networkClient.getProgram(r)}catch(e){throw F(`Error finding ${r}. Network response: '${e}'. Please ensure you're connected to a valid Aleo network the program is deployed to the network.`)}else d instanceof n.BP&&(d=d.toString());let v,g=u;if(void 0===u&&void 0!==this.account&&(g=this.account.privateKey()),void 0===g)throw"No private key provided and no private key set in the ProgramManager";try{l=a?await this.getCreditsRecord(i,[],l,s):void 0}catch(e){throw F(`Error finding fee record. Record finder response: '${e}'. Please ensure you're connected to a valid Aleo network and a record with enough balance exists.`)}try{v=a?await this.keyProvider.feePrivateKeys():await this.keyProvider.feePublicKeys()}catch(e){throw F(`Error finding fee keys. Key finder response: '${e}'. Please ensure your key provider is configured correctly.`)}const[b,w]=v;if(!f||!y)try{[f,y]=await this.keyProvider.functionKeys(c)}catch(e){console.log(`Function keys not found. Key finder response: '${e}'. The function keys will be synthesized`)}if(n.BP.fromString(d).getImports().length>0&&!p)try{p=await this.networkClient.getProgramImports(r)}catch(e){throw F(`Error finding program imports. Network response: '${e}'. Please ensure you're connected to a valid Aleo network and the program is deployed to the network.`)}return await n.Ao.buildExecutionTransaction(g,d,t,o,i,l,this.host,p,f,y,b,w,h)}async execute(e){const r=await this.buildExecutionTransaction(e);return await this.networkClient.submitTransaction(r)}async run(e,r,t,i,a,o,s,c,u,h){let l=u;if(void 0===u&&void 0!==this.account&&(l=this.account.privateKey()),void 0===l)throw"No private key provided and no private key set in the ProgramManager";if(!s||!c)try{[s,c]=await this.keyProvider.functionKeys(o)}catch(e){console.log(`Function keys not found. Key finder response: '${e}'. The function keys will be synthesized`)}return console.log("Running program offline"),console.log("Proving key: ",s),console.log("Verifying key: ",c),n.Ao.executeFunctionOffline(l,e,r,t,i,!1,a,s,c,this.host,h)}async join(e,r,t,i,a,o,s,c){let u,h,l=s;if(void 0===s&&void 0!==this.account&&(l=this.account.privateKey()),void 0===l)throw"No private key provided and no private key set in the ProgramManager";try{u=i?await this.keyProvider.feePrivateKeys():await this.keyProvider.feePublicKeys(),h=await this.keyProvider.joinKeys()}catch(e){throw F(`Error finding fee keys. Key finder response: '${e}'. Please ensure your key provider is configured correctly.`)}const[f,y]=u,[d,p]=h;try{o=i?await this.getCreditsRecord(t,[],o,a):void 0}catch(e){throw F(`Error finding fee record. Record finder response: '${e}'. Please ensure you're connected to a valid Aleo network and a record with enough balance exists.`)}try{e=e instanceof n.ZF?e:n.ZF.fromString(e),r=r instanceof n.ZF?r:n.ZF.fromString(r)}catch(e){throw F("Records provided are not valid. Please ensure they are valid plaintext records.")}const v=await n.Ao.buildJoinTransaction(l,e,r,t,o,this.host,d,p,f,y,c);return await this.networkClient.submitTransaction(v)}async split(e,r,t,i){let a,o=t;if(void 0===o&&void 0!==this.account&&(o=this.account.privateKey()),void 0===o)throw"No private key provided and no private key set in the ProgramManager";try{a=await this.keyProvider.splitKeys()}catch(e){throw F(`Error finding fee keys. Key finder response: '${e}'. Please ensure your key provider is configured correctly.`)}const[s,c]=a;try{r=r instanceof n.ZF?r:n.ZF.fromString(r)}catch(e){throw F("Record provided is not valid. Please ensure it is a valid plaintext record.")}const u=await n.Ao.buildSplitTransaction(o,e,r,this.host,s,c,i);return await this.networkClient.submitTransaction(u)}async synthesizeKeys(e,r,t,i){let a,o=i;void 0===o&&(o=void 0!==this.account?this.account.privateKey():new n.ZD);try{a=await this.networkClient.getProgramImports(e);const i=await n.Ao.synthesizeKeyPair(o,e,r,t,a);return[i.provingKey(),i.verifyingKey()]}catch(e){throw F(`Could not synthesize keys - error ${e}. Please ensure the program is valid and the inputs are correct.`)}}async buildTransferTransaction(e,r,t,i,a,o,s,c,u,h){t=P(t);let l,f,y=u;if(void 0===y&&void 0!==this.account&&(y=this.account.privateKey()),void 0===y)throw"No private key provided and no private key set in the ProgramManager";try{l=a?await this.keyProvider.feePrivateKeys():await this.keyProvider.feePublicKeys(),f=await this.keyProvider.transferKeys(t)}catch(e){throw F(`Error finding fee keys. Key finder response: '${e}'. Please ensure your key provider is configured correctly.`)}const[d,p]=l,[v,g]=f;try{const e=[];m(t)?(s=await this.getCreditsRecord(i,[],s,o),e.push(s.nonce())):s=void 0,c=a?await this.getCreditsRecord(i,e,c,o):void 0}catch(e){throw F(`Error finding fee record. Record finder response: '${e}'. Please ensure you're connected to a valid Aleo network and a record with enough balance exists.`)}return await n.Ao.buildTransferTransaction(y,e,r,t,s,i,c,this.host,v,g,d,p,h)}async buildTransferPublicTransaction(e,r,t,i,n){return this.buildTransferTransaction(e,r,"public",t,!1,void 0,void 0,void 0,i,n)}async buildTransferPublicAsSignerTransaction(e,r,t,i,n){return this.buildTransferTransaction(e,r,"public",t,!1,void 0,void 0,void 0,i,n)}async transfer(e,r,t,i,n,a,o,s,c,u){const h=await this.buildTransferTransaction(e,r,t,i,n,a,o,s,c,u);return await this.networkClient.submitTransaction(h)}async buildBondPublicTransaction(e,r,t,i,n={}){const a=Math.trunc(1e6*i),{programName:o="credits.aleo",functionName:s="bond_public",fee:c=n.fee||.86,privateFee:u=!1,inputs:h=[e,r,t,`${a.toString()}u64`],keySearchParams:f=new l({proverUri:k.bond_public.prover,verifierUri:k.bond_public.verifier,cacheKey:"credits.aleo/bond_public"}),program:y=this.creditsProgram(),...d}=n,p={programName:o,functionName:s,fee:c,privateFee:u,inputs:h,keySearchParams:f,...d};return await this.buildExecutionTransaction(p)}async bondPublic(e,r,t,i,n={}){const a=await this.buildBondPublicTransaction(e,r,t,i,n);return await this.networkClient.submitTransaction(a)}async buildBondValidatorTransaction(e,r,t,i,n={}){const a=Math.trunc(1e6*t),o=Math.trunc(i),{programName:s="credits.aleo",functionName:c="bond_validator",fee:u=n.fee||.86,privateFee:h=!1,inputs:f=[e,r,`${a.toString()}u64`,`${o.toString()}u8`],keySearchParams:y=new l({proverUri:k.bond_validator.prover,verifierUri:k.bond_validator.verifier,cacheKey:"credits.aleo/bond_validator"}),program:d=this.creditsProgram(),...p}=n,v={programName:s,functionName:c,fee:u,privateFee:h,inputs:f,keySearchParams:y,...p};return await this.buildExecutionTransaction(v)}async bondValidator(e,r,t,i,n={}){const a=await this.buildBondValidatorTransaction(e,r,t,i,n);return await this.networkClient.submitTransaction(a)}async buildUnbondPublicTransaction(e,r,t={}){const i=Math.trunc(1e6*r),{programName:n="credits.aleo",functionName:a="unbond_public",fee:o=t.fee||1.3,privateFee:s=!1,inputs:c=[e,`${i.toString()}u64`],keySearchParams:u=new l({proverUri:k.unbond_public.prover,verifierUri:k.unbond_public.verifier,cacheKey:"credits.aleo/unbond_public"}),program:h=this.creditsProgram(),...f}=t,y={programName:n,functionName:a,fee:o,privateFee:s,inputs:c,keySearchParams:u,...f};return this.buildExecutionTransaction(y)}async unbondPublic(e,r,t={}){const i=await this.buildUnbondPublicTransaction(e,r,t);return await this.networkClient.submitTransaction(i)}async buildClaimUnbondPublicTransaction(e,r={}){const{programName:t="credits.aleo",functionName:i="claim_unbond_public",fee:n=r.fee||2,privateFee:a=!1,inputs:o=[e],keySearchParams:s=new l({proverUri:k.claim_unbond_public.prover,verifierUri:k.claim_unbond_public.verifier,cacheKey:"credits.aleo/claim_unbond_public"}),program:c=this.creditsProgram(),...u}=r,h={programName:t,functionName:i,fee:n,privateFee:a,inputs:o,keySearchParams:s,...u};return await this.buildExecutionTransaction(h)}async claimUnbondPublic(e,r={}){const t=await this.buildClaimUnbondPublicTransaction(e,r);return await this.networkClient.submitTransaction(t)}async buildSetValidatorStateTransaction(e,r={}){const{programName:t="credits.aleo",functionName:i="set_validator_state",fee:n=1,privateFee:a=!1,inputs:o=[e.toString()],keySearchParams:s=new l({proverUri:k.set_validator_state.prover,verifierUri:k.set_validator_state.verifier,cacheKey:"credits.aleo/set_validator_state"}),...c}=r,u={programName:t,functionName:i,fee:n,privateFee:a,inputs:o,keySearchParams:s,...c};return await this.execute(u)}async setValidatorState(e,r={}){const t=await this.buildSetValidatorStateTransaction(e,r);return this.networkClient.submitTransaction(t)}verifyExecution(e){try{const r=e.getExecution(),t=e.getFunctionId(),i=e.getProgram(),a=e.getVerifyingKey();return(0,n.Yc)(r,a,i,t)}catch(e){return console.warn("The execution was not found in the response, cannot verify the execution"),!1}}createProgramFromSource(e){return n.BP.fromString(e)}creditsProgram(){return n.BP.getCreditsProgram()}verifyProgram(e){try{return n.BP.fromString(e),!0}catch(e){return!1}}async getCreditsRecord(e,r,t,i){try{return t instanceof n.ZF?t:n.ZF.fromString(t)}catch(t){try{const t=this.recordProvider;return await t.findCreditsRecord(e,!0,r,i)}catch(e){throw F(`Error finding fee record. Record finder response: '${e}'. Please ensure you're connected to a valid Aleo network and a record with enough balance exists.`)}}}}function m(e){return E.has(e)}function P(e){return T.has(e)?e:F(`Invalid transfer type '${e}'. Valid transfer types are 'private', 'privateToPublic', 'public', and 'publicToPrivate'.`)}const _=n.OS.baseUrl();function K(e){const r=n.pF[e.verifyingKey];if(!r)throw new Error("Invalid method name: "+e.verifyingKey);return{name:e.name,locator:e.locator,prover:e.prover,verifier:e.verifier,verifyingKey:r}}const k={bond_public:K(n.OS.bond_public()),bond_validator:K(n.OS.bond_validator()),claim_unbond_public:K(n.OS.claim_unbond_public()),fee_private:K(n.OS.fee_private()),fee_public:K(n.OS.fee_public()),inclusion:K(n.OS.inclusion()),join:K(n.OS.join()),set_validator_state:K(n.OS.set_validator_state()),split:K(n.OS.split()),transfer_private:K(n.OS.transfer_private()),transfer_private_to_public:K(n.OS.transfer_private_to_public()),transfer_public:K(n.OS.transfer_public()),transfer_public_as_signer:K(n.OS.transfer_public_as_signer()),transfer_public_to_private:K(n.OS.transfer_public_to_private()),unbond_public:K(n.OS.unbond_public()),getKey:function(e){return this.hasOwnProperty(e)?this[e]:new Error(`Key "${e}" not found.`)}},E=new Set(["transfer_private","private","transferPrivate","transfer_private_to_public","privateToPublic","transferPrivateToPublic"]),T=new Set(["transfer_private","private","transferPrivate","transfer_private_to_public","privateToPublic","transferPrivateToPublic","transfer_public","transfer_public_as_signer","public","public_as_signer","transferPublic","transferPublicAsSigner","transfer_public_to_private","publicToPrivate","publicAsSigner","transferPublicToPrivate"]),S=new Set(["private","transfer_private","transferPrivate"]),C=new Set(["private_to_public","privateToPublic","transfer_private_to_public","transferPrivateToPublic"]),B=new Set(["public","transfer_public","transferPublic"]),R=new Set(["public_as_signer","transfer_public_as_signer","transferPublicAsSigner"]),A=new Set(["public_to_private","publicToPrivate","transfer_public_to_private","transferPublicToPrivate"]);function F(e){throw console.error(e),e}async function V(){console.warn("initializeWasm is deprecated, you no longer need to use it")}i()}catch(U){i(U)}}))}}]); -//# sourceMappingURL=876.bundle.js.map \ No newline at end of file diff --git a/876.bundle.js.map b/876.bundle.js.map deleted file mode 100644 index 20b156d66..000000000 --- a/876.bundle.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"876.bundle.js","mappings":";mHAKA,MAAMA,EAAcC,OAAO,iBACrBC,EAAiBD,OAAO,oBACxBE,EAAeF,OAAO,wBACtBG,EAAYH,OAAO,qBACnBI,EAAcJ,OAAO,kBACrBK,EAAYC,GAAwB,iBAARA,GAA4B,OAARA,GAAgC,mBAARA,EAgDxEC,EAAmB,IAAIC,IAAI,CAC7B,CAAC,QA7CwB,CACzBC,UAAYH,GAAQD,EAASC,IAAQA,EAAIP,GACzC,SAAAW,CAAUC,GACN,MAAM,MAAEC,EAAK,MAAEC,GAAU,IAAIC,eAE7B,OADAC,EAAOJ,EAAKC,GACL,CAACC,EAAO,CAACA,GACpB,EACAG,YAAYC,IACRA,EAAKC,QACEC,EAAKF,MAqChB,CAAC,QA/BwB,CACzBR,UAAYW,GAAUf,EAASe,IAAUhB,KAAegB,EACxD,SAAAV,EAAU,M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A,6BACA,kBACA,iBACA,4BAEEtM,EAAmB,IAAIsM,IAAI,CAC7B,UACA,mBACA,oBAEEpM,EAA6B,IAAIoM,IAAI,CACvC,oBACA,kBACA,6BACA,4BAEElM,EAAkB,IAAIkM,IAAI,CAC5B,SACA,kBACA,mBAEEhM,EAA4B,IAAIgM,IAAI,CACtC,mBACA,4BACA,2BAEE9L,EAA6B,IAAI8L,IAAI,CACvC,oBACA,kBACA,6BACA,4BAGJ,SAASzQ,EAAY1N,GAEjB,MADAiB,QAAQ+B,MAAMhD,GACRA,CACV,CA+BAyI,eAAe2V,IACXnd,QAAQC,KAAK,6DACjB","sources":["webpack://aleo-website/../node_modules/comlink/dist/esm/comlink.mjs","webpack://aleo-website/../src/account.ts","webpack://aleo-website/../src/utils.ts","webpack://aleo-website/../src/network-client.ts","webpack://aleo-website/../src/function-key-provider.ts","webpack://aleo-website/../src/offline-key-provider.ts","webpack://aleo-website/../src/record-provider.ts","webpack://aleo-website/../src/managed-worker.ts","webpack://aleo-website/../src/program-manager.ts","webpack://aleo-website/../src/index.ts"],"sourcesContent":["/**\n * @license\n * Copyright 2019 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\nconst proxyMarker = Symbol(\"Comlink.proxy\");\nconst createEndpoint = Symbol(\"Comlink.endpoint\");\nconst releaseProxy = Symbol(\"Comlink.releaseProxy\");\nconst finalizer = Symbol(\"Comlink.finalizer\");\nconst throwMarker = Symbol(\"Comlink.thrown\");\nconst isObject = (val) => (typeof val === \"object\" && val !== null) || typeof val === \"function\";\n/**\n * Internal transfer handle to handle objects marked to proxy.\n */\nconst proxyTransferHandler = {\n canHandle: (val) => isObject(val) && val[proxyMarker],\n serialize(obj) {\n const { port1, port2 } = new MessageChannel();\n expose(obj, port1);\n return [port2, [port2]];\n },\n deserialize(port) {\n port.start();\n return wrap(port);\n },\n};\n/**\n * Internal transfer handler to handle thrown exceptions.\n */\nconst throwTransferHandler = {\n canHandle: (value) => isObject(value) && throwMarker in value,\n serialize({ value }) {\n let serialized;\n if (value instanceof Error) {\n serialized = {\n isError: true,\n value: {\n message: value.message,\n name: value.name,\n stack: value.stack,\n },\n };\n }\n else {\n serialized = { isError: false, value };\n }\n return [serialized, []];\n },\n deserialize(serialized) {\n if (serialized.isError) {\n throw Object.assign(new Error(serialized.value.message), serialized.value);\n }\n throw serialized.value;\n },\n};\n/**\n * Allows customizing the serialization of certain values.\n */\nconst transferHandlers = new Map([\n [\"proxy\", proxyTransferHandler],\n [\"throw\", throwTransferHandler],\n]);\nfunction isAllowedOrigin(allowedOrigins, origin) {\n for (const allowedOrigin of allowedOrigins) {\n if (origin === allowedOrigin || allowedOrigin === \"*\") {\n return true;\n }\n if (allowedOrigin instanceof RegExp && allowedOrigin.test(origin)) {\n return true;\n }\n }\n return false;\n}\nfunction expose(obj, ep = globalThis, allowedOrigins = [\"*\"]) {\n ep.addEventListener(\"message\", function callback(ev) {\n if (!ev || !ev.data) {\n return;\n }\n if (!isAllowedOrigin(allowedOrigins, ev.origin)) {\n console.warn(`Invalid origin '${ev.origin}' for comlink proxy`);\n return;\n }\n const { id, type, path } = Object.assign({ path: [] }, ev.data);\n const argumentList = (ev.data.argumentList || []).map(fromWireValue);\n let returnValue;\n try {\n const parent = path.slice(0, -1).reduce((obj, prop) => obj[prop], obj);\n const rawValue = path.reduce((obj, prop) => obj[prop], obj);\n switch (type) {\n case \"GET\" /* MessageType.GET */:\n {\n returnValue = rawValue;\n }\n break;\n case \"SET\" /* MessageType.SET */:\n {\n parent[path.slice(-1)[0]] = fromWireValue(ev.data.value);\n returnValue = true;\n }\n break;\n case \"APPLY\" /* MessageType.APPLY */:\n {\n returnValue = rawValue.apply(parent, argumentList);\n }\n break;\n case \"CONSTRUCT\" /* MessageType.CONSTRUCT */:\n {\n const value = new rawValue(...argumentList);\n returnValue = proxy(value);\n }\n break;\n case \"ENDPOINT\" /* MessageType.ENDPOINT */:\n {\n const { port1, port2 } = new MessageChannel();\n expose(obj, port2);\n returnValue = transfer(port1, [port1]);\n }\n break;\n case \"RELEASE\" /* MessageType.RELEASE */:\n {\n returnValue = undefined;\n }\n break;\n default:\n return;\n }\n }\n catch (value) {\n returnValue = { value, [throwMarker]: 0 };\n }\n Promise.resolve(returnValue)\n .catch((value) => {\n return { value, [throwMarker]: 0 };\n })\n .then((returnValue) => {\n const [wireValue, transferables] = toWireValue(returnValue);\n ep.postMessage(Object.assign(Object.assign({}, wireValue), { id }), transferables);\n if (type === \"RELEASE\" /* MessageType.RELEASE */) {\n // detach and deactive after sending release response above.\n ep.removeEventListener(\"message\", callback);\n closeEndPoint(ep);\n if (finalizer in obj && typeof obj[finalizer] === \"function\") {\n obj[finalizer]();\n }\n }\n })\n .catch((error) => {\n // Send Serialization Error To Caller\n const [wireValue, transferables] = toWireValue({\n value: new TypeError(\"Unserializable return value\"),\n [throwMarker]: 0,\n });\n ep.postMessage(Object.assign(Object.assign({}, wireValue), { id }), transferables);\n });\n });\n if (ep.start) {\n ep.start();\n }\n}\nfunction isMessagePort(endpoint) {\n return endpoint.constructor.name === \"MessagePort\";\n}\nfunction closeEndPoint(endpoint) {\n if (isMessagePort(endpoint))\n endpoint.close();\n}\nfunction wrap(ep, target) {\n return createProxy(ep, [], target);\n}\nfunction throwIfProxyReleased(isReleased) {\n if (isReleased) {\n throw new Error(\"Proxy has been released and is not useable\");\n }\n}\nfunction releaseEndpoint(ep) {\n return requestResponseMessage(ep, {\n type: \"RELEASE\" /* MessageType.RELEASE */,\n }).then(() => {\n closeEndPoint(ep);\n });\n}\nconst proxyCounter = new WeakMap();\nconst proxyFinalizers = \"FinalizationRegistry\" in globalThis &&\n new FinalizationRegistry((ep) => {\n const newCount = (proxyCounter.get(ep) || 0) - 1;\n proxyCounter.set(ep, newCount);\n if (newCount === 0) {\n releaseEndpoint(ep);\n }\n });\nfunction registerProxy(proxy, ep) {\n const newCount = (proxyCounter.get(ep) || 0) + 1;\n proxyCounter.set(ep, newCount);\n if (proxyFinalizers) {\n proxyFinalizers.register(proxy, ep, proxy);\n }\n}\nfunction unregisterProxy(proxy) {\n if (proxyFinalizers) {\n proxyFinalizers.unregister(proxy);\n }\n}\nfunction createProxy(ep, path = [], target = function () { }) {\n let isProxyReleased = false;\n const proxy = new Proxy(target, {\n get(_target, prop) {\n throwIfProxyReleased(isProxyReleased);\n if (prop === releaseProxy) {\n return () => {\n unregisterProxy(proxy);\n releaseEndpoint(ep);\n isProxyReleased = true;\n };\n }\n if (prop === \"then\") {\n if (path.length === 0) {\n return { then: () => proxy };\n }\n const r = requestResponseMessage(ep, {\n type: \"GET\" /* MessageType.GET */,\n path: path.map((p) => p.toString()),\n }).then(fromWireValue);\n return r.then.bind(r);\n }\n return createProxy(ep, [...path, prop]);\n },\n set(_target, prop, rawValue) {\n throwIfProxyReleased(isProxyReleased);\n // FIXME: ES6 Proxy Handler `set` methods are supposed to return a\n // boolean. To show good will, we return true asynchronously ¯\\_(ツ)_/¯\n const [value, transferables] = toWireValue(rawValue);\n return requestResponseMessage(ep, {\n type: \"SET\" /* MessageType.SET */,\n path: [...path, prop].map((p) => p.toString()),\n value,\n }, transferables).then(fromWireValue);\n },\n apply(_target, _thisArg, rawArgumentList) {\n throwIfProxyReleased(isProxyReleased);\n const last = path[path.length - 1];\n if (last === createEndpoint) {\n return requestResponseMessage(ep, {\n type: \"ENDPOINT\" /* MessageType.ENDPOINT */,\n }).then(fromWireValue);\n }\n // We just pretend that `bind()` didn’t happen.\n if (last === \"bind\") {\n return createProxy(ep, path.slice(0, -1));\n }\n const [argumentList, transferables] = processArguments(rawArgumentList);\n return requestResponseMessage(ep, {\n type: \"APPLY\" /* MessageType.APPLY */,\n path: path.map((p) => p.toString()),\n argumentList,\n }, transferables).then(fromWireValue);\n },\n construct(_target, rawArgumentList) {\n throwIfProxyReleased(isProxyReleased);\n const [argumentList, transferables] = processArguments(rawArgumentList);\n return requestResponseMessage(ep, {\n type: \"CONSTRUCT\" /* MessageType.CONSTRUCT */,\n path: path.map((p) => p.toString()),\n argumentList,\n }, transferables).then(fromWireValue);\n },\n });\n registerProxy(proxy, ep);\n return proxy;\n}\nfunction myFlat(arr) {\n return Array.prototype.concat.apply([], arr);\n}\nfunction processArguments(argumentList) {\n const processed = argumentList.map(toWireValue);\n return [processed.map((v) => v[0]), myFlat(processed.map((v) => v[1]))];\n}\nconst transferCache = new WeakMap();\nfunction transfer(obj, transfers) {\n transferCache.set(obj, transfers);\n return obj;\n}\nfunction proxy(obj) {\n return Object.assign(obj, { [proxyMarker]: true });\n}\nfunction windowEndpoint(w, context = globalThis, targetOrigin = \"*\") {\n return {\n postMessage: (msg, transferables) => w.postMessage(msg, targetOrigin, transferables),\n addEventListener: context.addEventListener.bind(context),\n removeEventListener: context.removeEventListener.bind(context),\n };\n}\nfunction toWireValue(value) {\n for (const [name, handler] of transferHandlers) {\n if (handler.canHandle(value)) {\n const [serializedValue, transferables] = handler.serialize(value);\n return [\n {\n type: \"HANDLER\" /* WireValueType.HANDLER */,\n name,\n value: serializedValue,\n },\n transferables,\n ];\n }\n }\n return [\n {\n type: \"RAW\" /* WireValueType.RAW */,\n value,\n },\n transferCache.get(value) || [],\n ];\n}\nfunction fromWireValue(value) {\n switch (value.type) {\n case \"HANDLER\" /* WireValueType.HANDLER */:\n return transferHandlers.get(value.name).deserialize(value.value);\n case \"RAW\" /* WireValueType.RAW */:\n return value.value;\n }\n}\nfunction requestResponseMessage(ep, msg, transfers) {\n return new Promise((resolve) => {\n const id = generateUUID();\n ep.addEventListener(\"message\", function l(ev) {\n if (!ev.data || !ev.data.id || ev.data.id !== id) {\n return;\n }\n ep.removeEventListener(\"message\", l);\n resolve(ev.data);\n });\n if (ep.start) {\n ep.start();\n }\n ep.postMessage(Object.assign({ id }, msg), transfers);\n });\n}\nfunction generateUUID() {\n return new Array(4)\n .fill(0)\n .map(() => Math.floor(Math.random() * Number.MAX_SAFE_INTEGER).toString(16))\n .join(\"-\");\n}\n\nexport { createEndpoint, expose, finalizer, proxy, proxyMarker, releaseProxy, transfer, transferHandlers, windowEndpoint, wrap };\n//# sourceMappingURL=comlink.mjs.map\n","import {\n Address,\n PrivateKey,\n Signature,\n ViewKey,\n PrivateKeyCiphertext,\n RecordCiphertext,\n} from \"./index\";\n\ninterface AccountParam {\n privateKey?: string;\n seed?: Uint8Array;\n}\n\n/**\n * Key Management class. Enables the creation of a new Aleo Account, importation of an existing account from\n * an existing private key or seed, and message signing and verification functionality.\n *\n * An Aleo Account is generated from a randomly generated seed (number) from which an account private key, view key,\n * and a public account address are derived. The private key lies at the root of an Aleo account. It is a highly\n * sensitive secret and should be protected as it allows for creation of Aleo Program executions and arbitrary value\n * transfers. The View Key allows for decryption of a user's activity on the blockchain. The Address is the public\n * address to which other users of Aleo can send Aleo credits and other records to. This class should only be used\n * environments where the safety of the underlying key material can be assured.\n *\n * @example\n * // Create a new account\n * const myRandomAccount = new Account();\n *\n * // Create an account from a randomly generated seed\n * const seed = new Uint8Array([94, 91, 52, 251, 240, 230, 226, 35, 117, 253, 224, 210, 175, 13, 205, 120, 155, 214, 7, 169, 66, 62, 206, 50, 188, 40, 29, 122, 40, 250, 54, 18]);\n * const mySeededAccount = new Account({seed: seed});\n *\n * // Create an account from an existing private key\n * const myExistingAccount = new Account({privateKey: 'myExistingPrivateKey'})\n *\n * // Sign a message\n * const hello_world = Uint8Array.from([104, 101, 108, 108, 111 119, 111, 114, 108, 100])\n * const signature = myRandomAccount.sign(hello_world)\n *\n * // Verify a signature\n * myRandomAccount.verify(hello_world, signature)\n */\nexport class Account {\n _privateKey: PrivateKey;\n _viewKey: ViewKey;\n _address: Address;\n\n constructor(params: AccountParam = {}) {\n try {\n this._privateKey = this.privateKeyFromParams(params);\n } catch (e) {\n console.error(\"Wrong parameter\", e);\n throw new Error(\"Wrong Parameter\");\n }\n this._viewKey = ViewKey.from_private_key(this._privateKey);\n this._address = Address.from_private_key(this._privateKey);\n }\n\n /**\n * Attempts to create an account from a private key ciphertext\n * @param {PrivateKeyCiphertext | string} ciphertext\n * @param {string} password\n * @returns {PrivateKey | Error}\n *\n * @example\n * const ciphertext = PrivateKey.newEncrypted(\"password\");\n * const account = Account.fromCiphertext(ciphertext, \"password\");\n */\n public static fromCiphertext(ciphertext: PrivateKeyCiphertext | string, password: string) {\n try {\n ciphertext = (typeof ciphertext === \"string\") ? PrivateKeyCiphertext.fromString(ciphertext) : ciphertext;\n const _privateKey = PrivateKey.fromPrivateKeyCiphertext(ciphertext, password);\n return new Account({ privateKey: _privateKey.to_string() });\n } catch(e) {\n throw new Error(\"Wrong password or invalid ciphertext\");\n }\n }\n\n private privateKeyFromParams(params: AccountParam) {\n if (params.seed) {\n return PrivateKey.from_seed_unchecked(params.seed);\n }\n if (params.privateKey) {\n return PrivateKey.from_string(params.privateKey);\n }\n return new PrivateKey();\n }\n\n privateKey() {\n return this._privateKey;\n }\n\n viewKey() {\n return this._viewKey;\n }\n\n address() {\n return this._address;\n }\n\n toString() {\n return this.address().to_string()\n }\n\n /**\n * Encrypt the account's private key with a password\n * @param {string} ciphertext\n * @returns {PrivateKeyCiphertext}\n *\n * @example\n * const account = new Account();\n * const ciphertext = account.encryptAccount(\"password\");\n */\n encryptAccount(password: string) {\n return this._privateKey.toCiphertext(password);\n }\n\n /**\n * Decrypts a Record in ciphertext form into plaintext\n * @param {string} ciphertext\n * @returns {Record}\n *\n * @example\n * const account = new Account();\n * const record = account.decryptRecord(\"record1ciphertext\");\n */\n decryptRecord(ciphertext: string) {\n return this._viewKey.decrypt(ciphertext);\n }\n\n /**\n * Decrypts an array of Records in ciphertext form into plaintext\n * @param {string[]} ciphertexts\n * @returns {Record[]}\n *\n * @example\n * const account = new Account();\n * const record = account.decryptRecords([\"record1ciphertext\", \"record2ciphertext\"]);\n */\n decryptRecords(ciphertexts: string[]) {\n return ciphertexts.map((ciphertext) => this._viewKey.decrypt(ciphertext));\n }\n\n /**\n * Determines whether the account owns a ciphertext record\n * @param {RecordCipherText | string} ciphertext\n * @returns {boolean}\n *\n * @example\n * // Create a connection to the Aleo network and an account\n * const connection = new NodeConnection(\"vm.aleo.org/api\");\n * const account = Account.fromCiphertext(\"ciphertext\", \"password\");\n *\n * // Get a record from the network\n * const record = connection.getBlock(1234);\n * const recordCipherText = record.transactions[0].execution.transitions[0].id;\n *\n * // Check if the account owns the record\n * if account.ownsRecord(recordCipherText) {\n * // Then one can do something like:\n * // Decrypt the record and check if it's spent\n * // Store the record in a local database\n * // Etc.\n * }\n */\n ownsRecordCiphertext(ciphertext: RecordCiphertext | string) {\n if (typeof ciphertext === 'string') {\n try {\n const ciphertextObject = RecordCiphertext.fromString(ciphertext);\n return ciphertextObject.isOwner(this._viewKey);\n }\n catch (e) {\n return false;\n }\n }\n else {\n return ciphertext.isOwner(this._viewKey);\n }\n }\n\n /**\n * Signs a message with the account's private key.\n * Returns a Signature.\n *\n * @param {Uint8Array} message\n * @returns {Signature}\n *\n * @example\n * const account = new Account();\n * const message = Uint8Array.from([104, 101, 108, 108, 111 119, 111, 114, 108, 100])\n * account.sign(message);\n */\n sign(message: Uint8Array) {\n return this._privateKey.sign(message);\n }\n\n /**\n * Verifies the Signature on a message.\n *\n * @param {Uint8Array} message\n * @param {Signature} signature\n * @returns {boolean}\n *\n * @example\n * const account = new Account();\n * const message = Uint8Array.from([104, 101, 108, 108, 111 119, 111, 114, 108, 100])\n * const signature = account.sign(message);\n * account.verify(message, signature);\n */\n verify(message: Uint8Array, signature: Signature) {\n return this._address.verify(message, signature);\n }\n\n}\n","export async function get(url: URL | string, options?: RequestInit) {\n const response = await fetch(url, options);\n\n if (!response.ok) {\n throw new Error(response.status + \" could not get URL \" + url);\n }\n\n return response;\n}\n\n\nexport async function post(url: URL | string, options: RequestInit) {\n options.method = \"POST\";\n\n const response = await fetch(url, options);\n\n if (!response.ok) {\n throw new Error(response.status + \" could not post URL \" + url);\n }\n\n return response;\n}\n","import { get, post } from \"./utils\";\nimport {\n Account,\n Block,\n RecordCiphertext,\n Program,\n RecordPlaintext,\n PrivateKey,\n Transaction,\n TransactionModel,\n logAndThrow\n} from \"./index\";\n\ntype ProgramImports = { [key: string]: string | Program };\n\ninterface AleoNetworkClientOptions {\n headers?: { [key: string]: string };\n}\n\n/**\n * Client library that encapsulates REST calls to publicly exposed endpoints of Aleo nodes. The methods provided in this\n * allow users to query public information from the Aleo blockchain and submit transactions to the network.\n *\n * @param {string} host\n * @example\n * // Connection to a local node\n * const localNetworkClient = new AleoNetworkClient(\"http://localhost:3030\");\n *\n * // Connection to a public beacon node\n * const publicnetworkClient = new AleoNetworkClient(\"https://api.explorer.aleo.org/v1\");\n */\nclass AleoNetworkClient {\n host: string;\n headers: { [key: string]: string };\n account: Account | undefined;\n\n constructor(host: string, options?: AleoNetworkClientOptions) {\n this.host = host + \"/testnet\";\n\n if (options && options.headers) {\n this.headers = options.headers;\n\n } else {\n this.headers = {\n // This is replaced by the actual version by a Rollup plugin\n \"X-Aleo-SDK-Version\": \"%%VERSION%%\",\n };\n }\n }\n\n /**\n * Set an account to use in networkClient calls\n *\n * @param {Account} account\n * @example\n * const account = new Account();\n * networkClient.setAccount(account);\n */\n setAccount(account: Account) {\n this.account = account;\n }\n\n /**\n * Return the Aleo account used in the networkClient\n *\n * @example\n * const account = networkClient.getAccount();\n */\n getAccount(): Account | undefined {\n return this.account;\n }\n\n /**\n * Set a new host for the networkClient\n *\n * @param {string} host The address of a node hosting the Aleo API\n * @param host\n */\n setHost(host: string) {\n this.host = host + \"/testnet\";\n }\n\n async fetchData(\n url = \"/\",\n ): Promise {\n try {\n const response = await get(this.host + url, {\n headers: this.headers\n });\n\n return await response.json();\n } catch (error) {\n throw new Error(\"Error fetching data.\");\n }\n }\n\n /**\n * Attempts to find unspent records in the Aleo blockchain for a specified private key\n * @param {number} startHeight - The height at which to start searching for unspent records\n * @param {number} endHeight - The height at which to stop searching for unspent records\n * @param {string | PrivateKey} privateKey - The private key to use to find unspent records\n * @param {number[]} amounts - The amounts (in microcredits) to search for (eg. [100, 200, 3000])\n * @param {number} maxMicrocredits - The maximum number of microcredits to search for\n * @param {string[]} nonces - The nonces of already found records to exclude from the search\n *\n * @example\n * // Find all unspent records\n * const privateKey = \"[PRIVATE_KEY]\";\n * const records = networkClient.findUnspentRecords(0, undefined, privateKey);\n *\n * // Find specific amounts\n * const startHeight = 500000;\n * const amounts = [600000, 1000000];\n * const records = networkClient.findUnspentRecords(startHeight, undefined, privateKey, amounts);\n *\n * // Find specific amounts with a maximum number of cumulative microcredits\n * const maxMicrocredits = 100000;\n * const records = networkClient.findUnspentRecords(startHeight, undefined, privateKey, undefined, maxMicrocredits);\n */\n async findUnspentRecords(\n startHeight: number,\n endHeight: number | undefined,\n privateKey: string | PrivateKey | undefined,\n amounts: number[] | undefined,\n maxMicrocredits?: number | undefined,\n nonces?: string[] | undefined,\n ): Promise | Error> {\n nonces = nonces || [];\n // Ensure start height is not negative\n if (startHeight < 0) {\n throw new Error(\"Start height must be greater than or equal to 0\");\n }\n\n // Initialize search parameters\n const records = new Array();\n let start;\n let end;\n let resolvedPrivateKey: PrivateKey;\n let failures = 0;\n let totalRecordValue = BigInt(0);\n let latestHeight: number;\n\n // Ensure a private key is present to find owned records\n if (typeof privateKey === \"undefined\") {\n if (typeof this.account === \"undefined\") {\n throw new Error(\"Private key must be specified in an argument to findOwnedRecords or set in the AleoNetworkClient\");\n } else {\n resolvedPrivateKey = this.account._privateKey;\n }\n } else {\n try {\n resolvedPrivateKey = privateKey instanceof PrivateKey ? privateKey : PrivateKey.from_string(privateKey);\n } catch (error) {\n throw new Error(\"Error parsing private key provided.\");\n }\n }\n const viewKey = resolvedPrivateKey.to_view_key();\n\n // Get the latest height to ensure the range being searched is valid\n try {\n const blockHeight = await this.getLatestHeight();\n if (typeof blockHeight === \"number\") {\n latestHeight = blockHeight;\n } else {\n throw new Error(\"Error fetching latest block height.\");\n }\n } catch (error) {\n throw new Error(\"Error fetching latest block height.\");\n }\n\n // If no end height is specified or is greater than the latest height, set the end height to the latest height\n if (typeof endHeight === \"number\" && endHeight <= latestHeight) {\n end = endHeight\n } else {\n end = latestHeight;\n }\n\n // If the starting is greater than the ending height, return an error\n if (startHeight > end) {\n throw new Error(\"Start height must be less than or equal to end height.\");\n }\n\n // Iterate through blocks in reverse order in chunks of 50\n while (end > startHeight) {\n start = end - 50;\n if (start < startHeight) {\n start = startHeight;\n }\n try {\n // Get 50 blocks (or the difference between the start and end if less than 50)\n const blocks = await this.getBlockRange(start, end);\n end = start;\n if (!(blocks instanceof Error)) {\n // Iterate through blocks to find unspent records\n for (let i = 0; i < blocks.length; i++) {\n const block = blocks[i];\n const transactions = block.transactions;\n if (!(typeof transactions === \"undefined\")) {\n for (let j = 0; j < transactions.length; j++) {\n const confirmedTransaction = transactions[j];\n // Search for unspent records in execute transactions of credits.aleo\n if (confirmedTransaction.type == \"execute\") {\n const transaction = confirmedTransaction.transaction;\n if (transaction.execution && !(typeof transaction.execution.transitions == \"undefined\")) {\n for (let k = 0; k < transaction.execution.transitions.length; k++) {\n const transition = transaction.execution.transitions[k];\n // Only search for unspent records in credits.aleo (for now)\n if (transition.program !== \"credits.aleo\") {\n continue;\n }\n if (!(typeof transition.outputs == \"undefined\")) {\n for (let l = 0; l < transition.outputs.length; l++) {\n const output = transition.outputs[l];\n if (output.type === \"record\") {\n try {\n // Create a wasm record ciphertext object from the found output\n const record = RecordCiphertext.fromString(output.value);\n // Determine if the record is owned by the specified view key\n if (record.isOwner(viewKey)) {\n // Decrypt the record and get the serial number\n const recordPlaintext = record.decrypt(viewKey);\n\n // If the record has already been found, skip it\n const nonce = recordPlaintext.nonce();\n if (nonces.includes(nonce)) {\n continue;\n }\n\n // Otherwise record the nonce that has been found\n const serialNumber = recordPlaintext.serialNumberString(resolvedPrivateKey, \"credits.aleo\", \"credits\");\n // Attempt to see if the serial number is spent\n try {\n await this.getTransitionId(serialNumber);\n } catch (error) {\n // If it's not found, add it to the list of unspent records\n if (!amounts) {\n records.push(recordPlaintext);\n // If the user specified a maximum number of microcredits, check if the search has found enough\n if (typeof maxMicrocredits === \"number\") {\n totalRecordValue += recordPlaintext.microcredits();\n // Exit if the search has found the amount specified\n if (totalRecordValue >= BigInt(maxMicrocredits)) {\n return records;\n }\n }\n }\n // If the user specified a list of amounts, check if the search has found them\n if (!(typeof amounts === \"undefined\") && amounts.length > 0) {\n let amounts_found = 0;\n if (recordPlaintext.microcredits() > amounts[amounts_found]) {\n amounts_found += 1;\n records.push(recordPlaintext);\n // If the user specified a maximum number of microcredits, check if the search has found enough\n if (typeof maxMicrocredits === \"number\") {\n totalRecordValue += recordPlaintext.microcredits();\n // Exit if the search has found the amount specified\n if (totalRecordValue >= BigInt(maxMicrocredits)) {\n return records;\n }\n }\n if (records.length >= amounts.length) {\n return records;\n }\n }\n }\n }\n }\n } catch (error) {\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n } catch (error) {\n // If there is an error fetching blocks, log it and keep searching\n console.warn(\"Error fetching blocks in range: \" + start.toString() + \"-\" + end.toString());\n console.warn(\"Error: \", error);\n failures += 1;\n if (failures > 10) {\n console.warn(\"10 failures fetching records reached. Returning records fetched so far\");\n return records;\n }\n }\n }\n return records;\n }\n\n /**\n * Returns the contents of the block at the specified block height\n *\n * @param {number} height\n * @example\n * const block = networkClient.getBlock(1234);\n */\n async getBlock(height: number): Promise {\n try {\n const block = await this.fetchData(\"/block/\" + height);\n return block;\n } catch (error) {\n throw new Error(\"Error fetching block.\");\n }\n }\n\n /**\n * Returns a range of blocks between the specified block heights\n *\n * @param {number} start\n * @param {number} end\n * @example\n * const blockRange = networkClient.getBlockRange(2050, 2100);\n */\n async getBlockRange(start: number, end: number): Promise | Error> {\n try {\n return await this.fetchData>(\"/blocks?start=\" + start + \"&end=\" + end);\n } catch (error) {\n const errorMessage = \"Error fetching blocks between \" + start + \" and \" + end + \".\"\n throw new Error(errorMessage);\n }\n }\n\n /**\n * Returns the deployment transaction id associated with the specified program\n *\n * @param {Program | string} program\n * @returns {TransactionModel | Error}\n */\n async getDeploymentTransactionIDForProgram(program: Program | string): Promise {\n if (program instanceof Program) {\n program = program.toString();\n }\n try {\n const id = await this.fetchData(\"/find/transactionID/deployment/\" + program);\n return id.replace(\"\\\"\", \"\")\n } catch (error) {\n throw new Error(\"Error fetching deployment transaction for program.\");\n }\n }\n\n /**\n * Returns the deployment transaction associated with a specified program\n *\n * @param {Program | string} program\n * @returns {TransactionModel | Error}\n */\n async getDeploymentTransactionForProgram(program: Program | string): Promise {\n try {\n const transaction_id = await this.getDeploymentTransactionIDForProgram(program);\n return await this.getTransaction(transaction_id);\n } catch (error) {\n throw new Error(\"Error fetching deployment transaction for program.\");\n }\n }\n\n /**\n * Returns the contents of the latest block\n *\n * @example\n * const latestHeight = networkClient.getLatestBlock();\n */\n async getLatestBlock(): Promise {\n try {\n return await this.fetchData(\"/latest/block\") as Block;\n } catch (error) {\n throw new Error(\"Error fetching latest block.\");\n }\n }\n\n /**\n * Returns the latest committee\n *\n * @returns {Promise} A javascript object containing the latest committee\n */\n async getLatestCommittee(): Promise {\n try {\n return await this.fetchData(\"/committee/latest\");\n } catch (error) {\n throw new Error(\"Error fetching latest block.\");\n }\n }\n\n /**\n * Returns the latest block height\n *\n * @example\n * const latestHeight = networkClient.getLatestHeight();\n */\n async getLatestHeight(): Promise {\n try {\n return await this.fetchData(\"/latest/height\");\n } catch (error) {\n throw new Error(\"Error fetching latest height.\");\n }\n }\n\n /**\n * Returns the source code of a program given a program ID\n *\n * @param {string} programId The program ID of a program deployed to the Aleo Network\n * @return {Promise} Source code of the program\n *\n * @example\n * const program = networkClient.getProgram(\"hello_hello.aleo\");\n * const expectedSource = \"program hello_hello.aleo;\\n\\nfunction hello:\\n input r0 as u32.public;\\n input r1 as u32.private;\\n add r0 r1 into r2;\\n output r2 as u32.private;\\n\"\n * assert.equal(program, expectedSource);\n */\n async getProgram(programId: string): Promise {\n try {\n return await this.fetchData(\"/program/\" + programId)\n } catch (error) {\n throw new Error(\"Error fetching program\");\n }\n }\n\n /**\n * Returns a program object from a program ID or program source code\n *\n * @param {string} inputProgram The program ID or program source code of a program deployed to the Aleo Network\n * @return {Promise} Source code of the program\n *\n * @example\n * const programID = \"hello_hello.aleo\";\n * const programSource = \"program hello_hello.aleo;\\n\\nfunction hello:\\n input r0 as u32.public;\\n input r1 as u32.private;\\n add r0 r1 into r2;\\n output r2 as u32.private;\\n\"\n *\n * // Get program object from program ID or program source code\n * const programObjectFromID = await networkClient.getProgramObject(programID);\n * const programObjectFromSource = await networkClient.getProgramObject(programSource);\n *\n * // Both program objects should be equal\n * assert.equal(programObjectFromID.to_string(), programObjectFromSource.to_string());\n */\n async getProgramObject(inputProgram: string): Promise {\n try {\n return Program.fromString(inputProgram);\n } catch (error) {\n try {\n return Program.fromString((await this.getProgram(inputProgram)));\n } catch (error) {\n throw new Error(`${inputProgram} is neither a program name or a valid program`);\n }\n }\n }\n\n /**\n * Returns an object containing the source code of a program and the source code of all programs it imports\n *\n * @param {Program | string} inputProgram The program ID or program source code of a program deployed to the Aleo Network\n * @returns {Promise} Object of the form { \"program_id\": \"program_source\", .. } containing program id & source code for all program imports\n *\n * @example\n * const double_test_source = \"import multiply_test.aleo;\\n\\nprogram double_test.aleo;\\n\\nfunction double_it:\\n input r0 as u32.private;\\n call multiply_test.aleo/multiply 2u32 r0 into r1;\\n output r1 as u32.private;\\n\"\n * const double_test = Program.fromString(double_test_source);\n * const expectedImports = {\n * \"multiply_test.aleo\": \"program multiply_test.aleo;\\n\\nfunction multiply:\\n input r0 as u32.public;\\n input r1 as u32.private;\\n mul r0 r1 into r2;\\n output r2 as u32.private;\\n\"\n * }\n *\n * // Imports can be fetched using the program ID, source code, or program object\n * let programImports = await networkClient.getProgramImports(\"double_test.aleo\");\n * assert.deepStrictEqual(programImports, expectedImports);\n *\n * // Using the program source code\n * programImports = await networkClient.getProgramImports(double_test_source);\n * assert.deepStrictEqual(programImports, expectedImports);\n *\n * // Using the program object\n * programImports = await networkClient.getProgramImports(double_test);\n * assert.deepStrictEqual(programImports, expectedImports);\n */\n async getProgramImports(inputProgram: Program | string): Promise {\n try {\n const imports: ProgramImports = {};\n\n // Get the program object or fail if the program is not valid or does not exist\n const program = inputProgram instanceof Program ? inputProgram : (await this.getProgramObject(inputProgram));\n\n // Get the list of programs that the program imports\n const importList = program.getImports();\n\n // Recursively get any imports that the imported programs have in a depth first search order\n for (let i = 0; i < importList.length; i++) {\n const import_id = importList[i];\n if (!imports.hasOwnProperty(import_id)) {\n const programSource = await this.getProgram(import_id);\n const nestedImports = await this.getProgramImports(import_id);\n for (const key in nestedImports) {\n if (!imports.hasOwnProperty(key)) {\n imports[key] = nestedImports[key];\n }\n }\n imports[import_id] = programSource;\n }\n }\n return imports;\n } catch (error) {\n throw logAndThrow(\"Error fetching program imports: \" + error)\n }\n }\n\n /**\n * Get a list of the program names that a program imports\n *\n * @param {Program | string} inputProgram - The program id or program source code to get the imports of\n * @returns {string[]} - The list of program names that the program imports\n *\n * @example\n * const programImportsNames = networkClient.getProgramImports(\"double_test.aleo\");\n * const expectedImportsNames = [\"multiply_test.aleo\"];\n * assert.deepStrictEqual(programImportsNames, expectedImportsNames);\n */\n async getProgramImportNames(inputProgram: Program | string): Promise {\n try {\n const program = inputProgram instanceof Program ? inputProgram : (await this.getProgramObject(inputProgram));\n return program.getImports();\n } catch (error) {\n throw new Error(\"Error fetching program imports with error: \" + error);\n }\n }\n\n /**\n * Returns the names of the mappings of a program\n *\n * @param {string} programId - The program ID to get the mappings of (e.g. \"credits.aleo\")\n * @example\n * const mappings = networkClient.getProgramMappingNames(\"credits.aleo\");\n * const expectedMappings = [\"account\"];\n * assert.deepStrictEqual(mappings, expectedMappings);\n */\n async getProgramMappingNames(programId: string): Promise | Error> {\n try {\n return await this.fetchData>(\"/program/\" + programId + \"/mappings\")\n } catch (error) {\n throw new Error(\"Error fetching program mappings - ensure the program exists on chain before trying again\");\n }\n }\n\n /**\n * Returns the value of a program's mapping for a specific key\n *\n * @param {string} programId - The program ID to get the mapping value of (e.g. \"credits.aleo\")\n * @param {string} mappingName - The name of the mapping to get the value of (e.g. \"account\")\n * @param {string} key - The key of the mapping to get the value of (e.g. \"aleo1rhgdu77hgyqd3xjj8ucu3jj9r2krwz6mnzyd80gncr5fxcwlh5rsvzp9px\")\n * @return {Promise} String representation of the value of the mapping\n *\n * @example\n * // Get public balance of an account\n * const mappingValue = networkClient.getMappingValue(\"credits.aleo\", \"account\", \"aleo1rhgdu77hgyqd3xjj8ucu3jj9r2krwz6mnzyd80gncr5fxcwlh5rsvzp9px\");\n * const expectedValue = \"0u64\";\n * assert.equal(mappingValue, expectedValue);\n */\n async getProgramMappingValue(programId: string, mappingName: string, key: string): Promise {\n try {\n return await this.fetchData(\"/program/\" + programId + \"/mapping/\" + mappingName + \"/\" + key)\n } catch (error) {\n throw new Error(\"Error fetching mapping value - ensure the mapping exists and the key is correct\");\n }\n }\n\n /**\n * Returns the latest state/merkle root of the Aleo blockchain\n *\n * @example\n * const stateRoot = networkClient.getStateRoot();\n */\n async getStateRoot(): Promise {\n try {\n return await this.fetchData(\"/latest/stateRoot\");\n } catch (error) {\n throw new Error(\"Error fetching Aleo state root\");\n }\n }\n\n /**\n * Returns a transaction by its unique identifier\n *\n * @param {string} id\n * @example\n * const transaction = networkClient.getTransaction(\"at1handz9xjrqeynjrr0xay4pcsgtnczdksz3e584vfsgaz0dh0lyxq43a4wj\");\n */\n async getTransaction(id: string): Promise {\n try {\n return await this.fetchData(\"/transaction/\" + id);\n } catch (error) {\n throw new Error(\"Error fetching transaction.\");\n }\n }\n\n /**\n * Returns the transactions present at the specified block height\n *\n * @param {number} height\n * @example\n * const transactions = networkClient.getTransactions(654);\n */\n async getTransactions(height: number): Promise | Error> {\n try {\n return await this.fetchData>(\"/block/\" + height.toString() + \"/transactions\");\n } catch (error) {\n throw new Error(\"Error fetching transactions.\");\n }\n }\n\n /**\n * Returns the transactions in the memory pool.\n *\n * @example\n * const transactions = networkClient.getTransactionsInMempool();\n */\n async getTransactionsInMempool(): Promise | Error> {\n try {\n return await this.fetchData>(\"/memoryPool/transactions\");\n } catch (error) {\n throw new Error(\"Error fetching transactions from mempool.\");\n }\n }\n\n /**\n * Returns the transition ID of the transition corresponding to the ID of the input or output.\n * @param {string} inputOrOutputID - ID of the input or output.\n *\n * @example\n * const transitionId = networkClient.getTransitionId(\"2429232855236830926144356377868449890830704336664550203176918782554219952323field\");\n */\n async getTransitionId(inputOrOutputID: string): Promise {\n try {\n return await this.fetchData(\"/find/transitionID/\" + inputOrOutputID);\n } catch (error) {\n throw new Error(\"Error fetching transition ID.\");\n }\n }\n\n /**\n * Submit an execute or deployment transaction to the Aleo network\n *\n * @param {Transaction | string} transaction - The transaction to submit to the network\n * @returns {string | Error} - The transaction id of the submitted transaction or the resulting error\n */\n async submitTransaction(transaction: Transaction | string): Promise {\n const transaction_string = transaction instanceof Transaction ? transaction.toString() : transaction;\n try {\n const response = await post(this.host + \"/transaction/broadcast\", {\n body: transaction_string,\n headers: Object.assign({}, this.headers, {\n \"Content-Type\": \"application/json\",\n }),\n });\n\n try {\n return await response.json();\n\n } catch (error) {\n throw new Error(`Error posting transaction. Aleo network response: ${(error as Error).message}`);\n }\n } catch (error) {\n throw new Error(`Error posting transaction: No response received: ${(error as Error).message}`);\n }\n }\n}\n\nexport { AleoNetworkClient, AleoNetworkClientOptions, ProgramImports }\n","import {\n ProvingKey,\n VerifyingKey,\n CREDITS_PROGRAM_KEYS,\n KEY_STORE,\n Key,\n PRIVATE_TRANSFER,\n PRIVATE_TO_PUBLIC_TRANSFER,\n PUBLIC_TRANSFER,\n PUBLIC_TO_PRIVATE_TRANSFER,\n PUBLIC_TRANSFER_AS_SIGNER\n} from \"./index\";\nimport { get } from \"./utils\";\n\ntype FunctionKeyPair = [ProvingKey, VerifyingKey];\ntype CachedKeyPair = [Uint8Array, Uint8Array];\ntype AleoKeyProviderInitParams = {\n proverUri?: string;\n verifierUri?: string;\n cacheKey?: string;\n};\n\n/**\n * Interface for record search parameters. This allows for arbitrary search parameters to be passed to record provider\n * implementations.\n */\ninterface KeySearchParams {\n [key: string]: any; // This allows for arbitrary keys with any type values\n}\n\n/**\n * AleoKeyProviderParams search parameter for the AleoKeyProvider. It allows for the specification of a proverUri and\n * verifierUri to fetch keys via HTTP from a remote resource as well as a unique cacheKey to store the keys in memory.\n */\nclass AleoKeyProviderParams implements KeySearchParams {\n name: string | undefined;\n proverUri: string | undefined;\n verifierUri: string | undefined;\n cacheKey: string | undefined;\n\n /**\n * Create a new AleoKeyProviderParams object which implements the KeySearchParams interface. Users can optionally\n * specify a url for the proverUri & verifierUri to fetch keys via HTTP from a remote resource as well as a unique\n * cacheKey to store the keys in memory for future use. If no proverUri or verifierUri is specified, a cachekey must\n * be provided.\n *\n * @param { AleoKeyProviderInitParams } params - Optional search parameters\n */\n constructor(params: {proverUri?: string, verifierUri?: string, cacheKey?: string, name?: string}) {\n this.proverUri = params.proverUri;\n this.verifierUri = params.verifierUri;\n this.cacheKey = params.cacheKey;\n this.name = params.name;\n }\n}\n\n/**\n * KeyProvider interface. Enables the retrieval of public proving and verifying keys for Aleo Programs.\n */\ninterface FunctionKeyProvider {\n /**\n * Get bond_public function keys from the credits.aleo program\n *\n * @returns {Promise} Proving and verifying keys for the bond_public function\n */\n bondPublicKeys(): Promise;\n\n /**\n * Get bond_validator function keys from the credits.aleo program\n *\n * @returns {Promise} Proving and verifying keys for the bond_validator function\n */\n bondValidatorKeys(): Promise;\n\n /**\n * Cache a set of keys. This will overwrite any existing keys with the same keyId. The user can check if a keyId\n * exists in the cache using the containsKeys method prior to calling this method if overwriting is not desired.\n *\n * @param {string} keyId access key for the cache\n * @param {FunctionKeyPair} keys keys to cache\n */\n cacheKeys(keyId: string, keys: FunctionKeyPair): void;\n\n /**\n * Get unbond_public function keys from the credits.aleo program\n *\n * @returns {Promise} Proving and verifying keys for the unbond_public function\n */\n claimUnbondPublicKeys(): Promise;\n\n /**\n * Get arbitrary function keys from a provider\n *\n * @param {KeySearchParams | undefined} params - Optional search parameters for the key provider\n * @returns {Promise} Proving and verifying keys for the specified program\n *\n * @example\n * // Create a search object which implements the KeySearchParams interface\n * class IndexDbSearch implements KeySearchParams {\n * db: string\n * keyId: string\n * constructor(params: {db: string, keyId: string}) {\n * this.db = params.db;\n * this.keyId = params.keyId;\n * }\n * }\n *\n * // Create a new object which implements the KeyProvider interface\n * class IndexDbKeyProvider implements FunctionKeyProvider {\n * async functionKeys(params: KeySearchParams): Promise {\n * return new Promise((resolve, reject) => {\n * const request = indexedDB.open(params.db, 1);\n *\n * request.onupgradeneeded = function(e) {\n * const db = e.target.result;\n * if (!db.objectStoreNames.contains('keys')) {\n * db.createObjectStore('keys', { keyPath: 'id' });\n * }\n * };\n *\n * request.onsuccess = function(e) {\n * const db = e.target.result;\n * const transaction = db.transaction([\"keys\"], \"readonly\");\n * const store = transaction.objectStore(\"keys\");\n * const request = store.get(params.keyId);\n * request.onsuccess = function(e) {\n * if (request.result) {\n * resolve(request.result as FunctionKeyPair);\n * } else {\n * reject(new Error(\"Key not found\"));\n * }\n * };\n * request.onerror = function(e) { reject(new Error(\"Error fetching key\")); };\n * };\n *\n * request.onerror = function(e) { reject(new Error(\"Error opening database\")); };\n * });\n * }\n *\n * // implement the other methods...\n * }\n *\n *\n * const keyProvider = new AleoKeyProvider();\n * const networkClient = new AleoNetworkClient(\"https://api.explorer.aleo.org/v1\");\n * const recordProvider = new NetworkRecordProvider(account, networkClient);\n *\n * // Initialize a program manager with the key provider to automatically fetch keys for value transfers\n * const programManager = new ProgramManager(\"https://api.explorer.aleo.org/v1\", keyProvider, recordProvider);\n * programManager.transfer(1, \"aleo166q6ww6688cug7qxwe7nhctjpymydwzy2h7rscfmatqmfwnjvggqcad0at\", \"public\", 0.5);\n *\n * // Keys can also be fetched manually\n * const searchParams = new IndexDbSearch({db: \"keys\", keyId: \"credits.aleo:transferPrivate\"});\n * const [transferPrivateProvingKey, transferPrivateVerifyingKey] = await keyProvider.functionKeys(searchParams);\n */\n functionKeys(params?: KeySearchParams): Promise;\n\n /**\n * Get fee_private function keys from the credits.aleo program\n *\n * @returns {Promise} Proving and verifying keys for the join function\n */\n feePrivateKeys(): Promise;\n\n /**\n * Get fee_public function keys from the credits.aleo program\n *\n * @returns {Promise} Proving and verifying keys for the join function\n */\n feePublicKeys(): Promise;\n\n /**\n * Get join function keys from the credits.aleo program\n *\n * @returns {Promise} Proving and verifying keys for the join function\n */\n joinKeys(): Promise;\n\n /**\n * Get split function keys from the credits.aleo program\n *\n * @returns {Promise} Proving and verifying keys for the join function\n */\n splitKeys(): Promise;\n\n /**\n * Get keys for a variant of the transfer function from the credits.aleo program\n *\n * @param {string} visibility Visibility of the transfer function (private, public, privateToPublic, publicToPrivate)\n * @returns {Promise} Proving and verifying keys for the specified transfer function\n *\n * @example\n * // Create a new object which implements the KeyProvider interface\n * const networkClient = new AleoNetworkClient(\"https://api.explorer.aleo.org/v1\");\n * const keyProvider = new AleoKeyProvider();\n * const recordProvider = new NetworkRecordProvider(account, networkClient);\n *\n * // Initialize a program manager with the key provider to automatically fetch keys for value transfers\n * const programManager = new ProgramManager(\"https://api.explorer.aleo.org/v1\", keyProvider, recordProvider);\n * programManager.transfer(1, \"aleo166q6ww6688cug7qxwe7nhctjpymydwzy2h7rscfmatqmfwnjvggqcad0at\", \"public\", 0.5);\n *\n * // Keys can also be fetched manually\n * const [transferPublicProvingKey, transferPublicVerifyingKey] = await keyProvider.transferKeys(\"public\");\n */\n transferKeys(visibility: string): Promise;\n\n /**\n * Get unbond_public function keys from the credits.aleo program\n *\n * @returns {Promise} Proving and verifying keys for the join function\n */\n unBondPublicKeys(): Promise;\n\n}\n\n\n/**\n * AleoKeyProvider class. Implements the KeyProvider interface. Enables the retrieval of Aleo program proving and\n * verifying keys for the credits.aleo program over http from official Aleo sources and storing and retrieving function\n * keys from a local memory cache.\n */\nclass AleoKeyProvider implements FunctionKeyProvider {\n cache: Map;\n cacheOption: boolean;\n keyUris: string;\n\n async fetchBytes(\n url = \"/\",\n ): Promise {\n try {\n const response = await get(url);\n const data = await response.arrayBuffer();\n return new Uint8Array(data);\n } catch (error) {\n throw new Error(\"Error fetching data.\" + error);\n }\n }\n\n constructor() {\n this.keyUris = KEY_STORE;\n this.cache = new Map();\n this.cacheOption = false;\n }\n\n /**\n * Use local memory to store keys\n *\n * @param {boolean} useCache whether to store keys in local memory\n */\n useCache(useCache: boolean) {\n this.cacheOption = useCache;\n }\n\n /**\n * Clear the key cache\n */\n clearCache() {\n this.cache.clear();\n }\n\n /**\n * Cache a set of keys. This will overwrite any existing keys with the same keyId. The user can check if a keyId\n * exists in the cache using the containsKeys method prior to calling this method if overwriting is not desired.\n *\n * @param {string} keyId access key for the cache\n * @param {FunctionKeyPair} keys keys to cache\n */\n cacheKeys(keyId: string, keys: FunctionKeyPair) {\n const [provingKey, verifyingKey] = keys;\n this.cache.set(keyId, [provingKey.toBytes(), verifyingKey.toBytes()]);\n }\n\n /**\n * Determine if a keyId exists in the cache\n *\n * @param {string} keyId keyId of a proving and verifying key pair\n * @returns {boolean} true if the keyId exists in the cache, false otherwise\n */\n containsKeys(keyId: string): boolean {\n return this.cache.has(keyId)\n }\n\n /**\n * Delete a set of keys from the cache\n *\n * @param {string} keyId keyId of a proving and verifying key pair to delete from memory\n * @returns {boolean} true if the keyId exists in the cache and was deleted, false if the key did not exist\n */\n deleteKeys(keyId: string): boolean {\n return this.cache.delete(keyId)\n }\n\n /**\n * Get a set of keys from the cache\n * @param keyId keyId of a proving and verifying key pair\n *\n * @returns {FunctionKeyPair | Error} Proving and verifying keys for the specified program\n */\n getKeys(keyId: string): FunctionKeyPair | Error {\n console.debug(`Checking if key exists in cache. KeyId: ${keyId}`)\n if (this.cache.has(keyId)) {\n const [provingKeyBytes, verifyingKeyBytes] = this.cache.get(keyId);\n return [ProvingKey.fromBytes(provingKeyBytes), VerifyingKey.fromBytes(verifyingKeyBytes)];\n } else {\n return new Error(\"Key not found in cache.\");\n }\n }\n\n /**\n * Get arbitrary function keys from a provider\n *\n * @param {KeySearchParams} params parameters for the key search in form of: {proverUri: string, verifierUri: string, cacheKey: string}\n * @returns {Promise} Proving and verifying keys for the specified program\n *\n * @example\n * // Create a new object which implements the KeyProvider interface\n * const networkClient = new AleoNetworkClient(\"https://api.explorer.aleo.org/v1\");\n * const keyProvider = new AleoKeyProvider();\n * const recordProvider = new NetworkRecordProvider(account, networkClient);\n *\n * // Initialize a program manager with the key provider to automatically fetch keys for value transfers\n * const programManager = new ProgramManager(\"https://api.explorer.aleo.org/v1\", keyProvider, recordProvider);\n * programManager.transfer(1, \"aleo166q6ww6688cug7qxwe7nhctjpymydwzy2h7rscfmatqmfwnjvggqcad0at\", \"public\", 0.5);\n *\n * // Keys can also be fetched manually using the key provider\n * const keySearchParams = { \"cacheKey\": \"myProgram:myFunction\" };\n * const [transferPrivateProvingKey, transferPrivateVerifyingKey] = await keyProvider.functionKeys(keySearchParams);\n */\n async functionKeys(params?: KeySearchParams): Promise {\n if (params) {\n let proverUrl;\n let verifierUrl;\n let cacheKey;\n if (\"name\" in params && typeof params[\"name\"] == \"string\") {\n let key = CREDITS_PROGRAM_KEYS.getKey(params[\"name\"]);\n if (!(key instanceof Error)) {\n return this.fetchCreditsKeys(key);\n }\n }\n\n if (\"proverUri\" in params && typeof params[\"proverUri\"] == \"string\") {\n proverUrl = params[\"proverUri\"];\n }\n\n if (\"verifierUri\" in params && typeof params[\"verifierUri\"] == \"string\") {\n verifierUrl = params[\"verifierUri\"];\n }\n\n if (\"cacheKey\" in params && typeof params[\"cacheKey\"] == \"string\") {\n cacheKey = params[\"cacheKey\"];\n }\n\n if (proverUrl && verifierUrl) {\n return await this.fetchRemoteKeys(proverUrl, verifierUrl, cacheKey);\n }\n\n if (cacheKey) {\n return this.getKeys(cacheKey);\n }\n }\n throw Error(\"Invalid parameters provided, must provide either a cacheKey and/or a proverUrl and a verifierUrl\");\n }\n\n /**\n * Returns the proving and verifying keys for a specified program from a specified url.\n *\n * @param {string} verifierUrl Url of the proving key\n * @param {string} proverUrl Url the verifying key\n * @param {string} cacheKey Key to store the keys in the cache\n *\n * @returns {Promise} Proving and verifying keys for the specified program\n *\n * @example\n * // Create a new AleoKeyProvider object\n * const networkClient = new AleoNetworkClient(\"https://api.explorer.aleo.org/v1\");\n * const keyProvider = new AleoKeyProvider();\n * const recordProvider = new NetworkRecordProvider(account, networkClient);\n *\n * // Initialize a program manager with the key provider to automatically fetch keys for value transfers\n * const programManager = new ProgramManager(\"https://api.explorer.aleo.org/v1\", keyProvider, recordProvider);\n * programManager.transfer(1, \"aleo166q6ww6688cug7qxwe7nhctjpymydwzy2h7rscfmatqmfwnjvggqcad0at\", \"public\", 0.5);\n *\n * // Keys can also be fetched manually\n * const [transferPrivateProvingKey, transferPrivateVerifyingKey] = await keyProvider.fetchKeys(\n * CREDITS_PROGRAM_KEYS.transfer_private.prover,\n * CREDITS_PROGRAM_KEYS.transfer_private.verifier,\n * );\n */\n async fetchRemoteKeys(proverUrl: string, verifierUrl: string, cacheKey?: string): Promise {\n try {\n // If cache is enabled, check if the keys have already been fetched and return them if they have\n if (this.cacheOption) {\n if (!cacheKey) {\n cacheKey = proverUrl;\n }\n const value = this.cache.get(cacheKey);\n if (typeof value !== \"undefined\") {\n return [ProvingKey.fromBytes(value[0]), VerifyingKey.fromBytes(value[1])];\n } else {\n console.debug(\"Fetching proving keys from url \" + proverUrl);\n const provingKey = ProvingKey.fromBytes(await this.fetchBytes(proverUrl))\n console.debug(\"Fetching verifying keys \" + verifierUrl);\n const verifyingKey = (await this.getVerifyingKey(verifierUrl));\n this.cache.set(cacheKey, [provingKey.toBytes(), verifyingKey.toBytes()]);\n return [provingKey, verifyingKey];\n }\n }\n else {\n // If cache is disabled, fetch the keys and return them\n const provingKey = ProvingKey.fromBytes(await this.fetchBytes(proverUrl))\n const verifyingKey = (await this.getVerifyingKey(verifierUrl));\n return [provingKey, verifyingKey];\n }\n } catch (error) {\n throw new Error(`Error: ${error} fetching fee proving and verifying keys from ${proverUrl} and ${verifierUrl}.`);\n }\n }\n\n /***\n * Fetches the proving key from a remote source.\n *\n * @param proverUrl\n * @param cacheKey\n *\n * @returns {Promise} Proving key for the specified program\n */\n async fetchProvingKey(proverUrl: string, cacheKey?: string): Promise {\n try {\n // If cache is enabled, check if the keys have already been fetched and return them if they have\n if (this.cacheOption) {\n if (!cacheKey) {\n cacheKey = proverUrl;\n }\n const value = this.cache.get(cacheKey);\n if (typeof value !== \"undefined\") {\n return ProvingKey.fromBytes(value[0]);\n } else {\n console.debug(\"Fetching proving keys from url \" + proverUrl);\n const provingKey = ProvingKey.fromBytes(await this.fetchBytes(proverUrl));\n return provingKey;\n }\n }\n else {\n const provingKey = ProvingKey.fromBytes(await this.fetchBytes(proverUrl));\n return provingKey;\n }\n } catch (error) {\n throw new Error(`Error: ${error} fetching fee proving keys from ${proverUrl}`);\n }\n }\n\n async fetchCreditsKeys(key: Key): Promise {\n try {\n if (!this.cache.has(key.locator) || !this.cacheOption) {\n const verifying_key = key.verifyingKey()\n const proving_key = await this.fetchProvingKey(key.prover, key.locator);\n if (this.cacheOption) {\n this.cache.set(CREDITS_PROGRAM_KEYS.bond_public.locator, [proving_key.toBytes(), verifying_key.toBytes()]);\n }\n return [proving_key, verifying_key];\n } else {\n const keyPair = this.cache.get(key.locator);\n return [ProvingKey.fromBytes(keyPair[0]), VerifyingKey.fromBytes(keyPair[1])];\n }\n } catch (error) {\n throw new Error(`Error: fetching credits.aleo keys: ${error}`);\n }\n }\n\n async bondPublicKeys(): Promise {\n return this.fetchCreditsKeys(CREDITS_PROGRAM_KEYS.bond_public);\n }\n\n bondValidatorKeys(): Promise {\n return this.fetchCreditsKeys(CREDITS_PROGRAM_KEYS.bond_validator);\n }\n\n claimUnbondPublicKeys(): Promise {\n return this.fetchCreditsKeys(CREDITS_PROGRAM_KEYS.claim_unbond_public)\n }\n\n /**\n * Returns the proving and verifying keys for the transfer functions in the credits.aleo program\n * @param {string} visibility Visibility of the transfer function\n * @returns {Promise} Proving and verifying keys for the transfer functions\n *\n * @example\n * // Create a new AleoKeyProvider\n * const networkClient = new AleoNetworkClient(\"https://api.explorer.aleo.org/v1\");\n * const keyProvider = new AleoKeyProvider();\n * const recordProvider = new NetworkRecordProvider(account, networkClient);\n *\n * // Initialize a program manager with the key provider to automatically fetch keys for value transfers\n * const programManager = new ProgramManager(\"https://api.explorer.aleo.org/v1\", keyProvider, recordProvider);\n * programManager.transfer(1, \"aleo166q6ww6688cug7qxwe7nhctjpymydwzy2h7rscfmatqmfwnjvggqcad0at\", \"public\", 0.5);\n *\n * // Keys can also be fetched manually\n * const [transferPublicProvingKey, transferPublicVerifyingKey] = await keyProvider.transferKeys(\"public\");\n */\n async transferKeys(visibility: string): Promise {\n if (PRIVATE_TRANSFER.has(visibility)) {\n return await this.fetchCreditsKeys(CREDITS_PROGRAM_KEYS.transfer_private);\n } else if (PRIVATE_TO_PUBLIC_TRANSFER.has(visibility)) {\n return await this.fetchCreditsKeys(CREDITS_PROGRAM_KEYS.transfer_private_to_public);\n } else if (PUBLIC_TRANSFER.has(visibility)) {\n return await this.fetchCreditsKeys(CREDITS_PROGRAM_KEYS.transfer_public);\n } else if (PUBLIC_TRANSFER_AS_SIGNER.has(visibility)) {\n return await this.fetchCreditsKeys(CREDITS_PROGRAM_KEYS.transfer_public_as_signer);\n } else if (PUBLIC_TO_PRIVATE_TRANSFER.has(visibility)) {\n return await this.fetchCreditsKeys(CREDITS_PROGRAM_KEYS.transfer_public_to_private);\n } else {\n throw new Error(\"Invalid visibility type\");\n }\n }\n\n /**\n * Returns the proving and verifying keys for the join function in the credits.aleo program\n *\n * @returns {Promise} Proving and verifying keys for the join function\n */\n async joinKeys(): Promise {\n return await this.fetchCreditsKeys(CREDITS_PROGRAM_KEYS.join);\n }\n\n /**\n * Returns the proving and verifying keys for the split function in the credits.aleo program\n *\n * @returns {Promise} Proving and verifying keys for the split function\n * */\n async splitKeys(): Promise {\n return await this.fetchCreditsKeys(CREDITS_PROGRAM_KEYS.split);\n }\n\n /**\n * Returns the proving and verifying keys for the fee_private function in the credits.aleo program\n *\n * @returns {Promise} Proving and verifying keys for the fee function\n */\n async feePrivateKeys(): Promise {\n return await this.fetchCreditsKeys(CREDITS_PROGRAM_KEYS.fee_private);\n }\n\n /**\n * Returns the proving and verifying keys for the fee_public function in the credits.aleo program\n *\n * @returns {Promise} Proving and verifying keys for the fee function\n */\n async feePublicKeys(): Promise {\n return await this.fetchCreditsKeys(CREDITS_PROGRAM_KEYS.fee_public);\n }\n\n /**\n * Gets a verifying key. If the verifying key is for a credits.aleo function, get it from the wasm cache otherwise\n *\n * @returns {Promise} Verifying key for the function\n */\n // attempt to fetch it from the network\n async getVerifyingKey(verifierUri: string): Promise {\n switch (verifierUri) {\n case CREDITS_PROGRAM_KEYS.bond_public.verifier:\n return CREDITS_PROGRAM_KEYS.bond_public.verifyingKey();\n case CREDITS_PROGRAM_KEYS.bond_validator.verifier:\n return CREDITS_PROGRAM_KEYS.bond_validator.verifyingKey();\n case CREDITS_PROGRAM_KEYS.claim_unbond_public.verifier:\n return CREDITS_PROGRAM_KEYS.claim_unbond_public.verifyingKey();\n case CREDITS_PROGRAM_KEYS.fee_private.verifier:\n return CREDITS_PROGRAM_KEYS.fee_private.verifyingKey();\n case CREDITS_PROGRAM_KEYS.fee_public.verifier:\n return CREDITS_PROGRAM_KEYS.fee_public.verifyingKey();\n case CREDITS_PROGRAM_KEYS.inclusion.verifier:\n return CREDITS_PROGRAM_KEYS.inclusion.verifyingKey();\n case CREDITS_PROGRAM_KEYS.join.verifier:\n return CREDITS_PROGRAM_KEYS.join.verifyingKey();\n case CREDITS_PROGRAM_KEYS.set_validator_state.verifier:\n return CREDITS_PROGRAM_KEYS.set_validator_state.verifyingKey();\n case CREDITS_PROGRAM_KEYS.split.verifier:\n return CREDITS_PROGRAM_KEYS.split.verifyingKey();\n case CREDITS_PROGRAM_KEYS.transfer_private.verifier:\n return CREDITS_PROGRAM_KEYS.transfer_private.verifyingKey();\n case CREDITS_PROGRAM_KEYS.transfer_private_to_public.verifier:\n return CREDITS_PROGRAM_KEYS.transfer_private_to_public.verifyingKey();\n case CREDITS_PROGRAM_KEYS.transfer_public.verifier:\n return CREDITS_PROGRAM_KEYS.transfer_public.verifyingKey();\n case CREDITS_PROGRAM_KEYS.transfer_public_as_signer.verifier:\n return CREDITS_PROGRAM_KEYS.transfer_public_as_signer.verifyingKey();\n case CREDITS_PROGRAM_KEYS.transfer_public_to_private.verifier:\n return CREDITS_PROGRAM_KEYS.transfer_public_to_private.verifyingKey();\n case CREDITS_PROGRAM_KEYS.unbond_public.verifier:\n return CREDITS_PROGRAM_KEYS.unbond_public.verifyingKey();\n default:\n try {\n /// Try to fetch the verifying key from the network as a string\n const response = await get(verifierUri);\n const text = await response.text();\n return VerifyingKey.fromString(text);\n } catch (e) {\n /// If that fails, try to fetch the verifying key from the network as bytes\n try {\n return VerifyingKey.fromBytes(await this.fetchBytes(verifierUri));\n } catch (inner) {\n return new Error(\"Invalid verifying key. Error: \" + inner);\n }\n }\n }\n }\n\n unBondPublicKeys(): Promise {\n return this.fetchCreditsKeys(CREDITS_PROGRAM_KEYS.unbond_public);\n }\n}\n\nexport {AleoKeyProvider, AleoKeyProviderParams, AleoKeyProviderInitParams, CachedKeyPair, FunctionKeyPair, FunctionKeyProvider, KeySearchParams}\n","import {\n FunctionKeyProvider,\n KeySearchParams,\n FunctionKeyPair,\n CachedKeyPair,\n ProvingKey,\n VerifyingKey,\n CREDITS_PROGRAM_KEYS,\n PRIVATE_TRANSFER,\n PRIVATE_TO_PUBLIC_TRANSFER,\n PUBLIC_TRANSFER,\n PUBLIC_TO_PRIVATE_TRANSFER,\n PUBLIC_TRANSFER_AS_SIGNER\n} from \"./index\";\n\n/**\n * Search parameters for the offline key provider. This class implements the KeySearchParams interface and includes\n * a convenience method for creating a new instance of this class for each function of the credits.aleo program.\n *\n * @example\n * // If storing a key for a custom program function\n * offlineSearchParams = new OfflineSearchParams(\"myprogram.aleo/myfunction\");\n *\n * // If storing a key for a credits.aleo program function\n * bondPublicKeyParams = OfflineSearchParams.bondPublicKeyParams();\n */\nclass OfflineSearchParams implements KeySearchParams {\n cacheKey: string | undefined;\n verifyCreditsKeys: boolean | undefined;\n\n /**\n * Create a new OfflineSearchParams instance.\n *\n * @param {string} cacheKey - Key used to store the local function proving & verifying keys. This should be stored\n * under the naming convention \"programName/functionName\" (i.e. \"myprogram.aleo/myfunction\")\n * @param {boolean} verifyCreditsKeys - Whether to verify the keys against the credits.aleo program,\n * defaults to false, but should be set to true if using keys from the credits.aleo program\n */\n constructor(cacheKey: string, verifyCreditsKeys = false) {\n this.cacheKey = cacheKey;\n this.verifyCreditsKeys = verifyCreditsKeys;\n }\n\n /**\n * Create a new OfflineSearchParams instance for the bond_public function of the credits.aleo program.\n */\n static bondPublicKeyParams(): OfflineSearchParams {\n return new OfflineSearchParams(CREDITS_PROGRAM_KEYS.bond_public.locator, true);\n }\n\n /**\n * Create a new OfflineSearchParams instance for the bond_validator function of the credits.aleo program.\n */\n static bondValidatorKeyParams(): OfflineSearchParams {\n return new OfflineSearchParams(CREDITS_PROGRAM_KEYS.bond_validator.locator, true);\n }\n\n /**\n * Create a new OfflineSearchParams instance for the claim_unbond_public function of the\n */\n static claimUnbondPublicKeyParams(): OfflineSearchParams {\n return new OfflineSearchParams(CREDITS_PROGRAM_KEYS.claim_unbond_public.locator, true);\n }\n\n /**\n * Create a new OfflineSearchParams instance for the fee_private function of the credits.aleo program.\n */\n static feePrivateKeyParams(): OfflineSearchParams {\n return new OfflineSearchParams(CREDITS_PROGRAM_KEYS.fee_private.locator, true);\n }\n\n /**\n * Create a new OfflineSearchParams instance for the fee_public function of the credits.aleo program.\n */\n static feePublicKeyParams(): OfflineSearchParams {\n return new OfflineSearchParams(CREDITS_PROGRAM_KEYS.fee_public.locator, true);\n }\n\n /**\n * Create a new OfflineSearchParams instance for the inclusion prover function.\n */\n static inclusionKeyParams(): OfflineSearchParams {\n return new OfflineSearchParams(CREDITS_PROGRAM_KEYS.inclusion.locator, true);\n }\n\n /**\n * Create a new OfflineSearchParams instance for the join function of the credits.aleo program.\n */\n static joinKeyParams(): OfflineSearchParams {\n return new OfflineSearchParams(CREDITS_PROGRAM_KEYS.join.locator, true);\n }\n\n /**\n * Create a new OfflineSearchParams instance for the set_validator_state function of the credits.aleo program.\n */\n static setValidatorStateKeyParams(): OfflineSearchParams {\n return new OfflineSearchParams(CREDITS_PROGRAM_KEYS.set_validator_state.locator, true);\n }\n\n /**\n * Create a new OfflineSearchParams instance for the split function of the credits.aleo program.\n */\n static splitKeyParams(): OfflineSearchParams {\n return new OfflineSearchParams(CREDITS_PROGRAM_KEYS.split.locator, true);\n }\n\n /**\n * Create a new OfflineSearchParams instance for the transfer_private function of the credits.aleo program.\n */\n static transferPrivateKeyParams(): OfflineSearchParams {\n return new OfflineSearchParams(CREDITS_PROGRAM_KEYS.transfer_private.locator, true);\n }\n\n /**\n * Create a new OfflineSearchParams instance for the transfer_private_to_public function of the credits.aleo program.\n */\n static transferPrivateToPublicKeyParams(): OfflineSearchParams {\n return new OfflineSearchParams(CREDITS_PROGRAM_KEYS.transfer_private_to_public.locator, true);\n }\n\n /**\n * Create a new OfflineSearchParams instance for the transfer_public function of the credits.aleo program.\n */\n static transferPublicKeyParams(): OfflineSearchParams {\n return new OfflineSearchParams(CREDITS_PROGRAM_KEYS.transfer_public.locator, true);\n }\n\n /**\n * Create a new OfflineSearchParams instance for the transfer_public_as_signer function of the credits.aleo program.\n */\n static transferPublicAsSignerKeyParams(): OfflineSearchParams {\n return new OfflineSearchParams(CREDITS_PROGRAM_KEYS.transfer_public_as_signer.locator, true);\n }\n\n /**\n * Create a new OfflineSearchParams instance for the transfer_public_to_private function of the credits.aleo program.\n */\n static transferPublicToPrivateKeyParams(): OfflineSearchParams {\n return new OfflineSearchParams(CREDITS_PROGRAM_KEYS.transfer_public_to_private.locator, true);\n }\n\n /**\n * Create a new OfflineSearchParams instance for the unbond_public function of the credits.aleo program.\n */\n static unbondPublicKeyParams(): OfflineSearchParams {\n return new OfflineSearchParams(CREDITS_PROGRAM_KEYS.unbond_public.locator, true);\n }\n}\n\n/**\n * A key provider meant for building transactions offline on devices such as hardware wallets. This key provider is not\n * able to contact the internet for key material and instead relies on the user to insert Aleo function proving &\n * verifying keys from local storage prior to usage.\n *\n * @example\n * // Create an offline program manager\n * const programManager = new ProgramManager();\n *\n * // Create a temporary account for the execution of the program\n * const account = new Account();\n * programManager.setAccount(account);\n *\n * // Create the proving keys from the key bytes on the offline machine\n * console.log(\"Creating proving keys from local key files\");\n * const program = \"program hello_hello.aleo; function hello: input r0 as u32.public; input r1 as u32.private; add r0 r1 into r2; output r2 as u32.private;\";\n * const myFunctionProver = await getLocalKey(\"/path/to/my/function/hello_hello.prover\");\n * const myFunctionVerifier = await getLocalKey(\"/path/to/my/function/hello_hello.verifier\");\n * const feePublicProvingKeyBytes = await getLocalKey(\"/path/to/credits.aleo/feePublic.prover\");\n *\n * myFunctionProvingKey = ProvingKey.fromBytes(myFunctionProver);\n * myFunctionVerifyingKey = VerifyingKey.fromBytes(myFunctionVerifier);\n * const feePublicProvingKey = ProvingKey.fromBytes(feePublicKeyBytes);\n *\n * // Create an offline key provider\n * console.log(\"Creating offline key provider\");\n * const offlineKeyProvider = new OfflineKeyProvider();\n *\n * // Cache the keys\n * // Cache the proving and verifying keys for the custom hello function\n * OfflineKeyProvider.cacheKeys(\"hello_hello.aleo/hello\", myFunctionProvingKey, myFunctionVerifyingKey);\n *\n * // Cache the proving key for the fee_public function (the verifying key is automatically cached)\n * OfflineKeyProvider.insertFeePublicKey(feePublicProvingKey);\n *\n * // Create an offline query using the latest state root in order to create the inclusion proof\n * const offlineQuery = new OfflineQuery(\"latestStateRoot\");\n *\n * // Insert the key provider into the program manager\n * programManager.setKeyProvider(offlineKeyProvider);\n *\n * // Create the offline search params\n * const offlineSearchParams = new OfflineSearchParams(\"hello_hello.aleo/hello\");\n *\n * // Create the offline transaction\n * const offlineExecuteTx = await this.buildExecutionTransaction(\"hello_hello.aleo\", \"hello\", 1, false, [\"5u32\", \"5u32\"], undefined, offlineSearchParams, undefined, undefined, undefined, undefined, offlineQuery, program);\n *\n * // Broadcast the transaction later on a machine with internet access\n * const networkClient = new AleoNetworkClient(\"https://api.explorer.aleo.org/v1\");\n * const txId = await networkClient.broadcastTransaction(offlineExecuteTx);\n */\nclass OfflineKeyProvider implements FunctionKeyProvider {\n cache: Map;\n\n constructor() {\n this.cache = new Map();\n }\n\n /**\n * Get bond_public function keys from the credits.aleo program. The keys must be cached prior to calling this\n * method for it to work.\n *\n * @returns {Promise} Proving and verifying keys for the bond_public function\n */\n bondPublicKeys(): Promise {\n return this.functionKeys(OfflineSearchParams.bondPublicKeyParams());\n };\n\n /**\n * Get bond_validator function keys from the credits.aleo program. The keys must be cached prior to calling this\n * method for it to work.\n *\n * @returns {Promise} Proving and verifying keys for the bond_public function\n */\n bondValidatorKeys(): Promise {\n return this.functionKeys(OfflineSearchParams.bondValidatorKeyParams());\n };\n\n\n /**\n * Cache a set of keys. This will overwrite any existing keys with the same keyId. The user can check if a keyId\n * exists in the cache using the containsKeys method prior to calling this method if overwriting is not desired.\n *\n * @param {string} keyId access key for the cache\n * @param {FunctionKeyPair} keys keys to cache\n */\n cacheKeys(keyId: string, keys: FunctionKeyPair): void {\n const [provingKey, verifyingKey] = keys;\n this.cache.set(keyId, [provingKey.toBytes(), verifyingKey.toBytes()]);\n };\n\n /**\n * Get unbond_public function keys from the credits.aleo program. The keys must be cached prior to calling this\n * method for it to work.\n *\n * @returns {Promise} Proving and verifying keys for the unbond_public function\n */\n claimUnbondPublicKeys(): Promise {\n return this.functionKeys(OfflineSearchParams.claimUnbondPublicKeyParams());\n };\n\n /**\n * Get arbitrary function key from the offline key provider cache.\n *\n * @param {KeySearchParams | undefined} params - Optional search parameters for the key provider\n * @returns {Promise} Proving and verifying keys for the specified program\n *\n * @example\n * /// First cache the keys from local offline resources\n * const offlineKeyProvider = new OfflineKeyProvider();\n * const myFunctionVerifyingKey = VerifyingKey.fromString(\"verifier...\");\n * const myFunctionProvingKeyBytes = await readBinaryFile('./resources/myfunction.prover');\n * const myFunctionProvingKey = ProvingKey.fromBytes(myFunctionProvingKeyBytes);\n *\n * /// Cache the keys for future use with a memorable locator\n * offlineKeyProvider.cacheKeys(\"myprogram.aleo/myfunction\", [myFunctionProvingKey, myFunctionVerifyingKey]);\n *\n * /// When they're needed, retrieve the keys from the cache\n *\n * /// First create a search parameter object with the same locator used to cache the keys\n * const keyParams = new OfflineSearchParams(\"myprogram.aleo/myfunction\");\n *\n * /// Then retrieve the keys\n * const [myFunctionProver, myFunctionVerifier] = await offlineKeyProvider.functionKeys(keyParams);\n */\n functionKeys(params?: KeySearchParams): Promise {\n return new Promise((resolve, reject) => {\n if (params === undefined) {\n reject(new Error(\"No search parameters provided, cannot retrieve keys\"));\n } else {\n const keyId = params.cacheKey;\n const verifyCreditsKeys = params.verifyCreditsKeys;\n if (this.cache.has(keyId)) {\n const [provingKeyBytes, verifyingKeyBytes] = this.cache.get(keyId) as CachedKeyPair;\n const provingKey = ProvingKey.fromBytes(provingKeyBytes);\n const verifyingKey = VerifyingKey.fromBytes(verifyingKeyBytes);\n if (verifyCreditsKeys) {\n const keysMatchExpected = this.verifyCreditsKeys(keyId, provingKey, verifyingKey)\n if (!keysMatchExpected) {\n reject (new Error(`Cached keys do not match expected keys for ${keyId}`));\n }\n }\n resolve([provingKey, verifyingKey]);\n } else {\n reject(new Error(\"Keys not found in cache for \" + keyId));\n }\n }\n });\n };\n\n /**\n * Determines if the keys for a given credits function match the expected keys.\n *\n * @returns {boolean} Whether the keys match the expected keys\n */\n verifyCreditsKeys(locator: string, provingKey: ProvingKey, verifyingKey: VerifyingKey): boolean {\n switch (locator) {\n case CREDITS_PROGRAM_KEYS.bond_public.locator:\n return provingKey.isBondPublicProver() && verifyingKey.isBondPublicVerifier();\n case CREDITS_PROGRAM_KEYS.claim_unbond_public.locator:\n return provingKey.isClaimUnbondPublicProver() && verifyingKey.isClaimUnbondPublicVerifier();\n case CREDITS_PROGRAM_KEYS.fee_private.locator:\n return provingKey.isFeePrivateProver() && verifyingKey.isFeePrivateVerifier();\n case CREDITS_PROGRAM_KEYS.fee_public.locator:\n return provingKey.isFeePublicProver() && verifyingKey.isFeePublicVerifier();\n case CREDITS_PROGRAM_KEYS.inclusion.locator:\n return provingKey.isInclusionProver() && verifyingKey.isInclusionVerifier();\n case CREDITS_PROGRAM_KEYS.join.locator:\n return provingKey.isJoinProver() && verifyingKey.isJoinVerifier();\n case CREDITS_PROGRAM_KEYS.set_validator_state.locator:\n return provingKey.isSetValidatorStateProver() && verifyingKey.isSetValidatorStateVerifier();\n case CREDITS_PROGRAM_KEYS.split.locator:\n return provingKey.isSplitProver() && verifyingKey.isSplitVerifier();\n case CREDITS_PROGRAM_KEYS.transfer_private.locator:\n return provingKey.isTransferPrivateProver() && verifyingKey.isTransferPrivateVerifier();\n case CREDITS_PROGRAM_KEYS.transfer_private_to_public.locator:\n return provingKey.isTransferPrivateToPublicProver() && verifyingKey.isTransferPrivateToPublicVerifier();\n case CREDITS_PROGRAM_KEYS.transfer_public.locator:\n return provingKey.isTransferPublicProver() && verifyingKey.isTransferPublicVerifier();\n case CREDITS_PROGRAM_KEYS.transfer_public_to_private.locator:\n return provingKey.isTransferPublicToPrivateProver() && verifyingKey.isTransferPublicToPrivateVerifier();\n case CREDITS_PROGRAM_KEYS.unbond_public.locator:\n return provingKey.isUnbondPublicProver() && verifyingKey.isUnbondPublicVerifier();\n default:\n return false;\n }\n }\n\n /**\n * Get fee_private function keys from the credits.aleo program. The keys must be cached prior to calling this\n * method for it to work.\n *\n * @returns {Promise} Proving and verifying keys for the join function\n */\n feePrivateKeys(): Promise {\n return this.functionKeys(OfflineSearchParams.feePrivateKeyParams());\n };\n\n /**\n * Get fee_public function keys from the credits.aleo program. The keys must be cached prior to calling this\n * method for it to work.\n *\n * @returns {Promise} Proving and verifying keys for the join function\n */\n feePublicKeys(): Promise {\n return this.functionKeys(OfflineSearchParams.feePublicKeyParams());\n };\n\n /**\n * Get join function keys from the credits.aleo program. The keys must be cached prior to calling this\n * method for it to work.\n *\n * @returns {Promise} Proving and verifying keys for the join function\n */\n joinKeys(): Promise {\n return this.functionKeys(OfflineSearchParams.joinKeyParams());\n };\n\n /**\n * Get split function keys from the credits.aleo program. The keys must be cached prior to calling this\n * method for it to work.\n *\n * @returns {Promise} Proving and verifying keys for the join function\n */\n splitKeys(): Promise {\n return this.functionKeys(OfflineSearchParams.splitKeyParams());\n };\n\n /**\n * Get keys for a variant of the transfer function from the credits.aleo program.\n *\n *\n * @param {string} visibility Visibility of the transfer function (private, public, privateToPublic, publicToPrivate)\n * @returns {Promise} Proving and verifying keys for the specified transfer function\n *\n * @example\n * // Create a new OfflineKeyProvider\n * const offlineKeyProvider = new OfflineKeyProvider();\n *\n * // Cache the keys for future use with the official locator\n * const transferPublicProvingKeyBytes = await readBinaryFile('./resources/transfer_public.prover.a74565e');\n * const transferPublicProvingKey = ProvingKey.fromBytes(transferPublicProvingKeyBytes);\n *\n * // Cache the transfer_public keys for future use with the OfflinKeyProvider's convenience method for\n * // transfer_public (the verifying key will be cached automatically)\n * offlineKeyProvider.insertTransferPublicKeys(transferPublicProvingKey);\n *\n * /// When they're needed, retrieve the keys from the cache\n * const [transferPublicProvingKey, transferPublicVerifyingKey] = await keyProvider.transferKeys(\"public\");\n */\n transferKeys(visibility: string): Promise {\n if (PRIVATE_TRANSFER.has(visibility)) {\n return this.functionKeys(OfflineSearchParams.transferPrivateKeyParams());\n } else if (PRIVATE_TO_PUBLIC_TRANSFER.has(visibility)) {\n return this.functionKeys(OfflineSearchParams.transferPrivateToPublicKeyParams());\n } else if (PUBLIC_TRANSFER.has(visibility)) {\n return this.functionKeys(OfflineSearchParams.transferPublicKeyParams());\n } else if (PUBLIC_TRANSFER_AS_SIGNER.has(visibility)) {\n return this.functionKeys(OfflineSearchParams.transferPublicAsSignerKeyParams());\n } else if (PUBLIC_TO_PRIVATE_TRANSFER.has(visibility)) {\n return this.functionKeys(OfflineSearchParams.transferPublicToPrivateKeyParams());\n } else {\n throw new Error(\"Invalid visibility type\");\n }\n };\n\n /**\n * Get unbond_public function keys from the credits.aleo program\n *\n * @returns {Promise} Proving and verifying keys for the join function\n */\n async unBondPublicKeys(): Promise {\n return this.functionKeys(OfflineSearchParams.unbondPublicKeyParams());\n };\n\n /**\n * Insert the proving and verifying keys for the bond_public function into the cache. Only the proving key needs\n * to be inserted, the verifying key is automatically inserted by the SDK. This function will automatically check\n * that the keys match the expected checksum for bond_public before inserting them into the cache.\n *\n * @param provingKey\n */\n insertBondPublicKeys(provingKey: ProvingKey) {\n if (provingKey.isBondPublicProver()) {\n this.cache.set(CREDITS_PROGRAM_KEYS.bond_public.locator, [provingKey.toBytes(), VerifyingKey.bondPublicVerifier().toBytes()]);\n } else {\n throw new Error(\"Attempted to insert invalid proving keys for bond_public\");\n }\n }\n\n /**\n * Insert the proving and verifying keys for the claim_unbond_public function into the cache. Only the proving key needs\n * to be inserted, the verifying key is automatically inserted by the SDK. This function will automatically check\n * that the keys match the expected checksum for claim_unbond_public before inserting them into the cache.\n *\n * @param provingKey\n */\n insertClaimUnbondPublicKeys(provingKey: ProvingKey) {\n if (provingKey.isClaimUnbondPublicProver()) {\n this.cache.set(CREDITS_PROGRAM_KEYS.claim_unbond_public.locator, [provingKey.toBytes(), VerifyingKey.claimUnbondPublicVerifier().toBytes()]);\n } else {\n throw new Error(\"Attempted to insert invalid proving keys for claim_unbond_public\");\n }\n }\n\n /**\n * Insert the proving and verifying keys for the fee_private function into the cache. Only the proving key needs\n * to be inserted, the verifying key is automatically inserted by the SDK. This function will automatically check\n * that the keys match the expected checksum for fee_private before inserting them into the cache.\n *\n * @param provingKey\n */\n insertFeePrivateKeys(provingKey: ProvingKey) {\n if (provingKey.isFeePrivateProver()) {\n this.cache.set(CREDITS_PROGRAM_KEYS.fee_private.locator, [provingKey.toBytes(), VerifyingKey.feePrivateVerifier().toBytes()]);\n } else {\n throw new Error(\"Attempted to insert invalid proving keys for fee_private\");\n }\n }\n\n /**\n * Insert the proving and verifying keys for the fee_public function into the cache. Only the proving key needs\n * to be inserted, the verifying key is automatically inserted by the SDK. This function will automatically check\n * that the keys match the expected checksum for fee_public before inserting them into the cache.\n *\n * @param provingKey\n */\n insertFeePublicKeys(provingKey: ProvingKey) {\n if (provingKey.isFeePublicProver()) {\n this.cache.set(CREDITS_PROGRAM_KEYS.fee_public.locator, [provingKey.toBytes(), VerifyingKey.feePublicVerifier().toBytes()]);\n } else {\n throw new Error(\"Attempted to insert invalid proving keys for fee_public\");\n }\n }\n\n /**\n * Insert the proving and verifying keys for the join function into the cache. Only the proving key needs\n * to be inserted, the verifying key is automatically inserted by the SDK. This function will automatically check\n * that the keys match the expected checksum for join before inserting them into the cache.\n *\n * @param provingKey\n */\n insertJoinKeys(provingKey: ProvingKey) {\n if (provingKey.isJoinProver()) {\n this.cache.set(CREDITS_PROGRAM_KEYS.join.locator, [provingKey.toBytes(), VerifyingKey.joinVerifier().toBytes()]);\n } else {\n throw new Error(\"Attempted to insert invalid proving keys for join\");\n }\n }\n\n /**\n * Insert the proving and verifying keys for the set_validator_state function into the cache. Only the proving key needs\n * to be inserted, the verifying key is automatically inserted by the SDK. This function will automatically check\n * that the keys match the expected checksum for set_validator_state before inserting them into the cache.\n *\n * @param provingKey\n */\n insertSetValidatorStateKeys(provingKey: ProvingKey) {\n if (provingKey.isSetValidatorStateProver()) {\n this.cache.set(CREDITS_PROGRAM_KEYS.set_validator_state.locator, [provingKey.toBytes(), VerifyingKey.setValidatorStateVerifier().toBytes()]);\n } else {\n throw new Error(\"Attempted to insert invalid proving keys for set_validator_state\");\n }\n }\n\n /**\n * Insert the proving and verifying keys for the split function into the cache. Only the proving key needs\n * to be inserted, the verifying key is automatically inserted by the SDK. This function will automatically check\n * that the keys match the expected checksum for split before inserting them into the cache.\n *\n * @param provingKey\n */\n insertSplitKeys(provingKey: ProvingKey) {\n if (provingKey.isSplitProver()) {\n this.cache.set(CREDITS_PROGRAM_KEYS.split.locator, [provingKey.toBytes(), VerifyingKey.splitVerifier().toBytes()]);\n } else {\n throw new Error(\"Attempted to insert invalid proving keys for split\");\n }\n }\n\n /**\n * Insert the proving and verifying keys for the transfer_private function into the cache. Only the proving key needs\n * to be inserted, the verifying key is automatically inserted by the SDK. This function will automatically check\n * that the keys match the expected checksum for transfer_private before inserting them into the cache.\n *\n * @param provingKey\n */\n insertTransferPrivateKeys(provingKey: ProvingKey) {\n if (provingKey.isTransferPrivateProver()) {\n this.cache.set(CREDITS_PROGRAM_KEYS.transfer_private.locator, [provingKey.toBytes(), VerifyingKey.transferPrivateVerifier().toBytes()]);\n } else {\n throw new Error(\"Attempted to insert invalid proving keys for transfer_private\");\n }\n }\n\n /**\n * Insert the proving and verifying keys for the transfer_private_to_public function into the cache. Only the proving key needs\n * to be inserted, the verifying key is automatically inserted by the SDK. This function will automatically check\n * that the keys match the expected checksum for transfer_private_to_public before inserting them into the cache.\n *\n * @param provingKey\n */\n insertTransferPrivateToPublicKeys(provingKey: ProvingKey) {\n if (provingKey.isTransferPrivateToPublicProver()) {\n this.cache.set(CREDITS_PROGRAM_KEYS.transfer_private_to_public.locator, [provingKey.toBytes(), VerifyingKey.transferPrivateToPublicVerifier().toBytes()]);\n } else {\n throw new Error(\"Attempted to insert invalid proving keys for transfer_private_to_public\");\n }\n }\n\n /**\n * Insert the proving and verifying keys for the transfer_public function into the cache. Only the proving key needs\n * to be inserted, the verifying key is automatically inserted by the SDK. This function will automatically check\n * that the keys match the expected checksum for transfer_public before inserting them into the cache.\n *\n * @param provingKey\n */\n insertTransferPublicKeys(provingKey: ProvingKey) {\n if (provingKey.isTransferPublicProver()) {\n this.cache.set(CREDITS_PROGRAM_KEYS.transfer_public.locator, [provingKey.toBytes(), VerifyingKey.transferPublicVerifier().toBytes()]);\n } else {\n throw new Error(\"Attempted to insert invalid proving keys for transfer_public\");\n }\n }\n\n /**\n * Insert the proving and verifying keys for the transfer_public_to_private function into the cache. Only the proving key needs\n * to be inserted, the verifying key is automatically inserted by the SDK. This function will automatically check\n * that the keys match the expected checksum for transfer_public_to_private before inserting them into the cache.\n *\n * @param provingKey\n */\n insertTransferPublicToPrivateKeys(provingKey: ProvingKey) {\n if (provingKey.isTransferPublicToPrivateProver()) {\n this.cache.set(CREDITS_PROGRAM_KEYS.transfer_public_to_private.locator, [provingKey.toBytes(), VerifyingKey.transferPublicToPrivateVerifier().toBytes()]);\n } else {\n throw new Error(\"Attempted to insert invalid proving keys for transfer_public_to_private\");\n }\n }\n\n insertUnbondPublicKeys(provingKey: ProvingKey) {\n if (provingKey.isUnbondPublicProver()) {\n this.cache.set(CREDITS_PROGRAM_KEYS.unbond_public.locator, [provingKey.toBytes(), VerifyingKey.unbondPublicVerifier().toBytes()]);\n } else {\n throw new Error(\"Attempted to insert invalid proving keys for unbond_public\");\n }\n }\n}\n\n\nexport {OfflineKeyProvider, OfflineSearchParams}\n","import { logAndThrow, RecordPlaintext } from \"./index\";\nimport { Account } from \"./account\";\nimport { AleoNetworkClient } from \"./network-client\";\n\n/**\n * Interface for record search parameters. This allows for arbitrary search parameters to be passed to record provider\n * implementations.\n */\ninterface RecordSearchParams {\n [key: string]: any; // This allows for arbitrary keys with any type values\n}\n\n/**\n * Interface for a record provider. A record provider is used to find records for use in deployment and execution\n * transactions on the Aleo Network. A default implementation is provided by the NetworkRecordProvider class. However,\n * a custom implementation can be provided (say if records are synced locally to a database from the network) by\n * implementing this interface.\n */\ninterface RecordProvider {\n account: Account\n\n /**\n * Find a credits.aleo record with a given number of microcredits from the chosen provider\n *\n * @param {number} microcredits The number of microcredits to search for\n * @param {boolean} unspent Whether or not the record is unspent\n * @param {string[]} nonces Nonces of records already found so they are not found again\n * @param {RecordSearchParams} searchParameters Additional parameters to search for\n * @returns {Promise} The record if found, otherwise an error\n *\n * @example\n * // A class implementing record provider can be used to find a record with a given number of microcredits\n * const record = await recordProvider.findCreditsRecord(5000, true, []);\n *\n * // When a record is found but not yet used, its nonce should be added to the nonces array so that it is not\n * // found again if a subsequent search is performed\n * const record2 = await recordProvider.findCreditsRecord(5000, true, [record.nonce()]);\n *\n * // When the program manager is initialized with the record provider it will be used to find automatically find\n * // fee records and amount records for value transfers so that they do not need to be specified manually\n * const programManager = new ProgramManager(\"https://api.explorer.aleo.org/v1\", keyProvider, recordProvider);\n * programManager.transfer(1, \"aleo166q6ww6688cug7qxwe7nhctjpymydwzy2h7rscfmatqmfwnjvggqcad0at\", \"public\", 0.5);\n */\n findCreditsRecord(microcredits: number, unspent: boolean, nonces?: string[], searchParameters?: RecordSearchParams): Promise;\n\n /**\n * Find a list of credit.aleo records with a given number of microcredits from the chosen provider\n *\n * @param {number} microcreditAmounts A list of separate microcredit amounts to search for (e.g. [5000, 100000])\n * @param {boolean} unspent Whether or not the record is unspent\n * @param {string[]} nonces Nonces of records already found so that they are not found again\n * @param {RecordSearchParams} searchParameters Additional parameters to search for\n * @returns {Promise} A list of records with a value greater or equal to the amounts specified if such records exist, otherwise an error\n *\n * @example\n * // A class implementing record provider can be used to find a record with a given number of microcredits\n * const records = await recordProvider.findCreditsRecords([5000, 5000], true, []);\n *\n * // When a record is found but not yet used, it's nonce should be added to the nonces array so that it is not\n * // found again if a subsequent search is performed\n * const nonces = [];\n * records.forEach(record => { nonces.push(record.nonce()) });\n * const records2 = await recordProvider.findCreditsRecord(5000, true, nonces);\n *\n * // When the program manager is initialized with the record provider it will be used to find automatically find\n * // fee records and amount records for value transfers so that they do not need to be specified manually\n * const programManager = new ProgramManager(\"https://api.explorer.aleo.org/v1\", keyProvider, recordProvider);\n * programManager.transfer(1, \"aleo166q6ww6688cug7qxwe7nhctjpymydwzy2h7rscfmatqmfwnjvggqcad0at\", \"public\", 0.5);\n */\n findCreditsRecords(microcreditAmounts: number[], unspent: boolean, nonces?: string[], searchParameters?: RecordSearchParams): Promise;\n\n /**\n * Find an arbitrary record\n * @param {boolean} unspent Whether or not the record is unspent\n * @param {string[]} nonces Nonces of records already found so that they are not found again\n * @param {RecordSearchParams} searchParameters Additional parameters to search for\n * @returns {Promise} The record if found, otherwise an error\n *\n * @example\n * // The RecordSearchParams interface can be used to create parameters for custom record searches which can then\n * // be passed to the record provider. An example of how this would be done for the credits.aleo program is shown\n * // below.\n *\n * class CustomRecordSearch implements RecordSearchParams {\n * startHeight: number;\n * endHeight: number;\n * amount: number;\n * program: string;\n * recordName: string;\n * constructor(startHeight: number, endHeight: number, credits: number, maxRecords: number, programName: string, recordName: string) {\n * this.startHeight = startHeight;\n * this.endHeight = endHeight;\n * this.amount = amount;\n * this.program = programName;\n * this.recordName = recordName;\n * }\n * }\n *\n * const params = new CustomRecordSearch(0, 100, 5000, \"credits.aleo\", \"credits\");\n *\n * const record = await recordProvider.findRecord(true, [], params);\n */\n findRecord(unspent: boolean, nonces?: string[], searchParameters?: RecordSearchParams): Promise;\n\n /**\n * Find multiple records from arbitrary programs\n *\n * @param {boolean} unspent Whether or not the record is unspent\n * @param {string[]} nonces Nonces of records already found so that they are not found again\n * @param {RecordSearchParams} searchParameters Additional parameters to search for\n * @returns {Promise} The record if found, otherwise an error\n *\n * // The RecordSearchParams interface can be used to create parameters for custom record searches which can then\n * // be passed to the record provider. An example of how this would be done for the credits.aleo program is shown\n * // below.\n *\n * class CustomRecordSearch implements RecordSearchParams {\n * startHeight: number;\n * endHeight: number;\n * amount: number;\n * maxRecords: number;\n * programName: string;\n * recordName: string;\n * constructor(startHeight: number, endHeight: number, credits: number, maxRecords: number, programName: string, recordName: string) {\n * this.startHeight = startHeight;\n * this.endHeight = endHeight;\n * this.amount = amount;\n * this.maxRecords = maxRecords;\n * this.programName = programName;\n * this.recordName = recordName;\n * }\n * }\n *\n * const params = new CustomRecordSearch(0, 100, 5000, 2, \"credits.aleo\", \"credits\");\n * const records = await recordProvider.findRecord(true, [], params);\n */\n findRecords(unspent: boolean, nonces?: string[], searchParameters?: RecordSearchParams): Promise;\n}\n\n/**\n * A record provider implementation that uses the official Aleo API to find records for usage in program execution and\n * deployment, wallet functionality, and other use cases.\n */\nclass NetworkRecordProvider implements RecordProvider {\n account: Account;\n networkClient: AleoNetworkClient;\n constructor(account: Account, networkClient: AleoNetworkClient) {\n this.account = account;\n this.networkClient = networkClient;\n }\n\n /**\n * Set the account used to search for records\n *\n * @param {Account} account The account to use for searching for records\n */\n setAccount(account: Account) {\n this.account = account;\n }\n\n /**\n * Find a list of credit records with a given number of microcredits by via the official Aleo API\n *\n * @param {number[]} microcredits The number of microcredits to search for\n * @param {boolean} unspent Whether or not the record is unspent\n * @param {string[]} nonces Nonces of records already found so that they are not found again\n * @param {RecordSearchParams} searchParameters Additional parameters to search for\n * @returns {Promise} The record if found, otherwise an error\n *\n * @example\n * // Create a new NetworkRecordProvider\n * const networkClient = new AleoNetworkClient(\"https://api.explorer.aleo.org/v1\");\n * const keyProvider = new AleoKeyProvider();\n * const recordProvider = new NetworkRecordProvider(account, networkClient);\n *\n * // The record provider can be used to find records with a given number of microcredits\n * const record = await recordProvider.findCreditsRecord(5000, true, []);\n *\n * // When a record is found but not yet used, it's nonce should be added to the nonces parameter so that it is not\n * // found again if a subsequent search is performed\n * const records = await recordProvider.findCreditsRecords(5000, true, [record.nonce()]);\n *\n * // When the program manager is initialized with the record provider it will be used to find automatically find\n * // fee records and amount records for value transfers so that they do not need to be specified manually\n * const programManager = new ProgramManager(\"https://api.explorer.aleo.org/v1\", keyProvider, recordProvider);\n * programManager.transfer(1, \"aleo166q6ww6688cug7qxwe7nhctjpymydwzy2h7rscfmatqmfwnjvggqcad0at\", \"public\", 0.5);\n *\n * */\n async findCreditsRecords(microcredits: number[], unspent: boolean, nonces?: string[], searchParameters?: RecordSearchParams): Promise {\n let startHeight = 0;\n let endHeight = 0;\n\n if (searchParameters) {\n if (\"startHeight\" in searchParameters && typeof searchParameters[\"endHeight\"] == \"number\") {\n startHeight = searchParameters[\"startHeight\"];\n }\n\n if (\"endHeight\" in searchParameters && typeof searchParameters[\"endHeight\"] == \"number\") {\n endHeight = searchParameters[\"endHeight\"];\n }\n }\n\n // If the end height is not specified, use the current block height\n if (endHeight == 0) {\n const end = await this.networkClient.getLatestHeight();\n if (end instanceof Error) {\n throw logAndThrow(\"Unable to get current block height from the network\")\n }\n endHeight = end;\n }\n\n // If the start height is greater than the end height, throw an error\n if (startHeight >= endHeight) {\n throw logAndThrow(\"Start height must be less than end height\");\n }\n\n return await this.networkClient.findUnspentRecords(startHeight, endHeight, this.account.privateKey(), microcredits, undefined, nonces);\n }\n\n /**\n * Find a credit record with a given number of microcredits by via the official Aleo API\n *\n * @param {number} microcredits The number of microcredits to search for\n * @param {boolean} unspent Whether or not the record is unspent\n * @param {string[]} nonces Nonces of records already found so that they are not found again\n * @param {RecordSearchParams} searchParameters Additional parameters to search for\n * @returns {Promise} The record if found, otherwise an error\n *\n * @example\n * // Create a new NetworkRecordProvider\n * const networkClient = new AleoNetworkClient(\"https://api.explorer.aleo.org/v1\");\n * const keyProvider = new AleoKeyProvider();\n * const recordProvider = new NetworkRecordProvider(account, networkClient);\n *\n * // The record provider can be used to find records with a given number of microcredits\n * const record = await recordProvider.findCreditsRecord(5000, true, []);\n *\n * // When a record is found but not yet used, it's nonce should be added to the nonces parameter so that it is not\n * // found again if a subsequent search is performed\n * const records = await recordProvider.findCreditsRecords(5000, true, [record.nonce()]);\n *\n * // When the program manager is initialized with the record provider it will be used to find automatically find\n * // fee records and amount records for value transfers so that they do not need to be specified manually\n * const programManager = new ProgramManager(\"https://api.explorer.aleo.org/v1\", keyProvider, recordProvider);\n * programManager.transfer(1, \"aleo166q6ww6688cug7qxwe7nhctjpymydwzy2h7rscfmatqmfwnjvggqcad0at\", \"public\", 0.5);\n */\n async findCreditsRecord(microcredits: number, unspent: boolean, nonces?: string[], searchParameters?: RecordSearchParams): Promise {\n const records = await this.findCreditsRecords([microcredits], unspent, nonces, searchParameters);\n if (!(records instanceof Error) && records.length > 0) {\n return records[0];\n }\n console.error(\"Record not found with error:\", records);\n return new Error(\"Record not found\");\n }\n\n /**\n * Find an arbitrary record. WARNING: This function is not implemented yet and will throw an error.\n */\n async findRecord(unspent: boolean, nonces?: string[], searchParameters?: RecordSearchParams): Promise {\n throw new Error(\"Method not implemented.\");\n }\n\n /**\n * Find multiple arbitrary records. WARNING: This function is not implemented yet and will throw an error.\n */\n async findRecords(unspent: boolean, nonces?: string[], searchParameters?: RecordSearchParams): Promise {\n throw new Error(\"Method not implemented.\");\n }\n\n}\n\n/**\n * BlockHeightSearch is a RecordSearchParams implementation that allows for searching for records within a given\n * block height range.\n *\n * @example\n * // Create a new BlockHeightSearch\n * const params = new BlockHeightSearch(89995, 99995);\n *\n * // Create a new NetworkRecordProvider\n * const networkClient = new AleoNetworkClient(\"https://api.explorer.aleo.org/v1\");\n * const keyProvider = new AleoKeyProvider();\n * const recordProvider = new NetworkRecordProvider(account, networkClient);\n *\n * // The record provider can be used to find records with a given number of microcredits and the block height search\n * // can be used to find records within a given block height range\n * const record = await recordProvider.findCreditsRecord(5000, true, [], params);\n *\n */\nclass BlockHeightSearch implements RecordSearchParams {\n startHeight: number;\n endHeight: number;\n constructor(startHeight: number, endHeight: number) {\n this.startHeight = startHeight;\n this.endHeight = endHeight;\n }\n}\n\nexport { BlockHeightSearch, NetworkRecordProvider, RecordProvider, RecordSearchParams};\n","// Experimental example where SDK manages worker\n\nimport { wrap } from \"comlink\";\nimport { WorkerAPI } from './worker';\n\nlet singletonWorker: WorkerAPI | null = null;\n\nconst createAleoWorker = (): WorkerAPI => {\n if (!singletonWorker) {\n const worker = new Worker(new URL(\"worker.js\", import.meta.url), {\n type: \"module\",\n });\n singletonWorker = wrap(worker);\n }\n return singletonWorker;\n};\n\nexport { createAleoWorker };","import {\n Account,\n AleoKeyProvider,\n AleoNetworkClient,\n ExecutionResponse,\n FunctionKeyProvider,\n FunctionKeyPair,\n OfflineQuery,\n KeySearchParams,\n RecordPlaintext,\n RecordProvider,\n RecordSearchParams,\n PrivateKey,\n Program,\n ProgramImports,\n ProvingKey,\n VerifyingKey,\n Transaction,\n PRIVATE_TRANSFER_TYPES,\n VALID_TRANSFER_TYPES,\n logAndThrow,\n ProgramManagerBase as WasmProgramManager, verifyFunctionExecution, AleoKeyProviderParams, CREDITS_PROGRAM_KEYS,\n} from \"./index\";\nimport {Execution} from \"@provablehq/wasm/dist/crates/aleo_wasm\";\n\n/**\n * Represents the options for executing a transaction in the Aleo network.\n * This interface is used to specify the parameters required for building and submitting an execution transaction.\n *\n * @property {string} programName - The name of the program containing the function to be executed.\n * @property {string} functionName - The name of the function to execute within the program.\n * @property {number} fee - The fee to be paid for the transaction.\n * @property {boolean} privateFee - If true, uses a private record to pay the fee; otherwise, uses the account's public credit balance.\n * @property {string[]} inputs - The inputs to the function being executed.\n * @property {RecordSearchParams} [recordSearchParams] - Optional parameters for searching for a record to pay the execution transaction fee.\n * @property {KeySearchParams} [keySearchParams] - Optional parameters for finding the matching proving & verifying keys for the function.\n * @property {string | RecordPlaintext} [feeRecord] - Optional fee record to use for the transaction.\n * @property {ProvingKey} [provingKey] - Optional proving key to use for the transaction.\n * @property {VerifyingKey} [verifyingKey] - Optional verifying key to use for the transaction.\n * @property {PrivateKey} [privateKey] - Optional private key to use for the transaction.\n * @property {OfflineQuery} [offlineQuery] - Optional offline query if creating transactions in an offline environment.\n * @property {string | Program} [program] - Optional program source code to use for the transaction.\n * @property {ProgramImports} [imports] - Optional programs that the program being executed imports.\n */\ninterface ExecuteOptions {\n programName: string;\n functionName: string;\n fee: number;\n privateFee: boolean;\n inputs: string[];\n recordSearchParams?: RecordSearchParams;\n keySearchParams?: KeySearchParams;\n feeRecord?: string | RecordPlaintext;\n provingKey?: ProvingKey;\n verifyingKey?: VerifyingKey;\n privateKey?: PrivateKey;\n offlineQuery?: OfflineQuery;\n program?: string | Program;\n imports?: ProgramImports;\n}\n\n/**\n * The ProgramManager class is used to execute and deploy programs on the Aleo network and create value transfers.\n */\nclass ProgramManager {\n account: Account | undefined;\n keyProvider: FunctionKeyProvider;\n host: string;\n networkClient: AleoNetworkClient;\n recordProvider: RecordProvider | undefined;\n\n /** Create a new instance of the ProgramManager\n *\n * @param { string | undefined } host A host uri running the official Aleo API\n * @param { FunctionKeyProvider | undefined } keyProvider A key provider that implements {@link FunctionKeyProvider} interface\n * @param { RecordProvider | undefined } recordProvider A record provider that implements {@link RecordProvider} interface\n */\n constructor(host?: string | undefined, keyProvider?: FunctionKeyProvider | undefined, recordProvider?: RecordProvider | undefined) {\n this.host = host ? host : 'https://api.explorer.aleo.org/v1';\n this.networkClient = new AleoNetworkClient(this.host);\n \n this.keyProvider = keyProvider ? keyProvider : new AleoKeyProvider();\n this.recordProvider = recordProvider;\n }\n\n /**\n * Set the account to use for transaction submission to the Aleo network\n *\n * @param {Account} account Account to use for transaction submission\n */\n setAccount(account: Account) {\n this.account = account;\n }\n\n /**\n * Set the key provider that provides the proving and verifying keys for programs\n *\n * @param {FunctionKeyProvider} keyProvider\n */\n setKeyProvider(keyProvider: FunctionKeyProvider) {\n this.keyProvider = keyProvider;\n }\n\n /**\n * Set the host peer to use for transaction submission to the Aleo network\n *\n * @param host {string} Peer url to use for transaction submission\n */\n setHost(host: string) {\n this.host = host;\n this.networkClient.setHost(host);\n }\n\n /**\n * Set the record provider that provides records for transactions\n *\n * @param {RecordProvider} recordProvider\n */\n setRecordProvider(recordProvider: RecordProvider) {\n this.recordProvider = recordProvider;\n }\n\n /**\n * Deploy an Aleo program to the Aleo network\n *\n * @param {string} program Program source code\n * @param {number} fee Fee to pay for the transaction\n * @param {boolean} privateFee Use a private record to pay the fee. If false this will use the account's public credit balance\n * @param {RecordSearchParams | undefined} recordSearchParams Optional parameters for searching for a record to use\n * pay the deployment fee\n * @param {string | RecordPlaintext | undefined} feeRecord Optional Fee record to use for the transaction\n * @param {PrivateKey | undefined} privateKey Optional private key to use for the transaction\n * @returns {string | Error} The transaction id of the deployed program or a failure message from the network\n *\n * @example\n * // Create a new NetworkClient, KeyProvider, and RecordProvider\n * const networkClient = new AleoNetworkClient(\"https://api.explorer.aleo.org/v1\");\n * const keyProvider = new AleoKeyProvider();\n * const recordProvider = new NetworkRecordProvider(account, networkClient);\n *\n * // Initialize a program manager with the key provider to automatically fetch keys for deployments\n * const program = \"program hello_hello.aleo;\\n\\nfunction hello:\\n input r0 as u32.public;\\n input r1 as u32.private;\\n add r0 r1 into r2;\\n output r2 as u32.private;\\n\";\n * const programManager = new ProgramManager(\"https://api.explorer.aleo.org/v1\", keyProvider, recordProvider);\n *\n * // Define a fee in credits\n * const fee = 1.2;\n *\n * // Deploy the program\n * const tx_id = await programManager.deploy(program, fee);\n *\n * // Verify the transaction was successful\n * const transaction = await programManager.networkClient.getTransaction(tx_id);\n */\n async deploy(\n program: string,\n fee: number,\n privateFee: boolean,\n recordSearchParams?: RecordSearchParams,\n feeRecord?: string | RecordPlaintext,\n privateKey?: PrivateKey,\n ): Promise {\n // Ensure the program is valid and does not exist on the network\n try {\n const programObject = Program.fromString(program);\n let programSource;\n try {\n programSource = await this.networkClient.getProgram(programObject.id());\n } catch (e) {\n // Program does not exist on the network, deployment can proceed\n console.log(`Program ${programObject.id()} does not exist on the network, deploying...`);\n }\n if (typeof programSource == \"string\") {\n throw (`Program ${programObject.id()} already exists on the network, please rename your program`);\n }\n } catch (e) {\n throw logAndThrow(`Error validating program: ${e}`);\n }\n\n // Get the private key from the account if it is not provided in the parameters\n let deploymentPrivateKey = privateKey;\n if (typeof privateKey === \"undefined\" && typeof this.account !== \"undefined\") {\n deploymentPrivateKey = this.account.privateKey();\n }\n\n if (typeof deploymentPrivateKey === \"undefined\") {\n throw(\"No private key provided and no private key set in the ProgramManager\");\n }\n\n // Get the fee record from the account if it is not provided in the parameters\n try {\n feeRecord = privateFee ? await this.getCreditsRecord(fee, [], feeRecord, recordSearchParams) : undefined;\n } catch (e) {\n throw logAndThrow(`Error finding fee record. Record finder response: '${e}'. Please ensure you're connected to a valid Aleo network and a record with enough balance exists.`);\n }\n\n // Get the proving and verifying keys from the key provider\n let feeKeys;\n try {\n feeKeys = privateFee ? await this.keyProvider.feePrivateKeys() : await this.keyProvider.feePublicKeys();\n } catch (e) {\n throw logAndThrow(`Error finding fee keys. Key finder response: '${e}'. Please ensure your key provider is configured correctly.`);\n }\n const [feeProvingKey, feeVerifyingKey] = feeKeys;\n\n // Resolve the program imports if they exist\n let imports;\n try {\n imports = await this.networkClient.getProgramImports(program);\n } catch (e) {\n throw logAndThrow(`Error finding program imports. Network response: '${e}'. Please ensure you're connected to a valid Aleo network and the program is deployed to the network.`);\n }\n\n // Build a deployment transaction and submit it to the network\n const tx = await WasmProgramManager.buildDeploymentTransaction(deploymentPrivateKey, program, fee, feeRecord, this.host, imports, feeProvingKey, feeVerifyingKey);\n return await this.networkClient.submitTransaction(tx);\n }\n\n /**\n * Builds an execution transaction for submission to the Aleo network.\n *\n * @param {ExecuteOptions} options - The options for the execution transaction.\n * @returns {Promise} - A promise that resolves to the transaction or an error.\n *\n * @example\n * // Create a new NetworkClient, KeyProvider, and RecordProvider using official Aleo record, key, and network providers\n * const networkClient = new AleoNetworkClient(\"https://api.explorer.aleo.org/v1\");\n * const keyProvider = new AleoKeyProvider();\n * keyProvider.useCache = true;\n * const recordProvider = new NetworkRecordProvider(account, networkClient);\n *\n * // Initialize a program manager with the key provider to automatically fetch keys for executions\n * const programManager = new ProgramManager(\"https://api.explorer.aleo.org/v1\", keyProvider, recordProvider);\n *\n * // Build and execute the transaction\n * const transaction = await programManager.buildExecutionTransaction({\n * programName: \"hello_hello.aleo\",\n * functionName: \"hello_hello\",\n * fee: 0.020,\n * privateFee: false,\n * inputs: [\"5u32\", \"5u32\"],\n * keySearchParams: { \"cacheKey\": \"hello_hello:hello\" }\n * });\n * const result = await programManager.networkClient.submitTransaction(transaction);\n */\n async buildExecutionTransaction(options: ExecuteOptions): Promise {\n // Destructure the options object to access the parameters\n const {\n programName,\n functionName,\n fee,\n privateFee,\n inputs,\n recordSearchParams,\n keySearchParams,\n privateKey,\n offlineQuery\n } = options;\n\n let feeRecord = options.feeRecord;\n let provingKey = options.provingKey;\n let verifyingKey = options.verifyingKey;\n let program = options.program;\n let imports = options.imports;\n\n // Ensure the function exists on the network\n if (program === undefined) {\n try {\n program = (await this.networkClient.getProgram(programName));\n } catch (e) {\n throw logAndThrow(`Error finding ${programName}. Network response: '${e}'. Please ensure you're connected to a valid Aleo network the program is deployed to the network.`);\n }\n } else if (program instanceof Program) {\n program = program.toString();\n }\n\n // Get the private key from the account if it is not provided in the parameters\n let executionPrivateKey = privateKey;\n if (typeof privateKey === \"undefined\" && typeof this.account !== \"undefined\") {\n executionPrivateKey = this.account.privateKey();\n }\n\n if (typeof executionPrivateKey === \"undefined\") {\n throw(\"No private key provided and no private key set in the ProgramManager\");\n }\n\n // Get the fee record from the account if it is not provided in the parameters\n try {\n feeRecord = privateFee ? await this.getCreditsRecord(fee, [], feeRecord, recordSearchParams) : undefined;\n } catch (e) {\n throw logAndThrow(`Error finding fee record. Record finder response: '${e}'. Please ensure you're connected to a valid Aleo network and a record with enough balance exists.`);\n }\n\n // Get the fee proving and verifying keys from the key provider\n let feeKeys;\n try {\n feeKeys = privateFee ? await this.keyProvider.feePrivateKeys() : await this.keyProvider.feePublicKeys();\n } catch (e) {\n throw logAndThrow(`Error finding fee keys. Key finder response: '${e}'. Please ensure your key provider is configured correctly.`);\n }\n const [feeProvingKey, feeVerifyingKey] = feeKeys;\n\n // If the function proving and verifying keys are not provided, attempt to find them using the key provider\n if (!provingKey || !verifyingKey) {\n try {\n [provingKey, verifyingKey] = await this.keyProvider.functionKeys(keySearchParams);\n } catch (e) {\n console.log(`Function keys not found. Key finder response: '${e}'. The function keys will be synthesized`)\n }\n }\n\n // Resolve the program imports if they exist\n const numberOfImports = Program.fromString(program).getImports().length;\n if (numberOfImports > 0 && !imports) {\n try {\n imports = await this.networkClient.getProgramImports(programName);\n } catch (e) {\n throw logAndThrow(`Error finding program imports. Network response: '${e}'. Please ensure you're connected to a valid Aleo network and the program is deployed to the network.`);\n }\n }\n\n // Build an execution transaction and submit it to the network\n return await WasmProgramManager.buildExecutionTransaction(executionPrivateKey, program, functionName, inputs, fee, feeRecord, this.host, imports, provingKey, verifyingKey, feeProvingKey, feeVerifyingKey, offlineQuery);\n }\n\n /**\n * Builds an execution transaction for submission to the Aleo network.\n *\n * @param {ExecuteOptions} options - The options for the execution transaction.\n * @returns {Promise} - A promise that resolves to the transaction or an error.\n *\n * @example\n * // Create a new NetworkClient, KeyProvider, and RecordProvider using official Aleo record, key, and network providers\n * const networkClient = new AleoNetworkClient(\"https://api.explorer.aleo.org/v1\");\n * const keyProvider = new AleoKeyProvider();\n * keyProvider.useCache = true;\n * const recordProvider = new NetworkRecordProvider(account, networkClient);\n *\n * // Initialize a program manager with the key provider to automatically fetch keys for executions\n * const programManager = new ProgramManager(\"https://api.explorer.aleo.org/v1\", keyProvider, recordProvider);\n *\n * // Build and execute the transaction\n * const transaction = await programManager.execute({\n * programName: \"hello_hello.aleo\",\n * functionName: \"hello_hello\",\n * fee: 0.020,\n * privateFee: false,\n * inputs: [\"5u32\", \"5u32\"],\n * keySearchParams: { \"cacheKey\": \"hello_hello:hello\" }\n * });\n * const result = await programManager.networkClient.submitTransaction(transaction);\n */\n async execute(options: ExecuteOptions): Promise {\n const tx = await this.buildExecutionTransaction(options);\n return await this.networkClient.submitTransaction(tx);\n }\n\n /**\n * Run an Aleo program in offline mode\n *\n * @param {string} program Program source code containing the function to be executed\n * @param {string} function_name Function name to execute\n * @param {string[]} inputs Inputs to the function\n * @param {number} proveExecution Whether to prove the execution of the function and return an execution transcript\n * that contains the proof.\n * @param {string[] | undefined} imports Optional imports to the program\n * @param {KeySearchParams | undefined} keySearchParams Optional parameters for finding the matching proving &\n * verifying keys for the function\n * @param {ProvingKey | undefined} provingKey Optional proving key to use for the transaction\n * @param {VerifyingKey | undefined} verifyingKey Optional verifying key to use for the transaction\n * @param {PrivateKey | undefined} privateKey Optional private key to use for the transaction\n * @param {OfflineQuery | undefined} offlineQuery Optional offline query if creating transactions in an offline environment\n * @returns {Promise}\n *\n * @example\n * import { Account, Program } from '@provablehq/sdk';\n *\n * /// Create the source for the \"helloworld\" program\n * const program = \"program helloworld.aleo;\\n\\nfunction hello:\\n input r0 as u32.public;\\n input r1 as u32.private;\\n add r0 r1 into r2;\\n output r2 as u32.private;\\n\";\n * const programManager = new ProgramManager();\n *\n * /// Create a temporary account for the execution of the program\n * const account = new Account();\n * programManager.setAccount(account);\n *\n * /// Get the response and ensure that the program executed correctly\n * const executionResponse = await programManager.run(program, \"hello\", [\"5u32\", \"5u32\"]);\n * const result = executionResponse.getOutputs();\n * assert(result === [\"10u32\"]);\n */\n async run(\n program: string,\n function_name: string,\n inputs: string[],\n proveExecution: boolean,\n imports?: ProgramImports,\n keySearchParams?: KeySearchParams,\n provingKey?: ProvingKey,\n verifyingKey?: VerifyingKey,\n privateKey?: PrivateKey,\n offlineQuery?: OfflineQuery,\n ): Promise {\n // Get the private key from the account if it is not provided in the parameters\n let executionPrivateKey = privateKey;\n if (typeof privateKey === \"undefined\" && typeof this.account !== \"undefined\") {\n executionPrivateKey = this.account.privateKey();\n }\n\n if (typeof executionPrivateKey === \"undefined\") {\n throw(\"No private key provided and no private key set in the ProgramManager\");\n }\n\n // If the function proving and verifying keys are not provided, attempt to find them using the key provider\n if (!provingKey || !verifyingKey) {\n try {\n [provingKey, verifyingKey] = await this.keyProvider.functionKeys(keySearchParams);\n } catch (e) {\n console.log(`Function keys not found. Key finder response: '${e}'. The function keys will be synthesized`)\n }\n }\n\n // Run the program offline and return the result\n console.log(\"Running program offline\")\n console.log(\"Proving key: \", provingKey);\n console.log(\"Verifying key: \", verifyingKey);\n return WasmProgramManager.executeFunctionOffline(executionPrivateKey, program, function_name, inputs, proveExecution, false, imports, provingKey, verifyingKey, this.host, offlineQuery);\n }\n\n /**\n * Join two credits records into a single credits record\n *\n * @param {RecordPlaintext | string} recordOne First credits record to join\n * @param {RecordPlaintext | string} recordTwo Second credits record to join\n * @param {number} fee Fee in credits pay for the join transaction\n * @param {boolean} privateFee Use a private record to pay the fee. If false this will use the account's public credit balance\n * @param {RecordSearchParams | undefined} recordSearchParams Optional parameters for finding the fee record to use\n * to pay the fee for the join transaction\n * @param {RecordPlaintext | string | undefined} feeRecord Fee record to use for the join transaction\n * @param {PrivateKey | undefined} privateKey Private key to use for the join transaction\n * @param {OfflineQuery | undefined} offlineQuery Optional offline query if creating transactions in an offline environment\n * @returns {Promise}\n */\n async join(\n recordOne: RecordPlaintext | string,\n recordTwo: RecordPlaintext | string,\n fee: number,\n privateFee: boolean,\n recordSearchParams?: RecordSearchParams | undefined,\n feeRecord?: RecordPlaintext | string | undefined,\n privateKey?: PrivateKey,\n offlineQuery?: OfflineQuery,\n ): Promise {\n // Get the private key from the account if it is not provided in the parameters\n let executionPrivateKey = privateKey;\n if (typeof privateKey === \"undefined\" && typeof this.account !== \"undefined\") {\n executionPrivateKey = this.account.privateKey();\n }\n\n if (typeof executionPrivateKey === \"undefined\") {\n throw(\"No private key provided and no private key set in the ProgramManager\");\n }\n\n // Get the proving and verifying keys from the key provider\n let feeKeys;\n let joinKeys\n try {\n feeKeys = privateFee ? await this.keyProvider.feePrivateKeys() : await this.keyProvider.feePublicKeys();\n joinKeys = await this.keyProvider.joinKeys();\n } catch (e) {\n throw logAndThrow(`Error finding fee keys. Key finder response: '${e}'. Please ensure your key provider is configured correctly.`);\n }\n const [feeProvingKey, feeVerifyingKey] = feeKeys;\n const [joinProvingKey, joinVerifyingKey] = joinKeys;\n\n // Get the fee record from the account if it is not provided in the parameters\n try {\n feeRecord = privateFee ? await this.getCreditsRecord(fee, [], feeRecord, recordSearchParams) : undefined;\n } catch (e) {\n throw logAndThrow(`Error finding fee record. Record finder response: '${e}'. Please ensure you're connected to a valid Aleo network and a record with enough balance exists.`);\n }\n\n // Validate the records provided are valid plaintext records\n try {\n recordOne = recordOne instanceof RecordPlaintext ? recordOne : RecordPlaintext.fromString(recordOne);\n recordTwo = recordTwo instanceof RecordPlaintext ? recordTwo : RecordPlaintext.fromString(recordTwo);\n } catch (e) {\n throw logAndThrow('Records provided are not valid. Please ensure they are valid plaintext records.')\n }\n\n // Build an execution transaction and submit it to the network\n const tx = await WasmProgramManager.buildJoinTransaction(executionPrivateKey, recordOne, recordTwo, fee, feeRecord, this.host, joinProvingKey, joinVerifyingKey, feeProvingKey, feeVerifyingKey, offlineQuery);\n return await this.networkClient.submitTransaction(tx);\n }\n\n /**\n * Split credits into two new credits records\n *\n * @param {number} splitAmount Amount in microcredits to split from the original credits record\n * @param {RecordPlaintext | string} amountRecord Amount record to use for the split transaction\n * @param {PrivateKey | undefined} privateKey Optional private key to use for the split transaction\n * @param {OfflineQuery | undefined} offlineQuery Optional offline query if creating transactions in an offline environment\n * @returns {Promise}\n *\n * @example\n * // Create a new NetworkClient, KeyProvider, and RecordProvider\n * const networkClient = new AleoNetworkClient(\"https://api.explorer.aleo.org/v1\");\n * const keyProvider = new AleoKeyProvider();\n * const recordProvider = new NetworkRecordProvider(account, networkClient);\n *\n * // Initialize a program manager with the key provider to automatically fetch keys for executions\n * const programName = \"hello_hello.aleo\";\n * const programManager = new ProgramManager(\"https://api.explorer.aleo.org/v1\", keyProvider, recordProvider);\n * const record = \"{ owner: aleo184vuwr5u7u0ha5f5k44067dd2uaqewxx6pe5ltha5pv99wvhfqxqv339h4.private, microcredits: 45000000u64.private, _nonce: 4106205762862305308495708971985748592380064201230396559307556388725936304984group.public}\"\n * const tx_id = await programManager.split(25000000, record);\n * const transaction = await programManager.networkClient.getTransaction(tx_id);\n */\n async split(splitAmount: number, amountRecord: RecordPlaintext | string, privateKey?: PrivateKey, offlineQuery?: OfflineQuery): Promise {\n // Get the private key from the account if it is not provided in the parameters\n let executionPrivateKey = privateKey;\n if (typeof executionPrivateKey === \"undefined\" && typeof this.account !== \"undefined\") {\n executionPrivateKey = this.account.privateKey();\n }\n\n if (typeof executionPrivateKey === \"undefined\") {\n throw(\"No private key provided and no private key set in the ProgramManager\");\n }\n\n // Get the split keys from the key provider\n let splitKeys;\n try {\n splitKeys = await this.keyProvider.splitKeys();\n } catch (e) {\n throw logAndThrow(`Error finding fee keys. Key finder response: '${e}'. Please ensure your key provider is configured correctly.`);\n }\n const [splitProvingKey, splitVerifyingKey] = splitKeys;\n\n // Validate the record to be split\n try {\n amountRecord = amountRecord instanceof RecordPlaintext ? amountRecord : RecordPlaintext.fromString(amountRecord);\n } catch (e) {\n throw logAndThrow(\"Record provided is not valid. Please ensure it is a valid plaintext record.\");\n }\n\n // Build an execution transaction and submit it to the network\n const tx = await WasmProgramManager.buildSplitTransaction(executionPrivateKey, splitAmount, amountRecord, this.host, splitProvingKey, splitVerifyingKey, offlineQuery);\n return await this.networkClient.submitTransaction(tx);\n }\n\n /**\n * Pre-synthesize proving and verifying keys for a program\n *\n * @param program {string} The program source code to synthesize keys for\n * @param function_id {string} The function id to synthesize keys for\n * @param inputs {Array} Sample inputs to the function\n * @param privateKey {PrivateKey | undefined} Optional private key to use for the key synthesis\n *\n * @returns {Promise}\n */\n async synthesizeKeys(\n program: string,\n function_id: string,\n inputs: Array,\n privateKey?: PrivateKey,\n ): Promise {\n // Resolve the program imports if they exist\n let imports;\n\n let executionPrivateKey = privateKey;\n if (typeof executionPrivateKey === \"undefined\") {\n if (typeof this.account !== \"undefined\") {\n executionPrivateKey = this.account.privateKey();\n } else {\n executionPrivateKey = new PrivateKey();\n }\n }\n\n // Attempt to run an offline execution of the program and extract the proving and verifying keys\n try {\n imports = await this.networkClient.getProgramImports(program);\n const keyPair = await WasmProgramManager.synthesizeKeyPair(\n executionPrivateKey,\n program,\n function_id,\n inputs,\n imports\n );\n return [keyPair.provingKey(), keyPair.verifyingKey()];\n } catch (e) {\n throw logAndThrow(`Could not synthesize keys - error ${e}. Please ensure the program is valid and the inputs are correct.`);\n }\n }\n\n /**\n * Build a transaction to transfer credits to another account for later submission to the Aleo network\n *\n * @param {number} amount The amount of credits to transfer\n * @param {string} recipient The recipient of the transfer\n * @param {string} transferType The type of transfer to perform - options: 'private', 'privateToPublic', 'public', 'publicToPrivate'\n * @param {number} fee The fee to pay for the transfer\n * @param {boolean} privateFee Use a private record to pay the fee. If false this will use the account's public credit balance\n * @param {RecordSearchParams | undefined} recordSearchParams Optional parameters for finding the amount and fee\n * records for the transfer transaction\n * @param {RecordPlaintext | string} amountRecord Optional amount record to use for the transfer\n * @param {RecordPlaintext | string} feeRecord Optional fee record to use for the transfer\n * @param {PrivateKey | undefined} privateKey Optional private key to use for the transfer transaction\n * @param {OfflineQuery | undefined} offlineQuery Optional offline query if creating transactions in an offline environment\n * @returns {Promise} The transaction id of the transfer transaction\n *\n * @example\n * // Create a new NetworkClient, KeyProvider, and RecordProvider\n * const networkClient = new AleoNetworkClient(\"https://api.explorer.aleo.org/v1\");\n * const keyProvider = new AleoKeyProvider();\n * const recordProvider = new NetworkRecordProvider(account, networkClient);\n *\n * // Initialize a program manager with the key provider to automatically fetch keys for executions\n * const programName = \"hello_hello.aleo\";\n * const programManager = new ProgramManager(\"https://api.explorer.aleo.org/v1\", keyProvider, recordProvider);\n * await programManager.initialize();\n * const tx_id = await programManager.transfer(1, \"aleo1rhgdu77hgyqd3xjj8ucu3jj9r2krwz6mnzyd80gncr5fxcwlh5rsvzp9px\", \"private\", 0.2)\n * const transaction = await programManager.networkClient.getTransaction(tx_id);\n */\n async buildTransferTransaction(\n amount: number,\n recipient: string,\n transferType: string,\n fee: number,\n privateFee: boolean,\n recordSearchParams?: RecordSearchParams,\n amountRecord?: RecordPlaintext | string,\n feeRecord?: RecordPlaintext | string,\n privateKey?: PrivateKey,\n offlineQuery?: OfflineQuery\n ): Promise {\n // Validate the transfer type\n transferType = validateTransferType(transferType);\n\n // Get the private key from the account if it is not provided in the parameters\n let executionPrivateKey = privateKey;\n if (typeof executionPrivateKey === \"undefined\" && typeof this.account !== \"undefined\") {\n executionPrivateKey = this.account.privateKey();\n }\n\n if (typeof executionPrivateKey === \"undefined\") {\n throw(\"No private key provided and no private key set in the ProgramManager\");\n }\n\n // Get the proving and verifying keys from the key provider\n let feeKeys;\n let transferKeys\n try {\n feeKeys = privateFee ? await this.keyProvider.feePrivateKeys() : await this.keyProvider.feePublicKeys();\n transferKeys = await this.keyProvider.transferKeys(transferType);\n } catch (e) {\n throw logAndThrow(`Error finding fee keys. Key finder response: '${e}'. Please ensure your key provider is configured correctly.`);\n }\n const [feeProvingKey, feeVerifyingKey] = feeKeys;\n const [transferProvingKey, transferVerifyingKey] = transferKeys;\n\n // Get the amount and fee record from the account if it is not provided in the parameters\n try {\n // Track the nonces of the records found so no duplicate records are used\n const nonces: string[] = [];\n if (requiresAmountRecord(transferType)) {\n // If the transfer type is private and requires an amount record, get it from the record provider\n amountRecord = await this.getCreditsRecord(fee, [], amountRecord, recordSearchParams);\n nonces.push(amountRecord.nonce());\n } else {\n amountRecord = undefined;\n }\n feeRecord = privateFee ? await this.getCreditsRecord(fee, nonces, feeRecord, recordSearchParams) : undefined;\n } catch (e) {\n throw logAndThrow(`Error finding fee record. Record finder response: '${e}'. Please ensure you're connected to a valid Aleo network and a record with enough balance exists.`);\n }\n\n // Build an execution transaction and submit it to the network\n return await WasmProgramManager.buildTransferTransaction(executionPrivateKey, amount, recipient, transferType, amountRecord, fee, feeRecord, this.host, transferProvingKey, transferVerifyingKey, feeProvingKey, feeVerifyingKey, offlineQuery);\n }\n\n /**\n * Build a transfer_public transaction to transfer credits to another account for later submission to the Aleo network\n *\n * @param {number} amount The amount of credits to transfer\n * @param {string} recipient The recipient of the transfer\n * @param {string} transferType The type of transfer to perform - options: 'private', 'privateToPublic', 'public', 'publicToPrivate'\n * @param {number} fee The fee to pay for the transfer\n * @param {boolean} privateFee Use a private record to pay the fee. If false this will use the account's public credit balance\n * @param {RecordSearchParams | undefined} recordSearchParams Optional parameters for finding the amount and fee\n * records for the transfer transaction\n * @param {RecordPlaintext | string} amountRecord Optional amount record to use for the transfer\n * @param {RecordPlaintext | string} feeRecord Optional fee record to use for the transfer\n * @param {PrivateKey | undefined} privateKey Optional private key to use for the transfer transaction\n * @param {OfflineQuery | undefined} offlineQuery Optional offline query if creating transactions in an offline environment\n * @returns {Promise} The transaction id of the transfer transaction\n */\n async buildTransferPublicTransaction(\n amount: number,\n recipient: string,\n fee: number,\n privateKey?: PrivateKey,\n offlineQuery?: OfflineQuery\n ): Promise {\n return this.buildTransferTransaction(amount, recipient, \"public\", fee, false, undefined, undefined, undefined, privateKey, offlineQuery);\n }\n\n /**\n * Build a transfer_public_as_signer transaction to transfer credits to another account for later submission to the Aleo network\n *\n * @param {number} amount The amount of credits to transfer\n * @param {string} recipient The recipient of the transfer\n * @param {string} transferType The type of transfer to perform - options: 'private', 'privateToPublic', 'public', 'publicToPrivate'\n * @param {number} fee The fee to pay for the transfer\n * @param {boolean} privateFee Use a private record to pay the fee. If false this will use the account's public credit balance\n * @param {RecordSearchParams | undefined} recordSearchParams Optional parameters for finding the amount and fee\n * records for the transfer transaction\n * @param {RecordPlaintext | string} amountRecord Optional amount record to use for the transfer\n * @param {RecordPlaintext | string} feeRecord Optional fee record to use for the transfer\n * @param {PrivateKey | undefined} privateKey Optional private key to use for the transfer transaction\n * @param {OfflineQuery | undefined} offlineQuery Optional offline query if creating transactions in an offline environment\n * @returns {Promise} The transaction id of the transfer transaction\n */\n async buildTransferPublicAsSignerTransaction(\n amount: number,\n recipient: string,\n fee: number,\n privateKey?: PrivateKey,\n offlineQuery?: OfflineQuery\n ): Promise {\n return this.buildTransferTransaction(amount, recipient, \"public\", fee, false, undefined, undefined, undefined, privateKey, offlineQuery);\n }\n\n /**\n * Transfer credits to another account\n *\n * @param {number} amount The amount of credits to transfer\n * @param {string} recipient The recipient of the transfer\n * @param {string} transferType The type of transfer to perform - options: 'private', 'privateToPublic', 'public', 'publicToPrivate'\n * @param {number} fee The fee to pay for the transfer\n * @param {boolean} privateFee Use a private record to pay the fee. If false this will use the account's public credit balance\n * @param {RecordSearchParams | undefined} recordSearchParams Optional parameters for finding the amount and fee\n * records for the transfer transaction\n * @param {RecordPlaintext | string} amountRecord Optional amount record to use for the transfer\n * @param {RecordPlaintext | string} feeRecord Optional fee record to use for the transfer\n * @param {PrivateKey | undefined} privateKey Optional private key to use for the transfer transaction\n * @param {OfflineQuery | undefined} offlineQuery Optional offline query if creating transactions in an offline environment\n * @returns {Promise} The transaction id of the transfer transaction\n *\n * @example\n * // Create a new NetworkClient, KeyProvider, and RecordProvider\n * const networkClient = new AleoNetworkClient(\"https://api.explorer.aleo.org/v1\");\n * const keyProvider = new AleoKeyProvider();\n * const recordProvider = new NetworkRecordProvider(account, networkClient);\n *\n * // Initialize a program manager with the key provider to automatically fetch keys for executions\n * const programManager = new ProgramManager(\"https://api.explorer.aleo.org/v1\", keyProvider, recordProvider);\n * await programManager.initialize();\n * const tx_id = await programManager.transfer(1, \"aleo1rhgdu77hgyqd3xjj8ucu3jj9r2krwz6mnzyd80gncr5fxcwlh5rsvzp9px\", \"private\", 0.2)\n * const transaction = await programManager.networkClient.getTransaction(tx_id);\n */\n async transfer(\n amount: number,\n recipient: string,\n transferType: string,\n fee: number,\n privateFee: boolean,\n recordSearchParams?: RecordSearchParams,\n amountRecord?: RecordPlaintext | string,\n feeRecord?: RecordPlaintext | string,\n privateKey?: PrivateKey,\n offlineQuery?: OfflineQuery\n ): Promise {\n const tx = await this.buildTransferTransaction(amount, recipient, transferType, fee, privateFee, recordSearchParams, amountRecord, feeRecord, privateKey, offlineQuery);\n return await this.networkClient.submitTransaction(tx);\n }\n\n /**\n * Build transaction to bond credits to a validator for later submission to the Aleo Network\n *\n * @example\n * // Create a keyProvider to handle key management\n * const keyProvider = new AleoKeyProvider();\n * keyProvider.useCache = true;\n *\n * // Create a new ProgramManager with the key that will be used to bond credits\n * const programManager = new ProgramManager(\"https://api.explorer.aleo.org/v1\", keyProvider, undefined);\n * programManager.setAccount(new Account(\"YourPrivateKey\"));\n *\n * // Create the bonding transaction object for later submission\n * const tx = await programManager.buildBondPublicTransaction(\"aleo1jx8s4dvjepculny4wfrzwyhs3tlyv65r58ns3g6q2gm2esh7ps8sqy9s5j\", \"aleo1rhgdu77hgyqd3xjj8ucu3jj9r2krwz6mnzyd80gncr5fxcwlh5rsvzp9px\", \"aleo1feya8sjy9k2zflvl2dx39pdsq5tju28elnp2ektnn588uu9ghv8s84msv9\", 2000000);\n * console.log(tx);\n *\n * // The transaction can be later submitted to the network using the network client.\n * const result = await programManager.networkClient.submitTransaction(tx);\n *\n * @returns string\n * @param {string} staker_address Address of the staker who is bonding the credits\n * @param {string} validator_address Address of the validator to bond to, if this address is the same as the staker (i.e. the\n * executor of this function), it will attempt to bond the credits as a validator. Bonding as a validator currently\n * requires a minimum of 10,000,000 credits to bond (subject to change). If the address is specified is an existing\n * validator and is different from the address of the executor of this function, it will bond the credits to that\n * validator's staking committee as a delegator. A minimum of 10 credits is required to bond as a delegator.\n * @param {string} withdrawal_address Address to withdraw the staked credits to when unbond_public is called.\n * @param {number} amount The amount of credits to bond\n * @param {Partial} options - Override default execution options.\n */\n async buildBondPublicTransaction(staker_address: string, validator_address: string, withdrawal_address: string, amount: number, options: Partial = {}) {\n const scaledAmount = Math.trunc(amount * 1000000);\n\n const {\n programName = \"credits.aleo\",\n functionName = \"bond_public\",\n fee = options.fee || 0.86,\n privateFee = false,\n inputs = [staker_address, validator_address, withdrawal_address, `${scaledAmount.toString()}u64`],\n keySearchParams = new AleoKeyProviderParams({\n proverUri: CREDITS_PROGRAM_KEYS.bond_public.prover,\n verifierUri: CREDITS_PROGRAM_KEYS.bond_public.verifier,\n cacheKey: \"credits.aleo/bond_public\"\n }),\n program = this.creditsProgram(),\n ...additionalOptions\n } = options;\n\n const executeOptions: ExecuteOptions = {\n programName,\n functionName,\n fee,\n privateFee,\n inputs,\n keySearchParams,\n ...additionalOptions\n };\n\n return await this.buildExecutionTransaction(executeOptions);\n }\n\n /**\n * Bond credits to validator.\n *\n * @example\n * // Create a keyProvider to handle key management\n * const keyProvider = new AleoKeyProvider();\n * keyProvider.useCache = true;\n *\n * // Create a new ProgramManager with the key that will be used to bond credits\n * const programManager = new ProgramManager(\"https://api.explorer.aleo.org/v1\", keyProvider, undefined);\n * programManager.setAccount(new Account(\"YourPrivateKey\"));\n *\n * // Create the bonding transaction\n * const tx_id = await programManager.bondPublic(\"aleo1jx8s4dvjepculny4wfrzwyhs3tlyv65r58ns3g6q2gm2esh7ps8sqy9s5j\", \"aleo1rhgdu77hgyqd3xjj8ucu3jj9r2krwz6mnzyd80gncr5fxcwlh5rsvzp9px\", \"aleo1feya8sjy9k2zflvl2dx39pdsq5tju28elnp2ektnn588uu9ghv8s84msv9\", 2000000);\n *\n * @returns string\n * @param {string} staker_address Address of the staker who is bonding the credits\n * @param {string} validator_address Address of the validator to bond to, if this address is the same as the signer (i.e. the\n * executor of this function), it will attempt to bond the credits as a validator. Bonding as a validator currently\n * requires a minimum of 1,000,000 credits to bond (subject to change). If the address is specified is an existing\n * validator and is different from the address of the executor of this function, it will bond the credits to that\n * validator's staking committee as a delegator. A minimum of 10 credits is required to bond as a delegator.\n * @param {string} withdrawal_address Address to withdraw the staked credits to when unbond_public is called.\n * @param {number} amount The amount of credits to bond\n * @param {Options} options Options for the execution\n */\n async bondPublic(staker_address: string, validator_address: string, withdrawal_address:string, amount: number, options: Partial = {}) {\n const tx = await this.buildBondPublicTransaction(staker_address, validator_address, withdrawal_address, amount, options);\n return await this.networkClient.submitTransaction(tx);\n }\n\n /**\n * Build a bond_validator transaction for later submission to the Aleo Network.\n *\n * @example\n * // Create a keyProvider to handle key management\n * const keyProvider = new AleoKeyProvider();\n * keyProvider.useCache = true;\n *\n * // Create a new ProgramManager with the key that will be used to bond credits\n * const programManager = new ProgramManager(\"https://api.explorer.aleo.org/v1\", keyProvider, undefined);\n * programManager.setAccount(new Account(\"YourPrivateKey\"));\n *\n * // Create the bond validator transaction object for later use.\n * const tx = await programManager.buildBondValidatorTransaction(\"aleo1rhgdu77hgyqd3xjj8ucu3jj9r2krwz6mnzyd80gncr5fxcwlh5rsvzp9px\", \"aleo1feya8sjy9k2zflvl2dx39pdsq5tju28elnp2ektnn588uu9ghv8s84msv9\", 2000000);\n * console.log(tx);\n *\n * // The transaction can later be submitted to the network using the network client.\n * const tx_id = await programManager.networkClient.submitTransaction(tx);\n *\n * @returns string\n * @param {string} validator_address Address of the validator to bond to, if this address is the same as the staker (i.e. the\n * executor of this function), it will attempt to bond the credits as a validator. Bonding as a validator currently\n * requires a minimum of 10,000,000 credits to bond (subject to change). If the address is specified is an existing\n * validator and is different from the address of the executor of this function, it will bond the credits to that\n * validator's staking committee as a delegator. A minimum of 10 credits is required to bond as a delegator.\n * @param {string} withdrawal_address Address to withdraw the staked credits to when unbond_public is called.\n * @param {number} amount The amount of credits to bond\n * @param {number} commission The commission rate for the validator (must be between 0 and 100 - an error will be thrown if it is not)\n * @param {Partial} options - Override default execution options.\n */\n async buildBondValidatorTransaction(validator_address: string, withdrawal_address: string, amount: number, commission: number, options: Partial = {}) {\n const scaledAmount = Math.trunc(amount * 1000000);\n\n const adjustedCommission = Math.trunc(commission)\n\n const {\n programName = \"credits.aleo\",\n functionName = \"bond_validator\",\n fee = options.fee || 0.86,\n privateFee = false,\n inputs = [validator_address, withdrawal_address, `${scaledAmount.toString()}u64`, `${adjustedCommission.toString()}u8`],\n keySearchParams = new AleoKeyProviderParams({\n proverUri: CREDITS_PROGRAM_KEYS.bond_validator.prover,\n verifierUri: CREDITS_PROGRAM_KEYS.bond_validator.verifier,\n cacheKey: \"credits.aleo/bond_validator\"\n }),\n program = this.creditsProgram(),\n ...additionalOptions\n } = options;\n\n const executeOptions: ExecuteOptions = {\n programName,\n functionName,\n fee,\n privateFee,\n inputs,\n keySearchParams,\n ...additionalOptions\n };\n\n return await this.buildExecutionTransaction(executeOptions);\n }\n\n /**\n * Build transaction to bond a validator.\n *\n * @example\n * // Create a keyProvider to handle key management\n * const keyProvider = new AleoKeyProvider();\n * keyProvider.useCache = true;\n *\n * // Create a new ProgramManager with the key that will be used to bond credits\n * const programManager = new ProgramManager(\"https://api.explorer.aleo.org/v1\", keyProvider, undefined);\n * programManager.setAccount(new Account(\"YourPrivateKey\"));\n *\n * // Create the bonding transaction\n * const tx_id = await programManager.bondValidator(\"aleo1rhgdu77hgyqd3xjj8ucu3jj9r2krwz6mnzyd80gncr5fxcwlh5rsvzp9px\", \"aleo1feya8sjy9k2zflvl2dx39pdsq5tju28elnp2ektnn588uu9ghv8s84msv9\", 2000000);\n *\n * @returns string\n * @param {string} validator_address Address of the validator to bond to, if this address is the same as the staker (i.e. the\n * executor of this function), it will attempt to bond the credits as a validator. Bonding as a validator currently\n * requires a minimum of 10,000,000 credits to bond (subject to change). If the address is specified is an existing\n * validator and is different from the address of the executor of this function, it will bond the credits to that\n * validator's staking committee as a delegator. A minimum of 10 credits is required to bond as a delegator.\n * @param {string} withdrawal_address Address to withdraw the staked credits to when unbond_public is called.\n * @param {number} amount The amount of credits to bond\n * @param {number} commission The commission rate for the validator (must be between 0 and 100 - an error will be thrown if it is not)\n * @param {Partial} options - Override default execution options.\n */\n async bondValidator(validator_address: string, withdrawal_address: string, amount: number, commission: number, options: Partial = {}) {\n const tx = await this.buildBondValidatorTransaction(validator_address, withdrawal_address, amount, commission, options);\n return await this.networkClient.submitTransaction(tx);\n }\n\n /**\n * Build a transaction to unbond public credits from a validator in the Aleo network.\n *\n * @param {string} staker_address - The address of the staker who is unbonding the credits.\n * @param {number} amount - The amount of credits to unbond (scaled by 1,000,000).\n * @param {Partial} options - Override default execution options.\n * @returns {Promise} - A promise that resolves to the transaction or an error message.\n *\n * @example\n * // Create a keyProvider to handle key management.\n * const keyProvider = new AleoKeyProvider();\n * keyProvider.useCache = true;\n *\n * // Create a new ProgramManager with the key that will be used to unbond credits.\n * const programManager = new ProgramManager(\"https://api.explorer.aleo.org/v1\", keyProvider, undefined);\n * const tx = await programManager.buildUnbondPublicTransaction(\"aleo1jx8s4dvjepculny4wfrzwyhs3tlyv65r58ns3g6q2gm2esh7ps8sqy9s5j\", 2000000);\n * console.log(tx);\n *\n * // The transaction can be submitted later to the network using the network client.\n * programManager.networkClient.submitTransaction(tx);\n */\n async buildUnbondPublicTransaction(staker_address: string, amount: number, options: Partial = {}): Promise {\n const scaledAmount = Math.trunc(amount * 1000000);\n\n const {\n programName = \"credits.aleo\",\n functionName = \"unbond_public\",\n fee = options.fee || 1.3,\n privateFee = false,\n inputs = [staker_address, `${scaledAmount.toString()}u64`],\n keySearchParams = new AleoKeyProviderParams({\n proverUri: CREDITS_PROGRAM_KEYS.unbond_public.prover,\n verifierUri: CREDITS_PROGRAM_KEYS.unbond_public.verifier,\n cacheKey: \"credits.aleo/unbond_public\"\n }),\n program = this.creditsProgram(),\n ...additionalOptions\n } = options;\n\n const executeOptions: ExecuteOptions = {\n programName,\n functionName,\n fee,\n privateFee,\n inputs,\n keySearchParams,\n ...additionalOptions\n };\n\n return this.buildExecutionTransaction(executeOptions);\n }\n\n /**\n * Unbond a specified amount of staked credits.\n *\n * @example\n * // Create a keyProvider to handle key management\n * const keyProvider = new AleoKeyProvider();\n * keyProvider.useCache = true;\n *\n * // Create a new ProgramManager with the key that will be used to bond credits\n * const programManager = new ProgramManager(\"https://api.explorer.aleo.org/v1\", keyProvider, undefined);\n * programManager.setAccount(new Account(\"YourPrivateKey\"));\n *\n * // Create the bonding transaction and send it to the network\n * const tx_id = await programManager.unbondPublic(\"aleo1jx8s4dvjepculny4wfrzwyhs3tlyv65r58ns3g6q2gm2esh7ps8sqy9s5j\", 10);\n *\n * @returns string\n * @param {string} staker_address Address of the staker who is unbonding the credits\n * @param {number} amount Amount of credits to unbond. If the address of the executor of this function is an\n * existing validator, it will subtract this amount of credits from the validator's staked credits. If there are\n * less than 1,000,000 credits staked pool after the unbond, the validator will be removed from the validator set.\n * If the address of the executor of this function is not a validator and has credits bonded as a delegator, it will\n * subtract this amount of credits from the delegator's staked credits. If there are less than 10 credits bonded\n * after the unbond operation, the delegator will be removed from the validator's staking pool.\n * @param {ExecuteOptions} options Options for the execution\n */\n async unbondPublic(staker_address: string, amount: number, options: Partial = {}): Promise {\n const tx = await this.buildUnbondPublicTransaction(staker_address, amount, options);\n return await this.networkClient.submitTransaction(tx);\n }\n\n /**\n * Build a transaction to claim unbonded public credits in the Aleo network.\n *\n * @param {string} staker_address - The address of the staker who is claiming the credits.\n * @param {Partial} options - Override default execution options.\n * @returns {Promise} - A promise that resolves to the transaction or an error message.\n *\n * @example\n * // Create a keyProvider to handle key management\n * const keyProvider = new AleoKeyProvider();\n * keyProvider.useCache = true;\n *\n * // Create a new ProgramManager with the key that will be used to claim unbonded credits.\n * const programManager = new ProgramManager(\"https://api.explorer.aleo.org/v1\", keyProvider, undefined);\n *\n * // Create the claim unbonded transaction object for later use.\n * const tx = await programManager.buildClaimUnbondPublicTransaction(\"aleo1jx8s4dvjepculny4wfrzwyhs3tlyv65r58ns3g6q2gm2esh7ps8sqy9s5j\");\n * console.log(tx);\n *\n * // The transaction can be submitted later to the network using the network client.\n * programManager.networkClient.submitTransaction(tx);\n */\n async buildClaimUnbondPublicTransaction(staker_address: string, options: Partial = {}): Promise {\n const {\n programName = \"credits.aleo\",\n functionName = \"claim_unbond_public\",\n fee = options.fee || 2,\n privateFee = false,\n inputs = [staker_address],\n keySearchParams = new AleoKeyProviderParams({\n proverUri: CREDITS_PROGRAM_KEYS.claim_unbond_public.prover,\n verifierUri: CREDITS_PROGRAM_KEYS.claim_unbond_public.verifier,\n cacheKey: \"credits.aleo/claim_unbond_public\"\n }),\n program = this.creditsProgram(),\n ...additionalOptions\n } = options;\n\n const executeOptions: ExecuteOptions = {\n programName,\n functionName,\n fee,\n privateFee,\n inputs,\n keySearchParams,\n ...additionalOptions\n };\n\n return await this.buildExecutionTransaction(executeOptions);\n }\n\n /**\n * Claim unbonded credits. If credits have been unbonded by the account executing this function, this method will\n * claim them and add them to the public balance of the account.\n *\n * @example\n * // Create a keyProvider to handle key management\n * const keyProvider = new AleoKeyProvider();\n * keyProvider.useCache = true;\n *\n * // Create a new ProgramManager with the key that will be used to bond credits\n * const programManager = new ProgramManager(\"https://api.explorer.aleo.org/v1\", keyProvider, undefined);\n * programManager.setAccount(new Account(\"YourPrivateKey\"));\n *\n * // Create the bonding transaction\n * const tx_id = await programManager.claimUnbondPublic(\"aleo1jx8s4dvjepculny4wfrzwyhs3tlyv65r58ns3g6q2gm2esh7ps8sqy9s5j\");\n *\n * @param {string} staker_address Address of the staker who is claiming the credits\n * @param {ExecuteOptions} options\n * @returns string\n */\n async claimUnbondPublic(staker_address: string, options: Partial = {}): Promise {\n const tx = await this.buildClaimUnbondPublicTransaction(staker_address, options);\n return await this.networkClient.submitTransaction(tx);\n }\n\n /**\n * Build a set_validator_state transaction for later usage.\n *\n * This function allows a validator to set their state to be either opened or closed to new stakers.\n * When the validator is open to new stakers, any staker (including the validator) can bond or unbond from the validator.\n * When the validator is closed to new stakers, existing stakers can still bond or unbond from the validator, but new stakers cannot bond.\n *\n * This function serves two primary purposes:\n * 1. Allow a validator to leave the committee, by closing themselves to stakers and then unbonding all of their stakers.\n * 2. Allow a validator to maintain their % of stake, by closing themselves to allowing more stakers to bond to them.\n *\n * @example\n * // Create a keyProvider to handle key management\n * const keyProvider = new AleoKeyProvider();\n * keyProvider.useCache = true;\n *\n * // Create a new ProgramManager with the key that will be used to bond credits\n * const programManager = new ProgramManager(\"https://api.explorer.aleo.org/v1\", keyProvider, undefined);\n * programManager.setAccount(new Account(\"ValidatorPrivateKey\"));\n *\n * // Create the bonding transaction\n * const tx = await programManager.buildSetValidatorStateTransaction(true);\n *\n * // The transaction can be submitted later to the network using the network client.\n * programManager.networkClient.submitTransaction(tx);\n *\n * @returns string\n * @param {boolean} validator_state\n * @param {Partial} options - Override default execution options\n */\n async buildSetValidatorStateTransaction(validator_state: boolean, options: Partial = {}) {\n const {\n programName = \"credits.aleo\",\n functionName = \"set_validator_state\",\n fee = 1,\n privateFee = false,\n inputs = [validator_state.toString()],\n keySearchParams = new AleoKeyProviderParams({\n proverUri: CREDITS_PROGRAM_KEYS.set_validator_state.prover,\n verifierUri: CREDITS_PROGRAM_KEYS.set_validator_state.verifier,\n cacheKey: \"credits.aleo/set_validator_state\"\n }),\n ...additionalOptions\n } = options;\n\n const executeOptions: ExecuteOptions = {\n programName,\n functionName,\n fee,\n privateFee,\n inputs,\n keySearchParams,\n ...additionalOptions\n };\n\n return await this.execute(executeOptions);\n }\n\n /**\n * Submit a set_validator_state transaction to the Aleo Network.\n *\n * This function allows a validator to set their state to be either opened or closed to new stakers.\n * When the validator is open to new stakers, any staker (including the validator) can bond or unbond from the validator.\n * When the validator is closed to new stakers, existing stakers can still bond or unbond from the validator, but new stakers cannot bond.\n *\n * This function serves two primary purposes:\n * 1. Allow a validator to leave the committee, by closing themselves to stakers and then unbonding all of their stakers.\n * 2. Allow a validator to maintain their % of stake, by closing themselves to allowing more stakers to bond to them.\n *\n * @example\n * // Create a keyProvider to handle key management\n * const keyProvider = new AleoKeyProvider();\n * keyProvider.useCache = true;\n *\n * // Create a new ProgramManager with the key that will be used to bond credits\n * const programManager = new ProgramManager(\"https://api.explorer.aleo.org/v1\", keyProvider, undefined);\n * programManager.setAccount(new Account(\"ValidatorPrivateKey\"));\n *\n * // Create the bonding transaction\n * const tx_id = await programManager.setValidatorState(true);\n *\n * @returns string\n * @param {boolean} validator_state\n * @param {Partial} options - Override default execution options\n */\n async setValidatorState(validator_state: boolean, options: Partial = {}) {\n const tx = await this.buildSetValidatorStateTransaction(validator_state, options);\n return this.networkClient.submitTransaction(tx);\n }\n\n /**\n * Verify a proof of execution from an offline execution\n *\n * @param {executionResponse} executionResponse\n * @returns {boolean} True if the proof is valid, false otherwise\n */\n verifyExecution(executionResponse: ExecutionResponse): boolean {\n try {\n const execution = executionResponse.getExecution();\n const function_id = executionResponse.getFunctionId();\n const program = executionResponse.getProgram();\n const verifyingKey = executionResponse.getVerifyingKey();\n return verifyFunctionExecution(execution, verifyingKey, program, function_id);\n } catch(e) {\n console.warn(\"The execution was not found in the response, cannot verify the execution\");\n return false;\n }\n }\n\n /**\n * Create a program object from a program's source code\n *\n * @param {string} program Program source code\n * @returns {Program | Error} The program object\n */\n createProgramFromSource(program: string): Program | Error {\n return Program.fromString(program);\n }\n\n /**\n * Get the credits program object\n *\n * @returns {Program} The credits program object\n */\n creditsProgram(): Program {\n return Program.getCreditsProgram();\n }\n\n /**\n * Verify a program is valid\n *\n * @param {string} program The program source code\n */\n verifyProgram(program: string): boolean {\n try {\n Program.fromString(program);\n return true;\n } catch (e) {\n return false;\n }\n }\n\n // Internal utility function for getting a credits.aleo record\n async getCreditsRecord(amount: number, nonces: string[], record?: RecordPlaintext | string, params?: RecordSearchParams): Promise {\n try {\n return record instanceof RecordPlaintext ? record : RecordPlaintext.fromString(record);\n } catch (e) {\n try {\n const recordProvider = this.recordProvider;\n return (await recordProvider.findCreditsRecord(amount, true, nonces, params))\n } catch (e) {\n throw logAndThrow(`Error finding fee record. Record finder response: '${e}'. Please ensure you're connected to a valid Aleo network and a record with enough balance exists.`);\n }\n }\n }\n}\n\n// Ensure the transfer type requires an amount record\nfunction requiresAmountRecord(transferType: string): boolean {\n return PRIVATE_TRANSFER_TYPES.has(transferType);\n}\n\n// Validate the transfer type\nfunction validateTransferType(transferType: string): string | Error {\n return VALID_TRANSFER_TYPES.has(transferType) ? transferType :\n logAndThrow(`Invalid transfer type '${transferType}'. Valid transfer types are 'private', 'privateToPublic', 'public', and 'publicToPrivate'.`);\n}\n\nexport { ProgramManager }\n","import {VerifyingKey, Metadata} from \"@provablehq/wasm\";\n\nconst KEY_STORE = Metadata.baseUrl();\n\ninterface Key {\n name: string,\n locator: string,\n prover: string,\n verifier: string,\n verifyingKey: () => VerifyingKey,\n}\n\nfunction convert(metadata: Metadata): Key {\n // This looks up the method name in VerifyingKey\n const verifyingKey = (VerifyingKey as any)[metadata.verifyingKey];\n\n if (!verifyingKey) {\n throw new Error(\"Invalid method name: \" + metadata.verifyingKey);\n }\n\n return {\n name: metadata.name,\n locator: metadata.locator,\n prover: metadata.prover,\n verifier: metadata.verifier,\n verifyingKey,\n };\n}\n\nconst CREDITS_PROGRAM_KEYS = {\n bond_public: convert(Metadata.bond_public()),\n bond_validator: convert(Metadata.bond_validator()),\n claim_unbond_public: convert(Metadata.claim_unbond_public()),\n fee_private: convert(Metadata.fee_private()),\n fee_public: convert(Metadata.fee_public()),\n inclusion: convert(Metadata.inclusion()),\n join: convert(Metadata.join()),\n set_validator_state: convert(Metadata.set_validator_state()),\n split: convert(Metadata.split()),\n transfer_private: convert(Metadata.transfer_private()),\n transfer_private_to_public: convert(Metadata.transfer_private_to_public()),\n transfer_public: convert(Metadata.transfer_public()),\n transfer_public_as_signer: convert(Metadata.transfer_public_as_signer()),\n transfer_public_to_private: convert(Metadata.transfer_public_to_private()),\n unbond_public: convert(Metadata.unbond_public()),\n getKey: function(key: string): Key | Error {\n if (this.hasOwnProperty(key)) {\n return (this as any)[key] as Key;\n } else {\n return new Error(`Key \"${key}\" not found.`);\n }\n }\n};\n\nconst PRIVATE_TRANSFER_TYPES = new Set([\n \"transfer_private\",\n \"private\",\n \"transferPrivate\",\n \"transfer_private_to_public\",\n \"privateToPublic\",\n \"transferPrivateToPublic\",\n]);\nconst VALID_TRANSFER_TYPES = new Set([\n \"transfer_private\",\n \"private\",\n \"transferPrivate\",\n \"transfer_private_to_public\",\n \"privateToPublic\",\n \"transferPrivateToPublic\",\n \"transfer_public\",\n \"transfer_public_as_signer\",\n \"public\",\n \"public_as_signer\",\n \"transferPublic\",\n \"transferPublicAsSigner\",\n \"transfer_public_to_private\",\n \"publicToPrivate\",\n \"publicAsSigner\",\n \"transferPublicToPrivate\",\n]);\nconst PRIVATE_TRANSFER = new Set([\n \"private\",\n \"transfer_private\",\n \"transferPrivate\",\n]);\nconst PRIVATE_TO_PUBLIC_TRANSFER = new Set([\n \"private_to_public\",\n \"privateToPublic\",\n \"transfer_private_to_public\",\n \"transferPrivateToPublic\",\n]);\nconst PUBLIC_TRANSFER = new Set([\n \"public\",\n \"transfer_public\",\n \"transferPublic\",\n]);\nconst PUBLIC_TRANSFER_AS_SIGNER = new Set([\n \"public_as_signer\",\n \"transfer_public_as_signer\",\n \"transferPublicAsSigner\",\n]);\nconst PUBLIC_TO_PRIVATE_TRANSFER = new Set([\n \"public_to_private\",\n \"publicToPrivate\",\n \"transfer_public_to_private\",\n \"transferPublicToPrivate\",\n]);\n\nfunction logAndThrow(message: string): Error {\n console.error(message);\n throw message;\n}\n\nimport { Account } from \"./account\";\nimport { AleoNetworkClient, ProgramImports } from \"./network-client\";\nimport { Block } from \"./models/block\";\nimport { Execution } from \"./models/execution\";\nimport { Input } from \"./models/input\";\nimport { Output } from \"./models/output\";\nimport { TransactionModel } from \"./models/transactionModel\";\nimport { Transition } from \"./models/transition\";\nimport {\n AleoKeyProvider,\n AleoKeyProviderParams,\n AleoKeyProviderInitParams,\n CachedKeyPair,\n FunctionKeyPair,\n FunctionKeyProvider,\n KeySearchParams,\n} from \"./function-key-provider\";\nimport {\n OfflineKeyProvider,\n OfflineSearchParams\n} from \"./offline-key-provider\";\nimport {\n BlockHeightSearch,\n NetworkRecordProvider,\n RecordProvider,\n RecordSearchParams,\n} from \"./record-provider\";\n\n// @TODO: This function is no longer needed, remove it.\nasync function initializeWasm() {\n console.warn(\"initializeWasm is deprecated, you no longer need to use it\");\n}\n\nexport { createAleoWorker } from \"./managed-worker\";\n\nexport { ProgramManager } from \"./program-manager\";\n\nexport {\n Address,\n Execution as FunctionExecution,\n ExecutionResponse,\n Field,\n OfflineQuery,\n PrivateKey,\n PrivateKeyCiphertext,\n Program,\n ProgramManager as ProgramManagerBase,\n ProvingKey,\n RecordCiphertext,\n RecordPlaintext,\n Signature,\n Transaction,\n VerifyingKey,\n ViewKey,\n initThreadPool,\n verifyFunctionExecution,\n} from \"@provablehq/wasm\";\n\nexport { initializeWasm };\n\nexport {\n Account,\n AleoKeyProvider,\n AleoKeyProviderParams,\n AleoKeyProviderInitParams,\n AleoNetworkClient,\n Block,\n BlockHeightSearch,\n CachedKeyPair,\n Execution,\n FunctionKeyPair,\n FunctionKeyProvider,\n Input,\n Key,\n KeySearchParams,\n NetworkRecordProvider,\n ProgramImports,\n OfflineKeyProvider,\n OfflineSearchParams,\n Output,\n RecordProvider,\n RecordSearchParams,\n TransactionModel,\n Transition,\n CREDITS_PROGRAM_KEYS,\n KEY_STORE,\n PRIVATE_TRANSFER,\n PRIVATE_TO_PUBLIC_TRANSFER,\n PRIVATE_TRANSFER_TYPES,\n PUBLIC_TRANSFER,\n PUBLIC_TRANSFER_AS_SIGNER,\n PUBLIC_TO_PRIVATE_TRANSFER,\n VALID_TRANSFER_TYPES,\n logAndThrow,\n};\n"],"names":["proxyMarker","Symbol","createEndpoint","releaseProxy","finalizer","throwMarker","isObject","val","transferHandlers","Map","canHandle","serialize","obj","port1","port2","MessageChannel","expose","deserialize","port","start","wrap","value","serialized","Error","isError","message","name","stack","Object","assign","ep","globalThis","allowedOrigins","addEventListener","callback","ev","data","origin","allowedOrigin","RegExp","test","isAllowedOrigin","console","warn","id","type","path","argumentList","map","fromWireValue","returnValue","parent","slice","reduce","prop","rawValue","apply","proxy","transfers","transferCache","set","transfer","undefined","Promise","resolve","catch","then","wireValue","transferables","toWireValue","postMessage","removeEventListener","closeEndPoint","error","TypeError","endpoint","constructor","isMessagePort","close","target","createProxy","throwIfProxyReleased","isReleased","releaseEndpoint","requestResponseMessage","proxyCounter","WeakMap","proxyFinalizers","FinalizationRegistry","newCount","get","isProxyReleased","Proxy","_target","unregister","unregisterProxy","length","r","p","toString","bind","_thisArg","rawArgumentList","last","processArguments","construct","register","registerProxy","processed","v","arr","Array","prototype","concat","handler","serializedValue","msg","fill","Math","floor","random","Number","MAX_SAFE_INTEGER","join","l","Account","_privateKey","_viewKey","_address","params","this","privateKeyFromParams","e","ViewKey","from_private_key","Address","fromCiphertext","ciphertext","password","PrivateKeyCiphertext","fromString","PrivateKey","fromPrivateKeyCiphertext","privateKey","to_string","seed","from_seed_unchecked","from_string","viewKey","address","encryptAccount","toCiphertext","decryptRecord","decrypt","decryptRecords","ciphertexts","ownsRecordCiphertext","isOwner","RecordCiphertext","sign","verify","signature","async","url","options","response","fetch","ok","status","post","method","AleoNetworkClient","host","headers","account","setAccount","getAccount","setHost","fetchData","json","findUnspentRecords","startHeight","endHeight","amounts","maxMicrocredits","nonces","records","end","resolvedPrivateKey","latestHeight","failures","totalRecordValue","BigInt","to_view_key","blockHeight","getLatestHeight","blocks","getBlockRange","i","transactions","j","confirmedTransaction","transaction","execution","transitions","k","transition","program","outputs","output","record","recordPlaintext","nonce","includes","serialNumber","serialNumberString","getTransitionId","push","microcredits","amounts_found","getBlock","height","getDeploymentTransactionIDForProgram","Program","replace","getDeploymentTransactionForProgram","transaction_id","getTransaction","getLatestBlock","getLatestCommittee","getProgram","programId","getProgramObject","inputProgram","getProgramImports","imports","importList","getImports","import_id","hasOwnProperty","programSource","nestedImports","key","logAndThrow","getProgramImportNames","getProgramMappingNames","getProgramMappingValue","mappingName","getStateRoot","getTransactions","getTransactionsInMempool","inputOrOutputID","submitTransaction","transaction_string","Transaction","body","AleoKeyProviderParams","proverUri","verifierUri","cacheKey","AleoKeyProvider","cache","cacheOption","keyUris","fetchBytes","arrayBuffer","Uint8Array","KEY_STORE","useCache","clearCache","clear","cacheKeys","keyId","keys","provingKey","verifyingKey","toBytes","containsKeys","has","deleteKeys","delete","getKeys","debug","provingKeyBytes","verifyingKeyBytes","ProvingKey","fromBytes","VerifyingKey","functionKeys","proverUrl","verifierUrl","CREDITS_PROGRAM_KEYS","getKey","fetchCreditsKeys","fetchRemoteKeys","getVerifyingKey","fetchProvingKey","locator","keyPair","verifying_key","proving_key","prover","bond_public","bondPublicKeys","bondValidatorKeys","bond_validator","claimUnbondPublicKeys","claim_unbond_public","transferKeys","visibility","PRIVATE_TRANSFER","transfer_private","PRIVATE_TO_PUBLIC_TRANSFER","transfer_private_to_public","PUBLIC_TRANSFER","transfer_public","PUBLIC_TRANSFER_AS_SIGNER","transfer_public_as_signer","PUBLIC_TO_PRIVATE_TRANSFER","transfer_public_to_private","joinKeys","splitKeys","split","feePrivateKeys","fee_private","feePublicKeys","fee_public","verifier","inclusion","set_validator_state","unbond_public","text","inner","unBondPublicKeys","OfflineSearchParams","verifyCreditsKeys","bondPublicKeyParams","bondValidatorKeyParams","claimUnbondPublicKeyParams","feePrivateKeyParams","feePublicKeyParams","inclusionKeyParams","joinKeyParams","setValidatorStateKeyParams","splitKeyParams","transferPrivateKeyParams","transferPrivateToPublicKeyParams","transferPublicKeyParams","transferPublicAsSignerKeyParams","transferPublicToPrivateKeyParams","unbondPublicKeyParams","OfflineKeyProvider","reject","isBondPublicProver","isBondPublicVerifier","isClaimUnbondPublicProver","isClaimUnbondPublicVerifier","isFeePrivateProver","isFeePrivateVerifier","isFeePublicProver","isFeePublicVerifier","isInclusionProver","isInclusionVerifier","isJoinProver","isJoinVerifier","isSetValidatorStateProver","isSetValidatorStateVerifier","isSplitProver","isSplitVerifier","isTransferPrivateProver","isTransferPrivateVerifier","isTransferPrivateToPublicProver","isTransferPrivateToPublicVerifier","isTransferPublicProver","isTransferPublicVerifier","isTransferPublicToPrivateProver","isTransferPublicToPrivateVerifier","isUnbondPublicProver","isUnbondPublicVerifier","insertBondPublicKeys","bondPublicVerifier","insertClaimUnbondPublicKeys","claimUnbondPublicVerifier","insertFeePrivateKeys","feePrivateVerifier","insertFeePublicKeys","feePublicVerifier","insertJoinKeys","joinVerifier","insertSetValidatorStateKeys","setValidatorStateVerifier","insertSplitKeys","splitVerifier","insertTransferPrivateKeys","transferPrivateVerifier","insertTransferPrivateToPublicKeys","transferPrivateToPublicVerifier","insertTransferPublicKeys","transferPublicVerifier","insertTransferPublicToPrivateKeys","transferPublicToPrivateVerifier","insertUnbondPublicKeys","unbondPublicVerifier","NetworkRecordProvider","networkClient","findCreditsRecords","unspent","searchParameters","findCreditsRecord","findRecord","findRecords","BlockHeightSearch","singletonWorker","createAleoWorker","worker","Worker","URL","ProgramManager","keyProvider","recordProvider","setKeyProvider","setRecordProvider","deploy","fee","privateFee","recordSearchParams","feeRecord","programObject","log","feeKeys","deploymentPrivateKey","getCreditsRecord","feeProvingKey","feeVerifyingKey","tx","ProgramManager$1","buildDeploymentTransaction","buildExecutionTransaction","programName","functionName","inputs","keySearchParams","offlineQuery","executionPrivateKey","execute","run","function_name","proveExecution","executeFunctionOffline","recordOne","recordTwo","joinProvingKey","joinVerifyingKey","RecordPlaintext","buildJoinTransaction","splitAmount","amountRecord","splitProvingKey","splitVerifyingKey","buildSplitTransaction","synthesizeKeys","function_id","synthesizeKeyPair","buildTransferTransaction","amount","recipient","transferType","validateTransferType","transferProvingKey","transferVerifyingKey","requiresAmountRecord","buildTransferPublicTransaction","buildTransferPublicAsSignerTransaction","buildBondPublicTransaction","staker_address","validator_address","withdrawal_address","scaledAmount","trunc","creditsProgram","additionalOptions","executeOptions","bondPublic","buildBondValidatorTransaction","commission","adjustedCommission","bondValidator","buildUnbondPublicTransaction","unbondPublic","buildClaimUnbondPublicTransaction","claimUnbondPublic","buildSetValidatorStateTransaction","validator_state","setValidatorState","verifyExecution","executionResponse","getExecution","getFunctionId","verifyFunctionExecution","createProgramFromSource","getCreditsProgram","verifyProgram","PRIVATE_TRANSFER_TYPES","VALID_TRANSFER_TYPES","Metadata","baseUrl","convert","metadata","Set","initializeWasm"],"sourceRoot":""} \ No newline at end of file diff --git a/877.bundle.js b/877.bundle.js deleted file mode 100644 index 8d1e8d5f2..000000000 --- a/877.bundle.js +++ /dev/null @@ -1,2 +0,0 @@ -(self.webpackChunkaleo_website=self.webpackChunkaleo_website||[]).push([[877,258],{81:(_,t,e)=>{_.exports=e.p+"58342153fc9a001d7976.wasm"},977:(_,t,e)=>{_.exports=e.p+"2d6a4d794221941c07b8.js"},877:(_,t,e)=>{e.a(_,(async(_,r)=>{try{function i(_,t,e,r){return new Promise((n=>{const i=new Worker(_,{type:"module"});i.addEventListener("message",(_=>{setTimeout((()=>{n(i),i.unref&&i.unref()}),0)}),{capture:!0,once:!0}),i.postMessage({module:t,memory:e,address:r})}))}let o;e.d(t,{$7:()=>B_,Ao:()=>q_,BP:()=>M_,Fs:()=>L_,KC:()=>U_,OS:()=>O_,Yc:()=>J_,ZD:()=>C_,ZF:()=>I_,ZX:()=>$_,pF:()=>D_});const a=new Array(128).fill(void 0);function s(_){return a[_]}a.push(void 0,null,!0,!1);let c=a.length;function g(_){_<132||(a[_]=c,c=_)}function w(_){const t=s(_);return g(_),t}const d="undefined"!=typeof TextDecoder?new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0}):{decode:()=>{throw Error("TextDecoder not available")}};"undefined"!=typeof TextDecoder&&d.decode();let b=null;function l(){return null!==b&&b.buffer===o.memory.buffer||(b=new Uint8Array(o.memory.buffer)),b}function u(_,t){return _>>>=0,d.decode(l().slice(_,_+t))}function f(_){c===a.length&&a.push(a.length+1);const t=c;return c=a[t],a[t]=_,t}let p=0;const y="undefined"!=typeof TextEncoder?new TextEncoder("utf-8"):{encode:()=>{throw Error("TextEncoder not available")}},m=function(_,t){const e=y.encode(_);return t.set(e),{read:_.length,written:e.length}};function h(_,t,e){if(void 0===e){const e=y.encode(_),r=t(e.length,1)>>>0;return l().subarray(r,r+e.length).set(e),p=e.length,r}let r=_.length,n=t(r,1)>>>0;const i=l();let o=0;for(;o127)break;i[n+o]=t}if(o!==r){0!==o&&(_=_.slice(o)),n=e(n,r,r=o+3*_.length,1)>>>0;const t=l().subarray(n+o,n+r);o+=m(_,t).written,n=e(n,r,o,1)>>>0}return p=o,n}function v(_){return null==_}let k=null;function P(){return null!==k&&k.buffer===o.memory.buffer||(k=new Int32Array(o.memory.buffer)),k}function S(_){const t=typeof _;if("number"==t||"boolean"==t||null==_)return`${_}`;if("string"==t)return`"${_}"`;if("symbol"==t){const t=_.description;return null==t?"Symbol":`Symbol(${t})`}if("function"==t){const t=_.name;return"string"==typeof t&&t.length>0?`Function(${t})`:"Function"}if(Array.isArray(_)){const t=_.length;let e="[";t>0&&(e+=S(_[0]));for(let r=1;r1))return toString.call(_);if(r=e[1],"Object"==r)try{return"Object("+JSON.stringify(_)+")"}catch(_){return"Object"}return _ instanceof Error?`${_.name}: ${_.message}\n${_.stack}`:r}const x="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((_=>{o.__wbindgen_export_3.get(_.dtor)(_.a,_.b)}));function V(_,t,e,r){const n={a:_,b:t,cnt:1,dtor:e},i=(..._)=>{n.cnt++;const t=n.a;n.a=0;try{return r(t,n.b,..._)}finally{0==--n.cnt?(o.__wbindgen_export_3.get(n.dtor)(t,n.b),x.unregister(n)):n.a=t}};return i.original=n,x.register(i,n,n),i}function F(_,t,e){o._dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h467700a9696faab3(_,t,f(e))}function T(_,t){if(!(_ instanceof t))throw new Error(`expected instance of ${t.name}`);return _.ptr}function R(_,t){const e=t(1*_.length,1)>>>0;return l().set(_,e/1),p=_.length,e}function z(_,t,e,r){try{const a=o.__wbindgen_add_to_stack_pointer(-16);T(_,q),T(t,p_),T(e,r_);const s=h(r,o.__wbindgen_malloc,o.__wbindgen_realloc),c=p;o.verifyFunctionExecution(a,_.__wbg_ptr,t.__wbg_ptr,e.__wbg_ptr,s,c);var n=P()[a/4+0],i=P()[a/4+1];if(P()[a/4+2])throw w(i);return 0!==n}finally{o.__wbindgen_add_to_stack_pointer(16)}}let A=null;function O(){return null!==A&&A.buffer===o.memory.buffer||(A=new BigInt64Array(o.memory.buffer)),A}function j(_,t){return _>>>=0,l().subarray(_/1,_/1+t)}function K(_){o.runRayonThread(_)}function C(_,t){return w(o.initThreadPool(f(_),t))}function E(_,t){try{return _.apply(this,t)}catch(_){o.__wbindgen_exn_store(f(_))}}function M(_,t,e,r){o.wasm_bindgen__convert__closures__invoke2_mut__h381bef3cd886b4c7(_,t,f(e),f(r))}const B="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((_=>o.__wbg_address_free(_>>>0)));let U=class _{static __wrap(t){t>>>=0;const e=Object.create(_.prototype);return e.__wbg_ptr=t,B.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,B.unregister(this),_}free(){const _=this.__destroy_into_raw();o.__wbg_address_free(_)}static from_private_key(t){T(t,G);const e=o.address_from_private_key(t.__wbg_ptr);return _.__wrap(e)}static from_view_key(t){T(t,m_);const e=o.address_from_view_key(t.__wbg_ptr);return _.__wrap(e)}static from_string(t){const e=h(t,o.__wbindgen_malloc,o.__wbindgen_realloc),r=p,n=o.address_from_string(e,r);return _.__wrap(n)}to_string(){let _,t;try{const n=o.__wbindgen_add_to_stack_pointer(-16);o.address_to_string(n,this.__wbg_ptr);var e=P()[n/4+0],r=P()[n/4+1];return _=e,t=r,u(e,r)}finally{o.__wbindgen_add_to_stack_pointer(16),o.__wbindgen_free(_,t,1)}}verify(_,t){const e=R(_,o.__wbindgen_malloc),r=p;T(t,b_);return 0!==o.address_verify(this.__wbg_ptr,e,r,t.__wbg_ptr)}};const I="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((_=>o.__wbg_execution_free(_>>>0)));let q=class _{static __wrap(t){t>>>=0;const e=Object.create(_.prototype);return e.__wbg_ptr=t,I.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,I.unregister(this),_}free(){const _=this.__destroy_into_raw();o.__wbg_execution_free(_)}toString(){let _,t;try{const n=o.__wbindgen_add_to_stack_pointer(-16);o.execution_toString(n,this.__wbg_ptr);var e=P()[n/4+0],r=P()[n/4+1];return _=e,t=r,u(e,r)}finally{o.__wbindgen_add_to_stack_pointer(16),o.__wbindgen_free(_,t,1)}}static fromString(t){try{const n=o.__wbindgen_add_to_stack_pointer(-16),i=h(t,o.__wbindgen_malloc,o.__wbindgen_realloc),a=p;o.execution_fromString(n,i,a);var e=P()[n/4+0],r=P()[n/4+1];if(P()[n/4+2])throw w(r);return _.__wrap(e)}finally{o.__wbindgen_add_to_stack_pointer(16)}}};const W="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((_=>o.__wbg_executionresponse_free(_>>>0)));let $=class _{static __wrap(t){t>>>=0;const e=Object.create(_.prototype);return e.__wbg_ptr=t,W.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,W.unregister(this),_}free(){const _=this.__destroy_into_raw();o.__wbg_executionresponse_free(_)}getOutputs(){return w(o.executionresponse_getOutputs(this.__wbg_ptr))}getExecution(){const _=o.executionresponse_getExecution(this.__wbg_ptr);return 0===_?void 0:q.__wrap(_)}getKeys(){try{const e=o.__wbindgen_add_to_stack_pointer(-16);o.executionresponse_getKeys(e,this.__wbg_ptr);var _=P()[e/4+0],t=P()[e/4+1];if(P()[e/4+2])throw w(t);return L.__wrap(_)}finally{o.__wbindgen_add_to_stack_pointer(16)}}getProvingKey(){const _=o.executionresponse_getProvingKey(this.__wbg_ptr);return 0===_?void 0:a_.__wrap(_)}getVerifyingKey(){const _=o.executionresponse_getVerifyingKey(this.__wbg_ptr);return p_.__wrap(_)}getFunctionId(){let _,t;try{const n=o.__wbindgen_add_to_stack_pointer(-16);o.executionresponse_getFunctionId(n,this.__wbg_ptr);var e=P()[n/4+0],r=P()[n/4+1];return _=e,t=r,u(e,r)}finally{o.__wbindgen_add_to_stack_pointer(16),o.__wbindgen_free(_,t,1)}}getProgram(){const _=o.executionresponse_getProgram(this.__wbg_ptr);return r_.__wrap(_)}};const N="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((_=>o.__wbg_field_free(_>>>0)));let D=class _{static __wrap(t){t>>>=0;const e=Object.create(_.prototype);return e.__wbg_ptr=t,N.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,N.unregister(this),_}free(){const _=this.__destroy_into_raw();o.__wbg_field_free(_)}toString(){let _,t;try{const n=o.__wbindgen_add_to_stack_pointer(-16);o.field_toString(n,this.__wbg_ptr);var e=P()[n/4+0],r=P()[n/4+1];return _=e,t=r,u(e,r)}finally{o.__wbindgen_add_to_stack_pointer(16),o.__wbindgen_free(_,t,1)}}static fromString(t){try{const n=o.__wbindgen_add_to_stack_pointer(-16),i=h(t,o.__wbindgen_malloc,o.__wbindgen_realloc),a=p;o.field_fromString(n,i,a);var e=P()[n/4+0],r=P()[n/4+1];if(P()[n/4+2])throw w(r);return _.__wrap(e)}finally{o.__wbindgen_add_to_stack_pointer(16)}}};const J="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((_=>o.__wbg_keypair_free(_>>>0)));class L{static __wrap(_){_>>>=0;const t=Object.create(L.prototype);return t.__wbg_ptr=_,J.register(t,t.__wbg_ptr,t),t}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,J.unregister(this),_}free(){const _=this.__destroy_into_raw();o.__wbg_keypair_free(_)}constructor(_,t){T(_,a_);var e=_.__destroy_into_raw();T(t,p_);var r=t.__destroy_into_raw();const n=o.keypair_new(e,r);return this.__wbg_ptr=n>>>0,this}provingKey(){try{const e=o.__wbindgen_add_to_stack_pointer(-16);o.keypair_provingKey(e,this.__wbg_ptr);var _=P()[e/4+0],t=P()[e/4+1];if(P()[e/4+2])throw w(t);return a_.__wrap(_)}finally{o.__wbindgen_add_to_stack_pointer(16)}}verifyingKey(){try{const e=o.__wbindgen_add_to_stack_pointer(-16);o.keypair_verifyingKey(e,this.__wbg_ptr);var _=P()[e/4+0],t=P()[e/4+1];if(P()[e/4+2])throw w(t);return p_.__wrap(_)}finally{o.__wbindgen_add_to_stack_pointer(16)}}}const H="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((_=>o.__wbg_metadata_free(_>>>0)));let Z=class _{static __wrap(t){t>>>=0;const e=Object.create(_.prototype);return e.__wbg_ptr=t,H.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,H.unregister(this),_}free(){const _=this.__destroy_into_raw();o.__wbg_metadata_free(_)}get name(){let _,t;try{const n=o.__wbindgen_add_to_stack_pointer(-16);o.__wbg_get_metadata_name(n,this.__wbg_ptr);var e=P()[n/4+0],r=P()[n/4+1];return _=e,t=r,u(e,r)}finally{o.__wbindgen_add_to_stack_pointer(16),o.__wbindgen_free(_,t,1)}}set name(_){const t=h(_,o.__wbindgen_malloc,o.__wbindgen_realloc),e=p;o.__wbg_set_metadata_name(this.__wbg_ptr,t,e)}get locator(){let _,t;try{const n=o.__wbindgen_add_to_stack_pointer(-16);o.__wbg_get_metadata_locator(n,this.__wbg_ptr);var e=P()[n/4+0],r=P()[n/4+1];return _=e,t=r,u(e,r)}finally{o.__wbindgen_add_to_stack_pointer(16),o.__wbindgen_free(_,t,1)}}set locator(_){const t=h(_,o.__wbindgen_malloc,o.__wbindgen_realloc),e=p;o.__wbg_set_metadata_locator(this.__wbg_ptr,t,e)}get prover(){let _,t;try{const n=o.__wbindgen_add_to_stack_pointer(-16);o.__wbg_get_metadata_prover(n,this.__wbg_ptr);var e=P()[n/4+0],r=P()[n/4+1];return _=e,t=r,u(e,r)}finally{o.__wbindgen_add_to_stack_pointer(16),o.__wbindgen_free(_,t,1)}}set prover(_){const t=h(_,o.__wbindgen_malloc,o.__wbindgen_realloc),e=p;o.__wbg_set_metadata_prover(this.__wbg_ptr,t,e)}get verifier(){let _,t;try{const n=o.__wbindgen_add_to_stack_pointer(-16);o.__wbg_get_metadata_verifier(n,this.__wbg_ptr);var e=P()[n/4+0],r=P()[n/4+1];return _=e,t=r,u(e,r)}finally{o.__wbindgen_add_to_stack_pointer(16),o.__wbindgen_free(_,t,1)}}set verifier(_){const t=h(_,o.__wbindgen_malloc,o.__wbindgen_realloc),e=p;o.__wbg_set_metadata_verifier(this.__wbg_ptr,t,e)}get verifyingKey(){let _,t;try{const n=o.__wbindgen_add_to_stack_pointer(-16);o.__wbg_get_metadata_verifyingKey(n,this.__wbg_ptr);var e=P()[n/4+0],r=P()[n/4+1];return _=e,t=r,u(e,r)}finally{o.__wbindgen_add_to_stack_pointer(16),o.__wbindgen_free(_,t,1)}}set verifyingKey(_){const t=h(_,o.__wbindgen_malloc,o.__wbindgen_realloc),e=p;o.__wbg_set_metadata_verifyingKey(this.__wbg_ptr,t,e)}static baseUrl(){let _,t;try{const n=o.__wbindgen_add_to_stack_pointer(-16);o.metadata_baseUrl(n);var e=P()[n/4+0],r=P()[n/4+1];return _=e,t=r,u(e,r)}finally{o.__wbindgen_add_to_stack_pointer(16),o.__wbindgen_free(_,t,1)}}static bond_public(){const t=o.metadata_bond_public();return _.__wrap(t)}static bond_validator(){const t=o.metadata_bond_validator();return _.__wrap(t)}static claim_unbond_public(){const t=o.metadata_claim_unbond_public();return _.__wrap(t)}static fee_private(){const t=o.metadata_fee_private();return _.__wrap(t)}static fee_public(){const t=o.metadata_fee_public();return _.__wrap(t)}static inclusion(){const t=o.metadata_inclusion();return _.__wrap(t)}static join(){const t=o.metadata_join();return _.__wrap(t)}static set_validator_state(){const t=o.metadata_set_validator_state();return _.__wrap(t)}static split(){const t=o.metadata_split();return _.__wrap(t)}static transfer_private(){const t=o.metadata_transfer_private();return _.__wrap(t)}static transfer_private_to_public(){const t=o.metadata_transfer_private_to_public();return _.__wrap(t)}static transfer_public(){const t=o.metadata_transfer_public();return _.__wrap(t)}static transfer_public_as_signer(){const t=o.metadata_transfer_public_as_signer();return _.__wrap(t)}static transfer_public_to_private(){const t=o.metadata_transfer_public_to_private();return _.__wrap(t)}static unbond_public(){const t=o.metadata_unbond_public();return _.__wrap(t)}};const Q="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((_=>o.__wbg_offlinequery_free(_>>>0)));let X=class _{static __wrap(t){t>>>=0;const e=Object.create(_.prototype);return e.__wbg_ptr=t,Q.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,Q.unregister(this),_}free(){const _=this.__destroy_into_raw();o.__wbg_offlinequery_free(_)}constructor(_){try{const r=o.__wbindgen_add_to_stack_pointer(-16),n=h(_,o.__wbindgen_malloc,o.__wbindgen_realloc),i=p;o.offlinequery_new(r,n,i);var t=P()[r/4+0],e=P()[r/4+1];if(P()[r/4+2])throw w(e);return this.__wbg_ptr=t>>>0,this}finally{o.__wbindgen_add_to_stack_pointer(16)}}addStatePath(_,t){try{const r=o.__wbindgen_add_to_stack_pointer(-16),n=h(_,o.__wbindgen_malloc,o.__wbindgen_realloc),i=p,a=h(t,o.__wbindgen_malloc,o.__wbindgen_realloc),s=p;o.offlinequery_addStatePath(r,this.__wbg_ptr,n,i,a,s);var e=P()[r/4+0];if(P()[r/4+1])throw w(e)}finally{o.__wbindgen_add_to_stack_pointer(16)}}toString(){let _,t;try{const n=o.__wbindgen_add_to_stack_pointer(-16);o.offlinequery_toString(n,this.__wbg_ptr);var e=P()[n/4+0],r=P()[n/4+1];return _=e,t=r,u(e,r)}finally{o.__wbindgen_add_to_stack_pointer(16),o.__wbindgen_free(_,t,1)}}static fromString(t){try{const n=o.__wbindgen_add_to_stack_pointer(-16),i=h(t,o.__wbindgen_malloc,o.__wbindgen_realloc),a=p;o.offlinequery_fromString(n,i,a);var e=P()[n/4+0],r=P()[n/4+1];if(P()[n/4+2])throw w(r);return _.__wrap(e)}finally{o.__wbindgen_add_to_stack_pointer(16)}}};const Y="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((_=>o.__wbg_privatekey_free(_>>>0)));let G=class _{static __wrap(t){t>>>=0;const e=Object.create(_.prototype);return e.__wbg_ptr=t,Y.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,Y.unregister(this),_}free(){const _=this.__destroy_into_raw();o.__wbg_privatekey_free(_)}constructor(){const _=o.privatekey_new();return this.__wbg_ptr=_>>>0,this}static from_seed_unchecked(t){const e=R(t,o.__wbindgen_malloc),r=p,n=o.privatekey_from_seed_unchecked(e,r);return _.__wrap(n)}static from_string(t){try{const n=o.__wbindgen_add_to_stack_pointer(-16),i=h(t,o.__wbindgen_malloc,o.__wbindgen_realloc),a=p;o.privatekey_from_string(n,i,a);var e=P()[n/4+0],r=P()[n/4+1];if(P()[n/4+2])throw w(r);return _.__wrap(e)}finally{o.__wbindgen_add_to_stack_pointer(16)}}to_string(){let _,t;try{const n=o.__wbindgen_add_to_stack_pointer(-16);o.privatekey_to_string(n,this.__wbg_ptr);var e=P()[n/4+0],r=P()[n/4+1];return _=e,t=r,u(e,r)}finally{o.__wbindgen_add_to_stack_pointer(16),o.__wbindgen_free(_,t,1)}}to_view_key(){const _=o.privatekey_to_view_key(this.__wbg_ptr);return m_.__wrap(_)}to_address(){const _=o.privatekey_to_address(this.__wbg_ptr);return U.__wrap(_)}sign(_){const t=R(_,o.__wbindgen_malloc),e=p,r=o.privatekey_sign(this.__wbg_ptr,t,e);return b_.__wrap(r)}static newEncrypted(_){try{const r=o.__wbindgen_add_to_stack_pointer(-16),n=h(_,o.__wbindgen_malloc,o.__wbindgen_realloc),i=p;o.privatekey_newEncrypted(r,n,i);var t=P()[r/4+0],e=P()[r/4+1];if(P()[r/4+2])throw w(e);return t_.__wrap(t)}finally{o.__wbindgen_add_to_stack_pointer(16)}}toCiphertext(_){try{const r=o.__wbindgen_add_to_stack_pointer(-16),n=h(_,o.__wbindgen_malloc,o.__wbindgen_realloc),i=p;o.privatekey_toCiphertext(r,this.__wbg_ptr,n,i);var t=P()[r/4+0],e=P()[r/4+1];if(P()[r/4+2])throw w(e);return t_.__wrap(t)}finally{o.__wbindgen_add_to_stack_pointer(16)}}static fromPrivateKeyCiphertext(t,e){try{const i=o.__wbindgen_add_to_stack_pointer(-16);T(t,t_);const a=h(e,o.__wbindgen_malloc,o.__wbindgen_realloc),s=p;o.privatekey_fromPrivateKeyCiphertext(i,t.__wbg_ptr,a,s);var r=P()[i/4+0],n=P()[i/4+1];if(P()[i/4+2])throw w(n);return _.__wrap(r)}finally{o.__wbindgen_add_to_stack_pointer(16)}}};const __="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((_=>o.__wbg_privatekeyciphertext_free(_>>>0)));let t_=class _{static __wrap(t){t>>>=0;const e=Object.create(_.prototype);return e.__wbg_ptr=t,__.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,__.unregister(this),_}free(){const _=this.__destroy_into_raw();o.__wbg_privatekeyciphertext_free(_)}static encryptPrivateKey(t,e){try{const i=o.__wbindgen_add_to_stack_pointer(-16);T(t,G);const a=h(e,o.__wbindgen_malloc,o.__wbindgen_realloc),s=p;o.privatekey_toCiphertext(i,t.__wbg_ptr,a,s);var r=P()[i/4+0],n=P()[i/4+1];if(P()[i/4+2])throw w(n);return _.__wrap(r)}finally{o.__wbindgen_add_to_stack_pointer(16)}}decryptToPrivateKey(_){try{const r=o.__wbindgen_add_to_stack_pointer(-16),n=h(_,o.__wbindgen_malloc,o.__wbindgen_realloc),i=p;o.privatekeyciphertext_decryptToPrivateKey(r,this.__wbg_ptr,n,i);var t=P()[r/4+0],e=P()[r/4+1];if(P()[r/4+2])throw w(e);return G.__wrap(t)}finally{o.__wbindgen_add_to_stack_pointer(16)}}toString(){let _,t;try{const n=o.__wbindgen_add_to_stack_pointer(-16);o.privatekeyciphertext_toString(n,this.__wbg_ptr);var e=P()[n/4+0],r=P()[n/4+1];return _=e,t=r,u(e,r)}finally{o.__wbindgen_add_to_stack_pointer(16),o.__wbindgen_free(_,t,1)}}static fromString(t){try{const n=o.__wbindgen_add_to_stack_pointer(-16),i=h(t,o.__wbindgen_malloc,o.__wbindgen_realloc),a=p;o.privatekeyciphertext_fromString(n,i,a);var e=P()[n/4+0],r=P()[n/4+1];if(P()[n/4+2])throw w(r);return _.__wrap(e)}finally{o.__wbindgen_add_to_stack_pointer(16)}}};const e_="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((_=>o.__wbg_program_free(_>>>0)));let r_=class _{static __wrap(t){t>>>=0;const e=Object.create(_.prototype);return e.__wbg_ptr=t,e_.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,e_.unregister(this),_}free(){const _=this.__destroy_into_raw();o.__wbg_program_free(_)}static fromString(t){try{const n=o.__wbindgen_add_to_stack_pointer(-16),i=h(t,o.__wbindgen_malloc,o.__wbindgen_realloc),a=p;o.program_fromString(n,i,a);var e=P()[n/4+0],r=P()[n/4+1];if(P()[n/4+2])throw w(r);return _.__wrap(e)}finally{o.__wbindgen_add_to_stack_pointer(16)}}toString(){let _,t;try{const n=o.__wbindgen_add_to_stack_pointer(-16);o.program_toString(n,this.__wbg_ptr);var e=P()[n/4+0],r=P()[n/4+1];return _=e,t=r,u(e,r)}finally{o.__wbindgen_add_to_stack_pointer(16),o.__wbindgen_free(_,t,1)}}hasFunction(_){const t=h(_,o.__wbindgen_malloc,o.__wbindgen_realloc),e=p;return 0!==o.program_hasFunction(this.__wbg_ptr,t,e)}getFunctions(){return w(o.program_getFunctions(this.__wbg_ptr))}getFunctionInputs(_){try{const r=o.__wbindgen_add_to_stack_pointer(-16),n=h(_,o.__wbindgen_malloc,o.__wbindgen_realloc),i=p;o.program_getFunctionInputs(r,this.__wbg_ptr,n,i);var t=P()[r/4+0],e=P()[r/4+1];if(P()[r/4+2])throw w(e);return w(t)}finally{o.__wbindgen_add_to_stack_pointer(16)}}getMappings(){try{const e=o.__wbindgen_add_to_stack_pointer(-16);o.program_getMappings(e,this.__wbg_ptr);var _=P()[e/4+0],t=P()[e/4+1];if(P()[e/4+2])throw w(t);return w(_)}finally{o.__wbindgen_add_to_stack_pointer(16)}}getRecordMembers(_){try{const r=o.__wbindgen_add_to_stack_pointer(-16),n=h(_,o.__wbindgen_malloc,o.__wbindgen_realloc),i=p;o.program_getRecordMembers(r,this.__wbg_ptr,n,i);var t=P()[r/4+0],e=P()[r/4+1];if(P()[r/4+2])throw w(e);return w(t)}finally{o.__wbindgen_add_to_stack_pointer(16)}}getStructMembers(_){try{const r=o.__wbindgen_add_to_stack_pointer(-16),n=h(_,o.__wbindgen_malloc,o.__wbindgen_realloc),i=p;o.program_getStructMembers(r,this.__wbg_ptr,n,i);var t=P()[r/4+0],e=P()[r/4+1];if(P()[r/4+2])throw w(e);return w(t)}finally{o.__wbindgen_add_to_stack_pointer(16)}}static getCreditsProgram(){const t=o.program_getCreditsProgram();return _.__wrap(t)}id(){let _,t;try{const n=o.__wbindgen_add_to_stack_pointer(-16);o.program_id(n,this.__wbg_ptr);var e=P()[n/4+0],r=P()[n/4+1];return _=e,t=r,u(e,r)}finally{o.__wbindgen_add_to_stack_pointer(16),o.__wbindgen_free(_,t,1)}}address(){try{const e=o.__wbindgen_add_to_stack_pointer(-16);o.program_address(e,this.__wbg_ptr);var _=P()[e/4+0],t=P()[e/4+1];if(P()[e/4+2])throw w(t);return U.__wrap(_)}finally{o.__wbindgen_add_to_stack_pointer(16)}}isEqual(t){T(t,_);return 0!==o.program_isEqual(this.__wbg_ptr,t.__wbg_ptr)}getImports(){return w(o.program_getImports(this.__wbg_ptr))}};const n_="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((_=>o.__wbg_programmanager_free(_>>>0)));let i_=class{__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,n_.unregister(this),_}free(){const _=this.__destroy_into_raw();o.__wbg_programmanager_free(_)}static buildDeploymentTransaction(_,t,e,r,n,i,a,s,c){T(_,G);const g=h(t,o.__wbindgen_malloc,o.__wbindgen_realloc),d=p;let b=0;v(r)||(T(r,w_),b=r.__destroy_into_raw());var l=v(n)?0:h(n,o.__wbindgen_malloc,o.__wbindgen_realloc),u=p;let y=0;v(a)||(T(a,a_),y=a.__destroy_into_raw());let m=0;v(s)||(T(s,p_),m=s.__destroy_into_raw());let k=0;v(c)||(T(c,X),k=c.__destroy_into_raw());return w(o.programmanager_buildDeploymentTransaction(_.__wbg_ptr,g,d,e,b,l,u,v(i)?0:f(i),y,m,k))}static estimateDeploymentFee(_,t){const e=h(_,o.__wbindgen_malloc,o.__wbindgen_realloc),r=p;return w(o.programmanager_estimateDeploymentFee(e,r,v(t)?0:f(t)))}static estimateProgramNameCost(_){try{const r=o.__wbindgen_add_to_stack_pointer(-16),n=h(_,o.__wbindgen_malloc,o.__wbindgen_realloc),i=p;o.programmanager_estimateProgramNameCost(r,n,i);var t=O()[r/8+0],e=P()[r/4+2];if(P()[r/4+3])throw w(e);return BigInt.asUintN(64,t)}finally{o.__wbindgen_add_to_stack_pointer(16)}}static executeFunctionOffline(_,t,e,r,n,i,a,s,c,g,d){T(_,G);const b=h(t,o.__wbindgen_malloc,o.__wbindgen_realloc),l=p,u=h(e,o.__wbindgen_malloc,o.__wbindgen_realloc),y=p;let m=0;v(s)||(T(s,a_),m=s.__destroy_into_raw());let k=0;v(c)||(T(c,p_),k=c.__destroy_into_raw());var P=v(g)?0:h(g,o.__wbindgen_malloc,o.__wbindgen_realloc),S=p;let x=0;v(d)||(T(d,X),x=d.__destroy_into_raw());return w(o.programmanager_executeFunctionOffline(_.__wbg_ptr,b,l,u,y,f(r),n,i,v(a)?0:f(a),m,k,P,S,x))}static buildExecutionTransaction(_,t,e,r,n,i,a,s,c,g,d,b,l){T(_,G);const u=h(t,o.__wbindgen_malloc,o.__wbindgen_realloc),y=p,m=h(e,o.__wbindgen_malloc,o.__wbindgen_realloc),k=p;let P=0;v(i)||(T(i,w_),P=i.__destroy_into_raw());var S=v(a)?0:h(a,o.__wbindgen_malloc,o.__wbindgen_realloc),x=p;let V=0;v(c)||(T(c,a_),V=c.__destroy_into_raw());let F=0;v(g)||(T(g,p_),F=g.__destroy_into_raw());let R=0;v(d)||(T(d,a_),R=d.__destroy_into_raw());let z=0;v(b)||(T(b,p_),z=b.__destroy_into_raw());let A=0;v(l)||(T(l,X),A=l.__destroy_into_raw());return w(o.programmanager_buildExecutionTransaction(_.__wbg_ptr,u,y,m,k,f(r),n,P,S,x,v(s)?0:f(s),V,F,R,z,A))}static estimateExecutionFee(_,t,e,r,n,i,a,s,c){T(_,G);const g=h(t,o.__wbindgen_malloc,o.__wbindgen_realloc),d=p,b=h(e,o.__wbindgen_malloc,o.__wbindgen_realloc),l=p;var u=v(n)?0:h(n,o.__wbindgen_malloc,o.__wbindgen_realloc),y=p;let m=0;v(a)||(T(a,a_),m=a.__destroy_into_raw());let k=0;v(s)||(T(s,p_),k=s.__destroy_into_raw());let P=0;v(c)||(T(c,X),P=c.__destroy_into_raw());return w(o.programmanager_estimateExecutionFee(_.__wbg_ptr,g,d,b,l,f(r),u,y,v(i)?0:f(i),m,k,P))}static estimateFinalizeFee(_,t){try{const n=o.__wbindgen_add_to_stack_pointer(-16),i=h(_,o.__wbindgen_malloc,o.__wbindgen_realloc),a=p,s=h(t,o.__wbindgen_malloc,o.__wbindgen_realloc),c=p;o.programmanager_estimateFinalizeFee(n,i,a,s,c);var e=O()[n/8+0],r=P()[n/4+2];if(P()[n/4+3])throw w(r);return BigInt.asUintN(64,e)}finally{o.__wbindgen_add_to_stack_pointer(16)}}static buildJoinTransaction(_,t,e,r,n,i,a,s,c,g,d){T(_,G),T(t,w_);var b=t.__destroy_into_raw();T(e,w_);var l=e.__destroy_into_raw();let u=0;v(n)||(T(n,w_),u=n.__destroy_into_raw());var f=v(i)?0:h(i,o.__wbindgen_malloc,o.__wbindgen_realloc),y=p;let m=0;v(a)||(T(a,a_),m=a.__destroy_into_raw());let k=0;v(s)||(T(s,p_),k=s.__destroy_into_raw());let P=0;v(c)||(T(c,a_),P=c.__destroy_into_raw());let S=0;v(g)||(T(g,p_),S=g.__destroy_into_raw());let x=0;v(d)||(T(d,X),x=d.__destroy_into_raw());return w(o.programmanager_buildJoinTransaction(_.__wbg_ptr,b,l,r,u,f,y,m,k,P,S,x))}static buildSplitTransaction(_,t,e,r,n,i,a){T(_,G),T(e,w_);var s=e.__destroy_into_raw(),c=v(r)?0:h(r,o.__wbindgen_malloc,o.__wbindgen_realloc),g=p;let d=0;v(n)||(T(n,a_),d=n.__destroy_into_raw());let b=0;v(i)||(T(i,p_),b=i.__destroy_into_raw());let l=0;v(a)||(T(a,X),l=a.__destroy_into_raw());return w(o.programmanager_buildSplitTransaction(_.__wbg_ptr,t,s,c,g,d,b,l))}static buildTransferTransaction(_,t,e,r,n,i,a,s,c,g,d,b,l){T(_,G);const u=h(e,o.__wbindgen_malloc,o.__wbindgen_realloc),f=p,y=h(r,o.__wbindgen_malloc,o.__wbindgen_realloc),m=p;let k=0;v(n)||(T(n,w_),k=n.__destroy_into_raw());let P=0;v(a)||(T(a,w_),P=a.__destroy_into_raw());var S=v(s)?0:h(s,o.__wbindgen_malloc,o.__wbindgen_realloc),x=p;let V=0;v(c)||(T(c,a_),V=c.__destroy_into_raw());let F=0;v(g)||(T(g,p_),F=g.__destroy_into_raw());let R=0;v(d)||(T(d,a_),R=d.__destroy_into_raw());let z=0;v(b)||(T(b,p_),z=b.__destroy_into_raw());let A=0;v(l)||(T(l,X),A=l.__destroy_into_raw());return w(o.programmanager_buildTransferTransaction(_.__wbg_ptr,t,u,f,y,m,k,i,P,S,x,V,F,R,z,A))}static synthesizeKeyPair(_,t,e,r,n){T(_,G);const i=h(t,o.__wbindgen_malloc,o.__wbindgen_realloc),a=p,s=h(e,o.__wbindgen_malloc,o.__wbindgen_realloc),c=p;return w(o.programmanager_synthesizeKeyPair(_.__wbg_ptr,i,a,s,c,f(r),v(n)?0:f(n)))}};const o_="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((_=>o.__wbg_provingkey_free(_>>>0)));let a_=class _{static __wrap(t){t>>>=0;const e=Object.create(_.prototype);return e.__wbg_ptr=t,o_.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,o_.unregister(this),_}free(){const _=this.__destroy_into_raw();o.__wbg_provingkey_free(_)}isBondPublicProver(){return 0!==o.provingkey_isBondPublicProver(this.__wbg_ptr)}isBondValidatorProver(){return 0!==o.provingkey_isBondValidatorProver(this.__wbg_ptr)}isClaimUnbondPublicProver(){return 0!==o.provingkey_isClaimUnbondPublicProver(this.__wbg_ptr)}isFeePrivateProver(){return 0!==o.provingkey_isFeePrivateProver(this.__wbg_ptr)}isFeePublicProver(){return 0!==o.provingkey_isFeePublicProver(this.__wbg_ptr)}isInclusionProver(){return 0!==o.provingkey_isInclusionProver(this.__wbg_ptr)}isJoinProver(){return 0!==o.provingkey_isJoinProver(this.__wbg_ptr)}isSetValidatorStateProver(){return 0!==o.provingkey_isSetValidatorStateProver(this.__wbg_ptr)}isSplitProver(){return 0!==o.provingkey_isSplitProver(this.__wbg_ptr)}isTransferPrivateProver(){return 0!==o.provingkey_isTransferPrivateProver(this.__wbg_ptr)}isTransferPrivateToPublicProver(){return 0!==o.provingkey_isTransferPrivateToPublicProver(this.__wbg_ptr)}isTransferPublicProver(){return 0!==o.provingkey_isTransferPublicProver(this.__wbg_ptr)}isTransferPublicAsSignerProver(){return 0!==o.provingkey_isTransferPublicAsSignerProver(this.__wbg_ptr)}isTransferPublicToPrivateProver(){return 0!==o.provingkey_isTransferPublicToPrivateProver(this.__wbg_ptr)}isUnbondPublicProver(){return 0!==o.provingkey_isUnbondPublicProver(this.__wbg_ptr)}checksum(){let _,t;try{const n=o.__wbindgen_add_to_stack_pointer(-16);o.provingkey_checksum(n,this.__wbg_ptr);var e=P()[n/4+0],r=P()[n/4+1];return _=e,t=r,u(e,r)}finally{o.__wbindgen_add_to_stack_pointer(16),o.__wbindgen_free(_,t,1)}}copy(){const t=o.provingkey_copy(this.__wbg_ptr);return _.__wrap(t)}static fromBytes(t){try{const n=o.__wbindgen_add_to_stack_pointer(-16),i=R(t,o.__wbindgen_malloc),a=p;o.provingkey_fromBytes(n,i,a);var e=P()[n/4+0],r=P()[n/4+1];if(P()[n/4+2])throw w(r);return _.__wrap(e)}finally{o.__wbindgen_add_to_stack_pointer(16)}}static fromString(t){try{const n=o.__wbindgen_add_to_stack_pointer(-16),i=h(t,o.__wbindgen_malloc,o.__wbindgen_realloc),a=p;o.provingkey_fromString(n,i,a);var e=P()[n/4+0],r=P()[n/4+1];if(P()[n/4+2])throw w(r);return _.__wrap(e)}finally{o.__wbindgen_add_to_stack_pointer(16)}}toBytes(){try{const n=o.__wbindgen_add_to_stack_pointer(-16);o.provingkey_toBytes(n,this.__wbg_ptr);var _=P()[n/4+0],t=P()[n/4+1],e=P()[n/4+2];if(P()[n/4+3])throw w(e);var r=j(_,t).slice();return o.__wbindgen_free(_,1*t,1),r}finally{o.__wbindgen_add_to_stack_pointer(16)}}toString(){let _,t;try{const n=o.__wbindgen_add_to_stack_pointer(-16);o.provingkey_toString(n,this.__wbg_ptr);var e=P()[n/4+0],r=P()[n/4+1];return _=e,t=r,u(e,r)}finally{o.__wbindgen_add_to_stack_pointer(16),o.__wbindgen_free(_,t,1)}}};const s_="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((_=>o.__wbg_recordciphertext_free(_>>>0)));let c_=class _{static __wrap(t){t>>>=0;const e=Object.create(_.prototype);return e.__wbg_ptr=t,s_.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,s_.unregister(this),_}free(){const _=this.__destroy_into_raw();o.__wbg_recordciphertext_free(_)}static fromString(t){try{const n=o.__wbindgen_add_to_stack_pointer(-16),i=h(t,o.__wbindgen_malloc,o.__wbindgen_realloc),a=p;o.recordciphertext_fromString(n,i,a);var e=P()[n/4+0],r=P()[n/4+1];if(P()[n/4+2])throw w(r);return _.__wrap(e)}finally{o.__wbindgen_add_to_stack_pointer(16)}}toString(){let _,t;try{const n=o.__wbindgen_add_to_stack_pointer(-16);o.recordciphertext_toString(n,this.__wbg_ptr);var e=P()[n/4+0],r=P()[n/4+1];return _=e,t=r,u(e,r)}finally{o.__wbindgen_add_to_stack_pointer(16),o.__wbindgen_free(_,t,1)}}decrypt(_){try{const r=o.__wbindgen_add_to_stack_pointer(-16);T(_,m_),o.recordciphertext_decrypt(r,this.__wbg_ptr,_.__wbg_ptr);var t=P()[r/4+0],e=P()[r/4+1];if(P()[r/4+2])throw w(e);return w_.__wrap(t)}finally{o.__wbindgen_add_to_stack_pointer(16)}}isOwner(_){T(_,m_);return 0!==o.recordciphertext_isOwner(this.__wbg_ptr,_.__wbg_ptr)}};const g_="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((_=>o.__wbg_recordplaintext_free(_>>>0)));let w_=class _{static __wrap(t){t>>>=0;const e=Object.create(_.prototype);return e.__wbg_ptr=t,g_.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,g_.unregister(this),_}free(){const _=this.__destroy_into_raw();o.__wbg_recordplaintext_free(_)}commitment(_,t){try{const n=o.__wbindgen_add_to_stack_pointer(-16),i=h(_,o.__wbindgen_malloc,o.__wbindgen_realloc),a=p,s=h(t,o.__wbindgen_malloc,o.__wbindgen_realloc),c=p;o.recordplaintext_commitment(n,this.__wbg_ptr,i,a,s,c);var e=P()[n/4+0],r=P()[n/4+1];if(P()[n/4+2])throw w(r);return D.__wrap(e)}finally{o.__wbindgen_add_to_stack_pointer(16)}}static fromString(t){try{const n=o.__wbindgen_add_to_stack_pointer(-16),i=h(t,o.__wbindgen_malloc,o.__wbindgen_realloc),a=p;o.recordplaintext_fromString(n,i,a);var e=P()[n/4+0],r=P()[n/4+1];if(P()[n/4+2])throw w(r);return _.__wrap(e)}finally{o.__wbindgen_add_to_stack_pointer(16)}}toString(){let _,t;try{const n=o.__wbindgen_add_to_stack_pointer(-16);o.recordplaintext_toString(n,this.__wbg_ptr);var e=P()[n/4+0],r=P()[n/4+1];return _=e,t=r,u(e,r)}finally{o.__wbindgen_add_to_stack_pointer(16),o.__wbindgen_free(_,t,1)}}microcredits(){const _=o.recordplaintext_microcredits(this.__wbg_ptr);return BigInt.asUintN(64,_)}nonce(){let _,t;try{const n=o.__wbindgen_add_to_stack_pointer(-16);o.recordplaintext_nonce(n,this.__wbg_ptr);var e=P()[n/4+0],r=P()[n/4+1];return _=e,t=r,u(e,r)}finally{o.__wbindgen_add_to_stack_pointer(16),o.__wbindgen_free(_,t,1)}}serialNumberString(_,t,e){let r,n;try{const b=o.__wbindgen_add_to_stack_pointer(-16);T(_,G);const l=h(t,o.__wbindgen_malloc,o.__wbindgen_realloc),f=p,y=h(e,o.__wbindgen_malloc,o.__wbindgen_realloc),m=p;o.recordplaintext_serialNumberString(b,this.__wbg_ptr,_.__wbg_ptr,l,f,y,m);var i=P()[b/4+0],a=P()[b/4+1],s=P()[b/4+2],c=P()[b/4+3],g=i,d=a;if(c)throw g=0,d=0,w(s);return r=g,n=d,u(g,d)}finally{o.__wbindgen_add_to_stack_pointer(16),o.__wbindgen_free(r,n,1)}}};const d_="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((_=>o.__wbg_signature_free(_>>>0)));let b_=class _{static __wrap(t){t>>>=0;const e=Object.create(_.prototype);return e.__wbg_ptr=t,d_.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,d_.unregister(this),_}free(){const _=this.__destroy_into_raw();o.__wbg_signature_free(_)}static sign(t,e){T(t,G);const r=R(e,o.__wbindgen_malloc),n=p,i=o.privatekey_sign(t.__wbg_ptr,r,n);return _.__wrap(i)}verify(_,t){T(_,U);const e=R(t,o.__wbindgen_malloc),r=p;return 0!==o.signature_verify(this.__wbg_ptr,_.__wbg_ptr,e,r)}static from_string(t){const e=h(t,o.__wbindgen_malloc,o.__wbindgen_realloc),r=p,n=o.signature_from_string(e,r);return _.__wrap(n)}to_string(){let _,t;try{const n=o.__wbindgen_add_to_stack_pointer(-16);o.signature_to_string(n,this.__wbg_ptr);var e=P()[n/4+0],r=P()[n/4+1];return _=e,t=r,u(e,r)}finally{o.__wbindgen_add_to_stack_pointer(16),o.__wbindgen_free(_,t,1)}}};const l_="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((_=>o.__wbg_transaction_free(_>>>0)));let u_=class _{static __wrap(t){t>>>=0;const e=Object.create(_.prototype);return e.__wbg_ptr=t,l_.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,l_.unregister(this),_}free(){const _=this.__destroy_into_raw();o.__wbg_transaction_free(_)}static fromString(t){try{const n=o.__wbindgen_add_to_stack_pointer(-16),i=h(t,o.__wbindgen_malloc,o.__wbindgen_realloc),a=p;o.transaction_fromString(n,i,a);var e=P()[n/4+0],r=P()[n/4+1];if(P()[n/4+2])throw w(r);return _.__wrap(e)}finally{o.__wbindgen_add_to_stack_pointer(16)}}toString(){let _,t;try{const n=o.__wbindgen_add_to_stack_pointer(-16);o.transaction_toString(n,this.__wbg_ptr);var e=P()[n/4+0],r=P()[n/4+1];return _=e,t=r,u(e,r)}finally{o.__wbindgen_add_to_stack_pointer(16),o.__wbindgen_free(_,t,1)}}transactionId(){let _,t;try{const n=o.__wbindgen_add_to_stack_pointer(-16);o.transaction_transactionId(n,this.__wbg_ptr);var e=P()[n/4+0],r=P()[n/4+1];return _=e,t=r,u(e,r)}finally{o.__wbindgen_add_to_stack_pointer(16),o.__wbindgen_free(_,t,1)}}transactionType(){let _,t;try{const n=o.__wbindgen_add_to_stack_pointer(-16);o.transaction_transactionType(n,this.__wbg_ptr);var e=P()[n/4+0],r=P()[n/4+1];return _=e,t=r,u(e,r)}finally{o.__wbindgen_add_to_stack_pointer(16),o.__wbindgen_free(_,t,1)}}};const f_="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((_=>o.__wbg_verifyingkey_free(_>>>0)));let p_=class _{static __wrap(t){t>>>=0;const e=Object.create(_.prototype);return e.__wbg_ptr=t,f_.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,f_.unregister(this),_}free(){const _=this.__destroy_into_raw();o.__wbg_verifyingkey_free(_)}static bondPublicVerifier(){const t=o.verifyingkey_bondPublicVerifier();return _.__wrap(t)}static bondValidatorVerifier(){const t=o.verifyingkey_bondValidatorVerifier();return _.__wrap(t)}static claimUnbondPublicVerifier(){const t=o.verifyingkey_claimUnbondPublicVerifier();return _.__wrap(t)}static feePrivateVerifier(){const t=o.verifyingkey_feePrivateVerifier();return _.__wrap(t)}static feePublicVerifier(){const t=o.verifyingkey_feePublicVerifier();return _.__wrap(t)}static inclusionVerifier(){const t=o.verifyingkey_inclusionVerifier();return _.__wrap(t)}static joinVerifier(){const t=o.verifyingkey_joinVerifier();return _.__wrap(t)}static setValidatorStateVerifier(){const t=o.verifyingkey_setValidatorStateVerifier();return _.__wrap(t)}static splitVerifier(){const t=o.verifyingkey_splitVerifier();return _.__wrap(t)}static transferPrivateVerifier(){const t=o.verifyingkey_transferPrivateVerifier();return _.__wrap(t)}static transferPrivateToPublicVerifier(){const t=o.verifyingkey_transferPrivateToPublicVerifier();return _.__wrap(t)}static transferPublicVerifier(){const t=o.verifyingkey_transferPublicVerifier();return _.__wrap(t)}static transferPublicAsSignerVerifier(){const t=o.verifyingkey_transferPublicAsSignerVerifier();return _.__wrap(t)}static transferPublicToPrivateVerifier(){const t=o.verifyingkey_transferPublicToPrivateVerifier();return _.__wrap(t)}static unbondPublicVerifier(){const t=o.verifyingkey_unbondPublicVerifier();return _.__wrap(t)}isBondPublicVerifier(){return 0!==o.verifyingkey_isBondPublicVerifier(this.__wbg_ptr)}isBondValidatorVerifier(){return 0!==o.verifyingkey_isBondValidatorVerifier(this.__wbg_ptr)}isClaimUnbondPublicVerifier(){return 0!==o.verifyingkey_isClaimUnbondPublicVerifier(this.__wbg_ptr)}isFeePrivateVerifier(){return 0!==o.verifyingkey_isFeePrivateVerifier(this.__wbg_ptr)}isFeePublicVerifier(){return 0!==o.verifyingkey_isFeePublicVerifier(this.__wbg_ptr)}isInclusionVerifier(){return 0!==o.verifyingkey_isInclusionVerifier(this.__wbg_ptr)}isJoinVerifier(){return 0!==o.verifyingkey_isJoinVerifier(this.__wbg_ptr)}isSetValidatorStateVerifier(){return 0!==o.verifyingkey_isSetValidatorStateVerifier(this.__wbg_ptr)}isSplitVerifier(){return 0!==o.verifyingkey_isSplitVerifier(this.__wbg_ptr)}isTransferPrivateVerifier(){return 0!==o.verifyingkey_isTransferPrivateVerifier(this.__wbg_ptr)}isTransferPrivateToPublicVerifier(){return 0!==o.verifyingkey_isTransferPrivateToPublicVerifier(this.__wbg_ptr)}isTransferPublicVerifier(){return 0!==o.verifyingkey_isTransferPublicVerifier(this.__wbg_ptr)}isTransferPublicAsSignerVerifier(){return 0!==o.verifyingkey_isTransferPublicAsSignerVerifier(this.__wbg_ptr)}isTransferPublicToPrivateVerifier(){return 0!==o.verifyingkey_isTransferPublicToPrivateVerifier(this.__wbg_ptr)}isUnbondPublicVerifier(){return 0!==o.verifyingkey_isUnbondPublicVerifier(this.__wbg_ptr)}checksum(){let _,t;try{const n=o.__wbindgen_add_to_stack_pointer(-16);o.verifyingkey_checksum(n,this.__wbg_ptr);var e=P()[n/4+0],r=P()[n/4+1];return _=e,t=r,u(e,r)}finally{o.__wbindgen_add_to_stack_pointer(16),o.__wbindgen_free(_,t,1)}}copy(){const t=o.verifyingkey_copy(this.__wbg_ptr);return _.__wrap(t)}static fromBytes(t){try{const n=o.__wbindgen_add_to_stack_pointer(-16),i=R(t,o.__wbindgen_malloc),a=p;o.verifyingkey_fromBytes(n,i,a);var e=P()[n/4+0],r=P()[n/4+1];if(P()[n/4+2])throw w(r);return _.__wrap(e)}finally{o.__wbindgen_add_to_stack_pointer(16)}}static fromString(t){try{const n=o.__wbindgen_add_to_stack_pointer(-16),i=h(t,o.__wbindgen_malloc,o.__wbindgen_realloc),a=p;o.verifyingkey_fromString(n,i,a);var e=P()[n/4+0],r=P()[n/4+1];if(P()[n/4+2])throw w(r);return _.__wrap(e)}finally{o.__wbindgen_add_to_stack_pointer(16)}}toBytes(){try{const n=o.__wbindgen_add_to_stack_pointer(-16);o.verifyingkey_toBytes(n,this.__wbg_ptr);var _=P()[n/4+0],t=P()[n/4+1],e=P()[n/4+2];if(P()[n/4+3])throw w(e);var r=j(_,t).slice();return o.__wbindgen_free(_,1*t,1),r}finally{o.__wbindgen_add_to_stack_pointer(16)}}toString(){let _,t;try{const n=o.__wbindgen_add_to_stack_pointer(-16);o.verifyingkey_toString(n,this.__wbg_ptr);var e=P()[n/4+0],r=P()[n/4+1];return _=e,t=r,u(e,r)}finally{o.__wbindgen_add_to_stack_pointer(16),o.__wbindgen_free(_,t,1)}}};const y_="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((_=>o.__wbg_viewkey_free(_>>>0)));let m_=class _{static __wrap(t){t>>>=0;const e=Object.create(_.prototype);return e.__wbg_ptr=t,y_.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,y_.unregister(this),_}free(){const _=this.__destroy_into_raw();o.__wbg_viewkey_free(_)}static from_private_key(t){T(t,G);const e=o.privatekey_to_view_key(t.__wbg_ptr);return _.__wrap(e)}static from_string(t){const e=h(t,o.__wbindgen_malloc,o.__wbindgen_realloc),r=p,n=o.viewkey_from_string(e,r);return _.__wrap(n)}to_string(){let _,t;try{const n=o.__wbindgen_add_to_stack_pointer(-16);o.viewkey_to_string(n,this.__wbg_ptr);var e=P()[n/4+0],r=P()[n/4+1];return _=e,t=r,u(e,r)}finally{o.__wbindgen_add_to_stack_pointer(16),o.__wbindgen_free(_,t,1)}}to_address(){const _=o.address_from_view_key(this.__wbg_ptr);return U.__wrap(_)}decrypt(_){let t,e;try{const g=o.__wbindgen_add_to_stack_pointer(-16),d=h(_,o.__wbindgen_malloc,o.__wbindgen_realloc),b=p;o.viewkey_decrypt(g,this.__wbg_ptr,d,b);var r=P()[g/4+0],n=P()[g/4+1],i=P()[g/4+2],a=P()[g/4+3],s=r,c=n;if(a)throw s=0,c=0,w(i);return t=s,e=c,u(s,c)}finally{o.__wbindgen_add_to_stack_pointer(16),o.__wbindgen_free(t,e,1)}}};async function h_(_,t){if("function"==typeof Response&&_ instanceof Response){if("function"==typeof WebAssembly.instantiateStreaming)try{return await WebAssembly.instantiateStreaming(_,t)}catch(t){if("application/wasm"==_.headers.get("Content-Type"))throw t;console.warn("`WebAssembly.instantiateStreaming` failed because your server does not serve wasm with `application/wasm` MIME type. Falling back to `WebAssembly.instantiate` which is slower. Original error:\n",t)}const e=await _.arrayBuffer();return await WebAssembly.instantiate(e,t)}{const e=await WebAssembly.instantiate(_,t);return e instanceof WebAssembly.Instance?{instance:e,module:_}:e}}function v_(){const _={wbg:{}};return _.wbg.__wbindgen_object_drop_ref=function(_){w(_)},_.wbg.__wbg_new_71801a555ad9f2aa=function(){return E((function(){return f(new XMLHttpRequest)}),arguments)},_.wbg.__wbg_overrideMimeType_ee9c51919ceb418b=function(){return E((function(_,t,e){s(_).overrideMimeType(u(t,e))}),arguments)},_.wbg.__wbg_open_c9eb0cf2c9d95679=function(){return E((function(_,t,e,r,n,i){s(_).open(u(t,e),u(r,n),0!==i)}),arguments)},_.wbg.__wbg_send_80d29985093c1ec5=function(){return E((function(_){s(_).send()}),arguments)},_.wbg.__wbg_response_7c2e2759084f7279=function(){return E((function(_){return f(s(_).response)}),arguments)},_.wbg.__wbg_status_d485fb5a478426fb=function(){return E((function(_){return s(_).status}),arguments)},_.wbg.__wbg_new_72fb9a18b5ae2624=function(){return f(new Object)},_.wbg.__wbindgen_string_new=function(_,t){return f(u(_,t))},_.wbg.__wbg_set_1f9b04f170055d33=function(){return E((function(_,t,e){return Reflect.set(s(_),s(t),s(e))}),arguments)},_.wbg.__wbg_new_ab6fd82b10560829=function(){return E((function(){return f(new Headers)}),arguments)},_.wbg.__wbindgen_object_clone_ref=function(_){return f(s(_))},_.wbg.__wbg_new_0d76b0581eca6298=function(){return E((function(){return f(new AbortController)}),arguments)},_.wbg.__wbg_signal_a61f78a3478fd9bc=function(_){return f(s(_).signal)},_.wbg.__wbg_append_7bfcb4937d1d5e29=function(){return E((function(_,t,e,r,n){s(_).append(u(t,e),u(r,n))}),arguments)},_.wbg.__wbg_instanceof_Response_849eb93e75734b6e=function(_){let t;try{t=s(_)instanceof Response}catch(_){t=!1}return t},_.wbg.__wbg_status_61a01141acd3cf74=function(_){return s(_).status},_.wbg.__wbg_url_5f6dc4009ac5f99d=function(_,t){const e=h(s(t).url,o.__wbindgen_malloc,o.__wbindgen_realloc),r=p;P()[_/4+1]=r,P()[_/4+0]=e},_.wbg.__wbg_headers_9620bfada380764a=function(_){return f(s(_).headers)},_.wbg.__wbg_iterator_2cee6dadfd956dfa=function(){return f(Symbol.iterator)},_.wbg.__wbg_get_e3c254076557e348=function(){return E((function(_,t){return f(Reflect.get(s(_),s(t)))}),arguments)},_.wbg.__wbindgen_is_function=function(_){return"function"==typeof s(_)},_.wbg.__wbg_call_27c0f87801dedf93=function(){return E((function(_,t){return f(s(_).call(s(t)))}),arguments)},_.wbg.__wbindgen_is_object=function(_){const t=s(_);return"object"==typeof t&&null!==t},_.wbg.__wbg_next_40fc327bfc8770e6=function(_){return f(s(_).next)},_.wbg.__wbg_next_196c84450b364254=function(){return E((function(_){return f(s(_).next())}),arguments)},_.wbg.__wbg_done_298b57d23c0fc80c=function(_){return s(_).done},_.wbg.__wbg_value_d93c65011f51a456=function(_){return f(s(_).value)},_.wbg.__wbg_abort_2aa7521d5690750e=function(_){s(_).abort()},_.wbg.__wbg_stringify_8887fe74e1c50d81=function(){return E((function(_){return f(JSON.stringify(s(_)))}),arguments)},_.wbg.__wbindgen_string_get=function(_,t){const e=s(t),r="string"==typeof e?e:void 0;var n=v(r)?0:h(r,o.__wbindgen_malloc,o.__wbindgen_realloc),i=p;P()[_/4+1]=i,P()[_/4+0]=n},_.wbg.__wbg_log_0159ca40cddf5b15=function(_,t){console.log(u(_,t))},_.wbg.__wbindgen_bigint_from_u64=function(_){return f(BigInt.asUintN(64,_))},_.wbg.__wbg_call_b3ca7c6051f9bec1=function(){return E((function(_,t,e){return f(s(_).call(s(t),s(e)))}),arguments)},_.wbg.__wbg_transaction_new=function(_){return f(u_.__wrap(_))},_.wbg.__wbg_keypair_new=function(_){return f(L.__wrap(_))},_.wbg.__wbindgen_module=function(){return f(x_.__wbindgen_wasm_module)},_.wbg.__wbindgen_memory=function(){return f(o.memory)},_.wbg.__wbg_spawnWorker_f6acaddb2e29dc4a=function(_,t,e,r){return f(i(s(_),s(t),s(e),r>>>0))},_.wbg.__wbg_executionresponse_new=function(_){return f($.__wrap(_))},_.wbg.__wbg_newwithlength_66ae46612e7f0234=function(_){return f(new Array(_>>>0))},_.wbg.__wbg_set_d4638f722068f043=function(_,t,e){s(_)[t>>>0]=w(e)},_.wbg.__wbindgen_cb_drop=function(_){const t=w(_).original;if(1==t.cnt--)return t.a=0,!0;return!1},_.wbg.__wbg_new_16b304a2cfa7ff4a=function(){return f(new Array)},_.wbg.__wbg_push_a5b05aedc7234f9f=function(_,t){return s(_).push(s(t))},_.wbg.__wbg_arrayBuffer_29931d52c7206b02=function(){return E((function(_){return f(s(_).arrayBuffer())}),arguments)},_.wbg.__wbg_new_63b92bc8671ed464=function(_){return f(new Uint8Array(s(_)))},_.wbg.__wbg_length_c20a40f15020d68a=function(_){return s(_).length},_.wbg.__wbg_new_81740750da40724f=function(_,t){try{var e={a:_,b:t};const r=new Promise(((_,t)=>{const r=e.a;e.a=0;try{return M(r,e.b,_,t)}finally{e.a=r}}));return f(r)}finally{e.a=e.b=0}},_.wbg.__wbindgen_number_new=function(_){return f(_)},_.wbg.__wbg_new_abda76e883ba8a5f=function(){return f(new Error)},_.wbg.__wbg_stack_658279fe44541cf6=function(_,t){const e=h(s(t).stack,o.__wbindgen_malloc,o.__wbindgen_realloc),r=p;P()[_/4+1]=r,P()[_/4+0]=e},_.wbg.__wbg_error_f851667af71bcfc6=function(_,t){let e,r;try{e=_,r=t,console.error(u(_,t))}finally{o.__wbindgen_free(e,r,1)}},_.wbg.__wbg_buffer_12d079cc21e14bdb=function(_){return f(s(_).buffer)},_.wbg.__wbg_newwithbyteoffsetandlength_aa4a17c33a06e5cb=function(_,t,e){return f(new Uint8Array(s(_),t>>>0,e>>>0))},_.wbg.__wbg_randomFillSync_5c9c955aa56b6049=function(){return E((function(_,t){s(_).randomFillSync(w(t))}),arguments)},_.wbg.__wbg_subarray_a1f73cd4b5b42fe1=function(_,t,e){return f(s(_).subarray(t>>>0,e>>>0))},_.wbg.__wbg_getRandomValues_3aa56aa6edec874c=function(){return E((function(_,t){s(_).getRandomValues(s(t))}),arguments)},_.wbg.__wbg_set_a47bac70306a19a7=function(_,t,e){s(_).set(s(t),e>>>0)},_.wbg.__wbg_crypto_1d1f22824a6a080c=function(_){return f(s(_).crypto)},_.wbg.__wbg_process_4a72847cc503995b=function(_){return f(s(_).process)},_.wbg.__wbg_versions_f686565e586dd935=function(_){return f(s(_).versions)},_.wbg.__wbg_node_104a2ff8d6ea03a2=function(_){return f(s(_).node)},_.wbg.__wbindgen_is_string=function(_){return"string"==typeof s(_)},_.wbg.__wbg_require_cca90b1a94a0255b=function(){return E((function(){return f(module.require)}),arguments)},_.wbg.__wbg_msCrypto_eb05e62b530a1508=function(_){return f(s(_).msCrypto)},_.wbg.__wbg_newwithlength_e9b4878cebadb3d3=function(_){return f(new Uint8Array(_>>>0))},_.wbg.__wbg_length_cd7af8117672b8b8=function(_){return s(_).length},_.wbg.__wbg_get_bd8e338fbd5f5cc8=function(_,t){return f(s(_)[t>>>0])},_.wbg.__wbg_self_ce0dbfc45cf2f5be=function(){return E((function(){return f(self.self)}),arguments)},_.wbg.__wbg_window_c6fb939a7f436783=function(){return E((function(){return f(window.window)}),arguments)},_.wbg.__wbg_globalThis_d1e6af4856ba331b=function(){return E((function(){return f(globalThis.globalThis)}),arguments)},_.wbg.__wbg_global_207b558942527489=function(){return E((function(){return f(global.global)}),arguments)},_.wbg.__wbindgen_is_undefined=function(_){return void 0===s(_)},_.wbg.__wbg_newnoargs_e258087cd0daa0ea=function(_,t){return f(new Function(u(_,t)))},_.wbg.__wbg_has_0af94d20077affa2=function(){return E((function(_,t){return Reflect.has(s(_),s(t))}),arguments)},_.wbg.__wbg_fetch_bc7c8e27076a5c84=function(_){return f(fetch(s(_)))},_.wbg.__wbg_fetch_921fad6ef9e883dd=function(_,t){return f(s(_).fetch(s(t)))},_.wbg.__wbindgen_debug_string=function(_,t){const e=h(S(s(t)),o.__wbindgen_malloc,o.__wbindgen_realloc),r=p;P()[_/4+1]=r,P()[_/4+0]=e},_.wbg.__wbindgen_throw=function(_,t){throw new Error(u(_,t))},_.wbg.__wbindgen_rethrow=function(_){throw w(_)},_.wbg.__wbg_then_a73caa9a87991566=function(_,t,e){return f(s(_).then(s(t),s(e)))},_.wbg.__wbg_then_0c86a60e8fcfe9f6=function(_,t){return f(s(_).then(s(t)))},_.wbg.__wbg_queueMicrotask_481971b0d87f3dd4=function(_){queueMicrotask(s(_))},_.wbg.__wbg_queueMicrotask_3cbae2ec6b6cd3d6=function(_){return f(s(_).queueMicrotask)},_.wbg.__wbg_resolve_b0083a7967828ec8=function(_){return f(Promise.resolve(s(_)))},_.wbg.__wbg_waitAsync_5d743fc9058ba01a=function(){return f(Atomics.waitAsync)},_.wbg.__wbg_new_8cccba86b0f574cb=function(_){return f(new Int32Array(s(_)))},_.wbg.__wbg_waitAsync_46d5c36955b71a79=function(_,t,e){return f(Atomics.waitAsync(s(_),t,e))},_.wbg.__wbg_async_19c0400d97cc72fe=function(_){return s(_).async},_.wbg.__wbg_value_571d60108110e917=function(_){return f(s(_).value)},_.wbg.__wbindgen_link_fc1eedd35dc7e0a6=function(_){const t=h("data:application/javascript,"+encodeURIComponent("onmessage = function (ev) {\n let [ia, index, value] = ev.data;\n ia = new Int32Array(ia.buffer);\n let result = Atomics.wait(ia, index, value);\n postMessage(result);\n };\n "),o.__wbindgen_malloc,o.__wbindgen_realloc),e=p;P()[_/4+1]=e,P()[_/4+0]=t},_.wbg.__wbg_new_d1187ae36d662ef9=function(){return E((function(_,t){return f(new Worker(u(_,t)))}),arguments)},_.wbg.__wbg_setonmessage_503809e5bb51bd33=function(_,t){s(_).onmessage=s(t)},_.wbg.__wbg_of_6a70eed8d41f469c=function(_,t,e){return f(Array.of(s(_),s(t),s(e)))},_.wbg.__wbg_postMessage_7380d10e8b8269df=function(){return E((function(_,t){s(_).postMessage(s(t))}),arguments)},_.wbg.__wbg_data_3ce7c145ca4fbcdc=function(_){return f(s(_).data)},_.wbg.__wbg_newwithstrandinit_3fd6fba4083ff2d0=function(){return E((function(_,t,e){return f(new Request(u(_,t),s(e)))}),arguments)},_.wbg.__wbg_responseText_c67ed2d48db10769=function(){return E((function(_,t){const e=s(t).responseText;var r=v(e)?0:h(e,o.__wbindgen_malloc,o.__wbindgen_realloc),n=p;P()[_/4+1]=n,P()[_/4+0]=r}),arguments)},_.wbg.__wbindgen_closure_wrapper5837=function(_,t,e){return f(V(_,t,538,F))},_.wbg.__wbindgen_closure_wrapper5862=function(_,t,e){return f(V(_,t,538,F))},_}function k_(_,t){_.wbg.memory=t||new WebAssembly.Memory({initial:25,maximum:65536,shared:!0})}function P_(_,t){return o=_.exports,x_.__wbindgen_wasm_module=t,A=null,k=null,b=null,o.__wbindgen_start(),o}function S_(_,t){if(void 0!==o)return o;const e=v_();k_(e,t),_ instanceof WebAssembly.Module||(_=new WebAssembly.Module(_));return P_(new WebAssembly.Instance(_,e),_)}async function x_(_,t){if(void 0!==o)return o;const e=v_();("string"==typeof _||"function"==typeof Request&&_ instanceof Request||"function"==typeof URL&&_ instanceof URL)&&(_=fetch(_)),k_(e,t);const{instance:r,module:n}=await h_(await _,e);return P_(r,n)}var n=Object.freeze({__proto__:null,Address:U,Execution:q,ExecutionResponse:$,Field:D,KeyPair:L,Metadata:Z,OfflineQuery:X,PrivateKey:G,PrivateKeyCiphertext:t_,Program:r_,ProgramManager:i_,ProvingKey:a_,RecordCiphertext:c_,RecordPlaintext:w_,Signature:b_,Transaction:u_,VerifyingKey:p_,ViewKey:m_,default:x_,initSync:S_,initThreadPool:C,runRayonThread:K,verifyFunctionExecution:z});const V_="assets/aleo_wasm.wasm";const{initThreadPool:F_,Address:T_,Execution:R_,ExecutionResponse:z_,Field:A_,Metadata:O_,OfflineQuery:j_,Private:K_,PrivateKey:C_,PrivateKeyCiphertext:E_,Program:M_,ProvingKey:B_,RecordCiphertext:U_,RecordPlaintext:I_,ProgramManager:q_,Signature:W_,Transaction:$_,ViewKey:N_,VerifyingKey:D_,verifyFunctionExecution:J_}=await(async(_={})=>{let{importHook:t,serverPath:e,initializeHook:r}=_,i=V_;return null!=e&&(i=e+/[^\/\\]*$/.exec(i)[0]),null!=t&&(i=t(i)),null!=r?await r(x_,i):await x_(i),n})({importHook:()=>new URL(e(81),e.b)});async function L_(_){null==_&&(_=navigator.hardwareConcurrency),console.info(`Spawning ${_} threads`),await F_(new URL(e(977),e.b),_)}r()}catch(H_){r(H_)}}),1)}}]); -//# sourceMappingURL=877.bundle.js.map \ No newline at end of file diff --git a/877.bundle.js.map b/877.bundle.js.map deleted file mode 100644 index 59d330159..000000000 --- a/877.bundle.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"877.bundle.js","mappings":"wOAAA,SAASA,EAAYC,EAAKC,EAAQC,EAAQC,GAClC,OAAO,IAAIC,SAASC,IAChB,MAAMC,EAAS,IAAIC,OAAOP,EAAK,CAC3BQ,KAAM,WAGVF,EAAOG,iBAAiB,WAAYC,IAGhCC,YAAW,KACPN,EAAQC,GAIJA,EAAOM,OACPN,EAAOM,OAC/B,GACmB,EAAE,GACN,CACCC,SAAS,EACTC,MAAM,IAGVR,EAAOS,YAAY,CACfd,SACAC,SACAC,WACF,GAEd,CAEA,IAAIa,E,uHAEJ,MAAMC,EAAO,IAAIC,MAAM,KAAKC,UAAKC,GAIjC,SAASC,EAAUC,GAAO,OAAOL,EAAKK,EAAK,CAF3CL,EAAKM,UAAKH,EAAW,MAAM,GAAM,GAIjC,IAAII,EAAYP,EA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W,QACX+E,GAAO,aACPrE,GAAY,wBACZ/W,SD26IoB0b,OAAOiM,EAAM,CAAC,KACtB,IAAI,WAACC,EAAU,WAAEC,EAAU,eAAEC,GAAkBH,EAE3CI,EAAaP,GAiBjB,OAfkB,MAAdK,IACAE,EAAaF,EAAa,YAAY7qB,KAAK+qB,GAAY,IAGzC,MAAdH,IACAG,EAAaH,EAAWG,IAGN,MAAlBD,QACMA,EAAe3H,GAAY4H,SAG3B5H,GAAW4H,GAGdpB,CAAO,EC97IpBqB,CAAK,CACXJ,WAAYA,IACD,IAAIZ,IAAI,aAIvBtL,eAAe9a,GAAeqnB,GACX,MAAXA,IACAA,EAAUC,UAAUC,qBAGxBnM,QAAQoM,KAAK,YAAYH,mBAEnBR,GAAmB,IAAIT,IAAI,YAA+BiB,EACpE,C","sources":["webpack://aleo-website/wasm.js","webpack://aleo-website/../js/index.js"],"sourcesContent":["function spawnWorker(url, module, memory, address) {\n return new Promise((resolve) => {\n const worker = new Worker(url, {\n type: \"module\",\n });\n\n worker.addEventListener(\"message\", (event) => {\n // This is needed in Node to wait one extra tick, so that way\n // the Worker can fully initialize before we return.\n setTimeout(() => {\n resolve(worker);\n\n // When running in Node, this allows the process to exit\n // even though the Worker is still running.\n if (worker.unref) {\n worker.unref();\n }\n }, 0);\n }, {\n capture: true,\n once: true,\n });\n\n worker.postMessage({\n module,\n memory,\n address,\n });\n });\n }\n\nlet wasm;\n\nconst heap = new Array(128).fill(undefined);\n\nheap.push(undefined, null, true, false);\n\nfunction getObject(idx) { return heap[idx]; }\n\nlet heap_next = heap.length;\n\nfunction dropObject(idx) {\n if (idx < 132) return;\n heap[idx] = heap_next;\n heap_next = idx;\n}\n\nfunction takeObject(idx) {\n const ret = getObject(idx);\n dropObject(idx);\n return ret;\n}\n\nconst cachedTextDecoder = (typeof TextDecoder !== 'undefined' ? new TextDecoder('utf-8', { ignoreBOM: true, fatal: true }) : { decode: () => { throw Error('TextDecoder not available') } } );\n\nif (typeof TextDecoder !== 'undefined') { cachedTextDecoder.decode(); }\nlet cachedUint8Memory0 = null;\n\nfunction getUint8Memory0() {\n if (cachedUint8Memory0 === null || cachedUint8Memory0.buffer !== wasm.memory.buffer) {\n cachedUint8Memory0 = new Uint8Array(wasm.memory.buffer);\n }\n return cachedUint8Memory0;\n}\n\nfunction getStringFromWasm0(ptr, len) {\n ptr = ptr >>> 0;\n return cachedTextDecoder.decode(getUint8Memory0().slice(ptr, ptr + len));\n}\n\nfunction addHeapObject(obj) {\n if (heap_next === heap.length) heap.push(heap.length + 1);\n const idx = heap_next;\n heap_next = heap[idx];\n\n heap[idx] = obj;\n return idx;\n}\n\nlet WASM_VECTOR_LEN = 0;\n\nconst cachedTextEncoder = (typeof TextEncoder !== 'undefined' ? new TextEncoder('utf-8') : { encode: () => { throw Error('TextEncoder not available') } } );\n\nconst encodeString = function (arg, view) {\n const buf = cachedTextEncoder.encode(arg);\n view.set(buf);\n return {\n read: arg.length,\n written: buf.length\n };\n};\n\nfunction passStringToWasm0(arg, malloc, realloc) {\n\n if (realloc === undefined) {\n const buf = cachedTextEncoder.encode(arg);\n const ptr = malloc(buf.length, 1) >>> 0;\n getUint8Memory0().subarray(ptr, ptr + buf.length).set(buf);\n WASM_VECTOR_LEN = buf.length;\n return ptr;\n }\n\n let len = arg.length;\n let ptr = malloc(len, 1) >>> 0;\n\n const mem = getUint8Memory0();\n\n let offset = 0;\n\n for (; offset < len; offset++) {\n const code = arg.charCodeAt(offset);\n if (code > 0x7F) break;\n mem[ptr + offset] = code;\n }\n\n if (offset !== len) {\n if (offset !== 0) {\n arg = arg.slice(offset);\n }\n ptr = realloc(ptr, len, len = offset + arg.length * 3, 1) >>> 0;\n const view = getUint8Memory0().subarray(ptr + offset, ptr + len);\n const ret = encodeString(arg, view);\n\n offset += ret.written;\n ptr = realloc(ptr, len, offset, 1) >>> 0;\n }\n\n WASM_VECTOR_LEN = offset;\n return ptr;\n}\n\nfunction isLikeNone(x) {\n return x === undefined || x === null;\n}\n\nlet cachedInt32Memory0 = null;\n\nfunction getInt32Memory0() {\n if (cachedInt32Memory0 === null || cachedInt32Memory0.buffer !== wasm.memory.buffer) {\n cachedInt32Memory0 = new Int32Array(wasm.memory.buffer);\n }\n return cachedInt32Memory0;\n}\n\nfunction debugString(val) {\n // primitive types\n const type = typeof val;\n if (type == 'number' || type == 'boolean' || val == null) {\n return `${val}`;\n }\n if (type == 'string') {\n return `\"${val}\"`;\n }\n if (type == 'symbol') {\n const description = val.description;\n if (description == null) {\n return 'Symbol';\n } else {\n return `Symbol(${description})`;\n }\n }\n if (type == 'function') {\n const name = val.name;\n if (typeof name == 'string' && name.length > 0) {\n return `Function(${name})`;\n } else {\n return 'Function';\n }\n }\n // objects\n if (Array.isArray(val)) {\n const length = val.length;\n let debug = '[';\n if (length > 0) {\n debug += debugString(val[0]);\n }\n for(let i = 1; i < length; i++) {\n debug += ', ' + debugString(val[i]);\n }\n debug += ']';\n return debug;\n }\n // Test for built-in\n const builtInMatches = /\\[object ([^\\]]+)\\]/.exec(toString.call(val));\n let className;\n if (builtInMatches.length > 1) {\n className = builtInMatches[1];\n } else {\n // Failed to match the standard '[object ClassName]'\n return toString.call(val);\n }\n if (className == 'Object') {\n // we're a user defined class or Object\n // JSON.stringify avoids problems with cycles, and is generally much\n // easier than looping through ownProperties of `val`.\n try {\n return 'Object(' + JSON.stringify(val) + ')';\n } catch (_) {\n return 'Object';\n }\n }\n // errors\n if (val instanceof Error) {\n return `${val.name}: ${val.message}\\n${val.stack}`;\n }\n // TODO we could test for more things here, like `Set`s and `Map`s.\n return className;\n}\n\nconst CLOSURE_DTORS = (typeof FinalizationRegistry === 'undefined')\n ? { register: () => {}, unregister: () => {} }\n : new FinalizationRegistry(state => {\n wasm.__wbindgen_export_3.get(state.dtor)(state.a, state.b);\n});\n\nfunction makeMutClosure(arg0, arg1, dtor, f) {\n const state = { a: arg0, b: arg1, cnt: 1, dtor };\n const real = (...args) => {\n // First up with a closure we increment the internal reference\n // count. This ensures that the Rust closure environment won't\n // be deallocated while we're invoking it.\n state.cnt++;\n const a = state.a;\n state.a = 0;\n try {\n return f(a, state.b, ...args);\n } finally {\n if (--state.cnt === 0) {\n wasm.__wbindgen_export_3.get(state.dtor)(a, state.b);\n CLOSURE_DTORS.unregister(state);\n } else {\n state.a = a;\n }\n }\n };\n real.original = state;\n CLOSURE_DTORS.register(real, state, state);\n return real;\n}\nfunction __wbg_adapter_34(arg0, arg1, arg2) {\n wasm._dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h467700a9696faab3(arg0, arg1, addHeapObject(arg2));\n}\n\nfunction _assertClass(instance, klass) {\n if (!(instance instanceof klass)) {\n throw new Error(`expected instance of ${klass.name}`);\n }\n return instance.ptr;\n}\n\nfunction passArray8ToWasm0(arg, malloc) {\n const ptr = malloc(arg.length * 1, 1) >>> 0;\n getUint8Memory0().set(arg, ptr / 1);\n WASM_VECTOR_LEN = arg.length;\n return ptr;\n}\n/**\n* Verify an execution with a single function and a single transition. Executions with multiple\n* transitions or functions will fail to verify. Also, this does not verify that the state root of\n* the execution is included in the Aleo Network ledger.\n*\n* @param {Execution} execution The function execution to verify\n* @param {VerifyingKey} verifying_key The verifying key for the function\n* @param {Program} program The program that the function execution belongs to\n* @param {String} function_id The name of the function that was executed\n* @returns {boolean} True if the execution is valid, false otherwise\n* @param {Execution} execution\n* @param {VerifyingKey} verifying_key\n* @param {Program} program\n* @param {string} function_id\n* @returns {boolean}\n*/\nfunction verifyFunctionExecution(execution, verifying_key, program, function_id) {\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n _assertClass(execution, Execution);\n _assertClass(verifying_key, VerifyingKey);\n _assertClass(program, Program);\n const ptr0 = passStringToWasm0(function_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n wasm.verifyFunctionExecution(retptr, execution.__wbg_ptr, verifying_key.__wbg_ptr, program.__wbg_ptr, ptr0, len0);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n var r2 = getInt32Memory0()[retptr / 4 + 2];\n if (r2) {\n throw takeObject(r1);\n }\n return r0 !== 0;\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n }\n}\n\nlet cachedBigInt64Memory0 = null;\n\nfunction getBigInt64Memory0() {\n if (cachedBigInt64Memory0 === null || cachedBigInt64Memory0.buffer !== wasm.memory.buffer) {\n cachedBigInt64Memory0 = new BigInt64Array(wasm.memory.buffer);\n }\n return cachedBigInt64Memory0;\n}\n\nfunction getArrayU8FromWasm0(ptr, len) {\n ptr = ptr >>> 0;\n return getUint8Memory0().subarray(ptr / 1, ptr / 1 + len);\n}\n/**\n* @param {number} receiver\n*/\nfunction runRayonThread(receiver) {\n wasm.runRayonThread(receiver);\n}\n\n/**\n* @param {URL} url\n* @param {number} num_threads\n* @returns {Promise}\n*/\nfunction initThreadPool(url, num_threads) {\n const ret = wasm.initThreadPool(addHeapObject(url), num_threads);\n return takeObject(ret);\n}\n\nfunction handleError(f, args) {\n try {\n return f.apply(this, args);\n } catch (e) {\n wasm.__wbindgen_exn_store(addHeapObject(e));\n }\n}\nfunction __wbg_adapter_281(arg0, arg1, arg2, arg3) {\n wasm.wasm_bindgen__convert__closures__invoke2_mut__h381bef3cd886b4c7(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));\n}\n\nconst AddressFinalization = (typeof FinalizationRegistry === 'undefined')\n ? { register: () => {}, unregister: () => {} }\n : new FinalizationRegistry(ptr => wasm.__wbg_address_free(ptr >>> 0));\n/**\n* Public address of an Aleo account\n*/\nclass Address {\n\n static __wrap(ptr) {\n ptr = ptr >>> 0;\n const obj = Object.create(Address.prototype);\n obj.__wbg_ptr = ptr;\n AddressFinalization.register(obj, obj.__wbg_ptr, obj);\n return obj;\n }\n\n __destroy_into_raw() {\n const ptr = this.__wbg_ptr;\n this.__wbg_ptr = 0;\n AddressFinalization.unregister(this);\n return ptr;\n }\n\n free() {\n const ptr = this.__destroy_into_raw();\n wasm.__wbg_address_free(ptr);\n }\n /**\n * Derive an Aleo address from a private key\n *\n * @param {PrivateKey} private_key The private key to derive the address from\n * @returns {Address} Address corresponding to the private key\n * @param {PrivateKey} private_key\n * @returns {Address}\n */\n static from_private_key(private_key) {\n _assertClass(private_key, PrivateKey);\n const ret = wasm.address_from_private_key(private_key.__wbg_ptr);\n return Address.__wrap(ret);\n }\n /**\n * Derive an Aleo address from a view key\n *\n * @param {ViewKey} view_key The view key to derive the address from\n * @returns {Address} Address corresponding to the view key\n * @param {ViewKey} view_key\n * @returns {Address}\n */\n static from_view_key(view_key) {\n _assertClass(view_key, ViewKey);\n const ret = wasm.address_from_view_key(view_key.__wbg_ptr);\n return Address.__wrap(ret);\n }\n /**\n * Create an aleo address object from a string representation of an address\n *\n * @param {string} address String representation of an addressm\n * @returns {Address} Address\n * @param {string} address\n * @returns {Address}\n */\n static from_string(address) {\n const ptr0 = passStringToWasm0(address, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n const ret = wasm.address_from_string(ptr0, len0);\n return Address.__wrap(ret);\n }\n /**\n * Get a string representation of an Aleo address object\n *\n * @param {Address} Address\n * @returns {string} String representation of the address\n * @returns {string}\n */\n to_string() {\n let deferred1_0;\n let deferred1_1;\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n wasm.address_to_string(retptr, this.__wbg_ptr);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n deferred1_0 = r0;\n deferred1_1 = r1;\n return getStringFromWasm0(r0, r1);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);\n }\n }\n /**\n * Verify a signature for a message signed by the address\n *\n * @param {Uint8Array} Byte array representing a message signed by the address\n * @returns {boolean} Boolean representing whether or not the signature is valid\n * @param {Uint8Array} message\n * @param {Signature} signature\n * @returns {boolean}\n */\n verify(message, signature) {\n const ptr0 = passArray8ToWasm0(message, wasm.__wbindgen_malloc);\n const len0 = WASM_VECTOR_LEN;\n _assertClass(signature, Signature);\n const ret = wasm.address_verify(this.__wbg_ptr, ptr0, len0, signature.__wbg_ptr);\n return ret !== 0;\n }\n}\n\nconst ExecutionFinalization = (typeof FinalizationRegistry === 'undefined')\n ? { register: () => {}, unregister: () => {} }\n : new FinalizationRegistry(ptr => wasm.__wbg_execution_free(ptr >>> 0));\n/**\n* Execution of an Aleo program.\n*/\nclass Execution {\n\n static __wrap(ptr) {\n ptr = ptr >>> 0;\n const obj = Object.create(Execution.prototype);\n obj.__wbg_ptr = ptr;\n ExecutionFinalization.register(obj, obj.__wbg_ptr, obj);\n return obj;\n }\n\n __destroy_into_raw() {\n const ptr = this.__wbg_ptr;\n this.__wbg_ptr = 0;\n ExecutionFinalization.unregister(this);\n return ptr;\n }\n\n free() {\n const ptr = this.__destroy_into_raw();\n wasm.__wbg_execution_free(ptr);\n }\n /**\n * Returns the string representation of the execution.\n * @returns {string}\n */\n toString() {\n let deferred1_0;\n let deferred1_1;\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n wasm.execution_toString(retptr, this.__wbg_ptr);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n deferred1_0 = r0;\n deferred1_1 = r1;\n return getStringFromWasm0(r0, r1);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);\n }\n }\n /**\n * Creates an execution object from a string representation of an execution.\n * @param {string} execution\n * @returns {Execution}\n */\n static fromString(execution) {\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n const ptr0 = passStringToWasm0(execution, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n wasm.execution_fromString(retptr, ptr0, len0);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n var r2 = getInt32Memory0()[retptr / 4 + 2];\n if (r2) {\n throw takeObject(r1);\n }\n return Execution.__wrap(r0);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n }\n }\n}\n\nconst ExecutionResponseFinalization = (typeof FinalizationRegistry === 'undefined')\n ? { register: () => {}, unregister: () => {} }\n : new FinalizationRegistry(ptr => wasm.__wbg_executionresponse_free(ptr >>> 0));\n/**\n* Webassembly Representation of an Aleo function execution response\n*\n* This object is returned by the execution of an Aleo function off-chain. It provides methods for\n* retrieving the outputs of the function execution.\n*/\nclass ExecutionResponse {\n\n static __wrap(ptr) {\n ptr = ptr >>> 0;\n const obj = Object.create(ExecutionResponse.prototype);\n obj.__wbg_ptr = ptr;\n ExecutionResponseFinalization.register(obj, obj.__wbg_ptr, obj);\n return obj;\n }\n\n __destroy_into_raw() {\n const ptr = this.__wbg_ptr;\n this.__wbg_ptr = 0;\n ExecutionResponseFinalization.unregister(this);\n return ptr;\n }\n\n free() {\n const ptr = this.__destroy_into_raw();\n wasm.__wbg_executionresponse_free(ptr);\n }\n /**\n * Get the outputs of the executed function\n *\n * @returns {Array} Array of strings representing the outputs of the function\n * @returns {Array}\n */\n getOutputs() {\n const ret = wasm.executionresponse_getOutputs(this.__wbg_ptr);\n return takeObject(ret);\n }\n /**\n * Returns the execution object if present, null if otherwise.\n *\n * @returns {Execution | undefined} The execution object if present, null if otherwise\n * @returns {Execution | undefined}\n */\n getExecution() {\n const ret = wasm.executionresponse_getExecution(this.__wbg_ptr);\n return ret === 0 ? undefined : Execution.__wrap(ret);\n }\n /**\n * Returns the program keys if present\n * @returns {KeyPair}\n */\n getKeys() {\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n wasm.executionresponse_getKeys(retptr, this.__wbg_ptr);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n var r2 = getInt32Memory0()[retptr / 4 + 2];\n if (r2) {\n throw takeObject(r1);\n }\n return KeyPair.__wrap(r0);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n }\n }\n /**\n * Returns the proving_key if the proving key was cached in the Execution response.\n * Note the proving key is removed from the response object after the first call to this\n * function. Subsequent calls will return null.\n *\n * @returns {ProvingKey | undefined} The proving key\n * @returns {ProvingKey | undefined}\n */\n getProvingKey() {\n const ret = wasm.executionresponse_getProvingKey(this.__wbg_ptr);\n return ret === 0 ? undefined : ProvingKey.__wrap(ret);\n }\n /**\n * Returns the verifying_key associated with the program\n *\n * @returns {VerifyingKey} The verifying key\n * @returns {VerifyingKey}\n */\n getVerifyingKey() {\n const ret = wasm.executionresponse_getVerifyingKey(this.__wbg_ptr);\n return VerifyingKey.__wrap(ret);\n }\n /**\n * Returns the function identifier\n * @returns {string}\n */\n getFunctionId() {\n let deferred1_0;\n let deferred1_1;\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n wasm.executionresponse_getFunctionId(retptr, this.__wbg_ptr);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n deferred1_0 = r0;\n deferred1_1 = r1;\n return getStringFromWasm0(r0, r1);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);\n }\n }\n /**\n * Returns the program\n * @returns {Program}\n */\n getProgram() {\n const ret = wasm.executionresponse_getProgram(this.__wbg_ptr);\n return Program.__wrap(ret);\n }\n}\n\nconst FieldFinalization = (typeof FinalizationRegistry === 'undefined')\n ? { register: () => {}, unregister: () => {} }\n : new FinalizationRegistry(ptr => wasm.__wbg_field_free(ptr >>> 0));\n/**\n*/\nclass Field {\n\n static __wrap(ptr) {\n ptr = ptr >>> 0;\n const obj = Object.create(Field.prototype);\n obj.__wbg_ptr = ptr;\n FieldFinalization.register(obj, obj.__wbg_ptr, obj);\n return obj;\n }\n\n __destroy_into_raw() {\n const ptr = this.__wbg_ptr;\n this.__wbg_ptr = 0;\n FieldFinalization.unregister(this);\n return ptr;\n }\n\n free() {\n const ptr = this.__destroy_into_raw();\n wasm.__wbg_field_free(ptr);\n }\n /**\n * @returns {string}\n */\n toString() {\n let deferred1_0;\n let deferred1_1;\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n wasm.field_toString(retptr, this.__wbg_ptr);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n deferred1_0 = r0;\n deferred1_1 = r1;\n return getStringFromWasm0(r0, r1);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);\n }\n }\n /**\n * @param {string} field\n * @returns {Field}\n */\n static fromString(field) {\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n const ptr0 = passStringToWasm0(field, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n wasm.field_fromString(retptr, ptr0, len0);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n var r2 = getInt32Memory0()[retptr / 4 + 2];\n if (r2) {\n throw takeObject(r1);\n }\n return Field.__wrap(r0);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n }\n }\n}\n\nconst KeyPairFinalization = (typeof FinalizationRegistry === 'undefined')\n ? { register: () => {}, unregister: () => {} }\n : new FinalizationRegistry(ptr => wasm.__wbg_keypair_free(ptr >>> 0));\n/**\n* Key pair object containing both the function proving and verifying keys\n*/\nclass KeyPair {\n\n static __wrap(ptr) {\n ptr = ptr >>> 0;\n const obj = Object.create(KeyPair.prototype);\n obj.__wbg_ptr = ptr;\n KeyPairFinalization.register(obj, obj.__wbg_ptr, obj);\n return obj;\n }\n\n __destroy_into_raw() {\n const ptr = this.__wbg_ptr;\n this.__wbg_ptr = 0;\n KeyPairFinalization.unregister(this);\n return ptr;\n }\n\n free() {\n const ptr = this.__destroy_into_raw();\n wasm.__wbg_keypair_free(ptr);\n }\n /**\n * Create new key pair from proving and verifying keys\n *\n * @param {ProvingKey} proving_key Proving key corresponding to a function in an Aleo program\n * @param {VerifyingKey} verifying_key Verifying key corresponding to a function in an Aleo program\n * @returns {KeyPair} Key pair object containing both the function proving and verifying keys\n * @param {ProvingKey} proving_key\n * @param {VerifyingKey} verifying_key\n */\n constructor(proving_key, verifying_key) {\n _assertClass(proving_key, ProvingKey);\n var ptr0 = proving_key.__destroy_into_raw();\n _assertClass(verifying_key, VerifyingKey);\n var ptr1 = verifying_key.__destroy_into_raw();\n const ret = wasm.keypair_new(ptr0, ptr1);\n this.__wbg_ptr = ret >>> 0;\n return this;\n }\n /**\n * Get the proving key. This method will remove the proving key from the key pair\n *\n * @returns {ProvingKey | Error}\n * @returns {ProvingKey}\n */\n provingKey() {\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n wasm.keypair_provingKey(retptr, this.__wbg_ptr);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n var r2 = getInt32Memory0()[retptr / 4 + 2];\n if (r2) {\n throw takeObject(r1);\n }\n return ProvingKey.__wrap(r0);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n }\n }\n /**\n * Get the verifying key. This method will remove the verifying key from the key pair\n *\n * @returns {VerifyingKey | Error}\n * @returns {VerifyingKey}\n */\n verifyingKey() {\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n wasm.keypair_verifyingKey(retptr, this.__wbg_ptr);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n var r2 = getInt32Memory0()[retptr / 4 + 2];\n if (r2) {\n throw takeObject(r1);\n }\n return VerifyingKey.__wrap(r0);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n }\n }\n}\n\nconst MetadataFinalization = (typeof FinalizationRegistry === 'undefined')\n ? { register: () => {}, unregister: () => {} }\n : new FinalizationRegistry(ptr => wasm.__wbg_metadata_free(ptr >>> 0));\n/**\n*/\nclass Metadata {\n\n static __wrap(ptr) {\n ptr = ptr >>> 0;\n const obj = Object.create(Metadata.prototype);\n obj.__wbg_ptr = ptr;\n MetadataFinalization.register(obj, obj.__wbg_ptr, obj);\n return obj;\n }\n\n __destroy_into_raw() {\n const ptr = this.__wbg_ptr;\n this.__wbg_ptr = 0;\n MetadataFinalization.unregister(this);\n return ptr;\n }\n\n free() {\n const ptr = this.__destroy_into_raw();\n wasm.__wbg_metadata_free(ptr);\n }\n /**\n * @returns {string}\n */\n get name() {\n let deferred1_0;\n let deferred1_1;\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n wasm.__wbg_get_metadata_name(retptr, this.__wbg_ptr);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n deferred1_0 = r0;\n deferred1_1 = r1;\n return getStringFromWasm0(r0, r1);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);\n }\n }\n /**\n * @param {string} arg0\n */\n set name(arg0) {\n const ptr0 = passStringToWasm0(arg0, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n wasm.__wbg_set_metadata_name(this.__wbg_ptr, ptr0, len0);\n }\n /**\n * @returns {string}\n */\n get locator() {\n let deferred1_0;\n let deferred1_1;\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n wasm.__wbg_get_metadata_locator(retptr, this.__wbg_ptr);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n deferred1_0 = r0;\n deferred1_1 = r1;\n return getStringFromWasm0(r0, r1);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);\n }\n }\n /**\n * @param {string} arg0\n */\n set locator(arg0) {\n const ptr0 = passStringToWasm0(arg0, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n wasm.__wbg_set_metadata_locator(this.__wbg_ptr, ptr0, len0);\n }\n /**\n * @returns {string}\n */\n get prover() {\n let deferred1_0;\n let deferred1_1;\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n wasm.__wbg_get_metadata_prover(retptr, this.__wbg_ptr);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n deferred1_0 = r0;\n deferred1_1 = r1;\n return getStringFromWasm0(r0, r1);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);\n }\n }\n /**\n * @param {string} arg0\n */\n set prover(arg0) {\n const ptr0 = passStringToWasm0(arg0, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n wasm.__wbg_set_metadata_prover(this.__wbg_ptr, ptr0, len0);\n }\n /**\n * @returns {string}\n */\n get verifier() {\n let deferred1_0;\n let deferred1_1;\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n wasm.__wbg_get_metadata_verifier(retptr, this.__wbg_ptr);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n deferred1_0 = r0;\n deferred1_1 = r1;\n return getStringFromWasm0(r0, r1);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);\n }\n }\n /**\n * @param {string} arg0\n */\n set verifier(arg0) {\n const ptr0 = passStringToWasm0(arg0, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n wasm.__wbg_set_metadata_verifier(this.__wbg_ptr, ptr0, len0);\n }\n /**\n * @returns {string}\n */\n get verifyingKey() {\n let deferred1_0;\n let deferred1_1;\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n wasm.__wbg_get_metadata_verifyingKey(retptr, this.__wbg_ptr);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n deferred1_0 = r0;\n deferred1_1 = r1;\n return getStringFromWasm0(r0, r1);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);\n }\n }\n /**\n * @param {string} arg0\n */\n set verifyingKey(arg0) {\n const ptr0 = passStringToWasm0(arg0, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n wasm.__wbg_set_metadata_verifyingKey(this.__wbg_ptr, ptr0, len0);\n }\n /**\n * @returns {string}\n */\n static baseUrl() {\n let deferred1_0;\n let deferred1_1;\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n wasm.metadata_baseUrl(retptr);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n deferred1_0 = r0;\n deferred1_1 = r1;\n return getStringFromWasm0(r0, r1);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);\n }\n }\n /**\n * @returns {Metadata}\n */\n static bond_public() {\n const ret = wasm.metadata_bond_public();\n return Metadata.__wrap(ret);\n }\n /**\n * @returns {Metadata}\n */\n static bond_validator() {\n const ret = wasm.metadata_bond_validator();\n return Metadata.__wrap(ret);\n }\n /**\n * @returns {Metadata}\n */\n static claim_unbond_public() {\n const ret = wasm.metadata_claim_unbond_public();\n return Metadata.__wrap(ret);\n }\n /**\n * @returns {Metadata}\n */\n static fee_private() {\n const ret = wasm.metadata_fee_private();\n return Metadata.__wrap(ret);\n }\n /**\n * @returns {Metadata}\n */\n static fee_public() {\n const ret = wasm.metadata_fee_public();\n return Metadata.__wrap(ret);\n }\n /**\n * @returns {Metadata}\n */\n static inclusion() {\n const ret = wasm.metadata_inclusion();\n return Metadata.__wrap(ret);\n }\n /**\n * @returns {Metadata}\n */\n static join() {\n const ret = wasm.metadata_join();\n return Metadata.__wrap(ret);\n }\n /**\n * @returns {Metadata}\n */\n static set_validator_state() {\n const ret = wasm.metadata_set_validator_state();\n return Metadata.__wrap(ret);\n }\n /**\n * @returns {Metadata}\n */\n static split() {\n const ret = wasm.metadata_split();\n return Metadata.__wrap(ret);\n }\n /**\n * @returns {Metadata}\n */\n static transfer_private() {\n const ret = wasm.metadata_transfer_private();\n return Metadata.__wrap(ret);\n }\n /**\n * @returns {Metadata}\n */\n static transfer_private_to_public() {\n const ret = wasm.metadata_transfer_private_to_public();\n return Metadata.__wrap(ret);\n }\n /**\n * @returns {Metadata}\n */\n static transfer_public() {\n const ret = wasm.metadata_transfer_public();\n return Metadata.__wrap(ret);\n }\n /**\n * @returns {Metadata}\n */\n static transfer_public_as_signer() {\n const ret = wasm.metadata_transfer_public_as_signer();\n return Metadata.__wrap(ret);\n }\n /**\n * @returns {Metadata}\n */\n static transfer_public_to_private() {\n const ret = wasm.metadata_transfer_public_to_private();\n return Metadata.__wrap(ret);\n }\n /**\n * @returns {Metadata}\n */\n static unbond_public() {\n const ret = wasm.metadata_unbond_public();\n return Metadata.__wrap(ret);\n }\n}\n\nconst OfflineQueryFinalization = (typeof FinalizationRegistry === 'undefined')\n ? { register: () => {}, unregister: () => {} }\n : new FinalizationRegistry(ptr => wasm.__wbg_offlinequery_free(ptr >>> 0));\n/**\n* An offline query object used to insert the global state root and state paths needed to create\n* a valid inclusion proof offline.\n*/\nclass OfflineQuery {\n\n static __wrap(ptr) {\n ptr = ptr >>> 0;\n const obj = Object.create(OfflineQuery.prototype);\n obj.__wbg_ptr = ptr;\n OfflineQueryFinalization.register(obj, obj.__wbg_ptr, obj);\n return obj;\n }\n\n __destroy_into_raw() {\n const ptr = this.__wbg_ptr;\n this.__wbg_ptr = 0;\n OfflineQueryFinalization.unregister(this);\n return ptr;\n }\n\n free() {\n const ptr = this.__destroy_into_raw();\n wasm.__wbg_offlinequery_free(ptr);\n }\n /**\n * Creates a new offline query object. The state root is required to be passed in as a string\n * @param {string} state_root\n */\n constructor(state_root) {\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n const ptr0 = passStringToWasm0(state_root, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n wasm.offlinequery_new(retptr, ptr0, len0);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n var r2 = getInt32Memory0()[retptr / 4 + 2];\n if (r2) {\n throw takeObject(r1);\n }\n this.__wbg_ptr = r0 >>> 0;\n return this;\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n }\n }\n /**\n * Add a new state path to the offline query object.\n *\n * @param {string} commitment: The commitment corresponding to a record inpout\n * @param {string} state_path: The state path corresponding to the commitment\n * @param {string} commitment\n * @param {string} state_path\n */\n addStatePath(commitment, state_path) {\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n const ptr0 = passStringToWasm0(commitment, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n const ptr1 = passStringToWasm0(state_path, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len1 = WASM_VECTOR_LEN;\n wasm.offlinequery_addStatePath(retptr, this.__wbg_ptr, ptr0, len0, ptr1, len1);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n if (r1) {\n throw takeObject(r0);\n }\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n }\n }\n /**\n * Get a json string representation of the offline query object\n * @returns {string}\n */\n toString() {\n let deferred1_0;\n let deferred1_1;\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n wasm.offlinequery_toString(retptr, this.__wbg_ptr);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n deferred1_0 = r0;\n deferred1_1 = r1;\n return getStringFromWasm0(r0, r1);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);\n }\n }\n /**\n * Create an offline query object from a json string representation\n * @param {string} s\n * @returns {OfflineQuery}\n */\n static fromString(s) {\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n const ptr0 = passStringToWasm0(s, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n wasm.offlinequery_fromString(retptr, ptr0, len0);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n var r2 = getInt32Memory0()[retptr / 4 + 2];\n if (r2) {\n throw takeObject(r1);\n }\n return OfflineQuery.__wrap(r0);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n }\n }\n}\n\nconst PrivateKeyFinalization = (typeof FinalizationRegistry === 'undefined')\n ? { register: () => {}, unregister: () => {} }\n : new FinalizationRegistry(ptr => wasm.__wbg_privatekey_free(ptr >>> 0));\n/**\n* Private key of an Aleo account\n*/\nclass PrivateKey {\n\n static __wrap(ptr) {\n ptr = ptr >>> 0;\n const obj = Object.create(PrivateKey.prototype);\n obj.__wbg_ptr = ptr;\n PrivateKeyFinalization.register(obj, obj.__wbg_ptr, obj);\n return obj;\n }\n\n __destroy_into_raw() {\n const ptr = this.__wbg_ptr;\n this.__wbg_ptr = 0;\n PrivateKeyFinalization.unregister(this);\n return ptr;\n }\n\n free() {\n const ptr = this.__destroy_into_raw();\n wasm.__wbg_privatekey_free(ptr);\n }\n /**\n * Generate a new private key using a cryptographically secure random number generator\n *\n * @returns {PrivateKey}\n */\n constructor() {\n const ret = wasm.privatekey_new();\n this.__wbg_ptr = ret >>> 0;\n return this;\n }\n /**\n * Get a private key from a series of unchecked bytes\n *\n * @param {Uint8Array} seed Unchecked 32 byte long Uint8Array acting as the seed for the private key\n * @returns {PrivateKey}\n * @param {Uint8Array} seed\n * @returns {PrivateKey}\n */\n static from_seed_unchecked(seed) {\n const ptr0 = passArray8ToWasm0(seed, wasm.__wbindgen_malloc);\n const len0 = WASM_VECTOR_LEN;\n const ret = wasm.privatekey_from_seed_unchecked(ptr0, len0);\n return PrivateKey.__wrap(ret);\n }\n /**\n * Get a private key from a string representation of a private key\n *\n * @param {string} seed String representation of a private key\n * @returns {PrivateKey}\n * @param {string} private_key\n * @returns {PrivateKey}\n */\n static from_string(private_key) {\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n const ptr0 = passStringToWasm0(private_key, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n wasm.privatekey_from_string(retptr, ptr0, len0);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n var r2 = getInt32Memory0()[retptr / 4 + 2];\n if (r2) {\n throw takeObject(r1);\n }\n return PrivateKey.__wrap(r0);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n }\n }\n /**\n * Get a string representation of the private key. This function should be used very carefully\n * as it exposes the private key plaintext\n *\n * @returns {string} String representation of a private key\n * @returns {string}\n */\n to_string() {\n let deferred1_0;\n let deferred1_1;\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n wasm.privatekey_to_string(retptr, this.__wbg_ptr);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n deferred1_0 = r0;\n deferred1_1 = r1;\n return getStringFromWasm0(r0, r1);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);\n }\n }\n /**\n * Get the view key corresponding to the private key\n *\n * @returns {ViewKey}\n * @returns {ViewKey}\n */\n to_view_key() {\n const ret = wasm.privatekey_to_view_key(this.__wbg_ptr);\n return ViewKey.__wrap(ret);\n }\n /**\n * Get the address corresponding to the private key\n *\n * @returns {Address}\n * @returns {Address}\n */\n to_address() {\n const ret = wasm.privatekey_to_address(this.__wbg_ptr);\n return Address.__wrap(ret);\n }\n /**\n * Sign a message with the private key\n *\n * @param {Uint8Array} Byte array representing a message signed by the address\n * @returns {Signature} Signature generated by signing the message with the address\n * @param {Uint8Array} message\n * @returns {Signature}\n */\n sign(message) {\n const ptr0 = passArray8ToWasm0(message, wasm.__wbindgen_malloc);\n const len0 = WASM_VECTOR_LEN;\n const ret = wasm.privatekey_sign(this.__wbg_ptr, ptr0, len0);\n return Signature.__wrap(ret);\n }\n /**\n * Get a new randomly generated private key ciphertext using a secret. The secret is sensitive\n * and will be needed to decrypt the private key later, so it should be stored securely\n *\n * @param {string} secret Secret used to encrypt the private key\n * @returns {PrivateKeyCiphertext | Error} Ciphertext representation of the private key\n * @param {string} secret\n * @returns {PrivateKeyCiphertext}\n */\n static newEncrypted(secret) {\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n const ptr0 = passStringToWasm0(secret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n wasm.privatekey_newEncrypted(retptr, ptr0, len0);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n var r2 = getInt32Memory0()[retptr / 4 + 2];\n if (r2) {\n throw takeObject(r1);\n }\n return PrivateKeyCiphertext.__wrap(r0);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n }\n }\n /**\n * Encrypt an existing private key with a secret. The secret is sensitive and will be needed to\n * decrypt the private key later, so it should be stored securely\n *\n * @param {string} secret Secret used to encrypt the private key\n * @returns {PrivateKeyCiphertext | Error} Ciphertext representation of the private key\n * @param {string} secret\n * @returns {PrivateKeyCiphertext}\n */\n toCiphertext(secret) {\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n const ptr0 = passStringToWasm0(secret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n wasm.privatekey_toCiphertext(retptr, this.__wbg_ptr, ptr0, len0);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n var r2 = getInt32Memory0()[retptr / 4 + 2];\n if (r2) {\n throw takeObject(r1);\n }\n return PrivateKeyCiphertext.__wrap(r0);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n }\n }\n /**\n * Get private key from a private key ciphertext and secret originally used to encrypt it\n *\n * @param {PrivateKeyCiphertext} ciphertext Ciphertext representation of the private key\n * @param {string} secret Secret originally used to encrypt the private key\n * @returns {PrivateKey | Error} Private key\n * @param {PrivateKeyCiphertext} ciphertext\n * @param {string} secret\n * @returns {PrivateKey}\n */\n static fromPrivateKeyCiphertext(ciphertext, secret) {\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n _assertClass(ciphertext, PrivateKeyCiphertext);\n const ptr0 = passStringToWasm0(secret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n wasm.privatekey_fromPrivateKeyCiphertext(retptr, ciphertext.__wbg_ptr, ptr0, len0);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n var r2 = getInt32Memory0()[retptr / 4 + 2];\n if (r2) {\n throw takeObject(r1);\n }\n return PrivateKey.__wrap(r0);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n }\n }\n}\n\nconst PrivateKeyCiphertextFinalization = (typeof FinalizationRegistry === 'undefined')\n ? { register: () => {}, unregister: () => {} }\n : new FinalizationRegistry(ptr => wasm.__wbg_privatekeyciphertext_free(ptr >>> 0));\n/**\n* Private Key in ciphertext form\n*/\nclass PrivateKeyCiphertext {\n\n static __wrap(ptr) {\n ptr = ptr >>> 0;\n const obj = Object.create(PrivateKeyCiphertext.prototype);\n obj.__wbg_ptr = ptr;\n PrivateKeyCiphertextFinalization.register(obj, obj.__wbg_ptr, obj);\n return obj;\n }\n\n __destroy_into_raw() {\n const ptr = this.__wbg_ptr;\n this.__wbg_ptr = 0;\n PrivateKeyCiphertextFinalization.unregister(this);\n return ptr;\n }\n\n free() {\n const ptr = this.__destroy_into_raw();\n wasm.__wbg_privatekeyciphertext_free(ptr);\n }\n /**\n * Encrypt a private key using a secret string. The secret is sensitive and will be needed to\n * decrypt the private key later, so it should be stored securely\n *\n * @param {PrivateKey} private_key Private key to encrypt\n * @param {string} secret Secret to encrypt the private key with\n * @returns {PrivateKeyCiphertext | Error} Private key ciphertext\n * @param {PrivateKey} private_key\n * @param {string} secret\n * @returns {PrivateKeyCiphertext}\n */\n static encryptPrivateKey(private_key, secret) {\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n _assertClass(private_key, PrivateKey);\n const ptr0 = passStringToWasm0(secret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n wasm.privatekey_toCiphertext(retptr, private_key.__wbg_ptr, ptr0, len0);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n var r2 = getInt32Memory0()[retptr / 4 + 2];\n if (r2) {\n throw takeObject(r1);\n }\n return PrivateKeyCiphertext.__wrap(r0);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n }\n }\n /**\n * Decrypts a private ciphertext using a secret string. This must be the same secret used to\n * encrypt the private key\n *\n * @param {string} secret Secret used to encrypt the private key\n * @returns {PrivateKey | Error} Private key\n * @param {string} secret\n * @returns {PrivateKey}\n */\n decryptToPrivateKey(secret) {\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n const ptr0 = passStringToWasm0(secret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n wasm.privatekeyciphertext_decryptToPrivateKey(retptr, this.__wbg_ptr, ptr0, len0);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n var r2 = getInt32Memory0()[retptr / 4 + 2];\n if (r2) {\n throw takeObject(r1);\n }\n return PrivateKey.__wrap(r0);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n }\n }\n /**\n * Returns the ciphertext string\n *\n * @returns {string} Ciphertext string\n * @returns {string}\n */\n toString() {\n let deferred1_0;\n let deferred1_1;\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n wasm.privatekeyciphertext_toString(retptr, this.__wbg_ptr);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n deferred1_0 = r0;\n deferred1_1 = r1;\n return getStringFromWasm0(r0, r1);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);\n }\n }\n /**\n * Creates a PrivateKeyCiphertext from a string\n *\n * @param {string} ciphertext Ciphertext string\n * @returns {PrivateKeyCiphertext | Error} Private key ciphertext\n * @param {string} ciphertext\n * @returns {PrivateKeyCiphertext}\n */\n static fromString(ciphertext) {\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n const ptr0 = passStringToWasm0(ciphertext, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n wasm.privatekeyciphertext_fromString(retptr, ptr0, len0);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n var r2 = getInt32Memory0()[retptr / 4 + 2];\n if (r2) {\n throw takeObject(r1);\n }\n return PrivateKeyCiphertext.__wrap(r0);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n }\n }\n}\n\nconst ProgramFinalization = (typeof FinalizationRegistry === 'undefined')\n ? { register: () => {}, unregister: () => {} }\n : new FinalizationRegistry(ptr => wasm.__wbg_program_free(ptr >>> 0));\n/**\n* Webassembly Representation of an Aleo program\n*/\nclass Program {\n\n static __wrap(ptr) {\n ptr = ptr >>> 0;\n const obj = Object.create(Program.prototype);\n obj.__wbg_ptr = ptr;\n ProgramFinalization.register(obj, obj.__wbg_ptr, obj);\n return obj;\n }\n\n __destroy_into_raw() {\n const ptr = this.__wbg_ptr;\n this.__wbg_ptr = 0;\n ProgramFinalization.unregister(this);\n return ptr;\n }\n\n free() {\n const ptr = this.__destroy_into_raw();\n wasm.__wbg_program_free(ptr);\n }\n /**\n * Create a program from a program string\n *\n * @param {string} program Aleo program source code\n * @returns {Program | Error} Program object\n * @param {string} program\n * @returns {Program}\n */\n static fromString(program) {\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n const ptr0 = passStringToWasm0(program, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n wasm.program_fromString(retptr, ptr0, len0);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n var r2 = getInt32Memory0()[retptr / 4 + 2];\n if (r2) {\n throw takeObject(r1);\n }\n return Program.__wrap(r0);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n }\n }\n /**\n * Get a string representation of the program\n *\n * @returns {string} String containing the program source code\n * @returns {string}\n */\n toString() {\n let deferred1_0;\n let deferred1_1;\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n wasm.program_toString(retptr, this.__wbg_ptr);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n deferred1_0 = r0;\n deferred1_1 = r1;\n return getStringFromWasm0(r0, r1);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);\n }\n }\n /**\n * Determine if a function is present in the program\n *\n * @param {string} functionName Name of the function to check for\n * @returns {boolean} True if the program is valid, false otherwise\n * @param {string} function_name\n * @returns {boolean}\n */\n hasFunction(function_name) {\n const ptr0 = passStringToWasm0(function_name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n const ret = wasm.program_hasFunction(this.__wbg_ptr, ptr0, len0);\n return ret !== 0;\n }\n /**\n * Get javascript array of functions names in the program\n *\n * @returns {Array} Array of all function names present in the program\n *\n * @example\n * const expected_functions = [\n * \"mint\",\n * \"transfer_private\",\n * \"transfer_private_to_public\",\n * \"transfer_public\",\n * \"transfer_public_to_private\",\n * \"join\",\n * \"split\",\n * \"fee\"\n * ]\n *\n * const credits_program = aleo_wasm.Program.getCreditsProgram();\n * const credits_functions = credits_program.getFunctions();\n * console.log(credits_functions === expected_functions); // Output should be \"true\"\n * @returns {Array}\n */\n getFunctions() {\n const ret = wasm.program_getFunctions(this.__wbg_ptr);\n return takeObject(ret);\n }\n /**\n * Get a javascript object representation of the function inputs and types. This can be used\n * to generate a web form to capture user inputs for an execution of a function.\n *\n * @param {string} function_name Name of the function to get inputs for\n * @returns {Array | Error} Array of function inputs\n *\n * @example\n * const expected_inputs = [\n * {\n * type:\"record\",\n * visibility:\"private\",\n * record:\"credits\",\n * members:[\n * {\n * name:\"microcredits\",\n * type:\"u64\",\n * visibility:\"private\"\n * }\n * ],\n * register:\"r0\"\n * },\n * {\n * type:\"address\",\n * visibility:\"private\",\n * register:\"r1\"\n * },\n * {\n * type:\"u64\",\n * visibility:\"private\",\n * register:\"r2\"\n * }\n * ];\n *\n * const credits_program = aleo_wasm.Program.getCreditsProgram();\n * const transfer_function_inputs = credits_program.getFunctionInputs(\"transfer_private\");\n * console.log(transfer_function_inputs === expected_inputs); // Output should be \"true\"\n * @param {string} function_name\n * @returns {Array}\n */\n getFunctionInputs(function_name) {\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n const ptr0 = passStringToWasm0(function_name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n wasm.program_getFunctionInputs(retptr, this.__wbg_ptr, ptr0, len0);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n var r2 = getInt32Memory0()[retptr / 4 + 2];\n if (r2) {\n throw takeObject(r1);\n }\n return takeObject(r0);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n }\n }\n /**\n * Get a the list of a program's mappings and the names/types of their keys and values.\n *\n * @returns {Array | Error} - An array of objects representing the mappings in the program\n * @example\n * const expected_mappings = [\n * {\n * name: \"account\",\n * key_name: \"owner\",\n * key_type: \"address\",\n * value_name: \"microcredits\",\n * value_type: \"u64\"\n * }\n * ]\n *\n * const credits_program = aleo_wasm.Program.getCreditsProgram();\n * const credits_mappings = credits_program.getMappings();\n * console.log(credits_mappings === expected_mappings); // Output should be \"true\"\n * @returns {Array}\n */\n getMappings() {\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n wasm.program_getMappings(retptr, this.__wbg_ptr);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n var r2 = getInt32Memory0()[retptr / 4 + 2];\n if (r2) {\n throw takeObject(r1);\n }\n return takeObject(r0);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n }\n }\n /**\n * Get a javascript object representation of a program record and its types\n *\n * @param {string} record_name Name of the record to get members for\n * @returns {Object | Error} Object containing the record name, type, and members\n *\n * @example\n *\n * const expected_record = {\n * type: \"record\",\n * record: \"Credits\",\n * members: [\n * {\n * name: \"owner\",\n * type: \"address\",\n * visibility: \"private\"\n * },\n * {\n * name: \"microcredits\",\n * type: \"u64\",\n * visibility: \"private\"\n * }\n * ];\n * };\n *\n * const credits_program = aleo_wasm.Program.getCreditsProgram();\n * const credits_record = credits_program.getRecordMembers(\"Credits\");\n * console.log(credits_record === expected_record); // Output should be \"true\"\n * @param {string} record_name\n * @returns {object}\n */\n getRecordMembers(record_name) {\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n const ptr0 = passStringToWasm0(record_name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n wasm.program_getRecordMembers(retptr, this.__wbg_ptr, ptr0, len0);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n var r2 = getInt32Memory0()[retptr / 4 + 2];\n if (r2) {\n throw takeObject(r1);\n }\n return takeObject(r0);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n }\n }\n /**\n * Get a javascript object representation of a program struct and its types\n *\n * @param {string} struct_name Name of the struct to get members for\n * @returns {Array | Error} Array containing the struct members\n *\n * @example\n *\n * const STRUCT_PROGRAM = \"program token_issue.aleo;\n *\n * struct token_metadata:\n * network as u32;\n * version as u32;\n *\n * struct token:\n * token_id as u32;\n * metadata as token_metadata;\n *\n * function no_op:\n * input r0 as u64;\n * output r0 as u64;\"\n *\n * const expected_struct_members = [\n * {\n * name: \"token_id\",\n * type: \"u32\",\n * },\n * {\n * name: \"metadata\",\n * type: \"struct\",\n * struct_id: \"token_metadata\",\n * members: [\n * {\n * name: \"network\",\n * type: \"u32\",\n * }\n * {\n * name: \"version\",\n * type: \"u32\",\n * }\n * ]\n * }\n * ];\n *\n * const program = aleo_wasm.Program.fromString(STRUCT_PROGRAM);\n * const struct_members = program.getStructMembers(\"token\");\n * console.log(struct_members === expected_struct_members); // Output should be \"true\"\n * @param {string} struct_name\n * @returns {Array}\n */\n getStructMembers(struct_name) {\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n const ptr0 = passStringToWasm0(struct_name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n wasm.program_getStructMembers(retptr, this.__wbg_ptr, ptr0, len0);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n var r2 = getInt32Memory0()[retptr / 4 + 2];\n if (r2) {\n throw takeObject(r1);\n }\n return takeObject(r0);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n }\n }\n /**\n * Get the credits.aleo program\n *\n * @returns {Program} The credits.aleo program\n * @returns {Program}\n */\n static getCreditsProgram() {\n const ret = wasm.program_getCreditsProgram();\n return Program.__wrap(ret);\n }\n /**\n * Get the id of the program\n *\n * @returns {string} The id of the program\n * @returns {string}\n */\n id() {\n let deferred1_0;\n let deferred1_1;\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n wasm.program_id(retptr, this.__wbg_ptr);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n deferred1_0 = r0;\n deferred1_1 = r1;\n return getStringFromWasm0(r0, r1);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);\n }\n }\n /**\n * Get a unique address of the program\n *\n * @returns {Address} The address of the program\n * @returns {Address}\n */\n address() {\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n wasm.program_address(retptr, this.__wbg_ptr);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n var r2 = getInt32Memory0()[retptr / 4 + 2];\n if (r2) {\n throw takeObject(r1);\n }\n return Address.__wrap(r0);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n }\n }\n /**\n * Determine equality with another program\n *\n * @param {Program} other The other program to compare\n * @returns {boolean} True if the programs are equal, false otherwise\n * @param {Program} other\n * @returns {boolean}\n */\n isEqual(other) {\n _assertClass(other, Program);\n const ret = wasm.program_isEqual(this.__wbg_ptr, other.__wbg_ptr);\n return ret !== 0;\n }\n /**\n * Get program_imports\n *\n * @returns {Array} The program imports\n *\n * @example\n *\n * const DOUBLE_TEST = \"import multiply_test.aleo;\n *\n * program double_test.aleo;\n *\n * function double_it:\n * input r0 as u32.private;\n * call multiply_test.aleo/multiply 2u32 r0 into r1;\n * output r1 as u32.private;\";\n *\n * const expected_imports = [\n * \"multiply_test.aleo\"\n * ];\n *\n * const program = aleo_wasm.Program.fromString(DOUBLE_TEST_PROGRAM);\n * const imports = program.getImports();\n * console.log(imports === expected_imports); // Output should be \"true\"\n * @returns {Array}\n */\n getImports() {\n const ret = wasm.program_getImports(this.__wbg_ptr);\n return takeObject(ret);\n }\n}\n\nconst ProgramManagerFinalization = (typeof FinalizationRegistry === 'undefined')\n ? { register: () => {}, unregister: () => {} }\n : new FinalizationRegistry(ptr => wasm.__wbg_programmanager_free(ptr >>> 0));\n/**\n*/\nclass ProgramManager {\n\n __destroy_into_raw() {\n const ptr = this.__wbg_ptr;\n this.__wbg_ptr = 0;\n ProgramManagerFinalization.unregister(this);\n return ptr;\n }\n\n free() {\n const ptr = this.__destroy_into_raw();\n wasm.__wbg_programmanager_free(ptr);\n }\n /**\n * Deploy an Aleo program\n *\n * @param private_key The private key of the sender\n * @param program The source code of the program being deployed\n * @param imports A javascript object holding the source code of any imported programs in the\n * form \\{\"program_name1\": \"program_source_code\", \"program_name2\": \"program_source_code\", ..\\}.\n * Note that all imported programs must be deployed on chain before the main program in order\n * for the deployment to succeed\n * @param fee_credits The amount of credits to pay as a fee\n * @param fee_record The record to spend the fee from\n * @param url The url of the Aleo network node to send the transaction to\n * @param imports (optional) Provide a list of imports to use for the program deployment in the\n * form of a javascript object where the keys are a string of the program name and the values\n * are a string representing the program source code \\{ \"hello.aleo\": \"hello.aleo source code\" \\}\n * @param fee_proving_key (optional) Provide a proving key to use for the fee execution\n * @param fee_verifying_key (optional) Provide a verifying key to use for the fee execution\n * @returns {Transaction | Error}\n * @param {PrivateKey} private_key\n * @param {string} program\n * @param {number} fee_credits\n * @param {RecordPlaintext | undefined} [fee_record]\n * @param {string | undefined} [url]\n * @param {object | undefined} [imports]\n * @param {ProvingKey | undefined} [fee_proving_key]\n * @param {VerifyingKey | undefined} [fee_verifying_key]\n * @param {OfflineQuery | undefined} [offline_query]\n * @returns {Promise}\n */\n static buildDeploymentTransaction(private_key, program, fee_credits, fee_record, url, imports, fee_proving_key, fee_verifying_key, offline_query) {\n _assertClass(private_key, PrivateKey);\n const ptr0 = passStringToWasm0(program, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n let ptr1 = 0;\n if (!isLikeNone(fee_record)) {\n _assertClass(fee_record, RecordPlaintext);\n ptr1 = fee_record.__destroy_into_raw();\n }\n var ptr2 = isLikeNone(url) ? 0 : passStringToWasm0(url, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n var len2 = WASM_VECTOR_LEN;\n let ptr3 = 0;\n if (!isLikeNone(fee_proving_key)) {\n _assertClass(fee_proving_key, ProvingKey);\n ptr3 = fee_proving_key.__destroy_into_raw();\n }\n let ptr4 = 0;\n if (!isLikeNone(fee_verifying_key)) {\n _assertClass(fee_verifying_key, VerifyingKey);\n ptr4 = fee_verifying_key.__destroy_into_raw();\n }\n let ptr5 = 0;\n if (!isLikeNone(offline_query)) {\n _assertClass(offline_query, OfflineQuery);\n ptr5 = offline_query.__destroy_into_raw();\n }\n const ret = wasm.programmanager_buildDeploymentTransaction(private_key.__wbg_ptr, ptr0, len0, fee_credits, ptr1, ptr2, len2, isLikeNone(imports) ? 0 : addHeapObject(imports), ptr3, ptr4, ptr5);\n return takeObject(ret);\n }\n /**\n * Estimate the fee for a program deployment\n *\n * Disclaimer: Fee estimation is experimental and may not represent a correct estimate on any current or future network\n *\n * @param program The source code of the program being deployed\n * @param imports (optional) Provide a list of imports to use for the deployment fee estimation\n * in the form of a javascript object where the keys are a string of the program name and the values\n * are a string representing the program source code \\{ \"hello.aleo\": \"hello.aleo source code\" \\}\n * @returns {u64 | Error}\n * @param {string} program\n * @param {object | undefined} [imports]\n * @returns {Promise}\n */\n static estimateDeploymentFee(program, imports) {\n const ptr0 = passStringToWasm0(program, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n const ret = wasm.programmanager_estimateDeploymentFee(ptr0, len0, isLikeNone(imports) ? 0 : addHeapObject(imports));\n return takeObject(ret);\n }\n /**\n * Estimate the component of the deployment cost which comes from the fee for the program name.\n * Note that this cost does not represent the entire cost of deployment. It is additional to\n * the cost of the size (in bytes) of the deployment.\n *\n * Disclaimer: Fee estimation is experimental and may not represent a correct estimate on any current or future network\n *\n * @param name The name of the program to be deployed\n * @returns {u64 | Error}\n * @param {string} name\n * @returns {bigint}\n */\n static estimateProgramNameCost(name) {\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n const ptr0 = passStringToWasm0(name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n wasm.programmanager_estimateProgramNameCost(retptr, ptr0, len0);\n var r0 = getBigInt64Memory0()[retptr / 8 + 0];\n var r2 = getInt32Memory0()[retptr / 4 + 2];\n var r3 = getInt32Memory0()[retptr / 4 + 3];\n if (r3) {\n throw takeObject(r2);\n }\n return BigInt.asUintN(64, r0);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n }\n }\n /**\n * Execute an arbitrary function locally\n *\n * @param {PrivateKey} private_key The private key of the sender\n * @param {string} program The source code of the program being executed\n * @param {string} function The name of the function to execute\n * @param {Array} inputs A javascript array of inputs to the function\n * @param {boolean} prove_execution If true, the execution will be proven and an execution object\n * containing the proof and the encrypted inputs and outputs needed to verify the proof offline\n * will be returned.\n * @param {boolean} cache Cache the proving and verifying keys in the Execution response.\n * If this is set to 'true' the keys synthesized will be stored in the Execution Response\n * and the `ProvingKey` and `VerifyingKey` can be retrieved from the response via the `.getKeys()`\n * method.\n * @param {Object | undefined} imports (optional) Provide a list of imports to use for the function execution in the\n * form of a javascript object where the keys are a string of the program name and the values\n * are a string representing the program source code \\{ \"hello.aleo\": \"hello.aleo source code\" \\}\n * @param {ProvingKey | undefined} proving_key (optional) Provide a verifying key to use for the function execution\n * @param {VerifyingKey | undefined} verifying_key (optional) Provide a verifying key to use for the function execution\n * @param {PrivateKey} private_key\n * @param {string} program\n * @param {string} _function\n * @param {Array} inputs\n * @param {boolean} prove_execution\n * @param {boolean} cache\n * @param {object | undefined} [imports]\n * @param {ProvingKey | undefined} [proving_key]\n * @param {VerifyingKey | undefined} [verifying_key]\n * @param {string | undefined} [url]\n * @param {OfflineQuery | undefined} [offline_query]\n * @returns {Promise}\n */\n static executeFunctionOffline(private_key, program, _function, inputs, prove_execution, cache, imports, proving_key, verifying_key, url, offline_query) {\n _assertClass(private_key, PrivateKey);\n const ptr0 = passStringToWasm0(program, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n const ptr1 = passStringToWasm0(_function, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len1 = WASM_VECTOR_LEN;\n let ptr2 = 0;\n if (!isLikeNone(proving_key)) {\n _assertClass(proving_key, ProvingKey);\n ptr2 = proving_key.__destroy_into_raw();\n }\n let ptr3 = 0;\n if (!isLikeNone(verifying_key)) {\n _assertClass(verifying_key, VerifyingKey);\n ptr3 = verifying_key.__destroy_into_raw();\n }\n var ptr4 = isLikeNone(url) ? 0 : passStringToWasm0(url, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n var len4 = WASM_VECTOR_LEN;\n let ptr5 = 0;\n if (!isLikeNone(offline_query)) {\n _assertClass(offline_query, OfflineQuery);\n ptr5 = offline_query.__destroy_into_raw();\n }\n const ret = wasm.programmanager_executeFunctionOffline(private_key.__wbg_ptr, ptr0, len0, ptr1, len1, addHeapObject(inputs), prove_execution, cache, isLikeNone(imports) ? 0 : addHeapObject(imports), ptr2, ptr3, ptr4, len4, ptr5);\n return takeObject(ret);\n }\n /**\n * Execute Aleo function and create an Aleo execution transaction\n *\n * @param private_key The private key of the sender\n * @param program The source code of the program being executed\n * @param function The name of the function to execute\n * @param inputs A javascript array of inputs to the function\n * @param fee_credits The amount of credits to pay as a fee\n * @param fee_record The record to spend the fee from\n * @param url The url of the Aleo network node to send the transaction to\n * If this is set to 'true' the keys synthesized (or passed in as optional parameters via the\n * `proving_key` and `verifying_key` arguments) will be stored in the ProgramManager's memory\n * and used for subsequent transactions. If this is set to 'false' the proving and verifying\n * keys will be deallocated from memory after the transaction is executed.\n * @param imports (optional) Provide a list of imports to use for the function execution in the\n * form of a javascript object where the keys are a string of the program name and the values\n * are a string representing the program source code \\{ \"hello.aleo\": \"hello.aleo source code\" \\}\n * @param proving_key (optional) Provide a verifying key to use for the function execution\n * @param verifying_key (optional) Provide a verifying key to use for the function execution\n * @param fee_proving_key (optional) Provide a proving key to use for the fee execution\n * @param fee_verifying_key (optional) Provide a verifying key to use for the fee execution\n * @returns {Transaction | Error}\n * @param {PrivateKey} private_key\n * @param {string} program\n * @param {string} _function\n * @param {Array} inputs\n * @param {number} fee_credits\n * @param {RecordPlaintext | undefined} [fee_record]\n * @param {string | undefined} [url]\n * @param {object | undefined} [imports]\n * @param {ProvingKey | undefined} [proving_key]\n * @param {VerifyingKey | undefined} [verifying_key]\n * @param {ProvingKey | undefined} [fee_proving_key]\n * @param {VerifyingKey | undefined} [fee_verifying_key]\n * @param {OfflineQuery | undefined} [offline_query]\n * @returns {Promise}\n */\n static buildExecutionTransaction(private_key, program, _function, inputs, fee_credits, fee_record, url, imports, proving_key, verifying_key, fee_proving_key, fee_verifying_key, offline_query) {\n _assertClass(private_key, PrivateKey);\n const ptr0 = passStringToWasm0(program, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n const ptr1 = passStringToWasm0(_function, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len1 = WASM_VECTOR_LEN;\n let ptr2 = 0;\n if (!isLikeNone(fee_record)) {\n _assertClass(fee_record, RecordPlaintext);\n ptr2 = fee_record.__destroy_into_raw();\n }\n var ptr3 = isLikeNone(url) ? 0 : passStringToWasm0(url, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n var len3 = WASM_VECTOR_LEN;\n let ptr4 = 0;\n if (!isLikeNone(proving_key)) {\n _assertClass(proving_key, ProvingKey);\n ptr4 = proving_key.__destroy_into_raw();\n }\n let ptr5 = 0;\n if (!isLikeNone(verifying_key)) {\n _assertClass(verifying_key, VerifyingKey);\n ptr5 = verifying_key.__destroy_into_raw();\n }\n let ptr6 = 0;\n if (!isLikeNone(fee_proving_key)) {\n _assertClass(fee_proving_key, ProvingKey);\n ptr6 = fee_proving_key.__destroy_into_raw();\n }\n let ptr7 = 0;\n if (!isLikeNone(fee_verifying_key)) {\n _assertClass(fee_verifying_key, VerifyingKey);\n ptr7 = fee_verifying_key.__destroy_into_raw();\n }\n let ptr8 = 0;\n if (!isLikeNone(offline_query)) {\n _assertClass(offline_query, OfflineQuery);\n ptr8 = offline_query.__destroy_into_raw();\n }\n const ret = wasm.programmanager_buildExecutionTransaction(private_key.__wbg_ptr, ptr0, len0, ptr1, len1, addHeapObject(inputs), fee_credits, ptr2, ptr3, len3, isLikeNone(imports) ? 0 : addHeapObject(imports), ptr4, ptr5, ptr6, ptr7, ptr8);\n return takeObject(ret);\n }\n /**\n * Estimate Fee for Aleo function execution. Note if \"cache\" is set to true, the proving and\n * verifying keys will be stored in the ProgramManager's memory and used for subsequent\n * program executions.\n *\n * Disclaimer: Fee estimation is experimental and may not represent a correct estimate on any current or future network\n *\n * @param private_key The private key of the sender\n * @param program The source code of the program to estimate the execution fee for\n * @param function The name of the function to execute\n * @param inputs A javascript array of inputs to the function\n * @param url The url of the Aleo network node to send the transaction to\n * @param imports (optional) Provide a list of imports to use for the fee estimation in the\n * form of a javascript object where the keys are a string of the program name and the values\n * are a string representing the program source code \\{ \"hello.aleo\": \"hello.aleo source code\" \\}\n * @param proving_key (optional) Provide a verifying key to use for the fee estimation\n * @param verifying_key (optional) Provide a verifying key to use for the fee estimation\n * @returns {u64 | Error} Fee in microcredits\n * @param {PrivateKey} private_key\n * @param {string} program\n * @param {string} _function\n * @param {Array} inputs\n * @param {string | undefined} [url]\n * @param {object | undefined} [imports]\n * @param {ProvingKey | undefined} [proving_key]\n * @param {VerifyingKey | undefined} [verifying_key]\n * @param {OfflineQuery | undefined} [offline_query]\n * @returns {Promise}\n */\n static estimateExecutionFee(private_key, program, _function, inputs, url, imports, proving_key, verifying_key, offline_query) {\n _assertClass(private_key, PrivateKey);\n const ptr0 = passStringToWasm0(program, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n const ptr1 = passStringToWasm0(_function, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len1 = WASM_VECTOR_LEN;\n var ptr2 = isLikeNone(url) ? 0 : passStringToWasm0(url, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n var len2 = WASM_VECTOR_LEN;\n let ptr3 = 0;\n if (!isLikeNone(proving_key)) {\n _assertClass(proving_key, ProvingKey);\n ptr3 = proving_key.__destroy_into_raw();\n }\n let ptr4 = 0;\n if (!isLikeNone(verifying_key)) {\n _assertClass(verifying_key, VerifyingKey);\n ptr4 = verifying_key.__destroy_into_raw();\n }\n let ptr5 = 0;\n if (!isLikeNone(offline_query)) {\n _assertClass(offline_query, OfflineQuery);\n ptr5 = offline_query.__destroy_into_raw();\n }\n const ret = wasm.programmanager_estimateExecutionFee(private_key.__wbg_ptr, ptr0, len0, ptr1, len1, addHeapObject(inputs), ptr2, len2, isLikeNone(imports) ? 0 : addHeapObject(imports), ptr3, ptr4, ptr5);\n return takeObject(ret);\n }\n /**\n * Estimate the finalize fee component for executing a function. This fee is additional to the\n * size of the execution of the program in bytes. If the function does not have a finalize\n * step, then the finalize fee is 0.\n *\n * Disclaimer: Fee estimation is experimental and may not represent a correct estimate on any current or future network\n *\n * @param program The program containing the function to estimate the finalize fee for\n * @param function The function to estimate the finalize fee for\n * @returns {u64 | Error} Fee in microcredits\n * @param {string} program\n * @param {string} _function\n * @returns {bigint}\n */\n static estimateFinalizeFee(program, _function) {\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n const ptr0 = passStringToWasm0(program, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n const ptr1 = passStringToWasm0(_function, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len1 = WASM_VECTOR_LEN;\n wasm.programmanager_estimateFinalizeFee(retptr, ptr0, len0, ptr1, len1);\n var r0 = getBigInt64Memory0()[retptr / 8 + 0];\n var r2 = getInt32Memory0()[retptr / 4 + 2];\n var r3 = getInt32Memory0()[retptr / 4 + 3];\n if (r3) {\n throw takeObject(r2);\n }\n return BigInt.asUintN(64, r0);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n }\n }\n /**\n * Join two records together to create a new record with an amount of credits equal to the sum\n * of the credits of the two original records\n *\n * @param private_key The private key of the sender\n * @param record_1 The first record to combine\n * @param record_2 The second record to combine\n * @param fee_credits The amount of credits to pay as a fee\n * @param fee_record The record to spend the fee from\n * @param url The url of the Aleo network node to send the transaction to\n * @param join_proving_key (optional) Provide a proving key to use for the join function\n * @param join_verifying_key (optional) Provide a verifying key to use for the join function\n * @param fee_proving_key (optional) Provide a proving key to use for the fee execution\n * @param fee_verifying_key (optional) Provide a verifying key to use for the fee execution\n * @returns {Transaction | Error} Transaction object\n * @param {PrivateKey} private_key\n * @param {RecordPlaintext} record_1\n * @param {RecordPlaintext} record_2\n * @param {number} fee_credits\n * @param {RecordPlaintext | undefined} [fee_record]\n * @param {string | undefined} [url]\n * @param {ProvingKey | undefined} [join_proving_key]\n * @param {VerifyingKey | undefined} [join_verifying_key]\n * @param {ProvingKey | undefined} [fee_proving_key]\n * @param {VerifyingKey | undefined} [fee_verifying_key]\n * @param {OfflineQuery | undefined} [offline_query]\n * @returns {Promise}\n */\n static buildJoinTransaction(private_key, record_1, record_2, fee_credits, fee_record, url, join_proving_key, join_verifying_key, fee_proving_key, fee_verifying_key, offline_query) {\n _assertClass(private_key, PrivateKey);\n _assertClass(record_1, RecordPlaintext);\n var ptr0 = record_1.__destroy_into_raw();\n _assertClass(record_2, RecordPlaintext);\n var ptr1 = record_2.__destroy_into_raw();\n let ptr2 = 0;\n if (!isLikeNone(fee_record)) {\n _assertClass(fee_record, RecordPlaintext);\n ptr2 = fee_record.__destroy_into_raw();\n }\n var ptr3 = isLikeNone(url) ? 0 : passStringToWasm0(url, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n var len3 = WASM_VECTOR_LEN;\n let ptr4 = 0;\n if (!isLikeNone(join_proving_key)) {\n _assertClass(join_proving_key, ProvingKey);\n ptr4 = join_proving_key.__destroy_into_raw();\n }\n let ptr5 = 0;\n if (!isLikeNone(join_verifying_key)) {\n _assertClass(join_verifying_key, VerifyingKey);\n ptr5 = join_verifying_key.__destroy_into_raw();\n }\n let ptr6 = 0;\n if (!isLikeNone(fee_proving_key)) {\n _assertClass(fee_proving_key, ProvingKey);\n ptr6 = fee_proving_key.__destroy_into_raw();\n }\n let ptr7 = 0;\n if (!isLikeNone(fee_verifying_key)) {\n _assertClass(fee_verifying_key, VerifyingKey);\n ptr7 = fee_verifying_key.__destroy_into_raw();\n }\n let ptr8 = 0;\n if (!isLikeNone(offline_query)) {\n _assertClass(offline_query, OfflineQuery);\n ptr8 = offline_query.__destroy_into_raw();\n }\n const ret = wasm.programmanager_buildJoinTransaction(private_key.__wbg_ptr, ptr0, ptr1, fee_credits, ptr2, ptr3, len3, ptr4, ptr5, ptr6, ptr7, ptr8);\n return takeObject(ret);\n }\n /**\n * Split an Aleo credits record into two separate records. This function does not require a fee.\n *\n * @param private_key The private key of the sender\n * @param split_amount The amount of the credit split. This amount will be subtracted from the\n * value of the record and two new records will be created with the split amount and the remainder\n * @param amount_record The record to split\n * @param url The url of the Aleo network node to send the transaction to\n * @param split_proving_key (optional) Provide a proving key to use for the split function\n * @param split_verifying_key (optional) Provide a verifying key to use for the split function\n * @returns {Transaction | Error} Transaction object\n * @param {PrivateKey} private_key\n * @param {number} split_amount\n * @param {RecordPlaintext} amount_record\n * @param {string | undefined} [url]\n * @param {ProvingKey | undefined} [split_proving_key]\n * @param {VerifyingKey | undefined} [split_verifying_key]\n * @param {OfflineQuery | undefined} [offline_query]\n * @returns {Promise}\n */\n static buildSplitTransaction(private_key, split_amount, amount_record, url, split_proving_key, split_verifying_key, offline_query) {\n _assertClass(private_key, PrivateKey);\n _assertClass(amount_record, RecordPlaintext);\n var ptr0 = amount_record.__destroy_into_raw();\n var ptr1 = isLikeNone(url) ? 0 : passStringToWasm0(url, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n var len1 = WASM_VECTOR_LEN;\n let ptr2 = 0;\n if (!isLikeNone(split_proving_key)) {\n _assertClass(split_proving_key, ProvingKey);\n ptr2 = split_proving_key.__destroy_into_raw();\n }\n let ptr3 = 0;\n if (!isLikeNone(split_verifying_key)) {\n _assertClass(split_verifying_key, VerifyingKey);\n ptr3 = split_verifying_key.__destroy_into_raw();\n }\n let ptr4 = 0;\n if (!isLikeNone(offline_query)) {\n _assertClass(offline_query, OfflineQuery);\n ptr4 = offline_query.__destroy_into_raw();\n }\n const ret = wasm.programmanager_buildSplitTransaction(private_key.__wbg_ptr, split_amount, ptr0, ptr1, len1, ptr2, ptr3, ptr4);\n return takeObject(ret);\n }\n /**\n * Send credits from one Aleo account to another\n *\n * @param private_key The private key of the sender\n * @param amount_credits The amount of credits to send\n * @param recipient The recipient of the transaction\n * @param transfer_type The type of the transfer (options: \"private\", \"public\", \"private_to_public\", \"public_to_private\")\n * @param amount_record The record to fund the amount from\n * @param fee_credits The amount of credits to pay as a fee\n * @param fee_record The record to spend the fee from\n * @param url The url of the Aleo network node to send the transaction to\n * @param transfer_verifying_key (optional) Provide a verifying key to use for the transfer\n * function\n * @param fee_proving_key (optional) Provide a proving key to use for the fee execution\n * @param fee_verifying_key (optional) Provide a verifying key to use for the fee execution\n * @returns {Transaction | Error}\n * @param {PrivateKey} private_key\n * @param {number} amount_credits\n * @param {string} recipient\n * @param {string} transfer_type\n * @param {RecordPlaintext | undefined} amount_record\n * @param {number} fee_credits\n * @param {RecordPlaintext | undefined} [fee_record]\n * @param {string | undefined} [url]\n * @param {ProvingKey | undefined} [transfer_proving_key]\n * @param {VerifyingKey | undefined} [transfer_verifying_key]\n * @param {ProvingKey | undefined} [fee_proving_key]\n * @param {VerifyingKey | undefined} [fee_verifying_key]\n * @param {OfflineQuery | undefined} [offline_query]\n * @returns {Promise}\n */\n static buildTransferTransaction(private_key, amount_credits, recipient, transfer_type, amount_record, fee_credits, fee_record, url, transfer_proving_key, transfer_verifying_key, fee_proving_key, fee_verifying_key, offline_query) {\n _assertClass(private_key, PrivateKey);\n const ptr0 = passStringToWasm0(recipient, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n const ptr1 = passStringToWasm0(transfer_type, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len1 = WASM_VECTOR_LEN;\n let ptr2 = 0;\n if (!isLikeNone(amount_record)) {\n _assertClass(amount_record, RecordPlaintext);\n ptr2 = amount_record.__destroy_into_raw();\n }\n let ptr3 = 0;\n if (!isLikeNone(fee_record)) {\n _assertClass(fee_record, RecordPlaintext);\n ptr3 = fee_record.__destroy_into_raw();\n }\n var ptr4 = isLikeNone(url) ? 0 : passStringToWasm0(url, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n var len4 = WASM_VECTOR_LEN;\n let ptr5 = 0;\n if (!isLikeNone(transfer_proving_key)) {\n _assertClass(transfer_proving_key, ProvingKey);\n ptr5 = transfer_proving_key.__destroy_into_raw();\n }\n let ptr6 = 0;\n if (!isLikeNone(transfer_verifying_key)) {\n _assertClass(transfer_verifying_key, VerifyingKey);\n ptr6 = transfer_verifying_key.__destroy_into_raw();\n }\n let ptr7 = 0;\n if (!isLikeNone(fee_proving_key)) {\n _assertClass(fee_proving_key, ProvingKey);\n ptr7 = fee_proving_key.__destroy_into_raw();\n }\n let ptr8 = 0;\n if (!isLikeNone(fee_verifying_key)) {\n _assertClass(fee_verifying_key, VerifyingKey);\n ptr8 = fee_verifying_key.__destroy_into_raw();\n }\n let ptr9 = 0;\n if (!isLikeNone(offline_query)) {\n _assertClass(offline_query, OfflineQuery);\n ptr9 = offline_query.__destroy_into_raw();\n }\n const ret = wasm.programmanager_buildTransferTransaction(private_key.__wbg_ptr, amount_credits, ptr0, len0, ptr1, len1, ptr2, fee_credits, ptr3, ptr4, len4, ptr5, ptr6, ptr7, ptr8, ptr9);\n return takeObject(ret);\n }\n /**\n * Synthesize proving and verifying keys for a program\n *\n * @param program {string} The program source code of the program to synthesize keys for\n * @param function_id {string} The function to synthesize keys for\n * @param inputs {Array} The inputs to the function\n * @param imports {Object | undefined} The imports for the program\n * @param {PrivateKey} private_key\n * @param {string} program\n * @param {string} function_id\n * @param {Array} inputs\n * @param {object | undefined} [imports]\n * @returns {Promise}\n */\n static synthesizeKeyPair(private_key, program, function_id, inputs, imports) {\n _assertClass(private_key, PrivateKey);\n const ptr0 = passStringToWasm0(program, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n const ptr1 = passStringToWasm0(function_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len1 = WASM_VECTOR_LEN;\n const ret = wasm.programmanager_synthesizeKeyPair(private_key.__wbg_ptr, ptr0, len0, ptr1, len1, addHeapObject(inputs), isLikeNone(imports) ? 0 : addHeapObject(imports));\n return takeObject(ret);\n }\n}\n\nconst ProvingKeyFinalization = (typeof FinalizationRegistry === 'undefined')\n ? { register: () => {}, unregister: () => {} }\n : new FinalizationRegistry(ptr => wasm.__wbg_provingkey_free(ptr >>> 0));\n/**\n* Proving key for a function within an Aleo program\n*/\nclass ProvingKey {\n\n static __wrap(ptr) {\n ptr = ptr >>> 0;\n const obj = Object.create(ProvingKey.prototype);\n obj.__wbg_ptr = ptr;\n ProvingKeyFinalization.register(obj, obj.__wbg_ptr, obj);\n return obj;\n }\n\n __destroy_into_raw() {\n const ptr = this.__wbg_ptr;\n this.__wbg_ptr = 0;\n ProvingKeyFinalization.unregister(this);\n return ptr;\n }\n\n free() {\n const ptr = this.__destroy_into_raw();\n wasm.__wbg_provingkey_free(ptr);\n }\n /**\n * Verify if the proving key is for the bond_public function\n *\n * @example\n * const provingKey = ProvingKey.fromBytes(\"bond_public_proving_key.bin\");\n * provingKey.isBondPublicProver() ? console.log(\"Key verified\") : throw new Error(\"Invalid key\");\n *\n * @returns {boolean} returns true if the proving key is for the bond_public function, false if otherwise\n * @returns {boolean}\n */\n isBondPublicProver() {\n const ret = wasm.provingkey_isBondPublicProver(this.__wbg_ptr);\n return ret !== 0;\n }\n /**\n * Verify if the proving key is for the bond_validator function\n *\n * @example\n * const provingKey = ProvingKey.fromBytes(\"bond_validator_proving_key.bin\");\n * provingKey.isBondPublicProver() ? console.log(\"Key verified\") : throw new Error(\"Invalid key\");\n *\n * @returns {boolean} returns true if the proving key is for the bond_validator function, false if otherwise\n * @returns {boolean}\n */\n isBondValidatorProver() {\n const ret = wasm.provingkey_isBondValidatorProver(this.__wbg_ptr);\n return ret !== 0;\n }\n /**\n * Verify if the proving key is for the claim_unbond function\n *\n * @example\n * const provingKey = ProvingKey.fromBytes(\"claim_unbond_proving_key.bin\");\n * provingKey.isClaimUnbondProver() ? console.log(\"Key verified\") : throw new Error(\"Invalid key\");\n *\n * @returns {boolean} returns true if the proving key is for the claim_unbond function, false if otherwise\n * @returns {boolean}\n */\n isClaimUnbondPublicProver() {\n const ret = wasm.provingkey_isClaimUnbondPublicProver(this.__wbg_ptr);\n return ret !== 0;\n }\n /**\n * Verify if the proving key is for the fee_private function\n *\n * @example\n * const provingKey = ProvingKey.fromBytes(\"fee_private_proving_key.bin\");\n * provingKey.isFeePrivateProver() ? console.log(\"Key verified\") : throw new Error(\"Invalid key\");\n *\n * @returns {boolean} returns true if the proving key is for the fee_private function, false if otherwise\n * @returns {boolean}\n */\n isFeePrivateProver() {\n const ret = wasm.provingkey_isFeePrivateProver(this.__wbg_ptr);\n return ret !== 0;\n }\n /**\n * Verify if the proving key is for the fee_public function\n *\n * @example\n * const provingKey = ProvingKey.fromBytes(\"fee_public_proving_key.bin\");\n * provingKey.isFeePublicProver() ? console.log(\"Key verified\") : throw new Error(\"Invalid key\");\n *\n * @returns {boolean} returns true if the proving key is for the fee_public function, false if otherwise\n * @returns {boolean}\n */\n isFeePublicProver() {\n const ret = wasm.provingkey_isFeePublicProver(this.__wbg_ptr);\n return ret !== 0;\n }\n /**\n * Verify if the proving key is for the inclusion function\n *\n * @example\n * const provingKey = ProvingKey.fromBytes(\"inclusion_proving_key.bin\");\n * provingKey.isInclusionProver() ? console.log(\"Key verified\") : throw new Error(\"Invalid key\");\n *\n * @returns {boolean} returns true if the proving key is for the inclusion function, false if otherwise\n * @returns {boolean}\n */\n isInclusionProver() {\n const ret = wasm.provingkey_isInclusionProver(this.__wbg_ptr);\n return ret !== 0;\n }\n /**\n * Verify if the proving key is for the join function\n *\n * @example\n * const provingKey = ProvingKey.fromBytes(\"join_proving_key.bin\");\n * provingKey.isJoinProver() ? console.log(\"Key verified\") : throw new Error(\"Invalid key\");\n *\n * @returns {boolean} returns true if the proving key is for the join function, false if otherwise\n * @returns {boolean}\n */\n isJoinProver() {\n const ret = wasm.provingkey_isJoinProver(this.__wbg_ptr);\n return ret !== 0;\n }\n /**\n * Verify if the proving key is for the set_validator_state function\n *\n * @example\n * const provingKey = ProvingKey.fromBytes(\"set_validator_set_proving_key.bin\");\n * provingKey.isSetValidatorStateProver() ? console.log(\"Key verified\") : throw new Error(\"Invalid key\");\n *\n * @returns {boolean} returns true if the proving key is for the set_validator_state function, false if otherwise\n * @returns {boolean}\n */\n isSetValidatorStateProver() {\n const ret = wasm.provingkey_isSetValidatorStateProver(this.__wbg_ptr);\n return ret !== 0;\n }\n /**\n * Verify if the proving key is for the split function\n *\n * @example\n * const provingKey = ProvingKey.fromBytes(\"split_proving_key.bin\");\n * provingKey.isSplitProver() ? console.log(\"Key verified\") : throw new Error(\"Invalid key\");\n *\n * @returns {boolean} returns true if the proving key is for the split function, false if otherwise\n * @returns {boolean}\n */\n isSplitProver() {\n const ret = wasm.provingkey_isSplitProver(this.__wbg_ptr);\n return ret !== 0;\n }\n /**\n * Verify if the proving key is for the transfer_private function\n *\n * @example\n * const provingKey = ProvingKey.fromBytes(\"transfer_private_proving_key.bin\");\n * provingKey.isTransferPrivateProver() ? console.log(\"Key verified\") : throw new Error(\"Invalid key\");\n *\n * @returns {boolean} returns true if the proving key is for the transfer_private function, false if otherwise\n * @returns {boolean}\n */\n isTransferPrivateProver() {\n const ret = wasm.provingkey_isTransferPrivateProver(this.__wbg_ptr);\n return ret !== 0;\n }\n /**\n * Verify if the proving key is for the transfer_private_to_public function\n *\n * @example\n * const provingKey = ProvingKey.fromBytes(\"transfer_private_to_public_proving_key.bin\");\n * provingKey.isTransferPrivateToPublicProver() ? console.log(\"Key verified\") : throw new Error(\"Invalid key\");\n *\n * @returns {boolean} returns true if the proving key is for the transfer_private_to_public function, false if otherwise\n * @returns {boolean}\n */\n isTransferPrivateToPublicProver() {\n const ret = wasm.provingkey_isTransferPrivateToPublicProver(this.__wbg_ptr);\n return ret !== 0;\n }\n /**\n * Verify if the proving key is for the transfer_public function\n *\n * @example\n * const provingKey = ProvingKey.fromBytes(\"transfer_public_proving_key.bin\");\n * provingKey.isTransferPublicProver() ? console.log(\"Key verified\") : throw new Error(\"Invalid key\");\n *\n * @returns {boolean} returns true if the proving key is for the transfer_public function, false if otherwise\n * @returns {boolean}\n */\n isTransferPublicProver() {\n const ret = wasm.provingkey_isTransferPublicProver(this.__wbg_ptr);\n return ret !== 0;\n }\n /**\n * Verify if the proving key is for the transfer_public_as_signer function\n *\n * @example\n * const provingKey = ProvingKey.fromBytes(\"transfer_public_as_signer_proving_key.bin\");\n * provingKey.isTransferPublicAsSignerProver() ? console.log(\"Key verified\") : throw new Error(\"Invalid key\");\n *\n * @returns {boolean} returns true if the proving key is for the transfer_public function, false if otherwise\n * @returns {boolean}\n */\n isTransferPublicAsSignerProver() {\n const ret = wasm.provingkey_isTransferPublicAsSignerProver(this.__wbg_ptr);\n return ret !== 0;\n }\n /**\n * Verify if the proving key is for the transfer_public_to_private function\n *\n * @example\n * const provingKey = ProvingKey.fromBytes(\"transfer_public_to_private_proving_key.bin\");\n * provingKey.isTransferPublicToPrivateProver() ? console.log(\"Key verified\") : throw new Error(\"Invalid key\");\n *\n * @returns {boolean} returns true if the proving key is for the transfer_public_to_private function, false if otherwise\n * @returns {boolean}\n */\n isTransferPublicToPrivateProver() {\n const ret = wasm.provingkey_isTransferPublicToPrivateProver(this.__wbg_ptr);\n return ret !== 0;\n }\n /**\n * Verify if the proving key is for the unbond_public function\n *\n * @example\n * const provingKey = ProvingKey.fromBytes(\"unbond_public.bin\");\n * provingKey.isUnbondPublicProver() ? console.log(\"Key verified\") : throw new Error(\"Invalid key\");\n *\n * @returns {boolean} returns true if the proving key is for the unbond_public_prover function, false if otherwise\n * @returns {boolean}\n */\n isUnbondPublicProver() {\n const ret = wasm.provingkey_isUnbondPublicProver(this.__wbg_ptr);\n return ret !== 0;\n }\n /**\n * Return the checksum of the proving key\n *\n * @returns {string} Checksum of the proving key\n * @returns {string}\n */\n checksum() {\n let deferred1_0;\n let deferred1_1;\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n wasm.provingkey_checksum(retptr, this.__wbg_ptr);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n deferred1_0 = r0;\n deferred1_1 = r1;\n return getStringFromWasm0(r0, r1);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);\n }\n }\n /**\n * Create a copy of the proving key\n *\n * @returns {ProvingKey} A copy of the proving key\n * @returns {ProvingKey}\n */\n copy() {\n const ret = wasm.provingkey_copy(this.__wbg_ptr);\n return ProvingKey.__wrap(ret);\n }\n /**\n * Construct a new proving key from a byte array\n *\n * @param {Uint8Array} bytes Byte array representation of a proving key\n * @returns {ProvingKey | Error}\n * @param {Uint8Array} bytes\n * @returns {ProvingKey}\n */\n static fromBytes(bytes) {\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n const ptr0 = passArray8ToWasm0(bytes, wasm.__wbindgen_malloc);\n const len0 = WASM_VECTOR_LEN;\n wasm.provingkey_fromBytes(retptr, ptr0, len0);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n var r2 = getInt32Memory0()[retptr / 4 + 2];\n if (r2) {\n throw takeObject(r1);\n }\n return ProvingKey.__wrap(r0);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n }\n }\n /**\n * Create a proving key from string\n *\n * @param {string | Error} String representation of the proving key\n * @param {string} string\n * @returns {ProvingKey}\n */\n static fromString(string) {\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n const ptr0 = passStringToWasm0(string, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n wasm.provingkey_fromString(retptr, ptr0, len0);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n var r2 = getInt32Memory0()[retptr / 4 + 2];\n if (r2) {\n throw takeObject(r1);\n }\n return ProvingKey.__wrap(r0);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n }\n }\n /**\n * Return the byte representation of a proving key\n *\n * @returns {Uint8Array | Error} Byte array representation of a proving key\n * @returns {Uint8Array}\n */\n toBytes() {\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n wasm.provingkey_toBytes(retptr, this.__wbg_ptr);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n var r2 = getInt32Memory0()[retptr / 4 + 2];\n var r3 = getInt32Memory0()[retptr / 4 + 3];\n if (r3) {\n throw takeObject(r2);\n }\n var v1 = getArrayU8FromWasm0(r0, r1).slice();\n wasm.__wbindgen_free(r0, r1 * 1, 1);\n return v1;\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n }\n }\n /**\n * Get a string representation of the proving key\n *\n * @returns {string} String representation of the proving key\n * @returns {string}\n */\n toString() {\n let deferred1_0;\n let deferred1_1;\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n wasm.provingkey_toString(retptr, this.__wbg_ptr);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n deferred1_0 = r0;\n deferred1_1 = r1;\n return getStringFromWasm0(r0, r1);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);\n }\n }\n}\n\nconst RecordCiphertextFinalization = (typeof FinalizationRegistry === 'undefined')\n ? { register: () => {}, unregister: () => {} }\n : new FinalizationRegistry(ptr => wasm.__wbg_recordciphertext_free(ptr >>> 0));\n/**\n* Encrypted Aleo record\n*/\nclass RecordCiphertext {\n\n static __wrap(ptr) {\n ptr = ptr >>> 0;\n const obj = Object.create(RecordCiphertext.prototype);\n obj.__wbg_ptr = ptr;\n RecordCiphertextFinalization.register(obj, obj.__wbg_ptr, obj);\n return obj;\n }\n\n __destroy_into_raw() {\n const ptr = this.__wbg_ptr;\n this.__wbg_ptr = 0;\n RecordCiphertextFinalization.unregister(this);\n return ptr;\n }\n\n free() {\n const ptr = this.__destroy_into_raw();\n wasm.__wbg_recordciphertext_free(ptr);\n }\n /**\n * Create a record ciphertext from a string\n *\n * @param {string} record String representation of a record ciphertext\n * @returns {RecordCiphertext | Error} Record ciphertext\n * @param {string} record\n * @returns {RecordCiphertext}\n */\n static fromString(record) {\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n const ptr0 = passStringToWasm0(record, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n wasm.recordciphertext_fromString(retptr, ptr0, len0);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n var r2 = getInt32Memory0()[retptr / 4 + 2];\n if (r2) {\n throw takeObject(r1);\n }\n return RecordCiphertext.__wrap(r0);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n }\n }\n /**\n * Return the string reprensentation of the record ciphertext\n *\n * @returns {string} String representation of the record ciphertext\n * @returns {string}\n */\n toString() {\n let deferred1_0;\n let deferred1_1;\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n wasm.recordciphertext_toString(retptr, this.__wbg_ptr);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n deferred1_0 = r0;\n deferred1_1 = r1;\n return getStringFromWasm0(r0, r1);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);\n }\n }\n /**\n * Decrypt the record ciphertext into plaintext using the view key. The record will only\n * decrypt if the record was encrypted by the account corresponding to the view key\n *\n * @param {ViewKey} view_key View key used to decrypt the ciphertext\n * @returns {RecordPlaintext | Error} Record plaintext object\n * @param {ViewKey} view_key\n * @returns {RecordPlaintext}\n */\n decrypt(view_key) {\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n _assertClass(view_key, ViewKey);\n wasm.recordciphertext_decrypt(retptr, this.__wbg_ptr, view_key.__wbg_ptr);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n var r2 = getInt32Memory0()[retptr / 4 + 2];\n if (r2) {\n throw takeObject(r1);\n }\n return RecordPlaintext.__wrap(r0);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n }\n }\n /**\n * Determines if the account corresponding to the view key is the owner of the record\n *\n * @param {ViewKey} view_key View key used to decrypt the ciphertext\n * @returns {boolean}\n * @param {ViewKey} view_key\n * @returns {boolean}\n */\n isOwner(view_key) {\n _assertClass(view_key, ViewKey);\n const ret = wasm.recordciphertext_isOwner(this.__wbg_ptr, view_key.__wbg_ptr);\n return ret !== 0;\n }\n}\n\nconst RecordPlaintextFinalization = (typeof FinalizationRegistry === 'undefined')\n ? { register: () => {}, unregister: () => {} }\n : new FinalizationRegistry(ptr => wasm.__wbg_recordplaintext_free(ptr >>> 0));\n/**\n* Plaintext representation of an Aleo record\n*/\nclass RecordPlaintext {\n\n static __wrap(ptr) {\n ptr = ptr >>> 0;\n const obj = Object.create(RecordPlaintext.prototype);\n obj.__wbg_ptr = ptr;\n RecordPlaintextFinalization.register(obj, obj.__wbg_ptr, obj);\n return obj;\n }\n\n __destroy_into_raw() {\n const ptr = this.__wbg_ptr;\n this.__wbg_ptr = 0;\n RecordPlaintextFinalization.unregister(this);\n return ptr;\n }\n\n free() {\n const ptr = this.__destroy_into_raw();\n wasm.__wbg_recordplaintext_free(ptr);\n }\n /**\n * @param {string} program_id\n * @param {string} record_name\n * @returns {Field}\n */\n commitment(program_id, record_name) {\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n const ptr0 = passStringToWasm0(program_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n const ptr1 = passStringToWasm0(record_name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len1 = WASM_VECTOR_LEN;\n wasm.recordplaintext_commitment(retptr, this.__wbg_ptr, ptr0, len0, ptr1, len1);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n var r2 = getInt32Memory0()[retptr / 4 + 2];\n if (r2) {\n throw takeObject(r1);\n }\n return Field.__wrap(r0);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n }\n }\n /**\n * Return a record plaintext from a string.\n *\n * @param {string} record String representation of a plaintext representation of an Aleo record\n * @returns {RecordPlaintext | Error} Record plaintext\n * @param {string} record\n * @returns {RecordPlaintext}\n */\n static fromString(record) {\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n const ptr0 = passStringToWasm0(record, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n wasm.recordplaintext_fromString(retptr, ptr0, len0);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n var r2 = getInt32Memory0()[retptr / 4 + 2];\n if (r2) {\n throw takeObject(r1);\n }\n return RecordPlaintext.__wrap(r0);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n }\n }\n /**\n * Returns the record plaintext string\n *\n * @returns {string} String representation of the record plaintext\n * @returns {string}\n */\n toString() {\n let deferred1_0;\n let deferred1_1;\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n wasm.recordplaintext_toString(retptr, this.__wbg_ptr);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n deferred1_0 = r0;\n deferred1_1 = r1;\n return getStringFromWasm0(r0, r1);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);\n }\n }\n /**\n * Returns the amount of microcredits in the record\n *\n * @returns {u64} Amount of microcredits in the record\n * @returns {bigint}\n */\n microcredits() {\n const ret = wasm.recordplaintext_microcredits(this.__wbg_ptr);\n return BigInt.asUintN(64, ret);\n }\n /**\n * Returns the nonce of the record. This can be used to uniquely identify a record.\n *\n * @returns {string} Nonce of the record\n * @returns {string}\n */\n nonce() {\n let deferred1_0;\n let deferred1_1;\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n wasm.recordplaintext_nonce(retptr, this.__wbg_ptr);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n deferred1_0 = r0;\n deferred1_1 = r1;\n return getStringFromWasm0(r0, r1);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);\n }\n }\n /**\n * Attempt to get the serial number of a record to determine whether or not is has been spent\n *\n * @param {PrivateKey} private_key Private key of the account that owns the record\n * @param {string} program_id Program ID of the program that the record is associated with\n * @param {string} record_name Name of the record\n * @returns {string | Error} Serial number of the record\n * @param {PrivateKey} private_key\n * @param {string} program_id\n * @param {string} record_name\n * @returns {string}\n */\n serialNumberString(private_key, program_id, record_name) {\n let deferred4_0;\n let deferred4_1;\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n _assertClass(private_key, PrivateKey);\n const ptr0 = passStringToWasm0(program_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n const ptr1 = passStringToWasm0(record_name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len1 = WASM_VECTOR_LEN;\n wasm.recordplaintext_serialNumberString(retptr, this.__wbg_ptr, private_key.__wbg_ptr, ptr0, len0, ptr1, len1);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n var r2 = getInt32Memory0()[retptr / 4 + 2];\n var r3 = getInt32Memory0()[retptr / 4 + 3];\n var ptr3 = r0;\n var len3 = r1;\n if (r3) {\n ptr3 = 0; len3 = 0;\n throw takeObject(r2);\n }\n deferred4_0 = ptr3;\n deferred4_1 = len3;\n return getStringFromWasm0(ptr3, len3);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n wasm.__wbindgen_free(deferred4_0, deferred4_1, 1);\n }\n }\n}\n\nconst SignatureFinalization = (typeof FinalizationRegistry === 'undefined')\n ? { register: () => {}, unregister: () => {} }\n : new FinalizationRegistry(ptr => wasm.__wbg_signature_free(ptr >>> 0));\n/**\n* Cryptographic signature of a message signed by an Aleo account\n*/\nclass Signature {\n\n static __wrap(ptr) {\n ptr = ptr >>> 0;\n const obj = Object.create(Signature.prototype);\n obj.__wbg_ptr = ptr;\n SignatureFinalization.register(obj, obj.__wbg_ptr, obj);\n return obj;\n }\n\n __destroy_into_raw() {\n const ptr = this.__wbg_ptr;\n this.__wbg_ptr = 0;\n SignatureFinalization.unregister(this);\n return ptr;\n }\n\n free() {\n const ptr = this.__destroy_into_raw();\n wasm.__wbg_signature_free(ptr);\n }\n /**\n * Sign a message with a private key\n *\n * @param {PrivateKey} private_key The private key to sign the message with\n * @param {Uint8Array} message Byte representation of the message to sign\n * @returns {Signature} Signature of the message\n * @param {PrivateKey} private_key\n * @param {Uint8Array} message\n * @returns {Signature}\n */\n static sign(private_key, message) {\n _assertClass(private_key, PrivateKey);\n const ptr0 = passArray8ToWasm0(message, wasm.__wbindgen_malloc);\n const len0 = WASM_VECTOR_LEN;\n const ret = wasm.privatekey_sign(private_key.__wbg_ptr, ptr0, len0);\n return Signature.__wrap(ret);\n }\n /**\n * Verify a signature of a message with an address\n *\n * @param {Address} address The address to verify the signature with\n * @param {Uint8Array} message Byte representation of the message to verify\n * @returns {boolean} True if the signature is valid, false otherwise\n * @param {Address} address\n * @param {Uint8Array} message\n * @returns {boolean}\n */\n verify(address, message) {\n _assertClass(address, Address);\n const ptr0 = passArray8ToWasm0(message, wasm.__wbindgen_malloc);\n const len0 = WASM_VECTOR_LEN;\n const ret = wasm.signature_verify(this.__wbg_ptr, address.__wbg_ptr, ptr0, len0);\n return ret !== 0;\n }\n /**\n * Get a signature from a string representation of a signature\n *\n * @param {string} signature String representation of a signature\n * @returns {Signature} Signature\n * @param {string} signature\n * @returns {Signature}\n */\n static from_string(signature) {\n const ptr0 = passStringToWasm0(signature, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n const ret = wasm.signature_from_string(ptr0, len0);\n return Signature.__wrap(ret);\n }\n /**\n * Get a string representation of a signature\n *\n * @returns {string} String representation of a signature\n * @returns {string}\n */\n to_string() {\n let deferred1_0;\n let deferred1_1;\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n wasm.signature_to_string(retptr, this.__wbg_ptr);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n deferred1_0 = r0;\n deferred1_1 = r1;\n return getStringFromWasm0(r0, r1);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);\n }\n }\n}\n\nconst TransactionFinalization = (typeof FinalizationRegistry === 'undefined')\n ? { register: () => {}, unregister: () => {} }\n : new FinalizationRegistry(ptr => wasm.__wbg_transaction_free(ptr >>> 0));\n/**\n* Webassembly Representation of an Aleo transaction\n*\n* This object is created when generating an on-chain function deployment or execution and is the\n* object that should be submitted to the Aleo Network in order to deploy or execute a function.\n*/\nclass Transaction {\n\n static __wrap(ptr) {\n ptr = ptr >>> 0;\n const obj = Object.create(Transaction.prototype);\n obj.__wbg_ptr = ptr;\n TransactionFinalization.register(obj, obj.__wbg_ptr, obj);\n return obj;\n }\n\n __destroy_into_raw() {\n const ptr = this.__wbg_ptr;\n this.__wbg_ptr = 0;\n TransactionFinalization.unregister(this);\n return ptr;\n }\n\n free() {\n const ptr = this.__destroy_into_raw();\n wasm.__wbg_transaction_free(ptr);\n }\n /**\n * Create a transaction from a string\n *\n * @param {string} transaction String representation of a transaction\n * @returns {Transaction | Error}\n * @param {string} transaction\n * @returns {Transaction}\n */\n static fromString(transaction) {\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n const ptr0 = passStringToWasm0(transaction, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n wasm.transaction_fromString(retptr, ptr0, len0);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n var r2 = getInt32Memory0()[retptr / 4 + 2];\n if (r2) {\n throw takeObject(r1);\n }\n return Transaction.__wrap(r0);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n }\n }\n /**\n * Get the transaction as a string. If you want to submit this transaction to the Aleo Network\n * this function will create the string that should be submitted in the `POST` data.\n *\n * @returns {string} String representation of the transaction\n * @returns {string}\n */\n toString() {\n let deferred1_0;\n let deferred1_1;\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n wasm.transaction_toString(retptr, this.__wbg_ptr);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n deferred1_0 = r0;\n deferred1_1 = r1;\n return getStringFromWasm0(r0, r1);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);\n }\n }\n /**\n * Get the id of the transaction. This is the merkle root of the transaction's inclusion proof.\n *\n * This value can be used to query the status of the transaction on the Aleo Network to see\n * if it was successful. If successful, the transaction will be included in a block and this\n * value can be used to lookup the transaction data on-chain.\n *\n * @returns {string} Transaction id\n * @returns {string}\n */\n transactionId() {\n let deferred1_0;\n let deferred1_1;\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n wasm.transaction_transactionId(retptr, this.__wbg_ptr);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n deferred1_0 = r0;\n deferred1_1 = r1;\n return getStringFromWasm0(r0, r1);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);\n }\n }\n /**\n * Get the type of the transaction (will return \"deploy\" or \"execute\")\n *\n * @returns {string} Transaction type\n * @returns {string}\n */\n transactionType() {\n let deferred1_0;\n let deferred1_1;\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n wasm.transaction_transactionType(retptr, this.__wbg_ptr);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n deferred1_0 = r0;\n deferred1_1 = r1;\n return getStringFromWasm0(r0, r1);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);\n }\n }\n}\n\nconst VerifyingKeyFinalization = (typeof FinalizationRegistry === 'undefined')\n ? { register: () => {}, unregister: () => {} }\n : new FinalizationRegistry(ptr => wasm.__wbg_verifyingkey_free(ptr >>> 0));\n/**\n* Verifying key for a function within an Aleo program\n*/\nclass VerifyingKey {\n\n static __wrap(ptr) {\n ptr = ptr >>> 0;\n const obj = Object.create(VerifyingKey.prototype);\n obj.__wbg_ptr = ptr;\n VerifyingKeyFinalization.register(obj, obj.__wbg_ptr, obj);\n return obj;\n }\n\n __destroy_into_raw() {\n const ptr = this.__wbg_ptr;\n this.__wbg_ptr = 0;\n VerifyingKeyFinalization.unregister(this);\n return ptr;\n }\n\n free() {\n const ptr = this.__destroy_into_raw();\n wasm.__wbg_verifyingkey_free(ptr);\n }\n /**\n * Returns the verifying key for the bond_public function\n *\n * @returns {VerifyingKey} Verifying key for the bond_public function\n * @returns {VerifyingKey}\n */\n static bondPublicVerifier() {\n const ret = wasm.verifyingkey_bondPublicVerifier();\n return VerifyingKey.__wrap(ret);\n }\n /**\n * Returns the verifying key for the bond_validator function\n *\n * @returns {VerifyingKey} Verifying key for the bond_validator function\n * @returns {VerifyingKey}\n */\n static bondValidatorVerifier() {\n const ret = wasm.verifyingkey_bondValidatorVerifier();\n return VerifyingKey.__wrap(ret);\n }\n /**\n * Returns the verifying key for the claim_delegator function\n *\n * @returns {VerifyingKey} Verifying key for the claim_unbond_public function\n * @returns {VerifyingKey}\n */\n static claimUnbondPublicVerifier() {\n const ret = wasm.verifyingkey_claimUnbondPublicVerifier();\n return VerifyingKey.__wrap(ret);\n }\n /**\n * Returns the verifying key for the fee_private function\n *\n * @returns {VerifyingKey} Verifying key for the fee_private function\n * @returns {VerifyingKey}\n */\n static feePrivateVerifier() {\n const ret = wasm.verifyingkey_feePrivateVerifier();\n return VerifyingKey.__wrap(ret);\n }\n /**\n * Returns the verifying key for the fee_public function\n *\n * @returns {VerifyingKey} Verifying key for the fee_public function\n * @returns {VerifyingKey}\n */\n static feePublicVerifier() {\n const ret = wasm.verifyingkey_feePublicVerifier();\n return VerifyingKey.__wrap(ret);\n }\n /**\n * Returns the verifying key for the inclusion function\n *\n * @returns {VerifyingKey} Verifying key for the inclusion function\n * @returns {VerifyingKey}\n */\n static inclusionVerifier() {\n const ret = wasm.verifyingkey_inclusionVerifier();\n return VerifyingKey.__wrap(ret);\n }\n /**\n * Returns the verifying key for the join function\n *\n * @returns {VerifyingKey} Verifying key for the join function\n * @returns {VerifyingKey}\n */\n static joinVerifier() {\n const ret = wasm.verifyingkey_joinVerifier();\n return VerifyingKey.__wrap(ret);\n }\n /**\n * Returns the verifying key for the set_validator_state function\n *\n * @returns {VerifyingKey} Verifying key for the set_validator_state function\n * @returns {VerifyingKey}\n */\n static setValidatorStateVerifier() {\n const ret = wasm.verifyingkey_setValidatorStateVerifier();\n return VerifyingKey.__wrap(ret);\n }\n /**\n * Returns the verifying key for the split function\n *\n * @returns {VerifyingKey} Verifying key for the split function\n * @returns {VerifyingKey}\n */\n static splitVerifier() {\n const ret = wasm.verifyingkey_splitVerifier();\n return VerifyingKey.__wrap(ret);\n }\n /**\n * Returns the verifying key for the transfer_private function\n *\n * @returns {VerifyingKey} Verifying key for the transfer_private function\n * @returns {VerifyingKey}\n */\n static transferPrivateVerifier() {\n const ret = wasm.verifyingkey_transferPrivateVerifier();\n return VerifyingKey.__wrap(ret);\n }\n /**\n * Returns the verifying key for the transfer_private_to_public function\n *\n * @returns {VerifyingKey} Verifying key for the transfer_private_to_public function\n * @returns {VerifyingKey}\n */\n static transferPrivateToPublicVerifier() {\n const ret = wasm.verifyingkey_transferPrivateToPublicVerifier();\n return VerifyingKey.__wrap(ret);\n }\n /**\n * Returns the verifying key for the transfer_public function\n *\n * @returns {VerifyingKey} Verifying key for the transfer_public function\n * @returns {VerifyingKey}\n */\n static transferPublicVerifier() {\n const ret = wasm.verifyingkey_transferPublicVerifier();\n return VerifyingKey.__wrap(ret);\n }\n /**\n * Returns the verifying key for the transfer_public_as_signer function\n *\n * @returns {VerifyingKey} Verifying key for the transfer_public_as_signer function\n * @returns {VerifyingKey}\n */\n static transferPublicAsSignerVerifier() {\n const ret = wasm.verifyingkey_transferPublicAsSignerVerifier();\n return VerifyingKey.__wrap(ret);\n }\n /**\n * Returns the verifying key for the transfer_public_to_private function\n *\n * @returns {VerifyingKey} Verifying key for the transfer_public_to_private function\n * @returns {VerifyingKey}\n */\n static transferPublicToPrivateVerifier() {\n const ret = wasm.verifyingkey_transferPublicToPrivateVerifier();\n return VerifyingKey.__wrap(ret);\n }\n /**\n * Returns the verifying key for the unbond_public function\n *\n * @returns {VerifyingKey} Verifying key for the unbond_public function\n * @returns {VerifyingKey}\n */\n static unbondPublicVerifier() {\n const ret = wasm.verifyingkey_unbondPublicVerifier();\n return VerifyingKey.__wrap(ret);\n }\n /**\n * Returns the verifying key for the bond_public function\n *\n * @returns {VerifyingKey} Verifying key for the bond_public function\n * @returns {boolean}\n */\n isBondPublicVerifier() {\n const ret = wasm.verifyingkey_isBondPublicVerifier(this.__wbg_ptr);\n return ret !== 0;\n }\n /**\n * Returns the verifying key for the bond_validator function\n *\n * @returns {VerifyingKey} Verifying key for the bond_validator function\n * @returns {boolean}\n */\n isBondValidatorVerifier() {\n const ret = wasm.verifyingkey_isBondValidatorVerifier(this.__wbg_ptr);\n return ret !== 0;\n }\n /**\n * Verifies the verifying key is for the claim_delegator function\n *\n * @returns {bool}\n * @returns {boolean}\n */\n isClaimUnbondPublicVerifier() {\n const ret = wasm.verifyingkey_isClaimUnbondPublicVerifier(this.__wbg_ptr);\n return ret !== 0;\n }\n /**\n * Verifies the verifying key is for the fee_private function\n *\n * @returns {bool}\n * @returns {boolean}\n */\n isFeePrivateVerifier() {\n const ret = wasm.verifyingkey_isFeePrivateVerifier(this.__wbg_ptr);\n return ret !== 0;\n }\n /**\n * Verifies the verifying key is for the fee_public function\n *\n * @returns {bool}\n * @returns {boolean}\n */\n isFeePublicVerifier() {\n const ret = wasm.verifyingkey_isFeePublicVerifier(this.__wbg_ptr);\n return ret !== 0;\n }\n /**\n * Verifies the verifying key is for the inclusion function\n *\n * @returns {bool}\n * @returns {boolean}\n */\n isInclusionVerifier() {\n const ret = wasm.verifyingkey_isInclusionVerifier(this.__wbg_ptr);\n return ret !== 0;\n }\n /**\n * Verifies the verifying key is for the join function\n *\n * @returns {bool}\n * @returns {boolean}\n */\n isJoinVerifier() {\n const ret = wasm.verifyingkey_isJoinVerifier(this.__wbg_ptr);\n return ret !== 0;\n }\n /**\n * Verifies the verifying key is for the set_validator_state function\n *\n * @returns {bool}\n * @returns {boolean}\n */\n isSetValidatorStateVerifier() {\n const ret = wasm.verifyingkey_isSetValidatorStateVerifier(this.__wbg_ptr);\n return ret !== 0;\n }\n /**\n * Verifies the verifying key is for the split function\n *\n * @returns {bool}\n * @returns {boolean}\n */\n isSplitVerifier() {\n const ret = wasm.verifyingkey_isSplitVerifier(this.__wbg_ptr);\n return ret !== 0;\n }\n /**\n * Verifies the verifying key is for the transfer_private function\n *\n * @returns {bool}\n * @returns {boolean}\n */\n isTransferPrivateVerifier() {\n const ret = wasm.verifyingkey_isTransferPrivateVerifier(this.__wbg_ptr);\n return ret !== 0;\n }\n /**\n * Verifies the verifying key is for the transfer_private_to_public function\n *\n * @returns {bool}\n * @returns {boolean}\n */\n isTransferPrivateToPublicVerifier() {\n const ret = wasm.verifyingkey_isTransferPrivateToPublicVerifier(this.__wbg_ptr);\n return ret !== 0;\n }\n /**\n * Verifies the verifying key is for the transfer_public function\n *\n * @returns {bool}\n * @returns {boolean}\n */\n isTransferPublicVerifier() {\n const ret = wasm.verifyingkey_isTransferPublicVerifier(this.__wbg_ptr);\n return ret !== 0;\n }\n /**\n * Verifies the verifying key is for the transfer_public_as_signer function\n *\n * @returns {bool}\n * @returns {boolean}\n */\n isTransferPublicAsSignerVerifier() {\n const ret = wasm.verifyingkey_isTransferPublicAsSignerVerifier(this.__wbg_ptr);\n return ret !== 0;\n }\n /**\n * Verifies the verifying key is for the transfer_public_to_private function\n *\n * @returns {bool}\n * @returns {boolean}\n */\n isTransferPublicToPrivateVerifier() {\n const ret = wasm.verifyingkey_isTransferPublicToPrivateVerifier(this.__wbg_ptr);\n return ret !== 0;\n }\n /**\n * Verifies the verifying key is for the unbond_public function\n *\n * @returns {bool}\n * @returns {boolean}\n */\n isUnbondPublicVerifier() {\n const ret = wasm.verifyingkey_isUnbondPublicVerifier(this.__wbg_ptr);\n return ret !== 0;\n }\n /**\n * Get the checksum of the verifying key\n *\n * @returns {string} Checksum of the verifying key\n * @returns {string}\n */\n checksum() {\n let deferred1_0;\n let deferred1_1;\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n wasm.verifyingkey_checksum(retptr, this.__wbg_ptr);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n deferred1_0 = r0;\n deferred1_1 = r1;\n return getStringFromWasm0(r0, r1);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);\n }\n }\n /**\n * Create a copy of the verifying key\n *\n * @returns {VerifyingKey} A copy of the verifying key\n * @returns {VerifyingKey}\n */\n copy() {\n const ret = wasm.verifyingkey_copy(this.__wbg_ptr);\n return VerifyingKey.__wrap(ret);\n }\n /**\n * Construct a new verifying key from a byte array\n *\n * @param {Uint8Array} bytes Byte representation of a verifying key\n * @returns {VerifyingKey | Error}\n * @param {Uint8Array} bytes\n * @returns {VerifyingKey}\n */\n static fromBytes(bytes) {\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n const ptr0 = passArray8ToWasm0(bytes, wasm.__wbindgen_malloc);\n const len0 = WASM_VECTOR_LEN;\n wasm.verifyingkey_fromBytes(retptr, ptr0, len0);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n var r2 = getInt32Memory0()[retptr / 4 + 2];\n if (r2) {\n throw takeObject(r1);\n }\n return VerifyingKey.__wrap(r0);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n }\n }\n /**\n * Create a verifying key from string\n *\n * @param {String} string String representation of a verifying key\n * @returns {VerifyingKey | Error}\n * @param {string} string\n * @returns {VerifyingKey}\n */\n static fromString(string) {\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n const ptr0 = passStringToWasm0(string, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n wasm.verifyingkey_fromString(retptr, ptr0, len0);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n var r2 = getInt32Memory0()[retptr / 4 + 2];\n if (r2) {\n throw takeObject(r1);\n }\n return VerifyingKey.__wrap(r0);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n }\n }\n /**\n * Create a byte array from a verifying key\n *\n * @returns {Uint8Array | Error} Byte representation of a verifying key\n * @returns {Uint8Array}\n */\n toBytes() {\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n wasm.verifyingkey_toBytes(retptr, this.__wbg_ptr);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n var r2 = getInt32Memory0()[retptr / 4 + 2];\n var r3 = getInt32Memory0()[retptr / 4 + 3];\n if (r3) {\n throw takeObject(r2);\n }\n var v1 = getArrayU8FromWasm0(r0, r1).slice();\n wasm.__wbindgen_free(r0, r1 * 1, 1);\n return v1;\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n }\n }\n /**\n * Get a string representation of the verifying key\n *\n * @returns {String} String representation of the verifying key\n * @returns {string}\n */\n toString() {\n let deferred1_0;\n let deferred1_1;\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n wasm.verifyingkey_toString(retptr, this.__wbg_ptr);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n deferred1_0 = r0;\n deferred1_1 = r1;\n return getStringFromWasm0(r0, r1);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);\n }\n }\n}\n\nconst ViewKeyFinalization = (typeof FinalizationRegistry === 'undefined')\n ? { register: () => {}, unregister: () => {} }\n : new FinalizationRegistry(ptr => wasm.__wbg_viewkey_free(ptr >>> 0));\n/**\n*/\nclass ViewKey {\n\n static __wrap(ptr) {\n ptr = ptr >>> 0;\n const obj = Object.create(ViewKey.prototype);\n obj.__wbg_ptr = ptr;\n ViewKeyFinalization.register(obj, obj.__wbg_ptr, obj);\n return obj;\n }\n\n __destroy_into_raw() {\n const ptr = this.__wbg_ptr;\n this.__wbg_ptr = 0;\n ViewKeyFinalization.unregister(this);\n return ptr;\n }\n\n free() {\n const ptr = this.__destroy_into_raw();\n wasm.__wbg_viewkey_free(ptr);\n }\n /**\n * Create a new view key from a private key\n *\n * @param {PrivateKey} private_key Private key\n * @returns {ViewKey} View key\n * @param {PrivateKey} private_key\n * @returns {ViewKey}\n */\n static from_private_key(private_key) {\n _assertClass(private_key, PrivateKey);\n const ret = wasm.privatekey_to_view_key(private_key.__wbg_ptr);\n return ViewKey.__wrap(ret);\n }\n /**\n * Create a new view key from a string representation of a view key\n *\n * @param {string} view_key String representation of a view key\n * @returns {ViewKey} View key\n * @param {string} view_key\n * @returns {ViewKey}\n */\n static from_string(view_key) {\n const ptr0 = passStringToWasm0(view_key, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n const ret = wasm.viewkey_from_string(ptr0, len0);\n return ViewKey.__wrap(ret);\n }\n /**\n * Get a string representation of a view key\n *\n * @returns {string} String representation of a view key\n * @returns {string}\n */\n to_string() {\n let deferred1_0;\n let deferred1_1;\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n wasm.viewkey_to_string(retptr, this.__wbg_ptr);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n deferred1_0 = r0;\n deferred1_1 = r1;\n return getStringFromWasm0(r0, r1);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);\n }\n }\n /**\n * Get the address corresponding to a view key\n *\n * @returns {Address} Address\n * @returns {Address}\n */\n to_address() {\n const ret = wasm.address_from_view_key(this.__wbg_ptr);\n return Address.__wrap(ret);\n }\n /**\n * Decrypt a record ciphertext with a view key\n *\n * @param {string} ciphertext String representation of a record ciphertext\n * @returns {string} String representation of a record plaintext\n * @param {string} ciphertext\n * @returns {string}\n */\n decrypt(ciphertext) {\n let deferred3_0;\n let deferred3_1;\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n const ptr0 = passStringToWasm0(ciphertext, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n wasm.viewkey_decrypt(retptr, this.__wbg_ptr, ptr0, len0);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n var r2 = getInt32Memory0()[retptr / 4 + 2];\n var r3 = getInt32Memory0()[retptr / 4 + 3];\n var ptr2 = r0;\n var len2 = r1;\n if (r3) {\n ptr2 = 0; len2 = 0;\n throw takeObject(r2);\n }\n deferred3_0 = ptr2;\n deferred3_1 = len2;\n return getStringFromWasm0(ptr2, len2);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n wasm.__wbindgen_free(deferred3_0, deferred3_1, 1);\n }\n }\n}\n\nasync function __wbg_load(module, imports) {\n if (typeof Response === 'function' && module instanceof Response) {\n if (typeof WebAssembly.instantiateStreaming === 'function') {\n try {\n return await WebAssembly.instantiateStreaming(module, imports);\n\n } catch (e) {\n if (module.headers.get('Content-Type') != 'application/wasm') {\n console.warn(\"`WebAssembly.instantiateStreaming` failed because your server does not serve wasm with `application/wasm` MIME type. Falling back to `WebAssembly.instantiate` which is slower. Original error:\\n\", e);\n\n } else {\n throw e;\n }\n }\n }\n\n const bytes = await module.arrayBuffer();\n return await WebAssembly.instantiate(bytes, imports);\n\n } else {\n const instance = await WebAssembly.instantiate(module, imports);\n\n if (instance instanceof WebAssembly.Instance) {\n return { instance, module };\n\n } else {\n return instance;\n }\n }\n}\n\nfunction __wbg_get_imports() {\n const imports = {};\n imports.wbg = {};\n imports.wbg.__wbindgen_object_drop_ref = function(arg0) {\n takeObject(arg0);\n };\n imports.wbg.__wbg_new_71801a555ad9f2aa = function() { return handleError(function () {\n const ret = new XMLHttpRequest();\n return addHeapObject(ret);\n }, arguments) };\n imports.wbg.__wbg_overrideMimeType_ee9c51919ceb418b = function() { return handleError(function (arg0, arg1, arg2) {\n getObject(arg0).overrideMimeType(getStringFromWasm0(arg1, arg2));\n }, arguments) };\n imports.wbg.__wbg_open_c9eb0cf2c9d95679 = function() { return handleError(function (arg0, arg1, arg2, arg3, arg4, arg5) {\n getObject(arg0).open(getStringFromWasm0(arg1, arg2), getStringFromWasm0(arg3, arg4), arg5 !== 0);\n }, arguments) };\n imports.wbg.__wbg_send_80d29985093c1ec5 = function() { return handleError(function (arg0) {\n getObject(arg0).send();\n }, arguments) };\n imports.wbg.__wbg_response_7c2e2759084f7279 = function() { return handleError(function (arg0) {\n const ret = getObject(arg0).response;\n return addHeapObject(ret);\n }, arguments) };\n imports.wbg.__wbg_status_d485fb5a478426fb = function() { return handleError(function (arg0) {\n const ret = getObject(arg0).status;\n return ret;\n }, arguments) };\n imports.wbg.__wbg_new_72fb9a18b5ae2624 = function() {\n const ret = new Object();\n return addHeapObject(ret);\n };\n imports.wbg.__wbindgen_string_new = function(arg0, arg1) {\n const ret = getStringFromWasm0(arg0, arg1);\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_set_1f9b04f170055d33 = function() { return handleError(function (arg0, arg1, arg2) {\n const ret = Reflect.set(getObject(arg0), getObject(arg1), getObject(arg2));\n return ret;\n }, arguments) };\n imports.wbg.__wbg_new_ab6fd82b10560829 = function() { return handleError(function () {\n const ret = new Headers();\n return addHeapObject(ret);\n }, arguments) };\n imports.wbg.__wbindgen_object_clone_ref = function(arg0) {\n const ret = getObject(arg0);\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_new_0d76b0581eca6298 = function() { return handleError(function () {\n const ret = new AbortController();\n return addHeapObject(ret);\n }, arguments) };\n imports.wbg.__wbg_signal_a61f78a3478fd9bc = function(arg0) {\n const ret = getObject(arg0).signal;\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_append_7bfcb4937d1d5e29 = function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {\n getObject(arg0).append(getStringFromWasm0(arg1, arg2), getStringFromWasm0(arg3, arg4));\n }, arguments) };\n imports.wbg.__wbg_instanceof_Response_849eb93e75734b6e = function(arg0) {\n let result;\n try {\n result = getObject(arg0) instanceof Response;\n } catch (_) {\n result = false;\n }\n const ret = result;\n return ret;\n };\n imports.wbg.__wbg_status_61a01141acd3cf74 = function(arg0) {\n const ret = getObject(arg0).status;\n return ret;\n };\n imports.wbg.__wbg_url_5f6dc4009ac5f99d = function(arg0, arg1) {\n const ret = getObject(arg1).url;\n const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len1 = WASM_VECTOR_LEN;\n getInt32Memory0()[arg0 / 4 + 1] = len1;\n getInt32Memory0()[arg0 / 4 + 0] = ptr1;\n };\n imports.wbg.__wbg_headers_9620bfada380764a = function(arg0) {\n const ret = getObject(arg0).headers;\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_iterator_2cee6dadfd956dfa = function() {\n const ret = Symbol.iterator;\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_get_e3c254076557e348 = function() { return handleError(function (arg0, arg1) {\n const ret = Reflect.get(getObject(arg0), getObject(arg1));\n return addHeapObject(ret);\n }, arguments) };\n imports.wbg.__wbindgen_is_function = function(arg0) {\n const ret = typeof(getObject(arg0)) === 'function';\n return ret;\n };\n imports.wbg.__wbg_call_27c0f87801dedf93 = function() { return handleError(function (arg0, arg1) {\n const ret = getObject(arg0).call(getObject(arg1));\n return addHeapObject(ret);\n }, arguments) };\n imports.wbg.__wbindgen_is_object = function(arg0) {\n const val = getObject(arg0);\n const ret = typeof(val) === 'object' && val !== null;\n return ret;\n };\n imports.wbg.__wbg_next_40fc327bfc8770e6 = function(arg0) {\n const ret = getObject(arg0).next;\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_next_196c84450b364254 = function() { return handleError(function (arg0) {\n const ret = getObject(arg0).next();\n return addHeapObject(ret);\n }, arguments) };\n imports.wbg.__wbg_done_298b57d23c0fc80c = function(arg0) {\n const ret = getObject(arg0).done;\n return ret;\n };\n imports.wbg.__wbg_value_d93c65011f51a456 = function(arg0) {\n const ret = getObject(arg0).value;\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_abort_2aa7521d5690750e = function(arg0) {\n getObject(arg0).abort();\n };\n imports.wbg.__wbg_stringify_8887fe74e1c50d81 = function() { return handleError(function (arg0) {\n const ret = JSON.stringify(getObject(arg0));\n return addHeapObject(ret);\n }, arguments) };\n imports.wbg.__wbindgen_string_get = function(arg0, arg1) {\n const obj = getObject(arg1);\n const ret = typeof(obj) === 'string' ? obj : undefined;\n var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n var len1 = WASM_VECTOR_LEN;\n getInt32Memory0()[arg0 / 4 + 1] = len1;\n getInt32Memory0()[arg0 / 4 + 0] = ptr1;\n };\n imports.wbg.__wbg_log_0159ca40cddf5b15 = function(arg0, arg1) {\n console.log(getStringFromWasm0(arg0, arg1));\n };\n imports.wbg.__wbindgen_bigint_from_u64 = function(arg0) {\n const ret = BigInt.asUintN(64, arg0);\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_call_b3ca7c6051f9bec1 = function() { return handleError(function (arg0, arg1, arg2) {\n const ret = getObject(arg0).call(getObject(arg1), getObject(arg2));\n return addHeapObject(ret);\n }, arguments) };\n imports.wbg.__wbg_transaction_new = function(arg0) {\n const ret = Transaction.__wrap(arg0);\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_keypair_new = function(arg0) {\n const ret = KeyPair.__wrap(arg0);\n return addHeapObject(ret);\n };\n imports.wbg.__wbindgen_module = function() {\n const ret = __wbg_init.__wbindgen_wasm_module;\n return addHeapObject(ret);\n };\n imports.wbg.__wbindgen_memory = function() {\n const ret = wasm.memory;\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_spawnWorker_f6acaddb2e29dc4a = function(arg0, arg1, arg2, arg3) {\n const ret = spawnWorker(getObject(arg0), getObject(arg1), getObject(arg2), arg3 >>> 0);\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_executionresponse_new = function(arg0) {\n const ret = ExecutionResponse.__wrap(arg0);\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_newwithlength_66ae46612e7f0234 = function(arg0) {\n const ret = new Array(arg0 >>> 0);\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_set_d4638f722068f043 = function(arg0, arg1, arg2) {\n getObject(arg0)[arg1 >>> 0] = takeObject(arg2);\n };\n imports.wbg.__wbindgen_cb_drop = function(arg0) {\n const obj = takeObject(arg0).original;\n if (obj.cnt-- == 1) {\n obj.a = 0;\n return true;\n }\n const ret = false;\n return ret;\n };\n imports.wbg.__wbg_new_16b304a2cfa7ff4a = function() {\n const ret = new Array();\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_push_a5b05aedc7234f9f = function(arg0, arg1) {\n const ret = getObject(arg0).push(getObject(arg1));\n return ret;\n };\n imports.wbg.__wbg_arrayBuffer_29931d52c7206b02 = function() { return handleError(function (arg0) {\n const ret = getObject(arg0).arrayBuffer();\n return addHeapObject(ret);\n }, arguments) };\n imports.wbg.__wbg_new_63b92bc8671ed464 = function(arg0) {\n const ret = new Uint8Array(getObject(arg0));\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_length_c20a40f15020d68a = function(arg0) {\n const ret = getObject(arg0).length;\n return ret;\n };\n imports.wbg.__wbg_new_81740750da40724f = function(arg0, arg1) {\n try {\n var state0 = {a: arg0, b: arg1};\n var cb0 = (arg0, arg1) => {\n const a = state0.a;\n state0.a = 0;\n try {\n return __wbg_adapter_281(a, state0.b, arg0, arg1);\n } finally {\n state0.a = a;\n }\n };\n const ret = new Promise(cb0);\n return addHeapObject(ret);\n } finally {\n state0.a = state0.b = 0;\n }\n };\n imports.wbg.__wbindgen_number_new = function(arg0) {\n const ret = arg0;\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_new_abda76e883ba8a5f = function() {\n const ret = new Error();\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_stack_658279fe44541cf6 = function(arg0, arg1) {\n const ret = getObject(arg1).stack;\n const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len1 = WASM_VECTOR_LEN;\n getInt32Memory0()[arg0 / 4 + 1] = len1;\n getInt32Memory0()[arg0 / 4 + 0] = ptr1;\n };\n imports.wbg.__wbg_error_f851667af71bcfc6 = function(arg0, arg1) {\n let deferred0_0;\n let deferred0_1;\n try {\n deferred0_0 = arg0;\n deferred0_1 = arg1;\n console.error(getStringFromWasm0(arg0, arg1));\n } finally {\n wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);\n }\n };\n imports.wbg.__wbg_buffer_12d079cc21e14bdb = function(arg0) {\n const ret = getObject(arg0).buffer;\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_newwithbyteoffsetandlength_aa4a17c33a06e5cb = function(arg0, arg1, arg2) {\n const ret = new Uint8Array(getObject(arg0), arg1 >>> 0, arg2 >>> 0);\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_randomFillSync_5c9c955aa56b6049 = function() { return handleError(function (arg0, arg1) {\n getObject(arg0).randomFillSync(takeObject(arg1));\n }, arguments) };\n imports.wbg.__wbg_subarray_a1f73cd4b5b42fe1 = function(arg0, arg1, arg2) {\n const ret = getObject(arg0).subarray(arg1 >>> 0, arg2 >>> 0);\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_getRandomValues_3aa56aa6edec874c = function() { return handleError(function (arg0, arg1) {\n getObject(arg0).getRandomValues(getObject(arg1));\n }, arguments) };\n imports.wbg.__wbg_set_a47bac70306a19a7 = function(arg0, arg1, arg2) {\n getObject(arg0).set(getObject(arg1), arg2 >>> 0);\n };\n imports.wbg.__wbg_crypto_1d1f22824a6a080c = function(arg0) {\n const ret = getObject(arg0).crypto;\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_process_4a72847cc503995b = function(arg0) {\n const ret = getObject(arg0).process;\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_versions_f686565e586dd935 = function(arg0) {\n const ret = getObject(arg0).versions;\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_node_104a2ff8d6ea03a2 = function(arg0) {\n const ret = getObject(arg0).node;\n return addHeapObject(ret);\n };\n imports.wbg.__wbindgen_is_string = function(arg0) {\n const ret = typeof(getObject(arg0)) === 'string';\n return ret;\n };\n imports.wbg.__wbg_require_cca90b1a94a0255b = function() { return handleError(function () {\n const ret = module.require;\n return addHeapObject(ret);\n }, arguments) };\n imports.wbg.__wbg_msCrypto_eb05e62b530a1508 = function(arg0) {\n const ret = getObject(arg0).msCrypto;\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_newwithlength_e9b4878cebadb3d3 = function(arg0) {\n const ret = new Uint8Array(arg0 >>> 0);\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_length_cd7af8117672b8b8 = function(arg0) {\n const ret = getObject(arg0).length;\n return ret;\n };\n imports.wbg.__wbg_get_bd8e338fbd5f5cc8 = function(arg0, arg1) {\n const ret = getObject(arg0)[arg1 >>> 0];\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_self_ce0dbfc45cf2f5be = function() { return handleError(function () {\n const ret = self.self;\n return addHeapObject(ret);\n }, arguments) };\n imports.wbg.__wbg_window_c6fb939a7f436783 = function() { return handleError(function () {\n const ret = window.window;\n return addHeapObject(ret);\n }, arguments) };\n imports.wbg.__wbg_globalThis_d1e6af4856ba331b = function() { return handleError(function () {\n const ret = globalThis.globalThis;\n return addHeapObject(ret);\n }, arguments) };\n imports.wbg.__wbg_global_207b558942527489 = function() { return handleError(function () {\n const ret = global.global;\n return addHeapObject(ret);\n }, arguments) };\n imports.wbg.__wbindgen_is_undefined = function(arg0) {\n const ret = getObject(arg0) === undefined;\n return ret;\n };\n imports.wbg.__wbg_newnoargs_e258087cd0daa0ea = function(arg0, arg1) {\n const ret = new Function(getStringFromWasm0(arg0, arg1));\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_has_0af94d20077affa2 = function() { return handleError(function (arg0, arg1) {\n const ret = Reflect.has(getObject(arg0), getObject(arg1));\n return ret;\n }, arguments) };\n imports.wbg.__wbg_fetch_bc7c8e27076a5c84 = function(arg0) {\n const ret = fetch(getObject(arg0));\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_fetch_921fad6ef9e883dd = function(arg0, arg1) {\n const ret = getObject(arg0).fetch(getObject(arg1));\n return addHeapObject(ret);\n };\n imports.wbg.__wbindgen_debug_string = function(arg0, arg1) {\n const ret = debugString(getObject(arg1));\n const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len1 = WASM_VECTOR_LEN;\n getInt32Memory0()[arg0 / 4 + 1] = len1;\n getInt32Memory0()[arg0 / 4 + 0] = ptr1;\n };\n imports.wbg.__wbindgen_throw = function(arg0, arg1) {\n throw new Error(getStringFromWasm0(arg0, arg1));\n };\n imports.wbg.__wbindgen_rethrow = function(arg0) {\n throw takeObject(arg0);\n };\n imports.wbg.__wbg_then_a73caa9a87991566 = function(arg0, arg1, arg2) {\n const ret = getObject(arg0).then(getObject(arg1), getObject(arg2));\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_then_0c86a60e8fcfe9f6 = function(arg0, arg1) {\n const ret = getObject(arg0).then(getObject(arg1));\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_queueMicrotask_481971b0d87f3dd4 = function(arg0) {\n queueMicrotask(getObject(arg0));\n };\n imports.wbg.__wbg_queueMicrotask_3cbae2ec6b6cd3d6 = function(arg0) {\n const ret = getObject(arg0).queueMicrotask;\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_resolve_b0083a7967828ec8 = function(arg0) {\n const ret = Promise.resolve(getObject(arg0));\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_waitAsync_5d743fc9058ba01a = function() {\n const ret = Atomics.waitAsync;\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_new_8cccba86b0f574cb = function(arg0) {\n const ret = new Int32Array(getObject(arg0));\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_waitAsync_46d5c36955b71a79 = function(arg0, arg1, arg2) {\n const ret = Atomics.waitAsync(getObject(arg0), arg1, arg2);\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_async_19c0400d97cc72fe = function(arg0) {\n const ret = getObject(arg0).async;\n return ret;\n };\n imports.wbg.__wbg_value_571d60108110e917 = function(arg0) {\n const ret = getObject(arg0).value;\n return addHeapObject(ret);\n };\n imports.wbg.__wbindgen_link_fc1eedd35dc7e0a6 = function(arg0) {\n const ret = \"data:application/javascript,\" + encodeURIComponent(`onmessage = function (ev) {\n let [ia, index, value] = ev.data;\n ia = new Int32Array(ia.buffer);\n let result = Atomics.wait(ia, index, value);\n postMessage(result);\n };\n `);\n const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len1 = WASM_VECTOR_LEN;\n getInt32Memory0()[arg0 / 4 + 1] = len1;\n getInt32Memory0()[arg0 / 4 + 0] = ptr1;\n };\n imports.wbg.__wbg_new_d1187ae36d662ef9 = function() { return handleError(function (arg0, arg1) {\n const ret = new Worker(getStringFromWasm0(arg0, arg1));\n return addHeapObject(ret);\n }, arguments) };\n imports.wbg.__wbg_setonmessage_503809e5bb51bd33 = function(arg0, arg1) {\n getObject(arg0).onmessage = getObject(arg1);\n };\n imports.wbg.__wbg_of_6a70eed8d41f469c = function(arg0, arg1, arg2) {\n const ret = Array.of(getObject(arg0), getObject(arg1), getObject(arg2));\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_postMessage_7380d10e8b8269df = function() { return handleError(function (arg0, arg1) {\n getObject(arg0).postMessage(getObject(arg1));\n }, arguments) };\n imports.wbg.__wbg_data_3ce7c145ca4fbcdc = function(arg0) {\n const ret = getObject(arg0).data;\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_newwithstrandinit_3fd6fba4083ff2d0 = function() { return handleError(function (arg0, arg1, arg2) {\n const ret = new Request(getStringFromWasm0(arg0, arg1), getObject(arg2));\n return addHeapObject(ret);\n }, arguments) };\n imports.wbg.__wbg_responseText_c67ed2d48db10769 = function() { return handleError(function (arg0, arg1) {\n const ret = getObject(arg1).responseText;\n var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n var len1 = WASM_VECTOR_LEN;\n getInt32Memory0()[arg0 / 4 + 1] = len1;\n getInt32Memory0()[arg0 / 4 + 0] = ptr1;\n }, arguments) };\n imports.wbg.__wbindgen_closure_wrapper5837 = function(arg0, arg1, arg2) {\n const ret = makeMutClosure(arg0, arg1, 538, __wbg_adapter_34);\n return addHeapObject(ret);\n };\n imports.wbg.__wbindgen_closure_wrapper5862 = function(arg0, arg1, arg2) {\n const ret = makeMutClosure(arg0, arg1, 538, __wbg_adapter_34);\n return addHeapObject(ret);\n };\n\n return imports;\n}\n\nfunction __wbg_init_memory(imports, maybe_memory) {\n imports.wbg.memory = maybe_memory || new WebAssembly.Memory({initial:25,maximum:65536,shared:true});\n}\n\nfunction __wbg_finalize_init(instance, module) {\n wasm = instance.exports;\n __wbg_init.__wbindgen_wasm_module = module;\n cachedBigInt64Memory0 = null;\n cachedInt32Memory0 = null;\n cachedUint8Memory0 = null;\n\n wasm.__wbindgen_start();\n return wasm;\n}\n\nfunction initSync(module, maybe_memory) {\n if (wasm !== undefined) return wasm;\n\n const imports = __wbg_get_imports();\n\n __wbg_init_memory(imports, maybe_memory);\n\n if (!(module instanceof WebAssembly.Module)) {\n module = new WebAssembly.Module(module);\n }\n\n const instance = new WebAssembly.Instance(module, imports);\n\n return __wbg_finalize_init(instance, module);\n}\n\nasync function __wbg_init(input, maybe_memory) {\n if (wasm !== undefined) return wasm;\n\n\n const imports = __wbg_get_imports();\n\n if (typeof input === 'string' || (typeof Request === 'function' && input instanceof Request) || (typeof URL === 'function' && input instanceof URL)) {\n input = fetch(input);\n }\n\n __wbg_init_memory(imports, maybe_memory);\n\n const { instance, module } = await __wbg_load(await input, imports);\n\n return __wbg_finalize_init(instance, module);\n}\n\nvar exports = /*#__PURE__*/Object.freeze({\n __proto__: null,\n Address: Address,\n Execution: Execution,\n ExecutionResponse: ExecutionResponse,\n Field: Field,\n KeyPair: KeyPair,\n Metadata: Metadata,\n OfflineQuery: OfflineQuery,\n PrivateKey: PrivateKey,\n PrivateKeyCiphertext: PrivateKeyCiphertext,\n Program: Program,\n ProgramManager: ProgramManager,\n ProvingKey: ProvingKey,\n RecordCiphertext: RecordCiphertext,\n RecordPlaintext: RecordPlaintext,\n Signature: Signature,\n Transaction: Transaction,\n VerifyingKey: VerifyingKey,\n ViewKey: ViewKey,\n default: __wbg_init,\n initSync: initSync,\n initThreadPool: initThreadPool,\n runRayonThread: runRayonThread,\n verifyFunctionExecution: verifyFunctionExecution\n});\n\nconst wasm_path = \"assets/aleo_wasm.wasm\";\n\n \n var Cargo = async (opt = {}) => {\n let {importHook, serverPath, initializeHook} = opt;\n\n let final_path = wasm_path;\n\n if (serverPath != null) {\n final_path = serverPath + /[^\\/\\\\]*$/.exec(final_path)[0];\n }\n\n if (importHook != null) {\n final_path = importHook(final_path);\n }\n\n if (initializeHook != null) {\n await initializeHook(__wbg_init, final_path);\n\n } else {\n await __wbg_init(final_path);\n }\n\n return exports;\n };\n\nexport { Cargo as default };\n//# sourceMappingURL=wasm.js.map\n","import wasm from \"../dist/wasm.js\";\n\nconst {\n initThreadPool: wasmInitThreadPool,\n Address,\n Execution,\n ExecutionResponse,\n Field,\n Metadata,\n OfflineQuery,\n Private,\n PrivateKey,\n PrivateKeyCiphertext,\n Program,\n ProvingKey,\n RecordCiphertext,\n RecordPlaintext,\n ProgramManager,\n Signature,\n Transaction,\n ViewKey,\n VerifyingKey,\n verifyFunctionExecution,\n} = await wasm({\n importHook: () => {\n return new URL(\"assets/aleo_wasm.wasm\", import.meta.url);\n },\n});\n\nasync function initThreadPool(threads) {\n if (threads == null) {\n threads = navigator.hardwareConcurrency;\n }\n\n console.info(`Spawning ${threads} threads`);\n\n await wasmInitThreadPool(new URL(\"worker.js\", import.meta.url), threads);\n}\n\nexport {\n initThreadPool,\n Address,\n Execution,\n ExecutionResponse,\n Field,\n Metadata,\n OfflineQuery,\n PrivateKey,\n PrivateKeyCiphertext,\n Program,\n ProvingKey,\n RecordCiphertext,\n RecordPlaintext,\n ProgramManager,\n Signature,\n Transaction,\n ViewKey,\n VerifyingKey,\n verifyFunctionExecution,\n};\n"],"names":["spawnWorker","url","module","memory","address","Promise","resolve","worker","Worker","type","addEventListener","event","setTimeout","unref","capture","once","postMessage","wasm","heap","Array","fill","undefined","getObject","idx","push","heap_next","length","dropObject","takeObject","ret","cachedTextDecoder","TextDecoder","ignoreBOM","fatal","decode","Error","cachedUint8Memory0","getUint8Memory0","buffer","Uint8Array","getStringFromWasm0","ptr","len","slice","addHeapObject","obj","WASM_VECTOR_LEN","cachedTextEncoder","TextEncoder","encode","encodeString","arg","view","buf","set","read","written","passStringToWasm0","malloc","realloc","subarray","mem","offset","code","charCodeAt","isLikeNone","x","cachedInt32Memory0","getInt32Memory0","Int32Array","debugString","val","description","name","isArray","debug","i","builtInMatches","exec","toString","call","className","JSON","stringify","_","message","stack","CLOSURE_DTORS","FinalizationRegistry","register","unregister","state","__wbindgen_export_3","get","dtor","a","b","makeMutClosure","arg0","arg1","f","cnt","real","args","original","__wbg_adapter_34","arg2","_dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h467700a9696faab3","_assertClass","instance","klass","passArray8ToWasm0","verifyFunctionExecution$1","execution","verifying_key","program","function_id","retptr","__wbindgen_add_to_stack_pointer","Execution$1","VerifyingKey$1","Program$1","ptr0","__wbindgen_malloc","__wbindgen_realloc","len0","verifyFunctionExecution","__wbg_ptr","r0","r1","cachedBigInt64Memory0","getBigInt64Memory0","BigInt64Array","getArrayU8FromWasm0","runRayonThread","receiver","initThreadPool$1","num_threads","initThreadPool","handleError","apply","this","e","__wbindgen_exn_store","__wbg_adapter_281","arg3","wasm_bindgen__convert__closures__invoke2_mut__h381bef3cd886b4c7","AddressFinalization","__wbg_address_free","Address","__wrap","Object","create","prototype","__destroy_into_raw","free","from_private_key","private_key","PrivateKey$1","address_from_private_key","from_view_key","view_key","ViewKey$1","address_from_view_key","from_string","address_from_string","to_string","deferred1_0","deferred1_1","address_to_string","__wbindgen_free","verify","signature","Signature$1","address_verify","ExecutionFinalization","__wbg_execution_free","Execution","execution_toString","fromString","execution_fromString","ExecutionResponseFinalization","__wbg_executionresponse_free","ExecutionResponse","getOutputs","executionresponse_getOutputs","getExecution","executionresponse_getExecution","getKeys","executionresponse_getKeys","KeyPair","getProvingKey","executionresponse_getProvingKey","ProvingKey$1","getVerifyingKey","executionresponse_getVerifyingKey","getFunctionId","executionresponse_getFunctionId","getProgram","executionresponse_getProgram","FieldFinalization","__wbg_field_free","Field","field_toString","field","field_fromString","KeyPairFinalization","__wbg_keypair_free","constructor","proving_key","ptr1","keypair_new","provingKey","keypair_provingKey","verifyingKey","keypair_verifyingKey","MetadataFinalization","__wbg_metadata_free","Metadata","__wbg_get_metadata_name","__wbg_set_metadata_name","locator","__wbg_get_metadata_locator","__wbg_set_metadata_locator","prover","__wbg_get_metadata_prover","__wbg_set_metadata_prover","verifier","__wbg_get_metadata_verifier","__wbg_set_metadata_verifier","__wbg_get_metadata_verifyingKey","__wbg_set_metadata_verifyingKey","baseUrl","metadata_baseUrl","bond_public","metadata_bond_public","bond_validator","metadata_bond_validator","claim_unbond_public","metadata_claim_unbond_public","fee_private","metadata_fee_private","fee_public","metadata_fee_public","inclusion","metadata_inclusion","join","metadata_join","set_validator_state","metadata_set_validator_state","split","metadata_split","transfer_private","metadata_transfer_private","transfer_private_to_public","metadata_transfer_private_to_public","transfer_public","metadata_transfer_public","transfer_public_as_signer","metadata_transfer_public_as_signer","transfer_public_to_private","metadata_transfer_public_to_private","unbond_public","metadata_unbond_public","OfflineQueryFinalization","__wbg_offlinequery_free","OfflineQuery","state_root","offlinequery_new","addStatePath","commitment","state_path","len1","offlinequery_addStatePath","offlinequery_toString","s","offlinequery_fromString","PrivateKeyFinalization","__wbg_privatekey_free","PrivateKey","privatekey_new","from_seed_unchecked","seed","privatekey_from_seed_unchecked","privatekey_from_string","privatekey_to_string","to_view_key","privatekey_to_view_key","to_address","privatekey_to_address","Address$1","sign","privatekey_sign","newEncrypted","secret","privatekey_newEncrypted","PrivateKeyCiphertext$1","toCiphertext","privatekey_toCiphertext","fromPrivateKeyCiphertext","ciphertext","privatekey_fromPrivateKeyCiphertext","PrivateKeyCiphertextFinalization","__wbg_privatekeyciphertext_free","PrivateKeyCiphertext","encryptPrivateKey","decryptToPrivateKey","privatekeyciphertext_decryptToPrivateKey","privatekeyciphertext_toString","privatekeyciphertext_fromString","ProgramFinalization","__wbg_program_free","Program","program_fromString","program_toString","hasFunction","function_name","program_hasFunction","getFunctions","program_getFunctions","getFunctionInputs","program_getFunctionInputs","getMappings","program_getMappings","getRecordMembers","record_name","program_getRecordMembers","getStructMembers","struct_name","program_getStructMembers","getCreditsProgram","program_getCreditsProgram","id","program_id","program_address","isEqual","other","program_isEqual","getImports","program_getImports","ProgramManagerFinalization","__wbg_programmanager_free","buildDeploymentTransaction","fee_credits","fee_record","imports","fee_proving_key","fee_verifying_key","offline_query","RecordPlaintext$1","ptr2","len2","ptr3","ptr4","ptr5","OfflineQuery$1","programmanager_buildDeploymentTransaction","estimateDeploymentFee","programmanager_estimateDeploymentFee","estimateProgramNameCost","programmanager_estimateProgramNameCost","r2","BigInt","asUintN","executeFunctionOffline","_function","inputs","prove_execution","cache","len4","programmanager_executeFunctionOffline","buildExecutionTransaction","len3","ptr6","ptr7","ptr8","programmanager_buildExecutionTransaction","estimateExecutionFee","programmanager_estimateExecutionFee","estimateFinalizeFee","programmanager_estimateFinalizeFee","buildJoinTransaction","record_1","record_2","join_proving_key","join_verifying_key","programmanager_buildJoinTransaction","buildSplitTransaction","split_amount","amount_record","split_proving_key","split_verifying_key","programmanager_buildSplitTransaction","buildTransferTransaction","amount_credits","recipient","transfer_type","transfer_proving_key","transfer_verifying_key","ptr9","programmanager_buildTransferTransaction","synthesizeKeyPair","programmanager_synthesizeKeyPair","ProvingKeyFinalization","__wbg_provingkey_free","ProvingKey","isBondPublicProver","provingkey_isBondPublicProver","isBondValidatorProver","provingkey_isBondValidatorProver","isClaimUnbondPublicProver","provingkey_isClaimUnbondPublicProver","isFeePrivateProver","provingkey_isFeePrivateProver","isFeePublicProver","provingkey_isFeePublicProver","isInclusionProver","provingkey_isInclusionProver","isJoinProver","provingkey_isJoinProver","isSetValidatorStateProver","provingkey_isSetValidatorStateProver","isSplitProver","provingkey_isSplitProver","isTransferPrivateProver","provingkey_isTransferPrivateProver","isTransferPrivateToPublicProver","provingkey_isTransferPrivateToPublicProver","isTransferPublicProver","provingkey_isTransferPublicProver","isTransferPublicAsSignerProver","provingkey_isTransferPublicAsSignerProver","isTransferPublicToPrivateProver","provingkey_isTransferPublicToPrivateProver","isUnbondPublicProver","provingkey_isUnbondPublicProver","checksum","provingkey_checksum","copy","provingkey_copy","fromBytes","bytes","provingkey_fromBytes","string","provingkey_fromString","toBytes","provingkey_toBytes","v1","provingkey_toString","RecordCiphertextFinalization","__wbg_recordciphertext_free","RecordCiphertext","record","recordciphertext_fromString","recordciphertext_toString","decrypt","recordciphertext_decrypt","isOwner","recordciphertext_isOwner","RecordPlaintextFinalization","__wbg_recordplaintext_free","RecordPlaintext","recordplaintext_commitment","Field$1","recordplaintext_fromString","recordplaintext_toString","microcredits","recordplaintext_microcredits","nonce","recordplaintext_nonce","serialNumberString","deferred4_0","deferred4_1","recordplaintext_serialNumberString","r3","SignatureFinalization","__wbg_signature_free","Signature","signature_verify","signature_from_string","signature_to_string","TransactionFinalization","__wbg_transaction_free","Transaction","transaction","transaction_fromString","transaction_toString","transactionId","transaction_transactionId","transactionType","transaction_transactionType","VerifyingKeyFinalization","__wbg_verifyingkey_free","VerifyingKey","bondPublicVerifier","verifyingkey_bondPublicVerifier","bondValidatorVerifier","verifyingkey_bondValidatorVerifier","claimUnbondPublicVerifier","verifyingkey_claimUnbondPublicVerifier","feePrivateVerifier","verifyingkey_feePrivateVerifier","feePublicVerifier","verifyingkey_feePublicVerifier","inclusionVerifier","verifyingkey_inclusionVerifier","joinVerifier","verifyingkey_joinVerifier","setValidatorStateVerifier","verifyingkey_setValidatorStateVerifier","splitVerifier","verifyingkey_splitVerifier","transferPrivateVerifier","verifyingkey_transferPrivateVerifier","transferPrivateToPublicVerifier","verifyingkey_transferPrivateToPublicVerifier","transferPublicVerifier","verifyingkey_transferPublicVerifier","transferPublicAsSignerVerifier","verifyingkey_transferPublicAsSignerVerifier","transferPublicToPrivateVerifier","verifyingkey_transferPublicToPrivateVerifier","unbondPublicVerifier","verifyingkey_unbondPublicVerifier","isBondPublicVerifier","verifyingkey_isBondPublicVerifier","isBondValidatorVerifier","verifyingkey_isBondValidatorVerifier","isClaimUnbondPublicVerifier","verifyingkey_isClaimUnbondPublicVerifier","isFeePrivateVerifier","verifyingkey_isFeePrivateVerifier","isFeePublicVerifier","verifyingkey_isFeePublicVerifier","isInclusionVerifier","verifyingkey_isInclusionVerifier","isJoinVerifier","verifyingkey_isJoinVerifier","isSetValidatorStateVerifier","verifyingkey_isSetValidatorStateVerifier","isSplitVerifier","verifyingkey_isSplitVerifier","isTransferPrivateVerifier","verifyingkey_isTransferPrivateVerifier","isTransferPrivateToPublicVerifier","verifyingkey_isTransferPrivateToPublicVerifier","isTransferPublicVerifier","verifyingkey_isTransferPublicVerifier","isTransferPublicAsSignerVerifier","verifyingkey_isTransferPublicAsSignerVerifier","isTransferPublicToPrivateVerifier","verifyingkey_isTransferPublicToPrivateVerifier","isUnbondPublicVerifier","verifyingkey_isUnbondPublicVerifier","verifyingkey_checksum","verifyingkey_copy","verifyingkey_fromBytes","verifyingkey_fromString","verifyingkey_toBytes","verifyingkey_toString","ViewKeyFinalization","__wbg_viewkey_free","ViewKey","viewkey_from_string","viewkey_to_string","deferred3_0","deferred3_1","viewkey_decrypt","async","__wbg_load","Response","WebAssembly","instantiateStreaming","headers","console","warn","arrayBuffer","instantiate","Instance","__wbg_get_imports","wbg","__wbindgen_object_drop_ref","__wbg_new_71801a555ad9f2aa","XMLHttpRequest","arguments","__wbg_overrideMimeType_ee9c51919ceb418b","overrideMimeType","__wbg_open_c9eb0cf2c9d95679","arg4","arg5","open","__wbg_send_80d29985093c1ec5","send","__wbg_response_7c2e2759084f7279","response","__wbg_status_d485fb5a478426fb","status","__wbg_new_72fb9a18b5ae2624","__wbindgen_string_new","__wbg_set_1f9b04f170055d33","Reflect","__wbg_new_ab6fd82b10560829","Headers","__wbindgen_object_clone_ref","__wbg_new_0d76b0581eca6298","AbortController","__wbg_signal_a61f78a3478fd9bc","signal","__wbg_append_7bfcb4937d1d5e29","append","__wbg_instanceof_Response_849eb93e75734b6e","result","__wbg_status_61a01141acd3cf74","__wbg_url_5f6dc4009ac5f99d","__wbg_headers_9620bfada380764a","__wbg_iterator_2cee6dadfd956dfa","Symbol","iterator","__wbg_get_e3c254076557e348","__wbindgen_is_function","__wbg_call_27c0f87801dedf93","__wbindgen_is_object","__wbg_next_40fc327bfc8770e6","next","__wbg_next_196c84450b364254","__wbg_done_298b57d23c0fc80c","done","__wbg_value_d93c65011f51a456","value","__wbg_abort_2aa7521d5690750e","abort","__wbg_stringify_8887fe74e1c50d81","__wbindgen_string_get","__wbg_log_0159ca40cddf5b15","log","__wbindgen_bigint_from_u64","__wbg_call_b3ca7c6051f9bec1","__wbg_transaction_new","Transaction$1","__wbg_keypair_new","__wbindgen_module","__wbg_init","__wbindgen_wasm_module","__wbindgen_memory","__wbg_spawnWorker_f6acaddb2e29dc4a","__wbg_executionresponse_new","ExecutionResponse$1","__wbg_newwithlength_66ae46612e7f0234","__wbg_set_d4638f722068f043","__wbindgen_cb_drop","__wbg_new_16b304a2cfa7ff4a","__wbg_push_a5b05aedc7234f9f","__wbg_arrayBuffer_29931d52c7206b02","__wbg_new_63b92bc8671ed464","__wbg_length_c20a40f15020d68a","__wbg_new_81740750da40724f","state0","cb0","__wbindgen_number_new","__wbg_new_abda76e883ba8a5f","__wbg_stack_658279fe44541cf6","__wbg_error_f851667af71bcfc6","deferred0_0","deferred0_1","error","__wbg_buffer_12d079cc21e14bdb","__wbg_newwithbyteoffsetandlength_aa4a17c33a06e5cb","__wbg_randomFillSync_5c9c955aa56b6049","randomFillSync","__wbg_subarray_a1f73cd4b5b42fe1","__wbg_getRandomValues_3aa56aa6edec874c","getRandomValues","__wbg_set_a47bac70306a19a7","__wbg_crypto_1d1f22824a6a080c","crypto","__wbg_process_4a72847cc503995b","process","__wbg_versions_f686565e586dd935","versions","__wbg_node_104a2ff8d6ea03a2","node","__wbindgen_is_string","__wbg_require_cca90b1a94a0255b","require","__wbg_msCrypto_eb05e62b530a1508","msCrypto","__wbg_newwithlength_e9b4878cebadb3d3","__wbg_length_cd7af8117672b8b8","__wbg_get_bd8e338fbd5f5cc8","__wbg_self_ce0dbfc45cf2f5be","self","__wbg_window_c6fb939a7f436783","window","__wbg_globalThis_d1e6af4856ba331b","globalThis","__wbg_global_207b558942527489","global","__wbindgen_is_undefined","__wbg_newnoargs_e258087cd0daa0ea","Function","__wbg_has_0af94d20077affa2","has","__wbg_fetch_bc7c8e27076a5c84","fetch","__wbg_fetch_921fad6ef9e883dd","__wbindgen_debug_string","__wbindgen_throw","__wbindgen_rethrow","__wbg_then_a73caa9a87991566","then","__wbg_then_0c86a60e8fcfe9f6","__wbg_queueMicrotask_481971b0d87f3dd4","queueMicrotask","__wbg_queueMicrotask_3cbae2ec6b6cd3d6","__wbg_resolve_b0083a7967828ec8","__wbg_waitAsync_5d743fc9058ba01a","Atomics","waitAsync","__wbg_new_8cccba86b0f574cb","__wbg_waitAsync_46d5c36955b71a79","__wbg_async_19c0400d97cc72fe","__wbg_value_571d60108110e917","__wbindgen_link_fc1eedd35dc7e0a6","encodeURIComponent","__wbg_new_d1187ae36d662ef9","__wbg_setonmessage_503809e5bb51bd33","onmessage","__wbg_of_6a70eed8d41f469c","of","__wbg_postMessage_7380d10e8b8269df","__wbg_data_3ce7c145ca4fbcdc","data","__wbg_newwithstrandinit_3fd6fba4083ff2d0","Request","__wbg_responseText_c67ed2d48db10769","responseText","__wbindgen_closure_wrapper5837","__wbindgen_closure_wrapper5862","__wbg_init_memory","maybe_memory","Memory","initial","maximum","shared","__wbg_finalize_init","exports","__wbindgen_start","initSync","Module","input","URL","freeze","__proto__","Metadata$1","ProgramManager","ProgramManager$1","RecordCiphertext$1","default","wasm_path","wasmInitThreadPool","Private","opt","importHook","serverPath","initializeHook","final_path","Cargo","threads","navigator","hardwareConcurrency","info"],"sourceRoot":""} \ No newline at end of file diff --git a/58342153fc9a001d7976.wasm b/8cbe7e9b06e560a22f36.wasm similarity index 71% rename from 58342153fc9a001d7976.wasm rename to 8cbe7e9b06e560a22f36.wasm index d98df8e58..77b84d3a8 100644 Binary files a/58342153fc9a001d7976.wasm and b/8cbe7e9b06e560a22f36.wasm differ diff --git a/907.bundle.js b/907.bundle.js deleted file mode 100644 index 6fadbbe1d..000000000 --- a/907.bundle.js +++ /dev/null @@ -1,3 +0,0 @@ -/*! For license information please see 907.bundle.js.LICENSE.txt */ -(self.webpackChunkaleo_website=self.webpackChunkaleo_website||[]).push([[907,495,876],{720:(e,r,t)=>{t.d(r,{p:()=>u});const i=Symbol("Comlink.proxy"),n=Symbol("Comlink.endpoint"),a=Symbol("Comlink.releaseProxy"),o=Symbol("Comlink.finalizer"),s=Symbol("Comlink.thrown"),c=e=>"object"==typeof e&&null!==e||"function"==typeof e,h=new Map([["proxy",{canHandle:e=>c(e)&&e[i],serialize(e){const{port1:r,port2:t}=new MessageChannel;return u(e,r),[t,[t]]},deserialize(e){return e.start(),g(e,[],r);var r}}],["throw",{canHandle:e=>c(e)&&s in e,serialize({value:e}){let r;return r=e instanceof Error?{isError:!0,value:{message:e.message,name:e.name,stack:e.stack}}:{isError:!1,value:e},[r,[]]},deserialize(e){if(e.isError)throw Object.assign(new Error(e.value.message),e.value);throw e.value}}]]);function u(e,r=globalThis,t=["*"]){r.addEventListener("message",(function n(a){if(!a||!a.data)return;if(!function(e,r){for(const t of e){if(r===t||"*"===t)return!0;if(t instanceof RegExp&&t.test(r))return!0}return!1}(t,a.origin))return void console.warn(`Invalid origin '${a.origin}' for comlink proxy`);const{id:c,type:h,path:f}=Object.assign({path:[]},a.data),d=(a.data.argumentList||[]).map(b);let y;try{const r=f.slice(0,-1).reduce(((e,r)=>e[r]),e),t=f.reduce(((e,r)=>e[r]),e);switch(h){case"GET":y=t;break;case"SET":r[f.slice(-1)[0]]=b(a.data.value),y=!0;break;case"APPLY":y=t.apply(r,d);break;case"CONSTRUCT":y=function(e){return Object.assign(e,{[i]:!0})}(new t(...d));break;case"ENDPOINT":{const{port1:r,port2:t}=new MessageChannel;u(e,t),y=function(e,r){return w.set(e,r),e}(r,[r])}break;case"RELEASE":y=void 0;break;default:return}}catch(e){y={value:e,[s]:0}}Promise.resolve(y).catch((e=>({value:e,[s]:0}))).then((t=>{const[i,a]=m(t);r.postMessage(Object.assign(Object.assign({},i),{id:c}),a),"RELEASE"===h&&(r.removeEventListener("message",n),l(r),o in e&&"function"==typeof e[o]&&e[o]())})).catch((e=>{const[t,i]=m({value:new TypeError("Unserializable return value"),[s]:0});r.postMessage(Object.assign(Object.assign({},t),{id:c}),i)}))})),r.start&&r.start()}function l(e){(function(e){return"MessagePort"===e.constructor.name})(e)&&e.close()}function f(e){if(e)throw new Error("Proxy has been released and is not useable")}function d(e){return P(e,{type:"RELEASE"}).then((()=>{l(e)}))}const y=new WeakMap,p="FinalizationRegistry"in globalThis&&new FinalizationRegistry((e=>{const r=(y.get(e)||0)-1;y.set(e,r),0===r&&d(e)}));function g(e,r=[],t=function(){}){let i=!1;const o=new Proxy(t,{get(t,n){if(f(i),n===a)return()=>{!function(e){p&&p.unregister(e)}(o),d(e),i=!0};if("then"===n){if(0===r.length)return{then:()=>o};const t=P(e,{type:"GET",path:r.map((e=>e.toString()))}).then(b);return t.then.bind(t)}return g(e,[...r,n])},set(t,n,a){f(i);const[o,s]=m(a);return P(e,{type:"SET",path:[...r,n].map((e=>e.toString())),value:o},s).then(b)},apply(t,a,o){f(i);const s=r[r.length-1];if(s===n)return P(e,{type:"ENDPOINT"}).then(b);if("bind"===s)return g(e,r.slice(0,-1));const[c,h]=v(o);return P(e,{type:"APPLY",path:r.map((e=>e.toString())),argumentList:c},h).then(b)},construct(t,n){f(i);const[a,o]=v(n);return P(e,{type:"CONSTRUCT",path:r.map((e=>e.toString())),argumentList:a},o).then(b)}});return function(e,r){const t=(y.get(r)||0)+1;y.set(r,t),p&&p.register(e,r,e)}(o,e),o}function v(e){const r=e.map(m);return[r.map((e=>e[0])),(t=r.map((e=>e[1])),Array.prototype.concat.apply([],t))];var t}const w=new WeakMap;function m(e){for(const[r,t]of h)if(t.canHandle(e)){const[i,n]=t.serialize(e);return[{type:"HANDLER",name:r,value:i},n]}return[{type:"RAW",value:e},w.get(e)||[]]}function b(e){switch(e.type){case"HANDLER":return h.get(e.name).deserialize(e.value);case"RAW":return e.value}}function P(e,r,t){return new Promise((i=>{const n=new Array(4).fill(0).map((()=>Math.floor(Math.random()*Number.MAX_SAFE_INTEGER).toString(16))).join("-");e.addEventListener("message",(function r(t){t.data&&t.data.id&&t.data.id===n&&(e.removeEventListener("message",r),i(t.data))})),e.start&&e.start(),e.postMessage(Object.assign({id:n},r),t)}))}},495:(e,r,t)=>{t.a(e,(async(e,i)=>{try{t.d(r,{AleoKeyProvider:()=>u,AleoKeyProviderParams:()=>h,ProgramManager:()=>l});var n=t(877),a=e([n]);n=(a.then?(await a)():a)[0];async function o(e,r){const t=await fetch(e,r);if(!t.ok)throw new Error(t.status+" could not get URL "+e);return t}async function s(e,r){r.method="POST";const t=await fetch(e,r);if(!t.ok)throw new Error(t.status+" could not post URL "+e);return t}class c{host;headers;account;constructor(e,r){this.host=e+"/testnet",r&&r.headers?this.headers=r.headers:this.headers={"X-Aleo-SDK-Version":"0.6.12"}}setAccount(e){this.account=e}getAccount(){return this.account}setHost(e){this.host=e+"/testnet"}async fetchData(e="/"){try{const r=await o(this.host+e,{headers:this.headers});return await r.json()}catch(e){throw new Error("Error fetching data.")}}async findUnspentRecords(e,r,t,i,a,o){if(o=o||[],e<0)throw new Error("Start height must be greater than or equal to 0");const s=new Array;let c,h,u,l,f=0,d=BigInt(0);if(void 0===t){if(void 0===this.account)throw new Error("Private key must be specified in an argument to findOwnedRecords or set in the AleoNetworkClient");u=this.account._privateKey}else try{u=t instanceof n.ZD?t:n.ZD.from_string(t)}catch(e){throw new Error("Error parsing private key provided.")}const y=u.to_view_key();try{const e=await this.getLatestHeight();if("number"!=typeof e)throw new Error("Error fetching latest block height.");l=e}catch(e){throw new Error("Error fetching latest block height.")}if(h="number"==typeof r&&r<=l?r:l,e>h)throw new Error("Start height must be less than or equal to end height.");for(;h>e;){c=h-50,c=BigInt(a))))return s;if(void 0!==i&&i.length>0){let e=0;if(r.microcredits()>i[e]){if(e+=1,s.push(r),"number"==typeof a&&(d+=r.microcredits(),d>=BigInt(a)))return s;if(s.length>=i.length)return s}}}}}catch(e){}}}}}}}catch(e){if(console.warn("Error fetching blocks in range: "+c.toString()+"-"+h.toString()),console.warn("Error: ",e),f+=1,f>10)return console.warn("10 failures fetching records reached. Returning records fetched so far"),s}}return s}async getBlock(e){try{return await this.fetchData("/block/"+e)}catch(e){throw new Error("Error fetching block.")}}async getBlockRange(e,r){try{return await this.fetchData("/blocks?start="+e+"&end="+r)}catch(t){throw new Error("Error fetching blocks between "+e+" and "+r+".")}}async getDeploymentTransactionIDForProgram(e){e instanceof n.BP&&(e=e.toString());try{return(await this.fetchData("/find/transactionID/deployment/"+e)).replace('"',"")}catch(e){throw new Error("Error fetching deployment transaction for program.")}}async getDeploymentTransactionForProgram(e){try{const r=await this.getDeploymentTransactionIDForProgram(e);return await this.getTransaction(r)}catch(e){throw new Error("Error fetching deployment transaction for program.")}}async getLatestBlock(){try{return await this.fetchData("/latest/block")}catch(e){throw new Error("Error fetching latest block.")}}async getLatestCommittee(){try{return await this.fetchData("/committee/latest")}catch(e){throw new Error("Error fetching latest block.")}}async getLatestHeight(){try{return await this.fetchData("/latest/height")}catch(e){throw new Error("Error fetching latest height.")}}async getProgram(e){try{return await this.fetchData("/program/"+e)}catch(e){throw new Error("Error fetching program")}}async getProgramObject(e){try{return n.BP.fromString(e)}catch(r){try{return n.BP.fromString(await this.getProgram(e))}catch(r){throw new Error(`${e} is neither a program name or a valid program`)}}}async getProgramImports(e){try{const r={},t=(e instanceof n.BP?e:await this.getProgramObject(e)).getImports();for(let e=0;e0&&!p)try{p=await this.networkClient.getProgramImports(r)}catch(e){throw E(`Error finding program imports. Network response: '${e}'. Please ensure you're connected to a valid Aleo network and the program is deployed to the network.`)}return await n.Ao.buildExecutionTransaction(v,y,t,o,i,l,this.host,p,f,d,w,m,u)}async execute(e){const r=await this.buildExecutionTransaction(e);return await this.networkClient.submitTransaction(r)}async run(e,r,t,i,a,o,s,c,h,u){let l=h;if(void 0===h&&void 0!==this.account&&(l=this.account.privateKey()),void 0===l)throw"No private key provided and no private key set in the ProgramManager";if(!s||!c)try{[s,c]=await this.keyProvider.functionKeys(o)}catch(e){console.log(`Function keys not found. Key finder response: '${e}'. The function keys will be synthesized`)}return console.log("Running program offline"),console.log("Proving key: ",s),console.log("Verifying key: ",c),n.Ao.executeFunctionOffline(l,e,r,t,i,!1,a,s,c,this.host,u)}async join(e,r,t,i,a,o,s,c){let h,u,l=s;if(void 0===s&&void 0!==this.account&&(l=this.account.privateKey()),void 0===l)throw"No private key provided and no private key set in the ProgramManager";try{h=i?await this.keyProvider.feePrivateKeys():await this.keyProvider.feePublicKeys(),u=await this.keyProvider.joinKeys()}catch(e){throw E(`Error finding fee keys. Key finder response: '${e}'. Please ensure your key provider is configured correctly.`)}const[f,d]=h,[y,p]=u;try{o=i?await this.getCreditsRecord(t,[],o,a):void 0}catch(e){throw E(`Error finding fee record. Record finder response: '${e}'. Please ensure you're connected to a valid Aleo network and a record with enough balance exists.`)}try{e=e instanceof n.ZF?e:n.ZF.fromString(e),r=r instanceof n.ZF?r:n.ZF.fromString(r)}catch(e){throw E("Records provided are not valid. Please ensure they are valid plaintext records.")}const g=await n.Ao.buildJoinTransaction(l,e,r,t,o,this.host,y,p,f,d,c);return await this.networkClient.submitTransaction(g)}async split(e,r,t,i){let a,o=t;if(void 0===o&&void 0!==this.account&&(o=this.account.privateKey()),void 0===o)throw"No private key provided and no private key set in the ProgramManager";try{a=await this.keyProvider.splitKeys()}catch(e){throw E(`Error finding fee keys. Key finder response: '${e}'. Please ensure your key provider is configured correctly.`)}const[s,c]=a;try{r=r instanceof n.ZF?r:n.ZF.fromString(r)}catch(e){throw E("Record provided is not valid. Please ensure it is a valid plaintext record.")}const h=await n.Ao.buildSplitTransaction(o,e,r,this.host,s,c,i);return await this.networkClient.submitTransaction(h)}async synthesizeKeys(e,r,t,i){let a,o=i;void 0===o&&(o=void 0!==this.account?this.account.privateKey():new n.ZD);try{a=await this.networkClient.getProgramImports(e);const i=await n.Ao.synthesizeKeyPair(o,e,r,t,a);return[i.provingKey(),i.verifyingKey()]}catch(e){throw E(`Could not synthesize keys - error ${e}. Please ensure the program is valid and the inputs are correct.`)}}async buildTransferTransaction(e,r,t,i,a,o,s,c,h,u){t=d(t);let l,y,p=h;if(void 0===p&&void 0!==this.account&&(p=this.account.privateKey()),void 0===p)throw"No private key provided and no private key set in the ProgramManager";try{l=a?await this.keyProvider.feePrivateKeys():await this.keyProvider.feePublicKeys(),y=await this.keyProvider.transferKeys(t)}catch(e){throw E(`Error finding fee keys. Key finder response: '${e}'. Please ensure your key provider is configured correctly.`)}const[g,v]=l,[w,m]=y;try{const e=[];f(t)?(s=await this.getCreditsRecord(i,[],s,o),e.push(s.nonce())):s=void 0,c=a?await this.getCreditsRecord(i,e,c,o):void 0}catch(e){throw E(`Error finding fee record. Record finder response: '${e}'. Please ensure you're connected to a valid Aleo network and a record with enough balance exists.`)}return await n.Ao.buildTransferTransaction(p,e,r,t,s,i,c,this.host,w,m,g,v,u)}async buildTransferPublicTransaction(e,r,t,i,n){return this.buildTransferTransaction(e,r,"public",t,!1,void 0,void 0,void 0,i,n)}async buildTransferPublicAsSignerTransaction(e,r,t,i,n){return this.buildTransferTransaction(e,r,"public",t,!1,void 0,void 0,void 0,i,n)}async transfer(e,r,t,i,n,a,o,s,c,h){const u=await this.buildTransferTransaction(e,r,t,i,n,a,o,s,c,h);return await this.networkClient.submitTransaction(u)}async buildBondPublicTransaction(e,r,t,i,n={}){const a=Math.trunc(1e6*i),{programName:o="credits.aleo",functionName:s="bond_public",fee:c=n.fee||.86,privateFee:u=!1,inputs:l=[e,r,t,`${a.toString()}u64`],keySearchParams:f=new h({proverUri:g.bond_public.prover,verifierUri:g.bond_public.verifier,cacheKey:"credits.aleo/bond_public"}),program:d=this.creditsProgram(),...y}=n,p={programName:o,functionName:s,fee:c,privateFee:u,inputs:l,keySearchParams:f,...y};return await this.buildExecutionTransaction(p)}async bondPublic(e,r,t,i,n={}){const a=await this.buildBondPublicTransaction(e,r,t,i,n);return await this.networkClient.submitTransaction(a)}async buildBondValidatorTransaction(e,r,t,i,n={}){const a=Math.trunc(1e6*t),o=Math.trunc(i),{programName:s="credits.aleo",functionName:c="bond_validator",fee:u=n.fee||.86,privateFee:l=!1,inputs:f=[e,r,`${a.toString()}u64`,`${o.toString()}u8`],keySearchParams:d=new h({proverUri:g.bond_validator.prover,verifierUri:g.bond_validator.verifier,cacheKey:"credits.aleo/bond_validator"}),program:y=this.creditsProgram(),...p}=n,v={programName:s,functionName:c,fee:u,privateFee:l,inputs:f,keySearchParams:d,...p};return await this.buildExecutionTransaction(v)}async bondValidator(e,r,t,i,n={}){const a=await this.buildBondValidatorTransaction(e,r,t,i,n);return await this.networkClient.submitTransaction(a)}async buildUnbondPublicTransaction(e,r,t={}){const i=Math.trunc(1e6*r),{programName:n="credits.aleo",functionName:a="unbond_public",fee:o=t.fee||1.3,privateFee:s=!1,inputs:c=[e,`${i.toString()}u64`],keySearchParams:u=new h({proverUri:g.unbond_public.prover,verifierUri:g.unbond_public.verifier,cacheKey:"credits.aleo/unbond_public"}),program:l=this.creditsProgram(),...f}=t,d={programName:n,functionName:a,fee:o,privateFee:s,inputs:c,keySearchParams:u,...f};return this.buildExecutionTransaction(d)}async unbondPublic(e,r,t={}){const i=await this.buildUnbondPublicTransaction(e,r,t);return await this.networkClient.submitTransaction(i)}async buildClaimUnbondPublicTransaction(e,r={}){const{programName:t="credits.aleo",functionName:i="claim_unbond_public",fee:n=r.fee||2,privateFee:a=!1,inputs:o=[e],keySearchParams:s=new h({proverUri:g.claim_unbond_public.prover,verifierUri:g.claim_unbond_public.verifier,cacheKey:"credits.aleo/claim_unbond_public"}),program:c=this.creditsProgram(),...u}=r,l={programName:t,functionName:i,fee:n,privateFee:a,inputs:o,keySearchParams:s,...u};return await this.buildExecutionTransaction(l)}async claimUnbondPublic(e,r={}){const t=await this.buildClaimUnbondPublicTransaction(e,r);return await this.networkClient.submitTransaction(t)}async buildSetValidatorStateTransaction(e,r={}){const{programName:t="credits.aleo",functionName:i="set_validator_state",fee:n=1,privateFee:a=!1,inputs:o=[e.toString()],keySearchParams:s=new h({proverUri:g.set_validator_state.prover,verifierUri:g.set_validator_state.verifier,cacheKey:"credits.aleo/set_validator_state"}),...c}=r,u={programName:t,functionName:i,fee:n,privateFee:a,inputs:o,keySearchParams:s,...c};return await this.execute(u)}async setValidatorState(e,r={}){const t=await this.buildSetValidatorStateTransaction(e,r);return this.networkClient.submitTransaction(t)}verifyExecution(e){try{const r=e.getExecution(),t=e.getFunctionId(),i=e.getProgram(),a=e.getVerifyingKey();return(0,n.Yc)(r,a,i,t)}catch(e){return console.warn("The execution was not found in the response, cannot verify the execution"),!1}}createProgramFromSource(e){return n.BP.fromString(e)}creditsProgram(){return n.BP.getCreditsProgram()}verifyProgram(e){try{return n.BP.fromString(e),!0}catch(e){return!1}}async getCreditsRecord(e,r,t,i){try{return t instanceof n.ZF?t:n.ZF.fromString(t)}catch(t){try{const t=this.recordProvider;return await t.findCreditsRecord(e,!0,r,i)}catch(e){throw E(`Error finding fee record. Record finder response: '${e}'. Please ensure you're connected to a valid Aleo network and a record with enough balance exists.`)}}}}function f(e){return v.has(e)}function d(e){return w.has(e)?e:E(`Invalid transfer type '${e}'. Valid transfer types are 'private', 'privateToPublic', 'public', and 'publicToPrivate'.`)}const y=n.OS.baseUrl();function p(e){const r=n.pF[e.verifyingKey];if(!r)throw new Error("Invalid method name: "+e.verifyingKey);return{name:e.name,locator:e.locator,prover:e.prover,verifier:e.verifier,verifyingKey:r}}const g={bond_public:p(n.OS.bond_public()),bond_validator:p(n.OS.bond_validator()),claim_unbond_public:p(n.OS.claim_unbond_public()),fee_private:p(n.OS.fee_private()),fee_public:p(n.OS.fee_public()),inclusion:p(n.OS.inclusion()),join:p(n.OS.join()),set_validator_state:p(n.OS.set_validator_state()),split:p(n.OS.split()),transfer_private:p(n.OS.transfer_private()),transfer_private_to_public:p(n.OS.transfer_private_to_public()),transfer_public:p(n.OS.transfer_public()),transfer_public_as_signer:p(n.OS.transfer_public_as_signer()),transfer_public_to_private:p(n.OS.transfer_public_to_private()),unbond_public:p(n.OS.unbond_public()),getKey:function(e){return this.hasOwnProperty(e)?this[e]:new Error(`Key "${e}" not found.`)}},v=new Set(["transfer_private","private","transferPrivate","transfer_private_to_public","privateToPublic","transferPrivateToPublic"]),w=new Set(["transfer_private","private","transferPrivate","transfer_private_to_public","privateToPublic","transferPrivateToPublic","transfer_public","transfer_public_as_signer","public","public_as_signer","transferPublic","transferPublicAsSigner","transfer_public_to_private","publicToPrivate","publicAsSigner","transferPublicToPrivate"]),m=new Set(["private","transfer_private","transferPrivate"]),b=new Set(["private_to_public","privateToPublic","transfer_private_to_public","transferPrivateToPublic"]),P=new Set(["public","transfer_public","transferPublic"]),_=new Set(["public_as_signer","transfer_public_as_signer","transferPublicAsSigner"]),k=new Set(["public_to_private","publicToPrivate","transfer_public_to_private","transferPublicToPrivate"]);function E(e){throw console.error(e),e}i()}catch(K){i(K)}}))},341:(e,r,t)=>{t.a(e,(async(e,r)=>{try{var i=t(495),n=t(720),a=t(877),o=e([i,a]);[i,a]=o.then?(await o)():o,await(0,a.Fs)();const s="https://api.explorer.aleo.org/v1",c=new i.AleoKeyProvider,h=new i.ProgramManager(s,c,void 0);c.useCache(!0);let u="";async function l(e,r,t,n,o=!1){console.log("Web worker: Executing function locally...");const s=performance.now();try{const l=h.createProgramFromSource(e);if(l instanceof Error)throw"Error creating program from source";const f=l.id();if(!l.hasFunction(r))throw`Program ${f} does not contain function ${r}`;const d=`${f}:${r}`,y=await h.networkClient.getProgramImports(e);if(y instanceof Error)throw"Error getting program imports";if(u!==e){const i=await h.synthesizeKeys(e,r,t,a.ZD.from_string(n));h.keyProvider.cacheKeys(d,i),u=e}const p=new i.AleoKeyProviderParams({cacheKey:d}),g=await h.run(e,r,t,o,y,p,void 0,void 0,a.ZD.from_string(n));console.log(`Web worker: Local execution completed in ${performance.now()-s} ms`);const v=g.getOutputs(),w=g.getExecution();let m="";const b=c.getKeys(d);if(b instanceof Error)throw"Could not get verifying key";const P=b[1];return w?((0,a.Yc)(w,P,l,"hello"),m=w.toString(),console.log("Execution verified successfully: "+w)):m="",console.log(`Function execution response: ${v}`),{outputs:v,execution:m}}catch(e){return console.error(e),e?e.toString():"Unknown error"}}async function f(){return(new a.ZD).to_string()}const d={run:l,getPrivateKey:f};(0,n.p)(d),r()}catch(y){r(y)}}),1)}}]); -//# sourceMappingURL=907.bundle.js.map \ No newline at end of file diff --git a/907.bundle.js.LICENSE.txt b/907.bundle.js.LICENSE.txt deleted file mode 100644 index 479a8e58b..000000000 --- a/907.bundle.js.LICENSE.txt +++ /dev/null @@ -1,5 +0,0 @@ -/** - * @license - * Copyright 2019 Google LLC - * SPDX-License-Identifier: Apache-2.0 - */ diff --git a/907.bundle.js.map b/907.bundle.js.map deleted file mode 100644 index 7bbe338aa..000000000 --- a/907.bundle.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"907.bundle.js","mappings":";sHAKA,MAAMA,EAAcC,OAAO,iBACrBC,EAAiBD,OAAO,oBACxBE,EAAeF,OAAO,wBACtBG,EAAYH,OAAO,qBACnBI,EAAcJ,OAAO,kBACrBK,EAAYC,GAAwB,iBAARA,GAA4B,OAARA,GAAgC,mBAARA,EAgDxEC,EAAmB,IAAIC,IAAI,CAC7B,CAAC,QA7CwB,CACzBC,UAAYH,GAAQD,EAASC,IAAQA,EAAIP,GACzC,SAAAW,CAAUC,GACN,MAAM,MAAEC,EAAK,MAAEC,GAAU,IAAIC,eAE7B,OADAC,EAAOJ,EAAKC,GACL,CAACC,EAAO,CAACA,GACpB,EACA,WAAAG,CAAYC,GAER,OADAA,EAAKC,QAiJFC,EAhJSF,EAgJO,GAAIG,GAD/B,IAAkBA,CA9Id,IAoCA,CAAC,QA/BwB,CACzBX,UAAYY,GAAUhB,EAASgB,IAAUjB,KAAeiB,EACxD,SAAAX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A,EAASL,UAAWoP,EACzC,CAAC,MAAOrV,GAEL,OADA/B,QAAQ+B,MAAMA,GACPA,EAAQA,EAAMwB,WAAa,eACrC,CACL,CAEA0B,eAAeoS,IAEX,OADmB,IAAIlQ,EAAAA,IACLmQ,WACtB,CAEA,MAAMC,EAAY,CAAEjF,MAAK+E,kBACzBhZ,EAAAA,EAAAA,GAAOkZ","sources":["webpack://aleo-website/../node_modules/comlink/dist/esm/comlink.mjs","webpack://aleo-website/../src/utils.ts","webpack://aleo-website/../src/network-client.ts","webpack://aleo-website/../src/function-key-provider.ts","webpack://aleo-website/../src/program-manager.ts","webpack://aleo-website/../src/index.ts","webpack://aleo-website/../src/worker.ts"],"sourcesContent":["/**\n * @license\n * Copyright 2019 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\nconst proxyMarker = Symbol(\"Comlink.proxy\");\nconst createEndpoint = Symbol(\"Comlink.endpoint\");\nconst releaseProxy = Symbol(\"Comlink.releaseProxy\");\nconst finalizer = Symbol(\"Comlink.finalizer\");\nconst throwMarker = Symbol(\"Comlink.thrown\");\nconst isObject = (val) => (typeof val === \"object\" && val !== null) || typeof val === \"function\";\n/**\n * Internal transfer handle to handle objects marked to proxy.\n */\nconst proxyTransferHandler = {\n canHandle: (val) => isObject(val) && val[proxyMarker],\n serialize(obj) {\n const { port1, port2 } = new MessageChannel();\n expose(obj, port1);\n return [port2, [port2]];\n },\n deserialize(port) {\n port.start();\n return wrap(port);\n },\n};\n/**\n * Internal transfer handler to handle thrown exceptions.\n */\nconst throwTransferHandler = {\n canHandle: (value) => isObject(value) && throwMarker in value,\n serialize({ value }) {\n let serialized;\n if (value instanceof Error) {\n serialized = {\n isError: true,\n value: {\n message: value.message,\n name: value.name,\n stack: value.stack,\n },\n };\n }\n else {\n serialized = { isError: false, value };\n }\n return [serialized, []];\n },\n deserialize(serialized) {\n if (serialized.isError) {\n throw Object.assign(new Error(serialized.value.message), serialized.value);\n }\n throw serialized.value;\n },\n};\n/**\n * Allows customizing the serialization of certain values.\n */\nconst transferHandlers = new Map([\n [\"proxy\", proxyTransferHandler],\n [\"throw\", throwTransferHandler],\n]);\nfunction isAllowedOrigin(allowedOrigins, origin) {\n for (const allowedOrigin of allowedOrigins) {\n if (origin === allowedOrigin || allowedOrigin === \"*\") {\n return true;\n }\n if (allowedOrigin instanceof RegExp && allowedOrigin.test(origin)) {\n return true;\n }\n }\n return false;\n}\nfunction expose(obj, ep = globalThis, allowedOrigins = [\"*\"]) {\n ep.addEventListener(\"message\", function callback(ev) {\n if (!ev || !ev.data) {\n return;\n }\n if (!isAllowedOrigin(allowedOrigins, ev.origin)) {\n console.warn(`Invalid origin '${ev.origin}' for comlink proxy`);\n return;\n }\n const { id, type, path } = Object.assign({ path: [] }, ev.data);\n const argumentList = (ev.data.argumentList || []).map(fromWireValue);\n let returnValue;\n try {\n const parent = path.slice(0, -1).reduce((obj, prop) => obj[prop], obj);\n const rawValue = path.reduce((obj, prop) => obj[prop], obj);\n switch (type) {\n case \"GET\" /* MessageType.GET */:\n {\n returnValue = rawValue;\n }\n break;\n case \"SET\" /* MessageType.SET */:\n {\n parent[path.slice(-1)[0]] = fromWireValue(ev.data.value);\n returnValue = true;\n }\n break;\n case \"APPLY\" /* MessageType.APPLY */:\n {\n returnValue = rawValue.apply(parent, argumentList);\n }\n break;\n case \"CONSTRUCT\" /* MessageType.CONSTRUCT */:\n {\n const value = new rawValue(...argumentList);\n returnValue = proxy(value);\n }\n break;\n case \"ENDPOINT\" /* MessageType.ENDPOINT */:\n {\n const { port1, port2 } = new MessageChannel();\n expose(obj, port2);\n returnValue = transfer(port1, [port1]);\n }\n break;\n case \"RELEASE\" /* MessageType.RELEASE */:\n {\n returnValue = undefined;\n }\n break;\n default:\n return;\n }\n }\n catch (value) {\n returnValue = { value, [throwMarker]: 0 };\n }\n Promise.resolve(returnValue)\n .catch((value) => {\n return { value, [throwMarker]: 0 };\n })\n .then((returnValue) => {\n const [wireValue, transferables] = toWireValue(returnValue);\n ep.postMessage(Object.assign(Object.assign({}, wireValue), { id }), transferables);\n if (type === \"RELEASE\" /* MessageType.RELEASE */) {\n // detach and deactive after sending release response above.\n ep.removeEventListener(\"message\", callback);\n closeEndPoint(ep);\n if (finalizer in obj && typeof obj[finalizer] === \"function\") {\n obj[finalizer]();\n }\n }\n })\n .catch((error) => {\n // Send Serialization Error To Caller\n const [wireValue, transferables] = toWireValue({\n value: new TypeError(\"Unserializable return value\"),\n [throwMarker]: 0,\n });\n ep.postMessage(Object.assign(Object.assign({}, wireValue), { id }), transferables);\n });\n });\n if (ep.start) {\n ep.start();\n }\n}\nfunction isMessagePort(endpoint) {\n return endpoint.constructor.name === \"MessagePort\";\n}\nfunction closeEndPoint(endpoint) {\n if (isMessagePort(endpoint))\n endpoint.close();\n}\nfunction wrap(ep, target) {\n return createProxy(ep, [], target);\n}\nfunction throwIfProxyReleased(isReleased) {\n if (isReleased) {\n throw new Error(\"Proxy has been released and is not useable\");\n }\n}\nfunction releaseEndpoint(ep) {\n return requestResponseMessage(ep, {\n type: \"RELEASE\" /* MessageType.RELEASE */,\n }).then(() => {\n closeEndPoint(ep);\n });\n}\nconst proxyCounter = new WeakMap();\nconst proxyFinalizers = \"FinalizationRegistry\" in globalThis &&\n new FinalizationRegistry((ep) => {\n const newCount = (proxyCounter.get(ep) || 0) - 1;\n proxyCounter.set(ep, newCount);\n if (newCount === 0) {\n releaseEndpoint(ep);\n }\n });\nfunction registerProxy(proxy, ep) {\n const newCount = (proxyCounter.get(ep) || 0) + 1;\n proxyCounter.set(ep, newCount);\n if (proxyFinalizers) {\n proxyFinalizers.register(proxy, ep, proxy);\n }\n}\nfunction unregisterProxy(proxy) {\n if (proxyFinalizers) {\n proxyFinalizers.unregister(proxy);\n }\n}\nfunction createProxy(ep, path = [], target = function () { }) {\n let isProxyReleased = false;\n const proxy = new Proxy(target, {\n get(_target, prop) {\n throwIfProxyReleased(isProxyReleased);\n if (prop === releaseProxy) {\n return () => {\n unregisterProxy(proxy);\n releaseEndpoint(ep);\n isProxyReleased = true;\n };\n }\n if (prop === \"then\") {\n if (path.length === 0) {\n return { then: () => proxy };\n }\n const r = requestResponseMessage(ep, {\n type: \"GET\" /* MessageType.GET */,\n path: path.map((p) => p.toString()),\n }).then(fromWireValue);\n return r.then.bind(r);\n }\n return createProxy(ep, [...path, prop]);\n },\n set(_target, prop, rawValue) {\n throwIfProxyReleased(isProxyReleased);\n // FIXME: ES6 Proxy Handler `set` methods are supposed to return a\n // boolean. To show good will, we return true asynchronously ¯\\_(ツ)_/¯\n const [value, transferables] = toWireValue(rawValue);\n return requestResponseMessage(ep, {\n type: \"SET\" /* MessageType.SET */,\n path: [...path, prop].map((p) => p.toString()),\n value,\n }, transferables).then(fromWireValue);\n },\n apply(_target, _thisArg, rawArgumentList) {\n throwIfProxyReleased(isProxyReleased);\n const last = path[path.length - 1];\n if (last === createEndpoint) {\n return requestResponseMessage(ep, {\n type: \"ENDPOINT\" /* MessageType.ENDPOINT */,\n }).then(fromWireValue);\n }\n // We just pretend that `bind()` didn’t happen.\n if (last === \"bind\") {\n return createProxy(ep, path.slice(0, -1));\n }\n const [argumentList, transferables] = processArguments(rawArgumentList);\n return requestResponseMessage(ep, {\n type: \"APPLY\" /* MessageType.APPLY */,\n path: path.map((p) => p.toString()),\n argumentList,\n }, transferables).then(fromWireValue);\n },\n construct(_target, rawArgumentList) {\n throwIfProxyReleased(isProxyReleased);\n const [argumentList, transferables] = processArguments(rawArgumentList);\n return requestResponseMessage(ep, {\n type: \"CONSTRUCT\" /* MessageType.CONSTRUCT */,\n path: path.map((p) => p.toString()),\n argumentList,\n }, transferables).then(fromWireValue);\n },\n });\n registerProxy(proxy, ep);\n return proxy;\n}\nfunction myFlat(arr) {\n return Array.prototype.concat.apply([], arr);\n}\nfunction processArguments(argumentList) {\n const processed = argumentList.map(toWireValue);\n return [processed.map((v) => v[0]), myFlat(processed.map((v) => v[1]))];\n}\nconst transferCache = new WeakMap();\nfunction transfer(obj, transfers) {\n transferCache.set(obj, transfers);\n return obj;\n}\nfunction proxy(obj) {\n return Object.assign(obj, { [proxyMarker]: true });\n}\nfunction windowEndpoint(w, context = globalThis, targetOrigin = \"*\") {\n return {\n postMessage: (msg, transferables) => w.postMessage(msg, targetOrigin, transferables),\n addEventListener: context.addEventListener.bind(context),\n removeEventListener: context.removeEventListener.bind(context),\n };\n}\nfunction toWireValue(value) {\n for (const [name, handler] of transferHandlers) {\n if (handler.canHandle(value)) {\n const [serializedValue, transferables] = handler.serialize(value);\n return [\n {\n type: \"HANDLER\" /* WireValueType.HANDLER */,\n name,\n value: serializedValue,\n },\n transferables,\n ];\n }\n }\n return [\n {\n type: \"RAW\" /* WireValueType.RAW */,\n value,\n },\n transferCache.get(value) || [],\n ];\n}\nfunction fromWireValue(value) {\n switch (value.type) {\n case \"HANDLER\" /* WireValueType.HANDLER */:\n return transferHandlers.get(value.name).deserialize(value.value);\n case \"RAW\" /* WireValueType.RAW */:\n return value.value;\n }\n}\nfunction requestResponseMessage(ep, msg, transfers) {\n return new Promise((resolve) => {\n const id = generateUUID();\n ep.addEventListener(\"message\", function l(ev) {\n if (!ev.data || !ev.data.id || ev.data.id !== id) {\n return;\n }\n ep.removeEventListener(\"message\", l);\n resolve(ev.data);\n });\n if (ep.start) {\n ep.start();\n }\n ep.postMessage(Object.assign({ id }, msg), transfers);\n });\n}\nfunction generateUUID() {\n return new Array(4)\n .fill(0)\n .map(() => Math.floor(Math.random() * Number.MAX_SAFE_INTEGER).toString(16))\n .join(\"-\");\n}\n\nexport { createEndpoint, expose, finalizer, proxy, proxyMarker, releaseProxy, transfer, transferHandlers, windowEndpoint, wrap };\n//# sourceMappingURL=comlink.mjs.map\n","export async function get(url: URL | string, options?: RequestInit) {\n const response = await fetch(url, options);\n\n if (!response.ok) {\n throw new Error(response.status + \" could not get URL \" + url);\n }\n\n return response;\n}\n\n\nexport async function post(url: URL | string, options: RequestInit) {\n options.method = \"POST\";\n\n const response = await fetch(url, options);\n\n if (!response.ok) {\n throw new Error(response.status + \" could not post URL \" + url);\n }\n\n return response;\n}\n","import { get, post } from \"./utils\";\nimport {\n Account,\n Block,\n RecordCiphertext,\n Program,\n RecordPlaintext,\n PrivateKey,\n Transaction,\n TransactionModel,\n logAndThrow\n} from \"./index\";\n\ntype ProgramImports = { [key: string]: string | Program };\n\ninterface AleoNetworkClientOptions {\n headers?: { [key: string]: string };\n}\n\n/**\n * Client library that encapsulates REST calls to publicly exposed endpoints of Aleo nodes. The methods provided in this\n * allow users to query public information from the Aleo blockchain and submit transactions to the network.\n *\n * @param {string} host\n * @example\n * // Connection to a local node\n * const localNetworkClient = new AleoNetworkClient(\"http://localhost:3030\");\n *\n * // Connection to a public beacon node\n * const publicnetworkClient = new AleoNetworkClient(\"https://api.explorer.aleo.org/v1\");\n */\nclass AleoNetworkClient {\n host: string;\n headers: { [key: string]: string };\n account: Account | undefined;\n\n constructor(host: string, options?: AleoNetworkClientOptions) {\n this.host = host + \"/testnet\";\n\n if (options && options.headers) {\n this.headers = options.headers;\n\n } else {\n this.headers = {\n // This is replaced by the actual version by a Rollup plugin\n \"X-Aleo-SDK-Version\": \"%%VERSION%%\",\n };\n }\n }\n\n /**\n * Set an account to use in networkClient calls\n *\n * @param {Account} account\n * @example\n * const account = new Account();\n * networkClient.setAccount(account);\n */\n setAccount(account: Account) {\n this.account = account;\n }\n\n /**\n * Return the Aleo account used in the networkClient\n *\n * @example\n * const account = networkClient.getAccount();\n */\n getAccount(): Account | undefined {\n return this.account;\n }\n\n /**\n * Set a new host for the networkClient\n *\n * @param {string} host The address of a node hosting the Aleo API\n * @param host\n */\n setHost(host: string) {\n this.host = host + \"/testnet\";\n }\n\n async fetchData(\n url = \"/\",\n ): Promise {\n try {\n const response = await get(this.host + url, {\n headers: this.headers\n });\n\n return await response.json();\n } catch (error) {\n throw new Error(\"Error fetching data.\");\n }\n }\n\n /**\n * Attempts to find unspent records in the Aleo blockchain for a specified private key\n * @param {number} startHeight - The height at which to start searching for unspent records\n * @param {number} endHeight - The height at which to stop searching for unspent records\n * @param {string | PrivateKey} privateKey - The private key to use to find unspent records\n * @param {number[]} amounts - The amounts (in microcredits) to search for (eg. [100, 200, 3000])\n * @param {number} maxMicrocredits - The maximum number of microcredits to search for\n * @param {string[]} nonces - The nonces of already found records to exclude from the search\n *\n * @example\n * // Find all unspent records\n * const privateKey = \"[PRIVATE_KEY]\";\n * const records = networkClient.findUnspentRecords(0, undefined, privateKey);\n *\n * // Find specific amounts\n * const startHeight = 500000;\n * const amounts = [600000, 1000000];\n * const records = networkClient.findUnspentRecords(startHeight, undefined, privateKey, amounts);\n *\n * // Find specific amounts with a maximum number of cumulative microcredits\n * const maxMicrocredits = 100000;\n * const records = networkClient.findUnspentRecords(startHeight, undefined, privateKey, undefined, maxMicrocredits);\n */\n async findUnspentRecords(\n startHeight: number,\n endHeight: number | undefined,\n privateKey: string | PrivateKey | undefined,\n amounts: number[] | undefined,\n maxMicrocredits?: number | undefined,\n nonces?: string[] | undefined,\n ): Promise | Error> {\n nonces = nonces || [];\n // Ensure start height is not negative\n if (startHeight < 0) {\n throw new Error(\"Start height must be greater than or equal to 0\");\n }\n\n // Initialize search parameters\n const records = new Array();\n let start;\n let end;\n let resolvedPrivateKey: PrivateKey;\n let failures = 0;\n let totalRecordValue = BigInt(0);\n let latestHeight: number;\n\n // Ensure a private key is present to find owned records\n if (typeof privateKey === \"undefined\") {\n if (typeof this.account === \"undefined\") {\n throw new Error(\"Private key must be specified in an argument to findOwnedRecords or set in the AleoNetworkClient\");\n } else {\n resolvedPrivateKey = this.account._privateKey;\n }\n } else {\n try {\n resolvedPrivateKey = privateKey instanceof PrivateKey ? privateKey : PrivateKey.from_string(privateKey);\n } catch (error) {\n throw new Error(\"Error parsing private key provided.\");\n }\n }\n const viewKey = resolvedPrivateKey.to_view_key();\n\n // Get the latest height to ensure the range being searched is valid\n try {\n const blockHeight = await this.getLatestHeight();\n if (typeof blockHeight === \"number\") {\n latestHeight = blockHeight;\n } else {\n throw new Error(\"Error fetching latest block height.\");\n }\n } catch (error) {\n throw new Error(\"Error fetching latest block height.\");\n }\n\n // If no end height is specified or is greater than the latest height, set the end height to the latest height\n if (typeof endHeight === \"number\" && endHeight <= latestHeight) {\n end = endHeight\n } else {\n end = latestHeight;\n }\n\n // If the starting is greater than the ending height, return an error\n if (startHeight > end) {\n throw new Error(\"Start height must be less than or equal to end height.\");\n }\n\n // Iterate through blocks in reverse order in chunks of 50\n while (end > startHeight) {\n start = end - 50;\n if (start < startHeight) {\n start = startHeight;\n }\n try {\n // Get 50 blocks (or the difference between the start and end if less than 50)\n const blocks = await this.getBlockRange(start, end);\n end = start;\n if (!(blocks instanceof Error)) {\n // Iterate through blocks to find unspent records\n for (let i = 0; i < blocks.length; i++) {\n const block = blocks[i];\n const transactions = block.transactions;\n if (!(typeof transactions === \"undefined\")) {\n for (let j = 0; j < transactions.length; j++) {\n const confirmedTransaction = transactions[j];\n // Search for unspent records in execute transactions of credits.aleo\n if (confirmedTransaction.type == \"execute\") {\n const transaction = confirmedTransaction.transaction;\n if (transaction.execution && !(typeof transaction.execution.transitions == \"undefined\")) {\n for (let k = 0; k < transaction.execution.transitions.length; k++) {\n const transition = transaction.execution.transitions[k];\n // Only search for unspent records in credits.aleo (for now)\n if (transition.program !== \"credits.aleo\") {\n continue;\n }\n if (!(typeof transition.outputs == \"undefined\")) {\n for (let l = 0; l < transition.outputs.length; l++) {\n const output = transition.outputs[l];\n if (output.type === \"record\") {\n try {\n // Create a wasm record ciphertext object from the found output\n const record = RecordCiphertext.fromString(output.value);\n // Determine if the record is owned by the specified view key\n if (record.isOwner(viewKey)) {\n // Decrypt the record and get the serial number\n const recordPlaintext = record.decrypt(viewKey);\n\n // If the record has already been found, skip it\n const nonce = recordPlaintext.nonce();\n if (nonces.includes(nonce)) {\n continue;\n }\n\n // Otherwise record the nonce that has been found\n const serialNumber = recordPlaintext.serialNumberString(resolvedPrivateKey, \"credits.aleo\", \"credits\");\n // Attempt to see if the serial number is spent\n try {\n await this.getTransitionId(serialNumber);\n } catch (error) {\n // If it's not found, add it to the list of unspent records\n if (!amounts) {\n records.push(recordPlaintext);\n // If the user specified a maximum number of microcredits, check if the search has found enough\n if (typeof maxMicrocredits === \"number\") {\n totalRecordValue += recordPlaintext.microcredits();\n // Exit if the search has found the amount specified\n if (totalRecordValue >= BigInt(maxMicrocredits)) {\n return records;\n }\n }\n }\n // If the user specified a list of amounts, check if the search has found them\n if (!(typeof amounts === \"undefined\") && amounts.length > 0) {\n let amounts_found = 0;\n if (recordPlaintext.microcredits() > amounts[amounts_found]) {\n amounts_found += 1;\n records.push(recordPlaintext);\n // If the user specified a maximum number of microcredits, check if the search has found enough\n if (typeof maxMicrocredits === \"number\") {\n totalRecordValue += recordPlaintext.microcredits();\n // Exit if the search has found the amount specified\n if (totalRecordValue >= BigInt(maxMicrocredits)) {\n return records;\n }\n }\n if (records.length >= amounts.length) {\n return records;\n }\n }\n }\n }\n }\n } catch (error) {\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n } catch (error) {\n // If there is an error fetching blocks, log it and keep searching\n console.warn(\"Error fetching blocks in range: \" + start.toString() + \"-\" + end.toString());\n console.warn(\"Error: \", error);\n failures += 1;\n if (failures > 10) {\n console.warn(\"10 failures fetching records reached. Returning records fetched so far\");\n return records;\n }\n }\n }\n return records;\n }\n\n /**\n * Returns the contents of the block at the specified block height\n *\n * @param {number} height\n * @example\n * const block = networkClient.getBlock(1234);\n */\n async getBlock(height: number): Promise {\n try {\n const block = await this.fetchData(\"/block/\" + height);\n return block;\n } catch (error) {\n throw new Error(\"Error fetching block.\");\n }\n }\n\n /**\n * Returns a range of blocks between the specified block heights\n *\n * @param {number} start\n * @param {number} end\n * @example\n * const blockRange = networkClient.getBlockRange(2050, 2100);\n */\n async getBlockRange(start: number, end: number): Promise | Error> {\n try {\n return await this.fetchData>(\"/blocks?start=\" + start + \"&end=\" + end);\n } catch (error) {\n const errorMessage = \"Error fetching blocks between \" + start + \" and \" + end + \".\"\n throw new Error(errorMessage);\n }\n }\n\n /**\n * Returns the deployment transaction id associated with the specified program\n *\n * @param {Program | string} program\n * @returns {TransactionModel | Error}\n */\n async getDeploymentTransactionIDForProgram(program: Program | string): Promise {\n if (program instanceof Program) {\n program = program.toString();\n }\n try {\n const id = await this.fetchData(\"/find/transactionID/deployment/\" + program);\n return id.replace(\"\\\"\", \"\")\n } catch (error) {\n throw new Error(\"Error fetching deployment transaction for program.\");\n }\n }\n\n /**\n * Returns the deployment transaction associated with a specified program\n *\n * @param {Program | string} program\n * @returns {TransactionModel | Error}\n */\n async getDeploymentTransactionForProgram(program: Program | string): Promise {\n try {\n const transaction_id = await this.getDeploymentTransactionIDForProgram(program);\n return await this.getTransaction(transaction_id);\n } catch (error) {\n throw new Error(\"Error fetching deployment transaction for program.\");\n }\n }\n\n /**\n * Returns the contents of the latest block\n *\n * @example\n * const latestHeight = networkClient.getLatestBlock();\n */\n async getLatestBlock(): Promise {\n try {\n return await this.fetchData(\"/latest/block\") as Block;\n } catch (error) {\n throw new Error(\"Error fetching latest block.\");\n }\n }\n\n /**\n * Returns the latest committee\n *\n * @returns {Promise} A javascript object containing the latest committee\n */\n async getLatestCommittee(): Promise {\n try {\n return await this.fetchData(\"/committee/latest\");\n } catch (error) {\n throw new Error(\"Error fetching latest block.\");\n }\n }\n\n /**\n * Returns the latest block height\n *\n * @example\n * const latestHeight = networkClient.getLatestHeight();\n */\n async getLatestHeight(): Promise {\n try {\n return await this.fetchData(\"/latest/height\");\n } catch (error) {\n throw new Error(\"Error fetching latest height.\");\n }\n }\n\n /**\n * Returns the source code of a program given a program ID\n *\n * @param {string} programId The program ID of a program deployed to the Aleo Network\n * @return {Promise} Source code of the program\n *\n * @example\n * const program = networkClient.getProgram(\"hello_hello.aleo\");\n * const expectedSource = \"program hello_hello.aleo;\\n\\nfunction hello:\\n input r0 as u32.public;\\n input r1 as u32.private;\\n add r0 r1 into r2;\\n output r2 as u32.private;\\n\"\n * assert.equal(program, expectedSource);\n */\n async getProgram(programId: string): Promise {\n try {\n return await this.fetchData(\"/program/\" + programId)\n } catch (error) {\n throw new Error(\"Error fetching program\");\n }\n }\n\n /**\n * Returns a program object from a program ID or program source code\n *\n * @param {string} inputProgram The program ID or program source code of a program deployed to the Aleo Network\n * @return {Promise} Source code of the program\n *\n * @example\n * const programID = \"hello_hello.aleo\";\n * const programSource = \"program hello_hello.aleo;\\n\\nfunction hello:\\n input r0 as u32.public;\\n input r1 as u32.private;\\n add r0 r1 into r2;\\n output r2 as u32.private;\\n\"\n *\n * // Get program object from program ID or program source code\n * const programObjectFromID = await networkClient.getProgramObject(programID);\n * const programObjectFromSource = await networkClient.getProgramObject(programSource);\n *\n * // Both program objects should be equal\n * assert.equal(programObjectFromID.to_string(), programObjectFromSource.to_string());\n */\n async getProgramObject(inputProgram: string): Promise {\n try {\n return Program.fromString(inputProgram);\n } catch (error) {\n try {\n return Program.fromString((await this.getProgram(inputProgram)));\n } catch (error) {\n throw new Error(`${inputProgram} is neither a program name or a valid program`);\n }\n }\n }\n\n /**\n * Returns an object containing the source code of a program and the source code of all programs it imports\n *\n * @param {Program | string} inputProgram The program ID or program source code of a program deployed to the Aleo Network\n * @returns {Promise} Object of the form { \"program_id\": \"program_source\", .. } containing program id & source code for all program imports\n *\n * @example\n * const double_test_source = \"import multiply_test.aleo;\\n\\nprogram double_test.aleo;\\n\\nfunction double_it:\\n input r0 as u32.private;\\n call multiply_test.aleo/multiply 2u32 r0 into r1;\\n output r1 as u32.private;\\n\"\n * const double_test = Program.fromString(double_test_source);\n * const expectedImports = {\n * \"multiply_test.aleo\": \"program multiply_test.aleo;\\n\\nfunction multiply:\\n input r0 as u32.public;\\n input r1 as u32.private;\\n mul r0 r1 into r2;\\n output r2 as u32.private;\\n\"\n * }\n *\n * // Imports can be fetched using the program ID, source code, or program object\n * let programImports = await networkClient.getProgramImports(\"double_test.aleo\");\n * assert.deepStrictEqual(programImports, expectedImports);\n *\n * // Using the program source code\n * programImports = await networkClient.getProgramImports(double_test_source);\n * assert.deepStrictEqual(programImports, expectedImports);\n *\n * // Using the program object\n * programImports = await networkClient.getProgramImports(double_test);\n * assert.deepStrictEqual(programImports, expectedImports);\n */\n async getProgramImports(inputProgram: Program | string): Promise {\n try {\n const imports: ProgramImports = {};\n\n // Get the program object or fail if the program is not valid or does not exist\n const program = inputProgram instanceof Program ? inputProgram : (await this.getProgramObject(inputProgram));\n\n // Get the list of programs that the program imports\n const importList = program.getImports();\n\n // Recursively get any imports that the imported programs have in a depth first search order\n for (let i = 0; i < importList.length; i++) {\n const import_id = importList[i];\n if (!imports.hasOwnProperty(import_id)) {\n const programSource = await this.getProgram(import_id);\n const nestedImports = await this.getProgramImports(import_id);\n for (const key in nestedImports) {\n if (!imports.hasOwnProperty(key)) {\n imports[key] = nestedImports[key];\n }\n }\n imports[import_id] = programSource;\n }\n }\n return imports;\n } catch (error) {\n throw logAndThrow(\"Error fetching program imports: \" + error)\n }\n }\n\n /**\n * Get a list of the program names that a program imports\n *\n * @param {Program | string} inputProgram - The program id or program source code to get the imports of\n * @returns {string[]} - The list of program names that the program imports\n *\n * @example\n * const programImportsNames = networkClient.getProgramImports(\"double_test.aleo\");\n * const expectedImportsNames = [\"multiply_test.aleo\"];\n * assert.deepStrictEqual(programImportsNames, expectedImportsNames);\n */\n async getProgramImportNames(inputProgram: Program | string): Promise {\n try {\n const program = inputProgram instanceof Program ? inputProgram : (await this.getProgramObject(inputProgram));\n return program.getImports();\n } catch (error) {\n throw new Error(\"Error fetching program imports with error: \" + error);\n }\n }\n\n /**\n * Returns the names of the mappings of a program\n *\n * @param {string} programId - The program ID to get the mappings of (e.g. \"credits.aleo\")\n * @example\n * const mappings = networkClient.getProgramMappingNames(\"credits.aleo\");\n * const expectedMappings = [\"account\"];\n * assert.deepStrictEqual(mappings, expectedMappings);\n */\n async getProgramMappingNames(programId: string): Promise | Error> {\n try {\n return await this.fetchData>(\"/program/\" + programId + \"/mappings\")\n } catch (error) {\n throw new Error(\"Error fetching program mappings - ensure the program exists on chain before trying again\");\n }\n }\n\n /**\n * Returns the value of a program's mapping for a specific key\n *\n * @param {string} programId - The program ID to get the mapping value of (e.g. \"credits.aleo\")\n * @param {string} mappingName - The name of the mapping to get the value of (e.g. \"account\")\n * @param {string} key - The key of the mapping to get the value of (e.g. \"aleo1rhgdu77hgyqd3xjj8ucu3jj9r2krwz6mnzyd80gncr5fxcwlh5rsvzp9px\")\n * @return {Promise} String representation of the value of the mapping\n *\n * @example\n * // Get public balance of an account\n * const mappingValue = networkClient.getMappingValue(\"credits.aleo\", \"account\", \"aleo1rhgdu77hgyqd3xjj8ucu3jj9r2krwz6mnzyd80gncr5fxcwlh5rsvzp9px\");\n * const expectedValue = \"0u64\";\n * assert.equal(mappingValue, expectedValue);\n */\n async getProgramMappingValue(programId: string, mappingName: string, key: string): Promise {\n try {\n return await this.fetchData(\"/program/\" + programId + \"/mapping/\" + mappingName + \"/\" + key)\n } catch (error) {\n throw new Error(\"Error fetching mapping value - ensure the mapping exists and the key is correct\");\n }\n }\n\n /**\n * Returns the latest state/merkle root of the Aleo blockchain\n *\n * @example\n * const stateRoot = networkClient.getStateRoot();\n */\n async getStateRoot(): Promise {\n try {\n return await this.fetchData(\"/latest/stateRoot\");\n } catch (error) {\n throw new Error(\"Error fetching Aleo state root\");\n }\n }\n\n /**\n * Returns a transaction by its unique identifier\n *\n * @param {string} id\n * @example\n * const transaction = networkClient.getTransaction(\"at1handz9xjrqeynjrr0xay4pcsgtnczdksz3e584vfsgaz0dh0lyxq43a4wj\");\n */\n async getTransaction(id: string): Promise {\n try {\n return await this.fetchData(\"/transaction/\" + id);\n } catch (error) {\n throw new Error(\"Error fetching transaction.\");\n }\n }\n\n /**\n * Returns the transactions present at the specified block height\n *\n * @param {number} height\n * @example\n * const transactions = networkClient.getTransactions(654);\n */\n async getTransactions(height: number): Promise | Error> {\n try {\n return await this.fetchData>(\"/block/\" + height.toString() + \"/transactions\");\n } catch (error) {\n throw new Error(\"Error fetching transactions.\");\n }\n }\n\n /**\n * Returns the transactions in the memory pool.\n *\n * @example\n * const transactions = networkClient.getTransactionsInMempool();\n */\n async getTransactionsInMempool(): Promise | Error> {\n try {\n return await this.fetchData>(\"/memoryPool/transactions\");\n } catch (error) {\n throw new Error(\"Error fetching transactions from mempool.\");\n }\n }\n\n /**\n * Returns the transition ID of the transition corresponding to the ID of the input or output.\n * @param {string} inputOrOutputID - ID of the input or output.\n *\n * @example\n * const transitionId = networkClient.getTransitionId(\"2429232855236830926144356377868449890830704336664550203176918782554219952323field\");\n */\n async getTransitionId(inputOrOutputID: string): Promise {\n try {\n return await this.fetchData(\"/find/transitionID/\" + inputOrOutputID);\n } catch (error) {\n throw new Error(\"Error fetching transition ID.\");\n }\n }\n\n /**\n * Submit an execute or deployment transaction to the Aleo network\n *\n * @param {Transaction | string} transaction - The transaction to submit to the network\n * @returns {string | Error} - The transaction id of the submitted transaction or the resulting error\n */\n async submitTransaction(transaction: Transaction | string): Promise {\n const transaction_string = transaction instanceof Transaction ? transaction.toString() : transaction;\n try {\n const response = await post(this.host + \"/transaction/broadcast\", {\n body: transaction_string,\n headers: Object.assign({}, this.headers, {\n \"Content-Type\": \"application/json\",\n }),\n });\n\n try {\n return await response.json();\n\n } catch (error) {\n throw new Error(`Error posting transaction. Aleo network response: ${(error as Error).message}`);\n }\n } catch (error) {\n throw new Error(`Error posting transaction: No response received: ${(error as Error).message}`);\n }\n }\n}\n\nexport { AleoNetworkClient, AleoNetworkClientOptions, ProgramImports }\n","import {\n ProvingKey,\n VerifyingKey,\n CREDITS_PROGRAM_KEYS,\n KEY_STORE,\n Key,\n PRIVATE_TRANSFER,\n PRIVATE_TO_PUBLIC_TRANSFER,\n PUBLIC_TRANSFER,\n PUBLIC_TO_PRIVATE_TRANSFER,\n PUBLIC_TRANSFER_AS_SIGNER\n} from \"./index\";\nimport { get } from \"./utils\";\n\ntype FunctionKeyPair = [ProvingKey, VerifyingKey];\ntype CachedKeyPair = [Uint8Array, Uint8Array];\ntype AleoKeyProviderInitParams = {\n proverUri?: string;\n verifierUri?: string;\n cacheKey?: string;\n};\n\n/**\n * Interface for record search parameters. This allows for arbitrary search parameters to be passed to record provider\n * implementations.\n */\ninterface KeySearchParams {\n [key: string]: any; // This allows for arbitrary keys with any type values\n}\n\n/**\n * AleoKeyProviderParams search parameter for the AleoKeyProvider. It allows for the specification of a proverUri and\n * verifierUri to fetch keys via HTTP from a remote resource as well as a unique cacheKey to store the keys in memory.\n */\nclass AleoKeyProviderParams implements KeySearchParams {\n name: string | undefined;\n proverUri: string | undefined;\n verifierUri: string | undefined;\n cacheKey: string | undefined;\n\n /**\n * Create a new AleoKeyProviderParams object which implements the KeySearchParams interface. Users can optionally\n * specify a url for the proverUri & verifierUri to fetch keys via HTTP from a remote resource as well as a unique\n * cacheKey to store the keys in memory for future use. If no proverUri or verifierUri is specified, a cachekey must\n * be provided.\n *\n * @param { AleoKeyProviderInitParams } params - Optional search parameters\n */\n constructor(params: {proverUri?: string, verifierUri?: string, cacheKey?: string, name?: string}) {\n this.proverUri = params.proverUri;\n this.verifierUri = params.verifierUri;\n this.cacheKey = params.cacheKey;\n this.name = params.name;\n }\n}\n\n/**\n * KeyProvider interface. Enables the retrieval of public proving and verifying keys for Aleo Programs.\n */\ninterface FunctionKeyProvider {\n /**\n * Get bond_public function keys from the credits.aleo program\n *\n * @returns {Promise} Proving and verifying keys for the bond_public function\n */\n bondPublicKeys(): Promise;\n\n /**\n * Get bond_validator function keys from the credits.aleo program\n *\n * @returns {Promise} Proving and verifying keys for the bond_validator function\n */\n bondValidatorKeys(): Promise;\n\n /**\n * Cache a set of keys. This will overwrite any existing keys with the same keyId. The user can check if a keyId\n * exists in the cache using the containsKeys method prior to calling this method if overwriting is not desired.\n *\n * @param {string} keyId access key for the cache\n * @param {FunctionKeyPair} keys keys to cache\n */\n cacheKeys(keyId: string, keys: FunctionKeyPair): void;\n\n /**\n * Get unbond_public function keys from the credits.aleo program\n *\n * @returns {Promise} Proving and verifying keys for the unbond_public function\n */\n claimUnbondPublicKeys(): Promise;\n\n /**\n * Get arbitrary function keys from a provider\n *\n * @param {KeySearchParams | undefined} params - Optional search parameters for the key provider\n * @returns {Promise} Proving and verifying keys for the specified program\n *\n * @example\n * // Create a search object which implements the KeySearchParams interface\n * class IndexDbSearch implements KeySearchParams {\n * db: string\n * keyId: string\n * constructor(params: {db: string, keyId: string}) {\n * this.db = params.db;\n * this.keyId = params.keyId;\n * }\n * }\n *\n * // Create a new object which implements the KeyProvider interface\n * class IndexDbKeyProvider implements FunctionKeyProvider {\n * async functionKeys(params: KeySearchParams): Promise {\n * return new Promise((resolve, reject) => {\n * const request = indexedDB.open(params.db, 1);\n *\n * request.onupgradeneeded = function(e) {\n * const db = e.target.result;\n * if (!db.objectStoreNames.contains('keys')) {\n * db.createObjectStore('keys', { keyPath: 'id' });\n * }\n * };\n *\n * request.onsuccess = function(e) {\n * const db = e.target.result;\n * const transaction = db.transaction([\"keys\"], \"readonly\");\n * const store = transaction.objectStore(\"keys\");\n * const request = store.get(params.keyId);\n * request.onsuccess = function(e) {\n * if (request.result) {\n * resolve(request.result as FunctionKeyPair);\n * } else {\n * reject(new Error(\"Key not found\"));\n * }\n * };\n * request.onerror = function(e) { reject(new Error(\"Error fetching key\")); };\n * };\n *\n * request.onerror = function(e) { reject(new Error(\"Error opening database\")); };\n * });\n * }\n *\n * // implement the other methods...\n * }\n *\n *\n * const keyProvider = new AleoKeyProvider();\n * const networkClient = new AleoNetworkClient(\"https://api.explorer.aleo.org/v1\");\n * const recordProvider = new NetworkRecordProvider(account, networkClient);\n *\n * // Initialize a program manager with the key provider to automatically fetch keys for value transfers\n * const programManager = new ProgramManager(\"https://api.explorer.aleo.org/v1\", keyProvider, recordProvider);\n * programManager.transfer(1, \"aleo166q6ww6688cug7qxwe7nhctjpymydwzy2h7rscfmatqmfwnjvggqcad0at\", \"public\", 0.5);\n *\n * // Keys can also be fetched manually\n * const searchParams = new IndexDbSearch({db: \"keys\", keyId: \"credits.aleo:transferPrivate\"});\n * const [transferPrivateProvingKey, transferPrivateVerifyingKey] = await keyProvider.functionKeys(searchParams);\n */\n functionKeys(params?: KeySearchParams): Promise;\n\n /**\n * Get fee_private function keys from the credits.aleo program\n *\n * @returns {Promise} Proving and verifying keys for the join function\n */\n feePrivateKeys(): Promise;\n\n /**\n * Get fee_public function keys from the credits.aleo program\n *\n * @returns {Promise} Proving and verifying keys for the join function\n */\n feePublicKeys(): Promise;\n\n /**\n * Get join function keys from the credits.aleo program\n *\n * @returns {Promise} Proving and verifying keys for the join function\n */\n joinKeys(): Promise;\n\n /**\n * Get split function keys from the credits.aleo program\n *\n * @returns {Promise} Proving and verifying keys for the join function\n */\n splitKeys(): Promise;\n\n /**\n * Get keys for a variant of the transfer function from the credits.aleo program\n *\n * @param {string} visibility Visibility of the transfer function (private, public, privateToPublic, publicToPrivate)\n * @returns {Promise} Proving and verifying keys for the specified transfer function\n *\n * @example\n * // Create a new object which implements the KeyProvider interface\n * const networkClient = new AleoNetworkClient(\"https://api.explorer.aleo.org/v1\");\n * const keyProvider = new AleoKeyProvider();\n * const recordProvider = new NetworkRecordProvider(account, networkClient);\n *\n * // Initialize a program manager with the key provider to automatically fetch keys for value transfers\n * const programManager = new ProgramManager(\"https://api.explorer.aleo.org/v1\", keyProvider, recordProvider);\n * programManager.transfer(1, \"aleo166q6ww6688cug7qxwe7nhctjpymydwzy2h7rscfmatqmfwnjvggqcad0at\", \"public\", 0.5);\n *\n * // Keys can also be fetched manually\n * const [transferPublicProvingKey, transferPublicVerifyingKey] = await keyProvider.transferKeys(\"public\");\n */\n transferKeys(visibility: string): Promise;\n\n /**\n * Get unbond_public function keys from the credits.aleo program\n *\n * @returns {Promise} Proving and verifying keys for the join function\n */\n unBondPublicKeys(): Promise;\n\n}\n\n\n/**\n * AleoKeyProvider class. Implements the KeyProvider interface. Enables the retrieval of Aleo program proving and\n * verifying keys for the credits.aleo program over http from official Aleo sources and storing and retrieving function\n * keys from a local memory cache.\n */\nclass AleoKeyProvider implements FunctionKeyProvider {\n cache: Map;\n cacheOption: boolean;\n keyUris: string;\n\n async fetchBytes(\n url = \"/\",\n ): Promise {\n try {\n const response = await get(url);\n const data = await response.arrayBuffer();\n return new Uint8Array(data);\n } catch (error) {\n throw new Error(\"Error fetching data.\" + error);\n }\n }\n\n constructor() {\n this.keyUris = KEY_STORE;\n this.cache = new Map();\n this.cacheOption = false;\n }\n\n /**\n * Use local memory to store keys\n *\n * @param {boolean} useCache whether to store keys in local memory\n */\n useCache(useCache: boolean) {\n this.cacheOption = useCache;\n }\n\n /**\n * Clear the key cache\n */\n clearCache() {\n this.cache.clear();\n }\n\n /**\n * Cache a set of keys. This will overwrite any existing keys with the same keyId. The user can check if a keyId\n * exists in the cache using the containsKeys method prior to calling this method if overwriting is not desired.\n *\n * @param {string} keyId access key for the cache\n * @param {FunctionKeyPair} keys keys to cache\n */\n cacheKeys(keyId: string, keys: FunctionKeyPair) {\n const [provingKey, verifyingKey] = keys;\n this.cache.set(keyId, [provingKey.toBytes(), verifyingKey.toBytes()]);\n }\n\n /**\n * Determine if a keyId exists in the cache\n *\n * @param {string} keyId keyId of a proving and verifying key pair\n * @returns {boolean} true if the keyId exists in the cache, false otherwise\n */\n containsKeys(keyId: string): boolean {\n return this.cache.has(keyId)\n }\n\n /**\n * Delete a set of keys from the cache\n *\n * @param {string} keyId keyId of a proving and verifying key pair to delete from memory\n * @returns {boolean} true if the keyId exists in the cache and was deleted, false if the key did not exist\n */\n deleteKeys(keyId: string): boolean {\n return this.cache.delete(keyId)\n }\n\n /**\n * Get a set of keys from the cache\n * @param keyId keyId of a proving and verifying key pair\n *\n * @returns {FunctionKeyPair | Error} Proving and verifying keys for the specified program\n */\n getKeys(keyId: string): FunctionKeyPair | Error {\n console.debug(`Checking if key exists in cache. KeyId: ${keyId}`)\n if (this.cache.has(keyId)) {\n const [provingKeyBytes, verifyingKeyBytes] = this.cache.get(keyId);\n return [ProvingKey.fromBytes(provingKeyBytes), VerifyingKey.fromBytes(verifyingKeyBytes)];\n } else {\n return new Error(\"Key not found in cache.\");\n }\n }\n\n /**\n * Get arbitrary function keys from a provider\n *\n * @param {KeySearchParams} params parameters for the key search in form of: {proverUri: string, verifierUri: string, cacheKey: string}\n * @returns {Promise} Proving and verifying keys for the specified program\n *\n * @example\n * // Create a new object which implements the KeyProvider interface\n * const networkClient = new AleoNetworkClient(\"https://api.explorer.aleo.org/v1\");\n * const keyProvider = new AleoKeyProvider();\n * const recordProvider = new NetworkRecordProvider(account, networkClient);\n *\n * // Initialize a program manager with the key provider to automatically fetch keys for value transfers\n * const programManager = new ProgramManager(\"https://api.explorer.aleo.org/v1\", keyProvider, recordProvider);\n * programManager.transfer(1, \"aleo166q6ww6688cug7qxwe7nhctjpymydwzy2h7rscfmatqmfwnjvggqcad0at\", \"public\", 0.5);\n *\n * // Keys can also be fetched manually using the key provider\n * const keySearchParams = { \"cacheKey\": \"myProgram:myFunction\" };\n * const [transferPrivateProvingKey, transferPrivateVerifyingKey] = await keyProvider.functionKeys(keySearchParams);\n */\n async functionKeys(params?: KeySearchParams): Promise {\n if (params) {\n let proverUrl;\n let verifierUrl;\n let cacheKey;\n if (\"name\" in params && typeof params[\"name\"] == \"string\") {\n let key = CREDITS_PROGRAM_KEYS.getKey(params[\"name\"]);\n if (!(key instanceof Error)) {\n return this.fetchCreditsKeys(key);\n }\n }\n\n if (\"proverUri\" in params && typeof params[\"proverUri\"] == \"string\") {\n proverUrl = params[\"proverUri\"];\n }\n\n if (\"verifierUri\" in params && typeof params[\"verifierUri\"] == \"string\") {\n verifierUrl = params[\"verifierUri\"];\n }\n\n if (\"cacheKey\" in params && typeof params[\"cacheKey\"] == \"string\") {\n cacheKey = params[\"cacheKey\"];\n }\n\n if (proverUrl && verifierUrl) {\n return await this.fetchRemoteKeys(proverUrl, verifierUrl, cacheKey);\n }\n\n if (cacheKey) {\n return this.getKeys(cacheKey);\n }\n }\n throw Error(\"Invalid parameters provided, must provide either a cacheKey and/or a proverUrl and a verifierUrl\");\n }\n\n /**\n * Returns the proving and verifying keys for a specified program from a specified url.\n *\n * @param {string} verifierUrl Url of the proving key\n * @param {string} proverUrl Url the verifying key\n * @param {string} cacheKey Key to store the keys in the cache\n *\n * @returns {Promise} Proving and verifying keys for the specified program\n *\n * @example\n * // Create a new AleoKeyProvider object\n * const networkClient = new AleoNetworkClient(\"https://api.explorer.aleo.org/v1\");\n * const keyProvider = new AleoKeyProvider();\n * const recordProvider = new NetworkRecordProvider(account, networkClient);\n *\n * // Initialize a program manager with the key provider to automatically fetch keys for value transfers\n * const programManager = new ProgramManager(\"https://api.explorer.aleo.org/v1\", keyProvider, recordProvider);\n * programManager.transfer(1, \"aleo166q6ww6688cug7qxwe7nhctjpymydwzy2h7rscfmatqmfwnjvggqcad0at\", \"public\", 0.5);\n *\n * // Keys can also be fetched manually\n * const [transferPrivateProvingKey, transferPrivateVerifyingKey] = await keyProvider.fetchKeys(\n * CREDITS_PROGRAM_KEYS.transfer_private.prover,\n * CREDITS_PROGRAM_KEYS.transfer_private.verifier,\n * );\n */\n async fetchRemoteKeys(proverUrl: string, verifierUrl: string, cacheKey?: string): Promise {\n try {\n // If cache is enabled, check if the keys have already been fetched and return them if they have\n if (this.cacheOption) {\n if (!cacheKey) {\n cacheKey = proverUrl;\n }\n const value = this.cache.get(cacheKey);\n if (typeof value !== \"undefined\") {\n return [ProvingKey.fromBytes(value[0]), VerifyingKey.fromBytes(value[1])];\n } else {\n console.debug(\"Fetching proving keys from url \" + proverUrl);\n const provingKey = ProvingKey.fromBytes(await this.fetchBytes(proverUrl))\n console.debug(\"Fetching verifying keys \" + verifierUrl);\n const verifyingKey = (await this.getVerifyingKey(verifierUrl));\n this.cache.set(cacheKey, [provingKey.toBytes(), verifyingKey.toBytes()]);\n return [provingKey, verifyingKey];\n }\n }\n else {\n // If cache is disabled, fetch the keys and return them\n const provingKey = ProvingKey.fromBytes(await this.fetchBytes(proverUrl))\n const verifyingKey = (await this.getVerifyingKey(verifierUrl));\n return [provingKey, verifyingKey];\n }\n } catch (error) {\n throw new Error(`Error: ${error} fetching fee proving and verifying keys from ${proverUrl} and ${verifierUrl}.`);\n }\n }\n\n /***\n * Fetches the proving key from a remote source.\n *\n * @param proverUrl\n * @param cacheKey\n *\n * @returns {Promise} Proving key for the specified program\n */\n async fetchProvingKey(proverUrl: string, cacheKey?: string): Promise {\n try {\n // If cache is enabled, check if the keys have already been fetched and return them if they have\n if (this.cacheOption) {\n if (!cacheKey) {\n cacheKey = proverUrl;\n }\n const value = this.cache.get(cacheKey);\n if (typeof value !== \"undefined\") {\n return ProvingKey.fromBytes(value[0]);\n } else {\n console.debug(\"Fetching proving keys from url \" + proverUrl);\n const provingKey = ProvingKey.fromBytes(await this.fetchBytes(proverUrl));\n return provingKey;\n }\n }\n else {\n const provingKey = ProvingKey.fromBytes(await this.fetchBytes(proverUrl));\n return provingKey;\n }\n } catch (error) {\n throw new Error(`Error: ${error} fetching fee proving keys from ${proverUrl}`);\n }\n }\n\n async fetchCreditsKeys(key: Key): Promise {\n try {\n if (!this.cache.has(key.locator) || !this.cacheOption) {\n const verifying_key = key.verifyingKey()\n const proving_key = await this.fetchProvingKey(key.prover, key.locator);\n if (this.cacheOption) {\n this.cache.set(CREDITS_PROGRAM_KEYS.bond_public.locator, [proving_key.toBytes(), verifying_key.toBytes()]);\n }\n return [proving_key, verifying_key];\n } else {\n const keyPair = this.cache.get(key.locator);\n return [ProvingKey.fromBytes(keyPair[0]), VerifyingKey.fromBytes(keyPair[1])];\n }\n } catch (error) {\n throw new Error(`Error: fetching credits.aleo keys: ${error}`);\n }\n }\n\n async bondPublicKeys(): Promise {\n return this.fetchCreditsKeys(CREDITS_PROGRAM_KEYS.bond_public);\n }\n\n bondValidatorKeys(): Promise {\n return this.fetchCreditsKeys(CREDITS_PROGRAM_KEYS.bond_validator);\n }\n\n claimUnbondPublicKeys(): Promise {\n return this.fetchCreditsKeys(CREDITS_PROGRAM_KEYS.claim_unbond_public)\n }\n\n /**\n * Returns the proving and verifying keys for the transfer functions in the credits.aleo program\n * @param {string} visibility Visibility of the transfer function\n * @returns {Promise} Proving and verifying keys for the transfer functions\n *\n * @example\n * // Create a new AleoKeyProvider\n * const networkClient = new AleoNetworkClient(\"https://api.explorer.aleo.org/v1\");\n * const keyProvider = new AleoKeyProvider();\n * const recordProvider = new NetworkRecordProvider(account, networkClient);\n *\n * // Initialize a program manager with the key provider to automatically fetch keys for value transfers\n * const programManager = new ProgramManager(\"https://api.explorer.aleo.org/v1\", keyProvider, recordProvider);\n * programManager.transfer(1, \"aleo166q6ww6688cug7qxwe7nhctjpymydwzy2h7rscfmatqmfwnjvggqcad0at\", \"public\", 0.5);\n *\n * // Keys can also be fetched manually\n * const [transferPublicProvingKey, transferPublicVerifyingKey] = await keyProvider.transferKeys(\"public\");\n */\n async transferKeys(visibility: string): Promise {\n if (PRIVATE_TRANSFER.has(visibility)) {\n return await this.fetchCreditsKeys(CREDITS_PROGRAM_KEYS.transfer_private);\n } else if (PRIVATE_TO_PUBLIC_TRANSFER.has(visibility)) {\n return await this.fetchCreditsKeys(CREDITS_PROGRAM_KEYS.transfer_private_to_public);\n } else if (PUBLIC_TRANSFER.has(visibility)) {\n return await this.fetchCreditsKeys(CREDITS_PROGRAM_KEYS.transfer_public);\n } else if (PUBLIC_TRANSFER_AS_SIGNER.has(visibility)) {\n return await this.fetchCreditsKeys(CREDITS_PROGRAM_KEYS.transfer_public_as_signer);\n } else if (PUBLIC_TO_PRIVATE_TRANSFER.has(visibility)) {\n return await this.fetchCreditsKeys(CREDITS_PROGRAM_KEYS.transfer_public_to_private);\n } else {\n throw new Error(\"Invalid visibility type\");\n }\n }\n\n /**\n * Returns the proving and verifying keys for the join function in the credits.aleo program\n *\n * @returns {Promise} Proving and verifying keys for the join function\n */\n async joinKeys(): Promise {\n return await this.fetchCreditsKeys(CREDITS_PROGRAM_KEYS.join);\n }\n\n /**\n * Returns the proving and verifying keys for the split function in the credits.aleo program\n *\n * @returns {Promise} Proving and verifying keys for the split function\n * */\n async splitKeys(): Promise {\n return await this.fetchCreditsKeys(CREDITS_PROGRAM_KEYS.split);\n }\n\n /**\n * Returns the proving and verifying keys for the fee_private function in the credits.aleo program\n *\n * @returns {Promise} Proving and verifying keys for the fee function\n */\n async feePrivateKeys(): Promise {\n return await this.fetchCreditsKeys(CREDITS_PROGRAM_KEYS.fee_private);\n }\n\n /**\n * Returns the proving and verifying keys for the fee_public function in the credits.aleo program\n *\n * @returns {Promise} Proving and verifying keys for the fee function\n */\n async feePublicKeys(): Promise {\n return await this.fetchCreditsKeys(CREDITS_PROGRAM_KEYS.fee_public);\n }\n\n /**\n * Gets a verifying key. If the verifying key is for a credits.aleo function, get it from the wasm cache otherwise\n *\n * @returns {Promise} Verifying key for the function\n */\n // attempt to fetch it from the network\n async getVerifyingKey(verifierUri: string): Promise {\n switch (verifierUri) {\n case CREDITS_PROGRAM_KEYS.bond_public.verifier:\n return CREDITS_PROGRAM_KEYS.bond_public.verifyingKey();\n case CREDITS_PROGRAM_KEYS.bond_validator.verifier:\n return CREDITS_PROGRAM_KEYS.bond_validator.verifyingKey();\n case CREDITS_PROGRAM_KEYS.claim_unbond_public.verifier:\n return CREDITS_PROGRAM_KEYS.claim_unbond_public.verifyingKey();\n case CREDITS_PROGRAM_KEYS.fee_private.verifier:\n return CREDITS_PROGRAM_KEYS.fee_private.verifyingKey();\n case CREDITS_PROGRAM_KEYS.fee_public.verifier:\n return CREDITS_PROGRAM_KEYS.fee_public.verifyingKey();\n case CREDITS_PROGRAM_KEYS.inclusion.verifier:\n return CREDITS_PROGRAM_KEYS.inclusion.verifyingKey();\n case CREDITS_PROGRAM_KEYS.join.verifier:\n return CREDITS_PROGRAM_KEYS.join.verifyingKey();\n case CREDITS_PROGRAM_KEYS.set_validator_state.verifier:\n return CREDITS_PROGRAM_KEYS.set_validator_state.verifyingKey();\n case CREDITS_PROGRAM_KEYS.split.verifier:\n return CREDITS_PROGRAM_KEYS.split.verifyingKey();\n case CREDITS_PROGRAM_KEYS.transfer_private.verifier:\n return CREDITS_PROGRAM_KEYS.transfer_private.verifyingKey();\n case CREDITS_PROGRAM_KEYS.transfer_private_to_public.verifier:\n return CREDITS_PROGRAM_KEYS.transfer_private_to_public.verifyingKey();\n case CREDITS_PROGRAM_KEYS.transfer_public.verifier:\n return CREDITS_PROGRAM_KEYS.transfer_public.verifyingKey();\n case CREDITS_PROGRAM_KEYS.transfer_public_as_signer.verifier:\n return CREDITS_PROGRAM_KEYS.transfer_public_as_signer.verifyingKey();\n case CREDITS_PROGRAM_KEYS.transfer_public_to_private.verifier:\n return CREDITS_PROGRAM_KEYS.transfer_public_to_private.verifyingKey();\n case CREDITS_PROGRAM_KEYS.unbond_public.verifier:\n return CREDITS_PROGRAM_KEYS.unbond_public.verifyingKey();\n default:\n try {\n /// Try to fetch the verifying key from the network as a string\n const response = await get(verifierUri);\n const text = await response.text();\n return VerifyingKey.fromString(text);\n } catch (e) {\n /// If that fails, try to fetch the verifying key from the network as bytes\n try {\n return VerifyingKey.fromBytes(await this.fetchBytes(verifierUri));\n } catch (inner) {\n return new Error(\"Invalid verifying key. Error: \" + inner);\n }\n }\n }\n }\n\n unBondPublicKeys(): Promise {\n return this.fetchCreditsKeys(CREDITS_PROGRAM_KEYS.unbond_public);\n }\n}\n\nexport {AleoKeyProvider, AleoKeyProviderParams, AleoKeyProviderInitParams, CachedKeyPair, FunctionKeyPair, FunctionKeyProvider, KeySearchParams}\n","import {\n Account,\n AleoKeyProvider,\n AleoNetworkClient,\n ExecutionResponse,\n FunctionKeyProvider,\n FunctionKeyPair,\n OfflineQuery,\n KeySearchParams,\n RecordPlaintext,\n RecordProvider,\n RecordSearchParams,\n PrivateKey,\n Program,\n ProgramImports,\n ProvingKey,\n VerifyingKey,\n Transaction,\n PRIVATE_TRANSFER_TYPES,\n VALID_TRANSFER_TYPES,\n logAndThrow,\n ProgramManagerBase as WasmProgramManager, verifyFunctionExecution, AleoKeyProviderParams, CREDITS_PROGRAM_KEYS,\n} from \"./index\";\nimport {Execution} from \"@provablehq/wasm/dist/crates/aleo_wasm\";\n\n/**\n * Represents the options for executing a transaction in the Aleo network.\n * This interface is used to specify the parameters required for building and submitting an execution transaction.\n *\n * @property {string} programName - The name of the program containing the function to be executed.\n * @property {string} functionName - The name of the function to execute within the program.\n * @property {number} fee - The fee to be paid for the transaction.\n * @property {boolean} privateFee - If true, uses a private record to pay the fee; otherwise, uses the account's public credit balance.\n * @property {string[]} inputs - The inputs to the function being executed.\n * @property {RecordSearchParams} [recordSearchParams] - Optional parameters for searching for a record to pay the execution transaction fee.\n * @property {KeySearchParams} [keySearchParams] - Optional parameters for finding the matching proving & verifying keys for the function.\n * @property {string | RecordPlaintext} [feeRecord] - Optional fee record to use for the transaction.\n * @property {ProvingKey} [provingKey] - Optional proving key to use for the transaction.\n * @property {VerifyingKey} [verifyingKey] - Optional verifying key to use for the transaction.\n * @property {PrivateKey} [privateKey] - Optional private key to use for the transaction.\n * @property {OfflineQuery} [offlineQuery] - Optional offline query if creating transactions in an offline environment.\n * @property {string | Program} [program] - Optional program source code to use for the transaction.\n * @property {ProgramImports} [imports] - Optional programs that the program being executed imports.\n */\ninterface ExecuteOptions {\n programName: string;\n functionName: string;\n fee: number;\n privateFee: boolean;\n inputs: string[];\n recordSearchParams?: RecordSearchParams;\n keySearchParams?: KeySearchParams;\n feeRecord?: string | RecordPlaintext;\n provingKey?: ProvingKey;\n verifyingKey?: VerifyingKey;\n privateKey?: PrivateKey;\n offlineQuery?: OfflineQuery;\n program?: string | Program;\n imports?: ProgramImports;\n}\n\n/**\n * The ProgramManager class is used to execute and deploy programs on the Aleo network and create value transfers.\n */\nclass ProgramManager {\n account: Account | undefined;\n keyProvider: FunctionKeyProvider;\n host: string;\n networkClient: AleoNetworkClient;\n recordProvider: RecordProvider | undefined;\n\n /** Create a new instance of the ProgramManager\n *\n * @param { string | undefined } host A host uri running the official Aleo API\n * @param { FunctionKeyProvider | undefined } keyProvider A key provider that implements {@link FunctionKeyProvider} interface\n * @param { RecordProvider | undefined } recordProvider A record provider that implements {@link RecordProvider} interface\n */\n constructor(host?: string | undefined, keyProvider?: FunctionKeyProvider | undefined, recordProvider?: RecordProvider | undefined) {\n this.host = host ? host : 'https://api.explorer.aleo.org/v1';\n this.networkClient = new AleoNetworkClient(this.host);\n \n this.keyProvider = keyProvider ? keyProvider : new AleoKeyProvider();\n this.recordProvider = recordProvider;\n }\n\n /**\n * Set the account to use for transaction submission to the Aleo network\n *\n * @param {Account} account Account to use for transaction submission\n */\n setAccount(account: Account) {\n this.account = account;\n }\n\n /**\n * Set the key provider that provides the proving and verifying keys for programs\n *\n * @param {FunctionKeyProvider} keyProvider\n */\n setKeyProvider(keyProvider: FunctionKeyProvider) {\n this.keyProvider = keyProvider;\n }\n\n /**\n * Set the host peer to use for transaction submission to the Aleo network\n *\n * @param host {string} Peer url to use for transaction submission\n */\n setHost(host: string) {\n this.host = host;\n this.networkClient.setHost(host);\n }\n\n /**\n * Set the record provider that provides records for transactions\n *\n * @param {RecordProvider} recordProvider\n */\n setRecordProvider(recordProvider: RecordProvider) {\n this.recordProvider = recordProvider;\n }\n\n /**\n * Deploy an Aleo program to the Aleo network\n *\n * @param {string} program Program source code\n * @param {number} fee Fee to pay for the transaction\n * @param {boolean} privateFee Use a private record to pay the fee. If false this will use the account's public credit balance\n * @param {RecordSearchParams | undefined} recordSearchParams Optional parameters for searching for a record to use\n * pay the deployment fee\n * @param {string | RecordPlaintext | undefined} feeRecord Optional Fee record to use for the transaction\n * @param {PrivateKey | undefined} privateKey Optional private key to use for the transaction\n * @returns {string | Error} The transaction id of the deployed program or a failure message from the network\n *\n * @example\n * // Create a new NetworkClient, KeyProvider, and RecordProvider\n * const networkClient = new AleoNetworkClient(\"https://api.explorer.aleo.org/v1\");\n * const keyProvider = new AleoKeyProvider();\n * const recordProvider = new NetworkRecordProvider(account, networkClient);\n *\n * // Initialize a program manager with the key provider to automatically fetch keys for deployments\n * const program = \"program hello_hello.aleo;\\n\\nfunction hello:\\n input r0 as u32.public;\\n input r1 as u32.private;\\n add r0 r1 into r2;\\n output r2 as u32.private;\\n\";\n * const programManager = new ProgramManager(\"https://api.explorer.aleo.org/v1\", keyProvider, recordProvider);\n *\n * // Define a fee in credits\n * const fee = 1.2;\n *\n * // Deploy the program\n * const tx_id = await programManager.deploy(program, fee);\n *\n * // Verify the transaction was successful\n * const transaction = await programManager.networkClient.getTransaction(tx_id);\n */\n async deploy(\n program: string,\n fee: number,\n privateFee: boolean,\n recordSearchParams?: RecordSearchParams,\n feeRecord?: string | RecordPlaintext,\n privateKey?: PrivateKey,\n ): Promise {\n // Ensure the program is valid and does not exist on the network\n try {\n const programObject = Program.fromString(program);\n let programSource;\n try {\n programSource = await this.networkClient.getProgram(programObject.id());\n } catch (e) {\n // Program does not exist on the network, deployment can proceed\n console.log(`Program ${programObject.id()} does not exist on the network, deploying...`);\n }\n if (typeof programSource == \"string\") {\n throw (`Program ${programObject.id()} already exists on the network, please rename your program`);\n }\n } catch (e) {\n throw logAndThrow(`Error validating program: ${e}`);\n }\n\n // Get the private key from the account if it is not provided in the parameters\n let deploymentPrivateKey = privateKey;\n if (typeof privateKey === \"undefined\" && typeof this.account !== \"undefined\") {\n deploymentPrivateKey = this.account.privateKey();\n }\n\n if (typeof deploymentPrivateKey === \"undefined\") {\n throw(\"No private key provided and no private key set in the ProgramManager\");\n }\n\n // Get the fee record from the account if it is not provided in the parameters\n try {\n feeRecord = privateFee ? await this.getCreditsRecord(fee, [], feeRecord, recordSearchParams) : undefined;\n } catch (e) {\n throw logAndThrow(`Error finding fee record. Record finder response: '${e}'. Please ensure you're connected to a valid Aleo network and a record with enough balance exists.`);\n }\n\n // Get the proving and verifying keys from the key provider\n let feeKeys;\n try {\n feeKeys = privateFee ? await this.keyProvider.feePrivateKeys() : await this.keyProvider.feePublicKeys();\n } catch (e) {\n throw logAndThrow(`Error finding fee keys. Key finder response: '${e}'. Please ensure your key provider is configured correctly.`);\n }\n const [feeProvingKey, feeVerifyingKey] = feeKeys;\n\n // Resolve the program imports if they exist\n let imports;\n try {\n imports = await this.networkClient.getProgramImports(program);\n } catch (e) {\n throw logAndThrow(`Error finding program imports. Network response: '${e}'. Please ensure you're connected to a valid Aleo network and the program is deployed to the network.`);\n }\n\n // Build a deployment transaction and submit it to the network\n const tx = await WasmProgramManager.buildDeploymentTransaction(deploymentPrivateKey, program, fee, feeRecord, this.host, imports, feeProvingKey, feeVerifyingKey);\n return await this.networkClient.submitTransaction(tx);\n }\n\n /**\n * Builds an execution transaction for submission to the Aleo network.\n *\n * @param {ExecuteOptions} options - The options for the execution transaction.\n * @returns {Promise} - A promise that resolves to the transaction or an error.\n *\n * @example\n * // Create a new NetworkClient, KeyProvider, and RecordProvider using official Aleo record, key, and network providers\n * const networkClient = new AleoNetworkClient(\"https://api.explorer.aleo.org/v1\");\n * const keyProvider = new AleoKeyProvider();\n * keyProvider.useCache = true;\n * const recordProvider = new NetworkRecordProvider(account, networkClient);\n *\n * // Initialize a program manager with the key provider to automatically fetch keys for executions\n * const programManager = new ProgramManager(\"https://api.explorer.aleo.org/v1\", keyProvider, recordProvider);\n *\n * // Build and execute the transaction\n * const transaction = await programManager.buildExecutionTransaction({\n * programName: \"hello_hello.aleo\",\n * functionName: \"hello_hello\",\n * fee: 0.020,\n * privateFee: false,\n * inputs: [\"5u32\", \"5u32\"],\n * keySearchParams: { \"cacheKey\": \"hello_hello:hello\" }\n * });\n * const result = await programManager.networkClient.submitTransaction(transaction);\n */\n async buildExecutionTransaction(options: ExecuteOptions): Promise {\n // Destructure the options object to access the parameters\n const {\n programName,\n functionName,\n fee,\n privateFee,\n inputs,\n recordSearchParams,\n keySearchParams,\n privateKey,\n offlineQuery\n } = options;\n\n let feeRecord = options.feeRecord;\n let provingKey = options.provingKey;\n let verifyingKey = options.verifyingKey;\n let program = options.program;\n let imports = options.imports;\n\n // Ensure the function exists on the network\n if (program === undefined) {\n try {\n program = (await this.networkClient.getProgram(programName));\n } catch (e) {\n throw logAndThrow(`Error finding ${programName}. Network response: '${e}'. Please ensure you're connected to a valid Aleo network the program is deployed to the network.`);\n }\n } else if (program instanceof Program) {\n program = program.toString();\n }\n\n // Get the private key from the account if it is not provided in the parameters\n let executionPrivateKey = privateKey;\n if (typeof privateKey === \"undefined\" && typeof this.account !== \"undefined\") {\n executionPrivateKey = this.account.privateKey();\n }\n\n if (typeof executionPrivateKey === \"undefined\") {\n throw(\"No private key provided and no private key set in the ProgramManager\");\n }\n\n // Get the fee record from the account if it is not provided in the parameters\n try {\n feeRecord = privateFee ? await this.getCreditsRecord(fee, [], feeRecord, recordSearchParams) : undefined;\n } catch (e) {\n throw logAndThrow(`Error finding fee record. Record finder response: '${e}'. Please ensure you're connected to a valid Aleo network and a record with enough balance exists.`);\n }\n\n // Get the fee proving and verifying keys from the key provider\n let feeKeys;\n try {\n feeKeys = privateFee ? await this.keyProvider.feePrivateKeys() : await this.keyProvider.feePublicKeys();\n } catch (e) {\n throw logAndThrow(`Error finding fee keys. Key finder response: '${e}'. Please ensure your key provider is configured correctly.`);\n }\n const [feeProvingKey, feeVerifyingKey] = feeKeys;\n\n // If the function proving and verifying keys are not provided, attempt to find them using the key provider\n if (!provingKey || !verifyingKey) {\n try {\n [provingKey, verifyingKey] = await this.keyProvider.functionKeys(keySearchParams);\n } catch (e) {\n console.log(`Function keys not found. Key finder response: '${e}'. The function keys will be synthesized`)\n }\n }\n\n // Resolve the program imports if they exist\n const numberOfImports = Program.fromString(program).getImports().length;\n if (numberOfImports > 0 && !imports) {\n try {\n imports = await this.networkClient.getProgramImports(programName);\n } catch (e) {\n throw logAndThrow(`Error finding program imports. Network response: '${e}'. Please ensure you're connected to a valid Aleo network and the program is deployed to the network.`);\n }\n }\n\n // Build an execution transaction and submit it to the network\n return await WasmProgramManager.buildExecutionTransaction(executionPrivateKey, program, functionName, inputs, fee, feeRecord, this.host, imports, provingKey, verifyingKey, feeProvingKey, feeVerifyingKey, offlineQuery);\n }\n\n /**\n * Builds an execution transaction for submission to the Aleo network.\n *\n * @param {ExecuteOptions} options - The options for the execution transaction.\n * @returns {Promise} - A promise that resolves to the transaction or an error.\n *\n * @example\n * // Create a new NetworkClient, KeyProvider, and RecordProvider using official Aleo record, key, and network providers\n * const networkClient = new AleoNetworkClient(\"https://api.explorer.aleo.org/v1\");\n * const keyProvider = new AleoKeyProvider();\n * keyProvider.useCache = true;\n * const recordProvider = new NetworkRecordProvider(account, networkClient);\n *\n * // Initialize a program manager with the key provider to automatically fetch keys for executions\n * const programManager = new ProgramManager(\"https://api.explorer.aleo.org/v1\", keyProvider, recordProvider);\n *\n * // Build and execute the transaction\n * const transaction = await programManager.execute({\n * programName: \"hello_hello.aleo\",\n * functionName: \"hello_hello\",\n * fee: 0.020,\n * privateFee: false,\n * inputs: [\"5u32\", \"5u32\"],\n * keySearchParams: { \"cacheKey\": \"hello_hello:hello\" }\n * });\n * const result = await programManager.networkClient.submitTransaction(transaction);\n */\n async execute(options: ExecuteOptions): Promise {\n const tx = await this.buildExecutionTransaction(options);\n return await this.networkClient.submitTransaction(tx);\n }\n\n /**\n * Run an Aleo program in offline mode\n *\n * @param {string} program Program source code containing the function to be executed\n * @param {string} function_name Function name to execute\n * @param {string[]} inputs Inputs to the function\n * @param {number} proveExecution Whether to prove the execution of the function and return an execution transcript\n * that contains the proof.\n * @param {string[] | undefined} imports Optional imports to the program\n * @param {KeySearchParams | undefined} keySearchParams Optional parameters for finding the matching proving &\n * verifying keys for the function\n * @param {ProvingKey | undefined} provingKey Optional proving key to use for the transaction\n * @param {VerifyingKey | undefined} verifyingKey Optional verifying key to use for the transaction\n * @param {PrivateKey | undefined} privateKey Optional private key to use for the transaction\n * @param {OfflineQuery | undefined} offlineQuery Optional offline query if creating transactions in an offline environment\n * @returns {Promise}\n *\n * @example\n * import { Account, Program } from '@provablehq/sdk';\n *\n * /// Create the source for the \"helloworld\" program\n * const program = \"program helloworld.aleo;\\n\\nfunction hello:\\n input r0 as u32.public;\\n input r1 as u32.private;\\n add r0 r1 into r2;\\n output r2 as u32.private;\\n\";\n * const programManager = new ProgramManager();\n *\n * /// Create a temporary account for the execution of the program\n * const account = new Account();\n * programManager.setAccount(account);\n *\n * /// Get the response and ensure that the program executed correctly\n * const executionResponse = await programManager.run(program, \"hello\", [\"5u32\", \"5u32\"]);\n * const result = executionResponse.getOutputs();\n * assert(result === [\"10u32\"]);\n */\n async run(\n program: string,\n function_name: string,\n inputs: string[],\n proveExecution: boolean,\n imports?: ProgramImports,\n keySearchParams?: KeySearchParams,\n provingKey?: ProvingKey,\n verifyingKey?: VerifyingKey,\n privateKey?: PrivateKey,\n offlineQuery?: OfflineQuery,\n ): Promise {\n // Get the private key from the account if it is not provided in the parameters\n let executionPrivateKey = privateKey;\n if (typeof privateKey === \"undefined\" && typeof this.account !== \"undefined\") {\n executionPrivateKey = this.account.privateKey();\n }\n\n if (typeof executionPrivateKey === \"undefined\") {\n throw(\"No private key provided and no private key set in the ProgramManager\");\n }\n\n // If the function proving and verifying keys are not provided, attempt to find them using the key provider\n if (!provingKey || !verifyingKey) {\n try {\n [provingKey, verifyingKey] = await this.keyProvider.functionKeys(keySearchParams);\n } catch (e) {\n console.log(`Function keys not found. Key finder response: '${e}'. The function keys will be synthesized`)\n }\n }\n\n // Run the program offline and return the result\n console.log(\"Running program offline\")\n console.log(\"Proving key: \", provingKey);\n console.log(\"Verifying key: \", verifyingKey);\n return WasmProgramManager.executeFunctionOffline(executionPrivateKey, program, function_name, inputs, proveExecution, false, imports, provingKey, verifyingKey, this.host, offlineQuery);\n }\n\n /**\n * Join two credits records into a single credits record\n *\n * @param {RecordPlaintext | string} recordOne First credits record to join\n * @param {RecordPlaintext | string} recordTwo Second credits record to join\n * @param {number} fee Fee in credits pay for the join transaction\n * @param {boolean} privateFee Use a private record to pay the fee. If false this will use the account's public credit balance\n * @param {RecordSearchParams | undefined} recordSearchParams Optional parameters for finding the fee record to use\n * to pay the fee for the join transaction\n * @param {RecordPlaintext | string | undefined} feeRecord Fee record to use for the join transaction\n * @param {PrivateKey | undefined} privateKey Private key to use for the join transaction\n * @param {OfflineQuery | undefined} offlineQuery Optional offline query if creating transactions in an offline environment\n * @returns {Promise}\n */\n async join(\n recordOne: RecordPlaintext | string,\n recordTwo: RecordPlaintext | string,\n fee: number,\n privateFee: boolean,\n recordSearchParams?: RecordSearchParams | undefined,\n feeRecord?: RecordPlaintext | string | undefined,\n privateKey?: PrivateKey,\n offlineQuery?: OfflineQuery,\n ): Promise {\n // Get the private key from the account if it is not provided in the parameters\n let executionPrivateKey = privateKey;\n if (typeof privateKey === \"undefined\" && typeof this.account !== \"undefined\") {\n executionPrivateKey = this.account.privateKey();\n }\n\n if (typeof executionPrivateKey === \"undefined\") {\n throw(\"No private key provided and no private key set in the ProgramManager\");\n }\n\n // Get the proving and verifying keys from the key provider\n let feeKeys;\n let joinKeys\n try {\n feeKeys = privateFee ? await this.keyProvider.feePrivateKeys() : await this.keyProvider.feePublicKeys();\n joinKeys = await this.keyProvider.joinKeys();\n } catch (e) {\n throw logAndThrow(`Error finding fee keys. Key finder response: '${e}'. Please ensure your key provider is configured correctly.`);\n }\n const [feeProvingKey, feeVerifyingKey] = feeKeys;\n const [joinProvingKey, joinVerifyingKey] = joinKeys;\n\n // Get the fee record from the account if it is not provided in the parameters\n try {\n feeRecord = privateFee ? await this.getCreditsRecord(fee, [], feeRecord, recordSearchParams) : undefined;\n } catch (e) {\n throw logAndThrow(`Error finding fee record. Record finder response: '${e}'. Please ensure you're connected to a valid Aleo network and a record with enough balance exists.`);\n }\n\n // Validate the records provided are valid plaintext records\n try {\n recordOne = recordOne instanceof RecordPlaintext ? recordOne : RecordPlaintext.fromString(recordOne);\n recordTwo = recordTwo instanceof RecordPlaintext ? recordTwo : RecordPlaintext.fromString(recordTwo);\n } catch (e) {\n throw logAndThrow('Records provided are not valid. Please ensure they are valid plaintext records.')\n }\n\n // Build an execution transaction and submit it to the network\n const tx = await WasmProgramManager.buildJoinTransaction(executionPrivateKey, recordOne, recordTwo, fee, feeRecord, this.host, joinProvingKey, joinVerifyingKey, feeProvingKey, feeVerifyingKey, offlineQuery);\n return await this.networkClient.submitTransaction(tx);\n }\n\n /**\n * Split credits into two new credits records\n *\n * @param {number} splitAmount Amount in microcredits to split from the original credits record\n * @param {RecordPlaintext | string} amountRecord Amount record to use for the split transaction\n * @param {PrivateKey | undefined} privateKey Optional private key to use for the split transaction\n * @param {OfflineQuery | undefined} offlineQuery Optional offline query if creating transactions in an offline environment\n * @returns {Promise}\n *\n * @example\n * // Create a new NetworkClient, KeyProvider, and RecordProvider\n * const networkClient = new AleoNetworkClient(\"https://api.explorer.aleo.org/v1\");\n * const keyProvider = new AleoKeyProvider();\n * const recordProvider = new NetworkRecordProvider(account, networkClient);\n *\n * // Initialize a program manager with the key provider to automatically fetch keys for executions\n * const programName = \"hello_hello.aleo\";\n * const programManager = new ProgramManager(\"https://api.explorer.aleo.org/v1\", keyProvider, recordProvider);\n * const record = \"{ owner: aleo184vuwr5u7u0ha5f5k44067dd2uaqewxx6pe5ltha5pv99wvhfqxqv339h4.private, microcredits: 45000000u64.private, _nonce: 4106205762862305308495708971985748592380064201230396559307556388725936304984group.public}\"\n * const tx_id = await programManager.split(25000000, record);\n * const transaction = await programManager.networkClient.getTransaction(tx_id);\n */\n async split(splitAmount: number, amountRecord: RecordPlaintext | string, privateKey?: PrivateKey, offlineQuery?: OfflineQuery): Promise {\n // Get the private key from the account if it is not provided in the parameters\n let executionPrivateKey = privateKey;\n if (typeof executionPrivateKey === \"undefined\" && typeof this.account !== \"undefined\") {\n executionPrivateKey = this.account.privateKey();\n }\n\n if (typeof executionPrivateKey === \"undefined\") {\n throw(\"No private key provided and no private key set in the ProgramManager\");\n }\n\n // Get the split keys from the key provider\n let splitKeys;\n try {\n splitKeys = await this.keyProvider.splitKeys();\n } catch (e) {\n throw logAndThrow(`Error finding fee keys. Key finder response: '${e}'. Please ensure your key provider is configured correctly.`);\n }\n const [splitProvingKey, splitVerifyingKey] = splitKeys;\n\n // Validate the record to be split\n try {\n amountRecord = amountRecord instanceof RecordPlaintext ? amountRecord : RecordPlaintext.fromString(amountRecord);\n } catch (e) {\n throw logAndThrow(\"Record provided is not valid. Please ensure it is a valid plaintext record.\");\n }\n\n // Build an execution transaction and submit it to the network\n const tx = await WasmProgramManager.buildSplitTransaction(executionPrivateKey, splitAmount, amountRecord, this.host, splitProvingKey, splitVerifyingKey, offlineQuery);\n return await this.networkClient.submitTransaction(tx);\n }\n\n /**\n * Pre-synthesize proving and verifying keys for a program\n *\n * @param program {string} The program source code to synthesize keys for\n * @param function_id {string} The function id to synthesize keys for\n * @param inputs {Array} Sample inputs to the function\n * @param privateKey {PrivateKey | undefined} Optional private key to use for the key synthesis\n *\n * @returns {Promise}\n */\n async synthesizeKeys(\n program: string,\n function_id: string,\n inputs: Array,\n privateKey?: PrivateKey,\n ): Promise {\n // Resolve the program imports if they exist\n let imports;\n\n let executionPrivateKey = privateKey;\n if (typeof executionPrivateKey === \"undefined\") {\n if (typeof this.account !== \"undefined\") {\n executionPrivateKey = this.account.privateKey();\n } else {\n executionPrivateKey = new PrivateKey();\n }\n }\n\n // Attempt to run an offline execution of the program and extract the proving and verifying keys\n try {\n imports = await this.networkClient.getProgramImports(program);\n const keyPair = await WasmProgramManager.synthesizeKeyPair(\n executionPrivateKey,\n program,\n function_id,\n inputs,\n imports\n );\n return [keyPair.provingKey(), keyPair.verifyingKey()];\n } catch (e) {\n throw logAndThrow(`Could not synthesize keys - error ${e}. Please ensure the program is valid and the inputs are correct.`);\n }\n }\n\n /**\n * Build a transaction to transfer credits to another account for later submission to the Aleo network\n *\n * @param {number} amount The amount of credits to transfer\n * @param {string} recipient The recipient of the transfer\n * @param {string} transferType The type of transfer to perform - options: 'private', 'privateToPublic', 'public', 'publicToPrivate'\n * @param {number} fee The fee to pay for the transfer\n * @param {boolean} privateFee Use a private record to pay the fee. If false this will use the account's public credit balance\n * @param {RecordSearchParams | undefined} recordSearchParams Optional parameters for finding the amount and fee\n * records for the transfer transaction\n * @param {RecordPlaintext | string} amountRecord Optional amount record to use for the transfer\n * @param {RecordPlaintext | string} feeRecord Optional fee record to use for the transfer\n * @param {PrivateKey | undefined} privateKey Optional private key to use for the transfer transaction\n * @param {OfflineQuery | undefined} offlineQuery Optional offline query if creating transactions in an offline environment\n * @returns {Promise} The transaction id of the transfer transaction\n *\n * @example\n * // Create a new NetworkClient, KeyProvider, and RecordProvider\n * const networkClient = new AleoNetworkClient(\"https://api.explorer.aleo.org/v1\");\n * const keyProvider = new AleoKeyProvider();\n * const recordProvider = new NetworkRecordProvider(account, networkClient);\n *\n * // Initialize a program manager with the key provider to automatically fetch keys for executions\n * const programName = \"hello_hello.aleo\";\n * const programManager = new ProgramManager(\"https://api.explorer.aleo.org/v1\", keyProvider, recordProvider);\n * await programManager.initialize();\n * const tx_id = await programManager.transfer(1, \"aleo1rhgdu77hgyqd3xjj8ucu3jj9r2krwz6mnzyd80gncr5fxcwlh5rsvzp9px\", \"private\", 0.2)\n * const transaction = await programManager.networkClient.getTransaction(tx_id);\n */\n async buildTransferTransaction(\n amount: number,\n recipient: string,\n transferType: string,\n fee: number,\n privateFee: boolean,\n recordSearchParams?: RecordSearchParams,\n amountRecord?: RecordPlaintext | string,\n feeRecord?: RecordPlaintext | string,\n privateKey?: PrivateKey,\n offlineQuery?: OfflineQuery\n ): Promise {\n // Validate the transfer type\n transferType = validateTransferType(transferType);\n\n // Get the private key from the account if it is not provided in the parameters\n let executionPrivateKey = privateKey;\n if (typeof executionPrivateKey === \"undefined\" && typeof this.account !== \"undefined\") {\n executionPrivateKey = this.account.privateKey();\n }\n\n if (typeof executionPrivateKey === \"undefined\") {\n throw(\"No private key provided and no private key set in the ProgramManager\");\n }\n\n // Get the proving and verifying keys from the key provider\n let feeKeys;\n let transferKeys\n try {\n feeKeys = privateFee ? await this.keyProvider.feePrivateKeys() : await this.keyProvider.feePublicKeys();\n transferKeys = await this.keyProvider.transferKeys(transferType);\n } catch (e) {\n throw logAndThrow(`Error finding fee keys. Key finder response: '${e}'. Please ensure your key provider is configured correctly.`);\n }\n const [feeProvingKey, feeVerifyingKey] = feeKeys;\n const [transferProvingKey, transferVerifyingKey] = transferKeys;\n\n // Get the amount and fee record from the account if it is not provided in the parameters\n try {\n // Track the nonces of the records found so no duplicate records are used\n const nonces: string[] = [];\n if (requiresAmountRecord(transferType)) {\n // If the transfer type is private and requires an amount record, get it from the record provider\n amountRecord = await this.getCreditsRecord(fee, [], amountRecord, recordSearchParams);\n nonces.push(amountRecord.nonce());\n } else {\n amountRecord = undefined;\n }\n feeRecord = privateFee ? await this.getCreditsRecord(fee, nonces, feeRecord, recordSearchParams) : undefined;\n } catch (e) {\n throw logAndThrow(`Error finding fee record. Record finder response: '${e}'. Please ensure you're connected to a valid Aleo network and a record with enough balance exists.`);\n }\n\n // Build an execution transaction and submit it to the network\n return await WasmProgramManager.buildTransferTransaction(executionPrivateKey, amount, recipient, transferType, amountRecord, fee, feeRecord, this.host, transferProvingKey, transferVerifyingKey, feeProvingKey, feeVerifyingKey, offlineQuery);\n }\n\n /**\n * Build a transfer_public transaction to transfer credits to another account for later submission to the Aleo network\n *\n * @param {number} amount The amount of credits to transfer\n * @param {string} recipient The recipient of the transfer\n * @param {string} transferType The type of transfer to perform - options: 'private', 'privateToPublic', 'public', 'publicToPrivate'\n * @param {number} fee The fee to pay for the transfer\n * @param {boolean} privateFee Use a private record to pay the fee. If false this will use the account's public credit balance\n * @param {RecordSearchParams | undefined} recordSearchParams Optional parameters for finding the amount and fee\n * records for the transfer transaction\n * @param {RecordPlaintext | string} amountRecord Optional amount record to use for the transfer\n * @param {RecordPlaintext | string} feeRecord Optional fee record to use for the transfer\n * @param {PrivateKey | undefined} privateKey Optional private key to use for the transfer transaction\n * @param {OfflineQuery | undefined} offlineQuery Optional offline query if creating transactions in an offline environment\n * @returns {Promise} The transaction id of the transfer transaction\n */\n async buildTransferPublicTransaction(\n amount: number,\n recipient: string,\n fee: number,\n privateKey?: PrivateKey,\n offlineQuery?: OfflineQuery\n ): Promise {\n return this.buildTransferTransaction(amount, recipient, \"public\", fee, false, undefined, undefined, undefined, privateKey, offlineQuery);\n }\n\n /**\n * Build a transfer_public_as_signer transaction to transfer credits to another account for later submission to the Aleo network\n *\n * @param {number} amount The amount of credits to transfer\n * @param {string} recipient The recipient of the transfer\n * @param {string} transferType The type of transfer to perform - options: 'private', 'privateToPublic', 'public', 'publicToPrivate'\n * @param {number} fee The fee to pay for the transfer\n * @param {boolean} privateFee Use a private record to pay the fee. If false this will use the account's public credit balance\n * @param {RecordSearchParams | undefined} recordSearchParams Optional parameters for finding the amount and fee\n * records for the transfer transaction\n * @param {RecordPlaintext | string} amountRecord Optional amount record to use for the transfer\n * @param {RecordPlaintext | string} feeRecord Optional fee record to use for the transfer\n * @param {PrivateKey | undefined} privateKey Optional private key to use for the transfer transaction\n * @param {OfflineQuery | undefined} offlineQuery Optional offline query if creating transactions in an offline environment\n * @returns {Promise} The transaction id of the transfer transaction\n */\n async buildTransferPublicAsSignerTransaction(\n amount: number,\n recipient: string,\n fee: number,\n privateKey?: PrivateKey,\n offlineQuery?: OfflineQuery\n ): Promise {\n return this.buildTransferTransaction(amount, recipient, \"public\", fee, false, undefined, undefined, undefined, privateKey, offlineQuery);\n }\n\n /**\n * Transfer credits to another account\n *\n * @param {number} amount The amount of credits to transfer\n * @param {string} recipient The recipient of the transfer\n * @param {string} transferType The type of transfer to perform - options: 'private', 'privateToPublic', 'public', 'publicToPrivate'\n * @param {number} fee The fee to pay for the transfer\n * @param {boolean} privateFee Use a private record to pay the fee. If false this will use the account's public credit balance\n * @param {RecordSearchParams | undefined} recordSearchParams Optional parameters for finding the amount and fee\n * records for the transfer transaction\n * @param {RecordPlaintext | string} amountRecord Optional amount record to use for the transfer\n * @param {RecordPlaintext | string} feeRecord Optional fee record to use for the transfer\n * @param {PrivateKey | undefined} privateKey Optional private key to use for the transfer transaction\n * @param {OfflineQuery | undefined} offlineQuery Optional offline query if creating transactions in an offline environment\n * @returns {Promise} The transaction id of the transfer transaction\n *\n * @example\n * // Create a new NetworkClient, KeyProvider, and RecordProvider\n * const networkClient = new AleoNetworkClient(\"https://api.explorer.aleo.org/v1\");\n * const keyProvider = new AleoKeyProvider();\n * const recordProvider = new NetworkRecordProvider(account, networkClient);\n *\n * // Initialize a program manager with the key provider to automatically fetch keys for executions\n * const programManager = new ProgramManager(\"https://api.explorer.aleo.org/v1\", keyProvider, recordProvider);\n * await programManager.initialize();\n * const tx_id = await programManager.transfer(1, \"aleo1rhgdu77hgyqd3xjj8ucu3jj9r2krwz6mnzyd80gncr5fxcwlh5rsvzp9px\", \"private\", 0.2)\n * const transaction = await programManager.networkClient.getTransaction(tx_id);\n */\n async transfer(\n amount: number,\n recipient: string,\n transferType: string,\n fee: number,\n privateFee: boolean,\n recordSearchParams?: RecordSearchParams,\n amountRecord?: RecordPlaintext | string,\n feeRecord?: RecordPlaintext | string,\n privateKey?: PrivateKey,\n offlineQuery?: OfflineQuery\n ): Promise {\n const tx = await this.buildTransferTransaction(amount, recipient, transferType, fee, privateFee, recordSearchParams, amountRecord, feeRecord, privateKey, offlineQuery);\n return await this.networkClient.submitTransaction(tx);\n }\n\n /**\n * Build transaction to bond credits to a validator for later submission to the Aleo Network\n *\n * @example\n * // Create a keyProvider to handle key management\n * const keyProvider = new AleoKeyProvider();\n * keyProvider.useCache = true;\n *\n * // Create a new ProgramManager with the key that will be used to bond credits\n * const programManager = new ProgramManager(\"https://api.explorer.aleo.org/v1\", keyProvider, undefined);\n * programManager.setAccount(new Account(\"YourPrivateKey\"));\n *\n * // Create the bonding transaction object for later submission\n * const tx = await programManager.buildBondPublicTransaction(\"aleo1jx8s4dvjepculny4wfrzwyhs3tlyv65r58ns3g6q2gm2esh7ps8sqy9s5j\", \"aleo1rhgdu77hgyqd3xjj8ucu3jj9r2krwz6mnzyd80gncr5fxcwlh5rsvzp9px\", \"aleo1feya8sjy9k2zflvl2dx39pdsq5tju28elnp2ektnn588uu9ghv8s84msv9\", 2000000);\n * console.log(tx);\n *\n * // The transaction can be later submitted to the network using the network client.\n * const result = await programManager.networkClient.submitTransaction(tx);\n *\n * @returns string\n * @param {string} staker_address Address of the staker who is bonding the credits\n * @param {string} validator_address Address of the validator to bond to, if this address is the same as the staker (i.e. the\n * executor of this function), it will attempt to bond the credits as a validator. Bonding as a validator currently\n * requires a minimum of 10,000,000 credits to bond (subject to change). If the address is specified is an existing\n * validator and is different from the address of the executor of this function, it will bond the credits to that\n * validator's staking committee as a delegator. A minimum of 10 credits is required to bond as a delegator.\n * @param {string} withdrawal_address Address to withdraw the staked credits to when unbond_public is called.\n * @param {number} amount The amount of credits to bond\n * @param {Partial} options - Override default execution options.\n */\n async buildBondPublicTransaction(staker_address: string, validator_address: string, withdrawal_address: string, amount: number, options: Partial = {}) {\n const scaledAmount = Math.trunc(amount * 1000000);\n\n const {\n programName = \"credits.aleo\",\n functionName = \"bond_public\",\n fee = options.fee || 0.86,\n privateFee = false,\n inputs = [staker_address, validator_address, withdrawal_address, `${scaledAmount.toString()}u64`],\n keySearchParams = new AleoKeyProviderParams({\n proverUri: CREDITS_PROGRAM_KEYS.bond_public.prover,\n verifierUri: CREDITS_PROGRAM_KEYS.bond_public.verifier,\n cacheKey: \"credits.aleo/bond_public\"\n }),\n program = this.creditsProgram(),\n ...additionalOptions\n } = options;\n\n const executeOptions: ExecuteOptions = {\n programName,\n functionName,\n fee,\n privateFee,\n inputs,\n keySearchParams,\n ...additionalOptions\n };\n\n return await this.buildExecutionTransaction(executeOptions);\n }\n\n /**\n * Bond credits to validator.\n *\n * @example\n * // Create a keyProvider to handle key management\n * const keyProvider = new AleoKeyProvider();\n * keyProvider.useCache = true;\n *\n * // Create a new ProgramManager with the key that will be used to bond credits\n * const programManager = new ProgramManager(\"https://api.explorer.aleo.org/v1\", keyProvider, undefined);\n * programManager.setAccount(new Account(\"YourPrivateKey\"));\n *\n * // Create the bonding transaction\n * const tx_id = await programManager.bondPublic(\"aleo1jx8s4dvjepculny4wfrzwyhs3tlyv65r58ns3g6q2gm2esh7ps8sqy9s5j\", \"aleo1rhgdu77hgyqd3xjj8ucu3jj9r2krwz6mnzyd80gncr5fxcwlh5rsvzp9px\", \"aleo1feya8sjy9k2zflvl2dx39pdsq5tju28elnp2ektnn588uu9ghv8s84msv9\", 2000000);\n *\n * @returns string\n * @param {string} staker_address Address of the staker who is bonding the credits\n * @param {string} validator_address Address of the validator to bond to, if this address is the same as the signer (i.e. the\n * executor of this function), it will attempt to bond the credits as a validator. Bonding as a validator currently\n * requires a minimum of 1,000,000 credits to bond (subject to change). If the address is specified is an existing\n * validator and is different from the address of the executor of this function, it will bond the credits to that\n * validator's staking committee as a delegator. A minimum of 10 credits is required to bond as a delegator.\n * @param {string} withdrawal_address Address to withdraw the staked credits to when unbond_public is called.\n * @param {number} amount The amount of credits to bond\n * @param {Options} options Options for the execution\n */\n async bondPublic(staker_address: string, validator_address: string, withdrawal_address:string, amount: number, options: Partial = {}) {\n const tx = await this.buildBondPublicTransaction(staker_address, validator_address, withdrawal_address, amount, options);\n return await this.networkClient.submitTransaction(tx);\n }\n\n /**\n * Build a bond_validator transaction for later submission to the Aleo Network.\n *\n * @example\n * // Create a keyProvider to handle key management\n * const keyProvider = new AleoKeyProvider();\n * keyProvider.useCache = true;\n *\n * // Create a new ProgramManager with the key that will be used to bond credits\n * const programManager = new ProgramManager(\"https://api.explorer.aleo.org/v1\", keyProvider, undefined);\n * programManager.setAccount(new Account(\"YourPrivateKey\"));\n *\n * // Create the bond validator transaction object for later use.\n * const tx = await programManager.buildBondValidatorTransaction(\"aleo1rhgdu77hgyqd3xjj8ucu3jj9r2krwz6mnzyd80gncr5fxcwlh5rsvzp9px\", \"aleo1feya8sjy9k2zflvl2dx39pdsq5tju28elnp2ektnn588uu9ghv8s84msv9\", 2000000);\n * console.log(tx);\n *\n * // The transaction can later be submitted to the network using the network client.\n * const tx_id = await programManager.networkClient.submitTransaction(tx);\n *\n * @returns string\n * @param {string} validator_address Address of the validator to bond to, if this address is the same as the staker (i.e. the\n * executor of this function), it will attempt to bond the credits as a validator. Bonding as a validator currently\n * requires a minimum of 10,000,000 credits to bond (subject to change). If the address is specified is an existing\n * validator and is different from the address of the executor of this function, it will bond the credits to that\n * validator's staking committee as a delegator. A minimum of 10 credits is required to bond as a delegator.\n * @param {string} withdrawal_address Address to withdraw the staked credits to when unbond_public is called.\n * @param {number} amount The amount of credits to bond\n * @param {number} commission The commission rate for the validator (must be between 0 and 100 - an error will be thrown if it is not)\n * @param {Partial} options - Override default execution options.\n */\n async buildBondValidatorTransaction(validator_address: string, withdrawal_address: string, amount: number, commission: number, options: Partial = {}) {\n const scaledAmount = Math.trunc(amount * 1000000);\n\n const adjustedCommission = Math.trunc(commission)\n\n const {\n programName = \"credits.aleo\",\n functionName = \"bond_validator\",\n fee = options.fee || 0.86,\n privateFee = false,\n inputs = [validator_address, withdrawal_address, `${scaledAmount.toString()}u64`, `${adjustedCommission.toString()}u8`],\n keySearchParams = new AleoKeyProviderParams({\n proverUri: CREDITS_PROGRAM_KEYS.bond_validator.prover,\n verifierUri: CREDITS_PROGRAM_KEYS.bond_validator.verifier,\n cacheKey: \"credits.aleo/bond_validator\"\n }),\n program = this.creditsProgram(),\n ...additionalOptions\n } = options;\n\n const executeOptions: ExecuteOptions = {\n programName,\n functionName,\n fee,\n privateFee,\n inputs,\n keySearchParams,\n ...additionalOptions\n };\n\n return await this.buildExecutionTransaction(executeOptions);\n }\n\n /**\n * Build transaction to bond a validator.\n *\n * @example\n * // Create a keyProvider to handle key management\n * const keyProvider = new AleoKeyProvider();\n * keyProvider.useCache = true;\n *\n * // Create a new ProgramManager with the key that will be used to bond credits\n * const programManager = new ProgramManager(\"https://api.explorer.aleo.org/v1\", keyProvider, undefined);\n * programManager.setAccount(new Account(\"YourPrivateKey\"));\n *\n * // Create the bonding transaction\n * const tx_id = await programManager.bondValidator(\"aleo1rhgdu77hgyqd3xjj8ucu3jj9r2krwz6mnzyd80gncr5fxcwlh5rsvzp9px\", \"aleo1feya8sjy9k2zflvl2dx39pdsq5tju28elnp2ektnn588uu9ghv8s84msv9\", 2000000);\n *\n * @returns string\n * @param {string} validator_address Address of the validator to bond to, if this address is the same as the staker (i.e. the\n * executor of this function), it will attempt to bond the credits as a validator. Bonding as a validator currently\n * requires a minimum of 10,000,000 credits to bond (subject to change). If the address is specified is an existing\n * validator and is different from the address of the executor of this function, it will bond the credits to that\n * validator's staking committee as a delegator. A minimum of 10 credits is required to bond as a delegator.\n * @param {string} withdrawal_address Address to withdraw the staked credits to when unbond_public is called.\n * @param {number} amount The amount of credits to bond\n * @param {number} commission The commission rate for the validator (must be between 0 and 100 - an error will be thrown if it is not)\n * @param {Partial} options - Override default execution options.\n */\n async bondValidator(validator_address: string, withdrawal_address: string, amount: number, commission: number, options: Partial = {}) {\n const tx = await this.buildBondValidatorTransaction(validator_address, withdrawal_address, amount, commission, options);\n return await this.networkClient.submitTransaction(tx);\n }\n\n /**\n * Build a transaction to unbond public credits from a validator in the Aleo network.\n *\n * @param {string} staker_address - The address of the staker who is unbonding the credits.\n * @param {number} amount - The amount of credits to unbond (scaled by 1,000,000).\n * @param {Partial} options - Override default execution options.\n * @returns {Promise} - A promise that resolves to the transaction or an error message.\n *\n * @example\n * // Create a keyProvider to handle key management.\n * const keyProvider = new AleoKeyProvider();\n * keyProvider.useCache = true;\n *\n * // Create a new ProgramManager with the key that will be used to unbond credits.\n * const programManager = new ProgramManager(\"https://api.explorer.aleo.org/v1\", keyProvider, undefined);\n * const tx = await programManager.buildUnbondPublicTransaction(\"aleo1jx8s4dvjepculny4wfrzwyhs3tlyv65r58ns3g6q2gm2esh7ps8sqy9s5j\", 2000000);\n * console.log(tx);\n *\n * // The transaction can be submitted later to the network using the network client.\n * programManager.networkClient.submitTransaction(tx);\n */\n async buildUnbondPublicTransaction(staker_address: string, amount: number, options: Partial = {}): Promise {\n const scaledAmount = Math.trunc(amount * 1000000);\n\n const {\n programName = \"credits.aleo\",\n functionName = \"unbond_public\",\n fee = options.fee || 1.3,\n privateFee = false,\n inputs = [staker_address, `${scaledAmount.toString()}u64`],\n keySearchParams = new AleoKeyProviderParams({\n proverUri: CREDITS_PROGRAM_KEYS.unbond_public.prover,\n verifierUri: CREDITS_PROGRAM_KEYS.unbond_public.verifier,\n cacheKey: \"credits.aleo/unbond_public\"\n }),\n program = this.creditsProgram(),\n ...additionalOptions\n } = options;\n\n const executeOptions: ExecuteOptions = {\n programName,\n functionName,\n fee,\n privateFee,\n inputs,\n keySearchParams,\n ...additionalOptions\n };\n\n return this.buildExecutionTransaction(executeOptions);\n }\n\n /**\n * Unbond a specified amount of staked credits.\n *\n * @example\n * // Create a keyProvider to handle key management\n * const keyProvider = new AleoKeyProvider();\n * keyProvider.useCache = true;\n *\n * // Create a new ProgramManager with the key that will be used to bond credits\n * const programManager = new ProgramManager(\"https://api.explorer.aleo.org/v1\", keyProvider, undefined);\n * programManager.setAccount(new Account(\"YourPrivateKey\"));\n *\n * // Create the bonding transaction and send it to the network\n * const tx_id = await programManager.unbondPublic(\"aleo1jx8s4dvjepculny4wfrzwyhs3tlyv65r58ns3g6q2gm2esh7ps8sqy9s5j\", 10);\n *\n * @returns string\n * @param {string} staker_address Address of the staker who is unbonding the credits\n * @param {number} amount Amount of credits to unbond. If the address of the executor of this function is an\n * existing validator, it will subtract this amount of credits from the validator's staked credits. If there are\n * less than 1,000,000 credits staked pool after the unbond, the validator will be removed from the validator set.\n * If the address of the executor of this function is not a validator and has credits bonded as a delegator, it will\n * subtract this amount of credits from the delegator's staked credits. If there are less than 10 credits bonded\n * after the unbond operation, the delegator will be removed from the validator's staking pool.\n * @param {ExecuteOptions} options Options for the execution\n */\n async unbondPublic(staker_address: string, amount: number, options: Partial = {}): Promise {\n const tx = await this.buildUnbondPublicTransaction(staker_address, amount, options);\n return await this.networkClient.submitTransaction(tx);\n }\n\n /**\n * Build a transaction to claim unbonded public credits in the Aleo network.\n *\n * @param {string} staker_address - The address of the staker who is claiming the credits.\n * @param {Partial} options - Override default execution options.\n * @returns {Promise} - A promise that resolves to the transaction or an error message.\n *\n * @example\n * // Create a keyProvider to handle key management\n * const keyProvider = new AleoKeyProvider();\n * keyProvider.useCache = true;\n *\n * // Create a new ProgramManager with the key that will be used to claim unbonded credits.\n * const programManager = new ProgramManager(\"https://api.explorer.aleo.org/v1\", keyProvider, undefined);\n *\n * // Create the claim unbonded transaction object for later use.\n * const tx = await programManager.buildClaimUnbondPublicTransaction(\"aleo1jx8s4dvjepculny4wfrzwyhs3tlyv65r58ns3g6q2gm2esh7ps8sqy9s5j\");\n * console.log(tx);\n *\n * // The transaction can be submitted later to the network using the network client.\n * programManager.networkClient.submitTransaction(tx);\n */\n async buildClaimUnbondPublicTransaction(staker_address: string, options: Partial = {}): Promise {\n const {\n programName = \"credits.aleo\",\n functionName = \"claim_unbond_public\",\n fee = options.fee || 2,\n privateFee = false,\n inputs = [staker_address],\n keySearchParams = new AleoKeyProviderParams({\n proverUri: CREDITS_PROGRAM_KEYS.claim_unbond_public.prover,\n verifierUri: CREDITS_PROGRAM_KEYS.claim_unbond_public.verifier,\n cacheKey: \"credits.aleo/claim_unbond_public\"\n }),\n program = this.creditsProgram(),\n ...additionalOptions\n } = options;\n\n const executeOptions: ExecuteOptions = {\n programName,\n functionName,\n fee,\n privateFee,\n inputs,\n keySearchParams,\n ...additionalOptions\n };\n\n return await this.buildExecutionTransaction(executeOptions);\n }\n\n /**\n * Claim unbonded credits. If credits have been unbonded by the account executing this function, this method will\n * claim them and add them to the public balance of the account.\n *\n * @example\n * // Create a keyProvider to handle key management\n * const keyProvider = new AleoKeyProvider();\n * keyProvider.useCache = true;\n *\n * // Create a new ProgramManager with the key that will be used to bond credits\n * const programManager = new ProgramManager(\"https://api.explorer.aleo.org/v1\", keyProvider, undefined);\n * programManager.setAccount(new Account(\"YourPrivateKey\"));\n *\n * // Create the bonding transaction\n * const tx_id = await programManager.claimUnbondPublic(\"aleo1jx8s4dvjepculny4wfrzwyhs3tlyv65r58ns3g6q2gm2esh7ps8sqy9s5j\");\n *\n * @param {string} staker_address Address of the staker who is claiming the credits\n * @param {ExecuteOptions} options\n * @returns string\n */\n async claimUnbondPublic(staker_address: string, options: Partial = {}): Promise {\n const tx = await this.buildClaimUnbondPublicTransaction(staker_address, options);\n return await this.networkClient.submitTransaction(tx);\n }\n\n /**\n * Build a set_validator_state transaction for later usage.\n *\n * This function allows a validator to set their state to be either opened or closed to new stakers.\n * When the validator is open to new stakers, any staker (including the validator) can bond or unbond from the validator.\n * When the validator is closed to new stakers, existing stakers can still bond or unbond from the validator, but new stakers cannot bond.\n *\n * This function serves two primary purposes:\n * 1. Allow a validator to leave the committee, by closing themselves to stakers and then unbonding all of their stakers.\n * 2. Allow a validator to maintain their % of stake, by closing themselves to allowing more stakers to bond to them.\n *\n * @example\n * // Create a keyProvider to handle key management\n * const keyProvider = new AleoKeyProvider();\n * keyProvider.useCache = true;\n *\n * // Create a new ProgramManager with the key that will be used to bond credits\n * const programManager = new ProgramManager(\"https://api.explorer.aleo.org/v1\", keyProvider, undefined);\n * programManager.setAccount(new Account(\"ValidatorPrivateKey\"));\n *\n * // Create the bonding transaction\n * const tx = await programManager.buildSetValidatorStateTransaction(true);\n *\n * // The transaction can be submitted later to the network using the network client.\n * programManager.networkClient.submitTransaction(tx);\n *\n * @returns string\n * @param {boolean} validator_state\n * @param {Partial} options - Override default execution options\n */\n async buildSetValidatorStateTransaction(validator_state: boolean, options: Partial = {}) {\n const {\n programName = \"credits.aleo\",\n functionName = \"set_validator_state\",\n fee = 1,\n privateFee = false,\n inputs = [validator_state.toString()],\n keySearchParams = new AleoKeyProviderParams({\n proverUri: CREDITS_PROGRAM_KEYS.set_validator_state.prover,\n verifierUri: CREDITS_PROGRAM_KEYS.set_validator_state.verifier,\n cacheKey: \"credits.aleo/set_validator_state\"\n }),\n ...additionalOptions\n } = options;\n\n const executeOptions: ExecuteOptions = {\n programName,\n functionName,\n fee,\n privateFee,\n inputs,\n keySearchParams,\n ...additionalOptions\n };\n\n return await this.execute(executeOptions);\n }\n\n /**\n * Submit a set_validator_state transaction to the Aleo Network.\n *\n * This function allows a validator to set their state to be either opened or closed to new stakers.\n * When the validator is open to new stakers, any staker (including the validator) can bond or unbond from the validator.\n * When the validator is closed to new stakers, existing stakers can still bond or unbond from the validator, but new stakers cannot bond.\n *\n * This function serves two primary purposes:\n * 1. Allow a validator to leave the committee, by closing themselves to stakers and then unbonding all of their stakers.\n * 2. Allow a validator to maintain their % of stake, by closing themselves to allowing more stakers to bond to them.\n *\n * @example\n * // Create a keyProvider to handle key management\n * const keyProvider = new AleoKeyProvider();\n * keyProvider.useCache = true;\n *\n * // Create a new ProgramManager with the key that will be used to bond credits\n * const programManager = new ProgramManager(\"https://api.explorer.aleo.org/v1\", keyProvider, undefined);\n * programManager.setAccount(new Account(\"ValidatorPrivateKey\"));\n *\n * // Create the bonding transaction\n * const tx_id = await programManager.setValidatorState(true);\n *\n * @returns string\n * @param {boolean} validator_state\n * @param {Partial} options - Override default execution options\n */\n async setValidatorState(validator_state: boolean, options: Partial = {}) {\n const tx = await this.buildSetValidatorStateTransaction(validator_state, options);\n return this.networkClient.submitTransaction(tx);\n }\n\n /**\n * Verify a proof of execution from an offline execution\n *\n * @param {executionResponse} executionResponse\n * @returns {boolean} True if the proof is valid, false otherwise\n */\n verifyExecution(executionResponse: ExecutionResponse): boolean {\n try {\n const execution = executionResponse.getExecution();\n const function_id = executionResponse.getFunctionId();\n const program = executionResponse.getProgram();\n const verifyingKey = executionResponse.getVerifyingKey();\n return verifyFunctionExecution(execution, verifyingKey, program, function_id);\n } catch(e) {\n console.warn(\"The execution was not found in the response, cannot verify the execution\");\n return false;\n }\n }\n\n /**\n * Create a program object from a program's source code\n *\n * @param {string} program Program source code\n * @returns {Program | Error} The program object\n */\n createProgramFromSource(program: string): Program | Error {\n return Program.fromString(program);\n }\n\n /**\n * Get the credits program object\n *\n * @returns {Program} The credits program object\n */\n creditsProgram(): Program {\n return Program.getCreditsProgram();\n }\n\n /**\n * Verify a program is valid\n *\n * @param {string} program The program source code\n */\n verifyProgram(program: string): boolean {\n try {\n Program.fromString(program);\n return true;\n } catch (e) {\n return false;\n }\n }\n\n // Internal utility function for getting a credits.aleo record\n async getCreditsRecord(amount: number, nonces: string[], record?: RecordPlaintext | string, params?: RecordSearchParams): Promise {\n try {\n return record instanceof RecordPlaintext ? record : RecordPlaintext.fromString(record);\n } catch (e) {\n try {\n const recordProvider = this.recordProvider;\n return (await recordProvider.findCreditsRecord(amount, true, nonces, params))\n } catch (e) {\n throw logAndThrow(`Error finding fee record. Record finder response: '${e}'. Please ensure you're connected to a valid Aleo network and a record with enough balance exists.`);\n }\n }\n }\n}\n\n// Ensure the transfer type requires an amount record\nfunction requiresAmountRecord(transferType: string): boolean {\n return PRIVATE_TRANSFER_TYPES.has(transferType);\n}\n\n// Validate the transfer type\nfunction validateTransferType(transferType: string): string | Error {\n return VALID_TRANSFER_TYPES.has(transferType) ? transferType :\n logAndThrow(`Invalid transfer type '${transferType}'. Valid transfer types are 'private', 'privateToPublic', 'public', and 'publicToPrivate'.`);\n}\n\nexport { ProgramManager }\n","import {VerifyingKey, Metadata} from \"@provablehq/wasm\";\n\nconst KEY_STORE = Metadata.baseUrl();\n\ninterface Key {\n name: string,\n locator: string,\n prover: string,\n verifier: string,\n verifyingKey: () => VerifyingKey,\n}\n\nfunction convert(metadata: Metadata): Key {\n // This looks up the method name in VerifyingKey\n const verifyingKey = (VerifyingKey as any)[metadata.verifyingKey];\n\n if (!verifyingKey) {\n throw new Error(\"Invalid method name: \" + metadata.verifyingKey);\n }\n\n return {\n name: metadata.name,\n locator: metadata.locator,\n prover: metadata.prover,\n verifier: metadata.verifier,\n verifyingKey,\n };\n}\n\nconst CREDITS_PROGRAM_KEYS = {\n bond_public: convert(Metadata.bond_public()),\n bond_validator: convert(Metadata.bond_validator()),\n claim_unbond_public: convert(Metadata.claim_unbond_public()),\n fee_private: convert(Metadata.fee_private()),\n fee_public: convert(Metadata.fee_public()),\n inclusion: convert(Metadata.inclusion()),\n join: convert(Metadata.join()),\n set_validator_state: convert(Metadata.set_validator_state()),\n split: convert(Metadata.split()),\n transfer_private: convert(Metadata.transfer_private()),\n transfer_private_to_public: convert(Metadata.transfer_private_to_public()),\n transfer_public: convert(Metadata.transfer_public()),\n transfer_public_as_signer: convert(Metadata.transfer_public_as_signer()),\n transfer_public_to_private: convert(Metadata.transfer_public_to_private()),\n unbond_public: convert(Metadata.unbond_public()),\n getKey: function(key: string): Key | Error {\n if (this.hasOwnProperty(key)) {\n return (this as any)[key] as Key;\n } else {\n return new Error(`Key \"${key}\" not found.`);\n }\n }\n};\n\nconst PRIVATE_TRANSFER_TYPES = new Set([\n \"transfer_private\",\n \"private\",\n \"transferPrivate\",\n \"transfer_private_to_public\",\n \"privateToPublic\",\n \"transferPrivateToPublic\",\n]);\nconst VALID_TRANSFER_TYPES = new Set([\n \"transfer_private\",\n \"private\",\n \"transferPrivate\",\n \"transfer_private_to_public\",\n \"privateToPublic\",\n \"transferPrivateToPublic\",\n \"transfer_public\",\n \"transfer_public_as_signer\",\n \"public\",\n \"public_as_signer\",\n \"transferPublic\",\n \"transferPublicAsSigner\",\n \"transfer_public_to_private\",\n \"publicToPrivate\",\n \"publicAsSigner\",\n \"transferPublicToPrivate\",\n]);\nconst PRIVATE_TRANSFER = new Set([\n \"private\",\n \"transfer_private\",\n \"transferPrivate\",\n]);\nconst PRIVATE_TO_PUBLIC_TRANSFER = new Set([\n \"private_to_public\",\n \"privateToPublic\",\n \"transfer_private_to_public\",\n \"transferPrivateToPublic\",\n]);\nconst PUBLIC_TRANSFER = new Set([\n \"public\",\n \"transfer_public\",\n \"transferPublic\",\n]);\nconst PUBLIC_TRANSFER_AS_SIGNER = new Set([\n \"public_as_signer\",\n \"transfer_public_as_signer\",\n \"transferPublicAsSigner\",\n]);\nconst PUBLIC_TO_PRIVATE_TRANSFER = new Set([\n \"public_to_private\",\n \"publicToPrivate\",\n \"transfer_public_to_private\",\n \"transferPublicToPrivate\",\n]);\n\nfunction logAndThrow(message: string): Error {\n console.error(message);\n throw message;\n}\n\nimport { Account } from \"./account\";\nimport { AleoNetworkClient, ProgramImports } from \"./network-client\";\nimport { Block } from \"./models/block\";\nimport { Execution } from \"./models/execution\";\nimport { Input } from \"./models/input\";\nimport { Output } from \"./models/output\";\nimport { TransactionModel } from \"./models/transactionModel\";\nimport { Transition } from \"./models/transition\";\nimport {\n AleoKeyProvider,\n AleoKeyProviderParams,\n AleoKeyProviderInitParams,\n CachedKeyPair,\n FunctionKeyPair,\n FunctionKeyProvider,\n KeySearchParams,\n} from \"./function-key-provider\";\nimport {\n OfflineKeyProvider,\n OfflineSearchParams\n} from \"./offline-key-provider\";\nimport {\n BlockHeightSearch,\n NetworkRecordProvider,\n RecordProvider,\n RecordSearchParams,\n} from \"./record-provider\";\n\n// @TODO: This function is no longer needed, remove it.\nasync function initializeWasm() {\n console.warn(\"initializeWasm is deprecated, you no longer need to use it\");\n}\n\nexport { createAleoWorker } from \"./managed-worker\";\n\nexport { ProgramManager } from \"./program-manager\";\n\nexport {\n Address,\n Execution as FunctionExecution,\n ExecutionResponse,\n Field,\n OfflineQuery,\n PrivateKey,\n PrivateKeyCiphertext,\n Program,\n ProgramManager as ProgramManagerBase,\n ProvingKey,\n RecordCiphertext,\n RecordPlaintext,\n Signature,\n Transaction,\n VerifyingKey,\n ViewKey,\n initThreadPool,\n verifyFunctionExecution,\n} from \"@provablehq/wasm\";\n\nexport { initializeWasm };\n\nexport {\n Account,\n AleoKeyProvider,\n AleoKeyProviderParams,\n AleoKeyProviderInitParams,\n AleoNetworkClient,\n Block,\n BlockHeightSearch,\n CachedKeyPair,\n Execution,\n FunctionKeyPair,\n FunctionKeyProvider,\n Input,\n Key,\n KeySearchParams,\n NetworkRecordProvider,\n ProgramImports,\n OfflineKeyProvider,\n OfflineSearchParams,\n Output,\n RecordProvider,\n RecordSearchParams,\n TransactionModel,\n Transition,\n CREDITS_PROGRAM_KEYS,\n KEY_STORE,\n PRIVATE_TRANSFER,\n PRIVATE_TO_PUBLIC_TRANSFER,\n PRIVATE_TRANSFER_TYPES,\n PUBLIC_TRANSFER,\n PUBLIC_TRANSFER_AS_SIGNER,\n PUBLIC_TO_PRIVATE_TRANSFER,\n VALID_TRANSFER_TYPES,\n logAndThrow,\n};\n","import {initThreadPool, ProgramManager, PrivateKey, verifyFunctionExecution, FunctionKeyPair} from \"./index\";\nimport { AleoKeyProvider, AleoKeyProviderParams} from \"./function-key-provider\";\nimport { expose } from \"comlink\";\n\nawait initThreadPool();\n\nconst defaultHost = \"https://api.explorer.aleo.org/v1\";\nconst keyProvider = new AleoKeyProvider();\nconst programManager = new ProgramManager(\n defaultHost,\n keyProvider,\n undefined\n);\n\nkeyProvider.useCache(true);\n\nlet lastLocalProgram: string = \"\";\n\nexport interface WorkerAPI {\n run: (\n localProgram: string,\n aleoFunction: string,\n inputs: string[],\n privateKey: string\n ) => Promise<{ outputs: any; execution: string } | string>;\n\n getPrivateKey: () => Promise;\n}\nasync function run(\n localProgram: string,\n aleoFunction: string,\n inputs: string[],\n privateKey: string,\n proveExecution = false\n) {\n console.log(\"Web worker: Executing function locally...\");\n const startTime = performance.now();\n\n try {\n // Ensure the program is valid and that it contains the function specified\n const program = programManager.createProgramFromSource(localProgram);\n if (program instanceof Error) {\n throw \"Error creating program from source\";\n }\n const program_id = program.id();\n if (!program.hasFunction(aleoFunction)) {\n throw `Program ${program_id} does not contain function ${aleoFunction}`;\n }\n const cacheKey = `${program_id}:${aleoFunction}`;\n\n // Get the program imports\n const imports = await programManager.networkClient.getProgramImports(\n localProgram\n );\n\n if (imports instanceof Error) {\n throw \"Error getting program imports\";\n }\n // Get the proving and verifying keys for the function\n if (lastLocalProgram !== localProgram) {\n const keys = await programManager.synthesizeKeys(\n localProgram,\n aleoFunction,\n inputs,\n PrivateKey.from_string(privateKey)\n );\n programManager.keyProvider.cacheKeys(cacheKey, keys);\n lastLocalProgram = localProgram;\n }\n\n // Pass the cache key to the execute function\n const keyParams = new AleoKeyProviderParams({\n cacheKey: cacheKey,\n });\n\n // Execute the function locally\n const response = await programManager.run(\n localProgram,\n aleoFunction,\n inputs,\n proveExecution,\n imports,\n keyParams,\n undefined,\n undefined,\n PrivateKey.from_string(privateKey),\n );\n\n // Return the outputs to the main thread\n console.log(\n `Web worker: Local execution completed in ${\n performance.now() - startTime\n } ms`\n );\n const outputs = response.getOutputs();\n const execution = response.getExecution();\n let executionString = \"\";\n\n const keys = keyProvider.getKeys(cacheKey);\n\n if (keys instanceof Error) {\n throw \"Could not get verifying key\";\n }\n\n const verifyingKey = keys[1];\n\n if (execution) {\n verifyFunctionExecution(\n execution,\n verifyingKey,\n program,\n \"hello\"\n );\n executionString = execution.toString();\n console.log(\"Execution verified successfully: \" + execution);\n } else {\n executionString = \"\";\n }\n\n console.log(`Function execution response: ${outputs}`);\n\n return { outputs: outputs, execution: executionString };\n } catch (error) {\n console.error(error);\n return error ? error.toString() : \"Unknown error\";\n }\n}\n\nasync function getPrivateKey() {\n const privateKey = new PrivateKey();\n return privateKey.to_string();\n}\n\nconst workerAPI = { run, getPrivateKey };\nexpose(workerAPI);\n"],"names":["proxyMarker","Symbol","createEndpoint","releaseProxy","finalizer","throwMarker","isObject","val","transferHandlers","Map","canHandle","serialize","obj","port1","port2","MessageChannel","expose","deserialize","port","start","createProxy","target","value","serialized","Error","isError","message","name","stack","Object","assign","ep","globalThis","allowedOrigins","addEventListener","callback","ev","data","origin","allowedOrigin","RegExp","test","isAllowedOrigin","console","warn","id","type","path","argumentList","map","fromWireValue","returnValue","parent","slice","reduce","prop","rawValue","apply","proxy","transfers","transferCache","set","transfer","undefined","Promise","resolve","catch","then","wireValue","transferables","toWireValue","postMessage","removeEventListener","closeEndPoint","error","TypeError","endpoint","constructor","isMessagePort","close","throwIfProxyReleased","isReleased","releaseEndpoint","requestResponseMessage","proxyCounter","WeakMap","proxyFinalizers","FinalizationRegistry","newCount","get","isProxyReleased","Proxy","_target","unregister","unregisterProxy","length","r","p","toString","bind","_thisArg","rawArgumentList","last","processArguments","construct","register","registerProxy","processed","v","arr","Array","prototype","concat","handler","serializedValue","msg","fill","Math","floor","random","Number","MAX_SAFE_INTEGER","join","l","async","url","options","response","fetch","ok","status","post","method","AleoNetworkClient","host","headers","account","this","setAccount","getAccount","setHost","fetchData","json","findUnspentRecords","startHeight","endHeight","privateKey","amounts","maxMicrocredits","nonces","records","end","resolvedPrivateKey","latestHeight","failures","totalRecordValue","BigInt","_privateKey","PrivateKey","from_string","viewKey","to_view_key","blockHeight","getLatestHeight","blocks","getBlockRange","i","transactions","j","confirmedTransaction","transaction","execution","transitions","k","transition","program","outputs","output","record","RecordCiphertext","fromString","isOwner","recordPlaintext","decrypt","nonce","includes","serialNumber","serialNumberString","getTransitionId","push","microcredits","amounts_found","getBlock","height","getDeploymentTransactionIDForProgram","Program","replace","getDeploymentTransactionForProgram","transaction_id","getTransaction","getLatestBlock","getLatestCommittee","getProgram","programId","getProgramObject","inputProgram","getProgramImports","imports","importList","getImports","import_id","hasOwnProperty","programSource","nestedImports","key","logAndThrow","getProgramImportNames","getProgramMappingNames","getProgramMappingValue","mappingName","getStateRoot","getTransactions","getTransactionsInMempool","inputOrOutputID","submitTransaction","transaction_string","Transaction","body","AleoKeyProviderParams","proverUri","verifierUri","cacheKey","params","AleoKeyProvider","cache","cacheOption","keyUris","fetchBytes","arrayBuffer","Uint8Array","KEY_STORE","useCache","clearCache","clear","cacheKeys","keyId","keys","provingKey","verifyingKey","toBytes","containsKeys","has","deleteKeys","delete","getKeys","debug","provingKeyBytes","verifyingKeyBytes","ProvingKey","fromBytes","VerifyingKey","functionKeys","proverUrl","verifierUrl","CREDITS_PROGRAM_KEYS","getKey","fetchCreditsKeys","fetchRemoteKeys","getVerifyingKey","fetchProvingKey","locator","keyPair","verifying_key","proving_key","prover","bond_public","bondPublicKeys","bondValidatorKeys","bond_validator","claimUnbondPublicKeys","claim_unbond_public","transferKeys","visibility","PRIVATE_TRANSFER","transfer_private","PRIVATE_TO_PUBLIC_TRANSFER","transfer_private_to_public","PUBLIC_TRANSFER","transfer_public","PUBLIC_TRANSFER_AS_SIGNER","transfer_public_as_signer","PUBLIC_TO_PRIVATE_TRANSFER","transfer_public_to_private","joinKeys","splitKeys","split","feePrivateKeys","fee_private","feePublicKeys","fee_public","verifier","inclusion","set_validator_state","unbond_public","text","e","inner","unBondPublicKeys","ProgramManager","keyProvider","networkClient","recordProvider","setKeyProvider","setRecordProvider","deploy","fee","privateFee","recordSearchParams","feeRecord","programObject","log","feeKeys","deploymentPrivateKey","getCreditsRecord","feeProvingKey","feeVerifyingKey","tx","ProgramManager$1","buildDeploymentTransaction","buildExecutionTransaction","programName","functionName","inputs","keySearchParams","offlineQuery","executionPrivateKey","execute","run","function_name","proveExecution","executeFunctionOffline","recordOne","recordTwo","joinProvingKey","joinVerifyingKey","RecordPlaintext","buildJoinTransaction","splitAmount","amountRecord","splitProvingKey","splitVerifyingKey","buildSplitTransaction","synthesizeKeys","function_id","synthesizeKeyPair","buildTransferTransaction","amount","recipient","transferType","validateTransferType","transferProvingKey","transferVerifyingKey","requiresAmountRecord","buildTransferPublicTransaction","buildTransferPublicAsSignerTransaction","buildBondPublicTransaction","staker_address","validator_address","withdrawal_address","scaledAmount","trunc","creditsProgram","additionalOptions","executeOptions","bondPublic","buildBondValidatorTransaction","commission","adjustedCommission","bondValidator","buildUnbondPublicTransaction","unbondPublic","buildClaimUnbondPublicTransaction","claimUnbondPublic","buildSetValidatorStateTransaction","validator_state","setValidatorState","verifyExecution","executionResponse","getExecution","getFunctionId","verifyFunctionExecution","createProgramFromSource","getCreditsProgram","verifyProgram","findCreditsRecord","PRIVATE_TRANSFER_TYPES","VALID_TRANSFER_TYPES","Metadata","baseUrl","convert","metadata","Set","initThreadPool","defaultHost","programManager","lastLocalProgram","localProgram","aleoFunction","startTime","performance","now","program_id","hasFunction","keyParams","getOutputs","executionString","getPrivateKey","to_string","workerAPI"],"sourceRoot":""} \ No newline at end of file diff --git a/933.bundle.js b/933.bundle.js index a2b0eb2c1..5388cd271 100644 --- a/933.bundle.js +++ b/933.bundle.js @@ -1,2 +1,2 @@ -(self.webpackChunkaleo_website=self.webpackChunkaleo_website||[]).push([[933],{2583:(_,t,e)=>{_.exports=e.p+"2d6a4d794221941c07b8.js"},5934:(_,t,e)=>{_.exports=e.p+"58342153fc9a001d7976.wasm"},9933:(_,t,e)=>{e.a(_,(async(_,r)=>{try{function n(_,t,e,r){return new Promise((n=>{const i=new Worker(_,{type:"module"});i.addEventListener("message",(_=>{setTimeout((()=>{n(i),i.unref&&i.unref()}),0)}),{capture:!0,once:!0}),i.postMessage({module:t,memory:e,address:r})}))}let K;e.d(t,{$r:()=>B_,CK:()=>j,L:()=>W_,PD:()=>q_,SF:()=>j_,XV:()=>J_,YW:()=>N_,_q:()=>E_,fW:()=>I_,hz:()=>L_,zW:()=>U_});const C=new Array(128).fill(void 0);function i(_){return C[_]}C.push(void 0,null,!0,!1);let E=C.length;function o(_){_<132||(C[_]=E,E=_)}function a(_){const t=i(_);return o(_),t}const M="undefined"!=typeof TextDecoder?new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0}):{decode:()=>{throw Error("TextDecoder not available")}};"undefined"!=typeof TextDecoder&&M.decode();let B=null;function s(){return null!==B&&B.buffer===K.memory.buffer||(B=new Uint8Array(K.memory.buffer)),B}function c(_,t){return _>>>=0,M.decode(s().slice(_,_+t))}function g(_){E===C.length&&C.push(C.length+1);const t=E;return E=C[t],C[t]=_,t}let U=0;const I="undefined"!=typeof TextEncoder?new TextEncoder("utf-8"):{encode:()=>{throw Error("TextEncoder not available")}},q=function(_,t){const e=I.encode(_);return t.set(e),{read:_.length,written:e.length}};function w(_,t,e){if(void 0===e){const e=I.encode(_),r=t(e.length,1)>>>0;return s().subarray(r,r+e.length).set(e),U=e.length,r}let r=_.length,n=t(r,1)>>>0;const i=s();let o=0;for(;o127)break;i[n+o]=t}if(o!==r){0!==o&&(_=_.slice(o)),n=e(n,r,r=o+3*_.length,1)>>>0;const t=s().subarray(n+o,n+r);o+=q(_,t).written,n=e(n,r,o,1)>>>0}return U=o,n}function d(_){return null==_}let W=null;function b(){return null!==W&&W.buffer===K.memory.buffer||(W=new Int32Array(K.memory.buffer)),W}function l(_){const t=typeof _;if("number"==t||"boolean"==t||null==_)return`${_}`;if("string"==t)return`"${_}"`;if("symbol"==t){const t=_.description;return null==t?"Symbol":`Symbol(${t})`}if("function"==t){const t=_.name;return"string"==typeof t&&t.length>0?`Function(${t})`:"Function"}if(Array.isArray(_)){const t=_.length;let e="[";t>0&&(e+=l(_[0]));for(let r=1;r1))return toString.call(_);if(r=e[1],"Object"==r)try{return"Object("+JSON.stringify(_)+")"}catch(_){return"Object"}return _ instanceof Error?`${_.name}: ${_.message}\n${_.stack}`:r}const $="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((_=>{K.__wbindgen_export_3.get(_.dtor)(_.a,_.b)}));function u(_,t,e,r){const n={a:_,b:t,cnt:1,dtor:e},i=(..._)=>{n.cnt++;const t=n.a;n.a=0;try{return r(t,n.b,..._)}finally{0==--n.cnt?(K.__wbindgen_export_3.get(n.dtor)(t,n.b),$.unregister(n)):n.a=t}};return i.original=n,$.register(i,n,n),i}function f(_,t,e){K._dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h467700a9696faab3(_,t,g(e))}function p(_,t){if(!(_ instanceof t))throw new Error(`expected instance of ${t.name}`);return _.ptr}function y(_,t){const e=t(1*_.length,1)>>>0;return s().set(_,e/1),U=_.length,e}function m(_,t,e,r){try{const o=K.__wbindgen_add_to_stack_pointer(-16);p(_,H),p(t,S_),p(e,g_);const s=w(r,K.__wbindgen_malloc,K.__wbindgen_realloc),c=U;K.verifyFunctionExecution(o,_.__wbg_ptr,t.__wbg_ptr,e.__wbg_ptr,s,c);var n=b()[o/4+0],i=b()[o/4+1];if(b()[o/4+2])throw a(i);return 0!==n}finally{K.__wbindgen_add_to_stack_pointer(16)}}let N=null;function h(){return null!==N&&N.buffer===K.memory.buffer||(N=new BigInt64Array(K.memory.buffer)),N}function v(_,t){return _>>>=0,s().subarray(_/1,_/1+t)}function k(_){K.runRayonThread(_)}function P(_,t){return a(K.initThreadPool(g(_),t))}function S(_,t){try{return _.apply(this,t)}catch(_){K.__wbindgen_exn_store(g(_))}}function x(_,t,e,r){K.wasm_bindgen__convert__closures__invoke2_mut__h381bef3cd886b4c7(_,t,g(e),g(r))}const D="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((_=>K.__wbg_address_free(_>>>0)));let J=class _{static __wrap(t){t>>>=0;const e=Object.create(_.prototype);return e.__wbg_ptr=t,D.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,D.unregister(this),_}free(){const _=this.__destroy_into_raw();K.__wbg_address_free(_)}static from_private_key(t){p(t,o_);const e=K.address_from_private_key(t.__wbg_ptr);return _.__wrap(e)}static from_view_key(t){p(t,V_);const e=K.address_from_view_key(t.__wbg_ptr);return _.__wrap(e)}static from_string(t){const e=w(t,K.__wbindgen_malloc,K.__wbindgen_realloc),r=U,n=K.address_from_string(e,r);return _.__wrap(n)}to_string(){let _,t;try{const n=K.__wbindgen_add_to_stack_pointer(-16);K.address_to_string(n,this.__wbg_ptr);var e=b()[n/4+0],r=b()[n/4+1];return _=e,t=r,c(e,r)}finally{K.__wbindgen_add_to_stack_pointer(16),K.__wbindgen_free(_,t,1)}}verify(_,t){const e=y(_,K.__wbindgen_malloc),r=U;p(t,h_);return 0!==K.address_verify(this.__wbg_ptr,e,r,t.__wbg_ptr)}};const L="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((_=>K.__wbg_execution_free(_>>>0)));let H=class _{static __wrap(t){t>>>=0;const e=Object.create(_.prototype);return e.__wbg_ptr=t,L.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,L.unregister(this),_}free(){const _=this.__destroy_into_raw();K.__wbg_execution_free(_)}toString(){let _,t;try{const n=K.__wbindgen_add_to_stack_pointer(-16);K.execution_toString(n,this.__wbg_ptr);var e=b()[n/4+0],r=b()[n/4+1];return _=e,t=r,c(e,r)}finally{K.__wbindgen_add_to_stack_pointer(16),K.__wbindgen_free(_,t,1)}}static fromString(t){try{const n=K.__wbindgen_add_to_stack_pointer(-16),i=w(t,K.__wbindgen_malloc,K.__wbindgen_realloc),o=U;K.execution_fromString(n,i,o);var e=b()[n/4+0],r=b()[n/4+1];if(b()[n/4+2])throw a(r);return _.__wrap(e)}finally{K.__wbindgen_add_to_stack_pointer(16)}}};const Q="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((_=>K.__wbg_executionresponse_free(_>>>0)));let X=class _{static __wrap(t){t>>>=0;const e=Object.create(_.prototype);return e.__wbg_ptr=t,Q.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,Q.unregister(this),_}free(){const _=this.__destroy_into_raw();K.__wbg_executionresponse_free(_)}getOutputs(){return a(K.executionresponse_getOutputs(this.__wbg_ptr))}getExecution(){const _=K.executionresponse_getExecution(this.__wbg_ptr);return 0===_?void 0:H.__wrap(_)}getKeys(){try{const e=K.__wbindgen_add_to_stack_pointer(-16);K.executionresponse_getKeys(e,this.__wbg_ptr);var _=b()[e/4+0],t=b()[e/4+1];if(b()[e/4+2])throw a(t);return __.__wrap(_)}finally{K.__wbindgen_add_to_stack_pointer(16)}}getProvingKey(){const _=K.executionresponse_getProvingKey(this.__wbg_ptr);return 0===_?void 0:l_.__wrap(_)}getVerifyingKey(){const _=K.executionresponse_getVerifyingKey(this.__wbg_ptr);return S_.__wrap(_)}getFunctionId(){let _,t;try{const n=K.__wbindgen_add_to_stack_pointer(-16);K.executionresponse_getFunctionId(n,this.__wbg_ptr);var e=b()[n/4+0],r=b()[n/4+1];return _=e,t=r,c(e,r)}finally{K.__wbindgen_add_to_stack_pointer(16),K.__wbindgen_free(_,t,1)}}getProgram(){const _=K.executionresponse_getProgram(this.__wbg_ptr);return g_.__wrap(_)}};const Y="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((_=>K.__wbg_field_free(_>>>0)));let G=class _{static __wrap(t){t>>>=0;const e=Object.create(_.prototype);return e.__wbg_ptr=t,Y.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,Y.unregister(this),_}free(){const _=this.__destroy_into_raw();K.__wbg_field_free(_)}toString(){let _,t;try{const n=K.__wbindgen_add_to_stack_pointer(-16);K.field_toString(n,this.__wbg_ptr);var e=b()[n/4+0],r=b()[n/4+1];return _=e,t=r,c(e,r)}finally{K.__wbindgen_add_to_stack_pointer(16),K.__wbindgen_free(_,t,1)}}static fromString(t){try{const n=K.__wbindgen_add_to_stack_pointer(-16),i=w(t,K.__wbindgen_malloc,K.__wbindgen_realloc),o=U;K.field_fromString(n,i,o);var e=b()[n/4+0],r=b()[n/4+1];if(b()[n/4+2])throw a(r);return _.__wrap(e)}finally{K.__wbindgen_add_to_stack_pointer(16)}}};const Z="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((_=>K.__wbg_keypair_free(_>>>0)));class __{static __wrap(_){_>>>=0;const t=Object.create(__.prototype);return t.__wbg_ptr=_,Z.register(t,t.__wbg_ptr,t),t}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,Z.unregister(this),_}free(){const _=this.__destroy_into_raw();K.__wbg_keypair_free(_)}constructor(_,t){p(_,l_);var e=_.__destroy_into_raw();p(t,S_);var r=t.__destroy_into_raw();const n=K.keypair_new(e,r);return this.__wbg_ptr=n>>>0,this}provingKey(){try{const e=K.__wbindgen_add_to_stack_pointer(-16);K.keypair_provingKey(e,this.__wbg_ptr);var _=b()[e/4+0],t=b()[e/4+1];if(b()[e/4+2])throw a(t);return l_.__wrap(_)}finally{K.__wbindgen_add_to_stack_pointer(16)}}verifyingKey(){try{const e=K.__wbindgen_add_to_stack_pointer(-16);K.keypair_verifyingKey(e,this.__wbg_ptr);var _=b()[e/4+0],t=b()[e/4+1];if(b()[e/4+2])throw a(t);return S_.__wrap(_)}finally{K.__wbindgen_add_to_stack_pointer(16)}}}const t_="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((_=>K.__wbg_metadata_free(_>>>0)));let e_=class _{static __wrap(t){t>>>=0;const e=Object.create(_.prototype);return e.__wbg_ptr=t,t_.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,t_.unregister(this),_}free(){const _=this.__destroy_into_raw();K.__wbg_metadata_free(_)}get name(){let _,t;try{const n=K.__wbindgen_add_to_stack_pointer(-16);K.__wbg_get_metadata_name(n,this.__wbg_ptr);var e=b()[n/4+0],r=b()[n/4+1];return _=e,t=r,c(e,r)}finally{K.__wbindgen_add_to_stack_pointer(16),K.__wbindgen_free(_,t,1)}}set name(_){const t=w(_,K.__wbindgen_malloc,K.__wbindgen_realloc),e=U;K.__wbg_set_metadata_name(this.__wbg_ptr,t,e)}get locator(){let _,t;try{const n=K.__wbindgen_add_to_stack_pointer(-16);K.__wbg_get_metadata_locator(n,this.__wbg_ptr);var e=b()[n/4+0],r=b()[n/4+1];return _=e,t=r,c(e,r)}finally{K.__wbindgen_add_to_stack_pointer(16),K.__wbindgen_free(_,t,1)}}set locator(_){const t=w(_,K.__wbindgen_malloc,K.__wbindgen_realloc),e=U;K.__wbg_set_metadata_locator(this.__wbg_ptr,t,e)}get prover(){let _,t;try{const n=K.__wbindgen_add_to_stack_pointer(-16);K.__wbg_get_metadata_prover(n,this.__wbg_ptr);var e=b()[n/4+0],r=b()[n/4+1];return _=e,t=r,c(e,r)}finally{K.__wbindgen_add_to_stack_pointer(16),K.__wbindgen_free(_,t,1)}}set prover(_){const t=w(_,K.__wbindgen_malloc,K.__wbindgen_realloc),e=U;K.__wbg_set_metadata_prover(this.__wbg_ptr,t,e)}get verifier(){let _,t;try{const n=K.__wbindgen_add_to_stack_pointer(-16);K.__wbg_get_metadata_verifier(n,this.__wbg_ptr);var e=b()[n/4+0],r=b()[n/4+1];return _=e,t=r,c(e,r)}finally{K.__wbindgen_add_to_stack_pointer(16),K.__wbindgen_free(_,t,1)}}set verifier(_){const t=w(_,K.__wbindgen_malloc,K.__wbindgen_realloc),e=U;K.__wbg_set_metadata_verifier(this.__wbg_ptr,t,e)}get verifyingKey(){let _,t;try{const n=K.__wbindgen_add_to_stack_pointer(-16);K.__wbg_get_metadata_verifyingKey(n,this.__wbg_ptr);var e=b()[n/4+0],r=b()[n/4+1];return _=e,t=r,c(e,r)}finally{K.__wbindgen_add_to_stack_pointer(16),K.__wbindgen_free(_,t,1)}}set verifyingKey(_){const t=w(_,K.__wbindgen_malloc,K.__wbindgen_realloc),e=U;K.__wbg_set_metadata_verifyingKey(this.__wbg_ptr,t,e)}static baseUrl(){let _,t;try{const n=K.__wbindgen_add_to_stack_pointer(-16);K.metadata_baseUrl(n);var e=b()[n/4+0],r=b()[n/4+1];return _=e,t=r,c(e,r)}finally{K.__wbindgen_add_to_stack_pointer(16),K.__wbindgen_free(_,t,1)}}static bond_public(){const t=K.metadata_bond_public();return _.__wrap(t)}static bond_validator(){const t=K.metadata_bond_validator();return _.__wrap(t)}static claim_unbond_public(){const t=K.metadata_claim_unbond_public();return _.__wrap(t)}static fee_private(){const t=K.metadata_fee_private();return _.__wrap(t)}static fee_public(){const t=K.metadata_fee_public();return _.__wrap(t)}static inclusion(){const t=K.metadata_inclusion();return _.__wrap(t)}static join(){const t=K.metadata_join();return _.__wrap(t)}static set_validator_state(){const t=K.metadata_set_validator_state();return _.__wrap(t)}static split(){const t=K.metadata_split();return _.__wrap(t)}static transfer_private(){const t=K.metadata_transfer_private();return _.__wrap(t)}static transfer_private_to_public(){const t=K.metadata_transfer_private_to_public();return _.__wrap(t)}static transfer_public(){const t=K.metadata_transfer_public();return _.__wrap(t)}static transfer_public_as_signer(){const t=K.metadata_transfer_public_as_signer();return _.__wrap(t)}static transfer_public_to_private(){const t=K.metadata_transfer_public_to_private();return _.__wrap(t)}static unbond_public(){const t=K.metadata_unbond_public();return _.__wrap(t)}};const r_="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((_=>K.__wbg_offlinequery_free(_>>>0)));let n_=class _{static __wrap(t){t>>>=0;const e=Object.create(_.prototype);return e.__wbg_ptr=t,r_.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,r_.unregister(this),_}free(){const _=this.__destroy_into_raw();K.__wbg_offlinequery_free(_)}constructor(_){try{const r=K.__wbindgen_add_to_stack_pointer(-16),n=w(_,K.__wbindgen_malloc,K.__wbindgen_realloc),i=U;K.offlinequery_new(r,n,i);var t=b()[r/4+0],e=b()[r/4+1];if(b()[r/4+2])throw a(e);return this.__wbg_ptr=t>>>0,this}finally{K.__wbindgen_add_to_stack_pointer(16)}}addStatePath(_,t){try{const r=K.__wbindgen_add_to_stack_pointer(-16),n=w(_,K.__wbindgen_malloc,K.__wbindgen_realloc),i=U,o=w(t,K.__wbindgen_malloc,K.__wbindgen_realloc),s=U;K.offlinequery_addStatePath(r,this.__wbg_ptr,n,i,o,s);var e=b()[r/4+0];if(b()[r/4+1])throw a(e)}finally{K.__wbindgen_add_to_stack_pointer(16)}}toString(){let _,t;try{const n=K.__wbindgen_add_to_stack_pointer(-16);K.offlinequery_toString(n,this.__wbg_ptr);var e=b()[n/4+0],r=b()[n/4+1];return _=e,t=r,c(e,r)}finally{K.__wbindgen_add_to_stack_pointer(16),K.__wbindgen_free(_,t,1)}}static fromString(t){try{const n=K.__wbindgen_add_to_stack_pointer(-16),i=w(t,K.__wbindgen_malloc,K.__wbindgen_realloc),o=U;K.offlinequery_fromString(n,i,o);var e=b()[n/4+0],r=b()[n/4+1];if(b()[n/4+2])throw a(r);return _.__wrap(e)}finally{K.__wbindgen_add_to_stack_pointer(16)}}};const i_="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((_=>K.__wbg_privatekey_free(_>>>0)));let o_=class _{static __wrap(t){t>>>=0;const e=Object.create(_.prototype);return e.__wbg_ptr=t,i_.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,i_.unregister(this),_}free(){const _=this.__destroy_into_raw();K.__wbg_privatekey_free(_)}constructor(){const _=K.privatekey_new();return this.__wbg_ptr=_>>>0,this}static from_seed_unchecked(t){const e=y(t,K.__wbindgen_malloc),r=U,n=K.privatekey_from_seed_unchecked(e,r);return _.__wrap(n)}static from_string(t){try{const n=K.__wbindgen_add_to_stack_pointer(-16),i=w(t,K.__wbindgen_malloc,K.__wbindgen_realloc),o=U;K.privatekey_from_string(n,i,o);var e=b()[n/4+0],r=b()[n/4+1];if(b()[n/4+2])throw a(r);return _.__wrap(e)}finally{K.__wbindgen_add_to_stack_pointer(16)}}to_string(){let _,t;try{const n=K.__wbindgen_add_to_stack_pointer(-16);K.privatekey_to_string(n,this.__wbg_ptr);var e=b()[n/4+0],r=b()[n/4+1];return _=e,t=r,c(e,r)}finally{K.__wbindgen_add_to_stack_pointer(16),K.__wbindgen_free(_,t,1)}}to_view_key(){const _=K.privatekey_to_view_key(this.__wbg_ptr);return V_.__wrap(_)}to_address(){const _=K.privatekey_to_address(this.__wbg_ptr);return J.__wrap(_)}sign(_){const t=y(_,K.__wbindgen_malloc),e=U,r=K.privatekey_sign(this.__wbg_ptr,t,e);return h_.__wrap(r)}static newEncrypted(_){try{const r=K.__wbindgen_add_to_stack_pointer(-16),n=w(_,K.__wbindgen_malloc,K.__wbindgen_realloc),i=U;K.privatekey_newEncrypted(r,n,i);var t=b()[r/4+0],e=b()[r/4+1];if(b()[r/4+2])throw a(e);return s_.__wrap(t)}finally{K.__wbindgen_add_to_stack_pointer(16)}}toCiphertext(_){try{const r=K.__wbindgen_add_to_stack_pointer(-16),n=w(_,K.__wbindgen_malloc,K.__wbindgen_realloc),i=U;K.privatekey_toCiphertext(r,this.__wbg_ptr,n,i);var t=b()[r/4+0],e=b()[r/4+1];if(b()[r/4+2])throw a(e);return s_.__wrap(t)}finally{K.__wbindgen_add_to_stack_pointer(16)}}static fromPrivateKeyCiphertext(t,e){try{const i=K.__wbindgen_add_to_stack_pointer(-16);p(t,s_);const o=w(e,K.__wbindgen_malloc,K.__wbindgen_realloc),s=U;K.privatekey_fromPrivateKeyCiphertext(i,t.__wbg_ptr,o,s);var r=b()[i/4+0],n=b()[i/4+1];if(b()[i/4+2])throw a(n);return _.__wrap(r)}finally{K.__wbindgen_add_to_stack_pointer(16)}}};const a_="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((_=>K.__wbg_privatekeyciphertext_free(_>>>0)));let s_=class _{static __wrap(t){t>>>=0;const e=Object.create(_.prototype);return e.__wbg_ptr=t,a_.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,a_.unregister(this),_}free(){const _=this.__destroy_into_raw();K.__wbg_privatekeyciphertext_free(_)}static encryptPrivateKey(t,e){try{const i=K.__wbindgen_add_to_stack_pointer(-16);p(t,o_);const o=w(e,K.__wbindgen_malloc,K.__wbindgen_realloc),s=U;K.privatekey_toCiphertext(i,t.__wbg_ptr,o,s);var r=b()[i/4+0],n=b()[i/4+1];if(b()[i/4+2])throw a(n);return _.__wrap(r)}finally{K.__wbindgen_add_to_stack_pointer(16)}}decryptToPrivateKey(_){try{const r=K.__wbindgen_add_to_stack_pointer(-16),n=w(_,K.__wbindgen_malloc,K.__wbindgen_realloc),i=U;K.privatekeyciphertext_decryptToPrivateKey(r,this.__wbg_ptr,n,i);var t=b()[r/4+0],e=b()[r/4+1];if(b()[r/4+2])throw a(e);return o_.__wrap(t)}finally{K.__wbindgen_add_to_stack_pointer(16)}}toString(){let _,t;try{const n=K.__wbindgen_add_to_stack_pointer(-16);K.privatekeyciphertext_toString(n,this.__wbg_ptr);var e=b()[n/4+0],r=b()[n/4+1];return _=e,t=r,c(e,r)}finally{K.__wbindgen_add_to_stack_pointer(16),K.__wbindgen_free(_,t,1)}}static fromString(t){try{const n=K.__wbindgen_add_to_stack_pointer(-16),i=w(t,K.__wbindgen_malloc,K.__wbindgen_realloc),o=U;K.privatekeyciphertext_fromString(n,i,o);var e=b()[n/4+0],r=b()[n/4+1];if(b()[n/4+2])throw a(r);return _.__wrap(e)}finally{K.__wbindgen_add_to_stack_pointer(16)}}};const c_="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((_=>K.__wbg_program_free(_>>>0)));let g_=class _{static __wrap(t){t>>>=0;const e=Object.create(_.prototype);return e.__wbg_ptr=t,c_.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,c_.unregister(this),_}free(){const _=this.__destroy_into_raw();K.__wbg_program_free(_)}static fromString(t){try{const n=K.__wbindgen_add_to_stack_pointer(-16),i=w(t,K.__wbindgen_malloc,K.__wbindgen_realloc),o=U;K.program_fromString(n,i,o);var e=b()[n/4+0],r=b()[n/4+1];if(b()[n/4+2])throw a(r);return _.__wrap(e)}finally{K.__wbindgen_add_to_stack_pointer(16)}}toString(){let _,t;try{const n=K.__wbindgen_add_to_stack_pointer(-16);K.program_toString(n,this.__wbg_ptr);var e=b()[n/4+0],r=b()[n/4+1];return _=e,t=r,c(e,r)}finally{K.__wbindgen_add_to_stack_pointer(16),K.__wbindgen_free(_,t,1)}}hasFunction(_){const t=w(_,K.__wbindgen_malloc,K.__wbindgen_realloc),e=U;return 0!==K.program_hasFunction(this.__wbg_ptr,t,e)}getFunctions(){return a(K.program_getFunctions(this.__wbg_ptr))}getFunctionInputs(_){try{const r=K.__wbindgen_add_to_stack_pointer(-16),n=w(_,K.__wbindgen_malloc,K.__wbindgen_realloc),i=U;K.program_getFunctionInputs(r,this.__wbg_ptr,n,i);var t=b()[r/4+0],e=b()[r/4+1];if(b()[r/4+2])throw a(e);return a(t)}finally{K.__wbindgen_add_to_stack_pointer(16)}}getMappings(){try{const e=K.__wbindgen_add_to_stack_pointer(-16);K.program_getMappings(e,this.__wbg_ptr);var _=b()[e/4+0],t=b()[e/4+1];if(b()[e/4+2])throw a(t);return a(_)}finally{K.__wbindgen_add_to_stack_pointer(16)}}getRecordMembers(_){try{const r=K.__wbindgen_add_to_stack_pointer(-16),n=w(_,K.__wbindgen_malloc,K.__wbindgen_realloc),i=U;K.program_getRecordMembers(r,this.__wbg_ptr,n,i);var t=b()[r/4+0],e=b()[r/4+1];if(b()[r/4+2])throw a(e);return a(t)}finally{K.__wbindgen_add_to_stack_pointer(16)}}getStructMembers(_){try{const r=K.__wbindgen_add_to_stack_pointer(-16),n=w(_,K.__wbindgen_malloc,K.__wbindgen_realloc),i=U;K.program_getStructMembers(r,this.__wbg_ptr,n,i);var t=b()[r/4+0],e=b()[r/4+1];if(b()[r/4+2])throw a(e);return a(t)}finally{K.__wbindgen_add_to_stack_pointer(16)}}static getCreditsProgram(){const t=K.program_getCreditsProgram();return _.__wrap(t)}id(){let _,t;try{const n=K.__wbindgen_add_to_stack_pointer(-16);K.program_id(n,this.__wbg_ptr);var e=b()[n/4+0],r=b()[n/4+1];return _=e,t=r,c(e,r)}finally{K.__wbindgen_add_to_stack_pointer(16),K.__wbindgen_free(_,t,1)}}address(){try{const e=K.__wbindgen_add_to_stack_pointer(-16);K.program_address(e,this.__wbg_ptr);var _=b()[e/4+0],t=b()[e/4+1];if(b()[e/4+2])throw a(t);return J.__wrap(_)}finally{K.__wbindgen_add_to_stack_pointer(16)}}isEqual(t){p(t,_);return 0!==K.program_isEqual(this.__wbg_ptr,t.__wbg_ptr)}getImports(){return a(K.program_getImports(this.__wbg_ptr))}};const w_="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((_=>K.__wbg_programmanager_free(_>>>0)));let d_=class{__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,w_.unregister(this),_}free(){const _=this.__destroy_into_raw();K.__wbg_programmanager_free(_)}static buildDeploymentTransaction(_,t,e,r,n,i,o,s,c){p(_,o_);const b=w(t,K.__wbindgen_malloc,K.__wbindgen_realloc),l=U;let u=0;d(r)||(p(r,y_),u=r.__destroy_into_raw());var f=d(n)?0:w(n,K.__wbindgen_malloc,K.__wbindgen_realloc),y=U;let m=0;d(o)||(p(o,l_),m=o.__destroy_into_raw());let h=0;d(s)||(p(s,S_),h=s.__destroy_into_raw());let v=0;d(c)||(p(c,n_),v=c.__destroy_into_raw());return a(K.programmanager_buildDeploymentTransaction(_.__wbg_ptr,b,l,e,u,f,y,d(i)?0:g(i),m,h,v))}static estimateDeploymentFee(_,t){const e=w(_,K.__wbindgen_malloc,K.__wbindgen_realloc),r=U;return a(K.programmanager_estimateDeploymentFee(e,r,d(t)?0:g(t)))}static estimateProgramNameCost(_){try{const r=K.__wbindgen_add_to_stack_pointer(-16),n=w(_,K.__wbindgen_malloc,K.__wbindgen_realloc),i=U;K.programmanager_estimateProgramNameCost(r,n,i);var t=h()[r/8+0],e=b()[r/4+2];if(b()[r/4+3])throw a(e);return BigInt.asUintN(64,t)}finally{K.__wbindgen_add_to_stack_pointer(16)}}static executeFunctionOffline(_,t,e,r,n,i,o,s,c,b,l){p(_,o_);const u=w(t,K.__wbindgen_malloc,K.__wbindgen_realloc),f=U,y=w(e,K.__wbindgen_malloc,K.__wbindgen_realloc),m=U;let h=0;d(s)||(p(s,l_),h=s.__destroy_into_raw());let v=0;d(c)||(p(c,S_),v=c.__destroy_into_raw());var k=d(b)?0:w(b,K.__wbindgen_malloc,K.__wbindgen_realloc),P=U;let S=0;d(l)||(p(l,n_),S=l.__destroy_into_raw());return a(K.programmanager_executeFunctionOffline(_.__wbg_ptr,u,f,y,m,g(r),n,i,d(o)?0:g(o),h,v,k,P,S))}static buildExecutionTransaction(_,t,e,r,n,i,o,s,c,b,l,u,f){p(_,o_);const y=w(t,K.__wbindgen_malloc,K.__wbindgen_realloc),m=U,h=w(e,K.__wbindgen_malloc,K.__wbindgen_realloc),v=U;let k=0;d(i)||(p(i,y_),k=i.__destroy_into_raw());var P=d(o)?0:w(o,K.__wbindgen_malloc,K.__wbindgen_realloc),S=U;let x=0;d(c)||(p(c,l_),x=c.__destroy_into_raw());let V=0;d(b)||(p(b,S_),V=b.__destroy_into_raw());let F=0;d(l)||(p(l,l_),F=l.__destroy_into_raw());let T=0;d(u)||(p(u,S_),T=u.__destroy_into_raw());let R=0;d(f)||(p(f,n_),R=f.__destroy_into_raw());return a(K.programmanager_buildExecutionTransaction(_.__wbg_ptr,y,m,h,v,g(r),n,k,P,S,d(s)?0:g(s),x,V,F,T,R))}static estimateExecutionFee(_,t,e,r,n,i,o,s,c){p(_,o_);const b=w(t,K.__wbindgen_malloc,K.__wbindgen_realloc),l=U,u=w(e,K.__wbindgen_malloc,K.__wbindgen_realloc),f=U;var y=d(n)?0:w(n,K.__wbindgen_malloc,K.__wbindgen_realloc),m=U;let h=0;d(o)||(p(o,l_),h=o.__destroy_into_raw());let v=0;d(s)||(p(s,S_),v=s.__destroy_into_raw());let k=0;d(c)||(p(c,n_),k=c.__destroy_into_raw());return a(K.programmanager_estimateExecutionFee(_.__wbg_ptr,b,l,u,f,g(r),y,m,d(i)?0:g(i),h,v,k))}static estimateFinalizeFee(_,t){try{const n=K.__wbindgen_add_to_stack_pointer(-16),i=w(_,K.__wbindgen_malloc,K.__wbindgen_realloc),o=U,s=w(t,K.__wbindgen_malloc,K.__wbindgen_realloc),c=U;K.programmanager_estimateFinalizeFee(n,i,o,s,c);var e=h()[n/8+0],r=b()[n/4+2];if(b()[n/4+3])throw a(r);return BigInt.asUintN(64,e)}finally{K.__wbindgen_add_to_stack_pointer(16)}}static buildJoinTransaction(_,t,e,r,n,i,o,s,c,g,b){p(_,o_),p(t,y_);var l=t.__destroy_into_raw();p(e,y_);var u=e.__destroy_into_raw();let f=0;d(n)||(p(n,y_),f=n.__destroy_into_raw());var y=d(i)?0:w(i,K.__wbindgen_malloc,K.__wbindgen_realloc),m=U;let h=0;d(o)||(p(o,l_),h=o.__destroy_into_raw());let v=0;d(s)||(p(s,S_),v=s.__destroy_into_raw());let k=0;d(c)||(p(c,l_),k=c.__destroy_into_raw());let P=0;d(g)||(p(g,S_),P=g.__destroy_into_raw());let S=0;d(b)||(p(b,n_),S=b.__destroy_into_raw());return a(K.programmanager_buildJoinTransaction(_.__wbg_ptr,l,u,r,f,y,m,h,v,k,P,S))}static buildSplitTransaction(_,t,e,r,n,i,o){p(_,o_),p(e,y_);var s=e.__destroy_into_raw(),c=d(r)?0:w(r,K.__wbindgen_malloc,K.__wbindgen_realloc),g=U;let b=0;d(n)||(p(n,l_),b=n.__destroy_into_raw());let l=0;d(i)||(p(i,S_),l=i.__destroy_into_raw());let u=0;d(o)||(p(o,n_),u=o.__destroy_into_raw());return a(K.programmanager_buildSplitTransaction(_.__wbg_ptr,t,s,c,g,b,l,u))}static buildTransferTransaction(_,t,e,r,n,i,o,s,c,g,b,l,u){p(_,o_);const f=w(e,K.__wbindgen_malloc,K.__wbindgen_realloc),y=U,m=w(r,K.__wbindgen_malloc,K.__wbindgen_realloc),h=U;let v=0;d(n)||(p(n,y_),v=n.__destroy_into_raw());let k=0;d(o)||(p(o,y_),k=o.__destroy_into_raw());var P=d(s)?0:w(s,K.__wbindgen_malloc,K.__wbindgen_realloc),S=U;let x=0;d(c)||(p(c,l_),x=c.__destroy_into_raw());let V=0;d(g)||(p(g,S_),V=g.__destroy_into_raw());let F=0;d(b)||(p(b,l_),F=b.__destroy_into_raw());let T=0;d(l)||(p(l,S_),T=l.__destroy_into_raw());let R=0;d(u)||(p(u,n_),R=u.__destroy_into_raw());return a(K.programmanager_buildTransferTransaction(_.__wbg_ptr,t,f,y,m,h,v,i,k,P,S,x,V,F,T,R))}static synthesizeKeyPair(_,t,e,r,n){p(_,o_);const i=w(t,K.__wbindgen_malloc,K.__wbindgen_realloc),o=U,s=w(e,K.__wbindgen_malloc,K.__wbindgen_realloc),c=U;return a(K.programmanager_synthesizeKeyPair(_.__wbg_ptr,i,o,s,c,g(r),d(n)?0:g(n)))}};const b_="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((_=>K.__wbg_provingkey_free(_>>>0)));let l_=class _{static __wrap(t){t>>>=0;const e=Object.create(_.prototype);return e.__wbg_ptr=t,b_.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,b_.unregister(this),_}free(){const _=this.__destroy_into_raw();K.__wbg_provingkey_free(_)}isBondPublicProver(){return 0!==K.provingkey_isBondPublicProver(this.__wbg_ptr)}isBondValidatorProver(){return 0!==K.provingkey_isBondValidatorProver(this.__wbg_ptr)}isClaimUnbondPublicProver(){return 0!==K.provingkey_isClaimUnbondPublicProver(this.__wbg_ptr)}isFeePrivateProver(){return 0!==K.provingkey_isFeePrivateProver(this.__wbg_ptr)}isFeePublicProver(){return 0!==K.provingkey_isFeePublicProver(this.__wbg_ptr)}isInclusionProver(){return 0!==K.provingkey_isInclusionProver(this.__wbg_ptr)}isJoinProver(){return 0!==K.provingkey_isJoinProver(this.__wbg_ptr)}isSetValidatorStateProver(){return 0!==K.provingkey_isSetValidatorStateProver(this.__wbg_ptr)}isSplitProver(){return 0!==K.provingkey_isSplitProver(this.__wbg_ptr)}isTransferPrivateProver(){return 0!==K.provingkey_isTransferPrivateProver(this.__wbg_ptr)}isTransferPrivateToPublicProver(){return 0!==K.provingkey_isTransferPrivateToPublicProver(this.__wbg_ptr)}isTransferPublicProver(){return 0!==K.provingkey_isTransferPublicProver(this.__wbg_ptr)}isTransferPublicAsSignerProver(){return 0!==K.provingkey_isTransferPublicAsSignerProver(this.__wbg_ptr)}isTransferPublicToPrivateProver(){return 0!==K.provingkey_isTransferPublicToPrivateProver(this.__wbg_ptr)}isUnbondPublicProver(){return 0!==K.provingkey_isUnbondPublicProver(this.__wbg_ptr)}checksum(){let _,t;try{const n=K.__wbindgen_add_to_stack_pointer(-16);K.provingkey_checksum(n,this.__wbg_ptr);var e=b()[n/4+0],r=b()[n/4+1];return _=e,t=r,c(e,r)}finally{K.__wbindgen_add_to_stack_pointer(16),K.__wbindgen_free(_,t,1)}}copy(){const t=K.provingkey_copy(this.__wbg_ptr);return _.__wrap(t)}static fromBytes(t){try{const n=K.__wbindgen_add_to_stack_pointer(-16),i=y(t,K.__wbindgen_malloc),o=U;K.provingkey_fromBytes(n,i,o);var e=b()[n/4+0],r=b()[n/4+1];if(b()[n/4+2])throw a(r);return _.__wrap(e)}finally{K.__wbindgen_add_to_stack_pointer(16)}}static fromString(t){try{const n=K.__wbindgen_add_to_stack_pointer(-16),i=w(t,K.__wbindgen_malloc,K.__wbindgen_realloc),o=U;K.provingkey_fromString(n,i,o);var e=b()[n/4+0],r=b()[n/4+1];if(b()[n/4+2])throw a(r);return _.__wrap(e)}finally{K.__wbindgen_add_to_stack_pointer(16)}}toBytes(){try{const n=K.__wbindgen_add_to_stack_pointer(-16);K.provingkey_toBytes(n,this.__wbg_ptr);var _=b()[n/4+0],t=b()[n/4+1],e=b()[n/4+2];if(b()[n/4+3])throw a(e);var r=v(_,t).slice();return K.__wbindgen_free(_,1*t,1),r}finally{K.__wbindgen_add_to_stack_pointer(16)}}toString(){let _,t;try{const n=K.__wbindgen_add_to_stack_pointer(-16);K.provingkey_toString(n,this.__wbg_ptr);var e=b()[n/4+0],r=b()[n/4+1];return _=e,t=r,c(e,r)}finally{K.__wbindgen_add_to_stack_pointer(16),K.__wbindgen_free(_,t,1)}}};const u_="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((_=>K.__wbg_recordciphertext_free(_>>>0)));let f_=class _{static __wrap(t){t>>>=0;const e=Object.create(_.prototype);return e.__wbg_ptr=t,u_.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,u_.unregister(this),_}free(){const _=this.__destroy_into_raw();K.__wbg_recordciphertext_free(_)}static fromString(t){try{const n=K.__wbindgen_add_to_stack_pointer(-16),i=w(t,K.__wbindgen_malloc,K.__wbindgen_realloc),o=U;K.recordciphertext_fromString(n,i,o);var e=b()[n/4+0],r=b()[n/4+1];if(b()[n/4+2])throw a(r);return _.__wrap(e)}finally{K.__wbindgen_add_to_stack_pointer(16)}}toString(){let _,t;try{const n=K.__wbindgen_add_to_stack_pointer(-16);K.recordciphertext_toString(n,this.__wbg_ptr);var e=b()[n/4+0],r=b()[n/4+1];return _=e,t=r,c(e,r)}finally{K.__wbindgen_add_to_stack_pointer(16),K.__wbindgen_free(_,t,1)}}decrypt(_){try{const r=K.__wbindgen_add_to_stack_pointer(-16);p(_,V_),K.recordciphertext_decrypt(r,this.__wbg_ptr,_.__wbg_ptr);var t=b()[r/4+0],e=b()[r/4+1];if(b()[r/4+2])throw a(e);return y_.__wrap(t)}finally{K.__wbindgen_add_to_stack_pointer(16)}}isOwner(_){p(_,V_);return 0!==K.recordciphertext_isOwner(this.__wbg_ptr,_.__wbg_ptr)}};const p_="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((_=>K.__wbg_recordplaintext_free(_>>>0)));let y_=class _{static __wrap(t){t>>>=0;const e=Object.create(_.prototype);return e.__wbg_ptr=t,p_.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,p_.unregister(this),_}free(){const _=this.__destroy_into_raw();K.__wbg_recordplaintext_free(_)}commitment(_,t){try{const n=K.__wbindgen_add_to_stack_pointer(-16),i=w(_,K.__wbindgen_malloc,K.__wbindgen_realloc),o=U,s=w(t,K.__wbindgen_malloc,K.__wbindgen_realloc),c=U;K.recordplaintext_commitment(n,this.__wbg_ptr,i,o,s,c);var e=b()[n/4+0],r=b()[n/4+1];if(b()[n/4+2])throw a(r);return G.__wrap(e)}finally{K.__wbindgen_add_to_stack_pointer(16)}}static fromString(t){try{const n=K.__wbindgen_add_to_stack_pointer(-16),i=w(t,K.__wbindgen_malloc,K.__wbindgen_realloc),o=U;K.recordplaintext_fromString(n,i,o);var e=b()[n/4+0],r=b()[n/4+1];if(b()[n/4+2])throw a(r);return _.__wrap(e)}finally{K.__wbindgen_add_to_stack_pointer(16)}}toString(){let _,t;try{const n=K.__wbindgen_add_to_stack_pointer(-16);K.recordplaintext_toString(n,this.__wbg_ptr);var e=b()[n/4+0],r=b()[n/4+1];return _=e,t=r,c(e,r)}finally{K.__wbindgen_add_to_stack_pointer(16),K.__wbindgen_free(_,t,1)}}microcredits(){const _=K.recordplaintext_microcredits(this.__wbg_ptr);return BigInt.asUintN(64,_)}nonce(){let _,t;try{const n=K.__wbindgen_add_to_stack_pointer(-16);K.recordplaintext_nonce(n,this.__wbg_ptr);var e=b()[n/4+0],r=b()[n/4+1];return _=e,t=r,c(e,r)}finally{K.__wbindgen_add_to_stack_pointer(16),K.__wbindgen_free(_,t,1)}}serialNumberString(_,t,e){let r,n;try{const u=K.__wbindgen_add_to_stack_pointer(-16);p(_,o_);const f=w(t,K.__wbindgen_malloc,K.__wbindgen_realloc),y=U,m=w(e,K.__wbindgen_malloc,K.__wbindgen_realloc),h=U;K.recordplaintext_serialNumberString(u,this.__wbg_ptr,_.__wbg_ptr,f,y,m,h);var i=b()[u/4+0],o=b()[u/4+1],s=b()[u/4+2],g=b()[u/4+3],d=i,l=o;if(g)throw d=0,l=0,a(s);return r=d,n=l,c(d,l)}finally{K.__wbindgen_add_to_stack_pointer(16),K.__wbindgen_free(r,n,1)}}};const m_="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((_=>K.__wbg_signature_free(_>>>0)));let h_=class _{static __wrap(t){t>>>=0;const e=Object.create(_.prototype);return e.__wbg_ptr=t,m_.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,m_.unregister(this),_}free(){const _=this.__destroy_into_raw();K.__wbg_signature_free(_)}static sign(t,e){p(t,o_);const r=y(e,K.__wbindgen_malloc),n=U,i=K.privatekey_sign(t.__wbg_ptr,r,n);return _.__wrap(i)}verify(_,t){p(_,J);const e=y(t,K.__wbindgen_malloc),r=U;return 0!==K.signature_verify(this.__wbg_ptr,_.__wbg_ptr,e,r)}static from_string(t){const e=w(t,K.__wbindgen_malloc,K.__wbindgen_realloc),r=U,n=K.signature_from_string(e,r);return _.__wrap(n)}to_string(){let _,t;try{const n=K.__wbindgen_add_to_stack_pointer(-16);K.signature_to_string(n,this.__wbg_ptr);var e=b()[n/4+0],r=b()[n/4+1];return _=e,t=r,c(e,r)}finally{K.__wbindgen_add_to_stack_pointer(16),K.__wbindgen_free(_,t,1)}}};const v_="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((_=>K.__wbg_transaction_free(_>>>0)));let k_=class _{static __wrap(t){t>>>=0;const e=Object.create(_.prototype);return e.__wbg_ptr=t,v_.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,v_.unregister(this),_}free(){const _=this.__destroy_into_raw();K.__wbg_transaction_free(_)}static fromString(t){try{const n=K.__wbindgen_add_to_stack_pointer(-16),i=w(t,K.__wbindgen_malloc,K.__wbindgen_realloc),o=U;K.transaction_fromString(n,i,o);var e=b()[n/4+0],r=b()[n/4+1];if(b()[n/4+2])throw a(r);return _.__wrap(e)}finally{K.__wbindgen_add_to_stack_pointer(16)}}toString(){let _,t;try{const n=K.__wbindgen_add_to_stack_pointer(-16);K.transaction_toString(n,this.__wbg_ptr);var e=b()[n/4+0],r=b()[n/4+1];return _=e,t=r,c(e,r)}finally{K.__wbindgen_add_to_stack_pointer(16),K.__wbindgen_free(_,t,1)}}transactionId(){let _,t;try{const n=K.__wbindgen_add_to_stack_pointer(-16);K.transaction_transactionId(n,this.__wbg_ptr);var e=b()[n/4+0],r=b()[n/4+1];return _=e,t=r,c(e,r)}finally{K.__wbindgen_add_to_stack_pointer(16),K.__wbindgen_free(_,t,1)}}transactionType(){let _,t;try{const n=K.__wbindgen_add_to_stack_pointer(-16);K.transaction_transactionType(n,this.__wbg_ptr);var e=b()[n/4+0],r=b()[n/4+1];return _=e,t=r,c(e,r)}finally{K.__wbindgen_add_to_stack_pointer(16),K.__wbindgen_free(_,t,1)}}};const P_="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((_=>K.__wbg_verifyingkey_free(_>>>0)));let S_=class _{static __wrap(t){t>>>=0;const e=Object.create(_.prototype);return e.__wbg_ptr=t,P_.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,P_.unregister(this),_}free(){const _=this.__destroy_into_raw();K.__wbg_verifyingkey_free(_)}static bondPublicVerifier(){const t=K.verifyingkey_bondPublicVerifier();return _.__wrap(t)}static bondValidatorVerifier(){const t=K.verifyingkey_bondValidatorVerifier();return _.__wrap(t)}static claimUnbondPublicVerifier(){const t=K.verifyingkey_claimUnbondPublicVerifier();return _.__wrap(t)}static feePrivateVerifier(){const t=K.verifyingkey_feePrivateVerifier();return _.__wrap(t)}static feePublicVerifier(){const t=K.verifyingkey_feePublicVerifier();return _.__wrap(t)}static inclusionVerifier(){const t=K.verifyingkey_inclusionVerifier();return _.__wrap(t)}static joinVerifier(){const t=K.verifyingkey_joinVerifier();return _.__wrap(t)}static setValidatorStateVerifier(){const t=K.verifyingkey_setValidatorStateVerifier();return _.__wrap(t)}static splitVerifier(){const t=K.verifyingkey_splitVerifier();return _.__wrap(t)}static transferPrivateVerifier(){const t=K.verifyingkey_transferPrivateVerifier();return _.__wrap(t)}static transferPrivateToPublicVerifier(){const t=K.verifyingkey_transferPrivateToPublicVerifier();return _.__wrap(t)}static transferPublicVerifier(){const t=K.verifyingkey_transferPublicVerifier();return _.__wrap(t)}static transferPublicAsSignerVerifier(){const t=K.verifyingkey_transferPublicAsSignerVerifier();return _.__wrap(t)}static transferPublicToPrivateVerifier(){const t=K.verifyingkey_transferPublicToPrivateVerifier();return _.__wrap(t)}static unbondPublicVerifier(){const t=K.verifyingkey_unbondPublicVerifier();return _.__wrap(t)}isBondPublicVerifier(){return 0!==K.verifyingkey_isBondPublicVerifier(this.__wbg_ptr)}isBondValidatorVerifier(){return 0!==K.verifyingkey_isBondValidatorVerifier(this.__wbg_ptr)}isClaimUnbondPublicVerifier(){return 0!==K.verifyingkey_isClaimUnbondPublicVerifier(this.__wbg_ptr)}isFeePrivateVerifier(){return 0!==K.verifyingkey_isFeePrivateVerifier(this.__wbg_ptr)}isFeePublicVerifier(){return 0!==K.verifyingkey_isFeePublicVerifier(this.__wbg_ptr)}isInclusionVerifier(){return 0!==K.verifyingkey_isInclusionVerifier(this.__wbg_ptr)}isJoinVerifier(){return 0!==K.verifyingkey_isJoinVerifier(this.__wbg_ptr)}isSetValidatorStateVerifier(){return 0!==K.verifyingkey_isSetValidatorStateVerifier(this.__wbg_ptr)}isSplitVerifier(){return 0!==K.verifyingkey_isSplitVerifier(this.__wbg_ptr)}isTransferPrivateVerifier(){return 0!==K.verifyingkey_isTransferPrivateVerifier(this.__wbg_ptr)}isTransferPrivateToPublicVerifier(){return 0!==K.verifyingkey_isTransferPrivateToPublicVerifier(this.__wbg_ptr)}isTransferPublicVerifier(){return 0!==K.verifyingkey_isTransferPublicVerifier(this.__wbg_ptr)}isTransferPublicAsSignerVerifier(){return 0!==K.verifyingkey_isTransferPublicAsSignerVerifier(this.__wbg_ptr)}isTransferPublicToPrivateVerifier(){return 0!==K.verifyingkey_isTransferPublicToPrivateVerifier(this.__wbg_ptr)}isUnbondPublicVerifier(){return 0!==K.verifyingkey_isUnbondPublicVerifier(this.__wbg_ptr)}checksum(){let _,t;try{const n=K.__wbindgen_add_to_stack_pointer(-16);K.verifyingkey_checksum(n,this.__wbg_ptr);var e=b()[n/4+0],r=b()[n/4+1];return _=e,t=r,c(e,r)}finally{K.__wbindgen_add_to_stack_pointer(16),K.__wbindgen_free(_,t,1)}}copy(){const t=K.verifyingkey_copy(this.__wbg_ptr);return _.__wrap(t)}static fromBytes(t){try{const n=K.__wbindgen_add_to_stack_pointer(-16),i=y(t,K.__wbindgen_malloc),o=U;K.verifyingkey_fromBytes(n,i,o);var e=b()[n/4+0],r=b()[n/4+1];if(b()[n/4+2])throw a(r);return _.__wrap(e)}finally{K.__wbindgen_add_to_stack_pointer(16)}}static fromString(t){try{const n=K.__wbindgen_add_to_stack_pointer(-16),i=w(t,K.__wbindgen_malloc,K.__wbindgen_realloc),o=U;K.verifyingkey_fromString(n,i,o);var e=b()[n/4+0],r=b()[n/4+1];if(b()[n/4+2])throw a(r);return _.__wrap(e)}finally{K.__wbindgen_add_to_stack_pointer(16)}}toBytes(){try{const n=K.__wbindgen_add_to_stack_pointer(-16);K.verifyingkey_toBytes(n,this.__wbg_ptr);var _=b()[n/4+0],t=b()[n/4+1],e=b()[n/4+2];if(b()[n/4+3])throw a(e);var r=v(_,t).slice();return K.__wbindgen_free(_,1*t,1),r}finally{K.__wbindgen_add_to_stack_pointer(16)}}toString(){let _,t;try{const n=K.__wbindgen_add_to_stack_pointer(-16);K.verifyingkey_toString(n,this.__wbg_ptr);var e=b()[n/4+0],r=b()[n/4+1];return _=e,t=r,c(e,r)}finally{K.__wbindgen_add_to_stack_pointer(16),K.__wbindgen_free(_,t,1)}}};const x_="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((_=>K.__wbg_viewkey_free(_>>>0)));let V_=class _{static __wrap(t){t>>>=0;const e=Object.create(_.prototype);return e.__wbg_ptr=t,x_.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,x_.unregister(this),_}free(){const _=this.__destroy_into_raw();K.__wbg_viewkey_free(_)}static from_private_key(t){p(t,o_);const e=K.privatekey_to_view_key(t.__wbg_ptr);return _.__wrap(e)}static from_string(t){const e=w(t,K.__wbindgen_malloc,K.__wbindgen_realloc),r=U,n=K.viewkey_from_string(e,r);return _.__wrap(n)}to_string(){let _,t;try{const n=K.__wbindgen_add_to_stack_pointer(-16);K.viewkey_to_string(n,this.__wbg_ptr);var e=b()[n/4+0],r=b()[n/4+1];return _=e,t=r,c(e,r)}finally{K.__wbindgen_add_to_stack_pointer(16),K.__wbindgen_free(_,t,1)}}to_address(){const _=K.address_from_view_key(this.__wbg_ptr);return J.__wrap(_)}decrypt(_){let t,e;try{const d=K.__wbindgen_add_to_stack_pointer(-16),l=w(_,K.__wbindgen_malloc,K.__wbindgen_realloc),u=U;K.viewkey_decrypt(d,this.__wbg_ptr,l,u);var r=b()[d/4+0],n=b()[d/4+1],i=b()[d/4+2],o=b()[d/4+3],s=r,g=n;if(o)throw s=0,g=0,a(i);return t=s,e=g,c(s,g)}finally{K.__wbindgen_add_to_stack_pointer(16),K.__wbindgen_free(t,e,1)}}};async function V(_,t){if("function"==typeof Response&&_ instanceof Response){if("function"==typeof WebAssembly.instantiateStreaming)try{return await WebAssembly.instantiateStreaming(_,t)}catch(t){if("application/wasm"==_.headers.get("Content-Type"))throw t;console.warn("`WebAssembly.instantiateStreaming` failed because your server does not serve wasm with `application/wasm` MIME type. Falling back to `WebAssembly.instantiate` which is slower. Original error:\n",t)}const e=await _.arrayBuffer();return await WebAssembly.instantiate(e,t)}{const e=await WebAssembly.instantiate(_,t);return e instanceof WebAssembly.Instance?{instance:e,module:_}:e}}function F(){const _={wbg:{}};return _.wbg.__wbindgen_object_drop_ref=function(_){a(_)},_.wbg.__wbg_new_71801a555ad9f2aa=function(){return S((function(){return g(new XMLHttpRequest)}),arguments)},_.wbg.__wbg_overrideMimeType_ee9c51919ceb418b=function(){return S((function(_,t,e){i(_).overrideMimeType(c(t,e))}),arguments)},_.wbg.__wbg_open_c9eb0cf2c9d95679=function(){return S((function(_,t,e,r,n,o){i(_).open(c(t,e),c(r,n),0!==o)}),arguments)},_.wbg.__wbg_send_80d29985093c1ec5=function(){return S((function(_){i(_).send()}),arguments)},_.wbg.__wbg_response_7c2e2759084f7279=function(){return S((function(_){return g(i(_).response)}),arguments)},_.wbg.__wbg_status_d485fb5a478426fb=function(){return S((function(_){return i(_).status}),arguments)},_.wbg.__wbg_new_72fb9a18b5ae2624=function(){return g(new Object)},_.wbg.__wbindgen_string_new=function(_,t){return g(c(_,t))},_.wbg.__wbg_set_1f9b04f170055d33=function(){return S((function(_,t,e){return Reflect.set(i(_),i(t),i(e))}),arguments)},_.wbg.__wbg_new_ab6fd82b10560829=function(){return S((function(){return g(new Headers)}),arguments)},_.wbg.__wbindgen_object_clone_ref=function(_){return g(i(_))},_.wbg.__wbg_new_0d76b0581eca6298=function(){return S((function(){return g(new AbortController)}),arguments)},_.wbg.__wbg_signal_a61f78a3478fd9bc=function(_){return g(i(_).signal)},_.wbg.__wbg_append_7bfcb4937d1d5e29=function(){return S((function(_,t,e,r,n){i(_).append(c(t,e),c(r,n))}),arguments)},_.wbg.__wbg_instanceof_Response_849eb93e75734b6e=function(_){let t;try{t=i(_)instanceof Response}catch(_){t=!1}return t},_.wbg.__wbg_status_61a01141acd3cf74=function(_){return i(_).status},_.wbg.__wbg_url_5f6dc4009ac5f99d=function(_,t){const e=w(i(t).url,K.__wbindgen_malloc,K.__wbindgen_realloc),r=U;b()[_/4+1]=r,b()[_/4+0]=e},_.wbg.__wbg_headers_9620bfada380764a=function(_){return g(i(_).headers)},_.wbg.__wbg_iterator_2cee6dadfd956dfa=function(){return g(Symbol.iterator)},_.wbg.__wbg_get_e3c254076557e348=function(){return S((function(_,t){return g(Reflect.get(i(_),i(t)))}),arguments)},_.wbg.__wbindgen_is_function=function(_){return"function"==typeof i(_)},_.wbg.__wbg_call_27c0f87801dedf93=function(){return S((function(_,t){return g(i(_).call(i(t)))}),arguments)},_.wbg.__wbindgen_is_object=function(_){const t=i(_);return"object"==typeof t&&null!==t},_.wbg.__wbg_next_40fc327bfc8770e6=function(_){return g(i(_).next)},_.wbg.__wbg_next_196c84450b364254=function(){return S((function(_){return g(i(_).next())}),arguments)},_.wbg.__wbg_done_298b57d23c0fc80c=function(_){return i(_).done},_.wbg.__wbg_value_d93c65011f51a456=function(_){return g(i(_).value)},_.wbg.__wbg_abort_2aa7521d5690750e=function(_){i(_).abort()},_.wbg.__wbg_stringify_8887fe74e1c50d81=function(){return S((function(_){return g(JSON.stringify(i(_)))}),arguments)},_.wbg.__wbindgen_string_get=function(_,t){const e=i(t),r="string"==typeof e?e:void 0;var n=d(r)?0:w(r,K.__wbindgen_malloc,K.__wbindgen_realloc),o=U;b()[_/4+1]=o,b()[_/4+0]=n},_.wbg.__wbg_log_0159ca40cddf5b15=function(_,t){console.log(c(_,t))},_.wbg.__wbindgen_bigint_from_u64=function(_){return g(BigInt.asUintN(64,_))},_.wbg.__wbg_call_b3ca7c6051f9bec1=function(){return S((function(_,t,e){return g(i(_).call(i(t),i(e)))}),arguments)},_.wbg.__wbg_transaction_new=function(_){return g(k_.__wrap(_))},_.wbg.__wbg_keypair_new=function(_){return g(__.__wrap(_))},_.wbg.__wbindgen_module=function(){return g(A.__wbindgen_wasm_module)},_.wbg.__wbindgen_memory=function(){return g(K.memory)},_.wbg.__wbg_spawnWorker_f6acaddb2e29dc4a=function(_,t,e,r){return g(n(i(_),i(t),i(e),r>>>0))},_.wbg.__wbg_executionresponse_new=function(_){return g(X.__wrap(_))},_.wbg.__wbg_newwithlength_66ae46612e7f0234=function(_){return g(new Array(_>>>0))},_.wbg.__wbg_set_d4638f722068f043=function(_,t,e){i(_)[t>>>0]=a(e)},_.wbg.__wbindgen_cb_drop=function(_){const t=a(_).original;if(1==t.cnt--)return t.a=0,!0;return!1},_.wbg.__wbg_new_16b304a2cfa7ff4a=function(){return g(new Array)},_.wbg.__wbg_push_a5b05aedc7234f9f=function(_,t){return i(_).push(i(t))},_.wbg.__wbg_arrayBuffer_29931d52c7206b02=function(){return S((function(_){return g(i(_).arrayBuffer())}),arguments)},_.wbg.__wbg_new_63b92bc8671ed464=function(_){return g(new Uint8Array(i(_)))},_.wbg.__wbg_length_c20a40f15020d68a=function(_){return i(_).length},_.wbg.__wbg_new_81740750da40724f=function(_,t){try{var e={a:_,b:t};const r=new Promise(((_,t)=>{const r=e.a;e.a=0;try{return x(r,e.b,_,t)}finally{e.a=r}}));return g(r)}finally{e.a=e.b=0}},_.wbg.__wbindgen_number_new=function(_){return g(_)},_.wbg.__wbg_new_abda76e883ba8a5f=function(){return g(new Error)},_.wbg.__wbg_stack_658279fe44541cf6=function(_,t){const e=w(i(t).stack,K.__wbindgen_malloc,K.__wbindgen_realloc),r=U;b()[_/4+1]=r,b()[_/4+0]=e},_.wbg.__wbg_error_f851667af71bcfc6=function(_,t){let e,r;try{e=_,r=t,console.error(c(_,t))}finally{K.__wbindgen_free(e,r,1)}},_.wbg.__wbg_buffer_12d079cc21e14bdb=function(_){return g(i(_).buffer)},_.wbg.__wbg_newwithbyteoffsetandlength_aa4a17c33a06e5cb=function(_,t,e){return g(new Uint8Array(i(_),t>>>0,e>>>0))},_.wbg.__wbg_randomFillSync_5c9c955aa56b6049=function(){return S((function(_,t){i(_).randomFillSync(a(t))}),arguments)},_.wbg.__wbg_subarray_a1f73cd4b5b42fe1=function(_,t,e){return g(i(_).subarray(t>>>0,e>>>0))},_.wbg.__wbg_getRandomValues_3aa56aa6edec874c=function(){return S((function(_,t){i(_).getRandomValues(i(t))}),arguments)},_.wbg.__wbg_set_a47bac70306a19a7=function(_,t,e){i(_).set(i(t),e>>>0)},_.wbg.__wbg_crypto_1d1f22824a6a080c=function(_){return g(i(_).crypto)},_.wbg.__wbg_process_4a72847cc503995b=function(_){return g(i(_).process)},_.wbg.__wbg_versions_f686565e586dd935=function(_){return g(i(_).versions)},_.wbg.__wbg_node_104a2ff8d6ea03a2=function(_){return g(i(_).node)},_.wbg.__wbindgen_is_string=function(_){return"string"==typeof i(_)},_.wbg.__wbg_require_cca90b1a94a0255b=function(){return S((function(){return g(module.require)}),arguments)},_.wbg.__wbg_msCrypto_eb05e62b530a1508=function(_){return g(i(_).msCrypto)},_.wbg.__wbg_newwithlength_e9b4878cebadb3d3=function(_){return g(new Uint8Array(_>>>0))},_.wbg.__wbg_length_cd7af8117672b8b8=function(_){return i(_).length},_.wbg.__wbg_get_bd8e338fbd5f5cc8=function(_,t){return g(i(_)[t>>>0])},_.wbg.__wbg_self_ce0dbfc45cf2f5be=function(){return S((function(){return g(self.self)}),arguments)},_.wbg.__wbg_window_c6fb939a7f436783=function(){return S((function(){return g(window.window)}),arguments)},_.wbg.__wbg_globalThis_d1e6af4856ba331b=function(){return S((function(){return g(globalThis.globalThis)}),arguments)},_.wbg.__wbg_global_207b558942527489=function(){return S((function(){return g(global.global)}),arguments)},_.wbg.__wbindgen_is_undefined=function(_){return void 0===i(_)},_.wbg.__wbg_newnoargs_e258087cd0daa0ea=function(_,t){return g(new Function(c(_,t)))},_.wbg.__wbg_has_0af94d20077affa2=function(){return S((function(_,t){return Reflect.has(i(_),i(t))}),arguments)},_.wbg.__wbg_fetch_bc7c8e27076a5c84=function(_){return g(fetch(i(_)))},_.wbg.__wbg_fetch_921fad6ef9e883dd=function(_,t){return g(i(_).fetch(i(t)))},_.wbg.__wbindgen_debug_string=function(_,t){const e=w(l(i(t)),K.__wbindgen_malloc,K.__wbindgen_realloc),r=U;b()[_/4+1]=r,b()[_/4+0]=e},_.wbg.__wbindgen_throw=function(_,t){throw new Error(c(_,t))},_.wbg.__wbindgen_rethrow=function(_){throw a(_)},_.wbg.__wbg_then_a73caa9a87991566=function(_,t,e){return g(i(_).then(i(t),i(e)))},_.wbg.__wbg_then_0c86a60e8fcfe9f6=function(_,t){return g(i(_).then(i(t)))},_.wbg.__wbg_queueMicrotask_481971b0d87f3dd4=function(_){queueMicrotask(i(_))},_.wbg.__wbg_queueMicrotask_3cbae2ec6b6cd3d6=function(_){return g(i(_).queueMicrotask)},_.wbg.__wbg_resolve_b0083a7967828ec8=function(_){return g(Promise.resolve(i(_)))},_.wbg.__wbg_waitAsync_5d743fc9058ba01a=function(){return g(Atomics.waitAsync)},_.wbg.__wbg_new_8cccba86b0f574cb=function(_){return g(new Int32Array(i(_)))},_.wbg.__wbg_waitAsync_46d5c36955b71a79=function(_,t,e){return g(Atomics.waitAsync(i(_),t,e))},_.wbg.__wbg_async_19c0400d97cc72fe=function(_){return i(_).async},_.wbg.__wbg_value_571d60108110e917=function(_){return g(i(_).value)},_.wbg.__wbindgen_link_fc1eedd35dc7e0a6=function(_){const t=w("data:application/javascript,"+encodeURIComponent("onmessage = function (ev) {\n let [ia, index, value] = ev.data;\n ia = new Int32Array(ia.buffer);\n let result = Atomics.wait(ia, index, value);\n postMessage(result);\n };\n "),K.__wbindgen_malloc,K.__wbindgen_realloc),e=U;b()[_/4+1]=e,b()[_/4+0]=t},_.wbg.__wbg_new_d1187ae36d662ef9=function(){return S((function(_,t){return g(new Worker(c(_,t)))}),arguments)},_.wbg.__wbg_setonmessage_503809e5bb51bd33=function(_,t){i(_).onmessage=i(t)},_.wbg.__wbg_of_6a70eed8d41f469c=function(_,t,e){return g(Array.of(i(_),i(t),i(e)))},_.wbg.__wbg_postMessage_7380d10e8b8269df=function(){return S((function(_,t){i(_).postMessage(i(t))}),arguments)},_.wbg.__wbg_data_3ce7c145ca4fbcdc=function(_){return g(i(_).data)},_.wbg.__wbg_newwithstrandinit_3fd6fba4083ff2d0=function(){return S((function(_,t,e){return g(new Request(c(_,t),i(e)))}),arguments)},_.wbg.__wbg_responseText_c67ed2d48db10769=function(){return S((function(_,t){const e=i(t).responseText;var r=d(e)?0:w(e,K.__wbindgen_malloc,K.__wbindgen_realloc),n=U;b()[_/4+1]=n,b()[_/4+0]=r}),arguments)},_.wbg.__wbindgen_closure_wrapper5837=function(_,t,e){return g(u(_,t,538,f))},_.wbg.__wbindgen_closure_wrapper5862=function(_,t,e){return g(u(_,t,538,f))},_}function T(_,t){_.wbg.memory=t||new WebAssembly.Memory({initial:25,maximum:65536,shared:!0})}function R(_,t){return K=_.exports,A.__wbindgen_wasm_module=t,N=null,W=null,B=null,K.__wbindgen_start(),K}function z(_,t){if(void 0!==K)return K;const e=F();T(e,t),_ instanceof WebAssembly.Module||(_=new WebAssembly.Module(_));return R(new WebAssembly.Instance(_,e),_)}async function A(_,t){if(void 0!==K)return K;const e=F();("string"==typeof _||"function"==typeof Request&&_ instanceof Request||"function"==typeof URL&&_ instanceof URL)&&(_=fetch(_)),T(e,t);const{instance:r,module:n}=await V(await _,e);return R(r,n)}var O=Object.freeze({__proto__:null,Address:J,Execution:H,ExecutionResponse:X,Field:G,KeyPair:__,Metadata:e_,OfflineQuery:n_,PrivateKey:o_,PrivateKeyCiphertext:s_,Program:g_,ProgramManager:d_,ProvingKey:l_,RecordCiphertext:f_,RecordPlaintext:y_,Signature:h_,Transaction:k_,VerifyingKey:S_,ViewKey:V_,default:A,initSync:z,initThreadPool:P,runRayonThread:k,verifyFunctionExecution:m});const F_="assets/aleo_wasm.wasm";const{initThreadPool:T_,Address:R_,Execution:z_,ExecutionResponse:A_,Field:O_,Metadata:j_,OfflineQuery:K_,Private:C_,PrivateKey:E_,PrivateKeyCiphertext:M_,Program:B_,ProvingKey:U_,RecordCiphertext:I_,RecordPlaintext:q_,ProgramManager:W_,Signature:$_,Transaction:N_,ViewKey:D_,VerifyingKey:J_,verifyFunctionExecution:L_}=await(async(_={})=>{let{importHook:t,serverPath:e,initializeHook:r}=_,n=F_;return null!=e&&(n=e+/[^\/\\]*$/.exec(n)[0]),null!=t&&(n=t(n)),null!=r?await r(A,n):await A(n),O})({importHook:()=>new URL(e(5934),e.b)});async function j(_){null==_&&(_=navigator.hardwareConcurrency),console.info(`Spawning ${_} threads`),await T_(new URL(e(2583),e.b),_)}r()}catch(H_){r(H_)}}),1)}}]); +(self.webpackChunkaleo_website=self.webpackChunkaleo_website||[]).push([[933],{2583:(_,t,e)=>{_.exports=e.p+"3ebf0bb8781b6d786343.js"},5934:(_,t,e)=>{_.exports=e.p+"8cbe7e9b06e560a22f36.wasm"},9933:(_,t,e)=>{e.a(_,(async(_,r)=>{try{function n(_,t,e,r){return new Promise((n=>{const i=new Worker(_,{type:"module"});i.addEventListener("message",(_=>{setTimeout((()=>{n(i),i.unref&&i.unref()}),0)}),{capture:!0,once:!0}),i.postMessage({module:t,memory:e,address:r})}))}let K;e.d(t,{$r:()=>B_,CK:()=>j,L:()=>W_,PD:()=>q_,SF:()=>j_,XV:()=>J_,YW:()=>N_,_q:()=>E_,fW:()=>I_,hz:()=>L_,zW:()=>U_});const C=new Array(128).fill(void 0);function i(_){return C[_]}C.push(void 0,null,!0,!1);let E=C.length;function o(_){_<132||(C[_]=E,E=_)}function a(_){const t=i(_);return o(_),t}const M="undefined"!=typeof TextDecoder?new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0}):{decode:()=>{throw Error("TextDecoder not available")}};"undefined"!=typeof TextDecoder&&M.decode();let B=null;function s(){return null!==B&&B.buffer===K.memory.buffer||(B=new Uint8Array(K.memory.buffer)),B}function c(_,t){return _>>>=0,M.decode(s().slice(_,_+t))}function g(_){E===C.length&&C.push(C.length+1);const t=E;return E=C[t],C[t]=_,t}let U=0;const I="undefined"!=typeof TextEncoder?new TextEncoder("utf-8"):{encode:()=>{throw Error("TextEncoder not available")}},q=function(_,t){const e=I.encode(_);return t.set(e),{read:_.length,written:e.length}};function w(_,t,e){if(void 0===e){const e=I.encode(_),r=t(e.length,1)>>>0;return s().subarray(r,r+e.length).set(e),U=e.length,r}let r=_.length,n=t(r,1)>>>0;const i=s();let o=0;for(;o127)break;i[n+o]=t}if(o!==r){0!==o&&(_=_.slice(o)),n=e(n,r,r=o+3*_.length,1)>>>0;const t=s().subarray(n+o,n+r);o+=q(_,t).written,n=e(n,r,o,1)>>>0}return U=o,n}function d(_){return null==_}let W=null;function b(){return null!==W&&W.buffer===K.memory.buffer||(W=new Int32Array(K.memory.buffer)),W}function l(_){const t=typeof _;if("number"==t||"boolean"==t||null==_)return`${_}`;if("string"==t)return`"${_}"`;if("symbol"==t){const t=_.description;return null==t?"Symbol":`Symbol(${t})`}if("function"==t){const t=_.name;return"string"==typeof t&&t.length>0?`Function(${t})`:"Function"}if(Array.isArray(_)){const t=_.length;let e="[";t>0&&(e+=l(_[0]));for(let r=1;r1))return toString.call(_);if(r=e[1],"Object"==r)try{return"Object("+JSON.stringify(_)+")"}catch(_){return"Object"}return _ instanceof Error?`${_.name}: ${_.message}\n${_.stack}`:r}const $="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((_=>{K.__wbindgen_export_3.get(_.dtor)(_.a,_.b)}));function u(_,t,e,r){const n={a:_,b:t,cnt:1,dtor:e},i=(..._)=>{n.cnt++;const t=n.a;n.a=0;try{return r(t,n.b,..._)}finally{0==--n.cnt?(K.__wbindgen_export_3.get(n.dtor)(t,n.b),$.unregister(n)):n.a=t}};return i.original=n,$.register(i,n,n),i}function f(_,t,e){K._dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h4428289ce4d5afd9(_,t,g(e))}function p(_,t){if(!(_ instanceof t))throw new Error(`expected instance of ${t.name}`);return _.ptr}function y(_,t){const e=t(1*_.length,1)>>>0;return s().set(_,e/1),U=_.length,e}function m(_,t,e,r){try{const o=K.__wbindgen_add_to_stack_pointer(-16);p(_,H),p(t,S_),p(e,g_);const s=w(r,K.__wbindgen_malloc,K.__wbindgen_realloc),c=U;K.verifyFunctionExecution(o,_.__wbg_ptr,t.__wbg_ptr,e.__wbg_ptr,s,c);var n=b()[o/4+0],i=b()[o/4+1];if(b()[o/4+2])throw a(i);return 0!==n}finally{K.__wbindgen_add_to_stack_pointer(16)}}let N=null;function h(){return null!==N&&N.buffer===K.memory.buffer||(N=new BigInt64Array(K.memory.buffer)),N}function v(_,t){return _>>>=0,s().subarray(_/1,_/1+t)}function k(_){K.runRayonThread(_)}function P(_,t){return a(K.initThreadPool(g(_),t))}function S(_,t){try{return _.apply(this,t)}catch(_){K.__wbindgen_exn_store(g(_))}}function x(_,t,e,r){K.wasm_bindgen__convert__closures__invoke2_mut__h2157eed66e6e3fca(_,t,g(e),g(r))}const D="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((_=>K.__wbg_address_free(_>>>0)));let J=class _{static __wrap(t){t>>>=0;const e=Object.create(_.prototype);return e.__wbg_ptr=t,D.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,D.unregister(this),_}free(){const _=this.__destroy_into_raw();K.__wbg_address_free(_)}static from_private_key(t){p(t,o_);const e=K.address_from_private_key(t.__wbg_ptr);return _.__wrap(e)}static from_view_key(t){p(t,V_);const e=K.address_from_view_key(t.__wbg_ptr);return _.__wrap(e)}static from_string(t){const e=w(t,K.__wbindgen_malloc,K.__wbindgen_realloc),r=U,n=K.address_from_string(e,r);return _.__wrap(n)}to_string(){let _,t;try{const n=K.__wbindgen_add_to_stack_pointer(-16);K.address_to_string(n,this.__wbg_ptr);var e=b()[n/4+0],r=b()[n/4+1];return _=e,t=r,c(e,r)}finally{K.__wbindgen_add_to_stack_pointer(16),K.__wbindgen_free(_,t,1)}}verify(_,t){const e=y(_,K.__wbindgen_malloc),r=U;p(t,h_);return 0!==K.address_verify(this.__wbg_ptr,e,r,t.__wbg_ptr)}};const L="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((_=>K.__wbg_execution_free(_>>>0)));let H=class _{static __wrap(t){t>>>=0;const e=Object.create(_.prototype);return e.__wbg_ptr=t,L.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,L.unregister(this),_}free(){const _=this.__destroy_into_raw();K.__wbg_execution_free(_)}toString(){let _,t;try{const n=K.__wbindgen_add_to_stack_pointer(-16);K.execution_toString(n,this.__wbg_ptr);var e=b()[n/4+0],r=b()[n/4+1];return _=e,t=r,c(e,r)}finally{K.__wbindgen_add_to_stack_pointer(16),K.__wbindgen_free(_,t,1)}}static fromString(t){try{const n=K.__wbindgen_add_to_stack_pointer(-16),i=w(t,K.__wbindgen_malloc,K.__wbindgen_realloc),o=U;K.execution_fromString(n,i,o);var e=b()[n/4+0],r=b()[n/4+1];if(b()[n/4+2])throw a(r);return _.__wrap(e)}finally{K.__wbindgen_add_to_stack_pointer(16)}}};const Q="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((_=>K.__wbg_executionresponse_free(_>>>0)));let X=class _{static __wrap(t){t>>>=0;const e=Object.create(_.prototype);return e.__wbg_ptr=t,Q.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,Q.unregister(this),_}free(){const _=this.__destroy_into_raw();K.__wbg_executionresponse_free(_)}getOutputs(){return a(K.executionresponse_getOutputs(this.__wbg_ptr))}getExecution(){const _=K.executionresponse_getExecution(this.__wbg_ptr);return 0===_?void 0:H.__wrap(_)}getKeys(){try{const e=K.__wbindgen_add_to_stack_pointer(-16);K.executionresponse_getKeys(e,this.__wbg_ptr);var _=b()[e/4+0],t=b()[e/4+1];if(b()[e/4+2])throw a(t);return __.__wrap(_)}finally{K.__wbindgen_add_to_stack_pointer(16)}}getProvingKey(){const _=K.executionresponse_getProvingKey(this.__wbg_ptr);return 0===_?void 0:l_.__wrap(_)}getVerifyingKey(){const _=K.executionresponse_getVerifyingKey(this.__wbg_ptr);return S_.__wrap(_)}getFunctionId(){let _,t;try{const n=K.__wbindgen_add_to_stack_pointer(-16);K.executionresponse_getFunctionId(n,this.__wbg_ptr);var e=b()[n/4+0],r=b()[n/4+1];return _=e,t=r,c(e,r)}finally{K.__wbindgen_add_to_stack_pointer(16),K.__wbindgen_free(_,t,1)}}getProgram(){const _=K.executionresponse_getProgram(this.__wbg_ptr);return g_.__wrap(_)}};const Y="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((_=>K.__wbg_field_free(_>>>0)));let G=class _{static __wrap(t){t>>>=0;const e=Object.create(_.prototype);return e.__wbg_ptr=t,Y.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,Y.unregister(this),_}free(){const _=this.__destroy_into_raw();K.__wbg_field_free(_)}toString(){let _,t;try{const n=K.__wbindgen_add_to_stack_pointer(-16);K.field_toString(n,this.__wbg_ptr);var e=b()[n/4+0],r=b()[n/4+1];return _=e,t=r,c(e,r)}finally{K.__wbindgen_add_to_stack_pointer(16),K.__wbindgen_free(_,t,1)}}static fromString(t){try{const n=K.__wbindgen_add_to_stack_pointer(-16),i=w(t,K.__wbindgen_malloc,K.__wbindgen_realloc),o=U;K.field_fromString(n,i,o);var e=b()[n/4+0],r=b()[n/4+1];if(b()[n/4+2])throw a(r);return _.__wrap(e)}finally{K.__wbindgen_add_to_stack_pointer(16)}}};const Z="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((_=>K.__wbg_keypair_free(_>>>0)));class __{static __wrap(_){_>>>=0;const t=Object.create(__.prototype);return t.__wbg_ptr=_,Z.register(t,t.__wbg_ptr,t),t}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,Z.unregister(this),_}free(){const _=this.__destroy_into_raw();K.__wbg_keypair_free(_)}constructor(_,t){p(_,l_);var e=_.__destroy_into_raw();p(t,S_);var r=t.__destroy_into_raw();const n=K.keypair_new(e,r);return this.__wbg_ptr=n>>>0,this}provingKey(){try{const e=K.__wbindgen_add_to_stack_pointer(-16);K.keypair_provingKey(e,this.__wbg_ptr);var _=b()[e/4+0],t=b()[e/4+1];if(b()[e/4+2])throw a(t);return l_.__wrap(_)}finally{K.__wbindgen_add_to_stack_pointer(16)}}verifyingKey(){try{const e=K.__wbindgen_add_to_stack_pointer(-16);K.keypair_verifyingKey(e,this.__wbg_ptr);var _=b()[e/4+0],t=b()[e/4+1];if(b()[e/4+2])throw a(t);return S_.__wrap(_)}finally{K.__wbindgen_add_to_stack_pointer(16)}}}const t_="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((_=>K.__wbg_metadata_free(_>>>0)));let e_=class _{static __wrap(t){t>>>=0;const e=Object.create(_.prototype);return e.__wbg_ptr=t,t_.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,t_.unregister(this),_}free(){const _=this.__destroy_into_raw();K.__wbg_metadata_free(_)}get name(){let _,t;try{const n=K.__wbindgen_add_to_stack_pointer(-16);K.__wbg_get_metadata_name(n,this.__wbg_ptr);var e=b()[n/4+0],r=b()[n/4+1];return _=e,t=r,c(e,r)}finally{K.__wbindgen_add_to_stack_pointer(16),K.__wbindgen_free(_,t,1)}}set name(_){const t=w(_,K.__wbindgen_malloc,K.__wbindgen_realloc),e=U;K.__wbg_set_metadata_name(this.__wbg_ptr,t,e)}get locator(){let _,t;try{const n=K.__wbindgen_add_to_stack_pointer(-16);K.__wbg_get_metadata_locator(n,this.__wbg_ptr);var e=b()[n/4+0],r=b()[n/4+1];return _=e,t=r,c(e,r)}finally{K.__wbindgen_add_to_stack_pointer(16),K.__wbindgen_free(_,t,1)}}set locator(_){const t=w(_,K.__wbindgen_malloc,K.__wbindgen_realloc),e=U;K.__wbg_set_metadata_locator(this.__wbg_ptr,t,e)}get prover(){let _,t;try{const n=K.__wbindgen_add_to_stack_pointer(-16);K.__wbg_get_metadata_prover(n,this.__wbg_ptr);var e=b()[n/4+0],r=b()[n/4+1];return _=e,t=r,c(e,r)}finally{K.__wbindgen_add_to_stack_pointer(16),K.__wbindgen_free(_,t,1)}}set prover(_){const t=w(_,K.__wbindgen_malloc,K.__wbindgen_realloc),e=U;K.__wbg_set_metadata_prover(this.__wbg_ptr,t,e)}get verifier(){let _,t;try{const n=K.__wbindgen_add_to_stack_pointer(-16);K.__wbg_get_metadata_verifier(n,this.__wbg_ptr);var e=b()[n/4+0],r=b()[n/4+1];return _=e,t=r,c(e,r)}finally{K.__wbindgen_add_to_stack_pointer(16),K.__wbindgen_free(_,t,1)}}set verifier(_){const t=w(_,K.__wbindgen_malloc,K.__wbindgen_realloc),e=U;K.__wbg_set_metadata_verifier(this.__wbg_ptr,t,e)}get verifyingKey(){let _,t;try{const n=K.__wbindgen_add_to_stack_pointer(-16);K.__wbg_get_metadata_verifyingKey(n,this.__wbg_ptr);var e=b()[n/4+0],r=b()[n/4+1];return _=e,t=r,c(e,r)}finally{K.__wbindgen_add_to_stack_pointer(16),K.__wbindgen_free(_,t,1)}}set verifyingKey(_){const t=w(_,K.__wbindgen_malloc,K.__wbindgen_realloc),e=U;K.__wbg_set_metadata_verifyingKey(this.__wbg_ptr,t,e)}static baseUrl(){let _,t;try{const n=K.__wbindgen_add_to_stack_pointer(-16);K.metadata_baseUrl(n);var e=b()[n/4+0],r=b()[n/4+1];return _=e,t=r,c(e,r)}finally{K.__wbindgen_add_to_stack_pointer(16),K.__wbindgen_free(_,t,1)}}static bond_public(){const t=K.metadata_bond_public();return _.__wrap(t)}static bond_validator(){const t=K.metadata_bond_validator();return _.__wrap(t)}static claim_unbond_public(){const t=K.metadata_claim_unbond_public();return _.__wrap(t)}static fee_private(){const t=K.metadata_fee_private();return _.__wrap(t)}static fee_public(){const t=K.metadata_fee_public();return _.__wrap(t)}static inclusion(){const t=K.metadata_inclusion();return _.__wrap(t)}static join(){const t=K.metadata_join();return _.__wrap(t)}static set_validator_state(){const t=K.metadata_set_validator_state();return _.__wrap(t)}static split(){const t=K.metadata_split();return _.__wrap(t)}static transfer_private(){const t=K.metadata_transfer_private();return _.__wrap(t)}static transfer_private_to_public(){const t=K.metadata_transfer_private_to_public();return _.__wrap(t)}static transfer_public(){const t=K.metadata_transfer_public();return _.__wrap(t)}static transfer_public_as_signer(){const t=K.metadata_transfer_public_as_signer();return _.__wrap(t)}static transfer_public_to_private(){const t=K.metadata_transfer_public_to_private();return _.__wrap(t)}static unbond_public(){const t=K.metadata_unbond_public();return _.__wrap(t)}};const r_="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((_=>K.__wbg_offlinequery_free(_>>>0)));let n_=class _{static __wrap(t){t>>>=0;const e=Object.create(_.prototype);return e.__wbg_ptr=t,r_.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,r_.unregister(this),_}free(){const _=this.__destroy_into_raw();K.__wbg_offlinequery_free(_)}constructor(_){try{const r=K.__wbindgen_add_to_stack_pointer(-16),n=w(_,K.__wbindgen_malloc,K.__wbindgen_realloc),i=U;K.offlinequery_new(r,n,i);var t=b()[r/4+0],e=b()[r/4+1];if(b()[r/4+2])throw a(e);return this.__wbg_ptr=t>>>0,this}finally{K.__wbindgen_add_to_stack_pointer(16)}}addStatePath(_,t){try{const r=K.__wbindgen_add_to_stack_pointer(-16),n=w(_,K.__wbindgen_malloc,K.__wbindgen_realloc),i=U,o=w(t,K.__wbindgen_malloc,K.__wbindgen_realloc),s=U;K.offlinequery_addStatePath(r,this.__wbg_ptr,n,i,o,s);var e=b()[r/4+0];if(b()[r/4+1])throw a(e)}finally{K.__wbindgen_add_to_stack_pointer(16)}}toString(){let _,t;try{const n=K.__wbindgen_add_to_stack_pointer(-16);K.offlinequery_toString(n,this.__wbg_ptr);var e=b()[n/4+0],r=b()[n/4+1];return _=e,t=r,c(e,r)}finally{K.__wbindgen_add_to_stack_pointer(16),K.__wbindgen_free(_,t,1)}}static fromString(t){try{const n=K.__wbindgen_add_to_stack_pointer(-16),i=w(t,K.__wbindgen_malloc,K.__wbindgen_realloc),o=U;K.offlinequery_fromString(n,i,o);var e=b()[n/4+0],r=b()[n/4+1];if(b()[n/4+2])throw a(r);return _.__wrap(e)}finally{K.__wbindgen_add_to_stack_pointer(16)}}};const i_="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((_=>K.__wbg_privatekey_free(_>>>0)));let o_=class _{static __wrap(t){t>>>=0;const e=Object.create(_.prototype);return e.__wbg_ptr=t,i_.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,i_.unregister(this),_}free(){const _=this.__destroy_into_raw();K.__wbg_privatekey_free(_)}constructor(){const _=K.privatekey_new();return this.__wbg_ptr=_>>>0,this}static from_seed_unchecked(t){const e=y(t,K.__wbindgen_malloc),r=U,n=K.privatekey_from_seed_unchecked(e,r);return _.__wrap(n)}static from_string(t){try{const n=K.__wbindgen_add_to_stack_pointer(-16),i=w(t,K.__wbindgen_malloc,K.__wbindgen_realloc),o=U;K.privatekey_from_string(n,i,o);var e=b()[n/4+0],r=b()[n/4+1];if(b()[n/4+2])throw a(r);return _.__wrap(e)}finally{K.__wbindgen_add_to_stack_pointer(16)}}to_string(){let _,t;try{const n=K.__wbindgen_add_to_stack_pointer(-16);K.privatekey_to_string(n,this.__wbg_ptr);var e=b()[n/4+0],r=b()[n/4+1];return _=e,t=r,c(e,r)}finally{K.__wbindgen_add_to_stack_pointer(16),K.__wbindgen_free(_,t,1)}}to_view_key(){const _=K.privatekey_to_view_key(this.__wbg_ptr);return V_.__wrap(_)}to_address(){const _=K.privatekey_to_address(this.__wbg_ptr);return J.__wrap(_)}sign(_){const t=y(_,K.__wbindgen_malloc),e=U,r=K.privatekey_sign(this.__wbg_ptr,t,e);return h_.__wrap(r)}static newEncrypted(_){try{const r=K.__wbindgen_add_to_stack_pointer(-16),n=w(_,K.__wbindgen_malloc,K.__wbindgen_realloc),i=U;K.privatekey_newEncrypted(r,n,i);var t=b()[r/4+0],e=b()[r/4+1];if(b()[r/4+2])throw a(e);return s_.__wrap(t)}finally{K.__wbindgen_add_to_stack_pointer(16)}}toCiphertext(_){try{const r=K.__wbindgen_add_to_stack_pointer(-16),n=w(_,K.__wbindgen_malloc,K.__wbindgen_realloc),i=U;K.privatekey_toCiphertext(r,this.__wbg_ptr,n,i);var t=b()[r/4+0],e=b()[r/4+1];if(b()[r/4+2])throw a(e);return s_.__wrap(t)}finally{K.__wbindgen_add_to_stack_pointer(16)}}static fromPrivateKeyCiphertext(t,e){try{const i=K.__wbindgen_add_to_stack_pointer(-16);p(t,s_);const o=w(e,K.__wbindgen_malloc,K.__wbindgen_realloc),s=U;K.privatekey_fromPrivateKeyCiphertext(i,t.__wbg_ptr,o,s);var r=b()[i/4+0],n=b()[i/4+1];if(b()[i/4+2])throw a(n);return _.__wrap(r)}finally{K.__wbindgen_add_to_stack_pointer(16)}}};const a_="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((_=>K.__wbg_privatekeyciphertext_free(_>>>0)));let s_=class _{static __wrap(t){t>>>=0;const e=Object.create(_.prototype);return e.__wbg_ptr=t,a_.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,a_.unregister(this),_}free(){const _=this.__destroy_into_raw();K.__wbg_privatekeyciphertext_free(_)}static encryptPrivateKey(t,e){try{const i=K.__wbindgen_add_to_stack_pointer(-16);p(t,o_);const o=w(e,K.__wbindgen_malloc,K.__wbindgen_realloc),s=U;K.privatekey_toCiphertext(i,t.__wbg_ptr,o,s);var r=b()[i/4+0],n=b()[i/4+1];if(b()[i/4+2])throw a(n);return _.__wrap(r)}finally{K.__wbindgen_add_to_stack_pointer(16)}}decryptToPrivateKey(_){try{const r=K.__wbindgen_add_to_stack_pointer(-16),n=w(_,K.__wbindgen_malloc,K.__wbindgen_realloc),i=U;K.privatekeyciphertext_decryptToPrivateKey(r,this.__wbg_ptr,n,i);var t=b()[r/4+0],e=b()[r/4+1];if(b()[r/4+2])throw a(e);return o_.__wrap(t)}finally{K.__wbindgen_add_to_stack_pointer(16)}}toString(){let _,t;try{const n=K.__wbindgen_add_to_stack_pointer(-16);K.privatekeyciphertext_toString(n,this.__wbg_ptr);var e=b()[n/4+0],r=b()[n/4+1];return _=e,t=r,c(e,r)}finally{K.__wbindgen_add_to_stack_pointer(16),K.__wbindgen_free(_,t,1)}}static fromString(t){try{const n=K.__wbindgen_add_to_stack_pointer(-16),i=w(t,K.__wbindgen_malloc,K.__wbindgen_realloc),o=U;K.privatekeyciphertext_fromString(n,i,o);var e=b()[n/4+0],r=b()[n/4+1];if(b()[n/4+2])throw a(r);return _.__wrap(e)}finally{K.__wbindgen_add_to_stack_pointer(16)}}};const c_="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((_=>K.__wbg_program_free(_>>>0)));let g_=class _{static __wrap(t){t>>>=0;const e=Object.create(_.prototype);return e.__wbg_ptr=t,c_.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,c_.unregister(this),_}free(){const _=this.__destroy_into_raw();K.__wbg_program_free(_)}static fromString(t){try{const n=K.__wbindgen_add_to_stack_pointer(-16),i=w(t,K.__wbindgen_malloc,K.__wbindgen_realloc),o=U;K.program_fromString(n,i,o);var e=b()[n/4+0],r=b()[n/4+1];if(b()[n/4+2])throw a(r);return _.__wrap(e)}finally{K.__wbindgen_add_to_stack_pointer(16)}}toString(){let _,t;try{const n=K.__wbindgen_add_to_stack_pointer(-16);K.program_toString(n,this.__wbg_ptr);var e=b()[n/4+0],r=b()[n/4+1];return _=e,t=r,c(e,r)}finally{K.__wbindgen_add_to_stack_pointer(16),K.__wbindgen_free(_,t,1)}}hasFunction(_){const t=w(_,K.__wbindgen_malloc,K.__wbindgen_realloc),e=U;return 0!==K.program_hasFunction(this.__wbg_ptr,t,e)}getFunctions(){return a(K.program_getFunctions(this.__wbg_ptr))}getFunctionInputs(_){try{const r=K.__wbindgen_add_to_stack_pointer(-16),n=w(_,K.__wbindgen_malloc,K.__wbindgen_realloc),i=U;K.program_getFunctionInputs(r,this.__wbg_ptr,n,i);var t=b()[r/4+0],e=b()[r/4+1];if(b()[r/4+2])throw a(e);return a(t)}finally{K.__wbindgen_add_to_stack_pointer(16)}}getMappings(){try{const e=K.__wbindgen_add_to_stack_pointer(-16);K.program_getMappings(e,this.__wbg_ptr);var _=b()[e/4+0],t=b()[e/4+1];if(b()[e/4+2])throw a(t);return a(_)}finally{K.__wbindgen_add_to_stack_pointer(16)}}getRecordMembers(_){try{const r=K.__wbindgen_add_to_stack_pointer(-16),n=w(_,K.__wbindgen_malloc,K.__wbindgen_realloc),i=U;K.program_getRecordMembers(r,this.__wbg_ptr,n,i);var t=b()[r/4+0],e=b()[r/4+1];if(b()[r/4+2])throw a(e);return a(t)}finally{K.__wbindgen_add_to_stack_pointer(16)}}getStructMembers(_){try{const r=K.__wbindgen_add_to_stack_pointer(-16),n=w(_,K.__wbindgen_malloc,K.__wbindgen_realloc),i=U;K.program_getStructMembers(r,this.__wbg_ptr,n,i);var t=b()[r/4+0],e=b()[r/4+1];if(b()[r/4+2])throw a(e);return a(t)}finally{K.__wbindgen_add_to_stack_pointer(16)}}static getCreditsProgram(){const t=K.program_getCreditsProgram();return _.__wrap(t)}id(){let _,t;try{const n=K.__wbindgen_add_to_stack_pointer(-16);K.program_id(n,this.__wbg_ptr);var e=b()[n/4+0],r=b()[n/4+1];return _=e,t=r,c(e,r)}finally{K.__wbindgen_add_to_stack_pointer(16),K.__wbindgen_free(_,t,1)}}address(){try{const e=K.__wbindgen_add_to_stack_pointer(-16);K.program_address(e,this.__wbg_ptr);var _=b()[e/4+0],t=b()[e/4+1];if(b()[e/4+2])throw a(t);return J.__wrap(_)}finally{K.__wbindgen_add_to_stack_pointer(16)}}isEqual(t){p(t,_);return 0!==K.program_isEqual(this.__wbg_ptr,t.__wbg_ptr)}getImports(){return a(K.program_getImports(this.__wbg_ptr))}};const w_="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((_=>K.__wbg_programmanager_free(_>>>0)));let d_=class{__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,w_.unregister(this),_}free(){const _=this.__destroy_into_raw();K.__wbg_programmanager_free(_)}static buildDeploymentTransaction(_,t,e,r,n,i,o,s,c){p(_,o_);const b=w(t,K.__wbindgen_malloc,K.__wbindgen_realloc),l=U;let u=0;d(r)||(p(r,y_),u=r.__destroy_into_raw());var f=d(n)?0:w(n,K.__wbindgen_malloc,K.__wbindgen_realloc),y=U;let m=0;d(o)||(p(o,l_),m=o.__destroy_into_raw());let h=0;d(s)||(p(s,S_),h=s.__destroy_into_raw());let v=0;d(c)||(p(c,n_),v=c.__destroy_into_raw());return a(K.programmanager_buildDeploymentTransaction(_.__wbg_ptr,b,l,e,u,f,y,d(i)?0:g(i),m,h,v))}static estimateDeploymentFee(_,t){const e=w(_,K.__wbindgen_malloc,K.__wbindgen_realloc),r=U;return a(K.programmanager_estimateDeploymentFee(e,r,d(t)?0:g(t)))}static estimateProgramNameCost(_){try{const r=K.__wbindgen_add_to_stack_pointer(-16),n=w(_,K.__wbindgen_malloc,K.__wbindgen_realloc),i=U;K.programmanager_estimateProgramNameCost(r,n,i);var t=h()[r/8+0],e=b()[r/4+2];if(b()[r/4+3])throw a(e);return BigInt.asUintN(64,t)}finally{K.__wbindgen_add_to_stack_pointer(16)}}static executeFunctionOffline(_,t,e,r,n,i,o,s,c,b,l){p(_,o_);const u=w(t,K.__wbindgen_malloc,K.__wbindgen_realloc),f=U,y=w(e,K.__wbindgen_malloc,K.__wbindgen_realloc),m=U;let h=0;d(s)||(p(s,l_),h=s.__destroy_into_raw());let v=0;d(c)||(p(c,S_),v=c.__destroy_into_raw());var k=d(b)?0:w(b,K.__wbindgen_malloc,K.__wbindgen_realloc),P=U;let S=0;d(l)||(p(l,n_),S=l.__destroy_into_raw());return a(K.programmanager_executeFunctionOffline(_.__wbg_ptr,u,f,y,m,g(r),n,i,d(o)?0:g(o),h,v,k,P,S))}static buildExecutionTransaction(_,t,e,r,n,i,o,s,c,b,l,u,f){p(_,o_);const y=w(t,K.__wbindgen_malloc,K.__wbindgen_realloc),m=U,h=w(e,K.__wbindgen_malloc,K.__wbindgen_realloc),v=U;let k=0;d(i)||(p(i,y_),k=i.__destroy_into_raw());var P=d(o)?0:w(o,K.__wbindgen_malloc,K.__wbindgen_realloc),S=U;let x=0;d(c)||(p(c,l_),x=c.__destroy_into_raw());let V=0;d(b)||(p(b,S_),V=b.__destroy_into_raw());let F=0;d(l)||(p(l,l_),F=l.__destroy_into_raw());let T=0;d(u)||(p(u,S_),T=u.__destroy_into_raw());let R=0;d(f)||(p(f,n_),R=f.__destroy_into_raw());return a(K.programmanager_buildExecutionTransaction(_.__wbg_ptr,y,m,h,v,g(r),n,k,P,S,d(s)?0:g(s),x,V,F,T,R))}static estimateExecutionFee(_,t,e,r,n,i,o,s,c){p(_,o_);const b=w(t,K.__wbindgen_malloc,K.__wbindgen_realloc),l=U,u=w(e,K.__wbindgen_malloc,K.__wbindgen_realloc),f=U;var y=d(n)?0:w(n,K.__wbindgen_malloc,K.__wbindgen_realloc),m=U;let h=0;d(o)||(p(o,l_),h=o.__destroy_into_raw());let v=0;d(s)||(p(s,S_),v=s.__destroy_into_raw());let k=0;d(c)||(p(c,n_),k=c.__destroy_into_raw());return a(K.programmanager_estimateExecutionFee(_.__wbg_ptr,b,l,u,f,g(r),y,m,d(i)?0:g(i),h,v,k))}static estimateFinalizeFee(_,t){try{const n=K.__wbindgen_add_to_stack_pointer(-16),i=w(_,K.__wbindgen_malloc,K.__wbindgen_realloc),o=U,s=w(t,K.__wbindgen_malloc,K.__wbindgen_realloc),c=U;K.programmanager_estimateFinalizeFee(n,i,o,s,c);var e=h()[n/8+0],r=b()[n/4+2];if(b()[n/4+3])throw a(r);return BigInt.asUintN(64,e)}finally{K.__wbindgen_add_to_stack_pointer(16)}}static buildJoinTransaction(_,t,e,r,n,i,o,s,c,g,b){p(_,o_),p(t,y_);var l=t.__destroy_into_raw();p(e,y_);var u=e.__destroy_into_raw();let f=0;d(n)||(p(n,y_),f=n.__destroy_into_raw());var y=d(i)?0:w(i,K.__wbindgen_malloc,K.__wbindgen_realloc),m=U;let h=0;d(o)||(p(o,l_),h=o.__destroy_into_raw());let v=0;d(s)||(p(s,S_),v=s.__destroy_into_raw());let k=0;d(c)||(p(c,l_),k=c.__destroy_into_raw());let P=0;d(g)||(p(g,S_),P=g.__destroy_into_raw());let S=0;d(b)||(p(b,n_),S=b.__destroy_into_raw());return a(K.programmanager_buildJoinTransaction(_.__wbg_ptr,l,u,r,f,y,m,h,v,k,P,S))}static buildSplitTransaction(_,t,e,r,n,i,o){p(_,o_),p(e,y_);var s=e.__destroy_into_raw(),c=d(r)?0:w(r,K.__wbindgen_malloc,K.__wbindgen_realloc),g=U;let b=0;d(n)||(p(n,l_),b=n.__destroy_into_raw());let l=0;d(i)||(p(i,S_),l=i.__destroy_into_raw());let u=0;d(o)||(p(o,n_),u=o.__destroy_into_raw());return a(K.programmanager_buildSplitTransaction(_.__wbg_ptr,t,s,c,g,b,l,u))}static buildTransferTransaction(_,t,e,r,n,i,o,s,c,g,b,l,u){p(_,o_);const f=w(e,K.__wbindgen_malloc,K.__wbindgen_realloc),y=U,m=w(r,K.__wbindgen_malloc,K.__wbindgen_realloc),h=U;let v=0;d(n)||(p(n,y_),v=n.__destroy_into_raw());let k=0;d(o)||(p(o,y_),k=o.__destroy_into_raw());var P=d(s)?0:w(s,K.__wbindgen_malloc,K.__wbindgen_realloc),S=U;let x=0;d(c)||(p(c,l_),x=c.__destroy_into_raw());let V=0;d(g)||(p(g,S_),V=g.__destroy_into_raw());let F=0;d(b)||(p(b,l_),F=b.__destroy_into_raw());let T=0;d(l)||(p(l,S_),T=l.__destroy_into_raw());let R=0;d(u)||(p(u,n_),R=u.__destroy_into_raw());return a(K.programmanager_buildTransferTransaction(_.__wbg_ptr,t,f,y,m,h,v,i,k,P,S,x,V,F,T,R))}static synthesizeKeyPair(_,t,e,r,n){p(_,o_);const i=w(t,K.__wbindgen_malloc,K.__wbindgen_realloc),o=U,s=w(e,K.__wbindgen_malloc,K.__wbindgen_realloc),c=U;return a(K.programmanager_synthesizeKeyPair(_.__wbg_ptr,i,o,s,c,g(r),d(n)?0:g(n)))}};const b_="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((_=>K.__wbg_provingkey_free(_>>>0)));let l_=class _{static __wrap(t){t>>>=0;const e=Object.create(_.prototype);return e.__wbg_ptr=t,b_.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,b_.unregister(this),_}free(){const _=this.__destroy_into_raw();K.__wbg_provingkey_free(_)}isBondPublicProver(){return 0!==K.provingkey_isBondPublicProver(this.__wbg_ptr)}isBondValidatorProver(){return 0!==K.provingkey_isBondValidatorProver(this.__wbg_ptr)}isClaimUnbondPublicProver(){return 0!==K.provingkey_isClaimUnbondPublicProver(this.__wbg_ptr)}isFeePrivateProver(){return 0!==K.provingkey_isFeePrivateProver(this.__wbg_ptr)}isFeePublicProver(){return 0!==K.provingkey_isFeePublicProver(this.__wbg_ptr)}isInclusionProver(){return 0!==K.provingkey_isInclusionProver(this.__wbg_ptr)}isJoinProver(){return 0!==K.provingkey_isJoinProver(this.__wbg_ptr)}isSetValidatorStateProver(){return 0!==K.provingkey_isSetValidatorStateProver(this.__wbg_ptr)}isSplitProver(){return 0!==K.provingkey_isSplitProver(this.__wbg_ptr)}isTransferPrivateProver(){return 0!==K.provingkey_isTransferPrivateProver(this.__wbg_ptr)}isTransferPrivateToPublicProver(){return 0!==K.provingkey_isTransferPrivateToPublicProver(this.__wbg_ptr)}isTransferPublicProver(){return 0!==K.provingkey_isTransferPublicProver(this.__wbg_ptr)}isTransferPublicAsSignerProver(){return 0!==K.provingkey_isTransferPublicAsSignerProver(this.__wbg_ptr)}isTransferPublicToPrivateProver(){return 0!==K.provingkey_isTransferPublicToPrivateProver(this.__wbg_ptr)}isUnbondPublicProver(){return 0!==K.provingkey_isUnbondPublicProver(this.__wbg_ptr)}checksum(){let _,t;try{const n=K.__wbindgen_add_to_stack_pointer(-16);K.provingkey_checksum(n,this.__wbg_ptr);var e=b()[n/4+0],r=b()[n/4+1];return _=e,t=r,c(e,r)}finally{K.__wbindgen_add_to_stack_pointer(16),K.__wbindgen_free(_,t,1)}}copy(){const t=K.provingkey_copy(this.__wbg_ptr);return _.__wrap(t)}static fromBytes(t){try{const n=K.__wbindgen_add_to_stack_pointer(-16),i=y(t,K.__wbindgen_malloc),o=U;K.provingkey_fromBytes(n,i,o);var e=b()[n/4+0],r=b()[n/4+1];if(b()[n/4+2])throw a(r);return _.__wrap(e)}finally{K.__wbindgen_add_to_stack_pointer(16)}}static fromString(t){try{const n=K.__wbindgen_add_to_stack_pointer(-16),i=w(t,K.__wbindgen_malloc,K.__wbindgen_realloc),o=U;K.provingkey_fromString(n,i,o);var e=b()[n/4+0],r=b()[n/4+1];if(b()[n/4+2])throw a(r);return _.__wrap(e)}finally{K.__wbindgen_add_to_stack_pointer(16)}}toBytes(){try{const n=K.__wbindgen_add_to_stack_pointer(-16);K.provingkey_toBytes(n,this.__wbg_ptr);var _=b()[n/4+0],t=b()[n/4+1],e=b()[n/4+2];if(b()[n/4+3])throw a(e);var r=v(_,t).slice();return K.__wbindgen_free(_,1*t,1),r}finally{K.__wbindgen_add_to_stack_pointer(16)}}toString(){let _,t;try{const n=K.__wbindgen_add_to_stack_pointer(-16);K.provingkey_toString(n,this.__wbg_ptr);var e=b()[n/4+0],r=b()[n/4+1];return _=e,t=r,c(e,r)}finally{K.__wbindgen_add_to_stack_pointer(16),K.__wbindgen_free(_,t,1)}}};const u_="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((_=>K.__wbg_recordciphertext_free(_>>>0)));let f_=class _{static __wrap(t){t>>>=0;const e=Object.create(_.prototype);return e.__wbg_ptr=t,u_.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,u_.unregister(this),_}free(){const _=this.__destroy_into_raw();K.__wbg_recordciphertext_free(_)}static fromString(t){try{const n=K.__wbindgen_add_to_stack_pointer(-16),i=w(t,K.__wbindgen_malloc,K.__wbindgen_realloc),o=U;K.recordciphertext_fromString(n,i,o);var e=b()[n/4+0],r=b()[n/4+1];if(b()[n/4+2])throw a(r);return _.__wrap(e)}finally{K.__wbindgen_add_to_stack_pointer(16)}}toString(){let _,t;try{const n=K.__wbindgen_add_to_stack_pointer(-16);K.recordciphertext_toString(n,this.__wbg_ptr);var e=b()[n/4+0],r=b()[n/4+1];return _=e,t=r,c(e,r)}finally{K.__wbindgen_add_to_stack_pointer(16),K.__wbindgen_free(_,t,1)}}decrypt(_){try{const r=K.__wbindgen_add_to_stack_pointer(-16);p(_,V_),K.recordciphertext_decrypt(r,this.__wbg_ptr,_.__wbg_ptr);var t=b()[r/4+0],e=b()[r/4+1];if(b()[r/4+2])throw a(e);return y_.__wrap(t)}finally{K.__wbindgen_add_to_stack_pointer(16)}}isOwner(_){p(_,V_);return 0!==K.recordciphertext_isOwner(this.__wbg_ptr,_.__wbg_ptr)}};const p_="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((_=>K.__wbg_recordplaintext_free(_>>>0)));let y_=class _{static __wrap(t){t>>>=0;const e=Object.create(_.prototype);return e.__wbg_ptr=t,p_.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,p_.unregister(this),_}free(){const _=this.__destroy_into_raw();K.__wbg_recordplaintext_free(_)}commitment(_,t){try{const n=K.__wbindgen_add_to_stack_pointer(-16),i=w(_,K.__wbindgen_malloc,K.__wbindgen_realloc),o=U,s=w(t,K.__wbindgen_malloc,K.__wbindgen_realloc),c=U;K.recordplaintext_commitment(n,this.__wbg_ptr,i,o,s,c);var e=b()[n/4+0],r=b()[n/4+1];if(b()[n/4+2])throw a(r);return G.__wrap(e)}finally{K.__wbindgen_add_to_stack_pointer(16)}}static fromString(t){try{const n=K.__wbindgen_add_to_stack_pointer(-16),i=w(t,K.__wbindgen_malloc,K.__wbindgen_realloc),o=U;K.recordplaintext_fromString(n,i,o);var e=b()[n/4+0],r=b()[n/4+1];if(b()[n/4+2])throw a(r);return _.__wrap(e)}finally{K.__wbindgen_add_to_stack_pointer(16)}}toString(){let _,t;try{const n=K.__wbindgen_add_to_stack_pointer(-16);K.recordplaintext_toString(n,this.__wbg_ptr);var e=b()[n/4+0],r=b()[n/4+1];return _=e,t=r,c(e,r)}finally{K.__wbindgen_add_to_stack_pointer(16),K.__wbindgen_free(_,t,1)}}microcredits(){const _=K.recordplaintext_microcredits(this.__wbg_ptr);return BigInt.asUintN(64,_)}nonce(){let _,t;try{const n=K.__wbindgen_add_to_stack_pointer(-16);K.recordplaintext_nonce(n,this.__wbg_ptr);var e=b()[n/4+0],r=b()[n/4+1];return _=e,t=r,c(e,r)}finally{K.__wbindgen_add_to_stack_pointer(16),K.__wbindgen_free(_,t,1)}}serialNumberString(_,t,e){let r,n;try{const u=K.__wbindgen_add_to_stack_pointer(-16);p(_,o_);const f=w(t,K.__wbindgen_malloc,K.__wbindgen_realloc),y=U,m=w(e,K.__wbindgen_malloc,K.__wbindgen_realloc),h=U;K.recordplaintext_serialNumberString(u,this.__wbg_ptr,_.__wbg_ptr,f,y,m,h);var i=b()[u/4+0],o=b()[u/4+1],s=b()[u/4+2],g=b()[u/4+3],d=i,l=o;if(g)throw d=0,l=0,a(s);return r=d,n=l,c(d,l)}finally{K.__wbindgen_add_to_stack_pointer(16),K.__wbindgen_free(r,n,1)}}};const m_="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((_=>K.__wbg_signature_free(_>>>0)));let h_=class _{static __wrap(t){t>>>=0;const e=Object.create(_.prototype);return e.__wbg_ptr=t,m_.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,m_.unregister(this),_}free(){const _=this.__destroy_into_raw();K.__wbg_signature_free(_)}static sign(t,e){p(t,o_);const r=y(e,K.__wbindgen_malloc),n=U,i=K.privatekey_sign(t.__wbg_ptr,r,n);return _.__wrap(i)}verify(_,t){p(_,J);const e=y(t,K.__wbindgen_malloc),r=U;return 0!==K.signature_verify(this.__wbg_ptr,_.__wbg_ptr,e,r)}static from_string(t){const e=w(t,K.__wbindgen_malloc,K.__wbindgen_realloc),r=U,n=K.signature_from_string(e,r);return _.__wrap(n)}to_string(){let _,t;try{const n=K.__wbindgen_add_to_stack_pointer(-16);K.signature_to_string(n,this.__wbg_ptr);var e=b()[n/4+0],r=b()[n/4+1];return _=e,t=r,c(e,r)}finally{K.__wbindgen_add_to_stack_pointer(16),K.__wbindgen_free(_,t,1)}}};const v_="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((_=>K.__wbg_transaction_free(_>>>0)));let k_=class _{static __wrap(t){t>>>=0;const e=Object.create(_.prototype);return e.__wbg_ptr=t,v_.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,v_.unregister(this),_}free(){const _=this.__destroy_into_raw();K.__wbg_transaction_free(_)}static fromString(t){try{const n=K.__wbindgen_add_to_stack_pointer(-16),i=w(t,K.__wbindgen_malloc,K.__wbindgen_realloc),o=U;K.transaction_fromString(n,i,o);var e=b()[n/4+0],r=b()[n/4+1];if(b()[n/4+2])throw a(r);return _.__wrap(e)}finally{K.__wbindgen_add_to_stack_pointer(16)}}toString(){let _,t;try{const n=K.__wbindgen_add_to_stack_pointer(-16);K.transaction_toString(n,this.__wbg_ptr);var e=b()[n/4+0],r=b()[n/4+1];return _=e,t=r,c(e,r)}finally{K.__wbindgen_add_to_stack_pointer(16),K.__wbindgen_free(_,t,1)}}transactionId(){let _,t;try{const n=K.__wbindgen_add_to_stack_pointer(-16);K.transaction_transactionId(n,this.__wbg_ptr);var e=b()[n/4+0],r=b()[n/4+1];return _=e,t=r,c(e,r)}finally{K.__wbindgen_add_to_stack_pointer(16),K.__wbindgen_free(_,t,1)}}transactionType(){let _,t;try{const n=K.__wbindgen_add_to_stack_pointer(-16);K.transaction_transactionType(n,this.__wbg_ptr);var e=b()[n/4+0],r=b()[n/4+1];return _=e,t=r,c(e,r)}finally{K.__wbindgen_add_to_stack_pointer(16),K.__wbindgen_free(_,t,1)}}};const P_="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((_=>K.__wbg_verifyingkey_free(_>>>0)));let S_=class _{static __wrap(t){t>>>=0;const e=Object.create(_.prototype);return e.__wbg_ptr=t,P_.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,P_.unregister(this),_}free(){const _=this.__destroy_into_raw();K.__wbg_verifyingkey_free(_)}static bondPublicVerifier(){const t=K.verifyingkey_bondPublicVerifier();return _.__wrap(t)}static bondValidatorVerifier(){const t=K.verifyingkey_bondValidatorVerifier();return _.__wrap(t)}static claimUnbondPublicVerifier(){const t=K.verifyingkey_claimUnbondPublicVerifier();return _.__wrap(t)}static feePrivateVerifier(){const t=K.verifyingkey_feePrivateVerifier();return _.__wrap(t)}static feePublicVerifier(){const t=K.verifyingkey_feePublicVerifier();return _.__wrap(t)}static inclusionVerifier(){const t=K.verifyingkey_inclusionVerifier();return _.__wrap(t)}static joinVerifier(){const t=K.verifyingkey_joinVerifier();return _.__wrap(t)}static setValidatorStateVerifier(){const t=K.verifyingkey_setValidatorStateVerifier();return _.__wrap(t)}static splitVerifier(){const t=K.verifyingkey_splitVerifier();return _.__wrap(t)}static transferPrivateVerifier(){const t=K.verifyingkey_transferPrivateVerifier();return _.__wrap(t)}static transferPrivateToPublicVerifier(){const t=K.verifyingkey_transferPrivateToPublicVerifier();return _.__wrap(t)}static transferPublicVerifier(){const t=K.verifyingkey_transferPublicVerifier();return _.__wrap(t)}static transferPublicAsSignerVerifier(){const t=K.verifyingkey_transferPublicAsSignerVerifier();return _.__wrap(t)}static transferPublicToPrivateVerifier(){const t=K.verifyingkey_transferPublicToPrivateVerifier();return _.__wrap(t)}static unbondPublicVerifier(){const t=K.verifyingkey_unbondPublicVerifier();return _.__wrap(t)}isBondPublicVerifier(){return 0!==K.verifyingkey_isBondPublicVerifier(this.__wbg_ptr)}isBondValidatorVerifier(){return 0!==K.verifyingkey_isBondValidatorVerifier(this.__wbg_ptr)}isClaimUnbondPublicVerifier(){return 0!==K.verifyingkey_isClaimUnbondPublicVerifier(this.__wbg_ptr)}isFeePrivateVerifier(){return 0!==K.verifyingkey_isFeePrivateVerifier(this.__wbg_ptr)}isFeePublicVerifier(){return 0!==K.verifyingkey_isFeePublicVerifier(this.__wbg_ptr)}isInclusionVerifier(){return 0!==K.verifyingkey_isInclusionVerifier(this.__wbg_ptr)}isJoinVerifier(){return 0!==K.verifyingkey_isJoinVerifier(this.__wbg_ptr)}isSetValidatorStateVerifier(){return 0!==K.verifyingkey_isSetValidatorStateVerifier(this.__wbg_ptr)}isSplitVerifier(){return 0!==K.verifyingkey_isSplitVerifier(this.__wbg_ptr)}isTransferPrivateVerifier(){return 0!==K.verifyingkey_isTransferPrivateVerifier(this.__wbg_ptr)}isTransferPrivateToPublicVerifier(){return 0!==K.verifyingkey_isTransferPrivateToPublicVerifier(this.__wbg_ptr)}isTransferPublicVerifier(){return 0!==K.verifyingkey_isTransferPublicVerifier(this.__wbg_ptr)}isTransferPublicAsSignerVerifier(){return 0!==K.verifyingkey_isTransferPublicAsSignerVerifier(this.__wbg_ptr)}isTransferPublicToPrivateVerifier(){return 0!==K.verifyingkey_isTransferPublicToPrivateVerifier(this.__wbg_ptr)}isUnbondPublicVerifier(){return 0!==K.verifyingkey_isUnbondPublicVerifier(this.__wbg_ptr)}checksum(){let _,t;try{const n=K.__wbindgen_add_to_stack_pointer(-16);K.verifyingkey_checksum(n,this.__wbg_ptr);var e=b()[n/4+0],r=b()[n/4+1];return _=e,t=r,c(e,r)}finally{K.__wbindgen_add_to_stack_pointer(16),K.__wbindgen_free(_,t,1)}}copy(){const t=K.verifyingkey_copy(this.__wbg_ptr);return _.__wrap(t)}static fromBytes(t){try{const n=K.__wbindgen_add_to_stack_pointer(-16),i=y(t,K.__wbindgen_malloc),o=U;K.verifyingkey_fromBytes(n,i,o);var e=b()[n/4+0],r=b()[n/4+1];if(b()[n/4+2])throw a(r);return _.__wrap(e)}finally{K.__wbindgen_add_to_stack_pointer(16)}}static fromString(t){try{const n=K.__wbindgen_add_to_stack_pointer(-16),i=w(t,K.__wbindgen_malloc,K.__wbindgen_realloc),o=U;K.verifyingkey_fromString(n,i,o);var e=b()[n/4+0],r=b()[n/4+1];if(b()[n/4+2])throw a(r);return _.__wrap(e)}finally{K.__wbindgen_add_to_stack_pointer(16)}}toBytes(){try{const n=K.__wbindgen_add_to_stack_pointer(-16);K.verifyingkey_toBytes(n,this.__wbg_ptr);var _=b()[n/4+0],t=b()[n/4+1],e=b()[n/4+2];if(b()[n/4+3])throw a(e);var r=v(_,t).slice();return K.__wbindgen_free(_,1*t,1),r}finally{K.__wbindgen_add_to_stack_pointer(16)}}toString(){let _,t;try{const n=K.__wbindgen_add_to_stack_pointer(-16);K.verifyingkey_toString(n,this.__wbg_ptr);var e=b()[n/4+0],r=b()[n/4+1];return _=e,t=r,c(e,r)}finally{K.__wbindgen_add_to_stack_pointer(16),K.__wbindgen_free(_,t,1)}}};const x_="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((_=>K.__wbg_viewkey_free(_>>>0)));let V_=class _{static __wrap(t){t>>>=0;const e=Object.create(_.prototype);return e.__wbg_ptr=t,x_.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,x_.unregister(this),_}free(){const _=this.__destroy_into_raw();K.__wbg_viewkey_free(_)}static from_private_key(t){p(t,o_);const e=K.privatekey_to_view_key(t.__wbg_ptr);return _.__wrap(e)}static from_string(t){const e=w(t,K.__wbindgen_malloc,K.__wbindgen_realloc),r=U,n=K.viewkey_from_string(e,r);return _.__wrap(n)}to_string(){let _,t;try{const n=K.__wbindgen_add_to_stack_pointer(-16);K.viewkey_to_string(n,this.__wbg_ptr);var e=b()[n/4+0],r=b()[n/4+1];return _=e,t=r,c(e,r)}finally{K.__wbindgen_add_to_stack_pointer(16),K.__wbindgen_free(_,t,1)}}to_address(){const _=K.address_from_view_key(this.__wbg_ptr);return J.__wrap(_)}decrypt(_){let t,e;try{const d=K.__wbindgen_add_to_stack_pointer(-16),l=w(_,K.__wbindgen_malloc,K.__wbindgen_realloc),u=U;K.viewkey_decrypt(d,this.__wbg_ptr,l,u);var r=b()[d/4+0],n=b()[d/4+1],i=b()[d/4+2],o=b()[d/4+3],s=r,g=n;if(o)throw s=0,g=0,a(i);return t=s,e=g,c(s,g)}finally{K.__wbindgen_add_to_stack_pointer(16),K.__wbindgen_free(t,e,1)}}};async function V(_,t){if("function"==typeof Response&&_ instanceof Response){if("function"==typeof WebAssembly.instantiateStreaming)try{return await WebAssembly.instantiateStreaming(_,t)}catch(t){if("application/wasm"==_.headers.get("Content-Type"))throw t;console.warn("`WebAssembly.instantiateStreaming` failed because your server does not serve wasm with `application/wasm` MIME type. Falling back to `WebAssembly.instantiate` which is slower. Original error:\n",t)}const e=await _.arrayBuffer();return await WebAssembly.instantiate(e,t)}{const e=await WebAssembly.instantiate(_,t);return e instanceof WebAssembly.Instance?{instance:e,module:_}:e}}function F(){const _={wbg:{}};return _.wbg.__wbindgen_object_drop_ref=function(_){a(_)},_.wbg.__wbg_new_71801a555ad9f2aa=function(){return S((function(){return g(new XMLHttpRequest)}),arguments)},_.wbg.__wbg_overrideMimeType_ee9c51919ceb418b=function(){return S((function(_,t,e){i(_).overrideMimeType(c(t,e))}),arguments)},_.wbg.__wbg_open_c9eb0cf2c9d95679=function(){return S((function(_,t,e,r,n,o){i(_).open(c(t,e),c(r,n),0!==o)}),arguments)},_.wbg.__wbg_send_80d29985093c1ec5=function(){return S((function(_){i(_).send()}),arguments)},_.wbg.__wbg_response_7c2e2759084f7279=function(){return S((function(_){return g(i(_).response)}),arguments)},_.wbg.__wbg_status_d485fb5a478426fb=function(){return S((function(_){return i(_).status}),arguments)},_.wbg.__wbg_new_72fb9a18b5ae2624=function(){return g(new Object)},_.wbg.__wbindgen_string_new=function(_,t){return g(c(_,t))},_.wbg.__wbg_set_1f9b04f170055d33=function(){return S((function(_,t,e){return Reflect.set(i(_),i(t),i(e))}),arguments)},_.wbg.__wbg_new_ab6fd82b10560829=function(){return S((function(){return g(new Headers)}),arguments)},_.wbg.__wbindgen_object_clone_ref=function(_){return g(i(_))},_.wbg.__wbg_new_0d76b0581eca6298=function(){return S((function(){return g(new AbortController)}),arguments)},_.wbg.__wbg_signal_a61f78a3478fd9bc=function(_){return g(i(_).signal)},_.wbg.__wbg_append_7bfcb4937d1d5e29=function(){return S((function(_,t,e,r,n){i(_).append(c(t,e),c(r,n))}),arguments)},_.wbg.__wbg_instanceof_Response_849eb93e75734b6e=function(_){let t;try{t=i(_)instanceof Response}catch(_){t=!1}return t},_.wbg.__wbg_status_61a01141acd3cf74=function(_){return i(_).status},_.wbg.__wbg_url_5f6dc4009ac5f99d=function(_,t){const e=w(i(t).url,K.__wbindgen_malloc,K.__wbindgen_realloc),r=U;b()[_/4+1]=r,b()[_/4+0]=e},_.wbg.__wbg_headers_9620bfada380764a=function(_){return g(i(_).headers)},_.wbg.__wbg_iterator_2cee6dadfd956dfa=function(){return g(Symbol.iterator)},_.wbg.__wbg_get_e3c254076557e348=function(){return S((function(_,t){return g(Reflect.get(i(_),i(t)))}),arguments)},_.wbg.__wbindgen_is_function=function(_){return"function"==typeof i(_)},_.wbg.__wbg_call_27c0f87801dedf93=function(){return S((function(_,t){return g(i(_).call(i(t)))}),arguments)},_.wbg.__wbindgen_is_object=function(_){const t=i(_);return"object"==typeof t&&null!==t},_.wbg.__wbg_next_40fc327bfc8770e6=function(_){return g(i(_).next)},_.wbg.__wbg_next_196c84450b364254=function(){return S((function(_){return g(i(_).next())}),arguments)},_.wbg.__wbg_done_298b57d23c0fc80c=function(_){return i(_).done},_.wbg.__wbg_value_d93c65011f51a456=function(_){return g(i(_).value)},_.wbg.__wbg_abort_2aa7521d5690750e=function(_){i(_).abort()},_.wbg.__wbg_stringify_8887fe74e1c50d81=function(){return S((function(_){return g(JSON.stringify(i(_)))}),arguments)},_.wbg.__wbindgen_string_get=function(_,t){const e=i(t),r="string"==typeof e?e:void 0;var n=d(r)?0:w(r,K.__wbindgen_malloc,K.__wbindgen_realloc),o=U;b()[_/4+1]=o,b()[_/4+0]=n},_.wbg.__wbg_executionresponse_new=function(_){return g(X.__wrap(_))},_.wbg.__wbg_call_b3ca7c6051f9bec1=function(){return S((function(_,t,e){return g(i(_).call(i(t),i(e)))}),arguments)},_.wbg.__wbg_log_0159ca40cddf5b15=function(_,t){console.log(c(_,t))},_.wbg.__wbg_newwithlength_66ae46612e7f0234=function(_){return g(new Array(_>>>0))},_.wbg.__wbg_set_d4638f722068f043=function(_,t,e){i(_)[t>>>0]=a(e)},_.wbg.__wbg_transaction_new=function(_){return g(k_.__wrap(_))},_.wbg.__wbindgen_bigint_from_u64=function(_){return g(BigInt.asUintN(64,_))},_.wbg.__wbg_keypair_new=function(_){return g(__.__wrap(_))},_.wbg.__wbindgen_module=function(){return g(A.__wbindgen_wasm_module)},_.wbg.__wbindgen_memory=function(){return g(K.memory)},_.wbg.__wbg_spawnWorker_f6acaddb2e29dc4a=function(_,t,e,r){return g(n(i(_),i(t),i(e),r>>>0))},_.wbg.__wbindgen_cb_drop=function(_){const t=a(_).original;if(1==t.cnt--)return t.a=0,!0;return!1},_.wbg.__wbg_new_16b304a2cfa7ff4a=function(){return g(new Array)},_.wbg.__wbg_push_a5b05aedc7234f9f=function(_,t){return i(_).push(i(t))},_.wbg.__wbg_arrayBuffer_29931d52c7206b02=function(){return S((function(_){return g(i(_).arrayBuffer())}),arguments)},_.wbg.__wbg_new_63b92bc8671ed464=function(_){return g(new Uint8Array(i(_)))},_.wbg.__wbg_length_c20a40f15020d68a=function(_){return i(_).length},_.wbg.__wbg_new_81740750da40724f=function(_,t){try{var e={a:_,b:t};const r=new Promise(((_,t)=>{const r=e.a;e.a=0;try{return x(r,e.b,_,t)}finally{e.a=r}}));return g(r)}finally{e.a=e.b=0}},_.wbg.__wbindgen_number_new=function(_){return g(_)},_.wbg.__wbg_new_abda76e883ba8a5f=function(){return g(new Error)},_.wbg.__wbg_stack_658279fe44541cf6=function(_,t){const e=w(i(t).stack,K.__wbindgen_malloc,K.__wbindgen_realloc),r=U;b()[_/4+1]=r,b()[_/4+0]=e},_.wbg.__wbg_error_f851667af71bcfc6=function(_,t){let e,r;try{e=_,r=t,console.error(c(_,t))}finally{K.__wbindgen_free(e,r,1)}},_.wbg.__wbg_buffer_12d079cc21e14bdb=function(_){return g(i(_).buffer)},_.wbg.__wbg_newwithbyteoffsetandlength_aa4a17c33a06e5cb=function(_,t,e){return g(new Uint8Array(i(_),t>>>0,e>>>0))},_.wbg.__wbg_randomFillSync_5c9c955aa56b6049=function(){return S((function(_,t){i(_).randomFillSync(a(t))}),arguments)},_.wbg.__wbg_subarray_a1f73cd4b5b42fe1=function(_,t,e){return g(i(_).subarray(t>>>0,e>>>0))},_.wbg.__wbg_getRandomValues_3aa56aa6edec874c=function(){return S((function(_,t){i(_).getRandomValues(i(t))}),arguments)},_.wbg.__wbg_set_a47bac70306a19a7=function(_,t,e){i(_).set(i(t),e>>>0)},_.wbg.__wbg_crypto_1d1f22824a6a080c=function(_){return g(i(_).crypto)},_.wbg.__wbg_process_4a72847cc503995b=function(_){return g(i(_).process)},_.wbg.__wbg_versions_f686565e586dd935=function(_){return g(i(_).versions)},_.wbg.__wbg_node_104a2ff8d6ea03a2=function(_){return g(i(_).node)},_.wbg.__wbindgen_is_string=function(_){return"string"==typeof i(_)},_.wbg.__wbg_require_cca90b1a94a0255b=function(){return S((function(){return g(module.require)}),arguments)},_.wbg.__wbg_msCrypto_eb05e62b530a1508=function(_){return g(i(_).msCrypto)},_.wbg.__wbg_newwithlength_e9b4878cebadb3d3=function(_){return g(new Uint8Array(_>>>0))},_.wbg.__wbg_length_cd7af8117672b8b8=function(_){return i(_).length},_.wbg.__wbg_get_bd8e338fbd5f5cc8=function(_,t){return g(i(_)[t>>>0])},_.wbg.__wbg_self_ce0dbfc45cf2f5be=function(){return S((function(){return g(self.self)}),arguments)},_.wbg.__wbg_window_c6fb939a7f436783=function(){return S((function(){return g(window.window)}),arguments)},_.wbg.__wbg_globalThis_d1e6af4856ba331b=function(){return S((function(){return g(globalThis.globalThis)}),arguments)},_.wbg.__wbg_global_207b558942527489=function(){return S((function(){return g(global.global)}),arguments)},_.wbg.__wbindgen_is_undefined=function(_){return void 0===i(_)},_.wbg.__wbg_newnoargs_e258087cd0daa0ea=function(_,t){return g(new Function(c(_,t)))},_.wbg.__wbg_has_0af94d20077affa2=function(){return S((function(_,t){return Reflect.has(i(_),i(t))}),arguments)},_.wbg.__wbg_fetch_bc7c8e27076a5c84=function(_){return g(fetch(i(_)))},_.wbg.__wbg_fetch_921fad6ef9e883dd=function(_,t){return g(i(_).fetch(i(t)))},_.wbg.__wbindgen_debug_string=function(_,t){const e=w(l(i(t)),K.__wbindgen_malloc,K.__wbindgen_realloc),r=U;b()[_/4+1]=r,b()[_/4+0]=e},_.wbg.__wbindgen_throw=function(_,t){throw new Error(c(_,t))},_.wbg.__wbindgen_rethrow=function(_){throw a(_)},_.wbg.__wbg_then_a73caa9a87991566=function(_,t,e){return g(i(_).then(i(t),i(e)))},_.wbg.__wbg_then_0c86a60e8fcfe9f6=function(_,t){return g(i(_).then(i(t)))},_.wbg.__wbg_queueMicrotask_481971b0d87f3dd4=function(_){queueMicrotask(i(_))},_.wbg.__wbg_queueMicrotask_3cbae2ec6b6cd3d6=function(_){return g(i(_).queueMicrotask)},_.wbg.__wbg_resolve_b0083a7967828ec8=function(_){return g(Promise.resolve(i(_)))},_.wbg.__wbg_waitAsync_5d743fc9058ba01a=function(){return g(Atomics.waitAsync)},_.wbg.__wbg_new_8cccba86b0f574cb=function(_){return g(new Int32Array(i(_)))},_.wbg.__wbg_waitAsync_46d5c36955b71a79=function(_,t,e){return g(Atomics.waitAsync(i(_),t,e))},_.wbg.__wbg_async_19c0400d97cc72fe=function(_){return i(_).async},_.wbg.__wbg_value_571d60108110e917=function(_){return g(i(_).value)},_.wbg.__wbindgen_link_fc1eedd35dc7e0a6=function(_){const t=w("data:application/javascript,"+encodeURIComponent("onmessage = function (ev) {\n let [ia, index, value] = ev.data;\n ia = new Int32Array(ia.buffer);\n let result = Atomics.wait(ia, index, value);\n postMessage(result);\n };\n "),K.__wbindgen_malloc,K.__wbindgen_realloc),e=U;b()[_/4+1]=e,b()[_/4+0]=t},_.wbg.__wbg_new_d1187ae36d662ef9=function(){return S((function(_,t){return g(new Worker(c(_,t)))}),arguments)},_.wbg.__wbg_setonmessage_503809e5bb51bd33=function(_,t){i(_).onmessage=i(t)},_.wbg.__wbg_of_6a70eed8d41f469c=function(_,t,e){return g(Array.of(i(_),i(t),i(e)))},_.wbg.__wbg_postMessage_7380d10e8b8269df=function(){return S((function(_,t){i(_).postMessage(i(t))}),arguments)},_.wbg.__wbg_data_3ce7c145ca4fbcdc=function(_){return g(i(_).data)},_.wbg.__wbg_newwithstrandinit_3fd6fba4083ff2d0=function(){return S((function(_,t,e){return g(new Request(c(_,t),i(e)))}),arguments)},_.wbg.__wbg_responseText_c67ed2d48db10769=function(){return S((function(_,t){const e=i(t).responseText;var r=d(e)?0:w(e,K.__wbindgen_malloc,K.__wbindgen_realloc),n=U;b()[_/4+1]=n,b()[_/4+0]=r}),arguments)},_.wbg.__wbindgen_closure_wrapper5837=function(_,t,e){return g(u(_,t,538,f))},_.wbg.__wbindgen_closure_wrapper5862=function(_,t,e){return g(u(_,t,538,f))},_}function T(_,t){_.wbg.memory=t||new WebAssembly.Memory({initial:25,maximum:65536,shared:!0})}function R(_,t){return K=_.exports,A.__wbindgen_wasm_module=t,N=null,W=null,B=null,K.__wbindgen_start(),K}function z(_,t){if(void 0!==K)return K;const e=F();T(e,t),_ instanceof WebAssembly.Module||(_=new WebAssembly.Module(_));return R(new WebAssembly.Instance(_,e),_)}async function A(_,t){if(void 0!==K)return K;const e=F();("string"==typeof _||"function"==typeof Request&&_ instanceof Request||"function"==typeof URL&&_ instanceof URL)&&(_=fetch(_)),T(e,t);const{instance:r,module:n}=await V(await _,e);return R(r,n)}var O=Object.freeze({__proto__:null,Address:J,Execution:H,ExecutionResponse:X,Field:G,KeyPair:__,Metadata:e_,OfflineQuery:n_,PrivateKey:o_,PrivateKeyCiphertext:s_,Program:g_,ProgramManager:d_,ProvingKey:l_,RecordCiphertext:f_,RecordPlaintext:y_,Signature:h_,Transaction:k_,VerifyingKey:S_,ViewKey:V_,default:A,initSync:z,initThreadPool:P,runRayonThread:k,verifyFunctionExecution:m});const F_="assets/aleo_wasm.wasm";const{initThreadPool:T_,Address:R_,Execution:z_,ExecutionResponse:A_,Field:O_,Metadata:j_,OfflineQuery:K_,Private:C_,PrivateKey:E_,PrivateKeyCiphertext:M_,Program:B_,ProvingKey:U_,RecordCiphertext:I_,RecordPlaintext:q_,ProgramManager:W_,Signature:$_,Transaction:N_,ViewKey:D_,VerifyingKey:J_,verifyFunctionExecution:L_}=await(async(_={})=>{let{importHook:t,serverPath:e,initializeHook:r}=_,n=F_;return null!=e&&(n=e+/[^\/\\]*$/.exec(n)[0]),null!=t&&(n=t(n)),null!=r?await r(A,n):await A(n),O})({importHook:()=>new URL(e(5934),e.b)});async function j(_){null==_&&(_=navigator.hardwareConcurrency),console.info(`Spawning ${_} threads`),await T_(new URL(e(2583),e.b),_)}r()}catch(H_){r(H_)}}),1)}}]); //# sourceMappingURL=933.bundle.js.map \ No newline at end of file diff --git a/933.bundle.js.map b/933.bundle.js.map index 8a1d6d794..e6b1cd3a5 100644 --- a/933.bundle.js.map +++ b/933.bundle.js.map @@ -1 +1 @@ -{"version":3,"file":"933.bundle.js","mappings":"wOAAA,SAASA,EAAYC,EAAKC,EAAQC,E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,GAClBvS,gBAAiBhH,GACjBgI,UAAWhT,GACXsT,YAAa2J,GACbjJ,aAAcrX,GACd0b,QAAShZ,GACTmlB,QAASpH,EACT0G,SAAUA,EACVjmB,eAAgBF,EAChBF,eAAgBA,EAChBR,wBAAyBd,IAG7B,MAAMsoB,GAAY,wBC57Ib,MACD5mB,eAAgB6mB,GAAkB,QAClClmB,GAAO,UACP4B,GAAS,kBACTM,GAAiB,MACjBmB,GAAK,SACLgB,GAAQ,aACRgD,GAAY,QACZ8e,GAAO,WACPje,GAAU,qBACVyB,GAAoB,QACpBQ,GAAO,WACP6F,GAAU,iBACV8C,GAAgB,gBAChBU,GAAe,eACfqS,GAAc,UACdrR,GAAS,YACTM,GAAW,QACX+E,GAAO,aACPrE,GAAY,wBACZ/W,SD26IoB0b,OAAOiM,EAAM,CAAC,KACtB,IAAI,WAACC,EAAU,WAAEC,EAAU,eAAEC,GAAkBH,EAE3CI,EAAaP,GAiBjB,OAfkB,MAAdK,IACAE,EAAaF,EAAa,YAAY7qB,KAAK+qB,GAAY,IAGzC,MAAdH,IACAG,EAAaH,EAAWG,IAGN,MAAlBD,QACMA,EAAe3H,EAAY4H,SAG3B5H,EAAW4H,GAGdpB,CAAO,EC97IpBqB,CAAK,CACXJ,WAAYA,IACD,IAAIZ,IAAI,eAIvBtL,eAAe9a,EAAeqnB,GACX,MAAXA,IACAA,EAAUC,UAAUC,qBAGxBnM,QAAQoM,KAAM,YAAWH,mBAEnBR,GAAmB,IAAIT,IAAI,aAA+BiB,EACpE,C","sources":["webpack://aleo-website/wasm.js","webpack://aleo-website/../js/index.js"],"sourcesContent":["function spawnWorker(url, module, memory, address) {\n return new Promise((resolve) => {\n const worker = new Worker(url, {\n type: \"module\",\n });\n\n worker.addEventListener(\"message\", (event) => {\n // This is needed in Node to wait one extra tick, so that way\n // the Worker can fully initialize before we return.\n setTimeout(() => {\n resolve(worker);\n\n // When running in Node, this allows the process to exit\n // even though the Worker is still running.\n if (worker.unref) {\n worker.unref();\n }\n }, 0);\n }, {\n capture: true,\n once: true,\n });\n\n worker.postMessage({\n module,\n memory,\n address,\n });\n });\n }\n\nlet wasm;\n\nconst heap = new Array(128).fill(undefined);\n\nheap.push(undefined, null, true, false);\n\nfunction getObject(idx) { return heap[idx]; }\n\nlet heap_next = heap.length;\n\nfunction dropObject(idx) {\n if (idx < 132) return;\n heap[idx] = heap_next;\n heap_next = idx;\n}\n\nfunction takeObject(idx) {\n const ret = getObject(idx);\n dropObject(idx);\n return ret;\n}\n\nconst cachedTextDecoder = (typeof TextDecoder !== 'undefined' ? new TextDecoder('utf-8', { ignoreBOM: true, fatal: true }) : { decode: () => { throw Error('TextDecoder not available') } } );\n\nif (typeof TextDecoder !== 'undefined') { cachedTextDecoder.decode(); }\nlet cachedUint8Memory0 = null;\n\nfunction getUint8Memory0() {\n if (cachedUint8Memory0 === null || cachedUint8Memory0.buffer !== wasm.memory.buffer) {\n cachedUint8Memory0 = new Uint8Array(wasm.memory.buffer);\n }\n return cachedUint8Memory0;\n}\n\nfunction getStringFromWasm0(ptr, len) {\n ptr = ptr >>> 0;\n return cachedTextDecoder.decode(getUint8Memory0().slice(ptr, ptr + len));\n}\n\nfunction addHeapObject(obj) {\n if (heap_next === heap.length) heap.push(heap.length + 1);\n const idx = heap_next;\n heap_next = heap[idx];\n\n heap[idx] = obj;\n return idx;\n}\n\nlet WASM_VECTOR_LEN = 0;\n\nconst cachedTextEncoder = (typeof TextEncoder !== 'undefined' ? new TextEncoder('utf-8') : { encode: () => { throw Error('TextEncoder not available') } } );\n\nconst encodeString = function (arg, view) {\n const buf = cachedTextEncoder.encode(arg);\n view.set(buf);\n return {\n read: arg.length,\n written: buf.length\n };\n};\n\nfunction passStringToWasm0(arg, malloc, realloc) {\n\n if (realloc === undefined) {\n const buf = cachedTextEncoder.encode(arg);\n const ptr = malloc(buf.length, 1) >>> 0;\n getUint8Memory0().subarray(ptr, ptr + buf.length).set(buf);\n WASM_VECTOR_LEN = buf.length;\n return ptr;\n }\n\n let len = arg.length;\n let ptr = malloc(len, 1) >>> 0;\n\n const mem = getUint8Memory0();\n\n let offset = 0;\n\n for (; offset < len; offset++) {\n const code = arg.charCodeAt(offset);\n if (code > 0x7F) break;\n mem[ptr + offset] = code;\n }\n\n if (offset !== len) {\n if (offset !== 0) {\n arg = arg.slice(offset);\n }\n ptr = realloc(ptr, len, len = offset + arg.length * 3, 1) >>> 0;\n const view = getUint8Memory0().subarray(ptr + offset, ptr + len);\n const ret = encodeString(arg, view);\n\n offset += ret.written;\n ptr = realloc(ptr, len, offset, 1) >>> 0;\n }\n\n WASM_VECTOR_LEN = offset;\n return ptr;\n}\n\nfunction isLikeNone(x) {\n return x === undefined || x === null;\n}\n\nlet cachedInt32Memory0 = null;\n\nfunction getInt32Memory0() {\n if (cachedInt32Memory0 === null || cachedInt32Memory0.buffer !== wasm.memory.buffer) {\n cachedInt32Memory0 = new Int32Array(wasm.memory.buffer);\n }\n return cachedInt32Memory0;\n}\n\nfunction debugString(val) {\n // primitive types\n const type = typeof val;\n if (type == 'number' || type == 'boolean' || val == null) {\n return `${val}`;\n }\n if (type == 'string') {\n return `\"${val}\"`;\n }\n if (type == 'symbol') {\n const description = val.description;\n if (description == null) {\n return 'Symbol';\n } else {\n return `Symbol(${description})`;\n }\n }\n if (type == 'function') {\n const name = val.name;\n if (typeof name == 'string' && name.length > 0) {\n return `Function(${name})`;\n } else {\n return 'Function';\n }\n }\n // objects\n if (Array.isArray(val)) {\n const length = val.length;\n let debug = '[';\n if (length > 0) {\n debug += debugString(val[0]);\n }\n for(let i = 1; i < length; i++) {\n debug += ', ' + debugString(val[i]);\n }\n debug += ']';\n return debug;\n }\n // Test for built-in\n const builtInMatches = /\\[object ([^\\]]+)\\]/.exec(toString.call(val));\n let className;\n if (builtInMatches.length > 1) {\n className = builtInMatches[1];\n } else {\n // Failed to match the standard '[object ClassName]'\n return toString.call(val);\n }\n if (className == 'Object') {\n // we're a user defined class or Object\n // JSON.stringify avoids problems with cycles, and is generally much\n // easier than looping through ownProperties of `val`.\n try {\n return 'Object(' + JSON.stringify(val) + ')';\n } catch (_) {\n return 'Object';\n }\n }\n // errors\n if (val instanceof Error) {\n return `${val.name}: ${val.message}\\n${val.stack}`;\n }\n // TODO we could test for more things here, like `Set`s and `Map`s.\n return className;\n}\n\nconst CLOSURE_DTORS = (typeof FinalizationRegistry === 'undefined')\n ? { register: () => {}, unregister: () => {} }\n : new FinalizationRegistry(state => {\n wasm.__wbindgen_export_3.get(state.dtor)(state.a, state.b);\n});\n\nfunction makeMutClosure(arg0, arg1, dtor, f) {\n const state = { a: arg0, b: arg1, cnt: 1, dtor };\n const real = (...args) => {\n // First up with a closure we increment the internal reference\n // count. This ensures that the Rust closure environment won't\n // be deallocated while we're invoking it.\n state.cnt++;\n const a = state.a;\n state.a = 0;\n try {\n return f(a, state.b, ...args);\n } finally {\n if (--state.cnt === 0) {\n wasm.__wbindgen_export_3.get(state.dtor)(a, state.b);\n CLOSURE_DTORS.unregister(state);\n } else {\n state.a = a;\n }\n }\n };\n real.original = state;\n CLOSURE_DTORS.register(real, state, state);\n return real;\n}\nfunction __wbg_adapter_34(arg0, arg1, arg2) {\n wasm._dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h467700a9696faab3(arg0, arg1, addHeapObject(arg2));\n}\n\nfunction _assertClass(instance, klass) {\n if (!(instance instanceof klass)) {\n throw new Error(`expected instance of ${klass.name}`);\n }\n return instance.ptr;\n}\n\nfunction passArray8ToWasm0(arg, malloc) {\n const ptr = malloc(arg.length * 1, 1) >>> 0;\n getUint8Memory0().set(arg, ptr / 1);\n WASM_VECTOR_LEN = arg.length;\n return ptr;\n}\n/**\n* Verify an execution with a single function and a single transition. Executions with multiple\n* transitions or functions will fail to verify. Also, this does not verify that the state root of\n* the execution is included in the Aleo Network ledger.\n*\n* @param {Execution} execution The function execution to verify\n* @param {VerifyingKey} verifying_key The verifying key for the function\n* @param {Program} program The program that the function execution belongs to\n* @param {String} function_id The name of the function that was executed\n* @returns {boolean} True if the execution is valid, false otherwise\n* @param {Execution} execution\n* @param {VerifyingKey} verifying_key\n* @param {Program} program\n* @param {string} function_id\n* @returns {boolean}\n*/\nfunction verifyFunctionExecution(execution, verifying_key, program, function_id) {\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n _assertClass(execution, Execution);\n _assertClass(verifying_key, VerifyingKey);\n _assertClass(program, Program);\n const ptr0 = passStringToWasm0(function_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n wasm.verifyFunctionExecution(retptr, execution.__wbg_ptr, verifying_key.__wbg_ptr, program.__wbg_ptr, ptr0, len0);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n var r2 = getInt32Memory0()[retptr / 4 + 2];\n if (r2) {\n throw takeObject(r1);\n }\n return r0 !== 0;\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n }\n}\n\nlet cachedBigInt64Memory0 = null;\n\nfunction getBigInt64Memory0() {\n if (cachedBigInt64Memory0 === null || cachedBigInt64Memory0.buffer !== wasm.memory.buffer) {\n cachedBigInt64Memory0 = new BigInt64Array(wasm.memory.buffer);\n }\n return cachedBigInt64Memory0;\n}\n\nfunction getArrayU8FromWasm0(ptr, len) {\n ptr = ptr >>> 0;\n return getUint8Memory0().subarray(ptr / 1, ptr / 1 + len);\n}\n/**\n* @param {number} receiver\n*/\nfunction runRayonThread(receiver) {\n wasm.runRayonThread(receiver);\n}\n\n/**\n* @param {URL} url\n* @param {number} num_threads\n* @returns {Promise}\n*/\nfunction initThreadPool(url, num_threads) {\n const ret = wasm.initThreadPool(addHeapObject(url), num_threads);\n return takeObject(ret);\n}\n\nfunction handleError(f, args) {\n try {\n return f.apply(this, args);\n } catch (e) {\n wasm.__wbindgen_exn_store(addHeapObject(e));\n }\n}\nfunction __wbg_adapter_281(arg0, arg1, arg2, arg3) {\n wasm.wasm_bindgen__convert__closures__invoke2_mut__h381bef3cd886b4c7(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));\n}\n\nconst AddressFinalization = (typeof FinalizationRegistry === 'undefined')\n ? { register: () => {}, unregister: () => {} }\n : new FinalizationRegistry(ptr => wasm.__wbg_address_free(ptr >>> 0));\n/**\n* Public address of an Aleo account\n*/\nclass Address {\n\n static __wrap(ptr) {\n ptr = ptr >>> 0;\n const obj = Object.create(Address.prototype);\n obj.__wbg_ptr = ptr;\n AddressFinalization.register(obj, obj.__wbg_ptr, obj);\n return obj;\n }\n\n __destroy_into_raw() {\n const ptr = this.__wbg_ptr;\n this.__wbg_ptr = 0;\n AddressFinalization.unregister(this);\n return ptr;\n }\n\n free() {\n const ptr = this.__destroy_into_raw();\n wasm.__wbg_address_free(ptr);\n }\n /**\n * Derive an Aleo address from a private key\n *\n * @param {PrivateKey} private_key The private key to derive the address from\n * @returns {Address} Address corresponding to the private key\n * @param {PrivateKey} private_key\n * @returns {Address}\n */\n static from_private_key(private_key) {\n _assertClass(private_key, PrivateKey);\n const ret = wasm.address_from_private_key(private_key.__wbg_ptr);\n return Address.__wrap(ret);\n }\n /**\n * Derive an Aleo address from a view key\n *\n * @param {ViewKey} view_key The view key to derive the address from\n * @returns {Address} Address corresponding to the view key\n * @param {ViewKey} view_key\n * @returns {Address}\n */\n static from_view_key(view_key) {\n _assertClass(view_key, ViewKey);\n const ret = wasm.address_from_view_key(view_key.__wbg_ptr);\n return Address.__wrap(ret);\n }\n /**\n * Create an aleo address object from a string representation of an address\n *\n * @param {string} address String representation of an addressm\n * @returns {Address} Address\n * @param {string} address\n * @returns {Address}\n */\n static from_string(address) {\n const ptr0 = passStringToWasm0(address, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n const ret = wasm.address_from_string(ptr0, len0);\n return Address.__wrap(ret);\n }\n /**\n * Get a string representation of an Aleo address object\n *\n * @param {Address} Address\n * @returns {string} String representation of the address\n * @returns {string}\n */\n to_string() {\n let deferred1_0;\n let deferred1_1;\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n wasm.address_to_string(retptr, this.__wbg_ptr);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n deferred1_0 = r0;\n deferred1_1 = r1;\n return getStringFromWasm0(r0, r1);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);\n }\n }\n /**\n * Verify a signature for a message signed by the address\n *\n * @param {Uint8Array} Byte array representing a message signed by the address\n * @returns {boolean} Boolean representing whether or not the signature is valid\n * @param {Uint8Array} message\n * @param {Signature} signature\n * @returns {boolean}\n */\n verify(message, signature) {\n const ptr0 = passArray8ToWasm0(message, wasm.__wbindgen_malloc);\n const len0 = WASM_VECTOR_LEN;\n _assertClass(signature, Signature);\n const ret = wasm.address_verify(this.__wbg_ptr, ptr0, len0, signature.__wbg_ptr);\n return ret !== 0;\n }\n}\n\nconst ExecutionFinalization = (typeof FinalizationRegistry === 'undefined')\n ? { register: () => {}, unregister: () => {} }\n : new FinalizationRegistry(ptr => wasm.__wbg_execution_free(ptr >>> 0));\n/**\n* Execution of an Aleo program.\n*/\nclass Execution {\n\n static __wrap(ptr) {\n ptr = ptr >>> 0;\n const obj = Object.create(Execution.prototype);\n obj.__wbg_ptr = ptr;\n ExecutionFinalization.register(obj, obj.__wbg_ptr, obj);\n return obj;\n }\n\n __destroy_into_raw() {\n const ptr = this.__wbg_ptr;\n this.__wbg_ptr = 0;\n ExecutionFinalization.unregister(this);\n return ptr;\n }\n\n free() {\n const ptr = this.__destroy_into_raw();\n wasm.__wbg_execution_free(ptr);\n }\n /**\n * Returns the string representation of the execution.\n * @returns {string}\n */\n toString() {\n let deferred1_0;\n let deferred1_1;\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n wasm.execution_toString(retptr, this.__wbg_ptr);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n deferred1_0 = r0;\n deferred1_1 = r1;\n return getStringFromWasm0(r0, r1);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);\n }\n }\n /**\n * Creates an execution object from a string representation of an execution.\n * @param {string} execution\n * @returns {Execution}\n */\n static fromString(execution) {\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n const ptr0 = passStringToWasm0(execution, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n wasm.execution_fromString(retptr, ptr0, len0);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n var r2 = getInt32Memory0()[retptr / 4 + 2];\n if (r2) {\n throw takeObject(r1);\n }\n return Execution.__wrap(r0);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n }\n }\n}\n\nconst ExecutionResponseFinalization = (typeof FinalizationRegistry === 'undefined')\n ? { register: () => {}, unregister: () => {} }\n : new FinalizationRegistry(ptr => wasm.__wbg_executionresponse_free(ptr >>> 0));\n/**\n* Webassembly Representation of an Aleo function execution response\n*\n* This object is returned by the execution of an Aleo function off-chain. It provides methods for\n* retrieving the outputs of the function execution.\n*/\nclass ExecutionResponse {\n\n static __wrap(ptr) {\n ptr = ptr >>> 0;\n const obj = Object.create(ExecutionResponse.prototype);\n obj.__wbg_ptr = ptr;\n ExecutionResponseFinalization.register(obj, obj.__wbg_ptr, obj);\n return obj;\n }\n\n __destroy_into_raw() {\n const ptr = this.__wbg_ptr;\n this.__wbg_ptr = 0;\n ExecutionResponseFinalization.unregister(this);\n return ptr;\n }\n\n free() {\n const ptr = this.__destroy_into_raw();\n wasm.__wbg_executionresponse_free(ptr);\n }\n /**\n * Get the outputs of the executed function\n *\n * @returns {Array} Array of strings representing the outputs of the function\n * @returns {Array}\n */\n getOutputs() {\n const ret = wasm.executionresponse_getOutputs(this.__wbg_ptr);\n return takeObject(ret);\n }\n /**\n * Returns the execution object if present, null if otherwise.\n *\n * @returns {Execution | undefined} The execution object if present, null if otherwise\n * @returns {Execution | undefined}\n */\n getExecution() {\n const ret = wasm.executionresponse_getExecution(this.__wbg_ptr);\n return ret === 0 ? undefined : Execution.__wrap(ret);\n }\n /**\n * Returns the program keys if present\n * @returns {KeyPair}\n */\n getKeys() {\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n wasm.executionresponse_getKeys(retptr, this.__wbg_ptr);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n var r2 = getInt32Memory0()[retptr / 4 + 2];\n if (r2) {\n throw takeObject(r1);\n }\n return KeyPair.__wrap(r0);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n }\n }\n /**\n * Returns the proving_key if the proving key was cached in the Execution response.\n * Note the proving key is removed from the response object after the first call to this\n * function. Subsequent calls will return null.\n *\n * @returns {ProvingKey | undefined} The proving key\n * @returns {ProvingKey | undefined}\n */\n getProvingKey() {\n const ret = wasm.executionresponse_getProvingKey(this.__wbg_ptr);\n return ret === 0 ? undefined : ProvingKey.__wrap(ret);\n }\n /**\n * Returns the verifying_key associated with the program\n *\n * @returns {VerifyingKey} The verifying key\n * @returns {VerifyingKey}\n */\n getVerifyingKey() {\n const ret = wasm.executionresponse_getVerifyingKey(this.__wbg_ptr);\n return VerifyingKey.__wrap(ret);\n }\n /**\n * Returns the function identifier\n * @returns {string}\n */\n getFunctionId() {\n let deferred1_0;\n let deferred1_1;\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n wasm.executionresponse_getFunctionId(retptr, this.__wbg_ptr);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n deferred1_0 = r0;\n deferred1_1 = r1;\n return getStringFromWasm0(r0, r1);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);\n }\n }\n /**\n * Returns the program\n * @returns {Program}\n */\n getProgram() {\n const ret = wasm.executionresponse_getProgram(this.__wbg_ptr);\n return Program.__wrap(ret);\n }\n}\n\nconst FieldFinalization = (typeof FinalizationRegistry === 'undefined')\n ? { register: () => {}, unregister: () => {} }\n : new FinalizationRegistry(ptr => wasm.__wbg_field_free(ptr >>> 0));\n/**\n*/\nclass Field {\n\n static __wrap(ptr) {\n ptr = ptr >>> 0;\n const obj = Object.create(Field.prototype);\n obj.__wbg_ptr = ptr;\n FieldFinalization.register(obj, obj.__wbg_ptr, obj);\n return obj;\n }\n\n __destroy_into_raw() {\n const ptr = this.__wbg_ptr;\n this.__wbg_ptr = 0;\n FieldFinalization.unregister(this);\n return ptr;\n }\n\n free() {\n const ptr = this.__destroy_into_raw();\n wasm.__wbg_field_free(ptr);\n }\n /**\n * @returns {string}\n */\n toString() {\n let deferred1_0;\n let deferred1_1;\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n wasm.field_toString(retptr, this.__wbg_ptr);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n deferred1_0 = r0;\n deferred1_1 = r1;\n return getStringFromWasm0(r0, r1);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);\n }\n }\n /**\n * @param {string} field\n * @returns {Field}\n */\n static fromString(field) {\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n const ptr0 = passStringToWasm0(field, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n wasm.field_fromString(retptr, ptr0, len0);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n var r2 = getInt32Memory0()[retptr / 4 + 2];\n if (r2) {\n throw takeObject(r1);\n }\n return Field.__wrap(r0);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n }\n }\n}\n\nconst KeyPairFinalization = (typeof FinalizationRegistry === 'undefined')\n ? { register: () => {}, unregister: () => {} }\n : new FinalizationRegistry(ptr => wasm.__wbg_keypair_free(ptr >>> 0));\n/**\n* Key pair object containing both the function proving and verifying keys\n*/\nclass KeyPair {\n\n static __wrap(ptr) {\n ptr = ptr >>> 0;\n const obj = Object.create(KeyPair.prototype);\n obj.__wbg_ptr = ptr;\n KeyPairFinalization.register(obj, obj.__wbg_ptr, obj);\n return obj;\n }\n\n __destroy_into_raw() {\n const ptr = this.__wbg_ptr;\n this.__wbg_ptr = 0;\n KeyPairFinalization.unregister(this);\n return ptr;\n }\n\n free() {\n const ptr = this.__destroy_into_raw();\n wasm.__wbg_keypair_free(ptr);\n }\n /**\n * Create new key pair from proving and verifying keys\n *\n * @param {ProvingKey} proving_key Proving key corresponding to a function in an Aleo program\n * @param {VerifyingKey} verifying_key Verifying key corresponding to a function in an Aleo program\n * @returns {KeyPair} Key pair object containing both the function proving and verifying keys\n * @param {ProvingKey} proving_key\n * @param {VerifyingKey} verifying_key\n */\n constructor(proving_key, verifying_key) {\n _assertClass(proving_key, ProvingKey);\n var ptr0 = proving_key.__destroy_into_raw();\n _assertClass(verifying_key, VerifyingKey);\n var ptr1 = verifying_key.__destroy_into_raw();\n const ret = wasm.keypair_new(ptr0, ptr1);\n this.__wbg_ptr = ret >>> 0;\n return this;\n }\n /**\n * Get the proving key. This method will remove the proving key from the key pair\n *\n * @returns {ProvingKey | Error}\n * @returns {ProvingKey}\n */\n provingKey() {\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n wasm.keypair_provingKey(retptr, this.__wbg_ptr);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n var r2 = getInt32Memory0()[retptr / 4 + 2];\n if (r2) {\n throw takeObject(r1);\n }\n return ProvingKey.__wrap(r0);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n }\n }\n /**\n * Get the verifying key. This method will remove the verifying key from the key pair\n *\n * @returns {VerifyingKey | Error}\n * @returns {VerifyingKey}\n */\n verifyingKey() {\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n wasm.keypair_verifyingKey(retptr, this.__wbg_ptr);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n var r2 = getInt32Memory0()[retptr / 4 + 2];\n if (r2) {\n throw takeObject(r1);\n }\n return VerifyingKey.__wrap(r0);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n }\n }\n}\n\nconst MetadataFinalization = (typeof FinalizationRegistry === 'undefined')\n ? { register: () => {}, unregister: () => {} }\n : new FinalizationRegistry(ptr => wasm.__wbg_metadata_free(ptr >>> 0));\n/**\n*/\nclass Metadata {\n\n static __wrap(ptr) {\n ptr = ptr >>> 0;\n const obj = Object.create(Metadata.prototype);\n obj.__wbg_ptr = ptr;\n MetadataFinalization.register(obj, obj.__wbg_ptr, obj);\n return obj;\n }\n\n __destroy_into_raw() {\n const ptr = this.__wbg_ptr;\n this.__wbg_ptr = 0;\n MetadataFinalization.unregister(this);\n return ptr;\n }\n\n free() {\n const ptr = this.__destroy_into_raw();\n wasm.__wbg_metadata_free(ptr);\n }\n /**\n * @returns {string}\n */\n get name() {\n let deferred1_0;\n let deferred1_1;\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n wasm.__wbg_get_metadata_name(retptr, this.__wbg_ptr);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n deferred1_0 = r0;\n deferred1_1 = r1;\n return getStringFromWasm0(r0, r1);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);\n }\n }\n /**\n * @param {string} arg0\n */\n set name(arg0) {\n const ptr0 = passStringToWasm0(arg0, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n wasm.__wbg_set_metadata_name(this.__wbg_ptr, ptr0, len0);\n }\n /**\n * @returns {string}\n */\n get locator() {\n let deferred1_0;\n let deferred1_1;\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n wasm.__wbg_get_metadata_locator(retptr, this.__wbg_ptr);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n deferred1_0 = r0;\n deferred1_1 = r1;\n return getStringFromWasm0(r0, r1);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);\n }\n }\n /**\n * @param {string} arg0\n */\n set locator(arg0) {\n const ptr0 = passStringToWasm0(arg0, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n wasm.__wbg_set_metadata_locator(this.__wbg_ptr, ptr0, len0);\n }\n /**\n * @returns {string}\n */\n get prover() {\n let deferred1_0;\n let deferred1_1;\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n wasm.__wbg_get_metadata_prover(retptr, this.__wbg_ptr);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n deferred1_0 = r0;\n deferred1_1 = r1;\n return getStringFromWasm0(r0, r1);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);\n }\n }\n /**\n * @param {string} arg0\n */\n set prover(arg0) {\n const ptr0 = passStringToWasm0(arg0, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n wasm.__wbg_set_metadata_prover(this.__wbg_ptr, ptr0, len0);\n }\n /**\n * @returns {string}\n */\n get verifier() {\n let deferred1_0;\n let deferred1_1;\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n wasm.__wbg_get_metadata_verifier(retptr, this.__wbg_ptr);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n deferred1_0 = r0;\n deferred1_1 = r1;\n return getStringFromWasm0(r0, r1);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);\n }\n }\n /**\n * @param {string} arg0\n */\n set verifier(arg0) {\n const ptr0 = passStringToWasm0(arg0, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n wasm.__wbg_set_metadata_verifier(this.__wbg_ptr, ptr0, len0);\n }\n /**\n * @returns {string}\n */\n get verifyingKey() {\n let deferred1_0;\n let deferred1_1;\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n wasm.__wbg_get_metadata_verifyingKey(retptr, this.__wbg_ptr);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n deferred1_0 = r0;\n deferred1_1 = r1;\n return getStringFromWasm0(r0, r1);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);\n }\n }\n /**\n * @param {string} arg0\n */\n set verifyingKey(arg0) {\n const ptr0 = passStringToWasm0(arg0, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n wasm.__wbg_set_metadata_verifyingKey(this.__wbg_ptr, ptr0, len0);\n }\n /**\n * @returns {string}\n */\n static baseUrl() {\n let deferred1_0;\n let deferred1_1;\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n wasm.metadata_baseUrl(retptr);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n deferred1_0 = r0;\n deferred1_1 = r1;\n return getStringFromWasm0(r0, r1);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);\n }\n }\n /**\n * @returns {Metadata}\n */\n static bond_public() {\n const ret = wasm.metadata_bond_public();\n return Metadata.__wrap(ret);\n }\n /**\n * @returns {Metadata}\n */\n static bond_validator() {\n const ret = wasm.metadata_bond_validator();\n return Metadata.__wrap(ret);\n }\n /**\n * @returns {Metadata}\n */\n static claim_unbond_public() {\n const ret = wasm.metadata_claim_unbond_public();\n return Metadata.__wrap(ret);\n }\n /**\n * @returns {Metadata}\n */\n static fee_private() {\n const ret = wasm.metadata_fee_private();\n return Metadata.__wrap(ret);\n }\n /**\n * @returns {Metadata}\n */\n static fee_public() {\n const ret = wasm.metadata_fee_public();\n return Metadata.__wrap(ret);\n }\n /**\n * @returns {Metadata}\n */\n static inclusion() {\n const ret = wasm.metadata_inclusion();\n return Metadata.__wrap(ret);\n }\n /**\n * @returns {Metadata}\n */\n static join() {\n const ret = wasm.metadata_join();\n return Metadata.__wrap(ret);\n }\n /**\n * @returns {Metadata}\n */\n static set_validator_state() {\n const ret = wasm.metadata_set_validator_state();\n return Metadata.__wrap(ret);\n }\n /**\n * @returns {Metadata}\n */\n static split() {\n const ret = wasm.metadata_split();\n return Metadata.__wrap(ret);\n }\n /**\n * @returns {Metadata}\n */\n static transfer_private() {\n const ret = wasm.metadata_transfer_private();\n return Metadata.__wrap(ret);\n }\n /**\n * @returns {Metadata}\n */\n static transfer_private_to_public() {\n const ret = wasm.metadata_transfer_private_to_public();\n return Metadata.__wrap(ret);\n }\n /**\n * @returns {Metadata}\n */\n static transfer_public() {\n const ret = wasm.metadata_transfer_public();\n return Metadata.__wrap(ret);\n }\n /**\n * @returns {Metadata}\n */\n static transfer_public_as_signer() {\n const ret = wasm.metadata_transfer_public_as_signer();\n return Metadata.__wrap(ret);\n }\n /**\n * @returns {Metadata}\n */\n static transfer_public_to_private() {\n const ret = wasm.metadata_transfer_public_to_private();\n return Metadata.__wrap(ret);\n }\n /**\n * @returns {Metadata}\n */\n static unbond_public() {\n const ret = wasm.metadata_unbond_public();\n return Metadata.__wrap(ret);\n }\n}\n\nconst OfflineQueryFinalization = (typeof FinalizationRegistry === 'undefined')\n ? { register: () => {}, unregister: () => {} }\n : new FinalizationRegistry(ptr => wasm.__wbg_offlinequery_free(ptr >>> 0));\n/**\n* An offline query object used to insert the global state root and state paths needed to create\n* a valid inclusion proof offline.\n*/\nclass OfflineQuery {\n\n static __wrap(ptr) {\n ptr = ptr >>> 0;\n const obj = Object.create(OfflineQuery.prototype);\n obj.__wbg_ptr = ptr;\n OfflineQueryFinalization.register(obj, obj.__wbg_ptr, obj);\n return obj;\n }\n\n __destroy_into_raw() {\n const ptr = this.__wbg_ptr;\n this.__wbg_ptr = 0;\n OfflineQueryFinalization.unregister(this);\n return ptr;\n }\n\n free() {\n const ptr = this.__destroy_into_raw();\n wasm.__wbg_offlinequery_free(ptr);\n }\n /**\n * Creates a new offline query object. The state root is required to be passed in as a string\n * @param {string} state_root\n */\n constructor(state_root) {\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n const ptr0 = passStringToWasm0(state_root, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n wasm.offlinequery_new(retptr, ptr0, len0);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n var r2 = getInt32Memory0()[retptr / 4 + 2];\n if (r2) {\n throw takeObject(r1);\n }\n this.__wbg_ptr = r0 >>> 0;\n return this;\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n }\n }\n /**\n * Add a new state path to the offline query object.\n *\n * @param {string} commitment: The commitment corresponding to a record inpout\n * @param {string} state_path: The state path corresponding to the commitment\n * @param {string} commitment\n * @param {string} state_path\n */\n addStatePath(commitment, state_path) {\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n const ptr0 = passStringToWasm0(commitment, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n const ptr1 = passStringToWasm0(state_path, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len1 = WASM_VECTOR_LEN;\n wasm.offlinequery_addStatePath(retptr, this.__wbg_ptr, ptr0, len0, ptr1, len1);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n if (r1) {\n throw takeObject(r0);\n }\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n }\n }\n /**\n * Get a json string representation of the offline query object\n * @returns {string}\n */\n toString() {\n let deferred1_0;\n let deferred1_1;\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n wasm.offlinequery_toString(retptr, this.__wbg_ptr);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n deferred1_0 = r0;\n deferred1_1 = r1;\n return getStringFromWasm0(r0, r1);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);\n }\n }\n /**\n * Create an offline query object from a json string representation\n * @param {string} s\n * @returns {OfflineQuery}\n */\n static fromString(s) {\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n const ptr0 = passStringToWasm0(s, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n wasm.offlinequery_fromString(retptr, ptr0, len0);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n var r2 = getInt32Memory0()[retptr / 4 + 2];\n if (r2) {\n throw takeObject(r1);\n }\n return OfflineQuery.__wrap(r0);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n }\n }\n}\n\nconst PrivateKeyFinalization = (typeof FinalizationRegistry === 'undefined')\n ? { register: () => {}, unregister: () => {} }\n : new FinalizationRegistry(ptr => wasm.__wbg_privatekey_free(ptr >>> 0));\n/**\n* Private key of an Aleo account\n*/\nclass PrivateKey {\n\n static __wrap(ptr) {\n ptr = ptr >>> 0;\n const obj = Object.create(PrivateKey.prototype);\n obj.__wbg_ptr = ptr;\n PrivateKeyFinalization.register(obj, obj.__wbg_ptr, obj);\n return obj;\n }\n\n __destroy_into_raw() {\n const ptr = this.__wbg_ptr;\n this.__wbg_ptr = 0;\n PrivateKeyFinalization.unregister(this);\n return ptr;\n }\n\n free() {\n const ptr = this.__destroy_into_raw();\n wasm.__wbg_privatekey_free(ptr);\n }\n /**\n * Generate a new private key using a cryptographically secure random number generator\n *\n * @returns {PrivateKey}\n */\n constructor() {\n const ret = wasm.privatekey_new();\n this.__wbg_ptr = ret >>> 0;\n return this;\n }\n /**\n * Get a private key from a series of unchecked bytes\n *\n * @param {Uint8Array} seed Unchecked 32 byte long Uint8Array acting as the seed for the private key\n * @returns {PrivateKey}\n * @param {Uint8Array} seed\n * @returns {PrivateKey}\n */\n static from_seed_unchecked(seed) {\n const ptr0 = passArray8ToWasm0(seed, wasm.__wbindgen_malloc);\n const len0 = WASM_VECTOR_LEN;\n const ret = wasm.privatekey_from_seed_unchecked(ptr0, len0);\n return PrivateKey.__wrap(ret);\n }\n /**\n * Get a private key from a string representation of a private key\n *\n * @param {string} seed String representation of a private key\n * @returns {PrivateKey}\n * @param {string} private_key\n * @returns {PrivateKey}\n */\n static from_string(private_key) {\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n const ptr0 = passStringToWasm0(private_key, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n wasm.privatekey_from_string(retptr, ptr0, len0);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n var r2 = getInt32Memory0()[retptr / 4 + 2];\n if (r2) {\n throw takeObject(r1);\n }\n return PrivateKey.__wrap(r0);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n }\n }\n /**\n * Get a string representation of the private key. This function should be used very carefully\n * as it exposes the private key plaintext\n *\n * @returns {string} String representation of a private key\n * @returns {string}\n */\n to_string() {\n let deferred1_0;\n let deferred1_1;\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n wasm.privatekey_to_string(retptr, this.__wbg_ptr);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n deferred1_0 = r0;\n deferred1_1 = r1;\n return getStringFromWasm0(r0, r1);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);\n }\n }\n /**\n * Get the view key corresponding to the private key\n *\n * @returns {ViewKey}\n * @returns {ViewKey}\n */\n to_view_key() {\n const ret = wasm.privatekey_to_view_key(this.__wbg_ptr);\n return ViewKey.__wrap(ret);\n }\n /**\n * Get the address corresponding to the private key\n *\n * @returns {Address}\n * @returns {Address}\n */\n to_address() {\n const ret = wasm.privatekey_to_address(this.__wbg_ptr);\n return Address.__wrap(ret);\n }\n /**\n * Sign a message with the private key\n *\n * @param {Uint8Array} Byte array representing a message signed by the address\n * @returns {Signature} Signature generated by signing the message with the address\n * @param {Uint8Array} message\n * @returns {Signature}\n */\n sign(message) {\n const ptr0 = passArray8ToWasm0(message, wasm.__wbindgen_malloc);\n const len0 = WASM_VECTOR_LEN;\n const ret = wasm.privatekey_sign(this.__wbg_ptr, ptr0, len0);\n return Signature.__wrap(ret);\n }\n /**\n * Get a new randomly generated private key ciphertext using a secret. The secret is sensitive\n * and will be needed to decrypt the private key later, so it should be stored securely\n *\n * @param {string} secret Secret used to encrypt the private key\n * @returns {PrivateKeyCiphertext | Error} Ciphertext representation of the private key\n * @param {string} secret\n * @returns {PrivateKeyCiphertext}\n */\n static newEncrypted(secret) {\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n const ptr0 = passStringToWasm0(secret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n wasm.privatekey_newEncrypted(retptr, ptr0, len0);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n var r2 = getInt32Memory0()[retptr / 4 + 2];\n if (r2) {\n throw takeObject(r1);\n }\n return PrivateKeyCiphertext.__wrap(r0);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n }\n }\n /**\n * Encrypt an existing private key with a secret. The secret is sensitive and will be needed to\n * decrypt the private key later, so it should be stored securely\n *\n * @param {string} secret Secret used to encrypt the private key\n * @returns {PrivateKeyCiphertext | Error} Ciphertext representation of the private key\n * @param {string} secret\n * @returns {PrivateKeyCiphertext}\n */\n toCiphertext(secret) {\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n const ptr0 = passStringToWasm0(secret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n wasm.privatekey_toCiphertext(retptr, this.__wbg_ptr, ptr0, len0);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n var r2 = getInt32Memory0()[retptr / 4 + 2];\n if (r2) {\n throw takeObject(r1);\n }\n return PrivateKeyCiphertext.__wrap(r0);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n }\n }\n /**\n * Get private key from a private key ciphertext and secret originally used to encrypt it\n *\n * @param {PrivateKeyCiphertext} ciphertext Ciphertext representation of the private key\n * @param {string} secret Secret originally used to encrypt the private key\n * @returns {PrivateKey | Error} Private key\n * @param {PrivateKeyCiphertext} ciphertext\n * @param {string} secret\n * @returns {PrivateKey}\n */\n static fromPrivateKeyCiphertext(ciphertext, secret) {\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n _assertClass(ciphertext, PrivateKeyCiphertext);\n const ptr0 = passStringToWasm0(secret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n wasm.privatekey_fromPrivateKeyCiphertext(retptr, ciphertext.__wbg_ptr, ptr0, len0);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n var r2 = getInt32Memory0()[retptr / 4 + 2];\n if (r2) {\n throw takeObject(r1);\n }\n return PrivateKey.__wrap(r0);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n }\n }\n}\n\nconst PrivateKeyCiphertextFinalization = (typeof FinalizationRegistry === 'undefined')\n ? { register: () => {}, unregister: () => {} }\n : new FinalizationRegistry(ptr => wasm.__wbg_privatekeyciphertext_free(ptr >>> 0));\n/**\n* Private Key in ciphertext form\n*/\nclass PrivateKeyCiphertext {\n\n static __wrap(ptr) {\n ptr = ptr >>> 0;\n const obj = Object.create(PrivateKeyCiphertext.prototype);\n obj.__wbg_ptr = ptr;\n PrivateKeyCiphertextFinalization.register(obj, obj.__wbg_ptr, obj);\n return obj;\n }\n\n __destroy_into_raw() {\n const ptr = this.__wbg_ptr;\n this.__wbg_ptr = 0;\n PrivateKeyCiphertextFinalization.unregister(this);\n return ptr;\n }\n\n free() {\n const ptr = this.__destroy_into_raw();\n wasm.__wbg_privatekeyciphertext_free(ptr);\n }\n /**\n * Encrypt a private key using a secret string. The secret is sensitive and will be needed to\n * decrypt the private key later, so it should be stored securely\n *\n * @param {PrivateKey} private_key Private key to encrypt\n * @param {string} secret Secret to encrypt the private key with\n * @returns {PrivateKeyCiphertext | Error} Private key ciphertext\n * @param {PrivateKey} private_key\n * @param {string} secret\n * @returns {PrivateKeyCiphertext}\n */\n static encryptPrivateKey(private_key, secret) {\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n _assertClass(private_key, PrivateKey);\n const ptr0 = passStringToWasm0(secret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n wasm.privatekey_toCiphertext(retptr, private_key.__wbg_ptr, ptr0, len0);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n var r2 = getInt32Memory0()[retptr / 4 + 2];\n if (r2) {\n throw takeObject(r1);\n }\n return PrivateKeyCiphertext.__wrap(r0);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n }\n }\n /**\n * Decrypts a private ciphertext using a secret string. This must be the same secret used to\n * encrypt the private key\n *\n * @param {string} secret Secret used to encrypt the private key\n * @returns {PrivateKey | Error} Private key\n * @param {string} secret\n * @returns {PrivateKey}\n */\n decryptToPrivateKey(secret) {\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n const ptr0 = passStringToWasm0(secret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n wasm.privatekeyciphertext_decryptToPrivateKey(retptr, this.__wbg_ptr, ptr0, len0);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n var r2 = getInt32Memory0()[retptr / 4 + 2];\n if (r2) {\n throw takeObject(r1);\n }\n return PrivateKey.__wrap(r0);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n }\n }\n /**\n * Returns the ciphertext string\n *\n * @returns {string} Ciphertext string\n * @returns {string}\n */\n toString() {\n let deferred1_0;\n let deferred1_1;\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n wasm.privatekeyciphertext_toString(retptr, this.__wbg_ptr);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n deferred1_0 = r0;\n deferred1_1 = r1;\n return getStringFromWasm0(r0, r1);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);\n }\n }\n /**\n * Creates a PrivateKeyCiphertext from a string\n *\n * @param {string} ciphertext Ciphertext string\n * @returns {PrivateKeyCiphertext | Error} Private key ciphertext\n * @param {string} ciphertext\n * @returns {PrivateKeyCiphertext}\n */\n static fromString(ciphertext) {\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n const ptr0 = passStringToWasm0(ciphertext, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n wasm.privatekeyciphertext_fromString(retptr, ptr0, len0);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n var r2 = getInt32Memory0()[retptr / 4 + 2];\n if (r2) {\n throw takeObject(r1);\n }\n return PrivateKeyCiphertext.__wrap(r0);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n }\n }\n}\n\nconst ProgramFinalization = (typeof FinalizationRegistry === 'undefined')\n ? { register: () => {}, unregister: () => {} }\n : new FinalizationRegistry(ptr => wasm.__wbg_program_free(ptr >>> 0));\n/**\n* Webassembly Representation of an Aleo program\n*/\nclass Program {\n\n static __wrap(ptr) {\n ptr = ptr >>> 0;\n const obj = Object.create(Program.prototype);\n obj.__wbg_ptr = ptr;\n ProgramFinalization.register(obj, obj.__wbg_ptr, obj);\n return obj;\n }\n\n __destroy_into_raw() {\n const ptr = this.__wbg_ptr;\n this.__wbg_ptr = 0;\n ProgramFinalization.unregister(this);\n return ptr;\n }\n\n free() {\n const ptr = this.__destroy_into_raw();\n wasm.__wbg_program_free(ptr);\n }\n /**\n * Create a program from a program string\n *\n * @param {string} program Aleo program source code\n * @returns {Program | Error} Program object\n * @param {string} program\n * @returns {Program}\n */\n static fromString(program) {\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n const ptr0 = passStringToWasm0(program, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n wasm.program_fromString(retptr, ptr0, len0);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n var r2 = getInt32Memory0()[retptr / 4 + 2];\n if (r2) {\n throw takeObject(r1);\n }\n return Program.__wrap(r0);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n }\n }\n /**\n * Get a string representation of the program\n *\n * @returns {string} String containing the program source code\n * @returns {string}\n */\n toString() {\n let deferred1_0;\n let deferred1_1;\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n wasm.program_toString(retptr, this.__wbg_ptr);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n deferred1_0 = r0;\n deferred1_1 = r1;\n return getStringFromWasm0(r0, r1);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);\n }\n }\n /**\n * Determine if a function is present in the program\n *\n * @param {string} functionName Name of the function to check for\n * @returns {boolean} True if the program is valid, false otherwise\n * @param {string} function_name\n * @returns {boolean}\n */\n hasFunction(function_name) {\n const ptr0 = passStringToWasm0(function_name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n const ret = wasm.program_hasFunction(this.__wbg_ptr, ptr0, len0);\n return ret !== 0;\n }\n /**\n * Get javascript array of functions names in the program\n *\n * @returns {Array} Array of all function names present in the program\n *\n * @example\n * const expected_functions = [\n * \"mint\",\n * \"transfer_private\",\n * \"transfer_private_to_public\",\n * \"transfer_public\",\n * \"transfer_public_to_private\",\n * \"join\",\n * \"split\",\n * \"fee\"\n * ]\n *\n * const credits_program = aleo_wasm.Program.getCreditsProgram();\n * const credits_functions = credits_program.getFunctions();\n * console.log(credits_functions === expected_functions); // Output should be \"true\"\n * @returns {Array}\n */\n getFunctions() {\n const ret = wasm.program_getFunctions(this.__wbg_ptr);\n return takeObject(ret);\n }\n /**\n * Get a javascript object representation of the function inputs and types. This can be used\n * to generate a web form to capture user inputs for an execution of a function.\n *\n * @param {string} function_name Name of the function to get inputs for\n * @returns {Array | Error} Array of function inputs\n *\n * @example\n * const expected_inputs = [\n * {\n * type:\"record\",\n * visibility:\"private\",\n * record:\"credits\",\n * members:[\n * {\n * name:\"microcredits\",\n * type:\"u64\",\n * visibility:\"private\"\n * }\n * ],\n * register:\"r0\"\n * },\n * {\n * type:\"address\",\n * visibility:\"private\",\n * register:\"r1\"\n * },\n * {\n * type:\"u64\",\n * visibility:\"private\",\n * register:\"r2\"\n * }\n * ];\n *\n * const credits_program = aleo_wasm.Program.getCreditsProgram();\n * const transfer_function_inputs = credits_program.getFunctionInputs(\"transfer_private\");\n * console.log(transfer_function_inputs === expected_inputs); // Output should be \"true\"\n * @param {string} function_name\n * @returns {Array}\n */\n getFunctionInputs(function_name) {\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n const ptr0 = passStringToWasm0(function_name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n wasm.program_getFunctionInputs(retptr, this.__wbg_ptr, ptr0, len0);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n var r2 = getInt32Memory0()[retptr / 4 + 2];\n if (r2) {\n throw takeObject(r1);\n }\n return takeObject(r0);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n }\n }\n /**\n * Get a the list of a program's mappings and the names/types of their keys and values.\n *\n * @returns {Array | Error} - An array of objects representing the mappings in the program\n * @example\n * const expected_mappings = [\n * {\n * name: \"account\",\n * key_name: \"owner\",\n * key_type: \"address\",\n * value_name: \"microcredits\",\n * value_type: \"u64\"\n * }\n * ]\n *\n * const credits_program = aleo_wasm.Program.getCreditsProgram();\n * const credits_mappings = credits_program.getMappings();\n * console.log(credits_mappings === expected_mappings); // Output should be \"true\"\n * @returns {Array}\n */\n getMappings() {\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n wasm.program_getMappings(retptr, this.__wbg_ptr);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n var r2 = getInt32Memory0()[retptr / 4 + 2];\n if (r2) {\n throw takeObject(r1);\n }\n return takeObject(r0);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n }\n }\n /**\n * Get a javascript object representation of a program record and its types\n *\n * @param {string} record_name Name of the record to get members for\n * @returns {Object | Error} Object containing the record name, type, and members\n *\n * @example\n *\n * const expected_record = {\n * type: \"record\",\n * record: \"Credits\",\n * members: [\n * {\n * name: \"owner\",\n * type: \"address\",\n * visibility: \"private\"\n * },\n * {\n * name: \"microcredits\",\n * type: \"u64\",\n * visibility: \"private\"\n * }\n * ];\n * };\n *\n * const credits_program = aleo_wasm.Program.getCreditsProgram();\n * const credits_record = credits_program.getRecordMembers(\"Credits\");\n * console.log(credits_record === expected_record); // Output should be \"true\"\n * @param {string} record_name\n * @returns {object}\n */\n getRecordMembers(record_name) {\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n const ptr0 = passStringToWasm0(record_name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n wasm.program_getRecordMembers(retptr, this.__wbg_ptr, ptr0, len0);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n var r2 = getInt32Memory0()[retptr / 4 + 2];\n if (r2) {\n throw takeObject(r1);\n }\n return takeObject(r0);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n }\n }\n /**\n * Get a javascript object representation of a program struct and its types\n *\n * @param {string} struct_name Name of the struct to get members for\n * @returns {Array | Error} Array containing the struct members\n *\n * @example\n *\n * const STRUCT_PROGRAM = \"program token_issue.aleo;\n *\n * struct token_metadata:\n * network as u32;\n * version as u32;\n *\n * struct token:\n * token_id as u32;\n * metadata as token_metadata;\n *\n * function no_op:\n * input r0 as u64;\n * output r0 as u64;\"\n *\n * const expected_struct_members = [\n * {\n * name: \"token_id\",\n * type: \"u32\",\n * },\n * {\n * name: \"metadata\",\n * type: \"struct\",\n * struct_id: \"token_metadata\",\n * members: [\n * {\n * name: \"network\",\n * type: \"u32\",\n * }\n * {\n * name: \"version\",\n * type: \"u32\",\n * }\n * ]\n * }\n * ];\n *\n * const program = aleo_wasm.Program.fromString(STRUCT_PROGRAM);\n * const struct_members = program.getStructMembers(\"token\");\n * console.log(struct_members === expected_struct_members); // Output should be \"true\"\n * @param {string} struct_name\n * @returns {Array}\n */\n getStructMembers(struct_name) {\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n const ptr0 = passStringToWasm0(struct_name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n wasm.program_getStructMembers(retptr, this.__wbg_ptr, ptr0, len0);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n var r2 = getInt32Memory0()[retptr / 4 + 2];\n if (r2) {\n throw takeObject(r1);\n }\n return takeObject(r0);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n }\n }\n /**\n * Get the credits.aleo program\n *\n * @returns {Program} The credits.aleo program\n * @returns {Program}\n */\n static getCreditsProgram() {\n const ret = wasm.program_getCreditsProgram();\n return Program.__wrap(ret);\n }\n /**\n * Get the id of the program\n *\n * @returns {string} The id of the program\n * @returns {string}\n */\n id() {\n let deferred1_0;\n let deferred1_1;\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n wasm.program_id(retptr, this.__wbg_ptr);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n deferred1_0 = r0;\n deferred1_1 = r1;\n return getStringFromWasm0(r0, r1);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);\n }\n }\n /**\n * Get a unique address of the program\n *\n * @returns {Address} The address of the program\n * @returns {Address}\n */\n address() {\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n wasm.program_address(retptr, this.__wbg_ptr);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n var r2 = getInt32Memory0()[retptr / 4 + 2];\n if (r2) {\n throw takeObject(r1);\n }\n return Address.__wrap(r0);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n }\n }\n /**\n * Determine equality with another program\n *\n * @param {Program} other The other program to compare\n * @returns {boolean} True if the programs are equal, false otherwise\n * @param {Program} other\n * @returns {boolean}\n */\n isEqual(other) {\n _assertClass(other, Program);\n const ret = wasm.program_isEqual(this.__wbg_ptr, other.__wbg_ptr);\n return ret !== 0;\n }\n /**\n * Get program_imports\n *\n * @returns {Array} The program imports\n *\n * @example\n *\n * const DOUBLE_TEST = \"import multiply_test.aleo;\n *\n * program double_test.aleo;\n *\n * function double_it:\n * input r0 as u32.private;\n * call multiply_test.aleo/multiply 2u32 r0 into r1;\n * output r1 as u32.private;\";\n *\n * const expected_imports = [\n * \"multiply_test.aleo\"\n * ];\n *\n * const program = aleo_wasm.Program.fromString(DOUBLE_TEST_PROGRAM);\n * const imports = program.getImports();\n * console.log(imports === expected_imports); // Output should be \"true\"\n * @returns {Array}\n */\n getImports() {\n const ret = wasm.program_getImports(this.__wbg_ptr);\n return takeObject(ret);\n }\n}\n\nconst ProgramManagerFinalization = (typeof FinalizationRegistry === 'undefined')\n ? { register: () => {}, unregister: () => {} }\n : new FinalizationRegistry(ptr => wasm.__wbg_programmanager_free(ptr >>> 0));\n/**\n*/\nclass ProgramManager {\n\n __destroy_into_raw() {\n const ptr = this.__wbg_ptr;\n this.__wbg_ptr = 0;\n ProgramManagerFinalization.unregister(this);\n return ptr;\n }\n\n free() {\n const ptr = this.__destroy_into_raw();\n wasm.__wbg_programmanager_free(ptr);\n }\n /**\n * Deploy an Aleo program\n *\n * @param private_key The private key of the sender\n * @param program The source code of the program being deployed\n * @param imports A javascript object holding the source code of any imported programs in the\n * form \\{\"program_name1\": \"program_source_code\", \"program_name2\": \"program_source_code\", ..\\}.\n * Note that all imported programs must be deployed on chain before the main program in order\n * for the deployment to succeed\n * @param fee_credits The amount of credits to pay as a fee\n * @param fee_record The record to spend the fee from\n * @param url The url of the Aleo network node to send the transaction to\n * @param imports (optional) Provide a list of imports to use for the program deployment in the\n * form of a javascript object where the keys are a string of the program name and the values\n * are a string representing the program source code \\{ \"hello.aleo\": \"hello.aleo source code\" \\}\n * @param fee_proving_key (optional) Provide a proving key to use for the fee execution\n * @param fee_verifying_key (optional) Provide a verifying key to use for the fee execution\n * @returns {Transaction | Error}\n * @param {PrivateKey} private_key\n * @param {string} program\n * @param {number} fee_credits\n * @param {RecordPlaintext | undefined} [fee_record]\n * @param {string | undefined} [url]\n * @param {object | undefined} [imports]\n * @param {ProvingKey | undefined} [fee_proving_key]\n * @param {VerifyingKey | undefined} [fee_verifying_key]\n * @param {OfflineQuery | undefined} [offline_query]\n * @returns {Promise}\n */\n static buildDeploymentTransaction(private_key, program, fee_credits, fee_record, url, imports, fee_proving_key, fee_verifying_key, offline_query) {\n _assertClass(private_key, PrivateKey);\n const ptr0 = passStringToWasm0(program, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n let ptr1 = 0;\n if (!isLikeNone(fee_record)) {\n _assertClass(fee_record, RecordPlaintext);\n ptr1 = fee_record.__destroy_into_raw();\n }\n var ptr2 = isLikeNone(url) ? 0 : passStringToWasm0(url, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n var len2 = WASM_VECTOR_LEN;\n let ptr3 = 0;\n if (!isLikeNone(fee_proving_key)) {\n _assertClass(fee_proving_key, ProvingKey);\n ptr3 = fee_proving_key.__destroy_into_raw();\n }\n let ptr4 = 0;\n if (!isLikeNone(fee_verifying_key)) {\n _assertClass(fee_verifying_key, VerifyingKey);\n ptr4 = fee_verifying_key.__destroy_into_raw();\n }\n let ptr5 = 0;\n if (!isLikeNone(offline_query)) {\n _assertClass(offline_query, OfflineQuery);\n ptr5 = offline_query.__destroy_into_raw();\n }\n const ret = wasm.programmanager_buildDeploymentTransaction(private_key.__wbg_ptr, ptr0, len0, fee_credits, ptr1, ptr2, len2, isLikeNone(imports) ? 0 : addHeapObject(imports), ptr3, ptr4, ptr5);\n return takeObject(ret);\n }\n /**\n * Estimate the fee for a program deployment\n *\n * Disclaimer: Fee estimation is experimental and may not represent a correct estimate on any current or future network\n *\n * @param program The source code of the program being deployed\n * @param imports (optional) Provide a list of imports to use for the deployment fee estimation\n * in the form of a javascript object where the keys are a string of the program name and the values\n * are a string representing the program source code \\{ \"hello.aleo\": \"hello.aleo source code\" \\}\n * @returns {u64 | Error}\n * @param {string} program\n * @param {object | undefined} [imports]\n * @returns {Promise}\n */\n static estimateDeploymentFee(program, imports) {\n const ptr0 = passStringToWasm0(program, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n const ret = wasm.programmanager_estimateDeploymentFee(ptr0, len0, isLikeNone(imports) ? 0 : addHeapObject(imports));\n return takeObject(ret);\n }\n /**\n * Estimate the component of the deployment cost which comes from the fee for the program name.\n * Note that this cost does not represent the entire cost of deployment. It is additional to\n * the cost of the size (in bytes) of the deployment.\n *\n * Disclaimer: Fee estimation is experimental and may not represent a correct estimate on any current or future network\n *\n * @param name The name of the program to be deployed\n * @returns {u64 | Error}\n * @param {string} name\n * @returns {bigint}\n */\n static estimateProgramNameCost(name) {\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n const ptr0 = passStringToWasm0(name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n wasm.programmanager_estimateProgramNameCost(retptr, ptr0, len0);\n var r0 = getBigInt64Memory0()[retptr / 8 + 0];\n var r2 = getInt32Memory0()[retptr / 4 + 2];\n var r3 = getInt32Memory0()[retptr / 4 + 3];\n if (r3) {\n throw takeObject(r2);\n }\n return BigInt.asUintN(64, r0);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n }\n }\n /**\n * Execute an arbitrary function locally\n *\n * @param {PrivateKey} private_key The private key of the sender\n * @param {string} program The source code of the program being executed\n * @param {string} function The name of the function to execute\n * @param {Array} inputs A javascript array of inputs to the function\n * @param {boolean} prove_execution If true, the execution will be proven and an execution object\n * containing the proof and the encrypted inputs and outputs needed to verify the proof offline\n * will be returned.\n * @param {boolean} cache Cache the proving and verifying keys in the Execution response.\n * If this is set to 'true' the keys synthesized will be stored in the Execution Response\n * and the `ProvingKey` and `VerifyingKey` can be retrieved from the response via the `.getKeys()`\n * method.\n * @param {Object | undefined} imports (optional) Provide a list of imports to use for the function execution in the\n * form of a javascript object where the keys are a string of the program name and the values\n * are a string representing the program source code \\{ \"hello.aleo\": \"hello.aleo source code\" \\}\n * @param {ProvingKey | undefined} proving_key (optional) Provide a verifying key to use for the function execution\n * @param {VerifyingKey | undefined} verifying_key (optional) Provide a verifying key to use for the function execution\n * @param {PrivateKey} private_key\n * @param {string} program\n * @param {string} _function\n * @param {Array} inputs\n * @param {boolean} prove_execution\n * @param {boolean} cache\n * @param {object | undefined} [imports]\n * @param {ProvingKey | undefined} [proving_key]\n * @param {VerifyingKey | undefined} [verifying_key]\n * @param {string | undefined} [url]\n * @param {OfflineQuery | undefined} [offline_query]\n * @returns {Promise}\n */\n static executeFunctionOffline(private_key, program, _function, inputs, prove_execution, cache, imports, proving_key, verifying_key, url, offline_query) {\n _assertClass(private_key, PrivateKey);\n const ptr0 = passStringToWasm0(program, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n const ptr1 = passStringToWasm0(_function, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len1 = WASM_VECTOR_LEN;\n let ptr2 = 0;\n if (!isLikeNone(proving_key)) {\n _assertClass(proving_key, ProvingKey);\n ptr2 = proving_key.__destroy_into_raw();\n }\n let ptr3 = 0;\n if (!isLikeNone(verifying_key)) {\n _assertClass(verifying_key, VerifyingKey);\n ptr3 = verifying_key.__destroy_into_raw();\n }\n var ptr4 = isLikeNone(url) ? 0 : passStringToWasm0(url, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n var len4 = WASM_VECTOR_LEN;\n let ptr5 = 0;\n if (!isLikeNone(offline_query)) {\n _assertClass(offline_query, OfflineQuery);\n ptr5 = offline_query.__destroy_into_raw();\n }\n const ret = wasm.programmanager_executeFunctionOffline(private_key.__wbg_ptr, ptr0, len0, ptr1, len1, addHeapObject(inputs), prove_execution, cache, isLikeNone(imports) ? 0 : addHeapObject(imports), ptr2, ptr3, ptr4, len4, ptr5);\n return takeObject(ret);\n }\n /**\n * Execute Aleo function and create an Aleo execution transaction\n *\n * @param private_key The private key of the sender\n * @param program The source code of the program being executed\n * @param function The name of the function to execute\n * @param inputs A javascript array of inputs to the function\n * @param fee_credits The amount of credits to pay as a fee\n * @param fee_record The record to spend the fee from\n * @param url The url of the Aleo network node to send the transaction to\n * If this is set to 'true' the keys synthesized (or passed in as optional parameters via the\n * `proving_key` and `verifying_key` arguments) will be stored in the ProgramManager's memory\n * and used for subsequent transactions. If this is set to 'false' the proving and verifying\n * keys will be deallocated from memory after the transaction is executed.\n * @param imports (optional) Provide a list of imports to use for the function execution in the\n * form of a javascript object where the keys are a string of the program name and the values\n * are a string representing the program source code \\{ \"hello.aleo\": \"hello.aleo source code\" \\}\n * @param proving_key (optional) Provide a verifying key to use for the function execution\n * @param verifying_key (optional) Provide a verifying key to use for the function execution\n * @param fee_proving_key (optional) Provide a proving key to use for the fee execution\n * @param fee_verifying_key (optional) Provide a verifying key to use for the fee execution\n * @returns {Transaction | Error}\n * @param {PrivateKey} private_key\n * @param {string} program\n * @param {string} _function\n * @param {Array} inputs\n * @param {number} fee_credits\n * @param {RecordPlaintext | undefined} [fee_record]\n * @param {string | undefined} [url]\n * @param {object | undefined} [imports]\n * @param {ProvingKey | undefined} [proving_key]\n * @param {VerifyingKey | undefined} [verifying_key]\n * @param {ProvingKey | undefined} [fee_proving_key]\n * @param {VerifyingKey | undefined} [fee_verifying_key]\n * @param {OfflineQuery | undefined} [offline_query]\n * @returns {Promise}\n */\n static buildExecutionTransaction(private_key, program, _function, inputs, fee_credits, fee_record, url, imports, proving_key, verifying_key, fee_proving_key, fee_verifying_key, offline_query) {\n _assertClass(private_key, PrivateKey);\n const ptr0 = passStringToWasm0(program, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n const ptr1 = passStringToWasm0(_function, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len1 = WASM_VECTOR_LEN;\n let ptr2 = 0;\n if (!isLikeNone(fee_record)) {\n _assertClass(fee_record, RecordPlaintext);\n ptr2 = fee_record.__destroy_into_raw();\n }\n var ptr3 = isLikeNone(url) ? 0 : passStringToWasm0(url, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n var len3 = WASM_VECTOR_LEN;\n let ptr4 = 0;\n if (!isLikeNone(proving_key)) {\n _assertClass(proving_key, ProvingKey);\n ptr4 = proving_key.__destroy_into_raw();\n }\n let ptr5 = 0;\n if (!isLikeNone(verifying_key)) {\n _assertClass(verifying_key, VerifyingKey);\n ptr5 = verifying_key.__destroy_into_raw();\n }\n let ptr6 = 0;\n if (!isLikeNone(fee_proving_key)) {\n _assertClass(fee_proving_key, ProvingKey);\n ptr6 = fee_proving_key.__destroy_into_raw();\n }\n let ptr7 = 0;\n if (!isLikeNone(fee_verifying_key)) {\n _assertClass(fee_verifying_key, VerifyingKey);\n ptr7 = fee_verifying_key.__destroy_into_raw();\n }\n let ptr8 = 0;\n if (!isLikeNone(offline_query)) {\n _assertClass(offline_query, OfflineQuery);\n ptr8 = offline_query.__destroy_into_raw();\n }\n const ret = wasm.programmanager_buildExecutionTransaction(private_key.__wbg_ptr, ptr0, len0, ptr1, len1, addHeapObject(inputs), fee_credits, ptr2, ptr3, len3, isLikeNone(imports) ? 0 : addHeapObject(imports), ptr4, ptr5, ptr6, ptr7, ptr8);\n return takeObject(ret);\n }\n /**\n * Estimate Fee for Aleo function execution. Note if \"cache\" is set to true, the proving and\n * verifying keys will be stored in the ProgramManager's memory and used for subsequent\n * program executions.\n *\n * Disclaimer: Fee estimation is experimental and may not represent a correct estimate on any current or future network\n *\n * @param private_key The private key of the sender\n * @param program The source code of the program to estimate the execution fee for\n * @param function The name of the function to execute\n * @param inputs A javascript array of inputs to the function\n * @param url The url of the Aleo network node to send the transaction to\n * @param imports (optional) Provide a list of imports to use for the fee estimation in the\n * form of a javascript object where the keys are a string of the program name and the values\n * are a string representing the program source code \\{ \"hello.aleo\": \"hello.aleo source code\" \\}\n * @param proving_key (optional) Provide a verifying key to use for the fee estimation\n * @param verifying_key (optional) Provide a verifying key to use for the fee estimation\n * @returns {u64 | Error} Fee in microcredits\n * @param {PrivateKey} private_key\n * @param {string} program\n * @param {string} _function\n * @param {Array} inputs\n * @param {string | undefined} [url]\n * @param {object | undefined} [imports]\n * @param {ProvingKey | undefined} [proving_key]\n * @param {VerifyingKey | undefined} [verifying_key]\n * @param {OfflineQuery | undefined} [offline_query]\n * @returns {Promise}\n */\n static estimateExecutionFee(private_key, program, _function, inputs, url, imports, proving_key, verifying_key, offline_query) {\n _assertClass(private_key, PrivateKey);\n const ptr0 = passStringToWasm0(program, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n const ptr1 = passStringToWasm0(_function, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len1 = WASM_VECTOR_LEN;\n var ptr2 = isLikeNone(url) ? 0 : passStringToWasm0(url, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n var len2 = WASM_VECTOR_LEN;\n let ptr3 = 0;\n if (!isLikeNone(proving_key)) {\n _assertClass(proving_key, ProvingKey);\n ptr3 = proving_key.__destroy_into_raw();\n }\n let ptr4 = 0;\n if (!isLikeNone(verifying_key)) {\n _assertClass(verifying_key, VerifyingKey);\n ptr4 = verifying_key.__destroy_into_raw();\n }\n let ptr5 = 0;\n if (!isLikeNone(offline_query)) {\n _assertClass(offline_query, OfflineQuery);\n ptr5 = offline_query.__destroy_into_raw();\n }\n const ret = wasm.programmanager_estimateExecutionFee(private_key.__wbg_ptr, ptr0, len0, ptr1, len1, addHeapObject(inputs), ptr2, len2, isLikeNone(imports) ? 0 : addHeapObject(imports), ptr3, ptr4, ptr5);\n return takeObject(ret);\n }\n /**\n * Estimate the finalize fee component for executing a function. This fee is additional to the\n * size of the execution of the program in bytes. If the function does not have a finalize\n * step, then the finalize fee is 0.\n *\n * Disclaimer: Fee estimation is experimental and may not represent a correct estimate on any current or future network\n *\n * @param program The program containing the function to estimate the finalize fee for\n * @param function The function to estimate the finalize fee for\n * @returns {u64 | Error} Fee in microcredits\n * @param {string} program\n * @param {string} _function\n * @returns {bigint}\n */\n static estimateFinalizeFee(program, _function) {\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n const ptr0 = passStringToWasm0(program, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n const ptr1 = passStringToWasm0(_function, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len1 = WASM_VECTOR_LEN;\n wasm.programmanager_estimateFinalizeFee(retptr, ptr0, len0, ptr1, len1);\n var r0 = getBigInt64Memory0()[retptr / 8 + 0];\n var r2 = getInt32Memory0()[retptr / 4 + 2];\n var r3 = getInt32Memory0()[retptr / 4 + 3];\n if (r3) {\n throw takeObject(r2);\n }\n return BigInt.asUintN(64, r0);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n }\n }\n /**\n * Join two records together to create a new record with an amount of credits equal to the sum\n * of the credits of the two original records\n *\n * @param private_key The private key of the sender\n * @param record_1 The first record to combine\n * @param record_2 The second record to combine\n * @param fee_credits The amount of credits to pay as a fee\n * @param fee_record The record to spend the fee from\n * @param url The url of the Aleo network node to send the transaction to\n * @param join_proving_key (optional) Provide a proving key to use for the join function\n * @param join_verifying_key (optional) Provide a verifying key to use for the join function\n * @param fee_proving_key (optional) Provide a proving key to use for the fee execution\n * @param fee_verifying_key (optional) Provide a verifying key to use for the fee execution\n * @returns {Transaction | Error} Transaction object\n * @param {PrivateKey} private_key\n * @param {RecordPlaintext} record_1\n * @param {RecordPlaintext} record_2\n * @param {number} fee_credits\n * @param {RecordPlaintext | undefined} [fee_record]\n * @param {string | undefined} [url]\n * @param {ProvingKey | undefined} [join_proving_key]\n * @param {VerifyingKey | undefined} [join_verifying_key]\n * @param {ProvingKey | undefined} [fee_proving_key]\n * @param {VerifyingKey | undefined} [fee_verifying_key]\n * @param {OfflineQuery | undefined} [offline_query]\n * @returns {Promise}\n */\n static buildJoinTransaction(private_key, record_1, record_2, fee_credits, fee_record, url, join_proving_key, join_verifying_key, fee_proving_key, fee_verifying_key, offline_query) {\n _assertClass(private_key, PrivateKey);\n _assertClass(record_1, RecordPlaintext);\n var ptr0 = record_1.__destroy_into_raw();\n _assertClass(record_2, RecordPlaintext);\n var ptr1 = record_2.__destroy_into_raw();\n let ptr2 = 0;\n if (!isLikeNone(fee_record)) {\n _assertClass(fee_record, RecordPlaintext);\n ptr2 = fee_record.__destroy_into_raw();\n }\n var ptr3 = isLikeNone(url) ? 0 : passStringToWasm0(url, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n var len3 = WASM_VECTOR_LEN;\n let ptr4 = 0;\n if (!isLikeNone(join_proving_key)) {\n _assertClass(join_proving_key, ProvingKey);\n ptr4 = join_proving_key.__destroy_into_raw();\n }\n let ptr5 = 0;\n if (!isLikeNone(join_verifying_key)) {\n _assertClass(join_verifying_key, VerifyingKey);\n ptr5 = join_verifying_key.__destroy_into_raw();\n }\n let ptr6 = 0;\n if (!isLikeNone(fee_proving_key)) {\n _assertClass(fee_proving_key, ProvingKey);\n ptr6 = fee_proving_key.__destroy_into_raw();\n }\n let ptr7 = 0;\n if (!isLikeNone(fee_verifying_key)) {\n _assertClass(fee_verifying_key, VerifyingKey);\n ptr7 = fee_verifying_key.__destroy_into_raw();\n }\n let ptr8 = 0;\n if (!isLikeNone(offline_query)) {\n _assertClass(offline_query, OfflineQuery);\n ptr8 = offline_query.__destroy_into_raw();\n }\n const ret = wasm.programmanager_buildJoinTransaction(private_key.__wbg_ptr, ptr0, ptr1, fee_credits, ptr2, ptr3, len3, ptr4, ptr5, ptr6, ptr7, ptr8);\n return takeObject(ret);\n }\n /**\n * Split an Aleo credits record into two separate records. This function does not require a fee.\n *\n * @param private_key The private key of the sender\n * @param split_amount The amount of the credit split. This amount will be subtracted from the\n * value of the record and two new records will be created with the split amount and the remainder\n * @param amount_record The record to split\n * @param url The url of the Aleo network node to send the transaction to\n * @param split_proving_key (optional) Provide a proving key to use for the split function\n * @param split_verifying_key (optional) Provide a verifying key to use for the split function\n * @returns {Transaction | Error} Transaction object\n * @param {PrivateKey} private_key\n * @param {number} split_amount\n * @param {RecordPlaintext} amount_record\n * @param {string | undefined} [url]\n * @param {ProvingKey | undefined} [split_proving_key]\n * @param {VerifyingKey | undefined} [split_verifying_key]\n * @param {OfflineQuery | undefined} [offline_query]\n * @returns {Promise}\n */\n static buildSplitTransaction(private_key, split_amount, amount_record, url, split_proving_key, split_verifying_key, offline_query) {\n _assertClass(private_key, PrivateKey);\n _assertClass(amount_record, RecordPlaintext);\n var ptr0 = amount_record.__destroy_into_raw();\n var ptr1 = isLikeNone(url) ? 0 : passStringToWasm0(url, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n var len1 = WASM_VECTOR_LEN;\n let ptr2 = 0;\n if (!isLikeNone(split_proving_key)) {\n _assertClass(split_proving_key, ProvingKey);\n ptr2 = split_proving_key.__destroy_into_raw();\n }\n let ptr3 = 0;\n if (!isLikeNone(split_verifying_key)) {\n _assertClass(split_verifying_key, VerifyingKey);\n ptr3 = split_verifying_key.__destroy_into_raw();\n }\n let ptr4 = 0;\n if (!isLikeNone(offline_query)) {\n _assertClass(offline_query, OfflineQuery);\n ptr4 = offline_query.__destroy_into_raw();\n }\n const ret = wasm.programmanager_buildSplitTransaction(private_key.__wbg_ptr, split_amount, ptr0, ptr1, len1, ptr2, ptr3, ptr4);\n return takeObject(ret);\n }\n /**\n * Send credits from one Aleo account to another\n *\n * @param private_key The private key of the sender\n * @param amount_credits The amount of credits to send\n * @param recipient The recipient of the transaction\n * @param transfer_type The type of the transfer (options: \"private\", \"public\", \"private_to_public\", \"public_to_private\")\n * @param amount_record The record to fund the amount from\n * @param fee_credits The amount of credits to pay as a fee\n * @param fee_record The record to spend the fee from\n * @param url The url of the Aleo network node to send the transaction to\n * @param transfer_verifying_key (optional) Provide a verifying key to use for the transfer\n * function\n * @param fee_proving_key (optional) Provide a proving key to use for the fee execution\n * @param fee_verifying_key (optional) Provide a verifying key to use for the fee execution\n * @returns {Transaction | Error}\n * @param {PrivateKey} private_key\n * @param {number} amount_credits\n * @param {string} recipient\n * @param {string} transfer_type\n * @param {RecordPlaintext | undefined} amount_record\n * @param {number} fee_credits\n * @param {RecordPlaintext | undefined} [fee_record]\n * @param {string | undefined} [url]\n * @param {ProvingKey | undefined} [transfer_proving_key]\n * @param {VerifyingKey | undefined} [transfer_verifying_key]\n * @param {ProvingKey | undefined} [fee_proving_key]\n * @param {VerifyingKey | undefined} [fee_verifying_key]\n * @param {OfflineQuery | undefined} [offline_query]\n * @returns {Promise}\n */\n static buildTransferTransaction(private_key, amount_credits, recipient, transfer_type, amount_record, fee_credits, fee_record, url, transfer_proving_key, transfer_verifying_key, fee_proving_key, fee_verifying_key, offline_query) {\n _assertClass(private_key, PrivateKey);\n const ptr0 = passStringToWasm0(recipient, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n const ptr1 = passStringToWasm0(transfer_type, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len1 = WASM_VECTOR_LEN;\n let ptr2 = 0;\n if (!isLikeNone(amount_record)) {\n _assertClass(amount_record, RecordPlaintext);\n ptr2 = amount_record.__destroy_into_raw();\n }\n let ptr3 = 0;\n if (!isLikeNone(fee_record)) {\n _assertClass(fee_record, RecordPlaintext);\n ptr3 = fee_record.__destroy_into_raw();\n }\n var ptr4 = isLikeNone(url) ? 0 : passStringToWasm0(url, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n var len4 = WASM_VECTOR_LEN;\n let ptr5 = 0;\n if (!isLikeNone(transfer_proving_key)) {\n _assertClass(transfer_proving_key, ProvingKey);\n ptr5 = transfer_proving_key.__destroy_into_raw();\n }\n let ptr6 = 0;\n if (!isLikeNone(transfer_verifying_key)) {\n _assertClass(transfer_verifying_key, VerifyingKey);\n ptr6 = transfer_verifying_key.__destroy_into_raw();\n }\n let ptr7 = 0;\n if (!isLikeNone(fee_proving_key)) {\n _assertClass(fee_proving_key, ProvingKey);\n ptr7 = fee_proving_key.__destroy_into_raw();\n }\n let ptr8 = 0;\n if (!isLikeNone(fee_verifying_key)) {\n _assertClass(fee_verifying_key, VerifyingKey);\n ptr8 = fee_verifying_key.__destroy_into_raw();\n }\n let ptr9 = 0;\n if (!isLikeNone(offline_query)) {\n _assertClass(offline_query, OfflineQuery);\n ptr9 = offline_query.__destroy_into_raw();\n }\n const ret = wasm.programmanager_buildTransferTransaction(private_key.__wbg_ptr, amount_credits, ptr0, len0, ptr1, len1, ptr2, fee_credits, ptr3, ptr4, len4, ptr5, ptr6, ptr7, ptr8, ptr9);\n return takeObject(ret);\n }\n /**\n * Synthesize proving and verifying keys for a program\n *\n * @param program {string} The program source code of the program to synthesize keys for\n * @param function_id {string} The function to synthesize keys for\n * @param inputs {Array} The inputs to the function\n * @param imports {Object | undefined} The imports for the program\n * @param {PrivateKey} private_key\n * @param {string} program\n * @param {string} function_id\n * @param {Array} inputs\n * @param {object | undefined} [imports]\n * @returns {Promise}\n */\n static synthesizeKeyPair(private_key, program, function_id, inputs, imports) {\n _assertClass(private_key, PrivateKey);\n const ptr0 = passStringToWasm0(program, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n const ptr1 = passStringToWasm0(function_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len1 = WASM_VECTOR_LEN;\n const ret = wasm.programmanager_synthesizeKeyPair(private_key.__wbg_ptr, ptr0, len0, ptr1, len1, addHeapObject(inputs), isLikeNone(imports) ? 0 : addHeapObject(imports));\n return takeObject(ret);\n }\n}\n\nconst ProvingKeyFinalization = (typeof FinalizationRegistry === 'undefined')\n ? { register: () => {}, unregister: () => {} }\n : new FinalizationRegistry(ptr => wasm.__wbg_provingkey_free(ptr >>> 0));\n/**\n* Proving key for a function within an Aleo program\n*/\nclass ProvingKey {\n\n static __wrap(ptr) {\n ptr = ptr >>> 0;\n const obj = Object.create(ProvingKey.prototype);\n obj.__wbg_ptr = ptr;\n ProvingKeyFinalization.register(obj, obj.__wbg_ptr, obj);\n return obj;\n }\n\n __destroy_into_raw() {\n const ptr = this.__wbg_ptr;\n this.__wbg_ptr = 0;\n ProvingKeyFinalization.unregister(this);\n return ptr;\n }\n\n free() {\n const ptr = this.__destroy_into_raw();\n wasm.__wbg_provingkey_free(ptr);\n }\n /**\n * Verify if the proving key is for the bond_public function\n *\n * @example\n * const provingKey = ProvingKey.fromBytes(\"bond_public_proving_key.bin\");\n * provingKey.isBondPublicProver() ? console.log(\"Key verified\") : throw new Error(\"Invalid key\");\n *\n * @returns {boolean} returns true if the proving key is for the bond_public function, false if otherwise\n * @returns {boolean}\n */\n isBondPublicProver() {\n const ret = wasm.provingkey_isBondPublicProver(this.__wbg_ptr);\n return ret !== 0;\n }\n /**\n * Verify if the proving key is for the bond_validator function\n *\n * @example\n * const provingKey = ProvingKey.fromBytes(\"bond_validator_proving_key.bin\");\n * provingKey.isBondPublicProver() ? console.log(\"Key verified\") : throw new Error(\"Invalid key\");\n *\n * @returns {boolean} returns true if the proving key is for the bond_validator function, false if otherwise\n * @returns {boolean}\n */\n isBondValidatorProver() {\n const ret = wasm.provingkey_isBondValidatorProver(this.__wbg_ptr);\n return ret !== 0;\n }\n /**\n * Verify if the proving key is for the claim_unbond function\n *\n * @example\n * const provingKey = ProvingKey.fromBytes(\"claim_unbond_proving_key.bin\");\n * provingKey.isClaimUnbondProver() ? console.log(\"Key verified\") : throw new Error(\"Invalid key\");\n *\n * @returns {boolean} returns true if the proving key is for the claim_unbond function, false if otherwise\n * @returns {boolean}\n */\n isClaimUnbondPublicProver() {\n const ret = wasm.provingkey_isClaimUnbondPublicProver(this.__wbg_ptr);\n return ret !== 0;\n }\n /**\n * Verify if the proving key is for the fee_private function\n *\n * @example\n * const provingKey = ProvingKey.fromBytes(\"fee_private_proving_key.bin\");\n * provingKey.isFeePrivateProver() ? console.log(\"Key verified\") : throw new Error(\"Invalid key\");\n *\n * @returns {boolean} returns true if the proving key is for the fee_private function, false if otherwise\n * @returns {boolean}\n */\n isFeePrivateProver() {\n const ret = wasm.provingkey_isFeePrivateProver(this.__wbg_ptr);\n return ret !== 0;\n }\n /**\n * Verify if the proving key is for the fee_public function\n *\n * @example\n * const provingKey = ProvingKey.fromBytes(\"fee_public_proving_key.bin\");\n * provingKey.isFeePublicProver() ? console.log(\"Key verified\") : throw new Error(\"Invalid key\");\n *\n * @returns {boolean} returns true if the proving key is for the fee_public function, false if otherwise\n * @returns {boolean}\n */\n isFeePublicProver() {\n const ret = wasm.provingkey_isFeePublicProver(this.__wbg_ptr);\n return ret !== 0;\n }\n /**\n * Verify if the proving key is for the inclusion function\n *\n * @example\n * const provingKey = ProvingKey.fromBytes(\"inclusion_proving_key.bin\");\n * provingKey.isInclusionProver() ? console.log(\"Key verified\") : throw new Error(\"Invalid key\");\n *\n * @returns {boolean} returns true if the proving key is for the inclusion function, false if otherwise\n * @returns {boolean}\n */\n isInclusionProver() {\n const ret = wasm.provingkey_isInclusionProver(this.__wbg_ptr);\n return ret !== 0;\n }\n /**\n * Verify if the proving key is for the join function\n *\n * @example\n * const provingKey = ProvingKey.fromBytes(\"join_proving_key.bin\");\n * provingKey.isJoinProver() ? console.log(\"Key verified\") : throw new Error(\"Invalid key\");\n *\n * @returns {boolean} returns true if the proving key is for the join function, false if otherwise\n * @returns {boolean}\n */\n isJoinProver() {\n const ret = wasm.provingkey_isJoinProver(this.__wbg_ptr);\n return ret !== 0;\n }\n /**\n * Verify if the proving key is for the set_validator_state function\n *\n * @example\n * const provingKey = ProvingKey.fromBytes(\"set_validator_set_proving_key.bin\");\n * provingKey.isSetValidatorStateProver() ? console.log(\"Key verified\") : throw new Error(\"Invalid key\");\n *\n * @returns {boolean} returns true if the proving key is for the set_validator_state function, false if otherwise\n * @returns {boolean}\n */\n isSetValidatorStateProver() {\n const ret = wasm.provingkey_isSetValidatorStateProver(this.__wbg_ptr);\n return ret !== 0;\n }\n /**\n * Verify if the proving key is for the split function\n *\n * @example\n * const provingKey = ProvingKey.fromBytes(\"split_proving_key.bin\");\n * provingKey.isSplitProver() ? console.log(\"Key verified\") : throw new Error(\"Invalid key\");\n *\n * @returns {boolean} returns true if the proving key is for the split function, false if otherwise\n * @returns {boolean}\n */\n isSplitProver() {\n const ret = wasm.provingkey_isSplitProver(this.__wbg_ptr);\n return ret !== 0;\n }\n /**\n * Verify if the proving key is for the transfer_private function\n *\n * @example\n * const provingKey = ProvingKey.fromBytes(\"transfer_private_proving_key.bin\");\n * provingKey.isTransferPrivateProver() ? console.log(\"Key verified\") : throw new Error(\"Invalid key\");\n *\n * @returns {boolean} returns true if the proving key is for the transfer_private function, false if otherwise\n * @returns {boolean}\n */\n isTransferPrivateProver() {\n const ret = wasm.provingkey_isTransferPrivateProver(this.__wbg_ptr);\n return ret !== 0;\n }\n /**\n * Verify if the proving key is for the transfer_private_to_public function\n *\n * @example\n * const provingKey = ProvingKey.fromBytes(\"transfer_private_to_public_proving_key.bin\");\n * provingKey.isTransferPrivateToPublicProver() ? console.log(\"Key verified\") : throw new Error(\"Invalid key\");\n *\n * @returns {boolean} returns true if the proving key is for the transfer_private_to_public function, false if otherwise\n * @returns {boolean}\n */\n isTransferPrivateToPublicProver() {\n const ret = wasm.provingkey_isTransferPrivateToPublicProver(this.__wbg_ptr);\n return ret !== 0;\n }\n /**\n * Verify if the proving key is for the transfer_public function\n *\n * @example\n * const provingKey = ProvingKey.fromBytes(\"transfer_public_proving_key.bin\");\n * provingKey.isTransferPublicProver() ? console.log(\"Key verified\") : throw new Error(\"Invalid key\");\n *\n * @returns {boolean} returns true if the proving key is for the transfer_public function, false if otherwise\n * @returns {boolean}\n */\n isTransferPublicProver() {\n const ret = wasm.provingkey_isTransferPublicProver(this.__wbg_ptr);\n return ret !== 0;\n }\n /**\n * Verify if the proving key is for the transfer_public_as_signer function\n *\n * @example\n * const provingKey = ProvingKey.fromBytes(\"transfer_public_as_signer_proving_key.bin\");\n * provingKey.isTransferPublicAsSignerProver() ? console.log(\"Key verified\") : throw new Error(\"Invalid key\");\n *\n * @returns {boolean} returns true if the proving key is for the transfer_public function, false if otherwise\n * @returns {boolean}\n */\n isTransferPublicAsSignerProver() {\n const ret = wasm.provingkey_isTransferPublicAsSignerProver(this.__wbg_ptr);\n return ret !== 0;\n }\n /**\n * Verify if the proving key is for the transfer_public_to_private function\n *\n * @example\n * const provingKey = ProvingKey.fromBytes(\"transfer_public_to_private_proving_key.bin\");\n * provingKey.isTransferPublicToPrivateProver() ? console.log(\"Key verified\") : throw new Error(\"Invalid key\");\n *\n * @returns {boolean} returns true if the proving key is for the transfer_public_to_private function, false if otherwise\n * @returns {boolean}\n */\n isTransferPublicToPrivateProver() {\n const ret = wasm.provingkey_isTransferPublicToPrivateProver(this.__wbg_ptr);\n return ret !== 0;\n }\n /**\n * Verify if the proving key is for the unbond_public function\n *\n * @example\n * const provingKey = ProvingKey.fromBytes(\"unbond_public.bin\");\n * provingKey.isUnbondPublicProver() ? console.log(\"Key verified\") : throw new Error(\"Invalid key\");\n *\n * @returns {boolean} returns true if the proving key is for the unbond_public_prover function, false if otherwise\n * @returns {boolean}\n */\n isUnbondPublicProver() {\n const ret = wasm.provingkey_isUnbondPublicProver(this.__wbg_ptr);\n return ret !== 0;\n }\n /**\n * Return the checksum of the proving key\n *\n * @returns {string} Checksum of the proving key\n * @returns {string}\n */\n checksum() {\n let deferred1_0;\n let deferred1_1;\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n wasm.provingkey_checksum(retptr, this.__wbg_ptr);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n deferred1_0 = r0;\n deferred1_1 = r1;\n return getStringFromWasm0(r0, r1);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);\n }\n }\n /**\n * Create a copy of the proving key\n *\n * @returns {ProvingKey} A copy of the proving key\n * @returns {ProvingKey}\n */\n copy() {\n const ret = wasm.provingkey_copy(this.__wbg_ptr);\n return ProvingKey.__wrap(ret);\n }\n /**\n * Construct a new proving key from a byte array\n *\n * @param {Uint8Array} bytes Byte array representation of a proving key\n * @returns {ProvingKey | Error}\n * @param {Uint8Array} bytes\n * @returns {ProvingKey}\n */\n static fromBytes(bytes) {\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n const ptr0 = passArray8ToWasm0(bytes, wasm.__wbindgen_malloc);\n const len0 = WASM_VECTOR_LEN;\n wasm.provingkey_fromBytes(retptr, ptr0, len0);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n var r2 = getInt32Memory0()[retptr / 4 + 2];\n if (r2) {\n throw takeObject(r1);\n }\n return ProvingKey.__wrap(r0);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n }\n }\n /**\n * Create a proving key from string\n *\n * @param {string | Error} String representation of the proving key\n * @param {string} string\n * @returns {ProvingKey}\n */\n static fromString(string) {\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n const ptr0 = passStringToWasm0(string, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n wasm.provingkey_fromString(retptr, ptr0, len0);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n var r2 = getInt32Memory0()[retptr / 4 + 2];\n if (r2) {\n throw takeObject(r1);\n }\n return ProvingKey.__wrap(r0);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n }\n }\n /**\n * Return the byte representation of a proving key\n *\n * @returns {Uint8Array | Error} Byte array representation of a proving key\n * @returns {Uint8Array}\n */\n toBytes() {\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n wasm.provingkey_toBytes(retptr, this.__wbg_ptr);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n var r2 = getInt32Memory0()[retptr / 4 + 2];\n var r3 = getInt32Memory0()[retptr / 4 + 3];\n if (r3) {\n throw takeObject(r2);\n }\n var v1 = getArrayU8FromWasm0(r0, r1).slice();\n wasm.__wbindgen_free(r0, r1 * 1, 1);\n return v1;\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n }\n }\n /**\n * Get a string representation of the proving key\n *\n * @returns {string} String representation of the proving key\n * @returns {string}\n */\n toString() {\n let deferred1_0;\n let deferred1_1;\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n wasm.provingkey_toString(retptr, this.__wbg_ptr);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n deferred1_0 = r0;\n deferred1_1 = r1;\n return getStringFromWasm0(r0, r1);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);\n }\n }\n}\n\nconst RecordCiphertextFinalization = (typeof FinalizationRegistry === 'undefined')\n ? { register: () => {}, unregister: () => {} }\n : new FinalizationRegistry(ptr => wasm.__wbg_recordciphertext_free(ptr >>> 0));\n/**\n* Encrypted Aleo record\n*/\nclass RecordCiphertext {\n\n static __wrap(ptr) {\n ptr = ptr >>> 0;\n const obj = Object.create(RecordCiphertext.prototype);\n obj.__wbg_ptr = ptr;\n RecordCiphertextFinalization.register(obj, obj.__wbg_ptr, obj);\n return obj;\n }\n\n __destroy_into_raw() {\n const ptr = this.__wbg_ptr;\n this.__wbg_ptr = 0;\n RecordCiphertextFinalization.unregister(this);\n return ptr;\n }\n\n free() {\n const ptr = this.__destroy_into_raw();\n wasm.__wbg_recordciphertext_free(ptr);\n }\n /**\n * Create a record ciphertext from a string\n *\n * @param {string} record String representation of a record ciphertext\n * @returns {RecordCiphertext | Error} Record ciphertext\n * @param {string} record\n * @returns {RecordCiphertext}\n */\n static fromString(record) {\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n const ptr0 = passStringToWasm0(record, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n wasm.recordciphertext_fromString(retptr, ptr0, len0);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n var r2 = getInt32Memory0()[retptr / 4 + 2];\n if (r2) {\n throw takeObject(r1);\n }\n return RecordCiphertext.__wrap(r0);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n }\n }\n /**\n * Return the string reprensentation of the record ciphertext\n *\n * @returns {string} String representation of the record ciphertext\n * @returns {string}\n */\n toString() {\n let deferred1_0;\n let deferred1_1;\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n wasm.recordciphertext_toString(retptr, this.__wbg_ptr);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n deferred1_0 = r0;\n deferred1_1 = r1;\n return getStringFromWasm0(r0, r1);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);\n }\n }\n /**\n * Decrypt the record ciphertext into plaintext using the view key. The record will only\n * decrypt if the record was encrypted by the account corresponding to the view key\n *\n * @param {ViewKey} view_key View key used to decrypt the ciphertext\n * @returns {RecordPlaintext | Error} Record plaintext object\n * @param {ViewKey} view_key\n * @returns {RecordPlaintext}\n */\n decrypt(view_key) {\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n _assertClass(view_key, ViewKey);\n wasm.recordciphertext_decrypt(retptr, this.__wbg_ptr, view_key.__wbg_ptr);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n var r2 = getInt32Memory0()[retptr / 4 + 2];\n if (r2) {\n throw takeObject(r1);\n }\n return RecordPlaintext.__wrap(r0);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n }\n }\n /**\n * Determines if the account corresponding to the view key is the owner of the record\n *\n * @param {ViewKey} view_key View key used to decrypt the ciphertext\n * @returns {boolean}\n * @param {ViewKey} view_key\n * @returns {boolean}\n */\n isOwner(view_key) {\n _assertClass(view_key, ViewKey);\n const ret = wasm.recordciphertext_isOwner(this.__wbg_ptr, view_key.__wbg_ptr);\n return ret !== 0;\n }\n}\n\nconst RecordPlaintextFinalization = (typeof FinalizationRegistry === 'undefined')\n ? { register: () => {}, unregister: () => {} }\n : new FinalizationRegistry(ptr => wasm.__wbg_recordplaintext_free(ptr >>> 0));\n/**\n* Plaintext representation of an Aleo record\n*/\nclass RecordPlaintext {\n\n static __wrap(ptr) {\n ptr = ptr >>> 0;\n const obj = Object.create(RecordPlaintext.prototype);\n obj.__wbg_ptr = ptr;\n RecordPlaintextFinalization.register(obj, obj.__wbg_ptr, obj);\n return obj;\n }\n\n __destroy_into_raw() {\n const ptr = this.__wbg_ptr;\n this.__wbg_ptr = 0;\n RecordPlaintextFinalization.unregister(this);\n return ptr;\n }\n\n free() {\n const ptr = this.__destroy_into_raw();\n wasm.__wbg_recordplaintext_free(ptr);\n }\n /**\n * @param {string} program_id\n * @param {string} record_name\n * @returns {Field}\n */\n commitment(program_id, record_name) {\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n const ptr0 = passStringToWasm0(program_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n const ptr1 = passStringToWasm0(record_name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len1 = WASM_VECTOR_LEN;\n wasm.recordplaintext_commitment(retptr, this.__wbg_ptr, ptr0, len0, ptr1, len1);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n var r2 = getInt32Memory0()[retptr / 4 + 2];\n if (r2) {\n throw takeObject(r1);\n }\n return Field.__wrap(r0);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n }\n }\n /**\n * Return a record plaintext from a string.\n *\n * @param {string} record String representation of a plaintext representation of an Aleo record\n * @returns {RecordPlaintext | Error} Record plaintext\n * @param {string} record\n * @returns {RecordPlaintext}\n */\n static fromString(record) {\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n const ptr0 = passStringToWasm0(record, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n wasm.recordplaintext_fromString(retptr, ptr0, len0);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n var r2 = getInt32Memory0()[retptr / 4 + 2];\n if (r2) {\n throw takeObject(r1);\n }\n return RecordPlaintext.__wrap(r0);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n }\n }\n /**\n * Returns the record plaintext string\n *\n * @returns {string} String representation of the record plaintext\n * @returns {string}\n */\n toString() {\n let deferred1_0;\n let deferred1_1;\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n wasm.recordplaintext_toString(retptr, this.__wbg_ptr);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n deferred1_0 = r0;\n deferred1_1 = r1;\n return getStringFromWasm0(r0, r1);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);\n }\n }\n /**\n * Returns the amount of microcredits in the record\n *\n * @returns {u64} Amount of microcredits in the record\n * @returns {bigint}\n */\n microcredits() {\n const ret = wasm.recordplaintext_microcredits(this.__wbg_ptr);\n return BigInt.asUintN(64, ret);\n }\n /**\n * Returns the nonce of the record. This can be used to uniquely identify a record.\n *\n * @returns {string} Nonce of the record\n * @returns {string}\n */\n nonce() {\n let deferred1_0;\n let deferred1_1;\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n wasm.recordplaintext_nonce(retptr, this.__wbg_ptr);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n deferred1_0 = r0;\n deferred1_1 = r1;\n return getStringFromWasm0(r0, r1);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);\n }\n }\n /**\n * Attempt to get the serial number of a record to determine whether or not is has been spent\n *\n * @param {PrivateKey} private_key Private key of the account that owns the record\n * @param {string} program_id Program ID of the program that the record is associated with\n * @param {string} record_name Name of the record\n * @returns {string | Error} Serial number of the record\n * @param {PrivateKey} private_key\n * @param {string} program_id\n * @param {string} record_name\n * @returns {string}\n */\n serialNumberString(private_key, program_id, record_name) {\n let deferred4_0;\n let deferred4_1;\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n _assertClass(private_key, PrivateKey);\n const ptr0 = passStringToWasm0(program_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n const ptr1 = passStringToWasm0(record_name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len1 = WASM_VECTOR_LEN;\n wasm.recordplaintext_serialNumberString(retptr, this.__wbg_ptr, private_key.__wbg_ptr, ptr0, len0, ptr1, len1);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n var r2 = getInt32Memory0()[retptr / 4 + 2];\n var r3 = getInt32Memory0()[retptr / 4 + 3];\n var ptr3 = r0;\n var len3 = r1;\n if (r3) {\n ptr3 = 0; len3 = 0;\n throw takeObject(r2);\n }\n deferred4_0 = ptr3;\n deferred4_1 = len3;\n return getStringFromWasm0(ptr3, len3);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n wasm.__wbindgen_free(deferred4_0, deferred4_1, 1);\n }\n }\n}\n\nconst SignatureFinalization = (typeof FinalizationRegistry === 'undefined')\n ? { register: () => {}, unregister: () => {} }\n : new FinalizationRegistry(ptr => wasm.__wbg_signature_free(ptr >>> 0));\n/**\n* Cryptographic signature of a message signed by an Aleo account\n*/\nclass Signature {\n\n static __wrap(ptr) {\n ptr = ptr >>> 0;\n const obj = Object.create(Signature.prototype);\n obj.__wbg_ptr = ptr;\n SignatureFinalization.register(obj, obj.__wbg_ptr, obj);\n return obj;\n }\n\n __destroy_into_raw() {\n const ptr = this.__wbg_ptr;\n this.__wbg_ptr = 0;\n SignatureFinalization.unregister(this);\n return ptr;\n }\n\n free() {\n const ptr = this.__destroy_into_raw();\n wasm.__wbg_signature_free(ptr);\n }\n /**\n * Sign a message with a private key\n *\n * @param {PrivateKey} private_key The private key to sign the message with\n * @param {Uint8Array} message Byte representation of the message to sign\n * @returns {Signature} Signature of the message\n * @param {PrivateKey} private_key\n * @param {Uint8Array} message\n * @returns {Signature}\n */\n static sign(private_key, message) {\n _assertClass(private_key, PrivateKey);\n const ptr0 = passArray8ToWasm0(message, wasm.__wbindgen_malloc);\n const len0 = WASM_VECTOR_LEN;\n const ret = wasm.privatekey_sign(private_key.__wbg_ptr, ptr0, len0);\n return Signature.__wrap(ret);\n }\n /**\n * Verify a signature of a message with an address\n *\n * @param {Address} address The address to verify the signature with\n * @param {Uint8Array} message Byte representation of the message to verify\n * @returns {boolean} True if the signature is valid, false otherwise\n * @param {Address} address\n * @param {Uint8Array} message\n * @returns {boolean}\n */\n verify(address, message) {\n _assertClass(address, Address);\n const ptr0 = passArray8ToWasm0(message, wasm.__wbindgen_malloc);\n const len0 = WASM_VECTOR_LEN;\n const ret = wasm.signature_verify(this.__wbg_ptr, address.__wbg_ptr, ptr0, len0);\n return ret !== 0;\n }\n /**\n * Get a signature from a string representation of a signature\n *\n * @param {string} signature String representation of a signature\n * @returns {Signature} Signature\n * @param {string} signature\n * @returns {Signature}\n */\n static from_string(signature) {\n const ptr0 = passStringToWasm0(signature, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n const ret = wasm.signature_from_string(ptr0, len0);\n return Signature.__wrap(ret);\n }\n /**\n * Get a string representation of a signature\n *\n * @returns {string} String representation of a signature\n * @returns {string}\n */\n to_string() {\n let deferred1_0;\n let deferred1_1;\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n wasm.signature_to_string(retptr, this.__wbg_ptr);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n deferred1_0 = r0;\n deferred1_1 = r1;\n return getStringFromWasm0(r0, r1);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);\n }\n }\n}\n\nconst TransactionFinalization = (typeof FinalizationRegistry === 'undefined')\n ? { register: () => {}, unregister: () => {} }\n : new FinalizationRegistry(ptr => wasm.__wbg_transaction_free(ptr >>> 0));\n/**\n* Webassembly Representation of an Aleo transaction\n*\n* This object is created when generating an on-chain function deployment or execution and is the\n* object that should be submitted to the Aleo Network in order to deploy or execute a function.\n*/\nclass Transaction {\n\n static __wrap(ptr) {\n ptr = ptr >>> 0;\n const obj = Object.create(Transaction.prototype);\n obj.__wbg_ptr = ptr;\n TransactionFinalization.register(obj, obj.__wbg_ptr, obj);\n return obj;\n }\n\n __destroy_into_raw() {\n const ptr = this.__wbg_ptr;\n this.__wbg_ptr = 0;\n TransactionFinalization.unregister(this);\n return ptr;\n }\n\n free() {\n const ptr = this.__destroy_into_raw();\n wasm.__wbg_transaction_free(ptr);\n }\n /**\n * Create a transaction from a string\n *\n * @param {string} transaction String representation of a transaction\n * @returns {Transaction | Error}\n * @param {string} transaction\n * @returns {Transaction}\n */\n static fromString(transaction) {\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n const ptr0 = passStringToWasm0(transaction, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n wasm.transaction_fromString(retptr, ptr0, len0);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n var r2 = getInt32Memory0()[retptr / 4 + 2];\n if (r2) {\n throw takeObject(r1);\n }\n return Transaction.__wrap(r0);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n }\n }\n /**\n * Get the transaction as a string. If you want to submit this transaction to the Aleo Network\n * this function will create the string that should be submitted in the `POST` data.\n *\n * @returns {string} String representation of the transaction\n * @returns {string}\n */\n toString() {\n let deferred1_0;\n let deferred1_1;\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n wasm.transaction_toString(retptr, this.__wbg_ptr);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n deferred1_0 = r0;\n deferred1_1 = r1;\n return getStringFromWasm0(r0, r1);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);\n }\n }\n /**\n * Get the id of the transaction. This is the merkle root of the transaction's inclusion proof.\n *\n * This value can be used to query the status of the transaction on the Aleo Network to see\n * if it was successful. If successful, the transaction will be included in a block and this\n * value can be used to lookup the transaction data on-chain.\n *\n * @returns {string} Transaction id\n * @returns {string}\n */\n transactionId() {\n let deferred1_0;\n let deferred1_1;\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n wasm.transaction_transactionId(retptr, this.__wbg_ptr);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n deferred1_0 = r0;\n deferred1_1 = r1;\n return getStringFromWasm0(r0, r1);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);\n }\n }\n /**\n * Get the type of the transaction (will return \"deploy\" or \"execute\")\n *\n * @returns {string} Transaction type\n * @returns {string}\n */\n transactionType() {\n let deferred1_0;\n let deferred1_1;\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n wasm.transaction_transactionType(retptr, this.__wbg_ptr);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n deferred1_0 = r0;\n deferred1_1 = r1;\n return getStringFromWasm0(r0, r1);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);\n }\n }\n}\n\nconst VerifyingKeyFinalization = (typeof FinalizationRegistry === 'undefined')\n ? { register: () => {}, unregister: () => {} }\n : new FinalizationRegistry(ptr => wasm.__wbg_verifyingkey_free(ptr >>> 0));\n/**\n* Verifying key for a function within an Aleo program\n*/\nclass VerifyingKey {\n\n static __wrap(ptr) {\n ptr = ptr >>> 0;\n const obj = Object.create(VerifyingKey.prototype);\n obj.__wbg_ptr = ptr;\n VerifyingKeyFinalization.register(obj, obj.__wbg_ptr, obj);\n return obj;\n }\n\n __destroy_into_raw() {\n const ptr = this.__wbg_ptr;\n this.__wbg_ptr = 0;\n VerifyingKeyFinalization.unregister(this);\n return ptr;\n }\n\n free() {\n const ptr = this.__destroy_into_raw();\n wasm.__wbg_verifyingkey_free(ptr);\n }\n /**\n * Returns the verifying key for the bond_public function\n *\n * @returns {VerifyingKey} Verifying key for the bond_public function\n * @returns {VerifyingKey}\n */\n static bondPublicVerifier() {\n const ret = wasm.verifyingkey_bondPublicVerifier();\n return VerifyingKey.__wrap(ret);\n }\n /**\n * Returns the verifying key for the bond_validator function\n *\n * @returns {VerifyingKey} Verifying key for the bond_validator function\n * @returns {VerifyingKey}\n */\n static bondValidatorVerifier() {\n const ret = wasm.verifyingkey_bondValidatorVerifier();\n return VerifyingKey.__wrap(ret);\n }\n /**\n * Returns the verifying key for the claim_delegator function\n *\n * @returns {VerifyingKey} Verifying key for the claim_unbond_public function\n * @returns {VerifyingKey}\n */\n static claimUnbondPublicVerifier() {\n const ret = wasm.verifyingkey_claimUnbondPublicVerifier();\n return VerifyingKey.__wrap(ret);\n }\n /**\n * Returns the verifying key for the fee_private function\n *\n * @returns {VerifyingKey} Verifying key for the fee_private function\n * @returns {VerifyingKey}\n */\n static feePrivateVerifier() {\n const ret = wasm.verifyingkey_feePrivateVerifier();\n return VerifyingKey.__wrap(ret);\n }\n /**\n * Returns the verifying key for the fee_public function\n *\n * @returns {VerifyingKey} Verifying key for the fee_public function\n * @returns {VerifyingKey}\n */\n static feePublicVerifier() {\n const ret = wasm.verifyingkey_feePublicVerifier();\n return VerifyingKey.__wrap(ret);\n }\n /**\n * Returns the verifying key for the inclusion function\n *\n * @returns {VerifyingKey} Verifying key for the inclusion function\n * @returns {VerifyingKey}\n */\n static inclusionVerifier() {\n const ret = wasm.verifyingkey_inclusionVerifier();\n return VerifyingKey.__wrap(ret);\n }\n /**\n * Returns the verifying key for the join function\n *\n * @returns {VerifyingKey} Verifying key for the join function\n * @returns {VerifyingKey}\n */\n static joinVerifier() {\n const ret = wasm.verifyingkey_joinVerifier();\n return VerifyingKey.__wrap(ret);\n }\n /**\n * Returns the verifying key for the set_validator_state function\n *\n * @returns {VerifyingKey} Verifying key for the set_validator_state function\n * @returns {VerifyingKey}\n */\n static setValidatorStateVerifier() {\n const ret = wasm.verifyingkey_setValidatorStateVerifier();\n return VerifyingKey.__wrap(ret);\n }\n /**\n * Returns the verifying key for the split function\n *\n * @returns {VerifyingKey} Verifying key for the split function\n * @returns {VerifyingKey}\n */\n static splitVerifier() {\n const ret = wasm.verifyingkey_splitVerifier();\n return VerifyingKey.__wrap(ret);\n }\n /**\n * Returns the verifying key for the transfer_private function\n *\n * @returns {VerifyingKey} Verifying key for the transfer_private function\n * @returns {VerifyingKey}\n */\n static transferPrivateVerifier() {\n const ret = wasm.verifyingkey_transferPrivateVerifier();\n return VerifyingKey.__wrap(ret);\n }\n /**\n * Returns the verifying key for the transfer_private_to_public function\n *\n * @returns {VerifyingKey} Verifying key for the transfer_private_to_public function\n * @returns {VerifyingKey}\n */\n static transferPrivateToPublicVerifier() {\n const ret = wasm.verifyingkey_transferPrivateToPublicVerifier();\n return VerifyingKey.__wrap(ret);\n }\n /**\n * Returns the verifying key for the transfer_public function\n *\n * @returns {VerifyingKey} Verifying key for the transfer_public function\n * @returns {VerifyingKey}\n */\n static transferPublicVerifier() {\n const ret = wasm.verifyingkey_transferPublicVerifier();\n return VerifyingKey.__wrap(ret);\n }\n /**\n * Returns the verifying key for the transfer_public_as_signer function\n *\n * @returns {VerifyingKey} Verifying key for the transfer_public_as_signer function\n * @returns {VerifyingKey}\n */\n static transferPublicAsSignerVerifier() {\n const ret = wasm.verifyingkey_transferPublicAsSignerVerifier();\n return VerifyingKey.__wrap(ret);\n }\n /**\n * Returns the verifying key for the transfer_public_to_private function\n *\n * @returns {VerifyingKey} Verifying key for the transfer_public_to_private function\n * @returns {VerifyingKey}\n */\n static transferPublicToPrivateVerifier() {\n const ret = wasm.verifyingkey_transferPublicToPrivateVerifier();\n return VerifyingKey.__wrap(ret);\n }\n /**\n * Returns the verifying key for the unbond_public function\n *\n * @returns {VerifyingKey} Verifying key for the unbond_public function\n * @returns {VerifyingKey}\n */\n static unbondPublicVerifier() {\n const ret = wasm.verifyingkey_unbondPublicVerifier();\n return VerifyingKey.__wrap(ret);\n }\n /**\n * Returns the verifying key for the bond_public function\n *\n * @returns {VerifyingKey} Verifying key for the bond_public function\n * @returns {boolean}\n */\n isBondPublicVerifier() {\n const ret = wasm.verifyingkey_isBondPublicVerifier(this.__wbg_ptr);\n return ret !== 0;\n }\n /**\n * Returns the verifying key for the bond_validator function\n *\n * @returns {VerifyingKey} Verifying key for the bond_validator function\n * @returns {boolean}\n */\n isBondValidatorVerifier() {\n const ret = wasm.verifyingkey_isBondValidatorVerifier(this.__wbg_ptr);\n return ret !== 0;\n }\n /**\n * Verifies the verifying key is for the claim_delegator function\n *\n * @returns {bool}\n * @returns {boolean}\n */\n isClaimUnbondPublicVerifier() {\n const ret = wasm.verifyingkey_isClaimUnbondPublicVerifier(this.__wbg_ptr);\n return ret !== 0;\n }\n /**\n * Verifies the verifying key is for the fee_private function\n *\n * @returns {bool}\n * @returns {boolean}\n */\n isFeePrivateVerifier() {\n const ret = wasm.verifyingkey_isFeePrivateVerifier(this.__wbg_ptr);\n return ret !== 0;\n }\n /**\n * Verifies the verifying key is for the fee_public function\n *\n * @returns {bool}\n * @returns {boolean}\n */\n isFeePublicVerifier() {\n const ret = wasm.verifyingkey_isFeePublicVerifier(this.__wbg_ptr);\n return ret !== 0;\n }\n /**\n * Verifies the verifying key is for the inclusion function\n *\n * @returns {bool}\n * @returns {boolean}\n */\n isInclusionVerifier() {\n const ret = wasm.verifyingkey_isInclusionVerifier(this.__wbg_ptr);\n return ret !== 0;\n }\n /**\n * Verifies the verifying key is for the join function\n *\n * @returns {bool}\n * @returns {boolean}\n */\n isJoinVerifier() {\n const ret = wasm.verifyingkey_isJoinVerifier(this.__wbg_ptr);\n return ret !== 0;\n }\n /**\n * Verifies the verifying key is for the set_validator_state function\n *\n * @returns {bool}\n * @returns {boolean}\n */\n isSetValidatorStateVerifier() {\n const ret = wasm.verifyingkey_isSetValidatorStateVerifier(this.__wbg_ptr);\n return ret !== 0;\n }\n /**\n * Verifies the verifying key is for the split function\n *\n * @returns {bool}\n * @returns {boolean}\n */\n isSplitVerifier() {\n const ret = wasm.verifyingkey_isSplitVerifier(this.__wbg_ptr);\n return ret !== 0;\n }\n /**\n * Verifies the verifying key is for the transfer_private function\n *\n * @returns {bool}\n * @returns {boolean}\n */\n isTransferPrivateVerifier() {\n const ret = wasm.verifyingkey_isTransferPrivateVerifier(this.__wbg_ptr);\n return ret !== 0;\n }\n /**\n * Verifies the verifying key is for the transfer_private_to_public function\n *\n * @returns {bool}\n * @returns {boolean}\n */\n isTransferPrivateToPublicVerifier() {\n const ret = wasm.verifyingkey_isTransferPrivateToPublicVerifier(this.__wbg_ptr);\n return ret !== 0;\n }\n /**\n * Verifies the verifying key is for the transfer_public function\n *\n * @returns {bool}\n * @returns {boolean}\n */\n isTransferPublicVerifier() {\n const ret = wasm.verifyingkey_isTransferPublicVerifier(this.__wbg_ptr);\n return ret !== 0;\n }\n /**\n * Verifies the verifying key is for the transfer_public_as_signer function\n *\n * @returns {bool}\n * @returns {boolean}\n */\n isTransferPublicAsSignerVerifier() {\n const ret = wasm.verifyingkey_isTransferPublicAsSignerVerifier(this.__wbg_ptr);\n return ret !== 0;\n }\n /**\n * Verifies the verifying key is for the transfer_public_to_private function\n *\n * @returns {bool}\n * @returns {boolean}\n */\n isTransferPublicToPrivateVerifier() {\n const ret = wasm.verifyingkey_isTransferPublicToPrivateVerifier(this.__wbg_ptr);\n return ret !== 0;\n }\n /**\n * Verifies the verifying key is for the unbond_public function\n *\n * @returns {bool}\n * @returns {boolean}\n */\n isUnbondPublicVerifier() {\n const ret = wasm.verifyingkey_isUnbondPublicVerifier(this.__wbg_ptr);\n return ret !== 0;\n }\n /**\n * Get the checksum of the verifying key\n *\n * @returns {string} Checksum of the verifying key\n * @returns {string}\n */\n checksum() {\n let deferred1_0;\n let deferred1_1;\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n wasm.verifyingkey_checksum(retptr, this.__wbg_ptr);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n deferred1_0 = r0;\n deferred1_1 = r1;\n return getStringFromWasm0(r0, r1);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);\n }\n }\n /**\n * Create a copy of the verifying key\n *\n * @returns {VerifyingKey} A copy of the verifying key\n * @returns {VerifyingKey}\n */\n copy() {\n const ret = wasm.verifyingkey_copy(this.__wbg_ptr);\n return VerifyingKey.__wrap(ret);\n }\n /**\n * Construct a new verifying key from a byte array\n *\n * @param {Uint8Array} bytes Byte representation of a verifying key\n * @returns {VerifyingKey | Error}\n * @param {Uint8Array} bytes\n * @returns {VerifyingKey}\n */\n static fromBytes(bytes) {\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n const ptr0 = passArray8ToWasm0(bytes, wasm.__wbindgen_malloc);\n const len0 = WASM_VECTOR_LEN;\n wasm.verifyingkey_fromBytes(retptr, ptr0, len0);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n var r2 = getInt32Memory0()[retptr / 4 + 2];\n if (r2) {\n throw takeObject(r1);\n }\n return VerifyingKey.__wrap(r0);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n }\n }\n /**\n * Create a verifying key from string\n *\n * @param {String} string String representation of a verifying key\n * @returns {VerifyingKey | Error}\n * @param {string} string\n * @returns {VerifyingKey}\n */\n static fromString(string) {\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n const ptr0 = passStringToWasm0(string, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n wasm.verifyingkey_fromString(retptr, ptr0, len0);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n var r2 = getInt32Memory0()[retptr / 4 + 2];\n if (r2) {\n throw takeObject(r1);\n }\n return VerifyingKey.__wrap(r0);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n }\n }\n /**\n * Create a byte array from a verifying key\n *\n * @returns {Uint8Array | Error} Byte representation of a verifying key\n * @returns {Uint8Array}\n */\n toBytes() {\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n wasm.verifyingkey_toBytes(retptr, this.__wbg_ptr);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n var r2 = getInt32Memory0()[retptr / 4 + 2];\n var r3 = getInt32Memory0()[retptr / 4 + 3];\n if (r3) {\n throw takeObject(r2);\n }\n var v1 = getArrayU8FromWasm0(r0, r1).slice();\n wasm.__wbindgen_free(r0, r1 * 1, 1);\n return v1;\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n }\n }\n /**\n * Get a string representation of the verifying key\n *\n * @returns {String} String representation of the verifying key\n * @returns {string}\n */\n toString() {\n let deferred1_0;\n let deferred1_1;\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n wasm.verifyingkey_toString(retptr, this.__wbg_ptr);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n deferred1_0 = r0;\n deferred1_1 = r1;\n return getStringFromWasm0(r0, r1);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);\n }\n }\n}\n\nconst ViewKeyFinalization = (typeof FinalizationRegistry === 'undefined')\n ? { register: () => {}, unregister: () => {} }\n : new FinalizationRegistry(ptr => wasm.__wbg_viewkey_free(ptr >>> 0));\n/**\n*/\nclass ViewKey {\n\n static __wrap(ptr) {\n ptr = ptr >>> 0;\n const obj = Object.create(ViewKey.prototype);\n obj.__wbg_ptr = ptr;\n ViewKeyFinalization.register(obj, obj.__wbg_ptr, obj);\n return obj;\n }\n\n __destroy_into_raw() {\n const ptr = this.__wbg_ptr;\n this.__wbg_ptr = 0;\n ViewKeyFinalization.unregister(this);\n return ptr;\n }\n\n free() {\n const ptr = this.__destroy_into_raw();\n wasm.__wbg_viewkey_free(ptr);\n }\n /**\n * Create a new view key from a private key\n *\n * @param {PrivateKey} private_key Private key\n * @returns {ViewKey} View key\n * @param {PrivateKey} private_key\n * @returns {ViewKey}\n */\n static from_private_key(private_key) {\n _assertClass(private_key, PrivateKey);\n const ret = wasm.privatekey_to_view_key(private_key.__wbg_ptr);\n return ViewKey.__wrap(ret);\n }\n /**\n * Create a new view key from a string representation of a view key\n *\n * @param {string} view_key String representation of a view key\n * @returns {ViewKey} View key\n * @param {string} view_key\n * @returns {ViewKey}\n */\n static from_string(view_key) {\n const ptr0 = passStringToWasm0(view_key, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n const ret = wasm.viewkey_from_string(ptr0, len0);\n return ViewKey.__wrap(ret);\n }\n /**\n * Get a string representation of a view key\n *\n * @returns {string} String representation of a view key\n * @returns {string}\n */\n to_string() {\n let deferred1_0;\n let deferred1_1;\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n wasm.viewkey_to_string(retptr, this.__wbg_ptr);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n deferred1_0 = r0;\n deferred1_1 = r1;\n return getStringFromWasm0(r0, r1);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);\n }\n }\n /**\n * Get the address corresponding to a view key\n *\n * @returns {Address} Address\n * @returns {Address}\n */\n to_address() {\n const ret = wasm.address_from_view_key(this.__wbg_ptr);\n return Address.__wrap(ret);\n }\n /**\n * Decrypt a record ciphertext with a view key\n *\n * @param {string} ciphertext String representation of a record ciphertext\n * @returns {string} String representation of a record plaintext\n * @param {string} ciphertext\n * @returns {string}\n */\n decrypt(ciphertext) {\n let deferred3_0;\n let deferred3_1;\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n const ptr0 = passStringToWasm0(ciphertext, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n wasm.viewkey_decrypt(retptr, this.__wbg_ptr, ptr0, len0);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n var r2 = getInt32Memory0()[retptr / 4 + 2];\n var r3 = getInt32Memory0()[retptr / 4 + 3];\n var ptr2 = r0;\n var len2 = r1;\n if (r3) {\n ptr2 = 0; len2 = 0;\n throw takeObject(r2);\n }\n deferred3_0 = ptr2;\n deferred3_1 = len2;\n return getStringFromWasm0(ptr2, len2);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n wasm.__wbindgen_free(deferred3_0, deferred3_1, 1);\n }\n }\n}\n\nasync function __wbg_load(module, imports) {\n if (typeof Response === 'function' && module instanceof Response) {\n if (typeof WebAssembly.instantiateStreaming === 'function') {\n try {\n return await WebAssembly.instantiateStreaming(module, imports);\n\n } catch (e) {\n if (module.headers.get('Content-Type') != 'application/wasm') {\n console.warn(\"`WebAssembly.instantiateStreaming` failed because your server does not serve wasm with `application/wasm` MIME type. Falling back to `WebAssembly.instantiate` which is slower. Original error:\\n\", e);\n\n } else {\n throw e;\n }\n }\n }\n\n const bytes = await module.arrayBuffer();\n return await WebAssembly.instantiate(bytes, imports);\n\n } else {\n const instance = await WebAssembly.instantiate(module, imports);\n\n if (instance instanceof WebAssembly.Instance) {\n return { instance, module };\n\n } else {\n return instance;\n }\n }\n}\n\nfunction __wbg_get_imports() {\n const imports = {};\n imports.wbg = {};\n imports.wbg.__wbindgen_object_drop_ref = function(arg0) {\n takeObject(arg0);\n };\n imports.wbg.__wbg_new_71801a555ad9f2aa = function() { return handleError(function () {\n const ret = new XMLHttpRequest();\n return addHeapObject(ret);\n }, arguments) };\n imports.wbg.__wbg_overrideMimeType_ee9c51919ceb418b = function() { return handleError(function (arg0, arg1, arg2) {\n getObject(arg0).overrideMimeType(getStringFromWasm0(arg1, arg2));\n }, arguments) };\n imports.wbg.__wbg_open_c9eb0cf2c9d95679 = function() { return handleError(function (arg0, arg1, arg2, arg3, arg4, arg5) {\n getObject(arg0).open(getStringFromWasm0(arg1, arg2), getStringFromWasm0(arg3, arg4), arg5 !== 0);\n }, arguments) };\n imports.wbg.__wbg_send_80d29985093c1ec5 = function() { return handleError(function (arg0) {\n getObject(arg0).send();\n }, arguments) };\n imports.wbg.__wbg_response_7c2e2759084f7279 = function() { return handleError(function (arg0) {\n const ret = getObject(arg0).response;\n return addHeapObject(ret);\n }, arguments) };\n imports.wbg.__wbg_status_d485fb5a478426fb = function() { return handleError(function (arg0) {\n const ret = getObject(arg0).status;\n return ret;\n }, arguments) };\n imports.wbg.__wbg_new_72fb9a18b5ae2624 = function() {\n const ret = new Object();\n return addHeapObject(ret);\n };\n imports.wbg.__wbindgen_string_new = function(arg0, arg1) {\n const ret = getStringFromWasm0(arg0, arg1);\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_set_1f9b04f170055d33 = function() { return handleError(function (arg0, arg1, arg2) {\n const ret = Reflect.set(getObject(arg0), getObject(arg1), getObject(arg2));\n return ret;\n }, arguments) };\n imports.wbg.__wbg_new_ab6fd82b10560829 = function() { return handleError(function () {\n const ret = new Headers();\n return addHeapObject(ret);\n }, arguments) };\n imports.wbg.__wbindgen_object_clone_ref = function(arg0) {\n const ret = getObject(arg0);\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_new_0d76b0581eca6298 = function() { return handleError(function () {\n const ret = new AbortController();\n return addHeapObject(ret);\n }, arguments) };\n imports.wbg.__wbg_signal_a61f78a3478fd9bc = function(arg0) {\n const ret = getObject(arg0).signal;\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_append_7bfcb4937d1d5e29 = function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {\n getObject(arg0).append(getStringFromWasm0(arg1, arg2), getStringFromWasm0(arg3, arg4));\n }, arguments) };\n imports.wbg.__wbg_instanceof_Response_849eb93e75734b6e = function(arg0) {\n let result;\n try {\n result = getObject(arg0) instanceof Response;\n } catch (_) {\n result = false;\n }\n const ret = result;\n return ret;\n };\n imports.wbg.__wbg_status_61a01141acd3cf74 = function(arg0) {\n const ret = getObject(arg0).status;\n return ret;\n };\n imports.wbg.__wbg_url_5f6dc4009ac5f99d = function(arg0, arg1) {\n const ret = getObject(arg1).url;\n const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len1 = WASM_VECTOR_LEN;\n getInt32Memory0()[arg0 / 4 + 1] = len1;\n getInt32Memory0()[arg0 / 4 + 0] = ptr1;\n };\n imports.wbg.__wbg_headers_9620bfada380764a = function(arg0) {\n const ret = getObject(arg0).headers;\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_iterator_2cee6dadfd956dfa = function() {\n const ret = Symbol.iterator;\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_get_e3c254076557e348 = function() { return handleError(function (arg0, arg1) {\n const ret = Reflect.get(getObject(arg0), getObject(arg1));\n return addHeapObject(ret);\n }, arguments) };\n imports.wbg.__wbindgen_is_function = function(arg0) {\n const ret = typeof(getObject(arg0)) === 'function';\n return ret;\n };\n imports.wbg.__wbg_call_27c0f87801dedf93 = function() { return handleError(function (arg0, arg1) {\n const ret = getObject(arg0).call(getObject(arg1));\n return addHeapObject(ret);\n }, arguments) };\n imports.wbg.__wbindgen_is_object = function(arg0) {\n const val = getObject(arg0);\n const ret = typeof(val) === 'object' && val !== null;\n return ret;\n };\n imports.wbg.__wbg_next_40fc327bfc8770e6 = function(arg0) {\n const ret = getObject(arg0).next;\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_next_196c84450b364254 = function() { return handleError(function (arg0) {\n const ret = getObject(arg0).next();\n return addHeapObject(ret);\n }, arguments) };\n imports.wbg.__wbg_done_298b57d23c0fc80c = function(arg0) {\n const ret = getObject(arg0).done;\n return ret;\n };\n imports.wbg.__wbg_value_d93c65011f51a456 = function(arg0) {\n const ret = getObject(arg0).value;\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_abort_2aa7521d5690750e = function(arg0) {\n getObject(arg0).abort();\n };\n imports.wbg.__wbg_stringify_8887fe74e1c50d81 = function() { return handleError(function (arg0) {\n const ret = JSON.stringify(getObject(arg0));\n return addHeapObject(ret);\n }, arguments) };\n imports.wbg.__wbindgen_string_get = function(arg0, arg1) {\n const obj = getObject(arg1);\n const ret = typeof(obj) === 'string' ? obj : undefined;\n var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n var len1 = WASM_VECTOR_LEN;\n getInt32Memory0()[arg0 / 4 + 1] = len1;\n getInt32Memory0()[arg0 / 4 + 0] = ptr1;\n };\n imports.wbg.__wbg_log_0159ca40cddf5b15 = function(arg0, arg1) {\n console.log(getStringFromWasm0(arg0, arg1));\n };\n imports.wbg.__wbindgen_bigint_from_u64 = function(arg0) {\n const ret = BigInt.asUintN(64, arg0);\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_call_b3ca7c6051f9bec1 = function() { return handleError(function (arg0, arg1, arg2) {\n const ret = getObject(arg0).call(getObject(arg1), getObject(arg2));\n return addHeapObject(ret);\n }, arguments) };\n imports.wbg.__wbg_transaction_new = function(arg0) {\n const ret = Transaction.__wrap(arg0);\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_keypair_new = function(arg0) {\n const ret = KeyPair.__wrap(arg0);\n return addHeapObject(ret);\n };\n imports.wbg.__wbindgen_module = function() {\n const ret = __wbg_init.__wbindgen_wasm_module;\n return addHeapObject(ret);\n };\n imports.wbg.__wbindgen_memory = function() {\n const ret = wasm.memory;\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_spawnWorker_f6acaddb2e29dc4a = function(arg0, arg1, arg2, arg3) {\n const ret = spawnWorker(getObject(arg0), getObject(arg1), getObject(arg2), arg3 >>> 0);\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_executionresponse_new = function(arg0) {\n const ret = ExecutionResponse.__wrap(arg0);\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_newwithlength_66ae46612e7f0234 = function(arg0) {\n const ret = new Array(arg0 >>> 0);\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_set_d4638f722068f043 = function(arg0, arg1, arg2) {\n getObject(arg0)[arg1 >>> 0] = takeObject(arg2);\n };\n imports.wbg.__wbindgen_cb_drop = function(arg0) {\n const obj = takeObject(arg0).original;\n if (obj.cnt-- == 1) {\n obj.a = 0;\n return true;\n }\n const ret = false;\n return ret;\n };\n imports.wbg.__wbg_new_16b304a2cfa7ff4a = function() {\n const ret = new Array();\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_push_a5b05aedc7234f9f = function(arg0, arg1) {\n const ret = getObject(arg0).push(getObject(arg1));\n return ret;\n };\n imports.wbg.__wbg_arrayBuffer_29931d52c7206b02 = function() { return handleError(function (arg0) {\n const ret = getObject(arg0).arrayBuffer();\n return addHeapObject(ret);\n }, arguments) };\n imports.wbg.__wbg_new_63b92bc8671ed464 = function(arg0) {\n const ret = new Uint8Array(getObject(arg0));\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_length_c20a40f15020d68a = function(arg0) {\n const ret = getObject(arg0).length;\n return ret;\n };\n imports.wbg.__wbg_new_81740750da40724f = function(arg0, arg1) {\n try {\n var state0 = {a: arg0, b: arg1};\n var cb0 = (arg0, arg1) => {\n const a = state0.a;\n state0.a = 0;\n try {\n return __wbg_adapter_281(a, state0.b, arg0, arg1);\n } finally {\n state0.a = a;\n }\n };\n const ret = new Promise(cb0);\n return addHeapObject(ret);\n } finally {\n state0.a = state0.b = 0;\n }\n };\n imports.wbg.__wbindgen_number_new = function(arg0) {\n const ret = arg0;\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_new_abda76e883ba8a5f = function() {\n const ret = new Error();\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_stack_658279fe44541cf6 = function(arg0, arg1) {\n const ret = getObject(arg1).stack;\n const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len1 = WASM_VECTOR_LEN;\n getInt32Memory0()[arg0 / 4 + 1] = len1;\n getInt32Memory0()[arg0 / 4 + 0] = ptr1;\n };\n imports.wbg.__wbg_error_f851667af71bcfc6 = function(arg0, arg1) {\n let deferred0_0;\n let deferred0_1;\n try {\n deferred0_0 = arg0;\n deferred0_1 = arg1;\n console.error(getStringFromWasm0(arg0, arg1));\n } finally {\n wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);\n }\n };\n imports.wbg.__wbg_buffer_12d079cc21e14bdb = function(arg0) {\n const ret = getObject(arg0).buffer;\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_newwithbyteoffsetandlength_aa4a17c33a06e5cb = function(arg0, arg1, arg2) {\n const ret = new Uint8Array(getObject(arg0), arg1 >>> 0, arg2 >>> 0);\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_randomFillSync_5c9c955aa56b6049 = function() { return handleError(function (arg0, arg1) {\n getObject(arg0).randomFillSync(takeObject(arg1));\n }, arguments) };\n imports.wbg.__wbg_subarray_a1f73cd4b5b42fe1 = function(arg0, arg1, arg2) {\n const ret = getObject(arg0).subarray(arg1 >>> 0, arg2 >>> 0);\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_getRandomValues_3aa56aa6edec874c = function() { return handleError(function (arg0, arg1) {\n getObject(arg0).getRandomValues(getObject(arg1));\n }, arguments) };\n imports.wbg.__wbg_set_a47bac70306a19a7 = function(arg0, arg1, arg2) {\n getObject(arg0).set(getObject(arg1), arg2 >>> 0);\n };\n imports.wbg.__wbg_crypto_1d1f22824a6a080c = function(arg0) {\n const ret = getObject(arg0).crypto;\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_process_4a72847cc503995b = function(arg0) {\n const ret = getObject(arg0).process;\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_versions_f686565e586dd935 = function(arg0) {\n const ret = getObject(arg0).versions;\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_node_104a2ff8d6ea03a2 = function(arg0) {\n const ret = getObject(arg0).node;\n return addHeapObject(ret);\n };\n imports.wbg.__wbindgen_is_string = function(arg0) {\n const ret = typeof(getObject(arg0)) === 'string';\n return ret;\n };\n imports.wbg.__wbg_require_cca90b1a94a0255b = function() { return handleError(function () {\n const ret = module.require;\n return addHeapObject(ret);\n }, arguments) };\n imports.wbg.__wbg_msCrypto_eb05e62b530a1508 = function(arg0) {\n const ret = getObject(arg0).msCrypto;\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_newwithlength_e9b4878cebadb3d3 = function(arg0) {\n const ret = new Uint8Array(arg0 >>> 0);\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_length_cd7af8117672b8b8 = function(arg0) {\n const ret = getObject(arg0).length;\n return ret;\n };\n imports.wbg.__wbg_get_bd8e338fbd5f5cc8 = function(arg0, arg1) {\n const ret = getObject(arg0)[arg1 >>> 0];\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_self_ce0dbfc45cf2f5be = function() { return handleError(function () {\n const ret = self.self;\n return addHeapObject(ret);\n }, arguments) };\n imports.wbg.__wbg_window_c6fb939a7f436783 = function() { return handleError(function () {\n const ret = window.window;\n return addHeapObject(ret);\n }, arguments) };\n imports.wbg.__wbg_globalThis_d1e6af4856ba331b = function() { return handleError(function () {\n const ret = globalThis.globalThis;\n return addHeapObject(ret);\n }, arguments) };\n imports.wbg.__wbg_global_207b558942527489 = function() { return handleError(function () {\n const ret = global.global;\n return addHeapObject(ret);\n }, arguments) };\n imports.wbg.__wbindgen_is_undefined = function(arg0) {\n const ret = getObject(arg0) === undefined;\n return ret;\n };\n imports.wbg.__wbg_newnoargs_e258087cd0daa0ea = function(arg0, arg1) {\n const ret = new Function(getStringFromWasm0(arg0, arg1));\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_has_0af94d20077affa2 = function() { return handleError(function (arg0, arg1) {\n const ret = Reflect.has(getObject(arg0), getObject(arg1));\n return ret;\n }, arguments) };\n imports.wbg.__wbg_fetch_bc7c8e27076a5c84 = function(arg0) {\n const ret = fetch(getObject(arg0));\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_fetch_921fad6ef9e883dd = function(arg0, arg1) {\n const ret = getObject(arg0).fetch(getObject(arg1));\n return addHeapObject(ret);\n };\n imports.wbg.__wbindgen_debug_string = function(arg0, arg1) {\n const ret = debugString(getObject(arg1));\n const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len1 = WASM_VECTOR_LEN;\n getInt32Memory0()[arg0 / 4 + 1] = len1;\n getInt32Memory0()[arg0 / 4 + 0] = ptr1;\n };\n imports.wbg.__wbindgen_throw = function(arg0, arg1) {\n throw new Error(getStringFromWasm0(arg0, arg1));\n };\n imports.wbg.__wbindgen_rethrow = function(arg0) {\n throw takeObject(arg0);\n };\n imports.wbg.__wbg_then_a73caa9a87991566 = function(arg0, arg1, arg2) {\n const ret = getObject(arg0).then(getObject(arg1), getObject(arg2));\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_then_0c86a60e8fcfe9f6 = function(arg0, arg1) {\n const ret = getObject(arg0).then(getObject(arg1));\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_queueMicrotask_481971b0d87f3dd4 = function(arg0) {\n queueMicrotask(getObject(arg0));\n };\n imports.wbg.__wbg_queueMicrotask_3cbae2ec6b6cd3d6 = function(arg0) {\n const ret = getObject(arg0).queueMicrotask;\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_resolve_b0083a7967828ec8 = function(arg0) {\n const ret = Promise.resolve(getObject(arg0));\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_waitAsync_5d743fc9058ba01a = function() {\n const ret = Atomics.waitAsync;\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_new_8cccba86b0f574cb = function(arg0) {\n const ret = new Int32Array(getObject(arg0));\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_waitAsync_46d5c36955b71a79 = function(arg0, arg1, arg2) {\n const ret = Atomics.waitAsync(getObject(arg0), arg1, arg2);\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_async_19c0400d97cc72fe = function(arg0) {\n const ret = getObject(arg0).async;\n return ret;\n };\n imports.wbg.__wbg_value_571d60108110e917 = function(arg0) {\n const ret = getObject(arg0).value;\n return addHeapObject(ret);\n };\n imports.wbg.__wbindgen_link_fc1eedd35dc7e0a6 = function(arg0) {\n const ret = \"data:application/javascript,\" + encodeURIComponent(`onmessage = function (ev) {\n let [ia, index, value] = ev.data;\n ia = new Int32Array(ia.buffer);\n let result = Atomics.wait(ia, index, value);\n postMessage(result);\n };\n `);\n const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len1 = WASM_VECTOR_LEN;\n getInt32Memory0()[arg0 / 4 + 1] = len1;\n getInt32Memory0()[arg0 / 4 + 0] = ptr1;\n };\n imports.wbg.__wbg_new_d1187ae36d662ef9 = function() { return handleError(function (arg0, arg1) {\n const ret = new Worker(getStringFromWasm0(arg0, arg1));\n return addHeapObject(ret);\n }, arguments) };\n imports.wbg.__wbg_setonmessage_503809e5bb51bd33 = function(arg0, arg1) {\n getObject(arg0).onmessage = getObject(arg1);\n };\n imports.wbg.__wbg_of_6a70eed8d41f469c = function(arg0, arg1, arg2) {\n const ret = Array.of(getObject(arg0), getObject(arg1), getObject(arg2));\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_postMessage_7380d10e8b8269df = function() { return handleError(function (arg0, arg1) {\n getObject(arg0).postMessage(getObject(arg1));\n }, arguments) };\n imports.wbg.__wbg_data_3ce7c145ca4fbcdc = function(arg0) {\n const ret = getObject(arg0).data;\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_newwithstrandinit_3fd6fba4083ff2d0 = function() { return handleError(function (arg0, arg1, arg2) {\n const ret = new Request(getStringFromWasm0(arg0, arg1), getObject(arg2));\n return addHeapObject(ret);\n }, arguments) };\n imports.wbg.__wbg_responseText_c67ed2d48db10769 = function() { return handleError(function (arg0, arg1) {\n const ret = getObject(arg1).responseText;\n var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n var len1 = WASM_VECTOR_LEN;\n getInt32Memory0()[arg0 / 4 + 1] = len1;\n getInt32Memory0()[arg0 / 4 + 0] = ptr1;\n }, arguments) };\n imports.wbg.__wbindgen_closure_wrapper5837 = function(arg0, arg1, arg2) {\n const ret = makeMutClosure(arg0, arg1, 538, __wbg_adapter_34);\n return addHeapObject(ret);\n };\n imports.wbg.__wbindgen_closure_wrapper5862 = function(arg0, arg1, arg2) {\n const ret = makeMutClosure(arg0, arg1, 538, __wbg_adapter_34);\n return addHeapObject(ret);\n };\n\n return imports;\n}\n\nfunction __wbg_init_memory(imports, maybe_memory) {\n imports.wbg.memory = maybe_memory || new WebAssembly.Memory({initial:25,maximum:65536,shared:true});\n}\n\nfunction __wbg_finalize_init(instance, module) {\n wasm = instance.exports;\n __wbg_init.__wbindgen_wasm_module = module;\n cachedBigInt64Memory0 = null;\n cachedInt32Memory0 = null;\n cachedUint8Memory0 = null;\n\n wasm.__wbindgen_start();\n return wasm;\n}\n\nfunction initSync(module, maybe_memory) {\n if (wasm !== undefined) return wasm;\n\n const imports = __wbg_get_imports();\n\n __wbg_init_memory(imports, maybe_memory);\n\n if (!(module instanceof WebAssembly.Module)) {\n module = new WebAssembly.Module(module);\n }\n\n const instance = new WebAssembly.Instance(module, imports);\n\n return __wbg_finalize_init(instance, module);\n}\n\nasync function __wbg_init(input, maybe_memory) {\n if (wasm !== undefined) return wasm;\n\n\n const imports = __wbg_get_imports();\n\n if (typeof input === 'string' || (typeof Request === 'function' && input instanceof Request) || (typeof URL === 'function' && input instanceof URL)) {\n input = fetch(input);\n }\n\n __wbg_init_memory(imports, maybe_memory);\n\n const { instance, module } = await __wbg_load(await input, imports);\n\n return __wbg_finalize_init(instance, module);\n}\n\nvar exports = /*#__PURE__*/Object.freeze({\n __proto__: null,\n Address: Address,\n Execution: Execution,\n ExecutionResponse: ExecutionResponse,\n Field: Field,\n KeyPair: KeyPair,\n Metadata: Metadata,\n OfflineQuery: OfflineQuery,\n PrivateKey: PrivateKey,\n PrivateKeyCiphertext: PrivateKeyCiphertext,\n Program: Program,\n ProgramManager: ProgramManager,\n ProvingKey: ProvingKey,\n RecordCiphertext: RecordCiphertext,\n RecordPlaintext: RecordPlaintext,\n Signature: Signature,\n Transaction: Transaction,\n VerifyingKey: VerifyingKey,\n ViewKey: ViewKey,\n default: __wbg_init,\n initSync: initSync,\n initThreadPool: initThreadPool,\n runRayonThread: runRayonThread,\n verifyFunctionExecution: verifyFunctionExecution\n});\n\nconst wasm_path = \"assets/aleo_wasm.wasm\";\n\n \n var Cargo = async (opt = {}) => {\n let {importHook, serverPath, initializeHook} = opt;\n\n let final_path = wasm_path;\n\n if (serverPath != null) {\n final_path = serverPath + /[^\\/\\\\]*$/.exec(final_path)[0];\n }\n\n if (importHook != null) {\n final_path = importHook(final_path);\n }\n\n if (initializeHook != null) {\n await initializeHook(__wbg_init, final_path);\n\n } else {\n await __wbg_init(final_path);\n }\n\n return exports;\n };\n\nexport { Cargo as default };\n//# sourceMappingURL=wasm.js.map\n","import wasm from \"../dist/wasm.js\";\n\nconst {\n initThreadPool: wasmInitThreadPool,\n Address,\n Execution,\n ExecutionResponse,\n Field,\n Metadata,\n OfflineQuery,\n Private,\n PrivateKey,\n PrivateKeyCiphertext,\n Program,\n ProvingKey,\n RecordCiphertext,\n RecordPlaintext,\n ProgramManager,\n Signature,\n Transaction,\n ViewKey,\n VerifyingKey,\n verifyFunctionExecution,\n} = await wasm({\n importHook: () => {\n return new URL(\"assets/aleo_wasm.wasm\", import.meta.url);\n },\n});\n\nasync function initThreadPool(threads) {\n if (threads == null) {\n threads = navigator.hardwareConcurrency;\n }\n\n console.info(`Spawning ${threads} threads`);\n\n await wasmInitThreadPool(new URL(\"worker.js\", import.meta.url), threads);\n}\n\nexport {\n initThreadPool,\n Address,\n Execution,\n ExecutionResponse,\n Field,\n Metadata,\n OfflineQuery,\n PrivateKey,\n PrivateKeyCiphertext,\n Program,\n ProvingKey,\n RecordCiphertext,\n RecordPlaintext,\n ProgramManager,\n Signature,\n Transaction,\n ViewKey,\n VerifyingKey,\n verifyFunctionExecution,\n};\n"],"names":["spawnWorker","url","module","memory","address","Promise","resolve","worker","Worker","type","addEventListener","event","setTimeout","unref","capture","once","postMessage","wasm","heap","Array","fill","undefined","getObject","idx","push","heap_next","length","dropObject","takeObject","ret","cachedTextDecoder","TextDecoder","ignoreBOM","fatal","decode","Error","cachedUint8Memory0","getUint8Memory0","buffer","Uint8Array","getStringFromWasm0","ptr","len","slice","addHeapObject","obj","WASM_VECTOR_LEN","cachedTextEncoder","TextEncoder","encode","encodeString","arg","view","buf","set","read","written","passStringToWasm0","malloc","realloc","subarray","mem","offset","code","charCodeAt","isLikeNone","x","cachedInt32Memory0","getInt32Memory0","Int32Array","debugString","val","description","name","isArray","debug","i","builtInMatches","exec","toString","call","className","JSON","stringify","_","message","stack","CLOSURE_DTORS","FinalizationRegistry","register","unregister","state","__wbindgen_export_3","get","dtor","a","b","makeMutClosure","arg0","arg1","f","cnt","real","args","original","__wbg_adapter_34","arg2","_dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h467700a9696faab3","_assertClass","instance","klass","passArray8ToWasm0","verifyFunctionExecution$1","execution","verifying_key","program","function_id","retptr","__wbindgen_add_to_stack_pointer","Execution$1","VerifyingKey$1","Program$1","ptr0","__wbindgen_malloc","__wbindgen_realloc","len0","verifyFunctionExecution","__wbg_ptr","r0","r1","cachedBigInt64Memory0","getBigInt64Memory0","BigInt64Array","getArrayU8FromWasm0","runRayonThread","receiver","initThreadPool$1","num_threads","initThreadPool","handleError","apply","this","e","__wbindgen_exn_store","__wbg_adapter_281","arg3","wasm_bindgen__convert__closures__invoke2_mut__h381bef3cd886b4c7","AddressFinalization","__wbg_address_free","Address","__wrap","Object","create","prototype","__destroy_into_raw","free","from_private_key","private_key","PrivateKey$1","address_from_private_key","from_view_key","view_key","ViewKey$1","address_from_view_key","from_string","address_from_string","to_string","deferred1_0","deferred1_1","address_to_string","__wbindgen_free","verify","signature","Signature$1","address_verify","ExecutionFinalization","__wbg_execution_free","Execution","execution_toString","fromString","execution_fromString","ExecutionResponseFinalization","__wbg_executionresponse_free","ExecutionResponse","getOutputs","executionresponse_getOutputs","getExecution","executionresponse_getExecution","getKeys","executionresponse_getKeys","KeyPair","getProvingKey","executionresponse_getProvingKey","ProvingKey$1","getVerifyingKey","executionresponse_getVerifyingKey","getFunctionId","executionresponse_getFunctionId","getProgram","executionresponse_getProgram","FieldFinalization","__wbg_field_free","Field","field_toString","field","field_fromString","KeyPairFinalization","__wbg_keypair_free","constructor","proving_key","ptr1","keypair_new","provingKey","keypair_provingKey","verifyingKey","keypair_verifyingKey","MetadataFinalization","__wbg_metadata_free","Metadata","__wbg_get_metadata_name","__wbg_set_metadata_name","locator","__wbg_get_metadata_locator","__wbg_set_metadata_locator","prover","__wbg_get_metadata_prover","__wbg_set_metadata_prover","verifier","__wbg_get_metadata_verifier","__wbg_set_metadata_verifier","__wbg_get_metadata_verifyingKey","__wbg_set_metadata_verifyingKey","baseUrl","metadata_baseUrl","bond_public","metadata_bond_public","bond_validator","metadata_bond_validator","claim_unbond_public","metadata_claim_unbond_public","fee_private","metadata_fee_private","fee_public","metadata_fee_public","inclusion","metadata_inclusion","join","metadata_join","set_validator_state","metadata_set_validator_state","split","metadata_split","transfer_private","metadata_transfer_private","transfer_private_to_public","metadata_transfer_private_to_public","transfer_public","metadata_transfer_public","transfer_public_as_signer","metadata_transfer_public_as_signer","transfer_public_to_private","metadata_transfer_public_to_private","unbond_public","metadata_unbond_public","OfflineQueryFinalization","__wbg_offlinequery_free","OfflineQuery","state_root","offlinequery_new","addStatePath","commitment","state_path","len1","offlinequery_addStatePath","offlinequery_toString","s","offlinequery_fromString","PrivateKeyFinalization","__wbg_privatekey_free","PrivateKey","privatekey_new","from_seed_unchecked","seed","privatekey_from_seed_unchecked","privatekey_from_string","privatekey_to_string","to_view_key","privatekey_to_view_key","to_address","privatekey_to_address","Address$1","sign","privatekey_sign","newEncrypted","secret","privatekey_newEncrypted","PrivateKeyCiphertext$1","toCiphertext","privatekey_toCiphertext","fromPrivateKeyCiphertext","ciphertext","privatekey_fromPrivateKeyCiphertext","PrivateKeyCiphertextFinalization","__wbg_privatekeyciphertext_free","PrivateKeyCiphertext","encryptPrivateKey","decryptToPrivateKey","privatekeyciphertext_decryptToPrivateKey","privatekeyciphertext_toString","privatekeyciphertext_fromString","ProgramFinalization","__wbg_program_free","Program","program_fromString","program_toString","hasFunction","function_name","program_hasFunction","getFunctions","program_getFunctions","getFunctionInputs","program_getFunctionInputs","getMappings","program_getMappings","getRecordMembers","record_name","program_getRecordMembers","getStructMembers","struct_name","program_getStructMembers","getCreditsProgram","program_getCreditsProgram","id","program_id","program_address","isEqual","other","program_isEqual","getImports","program_getImports","ProgramManagerFinalization","__wbg_programmanager_free","buildDeploymentTransaction","fee_credits","fee_record","imports","fee_proving_key","fee_verifying_key","offline_query","RecordPlaintext$1","ptr2","len2","ptr3","ptr4","ptr5","OfflineQuery$1","programmanager_buildDeploymentTransaction","estimateDeploymentFee","programmanager_estimateDeploymentFee","estimateProgramNameCost","programmanager_estimateProgramNameCost","r2","BigInt","asUintN","executeFunctionOffline","_function","inputs","prove_execution","cache","len4","programmanager_executeFunctionOffline","buildExecutionTransaction","len3","ptr6","ptr7","ptr8","programmanager_buildExecutionTransaction","estimateExecutionFee","programmanager_estimateExecutionFee","estimateFinalizeFee","programmanager_estimateFinalizeFee","buildJoinTransaction","record_1","record_2","join_proving_key","join_verifying_key","programmanager_buildJoinTransaction","buildSplitTransaction","split_amount","amount_record","split_proving_key","split_verifying_key","programmanager_buildSplitTransaction","buildTransferTransaction","amount_credits","recipient","transfer_type","transfer_proving_key","transfer_verifying_key","ptr9","programmanager_buildTransferTransaction","synthesizeKeyPair","programmanager_synthesizeKeyPair","ProvingKeyFinalization","__wbg_provingkey_free","ProvingKey","isBondPublicProver","provingkey_isBondPublicProver","isBondValidatorProver","provingkey_isBondValidatorProver","isClaimUnbondPublicProver","provingkey_isClaimUnbondPublicProver","isFeePrivateProver","provingkey_isFeePrivateProver","isFeePublicProver","provingkey_isFeePublicProver","isInclusionProver","provingkey_isInclusionProver","isJoinProver","provingkey_isJoinProver","isSetValidatorStateProver","provingkey_isSetValidatorStateProver","isSplitProver","provingkey_isSplitProver","isTransferPrivateProver","provingkey_isTransferPrivateProver","isTransferPrivateToPublicProver","provingkey_isTransferPrivateToPublicProver","isTransferPublicProver","provingkey_isTransferPublicProver","isTransferPublicAsSignerProver","provingkey_isTransferPublicAsSignerProver","isTransferPublicToPrivateProver","provingkey_isTransferPublicToPrivateProver","isUnbondPublicProver","provingkey_isUnbondPublicProver","checksum","provingkey_checksum","copy","provingkey_copy","fromBytes","bytes","provingkey_fromBytes","string","provingkey_fromString","toBytes","provingkey_toBytes","v1","provingkey_toString","RecordCiphertextFinalization","__wbg_recordciphertext_free","RecordCiphertext","record","recordciphertext_fromString","recordciphertext_toString","decrypt","recordciphertext_decrypt","isOwner","recordciphertext_isOwner","RecordPlaintextFinalization","__wbg_recordplaintext_free","RecordPlaintext","recordplaintext_commitment","Field$1","recordplaintext_fromString","recordplaintext_toString","microcredits","recordplaintext_microcredits","nonce","recordplaintext_nonce","serialNumberString","deferred4_0","deferred4_1","recordplaintext_serialNumberString","r3","SignatureFinalization","__wbg_signature_free","Signature","signature_verify","signature_from_string","signature_to_string","TransactionFinalization","__wbg_transaction_free","Transaction","transaction","transaction_fromString","transaction_toString","transactionId","transaction_transactionId","transactionType","transaction_transactionType","VerifyingKeyFinalization","__wbg_verifyingkey_free","VerifyingKey","bondPublicVerifier","verifyingkey_bondPublicVerifier","bondValidatorVerifier","verifyingkey_bondValidatorVerifier","claimUnbondPublicVerifier","verifyingkey_claimUnbondPublicVerifier","feePrivateVerifier","verifyingkey_feePrivateVerifier","feePublicVerifier","verifyingkey_feePublicVerifier","inclusionVerifier","verifyingkey_inclusionVerifier","joinVerifier","verifyingkey_joinVerifier","setValidatorStateVerifier","verifyingkey_setValidatorStateVerifier","splitVerifier","verifyingkey_splitVerifier","transferPrivateVerifier","verifyingkey_transferPrivateVerifier","transferPrivateToPublicVerifier","verifyingkey_transferPrivateToPublicVerifier","transferPublicVerifier","verifyingkey_transferPublicVerifier","transferPublicAsSignerVerifier","verifyingkey_transferPublicAsSignerVerifier","transferPublicToPrivateVerifier","verifyingkey_transferPublicToPrivateVerifier","unbondPublicVerifier","verifyingkey_unbondPublicVerifier","isBondPublicVerifier","verifyingkey_isBondPublicVerifier","isBondValidatorVerifier","verifyingkey_isBondValidatorVerifier","isClaimUnbondPublicVerifier","verifyingkey_isClaimUnbondPublicVerifier","isFeePrivateVerifier","verifyingkey_isFeePrivateVerifier","isFeePublicVerifier","verifyingkey_isFeePublicVerifier","isInclusionVerifier","verifyingkey_isInclusionVerifier","isJoinVerifier","verifyingkey_isJoinVerifier","isSetValidatorStateVerifier","verifyingkey_isSetValidatorStateVerifier","isSplitVerifier","verifyingkey_isSplitVerifier","isTransferPrivateVerifier","verifyingkey_isTransferPrivateVerifier","isTransferPrivateToPublicVerifier","verifyingkey_isTransferPrivateToPublicVerifier","isTransferPublicVerifier","verifyingkey_isTransferPublicVerifier","isTransferPublicAsSignerVerifier","verifyingkey_isTransferPublicAsSignerVerifier","isTransferPublicToPrivateVerifier","verifyingkey_isTransferPublicToPrivateVerifier","isUnbondPublicVerifier","verifyingkey_isUnbondPublicVerifier","verifyingkey_checksum","verifyingkey_copy","verifyingkey_fromBytes","verifyingkey_fromString","verifyingkey_toBytes","verifyingkey_toString","ViewKeyFinalization","__wbg_viewkey_free","ViewKey","viewkey_from_string","viewkey_to_string","deferred3_0","deferred3_1","viewkey_decrypt","async","__wbg_load","Response","WebAssembly","instantiateStreaming","headers","console","warn","arrayBuffer","instantiate","Instance","__wbg_get_imports","wbg","__wbindgen_object_drop_ref","__wbg_new_71801a555ad9f2aa","XMLHttpRequest","arguments","__wbg_overrideMimeType_ee9c51919ceb418b","overrideMimeType","__wbg_open_c9eb0cf2c9d95679","arg4","arg5","open","__wbg_send_80d29985093c1ec5","send","__wbg_response_7c2e2759084f7279","response","__wbg_status_d485fb5a478426fb","status","__wbg_new_72fb9a18b5ae2624","__wbindgen_string_new","__wbg_set_1f9b04f170055d33","Reflect","__wbg_new_ab6fd82b10560829","Headers","__wbindgen_object_clone_ref","__wbg_new_0d76b0581eca6298","AbortController","__wbg_signal_a61f78a3478fd9bc","signal","__wbg_append_7bfcb4937d1d5e29","append","__wbg_instanceof_Response_849eb93e75734b6e","result","__wbg_status_61a01141acd3cf74","__wbg_url_5f6dc4009ac5f99d","__wbg_headers_9620bfada380764a","__wbg_iterator_2cee6dadfd956dfa","Symbol","iterator","__wbg_get_e3c254076557e348","__wbindgen_is_function","__wbg_call_27c0f87801dedf93","__wbindgen_is_object","__wbg_next_40fc327bfc8770e6","next","__wbg_next_196c84450b364254","__wbg_done_298b57d23c0fc80c","done","__wbg_value_d93c65011f51a456","value","__wbg_abort_2aa7521d5690750e","abort","__wbg_stringify_8887fe74e1c50d81","__wbindgen_string_get","__wbg_log_0159ca40cddf5b15","log","__wbindgen_bigint_from_u64","__wbg_call_b3ca7c6051f9bec1","__wbg_transaction_new","Transaction$1","__wbg_keypair_new","__wbindgen_module","__wbg_init","__wbindgen_wasm_module","__wbindgen_memory","__wbg_spawnWorker_f6acaddb2e29dc4a","__wbg_executionresponse_new","ExecutionResponse$1","__wbg_newwithlength_66ae46612e7f0234","__wbg_set_d4638f722068f043","__wbindgen_cb_drop","__wbg_new_16b304a2cfa7ff4a","__wbg_push_a5b05aedc7234f9f","__wbg_arrayBuffer_29931d52c7206b02","__wbg_new_63b92bc8671ed464","__wbg_length_c20a40f15020d68a","__wbg_new_81740750da40724f","state0","cb0","__wbindgen_number_new","__wbg_new_abda76e883ba8a5f","__wbg_stack_658279fe44541cf6","__wbg_error_f851667af71bcfc6","deferred0_0","deferred0_1","error","__wbg_buffer_12d079cc21e14bdb","__wbg_newwithbyteoffsetandlength_aa4a17c33a06e5cb","__wbg_randomFillSync_5c9c955aa56b6049","randomFillSync","__wbg_subarray_a1f73cd4b5b42fe1","__wbg_getRandomValues_3aa56aa6edec874c","getRandomValues","__wbg_set_a47bac70306a19a7","__wbg_crypto_1d1f22824a6a080c","crypto","__wbg_process_4a72847cc503995b","process","__wbg_versions_f686565e586dd935","versions","__wbg_node_104a2ff8d6ea03a2","node","__wbindgen_is_string","__wbg_require_cca90b1a94a0255b","require","__wbg_msCrypto_eb05e62b530a1508","msCrypto","__wbg_newwithlength_e9b4878cebadb3d3","__wbg_length_cd7af8117672b8b8","__wbg_get_bd8e338fbd5f5cc8","__wbg_self_ce0dbfc45cf2f5be","self","__wbg_window_c6fb939a7f436783","window","__wbg_globalThis_d1e6af4856ba331b","globalThis","__wbg_global_207b558942527489","global","__wbindgen_is_undefined","__wbg_newnoargs_e258087cd0daa0ea","Function","__wbg_has_0af94d20077affa2","has","__wbg_fetch_bc7c8e27076a5c84","fetch","__wbg_fetch_921fad6ef9e883dd","__wbindgen_debug_string","__wbindgen_throw","__wbindgen_rethrow","__wbg_then_a73caa9a87991566","then","__wbg_then_0c86a60e8fcfe9f6","__wbg_queueMicrotask_481971b0d87f3dd4","queueMicrotask","__wbg_queueMicrotask_3cbae2ec6b6cd3d6","__wbg_resolve_b0083a7967828ec8","__wbg_waitAsync_5d743fc9058ba01a","Atomics","waitAsync","__wbg_new_8cccba86b0f574cb","__wbg_waitAsync_46d5c36955b71a79","__wbg_async_19c0400d97cc72fe","__wbg_value_571d60108110e917","__wbindgen_link_fc1eedd35dc7e0a6","encodeURIComponent","__wbg_new_d1187ae36d662ef9","__wbg_setonmessage_503809e5bb51bd33","onmessage","__wbg_of_6a70eed8d41f469c","of","__wbg_postMessage_7380d10e8b8269df","__wbg_data_3ce7c145ca4fbcdc","data","__wbg_newwithstrandinit_3fd6fba4083ff2d0","Request","__wbg_responseText_c67ed2d48db10769","responseText","__wbindgen_closure_wrapper5837","__wbindgen_closure_wrapper5862","__wbg_init_memory","maybe_memory","Memory","initial","maximum","shared","__wbg_finalize_init","exports","__wbindgen_start","initSync","Module","input","URL","freeze","__proto__","Metadata$1","ProgramManager","ProgramManager$1","RecordCiphertext$1","default","wasm_path","wasmInitThreadPool","Private","opt","importHook","serverPath","initializeHook","final_path","Cargo","threads","navigator","hardwareConcurrency","info"],"sourceRoot":""} \ No newline at end of file +{"version":3,"file":"933.bundle.js","mappings":"wOAAA,SAASA,EAAYC,EAAKC,EAAQC,EAAQC,GAClC,OAAO,IAAIC,SAASC,IAChB,MAAMC,EAAS,IAAIC,OAAOP,EAAK,CAC3BQ,KAAM,WAGVF,EAAOG,iBAAiB,WAAYC,IAGhCC,YAAW,KACPN,EAAQC,GAIJA,EAAOM,OACPN,EAAOM,OAC/B,GACmB,EAAE,GACN,CACCC,SAAS,EACTC,MAAM,IAGVR,EAAOS,YAAY,CACfd,SACAC,SACAC,WACF,GAEd,CAEA,IAAIa,E,qHAEJ,MAAMC,EAAO,IAAIC,MAAM,KAAKC,UAAKC,GAIjC,SAASC,EAAUC,GAAO,OAAOL,EAAKK,EAAK,CAF3CL,EAAKM,UAAKH,EAAW,MAAM,GAAM,GAIjC,IAAII,EAAYP,EAAKQ,OAErB,SAASC,EAAWJ,GACZA,EAAM,MACVL,EAAKK,GAAOE,EACZA,EAAYF,EAChB,CAEA,SAASK,EAAWL,GAChB,MAAMM,EAAMP,EAAUC,GAEtB,OADAI,EAAWJ,GACJM,CACX,CAEA,MAAMC,EAA4C,oBAAhBC,YAA8B,IAAIA,YAAY,QAAS,CAAEC,WAAW,EAAMC,OAAO,IA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AWG,IAGN,MAAlBD,QACMA,EAAevH,EAAYwH,SAG3BxH,EAAWwH,GAGdpB,CAAO,EC97IpBqB,CAAK,CACXJ,WAAYA,IACD,IAAIZ,IAAI,eAIvBtL,eAAe9a,EAAeqnB,GACX,MAAXA,IACAA,EAAUC,UAAUC,qBAGxBnM,QAAQoM,KAAM,YAAWH,mBAEnBR,GAAmB,IAAIT,IAAI,aAA+BiB,EACpE,C","sources":["webpack://aleo-website/wasm.js","webpack://aleo-website/../js/index.js"],"sourcesContent":["function spawnWorker(url, module, memory, address) {\n return new Promise((resolve) => {\n const worker = new Worker(url, {\n type: \"module\",\n });\n\n worker.addEventListener(\"message\", (event) => {\n // This is needed in Node to wait one extra tick, so that way\n // the Worker can fully initialize before we return.\n setTimeout(() => {\n resolve(worker);\n\n // When running in Node, this allows the process to exit\n // even though the Worker is still running.\n if (worker.unref) {\n worker.unref();\n }\n }, 0);\n }, {\n capture: true,\n once: true,\n });\n\n worker.postMessage({\n module,\n memory,\n address,\n });\n });\n }\n\nlet wasm;\n\nconst heap = new Array(128).fill(undefined);\n\nheap.push(undefined, null, true, false);\n\nfunction getObject(idx) { return heap[idx]; }\n\nlet heap_next = heap.length;\n\nfunction dropObject(idx) {\n if (idx < 132) return;\n heap[idx] = heap_next;\n heap_next = idx;\n}\n\nfunction takeObject(idx) {\n const ret = getObject(idx);\n dropObject(idx);\n return ret;\n}\n\nconst cachedTextDecoder = (typeof TextDecoder !== 'undefined' ? new TextDecoder('utf-8', { ignoreBOM: true, fatal: true }) : { decode: () => { throw Error('TextDecoder not available') } } );\n\nif (typeof TextDecoder !== 'undefined') { cachedTextDecoder.decode(); }\nlet cachedUint8Memory0 = null;\n\nfunction getUint8Memory0() {\n if (cachedUint8Memory0 === null || cachedUint8Memory0.buffer !== wasm.memory.buffer) {\n cachedUint8Memory0 = new Uint8Array(wasm.memory.buffer);\n }\n return cachedUint8Memory0;\n}\n\nfunction getStringFromWasm0(ptr, len) {\n ptr = ptr >>> 0;\n return cachedTextDecoder.decode(getUint8Memory0().slice(ptr, ptr + len));\n}\n\nfunction addHeapObject(obj) {\n if (heap_next === heap.length) heap.push(heap.length + 1);\n const idx = heap_next;\n heap_next = heap[idx];\n\n heap[idx] = obj;\n return idx;\n}\n\nlet WASM_VECTOR_LEN = 0;\n\nconst cachedTextEncoder = (typeof TextEncoder !== 'undefined' ? new TextEncoder('utf-8') : { encode: () => { throw Error('TextEncoder not available') } } );\n\nconst encodeString = function (arg, view) {\n const buf = cachedTextEncoder.encode(arg);\n view.set(buf);\n return {\n read: arg.length,\n written: buf.length\n };\n};\n\nfunction passStringToWasm0(arg, malloc, realloc) {\n\n if (realloc === undefined) {\n const buf = cachedTextEncoder.encode(arg);\n const ptr = malloc(buf.length, 1) >>> 0;\n getUint8Memory0().subarray(ptr, ptr + buf.length).set(buf);\n WASM_VECTOR_LEN = buf.length;\n return ptr;\n }\n\n let len = arg.length;\n let ptr = malloc(len, 1) >>> 0;\n\n const mem = getUint8Memory0();\n\n let offset = 0;\n\n for (; offset < len; offset++) {\n const code = arg.charCodeAt(offset);\n if (code > 0x7F) break;\n mem[ptr + offset] = code;\n }\n\n if (offset !== len) {\n if (offset !== 0) {\n arg = arg.slice(offset);\n }\n ptr = realloc(ptr, len, len = offset + arg.length * 3, 1) >>> 0;\n const view = getUint8Memory0().subarray(ptr + offset, ptr + len);\n const ret = encodeString(arg, view);\n\n offset += ret.written;\n ptr = realloc(ptr, len, offset, 1) >>> 0;\n }\n\n WASM_VECTOR_LEN = offset;\n return ptr;\n}\n\nfunction isLikeNone(x) {\n return x === undefined || x === null;\n}\n\nlet cachedInt32Memory0 = null;\n\nfunction getInt32Memory0() {\n if (cachedInt32Memory0 === null || cachedInt32Memory0.buffer !== wasm.memory.buffer) {\n cachedInt32Memory0 = new Int32Array(wasm.memory.buffer);\n }\n return cachedInt32Memory0;\n}\n\nfunction debugString(val) {\n // primitive types\n const type = typeof val;\n if (type == 'number' || type == 'boolean' || val == null) {\n return `${val}`;\n }\n if (type == 'string') {\n return `\"${val}\"`;\n }\n if (type == 'symbol') {\n const description = val.description;\n if (description == null) {\n return 'Symbol';\n } else {\n return `Symbol(${description})`;\n }\n }\n if (type == 'function') {\n const name = val.name;\n if (typeof name == 'string' && name.length > 0) {\n return `Function(${name})`;\n } else {\n return 'Function';\n }\n }\n // objects\n if (Array.isArray(val)) {\n const length = val.length;\n let debug = '[';\n if (length > 0) {\n debug += debugString(val[0]);\n }\n for(let i = 1; i < length; i++) {\n debug += ', ' + debugString(val[i]);\n }\n debug += ']';\n return debug;\n }\n // Test for built-in\n const builtInMatches = /\\[object ([^\\]]+)\\]/.exec(toString.call(val));\n let className;\n if (builtInMatches.length > 1) {\n className = builtInMatches[1];\n } else {\n // Failed to match the standard '[object ClassName]'\n return toString.call(val);\n }\n if (className == 'Object') {\n // we're a user defined class or Object\n // JSON.stringify avoids problems with cycles, and is generally much\n // easier than looping through ownProperties of `val`.\n try {\n return 'Object(' + JSON.stringify(val) + ')';\n } catch (_) {\n return 'Object';\n }\n }\n // errors\n if (val instanceof Error) {\n return `${val.name}: ${val.message}\\n${val.stack}`;\n }\n // TODO we could test for more things here, like `Set`s and `Map`s.\n return className;\n}\n\nconst CLOSURE_DTORS = (typeof FinalizationRegistry === 'undefined')\n ? { register: () => {}, unregister: () => {} }\n : new FinalizationRegistry(state => {\n wasm.__wbindgen_export_3.get(state.dtor)(state.a, state.b);\n});\n\nfunction makeMutClosure(arg0, arg1, dtor, f) {\n const state = { a: arg0, b: arg1, cnt: 1, dtor };\n const real = (...args) => {\n // First up with a closure we increment the internal reference\n // count. This ensures that the Rust closure environment won't\n // be deallocated while we're invoking it.\n state.cnt++;\n const a = state.a;\n state.a = 0;\n try {\n return f(a, state.b, ...args);\n } finally {\n if (--state.cnt === 0) {\n wasm.__wbindgen_export_3.get(state.dtor)(a, state.b);\n CLOSURE_DTORS.unregister(state);\n } else {\n state.a = a;\n }\n }\n };\n real.original = state;\n CLOSURE_DTORS.register(real, state, state);\n return real;\n}\nfunction __wbg_adapter_34(arg0, arg1, arg2) {\n wasm._dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h4428289ce4d5afd9(arg0, arg1, addHeapObject(arg2));\n}\n\nfunction _assertClass(instance, klass) {\n if (!(instance instanceof klass)) {\n throw new Error(`expected instance of ${klass.name}`);\n }\n return instance.ptr;\n}\n\nfunction passArray8ToWasm0(arg, malloc) {\n const ptr = malloc(arg.length * 1, 1) >>> 0;\n getUint8Memory0().set(arg, ptr / 1);\n WASM_VECTOR_LEN = arg.length;\n return ptr;\n}\n/**\n* Verify an execution with a single function and a single transition. Executions with multiple\n* transitions or functions will fail to verify. Also, this does not verify that the state root of\n* the execution is included in the Aleo Network ledger.\n*\n* @param {Execution} execution The function execution to verify\n* @param {VerifyingKey} verifying_key The verifying key for the function\n* @param {Program} program The program that the function execution belongs to\n* @param {String} function_id The name of the function that was executed\n* @returns {boolean} True if the execution is valid, false otherwise\n* @param {Execution} execution\n* @param {VerifyingKey} verifying_key\n* @param {Program} program\n* @param {string} function_id\n* @returns {boolean}\n*/\nfunction verifyFunctionExecution(execution, verifying_key, program, function_id) {\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n _assertClass(execution, Execution);\n _assertClass(verifying_key, VerifyingKey);\n _assertClass(program, Program);\n const ptr0 = passStringToWasm0(function_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n wasm.verifyFunctionExecution(retptr, execution.__wbg_ptr, verifying_key.__wbg_ptr, program.__wbg_ptr, ptr0, len0);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n var r2 = getInt32Memory0()[retptr / 4 + 2];\n if (r2) {\n throw takeObject(r1);\n }\n return r0 !== 0;\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n }\n}\n\nlet cachedBigInt64Memory0 = null;\n\nfunction getBigInt64Memory0() {\n if (cachedBigInt64Memory0 === null || cachedBigInt64Memory0.buffer !== wasm.memory.buffer) {\n cachedBigInt64Memory0 = new BigInt64Array(wasm.memory.buffer);\n }\n return cachedBigInt64Memory0;\n}\n\nfunction getArrayU8FromWasm0(ptr, len) {\n ptr = ptr >>> 0;\n return getUint8Memory0().subarray(ptr / 1, ptr / 1 + len);\n}\n/**\n* @param {number} receiver\n*/\nfunction runRayonThread(receiver) {\n wasm.runRayonThread(receiver);\n}\n\n/**\n* @param {URL} url\n* @param {number} num_threads\n* @returns {Promise}\n*/\nfunction initThreadPool(url, num_threads) {\n const ret = wasm.initThreadPool(addHeapObject(url), num_threads);\n return takeObject(ret);\n}\n\nfunction handleError(f, args) {\n try {\n return f.apply(this, args);\n } catch (e) {\n wasm.__wbindgen_exn_store(addHeapObject(e));\n }\n}\nfunction __wbg_adapter_281(arg0, arg1, arg2, arg3) {\n wasm.wasm_bindgen__convert__closures__invoke2_mut__h2157eed66e6e3fca(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));\n}\n\nconst AddressFinalization = (typeof FinalizationRegistry === 'undefined')\n ? { register: () => {}, unregister: () => {} }\n : new FinalizationRegistry(ptr => wasm.__wbg_address_free(ptr >>> 0));\n/**\n* Public address of an Aleo account\n*/\nclass Address {\n\n static __wrap(ptr) {\n ptr = ptr >>> 0;\n const obj = Object.create(Address.prototype);\n obj.__wbg_ptr = ptr;\n AddressFinalization.register(obj, obj.__wbg_ptr, obj);\n return obj;\n }\n\n __destroy_into_raw() {\n const ptr = this.__wbg_ptr;\n this.__wbg_ptr = 0;\n AddressFinalization.unregister(this);\n return ptr;\n }\n\n free() {\n const ptr = this.__destroy_into_raw();\n wasm.__wbg_address_free(ptr);\n }\n /**\n * Derive an Aleo address from a private key\n *\n * @param {PrivateKey} private_key The private key to derive the address from\n * @returns {Address} Address corresponding to the private key\n * @param {PrivateKey} private_key\n * @returns {Address}\n */\n static from_private_key(private_key) {\n _assertClass(private_key, PrivateKey);\n const ret = wasm.address_from_private_key(private_key.__wbg_ptr);\n return Address.__wrap(ret);\n }\n /**\n * Derive an Aleo address from a view key\n *\n * @param {ViewKey} view_key The view key to derive the address from\n * @returns {Address} Address corresponding to the view key\n * @param {ViewKey} view_key\n * @returns {Address}\n */\n static from_view_key(view_key) {\n _assertClass(view_key, ViewKey);\n const ret = wasm.address_from_view_key(view_key.__wbg_ptr);\n return Address.__wrap(ret);\n }\n /**\n * Create an aleo address object from a string representation of an address\n *\n * @param {string} address String representation of an addressm\n * @returns {Address} Address\n * @param {string} address\n * @returns {Address}\n */\n static from_string(address) {\n const ptr0 = passStringToWasm0(address, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n const ret = wasm.address_from_string(ptr0, len0);\n return Address.__wrap(ret);\n }\n /**\n * Get a string representation of an Aleo address object\n *\n * @param {Address} Address\n * @returns {string} String representation of the address\n * @returns {string}\n */\n to_string() {\n let deferred1_0;\n let deferred1_1;\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n wasm.address_to_string(retptr, this.__wbg_ptr);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n deferred1_0 = r0;\n deferred1_1 = r1;\n return getStringFromWasm0(r0, r1);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);\n }\n }\n /**\n * Verify a signature for a message signed by the address\n *\n * @param {Uint8Array} Byte array representing a message signed by the address\n * @returns {boolean} Boolean representing whether or not the signature is valid\n * @param {Uint8Array} message\n * @param {Signature} signature\n * @returns {boolean}\n */\n verify(message, signature) {\n const ptr0 = passArray8ToWasm0(message, wasm.__wbindgen_malloc);\n const len0 = WASM_VECTOR_LEN;\n _assertClass(signature, Signature);\n const ret = wasm.address_verify(this.__wbg_ptr, ptr0, len0, signature.__wbg_ptr);\n return ret !== 0;\n }\n}\n\nconst ExecutionFinalization = (typeof FinalizationRegistry === 'undefined')\n ? { register: () => {}, unregister: () => {} }\n : new FinalizationRegistry(ptr => wasm.__wbg_execution_free(ptr >>> 0));\n/**\n* Execution of an Aleo program.\n*/\nclass Execution {\n\n static __wrap(ptr) {\n ptr = ptr >>> 0;\n const obj = Object.create(Execution.prototype);\n obj.__wbg_ptr = ptr;\n ExecutionFinalization.register(obj, obj.__wbg_ptr, obj);\n return obj;\n }\n\n __destroy_into_raw() {\n const ptr = this.__wbg_ptr;\n this.__wbg_ptr = 0;\n ExecutionFinalization.unregister(this);\n return ptr;\n }\n\n free() {\n const ptr = this.__destroy_into_raw();\n wasm.__wbg_execution_free(ptr);\n }\n /**\n * Returns the string representation of the execution.\n * @returns {string}\n */\n toString() {\n let deferred1_0;\n let deferred1_1;\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n wasm.execution_toString(retptr, this.__wbg_ptr);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n deferred1_0 = r0;\n deferred1_1 = r1;\n return getStringFromWasm0(r0, r1);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);\n }\n }\n /**\n * Creates an execution object from a string representation of an execution.\n * @param {string} execution\n * @returns {Execution}\n */\n static fromString(execution) {\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n const ptr0 = passStringToWasm0(execution, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n wasm.execution_fromString(retptr, ptr0, len0);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n var r2 = getInt32Memory0()[retptr / 4 + 2];\n if (r2) {\n throw takeObject(r1);\n }\n return Execution.__wrap(r0);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n }\n }\n}\n\nconst ExecutionResponseFinalization = (typeof FinalizationRegistry === 'undefined')\n ? { register: () => {}, unregister: () => {} }\n : new FinalizationRegistry(ptr => wasm.__wbg_executionresponse_free(ptr >>> 0));\n/**\n* Webassembly Representation of an Aleo function execution response\n*\n* This object is returned by the execution of an Aleo function off-chain. It provides methods for\n* retrieving the outputs of the function execution.\n*/\nclass ExecutionResponse {\n\n static __wrap(ptr) {\n ptr = ptr >>> 0;\n const obj = Object.create(ExecutionResponse.prototype);\n obj.__wbg_ptr = ptr;\n ExecutionResponseFinalization.register(obj, obj.__wbg_ptr, obj);\n return obj;\n }\n\n __destroy_into_raw() {\n const ptr = this.__wbg_ptr;\n this.__wbg_ptr = 0;\n ExecutionResponseFinalization.unregister(this);\n return ptr;\n }\n\n free() {\n const ptr = this.__destroy_into_raw();\n wasm.__wbg_executionresponse_free(ptr);\n }\n /**\n * Get the outputs of the executed function\n *\n * @returns {Array} Array of strings representing the outputs of the function\n * @returns {Array}\n */\n getOutputs() {\n const ret = wasm.executionresponse_getOutputs(this.__wbg_ptr);\n return takeObject(ret);\n }\n /**\n * Returns the execution object if present, null if otherwise.\n *\n * @returns {Execution | undefined} The execution object if present, null if otherwise\n * @returns {Execution | undefined}\n */\n getExecution() {\n const ret = wasm.executionresponse_getExecution(this.__wbg_ptr);\n return ret === 0 ? undefined : Execution.__wrap(ret);\n }\n /**\n * Returns the program keys if present\n * @returns {KeyPair}\n */\n getKeys() {\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n wasm.executionresponse_getKeys(retptr, this.__wbg_ptr);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n var r2 = getInt32Memory0()[retptr / 4 + 2];\n if (r2) {\n throw takeObject(r1);\n }\n return KeyPair.__wrap(r0);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n }\n }\n /**\n * Returns the proving_key if the proving key was cached in the Execution response.\n * Note the proving key is removed from the response object after the first call to this\n * function. Subsequent calls will return null.\n *\n * @returns {ProvingKey | undefined} The proving key\n * @returns {ProvingKey | undefined}\n */\n getProvingKey() {\n const ret = wasm.executionresponse_getProvingKey(this.__wbg_ptr);\n return ret === 0 ? undefined : ProvingKey.__wrap(ret);\n }\n /**\n * Returns the verifying_key associated with the program\n *\n * @returns {VerifyingKey} The verifying key\n * @returns {VerifyingKey}\n */\n getVerifyingKey() {\n const ret = wasm.executionresponse_getVerifyingKey(this.__wbg_ptr);\n return VerifyingKey.__wrap(ret);\n }\n /**\n * Returns the function identifier\n * @returns {string}\n */\n getFunctionId() {\n let deferred1_0;\n let deferred1_1;\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n wasm.executionresponse_getFunctionId(retptr, this.__wbg_ptr);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n deferred1_0 = r0;\n deferred1_1 = r1;\n return getStringFromWasm0(r0, r1);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);\n }\n }\n /**\n * Returns the program\n * @returns {Program}\n */\n getProgram() {\n const ret = wasm.executionresponse_getProgram(this.__wbg_ptr);\n return Program.__wrap(ret);\n }\n}\n\nconst FieldFinalization = (typeof FinalizationRegistry === 'undefined')\n ? { register: () => {}, unregister: () => {} }\n : new FinalizationRegistry(ptr => wasm.__wbg_field_free(ptr >>> 0));\n/**\n*/\nclass Field {\n\n static __wrap(ptr) {\n ptr = ptr >>> 0;\n const obj = Object.create(Field.prototype);\n obj.__wbg_ptr = ptr;\n FieldFinalization.register(obj, obj.__wbg_ptr, obj);\n return obj;\n }\n\n __destroy_into_raw() {\n const ptr = this.__wbg_ptr;\n this.__wbg_ptr = 0;\n FieldFinalization.unregister(this);\n return ptr;\n }\n\n free() {\n const ptr = this.__destroy_into_raw();\n wasm.__wbg_field_free(ptr);\n }\n /**\n * @returns {string}\n */\n toString() {\n let deferred1_0;\n let deferred1_1;\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n wasm.field_toString(retptr, this.__wbg_ptr);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n deferred1_0 = r0;\n deferred1_1 = r1;\n return getStringFromWasm0(r0, r1);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);\n }\n }\n /**\n * @param {string} field\n * @returns {Field}\n */\n static fromString(field) {\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n const ptr0 = passStringToWasm0(field, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n wasm.field_fromString(retptr, ptr0, len0);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n var r2 = getInt32Memory0()[retptr / 4 + 2];\n if (r2) {\n throw takeObject(r1);\n }\n return Field.__wrap(r0);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n }\n }\n}\n\nconst KeyPairFinalization = (typeof FinalizationRegistry === 'undefined')\n ? { register: () => {}, unregister: () => {} }\n : new FinalizationRegistry(ptr => wasm.__wbg_keypair_free(ptr >>> 0));\n/**\n* Key pair object containing both the function proving and verifying keys\n*/\nclass KeyPair {\n\n static __wrap(ptr) {\n ptr = ptr >>> 0;\n const obj = Object.create(KeyPair.prototype);\n obj.__wbg_ptr = ptr;\n KeyPairFinalization.register(obj, obj.__wbg_ptr, obj);\n return obj;\n }\n\n __destroy_into_raw() {\n const ptr = this.__wbg_ptr;\n this.__wbg_ptr = 0;\n KeyPairFinalization.unregister(this);\n return ptr;\n }\n\n free() {\n const ptr = this.__destroy_into_raw();\n wasm.__wbg_keypair_free(ptr);\n }\n /**\n * Create new key pair from proving and verifying keys\n *\n * @param {ProvingKey} proving_key Proving key corresponding to a function in an Aleo program\n * @param {VerifyingKey} verifying_key Verifying key corresponding to a function in an Aleo program\n * @returns {KeyPair} Key pair object containing both the function proving and verifying keys\n * @param {ProvingKey} proving_key\n * @param {VerifyingKey} verifying_key\n */\n constructor(proving_key, verifying_key) {\n _assertClass(proving_key, ProvingKey);\n var ptr0 = proving_key.__destroy_into_raw();\n _assertClass(verifying_key, VerifyingKey);\n var ptr1 = verifying_key.__destroy_into_raw();\n const ret = wasm.keypair_new(ptr0, ptr1);\n this.__wbg_ptr = ret >>> 0;\n return this;\n }\n /**\n * Get the proving key. This method will remove the proving key from the key pair\n *\n * @returns {ProvingKey | Error}\n * @returns {ProvingKey}\n */\n provingKey() {\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n wasm.keypair_provingKey(retptr, this.__wbg_ptr);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n var r2 = getInt32Memory0()[retptr / 4 + 2];\n if (r2) {\n throw takeObject(r1);\n }\n return ProvingKey.__wrap(r0);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n }\n }\n /**\n * Get the verifying key. This method will remove the verifying key from the key pair\n *\n * @returns {VerifyingKey | Error}\n * @returns {VerifyingKey}\n */\n verifyingKey() {\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n wasm.keypair_verifyingKey(retptr, this.__wbg_ptr);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n var r2 = getInt32Memory0()[retptr / 4 + 2];\n if (r2) {\n throw takeObject(r1);\n }\n return VerifyingKey.__wrap(r0);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n }\n }\n}\n\nconst MetadataFinalization = (typeof FinalizationRegistry === 'undefined')\n ? { register: () => {}, unregister: () => {} }\n : new FinalizationRegistry(ptr => wasm.__wbg_metadata_free(ptr >>> 0));\n/**\n*/\nclass Metadata {\n\n static __wrap(ptr) {\n ptr = ptr >>> 0;\n const obj = Object.create(Metadata.prototype);\n obj.__wbg_ptr = ptr;\n MetadataFinalization.register(obj, obj.__wbg_ptr, obj);\n return obj;\n }\n\n __destroy_into_raw() {\n const ptr = this.__wbg_ptr;\n this.__wbg_ptr = 0;\n MetadataFinalization.unregister(this);\n return ptr;\n }\n\n free() {\n const ptr = this.__destroy_into_raw();\n wasm.__wbg_metadata_free(ptr);\n }\n /**\n * @returns {string}\n */\n get name() {\n let deferred1_0;\n let deferred1_1;\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n wasm.__wbg_get_metadata_name(retptr, this.__wbg_ptr);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n deferred1_0 = r0;\n deferred1_1 = r1;\n return getStringFromWasm0(r0, r1);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);\n }\n }\n /**\n * @param {string} arg0\n */\n set name(arg0) {\n const ptr0 = passStringToWasm0(arg0, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n wasm.__wbg_set_metadata_name(this.__wbg_ptr, ptr0, len0);\n }\n /**\n * @returns {string}\n */\n get locator() {\n let deferred1_0;\n let deferred1_1;\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n wasm.__wbg_get_metadata_locator(retptr, this.__wbg_ptr);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n deferred1_0 = r0;\n deferred1_1 = r1;\n return getStringFromWasm0(r0, r1);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);\n }\n }\n /**\n * @param {string} arg0\n */\n set locator(arg0) {\n const ptr0 = passStringToWasm0(arg0, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n wasm.__wbg_set_metadata_locator(this.__wbg_ptr, ptr0, len0);\n }\n /**\n * @returns {string}\n */\n get prover() {\n let deferred1_0;\n let deferred1_1;\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n wasm.__wbg_get_metadata_prover(retptr, this.__wbg_ptr);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n deferred1_0 = r0;\n deferred1_1 = r1;\n return getStringFromWasm0(r0, r1);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);\n }\n }\n /**\n * @param {string} arg0\n */\n set prover(arg0) {\n const ptr0 = passStringToWasm0(arg0, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n wasm.__wbg_set_metadata_prover(this.__wbg_ptr, ptr0, len0);\n }\n /**\n * @returns {string}\n */\n get verifier() {\n let deferred1_0;\n let deferred1_1;\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n wasm.__wbg_get_metadata_verifier(retptr, this.__wbg_ptr);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n deferred1_0 = r0;\n deferred1_1 = r1;\n return getStringFromWasm0(r0, r1);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);\n }\n }\n /**\n * @param {string} arg0\n */\n set verifier(arg0) {\n const ptr0 = passStringToWasm0(arg0, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n wasm.__wbg_set_metadata_verifier(this.__wbg_ptr, ptr0, len0);\n }\n /**\n * @returns {string}\n */\n get verifyingKey() {\n let deferred1_0;\n let deferred1_1;\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n wasm.__wbg_get_metadata_verifyingKey(retptr, this.__wbg_ptr);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n deferred1_0 = r0;\n deferred1_1 = r1;\n return getStringFromWasm0(r0, r1);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);\n }\n }\n /**\n * @param {string} arg0\n */\n set verifyingKey(arg0) {\n const ptr0 = passStringToWasm0(arg0, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n wasm.__wbg_set_metadata_verifyingKey(this.__wbg_ptr, ptr0, len0);\n }\n /**\n * @returns {string}\n */\n static baseUrl() {\n let deferred1_0;\n let deferred1_1;\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n wasm.metadata_baseUrl(retptr);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n deferred1_0 = r0;\n deferred1_1 = r1;\n return getStringFromWasm0(r0, r1);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);\n }\n }\n /**\n * @returns {Metadata}\n */\n static bond_public() {\n const ret = wasm.metadata_bond_public();\n return Metadata.__wrap(ret);\n }\n /**\n * @returns {Metadata}\n */\n static bond_validator() {\n const ret = wasm.metadata_bond_validator();\n return Metadata.__wrap(ret);\n }\n /**\n * @returns {Metadata}\n */\n static claim_unbond_public() {\n const ret = wasm.metadata_claim_unbond_public();\n return Metadata.__wrap(ret);\n }\n /**\n * @returns {Metadata}\n */\n static fee_private() {\n const ret = wasm.metadata_fee_private();\n return Metadata.__wrap(ret);\n }\n /**\n * @returns {Metadata}\n */\n static fee_public() {\n const ret = wasm.metadata_fee_public();\n return Metadata.__wrap(ret);\n }\n /**\n * @returns {Metadata}\n */\n static inclusion() {\n const ret = wasm.metadata_inclusion();\n return Metadata.__wrap(ret);\n }\n /**\n * @returns {Metadata}\n */\n static join() {\n const ret = wasm.metadata_join();\n return Metadata.__wrap(ret);\n }\n /**\n * @returns {Metadata}\n */\n static set_validator_state() {\n const ret = wasm.metadata_set_validator_state();\n return Metadata.__wrap(ret);\n }\n /**\n * @returns {Metadata}\n */\n static split() {\n const ret = wasm.metadata_split();\n return Metadata.__wrap(ret);\n }\n /**\n * @returns {Metadata}\n */\n static transfer_private() {\n const ret = wasm.metadata_transfer_private();\n return Metadata.__wrap(ret);\n }\n /**\n * @returns {Metadata}\n */\n static transfer_private_to_public() {\n const ret = wasm.metadata_transfer_private_to_public();\n return Metadata.__wrap(ret);\n }\n /**\n * @returns {Metadata}\n */\n static transfer_public() {\n const ret = wasm.metadata_transfer_public();\n return Metadata.__wrap(ret);\n }\n /**\n * @returns {Metadata}\n */\n static transfer_public_as_signer() {\n const ret = wasm.metadata_transfer_public_as_signer();\n return Metadata.__wrap(ret);\n }\n /**\n * @returns {Metadata}\n */\n static transfer_public_to_private() {\n const ret = wasm.metadata_transfer_public_to_private();\n return Metadata.__wrap(ret);\n }\n /**\n * @returns {Metadata}\n */\n static unbond_public() {\n const ret = wasm.metadata_unbond_public();\n return Metadata.__wrap(ret);\n }\n}\n\nconst OfflineQueryFinalization = (typeof FinalizationRegistry === 'undefined')\n ? { register: () => {}, unregister: () => {} }\n : new FinalizationRegistry(ptr => wasm.__wbg_offlinequery_free(ptr >>> 0));\n/**\n* An offline query object used to insert the global state root and state paths needed to create\n* a valid inclusion proof offline.\n*/\nclass OfflineQuery {\n\n static __wrap(ptr) {\n ptr = ptr >>> 0;\n const obj = Object.create(OfflineQuery.prototype);\n obj.__wbg_ptr = ptr;\n OfflineQueryFinalization.register(obj, obj.__wbg_ptr, obj);\n return obj;\n }\n\n __destroy_into_raw() {\n const ptr = this.__wbg_ptr;\n this.__wbg_ptr = 0;\n OfflineQueryFinalization.unregister(this);\n return ptr;\n }\n\n free() {\n const ptr = this.__destroy_into_raw();\n wasm.__wbg_offlinequery_free(ptr);\n }\n /**\n * Creates a new offline query object. The state root is required to be passed in as a string\n * @param {string} state_root\n */\n constructor(state_root) {\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n const ptr0 = passStringToWasm0(state_root, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n wasm.offlinequery_new(retptr, ptr0, len0);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n var r2 = getInt32Memory0()[retptr / 4 + 2];\n if (r2) {\n throw takeObject(r1);\n }\n this.__wbg_ptr = r0 >>> 0;\n return this;\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n }\n }\n /**\n * Add a new state path to the offline query object.\n *\n * @param {string} commitment: The commitment corresponding to a record inpout\n * @param {string} state_path: The state path corresponding to the commitment\n * @param {string} commitment\n * @param {string} state_path\n */\n addStatePath(commitment, state_path) {\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n const ptr0 = passStringToWasm0(commitment, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n const ptr1 = passStringToWasm0(state_path, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len1 = WASM_VECTOR_LEN;\n wasm.offlinequery_addStatePath(retptr, this.__wbg_ptr, ptr0, len0, ptr1, len1);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n if (r1) {\n throw takeObject(r0);\n }\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n }\n }\n /**\n * Get a json string representation of the offline query object\n * @returns {string}\n */\n toString() {\n let deferred1_0;\n let deferred1_1;\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n wasm.offlinequery_toString(retptr, this.__wbg_ptr);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n deferred1_0 = r0;\n deferred1_1 = r1;\n return getStringFromWasm0(r0, r1);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);\n }\n }\n /**\n * Create an offline query object from a json string representation\n * @param {string} s\n * @returns {OfflineQuery}\n */\n static fromString(s) {\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n const ptr0 = passStringToWasm0(s, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n wasm.offlinequery_fromString(retptr, ptr0, len0);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n var r2 = getInt32Memory0()[retptr / 4 + 2];\n if (r2) {\n throw takeObject(r1);\n }\n return OfflineQuery.__wrap(r0);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n }\n }\n}\n\nconst PrivateKeyFinalization = (typeof FinalizationRegistry === 'undefined')\n ? { register: () => {}, unregister: () => {} }\n : new FinalizationRegistry(ptr => wasm.__wbg_privatekey_free(ptr >>> 0));\n/**\n* Private key of an Aleo account\n*/\nclass PrivateKey {\n\n static __wrap(ptr) {\n ptr = ptr >>> 0;\n const obj = Object.create(PrivateKey.prototype);\n obj.__wbg_ptr = ptr;\n PrivateKeyFinalization.register(obj, obj.__wbg_ptr, obj);\n return obj;\n }\n\n __destroy_into_raw() {\n const ptr = this.__wbg_ptr;\n this.__wbg_ptr = 0;\n PrivateKeyFinalization.unregister(this);\n return ptr;\n }\n\n free() {\n const ptr = this.__destroy_into_raw();\n wasm.__wbg_privatekey_free(ptr);\n }\n /**\n * Generate a new private key using a cryptographically secure random number generator\n *\n * @returns {PrivateKey}\n */\n constructor() {\n const ret = wasm.privatekey_new();\n this.__wbg_ptr = ret >>> 0;\n return this;\n }\n /**\n * Get a private key from a series of unchecked bytes\n *\n * @param {Uint8Array} seed Unchecked 32 byte long Uint8Array acting as the seed for the private key\n * @returns {PrivateKey}\n * @param {Uint8Array} seed\n * @returns {PrivateKey}\n */\n static from_seed_unchecked(seed) {\n const ptr0 = passArray8ToWasm0(seed, wasm.__wbindgen_malloc);\n const len0 = WASM_VECTOR_LEN;\n const ret = wasm.privatekey_from_seed_unchecked(ptr0, len0);\n return PrivateKey.__wrap(ret);\n }\n /**\n * Get a private key from a string representation of a private key\n *\n * @param {string} seed String representation of a private key\n * @returns {PrivateKey}\n * @param {string} private_key\n * @returns {PrivateKey}\n */\n static from_string(private_key) {\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n const ptr0 = passStringToWasm0(private_key, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n wasm.privatekey_from_string(retptr, ptr0, len0);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n var r2 = getInt32Memory0()[retptr / 4 + 2];\n if (r2) {\n throw takeObject(r1);\n }\n return PrivateKey.__wrap(r0);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n }\n }\n /**\n * Get a string representation of the private key. This function should be used very carefully\n * as it exposes the private key plaintext\n *\n * @returns {string} String representation of a private key\n * @returns {string}\n */\n to_string() {\n let deferred1_0;\n let deferred1_1;\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n wasm.privatekey_to_string(retptr, this.__wbg_ptr);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n deferred1_0 = r0;\n deferred1_1 = r1;\n return getStringFromWasm0(r0, r1);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);\n }\n }\n /**\n * Get the view key corresponding to the private key\n *\n * @returns {ViewKey}\n * @returns {ViewKey}\n */\n to_view_key() {\n const ret = wasm.privatekey_to_view_key(this.__wbg_ptr);\n return ViewKey.__wrap(ret);\n }\n /**\n * Get the address corresponding to the private key\n *\n * @returns {Address}\n * @returns {Address}\n */\n to_address() {\n const ret = wasm.privatekey_to_address(this.__wbg_ptr);\n return Address.__wrap(ret);\n }\n /**\n * Sign a message with the private key\n *\n * @param {Uint8Array} Byte array representing a message signed by the address\n * @returns {Signature} Signature generated by signing the message with the address\n * @param {Uint8Array} message\n * @returns {Signature}\n */\n sign(message) {\n const ptr0 = passArray8ToWasm0(message, wasm.__wbindgen_malloc);\n const len0 = WASM_VECTOR_LEN;\n const ret = wasm.privatekey_sign(this.__wbg_ptr, ptr0, len0);\n return Signature.__wrap(ret);\n }\n /**\n * Get a new randomly generated private key ciphertext using a secret. The secret is sensitive\n * and will be needed to decrypt the private key later, so it should be stored securely\n *\n * @param {string} secret Secret used to encrypt the private key\n * @returns {PrivateKeyCiphertext | Error} Ciphertext representation of the private key\n * @param {string} secret\n * @returns {PrivateKeyCiphertext}\n */\n static newEncrypted(secret) {\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n const ptr0 = passStringToWasm0(secret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n wasm.privatekey_newEncrypted(retptr, ptr0, len0);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n var r2 = getInt32Memory0()[retptr / 4 + 2];\n if (r2) {\n throw takeObject(r1);\n }\n return PrivateKeyCiphertext.__wrap(r0);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n }\n }\n /**\n * Encrypt an existing private key with a secret. The secret is sensitive and will be needed to\n * decrypt the private key later, so it should be stored securely\n *\n * @param {string} secret Secret used to encrypt the private key\n * @returns {PrivateKeyCiphertext | Error} Ciphertext representation of the private key\n * @param {string} secret\n * @returns {PrivateKeyCiphertext}\n */\n toCiphertext(secret) {\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n const ptr0 = passStringToWasm0(secret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n wasm.privatekey_toCiphertext(retptr, this.__wbg_ptr, ptr0, len0);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n var r2 = getInt32Memory0()[retptr / 4 + 2];\n if (r2) {\n throw takeObject(r1);\n }\n return PrivateKeyCiphertext.__wrap(r0);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n }\n }\n /**\n * Get private key from a private key ciphertext and secret originally used to encrypt it\n *\n * @param {PrivateKeyCiphertext} ciphertext Ciphertext representation of the private key\n * @param {string} secret Secret originally used to encrypt the private key\n * @returns {PrivateKey | Error} Private key\n * @param {PrivateKeyCiphertext} ciphertext\n * @param {string} secret\n * @returns {PrivateKey}\n */\n static fromPrivateKeyCiphertext(ciphertext, secret) {\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n _assertClass(ciphertext, PrivateKeyCiphertext);\n const ptr0 = passStringToWasm0(secret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n wasm.privatekey_fromPrivateKeyCiphertext(retptr, ciphertext.__wbg_ptr, ptr0, len0);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n var r2 = getInt32Memory0()[retptr / 4 + 2];\n if (r2) {\n throw takeObject(r1);\n }\n return PrivateKey.__wrap(r0);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n }\n }\n}\n\nconst PrivateKeyCiphertextFinalization = (typeof FinalizationRegistry === 'undefined')\n ? { register: () => {}, unregister: () => {} }\n : new FinalizationRegistry(ptr => wasm.__wbg_privatekeyciphertext_free(ptr >>> 0));\n/**\n* Private Key in ciphertext form\n*/\nclass PrivateKeyCiphertext {\n\n static __wrap(ptr) {\n ptr = ptr >>> 0;\n const obj = Object.create(PrivateKeyCiphertext.prototype);\n obj.__wbg_ptr = ptr;\n PrivateKeyCiphertextFinalization.register(obj, obj.__wbg_ptr, obj);\n return obj;\n }\n\n __destroy_into_raw() {\n const ptr = this.__wbg_ptr;\n this.__wbg_ptr = 0;\n PrivateKeyCiphertextFinalization.unregister(this);\n return ptr;\n }\n\n free() {\n const ptr = this.__destroy_into_raw();\n wasm.__wbg_privatekeyciphertext_free(ptr);\n }\n /**\n * Encrypt a private key using a secret string. The secret is sensitive and will be needed to\n * decrypt the private key later, so it should be stored securely\n *\n * @param {PrivateKey} private_key Private key to encrypt\n * @param {string} secret Secret to encrypt the private key with\n * @returns {PrivateKeyCiphertext | Error} Private key ciphertext\n * @param {PrivateKey} private_key\n * @param {string} secret\n * @returns {PrivateKeyCiphertext}\n */\n static encryptPrivateKey(private_key, secret) {\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n _assertClass(private_key, PrivateKey);\n const ptr0 = passStringToWasm0(secret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n wasm.privatekey_toCiphertext(retptr, private_key.__wbg_ptr, ptr0, len0);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n var r2 = getInt32Memory0()[retptr / 4 + 2];\n if (r2) {\n throw takeObject(r1);\n }\n return PrivateKeyCiphertext.__wrap(r0);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n }\n }\n /**\n * Decrypts a private ciphertext using a secret string. This must be the same secret used to\n * encrypt the private key\n *\n * @param {string} secret Secret used to encrypt the private key\n * @returns {PrivateKey | Error} Private key\n * @param {string} secret\n * @returns {PrivateKey}\n */\n decryptToPrivateKey(secret) {\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n const ptr0 = passStringToWasm0(secret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n wasm.privatekeyciphertext_decryptToPrivateKey(retptr, this.__wbg_ptr, ptr0, len0);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n var r2 = getInt32Memory0()[retptr / 4 + 2];\n if (r2) {\n throw takeObject(r1);\n }\n return PrivateKey.__wrap(r0);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n }\n }\n /**\n * Returns the ciphertext string\n *\n * @returns {string} Ciphertext string\n * @returns {string}\n */\n toString() {\n let deferred1_0;\n let deferred1_1;\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n wasm.privatekeyciphertext_toString(retptr, this.__wbg_ptr);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n deferred1_0 = r0;\n deferred1_1 = r1;\n return getStringFromWasm0(r0, r1);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);\n }\n }\n /**\n * Creates a PrivateKeyCiphertext from a string\n *\n * @param {string} ciphertext Ciphertext string\n * @returns {PrivateKeyCiphertext | Error} Private key ciphertext\n * @param {string} ciphertext\n * @returns {PrivateKeyCiphertext}\n */\n static fromString(ciphertext) {\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n const ptr0 = passStringToWasm0(ciphertext, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n wasm.privatekeyciphertext_fromString(retptr, ptr0, len0);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n var r2 = getInt32Memory0()[retptr / 4 + 2];\n if (r2) {\n throw takeObject(r1);\n }\n return PrivateKeyCiphertext.__wrap(r0);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n }\n }\n}\n\nconst ProgramFinalization = (typeof FinalizationRegistry === 'undefined')\n ? { register: () => {}, unregister: () => {} }\n : new FinalizationRegistry(ptr => wasm.__wbg_program_free(ptr >>> 0));\n/**\n* Webassembly Representation of an Aleo program\n*/\nclass Program {\n\n static __wrap(ptr) {\n ptr = ptr >>> 0;\n const obj = Object.create(Program.prototype);\n obj.__wbg_ptr = ptr;\n ProgramFinalization.register(obj, obj.__wbg_ptr, obj);\n return obj;\n }\n\n __destroy_into_raw() {\n const ptr = this.__wbg_ptr;\n this.__wbg_ptr = 0;\n ProgramFinalization.unregister(this);\n return ptr;\n }\n\n free() {\n const ptr = this.__destroy_into_raw();\n wasm.__wbg_program_free(ptr);\n }\n /**\n * Create a program from a program string\n *\n * @param {string} program Aleo program source code\n * @returns {Program | Error} Program object\n * @param {string} program\n * @returns {Program}\n */\n static fromString(program) {\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n const ptr0 = passStringToWasm0(program, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n wasm.program_fromString(retptr, ptr0, len0);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n var r2 = getInt32Memory0()[retptr / 4 + 2];\n if (r2) {\n throw takeObject(r1);\n }\n return Program.__wrap(r0);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n }\n }\n /**\n * Get a string representation of the program\n *\n * @returns {string} String containing the program source code\n * @returns {string}\n */\n toString() {\n let deferred1_0;\n let deferred1_1;\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n wasm.program_toString(retptr, this.__wbg_ptr);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n deferred1_0 = r0;\n deferred1_1 = r1;\n return getStringFromWasm0(r0, r1);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);\n }\n }\n /**\n * Determine if a function is present in the program\n *\n * @param {string} functionName Name of the function to check for\n * @returns {boolean} True if the program is valid, false otherwise\n * @param {string} function_name\n * @returns {boolean}\n */\n hasFunction(function_name) {\n const ptr0 = passStringToWasm0(function_name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n const ret = wasm.program_hasFunction(this.__wbg_ptr, ptr0, len0);\n return ret !== 0;\n }\n /**\n * Get javascript array of functions names in the program\n *\n * @returns {Array} Array of all function names present in the program\n *\n * @example\n * const expected_functions = [\n * \"mint\",\n * \"transfer_private\",\n * \"transfer_private_to_public\",\n * \"transfer_public\",\n * \"transfer_public_to_private\",\n * \"join\",\n * \"split\",\n * \"fee\"\n * ]\n *\n * const credits_program = aleo_wasm.Program.getCreditsProgram();\n * const credits_functions = credits_program.getFunctions();\n * console.log(credits_functions === expected_functions); // Output should be \"true\"\n * @returns {Array}\n */\n getFunctions() {\n const ret = wasm.program_getFunctions(this.__wbg_ptr);\n return takeObject(ret);\n }\n /**\n * Get a javascript object representation of the function inputs and types. This can be used\n * to generate a web form to capture user inputs for an execution of a function.\n *\n * @param {string} function_name Name of the function to get inputs for\n * @returns {Array | Error} Array of function inputs\n *\n * @example\n * const expected_inputs = [\n * {\n * type:\"record\",\n * visibility:\"private\",\n * record:\"credits\",\n * members:[\n * {\n * name:\"microcredits\",\n * type:\"u64\",\n * visibility:\"private\"\n * }\n * ],\n * register:\"r0\"\n * },\n * {\n * type:\"address\",\n * visibility:\"private\",\n * register:\"r1\"\n * },\n * {\n * type:\"u64\",\n * visibility:\"private\",\n * register:\"r2\"\n * }\n * ];\n *\n * const credits_program = aleo_wasm.Program.getCreditsProgram();\n * const transfer_function_inputs = credits_program.getFunctionInputs(\"transfer_private\");\n * console.log(transfer_function_inputs === expected_inputs); // Output should be \"true\"\n * @param {string} function_name\n * @returns {Array}\n */\n getFunctionInputs(function_name) {\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n const ptr0 = passStringToWasm0(function_name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n wasm.program_getFunctionInputs(retptr, this.__wbg_ptr, ptr0, len0);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n var r2 = getInt32Memory0()[retptr / 4 + 2];\n if (r2) {\n throw takeObject(r1);\n }\n return takeObject(r0);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n }\n }\n /**\n * Get a the list of a program's mappings and the names/types of their keys and values.\n *\n * @returns {Array | Error} - An array of objects representing the mappings in the program\n * @example\n * const expected_mappings = [\n * {\n * name: \"account\",\n * key_name: \"owner\",\n * key_type: \"address\",\n * value_name: \"microcredits\",\n * value_type: \"u64\"\n * }\n * ]\n *\n * const credits_program = aleo_wasm.Program.getCreditsProgram();\n * const credits_mappings = credits_program.getMappings();\n * console.log(credits_mappings === expected_mappings); // Output should be \"true\"\n * @returns {Array}\n */\n getMappings() {\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n wasm.program_getMappings(retptr, this.__wbg_ptr);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n var r2 = getInt32Memory0()[retptr / 4 + 2];\n if (r2) {\n throw takeObject(r1);\n }\n return takeObject(r0);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n }\n }\n /**\n * Get a javascript object representation of a program record and its types\n *\n * @param {string} record_name Name of the record to get members for\n * @returns {Object | Error} Object containing the record name, type, and members\n *\n * @example\n *\n * const expected_record = {\n * type: \"record\",\n * record: \"Credits\",\n * members: [\n * {\n * name: \"owner\",\n * type: \"address\",\n * visibility: \"private\"\n * },\n * {\n * name: \"microcredits\",\n * type: \"u64\",\n * visibility: \"private\"\n * }\n * ];\n * };\n *\n * const credits_program = aleo_wasm.Program.getCreditsProgram();\n * const credits_record = credits_program.getRecordMembers(\"Credits\");\n * console.log(credits_record === expected_record); // Output should be \"true\"\n * @param {string} record_name\n * @returns {object}\n */\n getRecordMembers(record_name) {\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n const ptr0 = passStringToWasm0(record_name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n wasm.program_getRecordMembers(retptr, this.__wbg_ptr, ptr0, len0);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n var r2 = getInt32Memory0()[retptr / 4 + 2];\n if (r2) {\n throw takeObject(r1);\n }\n return takeObject(r0);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n }\n }\n /**\n * Get a javascript object representation of a program struct and its types\n *\n * @param {string} struct_name Name of the struct to get members for\n * @returns {Array | Error} Array containing the struct members\n *\n * @example\n *\n * const STRUCT_PROGRAM = \"program token_issue.aleo;\n *\n * struct token_metadata:\n * network as u32;\n * version as u32;\n *\n * struct token:\n * token_id as u32;\n * metadata as token_metadata;\n *\n * function no_op:\n * input r0 as u64;\n * output r0 as u64;\"\n *\n * const expected_struct_members = [\n * {\n * name: \"token_id\",\n * type: \"u32\",\n * },\n * {\n * name: \"metadata\",\n * type: \"struct\",\n * struct_id: \"token_metadata\",\n * members: [\n * {\n * name: \"network\",\n * type: \"u32\",\n * }\n * {\n * name: \"version\",\n * type: \"u32\",\n * }\n * ]\n * }\n * ];\n *\n * const program = aleo_wasm.Program.fromString(STRUCT_PROGRAM);\n * const struct_members = program.getStructMembers(\"token\");\n * console.log(struct_members === expected_struct_members); // Output should be \"true\"\n * @param {string} struct_name\n * @returns {Array}\n */\n getStructMembers(struct_name) {\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n const ptr0 = passStringToWasm0(struct_name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n wasm.program_getStructMembers(retptr, this.__wbg_ptr, ptr0, len0);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n var r2 = getInt32Memory0()[retptr / 4 + 2];\n if (r2) {\n throw takeObject(r1);\n }\n return takeObject(r0);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n }\n }\n /**\n * Get the credits.aleo program\n *\n * @returns {Program} The credits.aleo program\n * @returns {Program}\n */\n static getCreditsProgram() {\n const ret = wasm.program_getCreditsProgram();\n return Program.__wrap(ret);\n }\n /**\n * Get the id of the program\n *\n * @returns {string} The id of the program\n * @returns {string}\n */\n id() {\n let deferred1_0;\n let deferred1_1;\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n wasm.program_id(retptr, this.__wbg_ptr);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n deferred1_0 = r0;\n deferred1_1 = r1;\n return getStringFromWasm0(r0, r1);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);\n }\n }\n /**\n * Get a unique address of the program\n *\n * @returns {Address} The address of the program\n * @returns {Address}\n */\n address() {\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n wasm.program_address(retptr, this.__wbg_ptr);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n var r2 = getInt32Memory0()[retptr / 4 + 2];\n if (r2) {\n throw takeObject(r1);\n }\n return Address.__wrap(r0);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n }\n }\n /**\n * Determine equality with another program\n *\n * @param {Program} other The other program to compare\n * @returns {boolean} True if the programs are equal, false otherwise\n * @param {Program} other\n * @returns {boolean}\n */\n isEqual(other) {\n _assertClass(other, Program);\n const ret = wasm.program_isEqual(this.__wbg_ptr, other.__wbg_ptr);\n return ret !== 0;\n }\n /**\n * Get program_imports\n *\n * @returns {Array} The program imports\n *\n * @example\n *\n * const DOUBLE_TEST = \"import multiply_test.aleo;\n *\n * program double_test.aleo;\n *\n * function double_it:\n * input r0 as u32.private;\n * call multiply_test.aleo/multiply 2u32 r0 into r1;\n * output r1 as u32.private;\";\n *\n * const expected_imports = [\n * \"multiply_test.aleo\"\n * ];\n *\n * const program = aleo_wasm.Program.fromString(DOUBLE_TEST_PROGRAM);\n * const imports = program.getImports();\n * console.log(imports === expected_imports); // Output should be \"true\"\n * @returns {Array}\n */\n getImports() {\n const ret = wasm.program_getImports(this.__wbg_ptr);\n return takeObject(ret);\n }\n}\n\nconst ProgramManagerFinalization = (typeof FinalizationRegistry === 'undefined')\n ? { register: () => {}, unregister: () => {} }\n : new FinalizationRegistry(ptr => wasm.__wbg_programmanager_free(ptr >>> 0));\n/**\n*/\nclass ProgramManager {\n\n __destroy_into_raw() {\n const ptr = this.__wbg_ptr;\n this.__wbg_ptr = 0;\n ProgramManagerFinalization.unregister(this);\n return ptr;\n }\n\n free() {\n const ptr = this.__destroy_into_raw();\n wasm.__wbg_programmanager_free(ptr);\n }\n /**\n * Deploy an Aleo program\n *\n * @param private_key The private key of the sender\n * @param program The source code of the program being deployed\n * @param imports A javascript object holding the source code of any imported programs in the\n * form \\{\"program_name1\": \"program_source_code\", \"program_name2\": \"program_source_code\", ..\\}.\n * Note that all imported programs must be deployed on chain before the main program in order\n * for the deployment to succeed\n * @param fee_credits The amount of credits to pay as a fee\n * @param fee_record The record to spend the fee from\n * @param url The url of the Aleo network node to send the transaction to\n * @param imports (optional) Provide a list of imports to use for the program deployment in the\n * form of a javascript object where the keys are a string of the program name and the values\n * are a string representing the program source code \\{ \"hello.aleo\": \"hello.aleo source code\" \\}\n * @param fee_proving_key (optional) Provide a proving key to use for the fee execution\n * @param fee_verifying_key (optional) Provide a verifying key to use for the fee execution\n * @returns {Transaction | Error}\n * @param {PrivateKey} private_key\n * @param {string} program\n * @param {number} fee_credits\n * @param {RecordPlaintext | undefined} [fee_record]\n * @param {string | undefined} [url]\n * @param {object | undefined} [imports]\n * @param {ProvingKey | undefined} [fee_proving_key]\n * @param {VerifyingKey | undefined} [fee_verifying_key]\n * @param {OfflineQuery | undefined} [offline_query]\n * @returns {Promise}\n */\n static buildDeploymentTransaction(private_key, program, fee_credits, fee_record, url, imports, fee_proving_key, fee_verifying_key, offline_query) {\n _assertClass(private_key, PrivateKey);\n const ptr0 = passStringToWasm0(program, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n let ptr1 = 0;\n if (!isLikeNone(fee_record)) {\n _assertClass(fee_record, RecordPlaintext);\n ptr1 = fee_record.__destroy_into_raw();\n }\n var ptr2 = isLikeNone(url) ? 0 : passStringToWasm0(url, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n var len2 = WASM_VECTOR_LEN;\n let ptr3 = 0;\n if (!isLikeNone(fee_proving_key)) {\n _assertClass(fee_proving_key, ProvingKey);\n ptr3 = fee_proving_key.__destroy_into_raw();\n }\n let ptr4 = 0;\n if (!isLikeNone(fee_verifying_key)) {\n _assertClass(fee_verifying_key, VerifyingKey);\n ptr4 = fee_verifying_key.__destroy_into_raw();\n }\n let ptr5 = 0;\n if (!isLikeNone(offline_query)) {\n _assertClass(offline_query, OfflineQuery);\n ptr5 = offline_query.__destroy_into_raw();\n }\n const ret = wasm.programmanager_buildDeploymentTransaction(private_key.__wbg_ptr, ptr0, len0, fee_credits, ptr1, ptr2, len2, isLikeNone(imports) ? 0 : addHeapObject(imports), ptr3, ptr4, ptr5);\n return takeObject(ret);\n }\n /**\n * Estimate the fee for a program deployment\n *\n * Disclaimer: Fee estimation is experimental and may not represent a correct estimate on any current or future network\n *\n * @param program The source code of the program being deployed\n * @param imports (optional) Provide a list of imports to use for the deployment fee estimation\n * in the form of a javascript object where the keys are a string of the program name and the values\n * are a string representing the program source code \\{ \"hello.aleo\": \"hello.aleo source code\" \\}\n * @returns {u64 | Error}\n * @param {string} program\n * @param {object | undefined} [imports]\n * @returns {Promise}\n */\n static estimateDeploymentFee(program, imports) {\n const ptr0 = passStringToWasm0(program, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n const ret = wasm.programmanager_estimateDeploymentFee(ptr0, len0, isLikeNone(imports) ? 0 : addHeapObject(imports));\n return takeObject(ret);\n }\n /**\n * Estimate the component of the deployment cost which comes from the fee for the program name.\n * Note that this cost does not represent the entire cost of deployment. It is additional to\n * the cost of the size (in bytes) of the deployment.\n *\n * Disclaimer: Fee estimation is experimental and may not represent a correct estimate on any current or future network\n *\n * @param name The name of the program to be deployed\n * @returns {u64 | Error}\n * @param {string} name\n * @returns {bigint}\n */\n static estimateProgramNameCost(name) {\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n const ptr0 = passStringToWasm0(name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n wasm.programmanager_estimateProgramNameCost(retptr, ptr0, len0);\n var r0 = getBigInt64Memory0()[retptr / 8 + 0];\n var r2 = getInt32Memory0()[retptr / 4 + 2];\n var r3 = getInt32Memory0()[retptr / 4 + 3];\n if (r3) {\n throw takeObject(r2);\n }\n return BigInt.asUintN(64, r0);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n }\n }\n /**\n * Execute an arbitrary function locally\n *\n * @param {PrivateKey} private_key The private key of the sender\n * @param {string} program The source code of the program being executed\n * @param {string} function The name of the function to execute\n * @param {Array} inputs A javascript array of inputs to the function\n * @param {boolean} prove_execution If true, the execution will be proven and an execution object\n * containing the proof and the encrypted inputs and outputs needed to verify the proof offline\n * will be returned.\n * @param {boolean} cache Cache the proving and verifying keys in the Execution response.\n * If this is set to 'true' the keys synthesized will be stored in the Execution Response\n * and the `ProvingKey` and `VerifyingKey` can be retrieved from the response via the `.getKeys()`\n * method.\n * @param {Object | undefined} imports (optional) Provide a list of imports to use for the function execution in the\n * form of a javascript object where the keys are a string of the program name and the values\n * are a string representing the program source code \\{ \"hello.aleo\": \"hello.aleo source code\" \\}\n * @param {ProvingKey | undefined} proving_key (optional) Provide a verifying key to use for the function execution\n * @param {VerifyingKey | undefined} verifying_key (optional) Provide a verifying key to use for the function execution\n * @param {PrivateKey} private_key\n * @param {string} program\n * @param {string} _function\n * @param {Array} inputs\n * @param {boolean} prove_execution\n * @param {boolean} cache\n * @param {object | undefined} [imports]\n * @param {ProvingKey | undefined} [proving_key]\n * @param {VerifyingKey | undefined} [verifying_key]\n * @param {string | undefined} [url]\n * @param {OfflineQuery | undefined} [offline_query]\n * @returns {Promise}\n */\n static executeFunctionOffline(private_key, program, _function, inputs, prove_execution, cache, imports, proving_key, verifying_key, url, offline_query) {\n _assertClass(private_key, PrivateKey);\n const ptr0 = passStringToWasm0(program, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n const ptr1 = passStringToWasm0(_function, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len1 = WASM_VECTOR_LEN;\n let ptr2 = 0;\n if (!isLikeNone(proving_key)) {\n _assertClass(proving_key, ProvingKey);\n ptr2 = proving_key.__destroy_into_raw();\n }\n let ptr3 = 0;\n if (!isLikeNone(verifying_key)) {\n _assertClass(verifying_key, VerifyingKey);\n ptr3 = verifying_key.__destroy_into_raw();\n }\n var ptr4 = isLikeNone(url) ? 0 : passStringToWasm0(url, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n var len4 = WASM_VECTOR_LEN;\n let ptr5 = 0;\n if (!isLikeNone(offline_query)) {\n _assertClass(offline_query, OfflineQuery);\n ptr5 = offline_query.__destroy_into_raw();\n }\n const ret = wasm.programmanager_executeFunctionOffline(private_key.__wbg_ptr, ptr0, len0, ptr1, len1, addHeapObject(inputs), prove_execution, cache, isLikeNone(imports) ? 0 : addHeapObject(imports), ptr2, ptr3, ptr4, len4, ptr5);\n return takeObject(ret);\n }\n /**\n * Execute Aleo function and create an Aleo execution transaction\n *\n * @param private_key The private key of the sender\n * @param program The source code of the program being executed\n * @param function The name of the function to execute\n * @param inputs A javascript array of inputs to the function\n * @param fee_credits The amount of credits to pay as a fee\n * @param fee_record The record to spend the fee from\n * @param url The url of the Aleo network node to send the transaction to\n * If this is set to 'true' the keys synthesized (or passed in as optional parameters via the\n * `proving_key` and `verifying_key` arguments) will be stored in the ProgramManager's memory\n * and used for subsequent transactions. If this is set to 'false' the proving and verifying\n * keys will be deallocated from memory after the transaction is executed.\n * @param imports (optional) Provide a list of imports to use for the function execution in the\n * form of a javascript object where the keys are a string of the program name and the values\n * are a string representing the program source code \\{ \"hello.aleo\": \"hello.aleo source code\" \\}\n * @param proving_key (optional) Provide a verifying key to use for the function execution\n * @param verifying_key (optional) Provide a verifying key to use for the function execution\n * @param fee_proving_key (optional) Provide a proving key to use for the fee execution\n * @param fee_verifying_key (optional) Provide a verifying key to use for the fee execution\n * @returns {Transaction | Error}\n * @param {PrivateKey} private_key\n * @param {string} program\n * @param {string} _function\n * @param {Array} inputs\n * @param {number} fee_credits\n * @param {RecordPlaintext | undefined} [fee_record]\n * @param {string | undefined} [url]\n * @param {object | undefined} [imports]\n * @param {ProvingKey | undefined} [proving_key]\n * @param {VerifyingKey | undefined} [verifying_key]\n * @param {ProvingKey | undefined} [fee_proving_key]\n * @param {VerifyingKey | undefined} [fee_verifying_key]\n * @param {OfflineQuery | undefined} [offline_query]\n * @returns {Promise}\n */\n static buildExecutionTransaction(private_key, program, _function, inputs, fee_credits, fee_record, url, imports, proving_key, verifying_key, fee_proving_key, fee_verifying_key, offline_query) {\n _assertClass(private_key, PrivateKey);\n const ptr0 = passStringToWasm0(program, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n const ptr1 = passStringToWasm0(_function, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len1 = WASM_VECTOR_LEN;\n let ptr2 = 0;\n if (!isLikeNone(fee_record)) {\n _assertClass(fee_record, RecordPlaintext);\n ptr2 = fee_record.__destroy_into_raw();\n }\n var ptr3 = isLikeNone(url) ? 0 : passStringToWasm0(url, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n var len3 = WASM_VECTOR_LEN;\n let ptr4 = 0;\n if (!isLikeNone(proving_key)) {\n _assertClass(proving_key, ProvingKey);\n ptr4 = proving_key.__destroy_into_raw();\n }\n let ptr5 = 0;\n if (!isLikeNone(verifying_key)) {\n _assertClass(verifying_key, VerifyingKey);\n ptr5 = verifying_key.__destroy_into_raw();\n }\n let ptr6 = 0;\n if (!isLikeNone(fee_proving_key)) {\n _assertClass(fee_proving_key, ProvingKey);\n ptr6 = fee_proving_key.__destroy_into_raw();\n }\n let ptr7 = 0;\n if (!isLikeNone(fee_verifying_key)) {\n _assertClass(fee_verifying_key, VerifyingKey);\n ptr7 = fee_verifying_key.__destroy_into_raw();\n }\n let ptr8 = 0;\n if (!isLikeNone(offline_query)) {\n _assertClass(offline_query, OfflineQuery);\n ptr8 = offline_query.__destroy_into_raw();\n }\n const ret = wasm.programmanager_buildExecutionTransaction(private_key.__wbg_ptr, ptr0, len0, ptr1, len1, addHeapObject(inputs), fee_credits, ptr2, ptr3, len3, isLikeNone(imports) ? 0 : addHeapObject(imports), ptr4, ptr5, ptr6, ptr7, ptr8);\n return takeObject(ret);\n }\n /**\n * Estimate Fee for Aleo function execution. Note if \"cache\" is set to true, the proving and\n * verifying keys will be stored in the ProgramManager's memory and used for subsequent\n * program executions.\n *\n * Disclaimer: Fee estimation is experimental and may not represent a correct estimate on any current or future network\n *\n * @param private_key The private key of the sender\n * @param program The source code of the program to estimate the execution fee for\n * @param function The name of the function to execute\n * @param inputs A javascript array of inputs to the function\n * @param url The url of the Aleo network node to send the transaction to\n * @param imports (optional) Provide a list of imports to use for the fee estimation in the\n * form of a javascript object where the keys are a string of the program name and the values\n * are a string representing the program source code \\{ \"hello.aleo\": \"hello.aleo source code\" \\}\n * @param proving_key (optional) Provide a verifying key to use for the fee estimation\n * @param verifying_key (optional) Provide a verifying key to use for the fee estimation\n * @returns {u64 | Error} Fee in microcredits\n * @param {PrivateKey} private_key\n * @param {string} program\n * @param {string} _function\n * @param {Array} inputs\n * @param {string | undefined} [url]\n * @param {object | undefined} [imports]\n * @param {ProvingKey | undefined} [proving_key]\n * @param {VerifyingKey | undefined} [verifying_key]\n * @param {OfflineQuery | undefined} [offline_query]\n * @returns {Promise}\n */\n static estimateExecutionFee(private_key, program, _function, inputs, url, imports, proving_key, verifying_key, offline_query) {\n _assertClass(private_key, PrivateKey);\n const ptr0 = passStringToWasm0(program, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n const ptr1 = passStringToWasm0(_function, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len1 = WASM_VECTOR_LEN;\n var ptr2 = isLikeNone(url) ? 0 : passStringToWasm0(url, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n var len2 = WASM_VECTOR_LEN;\n let ptr3 = 0;\n if (!isLikeNone(proving_key)) {\n _assertClass(proving_key, ProvingKey);\n ptr3 = proving_key.__destroy_into_raw();\n }\n let ptr4 = 0;\n if (!isLikeNone(verifying_key)) {\n _assertClass(verifying_key, VerifyingKey);\n ptr4 = verifying_key.__destroy_into_raw();\n }\n let ptr5 = 0;\n if (!isLikeNone(offline_query)) {\n _assertClass(offline_query, OfflineQuery);\n ptr5 = offline_query.__destroy_into_raw();\n }\n const ret = wasm.programmanager_estimateExecutionFee(private_key.__wbg_ptr, ptr0, len0, ptr1, len1, addHeapObject(inputs), ptr2, len2, isLikeNone(imports) ? 0 : addHeapObject(imports), ptr3, ptr4, ptr5);\n return takeObject(ret);\n }\n /**\n * Estimate the finalize fee component for executing a function. This fee is additional to the\n * size of the execution of the program in bytes. If the function does not have a finalize\n * step, then the finalize fee is 0.\n *\n * Disclaimer: Fee estimation is experimental and may not represent a correct estimate on any current or future network\n *\n * @param program The program containing the function to estimate the finalize fee for\n * @param function The function to estimate the finalize fee for\n * @returns {u64 | Error} Fee in microcredits\n * @param {string} program\n * @param {string} _function\n * @returns {bigint}\n */\n static estimateFinalizeFee(program, _function) {\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n const ptr0 = passStringToWasm0(program, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n const ptr1 = passStringToWasm0(_function, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len1 = WASM_VECTOR_LEN;\n wasm.programmanager_estimateFinalizeFee(retptr, ptr0, len0, ptr1, len1);\n var r0 = getBigInt64Memory0()[retptr / 8 + 0];\n var r2 = getInt32Memory0()[retptr / 4 + 2];\n var r3 = getInt32Memory0()[retptr / 4 + 3];\n if (r3) {\n throw takeObject(r2);\n }\n return BigInt.asUintN(64, r0);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n }\n }\n /**\n * Join two records together to create a new record with an amount of credits equal to the sum\n * of the credits of the two original records\n *\n * @param private_key The private key of the sender\n * @param record_1 The first record to combine\n * @param record_2 The second record to combine\n * @param fee_credits The amount of credits to pay as a fee\n * @param fee_record The record to spend the fee from\n * @param url The url of the Aleo network node to send the transaction to\n * @param join_proving_key (optional) Provide a proving key to use for the join function\n * @param join_verifying_key (optional) Provide a verifying key to use for the join function\n * @param fee_proving_key (optional) Provide a proving key to use for the fee execution\n * @param fee_verifying_key (optional) Provide a verifying key to use for the fee execution\n * @returns {Transaction | Error} Transaction object\n * @param {PrivateKey} private_key\n * @param {RecordPlaintext} record_1\n * @param {RecordPlaintext} record_2\n * @param {number} fee_credits\n * @param {RecordPlaintext | undefined} [fee_record]\n * @param {string | undefined} [url]\n * @param {ProvingKey | undefined} [join_proving_key]\n * @param {VerifyingKey | undefined} [join_verifying_key]\n * @param {ProvingKey | undefined} [fee_proving_key]\n * @param {VerifyingKey | undefined} [fee_verifying_key]\n * @param {OfflineQuery | undefined} [offline_query]\n * @returns {Promise}\n */\n static buildJoinTransaction(private_key, record_1, record_2, fee_credits, fee_record, url, join_proving_key, join_verifying_key, fee_proving_key, fee_verifying_key, offline_query) {\n _assertClass(private_key, PrivateKey);\n _assertClass(record_1, RecordPlaintext);\n var ptr0 = record_1.__destroy_into_raw();\n _assertClass(record_2, RecordPlaintext);\n var ptr1 = record_2.__destroy_into_raw();\n let ptr2 = 0;\n if (!isLikeNone(fee_record)) {\n _assertClass(fee_record, RecordPlaintext);\n ptr2 = fee_record.__destroy_into_raw();\n }\n var ptr3 = isLikeNone(url) ? 0 : passStringToWasm0(url, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n var len3 = WASM_VECTOR_LEN;\n let ptr4 = 0;\n if (!isLikeNone(join_proving_key)) {\n _assertClass(join_proving_key, ProvingKey);\n ptr4 = join_proving_key.__destroy_into_raw();\n }\n let ptr5 = 0;\n if (!isLikeNone(join_verifying_key)) {\n _assertClass(join_verifying_key, VerifyingKey);\n ptr5 = join_verifying_key.__destroy_into_raw();\n }\n let ptr6 = 0;\n if (!isLikeNone(fee_proving_key)) {\n _assertClass(fee_proving_key, ProvingKey);\n ptr6 = fee_proving_key.__destroy_into_raw();\n }\n let ptr7 = 0;\n if (!isLikeNone(fee_verifying_key)) {\n _assertClass(fee_verifying_key, VerifyingKey);\n ptr7 = fee_verifying_key.__destroy_into_raw();\n }\n let ptr8 = 0;\n if (!isLikeNone(offline_query)) {\n _assertClass(offline_query, OfflineQuery);\n ptr8 = offline_query.__destroy_into_raw();\n }\n const ret = wasm.programmanager_buildJoinTransaction(private_key.__wbg_ptr, ptr0, ptr1, fee_credits, ptr2, ptr3, len3, ptr4, ptr5, ptr6, ptr7, ptr8);\n return takeObject(ret);\n }\n /**\n * Split an Aleo credits record into two separate records. This function does not require a fee.\n *\n * @param private_key The private key of the sender\n * @param split_amount The amount of the credit split. This amount will be subtracted from the\n * value of the record and two new records will be created with the split amount and the remainder\n * @param amount_record The record to split\n * @param url The url of the Aleo network node to send the transaction to\n * @param split_proving_key (optional) Provide a proving key to use for the split function\n * @param split_verifying_key (optional) Provide a verifying key to use for the split function\n * @returns {Transaction | Error} Transaction object\n * @param {PrivateKey} private_key\n * @param {number} split_amount\n * @param {RecordPlaintext} amount_record\n * @param {string | undefined} [url]\n * @param {ProvingKey | undefined} [split_proving_key]\n * @param {VerifyingKey | undefined} [split_verifying_key]\n * @param {OfflineQuery | undefined} [offline_query]\n * @returns {Promise}\n */\n static buildSplitTransaction(private_key, split_amount, amount_record, url, split_proving_key, split_verifying_key, offline_query) {\n _assertClass(private_key, PrivateKey);\n _assertClass(amount_record, RecordPlaintext);\n var ptr0 = amount_record.__destroy_into_raw();\n var ptr1 = isLikeNone(url) ? 0 : passStringToWasm0(url, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n var len1 = WASM_VECTOR_LEN;\n let ptr2 = 0;\n if (!isLikeNone(split_proving_key)) {\n _assertClass(split_proving_key, ProvingKey);\n ptr2 = split_proving_key.__destroy_into_raw();\n }\n let ptr3 = 0;\n if (!isLikeNone(split_verifying_key)) {\n _assertClass(split_verifying_key, VerifyingKey);\n ptr3 = split_verifying_key.__destroy_into_raw();\n }\n let ptr4 = 0;\n if (!isLikeNone(offline_query)) {\n _assertClass(offline_query, OfflineQuery);\n ptr4 = offline_query.__destroy_into_raw();\n }\n const ret = wasm.programmanager_buildSplitTransaction(private_key.__wbg_ptr, split_amount, ptr0, ptr1, len1, ptr2, ptr3, ptr4);\n return takeObject(ret);\n }\n /**\n * Send credits from one Aleo account to another\n *\n * @param private_key The private key of the sender\n * @param amount_credits The amount of credits to send\n * @param recipient The recipient of the transaction\n * @param transfer_type The type of the transfer (options: \"private\", \"public\", \"private_to_public\", \"public_to_private\")\n * @param amount_record The record to fund the amount from\n * @param fee_credits The amount of credits to pay as a fee\n * @param fee_record The record to spend the fee from\n * @param url The url of the Aleo network node to send the transaction to\n * @param transfer_verifying_key (optional) Provide a verifying key to use for the transfer\n * function\n * @param fee_proving_key (optional) Provide a proving key to use for the fee execution\n * @param fee_verifying_key (optional) Provide a verifying key to use for the fee execution\n * @returns {Transaction | Error}\n * @param {PrivateKey} private_key\n * @param {number} amount_credits\n * @param {string} recipient\n * @param {string} transfer_type\n * @param {RecordPlaintext | undefined} amount_record\n * @param {number} fee_credits\n * @param {RecordPlaintext | undefined} [fee_record]\n * @param {string | undefined} [url]\n * @param {ProvingKey | undefined} [transfer_proving_key]\n * @param {VerifyingKey | undefined} [transfer_verifying_key]\n * @param {ProvingKey | undefined} [fee_proving_key]\n * @param {VerifyingKey | undefined} [fee_verifying_key]\n * @param {OfflineQuery | undefined} [offline_query]\n * @returns {Promise}\n */\n static buildTransferTransaction(private_key, amount_credits, recipient, transfer_type, amount_record, fee_credits, fee_record, url, transfer_proving_key, transfer_verifying_key, fee_proving_key, fee_verifying_key, offline_query) {\n _assertClass(private_key, PrivateKey);\n const ptr0 = passStringToWasm0(recipient, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n const ptr1 = passStringToWasm0(transfer_type, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len1 = WASM_VECTOR_LEN;\n let ptr2 = 0;\n if (!isLikeNone(amount_record)) {\n _assertClass(amount_record, RecordPlaintext);\n ptr2 = amount_record.__destroy_into_raw();\n }\n let ptr3 = 0;\n if (!isLikeNone(fee_record)) {\n _assertClass(fee_record, RecordPlaintext);\n ptr3 = fee_record.__destroy_into_raw();\n }\n var ptr4 = isLikeNone(url) ? 0 : passStringToWasm0(url, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n var len4 = WASM_VECTOR_LEN;\n let ptr5 = 0;\n if (!isLikeNone(transfer_proving_key)) {\n _assertClass(transfer_proving_key, ProvingKey);\n ptr5 = transfer_proving_key.__destroy_into_raw();\n }\n let ptr6 = 0;\n if (!isLikeNone(transfer_verifying_key)) {\n _assertClass(transfer_verifying_key, VerifyingKey);\n ptr6 = transfer_verifying_key.__destroy_into_raw();\n }\n let ptr7 = 0;\n if (!isLikeNone(fee_proving_key)) {\n _assertClass(fee_proving_key, ProvingKey);\n ptr7 = fee_proving_key.__destroy_into_raw();\n }\n let ptr8 = 0;\n if (!isLikeNone(fee_verifying_key)) {\n _assertClass(fee_verifying_key, VerifyingKey);\n ptr8 = fee_verifying_key.__destroy_into_raw();\n }\n let ptr9 = 0;\n if (!isLikeNone(offline_query)) {\n _assertClass(offline_query, OfflineQuery);\n ptr9 = offline_query.__destroy_into_raw();\n }\n const ret = wasm.programmanager_buildTransferTransaction(private_key.__wbg_ptr, amount_credits, ptr0, len0, ptr1, len1, ptr2, fee_credits, ptr3, ptr4, len4, ptr5, ptr6, ptr7, ptr8, ptr9);\n return takeObject(ret);\n }\n /**\n * Synthesize proving and verifying keys for a program\n *\n * @param program {string} The program source code of the program to synthesize keys for\n * @param function_id {string} The function to synthesize keys for\n * @param inputs {Array} The inputs to the function\n * @param imports {Object | undefined} The imports for the program\n * @param {PrivateKey} private_key\n * @param {string} program\n * @param {string} function_id\n * @param {Array} inputs\n * @param {object | undefined} [imports]\n * @returns {Promise}\n */\n static synthesizeKeyPair(private_key, program, function_id, inputs, imports) {\n _assertClass(private_key, PrivateKey);\n const ptr0 = passStringToWasm0(program, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n const ptr1 = passStringToWasm0(function_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len1 = WASM_VECTOR_LEN;\n const ret = wasm.programmanager_synthesizeKeyPair(private_key.__wbg_ptr, ptr0, len0, ptr1, len1, addHeapObject(inputs), isLikeNone(imports) ? 0 : addHeapObject(imports));\n return takeObject(ret);\n }\n}\n\nconst ProvingKeyFinalization = (typeof FinalizationRegistry === 'undefined')\n ? { register: () => {}, unregister: () => {} }\n : new FinalizationRegistry(ptr => wasm.__wbg_provingkey_free(ptr >>> 0));\n/**\n* Proving key for a function within an Aleo program\n*/\nclass ProvingKey {\n\n static __wrap(ptr) {\n ptr = ptr >>> 0;\n const obj = Object.create(ProvingKey.prototype);\n obj.__wbg_ptr = ptr;\n ProvingKeyFinalization.register(obj, obj.__wbg_ptr, obj);\n return obj;\n }\n\n __destroy_into_raw() {\n const ptr = this.__wbg_ptr;\n this.__wbg_ptr = 0;\n ProvingKeyFinalization.unregister(this);\n return ptr;\n }\n\n free() {\n const ptr = this.__destroy_into_raw();\n wasm.__wbg_provingkey_free(ptr);\n }\n /**\n * Verify if the proving key is for the bond_public function\n *\n * @example\n * const provingKey = ProvingKey.fromBytes(\"bond_public_proving_key.bin\");\n * provingKey.isBondPublicProver() ? console.log(\"Key verified\") : throw new Error(\"Invalid key\");\n *\n * @returns {boolean} returns true if the proving key is for the bond_public function, false if otherwise\n * @returns {boolean}\n */\n isBondPublicProver() {\n const ret = wasm.provingkey_isBondPublicProver(this.__wbg_ptr);\n return ret !== 0;\n }\n /**\n * Verify if the proving key is for the bond_validator function\n *\n * @example\n * const provingKey = ProvingKey.fromBytes(\"bond_validator_proving_key.bin\");\n * provingKey.isBondPublicProver() ? console.log(\"Key verified\") : throw new Error(\"Invalid key\");\n *\n * @returns {boolean} returns true if the proving key is for the bond_validator function, false if otherwise\n * @returns {boolean}\n */\n isBondValidatorProver() {\n const ret = wasm.provingkey_isBondValidatorProver(this.__wbg_ptr);\n return ret !== 0;\n }\n /**\n * Verify if the proving key is for the claim_unbond function\n *\n * @example\n * const provingKey = ProvingKey.fromBytes(\"claim_unbond_proving_key.bin\");\n * provingKey.isClaimUnbondProver() ? console.log(\"Key verified\") : throw new Error(\"Invalid key\");\n *\n * @returns {boolean} returns true if the proving key is for the claim_unbond function, false if otherwise\n * @returns {boolean}\n */\n isClaimUnbondPublicProver() {\n const ret = wasm.provingkey_isClaimUnbondPublicProver(this.__wbg_ptr);\n return ret !== 0;\n }\n /**\n * Verify if the proving key is for the fee_private function\n *\n * @example\n * const provingKey = ProvingKey.fromBytes(\"fee_private_proving_key.bin\");\n * provingKey.isFeePrivateProver() ? console.log(\"Key verified\") : throw new Error(\"Invalid key\");\n *\n * @returns {boolean} returns true if the proving key is for the fee_private function, false if otherwise\n * @returns {boolean}\n */\n isFeePrivateProver() {\n const ret = wasm.provingkey_isFeePrivateProver(this.__wbg_ptr);\n return ret !== 0;\n }\n /**\n * Verify if the proving key is for the fee_public function\n *\n * @example\n * const provingKey = ProvingKey.fromBytes(\"fee_public_proving_key.bin\");\n * provingKey.isFeePublicProver() ? console.log(\"Key verified\") : throw new Error(\"Invalid key\");\n *\n * @returns {boolean} returns true if the proving key is for the fee_public function, false if otherwise\n * @returns {boolean}\n */\n isFeePublicProver() {\n const ret = wasm.provingkey_isFeePublicProver(this.__wbg_ptr);\n return ret !== 0;\n }\n /**\n * Verify if the proving key is for the inclusion function\n *\n * @example\n * const provingKey = ProvingKey.fromBytes(\"inclusion_proving_key.bin\");\n * provingKey.isInclusionProver() ? console.log(\"Key verified\") : throw new Error(\"Invalid key\");\n *\n * @returns {boolean} returns true if the proving key is for the inclusion function, false if otherwise\n * @returns {boolean}\n */\n isInclusionProver() {\n const ret = wasm.provingkey_isInclusionProver(this.__wbg_ptr);\n return ret !== 0;\n }\n /**\n * Verify if the proving key is for the join function\n *\n * @example\n * const provingKey = ProvingKey.fromBytes(\"join_proving_key.bin\");\n * provingKey.isJoinProver() ? console.log(\"Key verified\") : throw new Error(\"Invalid key\");\n *\n * @returns {boolean} returns true if the proving key is for the join function, false if otherwise\n * @returns {boolean}\n */\n isJoinProver() {\n const ret = wasm.provingkey_isJoinProver(this.__wbg_ptr);\n return ret !== 0;\n }\n /**\n * Verify if the proving key is for the set_validator_state function\n *\n * @example\n * const provingKey = ProvingKey.fromBytes(\"set_validator_set_proving_key.bin\");\n * provingKey.isSetValidatorStateProver() ? console.log(\"Key verified\") : throw new Error(\"Invalid key\");\n *\n * @returns {boolean} returns true if the proving key is for the set_validator_state function, false if otherwise\n * @returns {boolean}\n */\n isSetValidatorStateProver() {\n const ret = wasm.provingkey_isSetValidatorStateProver(this.__wbg_ptr);\n return ret !== 0;\n }\n /**\n * Verify if the proving key is for the split function\n *\n * @example\n * const provingKey = ProvingKey.fromBytes(\"split_proving_key.bin\");\n * provingKey.isSplitProver() ? console.log(\"Key verified\") : throw new Error(\"Invalid key\");\n *\n * @returns {boolean} returns true if the proving key is for the split function, false if otherwise\n * @returns {boolean}\n */\n isSplitProver() {\n const ret = wasm.provingkey_isSplitProver(this.__wbg_ptr);\n return ret !== 0;\n }\n /**\n * Verify if the proving key is for the transfer_private function\n *\n * @example\n * const provingKey = ProvingKey.fromBytes(\"transfer_private_proving_key.bin\");\n * provingKey.isTransferPrivateProver() ? console.log(\"Key verified\") : throw new Error(\"Invalid key\");\n *\n * @returns {boolean} returns true if the proving key is for the transfer_private function, false if otherwise\n * @returns {boolean}\n */\n isTransferPrivateProver() {\n const ret = wasm.provingkey_isTransferPrivateProver(this.__wbg_ptr);\n return ret !== 0;\n }\n /**\n * Verify if the proving key is for the transfer_private_to_public function\n *\n * @example\n * const provingKey = ProvingKey.fromBytes(\"transfer_private_to_public_proving_key.bin\");\n * provingKey.isTransferPrivateToPublicProver() ? console.log(\"Key verified\") : throw new Error(\"Invalid key\");\n *\n * @returns {boolean} returns true if the proving key is for the transfer_private_to_public function, false if otherwise\n * @returns {boolean}\n */\n isTransferPrivateToPublicProver() {\n const ret = wasm.provingkey_isTransferPrivateToPublicProver(this.__wbg_ptr);\n return ret !== 0;\n }\n /**\n * Verify if the proving key is for the transfer_public function\n *\n * @example\n * const provingKey = ProvingKey.fromBytes(\"transfer_public_proving_key.bin\");\n * provingKey.isTransferPublicProver() ? console.log(\"Key verified\") : throw new Error(\"Invalid key\");\n *\n * @returns {boolean} returns true if the proving key is for the transfer_public function, false if otherwise\n * @returns {boolean}\n */\n isTransferPublicProver() {\n const ret = wasm.provingkey_isTransferPublicProver(this.__wbg_ptr);\n return ret !== 0;\n }\n /**\n * Verify if the proving key is for the transfer_public_as_signer function\n *\n * @example\n * const provingKey = ProvingKey.fromBytes(\"transfer_public_as_signer_proving_key.bin\");\n * provingKey.isTransferPublicAsSignerProver() ? console.log(\"Key verified\") : throw new Error(\"Invalid key\");\n *\n * @returns {boolean} returns true if the proving key is for the transfer_public function, false if otherwise\n * @returns {boolean}\n */\n isTransferPublicAsSignerProver() {\n const ret = wasm.provingkey_isTransferPublicAsSignerProver(this.__wbg_ptr);\n return ret !== 0;\n }\n /**\n * Verify if the proving key is for the transfer_public_to_private function\n *\n * @example\n * const provingKey = ProvingKey.fromBytes(\"transfer_public_to_private_proving_key.bin\");\n * provingKey.isTransferPublicToPrivateProver() ? console.log(\"Key verified\") : throw new Error(\"Invalid key\");\n *\n * @returns {boolean} returns true if the proving key is for the transfer_public_to_private function, false if otherwise\n * @returns {boolean}\n */\n isTransferPublicToPrivateProver() {\n const ret = wasm.provingkey_isTransferPublicToPrivateProver(this.__wbg_ptr);\n return ret !== 0;\n }\n /**\n * Verify if the proving key is for the unbond_public function\n *\n * @example\n * const provingKey = ProvingKey.fromBytes(\"unbond_public.bin\");\n * provingKey.isUnbondPublicProver() ? console.log(\"Key verified\") : throw new Error(\"Invalid key\");\n *\n * @returns {boolean} returns true if the proving key is for the unbond_public_prover function, false if otherwise\n * @returns {boolean}\n */\n isUnbondPublicProver() {\n const ret = wasm.provingkey_isUnbondPublicProver(this.__wbg_ptr);\n return ret !== 0;\n }\n /**\n * Return the checksum of the proving key\n *\n * @returns {string} Checksum of the proving key\n * @returns {string}\n */\n checksum() {\n let deferred1_0;\n let deferred1_1;\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n wasm.provingkey_checksum(retptr, this.__wbg_ptr);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n deferred1_0 = r0;\n deferred1_1 = r1;\n return getStringFromWasm0(r0, r1);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);\n }\n }\n /**\n * Create a copy of the proving key\n *\n * @returns {ProvingKey} A copy of the proving key\n * @returns {ProvingKey}\n */\n copy() {\n const ret = wasm.provingkey_copy(this.__wbg_ptr);\n return ProvingKey.__wrap(ret);\n }\n /**\n * Construct a new proving key from a byte array\n *\n * @param {Uint8Array} bytes Byte array representation of a proving key\n * @returns {ProvingKey | Error}\n * @param {Uint8Array} bytes\n * @returns {ProvingKey}\n */\n static fromBytes(bytes) {\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n const ptr0 = passArray8ToWasm0(bytes, wasm.__wbindgen_malloc);\n const len0 = WASM_VECTOR_LEN;\n wasm.provingkey_fromBytes(retptr, ptr0, len0);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n var r2 = getInt32Memory0()[retptr / 4 + 2];\n if (r2) {\n throw takeObject(r1);\n }\n return ProvingKey.__wrap(r0);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n }\n }\n /**\n * Create a proving key from string\n *\n * @param {string | Error} String representation of the proving key\n * @param {string} string\n * @returns {ProvingKey}\n */\n static fromString(string) {\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n const ptr0 = passStringToWasm0(string, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n wasm.provingkey_fromString(retptr, ptr0, len0);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n var r2 = getInt32Memory0()[retptr / 4 + 2];\n if (r2) {\n throw takeObject(r1);\n }\n return ProvingKey.__wrap(r0);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n }\n }\n /**\n * Return the byte representation of a proving key\n *\n * @returns {Uint8Array | Error} Byte array representation of a proving key\n * @returns {Uint8Array}\n */\n toBytes() {\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n wasm.provingkey_toBytes(retptr, this.__wbg_ptr);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n var r2 = getInt32Memory0()[retptr / 4 + 2];\n var r3 = getInt32Memory0()[retptr / 4 + 3];\n if (r3) {\n throw takeObject(r2);\n }\n var v1 = getArrayU8FromWasm0(r0, r1).slice();\n wasm.__wbindgen_free(r0, r1 * 1, 1);\n return v1;\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n }\n }\n /**\n * Get a string representation of the proving key\n *\n * @returns {string} String representation of the proving key\n * @returns {string}\n */\n toString() {\n let deferred1_0;\n let deferred1_1;\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n wasm.provingkey_toString(retptr, this.__wbg_ptr);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n deferred1_0 = r0;\n deferred1_1 = r1;\n return getStringFromWasm0(r0, r1);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);\n }\n }\n}\n\nconst RecordCiphertextFinalization = (typeof FinalizationRegistry === 'undefined')\n ? { register: () => {}, unregister: () => {} }\n : new FinalizationRegistry(ptr => wasm.__wbg_recordciphertext_free(ptr >>> 0));\n/**\n* Encrypted Aleo record\n*/\nclass RecordCiphertext {\n\n static __wrap(ptr) {\n ptr = ptr >>> 0;\n const obj = Object.create(RecordCiphertext.prototype);\n obj.__wbg_ptr = ptr;\n RecordCiphertextFinalization.register(obj, obj.__wbg_ptr, obj);\n return obj;\n }\n\n __destroy_into_raw() {\n const ptr = this.__wbg_ptr;\n this.__wbg_ptr = 0;\n RecordCiphertextFinalization.unregister(this);\n return ptr;\n }\n\n free() {\n const ptr = this.__destroy_into_raw();\n wasm.__wbg_recordciphertext_free(ptr);\n }\n /**\n * Create a record ciphertext from a string\n *\n * @param {string} record String representation of a record ciphertext\n * @returns {RecordCiphertext | Error} Record ciphertext\n * @param {string} record\n * @returns {RecordCiphertext}\n */\n static fromString(record) {\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n const ptr0 = passStringToWasm0(record, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n wasm.recordciphertext_fromString(retptr, ptr0, len0);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n var r2 = getInt32Memory0()[retptr / 4 + 2];\n if (r2) {\n throw takeObject(r1);\n }\n return RecordCiphertext.__wrap(r0);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n }\n }\n /**\n * Return the string reprensentation of the record ciphertext\n *\n * @returns {string} String representation of the record ciphertext\n * @returns {string}\n */\n toString() {\n let deferred1_0;\n let deferred1_1;\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n wasm.recordciphertext_toString(retptr, this.__wbg_ptr);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n deferred1_0 = r0;\n deferred1_1 = r1;\n return getStringFromWasm0(r0, r1);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);\n }\n }\n /**\n * Decrypt the record ciphertext into plaintext using the view key. The record will only\n * decrypt if the record was encrypted by the account corresponding to the view key\n *\n * @param {ViewKey} view_key View key used to decrypt the ciphertext\n * @returns {RecordPlaintext | Error} Record plaintext object\n * @param {ViewKey} view_key\n * @returns {RecordPlaintext}\n */\n decrypt(view_key) {\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n _assertClass(view_key, ViewKey);\n wasm.recordciphertext_decrypt(retptr, this.__wbg_ptr, view_key.__wbg_ptr);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n var r2 = getInt32Memory0()[retptr / 4 + 2];\n if (r2) {\n throw takeObject(r1);\n }\n return RecordPlaintext.__wrap(r0);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n }\n }\n /**\n * Determines if the account corresponding to the view key is the owner of the record\n *\n * @param {ViewKey} view_key View key used to decrypt the ciphertext\n * @returns {boolean}\n * @param {ViewKey} view_key\n * @returns {boolean}\n */\n isOwner(view_key) {\n _assertClass(view_key, ViewKey);\n const ret = wasm.recordciphertext_isOwner(this.__wbg_ptr, view_key.__wbg_ptr);\n return ret !== 0;\n }\n}\n\nconst RecordPlaintextFinalization = (typeof FinalizationRegistry === 'undefined')\n ? { register: () => {}, unregister: () => {} }\n : new FinalizationRegistry(ptr => wasm.__wbg_recordplaintext_free(ptr >>> 0));\n/**\n* Plaintext representation of an Aleo record\n*/\nclass RecordPlaintext {\n\n static __wrap(ptr) {\n ptr = ptr >>> 0;\n const obj = Object.create(RecordPlaintext.prototype);\n obj.__wbg_ptr = ptr;\n RecordPlaintextFinalization.register(obj, obj.__wbg_ptr, obj);\n return obj;\n }\n\n __destroy_into_raw() {\n const ptr = this.__wbg_ptr;\n this.__wbg_ptr = 0;\n RecordPlaintextFinalization.unregister(this);\n return ptr;\n }\n\n free() {\n const ptr = this.__destroy_into_raw();\n wasm.__wbg_recordplaintext_free(ptr);\n }\n /**\n * @param {string} program_id\n * @param {string} record_name\n * @returns {Field}\n */\n commitment(program_id, record_name) {\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n const ptr0 = passStringToWasm0(program_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n const ptr1 = passStringToWasm0(record_name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len1 = WASM_VECTOR_LEN;\n wasm.recordplaintext_commitment(retptr, this.__wbg_ptr, ptr0, len0, ptr1, len1);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n var r2 = getInt32Memory0()[retptr / 4 + 2];\n if (r2) {\n throw takeObject(r1);\n }\n return Field.__wrap(r0);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n }\n }\n /**\n * Return a record plaintext from a string.\n *\n * @param {string} record String representation of a plaintext representation of an Aleo record\n * @returns {RecordPlaintext | Error} Record plaintext\n * @param {string} record\n * @returns {RecordPlaintext}\n */\n static fromString(record) {\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n const ptr0 = passStringToWasm0(record, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n wasm.recordplaintext_fromString(retptr, ptr0, len0);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n var r2 = getInt32Memory0()[retptr / 4 + 2];\n if (r2) {\n throw takeObject(r1);\n }\n return RecordPlaintext.__wrap(r0);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n }\n }\n /**\n * Returns the record plaintext string\n *\n * @returns {string} String representation of the record plaintext\n * @returns {string}\n */\n toString() {\n let deferred1_0;\n let deferred1_1;\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n wasm.recordplaintext_toString(retptr, this.__wbg_ptr);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n deferred1_0 = r0;\n deferred1_1 = r1;\n return getStringFromWasm0(r0, r1);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);\n }\n }\n /**\n * Returns the amount of microcredits in the record\n *\n * @returns {u64} Amount of microcredits in the record\n * @returns {bigint}\n */\n microcredits() {\n const ret = wasm.recordplaintext_microcredits(this.__wbg_ptr);\n return BigInt.asUintN(64, ret);\n }\n /**\n * Returns the nonce of the record. This can be used to uniquely identify a record.\n *\n * @returns {string} Nonce of the record\n * @returns {string}\n */\n nonce() {\n let deferred1_0;\n let deferred1_1;\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n wasm.recordplaintext_nonce(retptr, this.__wbg_ptr);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n deferred1_0 = r0;\n deferred1_1 = r1;\n return getStringFromWasm0(r0, r1);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);\n }\n }\n /**\n * Attempt to get the serial number of a record to determine whether or not is has been spent\n *\n * @param {PrivateKey} private_key Private key of the account that owns the record\n * @param {string} program_id Program ID of the program that the record is associated with\n * @param {string} record_name Name of the record\n * @returns {string | Error} Serial number of the record\n * @param {PrivateKey} private_key\n * @param {string} program_id\n * @param {string} record_name\n * @returns {string}\n */\n serialNumberString(private_key, program_id, record_name) {\n let deferred4_0;\n let deferred4_1;\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n _assertClass(private_key, PrivateKey);\n const ptr0 = passStringToWasm0(program_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n const ptr1 = passStringToWasm0(record_name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len1 = WASM_VECTOR_LEN;\n wasm.recordplaintext_serialNumberString(retptr, this.__wbg_ptr, private_key.__wbg_ptr, ptr0, len0, ptr1, len1);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n var r2 = getInt32Memory0()[retptr / 4 + 2];\n var r3 = getInt32Memory0()[retptr / 4 + 3];\n var ptr3 = r0;\n var len3 = r1;\n if (r3) {\n ptr3 = 0; len3 = 0;\n throw takeObject(r2);\n }\n deferred4_0 = ptr3;\n deferred4_1 = len3;\n return getStringFromWasm0(ptr3, len3);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n wasm.__wbindgen_free(deferred4_0, deferred4_1, 1);\n }\n }\n}\n\nconst SignatureFinalization = (typeof FinalizationRegistry === 'undefined')\n ? { register: () => {}, unregister: () => {} }\n : new FinalizationRegistry(ptr => wasm.__wbg_signature_free(ptr >>> 0));\n/**\n* Cryptographic signature of a message signed by an Aleo account\n*/\nclass Signature {\n\n static __wrap(ptr) {\n ptr = ptr >>> 0;\n const obj = Object.create(Signature.prototype);\n obj.__wbg_ptr = ptr;\n SignatureFinalization.register(obj, obj.__wbg_ptr, obj);\n return obj;\n }\n\n __destroy_into_raw() {\n const ptr = this.__wbg_ptr;\n this.__wbg_ptr = 0;\n SignatureFinalization.unregister(this);\n return ptr;\n }\n\n free() {\n const ptr = this.__destroy_into_raw();\n wasm.__wbg_signature_free(ptr);\n }\n /**\n * Sign a message with a private key\n *\n * @param {PrivateKey} private_key The private key to sign the message with\n * @param {Uint8Array} message Byte representation of the message to sign\n * @returns {Signature} Signature of the message\n * @param {PrivateKey} private_key\n * @param {Uint8Array} message\n * @returns {Signature}\n */\n static sign(private_key, message) {\n _assertClass(private_key, PrivateKey);\n const ptr0 = passArray8ToWasm0(message, wasm.__wbindgen_malloc);\n const len0 = WASM_VECTOR_LEN;\n const ret = wasm.privatekey_sign(private_key.__wbg_ptr, ptr0, len0);\n return Signature.__wrap(ret);\n }\n /**\n * Verify a signature of a message with an address\n *\n * @param {Address} address The address to verify the signature with\n * @param {Uint8Array} message Byte representation of the message to verify\n * @returns {boolean} True if the signature is valid, false otherwise\n * @param {Address} address\n * @param {Uint8Array} message\n * @returns {boolean}\n */\n verify(address, message) {\n _assertClass(address, Address);\n const ptr0 = passArray8ToWasm0(message, wasm.__wbindgen_malloc);\n const len0 = WASM_VECTOR_LEN;\n const ret = wasm.signature_verify(this.__wbg_ptr, address.__wbg_ptr, ptr0, len0);\n return ret !== 0;\n }\n /**\n * Get a signature from a string representation of a signature\n *\n * @param {string} signature String representation of a signature\n * @returns {Signature} Signature\n * @param {string} signature\n * @returns {Signature}\n */\n static from_string(signature) {\n const ptr0 = passStringToWasm0(signature, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n const ret = wasm.signature_from_string(ptr0, len0);\n return Signature.__wrap(ret);\n }\n /**\n * Get a string representation of a signature\n *\n * @returns {string} String representation of a signature\n * @returns {string}\n */\n to_string() {\n let deferred1_0;\n let deferred1_1;\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n wasm.signature_to_string(retptr, this.__wbg_ptr);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n deferred1_0 = r0;\n deferred1_1 = r1;\n return getStringFromWasm0(r0, r1);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);\n }\n }\n}\n\nconst TransactionFinalization = (typeof FinalizationRegistry === 'undefined')\n ? { register: () => {}, unregister: () => {} }\n : new FinalizationRegistry(ptr => wasm.__wbg_transaction_free(ptr >>> 0));\n/**\n* Webassembly Representation of an Aleo transaction\n*\n* This object is created when generating an on-chain function deployment or execution and is the\n* object that should be submitted to the Aleo Network in order to deploy or execute a function.\n*/\nclass Transaction {\n\n static __wrap(ptr) {\n ptr = ptr >>> 0;\n const obj = Object.create(Transaction.prototype);\n obj.__wbg_ptr = ptr;\n TransactionFinalization.register(obj, obj.__wbg_ptr, obj);\n return obj;\n }\n\n __destroy_into_raw() {\n const ptr = this.__wbg_ptr;\n this.__wbg_ptr = 0;\n TransactionFinalization.unregister(this);\n return ptr;\n }\n\n free() {\n const ptr = this.__destroy_into_raw();\n wasm.__wbg_transaction_free(ptr);\n }\n /**\n * Create a transaction from a string\n *\n * @param {string} transaction String representation of a transaction\n * @returns {Transaction | Error}\n * @param {string} transaction\n * @returns {Transaction}\n */\n static fromString(transaction) {\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n const ptr0 = passStringToWasm0(transaction, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n wasm.transaction_fromString(retptr, ptr0, len0);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n var r2 = getInt32Memory0()[retptr / 4 + 2];\n if (r2) {\n throw takeObject(r1);\n }\n return Transaction.__wrap(r0);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n }\n }\n /**\n * Get the transaction as a string. If you want to submit this transaction to the Aleo Network\n * this function will create the string that should be submitted in the `POST` data.\n *\n * @returns {string} String representation of the transaction\n * @returns {string}\n */\n toString() {\n let deferred1_0;\n let deferred1_1;\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n wasm.transaction_toString(retptr, this.__wbg_ptr);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n deferred1_0 = r0;\n deferred1_1 = r1;\n return getStringFromWasm0(r0, r1);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);\n }\n }\n /**\n * Get the id of the transaction. This is the merkle root of the transaction's inclusion proof.\n *\n * This value can be used to query the status of the transaction on the Aleo Network to see\n * if it was successful. If successful, the transaction will be included in a block and this\n * value can be used to lookup the transaction data on-chain.\n *\n * @returns {string} Transaction id\n * @returns {string}\n */\n transactionId() {\n let deferred1_0;\n let deferred1_1;\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n wasm.transaction_transactionId(retptr, this.__wbg_ptr);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n deferred1_0 = r0;\n deferred1_1 = r1;\n return getStringFromWasm0(r0, r1);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);\n }\n }\n /**\n * Get the type of the transaction (will return \"deploy\" or \"execute\")\n *\n * @returns {string} Transaction type\n * @returns {string}\n */\n transactionType() {\n let deferred1_0;\n let deferred1_1;\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n wasm.transaction_transactionType(retptr, this.__wbg_ptr);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n deferred1_0 = r0;\n deferred1_1 = r1;\n return getStringFromWasm0(r0, r1);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);\n }\n }\n}\n\nconst VerifyingKeyFinalization = (typeof FinalizationRegistry === 'undefined')\n ? { register: () => {}, unregister: () => {} }\n : new FinalizationRegistry(ptr => wasm.__wbg_verifyingkey_free(ptr >>> 0));\n/**\n* Verifying key for a function within an Aleo program\n*/\nclass VerifyingKey {\n\n static __wrap(ptr) {\n ptr = ptr >>> 0;\n const obj = Object.create(VerifyingKey.prototype);\n obj.__wbg_ptr = ptr;\n VerifyingKeyFinalization.register(obj, obj.__wbg_ptr, obj);\n return obj;\n }\n\n __destroy_into_raw() {\n const ptr = this.__wbg_ptr;\n this.__wbg_ptr = 0;\n VerifyingKeyFinalization.unregister(this);\n return ptr;\n }\n\n free() {\n const ptr = this.__destroy_into_raw();\n wasm.__wbg_verifyingkey_free(ptr);\n }\n /**\n * Returns the verifying key for the bond_public function\n *\n * @returns {VerifyingKey} Verifying key for the bond_public function\n * @returns {VerifyingKey}\n */\n static bondPublicVerifier() {\n const ret = wasm.verifyingkey_bondPublicVerifier();\n return VerifyingKey.__wrap(ret);\n }\n /**\n * Returns the verifying key for the bond_validator function\n *\n * @returns {VerifyingKey} Verifying key for the bond_validator function\n * @returns {VerifyingKey}\n */\n static bondValidatorVerifier() {\n const ret = wasm.verifyingkey_bondValidatorVerifier();\n return VerifyingKey.__wrap(ret);\n }\n /**\n * Returns the verifying key for the claim_delegator function\n *\n * @returns {VerifyingKey} Verifying key for the claim_unbond_public function\n * @returns {VerifyingKey}\n */\n static claimUnbondPublicVerifier() {\n const ret = wasm.verifyingkey_claimUnbondPublicVerifier();\n return VerifyingKey.__wrap(ret);\n }\n /**\n * Returns the verifying key for the fee_private function\n *\n * @returns {VerifyingKey} Verifying key for the fee_private function\n * @returns {VerifyingKey}\n */\n static feePrivateVerifier() {\n const ret = wasm.verifyingkey_feePrivateVerifier();\n return VerifyingKey.__wrap(ret);\n }\n /**\n * Returns the verifying key for the fee_public function\n *\n * @returns {VerifyingKey} Verifying key for the fee_public function\n * @returns {VerifyingKey}\n */\n static feePublicVerifier() {\n const ret = wasm.verifyingkey_feePublicVerifier();\n return VerifyingKey.__wrap(ret);\n }\n /**\n * Returns the verifying key for the inclusion function\n *\n * @returns {VerifyingKey} Verifying key for the inclusion function\n * @returns {VerifyingKey}\n */\n static inclusionVerifier() {\n const ret = wasm.verifyingkey_inclusionVerifier();\n return VerifyingKey.__wrap(ret);\n }\n /**\n * Returns the verifying key for the join function\n *\n * @returns {VerifyingKey} Verifying key for the join function\n * @returns {VerifyingKey}\n */\n static joinVerifier() {\n const ret = wasm.verifyingkey_joinVerifier();\n return VerifyingKey.__wrap(ret);\n }\n /**\n * Returns the verifying key for the set_validator_state function\n *\n * @returns {VerifyingKey} Verifying key for the set_validator_state function\n * @returns {VerifyingKey}\n */\n static setValidatorStateVerifier() {\n const ret = wasm.verifyingkey_setValidatorStateVerifier();\n return VerifyingKey.__wrap(ret);\n }\n /**\n * Returns the verifying key for the split function\n *\n * @returns {VerifyingKey} Verifying key for the split function\n * @returns {VerifyingKey}\n */\n static splitVerifier() {\n const ret = wasm.verifyingkey_splitVerifier();\n return VerifyingKey.__wrap(ret);\n }\n /**\n * Returns the verifying key for the transfer_private function\n *\n * @returns {VerifyingKey} Verifying key for the transfer_private function\n * @returns {VerifyingKey}\n */\n static transferPrivateVerifier() {\n const ret = wasm.verifyingkey_transferPrivateVerifier();\n return VerifyingKey.__wrap(ret);\n }\n /**\n * Returns the verifying key for the transfer_private_to_public function\n *\n * @returns {VerifyingKey} Verifying key for the transfer_private_to_public function\n * @returns {VerifyingKey}\n */\n static transferPrivateToPublicVerifier() {\n const ret = wasm.verifyingkey_transferPrivateToPublicVerifier();\n return VerifyingKey.__wrap(ret);\n }\n /**\n * Returns the verifying key for the transfer_public function\n *\n * @returns {VerifyingKey} Verifying key for the transfer_public function\n * @returns {VerifyingKey}\n */\n static transferPublicVerifier() {\n const ret = wasm.verifyingkey_transferPublicVerifier();\n return VerifyingKey.__wrap(ret);\n }\n /**\n * Returns the verifying key for the transfer_public_as_signer function\n *\n * @returns {VerifyingKey} Verifying key for the transfer_public_as_signer function\n * @returns {VerifyingKey}\n */\n static transferPublicAsSignerVerifier() {\n const ret = wasm.verifyingkey_transferPublicAsSignerVerifier();\n return VerifyingKey.__wrap(ret);\n }\n /**\n * Returns the verifying key for the transfer_public_to_private function\n *\n * @returns {VerifyingKey} Verifying key for the transfer_public_to_private function\n * @returns {VerifyingKey}\n */\n static transferPublicToPrivateVerifier() {\n const ret = wasm.verifyingkey_transferPublicToPrivateVerifier();\n return VerifyingKey.__wrap(ret);\n }\n /**\n * Returns the verifying key for the unbond_public function\n *\n * @returns {VerifyingKey} Verifying key for the unbond_public function\n * @returns {VerifyingKey}\n */\n static unbondPublicVerifier() {\n const ret = wasm.verifyingkey_unbondPublicVerifier();\n return VerifyingKey.__wrap(ret);\n }\n /**\n * Returns the verifying key for the bond_public function\n *\n * @returns {VerifyingKey} Verifying key for the bond_public function\n * @returns {boolean}\n */\n isBondPublicVerifier() {\n const ret = wasm.verifyingkey_isBondPublicVerifier(this.__wbg_ptr);\n return ret !== 0;\n }\n /**\n * Returns the verifying key for the bond_validator function\n *\n * @returns {VerifyingKey} Verifying key for the bond_validator function\n * @returns {boolean}\n */\n isBondValidatorVerifier() {\n const ret = wasm.verifyingkey_isBondValidatorVerifier(this.__wbg_ptr);\n return ret !== 0;\n }\n /**\n * Verifies the verifying key is for the claim_delegator function\n *\n * @returns {bool}\n * @returns {boolean}\n */\n isClaimUnbondPublicVerifier() {\n const ret = wasm.verifyingkey_isClaimUnbondPublicVerifier(this.__wbg_ptr);\n return ret !== 0;\n }\n /**\n * Verifies the verifying key is for the fee_private function\n *\n * @returns {bool}\n * @returns {boolean}\n */\n isFeePrivateVerifier() {\n const ret = wasm.verifyingkey_isFeePrivateVerifier(this.__wbg_ptr);\n return ret !== 0;\n }\n /**\n * Verifies the verifying key is for the fee_public function\n *\n * @returns {bool}\n * @returns {boolean}\n */\n isFeePublicVerifier() {\n const ret = wasm.verifyingkey_isFeePublicVerifier(this.__wbg_ptr);\n return ret !== 0;\n }\n /**\n * Verifies the verifying key is for the inclusion function\n *\n * @returns {bool}\n * @returns {boolean}\n */\n isInclusionVerifier() {\n const ret = wasm.verifyingkey_isInclusionVerifier(this.__wbg_ptr);\n return ret !== 0;\n }\n /**\n * Verifies the verifying key is for the join function\n *\n * @returns {bool}\n * @returns {boolean}\n */\n isJoinVerifier() {\n const ret = wasm.verifyingkey_isJoinVerifier(this.__wbg_ptr);\n return ret !== 0;\n }\n /**\n * Verifies the verifying key is for the set_validator_state function\n *\n * @returns {bool}\n * @returns {boolean}\n */\n isSetValidatorStateVerifier() {\n const ret = wasm.verifyingkey_isSetValidatorStateVerifier(this.__wbg_ptr);\n return ret !== 0;\n }\n /**\n * Verifies the verifying key is for the split function\n *\n * @returns {bool}\n * @returns {boolean}\n */\n isSplitVerifier() {\n const ret = wasm.verifyingkey_isSplitVerifier(this.__wbg_ptr);\n return ret !== 0;\n }\n /**\n * Verifies the verifying key is for the transfer_private function\n *\n * @returns {bool}\n * @returns {boolean}\n */\n isTransferPrivateVerifier() {\n const ret = wasm.verifyingkey_isTransferPrivateVerifier(this.__wbg_ptr);\n return ret !== 0;\n }\n /**\n * Verifies the verifying key is for the transfer_private_to_public function\n *\n * @returns {bool}\n * @returns {boolean}\n */\n isTransferPrivateToPublicVerifier() {\n const ret = wasm.verifyingkey_isTransferPrivateToPublicVerifier(this.__wbg_ptr);\n return ret !== 0;\n }\n /**\n * Verifies the verifying key is for the transfer_public function\n *\n * @returns {bool}\n * @returns {boolean}\n */\n isTransferPublicVerifier() {\n const ret = wasm.verifyingkey_isTransferPublicVerifier(this.__wbg_ptr);\n return ret !== 0;\n }\n /**\n * Verifies the verifying key is for the transfer_public_as_signer function\n *\n * @returns {bool}\n * @returns {boolean}\n */\n isTransferPublicAsSignerVerifier() {\n const ret = wasm.verifyingkey_isTransferPublicAsSignerVerifier(this.__wbg_ptr);\n return ret !== 0;\n }\n /**\n * Verifies the verifying key is for the transfer_public_to_private function\n *\n * @returns {bool}\n * @returns {boolean}\n */\n isTransferPublicToPrivateVerifier() {\n const ret = wasm.verifyingkey_isTransferPublicToPrivateVerifier(this.__wbg_ptr);\n return ret !== 0;\n }\n /**\n * Verifies the verifying key is for the unbond_public function\n *\n * @returns {bool}\n * @returns {boolean}\n */\n isUnbondPublicVerifier() {\n const ret = wasm.verifyingkey_isUnbondPublicVerifier(this.__wbg_ptr);\n return ret !== 0;\n }\n /**\n * Get the checksum of the verifying key\n *\n * @returns {string} Checksum of the verifying key\n * @returns {string}\n */\n checksum() {\n let deferred1_0;\n let deferred1_1;\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n wasm.verifyingkey_checksum(retptr, this.__wbg_ptr);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n deferred1_0 = r0;\n deferred1_1 = r1;\n return getStringFromWasm0(r0, r1);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);\n }\n }\n /**\n * Create a copy of the verifying key\n *\n * @returns {VerifyingKey} A copy of the verifying key\n * @returns {VerifyingKey}\n */\n copy() {\n const ret = wasm.verifyingkey_copy(this.__wbg_ptr);\n return VerifyingKey.__wrap(ret);\n }\n /**\n * Construct a new verifying key from a byte array\n *\n * @param {Uint8Array} bytes Byte representation of a verifying key\n * @returns {VerifyingKey | Error}\n * @param {Uint8Array} bytes\n * @returns {VerifyingKey}\n */\n static fromBytes(bytes) {\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n const ptr0 = passArray8ToWasm0(bytes, wasm.__wbindgen_malloc);\n const len0 = WASM_VECTOR_LEN;\n wasm.verifyingkey_fromBytes(retptr, ptr0, len0);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n var r2 = getInt32Memory0()[retptr / 4 + 2];\n if (r2) {\n throw takeObject(r1);\n }\n return VerifyingKey.__wrap(r0);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n }\n }\n /**\n * Create a verifying key from string\n *\n * @param {String} string String representation of a verifying key\n * @returns {VerifyingKey | Error}\n * @param {string} string\n * @returns {VerifyingKey}\n */\n static fromString(string) {\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n const ptr0 = passStringToWasm0(string, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n wasm.verifyingkey_fromString(retptr, ptr0, len0);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n var r2 = getInt32Memory0()[retptr / 4 + 2];\n if (r2) {\n throw takeObject(r1);\n }\n return VerifyingKey.__wrap(r0);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n }\n }\n /**\n * Create a byte array from a verifying key\n *\n * @returns {Uint8Array | Error} Byte representation of a verifying key\n * @returns {Uint8Array}\n */\n toBytes() {\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n wasm.verifyingkey_toBytes(retptr, this.__wbg_ptr);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n var r2 = getInt32Memory0()[retptr / 4 + 2];\n var r3 = getInt32Memory0()[retptr / 4 + 3];\n if (r3) {\n throw takeObject(r2);\n }\n var v1 = getArrayU8FromWasm0(r0, r1).slice();\n wasm.__wbindgen_free(r0, r1 * 1, 1);\n return v1;\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n }\n }\n /**\n * Get a string representation of the verifying key\n *\n * @returns {String} String representation of the verifying key\n * @returns {string}\n */\n toString() {\n let deferred1_0;\n let deferred1_1;\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n wasm.verifyingkey_toString(retptr, this.__wbg_ptr);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n deferred1_0 = r0;\n deferred1_1 = r1;\n return getStringFromWasm0(r0, r1);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);\n }\n }\n}\n\nconst ViewKeyFinalization = (typeof FinalizationRegistry === 'undefined')\n ? { register: () => {}, unregister: () => {} }\n : new FinalizationRegistry(ptr => wasm.__wbg_viewkey_free(ptr >>> 0));\n/**\n*/\nclass ViewKey {\n\n static __wrap(ptr) {\n ptr = ptr >>> 0;\n const obj = Object.create(ViewKey.prototype);\n obj.__wbg_ptr = ptr;\n ViewKeyFinalization.register(obj, obj.__wbg_ptr, obj);\n return obj;\n }\n\n __destroy_into_raw() {\n const ptr = this.__wbg_ptr;\n this.__wbg_ptr = 0;\n ViewKeyFinalization.unregister(this);\n return ptr;\n }\n\n free() {\n const ptr = this.__destroy_into_raw();\n wasm.__wbg_viewkey_free(ptr);\n }\n /**\n * Create a new view key from a private key\n *\n * @param {PrivateKey} private_key Private key\n * @returns {ViewKey} View key\n * @param {PrivateKey} private_key\n * @returns {ViewKey}\n */\n static from_private_key(private_key) {\n _assertClass(private_key, PrivateKey);\n const ret = wasm.privatekey_to_view_key(private_key.__wbg_ptr);\n return ViewKey.__wrap(ret);\n }\n /**\n * Create a new view key from a string representation of a view key\n *\n * @param {string} view_key String representation of a view key\n * @returns {ViewKey} View key\n * @param {string} view_key\n * @returns {ViewKey}\n */\n static from_string(view_key) {\n const ptr0 = passStringToWasm0(view_key, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n const ret = wasm.viewkey_from_string(ptr0, len0);\n return ViewKey.__wrap(ret);\n }\n /**\n * Get a string representation of a view key\n *\n * @returns {string} String representation of a view key\n * @returns {string}\n */\n to_string() {\n let deferred1_0;\n let deferred1_1;\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n wasm.viewkey_to_string(retptr, this.__wbg_ptr);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n deferred1_0 = r0;\n deferred1_1 = r1;\n return getStringFromWasm0(r0, r1);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);\n }\n }\n /**\n * Get the address corresponding to a view key\n *\n * @returns {Address} Address\n * @returns {Address}\n */\n to_address() {\n const ret = wasm.address_from_view_key(this.__wbg_ptr);\n return Address.__wrap(ret);\n }\n /**\n * Decrypt a record ciphertext with a view key\n *\n * @param {string} ciphertext String representation of a record ciphertext\n * @returns {string} String representation of a record plaintext\n * @param {string} ciphertext\n * @returns {string}\n */\n decrypt(ciphertext) {\n let deferred3_0;\n let deferred3_1;\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n const ptr0 = passStringToWasm0(ciphertext, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n wasm.viewkey_decrypt(retptr, this.__wbg_ptr, ptr0, len0);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n var r2 = getInt32Memory0()[retptr / 4 + 2];\n var r3 = getInt32Memory0()[retptr / 4 + 3];\n var ptr2 = r0;\n var len2 = r1;\n if (r3) {\n ptr2 = 0; len2 = 0;\n throw takeObject(r2);\n }\n deferred3_0 = ptr2;\n deferred3_1 = len2;\n return getStringFromWasm0(ptr2, len2);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n wasm.__wbindgen_free(deferred3_0, deferred3_1, 1);\n }\n }\n}\n\nasync function __wbg_load(module, imports) {\n if (typeof Response === 'function' && module instanceof Response) {\n if (typeof WebAssembly.instantiateStreaming === 'function') {\n try {\n return await WebAssembly.instantiateStreaming(module, imports);\n\n } catch (e) {\n if (module.headers.get('Content-Type') != 'application/wasm') {\n console.warn(\"`WebAssembly.instantiateStreaming` failed because your server does not serve wasm with `application/wasm` MIME type. Falling back to `WebAssembly.instantiate` which is slower. Original error:\\n\", e);\n\n } else {\n throw e;\n }\n }\n }\n\n const bytes = await module.arrayBuffer();\n return await WebAssembly.instantiate(bytes, imports);\n\n } else {\n const instance = await WebAssembly.instantiate(module, imports);\n\n if (instance instanceof WebAssembly.Instance) {\n return { instance, module };\n\n } else {\n return instance;\n }\n }\n}\n\nfunction __wbg_get_imports() {\n const imports = {};\n imports.wbg = {};\n imports.wbg.__wbindgen_object_drop_ref = function(arg0) {\n takeObject(arg0);\n };\n imports.wbg.__wbg_new_71801a555ad9f2aa = function() { return handleError(function () {\n const ret = new XMLHttpRequest();\n return addHeapObject(ret);\n }, arguments) };\n imports.wbg.__wbg_overrideMimeType_ee9c51919ceb418b = function() { return handleError(function (arg0, arg1, arg2) {\n getObject(arg0).overrideMimeType(getStringFromWasm0(arg1, arg2));\n }, arguments) };\n imports.wbg.__wbg_open_c9eb0cf2c9d95679 = function() { return handleError(function (arg0, arg1, arg2, arg3, arg4, arg5) {\n getObject(arg0).open(getStringFromWasm0(arg1, arg2), getStringFromWasm0(arg3, arg4), arg5 !== 0);\n }, arguments) };\n imports.wbg.__wbg_send_80d29985093c1ec5 = function() { return handleError(function (arg0) {\n getObject(arg0).send();\n }, arguments) };\n imports.wbg.__wbg_response_7c2e2759084f7279 = function() { return handleError(function (arg0) {\n const ret = getObject(arg0).response;\n return addHeapObject(ret);\n }, arguments) };\n imports.wbg.__wbg_status_d485fb5a478426fb = function() { return handleError(function (arg0) {\n const ret = getObject(arg0).status;\n return ret;\n }, arguments) };\n imports.wbg.__wbg_new_72fb9a18b5ae2624 = function() {\n const ret = new Object();\n return addHeapObject(ret);\n };\n imports.wbg.__wbindgen_string_new = function(arg0, arg1) {\n const ret = getStringFromWasm0(arg0, arg1);\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_set_1f9b04f170055d33 = function() { return handleError(function (arg0, arg1, arg2) {\n const ret = Reflect.set(getObject(arg0), getObject(arg1), getObject(arg2));\n return ret;\n }, arguments) };\n imports.wbg.__wbg_new_ab6fd82b10560829 = function() { return handleError(function () {\n const ret = new Headers();\n return addHeapObject(ret);\n }, arguments) };\n imports.wbg.__wbindgen_object_clone_ref = function(arg0) {\n const ret = getObject(arg0);\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_new_0d76b0581eca6298 = function() { return handleError(function () {\n const ret = new AbortController();\n return addHeapObject(ret);\n }, arguments) };\n imports.wbg.__wbg_signal_a61f78a3478fd9bc = function(arg0) {\n const ret = getObject(arg0).signal;\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_append_7bfcb4937d1d5e29 = function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {\n getObject(arg0).append(getStringFromWasm0(arg1, arg2), getStringFromWasm0(arg3, arg4));\n }, arguments) };\n imports.wbg.__wbg_instanceof_Response_849eb93e75734b6e = function(arg0) {\n let result;\n try {\n result = getObject(arg0) instanceof Response;\n } catch (_) {\n result = false;\n }\n const ret = result;\n return ret;\n };\n imports.wbg.__wbg_status_61a01141acd3cf74 = function(arg0) {\n const ret = getObject(arg0).status;\n return ret;\n };\n imports.wbg.__wbg_url_5f6dc4009ac5f99d = function(arg0, arg1) {\n const ret = getObject(arg1).url;\n const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len1 = WASM_VECTOR_LEN;\n getInt32Memory0()[arg0 / 4 + 1] = len1;\n getInt32Memory0()[arg0 / 4 + 0] = ptr1;\n };\n imports.wbg.__wbg_headers_9620bfada380764a = function(arg0) {\n const ret = getObject(arg0).headers;\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_iterator_2cee6dadfd956dfa = function() {\n const ret = Symbol.iterator;\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_get_e3c254076557e348 = function() { return handleError(function (arg0, arg1) {\n const ret = Reflect.get(getObject(arg0), getObject(arg1));\n return addHeapObject(ret);\n }, arguments) };\n imports.wbg.__wbindgen_is_function = function(arg0) {\n const ret = typeof(getObject(arg0)) === 'function';\n return ret;\n };\n imports.wbg.__wbg_call_27c0f87801dedf93 = function() { return handleError(function (arg0, arg1) {\n const ret = getObject(arg0).call(getObject(arg1));\n return addHeapObject(ret);\n }, arguments) };\n imports.wbg.__wbindgen_is_object = function(arg0) {\n const val = getObject(arg0);\n const ret = typeof(val) === 'object' && val !== null;\n return ret;\n };\n imports.wbg.__wbg_next_40fc327bfc8770e6 = function(arg0) {\n const ret = getObject(arg0).next;\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_next_196c84450b364254 = function() { return handleError(function (arg0) {\n const ret = getObject(arg0).next();\n return addHeapObject(ret);\n }, arguments) };\n imports.wbg.__wbg_done_298b57d23c0fc80c = function(arg0) {\n const ret = getObject(arg0).done;\n return ret;\n };\n imports.wbg.__wbg_value_d93c65011f51a456 = function(arg0) {\n const ret = getObject(arg0).value;\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_abort_2aa7521d5690750e = function(arg0) {\n getObject(arg0).abort();\n };\n imports.wbg.__wbg_stringify_8887fe74e1c50d81 = function() { return handleError(function (arg0) {\n const ret = JSON.stringify(getObject(arg0));\n return addHeapObject(ret);\n }, arguments) };\n imports.wbg.__wbindgen_string_get = function(arg0, arg1) {\n const obj = getObject(arg1);\n const ret = typeof(obj) === 'string' ? obj : undefined;\n var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n var len1 = WASM_VECTOR_LEN;\n getInt32Memory0()[arg0 / 4 + 1] = len1;\n getInt32Memory0()[arg0 / 4 + 0] = ptr1;\n };\n imports.wbg.__wbg_executionresponse_new = function(arg0) {\n const ret = ExecutionResponse.__wrap(arg0);\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_call_b3ca7c6051f9bec1 = function() { return handleError(function (arg0, arg1, arg2) {\n const ret = getObject(arg0).call(getObject(arg1), getObject(arg2));\n return addHeapObject(ret);\n }, arguments) };\n imports.wbg.__wbg_log_0159ca40cddf5b15 = function(arg0, arg1) {\n console.log(getStringFromWasm0(arg0, arg1));\n };\n imports.wbg.__wbg_newwithlength_66ae46612e7f0234 = function(arg0) {\n const ret = new Array(arg0 >>> 0);\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_set_d4638f722068f043 = function(arg0, arg1, arg2) {\n getObject(arg0)[arg1 >>> 0] = takeObject(arg2);\n };\n imports.wbg.__wbg_transaction_new = function(arg0) {\n const ret = Transaction.__wrap(arg0);\n return addHeapObject(ret);\n };\n imports.wbg.__wbindgen_bigint_from_u64 = function(arg0) {\n const ret = BigInt.asUintN(64, arg0);\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_keypair_new = function(arg0) {\n const ret = KeyPair.__wrap(arg0);\n return addHeapObject(ret);\n };\n imports.wbg.__wbindgen_module = function() {\n const ret = __wbg_init.__wbindgen_wasm_module;\n return addHeapObject(ret);\n };\n imports.wbg.__wbindgen_memory = function() {\n const ret = wasm.memory;\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_spawnWorker_f6acaddb2e29dc4a = function(arg0, arg1, arg2, arg3) {\n const ret = spawnWorker(getObject(arg0), getObject(arg1), getObject(arg2), arg3 >>> 0);\n return addHeapObject(ret);\n };\n imports.wbg.__wbindgen_cb_drop = function(arg0) {\n const obj = takeObject(arg0).original;\n if (obj.cnt-- == 1) {\n obj.a = 0;\n return true;\n }\n const ret = false;\n return ret;\n };\n imports.wbg.__wbg_new_16b304a2cfa7ff4a = function() {\n const ret = new Array();\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_push_a5b05aedc7234f9f = function(arg0, arg1) {\n const ret = getObject(arg0).push(getObject(arg1));\n return ret;\n };\n imports.wbg.__wbg_arrayBuffer_29931d52c7206b02 = function() { return handleError(function (arg0) {\n const ret = getObject(arg0).arrayBuffer();\n return addHeapObject(ret);\n }, arguments) };\n imports.wbg.__wbg_new_63b92bc8671ed464 = function(arg0) {\n const ret = new Uint8Array(getObject(arg0));\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_length_c20a40f15020d68a = function(arg0) {\n const ret = getObject(arg0).length;\n return ret;\n };\n imports.wbg.__wbg_new_81740750da40724f = function(arg0, arg1) {\n try {\n var state0 = {a: arg0, b: arg1};\n var cb0 = (arg0, arg1) => {\n const a = state0.a;\n state0.a = 0;\n try {\n return __wbg_adapter_281(a, state0.b, arg0, arg1);\n } finally {\n state0.a = a;\n }\n };\n const ret = new Promise(cb0);\n return addHeapObject(ret);\n } finally {\n state0.a = state0.b = 0;\n }\n };\n imports.wbg.__wbindgen_number_new = function(arg0) {\n const ret = arg0;\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_new_abda76e883ba8a5f = function() {\n const ret = new Error();\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_stack_658279fe44541cf6 = function(arg0, arg1) {\n const ret = getObject(arg1).stack;\n const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len1 = WASM_VECTOR_LEN;\n getInt32Memory0()[arg0 / 4 + 1] = len1;\n getInt32Memory0()[arg0 / 4 + 0] = ptr1;\n };\n imports.wbg.__wbg_error_f851667af71bcfc6 = function(arg0, arg1) {\n let deferred0_0;\n let deferred0_1;\n try {\n deferred0_0 = arg0;\n deferred0_1 = arg1;\n console.error(getStringFromWasm0(arg0, arg1));\n } finally {\n wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);\n }\n };\n imports.wbg.__wbg_buffer_12d079cc21e14bdb = function(arg0) {\n const ret = getObject(arg0).buffer;\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_newwithbyteoffsetandlength_aa4a17c33a06e5cb = function(arg0, arg1, arg2) {\n const ret = new Uint8Array(getObject(arg0), arg1 >>> 0, arg2 >>> 0);\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_randomFillSync_5c9c955aa56b6049 = function() { return handleError(function (arg0, arg1) {\n getObject(arg0).randomFillSync(takeObject(arg1));\n }, arguments) };\n imports.wbg.__wbg_subarray_a1f73cd4b5b42fe1 = function(arg0, arg1, arg2) {\n const ret = getObject(arg0).subarray(arg1 >>> 0, arg2 >>> 0);\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_getRandomValues_3aa56aa6edec874c = function() { return handleError(function (arg0, arg1) {\n getObject(arg0).getRandomValues(getObject(arg1));\n }, arguments) };\n imports.wbg.__wbg_set_a47bac70306a19a7 = function(arg0, arg1, arg2) {\n getObject(arg0).set(getObject(arg1), arg2 >>> 0);\n };\n imports.wbg.__wbg_crypto_1d1f22824a6a080c = function(arg0) {\n const ret = getObject(arg0).crypto;\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_process_4a72847cc503995b = function(arg0) {\n const ret = getObject(arg0).process;\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_versions_f686565e586dd935 = function(arg0) {\n const ret = getObject(arg0).versions;\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_node_104a2ff8d6ea03a2 = function(arg0) {\n const ret = getObject(arg0).node;\n return addHeapObject(ret);\n };\n imports.wbg.__wbindgen_is_string = function(arg0) {\n const ret = typeof(getObject(arg0)) === 'string';\n return ret;\n };\n imports.wbg.__wbg_require_cca90b1a94a0255b = function() { return handleError(function () {\n const ret = module.require;\n return addHeapObject(ret);\n }, arguments) };\n imports.wbg.__wbg_msCrypto_eb05e62b530a1508 = function(arg0) {\n const ret = getObject(arg0).msCrypto;\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_newwithlength_e9b4878cebadb3d3 = function(arg0) {\n const ret = new Uint8Array(arg0 >>> 0);\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_length_cd7af8117672b8b8 = function(arg0) {\n const ret = getObject(arg0).length;\n return ret;\n };\n imports.wbg.__wbg_get_bd8e338fbd5f5cc8 = function(arg0, arg1) {\n const ret = getObject(arg0)[arg1 >>> 0];\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_self_ce0dbfc45cf2f5be = function() { return handleError(function () {\n const ret = self.self;\n return addHeapObject(ret);\n }, arguments) };\n imports.wbg.__wbg_window_c6fb939a7f436783 = function() { return handleError(function () {\n const ret = window.window;\n return addHeapObject(ret);\n }, arguments) };\n imports.wbg.__wbg_globalThis_d1e6af4856ba331b = function() { return handleError(function () {\n const ret = globalThis.globalThis;\n return addHeapObject(ret);\n }, arguments) };\n imports.wbg.__wbg_global_207b558942527489 = function() { return handleError(function () {\n const ret = global.global;\n return addHeapObject(ret);\n }, arguments) };\n imports.wbg.__wbindgen_is_undefined = function(arg0) {\n const ret = getObject(arg0) === undefined;\n return ret;\n };\n imports.wbg.__wbg_newnoargs_e258087cd0daa0ea = function(arg0, arg1) {\n const ret = new Function(getStringFromWasm0(arg0, arg1));\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_has_0af94d20077affa2 = function() { return handleError(function (arg0, arg1) {\n const ret = Reflect.has(getObject(arg0), getObject(arg1));\n return ret;\n }, arguments) };\n imports.wbg.__wbg_fetch_bc7c8e27076a5c84 = function(arg0) {\n const ret = fetch(getObject(arg0));\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_fetch_921fad6ef9e883dd = function(arg0, arg1) {\n const ret = getObject(arg0).fetch(getObject(arg1));\n return addHeapObject(ret);\n };\n imports.wbg.__wbindgen_debug_string = function(arg0, arg1) {\n const ret = debugString(getObject(arg1));\n const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len1 = WASM_VECTOR_LEN;\n getInt32Memory0()[arg0 / 4 + 1] = len1;\n getInt32Memory0()[arg0 / 4 + 0] = ptr1;\n };\n imports.wbg.__wbindgen_throw = function(arg0, arg1) {\n throw new Error(getStringFromWasm0(arg0, arg1));\n };\n imports.wbg.__wbindgen_rethrow = function(arg0) {\n throw takeObject(arg0);\n };\n imports.wbg.__wbg_then_a73caa9a87991566 = function(arg0, arg1, arg2) {\n const ret = getObject(arg0).then(getObject(arg1), getObject(arg2));\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_then_0c86a60e8fcfe9f6 = function(arg0, arg1) {\n const ret = getObject(arg0).then(getObject(arg1));\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_queueMicrotask_481971b0d87f3dd4 = function(arg0) {\n queueMicrotask(getObject(arg0));\n };\n imports.wbg.__wbg_queueMicrotask_3cbae2ec6b6cd3d6 = function(arg0) {\n const ret = getObject(arg0).queueMicrotask;\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_resolve_b0083a7967828ec8 = function(arg0) {\n const ret = Promise.resolve(getObject(arg0));\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_waitAsync_5d743fc9058ba01a = function() {\n const ret = Atomics.waitAsync;\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_new_8cccba86b0f574cb = function(arg0) {\n const ret = new Int32Array(getObject(arg0));\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_waitAsync_46d5c36955b71a79 = function(arg0, arg1, arg2) {\n const ret = Atomics.waitAsync(getObject(arg0), arg1, arg2);\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_async_19c0400d97cc72fe = function(arg0) {\n const ret = getObject(arg0).async;\n return ret;\n };\n imports.wbg.__wbg_value_571d60108110e917 = function(arg0) {\n const ret = getObject(arg0).value;\n return addHeapObject(ret);\n };\n imports.wbg.__wbindgen_link_fc1eedd35dc7e0a6 = function(arg0) {\n const ret = \"data:application/javascript,\" + encodeURIComponent(`onmessage = function (ev) {\n let [ia, index, value] = ev.data;\n ia = new Int32Array(ia.buffer);\n let result = Atomics.wait(ia, index, value);\n postMessage(result);\n };\n `);\n const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len1 = WASM_VECTOR_LEN;\n getInt32Memory0()[arg0 / 4 + 1] = len1;\n getInt32Memory0()[arg0 / 4 + 0] = ptr1;\n };\n imports.wbg.__wbg_new_d1187ae36d662ef9 = function() { return handleError(function (arg0, arg1) {\n const ret = new Worker(getStringFromWasm0(arg0, arg1));\n return addHeapObject(ret);\n }, arguments) };\n imports.wbg.__wbg_setonmessage_503809e5bb51bd33 = function(arg0, arg1) {\n getObject(arg0).onmessage = getObject(arg1);\n };\n imports.wbg.__wbg_of_6a70eed8d41f469c = function(arg0, arg1, arg2) {\n const ret = Array.of(getObject(arg0), getObject(arg1), getObject(arg2));\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_postMessage_7380d10e8b8269df = function() { return handleError(function (arg0, arg1) {\n getObject(arg0).postMessage(getObject(arg1));\n }, arguments) };\n imports.wbg.__wbg_data_3ce7c145ca4fbcdc = function(arg0) {\n const ret = getObject(arg0).data;\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_newwithstrandinit_3fd6fba4083ff2d0 = function() { return handleError(function (arg0, arg1, arg2) {\n const ret = new Request(getStringFromWasm0(arg0, arg1), getObject(arg2));\n return addHeapObject(ret);\n }, arguments) };\n imports.wbg.__wbg_responseText_c67ed2d48db10769 = function() { return handleError(function (arg0, arg1) {\n const ret = getObject(arg1).responseText;\n var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n var len1 = WASM_VECTOR_LEN;\n getInt32Memory0()[arg0 / 4 + 1] = len1;\n getInt32Memory0()[arg0 / 4 + 0] = ptr1;\n }, arguments) };\n imports.wbg.__wbindgen_closure_wrapper5837 = function(arg0, arg1, arg2) {\n const ret = makeMutClosure(arg0, arg1, 538, __wbg_adapter_34);\n return addHeapObject(ret);\n };\n imports.wbg.__wbindgen_closure_wrapper5862 = function(arg0, arg1, arg2) {\n const ret = makeMutClosure(arg0, arg1, 538, __wbg_adapter_34);\n return addHeapObject(ret);\n };\n\n return imports;\n}\n\nfunction __wbg_init_memory(imports, maybe_memory) {\n imports.wbg.memory = maybe_memory || new WebAssembly.Memory({initial:25,maximum:65536,shared:true});\n}\n\nfunction __wbg_finalize_init(instance, module) {\n wasm = instance.exports;\n __wbg_init.__wbindgen_wasm_module = module;\n cachedBigInt64Memory0 = null;\n cachedInt32Memory0 = null;\n cachedUint8Memory0 = null;\n\n wasm.__wbindgen_start();\n return wasm;\n}\n\nfunction initSync(module, maybe_memory) {\n if (wasm !== undefined) return wasm;\n\n const imports = __wbg_get_imports();\n\n __wbg_init_memory(imports, maybe_memory);\n\n if (!(module instanceof WebAssembly.Module)) {\n module = new WebAssembly.Module(module);\n }\n\n const instance = new WebAssembly.Instance(module, imports);\n\n return __wbg_finalize_init(instance, module);\n}\n\nasync function __wbg_init(input, maybe_memory) {\n if (wasm !== undefined) return wasm;\n\n\n const imports = __wbg_get_imports();\n\n if (typeof input === 'string' || (typeof Request === 'function' && input instanceof Request) || (typeof URL === 'function' && input instanceof URL)) {\n input = fetch(input);\n }\n\n __wbg_init_memory(imports, maybe_memory);\n\n const { instance, module } = await __wbg_load(await input, imports);\n\n return __wbg_finalize_init(instance, module);\n}\n\nvar exports = /*#__PURE__*/Object.freeze({\n __proto__: null,\n Address: Address,\n Execution: Execution,\n ExecutionResponse: ExecutionResponse,\n Field: Field,\n KeyPair: KeyPair,\n Metadata: Metadata,\n OfflineQuery: OfflineQuery,\n PrivateKey: PrivateKey,\n PrivateKeyCiphertext: PrivateKeyCiphertext,\n Program: Program,\n ProgramManager: ProgramManager,\n ProvingKey: ProvingKey,\n RecordCiphertext: RecordCiphertext,\n RecordPlaintext: RecordPlaintext,\n Signature: Signature,\n Transaction: Transaction,\n VerifyingKey: VerifyingKey,\n ViewKey: ViewKey,\n default: __wbg_init,\n initSync: initSync,\n initThreadPool: initThreadPool,\n runRayonThread: runRayonThread,\n verifyFunctionExecution: verifyFunctionExecution\n});\n\nconst wasm_path = \"assets/aleo_wasm.wasm\";\n\n \n var Cargo = async (opt = {}) => {\n let {importHook, serverPath, initializeHook} = opt;\n\n let final_path = wasm_path;\n\n if (serverPath != null) {\n final_path = serverPath + /[^\\/\\\\]*$/.exec(final_path)[0];\n }\n\n if (importHook != null) {\n final_path = importHook(final_path);\n }\n\n if (initializeHook != null) {\n await initializeHook(__wbg_init, final_path);\n\n } else {\n await __wbg_init(final_path);\n }\n\n return exports;\n };\n\nexport { Cargo as default };\n//# sourceMappingURL=wasm.js.map\n","import wasm from \"../dist/wasm.js\";\n\nconst {\n initThreadPool: wasmInitThreadPool,\n Address,\n Execution,\n ExecutionResponse,\n Field,\n Metadata,\n OfflineQuery,\n Private,\n PrivateKey,\n PrivateKeyCiphertext,\n Program,\n ProvingKey,\n RecordCiphertext,\n RecordPlaintext,\n ProgramManager,\n Signature,\n Transaction,\n ViewKey,\n VerifyingKey,\n verifyFunctionExecution,\n} = await wasm({\n importHook: () => {\n return new URL(\"assets/aleo_wasm.wasm\", import.meta.url);\n },\n});\n\nasync function initThreadPool(threads) {\n if (threads == null) {\n threads = navigator.hardwareConcurrency;\n }\n\n console.info(`Spawning ${threads} threads`);\n\n await wasmInitThreadPool(new URL(\"worker.js\", import.meta.url), threads);\n}\n\nexport {\n initThreadPool,\n Address,\n Execution,\n ExecutionResponse,\n Field,\n Metadata,\n OfflineQuery,\n PrivateKey,\n PrivateKeyCiphertext,\n Program,\n ProvingKey,\n RecordCiphertext,\n RecordPlaintext,\n ProgramManager,\n Signature,\n Transaction,\n ViewKey,\n VerifyingKey,\n verifyFunctionExecution,\n};\n"],"names":["spawnWorker","url","module","memory","address","Promise","resolve","worker","Worker","type","addEventListener","event","setTimeout","unref","capture","once","postMessage","wasm","heap","Array","fill","undefined","getObject","idx","push","heap_next","length","dropObject","takeObject","ret","cachedTextDecoder","TextDecoder","ignoreBOM","fatal","decode","Error","cachedUint8Memory0","getUint8Memory0","buffer","Uint8Array","getStringFromWasm0","ptr","len","slice","addHeapObject","obj","WASM_VECTOR_LEN","cachedTextEncoder","TextEncoder","encode","encodeString","arg","view","buf","set","read","written","passStringToWasm0","malloc","realloc","subarray","mem","offset","code","charCodeAt","isLikeNone","x","cachedInt32Memory0","getInt32Memory0","Int32Array","debugString","val","description","name","isArray","debug","i","builtInMatches","exec","toString","call","className","JSON","stringify","_","message","stack","CLOSURE_DTORS","FinalizationRegistry","register","unregister","state","__wbindgen_export_3","get","dtor","a","b","makeMutClosure","arg0","arg1","f","cnt","real","args","original","__wbg_adapter_34","arg2","_dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h4428289ce4d5afd9","_assertClass","instance","klass","passArray8ToWasm0","verifyFunctionExecution$1","execution","verifying_key","program","function_id","retptr","__wbindgen_add_to_stack_pointer","Execution$1","VerifyingKey$1","Program$1","ptr0","__wbindgen_malloc","__wbindgen_realloc","len0","verifyFunctionExecution","__wbg_ptr","r0","r1","cachedBigInt64Memory0","getBigInt64Memory0","BigInt64Array","getArrayU8FromWasm0","runRayonThread","receiver","initThreadPool$1","num_threads","initThreadPool","handleError","apply","this","e","__wbindgen_exn_store","__wbg_adapter_281","arg3","wasm_bindgen__convert__closures__invoke2_mut__h2157eed66e6e3fca","AddressFinalization","__wbg_address_free","Address","__wrap","Object","create","prototype","__destroy_into_raw","free","from_private_key","private_key","PrivateKey$1","address_from_private_key","from_view_key","view_key","ViewKey$1","address_from_view_key","from_string","address_from_string","to_string","deferred1_0","deferred1_1","address_to_string","__wbindgen_free","verify","signature","Signature$1","address_verify","ExecutionFinalization","__wbg_execution_free","Execution","execution_toString","fromString","execution_fromString","ExecutionResponseFinalization","__wbg_executionresponse_free","ExecutionResponse","getOutputs","executionresponse_getOutputs","getExecution","executionresponse_getExecution","getKeys","executionresponse_getKeys","KeyPair","getProvingKey","executionresponse_getProvingKey","ProvingKey$1","getVerifyingKey","executionresponse_getVerifyingKey","getFunctionId","executionresponse_getFunctionId","getProgram","executionresponse_getProgram","FieldFinalization","__wbg_field_free","Field","field_toString","field","field_fromString","KeyPairFinalization","__wbg_keypair_free","constructor","proving_key","ptr1","keypair_new","provingKey","keypair_provingKey","verifyingKey","keypair_verifyingKey","MetadataFinalization","__wbg_metadata_free","Metadata","__wbg_get_metadata_name","__wbg_set_metadata_name","locator","__wbg_get_metadata_locator","__wbg_set_metadata_locator","prover","__wbg_get_metadata_prover","__wbg_set_metadata_prover","verifier","__wbg_get_metadata_verifier","__wbg_set_metadata_verifier","__wbg_get_metadata_verifyingKey","__wbg_set_metadata_verifyingKey","baseUrl","metadata_baseUrl","bond_public","metadata_bond_public","bond_validator","metadata_bond_validator","claim_unbond_public","metadata_claim_unbond_public","fee_private","metadata_fee_private","fee_public","metadata_fee_public","inclusion","metadata_inclusion","join","metadata_join","set_validator_state","metadata_set_validator_state","split","metadata_split","transfer_private","metadata_transfer_private","transfer_private_to_public","metadata_transfer_private_to_public","transfer_public","metadata_transfer_public","transfer_public_as_signer","metadata_transfer_public_as_signer","transfer_public_to_private","metadata_transfer_public_to_private","unbond_public","metadata_unbond_public","OfflineQueryFinalization","__wbg_offlinequery_free","OfflineQuery","state_root","offlinequery_new","addStatePath","commitment","state_path","len1","offlinequery_addStatePath","offlinequery_toString","s","offlinequery_fromString","PrivateKeyFinalization","__wbg_privatekey_free","PrivateKey","privatekey_new","from_seed_unchecked","seed","privatekey_from_seed_unchecked","privatekey_from_string","privatekey_to_string","to_view_key","privatekey_to_view_key","to_address","privatekey_to_address","Address$1","sign","privatekey_sign","newEncrypted","secret","privatekey_newEncrypted","PrivateKeyCiphertext$1","toCiphertext","privatekey_toCiphertext","fromPrivateKeyCiphertext","ciphertext","privatekey_fromPrivateKeyCiphertext","PrivateKeyCiphertextFinalization","__wbg_privatekeyciphertext_free","PrivateKeyCiphertext","encryptPrivateKey","decryptToPrivateKey","privatekeyciphertext_decryptToPrivateKey","privatekeyciphertext_toString","privatekeyciphertext_fromString","ProgramFinalization","__wbg_program_free","Program","program_fromString","program_toString","hasFunction","function_name","program_hasFunction","getFunctions","program_getFunctions","getFunctionInputs","program_getFunctionInputs","getMappings","program_getMappings","getRecordMembers","record_name","program_getRecordMembers","getStructMembers","struct_name","program_getStructMembers","getCreditsProgram","program_getCreditsProgram","id","program_id","program_address","isEqual","other","program_isEqual","getImports","program_getImports","ProgramManagerFinalization","__wbg_programmanager_free","buildDeploymentTransaction","fee_credits","fee_record","imports","fee_proving_key","fee_verifying_key","offline_query","RecordPlaintext$1","ptr2","len2","ptr3","ptr4","ptr5","OfflineQuery$1","programmanager_buildDeploymentTransaction","estimateDeploymentFee","programmanager_estimateDeploymentFee","estimateProgramNameCost","programmanager_estimateProgramNameCost","r2","BigInt","asUintN","executeFunctionOffline","_function","inputs","prove_execution","cache","len4","programmanager_executeFunctionOffline","buildExecutionTransaction","len3","ptr6","ptr7","ptr8","programmanager_buildExecutionTransaction","estimateExecutionFee","programmanager_estimateExecutionFee","estimateFinalizeFee","programmanager_estimateFinalizeFee","buildJoinTransaction","record_1","record_2","join_proving_key","join_verifying_key","programmanager_buildJoinTransaction","buildSplitTransaction","split_amount","amount_record","split_proving_key","split_verifying_key","programmanager_buildSplitTransaction","buildTransferTransaction","amount_credits","recipient","transfer_type","transfer_proving_key","transfer_verifying_key","ptr9","programmanager_buildTransferTransaction","synthesizeKeyPair","programmanager_synthesizeKeyPair","ProvingKeyFinalization","__wbg_provingkey_free","ProvingKey","isBondPublicProver","provingkey_isBondPublicProver","isBondValidatorProver","provingkey_isBondValidatorProver","isClaimUnbondPublicProver","provingkey_isClaimUnbondPublicProver","isFeePrivateProver","provingkey_isFeePrivateProver","isFeePublicProver","provingkey_isFeePublicProver","isInclusionProver","provingkey_isInclusionProver","isJoinProver","provingkey_isJoinProver","isSetValidatorStateProver","provingkey_isSetValidatorStateProver","isSplitProver","provingkey_isSplitProver","isTransferPrivateProver","provingkey_isTransferPrivateProver","isTransferPrivateToPublicProver","provingkey_isTransferPrivateToPublicProver","isTransferPublicProver","provingkey_isTransferPublicProver","isTransferPublicAsSignerProver","provingkey_isTransferPublicAsSignerProver","isTransferPublicToPrivateProver","provingkey_isTransferPublicToPrivateProver","isUnbondPublicProver","provingkey_isUnbondPublicProver","checksum","provingkey_checksum","copy","provingkey_copy","fromBytes","bytes","provingkey_fromBytes","string","provingkey_fromString","toBytes","provingkey_toBytes","v1","provingkey_toString","RecordCiphertextFinalization","__wbg_recordciphertext_free","RecordCiphertext","record","recordciphertext_fromString","recordciphertext_toString","decrypt","recordciphertext_decrypt","isOwner","recordciphertext_isOwner","RecordPlaintextFinalization","__wbg_recordplaintext_free","RecordPlaintext","recordplaintext_commitment","Field$1","recordplaintext_fromString","recordplaintext_toString","microcredits","recordplaintext_microcredits","nonce","recordplaintext_nonce","serialNumberString","deferred4_0","deferred4_1","recordplaintext_serialNumberString","r3","SignatureFinalization","__wbg_signature_free","Signature","signature_verify","signature_from_string","signature_to_string","TransactionFinalization","__wbg_transaction_free","Transaction","transaction","transaction_fromString","transaction_toString","transactionId","transaction_transactionId","transactionType","transaction_transactionType","VerifyingKeyFinalization","__wbg_verifyingkey_free","VerifyingKey","bondPublicVerifier","verifyingkey_bondPublicVerifier","bondValidatorVerifier","verifyingkey_bondValidatorVerifier","claimUnbondPublicVerifier","verifyingkey_claimUnbondPublicVerifier","feePrivateVerifier","verifyingkey_feePrivateVerifier","feePublicVerifier","verifyingkey_feePublicVerifier","inclusionVerifier","verifyingkey_inclusionVerifier","joinVerifier","verifyingkey_joinVerifier","setValidatorStateVerifier","verifyingkey_setValidatorStateVerifier","splitVerifier","verifyingkey_splitVerifier","transferPrivateVerifier","verifyingkey_transferPrivateVerifier","transferPrivateToPublicVerifier","verifyingkey_transferPrivateToPublicVerifier","transferPublicVerifier","verifyingkey_transferPublicVerifier","transferPublicAsSignerVerifier","verifyingkey_transferPublicAsSignerVerifier","transferPublicToPrivateVerifier","verifyingkey_transferPublicToPrivateVerifier","unbondPublicVerifier","verifyingkey_unbondPublicVerifier","isBondPublicVerifier","verifyingkey_isBondPublicVerifier","isBondValidatorVerifier","verifyingkey_isBondValidatorVerifier","isClaimUnbondPublicVerifier","verifyingkey_isClaimUnbondPublicVerifier","isFeePrivateVerifier","verifyingkey_isFeePrivateVerifier","isFeePublicVerifier","verifyingkey_isFeePublicVerifier","isInclusionVerifier","verifyingkey_isInclusionVerifier","isJoinVerifier","verifyingkey_isJoinVerifier","isSetValidatorStateVerifier","verifyingkey_isSetValidatorStateVerifier","isSplitVerifier","verifyingkey_isSplitVerifier","isTransferPrivateVerifier","verifyingkey_isTransferPrivateVerifier","isTransferPrivateToPublicVerifier","verifyingkey_isTransferPrivateToPublicVerifier","isTransferPublicVerifier","verifyingkey_isTransferPublicVerifier","isTransferPublicAsSignerVerifier","verifyingkey_isTransferPublicAsSignerVerifier","isTransferPublicToPrivateVerifier","verifyingkey_isTransferPublicToPrivateVerifier","isUnbondPublicVerifier","verifyingkey_isUnbondPublicVerifier","verifyingkey_checksum","verifyingkey_copy","verifyingkey_fromBytes","verifyingkey_fromString","verifyingkey_toBytes","verifyingkey_toString","ViewKeyFinalization","__wbg_viewkey_free","ViewKey","viewkey_from_string","viewkey_to_string","deferred3_0","deferred3_1","viewkey_decrypt","async","__wbg_load","Response","WebAssembly","instantiateStreaming","headers","console","warn","arrayBuffer","instantiate","Instance","__wbg_get_imports","wbg","__wbindgen_object_drop_ref","__wbg_new_71801a555ad9f2aa","XMLHttpRequest","arguments","__wbg_overrideMimeType_ee9c51919ceb418b","overrideMimeType","__wbg_open_c9eb0cf2c9d95679","arg4","arg5","open","__wbg_send_80d29985093c1ec5","send","__wbg_response_7c2e2759084f7279","response","__wbg_status_d485fb5a478426fb","status","__wbg_new_72fb9a18b5ae2624","__wbindgen_string_new","__wbg_set_1f9b04f170055d33","Reflect","__wbg_new_ab6fd82b10560829","Headers","__wbindgen_object_clone_ref","__wbg_new_0d76b0581eca6298","AbortController","__wbg_signal_a61f78a3478fd9bc","signal","__wbg_append_7bfcb4937d1d5e29","append","__wbg_instanceof_Response_849eb93e75734b6e","result","__wbg_status_61a01141acd3cf74","__wbg_url_5f6dc4009ac5f99d","__wbg_headers_9620bfada380764a","__wbg_iterator_2cee6dadfd956dfa","Symbol","iterator","__wbg_get_e3c254076557e348","__wbindgen_is_function","__wbg_call_27c0f87801dedf93","__wbindgen_is_object","__wbg_next_40fc327bfc8770e6","next","__wbg_next_196c84450b364254","__wbg_done_298b57d23c0fc80c","done","__wbg_value_d93c65011f51a456","value","__wbg_abort_2aa7521d5690750e","abort","__wbg_stringify_8887fe74e1c50d81","__wbindgen_string_get","__wbg_executionresponse_new","ExecutionResponse$1","__wbg_call_b3ca7c6051f9bec1","__wbg_log_0159ca40cddf5b15","log","__wbg_newwithlength_66ae46612e7f0234","__wbg_set_d4638f722068f043","__wbg_transaction_new","Transaction$1","__wbindgen_bigint_from_u64","__wbg_keypair_new","__wbindgen_module","__wbg_init","__wbindgen_wasm_module","__wbindgen_memory","__wbg_spawnWorker_f6acaddb2e29dc4a","__wbindgen_cb_drop","__wbg_new_16b304a2cfa7ff4a","__wbg_push_a5b05aedc7234f9f","__wbg_arrayBuffer_29931d52c7206b02","__wbg_new_63b92bc8671ed464","__wbg_length_c20a40f15020d68a","__wbg_new_81740750da40724f","state0","cb0","__wbindgen_number_new","__wbg_new_abda76e883ba8a5f","__wbg_stack_658279fe44541cf6","__wbg_error_f851667af71bcfc6","deferred0_0","deferred0_1","error","__wbg_buffer_12d079cc21e14bdb","__wbg_newwithbyteoffsetandlength_aa4a17c33a06e5cb","__wbg_randomFillSync_5c9c955aa56b6049","randomFillSync","__wbg_subarray_a1f73cd4b5b42fe1","__wbg_getRandomValues_3aa56aa6edec874c","getRandomValues","__wbg_set_a47bac70306a19a7","__wbg_crypto_1d1f22824a6a080c","crypto","__wbg_process_4a72847cc503995b","process","__wbg_versions_f686565e586dd935","versions","__wbg_node_104a2ff8d6ea03a2","node","__wbindgen_is_string","__wbg_require_cca90b1a94a0255b","require","__wbg_msCrypto_eb05e62b530a1508","msCrypto","__wbg_newwithlength_e9b4878cebadb3d3","__wbg_length_cd7af8117672b8b8","__wbg_get_bd8e338fbd5f5cc8","__wbg_self_ce0dbfc45cf2f5be","self","__wbg_window_c6fb939a7f436783","window","__wbg_globalThis_d1e6af4856ba331b","globalThis","__wbg_global_207b558942527489","global","__wbindgen_is_undefined","__wbg_newnoargs_e258087cd0daa0ea","Function","__wbg_has_0af94d20077affa2","has","__wbg_fetch_bc7c8e27076a5c84","fetch","__wbg_fetch_921fad6ef9e883dd","__wbindgen_debug_string","__wbindgen_throw","__wbindgen_rethrow","__wbg_then_a73caa9a87991566","then","__wbg_then_0c86a60e8fcfe9f6","__wbg_queueMicrotask_481971b0d87f3dd4","queueMicrotask","__wbg_queueMicrotask_3cbae2ec6b6cd3d6","__wbg_resolve_b0083a7967828ec8","__wbg_waitAsync_5d743fc9058ba01a","Atomics","waitAsync","__wbg_new_8cccba86b0f574cb","__wbg_waitAsync_46d5c36955b71a79","__wbg_async_19c0400d97cc72fe","__wbg_value_571d60108110e917","__wbindgen_link_fc1eedd35dc7e0a6","encodeURIComponent","__wbg_new_d1187ae36d662ef9","__wbg_setonmessage_503809e5bb51bd33","onmessage","__wbg_of_6a70eed8d41f469c","of","__wbg_postMessage_7380d10e8b8269df","__wbg_data_3ce7c145ca4fbcdc","data","__wbg_newwithstrandinit_3fd6fba4083ff2d0","Request","__wbg_responseText_c67ed2d48db10769","responseText","__wbindgen_closure_wrapper5837","__wbindgen_closure_wrapper5862","__wbg_init_memory","maybe_memory","Memory","initial","maximum","shared","__wbg_finalize_init","exports","__wbindgen_start","initSync","Module","input","URL","freeze","__proto__","Metadata$1","ProgramManager","ProgramManager$1","RecordCiphertext$1","default","wasm_path","wasmInitThreadPool","Private","opt","importHook","serverPath","initializeHook","final_path","Cargo","threads","navigator","hardwareConcurrency","info"],"sourceRoot":""} \ No newline at end of file diff --git a/968.bundle.js b/968.bundle.js deleted file mode 100644 index 64f7d749b..000000000 --- a/968.bundle.js +++ /dev/null @@ -1,2 +0,0 @@ -(()=>{var r,e,t,o,a,n,i={},p={};function c(r){var e=p[r];if(void 0!==e)return e.exports;var t=p[r]={exports:{}};return i[r](t,t.exports,c),t.exports}c.m=i,c.x=()=>{var r=c.O(void 0,[495,877,66],(()=>c(66)));return r=c.O(r)},r="function"==typeof Symbol?Symbol("webpack queues"):"__webpack_queues__",e="function"==typeof Symbol?Symbol("webpack exports"):"__webpack_exports__",t="function"==typeof Symbol?Symbol("webpack error"):"__webpack_error__",o=r=>{r&&r.d<1&&(r.d=1,r.forEach((r=>r.r--)),r.forEach((r=>r.r--?r.r++:r())))},c.a=(a,n,i)=>{var p;i&&((p=[]).d=-1);var c,s,f,l=new Set,u=a.exports,b=new Promise(((r,e)=>{f=e,s=r}));b[e]=u,b[r]=r=>(p&&r(p),l.forEach(r),b.catch((r=>{}))),a.exports=b,n((a=>{var n;c=(a=>a.map((a=>{if(null!==a&&"object"==typeof a){if(a[r])return a;if(a.then){var n=[];n.d=0,a.then((r=>{i[e]=r,o(n)}),(r=>{i[t]=r,o(n)}));var i={};return i[r]=r=>r(n),i}}var p={};return p[r]=r=>{},p[e]=a,p})))(a);var i=()=>c.map((r=>{if(r[t])throw r[t];return r[e]})),s=new Promise((e=>{(n=()=>e(i)).r=0;var t=r=>r!==p&&!l.has(r)&&(l.add(r),r&&!r.d&&(n.r++,r.push(n)));c.map((e=>e[r](t)))}));return n.r?s:i()}),(r=>(r?f(b[t]=r):s(u),o(p)))),p&&p.d<0&&(p.d=0)},a=[],c.O=(r,e,t,o)=>{if(!e){var n=1/0;for(f=0;f=o)&&Object.keys(c.O).every((r=>c.O[r](e[p])))?e.splice(p--,1):(i=!1,o0&&a[f-1][2]>o;f--)a[f]=a[f-1];a[f]=[e,t,o]},c.d=(r,e)=>{for(var t in e)c.o(e,t)&&!c.o(r,t)&&Object.defineProperty(r,t,{enumerable:!0,get:e[t]})},c.f={},c.e=r=>Promise.all(Object.keys(c.f).reduce(((e,t)=>(c.f[t](r,e),e)),[])),c.u=r=>r+".bundle.js",c.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(r){if("object"==typeof window)return window}}(),c.o=(r,e)=>Object.prototype.hasOwnProperty.call(r,e),(()=>{var r;c.g.importScripts&&(r=c.g.location+"");var e=c.g.document;if(!r&&e&&(e.currentScript&&(r=e.currentScript.src),!r)){var t=e.getElementsByTagName("script");if(t.length)for(var o=t.length-1;o>-1&&(!r||!/^http(s?):/.test(r));)r=t[o--].src}if(!r)throw new Error("Automatic publicPath is not supported in this browser");r=r.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),c.p=r})(),(()=>{c.b=self.location+"";var r={968:1};c.f.i=(e,t)=>{r[e]||importScripts(c.p+c.u(e))};var e=self.webpackChunkaleo_website=self.webpackChunkaleo_website||[],t=e.push.bind(e);e.push=e=>{var[o,a,n]=e;for(var i in a)c.o(a,i)&&(c.m[i]=a[i]);for(n&&n(c);o.length;)r[o.pop()]=1;t(e)}})(),n=c.x,c.x=()=>Promise.all([495,877,66].map(c.e,c)).then(n);c.x()})(); -//# sourceMappingURL=968.bundle.js.map \ No newline at end of file diff --git a/968.bundle.js.map b/968.bundle.js.map deleted file mode 100644 index 5c2244e4f..000000000 --- a/968.bundle.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"968.bundle.js","mappings":"UAAIA,EACAC,EACAC,EACAC,ECHAC,ECAAC,E,KCCAC,EAA2B,CAAC,EAGhC,SAASC,EAAoBC,GAE5B,IAAIC,EAAeH,EAAyBE,GAC5C,QAAqBE,IAAjBD,EACH,OAAOA,EAAaE,QAGrB,IAAIC,EAASN,EAAyBE,GAAY,CAGjDG,QAAS,CAAC,GAOX,OAHAE,EAAoBL,GAAUI,EAAQA,EAAOD,QAASJ,GAG/CK,EAAOD,OACf,CAGAJ,EAAoBO,EAAID,EAGxBN,EAAoBQ,EAAI,KAGvB,IAAIC,EAAsBT,EAAoBU,OAAEP,EAAW,CAAC,IAAI,IAAI,KAAK,IAAOH,EAAoB,MAEpG,OADAS,EAAsBT,EAAoBU,EAAED,EAClB,EHjCvBhB,EAAkC,mBAAXkB,OAAwBA,OAAO,kBAAoB,qBAC1EjB,EAAmC,mBAAXiB,OAAwBA,OAAO,mBAAqB,sBAC5EhB,EAAiC,mBAAXgB,OAAwBA,OAAO,iBAAmB,oBACxEf,EAAgBgB,IAChBA,GAASA,EAAMC,EAAI,IACrBD,EAAMC,EAAI,EACVD,EAAME,SAASC,GAAQA,EAAGC,MAC1BJ,EAAME,SAASC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oE,EAAEJ,GAE9D,EAGD,IAAI6B,EAAqBF,KAA+B,yBAAIA,KAA+B,0BAAK,GAC5FG,EAA6BD,EAAmBnD,KAAKqD,KAAKF,GAC9DA,EAAmBnD,KAvBCsD,IACnB,IAAKnD,EAAUoD,EAAaC,GAAWF,EACvC,IAAI,IAAI/F,KAAYgG,EAChBjG,EAAoB2D,EAAEsC,EAAahG,KACrCD,EAAoBO,EAAEN,GAAYgG,EAAYhG,IAIhD,IADGiG,GAASA,EAAQlG,GACd6C,EAASK,QACd0C,EAAgB/C,EAASsD,OAAS,EACnCL,EAA2BE,EAAK,C,KRnB7BlG,EAAOE,EAAoBQ,EAC/BR,EAAoBQ,EAAI,IAChBkB,QAAQuC,IAAI,CAAC,IAAI,IAAI,IAAInC,IAAI9B,EAAoBkC,EAAGlC,IAAsBgC,KAAKlC,GSD7DE,EAAoBQ,G","sources":["webpack://aleo-website/webpack/runtime/async module","webpack://aleo-website/webpack/runtime/chunk loaded","webpack://aleo-website/webpack/runtime/startup chunk dependencies","webpack://aleo-website/webpack/bootstrap","webpack://aleo-website/webpack/runtime/define property getters","webpack://aleo-website/webpack/runtime/ensure chunk","webpack://aleo-website/webpack/runtime/get javascript chunk filename","webpack://aleo-website/webpack/runtime/global","webpack://aleo-website/webpack/runtime/hasOwnProperty shorthand","webpack://aleo-website/webpack/runtime/publicPath","webpack://aleo-website/webpack/runtime/importScripts chunk loading","webpack://aleo-website/webpack/startup"],"sourcesContent":["var webpackQueues = typeof Symbol === \"function\" ? Symbol(\"webpack queues\") : \"__webpack_queues__\";\nvar webpackExports = typeof Symbol === \"function\" ? Symbol(\"webpack exports\") : \"__webpack_exports__\";\nvar webpackError = typeof Symbol === \"function\" ? Symbol(\"webpack error\") : \"__webpack_error__\";\nvar resolveQueue = (queue) => {\n\tif(queue && queue.d < 1) {\n\t\tqueue.d = 1;\n\t\tqueue.forEach((fn) => (fn.r--));\n\t\tqueue.forEach((fn) => (fn.r-- ? fn.r++ : fn()));\n\t}\n}\nvar wrapDeps = (deps) => (deps.map((dep) => {\n\tif(dep !== null && typeof dep === \"object\") {\n\t\tif(dep[webpackQueues]) return dep;\n\t\tif(dep.then) {\n\t\t\tvar queue = [];\n\t\t\tqueue.d = 0;\n\t\t\tdep.then((r) => {\n\t\t\t\tobj[webpackExports] = r;\n\t\t\t\tresolveQueue(queue);\n\t\t\t}, (e) => {\n\t\t\t\tobj[webpackError] = e;\n\t\t\t\tresolveQueue(queue);\n\t\t\t});\n\t\t\tvar obj = {};\n\t\t\tobj[webpackQueues] = (fn) => (fn(queue));\n\t\t\treturn obj;\n\t\t}\n\t}\n\tvar ret = {};\n\tret[webpackQueues] = x => {};\n\tret[webpackExports] = dep;\n\treturn ret;\n}));\n__webpack_require__.a = (module, body, hasAwait) => {\n\tvar queue;\n\thasAwait && ((queue = []).d = -1);\n\tvar depQueues = new Set();\n\tvar exports = module.exports;\n\tvar currentDeps;\n\tvar outerResolve;\n\tvar reject;\n\tvar promise = new Promise((resolve, rej) => {\n\t\treject = rej;\n\t\touterResolve = resolve;\n\t});\n\tpromise[webpackExports] = exports;\n\tpromise[webpackQueues] = (fn) => (queue && fn(queue), depQueues.forEach(fn), promise[\"catch\"](x => {}));\n\tmodule.exports = promise;\n\tbody((deps) => {\n\t\tcurrentDeps = wrapDeps(deps);\n\t\tvar fn;\n\t\tvar getResult = () => (currentDeps.map((d) => {\n\t\t\tif(d[webpackError]) throw d[webpackError];\n\t\t\treturn d[webpackExports];\n\t\t}))\n\t\tvar promise = new Promise((resolve) => {\n\t\t\tfn = () => (resolve(getResult));\n\t\t\tfn.r = 0;\n\t\t\tvar fnQueue = (q) => (q !== queue && !depQueues.has(q) && (depQueues.add(q), q && !q.d && (fn.r++, q.push(fn))));\n\t\t\tcurrentDeps.map((dep) => (dep[webpackQueues](fnQueue)));\n\t\t});\n\t\treturn fn.r ? promise : getResult();\n\t}, (err) => ((err ? reject(promise[webpackError] = err) : outerResolve(exports)), resolveQueue(queue)));\n\tqueue && queue.d < 0 && (queue.d = 0);\n};","var deferred = [];\n__webpack_require__.O = (result, chunkIds, fn, priority) => {\n\tif(chunkIds) {\n\t\tpriority = priority || 0;\n\t\tfor(var i = deferred.length; i > 0 && deferred[i - 1][2] > priority; i--) deferred[i] = deferred[i - 1];\n\t\tdeferred[i] = [chunkIds, fn, priority];\n\t\treturn;\n\t}\n\tvar notFulfilled = Infinity;\n\tfor (var i = 0; i < deferred.length; i++) {\n\t\tvar [chunkIds, fn, priority] = deferred[i];\n\t\tvar fulfilled = true;\n\t\tfor (var j = 0; j < chunkIds.length; j++) {\n\t\t\tif ((priority & 1 === 0 || notFulfilled >= priority) && Object.keys(__webpack_require__.O).every((key) => (__webpack_require__.O[key](chunkIds[j])))) {\n\t\t\t\tchunkIds.splice(j--, 1);\n\t\t\t} else {\n\t\t\t\tfulfilled = false;\n\t\t\t\tif(priority < notFulfilled) notFulfilled = priority;\n\t\t\t}\n\t\t}\n\t\tif(fulfilled) {\n\t\t\tdeferred.splice(i--, 1)\n\t\t\tvar r = fn();\n\t\t\tif (r !== undefined) result = r;\n\t\t}\n\t}\n\treturn result;\n};","var next = __webpack_require__.x;\n__webpack_require__.x = () => {\n\treturn Promise.all([495,877,66].map(__webpack_require__.e, __webpack_require__)).then(next);\n};","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n// expose the modules object (__webpack_modules__)\n__webpack_require__.m = __webpack_modules__;\n\n// the startup function\n__webpack_require__.x = () => {\n\t// Load entry module and return exports\n\t// This entry module depends on other loaded chunks and execution need to be delayed\n\tvar __webpack_exports__ = __webpack_require__.O(undefined, [495,877,66], () => (__webpack_require__(66)))\n\t__webpack_exports__ = __webpack_require__.O(__webpack_exports__);\n\treturn __webpack_exports__;\n};\n\n","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.f = {};\n// This file contains only the entry chunk.\n// The chunk loading function for additional chunks\n__webpack_require__.e = (chunkId) => {\n\treturn Promise.all(Object.keys(__webpack_require__.f).reduce((promises, key) => {\n\t\t__webpack_require__.f[key](chunkId, promises);\n\t\treturn promises;\n\t}, []));\n};","// This function allow to reference async chunks and sibling chunks for the entrypoint\n__webpack_require__.u = (chunkId) => {\n\t// return url for filenames based on template\n\treturn \"\" + chunkId + \".bundle.js\";\n};","__webpack_require__.g = (function() {\n\tif (typeof globalThis === 'object') return globalThis;\n\ttry {\n\t\treturn this || new Function('return this')();\n\t} catch (e) {\n\t\tif (typeof window === 'object') return window;\n\t}\n})();","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","var scriptUrl;\nif (__webpack_require__.g.importScripts) scriptUrl = __webpack_require__.g.location + \"\";\nvar document = __webpack_require__.g.document;\nif (!scriptUrl && document) {\n\tif (document.currentScript)\n\t\tscriptUrl = document.currentScript.src;\n\tif (!scriptUrl) {\n\t\tvar scripts = document.getElementsByTagName(\"script\");\n\t\tif(scripts.length) {\n\t\t\tvar i = scripts.length - 1;\n\t\t\twhile (i > -1 && (!scriptUrl || !/^http(s?):/.test(scriptUrl))) scriptUrl = scripts[i--].src;\n\t\t}\n\t}\n}\n// When supporting browsers where an automatic publicPath is not supported you must specify an output.publicPath manually via configuration\n// or pass an empty string (\"\") and set the __webpack_public_path__ variable from your code to use your own logic.\nif (!scriptUrl) throw new Error(\"Automatic publicPath is not supported in this browser\");\nscriptUrl = scriptUrl.replace(/#.*$/, \"\").replace(/\\?.*$/, \"\").replace(/\\/[^\\/]+$/, \"/\");\n__webpack_require__.p = scriptUrl;","__webpack_require__.b = self.location + \"\";\n\n// object to store loaded chunks\n// \"1\" means \"already loaded\"\nvar installedChunks = {\n\t968: 1\n};\n\n// importScripts chunk loading\nvar installChunk = (data) => {\n\tvar [chunkIds, moreModules, runtime] = data;\n\tfor(var moduleId in moreModules) {\n\t\tif(__webpack_require__.o(moreModules, moduleId)) {\n\t\t\t__webpack_require__.m[moduleId] = moreModules[moduleId];\n\t\t}\n\t}\n\tif(runtime) runtime(__webpack_require__);\n\twhile(chunkIds.length)\n\t\tinstalledChunks[chunkIds.pop()] = 1;\n\tparentChunkLoadingFunction(data);\n};\n__webpack_require__.f.i = (chunkId, promises) => {\n\t// \"1\" is the signal for \"already loaded\"\n\tif(!installedChunks[chunkId]) {\n\t\tif(true) { // all chunks have JS\n\t\t\timportScripts(__webpack_require__.p + __webpack_require__.u(chunkId));\n\t\t}\n\t}\n};\n\nvar chunkLoadingGlobal = self[\"webpackChunkaleo_website\"] = self[\"webpackChunkaleo_website\"] || [];\nvar parentChunkLoadingFunction = chunkLoadingGlobal.push.bind(chunkLoadingGlobal);\nchunkLoadingGlobal.push = installChunk;\n\n// no HMR\n\n// no HMR manifest","// run startup\nvar __webpack_exports__ = __webpack_require__.x();\n"],"names":["webpackQueues","webpackExports","webpackError","resolveQueue","deferred","next","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","undefined","exports","module","__webpack_modules__","m","x","__webpack_exports__","O","Symbol","queue","d","forEach","fn","r","a","body","hasAwait","currentDeps","outerResolve","reject","depQueues","Set","promise","Promise","resolve","rej","deps","map","dep","then","obj","e","ret","wrapDeps","getResult","fnQueue","q","has","add","push","err","result","chunkIds","priority","notFulfilled","Infinity","i","length","fulfilled","j","Object","keys","every","key","splice","definition","o","defineProperty","enumerable","get","f","chunkId","all","reduce","promises","u","g","globalThis","this","Function","window","prop","prototype","hasOwnProperty","call","scriptUrl","importScripts","location","document","currentScript","src","scripts","getElementsByTagName","test","Error","replace","p","b","self","installedChunks","chunkLoadingGlobal","parentChunkLoadingFunction","bind","data","moreModules","runtime","pop"],"sourceRoot":""} \ No newline at end of file diff --git a/bd1596cd75301fef51e7.js b/bd1596cd75301fef51e7.js new file mode 100644 index 000000000..9adde19cb --- /dev/null +++ b/bd1596cd75301fef51e7.js @@ -0,0 +1 @@ +let _;const t=new Array(128).fill(void 0);function e(_){return t[_]}t.push(void 0,null,!0,!1);let r=t.length;function n(_){const n=e(_);return function(_){_<132||(t[_]=r,r=_)}(_),n}const i="undefined"!=typeof TextDecoder?new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0}):{decode:()=>{throw Error("TextDecoder not available")}};"undefined"!=typeof TextDecoder&&i.decode();let o=null;function a(){return null!==o&&o.buffer===_.memory.buffer||(o=new Uint8Array(_.memory.buffer)),o}function s(_,t){return _>>>=0,i.decode(a().slice(_,_+t))}function c(_){r===t.length&&t.push(t.length+1);const e=r;return r=t[e],t[e]=_,e}let g=0;const w="undefined"!=typeof TextEncoder?new TextEncoder("utf-8"):{encode:()=>{throw Error("TextEncoder not available")}},d=function(_,t){const e=w.encode(_);return t.set(e),{read:_.length,written:e.length}};function b(_,t,e){if(void 0===e){const e=w.encode(_),r=t(e.length,1)>>>0;return a().subarray(r,r+e.length).set(e),g=e.length,r}let r=_.length,n=t(r,1)>>>0;const i=a();let o=0;for(;o127)break;i[n+o]=t}if(o!==r){0!==o&&(_=_.slice(o)),n=e(n,r,r=o+3*_.length,1)>>>0;const t=a().subarray(n+o,n+r);o+=d(_,t).written,n=e(n,r,o,1)>>>0}return g=o,n}function l(_){return null==_}let u=null;function f(){return null!==u&&u.buffer===_.memory.buffer||(u=new Int32Array(_.memory.buffer)),u}function p(_){const t=typeof _;if("number"==t||"boolean"==t||null==_)return`${_}`;if("string"==t)return`"${_}"`;if("symbol"==t){const t=_.description;return null==t?"Symbol":`Symbol(${t})`}if("function"==t){const t=_.name;return"string"==typeof t&&t.length>0?`Function(${t})`:"Function"}if(Array.isArray(_)){const t=_.length;let e="[";t>0&&(e+=p(_[0]));for(let r=1;r1))return toString.call(_);if(r=e[1],"Object"==r)try{return"Object("+JSON.stringify(_)+")"}catch(_){return"Object"}return _ instanceof Error?`${_.name}: ${_.message}\n${_.stack}`:r}const y="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((t=>{_.__wbindgen_export_3.get(t.dtor)(t.a,t.b)}));function m(t,e,r,n){const i={a:t,b:e,cnt:1,dtor:r},o=(...t)=>{i.cnt++;const e=i.a;i.a=0;try{return n(e,i.b,...t)}finally{0==--i.cnt?(_.__wbindgen_export_3.get(i.dtor)(e,i.b),y.unregister(i)):i.a=e}};return o.original=i,y.register(o,i,i),o}function h(t,e,r){_._dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h4428289ce4d5afd9(t,e,c(r))}function v(_,t){if(!(_ instanceof t))throw new Error(`expected instance of ${t.name}`);return _.ptr}function k(_,t){const e=t(1*_.length,1)>>>0;return a().set(_,e/1),g=_.length,e}let P=null;function S(){return null!==P&&P.buffer===_.memory.buffer||(P=new BigInt64Array(_.memory.buffer)),P}function V(_,t){return _>>>=0,a().subarray(_/1,_/1+t)}function x(t,e){try{return t.apply(this,e)}catch(t){_.__wbindgen_exn_store(c(t))}}const F="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((t=>_.__wbg_address_free(t>>>0)));class T{static __wrap(_){_>>>=0;const t=Object.create(T.prototype);return t.__wbg_ptr=_,F.register(t,t.__wbg_ptr,t),t}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,F.unregister(this),_}free(){const t=this.__destroy_into_raw();_.__wbg_address_free(t)}static from_private_key(t){v(t,W);const e=_.address_from_private_key(t.__wbg_ptr);return T.__wrap(e)}static from_view_key(t){v(t,a_);const e=_.address_from_view_key(t.__wbg_ptr);return T.__wrap(e)}static from_string(t){const e=b(t,_.__wbindgen_malloc,_.__wbindgen_realloc),r=g,n=_.address_from_string(e,r);return T.__wrap(n)}to_string(){let t,e;try{const i=_.__wbindgen_add_to_stack_pointer(-16);_.address_to_string(i,this.__wbg_ptr);var r=f()[i/4+0],n=f()[i/4+1];return t=r,e=n,s(r,n)}finally{_.__wbindgen_add_to_stack_pointer(16),_.__wbindgen_free(t,e,1)}}verify(t,e){const r=k(t,_.__wbindgen_malloc),n=g;v(e,t_);return 0!==_.address_verify(this.__wbg_ptr,r,n,e.__wbg_ptr)}}const R="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((t=>_.__wbg_execution_free(t>>>0)));class z{static __wrap(_){_>>>=0;const t=Object.create(z.prototype);return t.__wbg_ptr=_,R.register(t,t.__wbg_ptr,t),t}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,R.unregister(this),_}free(){const t=this.__destroy_into_raw();_.__wbg_execution_free(t)}toString(){let t,e;try{const i=_.__wbindgen_add_to_stack_pointer(-16);_.execution_toString(i,this.__wbg_ptr);var r=f()[i/4+0],n=f()[i/4+1];return t=r,e=n,s(r,n)}finally{_.__wbindgen_add_to_stack_pointer(16),_.__wbindgen_free(t,e,1)}}static fromString(t){try{const i=_.__wbindgen_add_to_stack_pointer(-16),o=b(t,_.__wbindgen_malloc,_.__wbindgen_realloc),a=g;_.execution_fromString(i,o,a);var e=f()[i/4+0],r=f()[i/4+1];if(f()[i/4+2])throw n(r);return z.__wrap(e)}finally{_.__wbindgen_add_to_stack_pointer(16)}}}const A="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((t=>_.__wbg_executionresponse_free(t>>>0)));class O{static __wrap(_){_>>>=0;const t=Object.create(O.prototype);return t.__wbg_ptr=_,A.register(t,t.__wbg_ptr,t),t}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,A.unregister(this),_}free(){const t=this.__destroy_into_raw();_.__wbg_executionresponse_free(t)}getOutputs(){return n(_.executionresponse_getOutputs(this.__wbg_ptr))}getExecution(){const t=_.executionresponse_getExecution(this.__wbg_ptr);return 0===t?void 0:z.__wrap(t)}getKeys(){try{const r=_.__wbindgen_add_to_stack_pointer(-16);_.executionresponse_getKeys(r,this.__wbg_ptr);var t=f()[r/4+0],e=f()[r/4+1];if(f()[r/4+2])throw n(e);return E.__wrap(t)}finally{_.__wbindgen_add_to_stack_pointer(16)}}getProvingKey(){const t=_.executionresponse_getProvingKey(this.__wbg_ptr);return 0===t?void 0:Q.__wrap(t)}getVerifyingKey(){const t=_.executionresponse_getVerifyingKey(this.__wbg_ptr);return i_.__wrap(t)}getFunctionId(){let t,e;try{const i=_.__wbindgen_add_to_stack_pointer(-16);_.executionresponse_getFunctionId(i,this.__wbg_ptr);var r=f()[i/4+0],n=f()[i/4+1];return t=r,e=n,s(r,n)}finally{_.__wbindgen_add_to_stack_pointer(16),_.__wbindgen_free(t,e,1)}}getProgram(){const t=_.executionresponse_getProgram(this.__wbg_ptr);return J.__wrap(t)}}const j="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((t=>_.__wbg_field_free(t>>>0)));class K{static __wrap(_){_>>>=0;const t=Object.create(K.prototype);return t.__wbg_ptr=_,j.register(t,t.__wbg_ptr,t),t}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,j.unregister(this),_}free(){const t=this.__destroy_into_raw();_.__wbg_field_free(t)}toString(){let t,e;try{const i=_.__wbindgen_add_to_stack_pointer(-16);_.field_toString(i,this.__wbg_ptr);var r=f()[i/4+0],n=f()[i/4+1];return t=r,e=n,s(r,n)}finally{_.__wbindgen_add_to_stack_pointer(16),_.__wbindgen_free(t,e,1)}}static fromString(t){try{const i=_.__wbindgen_add_to_stack_pointer(-16),o=b(t,_.__wbindgen_malloc,_.__wbindgen_realloc),a=g;_.field_fromString(i,o,a);var e=f()[i/4+0],r=f()[i/4+1];if(f()[i/4+2])throw n(r);return K.__wrap(e)}finally{_.__wbindgen_add_to_stack_pointer(16)}}}const M="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((t=>_.__wbg_keypair_free(t>>>0)));class E{static __wrap(_){_>>>=0;const t=Object.create(E.prototype);return t.__wbg_ptr=_,M.register(t,t.__wbg_ptr,t),t}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,M.unregister(this),_}free(){const t=this.__destroy_into_raw();_.__wbg_keypair_free(t)}constructor(t,e){v(t,Q);var r=t.__destroy_into_raw();v(e,i_);var n=e.__destroy_into_raw();const i=_.keypair_new(r,n);return this.__wbg_ptr=i>>>0,this}provingKey(){try{const r=_.__wbindgen_add_to_stack_pointer(-16);_.keypair_provingKey(r,this.__wbg_ptr);var t=f()[r/4+0],e=f()[r/4+1];if(f()[r/4+2])throw n(e);return Q.__wrap(t)}finally{_.__wbindgen_add_to_stack_pointer(16)}}verifyingKey(){try{const r=_.__wbindgen_add_to_stack_pointer(-16);_.keypair_verifyingKey(r,this.__wbg_ptr);var t=f()[r/4+0],e=f()[r/4+1];if(f()[r/4+2])throw n(e);return i_.__wrap(t)}finally{_.__wbindgen_add_to_stack_pointer(16)}}}const B="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((t=>_.__wbg_metadata_free(t>>>0)));class I{static __wrap(_){_>>>=0;const t=Object.create(I.prototype);return t.__wbg_ptr=_,B.register(t,t.__wbg_ptr,t),t}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,B.unregister(this),_}free(){const t=this.__destroy_into_raw();_.__wbg_metadata_free(t)}get locator(){let t,e;try{const i=_.__wbindgen_add_to_stack_pointer(-16);_.__wbg_get_metadata_locator(i,this.__wbg_ptr);var r=f()[i/4+0],n=f()[i/4+1];return t=r,e=n,s(r,n)}finally{_.__wbindgen_add_to_stack_pointer(16),_.__wbindgen_free(t,e,1)}}set locator(t){const e=b(t,_.__wbindgen_malloc,_.__wbindgen_realloc),r=g;_.__wbg_set_metadata_locator(this.__wbg_ptr,e,r)}get prover(){let t,e;try{const i=_.__wbindgen_add_to_stack_pointer(-16);_.__wbg_get_metadata_prover(i,this.__wbg_ptr);var r=f()[i/4+0],n=f()[i/4+1];return t=r,e=n,s(r,n)}finally{_.__wbindgen_add_to_stack_pointer(16),_.__wbindgen_free(t,e,1)}}set prover(t){const e=b(t,_.__wbindgen_malloc,_.__wbindgen_realloc),r=g;_.__wbg_set_metadata_prover(this.__wbg_ptr,e,r)}get verifier(){let t,e;try{const i=_.__wbindgen_add_to_stack_pointer(-16);_.__wbg_get_metadata_verifier(i,this.__wbg_ptr);var r=f()[i/4+0],n=f()[i/4+1];return t=r,e=n,s(r,n)}finally{_.__wbindgen_add_to_stack_pointer(16),_.__wbindgen_free(t,e,1)}}set verifier(t){const e=b(t,_.__wbindgen_malloc,_.__wbindgen_realloc),r=g;_.__wbg_set_metadata_verifier(this.__wbg_ptr,e,r)}get verifyingKey(){let t,e;try{const i=_.__wbindgen_add_to_stack_pointer(-16);_.__wbg_get_metadata_verifyingKey(i,this.__wbg_ptr);var r=f()[i/4+0],n=f()[i/4+1];return t=r,e=n,s(r,n)}finally{_.__wbindgen_add_to_stack_pointer(16),_.__wbindgen_free(t,e,1)}}set verifyingKey(t){const e=b(t,_.__wbindgen_malloc,_.__wbindgen_realloc),r=g;_.__wbg_set_metadata_verifyingKey(this.__wbg_ptr,e,r)}static baseUrl(){let t,e;try{const i=_.__wbindgen_add_to_stack_pointer(-16);_.metadata_baseUrl(i);var r=f()[i/4+0],n=f()[i/4+1];return t=r,e=n,s(r,n)}finally{_.__wbindgen_add_to_stack_pointer(16),_.__wbindgen_free(t,e,1)}}static bond_public(){const t=_.metadata_bond_public();return I.__wrap(t)}static bond_validator(){const t=_.metadata_bond_validator();return I.__wrap(t)}static claim_unbond_public(){const t=_.metadata_claim_unbond_public();return I.__wrap(t)}static fee_private(){const t=_.metadata_fee_private();return I.__wrap(t)}static fee_public(){const t=_.metadata_fee_public();return I.__wrap(t)}static inclusion(){const t=_.metadata_inclusion();return I.__wrap(t)}static join(){const t=_.metadata_join();return I.__wrap(t)}static set_validator_state(){const t=_.metadata_set_validator_state();return I.__wrap(t)}static split(){const t=_.metadata_split();return I.__wrap(t)}static transfer_private(){const t=_.metadata_transfer_private();return I.__wrap(t)}static transfer_private_to_public(){const t=_.metadata_transfer_private_to_public();return I.__wrap(t)}static transfer_public(){const t=_.metadata_transfer_public();return I.__wrap(t)}static transfer_public_as_signer(){const t=_.metadata_transfer_public_as_signer();return I.__wrap(t)}static transfer_public_to_private(){const t=_.metadata_transfer_public_to_private();return I.__wrap(t)}static unbond_public(){const t=_.metadata_unbond_public();return I.__wrap(t)}}const U="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((t=>_.__wbg_offlinequery_free(t>>>0)));class C{static __wrap(_){_>>>=0;const t=Object.create(C.prototype);return t.__wbg_ptr=_,U.register(t,t.__wbg_ptr,t),t}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,U.unregister(this),_}free(){const t=this.__destroy_into_raw();_.__wbg_offlinequery_free(t)}constructor(t){try{const i=_.__wbindgen_add_to_stack_pointer(-16),o=b(t,_.__wbindgen_malloc,_.__wbindgen_realloc),a=g;_.offlinequery_new(i,o,a);var e=f()[i/4+0],r=f()[i/4+1];if(f()[i/4+2])throw n(r);return this.__wbg_ptr=e>>>0,this}finally{_.__wbindgen_add_to_stack_pointer(16)}}addStatePath(t,e){try{const i=_.__wbindgen_add_to_stack_pointer(-16),o=b(t,_.__wbindgen_malloc,_.__wbindgen_realloc),a=g,s=b(e,_.__wbindgen_malloc,_.__wbindgen_realloc),c=g;_.offlinequery_addStatePath(i,this.__wbg_ptr,o,a,s,c);var r=f()[i/4+0];if(f()[i/4+1])throw n(r)}finally{_.__wbindgen_add_to_stack_pointer(16)}}toString(){let t,e;try{const i=_.__wbindgen_add_to_stack_pointer(-16);_.offlinequery_toString(i,this.__wbg_ptr);var r=f()[i/4+0],n=f()[i/4+1];return t=r,e=n,s(r,n)}finally{_.__wbindgen_add_to_stack_pointer(16),_.__wbindgen_free(t,e,1)}}static fromString(t){try{const i=_.__wbindgen_add_to_stack_pointer(-16),o=b(t,_.__wbindgen_malloc,_.__wbindgen_realloc),a=g;_.offlinequery_fromString(i,o,a);var e=f()[i/4+0],r=f()[i/4+1];if(f()[i/4+2])throw n(r);return C.__wrap(e)}finally{_.__wbindgen_add_to_stack_pointer(16)}}}const q="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((t=>_.__wbg_privatekey_free(t>>>0)));class W{static __wrap(_){_>>>=0;const t=Object.create(W.prototype);return t.__wbg_ptr=_,q.register(t,t.__wbg_ptr,t),t}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,q.unregister(this),_}free(){const t=this.__destroy_into_raw();_.__wbg_privatekey_free(t)}constructor(){const t=_.privatekey_new();return this.__wbg_ptr=t>>>0,this}static from_seed_unchecked(t){const e=k(t,_.__wbindgen_malloc),r=g,n=_.privatekey_from_seed_unchecked(e,r);return W.__wrap(n)}static from_string(t){try{const i=_.__wbindgen_add_to_stack_pointer(-16),o=b(t,_.__wbindgen_malloc,_.__wbindgen_realloc),a=g;_.privatekey_from_string(i,o,a);var e=f()[i/4+0],r=f()[i/4+1];if(f()[i/4+2])throw n(r);return W.__wrap(e)}finally{_.__wbindgen_add_to_stack_pointer(16)}}to_string(){let t,e;try{const i=_.__wbindgen_add_to_stack_pointer(-16);_.privatekey_to_string(i,this.__wbg_ptr);var r=f()[i/4+0],n=f()[i/4+1];return t=r,e=n,s(r,n)}finally{_.__wbindgen_add_to_stack_pointer(16),_.__wbindgen_free(t,e,1)}}to_view_key(){const t=_.privatekey_to_view_key(this.__wbg_ptr);return a_.__wrap(t)}to_address(){const t=_.privatekey_to_address(this.__wbg_ptr);return T.__wrap(t)}sign(t){const e=k(t,_.__wbindgen_malloc),r=g,n=_.privatekey_sign(this.__wbg_ptr,e,r);return t_.__wrap(n)}static newEncrypted(t){try{const i=_.__wbindgen_add_to_stack_pointer(-16),o=b(t,_.__wbindgen_malloc,_.__wbindgen_realloc),a=g;_.privatekey_newEncrypted(i,o,a);var e=f()[i/4+0],r=f()[i/4+1];if(f()[i/4+2])throw n(r);return $.__wrap(e)}finally{_.__wbindgen_add_to_stack_pointer(16)}}toCiphertext(t){try{const i=_.__wbindgen_add_to_stack_pointer(-16),o=b(t,_.__wbindgen_malloc,_.__wbindgen_realloc),a=g;_.privatekey_toCiphertext(i,this.__wbg_ptr,o,a);var e=f()[i/4+0],r=f()[i/4+1];if(f()[i/4+2])throw n(r);return $.__wrap(e)}finally{_.__wbindgen_add_to_stack_pointer(16)}}static fromPrivateKeyCiphertext(t,e){try{const o=_.__wbindgen_add_to_stack_pointer(-16);v(t,$);const a=b(e,_.__wbindgen_malloc,_.__wbindgen_realloc),s=g;_.privatekey_fromPrivateKeyCiphertext(o,t.__wbg_ptr,a,s);var r=f()[o/4+0],i=f()[o/4+1];if(f()[o/4+2])throw n(i);return W.__wrap(r)}finally{_.__wbindgen_add_to_stack_pointer(16)}}}const N="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((t=>_.__wbg_privatekeyciphertext_free(t>>>0)));class ${static __wrap(_){_>>>=0;const t=Object.create($.prototype);return t.__wbg_ptr=_,N.register(t,t.__wbg_ptr,t),t}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,N.unregister(this),_}free(){const t=this.__destroy_into_raw();_.__wbg_privatekeyciphertext_free(t)}static encryptPrivateKey(t,e){try{const o=_.__wbindgen_add_to_stack_pointer(-16);v(t,W);const a=b(e,_.__wbindgen_malloc,_.__wbindgen_realloc),s=g;_.privatekey_toCiphertext(o,t.__wbg_ptr,a,s);var r=f()[o/4+0],i=f()[o/4+1];if(f()[o/4+2])throw n(i);return $.__wrap(r)}finally{_.__wbindgen_add_to_stack_pointer(16)}}decryptToPrivateKey(t){try{const i=_.__wbindgen_add_to_stack_pointer(-16),o=b(t,_.__wbindgen_malloc,_.__wbindgen_realloc),a=g;_.privatekeyciphertext_decryptToPrivateKey(i,this.__wbg_ptr,o,a);var e=f()[i/4+0],r=f()[i/4+1];if(f()[i/4+2])throw n(r);return W.__wrap(e)}finally{_.__wbindgen_add_to_stack_pointer(16)}}toString(){let t,e;try{const i=_.__wbindgen_add_to_stack_pointer(-16);_.privatekeyciphertext_toString(i,this.__wbg_ptr);var r=f()[i/4+0],n=f()[i/4+1];return t=r,e=n,s(r,n)}finally{_.__wbindgen_add_to_stack_pointer(16),_.__wbindgen_free(t,e,1)}}static fromString(t){try{const i=_.__wbindgen_add_to_stack_pointer(-16),o=b(t,_.__wbindgen_malloc,_.__wbindgen_realloc),a=g;_.privatekeyciphertext_fromString(i,o,a);var e=f()[i/4+0],r=f()[i/4+1];if(f()[i/4+2])throw n(r);return $.__wrap(e)}finally{_.__wbindgen_add_to_stack_pointer(16)}}}const D="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((t=>_.__wbg_program_free(t>>>0)));class J{static __wrap(_){_>>>=0;const t=Object.create(J.prototype);return t.__wbg_ptr=_,D.register(t,t.__wbg_ptr,t),t}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,D.unregister(this),_}free(){const t=this.__destroy_into_raw();_.__wbg_program_free(t)}static fromString(t){try{const i=_.__wbindgen_add_to_stack_pointer(-16),o=b(t,_.__wbindgen_malloc,_.__wbindgen_realloc),a=g;_.program_fromString(i,o,a);var e=f()[i/4+0],r=f()[i/4+1];if(f()[i/4+2])throw n(r);return J.__wrap(e)}finally{_.__wbindgen_add_to_stack_pointer(16)}}toString(){let t,e;try{const i=_.__wbindgen_add_to_stack_pointer(-16);_.program_toString(i,this.__wbg_ptr);var r=f()[i/4+0],n=f()[i/4+1];return t=r,e=n,s(r,n)}finally{_.__wbindgen_add_to_stack_pointer(16),_.__wbindgen_free(t,e,1)}}hasFunction(t){const e=b(t,_.__wbindgen_malloc,_.__wbindgen_realloc),r=g;return 0!==_.program_hasFunction(this.__wbg_ptr,e,r)}getFunctions(){return n(_.program_getFunctions(this.__wbg_ptr))}getFunctionInputs(t){try{const i=_.__wbindgen_add_to_stack_pointer(-16),o=b(t,_.__wbindgen_malloc,_.__wbindgen_realloc),a=g;_.program_getFunctionInputs(i,this.__wbg_ptr,o,a);var e=f()[i/4+0],r=f()[i/4+1];if(f()[i/4+2])throw n(r);return n(e)}finally{_.__wbindgen_add_to_stack_pointer(16)}}getMappings(){try{const r=_.__wbindgen_add_to_stack_pointer(-16);_.program_getMappings(r,this.__wbg_ptr);var t=f()[r/4+0],e=f()[r/4+1];if(f()[r/4+2])throw n(e);return n(t)}finally{_.__wbindgen_add_to_stack_pointer(16)}}getRecordMembers(t){try{const i=_.__wbindgen_add_to_stack_pointer(-16),o=b(t,_.__wbindgen_malloc,_.__wbindgen_realloc),a=g;_.program_getRecordMembers(i,this.__wbg_ptr,o,a);var e=f()[i/4+0],r=f()[i/4+1];if(f()[i/4+2])throw n(r);return n(e)}finally{_.__wbindgen_add_to_stack_pointer(16)}}getStructMembers(t){try{const i=_.__wbindgen_add_to_stack_pointer(-16),o=b(t,_.__wbindgen_malloc,_.__wbindgen_realloc),a=g;_.program_getStructMembers(i,this.__wbg_ptr,o,a);var e=f()[i/4+0],r=f()[i/4+1];if(f()[i/4+2])throw n(r);return n(e)}finally{_.__wbindgen_add_to_stack_pointer(16)}}static getCreditsProgram(){const t=_.program_getCreditsProgram();return J.__wrap(t)}id(){let t,e;try{const i=_.__wbindgen_add_to_stack_pointer(-16);_.program_id(i,this.__wbg_ptr);var r=f()[i/4+0],n=f()[i/4+1];return t=r,e=n,s(r,n)}finally{_.__wbindgen_add_to_stack_pointer(16),_.__wbindgen_free(t,e,1)}}address(){try{const r=_.__wbindgen_add_to_stack_pointer(-16);_.program_address(r,this.__wbg_ptr);var t=f()[r/4+0],e=f()[r/4+1];if(f()[r/4+2])throw n(e);return T.__wrap(t)}finally{_.__wbindgen_add_to_stack_pointer(16)}}isEqual(t){v(t,J);return 0!==_.program_isEqual(this.__wbg_ptr,t.__wbg_ptr)}getImports(){return n(_.program_getImports(this.__wbg_ptr))}}const H="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((t=>_.__wbg_programmanager_free(t>>>0)));const L="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((t=>_.__wbg_provingkey_free(t>>>0)));class Q{static __wrap(_){_>>>=0;const t=Object.create(Q.prototype);return t.__wbg_ptr=_,L.register(t,t.__wbg_ptr,t),t}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,L.unregister(this),_}free(){const t=this.__destroy_into_raw();_.__wbg_provingkey_free(t)}isBondPublicProver(){return 0!==_.provingkey_isBondPublicProver(this.__wbg_ptr)}isBondValidatorProver(){return 0!==_.provingkey_isBondValidatorProver(this.__wbg_ptr)}isClaimUnbondPublicProver(){return 0!==_.provingkey_isClaimUnbondPublicProver(this.__wbg_ptr)}isFeePrivateProver(){return 0!==_.provingkey_isFeePrivateProver(this.__wbg_ptr)}isFeePublicProver(){return 0!==_.provingkey_isFeePublicProver(this.__wbg_ptr)}isInclusionProver(){return 0!==_.provingkey_isInclusionProver(this.__wbg_ptr)}isJoinProver(){return 0!==_.provingkey_isJoinProver(this.__wbg_ptr)}isSetValidatorStateProver(){return 0!==_.provingkey_isSetValidatorStateProver(this.__wbg_ptr)}isSplitProver(){return 0!==_.provingkey_isSplitProver(this.__wbg_ptr)}isTransferPrivateProver(){return 0!==_.provingkey_isTransferPrivateProver(this.__wbg_ptr)}isTransferPrivateToPublicProver(){return 0!==_.provingkey_isTransferPrivateToPublicProver(this.__wbg_ptr)}isTransferPublicProver(){return 0!==_.provingkey_isTransferPublicProver(this.__wbg_ptr)}isTransferPublicAsSignerProver(){return 0!==_.provingkey_isTransferPublicAsSignerProver(this.__wbg_ptr)}isTransferPublicToPrivateProver(){return 0!==_.provingkey_isTransferPublicToPrivateProver(this.__wbg_ptr)}isUnbondPublicProver(){return 0!==_.provingkey_isUnbondPublicProver(this.__wbg_ptr)}checksum(){let t,e;try{const i=_.__wbindgen_add_to_stack_pointer(-16);_.provingkey_checksum(i,this.__wbg_ptr);var r=f()[i/4+0],n=f()[i/4+1];return t=r,e=n,s(r,n)}finally{_.__wbindgen_add_to_stack_pointer(16),_.__wbindgen_free(t,e,1)}}copy(){const t=_.provingkey_copy(this.__wbg_ptr);return Q.__wrap(t)}static fromBytes(t){try{const i=_.__wbindgen_add_to_stack_pointer(-16),o=k(t,_.__wbindgen_malloc),a=g;_.provingkey_fromBytes(i,o,a);var e=f()[i/4+0],r=f()[i/4+1];if(f()[i/4+2])throw n(r);return Q.__wrap(e)}finally{_.__wbindgen_add_to_stack_pointer(16)}}static fromString(t){try{const i=_.__wbindgen_add_to_stack_pointer(-16),o=b(t,_.__wbindgen_malloc,_.__wbindgen_realloc),a=g;_.provingkey_fromString(i,o,a);var e=f()[i/4+0],r=f()[i/4+1];if(f()[i/4+2])throw n(r);return Q.__wrap(e)}finally{_.__wbindgen_add_to_stack_pointer(16)}}toBytes(){try{const o=_.__wbindgen_add_to_stack_pointer(-16);_.provingkey_toBytes(o,this.__wbg_ptr);var t=f()[o/4+0],e=f()[o/4+1],r=f()[o/4+2];if(f()[o/4+3])throw n(r);var i=V(t,e).slice();return _.__wbindgen_free(t,1*e,1),i}finally{_.__wbindgen_add_to_stack_pointer(16)}}toString(){let t,e;try{const i=_.__wbindgen_add_to_stack_pointer(-16);_.provingkey_toString(i,this.__wbg_ptr);var r=f()[i/4+0],n=f()[i/4+1];return t=r,e=n,s(r,n)}finally{_.__wbindgen_add_to_stack_pointer(16),_.__wbindgen_free(t,e,1)}}}const X="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((t=>_.__wbg_recordciphertext_free(t>>>0)));class G{static __wrap(_){_>>>=0;const t=Object.create(G.prototype);return t.__wbg_ptr=_,X.register(t,t.__wbg_ptr,t),t}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,X.unregister(this),_}free(){const t=this.__destroy_into_raw();_.__wbg_recordciphertext_free(t)}static fromString(t){try{const i=_.__wbindgen_add_to_stack_pointer(-16),o=b(t,_.__wbindgen_malloc,_.__wbindgen_realloc),a=g;_.recordciphertext_fromString(i,o,a);var e=f()[i/4+0],r=f()[i/4+1];if(f()[i/4+2])throw n(r);return G.__wrap(e)}finally{_.__wbindgen_add_to_stack_pointer(16)}}toString(){let t,e;try{const i=_.__wbindgen_add_to_stack_pointer(-16);_.recordciphertext_toString(i,this.__wbg_ptr);var r=f()[i/4+0],n=f()[i/4+1];return t=r,e=n,s(r,n)}finally{_.__wbindgen_add_to_stack_pointer(16),_.__wbindgen_free(t,e,1)}}decrypt(t){try{const i=_.__wbindgen_add_to_stack_pointer(-16);v(t,a_),_.recordciphertext_decrypt(i,this.__wbg_ptr,t.__wbg_ptr);var e=f()[i/4+0],r=f()[i/4+1];if(f()[i/4+2])throw n(r);return Z.__wrap(e)}finally{_.__wbindgen_add_to_stack_pointer(16)}}isOwner(t){v(t,a_);return 0!==_.recordciphertext_isOwner(this.__wbg_ptr,t.__wbg_ptr)}}const Y="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((t=>_.__wbg_recordplaintext_free(t>>>0)));class Z{static __wrap(_){_>>>=0;const t=Object.create(Z.prototype);return t.__wbg_ptr=_,Y.register(t,t.__wbg_ptr,t),t}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,Y.unregister(this),_}free(){const t=this.__destroy_into_raw();_.__wbg_recordplaintext_free(t)}commitment(t,e){try{const o=_.__wbindgen_add_to_stack_pointer(-16),a=b(t,_.__wbindgen_malloc,_.__wbindgen_realloc),s=g,c=b(e,_.__wbindgen_malloc,_.__wbindgen_realloc),w=g;_.recordplaintext_commitment(o,this.__wbg_ptr,a,s,c,w);var r=f()[o/4+0],i=f()[o/4+1];if(f()[o/4+2])throw n(i);return K.__wrap(r)}finally{_.__wbindgen_add_to_stack_pointer(16)}}static fromString(t){try{const i=_.__wbindgen_add_to_stack_pointer(-16),o=b(t,_.__wbindgen_malloc,_.__wbindgen_realloc),a=g;_.recordplaintext_fromString(i,o,a);var e=f()[i/4+0],r=f()[i/4+1];if(f()[i/4+2])throw n(r);return Z.__wrap(e)}finally{_.__wbindgen_add_to_stack_pointer(16)}}toString(){let t,e;try{const i=_.__wbindgen_add_to_stack_pointer(-16);_.recordplaintext_toString(i,this.__wbg_ptr);var r=f()[i/4+0],n=f()[i/4+1];return t=r,e=n,s(r,n)}finally{_.__wbindgen_add_to_stack_pointer(16),_.__wbindgen_free(t,e,1)}}microcredits(){const t=_.recordplaintext_microcredits(this.__wbg_ptr);return BigInt.asUintN(64,t)}nonce(){let t,e;try{const i=_.__wbindgen_add_to_stack_pointer(-16);_.recordplaintext_nonce(i,this.__wbg_ptr);var r=f()[i/4+0],n=f()[i/4+1];return t=r,e=n,s(r,n)}finally{_.__wbindgen_add_to_stack_pointer(16),_.__wbindgen_free(t,e,1)}}serialNumberString(t,e,r){let i,o;try{const p=_.__wbindgen_add_to_stack_pointer(-16);v(t,W);const y=b(e,_.__wbindgen_malloc,_.__wbindgen_realloc),m=g,h=b(r,_.__wbindgen_malloc,_.__wbindgen_realloc),k=g;_.recordplaintext_serialNumberString(p,this.__wbg_ptr,t.__wbg_ptr,y,m,h,k);var a=f()[p/4+0],c=f()[p/4+1],w=f()[p/4+2],d=f()[p/4+3],l=a,u=c;if(d)throw l=0,u=0,n(w);return i=l,o=u,s(l,u)}finally{_.__wbindgen_add_to_stack_pointer(16),_.__wbindgen_free(i,o,1)}}}const __="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((t=>_.__wbg_signature_free(t>>>0)));class t_{static __wrap(_){_>>>=0;const t=Object.create(t_.prototype);return t.__wbg_ptr=_,__.register(t,t.__wbg_ptr,t),t}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,__.unregister(this),_}free(){const t=this.__destroy_into_raw();_.__wbg_signature_free(t)}static sign(t,e){v(t,W);const r=k(e,_.__wbindgen_malloc),n=g,i=_.privatekey_sign(t.__wbg_ptr,r,n);return t_.__wrap(i)}verify(t,e){v(t,T);const r=k(e,_.__wbindgen_malloc),n=g;return 0!==_.signature_verify(this.__wbg_ptr,t.__wbg_ptr,r,n)}static from_string(t){const e=b(t,_.__wbindgen_malloc,_.__wbindgen_realloc),r=g,n=_.signature_from_string(e,r);return t_.__wrap(n)}to_string(){let t,e;try{const i=_.__wbindgen_add_to_stack_pointer(-16);_.signature_to_string(i,this.__wbg_ptr);var r=f()[i/4+0],n=f()[i/4+1];return t=r,e=n,s(r,n)}finally{_.__wbindgen_add_to_stack_pointer(16),_.__wbindgen_free(t,e,1)}}}const e_="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((t=>_.__wbg_transaction_free(t>>>0)));class r_{static __wrap(_){_>>>=0;const t=Object.create(r_.prototype);return t.__wbg_ptr=_,e_.register(t,t.__wbg_ptr,t),t}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,e_.unregister(this),_}free(){const t=this.__destroy_into_raw();_.__wbg_transaction_free(t)}static fromString(t){try{const i=_.__wbindgen_add_to_stack_pointer(-16),o=b(t,_.__wbindgen_malloc,_.__wbindgen_realloc),a=g;_.transaction_fromString(i,o,a);var e=f()[i/4+0],r=f()[i/4+1];if(f()[i/4+2])throw n(r);return r_.__wrap(e)}finally{_.__wbindgen_add_to_stack_pointer(16)}}toString(){let t,e;try{const i=_.__wbindgen_add_to_stack_pointer(-16);_.transaction_toString(i,this.__wbg_ptr);var r=f()[i/4+0],n=f()[i/4+1];return t=r,e=n,s(r,n)}finally{_.__wbindgen_add_to_stack_pointer(16),_.__wbindgen_free(t,e,1)}}transactionId(){let t,e;try{const i=_.__wbindgen_add_to_stack_pointer(-16);_.transaction_transactionId(i,this.__wbg_ptr);var r=f()[i/4+0],n=f()[i/4+1];return t=r,e=n,s(r,n)}finally{_.__wbindgen_add_to_stack_pointer(16),_.__wbindgen_free(t,e,1)}}transactionType(){let t,e;try{const i=_.__wbindgen_add_to_stack_pointer(-16);_.transaction_transactionType(i,this.__wbg_ptr);var r=f()[i/4+0],n=f()[i/4+1];return t=r,e=n,s(r,n)}finally{_.__wbindgen_add_to_stack_pointer(16),_.__wbindgen_free(t,e,1)}}}const n_="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((t=>_.__wbg_verifyingkey_free(t>>>0)));class i_{static __wrap(_){_>>>=0;const t=Object.create(i_.prototype);return t.__wbg_ptr=_,n_.register(t,t.__wbg_ptr,t),t}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,n_.unregister(this),_}free(){const t=this.__destroy_into_raw();_.__wbg_verifyingkey_free(t)}static bondPublicVerifier(){const t=_.verifyingkey_bondPublicVerifier();return i_.__wrap(t)}static bondValidatorVerifier(){const t=_.verifyingkey_bondValidatorVerifier();return i_.__wrap(t)}static claimUnbondPublicVerifier(){const t=_.verifyingkey_claimUnbondPublicVerifier();return i_.__wrap(t)}static feePrivateVerifier(){const t=_.verifyingkey_feePrivateVerifier();return i_.__wrap(t)}static feePublicVerifier(){const t=_.verifyingkey_feePublicVerifier();return i_.__wrap(t)}static inclusionVerifier(){const t=_.verifyingkey_inclusionVerifier();return i_.__wrap(t)}static joinVerifier(){const t=_.verifyingkey_joinVerifier();return i_.__wrap(t)}static setValidatorStateVerifier(){const t=_.verifyingkey_setValidatorStateVerifier();return i_.__wrap(t)}static splitVerifier(){const t=_.verifyingkey_splitVerifier();return i_.__wrap(t)}static transferPrivateVerifier(){const t=_.verifyingkey_transferPrivateVerifier();return i_.__wrap(t)}static transferPrivateToPublicVerifier(){const t=_.verifyingkey_transferPrivateToPublicVerifier();return i_.__wrap(t)}static transferPublicVerifier(){const t=_.verifyingkey_transferPublicVerifier();return i_.__wrap(t)}static transferPublicAsSignerVerifier(){const t=_.verifyingkey_transferPublicAsSignerVerifier();return i_.__wrap(t)}static transferPublicToPrivateVerifier(){const t=_.verifyingkey_transferPublicToPrivateVerifier();return i_.__wrap(t)}static unbondPublicVerifier(){const t=_.verifyingkey_unbondPublicVerifier();return i_.__wrap(t)}isBondPublicVerifier(){return 0!==_.verifyingkey_isBondPublicVerifier(this.__wbg_ptr)}isBondValidatorVerifier(){return 0!==_.verifyingkey_isBondValidatorVerifier(this.__wbg_ptr)}isClaimUnbondPublicVerifier(){return 0!==_.verifyingkey_isClaimUnbondPublicVerifier(this.__wbg_ptr)}isFeePrivateVerifier(){return 0!==_.verifyingkey_isFeePrivateVerifier(this.__wbg_ptr)}isFeePublicVerifier(){return 0!==_.verifyingkey_isFeePublicVerifier(this.__wbg_ptr)}isInclusionVerifier(){return 0!==_.verifyingkey_isInclusionVerifier(this.__wbg_ptr)}isJoinVerifier(){return 0!==_.verifyingkey_isJoinVerifier(this.__wbg_ptr)}isSetValidatorStateVerifier(){return 0!==_.verifyingkey_isSetValidatorStateVerifier(this.__wbg_ptr)}isSplitVerifier(){return 0!==_.verifyingkey_isSplitVerifier(this.__wbg_ptr)}isTransferPrivateVerifier(){return 0!==_.verifyingkey_isTransferPrivateVerifier(this.__wbg_ptr)}isTransferPrivateToPublicVerifier(){return 0!==_.verifyingkey_isTransferPrivateToPublicVerifier(this.__wbg_ptr)}isTransferPublicVerifier(){return 0!==_.verifyingkey_isTransferPublicVerifier(this.__wbg_ptr)}isTransferPublicAsSignerVerifier(){return 0!==_.verifyingkey_isTransferPublicAsSignerVerifier(this.__wbg_ptr)}isTransferPublicToPrivateVerifier(){return 0!==_.verifyingkey_isTransferPublicToPrivateVerifier(this.__wbg_ptr)}isUnbondPublicVerifier(){return 0!==_.verifyingkey_isUnbondPublicVerifier(this.__wbg_ptr)}checksum(){let t,e;try{const i=_.__wbindgen_add_to_stack_pointer(-16);_.verifyingkey_checksum(i,this.__wbg_ptr);var r=f()[i/4+0],n=f()[i/4+1];return t=r,e=n,s(r,n)}finally{_.__wbindgen_add_to_stack_pointer(16),_.__wbindgen_free(t,e,1)}}copy(){const t=_.verifyingkey_copy(this.__wbg_ptr);return i_.__wrap(t)}static fromBytes(t){try{const i=_.__wbindgen_add_to_stack_pointer(-16),o=k(t,_.__wbindgen_malloc),a=g;_.verifyingkey_fromBytes(i,o,a);var e=f()[i/4+0],r=f()[i/4+1];if(f()[i/4+2])throw n(r);return i_.__wrap(e)}finally{_.__wbindgen_add_to_stack_pointer(16)}}static fromString(t){try{const i=_.__wbindgen_add_to_stack_pointer(-16),o=b(t,_.__wbindgen_malloc,_.__wbindgen_realloc),a=g;_.verifyingkey_fromString(i,o,a);var e=f()[i/4+0],r=f()[i/4+1];if(f()[i/4+2])throw n(r);return i_.__wrap(e)}finally{_.__wbindgen_add_to_stack_pointer(16)}}toBytes(){try{const o=_.__wbindgen_add_to_stack_pointer(-16);_.verifyingkey_toBytes(o,this.__wbg_ptr);var t=f()[o/4+0],e=f()[o/4+1],r=f()[o/4+2];if(f()[o/4+3])throw n(r);var i=V(t,e).slice();return _.__wbindgen_free(t,1*e,1),i}finally{_.__wbindgen_add_to_stack_pointer(16)}}toString(){let t,e;try{const i=_.__wbindgen_add_to_stack_pointer(-16);_.verifyingkey_toString(i,this.__wbg_ptr);var r=f()[i/4+0],n=f()[i/4+1];return t=r,e=n,s(r,n)}finally{_.__wbindgen_add_to_stack_pointer(16),_.__wbindgen_free(t,e,1)}}}const o_="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((t=>_.__wbg_viewkey_free(t>>>0)));class a_{static __wrap(_){_>>>=0;const t=Object.create(a_.prototype);return t.__wbg_ptr=_,o_.register(t,t.__wbg_ptr,t),t}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,o_.unregister(this),_}free(){const t=this.__destroy_into_raw();_.__wbg_viewkey_free(t)}static from_private_key(t){v(t,W);const e=_.privatekey_to_view_key(t.__wbg_ptr);return a_.__wrap(e)}static from_string(t){const e=b(t,_.__wbindgen_malloc,_.__wbindgen_realloc),r=g,n=_.viewkey_from_string(e,r);return a_.__wrap(n)}to_string(){let t,e;try{const i=_.__wbindgen_add_to_stack_pointer(-16);_.viewkey_to_string(i,this.__wbg_ptr);var r=f()[i/4+0],n=f()[i/4+1];return t=r,e=n,s(r,n)}finally{_.__wbindgen_add_to_stack_pointer(16),_.__wbindgen_free(t,e,1)}}to_address(){const t=_.address_from_view_key(this.__wbg_ptr);return T.__wrap(t)}decrypt(t){let e,r;try{const l=_.__wbindgen_add_to_stack_pointer(-16),u=b(t,_.__wbindgen_malloc,_.__wbindgen_realloc),p=g;_.viewkey_decrypt(l,this.__wbg_ptr,u,p);var i=f()[l/4+0],o=f()[l/4+1],a=f()[l/4+2],c=f()[l/4+3],w=i,d=o;if(c)throw w=0,d=0,n(a);return e=w,r=d,s(w,d)}finally{_.__wbindgen_add_to_stack_pointer(16),_.__wbindgen_free(e,r,1)}}}function s_(){const t={wbg:{}};return t.wbg.__wbindgen_object_drop_ref=function(_){n(_)},t.wbg.__wbg_new_71801a555ad9f2aa=function(){return x((function(){return c(new XMLHttpRequest)}),arguments)},t.wbg.__wbg_overrideMimeType_ee9c51919ceb418b=function(){return x((function(_,t,r){e(_).overrideMimeType(s(t,r))}),arguments)},t.wbg.__wbg_open_c9eb0cf2c9d95679=function(){return x((function(_,t,r,n,i,o){e(_).open(s(t,r),s(n,i),0!==o)}),arguments)},t.wbg.__wbg_send_80d29985093c1ec5=function(){return x((function(_){e(_).send()}),arguments)},t.wbg.__wbg_response_7c2e2759084f7279=function(){return x((function(_){return c(e(_).response)}),arguments)},t.wbg.__wbg_status_d485fb5a478426fb=function(){return x((function(_){return e(_).status}),arguments)},t.wbg.__wbg_new_72fb9a18b5ae2624=function(){return c(new Object)},t.wbg.__wbindgen_string_new=function(_,t){return c(s(_,t))},t.wbg.__wbg_set_1f9b04f170055d33=function(){return x((function(_,t,r){return Reflect.set(e(_),e(t),e(r))}),arguments)},t.wbg.__wbg_new_ab6fd82b10560829=function(){return x((function(){return c(new Headers)}),arguments)},t.wbg.__wbindgen_object_clone_ref=function(_){return c(e(_))},t.wbg.__wbg_new_0d76b0581eca6298=function(){return x((function(){return c(new AbortController)}),arguments)},t.wbg.__wbg_signal_a61f78a3478fd9bc=function(_){return c(e(_).signal)},t.wbg.__wbg_append_7bfcb4937d1d5e29=function(){return x((function(_,t,r,n,i){e(_).append(s(t,r),s(n,i))}),arguments)},t.wbg.__wbg_instanceof_Response_849eb93e75734b6e=function(_){let t;try{t=e(_)instanceof Response}catch(_){t=!1}return t},t.wbg.__wbg_status_61a01141acd3cf74=function(_){return e(_).status},t.wbg.__wbg_url_5f6dc4009ac5f99d=function(t,r){const n=b(e(r).url,_.__wbindgen_malloc,_.__wbindgen_realloc),i=g;f()[t/4+1]=i,f()[t/4+0]=n},t.wbg.__wbg_headers_9620bfada380764a=function(_){return c(e(_).headers)},t.wbg.__wbg_iterator_2cee6dadfd956dfa=function(){return c(Symbol.iterator)},t.wbg.__wbg_get_e3c254076557e348=function(){return x((function(_,t){return c(Reflect.get(e(_),e(t)))}),arguments)},t.wbg.__wbindgen_is_function=function(_){return"function"==typeof e(_)},t.wbg.__wbg_call_27c0f87801dedf93=function(){return x((function(_,t){return c(e(_).call(e(t)))}),arguments)},t.wbg.__wbindgen_is_object=function(_){const t=e(_);return"object"==typeof t&&null!==t},t.wbg.__wbg_next_40fc327bfc8770e6=function(_){return c(e(_).next)},t.wbg.__wbg_next_196c84450b364254=function(){return x((function(_){return c(e(_).next())}),arguments)},t.wbg.__wbg_done_298b57d23c0fc80c=function(_){return e(_).done},t.wbg.__wbg_value_d93c65011f51a456=function(_){return c(e(_).value)},t.wbg.__wbg_abort_2aa7521d5690750e=function(_){e(_).abort()},t.wbg.__wbg_stringify_8887fe74e1c50d81=function(){return x((function(_){return c(JSON.stringify(e(_)))}),arguments)},t.wbg.__wbindgen_string_get=function(t,r){const n=e(r),i="string"==typeof n?n:void 0;var o=l(i)?0:b(i,_.__wbindgen_malloc,_.__wbindgen_realloc),a=g;f()[t/4+1]=a,f()[t/4+0]=o},t.wbg.__wbg_transaction_new=function(_){return c(r_.__wrap(_))},t.wbg.__wbg_call_b3ca7c6051f9bec1=function(){return x((function(_,t,r){return c(e(_).call(e(t),e(r)))}),arguments)},t.wbg.__wbg_keypair_new=function(_){return c(E.__wrap(_))},t.wbg.__wbindgen_bigint_from_u64=function(_){return c(BigInt.asUintN(64,_))},t.wbg.__wbindgen_module=function(){return c(w_.__wbindgen_wasm_module)},t.wbg.__wbindgen_memory=function(){return c(_.memory)},t.wbg.__wbg_spawnWorker_f6acaddb2e29dc4a=function(_,t,r,n){return c(function(_,t,e,r){return new Promise((n=>{const i=new Worker(_,{type:"module"});i.addEventListener("message",(_=>{setTimeout((()=>{n(i),i.unref&&i.unref()}),0)}),{capture:!0,once:!0}),i.postMessage({module:t,memory:e,address:r})}))}(e(_),e(t),e(r),n>>>0))},t.wbg.__wbg_log_0159ca40cddf5b15=function(_,t){console.log(s(_,t))},t.wbg.__wbg_newwithlength_66ae46612e7f0234=function(_){return c(new Array(_>>>0))},t.wbg.__wbg_set_d4638f722068f043=function(_,t,r){e(_)[t>>>0]=n(r)},t.wbg.__wbg_executionresponse_new=function(_){return c(O.__wrap(_))},t.wbg.__wbindgen_cb_drop=function(_){const t=n(_).original;if(1==t.cnt--)return t.a=0,!0;return!1},t.wbg.__wbg_new_16b304a2cfa7ff4a=function(){return c(new Array)},t.wbg.__wbg_push_a5b05aedc7234f9f=function(_,t){return e(_).push(e(t))},t.wbg.__wbg_arrayBuffer_29931d52c7206b02=function(){return x((function(_){return c(e(_).arrayBuffer())}),arguments)},t.wbg.__wbg_new_63b92bc8671ed464=function(_){return c(new Uint8Array(e(_)))},t.wbg.__wbg_length_c20a40f15020d68a=function(_){return e(_).length},t.wbg.__wbg_new_81740750da40724f=function(t,e){try{var r={a:t,b:e};const n=new Promise(((t,e)=>{const n=r.a;r.a=0;try{return function(t,e,r,n){_.wasm_bindgen__convert__closures__invoke2_mut__h2157eed66e6e3fca(t,e,c(r),c(n))}(n,r.b,t,e)}finally{r.a=n}}));return c(n)}finally{r.a=r.b=0}},t.wbg.__wbindgen_number_new=function(_){return c(_)},t.wbg.__wbg_new_abda76e883ba8a5f=function(){return c(new Error)},t.wbg.__wbg_stack_658279fe44541cf6=function(t,r){const n=b(e(r).stack,_.__wbindgen_malloc,_.__wbindgen_realloc),i=g;f()[t/4+1]=i,f()[t/4+0]=n},t.wbg.__wbg_error_f851667af71bcfc6=function(t,e){let r,n;try{r=t,n=e,console.error(s(t,e))}finally{_.__wbindgen_free(r,n,1)}},t.wbg.__wbg_buffer_12d079cc21e14bdb=function(_){return c(e(_).buffer)},t.wbg.__wbg_newwithbyteoffsetandlength_aa4a17c33a06e5cb=function(_,t,r){return c(new Uint8Array(e(_),t>>>0,r>>>0))},t.wbg.__wbg_randomFillSync_5c9c955aa56b6049=function(){return x((function(_,t){e(_).randomFillSync(n(t))}),arguments)},t.wbg.__wbg_subarray_a1f73cd4b5b42fe1=function(_,t,r){return c(e(_).subarray(t>>>0,r>>>0))},t.wbg.__wbg_getRandomValues_3aa56aa6edec874c=function(){return x((function(_,t){e(_).getRandomValues(e(t))}),arguments)},t.wbg.__wbg_set_a47bac70306a19a7=function(_,t,r){e(_).set(e(t),r>>>0)},t.wbg.__wbg_crypto_1d1f22824a6a080c=function(_){return c(e(_).crypto)},t.wbg.__wbg_process_4a72847cc503995b=function(_){return c(e(_).process)},t.wbg.__wbg_versions_f686565e586dd935=function(_){return c(e(_).versions)},t.wbg.__wbg_node_104a2ff8d6ea03a2=function(_){return c(e(_).node)},t.wbg.__wbindgen_is_string=function(_){return"string"==typeof e(_)},t.wbg.__wbg_require_cca90b1a94a0255b=function(){return x((function(){return c(module.require)}),arguments)},t.wbg.__wbg_msCrypto_eb05e62b530a1508=function(_){return c(e(_).msCrypto)},t.wbg.__wbg_newwithlength_e9b4878cebadb3d3=function(_){return c(new Uint8Array(_>>>0))},t.wbg.__wbg_length_cd7af8117672b8b8=function(_){return e(_).length},t.wbg.__wbg_get_bd8e338fbd5f5cc8=function(_,t){return c(e(_)[t>>>0])},t.wbg.__wbg_self_ce0dbfc45cf2f5be=function(){return x((function(){return c(self.self)}),arguments)},t.wbg.__wbg_window_c6fb939a7f436783=function(){return x((function(){return c(window.window)}),arguments)},t.wbg.__wbg_globalThis_d1e6af4856ba331b=function(){return x((function(){return c(globalThis.globalThis)}),arguments)},t.wbg.__wbg_global_207b558942527489=function(){return x((function(){return c(global.global)}),arguments)},t.wbg.__wbindgen_is_undefined=function(_){return void 0===e(_)},t.wbg.__wbg_newnoargs_e258087cd0daa0ea=function(_,t){return c(new Function(s(_,t)))},t.wbg.__wbg_has_0af94d20077affa2=function(){return x((function(_,t){return Reflect.has(e(_),e(t))}),arguments)},t.wbg.__wbg_fetch_bc7c8e27076a5c84=function(_){return c(fetch(e(_)))},t.wbg.__wbg_fetch_921fad6ef9e883dd=function(_,t){return c(e(_).fetch(e(t)))},t.wbg.__wbindgen_debug_string=function(t,r){const n=b(p(e(r)),_.__wbindgen_malloc,_.__wbindgen_realloc),i=g;f()[t/4+1]=i,f()[t/4+0]=n},t.wbg.__wbindgen_throw=function(_,t){throw new Error(s(_,t))},t.wbg.__wbindgen_rethrow=function(_){throw n(_)},t.wbg.__wbg_then_a73caa9a87991566=function(_,t,r){return c(e(_).then(e(t),e(r)))},t.wbg.__wbg_then_0c86a60e8fcfe9f6=function(_,t){return c(e(_).then(e(t)))},t.wbg.__wbg_queueMicrotask_481971b0d87f3dd4=function(_){queueMicrotask(e(_))},t.wbg.__wbg_queueMicrotask_3cbae2ec6b6cd3d6=function(_){return c(e(_).queueMicrotask)},t.wbg.__wbg_resolve_b0083a7967828ec8=function(_){return c(Promise.resolve(e(_)))},t.wbg.__wbg_waitAsync_5d743fc9058ba01a=function(){return c(Atomics.waitAsync)},t.wbg.__wbg_new_8cccba86b0f574cb=function(_){return c(new Int32Array(e(_)))},t.wbg.__wbg_waitAsync_46d5c36955b71a79=function(_,t,r){return c(Atomics.waitAsync(e(_),t,r))},t.wbg.__wbg_async_19c0400d97cc72fe=function(_){return e(_).async},t.wbg.__wbg_value_571d60108110e917=function(_){return c(e(_).value)},t.wbg.__wbindgen_link_fc1eedd35dc7e0a6=function(t){const e=b("data:application/javascript,"+encodeURIComponent("onmessage = function (ev) {\n let [ia, index, value] = ev.data;\n ia = new Int32Array(ia.buffer);\n let result = Atomics.wait(ia, index, value);\n postMessage(result);\n };\n "),_.__wbindgen_malloc,_.__wbindgen_realloc),r=g;f()[t/4+1]=r,f()[t/4+0]=e},t.wbg.__wbg_new_d1187ae36d662ef9=function(){return x((function(_,t){return c(new Worker(s(_,t)))}),arguments)},t.wbg.__wbg_setonmessage_503809e5bb51bd33=function(_,t){e(_).onmessage=e(t)},t.wbg.__wbg_of_6a70eed8d41f469c=function(_,t,r){return c(Array.of(e(_),e(t),e(r)))},t.wbg.__wbg_postMessage_7380d10e8b8269df=function(){return x((function(_,t){e(_).postMessage(e(t))}),arguments)},t.wbg.__wbg_data_3ce7c145ca4fbcdc=function(_){return c(e(_).data)},t.wbg.__wbg_newwithstrandinit_3fd6fba4083ff2d0=function(){return x((function(_,t,r){return c(new Request(s(_,t),e(r)))}),arguments)},t.wbg.__wbg_responseText_c67ed2d48db10769=function(){return x((function(t,r){const n=e(r).responseText;var i=l(n)?0:b(n,_.__wbindgen_malloc,_.__wbindgen_realloc),o=g;f()[t/4+1]=o,f()[t/4+0]=i}),arguments)},t.wbg.__wbindgen_closure_wrapper5763=function(_,t,e){return c(m(_,t,538,h))},t.wbg.__wbindgen_closure_wrapper5788=function(_,t,e){return c(m(_,t,538,h))},t}function c_(_,t){_.wbg.memory=t||new WebAssembly.Memory({initial:25,maximum:65536,shared:!0})}function g_(t,e){return _=t.exports,w_.__wbindgen_wasm_module=e,P=null,u=null,o=null,_.__wbindgen_start(),_}async function w_(t,e){if(void 0!==_)return _;const r=s_();("string"==typeof t||"function"==typeof Request&&t instanceof Request||"function"==typeof URL&&t instanceof URL)&&(t=fetch(t)),c_(r,e);const{instance:n,module:i}=await async function(_,t){if("function"==typeof Response&&_ instanceof Response){if("function"==typeof WebAssembly.instantiateStreaming)try{return await WebAssembly.instantiateStreaming(_,t)}catch(t){if("application/wasm"==_.headers.get("Content-Type"))throw t;console.warn("`WebAssembly.instantiateStreaming` failed because your server does not serve wasm with `application/wasm` MIME type. Falling back to `WebAssembly.instantiate` which is slower. Original error:\n",t)}const e=await _.arrayBuffer();return await WebAssembly.instantiate(e,t)}{const e=await WebAssembly.instantiate(_,t);return e instanceof WebAssembly.Instance?{instance:e,module:_}:e}}(await t,r);return g_(n,i)}var d_=Object.freeze({__proto__:null,Address:T,Execution:z,ExecutionResponse:O,Field:K,KeyPair:E,Metadata:I,OfflineQuery:C,PrivateKey:W,PrivateKeyCiphertext:$,Program:J,ProgramManager:class{__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,H.unregister(this),_}free(){const t=this.__destroy_into_raw();_.__wbg_programmanager_free(t)}static buildDeploymentTransaction(t,e,r,i,o,a,s,w,d){v(t,W);const u=b(e,_.__wbindgen_malloc,_.__wbindgen_realloc),f=g;let p=0;l(i)||(v(i,Z),p=i.__destroy_into_raw());var y=l(o)?0:b(o,_.__wbindgen_malloc,_.__wbindgen_realloc),m=g;let h=0;l(s)||(v(s,Q),h=s.__destroy_into_raw());let k=0;l(w)||(v(w,i_),k=w.__destroy_into_raw());let P=0;l(d)||(v(d,C),P=d.__destroy_into_raw());return n(_.programmanager_buildDeploymentTransaction(t.__wbg_ptr,u,f,r,p,y,m,l(a)?0:c(a),h,k,P))}static estimateDeploymentFee(t,e){const r=b(t,_.__wbindgen_malloc,_.__wbindgen_realloc),i=g;return n(_.programmanager_estimateDeploymentFee(r,i,l(e)?0:c(e)))}static estimateProgramNameCost(t){try{const i=_.__wbindgen_add_to_stack_pointer(-16),o=b(t,_.__wbindgen_malloc,_.__wbindgen_realloc),a=g;_.programmanager_estimateProgramNameCost(i,o,a);var e=S()[i/8+0],r=f()[i/4+2];if(f()[i/4+3])throw n(r);return BigInt.asUintN(64,e)}finally{_.__wbindgen_add_to_stack_pointer(16)}}static executeFunctionOffline(t,e,r,i,o,a,s,w,d,u,f){v(t,W);const p=b(e,_.__wbindgen_malloc,_.__wbindgen_realloc),y=g,m=b(r,_.__wbindgen_malloc,_.__wbindgen_realloc),h=g;let k=0;l(w)||(v(w,Q),k=w.__destroy_into_raw());let P=0;l(d)||(v(d,i_),P=d.__destroy_into_raw());var S=l(u)?0:b(u,_.__wbindgen_malloc,_.__wbindgen_realloc),V=g;let x=0;l(f)||(v(f,C),x=f.__destroy_into_raw());return n(_.programmanager_executeFunctionOffline(t.__wbg_ptr,p,y,m,h,c(i),o,a,l(s)?0:c(s),k,P,S,V,x))}static buildExecutionTransaction(t,e,r,i,o,a,s,w,d,u,f,p,y){v(t,W);const m=b(e,_.__wbindgen_malloc,_.__wbindgen_realloc),h=g,k=b(r,_.__wbindgen_malloc,_.__wbindgen_realloc),P=g;let S=0;l(a)||(v(a,Z),S=a.__destroy_into_raw());var V=l(s)?0:b(s,_.__wbindgen_malloc,_.__wbindgen_realloc),x=g;let F=0;l(d)||(v(d,Q),F=d.__destroy_into_raw());let T=0;l(u)||(v(u,i_),T=u.__destroy_into_raw());let R=0;l(f)||(v(f,Q),R=f.__destroy_into_raw());let z=0;l(p)||(v(p,i_),z=p.__destroy_into_raw());let A=0;l(y)||(v(y,C),A=y.__destroy_into_raw());return n(_.programmanager_buildExecutionTransaction(t.__wbg_ptr,m,h,k,P,c(i),o,S,V,x,l(w)?0:c(w),F,T,R,z,A))}static estimateExecutionFee(t,e,r,i,o,a,s,w,d){v(t,W);const u=b(e,_.__wbindgen_malloc,_.__wbindgen_realloc),f=g,p=b(r,_.__wbindgen_malloc,_.__wbindgen_realloc),y=g;var m=l(o)?0:b(o,_.__wbindgen_malloc,_.__wbindgen_realloc),h=g;let k=0;l(s)||(v(s,Q),k=s.__destroy_into_raw());let P=0;l(w)||(v(w,i_),P=w.__destroy_into_raw());let S=0;l(d)||(v(d,C),S=d.__destroy_into_raw());return n(_.programmanager_estimateExecutionFee(t.__wbg_ptr,u,f,p,y,c(i),m,h,l(a)?0:c(a),k,P,S))}static estimateFinalizeFee(t,e){try{const o=_.__wbindgen_add_to_stack_pointer(-16),a=b(t,_.__wbindgen_malloc,_.__wbindgen_realloc),s=g,c=b(e,_.__wbindgen_malloc,_.__wbindgen_realloc),w=g;_.programmanager_estimateFinalizeFee(o,a,s,c,w);var r=S()[o/8+0],i=f()[o/4+2];if(f()[o/4+3])throw n(i);return BigInt.asUintN(64,r)}finally{_.__wbindgen_add_to_stack_pointer(16)}}static buildJoinTransaction(t,e,r,i,o,a,s,c,w,d,u){v(t,W),v(e,Z);var f=e.__destroy_into_raw();v(r,Z);var p=r.__destroy_into_raw();let y=0;l(o)||(v(o,Z),y=o.__destroy_into_raw());var m=l(a)?0:b(a,_.__wbindgen_malloc,_.__wbindgen_realloc),h=g;let k=0;l(s)||(v(s,Q),k=s.__destroy_into_raw());let P=0;l(c)||(v(c,i_),P=c.__destroy_into_raw());let S=0;l(w)||(v(w,Q),S=w.__destroy_into_raw());let V=0;l(d)||(v(d,i_),V=d.__destroy_into_raw());let x=0;l(u)||(v(u,C),x=u.__destroy_into_raw());return n(_.programmanager_buildJoinTransaction(t.__wbg_ptr,f,p,i,y,m,h,k,P,S,V,x))}static buildSplitTransaction(t,e,r,i,o,a,s){v(t,W),v(r,Z);var c=r.__destroy_into_raw(),w=l(i)?0:b(i,_.__wbindgen_malloc,_.__wbindgen_realloc),d=g;let u=0;l(o)||(v(o,Q),u=o.__destroy_into_raw());let f=0;l(a)||(v(a,i_),f=a.__destroy_into_raw());let p=0;l(s)||(v(s,C),p=s.__destroy_into_raw());return n(_.programmanager_buildSplitTransaction(t.__wbg_ptr,e,c,w,d,u,f,p))}static buildTransferTransaction(t,e,r,i,o,a,s,c,w,d,u,f,p,y){v(t,W);const m=b(r,_.__wbindgen_malloc,_.__wbindgen_realloc),h=g,k=b(i,_.__wbindgen_malloc,_.__wbindgen_realloc),P=g;var S=l(o)?0:b(o,_.__wbindgen_malloc,_.__wbindgen_realloc),V=g;let x=0;l(a)||(v(a,Z),x=a.__destroy_into_raw());let F=0;l(c)||(v(c,Z),F=c.__destroy_into_raw());var T=l(w)?0:b(w,_.__wbindgen_malloc,_.__wbindgen_realloc),R=g;let z=0;l(d)||(v(d,Q),z=d.__destroy_into_raw());let A=0;l(u)||(v(u,i_),A=u.__destroy_into_raw());let O=0;l(f)||(v(f,Q),O=f.__destroy_into_raw());let j=0;l(p)||(v(p,i_),j=p.__destroy_into_raw());let K=0;l(y)||(v(y,C),K=y.__destroy_into_raw());return n(_.programmanager_buildTransferTransaction(t.__wbg_ptr,e,m,h,k,P,S,V,x,s,F,T,R,z,A,O,j,K))}static synthesizeKeyPair(t,e,r,i,o){v(t,W);const a=b(e,_.__wbindgen_malloc,_.__wbindgen_realloc),s=g,w=b(r,_.__wbindgen_malloc,_.__wbindgen_realloc),d=g;return n(_.programmanager_synthesizeKeyPair(t.__wbg_ptr,a,s,w,d,c(i),l(o)?0:c(o)))}},ProvingKey:Q,RecordCiphertext:G,RecordPlaintext:Z,Signature:t_,Transaction:r_,VerifyingKey:i_,ViewKey:a_,default:w_,initSync:function(t,e){if(void 0!==_)return _;const r=s_();return c_(r,e),t instanceof WebAssembly.Module||(t=new WebAssembly.Module(t)),g_(new WebAssembly.Instance(t,r),t)},initThreadPool:function(t,e){return n(_.initThreadPool(c(t),e))},runRayonThread:function(t){_.runRayonThread(t)},verifyFunctionExecution:function(t,e,r,i){try{const s=_.__wbindgen_add_to_stack_pointer(-16);v(t,z),v(e,i_),v(r,J);const c=b(i,_.__wbindgen_malloc,_.__wbindgen_realloc),w=g;_.verifyFunctionExecution(s,t.__wbg_ptr,e.__wbg_ptr,r.__wbg_ptr,c,w);var o=f()[s/4+0],a=f()[s/4+1];if(f()[s/4+2])throw n(a);return 0!==o}finally{_.__wbindgen_add_to_stack_pointer(16)}}});await async function(_){const[t,{module:e,memory:r,address:n}]=await Promise.all([_,new Promise((_=>{addEventListener("message",(t=>{_(t.data)}),{capture:!0,once:!0})}))]),i=await t({initializeHook:(_,t)=>_(e,r)});postMessage(null),i.runRayonThread(n),close()}((async(_={})=>{let{importHook:t,serverPath:e,initializeHook:r}=_,n="assets/aleo_wasm.wasm";return null!=e&&(n=e+/[^\/\\]*$/.exec(n)[0]),null!=t&&(n=t(n)),null!=r?await r(w_,n):await w_(n),d_})); \ No newline at end of file diff --git a/dbd30f3d266f12f9bcd5.otf b/dbd30f3d266f12f9bcd5.otf deleted file mode 100644 index af1038530..000000000 Binary files a/dbd30f3d266f12f9bcd5.otf and /dev/null differ diff --git a/f62b366a9b5fa66a5bcc.js b/f62b366a9b5fa66a5bcc.js new file mode 100644 index 000000000..5597ca0ad --- /dev/null +++ b/f62b366a9b5fa66a5bcc.js @@ -0,0 +1 @@ +let _;const t=new Array(128).fill(void 0);function e(_){return t[_]}t.push(void 0,null,!0,!1);let r=t.length;function n(_){const n=e(_);return function(_){_<132||(t[_]=r,r=_)}(_),n}const i="undefined"!=typeof TextDecoder?new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0}):{decode:()=>{throw Error("TextDecoder not available")}};"undefined"!=typeof TextDecoder&&i.decode();let o=null;function a(){return null!==o&&o.buffer===_.memory.buffer||(o=new Uint8Array(_.memory.buffer)),o}function s(_,t){return _>>>=0,i.decode(a().slice(_,_+t))}function c(_){r===t.length&&t.push(t.length+1);const e=r;return r=t[e],t[e]=_,e}let g=0;const w="undefined"!=typeof TextEncoder?new TextEncoder("utf-8"):{encode:()=>{throw Error("TextEncoder not available")}},d=function(_,t){const e=w.encode(_);return t.set(e),{read:_.length,written:e.length}};function b(_,t,e){if(void 0===e){const e=w.encode(_),r=t(e.length,1)>>>0;return a().subarray(r,r+e.length).set(e),g=e.length,r}let r=_.length,n=t(r,1)>>>0;const i=a();let o=0;for(;o127)break;i[n+o]=t}if(o!==r){0!==o&&(_=_.slice(o)),n=e(n,r,r=o+3*_.length,1)>>>0;const t=a().subarray(n+o,n+r);o+=d(_,t).written,n=e(n,r,o,1)>>>0}return g=o,n}function l(_){return null==_}let u=null;function f(){return null!==u&&u.buffer===_.memory.buffer||(u=new Int32Array(_.memory.buffer)),u}function p(_){const t=typeof _;if("number"==t||"boolean"==t||null==_)return`${_}`;if("string"==t)return`"${_}"`;if("symbol"==t){const t=_.description;return null==t?"Symbol":`Symbol(${t})`}if("function"==t){const t=_.name;return"string"==typeof t&&t.length>0?`Function(${t})`:"Function"}if(Array.isArray(_)){const t=_.length;let e="[";t>0&&(e+=p(_[0]));for(let r=1;r1))return toString.call(_);if(r=e[1],"Object"==r)try{return"Object("+JSON.stringify(_)+")"}catch(_){return"Object"}return _ instanceof Error?`${_.name}: ${_.message}\n${_.stack}`:r}const y="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((t=>{_.__wbindgen_export_3.get(t.dtor)(t.a,t.b)}));function m(t,e,r,n){const i={a:t,b:e,cnt:1,dtor:r},o=(...t)=>{i.cnt++;const e=i.a;i.a=0;try{return n(e,i.b,...t)}finally{0==--i.cnt?(_.__wbindgen_export_3.get(i.dtor)(e,i.b),y.unregister(i)):i.a=e}};return o.original=i,y.register(o,i,i),o}function h(t,e,r){_._dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h442b5e922f6f9710(t,e,c(r))}function v(_,t){if(!(_ instanceof t))throw new Error(`expected instance of ${t.name}`);return _.ptr}function k(_,t){const e=t(1*_.length,1)>>>0;return a().set(_,e/1),g=_.length,e}let P=null;function S(){return null!==P&&P.buffer===_.memory.buffer||(P=new BigInt64Array(_.memory.buffer)),P}function V(_,t){return _>>>=0,a().subarray(_/1,_/1+t)}function x(t,e){try{return t.apply(this,e)}catch(t){_.__wbindgen_exn_store(c(t))}}const F="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((t=>_.__wbg_address_free(t>>>0)));class T{static __wrap(_){_>>>=0;const t=Object.create(T.prototype);return t.__wbg_ptr=_,F.register(t,t.__wbg_ptr,t),t}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,F.unregister(this),_}free(){const t=this.__destroy_into_raw();_.__wbg_address_free(t)}static from_private_key(t){v(t,W);const e=_.address_from_private_key(t.__wbg_ptr);return T.__wrap(e)}static from_view_key(t){v(t,a_);const e=_.address_from_view_key(t.__wbg_ptr);return T.__wrap(e)}static from_string(t){const e=b(t,_.__wbindgen_malloc,_.__wbindgen_realloc),r=g,n=_.address_from_string(e,r);return T.__wrap(n)}to_string(){let t,e;try{const i=_.__wbindgen_add_to_stack_pointer(-16);_.address_to_string(i,this.__wbg_ptr);var r=f()[i/4+0],n=f()[i/4+1];return t=r,e=n,s(r,n)}finally{_.__wbindgen_add_to_stack_pointer(16),_.__wbindgen_free(t,e,1)}}verify(t,e){const r=k(t,_.__wbindgen_malloc),n=g;v(e,t_);return 0!==_.address_verify(this.__wbg_ptr,r,n,e.__wbg_ptr)}}const R="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((t=>_.__wbg_execution_free(t>>>0)));class z{static __wrap(_){_>>>=0;const t=Object.create(z.prototype);return t.__wbg_ptr=_,R.register(t,t.__wbg_ptr,t),t}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,R.unregister(this),_}free(){const t=this.__destroy_into_raw();_.__wbg_execution_free(t)}toString(){let t,e;try{const i=_.__wbindgen_add_to_stack_pointer(-16);_.execution_toString(i,this.__wbg_ptr);var r=f()[i/4+0],n=f()[i/4+1];return t=r,e=n,s(r,n)}finally{_.__wbindgen_add_to_stack_pointer(16),_.__wbindgen_free(t,e,1)}}static fromString(t){try{const i=_.__wbindgen_add_to_stack_pointer(-16),o=b(t,_.__wbindgen_malloc,_.__wbindgen_realloc),a=g;_.execution_fromString(i,o,a);var e=f()[i/4+0],r=f()[i/4+1];if(f()[i/4+2])throw n(r);return z.__wrap(e)}finally{_.__wbindgen_add_to_stack_pointer(16)}}}const A="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((t=>_.__wbg_executionresponse_free(t>>>0)));class O{static __wrap(_){_>>>=0;const t=Object.create(O.prototype);return t.__wbg_ptr=_,A.register(t,t.__wbg_ptr,t),t}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,A.unregister(this),_}free(){const t=this.__destroy_into_raw();_.__wbg_executionresponse_free(t)}getOutputs(){return n(_.executionresponse_getOutputs(this.__wbg_ptr))}getExecution(){const t=_.executionresponse_getExecution(this.__wbg_ptr);return 0===t?void 0:z.__wrap(t)}getKeys(){try{const r=_.__wbindgen_add_to_stack_pointer(-16);_.executionresponse_getKeys(r,this.__wbg_ptr);var t=f()[r/4+0],e=f()[r/4+1];if(f()[r/4+2])throw n(e);return E.__wrap(t)}finally{_.__wbindgen_add_to_stack_pointer(16)}}getProvingKey(){const t=_.executionresponse_getProvingKey(this.__wbg_ptr);return 0===t?void 0:Q.__wrap(t)}getVerifyingKey(){const t=_.executionresponse_getVerifyingKey(this.__wbg_ptr);return i_.__wrap(t)}getFunctionId(){let t,e;try{const i=_.__wbindgen_add_to_stack_pointer(-16);_.executionresponse_getFunctionId(i,this.__wbg_ptr);var r=f()[i/4+0],n=f()[i/4+1];return t=r,e=n,s(r,n)}finally{_.__wbindgen_add_to_stack_pointer(16),_.__wbindgen_free(t,e,1)}}getProgram(){const t=_.executionresponse_getProgram(this.__wbg_ptr);return J.__wrap(t)}}const j="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((t=>_.__wbg_field_free(t>>>0)));class K{static __wrap(_){_>>>=0;const t=Object.create(K.prototype);return t.__wbg_ptr=_,j.register(t,t.__wbg_ptr,t),t}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,j.unregister(this),_}free(){const t=this.__destroy_into_raw();_.__wbg_field_free(t)}toString(){let t,e;try{const i=_.__wbindgen_add_to_stack_pointer(-16);_.field_toString(i,this.__wbg_ptr);var r=f()[i/4+0],n=f()[i/4+1];return t=r,e=n,s(r,n)}finally{_.__wbindgen_add_to_stack_pointer(16),_.__wbindgen_free(t,e,1)}}static fromString(t){try{const i=_.__wbindgen_add_to_stack_pointer(-16),o=b(t,_.__wbindgen_malloc,_.__wbindgen_realloc),a=g;_.field_fromString(i,o,a);var e=f()[i/4+0],r=f()[i/4+1];if(f()[i/4+2])throw n(r);return K.__wrap(e)}finally{_.__wbindgen_add_to_stack_pointer(16)}}}const M="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((t=>_.__wbg_keypair_free(t>>>0)));class E{static __wrap(_){_>>>=0;const t=Object.create(E.prototype);return t.__wbg_ptr=_,M.register(t,t.__wbg_ptr,t),t}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,M.unregister(this),_}free(){const t=this.__destroy_into_raw();_.__wbg_keypair_free(t)}constructor(t,e){v(t,Q);var r=t.__destroy_into_raw();v(e,i_);var n=e.__destroy_into_raw();const i=_.keypair_new(r,n);return this.__wbg_ptr=i>>>0,this}provingKey(){try{const r=_.__wbindgen_add_to_stack_pointer(-16);_.keypair_provingKey(r,this.__wbg_ptr);var t=f()[r/4+0],e=f()[r/4+1];if(f()[r/4+2])throw n(e);return Q.__wrap(t)}finally{_.__wbindgen_add_to_stack_pointer(16)}}verifyingKey(){try{const r=_.__wbindgen_add_to_stack_pointer(-16);_.keypair_verifyingKey(r,this.__wbg_ptr);var t=f()[r/4+0],e=f()[r/4+1];if(f()[r/4+2])throw n(e);return i_.__wrap(t)}finally{_.__wbindgen_add_to_stack_pointer(16)}}}const B="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((t=>_.__wbg_metadata_free(t>>>0)));class I{static __wrap(_){_>>>=0;const t=Object.create(I.prototype);return t.__wbg_ptr=_,B.register(t,t.__wbg_ptr,t),t}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,B.unregister(this),_}free(){const t=this.__destroy_into_raw();_.__wbg_metadata_free(t)}get locator(){let t,e;try{const i=_.__wbindgen_add_to_stack_pointer(-16);_.__wbg_get_metadata_locator(i,this.__wbg_ptr);var r=f()[i/4+0],n=f()[i/4+1];return t=r,e=n,s(r,n)}finally{_.__wbindgen_add_to_stack_pointer(16),_.__wbindgen_free(t,e,1)}}set locator(t){const e=b(t,_.__wbindgen_malloc,_.__wbindgen_realloc),r=g;_.__wbg_set_metadata_locator(this.__wbg_ptr,e,r)}get prover(){let t,e;try{const i=_.__wbindgen_add_to_stack_pointer(-16);_.__wbg_get_metadata_prover(i,this.__wbg_ptr);var r=f()[i/4+0],n=f()[i/4+1];return t=r,e=n,s(r,n)}finally{_.__wbindgen_add_to_stack_pointer(16),_.__wbindgen_free(t,e,1)}}set prover(t){const e=b(t,_.__wbindgen_malloc,_.__wbindgen_realloc),r=g;_.__wbg_set_metadata_prover(this.__wbg_ptr,e,r)}get verifier(){let t,e;try{const i=_.__wbindgen_add_to_stack_pointer(-16);_.__wbg_get_metadata_verifier(i,this.__wbg_ptr);var r=f()[i/4+0],n=f()[i/4+1];return t=r,e=n,s(r,n)}finally{_.__wbindgen_add_to_stack_pointer(16),_.__wbindgen_free(t,e,1)}}set verifier(t){const e=b(t,_.__wbindgen_malloc,_.__wbindgen_realloc),r=g;_.__wbg_set_metadata_verifier(this.__wbg_ptr,e,r)}get verifyingKey(){let t,e;try{const i=_.__wbindgen_add_to_stack_pointer(-16);_.__wbg_get_metadata_verifyingKey(i,this.__wbg_ptr);var r=f()[i/4+0],n=f()[i/4+1];return t=r,e=n,s(r,n)}finally{_.__wbindgen_add_to_stack_pointer(16),_.__wbindgen_free(t,e,1)}}set verifyingKey(t){const e=b(t,_.__wbindgen_malloc,_.__wbindgen_realloc),r=g;_.__wbg_set_metadata_verifyingKey(this.__wbg_ptr,e,r)}static baseUrl(){let t,e;try{const i=_.__wbindgen_add_to_stack_pointer(-16);_.metadata_baseUrl(i);var r=f()[i/4+0],n=f()[i/4+1];return t=r,e=n,s(r,n)}finally{_.__wbindgen_add_to_stack_pointer(16),_.__wbindgen_free(t,e,1)}}static bond_public(){const t=_.metadata_bond_public();return I.__wrap(t)}static bond_validator(){const t=_.metadata_bond_validator();return I.__wrap(t)}static claim_unbond_public(){const t=_.metadata_claim_unbond_public();return I.__wrap(t)}static fee_private(){const t=_.metadata_fee_private();return I.__wrap(t)}static fee_public(){const t=_.metadata_fee_public();return I.__wrap(t)}static inclusion(){const t=_.metadata_inclusion();return I.__wrap(t)}static join(){const t=_.metadata_join();return I.__wrap(t)}static set_validator_state(){const t=_.metadata_set_validator_state();return I.__wrap(t)}static split(){const t=_.metadata_split();return I.__wrap(t)}static transfer_private(){const t=_.metadata_transfer_private();return I.__wrap(t)}static transfer_private_to_public(){const t=_.metadata_transfer_private_to_public();return I.__wrap(t)}static transfer_public(){const t=_.metadata_transfer_public();return I.__wrap(t)}static transfer_public_as_signer(){const t=_.metadata_transfer_public_as_signer();return I.__wrap(t)}static transfer_public_to_private(){const t=_.metadata_transfer_public_to_private();return I.__wrap(t)}static unbond_public(){const t=_.metadata_unbond_public();return I.__wrap(t)}}const U="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((t=>_.__wbg_offlinequery_free(t>>>0)));class C{static __wrap(_){_>>>=0;const t=Object.create(C.prototype);return t.__wbg_ptr=_,U.register(t,t.__wbg_ptr,t),t}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,U.unregister(this),_}free(){const t=this.__destroy_into_raw();_.__wbg_offlinequery_free(t)}constructor(t){try{const i=_.__wbindgen_add_to_stack_pointer(-16),o=b(t,_.__wbindgen_malloc,_.__wbindgen_realloc),a=g;_.offlinequery_new(i,o,a);var e=f()[i/4+0],r=f()[i/4+1];if(f()[i/4+2])throw n(r);return this.__wbg_ptr=e>>>0,this}finally{_.__wbindgen_add_to_stack_pointer(16)}}addStatePath(t,e){try{const i=_.__wbindgen_add_to_stack_pointer(-16),o=b(t,_.__wbindgen_malloc,_.__wbindgen_realloc),a=g,s=b(e,_.__wbindgen_malloc,_.__wbindgen_realloc),c=g;_.offlinequery_addStatePath(i,this.__wbg_ptr,o,a,s,c);var r=f()[i/4+0];if(f()[i/4+1])throw n(r)}finally{_.__wbindgen_add_to_stack_pointer(16)}}toString(){let t,e;try{const i=_.__wbindgen_add_to_stack_pointer(-16);_.offlinequery_toString(i,this.__wbg_ptr);var r=f()[i/4+0],n=f()[i/4+1];return t=r,e=n,s(r,n)}finally{_.__wbindgen_add_to_stack_pointer(16),_.__wbindgen_free(t,e,1)}}static fromString(t){try{const i=_.__wbindgen_add_to_stack_pointer(-16),o=b(t,_.__wbindgen_malloc,_.__wbindgen_realloc),a=g;_.offlinequery_fromString(i,o,a);var e=f()[i/4+0],r=f()[i/4+1];if(f()[i/4+2])throw n(r);return C.__wrap(e)}finally{_.__wbindgen_add_to_stack_pointer(16)}}}const q="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((t=>_.__wbg_privatekey_free(t>>>0)));class W{static __wrap(_){_>>>=0;const t=Object.create(W.prototype);return t.__wbg_ptr=_,q.register(t,t.__wbg_ptr,t),t}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,q.unregister(this),_}free(){const t=this.__destroy_into_raw();_.__wbg_privatekey_free(t)}constructor(){const t=_.privatekey_new();return this.__wbg_ptr=t>>>0,this}static from_seed_unchecked(t){const e=k(t,_.__wbindgen_malloc),r=g,n=_.privatekey_from_seed_unchecked(e,r);return W.__wrap(n)}static from_string(t){try{const i=_.__wbindgen_add_to_stack_pointer(-16),o=b(t,_.__wbindgen_malloc,_.__wbindgen_realloc),a=g;_.privatekey_from_string(i,o,a);var e=f()[i/4+0],r=f()[i/4+1];if(f()[i/4+2])throw n(r);return W.__wrap(e)}finally{_.__wbindgen_add_to_stack_pointer(16)}}to_string(){let t,e;try{const i=_.__wbindgen_add_to_stack_pointer(-16);_.privatekey_to_string(i,this.__wbg_ptr);var r=f()[i/4+0],n=f()[i/4+1];return t=r,e=n,s(r,n)}finally{_.__wbindgen_add_to_stack_pointer(16),_.__wbindgen_free(t,e,1)}}to_view_key(){const t=_.privatekey_to_view_key(this.__wbg_ptr);return a_.__wrap(t)}to_address(){const t=_.privatekey_to_address(this.__wbg_ptr);return T.__wrap(t)}sign(t){const e=k(t,_.__wbindgen_malloc),r=g,n=_.privatekey_sign(this.__wbg_ptr,e,r);return t_.__wrap(n)}static newEncrypted(t){try{const i=_.__wbindgen_add_to_stack_pointer(-16),o=b(t,_.__wbindgen_malloc,_.__wbindgen_realloc),a=g;_.privatekey_newEncrypted(i,o,a);var e=f()[i/4+0],r=f()[i/4+1];if(f()[i/4+2])throw n(r);return $.__wrap(e)}finally{_.__wbindgen_add_to_stack_pointer(16)}}toCiphertext(t){try{const i=_.__wbindgen_add_to_stack_pointer(-16),o=b(t,_.__wbindgen_malloc,_.__wbindgen_realloc),a=g;_.privatekey_toCiphertext(i,this.__wbg_ptr,o,a);var e=f()[i/4+0],r=f()[i/4+1];if(f()[i/4+2])throw n(r);return $.__wrap(e)}finally{_.__wbindgen_add_to_stack_pointer(16)}}static fromPrivateKeyCiphertext(t,e){try{const o=_.__wbindgen_add_to_stack_pointer(-16);v(t,$);const a=b(e,_.__wbindgen_malloc,_.__wbindgen_realloc),s=g;_.privatekey_fromPrivateKeyCiphertext(o,t.__wbg_ptr,a,s);var r=f()[o/4+0],i=f()[o/4+1];if(f()[o/4+2])throw n(i);return W.__wrap(r)}finally{_.__wbindgen_add_to_stack_pointer(16)}}}const N="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((t=>_.__wbg_privatekeyciphertext_free(t>>>0)));class ${static __wrap(_){_>>>=0;const t=Object.create($.prototype);return t.__wbg_ptr=_,N.register(t,t.__wbg_ptr,t),t}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,N.unregister(this),_}free(){const t=this.__destroy_into_raw();_.__wbg_privatekeyciphertext_free(t)}static encryptPrivateKey(t,e){try{const o=_.__wbindgen_add_to_stack_pointer(-16);v(t,W);const a=b(e,_.__wbindgen_malloc,_.__wbindgen_realloc),s=g;_.privatekey_toCiphertext(o,t.__wbg_ptr,a,s);var r=f()[o/4+0],i=f()[o/4+1];if(f()[o/4+2])throw n(i);return $.__wrap(r)}finally{_.__wbindgen_add_to_stack_pointer(16)}}decryptToPrivateKey(t){try{const i=_.__wbindgen_add_to_stack_pointer(-16),o=b(t,_.__wbindgen_malloc,_.__wbindgen_realloc),a=g;_.privatekeyciphertext_decryptToPrivateKey(i,this.__wbg_ptr,o,a);var e=f()[i/4+0],r=f()[i/4+1];if(f()[i/4+2])throw n(r);return W.__wrap(e)}finally{_.__wbindgen_add_to_stack_pointer(16)}}toString(){let t,e;try{const i=_.__wbindgen_add_to_stack_pointer(-16);_.privatekeyciphertext_toString(i,this.__wbg_ptr);var r=f()[i/4+0],n=f()[i/4+1];return t=r,e=n,s(r,n)}finally{_.__wbindgen_add_to_stack_pointer(16),_.__wbindgen_free(t,e,1)}}static fromString(t){try{const i=_.__wbindgen_add_to_stack_pointer(-16),o=b(t,_.__wbindgen_malloc,_.__wbindgen_realloc),a=g;_.privatekeyciphertext_fromString(i,o,a);var e=f()[i/4+0],r=f()[i/4+1];if(f()[i/4+2])throw n(r);return $.__wrap(e)}finally{_.__wbindgen_add_to_stack_pointer(16)}}}const D="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((t=>_.__wbg_program_free(t>>>0)));class J{static __wrap(_){_>>>=0;const t=Object.create(J.prototype);return t.__wbg_ptr=_,D.register(t,t.__wbg_ptr,t),t}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,D.unregister(this),_}free(){const t=this.__destroy_into_raw();_.__wbg_program_free(t)}static fromString(t){try{const i=_.__wbindgen_add_to_stack_pointer(-16),o=b(t,_.__wbindgen_malloc,_.__wbindgen_realloc),a=g;_.program_fromString(i,o,a);var e=f()[i/4+0],r=f()[i/4+1];if(f()[i/4+2])throw n(r);return J.__wrap(e)}finally{_.__wbindgen_add_to_stack_pointer(16)}}toString(){let t,e;try{const i=_.__wbindgen_add_to_stack_pointer(-16);_.program_toString(i,this.__wbg_ptr);var r=f()[i/4+0],n=f()[i/4+1];return t=r,e=n,s(r,n)}finally{_.__wbindgen_add_to_stack_pointer(16),_.__wbindgen_free(t,e,1)}}hasFunction(t){const e=b(t,_.__wbindgen_malloc,_.__wbindgen_realloc),r=g;return 0!==_.program_hasFunction(this.__wbg_ptr,e,r)}getFunctions(){return n(_.program_getFunctions(this.__wbg_ptr))}getFunctionInputs(t){try{const i=_.__wbindgen_add_to_stack_pointer(-16),o=b(t,_.__wbindgen_malloc,_.__wbindgen_realloc),a=g;_.program_getFunctionInputs(i,this.__wbg_ptr,o,a);var e=f()[i/4+0],r=f()[i/4+1];if(f()[i/4+2])throw n(r);return n(e)}finally{_.__wbindgen_add_to_stack_pointer(16)}}getMappings(){try{const r=_.__wbindgen_add_to_stack_pointer(-16);_.program_getMappings(r,this.__wbg_ptr);var t=f()[r/4+0],e=f()[r/4+1];if(f()[r/4+2])throw n(e);return n(t)}finally{_.__wbindgen_add_to_stack_pointer(16)}}getRecordMembers(t){try{const i=_.__wbindgen_add_to_stack_pointer(-16),o=b(t,_.__wbindgen_malloc,_.__wbindgen_realloc),a=g;_.program_getRecordMembers(i,this.__wbg_ptr,o,a);var e=f()[i/4+0],r=f()[i/4+1];if(f()[i/4+2])throw n(r);return n(e)}finally{_.__wbindgen_add_to_stack_pointer(16)}}getStructMembers(t){try{const i=_.__wbindgen_add_to_stack_pointer(-16),o=b(t,_.__wbindgen_malloc,_.__wbindgen_realloc),a=g;_.program_getStructMembers(i,this.__wbg_ptr,o,a);var e=f()[i/4+0],r=f()[i/4+1];if(f()[i/4+2])throw n(r);return n(e)}finally{_.__wbindgen_add_to_stack_pointer(16)}}static getCreditsProgram(){const t=_.program_getCreditsProgram();return J.__wrap(t)}id(){let t,e;try{const i=_.__wbindgen_add_to_stack_pointer(-16);_.program_id(i,this.__wbg_ptr);var r=f()[i/4+0],n=f()[i/4+1];return t=r,e=n,s(r,n)}finally{_.__wbindgen_add_to_stack_pointer(16),_.__wbindgen_free(t,e,1)}}address(){try{const r=_.__wbindgen_add_to_stack_pointer(-16);_.program_address(r,this.__wbg_ptr);var t=f()[r/4+0],e=f()[r/4+1];if(f()[r/4+2])throw n(e);return T.__wrap(t)}finally{_.__wbindgen_add_to_stack_pointer(16)}}isEqual(t){v(t,J);return 0!==_.program_isEqual(this.__wbg_ptr,t.__wbg_ptr)}getImports(){return n(_.program_getImports(this.__wbg_ptr))}}const H="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((t=>_.__wbg_programmanager_free(t>>>0)));const L="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((t=>_.__wbg_provingkey_free(t>>>0)));class Q{static __wrap(_){_>>>=0;const t=Object.create(Q.prototype);return t.__wbg_ptr=_,L.register(t,t.__wbg_ptr,t),t}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,L.unregister(this),_}free(){const t=this.__destroy_into_raw();_.__wbg_provingkey_free(t)}isBondPublicProver(){return 0!==_.provingkey_isBondPublicProver(this.__wbg_ptr)}isBondValidatorProver(){return 0!==_.provingkey_isBondValidatorProver(this.__wbg_ptr)}isClaimUnbondPublicProver(){return 0!==_.provingkey_isClaimUnbondPublicProver(this.__wbg_ptr)}isFeePrivateProver(){return 0!==_.provingkey_isFeePrivateProver(this.__wbg_ptr)}isFeePublicProver(){return 0!==_.provingkey_isFeePublicProver(this.__wbg_ptr)}isInclusionProver(){return 0!==_.provingkey_isInclusionProver(this.__wbg_ptr)}isJoinProver(){return 0!==_.provingkey_isJoinProver(this.__wbg_ptr)}isSetValidatorStateProver(){return 0!==_.provingkey_isSetValidatorStateProver(this.__wbg_ptr)}isSplitProver(){return 0!==_.provingkey_isSplitProver(this.__wbg_ptr)}isTransferPrivateProver(){return 0!==_.provingkey_isTransferPrivateProver(this.__wbg_ptr)}isTransferPrivateToPublicProver(){return 0!==_.provingkey_isTransferPrivateToPublicProver(this.__wbg_ptr)}isTransferPublicProver(){return 0!==_.provingkey_isTransferPublicProver(this.__wbg_ptr)}isTransferPublicAsSignerProver(){return 0!==_.provingkey_isTransferPublicAsSignerProver(this.__wbg_ptr)}isTransferPublicToPrivateProver(){return 0!==_.provingkey_isTransferPublicToPrivateProver(this.__wbg_ptr)}isUnbondPublicProver(){return 0!==_.provingkey_isUnbondPublicProver(this.__wbg_ptr)}checksum(){let t,e;try{const i=_.__wbindgen_add_to_stack_pointer(-16);_.provingkey_checksum(i,this.__wbg_ptr);var r=f()[i/4+0],n=f()[i/4+1];return t=r,e=n,s(r,n)}finally{_.__wbindgen_add_to_stack_pointer(16),_.__wbindgen_free(t,e,1)}}copy(){const t=_.provingkey_copy(this.__wbg_ptr);return Q.__wrap(t)}static fromBytes(t){try{const i=_.__wbindgen_add_to_stack_pointer(-16),o=k(t,_.__wbindgen_malloc),a=g;_.provingkey_fromBytes(i,o,a);var e=f()[i/4+0],r=f()[i/4+1];if(f()[i/4+2])throw n(r);return Q.__wrap(e)}finally{_.__wbindgen_add_to_stack_pointer(16)}}static fromString(t){try{const i=_.__wbindgen_add_to_stack_pointer(-16),o=b(t,_.__wbindgen_malloc,_.__wbindgen_realloc),a=g;_.provingkey_fromString(i,o,a);var e=f()[i/4+0],r=f()[i/4+1];if(f()[i/4+2])throw n(r);return Q.__wrap(e)}finally{_.__wbindgen_add_to_stack_pointer(16)}}toBytes(){try{const o=_.__wbindgen_add_to_stack_pointer(-16);_.provingkey_toBytes(o,this.__wbg_ptr);var t=f()[o/4+0],e=f()[o/4+1],r=f()[o/4+2];if(f()[o/4+3])throw n(r);var i=V(t,e).slice();return _.__wbindgen_free(t,1*e,1),i}finally{_.__wbindgen_add_to_stack_pointer(16)}}toString(){let t,e;try{const i=_.__wbindgen_add_to_stack_pointer(-16);_.provingkey_toString(i,this.__wbg_ptr);var r=f()[i/4+0],n=f()[i/4+1];return t=r,e=n,s(r,n)}finally{_.__wbindgen_add_to_stack_pointer(16),_.__wbindgen_free(t,e,1)}}}const X="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((t=>_.__wbg_recordciphertext_free(t>>>0)));class G{static __wrap(_){_>>>=0;const t=Object.create(G.prototype);return t.__wbg_ptr=_,X.register(t,t.__wbg_ptr,t),t}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,X.unregister(this),_}free(){const t=this.__destroy_into_raw();_.__wbg_recordciphertext_free(t)}static fromString(t){try{const i=_.__wbindgen_add_to_stack_pointer(-16),o=b(t,_.__wbindgen_malloc,_.__wbindgen_realloc),a=g;_.recordciphertext_fromString(i,o,a);var e=f()[i/4+0],r=f()[i/4+1];if(f()[i/4+2])throw n(r);return G.__wrap(e)}finally{_.__wbindgen_add_to_stack_pointer(16)}}toString(){let t,e;try{const i=_.__wbindgen_add_to_stack_pointer(-16);_.recordciphertext_toString(i,this.__wbg_ptr);var r=f()[i/4+0],n=f()[i/4+1];return t=r,e=n,s(r,n)}finally{_.__wbindgen_add_to_stack_pointer(16),_.__wbindgen_free(t,e,1)}}decrypt(t){try{const i=_.__wbindgen_add_to_stack_pointer(-16);v(t,a_),_.recordciphertext_decrypt(i,this.__wbg_ptr,t.__wbg_ptr);var e=f()[i/4+0],r=f()[i/4+1];if(f()[i/4+2])throw n(r);return Z.__wrap(e)}finally{_.__wbindgen_add_to_stack_pointer(16)}}isOwner(t){v(t,a_);return 0!==_.recordciphertext_isOwner(this.__wbg_ptr,t.__wbg_ptr)}}const Y="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((t=>_.__wbg_recordplaintext_free(t>>>0)));class Z{static __wrap(_){_>>>=0;const t=Object.create(Z.prototype);return t.__wbg_ptr=_,Y.register(t,t.__wbg_ptr,t),t}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,Y.unregister(this),_}free(){const t=this.__destroy_into_raw();_.__wbg_recordplaintext_free(t)}commitment(t,e){try{const o=_.__wbindgen_add_to_stack_pointer(-16),a=b(t,_.__wbindgen_malloc,_.__wbindgen_realloc),s=g,c=b(e,_.__wbindgen_malloc,_.__wbindgen_realloc),w=g;_.recordplaintext_commitment(o,this.__wbg_ptr,a,s,c,w);var r=f()[o/4+0],i=f()[o/4+1];if(f()[o/4+2])throw n(i);return K.__wrap(r)}finally{_.__wbindgen_add_to_stack_pointer(16)}}static fromString(t){try{const i=_.__wbindgen_add_to_stack_pointer(-16),o=b(t,_.__wbindgen_malloc,_.__wbindgen_realloc),a=g;_.recordplaintext_fromString(i,o,a);var e=f()[i/4+0],r=f()[i/4+1];if(f()[i/4+2])throw n(r);return Z.__wrap(e)}finally{_.__wbindgen_add_to_stack_pointer(16)}}toString(){let t,e;try{const i=_.__wbindgen_add_to_stack_pointer(-16);_.recordplaintext_toString(i,this.__wbg_ptr);var r=f()[i/4+0],n=f()[i/4+1];return t=r,e=n,s(r,n)}finally{_.__wbindgen_add_to_stack_pointer(16),_.__wbindgen_free(t,e,1)}}microcredits(){const t=_.recordplaintext_microcredits(this.__wbg_ptr);return BigInt.asUintN(64,t)}nonce(){let t,e;try{const i=_.__wbindgen_add_to_stack_pointer(-16);_.recordplaintext_nonce(i,this.__wbg_ptr);var r=f()[i/4+0],n=f()[i/4+1];return t=r,e=n,s(r,n)}finally{_.__wbindgen_add_to_stack_pointer(16),_.__wbindgen_free(t,e,1)}}serialNumberString(t,e,r){let i,o;try{const p=_.__wbindgen_add_to_stack_pointer(-16);v(t,W);const y=b(e,_.__wbindgen_malloc,_.__wbindgen_realloc),m=g,h=b(r,_.__wbindgen_malloc,_.__wbindgen_realloc),k=g;_.recordplaintext_serialNumberString(p,this.__wbg_ptr,t.__wbg_ptr,y,m,h,k);var a=f()[p/4+0],c=f()[p/4+1],w=f()[p/4+2],d=f()[p/4+3],l=a,u=c;if(d)throw l=0,u=0,n(w);return i=l,o=u,s(l,u)}finally{_.__wbindgen_add_to_stack_pointer(16),_.__wbindgen_free(i,o,1)}}}const __="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((t=>_.__wbg_signature_free(t>>>0)));class t_{static __wrap(_){_>>>=0;const t=Object.create(t_.prototype);return t.__wbg_ptr=_,__.register(t,t.__wbg_ptr,t),t}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,__.unregister(this),_}free(){const t=this.__destroy_into_raw();_.__wbg_signature_free(t)}static sign(t,e){v(t,W);const r=k(e,_.__wbindgen_malloc),n=g,i=_.privatekey_sign(t.__wbg_ptr,r,n);return t_.__wrap(i)}verify(t,e){v(t,T);const r=k(e,_.__wbindgen_malloc),n=g;return 0!==_.signature_verify(this.__wbg_ptr,t.__wbg_ptr,r,n)}static from_string(t){const e=b(t,_.__wbindgen_malloc,_.__wbindgen_realloc),r=g,n=_.signature_from_string(e,r);return t_.__wrap(n)}to_string(){let t,e;try{const i=_.__wbindgen_add_to_stack_pointer(-16);_.signature_to_string(i,this.__wbg_ptr);var r=f()[i/4+0],n=f()[i/4+1];return t=r,e=n,s(r,n)}finally{_.__wbindgen_add_to_stack_pointer(16),_.__wbindgen_free(t,e,1)}}}const e_="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((t=>_.__wbg_transaction_free(t>>>0)));class r_{static __wrap(_){_>>>=0;const t=Object.create(r_.prototype);return t.__wbg_ptr=_,e_.register(t,t.__wbg_ptr,t),t}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,e_.unregister(this),_}free(){const t=this.__destroy_into_raw();_.__wbg_transaction_free(t)}static fromString(t){try{const i=_.__wbindgen_add_to_stack_pointer(-16),o=b(t,_.__wbindgen_malloc,_.__wbindgen_realloc),a=g;_.transaction_fromString(i,o,a);var e=f()[i/4+0],r=f()[i/4+1];if(f()[i/4+2])throw n(r);return r_.__wrap(e)}finally{_.__wbindgen_add_to_stack_pointer(16)}}toString(){let t,e;try{const i=_.__wbindgen_add_to_stack_pointer(-16);_.transaction_toString(i,this.__wbg_ptr);var r=f()[i/4+0],n=f()[i/4+1];return t=r,e=n,s(r,n)}finally{_.__wbindgen_add_to_stack_pointer(16),_.__wbindgen_free(t,e,1)}}transactionId(){let t,e;try{const i=_.__wbindgen_add_to_stack_pointer(-16);_.transaction_transactionId(i,this.__wbg_ptr);var r=f()[i/4+0],n=f()[i/4+1];return t=r,e=n,s(r,n)}finally{_.__wbindgen_add_to_stack_pointer(16),_.__wbindgen_free(t,e,1)}}transactionType(){let t,e;try{const i=_.__wbindgen_add_to_stack_pointer(-16);_.transaction_transactionType(i,this.__wbg_ptr);var r=f()[i/4+0],n=f()[i/4+1];return t=r,e=n,s(r,n)}finally{_.__wbindgen_add_to_stack_pointer(16),_.__wbindgen_free(t,e,1)}}}const n_="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((t=>_.__wbg_verifyingkey_free(t>>>0)));class i_{static __wrap(_){_>>>=0;const t=Object.create(i_.prototype);return t.__wbg_ptr=_,n_.register(t,t.__wbg_ptr,t),t}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,n_.unregister(this),_}free(){const t=this.__destroy_into_raw();_.__wbg_verifyingkey_free(t)}static bondPublicVerifier(){const t=_.verifyingkey_bondPublicVerifier();return i_.__wrap(t)}static bondValidatorVerifier(){const t=_.verifyingkey_bondValidatorVerifier();return i_.__wrap(t)}static claimUnbondPublicVerifier(){const t=_.verifyingkey_claimUnbondPublicVerifier();return i_.__wrap(t)}static feePrivateVerifier(){const t=_.verifyingkey_feePrivateVerifier();return i_.__wrap(t)}static feePublicVerifier(){const t=_.verifyingkey_feePublicVerifier();return i_.__wrap(t)}static inclusionVerifier(){const t=_.verifyingkey_inclusionVerifier();return i_.__wrap(t)}static joinVerifier(){const t=_.verifyingkey_joinVerifier();return i_.__wrap(t)}static setValidatorStateVerifier(){const t=_.verifyingkey_setValidatorStateVerifier();return i_.__wrap(t)}static splitVerifier(){const t=_.verifyingkey_splitVerifier();return i_.__wrap(t)}static transferPrivateVerifier(){const t=_.verifyingkey_transferPrivateVerifier();return i_.__wrap(t)}static transferPrivateToPublicVerifier(){const t=_.verifyingkey_transferPrivateToPublicVerifier();return i_.__wrap(t)}static transferPublicVerifier(){const t=_.verifyingkey_transferPublicVerifier();return i_.__wrap(t)}static transferPublicAsSignerVerifier(){const t=_.verifyingkey_transferPublicAsSignerVerifier();return i_.__wrap(t)}static transferPublicToPrivateVerifier(){const t=_.verifyingkey_transferPublicToPrivateVerifier();return i_.__wrap(t)}static unbondPublicVerifier(){const t=_.verifyingkey_unbondPublicVerifier();return i_.__wrap(t)}isBondPublicVerifier(){return 0!==_.verifyingkey_isBondPublicVerifier(this.__wbg_ptr)}isBondValidatorVerifier(){return 0!==_.verifyingkey_isBondValidatorVerifier(this.__wbg_ptr)}isClaimUnbondPublicVerifier(){return 0!==_.verifyingkey_isClaimUnbondPublicVerifier(this.__wbg_ptr)}isFeePrivateVerifier(){return 0!==_.verifyingkey_isFeePrivateVerifier(this.__wbg_ptr)}isFeePublicVerifier(){return 0!==_.verifyingkey_isFeePublicVerifier(this.__wbg_ptr)}isInclusionVerifier(){return 0!==_.verifyingkey_isInclusionVerifier(this.__wbg_ptr)}isJoinVerifier(){return 0!==_.verifyingkey_isJoinVerifier(this.__wbg_ptr)}isSetValidatorStateVerifier(){return 0!==_.verifyingkey_isSetValidatorStateVerifier(this.__wbg_ptr)}isSplitVerifier(){return 0!==_.verifyingkey_isSplitVerifier(this.__wbg_ptr)}isTransferPrivateVerifier(){return 0!==_.verifyingkey_isTransferPrivateVerifier(this.__wbg_ptr)}isTransferPrivateToPublicVerifier(){return 0!==_.verifyingkey_isTransferPrivateToPublicVerifier(this.__wbg_ptr)}isTransferPublicVerifier(){return 0!==_.verifyingkey_isTransferPublicVerifier(this.__wbg_ptr)}isTransferPublicAsSignerVerifier(){return 0!==_.verifyingkey_isTransferPublicAsSignerVerifier(this.__wbg_ptr)}isTransferPublicToPrivateVerifier(){return 0!==_.verifyingkey_isTransferPublicToPrivateVerifier(this.__wbg_ptr)}isUnbondPublicVerifier(){return 0!==_.verifyingkey_isUnbondPublicVerifier(this.__wbg_ptr)}checksum(){let t,e;try{const i=_.__wbindgen_add_to_stack_pointer(-16);_.verifyingkey_checksum(i,this.__wbg_ptr);var r=f()[i/4+0],n=f()[i/4+1];return t=r,e=n,s(r,n)}finally{_.__wbindgen_add_to_stack_pointer(16),_.__wbindgen_free(t,e,1)}}copy(){const t=_.verifyingkey_copy(this.__wbg_ptr);return i_.__wrap(t)}static fromBytes(t){try{const i=_.__wbindgen_add_to_stack_pointer(-16),o=k(t,_.__wbindgen_malloc),a=g;_.verifyingkey_fromBytes(i,o,a);var e=f()[i/4+0],r=f()[i/4+1];if(f()[i/4+2])throw n(r);return i_.__wrap(e)}finally{_.__wbindgen_add_to_stack_pointer(16)}}static fromString(t){try{const i=_.__wbindgen_add_to_stack_pointer(-16),o=b(t,_.__wbindgen_malloc,_.__wbindgen_realloc),a=g;_.verifyingkey_fromString(i,o,a);var e=f()[i/4+0],r=f()[i/4+1];if(f()[i/4+2])throw n(r);return i_.__wrap(e)}finally{_.__wbindgen_add_to_stack_pointer(16)}}toBytes(){try{const o=_.__wbindgen_add_to_stack_pointer(-16);_.verifyingkey_toBytes(o,this.__wbg_ptr);var t=f()[o/4+0],e=f()[o/4+1],r=f()[o/4+2];if(f()[o/4+3])throw n(r);var i=V(t,e).slice();return _.__wbindgen_free(t,1*e,1),i}finally{_.__wbindgen_add_to_stack_pointer(16)}}toString(){let t,e;try{const i=_.__wbindgen_add_to_stack_pointer(-16);_.verifyingkey_toString(i,this.__wbg_ptr);var r=f()[i/4+0],n=f()[i/4+1];return t=r,e=n,s(r,n)}finally{_.__wbindgen_add_to_stack_pointer(16),_.__wbindgen_free(t,e,1)}}}const o_="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((t=>_.__wbg_viewkey_free(t>>>0)));class a_{static __wrap(_){_>>>=0;const t=Object.create(a_.prototype);return t.__wbg_ptr=_,o_.register(t,t.__wbg_ptr,t),t}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,o_.unregister(this),_}free(){const t=this.__destroy_into_raw();_.__wbg_viewkey_free(t)}static from_private_key(t){v(t,W);const e=_.privatekey_to_view_key(t.__wbg_ptr);return a_.__wrap(e)}static from_string(t){const e=b(t,_.__wbindgen_malloc,_.__wbindgen_realloc),r=g,n=_.viewkey_from_string(e,r);return a_.__wrap(n)}to_string(){let t,e;try{const i=_.__wbindgen_add_to_stack_pointer(-16);_.viewkey_to_string(i,this.__wbg_ptr);var r=f()[i/4+0],n=f()[i/4+1];return t=r,e=n,s(r,n)}finally{_.__wbindgen_add_to_stack_pointer(16),_.__wbindgen_free(t,e,1)}}to_address(){const t=_.address_from_view_key(this.__wbg_ptr);return T.__wrap(t)}decrypt(t){let e,r;try{const l=_.__wbindgen_add_to_stack_pointer(-16),u=b(t,_.__wbindgen_malloc,_.__wbindgen_realloc),p=g;_.viewkey_decrypt(l,this.__wbg_ptr,u,p);var i=f()[l/4+0],o=f()[l/4+1],a=f()[l/4+2],c=f()[l/4+3],w=i,d=o;if(c)throw w=0,d=0,n(a);return e=w,r=d,s(w,d)}finally{_.__wbindgen_add_to_stack_pointer(16),_.__wbindgen_free(e,r,1)}}}function s_(){const t={wbg:{}};return t.wbg.__wbindgen_object_drop_ref=function(_){n(_)},t.wbg.__wbg_new_71801a555ad9f2aa=function(){return x((function(){return c(new XMLHttpRequest)}),arguments)},t.wbg.__wbg_overrideMimeType_ee9c51919ceb418b=function(){return x((function(_,t,r){e(_).overrideMimeType(s(t,r))}),arguments)},t.wbg.__wbg_open_c9eb0cf2c9d95679=function(){return x((function(_,t,r,n,i,o){e(_).open(s(t,r),s(n,i),0!==o)}),arguments)},t.wbg.__wbg_send_80d29985093c1ec5=function(){return x((function(_){e(_).send()}),arguments)},t.wbg.__wbg_response_7c2e2759084f7279=function(){return x((function(_){return c(e(_).response)}),arguments)},t.wbg.__wbg_status_d485fb5a478426fb=function(){return x((function(_){return e(_).status}),arguments)},t.wbg.__wbg_new_72fb9a18b5ae2624=function(){return c(new Object)},t.wbg.__wbindgen_string_new=function(_,t){return c(s(_,t))},t.wbg.__wbg_set_1f9b04f170055d33=function(){return x((function(_,t,r){return Reflect.set(e(_),e(t),e(r))}),arguments)},t.wbg.__wbg_new_ab6fd82b10560829=function(){return x((function(){return c(new Headers)}),arguments)},t.wbg.__wbindgen_object_clone_ref=function(_){return c(e(_))},t.wbg.__wbg_new_0d76b0581eca6298=function(){return x((function(){return c(new AbortController)}),arguments)},t.wbg.__wbg_signal_a61f78a3478fd9bc=function(_){return c(e(_).signal)},t.wbg.__wbg_append_7bfcb4937d1d5e29=function(){return x((function(_,t,r,n,i){e(_).append(s(t,r),s(n,i))}),arguments)},t.wbg.__wbg_instanceof_Response_849eb93e75734b6e=function(_){let t;try{t=e(_)instanceof Response}catch(_){t=!1}return t},t.wbg.__wbg_status_61a01141acd3cf74=function(_){return e(_).status},t.wbg.__wbg_url_5f6dc4009ac5f99d=function(t,r){const n=b(e(r).url,_.__wbindgen_malloc,_.__wbindgen_realloc),i=g;f()[t/4+1]=i,f()[t/4+0]=n},t.wbg.__wbg_headers_9620bfada380764a=function(_){return c(e(_).headers)},t.wbg.__wbg_iterator_2cee6dadfd956dfa=function(){return c(Symbol.iterator)},t.wbg.__wbg_get_e3c254076557e348=function(){return x((function(_,t){return c(Reflect.get(e(_),e(t)))}),arguments)},t.wbg.__wbindgen_is_function=function(_){return"function"==typeof e(_)},t.wbg.__wbg_call_27c0f87801dedf93=function(){return x((function(_,t){return c(e(_).call(e(t)))}),arguments)},t.wbg.__wbindgen_is_object=function(_){const t=e(_);return"object"==typeof t&&null!==t},t.wbg.__wbg_next_40fc327bfc8770e6=function(_){return c(e(_).next)},t.wbg.__wbg_next_196c84450b364254=function(){return x((function(_){return c(e(_).next())}),arguments)},t.wbg.__wbg_done_298b57d23c0fc80c=function(_){return e(_).done},t.wbg.__wbg_value_d93c65011f51a456=function(_){return c(e(_).value)},t.wbg.__wbg_abort_2aa7521d5690750e=function(_){e(_).abort()},t.wbg.__wbg_stringify_8887fe74e1c50d81=function(){return x((function(_){return c(JSON.stringify(e(_)))}),arguments)},t.wbg.__wbindgen_string_get=function(t,r){const n=e(r),i="string"==typeof n?n:void 0;var o=l(i)?0:b(i,_.__wbindgen_malloc,_.__wbindgen_realloc),a=g;f()[t/4+1]=a,f()[t/4+0]=o},t.wbg.__wbg_log_0159ca40cddf5b15=function(_,t){console.log(s(_,t))},t.wbg.__wbindgen_bigint_from_u64=function(_){return c(BigInt.asUintN(64,_))},t.wbg.__wbg_call_b3ca7c6051f9bec1=function(){return x((function(_,t,r){return c(e(_).call(e(t),e(r)))}),arguments)},t.wbg.__wbg_keypair_new=function(_){return c(E.__wrap(_))},t.wbg.__wbindgen_module=function(){return c(w_.__wbindgen_wasm_module)},t.wbg.__wbindgen_memory=function(){return c(_.memory)},t.wbg.__wbg_spawnWorker_f6acaddb2e29dc4a=function(_,t,r,n){return c(function(_,t,e,r){return new Promise((n=>{const i=new Worker(_,{type:"module"});i.addEventListener("message",(_=>{setTimeout((()=>{n(i),i.unref&&i.unref()}),0)}),{capture:!0,once:!0}),i.postMessage({module:t,memory:e,address:r})}))}(e(_),e(t),e(r),n>>>0))},t.wbg.__wbg_executionresponse_new=function(_){return c(O.__wrap(_))},t.wbg.__wbg_transaction_new=function(_){return c(r_.__wrap(_))},t.wbg.__wbg_newwithlength_66ae46612e7f0234=function(_){return c(new Array(_>>>0))},t.wbg.__wbg_set_d4638f722068f043=function(_,t,r){e(_)[t>>>0]=n(r)},t.wbg.__wbindgen_cb_drop=function(_){const t=n(_).original;if(1==t.cnt--)return t.a=0,!0;return!1},t.wbg.__wbg_new_16b304a2cfa7ff4a=function(){return c(new Array)},t.wbg.__wbg_push_a5b05aedc7234f9f=function(_,t){return e(_).push(e(t))},t.wbg.__wbg_arrayBuffer_29931d52c7206b02=function(){return x((function(_){return c(e(_).arrayBuffer())}),arguments)},t.wbg.__wbg_new_63b92bc8671ed464=function(_){return c(new Uint8Array(e(_)))},t.wbg.__wbg_length_c20a40f15020d68a=function(_){return e(_).length},t.wbg.__wbg_new_81740750da40724f=function(t,e){try{var r={a:t,b:e};const n=new Promise(((t,e)=>{const n=r.a;r.a=0;try{return function(t,e,r,n){_.wasm_bindgen__convert__closures__invoke2_mut__h5ab12ffe4b82d47a(t,e,c(r),c(n))}(n,r.b,t,e)}finally{r.a=n}}));return c(n)}finally{r.a=r.b=0}},t.wbg.__wbindgen_number_new=function(_){return c(_)},t.wbg.__wbg_new_abda76e883ba8a5f=function(){return c(new Error)},t.wbg.__wbg_stack_658279fe44541cf6=function(t,r){const n=b(e(r).stack,_.__wbindgen_malloc,_.__wbindgen_realloc),i=g;f()[t/4+1]=i,f()[t/4+0]=n},t.wbg.__wbg_error_f851667af71bcfc6=function(t,e){let r,n;try{r=t,n=e,console.error(s(t,e))}finally{_.__wbindgen_free(r,n,1)}},t.wbg.__wbg_buffer_12d079cc21e14bdb=function(_){return c(e(_).buffer)},t.wbg.__wbg_newwithbyteoffsetandlength_aa4a17c33a06e5cb=function(_,t,r){return c(new Uint8Array(e(_),t>>>0,r>>>0))},t.wbg.__wbg_randomFillSync_5c9c955aa56b6049=function(){return x((function(_,t){e(_).randomFillSync(n(t))}),arguments)},t.wbg.__wbg_subarray_a1f73cd4b5b42fe1=function(_,t,r){return c(e(_).subarray(t>>>0,r>>>0))},t.wbg.__wbg_getRandomValues_3aa56aa6edec874c=function(){return x((function(_,t){e(_).getRandomValues(e(t))}),arguments)},t.wbg.__wbg_set_a47bac70306a19a7=function(_,t,r){e(_).set(e(t),r>>>0)},t.wbg.__wbg_crypto_1d1f22824a6a080c=function(_){return c(e(_).crypto)},t.wbg.__wbg_process_4a72847cc503995b=function(_){return c(e(_).process)},t.wbg.__wbg_versions_f686565e586dd935=function(_){return c(e(_).versions)},t.wbg.__wbg_node_104a2ff8d6ea03a2=function(_){return c(e(_).node)},t.wbg.__wbindgen_is_string=function(_){return"string"==typeof e(_)},t.wbg.__wbg_require_cca90b1a94a0255b=function(){return x((function(){return c(module.require)}),arguments)},t.wbg.__wbg_msCrypto_eb05e62b530a1508=function(_){return c(e(_).msCrypto)},t.wbg.__wbg_newwithlength_e9b4878cebadb3d3=function(_){return c(new Uint8Array(_>>>0))},t.wbg.__wbg_length_cd7af8117672b8b8=function(_){return e(_).length},t.wbg.__wbg_get_bd8e338fbd5f5cc8=function(_,t){return c(e(_)[t>>>0])},t.wbg.__wbg_self_ce0dbfc45cf2f5be=function(){return x((function(){return c(self.self)}),arguments)},t.wbg.__wbg_window_c6fb939a7f436783=function(){return x((function(){return c(window.window)}),arguments)},t.wbg.__wbg_globalThis_d1e6af4856ba331b=function(){return x((function(){return c(globalThis.globalThis)}),arguments)},t.wbg.__wbg_global_207b558942527489=function(){return x((function(){return c(global.global)}),arguments)},t.wbg.__wbindgen_is_undefined=function(_){return void 0===e(_)},t.wbg.__wbg_newnoargs_e258087cd0daa0ea=function(_,t){return c(new Function(s(_,t)))},t.wbg.__wbg_has_0af94d20077affa2=function(){return x((function(_,t){return Reflect.has(e(_),e(t))}),arguments)},t.wbg.__wbg_fetch_bc7c8e27076a5c84=function(_){return c(fetch(e(_)))},t.wbg.__wbg_fetch_921fad6ef9e883dd=function(_,t){return c(e(_).fetch(e(t)))},t.wbg.__wbindgen_debug_string=function(t,r){const n=b(p(e(r)),_.__wbindgen_malloc,_.__wbindgen_realloc),i=g;f()[t/4+1]=i,f()[t/4+0]=n},t.wbg.__wbindgen_throw=function(_,t){throw new Error(s(_,t))},t.wbg.__wbindgen_rethrow=function(_){throw n(_)},t.wbg.__wbg_then_a73caa9a87991566=function(_,t,r){return c(e(_).then(e(t),e(r)))},t.wbg.__wbg_then_0c86a60e8fcfe9f6=function(_,t){return c(e(_).then(e(t)))},t.wbg.__wbg_queueMicrotask_481971b0d87f3dd4=function(_){queueMicrotask(e(_))},t.wbg.__wbg_queueMicrotask_3cbae2ec6b6cd3d6=function(_){return c(e(_).queueMicrotask)},t.wbg.__wbg_resolve_b0083a7967828ec8=function(_){return c(Promise.resolve(e(_)))},t.wbg.__wbg_waitAsync_5d743fc9058ba01a=function(){return c(Atomics.waitAsync)},t.wbg.__wbg_new_8cccba86b0f574cb=function(_){return c(new Int32Array(e(_)))},t.wbg.__wbg_waitAsync_46d5c36955b71a79=function(_,t,r){return c(Atomics.waitAsync(e(_),t,r))},t.wbg.__wbg_async_19c0400d97cc72fe=function(_){return e(_).async},t.wbg.__wbg_value_571d60108110e917=function(_){return c(e(_).value)},t.wbg.__wbindgen_link_fc1eedd35dc7e0a6=function(t){const e=b("data:application/javascript,"+encodeURIComponent("onmessage = function (ev) {\n let [ia, index, value] = ev.data;\n ia = new Int32Array(ia.buffer);\n let result = Atomics.wait(ia, index, value);\n postMessage(result);\n };\n "),_.__wbindgen_malloc,_.__wbindgen_realloc),r=g;f()[t/4+1]=r,f()[t/4+0]=e},t.wbg.__wbg_new_d1187ae36d662ef9=function(){return x((function(_,t){return c(new Worker(s(_,t)))}),arguments)},t.wbg.__wbg_setonmessage_503809e5bb51bd33=function(_,t){e(_).onmessage=e(t)},t.wbg.__wbg_of_6a70eed8d41f469c=function(_,t,r){return c(Array.of(e(_),e(t),e(r)))},t.wbg.__wbg_postMessage_7380d10e8b8269df=function(){return x((function(_,t){e(_).postMessage(e(t))}),arguments)},t.wbg.__wbg_data_3ce7c145ca4fbcdc=function(_){return c(e(_).data)},t.wbg.__wbg_newwithstrandinit_3fd6fba4083ff2d0=function(){return x((function(_,t,r){return c(new Request(s(_,t),e(r)))}),arguments)},t.wbg.__wbg_responseText_c67ed2d48db10769=function(){return x((function(t,r){const n=e(r).responseText;var i=l(n)?0:b(n,_.__wbindgen_malloc,_.__wbindgen_realloc),o=g;f()[t/4+1]=o,f()[t/4+0]=i}),arguments)},t.wbg.__wbindgen_closure_wrapper5763=function(_,t,e){return c(m(_,t,538,h))},t.wbg.__wbindgen_closure_wrapper5788=function(_,t,e){return c(m(_,t,538,h))},t}function c_(_,t){_.wbg.memory=t||new WebAssembly.Memory({initial:25,maximum:65536,shared:!0})}function g_(t,e){return _=t.exports,w_.__wbindgen_wasm_module=e,P=null,u=null,o=null,_.__wbindgen_start(),_}async function w_(t,e){if(void 0!==_)return _;const r=s_();("string"==typeof t||"function"==typeof Request&&t instanceof Request||"function"==typeof URL&&t instanceof URL)&&(t=fetch(t)),c_(r,e);const{instance:n,module:i}=await async function(_,t){if("function"==typeof Response&&_ instanceof Response){if("function"==typeof WebAssembly.instantiateStreaming)try{return await WebAssembly.instantiateStreaming(_,t)}catch(t){if("application/wasm"==_.headers.get("Content-Type"))throw t;console.warn("`WebAssembly.instantiateStreaming` failed because your server does not serve wasm with `application/wasm` MIME type. Falling back to `WebAssembly.instantiate` which is slower. Original error:\n",t)}const e=await _.arrayBuffer();return await WebAssembly.instantiate(e,t)}{const e=await WebAssembly.instantiate(_,t);return e instanceof WebAssembly.Instance?{instance:e,module:_}:e}}(await t,r);return g_(n,i)}var d_=Object.freeze({__proto__:null,Address:T,Execution:z,ExecutionResponse:O,Field:K,KeyPair:E,Metadata:I,OfflineQuery:C,PrivateKey:W,PrivateKeyCiphertext:$,Program:J,ProgramManager:class{__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,H.unregister(this),_}free(){const t=this.__destroy_into_raw();_.__wbg_programmanager_free(t)}static buildDeploymentTransaction(t,e,r,i,o,a,s,w,d){v(t,W);const u=b(e,_.__wbindgen_malloc,_.__wbindgen_realloc),f=g;let p=0;l(i)||(v(i,Z),p=i.__destroy_into_raw());var y=l(o)?0:b(o,_.__wbindgen_malloc,_.__wbindgen_realloc),m=g;let h=0;l(s)||(v(s,Q),h=s.__destroy_into_raw());let k=0;l(w)||(v(w,i_),k=w.__destroy_into_raw());let P=0;l(d)||(v(d,C),P=d.__destroy_into_raw());return n(_.programmanager_buildDeploymentTransaction(t.__wbg_ptr,u,f,r,p,y,m,l(a)?0:c(a),h,k,P))}static estimateDeploymentFee(t,e){const r=b(t,_.__wbindgen_malloc,_.__wbindgen_realloc),i=g;return n(_.programmanager_estimateDeploymentFee(r,i,l(e)?0:c(e)))}static estimateProgramNameCost(t){try{const i=_.__wbindgen_add_to_stack_pointer(-16),o=b(t,_.__wbindgen_malloc,_.__wbindgen_realloc),a=g;_.programmanager_estimateProgramNameCost(i,o,a);var e=S()[i/8+0],r=f()[i/4+2];if(f()[i/4+3])throw n(r);return BigInt.asUintN(64,e)}finally{_.__wbindgen_add_to_stack_pointer(16)}}static executeFunctionOffline(t,e,r,i,o,a,s,w,d,u,f){v(t,W);const p=b(e,_.__wbindgen_malloc,_.__wbindgen_realloc),y=g,m=b(r,_.__wbindgen_malloc,_.__wbindgen_realloc),h=g;let k=0;l(w)||(v(w,Q),k=w.__destroy_into_raw());let P=0;l(d)||(v(d,i_),P=d.__destroy_into_raw());var S=l(u)?0:b(u,_.__wbindgen_malloc,_.__wbindgen_realloc),V=g;let x=0;l(f)||(v(f,C),x=f.__destroy_into_raw());return n(_.programmanager_executeFunctionOffline(t.__wbg_ptr,p,y,m,h,c(i),o,a,l(s)?0:c(s),k,P,S,V,x))}static buildExecutionTransaction(t,e,r,i,o,a,s,w,d,u,f,p,y){v(t,W);const m=b(e,_.__wbindgen_malloc,_.__wbindgen_realloc),h=g,k=b(r,_.__wbindgen_malloc,_.__wbindgen_realloc),P=g;let S=0;l(a)||(v(a,Z),S=a.__destroy_into_raw());var V=l(s)?0:b(s,_.__wbindgen_malloc,_.__wbindgen_realloc),x=g;let F=0;l(d)||(v(d,Q),F=d.__destroy_into_raw());let T=0;l(u)||(v(u,i_),T=u.__destroy_into_raw());let R=0;l(f)||(v(f,Q),R=f.__destroy_into_raw());let z=0;l(p)||(v(p,i_),z=p.__destroy_into_raw());let A=0;l(y)||(v(y,C),A=y.__destroy_into_raw());return n(_.programmanager_buildExecutionTransaction(t.__wbg_ptr,m,h,k,P,c(i),o,S,V,x,l(w)?0:c(w),F,T,R,z,A))}static estimateExecutionFee(t,e,r,i,o,a,s,w,d){v(t,W);const u=b(e,_.__wbindgen_malloc,_.__wbindgen_realloc),f=g,p=b(r,_.__wbindgen_malloc,_.__wbindgen_realloc),y=g;var m=l(o)?0:b(o,_.__wbindgen_malloc,_.__wbindgen_realloc),h=g;let k=0;l(s)||(v(s,Q),k=s.__destroy_into_raw());let P=0;l(w)||(v(w,i_),P=w.__destroy_into_raw());let S=0;l(d)||(v(d,C),S=d.__destroy_into_raw());return n(_.programmanager_estimateExecutionFee(t.__wbg_ptr,u,f,p,y,c(i),m,h,l(a)?0:c(a),k,P,S))}static estimateFinalizeFee(t,e){try{const o=_.__wbindgen_add_to_stack_pointer(-16),a=b(t,_.__wbindgen_malloc,_.__wbindgen_realloc),s=g,c=b(e,_.__wbindgen_malloc,_.__wbindgen_realloc),w=g;_.programmanager_estimateFinalizeFee(o,a,s,c,w);var r=S()[o/8+0],i=f()[o/4+2];if(f()[o/4+3])throw n(i);return BigInt.asUintN(64,r)}finally{_.__wbindgen_add_to_stack_pointer(16)}}static buildJoinTransaction(t,e,r,i,o,a,s,c,w,d,u){v(t,W),v(e,Z);var f=e.__destroy_into_raw();v(r,Z);var p=r.__destroy_into_raw();let y=0;l(o)||(v(o,Z),y=o.__destroy_into_raw());var m=l(a)?0:b(a,_.__wbindgen_malloc,_.__wbindgen_realloc),h=g;let k=0;l(s)||(v(s,Q),k=s.__destroy_into_raw());let P=0;l(c)||(v(c,i_),P=c.__destroy_into_raw());let S=0;l(w)||(v(w,Q),S=w.__destroy_into_raw());let V=0;l(d)||(v(d,i_),V=d.__destroy_into_raw());let x=0;l(u)||(v(u,C),x=u.__destroy_into_raw());return n(_.programmanager_buildJoinTransaction(t.__wbg_ptr,f,p,i,y,m,h,k,P,S,V,x))}static buildSplitTransaction(t,e,r,i,o,a,s){v(t,W),v(r,Z);var c=r.__destroy_into_raw(),w=l(i)?0:b(i,_.__wbindgen_malloc,_.__wbindgen_realloc),d=g;let u=0;l(o)||(v(o,Q),u=o.__destroy_into_raw());let f=0;l(a)||(v(a,i_),f=a.__destroy_into_raw());let p=0;l(s)||(v(s,C),p=s.__destroy_into_raw());return n(_.programmanager_buildSplitTransaction(t.__wbg_ptr,e,c,w,d,u,f,p))}static buildTransferTransaction(t,e,r,i,o,a,s,c,w,d,u,f,p,y){v(t,W);const m=b(r,_.__wbindgen_malloc,_.__wbindgen_realloc),h=g,k=b(i,_.__wbindgen_malloc,_.__wbindgen_realloc),P=g;var S=l(o)?0:b(o,_.__wbindgen_malloc,_.__wbindgen_realloc),V=g;let x=0;l(a)||(v(a,Z),x=a.__destroy_into_raw());let F=0;l(c)||(v(c,Z),F=c.__destroy_into_raw());var T=l(w)?0:b(w,_.__wbindgen_malloc,_.__wbindgen_realloc),R=g;let z=0;l(d)||(v(d,Q),z=d.__destroy_into_raw());let A=0;l(u)||(v(u,i_),A=u.__destroy_into_raw());let O=0;l(f)||(v(f,Q),O=f.__destroy_into_raw());let j=0;l(p)||(v(p,i_),j=p.__destroy_into_raw());let K=0;l(y)||(v(y,C),K=y.__destroy_into_raw());return n(_.programmanager_buildTransferTransaction(t.__wbg_ptr,e,m,h,k,P,S,V,x,s,F,T,R,z,A,O,j,K))}static synthesizeKeyPair(t,e,r,i,o){v(t,W);const a=b(e,_.__wbindgen_malloc,_.__wbindgen_realloc),s=g,w=b(r,_.__wbindgen_malloc,_.__wbindgen_realloc),d=g;return n(_.programmanager_synthesizeKeyPair(t.__wbg_ptr,a,s,w,d,c(i),l(o)?0:c(o)))}},ProvingKey:Q,RecordCiphertext:G,RecordPlaintext:Z,Signature:t_,Transaction:r_,VerifyingKey:i_,ViewKey:a_,default:w_,initSync:function(t,e){if(void 0!==_)return _;const r=s_();return c_(r,e),t instanceof WebAssembly.Module||(t=new WebAssembly.Module(t)),g_(new WebAssembly.Instance(t,r),t)},initThreadPool:function(t,e){return n(_.initThreadPool(c(t),e))},runRayonThread:function(t){_.runRayonThread(t)},verifyFunctionExecution:function(t,e,r,i){try{const s=_.__wbindgen_add_to_stack_pointer(-16);v(t,z),v(e,i_),v(r,J);const c=b(i,_.__wbindgen_malloc,_.__wbindgen_realloc),w=g;_.verifyFunctionExecution(s,t.__wbg_ptr,e.__wbg_ptr,r.__wbg_ptr,c,w);var o=f()[s/4+0],a=f()[s/4+1];if(f()[s/4+2])throw n(a);return 0!==o}finally{_.__wbindgen_add_to_stack_pointer(16)}}});await async function(_){const[t,{module:e,memory:r,address:n}]=await Promise.all([_,new Promise((_=>{addEventListener("message",(t=>{_(t.data)}),{capture:!0,once:!0})}))]),i=await t({initializeHook:(_,t)=>_(e,r)});postMessage(null),i.runRayonThread(n),close()}((async(_={})=>{let{importHook:t,serverPath:e,initializeHook:r}=_,n="assets/aleo_wasm.wasm";return null!=e&&(n=e+/[^\/\\]*$/.exec(n)[0]),null!=t&&(n=t(n)),null!=r?await r(w_,n):await w_(n),d_})); \ No newline at end of file diff --git a/index.bundle.js b/index.bundle.js index fce31134e..a9f913dc8 100644 --- a/index.bundle.js +++ b/index.bundle.js @@ -1,3 +1,3 @@ /*! For license information please see index.bundle.js.LICENSE.txt */ -(()=>{var e,t,n,r,o,i,a,l,s={9937:(e,t)=>{var n="function"==typeof Symbol&&Symbol.for,r=n?Symbol.for("react.element"):60103,o=n?Symbol.for("react.portal"):60106,i=n?Symbol.for("react.fragment"):60107,a=n?Symbol.for("react.strict_mode"):60108,l=n?Symbol.for("react.profiler"):60114,s=n?Symbol.for("react.provider"):60109,c=n?Symbol.for("react.context"):60110,u=n?Symbol.for("react.async_mode"):60111,d=n?Symbol.for("react.concurrent_mode"):60111,f=n?Symbol.for("react.forward_ref"):60112,h=n?Symbol.for("react.suspense"):60113,p=n?Symbol.for("react.suspense_list"):60120,m=n?Symbol.for("react.memo"):60115,g=n?Symbol.for("react.lazy"):60116,v=n?Symbol.for("react.block"):60121,y=n?Symbol.for("react.fundamental"):60117,b=n?Symbol.for("react.responder"):60118,w=n?Symbol.for("react.scope"):60119;function x(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case r:switch(e=e.type){case u:case d:case i:case l:case a:case h:return e;default:switch(e=e&&e.$$typeof){case c:case f:case g:case m:case s:return e;default:return t}}case o:return t}}}function S(e){return x(e)===d}t.isFragment=function(e){return x(e)===i},t.isMemo=function(e){return x(e)===m}},7702:(e,t,n)=>{e.exports=n(9937)},1033:(e,t)=>{var n,r=Symbol.for("react.element"),o=Symbol.for("react.portal"),i=Symbol.for("react.fragment"),a=Symbol.for("react.strict_mode"),l=Symbol.for("react.profiler"),s=Symbol.for("react.provider"),c=Symbol.for("react.context"),u=Symbol.for("react.server_context"),d=Symbol.for("react.forward_ref"),f=Symbol.for("react.suspense"),h=Symbol.for("react.suspense_list"),p=Symbol.for("react.memo"),m=Symbol.for("react.lazy"),g=Symbol.for("react.offscreen");function v(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case r:switch(e=e.type){case i:case l:case a:case f:case h:return e;default:switch(e=e&&e.$$typeof){case u:case c:case d:case m:case p:case s:return e;default:return t}}case o:return t}}}n=Symbol.for("react.module.reference"),t.isFragment=function(e){return v(e)===i},t.isMemo=function(e){return v(e)===p}},688:(e,t,n)=>{e.exports=n(1033)},1189:(e,t)=>{var n;!function(){var r={}.hasOwnProperty;function o(){for(var e=[],t=0;t{var r=n(7924),o={"text/plain":"Text","text/html":"Url",default:"Text"};e.exports=function(e,t){var n,i,a,l,s,c,u=!1;t||(t={}),n=t.debug||!1;try{if(a=r(),l=document.createRange(),s=document.getSelection(),(c=document.createElement("span")).textContent=e,c.ariaHidden="true",c.style.all="unset",c.style.position="fixed",c.style.top=0,c.style.clip="rect(0, 0, 0, 0)",c.style.whiteSpace="pre",c.style.webkitUserSelect="text",c.style.MozUserSelect="text",c.style.msUserSelect="text",c.style.userSelect="text",c.addEventListener("copy",(function(r){if(r.stopPropagation(),t.format)if(r.preventDefault(),void 0===r.clipboardData){n&&console.warn("unable to use e.clipboardData"),n&&console.warn("trying IE specific stuff"),window.clipboardData.clearData();var i=o[t.format]||o.default;window.clipboardData.setData(i,e)}else r.clipboardData.clearData(),r.clipboardData.setData(t.format,e);t.onCopy&&(r.preventDefault(),t.onCopy(r.clipboardData))})),document.body.appendChild(c),l.selectNodeContents(c),s.addRange(l),!document.execCommand("copy"))throw new Error("copy command was unsuccessful");u=!0}catch(r){n&&console.error("unable to copy using execCommand: ",r),n&&console.warn("trying IE specific stuff");try{window.clipboardData.setData(t.format||"text",e),t.onCopy&&t.onCopy(window.clipboardData),u=!0}catch(r){n&&console.error("unable to copy using clipboardData: ",r),n&&console.error("falling back to prompt"),i=function(e){var t=(/mac os x/i.test(navigator.userAgent)?"⌘":"Ctrl")+"+C";return e.replace(/#{\s*key\s*}/g,t)}("message"in t?t.message:"Copy to clipboard: #{key}, Enter"),window.prompt(i,e)}}finally{s&&("function"==typeof s.removeRange?s.removeRange(l):s.removeAllRanges()),c&&document.body.removeChild(c),a()}return u}},9137:e=>{e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var n="",r=void 0!==t[5];return t[4]&&(n+="@supports (".concat(t[4],") {")),t[2]&&(n+="@media ".concat(t[2]," {")),r&&(n+="@layer".concat(t[5].length>0?" ".concat(t[5]):""," {")),n+=e(t),r&&(n+="}"),t[2]&&(n+="}"),t[4]&&(n+="}"),n})).join("")},t.i=function(e,n,r,o,i){"string"==typeof e&&(e=[[null,e,void 0]]);var a={};if(r)for(var l=0;l0?" ".concat(u[5]):""," {").concat(u[1],"}")),u[5]=i),n&&(u[2]?(u[1]="@media ".concat(u[2]," {").concat(u[1],"}"),u[2]=n):u[2]=n),o&&(u[4]?(u[1]="@supports (".concat(u[4],") {").concat(u[1],"}"),u[4]=o):u[4]="".concat(o)),t.push(u))}},t}},4362:e=>{e.exports=function(e,t){return t||(t={}),e?(e=String(e.__esModule?e.default:e),/^['"].*['"]$/.test(e)&&(e=e.slice(1,-1)),t.hash&&(e+=t.hash),/["'() \t\n]|(%20)/.test(e)||t.needQuotes?'"'.concat(e.replace(/"/g,'\\"').replace(/\n/g,"\\n"),'"'):e):e}},7506:e=>{e.exports=function(e){var t=e[1],n=e[3];if(!n)return t;if("function"==typeof btoa){var r=btoa(unescape(encodeURIComponent(JSON.stringify(n)))),o="sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(r),i="/*# ".concat(o," */");return[t].concat([i]).join("\n")}return[t].join("\n")}},3991:(e,t,n)=>{var r=n(8963).Symbol;e.exports=r},445:e=>{e.exports=function(e,t){for(var n=-1,r=null==e?0:e.length,o=Array(r);++n{e.exports=function(e,t,n,r){var o=-1,i=null==e?0:e.length;for(r&&i&&(n=e[++o]);++o{e.exports=function(e){return e.split("")}},1633:e=>{var t=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;e.exports=function(e){return e.match(t)||[]}},2154:(e,t,n)=>{var r=n(3991),o=n(3447),i=n(4106),a=r?r.toStringTag:void 0;e.exports=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":a&&a in Object(e)?o(e):i(e)}},9401:e=>{e.exports=function(e){return function(t){return null==e?void 0:e[t]}}},3588:e=>{e.exports=function(e,t,n){var r=-1,o=e.length;t<0&&(t=-t>o?0:o+t),(n=n>o?o:n)<0&&(n+=o),o=t>n?0:n-t>>>0,t>>>=0;for(var i=Array(o);++r{var r=n(3991),o=n(445),i=n(3002),a=n(5088),l=r?r.prototype:void 0,s=l?l.toString:void 0;e.exports=function e(t){if("string"==typeof t)return t;if(i(t))return o(t,e)+"";if(a(t))return s?s.call(t):"";var n=t+"";return"0"==n&&1/t==-Infinity?"-0":n}},1332:(e,t,n)=>{var r=n(3588);e.exports=function(e,t,n){var o=e.length;return n=void 0===n?o:n,!t&&n>=o?e:r(e,t,n)}},509:(e,t,n)=>{var r=n(1332),o=n(3043),i=n(6705),a=n(6438);e.exports=function(e){return function(t){t=a(t);var n=o(t)?i(t):void 0,l=n?n[0]:t.charAt(0),s=n?r(n,1).join(""):t.slice(1);return l[e]()+s}}},4033:(e,t,n)=>{var r=n(7537),o=n(5921),i=n(2006),a=RegExp("['’]","g");e.exports=function(e){return function(t){return r(i(o(t).replace(a,"")),e,"")}}},7959:(e,t,n)=>{var r=n(9401)({À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č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o=a.call(e);return r&&(t?e[l]=n:delete e[l]),o}},3043:e=>{var t=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]");e.exports=function(e){return t.test(e)}},3776:e=>{var t=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;e.exports=function(e){return t.test(e)}},4106:e=>{var t=Object.prototype.toString;e.exports=function(e){return t.call(e)}},8963:(e,t,n)=>{var r=n(4967),o="object"==typeof self&&self&&self.Object===Object&&self,i=r||o||Function("return this")();e.exports=i},6705:(e,t,n)=>{var r=n(3146),o=n(3043),i=n(9073);e.exports=function(e){return o(e)?i(e):r(e)}},9073:e=>{var t="\\ud800-\\udfff",n="["+t+"]",r="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",o="\\ud83c[\\udffb-\\udfff]",i="[^"+t+"]",a="(?:\\ud83c[\\udde6-\\uddff]){2}",l="[\\ud800-\\udbff][\\udc00-\\udfff]",s="(?:"+r+"|"+o+")"+"?",c="[\\ufe0e\\ufe0f]?",u=c+s+("(?:\\u200d(?:"+[i,a,l].join("|")+")"+c+s+")*"),d="(?:"+[i+r+"?",r,a,l,n].join("|")+")",f=RegExp(o+"(?="+o+")|"+d+u,"g");e.exports=function(e){return e.match(f)||[]}},5768:e=>{var t="\\ud800-\\udfff",n="\\u2700-\\u27bf",r="a-z\\xdf-\\xf6\\xf8-\\xff",o="A-Z\\xc0-\\xd6\\xd8-\\xde",i="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",a="["+i+"]",l="\\d+",s="["+n+"]",c="["+r+"]",u="[^"+t+i+l+n+r+o+"]",d="(?:\\ud83c[\\udde6-\\uddff]){2}",f="[\\ud800-\\udbff][\\udc00-\\udfff]",h="["+o+"]",p="(?:"+c+"|"+u+")",m="(?:"+h+"|"+u+")",g="(?:['’](?:d|ll|m|re|s|t|ve))?",v="(?:['’](?:D|LL|M|RE|S|T|VE))?",y="(?:[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]|\\ud83c[\\udffb-\\udfff])?",b="[\\ufe0e\\ufe0f]?",w=b+y+("(?:\\u200d(?:"+["[^"+t+"]",d,f].join("|")+")"+b+y+")*"),x="(?:"+[s,d,f].join("|")+")"+w,S=RegExp([h+"?"+c+"+"+g+"(?="+[a,h,"$"].join("|")+")",m+"+"+v+"(?="+[a,h+p,"$"].join("|")+")",h+"?"+p+"+"+g,h+"+"+v,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",l,x].join("|"),"g");e.exports=function(e){return e.match(S)||[]}},7930:(e,t,n)=>{var r=n(414),o=n(4033)((function(e,t,n){return t=t.toLowerCase(),e+(n?r(t):t)}));e.exports=o},414:(e,t,n)=>{var r=n(6438),o=n(1409);e.exports=function(e){return o(r(e).toLowerCase())}},5921:(e,t,n)=>{var r=n(7959),o=n(6438),i=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,a=RegExp("[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]","g");e.exports=function(e){return(e=o(e))&&e.replace(i,r).replace(a,"")}},3002:e=>{var t=Array.isArray;e.exports=t},2857:e=>{e.exports=function(e){return null!=e&&"object"==typeof e}},5088:(e,t,n)=>{var r=n(2154),o=n(2857);e.exports=function(e){return"symbol"==typeof e||o(e)&&"[object Symbol]"==r(e)}},6438:(e,t,n)=>{var r=n(9604);e.exports=function(e){return null==e?"":r(e)}},1409:(e,t,n)=>{var r=n(509)("toUpperCase");e.exports=r},2006:(e,t,n)=>{var r=n(1633),o=n(3776),i=n(6438),a=n(5768);e.exports=function(e,t,n){return e=i(e),void 0===(t=n?void 0:t)?o(e)?a(e):r(e):e.match(t)||[]}},2324:(e,t)=>{var n,r=Symbol.for("react.element"),o=Symbol.for("react.portal"),i=Symbol.for("react.fragment"),a=Symbol.for("react.strict_mode"),l=Symbol.for("react.profiler"),s=Symbol.for("react.provider"),c=Symbol.for("react.context"),u=Symbol.for("react.server_context"),d=Symbol.for("react.forward_ref"),f=Symbol.for("react.suspense"),h=Symbol.for("react.suspense_list"),p=Symbol.for("react.memo"),m=Symbol.for("react.lazy"),g=Symbol.for("react.offscreen");function v(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case r:switch(e=e.type){case i:case l:case a:case f:case h:return e;default:switch(e=e&&e.$$typeof){case u:case c:case d:case m:case p:case s:return e;default:return t}}case o:return t}}}n=Symbol.for("react.module.reference"),t.isMemo=function(e){return v(e)===p}},7661:(e,t,n)=>{e.exports=n(2324)},9973:(e,t)=>{var n,r=Symbol.for("react.element"),o=Symbol.for("react.portal"),i=Symbol.for("react.fragment"),a=Symbol.for("react.strict_mode"),l=Symbol.for("react.profiler"),s=Symbol.for("react.provider"),c=Symbol.for("react.context"),u=Symbol.for("react.server_context"),d=Symbol.for("react.forward_ref"),f=Symbol.for("react.suspense"),h=Symbol.for("react.suspense_list"),p=Symbol.for("react.memo"),m=Symbol.for("react.lazy"),g=Symbol.for("react.offscreen");function v(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case r:switch(e=e.type){case i:case l:case a:case f:case h:return e;default:switch(e=e&&e.$$typeof){case u:case c:case d:case m:case p:case s:return e;default:return t}}case o:return t}}}n=Symbol.for("react.module.reference"),t.isMemo=function(e){return v(e)===p}},616:(e,t,n)=>{e.exports=n(9973)},9391:(e,t,n)=>{var r=n(6036),o=n(2004);function i(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n