diff --git a/4077cd2c61f1662ef9e3.wasm b/108f2867fde2069b7ac6.wasm similarity index 71% rename from 4077cd2c61f1662ef9e3.wasm rename to 108f2867fde2069b7ac6.wasm index ecd23ac95..96405142b 100644 Binary files a/4077cd2c61f1662ef9e3.wasm and b/108f2867fde2069b7ac6.wasm differ diff --git a/298.bundle.js b/298.bundle.js deleted file mode 100644 index 11b8f29dd..000000000 --- a/298.bundle.js +++ /dev/null @@ -1,3 +0,0 @@ -/*! For license information please see 298.bundle.js.LICENSE.txt */ -(self.webpackChunkaleo_website=self.webpackChunkaleo_website||[]).push([[298,63,798],{5128:(e,r,t)=>{e.exports=t.p+"c65a205fb6c9a1c6018a.js"},8249:(e,r,t)=>{e.exports=t.p+"4e18189c68509261e165.wasm"},3798:(e,r,t)=>{t.a(e,(async(e,n)=>{try{t.r(r),t.d(r,{Account:()=>f,Address:()=>i.kL,AleoKeyProvider:()=>b,AleoKeyProviderParams:()=>w,AleoNetworkClient:()=>g,BlockHeightSearch:()=>v,CREDITS_PROGRAM_KEYS:()=>T,ExecutionResponse:()=>i._U,Field:()=>i.gN,FunctionExecution:()=>i.o,KEY_STORE:()=>K,NetworkRecordProvider:()=>h,OfflineKeyProvider:()=>y,OfflineQuery:()=>i.Gd,OfflineSearchParams:()=>p,PRIVATE_TO_PUBLIC_TRANSFER:()=>x,PRIVATE_TRANSFER:()=>S,PRIVATE_TRANSFER_TYPES:()=>E,PUBLIC_TO_PRIVATE_TRANSFER:()=>R,PUBLIC_TRANSFER:()=>A,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:()=>P,initThreadPool:()=>i.CK,initializeWasm:()=>u,logAndThrow:()=>d,verifyFunctionExecution:()=>i.hz});var i=t(2063),o=t(8991),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,r){try{e="string"==typeof e?i.uq.fromString(e):e;const t=i._q.fromPrivateKeyCiphertext(e,r);return new f({privateKey:t.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,r){return this._address.verify(e,r)}}async function _(e){const r=await fetch(e);if(!r.ok)throw new Error(r.status+" could not get URL "+e);return r}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 g{host;account;constructor(e){this.host=e+"/testnet3"}setAccount(e){this.account=e}getAccount(){return this.account}setHost(e){this.host=e+"/testnet3"}async fetchData(e="/"){try{const r=await _(this.host+e);return await r.json()}catch(e){throw new Error("Error fetching data.")}}async findUnspentRecords(e,r,t,n,o,a){if(a=a||[],e<0)throw new Error("Start height must be greater than or equal to 0");const _=new Array;let s,c,l,d,u=0,f=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");l=this.account._privateKey}else try{l=t instanceof i._q?t:i._q.from_string(t)}catch(e){throw new Error("Error parsing private key provided.")}const g=l.to_view_key();try{const e=await this.getLatestHeight();if("number"!=typeof e)throw new Error("Error fetching latest block height.");d=e}catch(e){throw new Error("Error fetching latest block height.")}if(c="number"==typeof r&&r<=d?r:d,e>c)throw new Error("Start height must be less than or equal to end height.");for(;c>e;){s=c-50,s=BigInt(o))))return _;if(void 0!==n&&n.length>0){let e=0;if(r.microcredits()>n[e]){if(e+=1,_.push(r),"number"==typeof o&&(f+=r.microcredits(),f>=BigInt(o)))return _;if(_.length>=n.length)return _}}}}}catch(e){}}}}}}}catch(e){if(console.warn("Error fetching blocks in range: "+s.toString()+"-"+c.toString()),console.warn("Error: ",e),u+=1,u>10)return console.warn("10 failures fetching records reached. Returning records fetched so far"),_}}return _}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 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 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 i.$r.fromString(e)}catch(r){try{return i.$r.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 i.$r?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 n=e.cacheKey,o=e.verifyCreditsKeys;if(this.cache.has(n)){const[e,a]=this.cache.get(n),_=i.zW.fromBytes(e),s=i.XV.fromBytes(a);if(o){this.verifyCreditsKeys(n,_,s)||t(new Error(`Cached keys do not match expected keys for ${n}`))}r([_,s])}else t(new Error("Keys not found in cache for "+n))}}))}verifyCreditsKeys(e,r,t){switch(e){case T.bond_public.locator:return r.isBondPublicProver()&&t.isBondPublicVerifier();case T.claim_unbond_public.locator:return r.isClaimUnbondPublicProver()&&t.isClaimUnbondPublicVerifier();case T.fee_private.locator:return r.isFeePrivateProver()&&t.isFeePrivateVerifier();case T.fee_public.locator:return r.isFeePublicProver()&&t.isFeePublicVerifier();case T.inclusion.locator:return r.isInclusionProver()&&t.isInclusionVerifier();case T.join.locator:return r.isJoinProver()&&t.isJoinVerifier();case T.set_validator_state.locator:return r.isSetValidatorStateProver()&&t.isSetValidatorStateVerifier();case T.split.locator:return r.isSplitProver()&&t.isSplitVerifier();case T.transfer_private.locator:return r.isTransferPrivateProver()&&t.isTransferPrivateVerifier();case T.transfer_private_to_public.locator:return r.isTransferPrivateToPublicProver()&&t.isTransferPrivateToPublicVerifier();case T.transfer_public.locator:return r.isTransferPublicProver()&&t.isTransferPublicVerifier();case T.transfer_public_to_private.locator:return r.isTransferPublicToPrivateProver()&&t.isTransferPublicToPrivateVerifier();case T.unbond_delegator_as_validator.locator:return r.isUnbondDelegatorAsValidatorProver()&&t.isUnbondDelegatorAsValidatorVerifier();case T.unbond_public.locator:return r.isUnbondPublicProver()&&t.isUnbondPublicVerifier();default:return!1}}feePrivateKeys(){return this.functionKeys(p.feePrivateKeyParams())}feePublicKeys(){return this.functionKeys(p.feePublicKeyParams())}joinKeys(){return this.functionKeys(p.joinKeyParams())}splitKeys(){return this.functionKeys(p.splitKeyParams())}transferKeys(e){if(S.has(e))return this.functionKeys(p.transferPrivateKeyParams());if(x.has(e))return this.functionKeys(p.transferPrivateToPublicKeyParams());if(A.has(e))return this.functionKeys(p.transferPublicKeyParams());if(R.has(e))return this.functionKeys(p.transferPublicToPrivateKeyParams());throw new Error("Invalid visibility type")}async unBondPublicKeys(){return this.functionKeys(p.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()])}insertUnbondDelegatorAsValidatorKeys(e){if(!e.isUnbondDelegatorAsValidatorProver())throw new Error("Attempted to insert invalid proving keys for unbond_delegator_as_validator");this.cache.set(T.unbond_delegator_as_validator.locator,[e.toBytes(),i.XV.unbondDelegatorAsValidatorVerifier().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 h{account;networkClient;constructor(e,r){this.account=e,this.networkClient=r}setAccount(e){this.account=e}async findCreditsRecords(e,r,t,n){let i=0,o=0;if(n&&("startHeight"in n&&"number"==typeof n.endHeight&&(i=n.startHeight),"endHeight"in n&&"number"==typeof n.endHeight&&(o=n.endHeight)),0==o){const e=await this.networkClient.getLatestHeight();if(e instanceof Error)throw d("Unable to get current block height from the network");o=e}if(i>=o)throw d("Start height must be less than end height");return await this.networkClient.findUnspentRecords(i,o,this.account.privateKey(),e,void 0,t)}async findCreditsRecord(e,r,t,n){const i=await this.findCreditsRecords([e],r,t,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,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 m=null;const P=()=>{if(!m){const e=new Worker(new URL(t.p+t.u(849),t.b),{type:void 0});m=(0,o.Ud)(e)}return m};class k{account;keyProvider;host;networkClient;recordProvider;constructor(e,r,t){e?(this.host=e,this.networkClient=new g(e)):(this.host="https://api.explorer.aleo.org/v1",this.networkClient=new g(this.host)),this.keyProvider=r||new b,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,n,o,a){try{const r=i.$r.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 d(`Error validating program: ${e}`)}let _,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{o=t?await this.getCreditsRecord(r,[],o,n):void 0}catch(e){throw d(`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{_=t?await this.keyProvider.feePrivateKeys():await this.keyProvider.feePublicKeys()}catch(e){throw d(`Error finding fee keys. Key finder response: '${e}'. Please ensure your key provider is configured correctly.`)}const[c,l]=_;let u;try{u=await this.networkClient.getProgramImports(e)}catch(e){throw d(`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 i.L.buildDeploymentTransaction(s,e,r,o,this.host,u,c,l);return await this.networkClient.submitTransaction(f)}async buildExecutionTransaction(e,r,t,n,o,a,_,s,c,l,u,f,g,w){if(void 0===g)try{g=await this.networkClient.getProgram(e)}catch(r){throw d(`Error finding ${e}. Network response: '${r}'. Please ensure you're connected to a valid Aleo network the program is deployed to the network.`)}else g instanceof i.$r&&(g=g.toString());let b,p=u;if(void 0===u&&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{s=n?await this.getCreditsRecord(t,[],s,a):void 0}catch(e){throw d(`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{b=n?await this.keyProvider.feePrivateKeys():await this.keyProvider.feePublicKeys()}catch(e){throw d(`Error finding fee keys. Key finder response: '${e}'. Please ensure your key provider is configured correctly.`)}const[y,h]=b;if(!c||!l)try{[c,l]=await this.keyProvider.functionKeys(_)}catch(e){console.log(`Function keys not found. Key finder response: '${e}'. The function keys will be synthesized`)}if(i.$r.fromString(g).getImports().length>0&&!w)try{w=await this.networkClient.getProgramImports(e)}catch(e){throw d(`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(p,g,r,o,t,s,this.host,w,c,l,y,h,f)}async execute(e,r,t,n,i,o,a,_,s,c,l,d,u){const f=await this.buildExecutionTransaction(e,r,t,n,i,o,a,_,s,c,l,d,u);return await this.networkClient.submitTransaction(f)}async run(e,r,t,n,o,a,_,s,c,l){let d=c;if(void 0===c&&void 0!==this.account&&(d=this.account.privateKey()),void 0===d)throw"No private key provided and no private key set in the ProgramManager";if(!_||!s)try{[_,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: ",_),console.log("Verifying key: ",s),i.L.executeFunctionOffline(d,e,r,t,n,!1,o,_,s,this.host,l)}async join(e,r,t,n,o,a,_,s){let c,l,u=_;if(void 0===_&&void 0!==this.account&&(u=this.account.privateKey()),void 0===u)throw"No private key provided and no private key set in the ProgramManager";try{c=n?await this.keyProvider.feePrivateKeys():await this.keyProvider.feePublicKeys(),l=await this.keyProvider.joinKeys()}catch(e){throw d(`Error finding fee keys. Key finder response: '${e}'. Please ensure your key provider is configured correctly.`)}const[f,g]=c,[w,b]=l;try{a=n?await this.getCreditsRecord(t,[],a,o):void 0}catch(e){throw d(`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),r=r instanceof i.PD?r:i.PD.fromString(r)}catch(e){throw d("Records provided are not valid. Please ensure they are valid plaintext records.")}const p=await i.L.buildJoinTransaction(u,e,r,t,a,this.host,w,b,f,g,s);return await this.networkClient.submitTransaction(p)}async split(e,r,t,n){let o,a=t;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{o=await this.keyProvider.splitKeys()}catch(e){throw d(`Error finding fee keys. Key finder response: '${e}'. Please ensure your key provider is configured correctly.`)}const[_,s]=o;try{r=r instanceof i.PD?r:i.PD.fromString(r)}catch(e){throw d("Record provided is not valid. Please ensure it is a valid plaintext record.")}const c=await i.L.buildSplitTransaction(a,e,r,this.host,_,s,n);return await this.networkClient.submitTransaction(c)}async synthesizeKeys(e,r,t,n){let o,a=n;void 0===a&&(a=void 0!==this.account?this.account.privateKey():new i._q);try{o=await this.networkClient.getProgramImports(e);const n=await i.L.synthesizeKeyPair(a,e,r,t,o);return[n.provingKey(),n.verifyingKey()]}catch(e){throw d(`Could not synthesize keys - error ${e}. Please ensure the program is valid and the inputs are correct.`)}}async buildTransferTransaction(e,r,t,n,o,a,_,s,u,f){t=l(t);let g,w,b=u;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{g=o?await this.keyProvider.feePrivateKeys():await this.keyProvider.feePublicKeys(),w=await this.keyProvider.transferKeys(t)}catch(e){throw d(`Error finding fee keys. Key finder response: '${e}'. Please ensure your key provider is configured correctly.`)}const[p,y]=g,[h,v]=w;try{const e=[];c(t)?(_=await this.getCreditsRecord(n,[],_,a),e.push(_.nonce())):_=void 0,s=o?await this.getCreditsRecord(n,e,s,a):void 0}catch(e){throw d(`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,r,t,_,n,s,this.host,h,v,p,y,f)}async buildTransferPublicTransaction(e,r,t,n,i){return this.buildTransferTransaction(e,r,"public",t,!1,void 0,void 0,void 0,n,i)}async transfer(e,r,t,n,i,o,a,_,s,c){const l=await this.buildTransferTransaction(e,r,t,n,i,o,a,_,s,c);return await this.networkClient.submitTransaction(l)}async buildBondPublicTransaction(e,r,t={}){r=Math.trunc(1e6*r);const{offlineParams:n={},executionParams:i={}}=t||{};let{programName:o="credits.aleo",functionName:a="bond_public",fee:_=i?.fee||.86,privateFee:s=!1,recordSearchParams:c,keySearchParams:l,feeRecord:d,provingKey:u,verifyingKey:f,privateKey:g}=i;void 0===l&&(l=new w({proverUri:T.bond_public.prover,verifierUri:T.bond_public.verifier,cacheKey:"credits.aleo/bond_public"}));const{offlineQuery:b}=n;return await this.buildExecutionTransaction(o,a,_,s,[e,`${r.toString()}u64`],c,l,d,u,f,g,b,this.creditsProgram())}async bondPublic(e,r,t={}){const n=await this.buildBondPublicTransaction(e,r,t);return await this.networkClient.submitTransaction(n)}async buildUnbondPublicTransaction(e,r={}){e=Math.trunc(1e6*e);const{offlineParams:t={},executionParams:n={}}=r||{};let{programName:i="credits.aleo",functionName:o="unbond_public",fee:a=n?.fee||1.3,privateFee:_=!1,recordSearchParams:s,keySearchParams:c,feeRecord:l,provingKey:d,verifyingKey:u,privateKey:f}=n;void 0===c&&(c=new w({proverUri:T.unbond_public.prover,verifierUri:T.unbond_public.verifier,cacheKey:"credits.aleo/unbond_public"}));const{offlineQuery:g}=t;return this.buildExecutionTransaction(i,o,a,_,[`${e.toString()}u64`],s,c,l,d,u,f,g,this.creditsProgram())}async unbondPublic(e,r={}){const t=await this.buildUnbondPublicTransaction(e,r);return await this.networkClient.submitTransaction(t)}async buildClaimUnbondPublicTransaction(e={}){const{offlineParams:r={},executionParams:t={}}=e||{};let{programName:n="credits.aleo",functionName:i="claim_unbond_public",fee:o=t?.fee||2,privateFee:a=!1,recordSearchParams:_,keySearchParams:s,feeRecord:c,provingKey:l,verifyingKey:d,privateKey:u}=t;void 0===s&&(s=new w({proverUri:T.claim_unbond_public.prover,verifierUri:T.claim_unbond_public.verifier,cacheKey:"credits.aleo/claim_unbond_public"}));const{offlineQuery:f}=r;return await this.buildExecutionTransaction(n,i,o,a,[],_,s,c,l,d,u,f,this.creditsProgram())}async claimUnbondPublic(e={}){const r=await this.buildClaimUnbondPublicTransaction(e);return await this.networkClient.submitTransaction(r)}async setValidatorState(e,r={}){const{offlineParams:t={},executionParams:n={}}=r||{};let{programName:i="credits.aleo",functionName:o="set_validator_state",fee:a=1,privateFee:_=!1,recordSearchParams:s,keySearchParams:c,feeRecord:l,provingKey:d,verifyingKey:u,privateKey:f}=n;void 0===c&&(c=new w({proverUri:T.set_validator_state.prover,verifierUri:T.set_validator_state.verifier,cacheKey:"credits.aleo/set_validator_state"}));const{offlineQuery:g}=t;return await this.execute(i,o,a,_,[e.toString()],s,c,l,d,u,f,g)}async unbondDelegatorAsValidator(e,r={}){const{offlineParams:t={},executionParams:n={}}=r||{};let{programName:i="credits.aleo",functionName:o="unbond_delegator_as_validator",fee:a=1,privateFee:_=!1,recordSearchParams:s,keySearchParams:c,feeRecord:l,provingKey:d,verifyingKey:u,privateKey:f}=n;void 0===c&&(c=new w({proverUri:T.unbond_delegator_as_validator.prover,verifierUri:T.unbond_delegator_as_validator.verifier,cacheKey:"credits.aleo/unbond_delegator_as_validator"}));const{offlineQuery:g}=t;return await this.execute(i,o,a,_,[e],s,c,l,d,u,f,g)}verifyExecution(e){try{const r=e.getExecution(),t=e.getFunctionId(),n=e.getProgram(),o=e.getVerifyingKey();return(0,i.hz)(r,o,n,t)}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,r,t,n){try{return t instanceof i.PD?t:i.PD.fromString(t)}catch(t){try{const t=this.recordProvider;return await t.findCreditsRecord(e,!0,r,n)}catch(e){throw d(`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 l(e){return V.has(e)?e:d(`Invalid transfer type '${e}'. Valid transfer types are 'private', 'privateToPublic', 'public', and 'publicToPrivate'.`)}const K="https://testnet3.parameters.aleo.org/",T={bond_public:{locator:"credits.aleo/bond_public",prover:K+"bond_public.prover.9c3547d",verifier:"bond_public.verifier.10315ae",verifyingKey:i.XV.bondPublicVerifier},claim_unbond_public:{locator:"credits.aleo/claim_unbond_public",prover:K+"claim_unbond_public.prover.f8b64aa",verifier:"claim_unbond_public.verifier.8fd7445",verifyingKey:i.XV.claimUnbondPublicVerifier},fee_private:{locator:"credits.aleo/fee_private",prover:K+"fee_private.prover.43fab98",verifier:"fee_private.verifier.f3dfefc",verifyingKey:i.XV.feePrivateVerifier},fee_public:{locator:"credits.aleo/fee_public",prover:K+"fee_public.prover.634f153",verifier:"fee_public.verifier.09eeb4f",verifyingKey:i.XV.feePublicVerifier},inclusion:{locator:"inclusion",prover:K+"inclusion.prover.cd85cc5",verifier:"inclusion.verifier.e6f3add",verifyingKey:i.XV.inclusionVerifier},join:{locator:"credits.aleo/join",prover:K+"join.prover.1a76fe8",verifier:"join.verifier.4f1701b",verifyingKey:i.XV.joinVerifier},set_validator_state:{locator:"credits.aleo/set_validator_state",prover:K+"set_validator_state.prover.5ce19be",verifier:"set_validator_state.verifier.730d95b",verifyingKey:i.XV.setValidatorStateVerifier},split:{locator:"credits.aleo/split",prover:K+"split.prover.e6d12b9",verifier:"split.verifier.2f9733d",verifyingKey:i.XV.splitVerifier},transfer_private:{locator:"credits.aleo/transfer_private",prover:K+"transfer_private.prover.2b487c0",verifier:"transfer_private.verifier.3a3cbba",verifyingKey:i.XV.transferPrivateVerifier},transfer_private_to_public:{locator:"credits.aleo/transfer_private_to_public",prover:K+"transfer_private_to_public.prover.1ff64cb",verifier:"transfer_private_to_public.verifier.d5b60de",verifyingKey:i.XV.transferPrivateToPublicVerifier},transfer_public:{locator:"credits.aleo/transfer_public",prover:K+"transfer_public.prover.a74565e",verifier:"transfer_public.verifier.a4c2906",verifyingKey:i.XV.transferPublicVerifier},transfer_public_to_private:{locator:"credits.aleo/transfer_public_to_private",prover:K+"transfer_public_to_private.prover.1bcddf9",verifier:"transfer_public_to_private.verifier.b094554",verifyingKey:i.XV.transferPublicToPrivateVerifier},unbond_delegator_as_validator:{locator:"credits.aleo/unbond_delegator_as_validator",prover:K+"unbond_delegator_as_validator.prover.115a86b",verifier:"unbond_delegator_as_validator.verifier.9585609",verifyingKey:i.XV.unbondDelegatorAsValidatorVerifier},unbond_public:{locator:"credits.aleo/unbond_public",prover:K+"unbond_public.prover.9547c05",verifier:"unbond_public.verifier.09873cd",verifyingKey:i.XV.unbondPublicVerifier}},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","public","transferPublic","transfer_public_to_private","publicToPrivate","transferPublicToPrivate"]),S=new Set(["private","transfer_private","transferPrivate"]),x=new Set(["private_to_public","privateToPublic","transfer_private_to_public","transferPrivateToPublic"]),A=new Set(["public","transfer_public","transferPublic"]),R=new Set(["public_to_private","publicToPrivate","transfer_public_to_private","transferPublicToPrivate"]);function d(e){throw console.error(e),e}async function u(){console.warn("initializeWasm is deprecated, you no longer need to use it")}n()}catch(C){n(C)}}))},2063:(e,r,t)=>{t.a(e,(async(e,n)=>{try{function i(e,r,t,n){return new Promise((i=>{const o=new Worker(e,{type:"module"});o.addEventListener("message",(e=>{o.unref&&o.unref(),i(o)}),{capture:!0,once:!0}),o.postMessage({module:r,memory:t,address:n})}))}let B;t.d(r,{$r:()=>pe,CK:()=>U,Gd:()=>fe,IO:()=>Ke,L:()=>me,PD:()=>ve,Pc:()=>Pe,XV:()=>Te,YW:()=>ke,_U:()=>de,_q:()=>we,fW:()=>he,gN:()=>ue,hz:()=>Ee,kL:()=>ce,o:()=>le,uq:()=>be,zW:()=>ye});const F=new Array(128).fill(void 0);function o(e){return F[e]}F.push(void 0,null,!0,!1);let O=F.length;function a(e){e<132||(F[e]=O,O=e)}function _(e){const r=o(e);return a(e),r}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 j=null;function s(){return null!==j&&j.buffer===B.memory.buffer||(j=new Uint8Array(B.memory.buffer)),j}function c(e,r){return e>>>=0,I.decode(s().slice(e,e+r))}function l(e){O===F.length&&F.push(F.length+1);const r=O;return O=F[r],F[r]=e,r}let D=0;const N="undefined"!=typeof TextEncoder?new TextEncoder("utf-8"):{encode:()=>{throw Error("TextEncoder not available")}},$=function(e,r){const t=N.encode(e);return r.set(t),{read:e.length,written:t.length}};function d(e,r,t){if(void 0===t){const t=N.encode(e),n=r(t.length,1)>>>0;return s().subarray(n,n+t.length).set(t),D=t.length,n}let n=e.length,i=r(n,1)>>>0;const o=s();let a=0;for(;a127)break;o[i+a]=r}if(a!==n){0!==a&&(e=e.slice(a)),i=t(i,n,n=a+3*e.length,1)>>>0;const r=s().subarray(i+a,i+n);a+=$(e,r).written}return D=a,i}function u(e){return null==e}let M=null;function f(){return null!==M&&M.buffer===B.memory.buffer||(M=new Int32Array(B.memory.buffer)),M}function g(e){const r=typeof e;if("number"==r||"boolean"==r||null==e)return`${e}`;if("string"==r)return`"${e}"`;if("symbol"==r){const r=e.description;return null==r?"Symbol":`Symbol(${r})`}if("function"==r){const r=e.name;return"string"==typeof r&&r.length>0?`Function(${r})`:"Function"}if(Array.isArray(e)){const r=e.length;let t="[";r>0&&(t+=g(e[0]));for(let n=1;n1))return toString.call(e);if(n=t[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}function w(e,r,t,n){const i={a:e,b:r,cnt:1,dtor:t},o=(...e)=>{i.cnt++;const r=i.a;i.a=0;try{return n(r,i.b,...e)}finally{0==--i.cnt?B.__wbindgen_export_3.get(i.dtor)(r,i.b):i.a=r}};return o.original=i,o}function b(e,r,t){B.wasm_bindgen__convert__closures__invoke1_mut__h53d50e21bb2d5c71(e,r,l(t))}function p(e,r){if(!(e instanceof r))throw new Error(`expected instance of ${r.name}`);return e.ptr}function y(e,r){const t=r(1*e.length,1)>>>0;return s().set(e,t/1),D=e.length,t}function h(e,r,t,n){try{const a=B.__wbindgen_add_to_stack_pointer(-16);p(e,X),p(r,oe),p(t,G);const s=d(n,B.__wbindgen_malloc,B.__wbindgen_realloc),c=D;B.verifyFunctionExecution(a,e.__wbg_ptr,r.__wbg_ptr,t.__wbg_ptr,s,c);var i=f()[a/4+0],o=f()[a/4+1];if(f()[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,r){return e>>>=0,s().subarray(e/1,e/1+r)}function P(e){B.runRayonThread(e)}function k(e,r){return _(B.initThreadPool(l(e),r))}function K(e,r){try{return e.apply(this,r)}catch(e){B.__wbindgen_exn_store(l(e))}}function T(e,r,t,n){B.wasm_bindgen__convert__closures__invoke2_mut__he97f6a3b9df30e2b(e,r,l(t),l(n))}let W=class e{static __wrap(r){r>>>=0;const t=Object.create(e.prototype);return t.__wbg_ptr=r,t}__destroy_into_raw(){const e=this.__wbg_ptr;return this.__wbg_ptr=0,e}free(){const e=this.__destroy_into_raw();B.__wbg_address_free(e)}static from_private_key(r){p(r,Y);const t=B.address_from_private_key(r.__wbg_ptr);return e.__wrap(t)}static from_view_key(r){p(r,ae);const t=B.address_from_view_key(r.__wbg_ptr);return e.__wrap(t)}static from_string(r){const t=d(r,B.__wbindgen_malloc,B.__wbindgen_realloc),n=D,i=B.address_from_string(t,n);return e.__wrap(i)}to_string(){let e,r;try{const i=B.__wbindgen_add_to_stack_pointer(-16);B.address_to_string(i,this.__wbg_ptr);var t=f()[i/4+0],n=f()[i/4+1];return e=t,r=n,c(t,n)}finally{B.__wbindgen_add_to_stack_pointer(16),B.__wbindgen_free(e,r,1)}}verify(e,r){const t=y(e,B.__wbindgen_malloc),n=D;p(r,ne);return 0!==B.address_verify(this.__wbg_ptr,t,n,r.__wbg_ptr)}},X=class e{static __wrap(r){r>>>=0;const t=Object.create(e.prototype);return t.__wbg_ptr=r,t}__destroy_into_raw(){const e=this.__wbg_ptr;return this.__wbg_ptr=0,e}free(){const e=this.__destroy_into_raw();B.__wbg_execution_free(e)}toString(){let e,r;try{const i=B.__wbindgen_add_to_stack_pointer(-16);B.execution_toString(i,this.__wbg_ptr);var t=f()[i/4+0],n=f()[i/4+1];return e=t,r=n,c(t,n)}finally{B.__wbindgen_add_to_stack_pointer(16),B.__wbindgen_free(e,r,1)}}static fromString(r){try{const i=B.__wbindgen_add_to_stack_pointer(-16),o=d(r,B.__wbindgen_malloc,B.__wbindgen_realloc),a=D;B.execution_fromString(i,o,a);var t=f()[i/4+0],n=f()[i/4+1];if(f()[i/4+2])throw _(n);return e.__wrap(t)}finally{B.__wbindgen_add_to_stack_pointer(16)}}},z=class e{static __wrap(r){r>>>=0;const t=Object.create(e.prototype);return t.__wbg_ptr=r,t}__destroy_into_raw(){const e=this.__wbg_ptr;return this.__wbg_ptr=0,e}free(){const e=this.__destroy_into_raw();B.__wbg_executionresponse_free(e)}getOutputs(){return _(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 t=B.__wbindgen_add_to_stack_pointer(-16);B.executionresponse_getKeys(t,this.__wbg_ptr);var e=f()[t/4+0],r=f()[t/4+1];if(f()[t/4+2])throw _(r);return H.__wrap(e)}finally{B.__wbindgen_add_to_stack_pointer(16)}}getProvingKey(){const e=B.executionresponse_getProvingKey(this.__wbg_ptr);return 0===e?void 0:ee.__wrap(e)}getVerifyingKey(){const e=B.executionresponse_getVerifyingKey(this.__wbg_ptr);return oe.__wrap(e)}getFunctionId(){let e,r;try{const i=B.__wbindgen_add_to_stack_pointer(-16);B.executionresponse_getFunctionId(i,this.__wbg_ptr);var t=f()[i/4+0],n=f()[i/4+1];return e=t,r=n,c(t,n)}finally{B.__wbindgen_add_to_stack_pointer(16),B.__wbindgen_free(e,r,1)}}getProgram(){const e=B.executionresponse_getProgram(this.__wbg_ptr);return G.__wrap(e)}},q=class e{static __wrap(r){r>>>=0;const t=Object.create(e.prototype);return t.__wbg_ptr=r,t}__destroy_into_raw(){const e=this.__wbg_ptr;return this.__wbg_ptr=0,e}free(){const e=this.__destroy_into_raw();B.__wbg_field_free(e)}toString(){let e,r;try{const i=B.__wbindgen_add_to_stack_pointer(-16);B.field_toString(i,this.__wbg_ptr);var t=f()[i/4+0],n=f()[i/4+1];return e=t,r=n,c(t,n)}finally{B.__wbindgen_add_to_stack_pointer(16),B.__wbindgen_free(e,r,1)}}static fromString(r){try{const i=B.__wbindgen_add_to_stack_pointer(-16),o=d(r,B.__wbindgen_malloc,B.__wbindgen_realloc),a=D;B.field_fromString(i,o,a);var t=f()[i/4+0],n=f()[i/4+1];if(f()[i/4+2])throw _(n);return e.__wrap(t)}finally{B.__wbindgen_add_to_stack_pointer(16)}}};class H{static __wrap(e){e>>>=0;const r=Object.create(H.prototype);return r.__wbg_ptr=e,r}__destroy_into_raw(){const e=this.__wbg_ptr;return this.__wbg_ptr=0,e}free(){const e=this.__destroy_into_raw();B.__wbg_keypair_free(e)}constructor(e,r){p(e,ee);var t=e.__destroy_into_raw();p(r,oe);var n=r.__destroy_into_raw();const i=B.keypair_new(t,n);return H.__wrap(i)}provingKey(){try{const t=B.__wbindgen_add_to_stack_pointer(-16);B.keypair_provingKey(t,this.__wbg_ptr);var e=f()[t/4+0],r=f()[t/4+1];if(f()[t/4+2])throw _(r);return ee.__wrap(e)}finally{B.__wbindgen_add_to_stack_pointer(16)}}verifyingKey(){try{const t=B.__wbindgen_add_to_stack_pointer(-16);B.keypair_verifyingKey(t,this.__wbg_ptr);var e=f()[t/4+0],r=f()[t/4+1];if(f()[t/4+2])throw _(r);return oe.__wrap(e)}finally{B.__wbindgen_add_to_stack_pointer(16)}}}let J=class e{static __wrap(r){r>>>=0;const t=Object.create(e.prototype);return t.__wbg_ptr=r,t}__destroy_into_raw(){const e=this.__wbg_ptr;return this.__wbg_ptr=0,e}free(){const e=this.__destroy_into_raw();B.__wbg_offlinequery_free(e)}constructor(r){try{const i=B.__wbindgen_add_to_stack_pointer(-16),o=d(r,B.__wbindgen_malloc,B.__wbindgen_realloc),a=D;B.offlinequery_new(i,o,a);var t=f()[i/4+0],n=f()[i/4+1];if(f()[i/4+2])throw _(n);return e.__wrap(t)}finally{B.__wbindgen_add_to_stack_pointer(16)}}addStatePath(e,r){try{const n=B.__wbindgen_add_to_stack_pointer(-16),i=d(e,B.__wbindgen_malloc,B.__wbindgen_realloc),o=D,a=d(r,B.__wbindgen_malloc,B.__wbindgen_realloc),s=D;B.offlinequery_addStatePath(n,this.__wbg_ptr,i,o,a,s);var t=f()[n/4+0];if(f()[n/4+1])throw _(t)}finally{B.__wbindgen_add_to_stack_pointer(16)}}toString(){let e,r;try{const i=B.__wbindgen_add_to_stack_pointer(-16);B.offlinequery_toString(i,this.__wbg_ptr);var t=f()[i/4+0],n=f()[i/4+1];return e=t,r=n,c(t,n)}finally{B.__wbindgen_add_to_stack_pointer(16),B.__wbindgen_free(e,r,1)}}static fromString(r){try{const i=B.__wbindgen_add_to_stack_pointer(-16),o=d(r,B.__wbindgen_malloc,B.__wbindgen_realloc),a=D;B.offlinequery_fromString(i,o,a);var t=f()[i/4+0],n=f()[i/4+1];if(f()[i/4+2])throw _(n);return e.__wrap(t)}finally{B.__wbindgen_add_to_stack_pointer(16)}}},Y=class e{static __wrap(r){r>>>=0;const t=Object.create(e.prototype);return t.__wbg_ptr=r,t}__destroy_into_raw(){const e=this.__wbg_ptr;return this.__wbg_ptr=0,e}free(){const e=this.__destroy_into_raw();B.__wbg_privatekey_free(e)}constructor(){const r=B.privatekey_new();return e.__wrap(r)}static from_seed_unchecked(r){const t=y(r,B.__wbindgen_malloc),n=D,i=B.privatekey_from_seed_unchecked(t,n);return e.__wrap(i)}static from_string(r){try{const i=B.__wbindgen_add_to_stack_pointer(-16),o=d(r,B.__wbindgen_malloc,B.__wbindgen_realloc),a=D;B.privatekey_from_string(i,o,a);var t=f()[i/4+0],n=f()[i/4+1];if(f()[i/4+2])throw _(n);return e.__wrap(t)}finally{B.__wbindgen_add_to_stack_pointer(16)}}to_string(){let e,r;try{const i=B.__wbindgen_add_to_stack_pointer(-16);B.privatekey_to_string(i,this.__wbg_ptr);var t=f()[i/4+0],n=f()[i/4+1];return e=t,r=n,c(t,n)}finally{B.__wbindgen_add_to_stack_pointer(16),B.__wbindgen_free(e,r,1)}}to_view_key(){const e=B.privatekey_to_view_key(this.__wbg_ptr);return ae.__wrap(e)}to_address(){const e=B.address_from_private_key(this.__wbg_ptr);return W.__wrap(e)}sign(e){const r=y(e,B.__wbindgen_malloc),t=D,n=B.privatekey_sign(this.__wbg_ptr,r,t);return ne.__wrap(n)}static newEncrypted(e){try{const n=B.__wbindgen_add_to_stack_pointer(-16),i=d(e,B.__wbindgen_malloc,B.__wbindgen_realloc),o=D;B.privatekey_newEncrypted(n,i,o);var r=f()[n/4+0],t=f()[n/4+1];if(f()[n/4+2])throw _(t);return Q.__wrap(r)}finally{B.__wbindgen_add_to_stack_pointer(16)}}toCiphertext(e){try{const n=B.__wbindgen_add_to_stack_pointer(-16),i=d(e,B.__wbindgen_malloc,B.__wbindgen_realloc),o=D;B.privatekey_toCiphertext(n,this.__wbg_ptr,i,o);var r=f()[n/4+0],t=f()[n/4+1];if(f()[n/4+2])throw _(t);return Q.__wrap(r)}finally{B.__wbindgen_add_to_stack_pointer(16)}}static fromPrivateKeyCiphertext(r,t){try{const o=B.__wbindgen_add_to_stack_pointer(-16);p(r,Q);const a=d(t,B.__wbindgen_malloc,B.__wbindgen_realloc),s=D;B.privatekey_fromPrivateKeyCiphertext(o,r.__wbg_ptr,a,s);var n=f()[o/4+0],i=f()[o/4+1];if(f()[o/4+2])throw _(i);return e.__wrap(n)}finally{B.__wbindgen_add_to_stack_pointer(16)}}},Q=class e{static __wrap(r){r>>>=0;const t=Object.create(e.prototype);return t.__wbg_ptr=r,t}__destroy_into_raw(){const e=this.__wbg_ptr;return this.__wbg_ptr=0,e}free(){const e=this.__destroy_into_raw();B.__wbg_privatekeyciphertext_free(e)}static encryptPrivateKey(r,t){try{const o=B.__wbindgen_add_to_stack_pointer(-16);p(r,Y);const a=d(t,B.__wbindgen_malloc,B.__wbindgen_realloc),s=D;B.privatekey_toCiphertext(o,r.__wbg_ptr,a,s);var n=f()[o/4+0],i=f()[o/4+1];if(f()[o/4+2])throw _(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=d(e,B.__wbindgen_malloc,B.__wbindgen_realloc),o=D;B.privatekeyciphertext_decryptToPrivateKey(n,this.__wbg_ptr,i,o);var r=f()[n/4+0],t=f()[n/4+1];if(f()[n/4+2])throw _(t);return Y.__wrap(r)}finally{B.__wbindgen_add_to_stack_pointer(16)}}toString(){let e,r;try{const i=B.__wbindgen_add_to_stack_pointer(-16);B.privatekeyciphertext_toString(i,this.__wbg_ptr);var t=f()[i/4+0],n=f()[i/4+1];return e=t,r=n,c(t,n)}finally{B.__wbindgen_add_to_stack_pointer(16),B.__wbindgen_free(e,r,1)}}static fromString(r){try{const i=B.__wbindgen_add_to_stack_pointer(-16),o=d(r,B.__wbindgen_malloc,B.__wbindgen_realloc),a=D;B.privatekeyciphertext_fromString(i,o,a);var t=f()[i/4+0],n=f()[i/4+1];if(f()[i/4+2])throw _(n);return e.__wrap(t)}finally{B.__wbindgen_add_to_stack_pointer(16)}}},G=class e{static __wrap(r){r>>>=0;const t=Object.create(e.prototype);return t.__wbg_ptr=r,t}__destroy_into_raw(){const e=this.__wbg_ptr;return this.__wbg_ptr=0,e}free(){const e=this.__destroy_into_raw();B.__wbg_program_free(e)}static fromString(r){try{const i=B.__wbindgen_add_to_stack_pointer(-16),o=d(r,B.__wbindgen_malloc,B.__wbindgen_realloc),a=D;B.program_fromString(i,o,a);var t=f()[i/4+0],n=f()[i/4+1];if(f()[i/4+2])throw _(n);return e.__wrap(t)}finally{B.__wbindgen_add_to_stack_pointer(16)}}toString(){let e,r;try{const i=B.__wbindgen_add_to_stack_pointer(-16);B.program_toString(i,this.__wbg_ptr);var t=f()[i/4+0],n=f()[i/4+1];return e=t,r=n,c(t,n)}finally{B.__wbindgen_add_to_stack_pointer(16),B.__wbindgen_free(e,r,1)}}hasFunction(e){const r=d(e,B.__wbindgen_malloc,B.__wbindgen_realloc),t=D;return 0!==B.program_hasFunction(this.__wbg_ptr,r,t)}getFunctions(){return _(B.program_getFunctions(this.__wbg_ptr))}getFunctionInputs(e){try{const n=B.__wbindgen_add_to_stack_pointer(-16),i=d(e,B.__wbindgen_malloc,B.__wbindgen_realloc),o=D;B.program_getFunctionInputs(n,this.__wbg_ptr,i,o);var r=f()[n/4+0],t=f()[n/4+1];if(f()[n/4+2])throw _(t);return _(r)}finally{B.__wbindgen_add_to_stack_pointer(16)}}getMappings(){try{const t=B.__wbindgen_add_to_stack_pointer(-16);B.program_getMappings(t,this.__wbg_ptr);var e=f()[t/4+0],r=f()[t/4+1];if(f()[t/4+2])throw _(r);return _(e)}finally{B.__wbindgen_add_to_stack_pointer(16)}}getRecordMembers(e){try{const n=B.__wbindgen_add_to_stack_pointer(-16),i=d(e,B.__wbindgen_malloc,B.__wbindgen_realloc),o=D;B.program_getRecordMembers(n,this.__wbg_ptr,i,o);var r=f()[n/4+0],t=f()[n/4+1];if(f()[n/4+2])throw _(t);return _(r)}finally{B.__wbindgen_add_to_stack_pointer(16)}}getStructMembers(e){try{const n=B.__wbindgen_add_to_stack_pointer(-16),i=d(e,B.__wbindgen_malloc,B.__wbindgen_realloc),o=D;B.program_getStructMembers(n,this.__wbg_ptr,i,o);var r=f()[n/4+0],t=f()[n/4+1];if(f()[n/4+2])throw _(t);return _(r)}finally{B.__wbindgen_add_to_stack_pointer(16)}}static getCreditsProgram(){const r=B.program_getCreditsProgram();return e.__wrap(r)}id(){let e,r;try{const i=B.__wbindgen_add_to_stack_pointer(-16);B.program_id(i,this.__wbg_ptr);var t=f()[i/4+0],n=f()[i/4+1];return e=t,r=n,c(t,n)}finally{B.__wbindgen_add_to_stack_pointer(16),B.__wbindgen_free(e,r,1)}}isEqual(r){p(r,e);return 0!==B.program_isEqual(this.__wbg_ptr,r.__wbg_ptr)}getImports(){return _(B.program_getImports(this.__wbg_ptr))}},Z=class{__destroy_into_raw(){const e=this.__wbg_ptr;return this.__wbg_ptr=0,e}free(){const e=this.__destroy_into_raw();B.__wbg_programmanager_free(e)}static buildDeploymentTransaction(e,r,t,n,i,o,a,s,c){p(e,Y);const f=d(r,B.__wbindgen_malloc,B.__wbindgen_realloc),g=D;let w=0;u(n)||(p(n,te),w=n.__destroy_into_raw());var b=u(i)?0:d(i,B.__wbindgen_malloc,B.__wbindgen_realloc),y=D;let h=0;u(a)||(p(a,ee),h=a.__destroy_into_raw());let v=0;u(s)||(p(s,oe),v=s.__destroy_into_raw());let m=0;u(c)||(p(c,J),m=c.__destroy_into_raw());return _(B.programmanager_buildDeploymentTransaction(e.__wbg_ptr,f,g,t,w,b,y,u(o)?0:l(o),h,v,m))}static estimateDeploymentFee(e,r){const t=d(e,B.__wbindgen_malloc,B.__wbindgen_realloc),n=D;return _(B.programmanager_estimateDeploymentFee(t,n,u(r)?0:l(r)))}static estimateProgramNameCost(e){try{const n=B.__wbindgen_add_to_stack_pointer(-16),i=d(e,B.__wbindgen_malloc,B.__wbindgen_realloc),o=D;B.programmanager_estimateProgramNameCost(n,i,o);var r=v()[n/8+0],t=f()[n/4+2];if(f()[n/4+3])throw _(t);return BigInt.asUintN(64,r)}finally{B.__wbindgen_add_to_stack_pointer(16)}}static executeFunctionOffline(e,r,t,n,i,o,a,s,c,f,g){p(e,Y);const w=d(r,B.__wbindgen_malloc,B.__wbindgen_realloc),b=D,y=d(t,B.__wbindgen_malloc,B.__wbindgen_realloc),h=D;let v=0;u(s)||(p(s,ee),v=s.__destroy_into_raw());let m=0;u(c)||(p(c,oe),m=c.__destroy_into_raw());var P=u(f)?0:d(f,B.__wbindgen_malloc,B.__wbindgen_realloc),k=D;let K=0;u(g)||(p(g,J),K=g.__destroy_into_raw());return _(B.programmanager_executeFunctionOffline(e.__wbg_ptr,w,b,y,h,l(n),i,o,u(a)?0:l(a),v,m,P,k,K))}static buildExecutionTransaction(e,r,t,n,i,o,a,s,c,f,g,w,b){p(e,Y);const y=d(r,B.__wbindgen_malloc,B.__wbindgen_realloc),h=D,v=d(t,B.__wbindgen_malloc,B.__wbindgen_realloc),m=D;let P=0;u(o)||(p(o,te),P=o.__destroy_into_raw());var k=u(a)?0:d(a,B.__wbindgen_malloc,B.__wbindgen_realloc),K=D;let T=0;u(c)||(p(c,ee),T=c.__destroy_into_raw());let E=0;u(f)||(p(f,oe),E=f.__destroy_into_raw());let V=0;u(g)||(p(g,ee),V=g.__destroy_into_raw());let S=0;u(w)||(p(w,oe),S=w.__destroy_into_raw());let x=0;u(b)||(p(b,J),x=b.__destroy_into_raw());return _(B.programmanager_buildExecutionTransaction(e.__wbg_ptr,y,h,v,m,l(n),i,P,k,K,u(s)?0:l(s),T,E,V,S,x))}static estimateExecutionFee(e,r,t,n,i,o,a,s,c){p(e,Y);const f=d(r,B.__wbindgen_malloc,B.__wbindgen_realloc),g=D,w=d(t,B.__wbindgen_malloc,B.__wbindgen_realloc),b=D;var y=u(i)?0:d(i,B.__wbindgen_malloc,B.__wbindgen_realloc),h=D;let v=0;u(a)||(p(a,ee),v=a.__destroy_into_raw());let m=0;u(s)||(p(s,oe),m=s.__destroy_into_raw());let P=0;u(c)||(p(c,J),P=c.__destroy_into_raw());return _(B.programmanager_estimateExecutionFee(e.__wbg_ptr,f,g,w,b,l(n),y,h,u(o)?0:l(o),v,m,P))}static estimateFinalizeFee(e,r){try{const i=B.__wbindgen_add_to_stack_pointer(-16),o=d(e,B.__wbindgen_malloc,B.__wbindgen_realloc),a=D,s=d(r,B.__wbindgen_malloc,B.__wbindgen_realloc),c=D;B.programmanager_estimateFinalizeFee(i,o,a,s,c);var t=v()[i/8+0],n=f()[i/4+2];if(f()[i/4+3])throw _(n);return BigInt.asUintN(64,t)}finally{B.__wbindgen_add_to_stack_pointer(16)}}static buildJoinTransaction(e,r,t,n,i,o,a,s,c,l,f){p(e,Y),p(r,te);var g=r.__destroy_into_raw();p(t,te);var w=t.__destroy_into_raw();let b=0;u(i)||(p(i,te),b=i.__destroy_into_raw());var y=u(o)?0:d(o,B.__wbindgen_malloc,B.__wbindgen_realloc),h=D;let v=0;u(a)||(p(a,ee),v=a.__destroy_into_raw());let m=0;u(s)||(p(s,oe),m=s.__destroy_into_raw());let P=0;u(c)||(p(c,ee),P=c.__destroy_into_raw());let k=0;u(l)||(p(l,oe),k=l.__destroy_into_raw());let K=0;u(f)||(p(f,J),K=f.__destroy_into_raw());return _(B.programmanager_buildJoinTransaction(e.__wbg_ptr,g,w,n,b,y,h,v,m,P,k,K))}static buildSplitTransaction(e,r,t,n,i,o,a){p(e,Y),p(t,te);var s=t.__destroy_into_raw(),c=u(n)?0:d(n,B.__wbindgen_malloc,B.__wbindgen_realloc),l=D;let f=0;u(i)||(p(i,ee),f=i.__destroy_into_raw());let g=0;u(o)||(p(o,oe),g=o.__destroy_into_raw());let w=0;u(a)||(p(a,J),w=a.__destroy_into_raw());return _(B.programmanager_buildSplitTransaction(e.__wbg_ptr,r,s,c,l,f,g,w))}static buildTransferTransaction(e,r,t,n,i,o,a,s,c,l,f,g,w){p(e,Y);const b=d(t,B.__wbindgen_malloc,B.__wbindgen_realloc),y=D,h=d(n,B.__wbindgen_malloc,B.__wbindgen_realloc),v=D;let m=0;u(i)||(p(i,te),m=i.__destroy_into_raw());let P=0;u(a)||(p(a,te),P=a.__destroy_into_raw());var k=u(s)?0:d(s,B.__wbindgen_malloc,B.__wbindgen_realloc),K=D;let T=0;u(c)||(p(c,ee),T=c.__destroy_into_raw());let E=0;u(l)||(p(l,oe),E=l.__destroy_into_raw());let V=0;u(f)||(p(f,ee),V=f.__destroy_into_raw());let S=0;u(g)||(p(g,oe),S=g.__destroy_into_raw());let x=0;u(w)||(p(w,J),x=w.__destroy_into_raw());return _(B.programmanager_buildTransferTransaction(e.__wbg_ptr,r,b,y,h,v,m,o,P,k,K,T,E,V,S,x))}static synthesizeKeyPair(e,r,t,n,i){p(e,Y);const o=d(r,B.__wbindgen_malloc,B.__wbindgen_realloc),a=D,s=d(t,B.__wbindgen_malloc,B.__wbindgen_realloc),c=D;return _(B.programmanager_synthesizeKeyPair(e.__wbg_ptr,o,a,s,c,l(n),u(i)?0:l(i)))}},ee=class e{static __wrap(r){r>>>=0;const t=Object.create(e.prototype);return t.__wbg_ptr=r,t}__destroy_into_raw(){const e=this.__wbg_ptr;return this.__wbg_ptr=0,e}free(){const e=this.__destroy_into_raw();B.__wbg_provingkey_free(e)}isBondPublicProver(){return 0!==B.provingkey_isBondPublicProver(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)}isTransferPublicToPrivateProver(){return 0!==B.provingkey_isTransferPublicToPrivateProver(this.__wbg_ptr)}isUnbondDelegatorAsValidatorProver(){return 0!==B.provingkey_isUnbondDelegatorAsValidatorProver(this.__wbg_ptr)}isUnbondPublicProver(){return 0!==B.provingkey_isUnbondPublicProver(this.__wbg_ptr)}checksum(){let e,r;try{const i=B.__wbindgen_add_to_stack_pointer(-16);B.provingkey_checksum(i,this.__wbg_ptr);var t=f()[i/4+0],n=f()[i/4+1];return e=t,r=n,c(t,n)}finally{B.__wbindgen_add_to_stack_pointer(16),B.__wbindgen_free(e,r,1)}}copy(){const r=B.provingkey_copy(this.__wbg_ptr);return e.__wrap(r)}static fromBytes(r){try{const i=B.__wbindgen_add_to_stack_pointer(-16),o=y(r,B.__wbindgen_malloc),a=D;B.provingkey_fromBytes(i,o,a);var t=f()[i/4+0],n=f()[i/4+1];if(f()[i/4+2])throw _(n);return e.__wrap(t)}finally{B.__wbindgen_add_to_stack_pointer(16)}}static fromString(r){try{const i=B.__wbindgen_add_to_stack_pointer(-16),o=d(r,B.__wbindgen_malloc,B.__wbindgen_realloc),a=D;B.provingkey_fromString(i,o,a);var t=f()[i/4+0],n=f()[i/4+1];if(f()[i/4+2])throw _(n);return e.__wrap(t)}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=f()[i/4+0],r=f()[i/4+1],t=f()[i/4+2];if(f()[i/4+3])throw _(t);var n=m(e,r).slice();return B.__wbindgen_free(e,1*r),n}finally{B.__wbindgen_add_to_stack_pointer(16)}}toString(){let e,r;try{const i=B.__wbindgen_add_to_stack_pointer(-16);B.provingkey_toString(i,this.__wbg_ptr);var t=f()[i/4+0],n=f()[i/4+1];return e=t,r=n,c(t,n)}finally{B.__wbindgen_add_to_stack_pointer(16),B.__wbindgen_free(e,r,1)}}},re=class e{static __wrap(r){r>>>=0;const t=Object.create(e.prototype);return t.__wbg_ptr=r,t}__destroy_into_raw(){const e=this.__wbg_ptr;return this.__wbg_ptr=0,e}free(){const e=this.__destroy_into_raw();B.__wbg_recordciphertext_free(e)}static fromString(r){try{const i=B.__wbindgen_add_to_stack_pointer(-16),o=d(r,B.__wbindgen_malloc,B.__wbindgen_realloc),a=D;B.recordciphertext_fromString(i,o,a);var t=f()[i/4+0],n=f()[i/4+1];if(f()[i/4+2])throw _(n);return e.__wrap(t)}finally{B.__wbindgen_add_to_stack_pointer(16)}}toString(){let e,r;try{const i=B.__wbindgen_add_to_stack_pointer(-16);B.recordciphertext_toString(i,this.__wbg_ptr);var t=f()[i/4+0],n=f()[i/4+1];return e=t,r=n,c(t,n)}finally{B.__wbindgen_add_to_stack_pointer(16),B.__wbindgen_free(e,r,1)}}decrypt(e){try{const n=B.__wbindgen_add_to_stack_pointer(-16);p(e,ae),B.recordciphertext_decrypt(n,this.__wbg_ptr,e.__wbg_ptr);var r=f()[n/4+0],t=f()[n/4+1];if(f()[n/4+2])throw _(t);return te.__wrap(r)}finally{B.__wbindgen_add_to_stack_pointer(16)}}isOwner(e){p(e,ae);return 0!==B.recordciphertext_isOwner(this.__wbg_ptr,e.__wbg_ptr)}},te=class e{static __wrap(r){r>>>=0;const t=Object.create(e.prototype);return t.__wbg_ptr=r,t}__destroy_into_raw(){const e=this.__wbg_ptr;return this.__wbg_ptr=0,e}free(){const e=this.__destroy_into_raw();B.__wbg_recordplaintext_free(e)}commitment(e,r){try{const i=B.__wbindgen_add_to_stack_pointer(-16),o=d(e,B.__wbindgen_malloc,B.__wbindgen_realloc),a=D,s=d(r,B.__wbindgen_malloc,B.__wbindgen_realloc),c=D;B.recordplaintext_commitment(i,this.__wbg_ptr,o,a,s,c);var t=f()[i/4+0],n=f()[i/4+1];if(f()[i/4+2])throw _(n);return q.__wrap(t)}finally{B.__wbindgen_add_to_stack_pointer(16)}}static fromString(r){try{const i=B.__wbindgen_add_to_stack_pointer(-16),o=d(r,B.__wbindgen_malloc,B.__wbindgen_realloc),a=D;B.recordplaintext_fromString(i,o,a);var t=f()[i/4+0],n=f()[i/4+1];if(f()[i/4+2])throw _(n);return e.__wrap(t)}finally{B.__wbindgen_add_to_stack_pointer(16)}}toString(){let e,r;try{const i=B.__wbindgen_add_to_stack_pointer(-16);B.recordplaintext_toString(i,this.__wbg_ptr);var t=f()[i/4+0],n=f()[i/4+1];return e=t,r=n,c(t,n)}finally{B.__wbindgen_add_to_stack_pointer(16),B.__wbindgen_free(e,r,1)}}microcredits(){const e=B.recordplaintext_microcredits(this.__wbg_ptr);return BigInt.asUintN(64,e)}nonce(){let e,r;try{const i=B.__wbindgen_add_to_stack_pointer(-16);B.recordplaintext_nonce(i,this.__wbg_ptr);var t=f()[i/4+0],n=f()[i/4+1];return e=t,r=n,c(t,n)}finally{B.__wbindgen_add_to_stack_pointer(16),B.__wbindgen_free(e,r,1)}}serialNumberString(e,r,t){let n,i;try{const w=B.__wbindgen_add_to_stack_pointer(-16);p(e,Y);const b=d(r,B.__wbindgen_malloc,B.__wbindgen_realloc),y=D,h=d(t,B.__wbindgen_malloc,B.__wbindgen_realloc),v=D;B.recordplaintext_serialNumberString(w,this.__wbg_ptr,e.__wbg_ptr,b,y,h,v);var o=f()[w/4+0],a=f()[w/4+1],s=f()[w/4+2],l=f()[w/4+3],u=o,g=a;if(l)throw u=0,g=0,_(s);return n=u,i=g,c(u,g)}finally{B.__wbindgen_add_to_stack_pointer(16),B.__wbindgen_free(n,i,1)}}},ne=class e{static __wrap(r){r>>>=0;const t=Object.create(e.prototype);return t.__wbg_ptr=r,t}__destroy_into_raw(){const e=this.__wbg_ptr;return this.__wbg_ptr=0,e}free(){const e=this.__destroy_into_raw();B.__wbg_signature_free(e)}static sign(r,t){p(r,Y);const n=y(t,B.__wbindgen_malloc),i=D,o=B.privatekey_sign(r.__wbg_ptr,n,i);return e.__wrap(o)}verify(e,r){p(e,W);const t=y(r,B.__wbindgen_malloc),n=D;return 0!==B.signature_verify(this.__wbg_ptr,e.__wbg_ptr,t,n)}static from_string(r){const t=d(r,B.__wbindgen_malloc,B.__wbindgen_realloc),n=D,i=B.signature_from_string(t,n);return e.__wrap(i)}to_string(){let e,r;try{const i=B.__wbindgen_add_to_stack_pointer(-16);B.signature_to_string(i,this.__wbg_ptr);var t=f()[i/4+0],n=f()[i/4+1];return e=t,r=n,c(t,n)}finally{B.__wbindgen_add_to_stack_pointer(16),B.__wbindgen_free(e,r,1)}}},ie=class e{static __wrap(r){r>>>=0;const t=Object.create(e.prototype);return t.__wbg_ptr=r,t}__destroy_into_raw(){const e=this.__wbg_ptr;return this.__wbg_ptr=0,e}free(){const e=this.__destroy_into_raw();B.__wbg_transaction_free(e)}static fromString(r){try{const i=B.__wbindgen_add_to_stack_pointer(-16),o=d(r,B.__wbindgen_malloc,B.__wbindgen_realloc),a=D;B.transaction_fromString(i,o,a);var t=f()[i/4+0],n=f()[i/4+1];if(f()[i/4+2])throw _(n);return e.__wrap(t)}finally{B.__wbindgen_add_to_stack_pointer(16)}}toString(){let e,r;try{const i=B.__wbindgen_add_to_stack_pointer(-16);B.transaction_toString(i,this.__wbg_ptr);var t=f()[i/4+0],n=f()[i/4+1];return e=t,r=n,c(t,n)}finally{B.__wbindgen_add_to_stack_pointer(16),B.__wbindgen_free(e,r,1)}}transactionId(){let e,r;try{const i=B.__wbindgen_add_to_stack_pointer(-16);B.transaction_transactionId(i,this.__wbg_ptr);var t=f()[i/4+0],n=f()[i/4+1];return e=t,r=n,c(t,n)}finally{B.__wbindgen_add_to_stack_pointer(16),B.__wbindgen_free(e,r,1)}}transactionType(){let e,r;try{const i=B.__wbindgen_add_to_stack_pointer(-16);B.transaction_transactionType(i,this.__wbg_ptr);var t=f()[i/4+0],n=f()[i/4+1];return e=t,r=n,c(t,n)}finally{B.__wbindgen_add_to_stack_pointer(16),B.__wbindgen_free(e,r,1)}}},oe=class e{static __wrap(r){r>>>=0;const t=Object.create(e.prototype);return t.__wbg_ptr=r,t}__destroy_into_raw(){const e=this.__wbg_ptr;return this.__wbg_ptr=0,e}free(){const e=this.__destroy_into_raw();B.__wbg_verifyingkey_free(e)}static bondPublicVerifier(){const r=B.verifyingkey_bondPublicVerifier();return e.__wrap(r)}static claimUnbondPublicVerifier(){const r=B.verifyingkey_claimUnbondPublicVerifier();return e.__wrap(r)}static feePrivateVerifier(){const r=B.verifyingkey_feePrivateVerifier();return e.__wrap(r)}static feePublicVerifier(){const r=B.verifyingkey_feePublicVerifier();return e.__wrap(r)}static inclusionVerifier(){const r=B.verifyingkey_inclusionVerifier();return e.__wrap(r)}static joinVerifier(){const r=B.verifyingkey_joinVerifier();return e.__wrap(r)}static setValidatorStateVerifier(){const r=B.verifyingkey_setValidatorStateVerifier();return e.__wrap(r)}static splitVerifier(){const r=B.verifyingkey_splitVerifier();return e.__wrap(r)}static transferPrivateVerifier(){const r=B.verifyingkey_transferPrivateVerifier();return e.__wrap(r)}static transferPrivateToPublicVerifier(){const r=B.verifyingkey_transferPrivateToPublicVerifier();return e.__wrap(r)}static transferPublicVerifier(){const r=B.verifyingkey_transferPublicVerifier();return e.__wrap(r)}static transferPublicToPrivateVerifier(){const r=B.verifyingkey_transferPublicToPrivateVerifier();return e.__wrap(r)}static unbondDelegatorAsValidatorVerifier(){const r=B.verifyingkey_unbondDelegatorAsValidatorVerifier();return e.__wrap(r)}static unbondPublicVerifier(){const r=B.verifyingkey_unbondPublicVerifier();return e.__wrap(r)}isBondPublicVerifier(){return 0!==B.verifyingkey_isBondPublicVerifier(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)}isTransferPublicToPrivateVerifier(){return 0!==B.verifyingkey_isTransferPublicToPrivateVerifier(this.__wbg_ptr)}isUnbondDelegatorAsValidatorVerifier(){return 0!==B.verifyingkey_isUnbondDelegatorAsValidatorVerifier(this.__wbg_ptr)}isUnbondPublicVerifier(){return 0!==B.verifyingkey_isUnbondPublicVerifier(this.__wbg_ptr)}checksum(){let e,r;try{const i=B.__wbindgen_add_to_stack_pointer(-16);B.verifyingkey_checksum(i,this.__wbg_ptr);var t=f()[i/4+0],n=f()[i/4+1];return e=t,r=n,c(t,n)}finally{B.__wbindgen_add_to_stack_pointer(16),B.__wbindgen_free(e,r,1)}}copy(){const r=B.provingkey_copy(this.__wbg_ptr);return e.__wrap(r)}static fromBytes(r){try{const i=B.__wbindgen_add_to_stack_pointer(-16),o=y(r,B.__wbindgen_malloc),a=D;B.verifyingkey_fromBytes(i,o,a);var t=f()[i/4+0],n=f()[i/4+1];if(f()[i/4+2])throw _(n);return e.__wrap(t)}finally{B.__wbindgen_add_to_stack_pointer(16)}}static fromString(r){try{const i=B.__wbindgen_add_to_stack_pointer(-16),o=d(r,B.__wbindgen_malloc,B.__wbindgen_realloc),a=D;B.verifyingkey_fromString(i,o,a);var t=f()[i/4+0],n=f()[i/4+1];if(f()[i/4+2])throw _(n);return e.__wrap(t)}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=f()[i/4+0],r=f()[i/4+1],t=f()[i/4+2];if(f()[i/4+3])throw _(t);var n=m(e,r).slice();return B.__wbindgen_free(e,1*r),n}finally{B.__wbindgen_add_to_stack_pointer(16)}}toString(){let e,r;try{const i=B.__wbindgen_add_to_stack_pointer(-16);B.verifyingkey_toString(i,this.__wbg_ptr);var t=f()[i/4+0],n=f()[i/4+1];return e=t,r=n,c(t,n)}finally{B.__wbindgen_add_to_stack_pointer(16),B.__wbindgen_free(e,r,1)}}},ae=class e{static __wrap(r){r>>>=0;const t=Object.create(e.prototype);return t.__wbg_ptr=r,t}__destroy_into_raw(){const e=this.__wbg_ptr;return this.__wbg_ptr=0,e}free(){const e=this.__destroy_into_raw();B.__wbg_viewkey_free(e)}static from_private_key(r){p(r,Y);const t=B.privatekey_to_view_key(r.__wbg_ptr);return e.__wrap(t)}static from_string(r){const t=d(r,B.__wbindgen_malloc,B.__wbindgen_realloc),n=D,i=B.viewkey_from_string(t,n);return e.__wrap(i)}to_string(){let e,r;try{const i=B.__wbindgen_add_to_stack_pointer(-16);B.viewkey_to_string(i,this.__wbg_ptr);var t=f()[i/4+0],n=f()[i/4+1];return e=t,r=n,c(t,n)}finally{B.__wbindgen_add_to_stack_pointer(16),B.__wbindgen_free(e,r,1)}}to_address(){const e=B.address_from_view_key(this.__wbg_ptr);return W.__wrap(e)}decrypt(e){let r,t;try{const u=B.__wbindgen_add_to_stack_pointer(-16),g=d(e,B.__wbindgen_malloc,B.__wbindgen_realloc),w=D;B.viewkey_decrypt(u,this.__wbg_ptr,g,w);var n=f()[u/4+0],i=f()[u/4+1],o=f()[u/4+2],a=f()[u/4+3],s=n,l=i;if(a)throw s=0,l=0,_(o);return r=s,t=l,c(s,l)}finally{B.__wbindgen_add_to_stack_pointer(16),B.__wbindgen_free(r,t,1)}}};async function E(e,r){if("function"==typeof Response&&e instanceof Response){if("function"==typeof WebAssembly.instantiateStreaming)try{return await WebAssembly.instantiateStreaming(e,r)}catch(r){if("application/wasm"==e.headers.get("Content-Type"))throw r;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",r)}const t=await e.arrayBuffer();return await WebAssembly.instantiate(t,r)}{const t=await WebAssembly.instantiate(e,r);return t instanceof WebAssembly.Instance?{instance:t,module:e}:t}}function V(){const e={wbg:{}};return e.wbg.__wbindgen_object_drop_ref=function(e){_(e)},e.wbg.__wbg_new_daafff584c71593b=function(){return K((function(){return l(new XMLHttpRequest)}),arguments)},e.wbg.__wbg_overrideMimeType_1a661d17da5f8baf=function(){return K((function(e,r,t){o(e).overrideMimeType(c(r,t))}),arguments)},e.wbg.__wbg_open_56fa1eb95989f6a5=function(){return K((function(e,r,t,n,i,a){o(e).open(c(r,t),c(n,i),0!==a)}),arguments)},e.wbg.__wbg_send_9f5007eae908c72e=function(){return K((function(e){o(e).send()}),arguments)},e.wbg.__wbg_response_f2acf2ecbe021710=function(){return K((function(e){return l(o(e).response)}),arguments)},e.wbg.__wbg_new_b51585de1b234aff=function(){return l(new Object)},e.wbg.__wbindgen_string_new=function(e,r){return l(c(e,r))},e.wbg.__wbg_set_092e06b0f9d71865=function(){return K((function(e,r,t){return Reflect.set(o(e),o(r),o(t))}),arguments)},e.wbg.__wbg_new_1eead62f64ca15ce=function(){return K((function(){return l(new Headers)}),arguments)},e.wbg.__wbindgen_object_clone_ref=function(e){return l(o(e))},e.wbg.__wbg_append_fda9e3432e3e88da=function(){return K((function(e,r,t,n,i){o(e).append(c(r,t),c(n,i))}),arguments)},e.wbg.__wbg_new_55c9955722952374=function(){return K((function(){return l(new AbortController)}),arguments)},e.wbg.__wbg_signal_4bd18fb489af2d4c=function(e){return l(o(e).signal)},e.wbg.__wbg_instanceof_Response_fc4327dbfcdf5ced=function(e){let r;try{r=o(e)instanceof Response}catch{r=!1}return r},e.wbg.__wbg_status_ac85a3142a84caa2=function(e){return o(e).status},e.wbg.__wbg_url_8503de97f69da463=function(e,r){const t=d(o(r).url,B.__wbindgen_malloc,B.__wbindgen_realloc),n=D;f()[e/4+1]=n,f()[e/4+0]=t},e.wbg.__wbg_headers_b70de86b8e989bc0=function(e){return l(o(e).headers)},e.wbg.__wbg_iterator_97f0c81209c6c35a=function(){return l(Symbol.iterator)},e.wbg.__wbg_get_97b561fb56f034b5=function(){return K((function(e,r){return l(Reflect.get(o(e),o(r)))}),arguments)},e.wbg.__wbindgen_is_function=function(e){return"function"==typeof o(e)},e.wbg.__wbg_call_cb65541d95d71282=function(){return K((function(e,r){return l(o(e).call(o(r)))}),arguments)},e.wbg.__wbindgen_is_object=function(e){const r=o(e);return"object"==typeof r&&null!==r},e.wbg.__wbg_next_526fc47e980da008=function(e){return l(o(e).next)},e.wbg.__wbg_next_ddb3312ca1c4e32a=function(){return K((function(e){return l(o(e).next())}),arguments)},e.wbg.__wbg_done_5c1f01fb660d73b5=function(e){return o(e).done},e.wbg.__wbg_value_1695675138684bd5=function(e){return l(o(e).value)},e.wbg.__wbg_abort_654b796176d117aa=function(e){o(e).abort()},e.wbg.__wbg_stringify_e25465938f3f611f=function(){return K((function(e){return l(JSON.stringify(o(e)))}),arguments)},e.wbg.__wbindgen_string_get=function(e,r){const t=o(r),n="string"==typeof t?t:void 0;var i=u(n)?0:d(n,B.__wbindgen_malloc,B.__wbindgen_realloc),a=D;f()[e/4+1]=a,f()[e/4+0]=i},e.wbg.__wbg_call_01734de55d61e11d=function(){return K((function(e,r,t){return l(o(e).call(o(r),o(t)))}),arguments)},e.wbg.__wbg_keypair_new=function(e){return l(H.__wrap(e))},e.wbg.__wbg_log_0159ca40cddf5b15=function(e,r){console.log(c(e,r))},e.wbg.__wbg_transaction_new=function(e){return l(ie.__wrap(e))},e.wbg.__wbindgen_bigint_from_u64=function(e){return l(BigInt.asUintN(64,e))},e.wbg.__wbindgen_module=function(){return l(R.__wbindgen_wasm_module)},e.wbg.__wbindgen_memory=function(){return l(B.memory)},e.wbg.__wbg_spawnWorker_f6acaddb2e29dc4a=function(e,r,t,n){return l(i(o(e),o(r),o(t),n))},e.wbg.__wbg_executionresponse_new=function(e){return l(z.__wrap(e))},e.wbg.__wbg_newwithlength_3ec098a360da1909=function(e){return l(new Array(e>>>0))},e.wbg.__wbg_set_502d29070ea18557=function(e,r,t){o(e)[r>>>0]=_(t)},e.wbg.__wbindgen_cb_drop=function(e){const r=_(e).original;if(1==r.cnt--)return r.a=0,!0;return!1},e.wbg.__wbg_arrayBuffer_288fb3538806e85c=function(){return K((function(e){return l(o(e).arrayBuffer())}),arguments)},e.wbg.__wbg_new_8125e318e6245eed=function(e){return l(new Uint8Array(o(e)))},e.wbg.__wbg_length_72e2208bbc0efc61=function(e){return o(e).length},e.wbg.__wbg_new_43f1b47c28813cbd=function(e,r){try{var t={a:e,b:r};const n=new Promise(((e,r)=>{const n=t.a;t.a=0;try{return T(n,t.b,e,r)}finally{t.a=n}}));return l(n)}finally{t.a=t.b=0}},e.wbg.__wbg_new_898a68150f225f2e=function(){return l(new Array)},e.wbg.__wbg_push_ca1c26067ef907ac=function(e,r){return o(e).push(o(r))},e.wbg.__wbindgen_number_new=function(e){return l(e)},e.wbg.__wbg_new_abda76e883ba8a5f=function(){return l(new Error)},e.wbg.__wbg_stack_658279fe44541cf6=function(e,r){const t=d(o(r).stack,B.__wbindgen_malloc,B.__wbindgen_realloc),n=D;f()[e/4+1]=n,f()[e/4+0]=t},e.wbg.__wbg_error_f851667af71bcfc6=function(e,r){let t,n;try{t=e,n=r,console.error(c(e,r))}finally{B.__wbindgen_free(t,n,1)}},e.wbg.__wbg_subarray_13db269f57aa838d=function(e,r,t){return l(o(e).subarray(r>>>0,t>>>0))},e.wbg.__wbg_getRandomValues_37fa2ca9e4e07fab=function(){return K((function(e,r){o(e).getRandomValues(o(r))}),arguments)},e.wbg.__wbg_buffer_085ec1f694018c4f=function(e){return l(o(e).buffer)},e.wbg.__wbg_set_5cf90238115182c3=function(e,r,t){o(e).set(o(r),t>>>0)},e.wbg.__wbg_newwithbyteoffsetandlength_6da8e527659b86aa=function(e,r,t){return l(new Uint8Array(o(e),r>>>0,t>>>0))},e.wbg.__wbg_randomFillSync_dc1e9a60c158336d=function(){return K((function(e,r){o(e).randomFillSync(_(r))}),arguments)},e.wbg.__wbg_crypto_c48a774b022d20ac=function(e){return l(o(e).crypto)},e.wbg.__wbg_process_298734cf255a885d=function(e){return l(o(e).process)},e.wbg.__wbg_versions_e2e78e134e3e5d01=function(e){return l(o(e).versions)},e.wbg.__wbg_node_1cd7a5d853dbea79=function(e){return l(o(e).node)},e.wbg.__wbindgen_is_string=function(e){return"string"==typeof o(e)},e.wbg.__wbg_msCrypto_bcb970640f50a1e8=function(e){return l(o(e).msCrypto)},e.wbg.__wbg_newwithlength_e5d69174d6984cd7=function(e){return l(new Uint8Array(e>>>0))},e.wbg.__wbg_require_8f08ceecec0f4fee=function(){return K((function(){return l(module.require)}),arguments)},e.wbg.__wbg_length_fff51ee6522a1a18=function(e){return o(e).length},e.wbg.__wbg_get_44be0491f933a435=function(e,r){return l(o(e)[r>>>0])},e.wbg.__wbg_self_1ff1d729e9aae938=function(){return K((function(){return l(self.self)}),arguments)},e.wbg.__wbg_window_5f4faef6c12b79ec=function(){return K((function(){return l(window.window)}),arguments)},e.wbg.__wbg_globalThis_1d39714405582d3c=function(){return K((function(){return l(globalThis.globalThis)}),arguments)},e.wbg.__wbg_global_651f05c6a0944d1c=function(){return K((function(){return l(global.global)}),arguments)},e.wbg.__wbindgen_is_undefined=function(e){return void 0===o(e)},e.wbg.__wbg_newnoargs_581967eacc0e2604=function(e,r){return l(new Function(c(e,r)))},e.wbg.__wbg_has_c5fcd020291e56b8=function(){return K((function(e,r){return Reflect.has(o(e),o(r))}),arguments)},e.wbg.__wbg_fetch_8eaf01857a5bb21f=function(e,r){return l(o(e).fetch(o(r)))},e.wbg.__wbg_fetch_b5d6bebed1e6c2d2=function(e){return l(fetch(o(e)))},e.wbg.__wbindgen_debug_string=function(e,r){const t=d(g(o(r)),B.__wbindgen_malloc,B.__wbindgen_realloc),n=D;f()[e/4+1]=n,f()[e/4+0]=t},e.wbg.__wbindgen_throw=function(e,r){throw new Error(c(e,r))},e.wbg.__wbindgen_rethrow=function(e){throw _(e)},e.wbg.__wbg_then_b2267541e2a73865=function(e,r,t){return l(o(e).then(o(r),o(t)))},e.wbg.__wbg_then_f7e06ee3c11698eb=function(e,r){return l(o(e).then(o(r)))},e.wbg.__wbg_resolve_53698b95aaf7fcf8=function(e){return l(Promise.resolve(o(e)))},e.wbg.__wbg_waitAsync_60fb5e2e86467e31=function(){return l(Atomics.waitAsync)},e.wbg.__wbg_new_a0af68041688e8fd=function(e){return l(new Int32Array(o(e)))},e.wbg.__wbg_waitAsync_73fd6eb3bace0a8d=function(e,r,t){return l(Atomics.waitAsync(o(e),r,t))},e.wbg.__wbg_async_e1a2a669aacf35ff=function(e){return o(e).async},e.wbg.__wbg_value_555e4f564193db05=function(e){return l(o(e).value)},e.wbg.__wbindgen_link_22046963fe0b707a=function(e){const r=d("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),t=D;f()[e/4+1]=t,f()[e/4+0]=r},e.wbg.__wbg_new_8e7322f46d5d019c=function(){return K((function(e,r){return l(new Worker(c(e,r)))}),arguments)},e.wbg.__wbg_setonmessage_f0bd0280573b7084=function(e,r){o(e).onmessage=o(r)},e.wbg.__wbg_of_3f69007bb4eeae65=function(e,r,t){return l(Array.of(o(e),o(r),o(t)))},e.wbg.__wbg_postMessage_8c609e2bde333d9c=function(){return K((function(e,r){o(e).postMessage(o(r))}),arguments)},e.wbg.__wbg_data_ab99ae4a2e1e8bc9=function(e){return l(o(e).data)},e.wbg.__wbg_newwithstrandinit_cad5cd6038c7ff5d=function(){return K((function(e,r,t){return l(new Request(c(e,r),o(t)))}),arguments)},e.wbg.__wbg_status_114ef6fe27fb8b00=function(){return K((function(e){return o(e).status}),arguments)},e.wbg.__wbg_responseText_da275667251fd153=function(){return K((function(e,r){const t=o(r).responseText;var n=u(t)?0:d(t,B.__wbindgen_malloc,B.__wbindgen_realloc),i=D;f()[e/4+1]=i,f()[e/4+0]=n}),arguments)},e.wbg.__wbindgen_closure_wrapper5654=function(e,r,t){return l(w(e,r,543,b))},e.wbg.__wbindgen_closure_wrapper5677=function(e,r,t){return l(w(e,r,543,b))},e}function S(e,r){e.wbg.memory=r||new WebAssembly.Memory({initial:169,maximum:65536,shared:!0})}function x(e,r){return B=e.exports,R.__wbindgen_wasm_module=r,L=null,M=null,j=null,B.__wbindgen_start(),B}function A(e,r){if(void 0!==B)return B;const t=V();S(t,r),e instanceof WebAssembly.Module||(e=new WebAssembly.Module(e));return x(new WebAssembly.Instance(e,t),e)}async function R(e,r){if(void 0!==B)return B;const t=V();("string"==typeof e||"function"==typeof Request&&e instanceof Request||"function"==typeof URL&&e instanceof URL)&&(e=fetch(e)),S(t,r);const{instance:n,module:i}=await E(await e,t);return x(n,i)}var C=Object.freeze({__proto__:null,Address:W,Execution:X,ExecutionResponse:z,Field:q,KeyPair:H,OfflineQuery:J,PrivateKey:Y,PrivateKeyCiphertext:Q,Program:G,ProgramManager:Z,ProvingKey:ee,RecordCiphertext:re,RecordPlaintext:te,Signature:ne,Transaction:ie,VerifyingKey:oe,ViewKey:ae,default:R,initSync:A,initThreadPool:k,runRayonThread:P,verifyFunctionExecution:h});const _e="assets/aleo_wasm.wasm";const{initThreadPool:se,Address:ce,Execution:le,ExecutionResponse:de,Field:ue,OfflineQuery:fe,Private:ge,PrivateKey:we,PrivateKeyCiphertext:be,Program:pe,ProvingKey:ye,RecordCiphertext:he,RecordPlaintext:ve,ProgramManager:me,Signature:Pe,Transaction:ke,ViewKey:Ke,VerifyingKey:Te,verifyFunctionExecution:Ee}=await(async(e={})=>{let{importHook:r,serverPath:t,initializeHook:n}=e,i=_e;return null!=t&&(i=t+/[^\/\\]*$/.exec(i)[0]),null!=r&&(i=r(i)),null!=n?await n(R,i):await R(i),C})({importHook:()=>new URL(t(8249),t.b)});async function U(e){null==e&&(e=navigator.hardwareConcurrency),console.info(`Spawning ${e} threads`),await se(new URL(t(5128),t.b),e)}n()}catch(Ve){n(Ve)}}),1)},8991:(e,r,t)=>{t.d(r,{Ud:()=>u});const n=Symbol("Comlink.proxy"),i=Symbol("Comlink.endpoint"),o=Symbol("Comlink.releaseProxy"),a=Symbol("Comlink.finalizer"),_=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:r,port2:t}=new MessageChannel;return l(e,r),[t,[t]]},deserialize:e=>(e.start(),u(e))}],["throw",{canHandle:e=>s(e)&&_ 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 l(e,r=globalThis,t=["*"]){r.addEventListener("message",(function i(o){if(!o||!o.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,o.origin))return void console.warn(`Invalid origin '${o.origin}' for comlink proxy`);const{id:s,type:c,path:u}=Object.assign({path:[]},o.data),f=(o.data.argumentList||[]).map(m);let g;try{const r=u.slice(0,-1).reduce(((e,r)=>e[r]),e),t=u.reduce(((e,r)=>e[r]),e);switch(c){case"GET":g=t;break;case"SET":r[u.slice(-1)[0]]=m(o.data.value),g=!0;break;case"APPLY":g=t.apply(r,f);break;case"CONSTRUCT":g=function(e){return Object.assign(e,{[n]:!0})}(new t(...f));break;case"ENDPOINT":{const{port1:r,port2:t}=new MessageChannel;l(e,t),g=function(e,r){return h.set(e,r),e}(r,[r])}break;case"RELEASE":g=void 0;break;default:return}}catch(e){g={value:e,[_]:0}}Promise.resolve(g).catch((e=>({value:e,[_]:0}))).then((t=>{const[n,o]=v(t);r.postMessage(Object.assign(Object.assign({},n),{id:s}),o),"RELEASE"===c&&(r.removeEventListener("message",i),d(r),a in e&&"function"==typeof e[a]&&e[a]())})).catch((e=>{const[t,n]=v({value:new TypeError("Unserializable return value"),[_]:0});r.postMessage(Object.assign(Object.assign({},t),{id:s}),n)}))})),r.start&&r.start()}function d(e){(function(e){return"MessagePort"===e.constructor.name})(e)&&e.close()}function u(e,r){return p(e,[],r)}function f(e){if(e)throw new Error("Proxy has been released and is not useable")}function g(e){return P(e,{type:"RELEASE"}).then((()=>{d(e)}))}const w=new WeakMap,b="FinalizationRegistry"in globalThis&&new FinalizationRegistry((e=>{const r=(w.get(e)||0)-1;w.set(e,r),0===r&&g(e)}));function p(e,r=[],t=function(){}){let n=!1;const a=new Proxy(t,{get(t,i){if(f(n),i===o)return()=>{!function(e){b&&b.unregister(e)}(a),g(e),n=!0};if("then"===i){if(0===r.length)return{then:()=>a};const t=P(e,{type:"GET",path:r.map((e=>e.toString()))}).then(m);return t.then.bind(t)}return p(e,[...r,i])},set(t,i,o){f(n);const[a,_]=v(o);return P(e,{type:"SET",path:[...r,i].map((e=>e.toString())),value:a},_).then(m)},apply(t,o,a){f(n);const _=r[r.length-1];if(_===i)return P(e,{type:"ENDPOINT"}).then(m);if("bind"===_)return p(e,r.slice(0,-1));const[s,c]=y(a);return P(e,{type:"APPLY",path:r.map((e=>e.toString())),argumentList:s},c).then(m)},construct(t,i){f(n);const[o,a]=y(i);return P(e,{type:"CONSTRUCT",path:r.map((e=>e.toString())),argumentList:o},a).then(m)}});return function(e,r){const t=(w.get(r)||0)+1;w.set(r,t),b&&b.register(e,r,e)}(a,e),a}function y(e){const r=e.map(v);return[r.map((e=>e[0])),(t=r.map((e=>e[1])),Array.prototype.concat.apply([],t))];var t}const h=new WeakMap;function v(e){for(const[r,t]of c)if(t.canHandle(e)){const[n,i]=t.serialize(e);return[{type:"HANDLER",name:r,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,r,t){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 r(t){t.data&&t.data.id&&t.data.id===i&&(e.removeEventListener("message",r),n(t.data))})),e.start&&e.start(),e.postMessage(Object.assign({id:i},r),t)}))}}}]); -//# sourceMappingURL=298.bundle.js.map \ No newline at end of file diff --git a/298.bundle.js.LICENSE.txt b/298.bundle.js.LICENSE.txt deleted file mode 100644 index 479a8e58b..000000000 --- a/298.bundle.js.LICENSE.txt +++ /dev/null @@ -1,5 +0,0 @@ -/** - * @license - * Copyright 2019 Google LLC - * SPDX-License-Identifier: Apache-2.0 - */ diff --git a/298.bundle.js.map b/298.bundle.js.map deleted file mode 100644 index 9982ffac5..000000000 --- a/298.bundle.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"298.bundle.js","mappings":";8rCA2CaA,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,EAAoC,iBAAfA,EAA2BE,EAAAA,GAAqBC,WAAWH,GAAc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A,MAEzB,CACA,SAASk4B,EAAuBnC,EAAI8D,EAAK5C,GACrC,OAAO,IAAItuB,SAASC,IAChB,MAAMpG,EAeH,IAAIrE,MAAM,GACZgV,KAAK,GACLjX,KAAI,IAAM4U,KAAKgpB,MAAMhpB,KAAKipB,SAAWC,OAAOC,kBAAkBt+B,SAAS,MACvEiL,KAAK,KAjBNmvB,EAAGpjB,iBAAiB,WAAW,SAAS9S,EAAEq2B,GACjCA,EAAGxyB,MAASwyB,EAAGxyB,KAAKlB,IAAM0zB,EAAGxyB,KAAKlB,KAAOA,IAG9CuzB,EAAGwB,oBAAoB,UAAW13B,GAClC+I,EAAQstB,EAAGxyB,MACf,IACIqyB,EAAG33B,OACH23B,EAAG33B,QAEP23B,EAAG/iB,YAAY8G,OAAOgc,OAAO,CAAEtzB,MAAMq3B,GAAM5C,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) {\n const response = await fetch(url);\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\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 account: Account | undefined;\n\n constructor(host: string) {\n this.host = host + \"/testnet3\";\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 + \"/testnet3\";\n }\n\n async fetchData(\n url = \"/\",\n ): Promise {\n try {\n const response = await get(this.host + url);\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 /**\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: {\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, ProgramImports }\n","import { ProvingKey, VerifyingKey, CREDITS_PROGRAM_KEYS, KEY_STORE, PRIVATE_TRANSFER, PRIVATE_TO_PUBLIC_TRANSFER, PUBLIC_TRANSFER, PUBLIC_TO_PRIVATE_TRANSFER} 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 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}) {\n this.proverUri = params.proverUri;\n this.verifierUri = params.verifierUri;\n this.cacheKey = params.cacheKey;\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 /**\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 * const AleoProviderParams = new AleoProviderParams(\"https://testnet3.parameters.aleo.org/transfer_private.\");\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 (\"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.fetchKeys(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://vm.aleo.org/api\", 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(\"https://testnet3.parameters.aleo.org/transfer_private.prover.2a9a6f2\", \"https://testnet3.parameters.aleo.org/transfer_private.verifier.3a59762\");\n */\n async fetchKeys(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 bondPublicKeys(): Promise {\n return this.fetchKeys(CREDITS_PROGRAM_KEYS.bond_public.prover, CREDITS_PROGRAM_KEYS.bond_public.verifier, CREDITS_PROGRAM_KEYS.bond_public.locator)\n }\n\n claimUnbondPublicKeys(): Promise {\n return this.fetchKeys(CREDITS_PROGRAM_KEYS.claim_unbond_public.prover, CREDITS_PROGRAM_KEYS.claim_unbond_public.verifier, CREDITS_PROGRAM_KEYS.claim_unbond_public.locator)\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://vm.aleo.org/api\");\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://vm.aleo.org/api\", 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.fetchKeys(CREDITS_PROGRAM_KEYS.transfer_private.prover, CREDITS_PROGRAM_KEYS.transfer_private.verifier, CREDITS_PROGRAM_KEYS.transfer_private.locator);\n } else if (PRIVATE_TO_PUBLIC_TRANSFER.has(visibility)) {\n return await this.fetchKeys(CREDITS_PROGRAM_KEYS.transfer_private_to_public.prover, CREDITS_PROGRAM_KEYS.transfer_private_to_public.verifier, CREDITS_PROGRAM_KEYS.transfer_private_to_public.locator);\n } else if (PUBLIC_TRANSFER.has(visibility)) {\n return await this.fetchKeys(CREDITS_PROGRAM_KEYS.transfer_public.prover, CREDITS_PROGRAM_KEYS.transfer_public.verifier, CREDITS_PROGRAM_KEYS.transfer_public.locator);\n } else if (PUBLIC_TO_PRIVATE_TRANSFER.has(visibility)) {\n return await this.fetchKeys(CREDITS_PROGRAM_KEYS.transfer_public_to_private.prover, CREDITS_PROGRAM_KEYS.transfer_public_to_private.verifier, CREDITS_PROGRAM_KEYS.transfer_public_to_private.locator);\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.fetchKeys(CREDITS_PROGRAM_KEYS.join.prover, CREDITS_PROGRAM_KEYS.join.verifier, CREDITS_PROGRAM_KEYS.join.locator);\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.fetchKeys(CREDITS_PROGRAM_KEYS.split.prover, CREDITS_PROGRAM_KEYS.split.verifier, CREDITS_PROGRAM_KEYS.split.locator);\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.fetchKeys(CREDITS_PROGRAM_KEYS.fee_private.prover, CREDITS_PROGRAM_KEYS.fee_private.verifier, CREDITS_PROGRAM_KEYS.fee_private.locator);\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.fetchKeys(CREDITS_PROGRAM_KEYS.fee_public.prover, CREDITS_PROGRAM_KEYS.fee_public.verifier, CREDITS_PROGRAM_KEYS.fee_public.locator);\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.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_to_private.verifier:\n return CREDITS_PROGRAM_KEYS.transfer_public_to_private.verifyingKey();\n case CREDITS_PROGRAM_KEYS.unbond_delegator_as_validator.verifier:\n return CREDITS_PROGRAM_KEYS.unbond_delegator_as_validator.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.fetchKeys(CREDITS_PROGRAM_KEYS.unbond_public.prover, CREDITS_PROGRAM_KEYS.unbond_public.verifier, CREDITS_PROGRAM_KEYS.unbond_public.locator);\n }\n}\n\nexport {AleoKeyProvider, AleoKeyProviderParams, AleoKeyProviderInitParams, CachedKeyPair, FunctionKeyPair, FunctionKeyProvider, KeySearchParams}\n","import { FunctionKeyProvider, KeySearchParams, FunctionKeyPair, CachedKeyPair, ProvingKey, VerifyingKey, CREDITS_PROGRAM_KEYS, PRIVATE_TRANSFER, PRIVATE_TO_PUBLIC_TRANSFER, PUBLIC_TRANSFER, PUBLIC_TO_PRIVATE_TRANSFER} 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 * unbondDelegatorAsValidatorSearchParams = OfflineSearchParams.unbondDelegatorAsValidatorKeyParams();\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 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_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_delegator_as_validator function of the credits.aleo program.\n */\n static unbondDelegatorAsValidatorKeyParams(): OfflineSearchParams {\n return new OfflineSearchParams(CREDITS_PROGRAM_KEYS.unbond_delegator_as_validator.locator, true);\n }\n\n /**\n * Create a new OfflineSearchParams instance for the unbond_delegator 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 /**\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_delegator_as_validator.locator:\n return provingKey.isUnbondDelegatorAsValidatorProver() && verifyingKey.isUnbondDelegatorAsValidatorVerifier();\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_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 insertUnbondDelegatorAsValidatorKeys(provingKey: ProvingKey) {\n if (provingKey.isUnbondDelegatorAsValidatorProver()) {\n this.cache.set(CREDITS_PROGRAM_KEYS.unbond_delegator_as_validator.locator, [provingKey.toBytes(), VerifyingKey.unbondDelegatorAsValidatorVerifier().toBytes()]);\n } else {\n throw new Error(\"Attempted to insert invalid proving keys for unbond_delegator_as_validator\");\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 \"@aleohq/wasm/dist/crates/aleo_wasm\";\n\n// TODO put this somewhere where it makes more sense\ninterface ExecutionParams {\n programName?: string;\n functionName?: string;\n fee?: number;\n privateFee?: boolean;\n recordSearchParams?: any;\n keySearchParams?: any;\n feeRecord?: any;\n provingKey?: any;\n verifyingKey?: any;\n privateKey?: any;\n}\ninterface OfflineParams {\n offlineQuery?: OfflineQuery\n}\ninterface Options {\n offlineParams?: OfflineParams;\n executionParams?: ExecutionParams;\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 if (!host) {\n this.host = \"https://api.explorer.aleo.org/v1\";\n this.networkClient = new AleoNetworkClient(this.host);\n } else {\n this.host = host;\n this.networkClient = new AleoNetworkClient(host);\n }\n\n if (!keyProvider) {\n this.keyProvider = new AleoKeyProvider();\n } else {\n this.keyProvider = keyProvider;\n }\n\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 * Build an execution transaction for later submission to the Aleo network.\n *\n * @param {string} programName Program name containing the function to be executed\n * @param {string} functionName Function name to execute\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 {string[]} inputs Inputs to the function\n * @param {RecordSearchParams} recordSearchParams Optional parameters for searching for a record to pay the fee for\n * the execution transaction\n * @param {KeySearchParams} keySearchParams Optional parameters for finding the matching proving & verifying keys\n * for the function\n * @param {string | RecordPlaintext | undefined} feeRecord Optional Fee record to use for the transaction\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 * @param {string | Program | undefined} program Optional program source code to use for the transaction\n * @param {ProgramImports} imports Programs that the program being executed imports\n * @returns {Promise}\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://vm.aleo.org/api\");\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 programName = \"hello_hello.aleo\";\n * const programManager = new ProgramManager(\"https://vm.aleo.org/api\", keyProvider, recordProvider);\n * const keySearchParams = { \"cacheKey\": \"hello_hello:hello\" };\n * const transaction = await programManager.execute(programName, \"hello_hello\", 0.020, [\"5u32\", \"5u32\"], undefined, undefined, undefined, keySearchParams);\n * const result = await programManager.networkClient.submitTransaction(transaction);\n */\n async buildExecutionTransaction(\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 ): Promise {\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 * Execute an Aleo program on the Aleo network\n *\n * @param {string} programName Program name containing the function to be executed\n * @param {string} functionName Function name to execute\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 {string[]} inputs Inputs to the function\n * @param {RecordSearchParams} recordSearchParams Optional parameters for searching for a record to pay the fee for\n * the execution transaction\n * @param {KeySearchParams} keySearchParams Optional parameters for finding the matching proving & verifying keys\n * for the function\n * @param {string | RecordPlaintext | undefined} feeRecord Optional Fee record to use for the transaction\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 * // Create a new NetworkClient, KeyProvider, and RecordProvider using official Aleo record, key, and network providers\n * const networkClient = new AleoNetworkClient(\"https://vm.aleo.org/api\");\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 programName = \"hello_hello.aleo\";\n * const programManager = new ProgramManager(\"https://vm.aleo.org/api\", keyProvider, recordProvider);\n * const keySearchParams = { \"cacheKey\": \"hello_hello:hello\" };\n * const tx_id = await programManager.execute(programName, \"hello_hello\", 0.020, [\"5u32\", \"5u32\"], undefined, undefined, undefined, keySearchParams);\n * const transaction = await programManager.networkClient.getTransaction(tx_id);\n */\n async execute(\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 ): Promise {\n const tx = await this.buildExecutionTransaction(programName, functionName, fee, privateFee, inputs, recordSearchParams, keySearchParams, feeRecord, provingKey, verifyingKey, privateKey, offlineQuery, program);\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 '@aleohq/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.executeOffline(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://vm.aleo.org/api\");\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://vm.aleo.org/api\", 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://vm.aleo.org/api\");\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://vm.aleo.org/api\", 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 * @example\n * // Create a new NetworkClient, KeyProvider, and RecordProvider\n * const networkClient = new AleoNetworkClient(\"https://vm.aleo.org/api\");\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://vm.aleo.org/api\", 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 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 * 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://vm.aleo.org/api\");\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://vm.aleo.org/api\", 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 staking committee 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\n * const tx_id = await programManager.bondPublic(\"aleo1rhgdu77hgyqd3xjj8ucu3jj9r2krwz6mnzyd80gncr5fxcwlh5rsvzp9px\", 2000000);\n *\n * @returns string\n * @param {string} 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 {number} amount The amount of credits to bond\n * @param {Options} options Options for the execution\n */\n async buildBondPublicTransaction(address: string, amount: number, options: Options = {}) {\n amount = Math.trunc(amount*1000000);\n\n const {\n offlineParams = {},\n executionParams = {}\n } = options || {};\n\n let {\n programName = \"credits.aleo\",\n functionName = \"bond_public\",\n fee = executionParams?.fee || 0.86,\n privateFee = false,\n recordSearchParams,\n keySearchParams,\n feeRecord,\n provingKey,\n verifyingKey,\n privateKey\n } = executionParams;\n\n if (keySearchParams === undefined) {\n keySearchParams = new AleoKeyProviderParams(\n {\n proverUri: CREDITS_PROGRAM_KEYS.bond_public.prover,\n verifierUri: CREDITS_PROGRAM_KEYS.bond_public.verifier,\n cacheKey: \"credits.aleo/bond_public\"\n });\n }\n\n const {\n offlineQuery,\n } = offlineParams;\n\n return await this.buildExecutionTransaction(programName, functionName, fee, privateFee, [address, `${amount.toString()}u64`], recordSearchParams, keySearchParams, feeRecord, provingKey, verifyingKey, privateKey, offlineQuery, this.creditsProgram());\n }\n\n /**\n * Bond credits to a staking committee\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(\"aleo1rhgdu77hgyqd3xjj8ucu3jj9r2krwz6mnzyd80gncr5fxcwlh5rsvzp9px\", 2000000);\n *\n * @returns string\n * @param {string} 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 {number} amount The amount of credits to bond\n * @param {Options} options Options for the execution\n */\n async bondPublic(address: string, amount: number, options: Options = {}) {\n const tx = await this.buildBondPublicTransaction(address, amount, options);\n return await this.networkClient.submitTransaction(tx);\n }\n\n /**\n * Build a transaction to unbond a specified amount of staked credits to be used later\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.unbondPublic(10);\n *\n * @returns string\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 {Options} options Options for the execution\n */\n async buildUnbondPublicTransaction(amount: number, options: Options = {}): Promise {\n amount = Math.trunc(amount*1000000);\n\n const {\n offlineParams = {},\n executionParams = {}\n } = options || {};\n\n let {\n programName = \"credits.aleo\",\n functionName = \"unbond_public\",\n fee = executionParams?.fee || 1.3,\n privateFee = false,\n recordSearchParams,\n keySearchParams,\n feeRecord,\n provingKey,\n verifyingKey,\n privateKey\n } = executionParams;\n\n if (keySearchParams === undefined) {\n keySearchParams = new AleoKeyProviderParams(\n {\n proverUri: CREDITS_PROGRAM_KEYS.unbond_public.prover,\n verifierUri: CREDITS_PROGRAM_KEYS.unbond_public.verifier,\n cacheKey: \"credits.aleo/unbond_public\"\n });\n }\n\n const {\n offlineQuery,\n } = offlineParams;\n\n return this.buildExecutionTransaction(programName, functionName, fee, privateFee, [`${amount.toString()}u64`], recordSearchParams, keySearchParams, feeRecord, provingKey, verifyingKey, privateKey, offlineQuery, this.creditsProgram());\n }\n\n /**\n * Unbond a specified amount of staked credits to be used later\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.unbondPublic(10);\n *\n * @returns string\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 {Options} options Options for the execution\n */\n async unbondPublic(amount: number, options: Options = {}): Promise {\n const tx = await this.buildUnbondPublicTransaction(amount, options);\n return await this.networkClient.submitTransaction(tx);\n }\n\n /**\n * Build a transaction to Claim unbonded credits for later submission. If credits have been unbonded by the account\n * executing this function, this method will 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();\n *\n * @returns string\n * @param {Options} options\n */\n async buildClaimUnbondPublicTransaction(options: Options = {}): Promise {\n const {\n offlineParams = {},\n executionParams = {}\n } = options || {};\n\n let {\n programName = \"credits.aleo\",\n functionName = \"claim_unbond_public\",\n fee = executionParams?.fee || 2,\n privateFee = false,\n recordSearchParams,\n keySearchParams,\n feeRecord,\n provingKey,\n verifyingKey,\n privateKey\n } = executionParams;\n\n if (keySearchParams === undefined) {\n keySearchParams = new AleoKeyProviderParams(\n {\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 }\n\n const {\n offlineQuery,\n } = offlineParams;\n\n return await this.buildExecutionTransaction(programName, functionName, fee, privateFee, [], recordSearchParams, keySearchParams, feeRecord, provingKey, verifyingKey, privateKey, offlineQuery, this.creditsProgram());\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();\n *\n * @returns string\n * @param {Options} options\n */\n async claimUnbondPublic(options: Options = {}): Promise {\n const tx = await this.buildClaimUnbondPublicTransaction(options);\n return await this.networkClient.submitTransaction(tx);\n }\n\n /**\n * Set Validator State\n * @returns string\n * @param {boolean} validator_state\n * @param options\n */\n async setValidatorState(validator_state: boolean, options: Options = {}) {\n const {\n offlineParams = {},\n executionParams = {}\n } = options || {};\n\n let {\n programName = \"credits.aleo\",\n functionName = \"set_validator_state\",\n fee = 1,\n privateFee = false,\n recordSearchParams,\n keySearchParams,\n feeRecord,\n provingKey,\n verifyingKey,\n privateKey\n } = executionParams;\n\n if (keySearchParams === undefined) {\n keySearchParams = new AleoKeyProviderParams(\n {\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 }\n\n const {\n offlineQuery,\n } = offlineParams;\n\n return await this.execute(programName, functionName, fee, privateFee, [validator_state.toString()], recordSearchParams, keySearchParams, feeRecord, provingKey, verifyingKey, privateKey, offlineQuery);\n }\n\n /**\n * Unbond Delegator As Validator\n * @returns string\n * @param {string} address\n * @param options\n */\n async unbondDelegatorAsValidator(address:string, options: Options = {}) {\n const {\n offlineParams = {},\n executionParams = {}\n } = options || {};\n\n let {\n programName = \"credits.aleo\",\n functionName = \"unbond_delegator_as_validator\",\n fee = 1,\n privateFee = false,\n recordSearchParams,\n keySearchParams,\n feeRecord,\n provingKey,\n verifyingKey,\n privateKey\n } = executionParams;\n\n if (keySearchParams === undefined) {\n keySearchParams = new AleoKeyProviderParams(\n {\n proverUri: CREDITS_PROGRAM_KEYS.unbond_delegator_as_validator.prover,\n verifierUri: CREDITS_PROGRAM_KEYS.unbond_delegator_as_validator.verifier,\n cacheKey: \"credits.aleo/unbond_delegator_as_validator\"\n });\n }\n\n const {\n offlineQuery,\n } = offlineParams;\n\n return await this.execute(programName, functionName, fee, privateFee, [address], recordSearchParams, keySearchParams, feeRecord, provingKey, verifyingKey, privateKey, offlineQuery);\n }\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} from \"@aleohq/wasm\";\nconst KEY_STORE = \"https://testnet3.parameters.aleo.org/\";\n\nconst CREDITS_PROGRAM_KEYS = {\n bond_public: {\n locator: \"credits.aleo/bond_public\",\n prover: KEY_STORE + \"bond_public.prover.9c3547d\",\n verifier: \"bond_public.verifier.10315ae\",\n verifyingKey: VerifyingKey.bondPublicVerifier\n },\n claim_unbond_public: {\n locator: \"credits.aleo/claim_unbond_public\",\n prover: KEY_STORE + \"claim_unbond_public.prover.f8b64aa\",\n verifier: \"claim_unbond_public.verifier.8fd7445\",\n verifyingKey: VerifyingKey.claimUnbondPublicVerifier\n },\n fee_private: {\n locator: \"credits.aleo/fee_private\",\n prover: KEY_STORE + \"fee_private.prover.43fab98\",\n verifier: \"fee_private.verifier.f3dfefc\",\n verifyingKey: VerifyingKey.feePrivateVerifier\n },\n fee_public: {\n locator: \"credits.aleo/fee_public\",\n prover: KEY_STORE + \"fee_public.prover.634f153\",\n verifier: \"fee_public.verifier.09eeb4f\",\n verifyingKey: VerifyingKey.feePublicVerifier\n },\n inclusion: {\n locator: \"inclusion\",\n prover: KEY_STORE + \"inclusion.prover.cd85cc5\",\n verifier: \"inclusion.verifier.e6f3add\",\n verifyingKey: VerifyingKey.inclusionVerifier\n },\n join: {\n locator: \"credits.aleo/join\",\n prover: KEY_STORE + \"join.prover.1a76fe8\",\n verifier: \"join.verifier.4f1701b\",\n verifyingKey: VerifyingKey.joinVerifier\n },\n set_validator_state: {\n locator: \"credits.aleo/set_validator_state\",\n prover: KEY_STORE + \"set_validator_state.prover.5ce19be\",\n verifier: \"set_validator_state.verifier.730d95b\",\n verifyingKey: VerifyingKey.setValidatorStateVerifier\n },\n split: {\n locator: \"credits.aleo/split\",\n prover: KEY_STORE + \"split.prover.e6d12b9\",\n verifier: \"split.verifier.2f9733d\",\n verifyingKey: VerifyingKey.splitVerifier\n },\n transfer_private: {\n locator: \"credits.aleo/transfer_private\",\n prover: KEY_STORE + \"transfer_private.prover.2b487c0\",\n verifier: \"transfer_private.verifier.3a3cbba\",\n verifyingKey: VerifyingKey.transferPrivateVerifier\n },\n transfer_private_to_public: {\n locator: \"credits.aleo/transfer_private_to_public\",\n prover: KEY_STORE + \"transfer_private_to_public.prover.1ff64cb\",\n verifier: \"transfer_private_to_public.verifier.d5b60de\",\n verifyingKey: VerifyingKey.transferPrivateToPublicVerifier\n },\n transfer_public: {\n locator: \"credits.aleo/transfer_public\",\n prover: KEY_STORE + \"transfer_public.prover.a74565e\",\n verifier: \"transfer_public.verifier.a4c2906\",\n verifyingKey: VerifyingKey.transferPublicVerifier\n },\n transfer_public_to_private: {\n locator: \"credits.aleo/transfer_public_to_private\",\n prover: KEY_STORE + \"transfer_public_to_private.prover.1bcddf9\",\n verifier: \"transfer_public_to_private.verifier.b094554\",\n verifyingKey: VerifyingKey.transferPublicToPrivateVerifier\n },\n unbond_delegator_as_validator: {\n locator: \"credits.aleo/unbond_delegator_as_validator\",\n prover: KEY_STORE + \"unbond_delegator_as_validator.prover.115a86b\",\n verifier: \"unbond_delegator_as_validator.verifier.9585609\",\n verifyingKey: VerifyingKey.unbondDelegatorAsValidatorVerifier\n },\n unbond_public: {\n locator: \"credits.aleo/unbond_public\",\n prover: KEY_STORE + \"unbond_public.prover.9547c05\",\n verifier: \"unbond_public.verifier.09873cd\",\n verifyingKey: VerifyingKey.unbondPublicVerifier\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 \"public\",\n \"transferPublic\",\n \"transfer_public_to_private\",\n \"publicToPrivate\",\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_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 \"@aleohq/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 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_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 // 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\n resolve(worker);\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 }\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\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\n } else {\n state.a = a;\n }\n }\n };\n real.original = state;\n\n return real;\n}\nfunction __wbg_adapter_34(arg0, arg1, arg2) {\n wasm.wasm_bindgen__convert__closures__invoke1_mut__h53d50e21bb2d5c71(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_251(arg0, arg1, arg2, arg3) {\n wasm.wasm_bindgen__convert__closures__invoke2_mut__he97f6a3b9df30e2b(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));\n}\n\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\n return obj;\n }\n\n __destroy_into_raw() {\n const ptr = this.__wbg_ptr;\n this.__wbg_ptr = 0;\n\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/**\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\n return obj;\n }\n\n __destroy_into_raw() {\n const ptr = this.__wbg_ptr;\n this.__wbg_ptr = 0;\n\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/**\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\n return obj;\n }\n\n __destroy_into_raw() {\n const ptr = this.__wbg_ptr;\n this.__wbg_ptr = 0;\n\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/**\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\n return obj;\n }\n\n __destroy_into_raw() {\n const ptr = this.__wbg_ptr;\n this.__wbg_ptr = 0;\n\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/**\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\n return obj;\n }\n\n __destroy_into_raw() {\n const ptr = this.__wbg_ptr;\n this.__wbg_ptr = 0;\n\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 return KeyPair.__wrap(ret);\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/**\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\n return obj;\n }\n\n __destroy_into_raw() {\n const ptr = this.__wbg_ptr;\n this.__wbg_ptr = 0;\n\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 return OfflineQuery.__wrap(r0);\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/**\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\n return obj;\n }\n\n __destroy_into_raw() {\n const ptr = this.__wbg_ptr;\n this.__wbg_ptr = 0;\n\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 return PrivateKey.__wrap(ret);\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.address_from_private_key(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/**\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\n return obj;\n }\n\n __destroy_into_raw() {\n const ptr = this.__wbg_ptr;\n this.__wbg_ptr = 0;\n\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/**\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\n return obj;\n }\n\n __destroy_into_raw() {\n const ptr = this.__wbg_ptr;\n this.__wbg_ptr = 0;\n\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 * 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/**\n*/\nclass ProgramManager {\n\n __destroy_into_raw() {\n const ptr = this.__wbg_ptr;\n this.__wbg_ptr = 0;\n\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/**\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\n return obj;\n }\n\n __destroy_into_raw() {\n const ptr = this.__wbg_ptr;\n this.__wbg_ptr = 0;\n\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 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_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_delegator_as_validator function\n *\n * @example\n * const provingKey = ProvingKey.fromBytes(\"unbond_delegator_as_validator_proving_key.bin\");\n * provingKey.isUnbondDelegatorAsValidatorProver() ? console.log(\"Key verified\") : throw new Error(\"Invalid key\");\n *\n * @returns {boolean} returns true if the proving key is for the unbond_delegator_as_validator function, false if otherwise\n * @returns {boolean}\n */\n isUnbondDelegatorAsValidatorProver() {\n const ret = wasm.provingkey_isUnbondDelegatorAsValidatorProver(this.__wbg_ptr);\n return ret !== 0;\n }\n /**\n * Verify if the proving key is for the unbond_delegator_as_delegator function\n *\n * @example\n * const provingKey = ProvingKey.fromBytes(\"unbond_delegator_as_delegator_proving_key.bin\");\n * provingKey.isUnbondDelegatorAsDelegatorProver() ? console.log(\"Key verified\") : throw new Error(\"Invalid key\");\n *\n * @returns {boolean} returns true if the proving key is for the unbond_delegator_as_delegator 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);\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/**\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\n return obj;\n }\n\n __destroy_into_raw() {\n const ptr = this.__wbg_ptr;\n this.__wbg_ptr = 0;\n\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/**\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\n return obj;\n }\n\n __destroy_into_raw() {\n const ptr = this.__wbg_ptr;\n this.__wbg_ptr = 0;\n\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/**\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\n return obj;\n }\n\n __destroy_into_raw() {\n const ptr = this.__wbg_ptr;\n this.__wbg_ptr = 0;\n\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/**\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\n return obj;\n }\n\n __destroy_into_raw() {\n const ptr = this.__wbg_ptr;\n this.__wbg_ptr = 0;\n\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/**\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\n return obj;\n }\n\n __destroy_into_raw() {\n const ptr = this.__wbg_ptr;\n this.__wbg_ptr = 0;\n\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 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_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_delegator_as_delegator function\n *\n * @returns {VerifyingKey} Verifying key for the unbond_delegator_as_delegator function\n * @returns {VerifyingKey}\n */\n static unbondDelegatorAsValidatorVerifier() {\n const ret = wasm.verifyingkey_unbondDelegatorAsValidatorVerifier();\n return VerifyingKey.__wrap(ret);\n }\n /**\n * Returns the verifying key for the unbond_delegator_as_delegator function\n *\n * @returns {VerifyingKey} Verifying key for the unbond_delegator_as_delegator 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 * 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_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_delegator_as_delegator function\n *\n * @returns {bool}\n * @returns {boolean}\n */\n isUnbondDelegatorAsValidatorVerifier() {\n const ret = wasm.verifyingkey_isUnbondDelegatorAsValidatorVerifier(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.provingkey_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);\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/**\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\n return obj;\n }\n\n __destroy_into_raw() {\n const ptr = this.__wbg_ptr;\n this.__wbg_ptr = 0;\n\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_daafff584c71593b = function() { return handleError(function () {\n const ret = new XMLHttpRequest();\n return addHeapObject(ret);\n }, arguments) };\n imports.wbg.__wbg_overrideMimeType_1a661d17da5f8baf = function() { return handleError(function (arg0, arg1, arg2) {\n getObject(arg0).overrideMimeType(getStringFromWasm0(arg1, arg2));\n }, arguments) };\n imports.wbg.__wbg_open_56fa1eb95989f6a5 = 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_9f5007eae908c72e = function() { return handleError(function (arg0) {\n getObject(arg0).send();\n }, arguments) };\n imports.wbg.__wbg_response_f2acf2ecbe021710 = function() { return handleError(function (arg0) {\n const ret = getObject(arg0).response;\n return addHeapObject(ret);\n }, arguments) };\n imports.wbg.__wbg_new_b51585de1b234aff = 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_092e06b0f9d71865 = 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_1eead62f64ca15ce = 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_append_fda9e3432e3e88da = 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_new_55c9955722952374 = function() { return handleError(function () {\n const ret = new AbortController();\n return addHeapObject(ret);\n }, arguments) };\n imports.wbg.__wbg_signal_4bd18fb489af2d4c = function(arg0) {\n const ret = getObject(arg0).signal;\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_instanceof_Response_fc4327dbfcdf5ced = 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_ac85a3142a84caa2 = function(arg0) {\n const ret = getObject(arg0).status;\n return ret;\n };\n imports.wbg.__wbg_url_8503de97f69da463 = 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_b70de86b8e989bc0 = function(arg0) {\n const ret = getObject(arg0).headers;\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_iterator_97f0c81209c6c35a = function() {\n const ret = Symbol.iterator;\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_get_97b561fb56f034b5 = 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_cb65541d95d71282 = 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_526fc47e980da008 = function(arg0) {\n const ret = getObject(arg0).next;\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_next_ddb3312ca1c4e32a = function() { return handleError(function (arg0) {\n const ret = getObject(arg0).next();\n return addHeapObject(ret);\n }, arguments) };\n imports.wbg.__wbg_done_5c1f01fb660d73b5 = function(arg0) {\n const ret = getObject(arg0).done;\n return ret;\n };\n imports.wbg.__wbg_value_1695675138684bd5 = function(arg0) {\n const ret = getObject(arg0).value;\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_abort_654b796176d117aa = function(arg0) {\n getObject(arg0).abort();\n };\n imports.wbg.__wbg_stringify_e25465938f3f611f = 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_call_01734de55d61e11d = 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.__wbg_log_0159ca40cddf5b15 = function(arg0, arg1) {\n console.log(getStringFromWasm0(arg0, arg1));\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.__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);\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_3ec098a360da1909 = function(arg0) {\n const ret = new Array(arg0 >>> 0);\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_set_502d29070ea18557 = 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_arrayBuffer_288fb3538806e85c = function() { return handleError(function (arg0) {\n const ret = getObject(arg0).arrayBuffer();\n return addHeapObject(ret);\n }, arguments) };\n imports.wbg.__wbg_new_8125e318e6245eed = function(arg0) {\n const ret = new Uint8Array(getObject(arg0));\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_length_72e2208bbc0efc61 = function(arg0) {\n const ret = getObject(arg0).length;\n return ret;\n };\n imports.wbg.__wbg_new_43f1b47c28813cbd = 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_251(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.__wbg_new_898a68150f225f2e = function() {\n const ret = new Array();\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_push_ca1c26067ef907ac = function(arg0, arg1) {\n const ret = getObject(arg0).push(getObject(arg1));\n return ret;\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_subarray_13db269f57aa838d = function(arg0, arg1, arg2) {\n const ret = getObject(arg0).subarray(arg1 >>> 0, arg2 >>> 0);\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_getRandomValues_37fa2ca9e4e07fab = function() { return handleError(function (arg0, arg1) {\n getObject(arg0).getRandomValues(getObject(arg1));\n }, arguments) };\n imports.wbg.__wbg_buffer_085ec1f694018c4f = function(arg0) {\n const ret = getObject(arg0).buffer;\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_set_5cf90238115182c3 = function(arg0, arg1, arg2) {\n getObject(arg0).set(getObject(arg1), arg2 >>> 0);\n };\n imports.wbg.__wbg_newwithbyteoffsetandlength_6da8e527659b86aa = 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_dc1e9a60c158336d = function() { return handleError(function (arg0, arg1) {\n getObject(arg0).randomFillSync(takeObject(arg1));\n }, arguments) };\n imports.wbg.__wbg_crypto_c48a774b022d20ac = function(arg0) {\n const ret = getObject(arg0).crypto;\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_process_298734cf255a885d = function(arg0) {\n const ret = getObject(arg0).process;\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_versions_e2e78e134e3e5d01 = function(arg0) {\n const ret = getObject(arg0).versions;\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_node_1cd7a5d853dbea79 = 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_msCrypto_bcb970640f50a1e8 = function(arg0) {\n const ret = getObject(arg0).msCrypto;\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_newwithlength_e5d69174d6984cd7 = function(arg0) {\n const ret = new Uint8Array(arg0 >>> 0);\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_require_8f08ceecec0f4fee = function() { return handleError(function () {\n const ret = module.require;\n return addHeapObject(ret);\n }, arguments) };\n imports.wbg.__wbg_length_fff51ee6522a1a18 = function(arg0) {\n const ret = getObject(arg0).length;\n return ret;\n };\n imports.wbg.__wbg_get_44be0491f933a435 = function(arg0, arg1) {\n const ret = getObject(arg0)[arg1 >>> 0];\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_self_1ff1d729e9aae938 = function() { return handleError(function () {\n const ret = self.self;\n return addHeapObject(ret);\n }, arguments) };\n imports.wbg.__wbg_window_5f4faef6c12b79ec = function() { return handleError(function () {\n const ret = window.window;\n return addHeapObject(ret);\n }, arguments) };\n imports.wbg.__wbg_globalThis_1d39714405582d3c = function() { return handleError(function () {\n const ret = globalThis.globalThis;\n return addHeapObject(ret);\n }, arguments) };\n imports.wbg.__wbg_global_651f05c6a0944d1c = 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_581967eacc0e2604 = function(arg0, arg1) {\n const ret = new Function(getStringFromWasm0(arg0, arg1));\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_has_c5fcd020291e56b8 = 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_8eaf01857a5bb21f = function(arg0, arg1) {\n const ret = getObject(arg0).fetch(getObject(arg1));\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_fetch_b5d6bebed1e6c2d2 = function(arg0) {\n const ret = fetch(getObject(arg0));\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_b2267541e2a73865 = function(arg0, arg1, arg2) {\n const ret = getObject(arg0).then(getObject(arg1), getObject(arg2));\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_then_f7e06ee3c11698eb = function(arg0, arg1) {\n const ret = getObject(arg0).then(getObject(arg1));\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_resolve_53698b95aaf7fcf8 = function(arg0) {\n const ret = Promise.resolve(getObject(arg0));\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_waitAsync_60fb5e2e86467e31 = function() {\n const ret = Atomics.waitAsync;\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_new_a0af68041688e8fd = function(arg0) {\n const ret = new Int32Array(getObject(arg0));\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_waitAsync_73fd6eb3bace0a8d = function(arg0, arg1, arg2) {\n const ret = Atomics.waitAsync(getObject(arg0), arg1, arg2);\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_async_e1a2a669aacf35ff = function(arg0) {\n const ret = getObject(arg0).async;\n return ret;\n };\n imports.wbg.__wbg_value_555e4f564193db05 = function(arg0) {\n const ret = getObject(arg0).value;\n return addHeapObject(ret);\n };\n imports.wbg.__wbindgen_link_22046963fe0b707a = 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_8e7322f46d5d019c = 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_f0bd0280573b7084 = function(arg0, arg1) {\n getObject(arg0).onmessage = getObject(arg1);\n };\n imports.wbg.__wbg_of_3f69007bb4eeae65 = 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_8c609e2bde333d9c = function() { return handleError(function (arg0, arg1) {\n getObject(arg0).postMessage(getObject(arg1));\n }, arguments) };\n imports.wbg.__wbg_data_ab99ae4a2e1e8bc9 = function(arg0) {\n const ret = getObject(arg0).data;\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_newwithstrandinit_cad5cd6038c7ff5d = 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_status_114ef6fe27fb8b00 = function() { return handleError(function (arg0) {\n const ret = getObject(arg0).status;\n return ret;\n }, arguments) };\n imports.wbg.__wbg_responseText_da275667251fd153 = 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_wrapper5654 = function(arg0, arg1, arg2) {\n const ret = makeMutClosure(arg0, arg1, 543, __wbg_adapter_34);\n return addHeapObject(ret);\n };\n imports.wbg.__wbindgen_closure_wrapper5677 = function(arg0, arg1, arg2) {\n const ret = makeMutClosure(arg0, arg1, 543, __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:169,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 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 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 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","response","fetch","ok","status","post","options","method","AleoNetworkClient","host","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","headers","AleoKeyProviderParams","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","fetchKeys","getVerifyingKey","bondPublicKeys","CREDITS_PROGRAM_KEYS","bond_public","prover","verifier","locator","claimUnbondPublicKeys","claim_unbond_public","transferKeys","visibility","PRIVATE_TRANSFER","transfer_private","PRIVATE_TO_PUBLIC_TRANSFER","transfer_private_to_public","PUBLIC_TRANSFER","transfer_public","PUBLIC_TO_PRIVATE_TRANSFER","transfer_public_to_private","joinKeys","join","splitKeys","split","feePrivateKeys","fee_private","feePublicKeys","fee_public","inclusion","set_validator_state","unbond_delegator_as_validator","unbond_public","text","inner","unBondPublicKeys","OfflineSearchParams","verifyCreditsKeys","bondPublicKeyParams","claimUnbondPublicKeyParams","feePrivateKeyParams","feePublicKeyParams","inclusionKeyParams","joinKeyParams","setValidatorStateKeyParams","splitKeyParams","transferPrivateKeyParams","transferPrivateToPublicKeyParams","transferPublicKeyParams","transferPublicToPrivateKeyParams","unbondDelegatorAsValidatorKeyParams","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","isUnbondDelegatorAsValidatorProver","isUnbondDelegatorAsValidatorVerifier","isUnbondPublicProver","isUnbondPublicVerifier","insertBondPublicKeys","bondPublicVerifier","insertClaimUnbondPublicKeys","claimUnbondPublicVerifier","insertFeePrivateKeys","feePrivateVerifier","insertFeePublicKeys","feePublicVerifier","insertJoinKeys","joinVerifier","insertSetValidatorStateKeys","setValidatorStateVerifier","insertSplitKeys","splitVerifier","insertTransferPrivateKeys","transferPrivateVerifier","insertTransferPrivateToPublicKeys","transferPrivateToPublicVerifier","insertTransferPublicKeys","transferPublicVerifier","insertTransferPublicToPrivateKeys","transferPublicToPrivateVerifier","insertUnbondDelegatorAsValidatorKeys","unbondDelegatorAsValidatorVerifier","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","keyPair","synthesizeKeyPair","buildTransferTransaction","amount","recipient","transferType","validateTransferType","transferProvingKey","transferVerifyingKey","requiresAmountRecord","buildTransferPublicTransaction","transfer","buildBondPublicTransaction","Math","trunc","offlineParams","executionParams","creditsProgram","bondPublic","buildUnbondPublicTransaction","unbondPublic","buildClaimUnbondPublicTransaction","claimUnbondPublic","setValidatorState","validator_state","unbondDelegatorAsValidator","verifyExecution","executionResponse","getExecution","getFunctionId","verifyFunctionExecution","createProgramFromSource","getCreditsProgram","verifyProgram","PRIVATE_TRANSFER_TYPES","VALID_TRANSFER_TYPES","inclusionVerifier","Set","initializeWasm","spawnWorker","module","memory","addEventListener","event","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","name","isArray","builtInMatches","exec","call","className","JSON","stringify","_","stack","makeMutClosure","arg0","arg1","dtor","f","state","a","b","cnt","real","args","__wbindgen_export_3","original","__wbg_adapter_34","arg2","wasm_bindgen__convert__closures__invoke1_mut__h53d50e21bb2d5c71","_assertClass","instance","klass","passArray8ToWasm0","verifyFunctionExecution$1","verifying_key","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_251","arg3","wasm_bindgen__convert__closures__invoke2_mut__he97f6a3b9df30e2b","__wrap","Object","create","prototype","__destroy_into_raw","free","__wbg_address_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","Execution","__wbg_execution_free","execution_toString","execution_fromString","ExecutionResponse","__wbg_executionresponse_free","getOutputs","executionresponse_getOutputs","executionresponse_getExecution","executionresponse_getKeys","KeyPair","getProvingKey","executionresponse_getProvingKey","ProvingKey$1","executionresponse_getVerifyingKey","executionresponse_getFunctionId","executionresponse_getProgram","Field","__wbg_field_free","field_toString","field","field_fromString","__wbg_keypair_free","proving_key","ptr1","keypair_new","keypair_provingKey","keypair_verifyingKey","OfflineQuery","__wbg_offlinequery_free","state_root","offlinequery_new","addStatePath","commitment","state_path","len1","offlinequery_addStatePath","offlinequery_toString","s","offlinequery_fromString","__wbg_privatekey_free","privatekey_new","privatekey_from_seed_unchecked","privatekey_from_string","privatekey_to_string","privatekey_to_view_key","to_address","Address$1","privatekey_sign","newEncrypted","secret","privatekey_newEncrypted","PrivateKeyCiphertext$1","privatekey_toCiphertext","privatekey_fromPrivateKeyCiphertext","__wbg_privatekeyciphertext_free","encryptPrivateKey","decryptToPrivateKey","privatekeyciphertext_decryptToPrivateKey","privatekeyciphertext_toString","privatekeyciphertext_fromString","__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","isEqual","other","program_isEqual","program_getImports","__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","__wbg_provingkey_free","provingkey_isBondPublicProver","provingkey_isClaimUnbondPublicProver","provingkey_isFeePrivateProver","provingkey_isFeePublicProver","provingkey_isInclusionProver","provingkey_isJoinProver","provingkey_isSetValidatorStateProver","provingkey_isSplitProver","provingkey_isTransferPrivateProver","provingkey_isTransferPrivateToPublicProver","provingkey_isTransferPublicProver","provingkey_isTransferPublicToPrivateProver","provingkey_isUnbondDelegatorAsValidatorProver","provingkey_isUnbondPublicProver","checksum","provingkey_checksum","copy","provingkey_copy","bytes","provingkey_fromBytes","string","provingkey_fromString","provingkey_toBytes","v1","provingkey_toString","__wbg_recordciphertext_free","recordciphertext_fromString","recordciphertext_toString","recordciphertext_decrypt","recordciphertext_isOwner","__wbg_recordplaintext_free","recordplaintext_commitment","Field$1","recordplaintext_fromString","recordplaintext_toString","recordplaintext_microcredits","recordplaintext_nonce","deferred4_0","deferred4_1","recordplaintext_serialNumberString","r3","Signature","__wbg_signature_free","signature_verify","signature_from_string","signature_to_string","__wbg_transaction_free","transaction_fromString","transaction_toString","transactionId","transaction_transactionId","transactionType","transaction_transactionType","__wbg_verifyingkey_free","verifyingkey_bondPublicVerifier","verifyingkey_claimUnbondPublicVerifier","verifyingkey_feePrivateVerifier","verifyingkey_feePublicVerifier","verifyingkey_inclusionVerifier","verifyingkey_joinVerifier","verifyingkey_setValidatorStateVerifier","verifyingkey_splitVerifier","verifyingkey_transferPrivateVerifier","verifyingkey_transferPrivateToPublicVerifier","verifyingkey_transferPublicVerifier","verifyingkey_transferPublicToPrivateVerifier","verifyingkey_unbondDelegatorAsValidatorVerifier","verifyingkey_unbondPublicVerifier","verifyingkey_isBondPublicVerifier","verifyingkey_isClaimUnbondPublicVerifier","verifyingkey_isFeePrivateVerifier","verifyingkey_isFeePublicVerifier","verifyingkey_isInclusionVerifier","verifyingkey_isJoinVerifier","verifyingkey_isSetValidatorStateVerifier","verifyingkey_isSplitVerifier","verifyingkey_isTransferPrivateVerifier","verifyingkey_isTransferPrivateToPublicVerifier","verifyingkey_isTransferPublicVerifier","verifyingkey_isTransferPublicToPrivateVerifier","verifyingkey_isUnbondDelegatorAsValidatorVerifier","verifyingkey_isUnbondPublicVerifier","verifyingkey_checksum","verifyingkey_fromBytes","verifyingkey_fromString","verifyingkey_toBytes","verifyingkey_toString","__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_daafff584c71593b","XMLHttpRequest","arguments","__wbg_overrideMimeType_1a661d17da5f8baf","overrideMimeType","__wbg_open_56fa1eb95989f6a5","arg4","arg5","open","__wbg_send_9f5007eae908c72e","send","__wbg_response_f2acf2ecbe021710","__wbg_new_b51585de1b234aff","__wbindgen_string_new","__wbg_set_092e06b0f9d71865","Reflect","__wbg_new_1eead62f64ca15ce","Headers","__wbindgen_object_clone_ref","__wbg_append_fda9e3432e3e88da","append","__wbg_new_55c9955722952374","AbortController","__wbg_signal_4bd18fb489af2d4c","signal","__wbg_instanceof_Response_fc4327dbfcdf5ced","result","__wbg_status_ac85a3142a84caa2","__wbg_url_8503de97f69da463","__wbg_headers_b70de86b8e989bc0","__wbg_iterator_97f0c81209c6c35a","Symbol","iterator","__wbg_get_97b561fb56f034b5","__wbindgen_is_function","__wbg_call_cb65541d95d71282","__wbindgen_is_object","__wbg_next_526fc47e980da008","next","__wbg_next_ddb3312ca1c4e32a","__wbg_done_5c1f01fb660d73b5","done","__wbg_value_1695675138684bd5","__wbg_abort_654b796176d117aa","abort","__wbg_stringify_e25465938f3f611f","__wbindgen_string_get","__wbg_call_01734de55d61e11d","__wbg_keypair_new","__wbg_log_0159ca40cddf5b15","__wbg_transaction_new","Transaction$1","__wbindgen_bigint_from_u64","__wbindgen_module","__wbg_init","__wbindgen_wasm_module","__wbindgen_memory","__wbg_spawnWorker_f6acaddb2e29dc4a","__wbg_executionresponse_new","ExecutionResponse$1","__wbg_newwithlength_3ec098a360da1909","__wbg_set_502d29070ea18557","__wbindgen_cb_drop","__wbg_arrayBuffer_288fb3538806e85c","__wbg_new_8125e318e6245eed","__wbg_length_72e2208bbc0efc61","__wbg_new_43f1b47c28813cbd","state0","cb0","__wbg_new_898a68150f225f2e","__wbg_push_ca1c26067ef907ac","__wbindgen_number_new","__wbg_new_abda76e883ba8a5f","__wbg_stack_658279fe44541cf6","__wbg_error_f851667af71bcfc6","deferred0_0","deferred0_1","__wbg_subarray_13db269f57aa838d","__wbg_getRandomValues_37fa2ca9e4e07fab","getRandomValues","__wbg_buffer_085ec1f694018c4f","__wbg_set_5cf90238115182c3","__wbg_newwithbyteoffsetandlength_6da8e527659b86aa","__wbg_randomFillSync_dc1e9a60c158336d","randomFillSync","__wbg_crypto_c48a774b022d20ac","crypto","__wbg_process_298734cf255a885d","process","__wbg_versions_e2e78e134e3e5d01","versions","__wbg_node_1cd7a5d853dbea79","node","__wbindgen_is_string","__wbg_msCrypto_bcb970640f50a1e8","msCrypto","__wbg_newwithlength_e5d69174d6984cd7","__wbg_require_8f08ceecec0f4fee","require","__wbg_length_fff51ee6522a1a18","__wbg_get_44be0491f933a435","__wbg_self_1ff1d729e9aae938","self","__wbg_window_5f4faef6c12b79ec","window","__wbg_globalThis_1d39714405582d3c","globalThis","__wbg_global_651f05c6a0944d1c","global","__wbindgen_is_undefined","__wbg_newnoargs_581967eacc0e2604","Function","__wbg_has_c5fcd020291e56b8","__wbg_fetch_8eaf01857a5bb21f","__wbg_fetch_b5d6bebed1e6c2d2","__wbindgen_debug_string","__wbindgen_throw","__wbindgen_rethrow","__wbg_then_b2267541e2a73865","then","__wbg_then_f7e06ee3c11698eb","__wbg_resolve_53698b95aaf7fcf8","__wbg_waitAsync_60fb5e2e86467e31","Atomics","waitAsync","__wbg_new_a0af68041688e8fd","__wbg_waitAsync_73fd6eb3bace0a8d","__wbg_async_e1a2a669aacf35ff","__wbg_value_555e4f564193db05","__wbindgen_link_22046963fe0b707a","encodeURIComponent","__wbg_new_8e7322f46d5d019c","__wbg_setonmessage_f0bd0280573b7084","onmessage","__wbg_of_3f69007bb4eeae65","of","__wbg_postMessage_8c609e2bde333d9c","__wbg_data_ab99ae4a2e1e8bc9","__wbg_newwithstrandinit_cad5cd6038c7ff5d","Request","__wbg_status_114ef6fe27fb8b00","__wbg_responseText_da275667251fd153","responseText","__wbindgen_closure_wrapper5654","__wbindgen_closure_wrapper5677","__wbg_init_memory","maybe_memory","Memory","initial","maximum","shared","__wbg_finalize_init","exports","__wbindgen_start","initSync","Module","input","freeze","__proto__","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","assign","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","FinalizationRegistry","newCount","isProxyReleased","Proxy","_target","unregister","unregisterProxy","r","p","bind","_thisArg","rawArgumentList","last","processArguments","construct","register","registerProxy","processed","v","arr","concat","handler","serializedValue","msg","floor","random","Number","MAX_SAFE_INTEGER"],"sourceRoot":""} \ No newline at end of file diff --git a/383.bundle.js b/383.bundle.js index 2d59b078c..1bddeddae 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,r,t)=>{t.a(e,(async(e,n)=>{try{t.d(r,{AleoKeyProvider:()=>y,AleoKeyProviderParams:()=>p,PrivateKey:()=>o._q,ProgramManager:()=>d,ProgramManagerBase:()=>o.L,initThreadPool:()=>o.CK,verifyFunctionExecution:()=>o.hz});var o=t(9933),i=e([o]);o=(i.then?(await i)():i)[0];async function a(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 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.10"}}setAccount(e){this.account=e}getAccount(){return this.account}setHost(e){this.host=e+"/testnet"}async fetchData(e="/"){try{const r=await a(this.host+e,{headers:this.headers});return await r.json()}catch(e){throw new Error("Error fetching data.")}}async findUnspentRecords(e,r,t,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,f,h=0,p=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");l=this.account._privateKey}else try{l=t instanceof o._q?t:o._q.from_string(t)}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.");f=e}catch(e){throw new Error("Error fetching latest block height.")}if(u="number"==typeof r&&r<=f?r:f,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(r.microcredits()>n[e]){if(e+=1,s.push(r),"number"==typeof i&&(p+=r.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),h+=1,h>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 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 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 o.$r.fromString(e)}catch(r){try{return o.$r.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 o.$r?e:await this.getProgramObject(e)).getImports();for(let e=0;e0&&!v)try{v=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 o.L.buildExecutionTransaction(w,d,t,a,n,h,this.host,v,p,y,m,b,l)}async execute(e){const r=await this.buildExecutionTransaction(e);return await this.networkClient.submitTransaction(r)}async run(e,r,t,n,i,a,s,c,u,l){let f=u;if(void 0===u&&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(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(f,e,r,t,n,!1,i,s,c,this.host,l)}async join(e,r,t,n,i,a,s,c){let u,l,h=s;if(void 0===s&&void 0!==this.account&&(h=this.account.privateKey()),void 0===h)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 f(`Error finding fee keys. Key finder response: '${e}'. Please ensure your key provider is configured correctly.`)}const[p,y]=u,[d,v]=l;try{a=n?await this.getCreditsRecord(t,[],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{e=e instanceof o.PD?e:o.PD.fromString(e),r=r instanceof o.PD?r:o.PD.fromString(r)}catch(e){throw f("Records provided are not valid. Please ensure they are valid plaintext records.")}const g=await o.L.buildJoinTransaction(h,e,r,t,a,this.host,d,v,p,y,c);return await this.networkClient.submitTransaction(g)}async split(e,r,t,n){let i,a=t;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 f(`Error finding fee keys. Key finder response: '${e}'. Please ensure your key provider is configured correctly.`)}const[s,c]=i;try{r=r instanceof o.PD?r:o.PD.fromString(r)}catch(e){throw f("Record provided is not valid. Please ensure it is a valid plaintext record.")}const u=await o.L.buildSplitTransaction(a,e,r,this.host,s,c,n);return await this.networkClient.submitTransaction(u)}async synthesizeKeys(e,r,t,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,r,t,i);return[n.provingKey(),n.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,n,i,a,s,l,h,p,y){t=u(t);let d,v,g=p;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{d=i?await this.keyProvider.feePrivateKeys():await this.keyProvider.feePublicKeys(),v=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[w,m]=d,[b,_]=v;try{const e=[];c(t)?(l=await this.getCreditsRecord(n,[],l,s),e.push(l.nonce())):l=void 0,h=i?await this.getCreditsRecord(n,e,h,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.`)}return await o.L.buildTransferTransaction(g,e,r,t,a,l,n,h,this.host,b,_,w,m,y)}async buildTransferPublicTransaction(e,r,t,n,o,i){return this.buildTransferTransaction(e,t,"public",n,!1,r,void 0,void 0,void 0,o,i)}async buildTransferPublicAsSignerTransaction(e,r,t,n,o){return this.buildTransferTransaction(e,r,"public",t,!1,void 0,void 0,void 0,void 0,n,o)}async transfer(e,r,t,n,o,i,a,s,c,u,l){const f=await this.buildTransferTransaction(e,r,t,n,o,i,a,s,c,u,l);return await this.networkClient.submitTransaction(f)}async buildBondPublicTransaction(e,r,t,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,r,t,`${i.toString()}u64`],keySearchParams:f=new p({proverUri:g.bond_public.prover,verifierUri:g.bond_public.verifier,cacheKey:"credits.aleo/bond_public"}),program:h=this.creditsProgram(),...y}=o,d={programName:a,functionName:s,fee:c,privateFee:u,inputs:l,keySearchParams:f,...y};return await this.buildExecutionTransaction(d)}async bondPublic(e,r,t,n,o={}){const i=await this.buildBondPublicTransaction(e,r,t,n,o);return await this.networkClient.submitTransaction(i)}async buildBondValidatorTransaction(e,r,t,n,o={}){const i=Math.trunc(1e6*t),a=Math.trunc(n),{programName:s="credits.aleo",functionName:c="bond_validator",fee:u=o.fee||.86,privateFee:l=!1,inputs:f=[e,r,`${i.toString()}u64`,`${a.toString()}u8`],keySearchParams:h=new p({proverUri:g.bond_validator.prover,verifierUri:g.bond_validator.verifier,cacheKey:"credits.aleo/bond_validator"}),program:y=this.creditsProgram(),...d}=o,v={programName:s,functionName:c,fee:u,privateFee:l,inputs:f,keySearchParams:h,...d};return await this.buildExecutionTransaction(v)}async bondValidator(e,r,t,n,o={}){const i=await this.buildBondValidatorTransaction(e,r,t,n,o);return await this.networkClient.submitTransaction(i)}async buildUnbondPublicTransaction(e,r,t={}){const n=Math.trunc(1e6*r),{programName:o="credits.aleo",functionName:i="unbond_public",fee:a=t.fee||1.3,privateFee:s=!1,inputs:c=[e,`${n.toString()}u64`],keySearchParams:u=new p({proverUri:g.unbond_public.prover,verifierUri:g.unbond_public.verifier,cacheKey:"credits.aleo/unbond_public"}),program:l=this.creditsProgram(),...f}=t,h={programName:o,functionName:i,fee:a,privateFee:s,inputs:c,keySearchParams:u,...f};return this.buildExecutionTransaction(h)}async unbondPublic(e,r,t={}){const n=await this.buildUnbondPublicTransaction(e,r,t);return await this.networkClient.submitTransaction(n)}async buildClaimUnbondPublicTransaction(e,r={}){const{programName:t="credits.aleo",functionName:n="claim_unbond_public",fee:o=r.fee||2,privateFee:i=!1,inputs:a=[e],keySearchParams:s=new p({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:n,fee:o,privateFee:i,inputs:a,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:n="set_validator_state",fee:o=1,privateFee:i=!1,inputs:a=[e.toString()],keySearchParams:s=new p({proverUri:g.set_validator_state.prover,verifierUri:g.set_validator_state.verifier,cacheKey:"credits.aleo/set_validator_state"}),...c}=r,u={programName:t,functionName:n,fee:o,privateFee:i,inputs:a,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(),n=e.getProgram(),i=e.getVerifyingKey();return(0,o.hz)(r,i,n,t)}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,r,t,n){try{return t instanceof o.PD?t:o.PD.fromString(t)}catch(t){try{const t=this.recordProvider;return await t.findCreditsRecord(e,!0,r,n)}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 c(e){return w.has(e)}function u(e){return m.has(e)?e:f(`Invalid transfer type '${e}'. Valid transfer types are 'private', 'privateToPublic', 'public', and 'publicToPrivate'.`)}const v=o.SF.baseUrl();function l(e){const r=o.XV[e.verifyingKey];if(!r)throw new Error("Invalid method name: "+e.verifyingKey);return{locator:e.locator,prover:e.prover,verifier:e.verifier,verifyingKey:r}}const g={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())},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 f(e){throw console.error(e),e}n()}catch(K){n(K)}}))},5383:(e,r,t)=>{t.a(e,(async(e,r)=>{try{var n=t(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,r){if(e){if("string"==typeof e)return c(e,r);var t=Object.prototype.toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?c(e,r):void 0}}function c(e,r){(null==r||r>e.length)&&(r=e.length);for(var t=0,n=new Array(r);t=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;--t){var o=this.tryEntries[t];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--r){var t=this.tryEntries[r];if(t.finallyLoc===e)return this.complete(t.completion,t.afterLoc),C(t),w}},catch:function(e){for(var r=this.tryEntries.length-1;r>=0;--r){var t=this.tryEntries[r];if(t.tryLoc===e){var n=t.completion;if("throw"===n.type){var o=n.arg;C(t)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(r,t,n){return this.delegate={iterator:R(r),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=e),w}},r}function h(e,r,t,n,o,i,a){try{var s=e[i](a),c=s.value}catch(e){return void t(e)}s.done?r(c):Promise.resolve(c).then(n,o)}function p(e){return function(){var r=this,t=arguments;return new Promise((function(n,o){var i=e.apply(r,t);function a(e){h(i,n,o,a,s,"next",e)}function s(e){h(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.aleo.org/v1",d=new n.AleoKeyProvider,v=new n.ProgramManager(y,d,void 0);d.useCache(!0),self.postMessage({type:"ALEO_WORKER_READY"});var g=null;self.addEventListener("message",(function(e){if("ALEO_EXECUTE_PROGRAM_LOCAL"===e.data.type){var r=e.data,t=r.localProgram,o=r.aleoFunction,i=r.inputs,c=r.privateKey;console.log("Web worker: Executing function locally...");var h=performance.now();p(f().mark((function e(){var r,a,s,u,l,p,y,w,m,b;return f().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,r=n.PrivateKey.from_string(c),a=v.createProgramFromSource(t),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=v.networkClient.getProgramImports(t),g===t){e.next=14;break}return e.next=11,v.synthesizeKeys(t,o,i,r);case 11:p=e.sent,v.keyProvider.cacheKeys(u,p),g=t;case 14:return y=new n.AleoKeyProviderParams({cacheKey:u}),e.next=17,v.run(t,o,i,!1,l,y,void 0,void 0,r,void 0);case 17:w=e.sent,console.log("Web worker: Local execution completed in ".concat(performance.now()-h," 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();p(f().mark((function e(){var r,t,o,i,a,s,c;return f().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,r=n.PrivateKey.from_string(P),e.next=4,v.networkClient.getProgramObject(m);case 4:if(t=e.sent,o=t.id(),t.hasFunction(b)){e.next=8;break}throw"Program ".concat(o," does not contain function ").concat(b);case 8:if(i="".concat(o,":").concat(b),v.keyProvider.containsKeys(i)){e.next=15;break}return console.log("Web worker: Synthesizing proving & verifying keys for: '".concat(o,":").concat(b,"'")),e.next=13,v.synthesizeKeys(m,b,_,r);case 13:a=e.sent,v.keyProvider.cacheKeys(i,a);case 15:return s=new n.AleoKeyProviderParams({cacheKey:i}),"string"==typeof T&&v.setHost(T),e.next=19,v.execute({programName:o,functionName:b,fee:E,privateFee:k,inputs:_,keySearchParams:s,feeRecord:K,privateKey:r});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,v.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,N=x.privateKey,C=x.aleoFunction,F=x.inputs,R=x.url;console.log("Web worker: Estimating execution fee...");var L=performance.now();p(f().mark((function e(){var r,t,o,i,c,h,p,y,d,g,w;return f().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,r=n.PrivateKey.from_string(N),e.next=4,v.networkClient.getProgramObject(O);case 4:if(t=e.sent,o=t.id(),t.getFunctions().includes(C)){e.next=8;break}throw"Program ".concat(o," does not contain function ").concat(C);case 8:return i="".concat(o,":").concat(C),e.next=11,v.networkClient.getProgramImports(O);case 11:if(c=e.sent,v.keyProvider.containsKeys(i)){e.next=18;break}return console.log("Web worker: Synthesizing proving & verifying keys for: '".concat(o,":").concat(C,"'")),e.next=16,v.synthesizeKeys(t.toString(),C,F,r);case 16:h=e.sent,v.keyProvider.cacheKeys(i,h);case 18:return p=v.keyProvider.getKeys(i),m=2,y=l(f=p)||u(f,m)||s(f,m)||a(),d=y[0],g=y[1],e.next=21,n.ProgramManagerBase.estimateExecutionFee(r,O,C,F,R,c,d,g,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 f,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();p(f().mark((function e(){var r,t;return f().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,v.networkClient.getProgramImports(M);case 3:return r=e.sent,console.log("Estimating deployment fee.."),e.next=7,n.ProgramManagerBase.estimateDeploymentFee(M,r);case 7:t=e.sent,console.log("Web worker: Deployment fee estimation completed in ".concat(performance.now()-I," ms")),console.log("Deployment Fee Estimation: ".concat(t," microcredits")),self.postMessage({type:"DEPLOYMENT_FEE_ESTIMATION_COMPLETED",deploymentFee:Number(t)/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,U=D.privateKey,$=D.amountCredits,j=D.recipient,B=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(B,"..."));var G=performance.now();p(f().mark((function e(){var r;return f().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,"string"==typeof X&&v.setHost(X),e.next=4,v.transfer($,j,B,V,z,Address.from_private_key(PrivateKey.from_string(U)).to_string(),void 0,W,H,n.PrivateKey.from_string(U),void 0);case 4:r=e.sent,console.log("Web worker: Transfer transaction ".concat(r," created in ").concat(performance.now()-G," ms")),self.postMessage({type:"TRANSFER_TRANSACTION_COMPLETED",transferTransaction:r}),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,v.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,re=Y.url;console.log("Web worker: Creating deployment...");var te=performance.now();p(f().mark((function e(){var r,t,o;return f().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,"string"==typeof re&&v.setHost(re),r=v.createProgramFromSource(q),t=!1,e.prev=4,e.next=7,v.networkClient.getProgram(r.id());case 7:t=!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(!t){e.next=15;break}throw"Program ".concat(r.id()," already exists on the network");case 15:return console.log("fee is: ",Q),e.next=18,v.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()-te," 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,v.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(f().mark((function e(){var r;return f().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,"string"==typeof se&&v.setHost(se),e.next=4,v.split(oe,ie,n.PrivateKey.from_string(ae),void 0);case 4:r=e.sent,console.log("Web worker: Split transaction ".concat(r," created in ").concat(performance.now()-ce," ms")),self.postMessage({type:"SPLIT_TRANSACTION_COMPLETED",splitTransaction:r}),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,v.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,fe=ue.recordTwo,he=ue.fee,pe=ue.privateFee,ye=ue.feeRecord,de=ue.privateKey,ve=ue.url;console.log("Web worker: Creating join...");var ge=performance.now();p(f().mark((function e(){var r;return f().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,"string"==typeof ve&&v.setHost(ve),e.next=4,v.join(le,fe,he,pe,void 0,ye,n.PrivateKey.from_string(de),void 0);case 4:r=e.sent,console.log("Web worker: Join transaction ".concat(r," created in ").concat(performance.now()-ge," ms")),self.postMessage({type:"JOIN_TRANSACTION_COMPLETED",joinTransaction:r}),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,v.setHost(y),e.finish(13);case 16:case"end":return e.stop()}}),e,null,[[0,9,13,16]])})))()}})),r()}catch(w){r(w)}}),1)}}]); +(self.webpackChunkaleo_website=self.webpackChunkaleo_website||[]).push([[383],{5052:(e,r,t)=>{t.a(e,(async(e,n)=>{try{t.d(r,{AleoKeyProvider:()=>y,AleoKeyProviderParams:()=>p,PrivateKey:()=>o._q,ProgramManager:()=>d,ProgramManagerBase:()=>o.L,initThreadPool:()=>o.CK,verifyFunctionExecution:()=>o.hz});var o=t(9933),i=e([o]);o=(i.then?(await i)():i)[0];async function a(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 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.11"}}setAccount(e){this.account=e}getAccount(){return this.account}setHost(e){this.host=e+"/testnet"}async fetchData(e="/"){try{const r=await a(this.host+e,{headers:this.headers});return await r.json()}catch(e){throw new Error("Error fetching data.")}}async findUnspentRecords(e,r,t,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,f,h=0,p=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");l=this.account._privateKey}else try{l=t instanceof o._q?t:o._q.from_string(t)}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.");f=e}catch(e){throw new Error("Error fetching latest block height.")}if(u="number"==typeof r&&r<=f?r:f,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(r.microcredits()>n[e]){if(e+=1,s.push(r),"number"==typeof i&&(p+=r.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),h+=1,h>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 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 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 o.$r.fromString(e)}catch(r){try{return o.$r.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 o.$r?e:await this.getProgramObject(e)).getImports();for(let e=0;e0&&!v)try{v=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 o.L.buildExecutionTransaction(w,d,t,a,n,h,this.host,v,p,y,m,b,l)}async execute(e){const r=await this.buildExecutionTransaction(e);return await this.networkClient.submitTransaction(r)}async run(e,r,t,n,i,a,s,c,u,l){let f=u;if(void 0===u&&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(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(f,e,r,t,n,!1,i,s,c,this.host,l)}async join(e,r,t,n,i,a,s,c){let u,l,h=s;if(void 0===s&&void 0!==this.account&&(h=this.account.privateKey()),void 0===h)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 f(`Error finding fee keys. Key finder response: '${e}'. Please ensure your key provider is configured correctly.`)}const[p,y]=u,[d,v]=l;try{a=n?await this.getCreditsRecord(t,[],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{e=e instanceof o.PD?e:o.PD.fromString(e),r=r instanceof o.PD?r:o.PD.fromString(r)}catch(e){throw f("Records provided are not valid. Please ensure they are valid plaintext records.")}const g=await o.L.buildJoinTransaction(h,e,r,t,a,this.host,d,v,p,y,c);return await this.networkClient.submitTransaction(g)}async split(e,r,t,n){let i,a=t;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 f(`Error finding fee keys. Key finder response: '${e}'. Please ensure your key provider is configured correctly.`)}const[s,c]=i;try{r=r instanceof o.PD?r:o.PD.fromString(r)}catch(e){throw f("Record provided is not valid. Please ensure it is a valid plaintext record.")}const u=await o.L.buildSplitTransaction(a,e,r,this.host,s,c,n);return await this.networkClient.submitTransaction(u)}async synthesizeKeys(e,r,t,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,r,t,i);return[n.provingKey(),n.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,n,i,a,s,l,h,p,y){t=u(t);let d,v,g=p;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{d=i?await this.keyProvider.feePrivateKeys():await this.keyProvider.feePublicKeys(),v=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[w,m]=d,[b,_]=v;try{const e=[];c(t)?(l=await this.getCreditsRecord(n,[],l,s),e.push(l.nonce())):l=void 0,h=i?await this.getCreditsRecord(n,e,h,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.`)}return await o.L.buildTransferTransaction(g,e,r,t,a,l,n,h,this.host,b,_,w,m,y)}async buildTransferPublicTransaction(e,r,t,n,o,i){return this.buildTransferTransaction(e,t,"public",n,!1,r,void 0,void 0,void 0,o,i)}async buildTransferPublicAsSignerTransaction(e,r,t,n,o){return this.buildTransferTransaction(e,r,"public",t,!1,void 0,void 0,void 0,void 0,n,o)}async transfer(e,r,t,n,o,i,a,s,c,u,l){const f=await this.buildTransferTransaction(e,r,t,n,o,i,a,s,c,u,l);return await this.networkClient.submitTransaction(f)}async buildBondPublicTransaction(e,r,t,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,r,t,`${i.toString()}u64`],keySearchParams:f=new p({proverUri:g.bond_public.prover,verifierUri:g.bond_public.verifier,cacheKey:"credits.aleo/bond_public"}),program:h=this.creditsProgram(),...y}=o,d={programName:a,functionName:s,fee:c,privateFee:u,inputs:l,keySearchParams:f,...y};return await this.buildExecutionTransaction(d)}async bondPublic(e,r,t,n,o={}){const i=await this.buildBondPublicTransaction(e,r,t,n,o);return await this.networkClient.submitTransaction(i)}async buildBondValidatorTransaction(e,r,t,n,o={}){const i=Math.trunc(1e6*t),a=Math.trunc(n),{programName:s="credits.aleo",functionName:c="bond_validator",fee:u=o.fee||.86,privateFee:l=!1,inputs:f=[e,r,`${i.toString()}u64`,`${a.toString()}u8`],keySearchParams:h=new p({proverUri:g.bond_validator.prover,verifierUri:g.bond_validator.verifier,cacheKey:"credits.aleo/bond_validator"}),program:y=this.creditsProgram(),...d}=o,v={programName:s,functionName:c,fee:u,privateFee:l,inputs:f,keySearchParams:h,...d};return await this.buildExecutionTransaction(v)}async bondValidator(e,r,t,n,o={}){const i=await this.buildBondValidatorTransaction(e,r,t,n,o);return await this.networkClient.submitTransaction(i)}async buildUnbondPublicTransaction(e,r,t={}){const n=Math.trunc(1e6*r),{programName:o="credits.aleo",functionName:i="unbond_public",fee:a=t.fee||1.3,privateFee:s=!1,inputs:c=[e,`${n.toString()}u64`],keySearchParams:u=new p({proverUri:g.unbond_public.prover,verifierUri:g.unbond_public.verifier,cacheKey:"credits.aleo/unbond_public"}),program:l=this.creditsProgram(),...f}=t,h={programName:o,functionName:i,fee:a,privateFee:s,inputs:c,keySearchParams:u,...f};return this.buildExecutionTransaction(h)}async unbondPublic(e,r,t={}){const n=await this.buildUnbondPublicTransaction(e,r,t);return await this.networkClient.submitTransaction(n)}async buildClaimUnbondPublicTransaction(e,r={}){const{programName:t="credits.aleo",functionName:n="claim_unbond_public",fee:o=r.fee||2,privateFee:i=!1,inputs:a=[e],keySearchParams:s=new p({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:n,fee:o,privateFee:i,inputs:a,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:n="set_validator_state",fee:o=1,privateFee:i=!1,inputs:a=[e.toString()],keySearchParams:s=new p({proverUri:g.set_validator_state.prover,verifierUri:g.set_validator_state.verifier,cacheKey:"credits.aleo/set_validator_state"}),...c}=r,u={programName:t,functionName:n,fee:o,privateFee:i,inputs:a,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(),n=e.getProgram(),i=e.getVerifyingKey();return(0,o.hz)(r,i,n,t)}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,r,t,n){try{return t instanceof o.PD?t:o.PD.fromString(t)}catch(t){try{const t=this.recordProvider;return await t.findCreditsRecord(e,!0,r,n)}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 c(e){return w.has(e)}function u(e){return m.has(e)?e:f(`Invalid transfer type '${e}'. Valid transfer types are 'private', 'privateToPublic', 'public', and 'publicToPrivate'.`)}const v=o.SF.baseUrl();function l(e){const r=o.XV[e.verifyingKey];if(!r)throw new Error("Invalid method name: "+e.verifyingKey);return{locator:e.locator,prover:e.prover,verifier:e.verifier,verifyingKey:r}}const g={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())},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 f(e){throw console.error(e),e}n()}catch(K){n(K)}}))},5383:(e,r,t)=>{t.a(e,(async(e,r)=>{try{var n=t(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,r){if(e){if("string"==typeof e)return c(e,r);var t=Object.prototype.toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?c(e,r):void 0}}function c(e,r){(null==r||r>e.length)&&(r=e.length);for(var t=0,n=new Array(r);t=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;--t){var o=this.tryEntries[t];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--r){var t=this.tryEntries[r];if(t.finallyLoc===e)return this.complete(t.completion,t.afterLoc),C(t),w}},catch:function(e){for(var r=this.tryEntries.length-1;r>=0;--r){var t=this.tryEntries[r];if(t.tryLoc===e){var n=t.completion;if("throw"===n.type){var o=n.arg;C(t)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(r,t,n){return this.delegate={iterator:R(r),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=e),w}},r}function h(e,r,t,n,o,i,a){try{var s=e[i](a),c=s.value}catch(e){return void t(e)}s.done?r(c):Promise.resolve(c).then(n,o)}function p(e){return function(){var r=this,t=arguments;return new Promise((function(n,o){var i=e.apply(r,t);function a(e){h(i,n,o,a,s,"next",e)}function s(e){h(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.aleo.org/v1",d=new n.AleoKeyProvider,v=new n.ProgramManager(y,d,void 0);console.log("this is the web worker"),d.useCache(!0),self.postMessage({type:"ALEO_WORKER_READY"});var g=null;self.addEventListener("message",(function(e){if("ALEO_EXECUTE_PROGRAM_LOCAL"===e.data.type){var r=e.data,t=r.localProgram,o=r.aleoFunction,i=r.inputs,c=r.privateKey;console.log("Web worker: Executing function locally...");var h=performance.now();p(f().mark((function e(){var r,a,s,u,l,p,y,w,m,b;return f().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,r=n.PrivateKey.from_string(c),a=v.createProgramFromSource(t),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=v.networkClient.getProgramImports(t),g===t){e.next=14;break}return e.next=11,v.synthesizeKeys(t,o,i,r);case 11:p=e.sent,v.keyProvider.cacheKeys(u,p),g=t;case 14:return y=new n.AleoKeyProviderParams({cacheKey:u}),e.next=17,v.run(t,o,i,!1,l,y,void 0,void 0,r,void 0);case 17:w=e.sent,console.log("Web worker: Local execution completed in ".concat(performance.now()-h," 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();p(f().mark((function e(){var r,t,o,i,a,s,c;return f().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,r=n.PrivateKey.from_string(P),e.next=4,v.networkClient.getProgramObject(m);case 4:if(t=e.sent,o=t.id(),t.hasFunction(b)){e.next=8;break}throw"Program ".concat(o," does not contain function ").concat(b);case 8:if(i="".concat(o,":").concat(b),v.keyProvider.containsKeys(i)){e.next=15;break}return console.log("Web worker: Synthesizing proving & verifying keys for: '".concat(o,":").concat(b,"'")),e.next=13,v.synthesizeKeys(m,b,_,r);case 13:a=e.sent,v.keyProvider.cacheKeys(i,a);case 15:return s=new n.AleoKeyProviderParams({cacheKey:i}),"string"==typeof T&&v.setHost(T),e.next=19,v.execute({programName:o,functionName:b,fee:E,privateFee:k,inputs:_,keySearchParams:s,feeRecord:K,privateKey:r});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,v.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,N=x.privateKey,C=x.aleoFunction,F=x.inputs,R=x.url;console.log("Web worker: Estimating execution fee...");var L=performance.now();p(f().mark((function e(){var r,t,o,i,c,h,p,y,d,g,w;return f().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,r=n.PrivateKey.from_string(N),e.next=4,v.networkClient.getProgramObject(O);case 4:if(t=e.sent,o=t.id(),t.getFunctions().includes(C)){e.next=8;break}throw"Program ".concat(o," does not contain function ").concat(C);case 8:return i="".concat(o,":").concat(C),e.next=11,v.networkClient.getProgramImports(O);case 11:if(c=e.sent,v.keyProvider.containsKeys(i)){e.next=18;break}return console.log("Web worker: Synthesizing proving & verifying keys for: '".concat(o,":").concat(C,"'")),e.next=16,v.synthesizeKeys(t.toString(),C,F,r);case 16:h=e.sent,v.keyProvider.cacheKeys(i,h);case 18:return p=v.keyProvider.getKeys(i),m=2,y=l(f=p)||u(f,m)||s(f,m)||a(),d=y[0],g=y[1],e.next=21,n.ProgramManagerBase.estimateExecutionFee(r,O,C,F,R,c,d,g,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 f,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();p(f().mark((function e(){var r,t;return f().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,v.networkClient.getProgramImports(M);case 3:return r=e.sent,console.log("Estimating deployment fee.."),e.next=7,n.ProgramManagerBase.estimateDeploymentFee(M,r);case 7:t=e.sent,console.log("Web worker: Deployment fee estimation completed in ".concat(performance.now()-I," ms")),console.log("Deployment Fee Estimation: ".concat(t," microcredits")),self.postMessage({type:"DEPLOYMENT_FEE_ESTIMATION_COMPLETED",deploymentFee:Number(t)/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,U=D.privateKey,$=D.amountCredits,j=D.recipient,B=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(B,"..."));var G=performance.now();p(f().mark((function e(){var r;return f().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,"string"==typeof X&&v.setHost(X),e.next=4,v.transfer($,j,B,V,z,Address.from_private_key(PrivateKey.from_string(U)).to_string(),void 0,W,H,n.PrivateKey.from_string(U),void 0);case 4:r=e.sent,console.log("Web worker: Transfer transaction ".concat(r," created in ").concat(performance.now()-G," ms")),self.postMessage({type:"TRANSFER_TRANSACTION_COMPLETED",transferTransaction:r}),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,v.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,re=Y.url;console.log("Web worker: Creating deployment...");var te=performance.now();p(f().mark((function e(){var r,t,o;return f().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,"string"==typeof re&&v.setHost(re),r=v.createProgramFromSource(q),t=!1,e.prev=4,e.next=7,v.networkClient.getProgram(r.id());case 7:t=!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(!t){e.next=15;break}throw"Program ".concat(r.id()," already exists on the network");case 15:return console.log("fee is: ",Q),e.next=18,v.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()-te," 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,v.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(f().mark((function e(){var r;return f().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,"string"==typeof se&&v.setHost(se),e.next=4,v.split(oe,ie,n.PrivateKey.from_string(ae),void 0);case 4:r=e.sent,console.log("Web worker: Split transaction ".concat(r," created in ").concat(performance.now()-ce," ms")),self.postMessage({type:"SPLIT_TRANSACTION_COMPLETED",splitTransaction:r}),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,v.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,fe=ue.recordTwo,he=ue.fee,pe=ue.privateFee,ye=ue.feeRecord,de=ue.privateKey,ve=ue.url;console.log("Web worker: Creating join...");var ge=performance.now();p(f().mark((function e(){var r;return f().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,"string"==typeof ve&&v.setHost(ve),e.next=4,v.join(le,fe,he,pe,void 0,ye,n.PrivateKey.from_string(de),void 0);case 4:r=e.sent,console.log("Web worker: Join transaction ".concat(r," created in ").concat(performance.now()-ge," ms")),self.postMessage({type:"JOIN_TRANSACTION_COMPLETED",joinTransaction:r}),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,v.setHost(y),e.finish(13);case 16:case"end":return e.stop()}}),e,null,[[0,9,13,16]])})))()}})),r()}catch(w){r(w)}}),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 f10596e68..33e7d2c65 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,GAAW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rB,QAEiC,OAFjC+X,EAAAtF,KAAA,GAEHwB,EAAe9X,QAAQ6X,GAAa+D,EAAA/E,OAAA,6BAAA+E,EAAAnF,OAAA,GAAAkF,EAAA,uBA/B5CtE,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 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 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}) {\n this.proverUri = params.proverUri;\n this.verifierUri = params.verifierUri;\n this.cacheKey = params.cacheKey;\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 (\"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.fetchKeys(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 fetchKeys(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 bondPublicKeys(): Promise {\n return this.fetchKeys(CREDITS_PROGRAM_KEYS.bond_public.prover, CREDITS_PROGRAM_KEYS.bond_public.verifier, CREDITS_PROGRAM_KEYS.bond_public.locator)\n }\n\n bondValidatorKeys(): Promise {\n return this.fetchKeys(CREDITS_PROGRAM_KEYS.bond_validator.prover, CREDITS_PROGRAM_KEYS.bond_validator.verifier, CREDITS_PROGRAM_KEYS.bond_validator.locator)\n }\n\n claimUnbondPublicKeys(): Promise {\n return this.fetchKeys(CREDITS_PROGRAM_KEYS.claim_unbond_public.prover, CREDITS_PROGRAM_KEYS.claim_unbond_public.verifier, CREDITS_PROGRAM_KEYS.claim_unbond_public.locator)\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.fetchKeys(CREDITS_PROGRAM_KEYS.transfer_private.prover, CREDITS_PROGRAM_KEYS.transfer_private.verifier, CREDITS_PROGRAM_KEYS.transfer_private.locator);\n } else if (PRIVATE_TO_PUBLIC_TRANSFER.has(visibility)) {\n return await this.fetchKeys(CREDITS_PROGRAM_KEYS.transfer_private_to_public.prover, CREDITS_PROGRAM_KEYS.transfer_private_to_public.verifier, CREDITS_PROGRAM_KEYS.transfer_private_to_public.locator);\n } else if (PUBLIC_TRANSFER.has(visibility)) {\n return await this.fetchKeys(CREDITS_PROGRAM_KEYS.transfer_public.prover, CREDITS_PROGRAM_KEYS.transfer_public.verifier, CREDITS_PROGRAM_KEYS.transfer_public.locator);\n } else if (PUBLIC_TRANSFER_AS_SIGNER.has(visibility)) {\n return await this.fetchKeys(CREDITS_PROGRAM_KEYS.transfer_public_as_signer.prover, CREDITS_PROGRAM_KEYS.transfer_public_as_signer.verifier, CREDITS_PROGRAM_KEYS.transfer_public_as_signer.locator);\n } else if (PUBLIC_TO_PRIVATE_TRANSFER.has(visibility)) {\n return await this.fetchKeys(CREDITS_PROGRAM_KEYS.transfer_public_to_private.prover, CREDITS_PROGRAM_KEYS.transfer_public_to_private.verifier, CREDITS_PROGRAM_KEYS.transfer_public_to_private.locator);\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.fetchKeys(CREDITS_PROGRAM_KEYS.join.prover, CREDITS_PROGRAM_KEYS.join.verifier, CREDITS_PROGRAM_KEYS.join.locator);\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.fetchKeys(CREDITS_PROGRAM_KEYS.split.prover, CREDITS_PROGRAM_KEYS.split.verifier, CREDITS_PROGRAM_KEYS.split.locator);\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.fetchKeys(CREDITS_PROGRAM_KEYS.fee_private.prover, CREDITS_PROGRAM_KEYS.fee_private.verifier, CREDITS_PROGRAM_KEYS.fee_private.locator);\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.fetchKeys(CREDITS_PROGRAM_KEYS.fee_public.prover, CREDITS_PROGRAM_KEYS.fee_public.verifier, CREDITS_PROGRAM_KEYS.fee_public.locator);\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.fetchKeys(CREDITS_PROGRAM_KEYS.unbond_public.prover, CREDITS_PROGRAM_KEYS.unbond_public.verifier, CREDITS_PROGRAM_KEYS.unbond_public.locator);\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.executeOffline(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 {string | undefined} caller The caller of the function (if calling transfer_public)\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 caller?: string,\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, caller, 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} caller The caller of the transfer (may be different from the signer)\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 caller: string,\n recipient: string,\n fee: number,\n privateKey?: PrivateKey,\n offlineQuery?: OfflineQuery\n ): Promise {\n return this.buildTransferTransaction(amount, recipient, \"public\", fee, false, caller, 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, 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 {string | undefined} caller The caller of the function (if calling transfer_public)\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 caller?: string,\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, caller, 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 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 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};\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 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);\n\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 Address.from_private_key(PrivateKey.from_string(privateKey)).to_string(),\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","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","fetchKeys","getVerifyingKey","bondPublicKeys","CREDITS_PROGRAM_KEYS","bond_public","prover","verifier","locator","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","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","keyPair","synthesizeKeyPair","buildTransferTransaction","amount","recipient","transferType","caller","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","name","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","Address","from_private_key","to_string","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,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,E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AAwZ,GACIxD,EAAGlR,KADCsG,GAASoO,GAATpO,UAAWC,GAASmO,GAATnO,UAAW5B,GAAG+P,GAAH/P,IAAKC,GAAU8P,GAAV9P,WAAYE,GAAS4P,GAAT5P,UAAWvL,GAAUmb,GAAVnb,WAAYxB,GAAG2c,GAAH3c,IAGtE4E,QAAQqI,IAAI,gCAEZ,IAAIsM,GAAYC,YAAYC,MAC5BnB,EAAA9F,IAAAwE,MAAC,SAAA4F,IAAA,IAAAxZ,EAAA,OAAAoP,IAAAkB,MAAA,SAAAmJ,GAAA,cAAAA,EAAAtF,KAAAsF,EAAA5G,MAAA,OAMO,OANP4G,EAAAtF,KAAA,EAI0B,iBAARvX,IAAoB+Y,EAAe9X,QAAQjB,IAEtD6c,EAAA5G,KAAA,EAC0B8C,EAAexN,KACrCgD,GACAC,GACA5B,GACAC,QACAQ,EACAN,GACA8L,EAAAA,WAAgBtW,YAAYf,SAC5B6L,GACH,OATKjK,EAAWyZ,EAAAlH,KAYjB/Q,QAAQqI,IAAI,gCAAD+M,OAAiC5W,EAAW,gBAAA4W,OAAeR,YAAYC,MAAQF,GAAS,QACnGf,KAAKQ,YAAY,CACb7V,KAAM,6BACN2Z,gBAAiB1Z,IAClByZ,EAAA5G,KAAA,gBAAA4G,EAAAtF,KAAA,EAAAsF,EAAA3C,GAAA2C,EAAA,SAEHjY,QAAQqI,IAAG4P,EAAA3C,IACX1B,KAAKQ,YAAY,CACb7V,KAAM,QACNgX,aAAc0C,EAAA3C,GAAMpV,aACrB,QAEiC,OAFjC+X,EAAAtF,KAAA,GAEHwB,EAAe9X,QAAQ6X,GAAa+D,EAAA/E,OAAA,6BAAA+E,EAAAnF,OAAA,GAAAkF,EAAA,uBA/B5CtE,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 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 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}) {\n this.proverUri = params.proverUri;\n this.verifierUri = params.verifierUri;\n this.cacheKey = params.cacheKey;\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 (\"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.fetchKeys(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 fetchKeys(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 bondPublicKeys(): Promise {\n return this.fetchKeys(CREDITS_PROGRAM_KEYS.bond_public.prover, CREDITS_PROGRAM_KEYS.bond_public.verifier, CREDITS_PROGRAM_KEYS.bond_public.locator)\n }\n\n bondValidatorKeys(): Promise {\n return this.fetchKeys(CREDITS_PROGRAM_KEYS.bond_validator.prover, CREDITS_PROGRAM_KEYS.bond_validator.verifier, CREDITS_PROGRAM_KEYS.bond_validator.locator)\n }\n\n claimUnbondPublicKeys(): Promise {\n return this.fetchKeys(CREDITS_PROGRAM_KEYS.claim_unbond_public.prover, CREDITS_PROGRAM_KEYS.claim_unbond_public.verifier, CREDITS_PROGRAM_KEYS.claim_unbond_public.locator)\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.fetchKeys(CREDITS_PROGRAM_KEYS.transfer_private.prover, CREDITS_PROGRAM_KEYS.transfer_private.verifier, CREDITS_PROGRAM_KEYS.transfer_private.locator);\n } else if (PRIVATE_TO_PUBLIC_TRANSFER.has(visibility)) {\n return await this.fetchKeys(CREDITS_PROGRAM_KEYS.transfer_private_to_public.prover, CREDITS_PROGRAM_KEYS.transfer_private_to_public.verifier, CREDITS_PROGRAM_KEYS.transfer_private_to_public.locator);\n } else if (PUBLIC_TRANSFER.has(visibility)) {\n return await this.fetchKeys(CREDITS_PROGRAM_KEYS.transfer_public.prover, CREDITS_PROGRAM_KEYS.transfer_public.verifier, CREDITS_PROGRAM_KEYS.transfer_public.locator);\n } else if (PUBLIC_TRANSFER_AS_SIGNER.has(visibility)) {\n return await this.fetchKeys(CREDITS_PROGRAM_KEYS.transfer_public_as_signer.prover, CREDITS_PROGRAM_KEYS.transfer_public_as_signer.verifier, CREDITS_PROGRAM_KEYS.transfer_public_as_signer.locator);\n } else if (PUBLIC_TO_PRIVATE_TRANSFER.has(visibility)) {\n return await this.fetchKeys(CREDITS_PROGRAM_KEYS.transfer_public_to_private.prover, CREDITS_PROGRAM_KEYS.transfer_public_to_private.verifier, CREDITS_PROGRAM_KEYS.transfer_public_to_private.locator);\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.fetchKeys(CREDITS_PROGRAM_KEYS.join.prover, CREDITS_PROGRAM_KEYS.join.verifier, CREDITS_PROGRAM_KEYS.join.locator);\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.fetchKeys(CREDITS_PROGRAM_KEYS.split.prover, CREDITS_PROGRAM_KEYS.split.verifier, CREDITS_PROGRAM_KEYS.split.locator);\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.fetchKeys(CREDITS_PROGRAM_KEYS.fee_private.prover, CREDITS_PROGRAM_KEYS.fee_private.verifier, CREDITS_PROGRAM_KEYS.fee_private.locator);\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.fetchKeys(CREDITS_PROGRAM_KEYS.fee_public.prover, CREDITS_PROGRAM_KEYS.fee_public.verifier, CREDITS_PROGRAM_KEYS.fee_public.locator);\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.fetchKeys(CREDITS_PROGRAM_KEYS.unbond_public.prover, CREDITS_PROGRAM_KEYS.unbond_public.verifier, CREDITS_PROGRAM_KEYS.unbond_public.locator);\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 {string | undefined} caller The caller of the function (if calling transfer_public)\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 caller?: string,\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, caller, 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} caller The caller of the transfer (may be different from the signer)\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 caller: string,\n recipient: string,\n fee: number,\n privateKey?: PrivateKey,\n offlineQuery?: OfflineQuery\n ): Promise {\n return this.buildTransferTransaction(amount, recipient, \"public\", fee, false, caller, 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, 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 {string | undefined} caller The caller of the function (if calling transfer_public)\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 caller?: string,\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, caller, 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 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 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};\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 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);\nconsole.log(\"this is the web worker\");\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 Address.from_private_key(PrivateKey.from_string(privateKey)).to_string(),\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","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","fetchKeys","getVerifyingKey","bondPublicKeys","CREDITS_PROGRAM_KEYS","bond_public","prover","verifier","locator","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","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","keyPair","synthesizeKeyPair","buildTransferTransaction","amount","recipient","transferType","caller","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","name","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","Address","from_private_key","to_string","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/4e18189c68509261e165.wasm b/4e18189c68509261e165.wasm deleted file mode 100644 index 1678e9116..000000000 Binary files a/4e18189c68509261e165.wasm and /dev/null differ diff --git a/52.bundle.js b/52.bundle.js index dba8123dc..b7019fa3e 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+"1a0284815ba528021375.js"},5934:(e,t,r)=>{e.exports=r.p+"4077cd2c61f1662ef9e3.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:()=>C,PUBLIC_TRANSFER:()=>x,PUBLIC_TRANSFER_AS_SIGNER:()=>A,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:()=>g,logAndThrow:()=>u,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.10"}}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,l,u=0,g=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.");l=e}catch(e){throw new Error("Error fetching latest block height.")}if(c="number"==typeof t&&t<=l?t:l,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 _&&(g+=t.microcredits(),g>=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),u+=1,u>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(A.has(e))return this.functionKeys(y.transferPublicAsSignerKeyParams());if(C.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 u("Unable to get current block height from the network");_=e}if(i>=_)throw u("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 u(`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 u(`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 u(`Error finding fee keys. Key finder response: '${e}'. Please ensure your key provider is configured correctly.`)}const[c,d]=o;let l;try{l=await this.networkClient.getProgramImports(e)}catch(e){throw u(`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 g=await i.L.buildDeploymentTransaction(s,e,t,_,this.host,l,c,d);return await this.networkClient.submitTransaction(g)}async buildExecutionTransaction(e){const{programName:t,functionName:r,fee:n,privateFee:_,inputs:a,recordSearchParams:o,keySearchParams:s,privateKey:c,offlineQuery:d}=e;let l=e.feeRecord,g=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 u(`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{l=_?await this.getCreditsRecord(n,[],l,o):void 0}catch(e){throw u(`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 u(`Error finding fee keys. Key finder response: '${e}'. Please ensure your key provider is configured correctly.`)}const[h,v]=p;if(!g||!f)try{[g,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 u(`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,l,this.host,b,g,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 l=c;if(void 0===c&&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(!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(l,e,t,r,n,!1,_,o,s,this.host,d)}async join(e,t,r,n,_,a,o,s){let c,d,l=o;if(void 0===o&&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{c=n?await this.keyProvider.feePrivateKeys():await this.keyProvider.feePublicKeys(),d=await this.keyProvider.joinKeys()}catch(e){throw u(`Error finding fee keys. Key finder response: '${e}'. Please ensure your key provider is configured correctly.`)}const[g,f]=c,[w,b]=d;try{a=n?await this.getCreditsRecord(r,[],a,_):void 0}catch(e){throw u(`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 u("Records provided are not valid. Please ensure they are valid plaintext records.")}const p=await i.L.buildJoinTransaction(l,e,t,r,a,this.host,w,b,g,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 u(`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 u("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 u(`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,l,g,f){r=d(r);let w,b,p=g;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{w=_?await this.keyProvider.feePrivateKeys():await this.keyProvider.feePublicKeys(),b=await this.keyProvider.transferKeys(r)}catch(e){throw u(`Error finding fee keys. Key finder response: '${e}'. Please ensure your key provider is configured correctly.`)}const[y,h]=w,[v,m]=b;try{const e=[];c(r)?(s=await this.getCreditsRecord(n,[],s,o),e.push(s.nonce())):s=void 0,l=_?await this.getCreditsRecord(n,e,l,o):void 0}catch(e){throw u(`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(p,e,t,r,a,s,n,l,this.host,v,m,y,h,f)}async buildTransferPublicTransaction(e,t,r,n,i,_){return this.buildTransferTransaction(e,r,"public",n,!1,t,void 0,void 0,void 0,i,_)}async buildTransferPublicAsSignerTransaction(e,t,r,n,i){return this.buildTransferTransaction(e,t,"public",r,!1,void 0,void 0,void 0,void 0,n,i)}async transfer(e,t,r,n,i,_,a,o,s,c,d){const l=await this.buildTransferTransaction(e,t,r,n,i,_,a,o,s,c,d);return await this.networkClient.submitTransaction(l)}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:l=new b({proverUri:T.bond_public.prover,verifierUri:T.bond_public.verifier,cacheKey:"credits.aleo/bond_public"}),program:u=this.creditsProgram(),...g}=i,f={programName:a,functionName:o,fee:s,privateFee:c,inputs:d,keySearchParams:l,...g};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:l=[e,t,`${_.toString()}u64`,`${a.toString()}u8`],keySearchParams:u=new b({proverUri:T.bond_validator.prover,verifierUri:T.bond_validator.verifier,cacheKey:"credits.aleo/bond_validator"}),program:g=this.creditsProgram(),...f}=i,w={programName:o,functionName:s,fee:c,privateFee:d,inputs:l,keySearchParams:u,...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(),...l}=r,u={programName:i,functionName:_,fee:a,privateFee:o,inputs:s,keySearchParams:c,...l};return this.buildExecutionTransaction(u)}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 u(`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:u(`Invalid transfer type '${e}'. Valid transfer types are 'private', 'privateToPublic', 'public', and 'publicToPrivate'.`)}const S=i.SF.baseUrl();function l(e){const t=i.XV[e.verifyingKey];if(!t)throw new Error("Invalid method name: "+e.verifyingKey);return{locator:e.locator,prover:e.prover,verifier:e.verifier,verifyingKey:t}}const T={bond_public:l(i.SF.bond_public()),bond_validator:l(i.SF.bond_validator()),claim_unbond_public:l(i.SF.claim_unbond_public()),fee_private:l(i.SF.fee_private()),fee_public:l(i.SF.fee_public()),inclusion:l(i.SF.inclusion()),join:l(i.SF.join()),set_validator_state:l(i.SF.set_validator_state()),split:l(i.SF.split()),transfer_private:l(i.SF.transfer_private()),transfer_private_to_public:l(i.SF.transfer_private_to_public()),transfer_public:l(i.SF.transfer_public()),transfer_public_as_signer:l(i.SF.transfer_public_as_signer()),transfer_public_to_private:l(i.SF.transfer_public_to_private()),unbond_public:l(i.SF.unbond_public())},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"]),A=new Set(["public_as_signer","transfer_public_as_signer","transferPublicAsSigner"]),C=new Set(["public_to_private","publicToPrivate","transfer_public_to_private","transferPublicToPrivate"]);function u(e){throw console.error(e),e}async function g(){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:()=>ze,CK:()=>C,Gd:()=>Be,IO:()=>We,L:()=>$e,PD:()=>Me,Pc:()=>De,SF:()=>Ce,XV:()=>qe,YW:()=>Le,_U:()=>xe,_q:()=>Oe,fW:()=>je,gN:()=>Ae,hz:()=>He,kL:()=>Re,o:()=>Fe,uq:()=>Ie,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 I="undefined"!=typeof TextDecoder?new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0}):{decode:()=>{throw Error("TextDecoder not available")}};"undefined"!=typeof TextDecoder&&I.decode();let z=null;function s(){return null!==z&&z.buffer===B.memory.buffer||(z=new Uint8Array(B.memory.buffer)),z}function c(e,t){return e>>>=0,I.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")}},M=function(e,t){const r=j.encode(e);return t.set(r),{read:e.length,written:r.length}};function l(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+=M(e,t).written,i=r(i,n,a,1)>>>0}return N=a,i}function u(e){return null==e}let $=null;function g(){return null!==$&&$.buffer===B.memory.buffer||($=new Int32Array(B.memory.buffer)),$}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__h927aa242fc71dbdb(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=l(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=g()[a/4+0],_=g()[a/4+1];if(g()[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__hbf3e91360cbaa199(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=l(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=g()[i/4+0],n=g()[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=g()[i/4+0],n=g()[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),_=l(t,B.__wbindgen_malloc,B.__wbindgen_realloc),a=N;B.execution_fromString(i,_,a);var r=g()[i/4+0],n=g()[i/4+1];if(g()[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=g()[r/4+0],t=g()[r/4+1];if(g()[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=g()[i/4+0],n=g()[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=g()[i/4+0],n=g()[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),_=l(t,B.__wbindgen_malloc,B.__wbindgen_realloc),a=N;B.field_fromString(i,_,a);var r=g()[i/4+0],n=g()[i/4+1];if(g()[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=g()[r/4+0],t=g()[r/4+1];if(g()[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=g()[r/4+0],t=g()[r/4+1];if(g()[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 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=g()[i/4+0],n=g()[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=l(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=g()[i/4+0],n=g()[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=l(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=g()[i/4+0],n=g()[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=l(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=g()[i/4+0],n=g()[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=l(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=g()[i/4+0],n=g()[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=l(e,B.__wbindgen_malloc,B.__wbindgen_realloc),_=N;B.offlinequery_new(n,i,_);var t=g()[n/4+0],r=g()[n/4+1];if(g()[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=l(e,B.__wbindgen_malloc,B.__wbindgen_realloc),_=N,a=l(t,B.__wbindgen_malloc,B.__wbindgen_realloc),s=N;B.offlinequery_addStatePath(n,this.__wbg_ptr,i,_,a,s);var r=g()[n/4+0];if(g()[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=g()[i/4+0],n=g()[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),_=l(t,B.__wbindgen_malloc,B.__wbindgen_realloc),a=N;B.offlinequery_fromString(i,_,a);var r=g()[i/4+0],n=g()[i/4+1];if(g()[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),_=l(t,B.__wbindgen_malloc,B.__wbindgen_realloc),a=N;B.privatekey_from_string(i,_,a);var r=g()[i/4+0],n=g()[i/4+1];if(g()[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=g()[i/4+0],n=g()[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=l(e,B.__wbindgen_malloc,B.__wbindgen_realloc),_=N;B.privatekey_newEncrypted(n,i,_);var t=g()[n/4+0],r=g()[n/4+1];if(g()[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=l(e,B.__wbindgen_malloc,B.__wbindgen_realloc),_=N;B.privatekey_toCiphertext(n,this.__wbg_ptr,i,_);var t=g()[n/4+0],r=g()[n/4+1];if(g()[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=l(r,B.__wbindgen_malloc,B.__wbindgen_realloc),s=N;B.privatekey_fromPrivateKeyCiphertext(_,t.__wbg_ptr,a,s);var n=g()[_/4+0],i=g()[_/4+1];if(g()[_/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=l(r,B.__wbindgen_malloc,B.__wbindgen_realloc),s=N;B.privatekey_toCiphertext(_,t.__wbg_ptr,a,s);var n=g()[_/4+0],i=g()[_/4+1];if(g()[_/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=l(e,B.__wbindgen_malloc,B.__wbindgen_realloc),_=N;B.privatekeyciphertext_decryptToPrivateKey(n,this.__wbg_ptr,i,_);var t=g()[n/4+0],r=g()[n/4+1];if(g()[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=g()[i/4+0],n=g()[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),_=l(t,B.__wbindgen_malloc,B.__wbindgen_realloc),a=N;B.privatekeyciphertext_fromString(i,_,a);var r=g()[i/4+0],n=g()[i/4+1];if(g()[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),_=l(t,B.__wbindgen_malloc,B.__wbindgen_realloc),a=N;B.program_fromString(i,_,a);var r=g()[i/4+0],n=g()[i/4+1];if(g()[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=g()[i/4+0],n=g()[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=l(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=l(e,B.__wbindgen_malloc,B.__wbindgen_realloc),_=N;B.program_getFunctionInputs(n,this.__wbg_ptr,i,_);var t=g()[n/4+0],r=g()[n/4+1];if(g()[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=g()[r/4+0],t=g()[r/4+1];if(g()[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=l(e,B.__wbindgen_malloc,B.__wbindgen_realloc),_=N;B.program_getRecordMembers(n,this.__wbg_ptr,i,_);var t=g()[n/4+0],r=g()[n/4+1];if(g()[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=l(e,B.__wbindgen_malloc,B.__wbindgen_realloc),_=N;B.program_getStructMembers(n,this.__wbg_ptr,i,_);var t=g()[n/4+0],r=g()[n/4+1];if(g()[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=g()[i/4+0],n=g()[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=g()[r/4+0],t=g()[r/4+1];if(g()[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 le="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((e=>B.__wbg_programmanager_free(e>>>0)));let ue=class{__destroy_into_raw(){const e=this.__wbg_ptr;return this.__wbg_ptr=0,le.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 g=l(t,B.__wbindgen_malloc,B.__wbindgen_realloc),f=N;let w=0;u(n)||(p(n,ye),w=n.__destroy_into_raw());var b=u(i)?0:l(i,B.__wbindgen_malloc,B.__wbindgen_realloc),y=N;let h=0;u(a)||(p(a,fe),h=a.__destroy_into_raw());let v=0;u(s)||(p(s,Ke),v=s.__destroy_into_raw());let m=0;u(c)||(p(c,ie),m=c.__destroy_into_raw());return o(B.programmanager_buildDeploymentTransaction(e.__wbg_ptr,g,f,r,w,b,y,u(_)?0:d(_),h,v,m))}static estimateDeploymentFee(e,t){const r=l(e,B.__wbindgen_malloc,B.__wbindgen_realloc),n=N;return o(B.programmanager_estimateDeploymentFee(r,n,u(t)?0:d(t)))}static estimateProgramNameCost(e){try{const n=B.__wbindgen_add_to_stack_pointer(-16),i=l(e,B.__wbindgen_malloc,B.__wbindgen_realloc),_=N;B.programmanager_estimateProgramNameCost(n,i,_);var t=v()[n/8+0],r=g()[n/4+2];if(g()[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,g,f){p(e,ae);const w=l(t,B.__wbindgen_malloc,B.__wbindgen_realloc),b=N,y=l(r,B.__wbindgen_malloc,B.__wbindgen_realloc),h=N;let v=0;u(s)||(p(s,fe),v=s.__destroy_into_raw());let m=0;u(c)||(p(c,Ke),m=c.__destroy_into_raw());var P=u(g)?0:l(g,B.__wbindgen_malloc,B.__wbindgen_realloc),k=N;let K=0;u(f)||(p(f,ie),K=f.__destroy_into_raw());return o(B.programmanager_executeFunctionOffline(e.__wbg_ptr,w,b,y,h,d(n),i,_,u(a)?0:d(a),v,m,P,k,K))}static buildExecutionTransaction(e,t,r,n,i,_,a,s,c,g,f,w,b){p(e,ae);const y=l(t,B.__wbindgen_malloc,B.__wbindgen_realloc),h=N,v=l(r,B.__wbindgen_malloc,B.__wbindgen_realloc),m=N;let P=0;u(_)||(p(_,ye),P=_.__destroy_into_raw());var k=u(a)?0:l(a,B.__wbindgen_malloc,B.__wbindgen_realloc),K=N;let S=0;u(c)||(p(c,fe),S=c.__destroy_into_raw());let T=0;u(g)||(p(g,Ke),T=g.__destroy_into_raw());let E=0;u(f)||(p(f,fe),E=f.__destroy_into_raw());let V=0;u(w)||(p(w,Ke),V=w.__destroy_into_raw());let R=0;u(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,u(s)?0:d(s),S,T,E,V,R))}static estimateExecutionFee(e,t,r,n,i,_,a,s,c){p(e,ae);const g=l(t,B.__wbindgen_malloc,B.__wbindgen_realloc),f=N,w=l(r,B.__wbindgen_malloc,B.__wbindgen_realloc),b=N;var y=u(i)?0:l(i,B.__wbindgen_malloc,B.__wbindgen_realloc),h=N;let v=0;u(a)||(p(a,fe),v=a.__destroy_into_raw());let m=0;u(s)||(p(s,Ke),m=s.__destroy_into_raw());let P=0;u(c)||(p(c,ie),P=c.__destroy_into_raw());return o(B.programmanager_estimateExecutionFee(e.__wbg_ptr,g,f,w,b,d(n),y,h,u(_)?0:d(_),v,m,P))}static estimateFinalizeFee(e,t){try{const i=B.__wbindgen_add_to_stack_pointer(-16),_=l(e,B.__wbindgen_malloc,B.__wbindgen_realloc),a=N,s=l(t,B.__wbindgen_malloc,B.__wbindgen_realloc),c=N;B.programmanager_estimateFinalizeFee(i,_,a,s,c);var r=v()[i/8+0],n=g()[i/4+2];if(g()[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,g){p(e,ae),p(t,ye);var f=t.__destroy_into_raw();p(r,ye);var w=r.__destroy_into_raw();let b=0;u(i)||(p(i,ye),b=i.__destroy_into_raw());var y=u(_)?0:l(_,B.__wbindgen_malloc,B.__wbindgen_realloc),h=N;let v=0;u(a)||(p(a,fe),v=a.__destroy_into_raw());let m=0;u(s)||(p(s,Ke),m=s.__destroy_into_raw());let P=0;u(c)||(p(c,fe),P=c.__destroy_into_raw());let k=0;u(d)||(p(d,Ke),k=d.__destroy_into_raw());let K=0;u(g)||(p(g,ie),K=g.__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=u(n)?0:l(n,B.__wbindgen_malloc,B.__wbindgen_realloc),d=N;let g=0;u(i)||(p(i,fe),g=i.__destroy_into_raw());let f=0;u(_)||(p(_,Ke),f=_.__destroy_into_raw());let w=0;u(a)||(p(a,ie),w=a.__destroy_into_raw());return o(B.programmanager_buildSplitTransaction(e.__wbg_ptr,t,s,c,d,g,f,w))}static buildTransferTransaction(e,t,r,n,i,_,a,s,c,d,g,f,w,b){p(e,ae);const y=l(r,B.__wbindgen_malloc,B.__wbindgen_realloc),h=N,v=l(n,B.__wbindgen_malloc,B.__wbindgen_realloc),m=N;var P=u(i)?0:l(i,B.__wbindgen_malloc,B.__wbindgen_realloc),k=N;let K=0;u(_)||(p(_,ye),K=_.__destroy_into_raw());let S=0;u(s)||(p(s,ye),S=s.__destroy_into_raw());var T=u(c)?0:l(c,B.__wbindgen_malloc,B.__wbindgen_realloc),E=N;let V=0;u(d)||(p(d,fe),V=d.__destroy_into_raw());let R=0;u(g)||(p(g,Ke),R=g.__destroy_into_raw());let F=0;u(f)||(p(f,fe),F=f.__destroy_into_raw());let x=0;u(w)||(p(w,Ke),x=w.__destroy_into_raw());let A=0;u(b)||(p(b,ie),A=b.__destroy_into_raw());return o(B.programmanager_buildTransferTransaction(e.__wbg_ptr,t,y,h,v,m,P,k,K,a,S,T,E,V,R,F,x,A))}static synthesizeKeyPair(e,t,r,n,i){p(e,ae);const _=l(t,B.__wbindgen_malloc,B.__wbindgen_realloc),a=N,s=l(r,B.__wbindgen_malloc,B.__wbindgen_realloc),c=N;return o(B.programmanager_synthesizeKeyPair(e.__wbg_ptr,_,a,s,c,d(n),u(i)?0:d(i)))}};const ge="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,ge.register(r,r.__wbg_ptr,r),r}__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_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=g()[i/4+0],n=g()[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=g()[i/4+0],n=g()[i/4+1];if(g()[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),_=l(t,B.__wbindgen_malloc,B.__wbindgen_realloc),a=N;B.provingkey_fromString(i,_,a);var r=g()[i/4+0],n=g()[i/4+1];if(g()[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=g()[i/4+0],t=g()[i/4+1],r=g()[i/4+2];if(g()[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=g()[i/4+0],n=g()[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),_=l(t,B.__wbindgen_malloc,B.__wbindgen_realloc),a=N;B.recordciphertext_fromString(i,_,a);var r=g()[i/4+0],n=g()[i/4+1];if(g()[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=g()[i/4+0],n=g()[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=g()[n/4+0],r=g()[n/4+1];if(g()[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),_=l(e,B.__wbindgen_malloc,B.__wbindgen_realloc),a=N,s=l(t,B.__wbindgen_malloc,B.__wbindgen_realloc),c=N;B.recordplaintext_commitment(i,this.__wbg_ptr,_,a,s,c);var r=g()[i/4+0],n=g()[i/4+1];if(g()[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),_=l(t,B.__wbindgen_malloc,B.__wbindgen_realloc),a=N;B.recordplaintext_fromString(i,_,a);var r=g()[i/4+0],n=g()[i/4+1];if(g()[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=g()[i/4+0],n=g()[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=g()[i/4+0],n=g()[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=l(t,B.__wbindgen_malloc,B.__wbindgen_realloc),y=N,h=l(r,B.__wbindgen_malloc,B.__wbindgen_realloc),v=N;B.recordplaintext_serialNumberString(w,this.__wbg_ptr,e.__wbg_ptr,b,y,h,v);var _=g()[w/4+0],a=g()[w/4+1],s=g()[w/4+2],d=g()[w/4+3],u=_,f=a;if(d)throw u=0,f=0,o(s);return n=u,i=f,c(u,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=l(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=g()[i/4+0],n=g()[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),_=l(t,B.__wbindgen_malloc,B.__wbindgen_realloc),a=N;B.transaction_fromString(i,_,a);var r=g()[i/4+0],n=g()[i/4+1];if(g()[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=g()[i/4+0],n=g()[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=g()[i/4+0],n=g()[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=g()[i/4+0],n=g()[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=g()[i/4+0],n=g()[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=g()[i/4+0],n=g()[i/4+1];if(g()[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),_=l(t,B.__wbindgen_malloc,B.__wbindgen_realloc),a=N;B.verifyingkey_fromString(i,_,a);var r=g()[i/4+0],n=g()[i/4+1];if(g()[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=g()[i/4+0],t=g()[i/4+1],r=g()[i/4+2];if(g()[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=g()[i/4+0],n=g()[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=l(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=g()[i/4+0],n=g()[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 u=B.__wbindgen_add_to_stack_pointer(-16),f=l(e,B.__wbindgen_malloc,B.__wbindgen_realloc),w=N;B.viewkey_decrypt(u,this.__wbg_ptr,f,w);var n=g()[u/4+0],i=g()[u/4+1],_=g()[u/4+2],a=g()[u/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=l(_(t).url,B.__wbindgen_malloc,B.__wbindgen_realloc),n=N;g()[e/4+1]=n,g()[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=u(n)?0:l(n,B.__wbindgen_malloc,B.__wbindgen_realloc),a=N;g()[e/4+1]=a,g()[e/4+0]=i},e.wbg.__wbg_call_b3ca7c6051f9bec1=function(){return K((function(e,t,r){return d(_(e).call(_(t),_(r)))}),arguments)},e.wbg.__wbindgen_bigint_from_u64=function(e){return d(BigInt.asUintN(64,e))},e.wbg.__wbg_transaction_new=function(e){return d(Pe.__wrap(e))},e.wbg.__wbg_executionresponse_new=function(e){return d(Y.__wrap(e))},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_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=l(_(t).stack,B.__wbindgen_malloc,B.__wbindgen_realloc),n=N;g()[e/4+1]=n,g()[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=l(f(_(t)),B.__wbindgen_malloc,B.__wbindgen_realloc),n=N;g()[e/4+1]=n,g()[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=l("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;g()[e/4+1]=r,g()[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=u(r)?0:l(r,B.__wbindgen_malloc,B.__wbindgen_realloc),i=N;g()[e/4+1]=i,g()[e/4+0]=n}),arguments)},e.wbg.__wbindgen_closure_wrapper5762=function(e,t,r){return d(w(e,t,538,b))},e.wbg.__wbindgen_closure_wrapper5787=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,$=null,z=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 A=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:ue,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:Ae,Metadata:Ce,OfflineQuery:Be,Private:Ue,PrivateKey:Oe,PrivateKeyCiphertext:Ie,Program:ze,ProvingKey:Ne,RecordCiphertext:je,RecordPlaintext:Me,ProgramManager:$e,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),A})({importHook:()=>new URL(r(5934),r.b)});async function C(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:()=>u});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(),u(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:u}=Object.assign({path:[]},_.data),g=(_.data.argumentList||[]).map(m);let f;try{const t=u.slice(0,-1).reduce(((e,t)=>e[t]),e),r=u.reduce(((e,t)=>e[t]),e);switch(c){case"GET":f=r;break;case"SET":t[u.slice(-1)[0]]=m(_.data.value),f=!0;break;case"APPLY":f=r.apply(t,g);break;case"CONSTRUCT":f=function(e){return Object.assign(e,{[n]:!0})}(new r(...g));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),l(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 l(e){(function(e){return"MessagePort"===e.constructor.name})(e)&&e.close()}function u(e,t){return p(e,[],t)}function g(e){if(e)throw new Error("Proxy has been released and is not useable")}function f(e){return P(e,{type:"RELEASE"}).then((()=>{l(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(g(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,_){g(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){g(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){g(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+"bd1596cd75301fef51e7.js"},5934:(e,t,r)=>{e.exports=r.p+"108f2867fde2069b7ac6.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:()=>C,PUBLIC_TRANSFER:()=>x,PUBLIC_TRANSFER_AS_SIGNER:()=>A,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:()=>g,logAndThrow:()=>u,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.11"}}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,l,u=0,g=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.");l=e}catch(e){throw new Error("Error fetching latest block height.")}if(c="number"==typeof t&&t<=l?t:l,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 _&&(g+=t.microcredits(),g>=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),u+=1,u>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(A.has(e))return this.functionKeys(y.transferPublicAsSignerKeyParams());if(C.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 u("Unable to get current block height from the network");_=e}if(i>=_)throw u("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 u(`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 u(`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 u(`Error finding fee keys. Key finder response: '${e}'. Please ensure your key provider is configured correctly.`)}const[c,d]=o;let l;try{l=await this.networkClient.getProgramImports(e)}catch(e){throw u(`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 g=await i.L.buildDeploymentTransaction(s,e,t,_,this.host,l,c,d);return await this.networkClient.submitTransaction(g)}async buildExecutionTransaction(e){const{programName:t,functionName:r,fee:n,privateFee:_,inputs:a,recordSearchParams:o,keySearchParams:s,privateKey:c,offlineQuery:d}=e;let l=e.feeRecord,g=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 u(`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{l=_?await this.getCreditsRecord(n,[],l,o):void 0}catch(e){throw u(`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 u(`Error finding fee keys. Key finder response: '${e}'. Please ensure your key provider is configured correctly.`)}const[h,v]=p;if(!g||!f)try{[g,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 u(`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,l,this.host,b,g,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 l=c;if(void 0===c&&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(!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(l,e,t,r,n,!1,_,o,s,this.host,d)}async join(e,t,r,n,_,a,o,s){let c,d,l=o;if(void 0===o&&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{c=n?await this.keyProvider.feePrivateKeys():await this.keyProvider.feePublicKeys(),d=await this.keyProvider.joinKeys()}catch(e){throw u(`Error finding fee keys. Key finder response: '${e}'. Please ensure your key provider is configured correctly.`)}const[g,f]=c,[w,b]=d;try{a=n?await this.getCreditsRecord(r,[],a,_):void 0}catch(e){throw u(`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 u("Records provided are not valid. Please ensure they are valid plaintext records.")}const p=await i.L.buildJoinTransaction(l,e,t,r,a,this.host,w,b,g,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 u(`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 u("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 u(`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,l,g,f){r=d(r);let w,b,p=g;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{w=_?await this.keyProvider.feePrivateKeys():await this.keyProvider.feePublicKeys(),b=await this.keyProvider.transferKeys(r)}catch(e){throw u(`Error finding fee keys. Key finder response: '${e}'. Please ensure your key provider is configured correctly.`)}const[y,h]=w,[v,m]=b;try{const e=[];c(r)?(s=await this.getCreditsRecord(n,[],s,o),e.push(s.nonce())):s=void 0,l=_?await this.getCreditsRecord(n,e,l,o):void 0}catch(e){throw u(`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(p,e,t,r,a,s,n,l,this.host,v,m,y,h,f)}async buildTransferPublicTransaction(e,t,r,n,i,_){return this.buildTransferTransaction(e,r,"public",n,!1,t,void 0,void 0,void 0,i,_)}async buildTransferPublicAsSignerTransaction(e,t,r,n,i){return this.buildTransferTransaction(e,t,"public",r,!1,void 0,void 0,void 0,void 0,n,i)}async transfer(e,t,r,n,i,_,a,o,s,c,d){const l=await this.buildTransferTransaction(e,t,r,n,i,_,a,o,s,c,d);return await this.networkClient.submitTransaction(l)}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:l=new b({proverUri:T.bond_public.prover,verifierUri:T.bond_public.verifier,cacheKey:"credits.aleo/bond_public"}),program:u=this.creditsProgram(),...g}=i,f={programName:a,functionName:o,fee:s,privateFee:c,inputs:d,keySearchParams:l,...g};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:l=[e,t,`${_.toString()}u64`,`${a.toString()}u8`],keySearchParams:u=new b({proverUri:T.bond_validator.prover,verifierUri:T.bond_validator.verifier,cacheKey:"credits.aleo/bond_validator"}),program:g=this.creditsProgram(),...f}=i,w={programName:o,functionName:s,fee:c,privateFee:d,inputs:l,keySearchParams:u,...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(),...l}=r,u={programName:i,functionName:_,fee:a,privateFee:o,inputs:s,keySearchParams:c,...l};return this.buildExecutionTransaction(u)}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 u(`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:u(`Invalid transfer type '${e}'. Valid transfer types are 'private', 'privateToPublic', 'public', and 'publicToPrivate'.`)}const S=i.SF.baseUrl();function l(e){const t=i.XV[e.verifyingKey];if(!t)throw new Error("Invalid method name: "+e.verifyingKey);return{locator:e.locator,prover:e.prover,verifier:e.verifier,verifyingKey:t}}const T={bond_public:l(i.SF.bond_public()),bond_validator:l(i.SF.bond_validator()),claim_unbond_public:l(i.SF.claim_unbond_public()),fee_private:l(i.SF.fee_private()),fee_public:l(i.SF.fee_public()),inclusion:l(i.SF.inclusion()),join:l(i.SF.join()),set_validator_state:l(i.SF.set_validator_state()),split:l(i.SF.split()),transfer_private:l(i.SF.transfer_private()),transfer_private_to_public:l(i.SF.transfer_private_to_public()),transfer_public:l(i.SF.transfer_public()),transfer_public_as_signer:l(i.SF.transfer_public_as_signer()),transfer_public_to_private:l(i.SF.transfer_public_to_private()),unbond_public:l(i.SF.unbond_public())},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"]),A=new Set(["public_as_signer","transfer_public_as_signer","transferPublicAsSigner"]),C=new Set(["public_to_private","publicToPrivate","transfer_public_to_private","transferPublicToPrivate"]);function u(e){throw console.error(e),e}async function g(){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:()=>ze,CK:()=>C,Gd:()=>Be,IO:()=>We,L:()=>$e,PD:()=>Me,Pc:()=>De,SF:()=>Ce,XV:()=>qe,YW:()=>Le,_U:()=>xe,_q:()=>Oe,fW:()=>je,gN:()=>Ae,hz:()=>He,kL:()=>Re,o:()=>Fe,uq:()=>Ie,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 I="undefined"!=typeof TextDecoder?new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0}):{decode:()=>{throw Error("TextDecoder not available")}};"undefined"!=typeof TextDecoder&&I.decode();let z=null;function s(){return null!==z&&z.buffer===B.memory.buffer||(z=new Uint8Array(B.memory.buffer)),z}function c(e,t){return e>>>=0,I.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")}},M=function(e,t){const r=j.encode(e);return t.set(r),{read:e.length,written:r.length}};function l(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+=M(e,t).written,i=r(i,n,a,1)>>>0}return N=a,i}function u(e){return null==e}let $=null;function g(){return null!==$&&$.buffer===B.memory.buffer||($=new Int32Array(B.memory.buffer)),$}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=l(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=g()[a/4+0],_=g()[a/4+1];if(g()[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=l(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=g()[i/4+0],n=g()[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=g()[i/4+0],n=g()[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),_=l(t,B.__wbindgen_malloc,B.__wbindgen_realloc),a=N;B.execution_fromString(i,_,a);var r=g()[i/4+0],n=g()[i/4+1];if(g()[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=g()[r/4+0],t=g()[r/4+1];if(g()[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=g()[i/4+0],n=g()[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=g()[i/4+0],n=g()[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),_=l(t,B.__wbindgen_malloc,B.__wbindgen_realloc),a=N;B.field_fromString(i,_,a);var r=g()[i/4+0],n=g()[i/4+1];if(g()[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=g()[r/4+0],t=g()[r/4+1];if(g()[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=g()[r/4+0],t=g()[r/4+1];if(g()[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 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=g()[i/4+0],n=g()[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=l(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=g()[i/4+0],n=g()[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=l(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=g()[i/4+0],n=g()[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=l(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=g()[i/4+0],n=g()[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=l(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=g()[i/4+0],n=g()[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=l(e,B.__wbindgen_malloc,B.__wbindgen_realloc),_=N;B.offlinequery_new(n,i,_);var t=g()[n/4+0],r=g()[n/4+1];if(g()[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=l(e,B.__wbindgen_malloc,B.__wbindgen_realloc),_=N,a=l(t,B.__wbindgen_malloc,B.__wbindgen_realloc),s=N;B.offlinequery_addStatePath(n,this.__wbg_ptr,i,_,a,s);var r=g()[n/4+0];if(g()[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=g()[i/4+0],n=g()[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),_=l(t,B.__wbindgen_malloc,B.__wbindgen_realloc),a=N;B.offlinequery_fromString(i,_,a);var r=g()[i/4+0],n=g()[i/4+1];if(g()[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),_=l(t,B.__wbindgen_malloc,B.__wbindgen_realloc),a=N;B.privatekey_from_string(i,_,a);var r=g()[i/4+0],n=g()[i/4+1];if(g()[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=g()[i/4+0],n=g()[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=l(e,B.__wbindgen_malloc,B.__wbindgen_realloc),_=N;B.privatekey_newEncrypted(n,i,_);var t=g()[n/4+0],r=g()[n/4+1];if(g()[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=l(e,B.__wbindgen_malloc,B.__wbindgen_realloc),_=N;B.privatekey_toCiphertext(n,this.__wbg_ptr,i,_);var t=g()[n/4+0],r=g()[n/4+1];if(g()[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=l(r,B.__wbindgen_malloc,B.__wbindgen_realloc),s=N;B.privatekey_fromPrivateKeyCiphertext(_,t.__wbg_ptr,a,s);var n=g()[_/4+0],i=g()[_/4+1];if(g()[_/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=l(r,B.__wbindgen_malloc,B.__wbindgen_realloc),s=N;B.privatekey_toCiphertext(_,t.__wbg_ptr,a,s);var n=g()[_/4+0],i=g()[_/4+1];if(g()[_/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=l(e,B.__wbindgen_malloc,B.__wbindgen_realloc),_=N;B.privatekeyciphertext_decryptToPrivateKey(n,this.__wbg_ptr,i,_);var t=g()[n/4+0],r=g()[n/4+1];if(g()[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=g()[i/4+0],n=g()[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),_=l(t,B.__wbindgen_malloc,B.__wbindgen_realloc),a=N;B.privatekeyciphertext_fromString(i,_,a);var r=g()[i/4+0],n=g()[i/4+1];if(g()[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),_=l(t,B.__wbindgen_malloc,B.__wbindgen_realloc),a=N;B.program_fromString(i,_,a);var r=g()[i/4+0],n=g()[i/4+1];if(g()[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=g()[i/4+0],n=g()[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=l(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=l(e,B.__wbindgen_malloc,B.__wbindgen_realloc),_=N;B.program_getFunctionInputs(n,this.__wbg_ptr,i,_);var t=g()[n/4+0],r=g()[n/4+1];if(g()[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=g()[r/4+0],t=g()[r/4+1];if(g()[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=l(e,B.__wbindgen_malloc,B.__wbindgen_realloc),_=N;B.program_getRecordMembers(n,this.__wbg_ptr,i,_);var t=g()[n/4+0],r=g()[n/4+1];if(g()[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=l(e,B.__wbindgen_malloc,B.__wbindgen_realloc),_=N;B.program_getStructMembers(n,this.__wbg_ptr,i,_);var t=g()[n/4+0],r=g()[n/4+1];if(g()[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=g()[i/4+0],n=g()[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=g()[r/4+0],t=g()[r/4+1];if(g()[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 le="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((e=>B.__wbg_programmanager_free(e>>>0)));let ue=class{__destroy_into_raw(){const e=this.__wbg_ptr;return this.__wbg_ptr=0,le.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 g=l(t,B.__wbindgen_malloc,B.__wbindgen_realloc),f=N;let w=0;u(n)||(p(n,ye),w=n.__destroy_into_raw());var b=u(i)?0:l(i,B.__wbindgen_malloc,B.__wbindgen_realloc),y=N;let h=0;u(a)||(p(a,fe),h=a.__destroy_into_raw());let v=0;u(s)||(p(s,Ke),v=s.__destroy_into_raw());let m=0;u(c)||(p(c,ie),m=c.__destroy_into_raw());return o(B.programmanager_buildDeploymentTransaction(e.__wbg_ptr,g,f,r,w,b,y,u(_)?0:d(_),h,v,m))}static estimateDeploymentFee(e,t){const r=l(e,B.__wbindgen_malloc,B.__wbindgen_realloc),n=N;return o(B.programmanager_estimateDeploymentFee(r,n,u(t)?0:d(t)))}static estimateProgramNameCost(e){try{const n=B.__wbindgen_add_to_stack_pointer(-16),i=l(e,B.__wbindgen_malloc,B.__wbindgen_realloc),_=N;B.programmanager_estimateProgramNameCost(n,i,_);var t=v()[n/8+0],r=g()[n/4+2];if(g()[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,g,f){p(e,ae);const w=l(t,B.__wbindgen_malloc,B.__wbindgen_realloc),b=N,y=l(r,B.__wbindgen_malloc,B.__wbindgen_realloc),h=N;let v=0;u(s)||(p(s,fe),v=s.__destroy_into_raw());let m=0;u(c)||(p(c,Ke),m=c.__destroy_into_raw());var P=u(g)?0:l(g,B.__wbindgen_malloc,B.__wbindgen_realloc),k=N;let K=0;u(f)||(p(f,ie),K=f.__destroy_into_raw());return o(B.programmanager_executeFunctionOffline(e.__wbg_ptr,w,b,y,h,d(n),i,_,u(a)?0:d(a),v,m,P,k,K))}static buildExecutionTransaction(e,t,r,n,i,_,a,s,c,g,f,w,b){p(e,ae);const y=l(t,B.__wbindgen_malloc,B.__wbindgen_realloc),h=N,v=l(r,B.__wbindgen_malloc,B.__wbindgen_realloc),m=N;let P=0;u(_)||(p(_,ye),P=_.__destroy_into_raw());var k=u(a)?0:l(a,B.__wbindgen_malloc,B.__wbindgen_realloc),K=N;let S=0;u(c)||(p(c,fe),S=c.__destroy_into_raw());let T=0;u(g)||(p(g,Ke),T=g.__destroy_into_raw());let E=0;u(f)||(p(f,fe),E=f.__destroy_into_raw());let V=0;u(w)||(p(w,Ke),V=w.__destroy_into_raw());let R=0;u(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,u(s)?0:d(s),S,T,E,V,R))}static estimateExecutionFee(e,t,r,n,i,_,a,s,c){p(e,ae);const g=l(t,B.__wbindgen_malloc,B.__wbindgen_realloc),f=N,w=l(r,B.__wbindgen_malloc,B.__wbindgen_realloc),b=N;var y=u(i)?0:l(i,B.__wbindgen_malloc,B.__wbindgen_realloc),h=N;let v=0;u(a)||(p(a,fe),v=a.__destroy_into_raw());let m=0;u(s)||(p(s,Ke),m=s.__destroy_into_raw());let P=0;u(c)||(p(c,ie),P=c.__destroy_into_raw());return o(B.programmanager_estimateExecutionFee(e.__wbg_ptr,g,f,w,b,d(n),y,h,u(_)?0:d(_),v,m,P))}static estimateFinalizeFee(e,t){try{const i=B.__wbindgen_add_to_stack_pointer(-16),_=l(e,B.__wbindgen_malloc,B.__wbindgen_realloc),a=N,s=l(t,B.__wbindgen_malloc,B.__wbindgen_realloc),c=N;B.programmanager_estimateFinalizeFee(i,_,a,s,c);var r=v()[i/8+0],n=g()[i/4+2];if(g()[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,g){p(e,ae),p(t,ye);var f=t.__destroy_into_raw();p(r,ye);var w=r.__destroy_into_raw();let b=0;u(i)||(p(i,ye),b=i.__destroy_into_raw());var y=u(_)?0:l(_,B.__wbindgen_malloc,B.__wbindgen_realloc),h=N;let v=0;u(a)||(p(a,fe),v=a.__destroy_into_raw());let m=0;u(s)||(p(s,Ke),m=s.__destroy_into_raw());let P=0;u(c)||(p(c,fe),P=c.__destroy_into_raw());let k=0;u(d)||(p(d,Ke),k=d.__destroy_into_raw());let K=0;u(g)||(p(g,ie),K=g.__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=u(n)?0:l(n,B.__wbindgen_malloc,B.__wbindgen_realloc),d=N;let g=0;u(i)||(p(i,fe),g=i.__destroy_into_raw());let f=0;u(_)||(p(_,Ke),f=_.__destroy_into_raw());let w=0;u(a)||(p(a,ie),w=a.__destroy_into_raw());return o(B.programmanager_buildSplitTransaction(e.__wbg_ptr,t,s,c,d,g,f,w))}static buildTransferTransaction(e,t,r,n,i,_,a,s,c,d,g,f,w,b){p(e,ae);const y=l(r,B.__wbindgen_malloc,B.__wbindgen_realloc),h=N,v=l(n,B.__wbindgen_malloc,B.__wbindgen_realloc),m=N;var P=u(i)?0:l(i,B.__wbindgen_malloc,B.__wbindgen_realloc),k=N;let K=0;u(_)||(p(_,ye),K=_.__destroy_into_raw());let S=0;u(s)||(p(s,ye),S=s.__destroy_into_raw());var T=u(c)?0:l(c,B.__wbindgen_malloc,B.__wbindgen_realloc),E=N;let V=0;u(d)||(p(d,fe),V=d.__destroy_into_raw());let R=0;u(g)||(p(g,Ke),R=g.__destroy_into_raw());let F=0;u(f)||(p(f,fe),F=f.__destroy_into_raw());let x=0;u(w)||(p(w,Ke),x=w.__destroy_into_raw());let A=0;u(b)||(p(b,ie),A=b.__destroy_into_raw());return o(B.programmanager_buildTransferTransaction(e.__wbg_ptr,t,y,h,v,m,P,k,K,a,S,T,E,V,R,F,x,A))}static synthesizeKeyPair(e,t,r,n,i){p(e,ae);const _=l(t,B.__wbindgen_malloc,B.__wbindgen_realloc),a=N,s=l(r,B.__wbindgen_malloc,B.__wbindgen_realloc),c=N;return o(B.programmanager_synthesizeKeyPair(e.__wbg_ptr,_,a,s,c,d(n),u(i)?0:d(i)))}};const ge="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,ge.register(r,r.__wbg_ptr,r),r}__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_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=g()[i/4+0],n=g()[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=g()[i/4+0],n=g()[i/4+1];if(g()[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),_=l(t,B.__wbindgen_malloc,B.__wbindgen_realloc),a=N;B.provingkey_fromString(i,_,a);var r=g()[i/4+0],n=g()[i/4+1];if(g()[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=g()[i/4+0],t=g()[i/4+1],r=g()[i/4+2];if(g()[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=g()[i/4+0],n=g()[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),_=l(t,B.__wbindgen_malloc,B.__wbindgen_realloc),a=N;B.recordciphertext_fromString(i,_,a);var r=g()[i/4+0],n=g()[i/4+1];if(g()[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=g()[i/4+0],n=g()[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=g()[n/4+0],r=g()[n/4+1];if(g()[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),_=l(e,B.__wbindgen_malloc,B.__wbindgen_realloc),a=N,s=l(t,B.__wbindgen_malloc,B.__wbindgen_realloc),c=N;B.recordplaintext_commitment(i,this.__wbg_ptr,_,a,s,c);var r=g()[i/4+0],n=g()[i/4+1];if(g()[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),_=l(t,B.__wbindgen_malloc,B.__wbindgen_realloc),a=N;B.recordplaintext_fromString(i,_,a);var r=g()[i/4+0],n=g()[i/4+1];if(g()[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=g()[i/4+0],n=g()[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=g()[i/4+0],n=g()[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=l(t,B.__wbindgen_malloc,B.__wbindgen_realloc),y=N,h=l(r,B.__wbindgen_malloc,B.__wbindgen_realloc),v=N;B.recordplaintext_serialNumberString(w,this.__wbg_ptr,e.__wbg_ptr,b,y,h,v);var _=g()[w/4+0],a=g()[w/4+1],s=g()[w/4+2],d=g()[w/4+3],u=_,f=a;if(d)throw u=0,f=0,o(s);return n=u,i=f,c(u,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=l(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=g()[i/4+0],n=g()[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),_=l(t,B.__wbindgen_malloc,B.__wbindgen_realloc),a=N;B.transaction_fromString(i,_,a);var r=g()[i/4+0],n=g()[i/4+1];if(g()[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=g()[i/4+0],n=g()[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=g()[i/4+0],n=g()[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=g()[i/4+0],n=g()[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=g()[i/4+0],n=g()[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=g()[i/4+0],n=g()[i/4+1];if(g()[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),_=l(t,B.__wbindgen_malloc,B.__wbindgen_realloc),a=N;B.verifyingkey_fromString(i,_,a);var r=g()[i/4+0],n=g()[i/4+1];if(g()[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=g()[i/4+0],t=g()[i/4+1],r=g()[i/4+2];if(g()[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=g()[i/4+0],n=g()[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=l(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=g()[i/4+0],n=g()[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 u=B.__wbindgen_add_to_stack_pointer(-16),f=l(e,B.__wbindgen_malloc,B.__wbindgen_realloc),w=N;B.viewkey_decrypt(u,this.__wbg_ptr,f,w);var n=g()[u/4+0],i=g()[u/4+1],_=g()[u/4+2],a=g()[u/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=l(_(t).url,B.__wbindgen_malloc,B.__wbindgen_realloc),n=N;g()[e/4+1]=n,g()[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=u(n)?0:l(n,B.__wbindgen_malloc,B.__wbindgen_realloc),a=N;g()[e/4+1]=a,g()[e/4+0]=i},e.wbg.__wbg_transaction_new=function(e){return d(Pe.__wrap(e))},e.wbg.__wbg_call_b3ca7c6051f9bec1=function(){return K((function(e,t,r){return d(_(e).call(_(t),_(r)))}),arguments)},e.wbg.__wbg_keypair_new=function(e){return d(ee.__wrap(e))},e.wbg.__wbindgen_bigint_from_u64=function(e){return d(BigInt.asUintN(64,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_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_executionresponse_new=function(e){return d(Y.__wrap(e))},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=l(_(t).stack,B.__wbindgen_malloc,B.__wbindgen_realloc),n=N;g()[e/4+1]=n,g()[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=l(f(_(t)),B.__wbindgen_malloc,B.__wbindgen_realloc),n=N;g()[e/4+1]=n,g()[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=l("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;g()[e/4+1]=r,g()[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=u(r)?0:l(r,B.__wbindgen_malloc,B.__wbindgen_realloc),i=N;g()[e/4+1]=i,g()[e/4+0]=n}),arguments)},e.wbg.__wbindgen_closure_wrapper5763=function(e,t,r){return d(w(e,t,538,b))},e.wbg.__wbindgen_closure_wrapper5788=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,$=null,z=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 A=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:ue,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:Ae,Metadata:Ce,OfflineQuery:Be,Private:Ue,PrivateKey:Oe,PrivateKeyCiphertext:Ie,Program:ze,ProvingKey:Ne,RecordCiphertext:je,RecordPlaintext:Me,ProgramManager:$e,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),A})({importHook:()=>new URL(r(5934),r.b)});async function C(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:()=>u});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(),u(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:u}=Object.assign({path:[]},_.data),g=(_.data.argumentList||[]).map(m);let f;try{const t=u.slice(0,-1).reduce(((e,t)=>e[t]),e),r=u.reduce(((e,t)=>e[t]),e);switch(c){case"GET":f=r;break;case"SET":t[u.slice(-1)[0]]=m(_.data.value),f=!0;break;case"APPLY":f=r.apply(t,g);break;case"CONSTRUCT":f=function(e){return Object.assign(e,{[n]:!0})}(new r(...g));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),l(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 l(e){(function(e){return"MessagePort"===e.constructor.name})(e)&&e.close()}function u(e,t){return p(e,[],t)}function g(e){if(e)throw new Error("Proxy has been released and is not useable")}function f(e){return P(e,{type:"RELEASE"}).then((()=>{l(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(g(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,_){g(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){g(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){g(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 3f999d57b..cd9fd1682 100644 --- a/52.bundle.js.map +++ b/52.bundle.js.map @@ -1 +1 @@ -{"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,EAAoC,iBAAfA,EAA2BE,EAAAA,GAAqBC,WAAWH,GAAcA,EAC9F,MAAMf,EAAcmB,EAAAA,GAAWC,yBAAyBL,EAAYC,GACpE,OAAO,IAAIjB,EAAQ,CAAEsB,WAAYrB,EAAYsB,aAC9C,CAAC,MAAMf,GACN,MAAM,IAAIG,MAAM,uCACjB,EAGKJ,oBAAAA,CAAqBF,GAC3B,OAAIA,EAAOmB,KACFJ,EAAAA,GAAWK,oBAAoBpB,EAAOmB,MAE3CnB,EAAOiB,WACFF,EAAAA,GAAWM,YAAYrB,EAAOiB,YAEhC,I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sD,EAAMiX,MAAMyjB,YAAY16B,EAAMA,OAC9D,IAAK,MACD,OAAOA,EAAMA,MAEzB,CACA,SAASi9B,EAAuBnC,EAAI2D,EAAKzC,GACrC,OAAO,IAAIhzB,SAASC,IAChB,MAAMzG,EAeH,IAAIrE,MAAM,GACZ+V,KAAK,GACLjY,KAAI,IAAMoV,KAAKqtB,MAAMrtB,KAAKstB,SAAWC,OAAOC,kBAAkBnjC,SAAS,MACvEuL,KAAK,KAjBN6zB,EAAGrnB,iBAAiB,WAAW,SAAS5T,EAAEo7B,GACjCA,EAAGt3B,MAASs3B,EAAGt3B,KAAKnB,IAAMy4B,EAAGt3B,KAAKnB,KAAOA,IAG9Cs4B,EAAGwB,oBAAoB,UAAWz8B,GAClCoJ,EAAQgyB,EAAGt3B,MACf,IACIm3B,EAAG18B,OACH08B,EAAG18B,QAEP08B,EAAG/mB,YAAY/Q,OAAOC,OAAO,CAAET,MAAMi8B,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 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 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}) {\n this.proverUri = params.proverUri;\n this.verifierUri = params.verifierUri;\n this.cacheKey = params.cacheKey;\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 (\"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.fetchKeys(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 fetchKeys(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 bondPublicKeys(): Promise {\n return this.fetchKeys(CREDITS_PROGRAM_KEYS.bond_public.prover, CREDITS_PROGRAM_KEYS.bond_public.verifier, CREDITS_PROGRAM_KEYS.bond_public.locator)\n }\n\n bondValidatorKeys(): Promise {\n return this.fetchKeys(CREDITS_PROGRAM_KEYS.bond_validator.prover, CREDITS_PROGRAM_KEYS.bond_validator.verifier, CREDITS_PROGRAM_KEYS.bond_validator.locator)\n }\n\n claimUnbondPublicKeys(): Promise {\n return this.fetchKeys(CREDITS_PROGRAM_KEYS.claim_unbond_public.prover, CREDITS_PROGRAM_KEYS.claim_unbond_public.verifier, CREDITS_PROGRAM_KEYS.claim_unbond_public.locator)\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.fetchKeys(CREDITS_PROGRAM_KEYS.transfer_private.prover, CREDITS_PROGRAM_KEYS.transfer_private.verifier, CREDITS_PROGRAM_KEYS.transfer_private.locator);\n } else if (PRIVATE_TO_PUBLIC_TRANSFER.has(visibility)) {\n return await this.fetchKeys(CREDITS_PROGRAM_KEYS.transfer_private_to_public.prover, CREDITS_PROGRAM_KEYS.transfer_private_to_public.verifier, CREDITS_PROGRAM_KEYS.transfer_private_to_public.locator);\n } else if (PUBLIC_TRANSFER.has(visibility)) {\n return await this.fetchKeys(CREDITS_PROGRAM_KEYS.transfer_public.prover, CREDITS_PROGRAM_KEYS.transfer_public.verifier, CREDITS_PROGRAM_KEYS.transfer_public.locator);\n } else if (PUBLIC_TRANSFER_AS_SIGNER.has(visibility)) {\n return await this.fetchKeys(CREDITS_PROGRAM_KEYS.transfer_public_as_signer.prover, CREDITS_PROGRAM_KEYS.transfer_public_as_signer.verifier, CREDITS_PROGRAM_KEYS.transfer_public_as_signer.locator);\n } else if (PUBLIC_TO_PRIVATE_TRANSFER.has(visibility)) {\n return await this.fetchKeys(CREDITS_PROGRAM_KEYS.transfer_public_to_private.prover, CREDITS_PROGRAM_KEYS.transfer_public_to_private.verifier, CREDITS_PROGRAM_KEYS.transfer_public_to_private.locator);\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.fetchKeys(CREDITS_PROGRAM_KEYS.join.prover, CREDITS_PROGRAM_KEYS.join.verifier, CREDITS_PROGRAM_KEYS.join.locator);\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.fetchKeys(CREDITS_PROGRAM_KEYS.split.prover, CREDITS_PROGRAM_KEYS.split.verifier, CREDITS_PROGRAM_KEYS.split.locator);\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.fetchKeys(CREDITS_PROGRAM_KEYS.fee_private.prover, CREDITS_PROGRAM_KEYS.fee_private.verifier, CREDITS_PROGRAM_KEYS.fee_private.locator);\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.fetchKeys(CREDITS_PROGRAM_KEYS.fee_public.prover, CREDITS_PROGRAM_KEYS.fee_public.verifier, CREDITS_PROGRAM_KEYS.fee_public.locator);\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.fetchKeys(CREDITS_PROGRAM_KEYS.unbond_public.prover, CREDITS_PROGRAM_KEYS.unbond_public.verifier, CREDITS_PROGRAM_KEYS.unbond_public.locator);\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.executeOffline(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 {string | undefined} caller The caller of the function (if calling transfer_public)\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 caller?: string,\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, caller, 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} caller The caller of the transfer (may be different from the signer)\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 caller: string,\n recipient: string,\n fee: number,\n privateKey?: PrivateKey,\n offlineQuery?: OfflineQuery\n ): Promise {\n return this.buildTransferTransaction(amount, recipient, \"public\", fee, false, caller, 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, 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 {string | undefined} caller The caller of the function (if calling transfer_public)\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 caller?: string,\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, caller, 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 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 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};\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 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__h927aa242fc71dbdb(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__hbf3e91360cbaa199(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_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.__wbindgen_bigint_from_u64 = function(arg0) {\n const ret = BigInt.asUintN(64, 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_executionresponse_new = function(arg0) {\n const ret = ExecutionResponse.__wrap(arg0);\n return addHeapObject(ret);\n };\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_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_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_wrapper5762 = function(arg0, arg1, arg2) {\n const ret = makeMutClosure(arg0, arg1, 538, __wbg_adapter_34);\n return addHeapObject(ret);\n };\n imports.wbg.__wbindgen_closure_wrapper5787 = 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","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","fetchKeys","getVerifyingKey","bondPublicKeys","CREDITS_PROGRAM_KEYS","bond_public","prover","verifier","locator","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","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","keyPair","synthesizeKeyPair","buildTransferTransaction","amount","recipient","transferType","caller","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","name","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__h927aa242fc71dbdb","_assertClass","instance","klass","passArray8ToWasm0","verifyFunctionExecution$1","verifying_key","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_279","arg3","wasm_bindgen__convert__closures__invoke2_mut__hbf3e91360cbaa199","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","proving_key","ptr1","keypair_new","keypair_provingKey","keypair_verifyingKey","MetadataFinalization","__wbg_metadata_free","__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","len5","ptr9","ptr10","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_call_b3ca7c6051f9bec1","__wbindgen_bigint_from_u64","__wbg_transaction_new","Transaction$1","__wbg_executionresponse_new","ExecutionResponse$1","__wbg_log_0159ca40cddf5b15","__wbg_newwithlength_66ae46612e7f0234","__wbg_set_d4638f722068f043","__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_wrapper5762","__wbindgen_closure_wrapper5787","__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,EAAoC,iBAAfA,EAA2BE,EAAAA,GAAqBC,WAAWH,GAAcA,EAC9F,MAAMf,EAAcmB,EAAAA,GAAWC,yBAAyBL,EAAYC,GACpE,OAAO,IAAIjB,EAAQ,CAAEsB,WAAYrB,EAAYsB,aAC9C,CAAC,MAAMf,GACN,MAAM,IAAIG,MAAM,uCACjB,EAGKJ,oBAAA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MACNW,SAEJi8B,EAAcv/B,IAAIsD,IAAU,GAEpC,CACA,SAASy7B,EAAcz7B,GACnB,OAAQA,EAAMX,MACV,IAAK,UACD,OAAO86B,EAAiBz9B,IAAIsD,EAAMiX,MAAMyjB,YAAY16B,EAAMA,OAC9D,IAAK,MACD,OAAOA,EAAMA,MAEzB,CACA,SAASi9B,EAAuBnC,EAAI2D,EAAKzC,GACrC,OAAO,IAAIhzB,SAASC,IAChB,MAAMzG,EAeH,IAAIrE,MAAM,GACZ+V,KAAK,GACLjY,KAAI,IAAMoV,KAAKqtB,MAAMrtB,KAAKstB,SAAWC,OAAOC,kBAAkBnjC,SAAS,MACvEuL,KAAK,KAjBN6zB,EAAGrnB,iBAAiB,WAAW,SAAS5T,EAAEo7B,GACjCA,EAAGt3B,MAASs3B,EAAGt3B,KAAKnB,IAAMy4B,EAAGt3B,KAAKnB,KAAOA,IAG9Cs4B,EAAGwB,oBAAoB,UAAWz8B,GAClCoJ,EAAQgyB,EAAGt3B,MACf,IACIm3B,EAAG18B,OACH08B,EAAG18B,QAEP08B,EAAG/mB,YAAY/Q,OAAOC,OAAO,CAAET,MAAMi8B,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 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 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}) {\n this.proverUri = params.proverUri;\n this.verifierUri = params.verifierUri;\n this.cacheKey = params.cacheKey;\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 (\"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.fetchKeys(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 fetchKeys(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 bondPublicKeys(): Promise {\n return this.fetchKeys(CREDITS_PROGRAM_KEYS.bond_public.prover, CREDITS_PROGRAM_KEYS.bond_public.verifier, CREDITS_PROGRAM_KEYS.bond_public.locator)\n }\n\n bondValidatorKeys(): Promise {\n return this.fetchKeys(CREDITS_PROGRAM_KEYS.bond_validator.prover, CREDITS_PROGRAM_KEYS.bond_validator.verifier, CREDITS_PROGRAM_KEYS.bond_validator.locator)\n }\n\n claimUnbondPublicKeys(): Promise {\n return this.fetchKeys(CREDITS_PROGRAM_KEYS.claim_unbond_public.prover, CREDITS_PROGRAM_KEYS.claim_unbond_public.verifier, CREDITS_PROGRAM_KEYS.claim_unbond_public.locator)\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.fetchKeys(CREDITS_PROGRAM_KEYS.transfer_private.prover, CREDITS_PROGRAM_KEYS.transfer_private.verifier, CREDITS_PROGRAM_KEYS.transfer_private.locator);\n } else if (PRIVATE_TO_PUBLIC_TRANSFER.has(visibility)) {\n return await this.fetchKeys(CREDITS_PROGRAM_KEYS.transfer_private_to_public.prover, CREDITS_PROGRAM_KEYS.transfer_private_to_public.verifier, CREDITS_PROGRAM_KEYS.transfer_private_to_public.locator);\n } else if (PUBLIC_TRANSFER.has(visibility)) {\n return await this.fetchKeys(CREDITS_PROGRAM_KEYS.transfer_public.prover, CREDITS_PROGRAM_KEYS.transfer_public.verifier, CREDITS_PROGRAM_KEYS.transfer_public.locator);\n } else if (PUBLIC_TRANSFER_AS_SIGNER.has(visibility)) {\n return await this.fetchKeys(CREDITS_PROGRAM_KEYS.transfer_public_as_signer.prover, CREDITS_PROGRAM_KEYS.transfer_public_as_signer.verifier, CREDITS_PROGRAM_KEYS.transfer_public_as_signer.locator);\n } else if (PUBLIC_TO_PRIVATE_TRANSFER.has(visibility)) {\n return await this.fetchKeys(CREDITS_PROGRAM_KEYS.transfer_public_to_private.prover, CREDITS_PROGRAM_KEYS.transfer_public_to_private.verifier, CREDITS_PROGRAM_KEYS.transfer_public_to_private.locator);\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.fetchKeys(CREDITS_PROGRAM_KEYS.join.prover, CREDITS_PROGRAM_KEYS.join.verifier, CREDITS_PROGRAM_KEYS.join.locator);\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.fetchKeys(CREDITS_PROGRAM_KEYS.split.prover, CREDITS_PROGRAM_KEYS.split.verifier, CREDITS_PROGRAM_KEYS.split.locator);\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.fetchKeys(CREDITS_PROGRAM_KEYS.fee_private.prover, CREDITS_PROGRAM_KEYS.fee_private.verifier, CREDITS_PROGRAM_KEYS.fee_private.locator);\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.fetchKeys(CREDITS_PROGRAM_KEYS.fee_public.prover, CREDITS_PROGRAM_KEYS.fee_public.verifier, CREDITS_PROGRAM_KEYS.fee_public.locator);\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.fetchKeys(CREDITS_PROGRAM_KEYS.unbond_public.prover, CREDITS_PROGRAM_KEYS.unbond_public.verifier, CREDITS_PROGRAM_KEYS.unbond_public.locator);\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 {string | undefined} caller The caller of the function (if calling transfer_public)\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 caller?: string,\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, caller, 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} caller The caller of the transfer (may be different from the signer)\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 caller: string,\n recipient: string,\n fee: number,\n privateKey?: PrivateKey,\n offlineQuery?: OfflineQuery\n ): Promise {\n return this.buildTransferTransaction(amount, recipient, \"public\", fee, false, caller, 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, 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 {string | undefined} caller The caller of the function (if calling transfer_public)\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 caller?: string,\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, caller, 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 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 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};\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 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_279(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 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_transaction_new = function(arg0) {\n const ret = Transaction.__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_keypair_new = function(arg0) {\n const ret = KeyPair.__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.__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_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_executionresponse_new = function(arg0) {\n const ret = ExecutionResponse.__wrap(arg0);\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_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":["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","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","fetchKeys","getVerifyingKey","bondPublicKeys","CREDITS_PROGRAM_KEYS","bond_public","prover","verifier","locator","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","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","keyPair","synthesizeKeyPair","buildTransferTransaction","amount","recipient","transferType","caller","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","name","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","verifying_key","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_279","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","proving_key","ptr1","keypair_new","keypair_provingKey","keypair_verifyingKey","MetadataFinalization","__wbg_metadata_free","__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","len5","ptr9","ptr10","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_transaction_new","Transaction$1","__wbg_call_b3ca7c6051f9bec1","__wbg_keypair_new","__wbindgen_bigint_from_u64","__wbindgen_module","__wbg_init","__wbindgen_wasm_module","__wbindgen_memory","__wbg_spawnWorker_f6acaddb2e29dc4a","__wbg_log_0159ca40cddf5b15","__wbg_newwithlength_66ae46612e7f0234","__wbg_set_d4638f722068f043","__wbg_executionresponse_new","ExecutionResponse$1","__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_wrapper5763","__wbindgen_closure_wrapper5788","__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 b/530.bundle.js index 1ac09541e..4c9821f8e 100644 --- a/530.bundle.js +++ b/530.bundle.js @@ -1,3 +1,3 @@ /*! For license information please see 530.bundle.js.LICENSE.txt */ -(()=>{var e,r,t,i,n,a,o={5052:(e,r,t)=>{t.a(e,(async(e,i)=>{try{t.d(r,{AleoKeyProvider:()=>d,AleoKeyProviderParams:()=>p,ProgramManager:()=>y});var n=t(9933),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 f{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.10"}}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,u,l,h,f=0,p=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");l=this.account._privateKey}else try{l=t instanceof n._q?t:n._q.from_string(t)}catch(e){throw new Error("Error parsing private key provided.")}const d=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 r&&r<=h?r: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(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&&(p+=r.microcredits(),p>=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.$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 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.$r.fromString(e)}catch(r){try{return n.$r.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.$r?e:await this.getProgramObject(e)).getImports();for(let e=0;e0&&!g)try{g=await this.networkClient.getProgramImports(r)}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 n.L.buildExecutionTransaction(w,y,t,o,i,f,this.host,g,p,d,b,m,l)}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,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(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.L.executeFunctionOffline(h,e,r,t,i,!1,a,s,c,this.host,l)}async join(e,r,t,i,a,o,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=i?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,d]=u,[y,g]=l;try{o=i?await this.getCreditsRecord(t,[],o,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.`)}try{e=e instanceof n.PD?e:n.PD.fromString(e),r=r instanceof n.PD?r:n.PD.fromString(r)}catch(e){throw h("Records provided are not valid. Please ensure they are valid plaintext records.")}const v=await n.L.buildJoinTransaction(f,e,r,t,o,this.host,y,g,p,d,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 h(`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.PD?r:n.PD.fromString(r)}catch(e){throw h("Record provided is not valid. Please ensure it is a valid plaintext record.")}const u=await n.L.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._q);try{a=await this.networkClient.getProgramImports(e);const i=await n.L.synthesizeKeyPair(o,e,r,t,a);return[i.provingKey(),i.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,r,t,i,a,o,s,l,f,p,d){t=u(t);let y,g,v=p;if(void 0===v&&void 0!==this.account&&(v=this.account.privateKey()),void 0===v)throw"No private key provided and no private key set in the ProgramManager";try{y=a?await this.keyProvider.feePrivateKeys():await this.keyProvider.feePublicKeys(),g=await this.keyProvider.transferKeys(t)}catch(e){throw h(`Error finding fee keys. Key finder response: '${e}'. Please ensure your key provider is configured correctly.`)}const[w,b]=y,[m,_]=g;try{const e=[];c(t)?(l=await this.getCreditsRecord(i,[],l,s),e.push(l.nonce())):l=void 0,f=a?await this.getCreditsRecord(i,e,f,s):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 n.L.buildTransferTransaction(v,e,r,t,o,l,i,f,this.host,m,_,w,b,d)}async buildTransferPublicTransaction(e,r,t,i,n,a){return this.buildTransferTransaction(e,t,"public",i,!1,r,void 0,void 0,void 0,n,a)}async buildTransferPublicAsSignerTransaction(e,r,t,i,n){return this.buildTransferTransaction(e,r,"public",t,!1,void 0,void 0,void 0,void 0,i,n)}async transfer(e,r,t,i,n,a,o,s,c,u,l){const h=await this.buildTransferTransaction(e,r,t,i,n,a,o,s,c,u,l);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:l=[e,r,t,`${a.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(),...d}=n,y={programName:o,functionName:s,fee:c,privateFee:u,inputs:l,keySearchParams:h,...d};return await this.buildExecutionTransaction(y)}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:h=[e,r,`${a.toString()}u64`,`${o.toString()}u8`],keySearchParams:f=new p({proverUri:v.bond_validator.prover,verifierUri:v.bond_validator.verifier,cacheKey:"credits.aleo/bond_validator"}),program:d=this.creditsProgram(),...y}=n,g={programName:s,functionName:c,fee:u,privateFee:l,inputs:h,keySearchParams:f,...y};return await this.buildExecutionTransaction(g)}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 p({proverUri:v.unbond_public.prover,verifierUri:v.unbond_public.verifier,cacheKey:"credits.aleo/unbond_public"}),program:l=this.creditsProgram(),...h}=t,f={programName:n,functionName:a,fee:o,privateFee:s,inputs:c,keySearchParams:u,...h};return this.buildExecutionTransaction(f)}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 p({proverUri:v.claim_unbond_public.prover,verifierUri:v.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 p({proverUri:v.set_validator_state.prover,verifierUri:v.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.hz)(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.$r.fromString(e)}creditsProgram(){return n.$r.getCreditsProgram()}verifyProgram(e){try{return n.$r.fromString(e),!0}catch(e){return!1}}async getCreditsRecord(e,r,t,i){try{return t instanceof n.PD?t:n.PD.fromString(t)}catch(t){try{const t=this.recordProvider;return await t.findCreditsRecord(e,!0,r,i)}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 b.has(e)?e:h(`Invalid transfer type '${e}'. Valid transfer types are 'private', 'privateToPublic', 'public', and 'publicToPrivate'.`)}const g=n.SF.baseUrl();function l(e){const r=n.XV[e.verifyingKey];if(!r)throw new Error("Invalid method name: "+e.verifyingKey);return{locator:e.locator,prover:e.prover,verifier:e.verifier,verifyingKey:r}}const v={bond_public:l(n.SF.bond_public()),bond_validator:l(n.SF.bond_validator()),claim_unbond_public:l(n.SF.claim_unbond_public()),fee_private:l(n.SF.fee_private()),fee_public:l(n.SF.fee_public()),inclusion:l(n.SF.inclusion()),join:l(n.SF.join()),set_validator_state:l(n.SF.set_validator_state()),split:l(n.SF.split()),transfer_private:l(n.SF.transfer_private()),transfer_private_to_public:l(n.SF.transfer_private_to_public()),transfer_public:l(n.SF.transfer_public()),transfer_public_as_signer:l(n.SF.transfer_public_as_signer()),transfer_public_to_private:l(n.SF.transfer_public_to_private()),unbond_public:l(n.SF.unbond_public())},w=new Set(["transfer_private","private","transferPrivate","transfer_private_to_public","privateToPublic","transferPrivateToPublic"]),b=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"]),_=new Set(["private_to_public","privateToPublic","transfer_private_to_public","transferPrivateToPublic"]),P=new Set(["public","transfer_public","transferPublic"]),k=new Set(["public_as_signer","transfer_public_as_signer","transferPublicAsSigner"]),E=new Set(["public_to_private","publicToPrivate","transfer_public_to_private","transferPublicToPrivate"]);function h(e){throw console.error(e),e}i()}catch(K){i(K)}}))},9669:(e,r,t)=>{t.a(e,(async(e,r)=>{try{var i=t(5052),n=t(6891),a=t(9933),o=e([i,a]);[i,a]=o.then?(await o)():o,await(0,a.CK)();const u="https://api.explorer.aleo.org/v1",l=new i.AleoKeyProvider,h=new i.ProgramManager(u,l,void 0);l.useCache(!0);let f="";async function s(e,r,t,n,o=!1){console.log("Web worker: Executing function locally...");const s=performance.now();try{const c=h.createProgramFromSource(e);if(c instanceof Error)throw"Error creating program from source";const u=c.id();if(!c.hasFunction(r))throw`Program ${u} does not contain function ${r}`;const p=`${u}:${r}`,d=await h.networkClient.getProgramImports(e);if(d instanceof Error)throw"Error getting program imports";if(f!==e){const i=await h.synthesizeKeys(e,r,t,a._q.from_string(n));h.keyProvider.cacheKeys(p,i),f=e}const y=new i.AleoKeyProviderParams({cacheKey:p}),g=await h.run(e,r,t,o,d,y,void 0,void 0,a._q.from_string(n));console.log(`Web worker: Local execution completed in ${performance.now()-s} ms`);const v=g.getOutputs(),w=g.getExecution();let b="";const m=l.getKeys(p);if(m instanceof Error)throw"Could not get verifying key";const _=m[1];return w?((0,a.hz)(w,_,c,"hello"),b=w.toString(),console.log("Execution verified successfully: "+w)):b="",console.log(`Function execution response: ${v}`),{outputs:v,execution:b}}catch(e){return console.error(e),e?e.toString():"Unknown error"}}async function c(){return(new a._q).to_string()}const p={executeOffline:s,getPrivateKey:c};(0,n.Jj)(p),r()}catch(d){r(d)}}),1)},6891:(e,r,t)=>{t.d(r,{Jj:()=>l});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 l(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 l(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),p=(a.data.argumentList||[]).map(m);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]]=m(a.data.value),d=!0;break;case"APPLY":d=t.apply(r,p);break;case"CONSTRUCT":d=function(e){return Object.assign(e,{[i]:!0})}(new t(...p));break;case"ENDPOINT":{const{port1:r,port2:t}=new MessageChannel;l(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]=b(t);r.postMessage(Object.assign(Object.assign({},i),{id:c}),a),"RELEASE"===u&&(r.removeEventListener("message",n),h(r),o in e&&"function"==typeof e[o]&&e[o]())})).catch((e=>{const[t,i]=b({value:new TypeError("Unserializable return value"),[s]:0});r.postMessage(Object.assign(Object.assign({},t),{id:c}),i)}))})),r.start&&r.start()}function h(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 p(e){return _(e,{type:"RELEASE"}).then((()=>{h(e)}))}const d=new WeakMap,y="FinalizationRegistry"in globalThis&&new FinalizationRegistry((e=>{const r=(d.get(e)||0)-1;d.set(e,r),0===r&&p(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){y&&y.unregister(e)}(o),p(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(m);return t.then.bind(t)}return g(e,[...r,n])},set(t,n,a){f(i);const[o,s]=b(a);return _(e,{type:"SET",path:[...r,n].map((e=>e.toString())),value:o},s).then(m)},apply(t,a,o){f(i);const s=r[r.length-1];if(s===n)return _(e,{type:"ENDPOINT"}).then(m);if("bind"===s)return g(e,r.slice(0,-1));const[c,u]=v(o);return _(e,{type:"APPLY",path:r.map((e=>e.toString())),argumentList:c},u).then(m)},construct(t,n){f(i);const[a,o]=v(n);return _(e,{type:"CONSTRUCT",path:r.map((e=>e.toString())),argumentList:a},o).then(m)}});return function(e,r){const t=(d.get(r)||0)+1;d.set(r,t),y&&y.register(e,r,e)}(o,e),o}function v(e){const r=e.map(b);return[r.map((e=>e[0])),(t=r.map((e=>e[1])),Array.prototype.concat.apply([],t))];var t}const w=new WeakMap;function b(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 m(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)}))}}},s={};function c(e){var r=s[e];if(void 0!==r)return r.exports;var t=s[e]={exports:{}};return o[e](t,t.exports,c),t.exports}c.m=o,c.x=()=>{var e=c.O(void 0,[933],(()=>c(9669)));return e=c.O(e)},e="function"==typeof Symbol?Symbol("webpack queues"):"__webpack_queues__",r="function"==typeof Symbol?Symbol("webpack exports"):"__webpack_exports__",t="function"==typeof Symbol?Symbol("webpack error"):"__webpack_error__",i=e=>{e&&e.d<1&&(e.d=1,e.forEach((e=>e.r--)),e.forEach((e=>e.r--?e.r++:e())))},c.a=(n,a,o)=>{var s;o&&((s=[]).d=-1);var c,u,l,h=new Set,f=n.exports,p=new Promise(((e,r)=>{l=r,u=e}));p[r]=f,p[e]=e=>(s&&e(s),h.forEach(e),p.catch((e=>{}))),n.exports=p,a((n=>{var a;c=(n=>n.map((n=>{if(null!==n&&"object"==typeof n){if(n[e])return n;if(n.then){var a=[];a.d=0,n.then((e=>{o[r]=e,i(a)}),(e=>{o[t]=e,i(a)}));var o={};return o[e]=e=>e(a),o}}var s={};return s[e]=e=>{},s[r]=n,s})))(n);var o=()=>c.map((e=>{if(e[t])throw e[t];return e[r]})),u=new Promise((r=>{(a=()=>r(o)).r=0;var t=e=>e!==s&&!h.has(e)&&(h.add(e),e&&!e.d&&(a.r++,e.push(a)));c.map((r=>r[e](t)))}));return a.r?u:o()}),(e=>(e?l(p[t]=e):u(f),i(s)))),s&&s.d<0&&(s.d=0)},n=[],c.O=(e,r,t,i)=>{if(!r){var a=1/0;for(l=0;l=i)&&Object.keys(c.O).every((e=>c.O[e](r[s])))?r.splice(s--,1):(o=!1,i0&&n[l-1][2]>i;l--)n[l]=n[l-1];n[l]=[r,t,i]},c.d=(e,r)=>{for(var t in r)c.o(r,t)&&!c.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:r[t]})},c.f={},c.e=e=>Promise.all(Object.keys(c.f).reduce(((r,t)=>(c.f[t](e,r),r)),[])),c.u=e=>e+".bundle.js",c.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),c.o=(e,r)=>Object.prototype.hasOwnProperty.call(e,r),(()=>{var e;c.g.importScripts&&(e=c.g.location+"");var r=c.g.document;if(!e&&r&&(r.currentScript&&(e=r.currentScript.src),!e)){var t=r.getElementsByTagName("script");if(t.length)for(var i=t.length-1;i>-1&&!e;)e=t[i--].src}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),c.p=e})(),(()=>{c.b=self.location+"";var e={530:1};c.f.i=(r,t)=>{e[r]||importScripts(c.p+c.u(r))};var r=self.webpackChunkaleo_website=self.webpackChunkaleo_website||[],t=r.push.bind(r);r.push=r=>{var[i,n,a]=r;for(var o in n)c.o(n,o)&&(c.m[o]=n[o]);for(a&&a(c);i.length;)e[i.pop()]=1;t(r)}})(),a=c.x,c.x=()=>c.e(933).then(a);c.x()})(); +(()=>{var e,r,t,i,n,a,o={5052:(e,r,t)=>{t.a(e,(async(e,i)=>{try{t.d(r,{AleoKeyProvider:()=>d,AleoKeyProviderParams:()=>p,ProgramManager:()=>y});var n=t(9933),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 f{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.11"}}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,u,l,h,f=0,p=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");l=this.account._privateKey}else try{l=t instanceof n._q?t:n._q.from_string(t)}catch(e){throw new Error("Error parsing private key provided.")}const d=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 r&&r<=h?r: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(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&&(p+=r.microcredits(),p>=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.$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 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.$r.fromString(e)}catch(r){try{return n.$r.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.$r?e:await this.getProgramObject(e)).getImports();for(let e=0;e0&&!g)try{g=await this.networkClient.getProgramImports(r)}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 n.L.buildExecutionTransaction(w,y,t,o,i,f,this.host,g,p,d,b,m,l)}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,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(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.L.executeFunctionOffline(h,e,r,t,i,!1,a,s,c,this.host,l)}async join(e,r,t,i,a,o,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=i?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,d]=u,[y,g]=l;try{o=i?await this.getCreditsRecord(t,[],o,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.`)}try{e=e instanceof n.PD?e:n.PD.fromString(e),r=r instanceof n.PD?r:n.PD.fromString(r)}catch(e){throw h("Records provided are not valid. Please ensure they are valid plaintext records.")}const v=await n.L.buildJoinTransaction(f,e,r,t,o,this.host,y,g,p,d,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 h(`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.PD?r:n.PD.fromString(r)}catch(e){throw h("Record provided is not valid. Please ensure it is a valid plaintext record.")}const u=await n.L.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._q);try{a=await this.networkClient.getProgramImports(e);const i=await n.L.synthesizeKeyPair(o,e,r,t,a);return[i.provingKey(),i.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,r,t,i,a,o,s,l,f,p,d){t=u(t);let y,g,v=p;if(void 0===v&&void 0!==this.account&&(v=this.account.privateKey()),void 0===v)throw"No private key provided and no private key set in the ProgramManager";try{y=a?await this.keyProvider.feePrivateKeys():await this.keyProvider.feePublicKeys(),g=await this.keyProvider.transferKeys(t)}catch(e){throw h(`Error finding fee keys. Key finder response: '${e}'. Please ensure your key provider is configured correctly.`)}const[w,b]=y,[m,_]=g;try{const e=[];c(t)?(l=await this.getCreditsRecord(i,[],l,s),e.push(l.nonce())):l=void 0,f=a?await this.getCreditsRecord(i,e,f,s):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 n.L.buildTransferTransaction(v,e,r,t,o,l,i,f,this.host,m,_,w,b,d)}async buildTransferPublicTransaction(e,r,t,i,n,a){return this.buildTransferTransaction(e,t,"public",i,!1,r,void 0,void 0,void 0,n,a)}async buildTransferPublicAsSignerTransaction(e,r,t,i,n){return this.buildTransferTransaction(e,r,"public",t,!1,void 0,void 0,void 0,void 0,i,n)}async transfer(e,r,t,i,n,a,o,s,c,u,l){const h=await this.buildTransferTransaction(e,r,t,i,n,a,o,s,c,u,l);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:l=[e,r,t,`${a.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(),...d}=n,y={programName:o,functionName:s,fee:c,privateFee:u,inputs:l,keySearchParams:h,...d};return await this.buildExecutionTransaction(y)}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:h=[e,r,`${a.toString()}u64`,`${o.toString()}u8`],keySearchParams:f=new p({proverUri:v.bond_validator.prover,verifierUri:v.bond_validator.verifier,cacheKey:"credits.aleo/bond_validator"}),program:d=this.creditsProgram(),...y}=n,g={programName:s,functionName:c,fee:u,privateFee:l,inputs:h,keySearchParams:f,...y};return await this.buildExecutionTransaction(g)}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 p({proverUri:v.unbond_public.prover,verifierUri:v.unbond_public.verifier,cacheKey:"credits.aleo/unbond_public"}),program:l=this.creditsProgram(),...h}=t,f={programName:n,functionName:a,fee:o,privateFee:s,inputs:c,keySearchParams:u,...h};return this.buildExecutionTransaction(f)}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 p({proverUri:v.claim_unbond_public.prover,verifierUri:v.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 p({proverUri:v.set_validator_state.prover,verifierUri:v.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.hz)(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.$r.fromString(e)}creditsProgram(){return n.$r.getCreditsProgram()}verifyProgram(e){try{return n.$r.fromString(e),!0}catch(e){return!1}}async getCreditsRecord(e,r,t,i){try{return t instanceof n.PD?t:n.PD.fromString(t)}catch(t){try{const t=this.recordProvider;return await t.findCreditsRecord(e,!0,r,i)}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 b.has(e)?e:h(`Invalid transfer type '${e}'. Valid transfer types are 'private', 'privateToPublic', 'public', and 'publicToPrivate'.`)}const g=n.SF.baseUrl();function l(e){const r=n.XV[e.verifyingKey];if(!r)throw new Error("Invalid method name: "+e.verifyingKey);return{locator:e.locator,prover:e.prover,verifier:e.verifier,verifyingKey:r}}const v={bond_public:l(n.SF.bond_public()),bond_validator:l(n.SF.bond_validator()),claim_unbond_public:l(n.SF.claim_unbond_public()),fee_private:l(n.SF.fee_private()),fee_public:l(n.SF.fee_public()),inclusion:l(n.SF.inclusion()),join:l(n.SF.join()),set_validator_state:l(n.SF.set_validator_state()),split:l(n.SF.split()),transfer_private:l(n.SF.transfer_private()),transfer_private_to_public:l(n.SF.transfer_private_to_public()),transfer_public:l(n.SF.transfer_public()),transfer_public_as_signer:l(n.SF.transfer_public_as_signer()),transfer_public_to_private:l(n.SF.transfer_public_to_private()),unbond_public:l(n.SF.unbond_public())},w=new Set(["transfer_private","private","transferPrivate","transfer_private_to_public","privateToPublic","transferPrivateToPublic"]),b=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"]),_=new Set(["private_to_public","privateToPublic","transfer_private_to_public","transferPrivateToPublic"]),P=new Set(["public","transfer_public","transferPublic"]),k=new Set(["public_as_signer","transfer_public_as_signer","transferPublicAsSigner"]),E=new Set(["public_to_private","publicToPrivate","transfer_public_to_private","transferPublicToPrivate"]);function h(e){throw console.error(e),e}i()}catch(K){i(K)}}))},9669:(e,r,t)=>{t.a(e,(async(e,r)=>{try{var i=t(5052),n=t(6891),a=t(9933),o=e([i,a]);[i,a]=o.then?(await o)():o,await(0,a.CK)();const u="https://api.explorer.aleo.org/v1",l=new i.AleoKeyProvider,h=new i.ProgramManager(u,l,void 0);l.useCache(!0);let f="";async function s(e,r,t,n,o=!1){console.log("Web worker: Executing function locally...");const s=performance.now();try{const c=h.createProgramFromSource(e);if(c instanceof Error)throw"Error creating program from source";const u=c.id();if(!c.hasFunction(r))throw`Program ${u} does not contain function ${r}`;const p=`${u}:${r}`,d=await h.networkClient.getProgramImports(e);if(d instanceof Error)throw"Error getting program imports";if(f!==e){const i=await h.synthesizeKeys(e,r,t,a._q.from_string(n));h.keyProvider.cacheKeys(p,i),f=e}const y=new i.AleoKeyProviderParams({cacheKey:p}),g=await h.run(e,r,t,o,d,y,void 0,void 0,a._q.from_string(n));console.log(`Web worker: Local execution completed in ${performance.now()-s} ms`);const v=g.getOutputs(),w=g.getExecution();let b="";const m=l.getKeys(p);if(m instanceof Error)throw"Could not get verifying key";const _=m[1];return w?((0,a.hz)(w,_,c,"hello"),b=w.toString(),console.log("Execution verified successfully: "+w)):b="",console.log(`Function execution response: ${v}`),{outputs:v,execution:b}}catch(e){return console.error(e),e?e.toString():"Unknown error"}}async function c(){return(new a._q).to_string()}const p={run:s,getPrivateKey:c};(0,n.Jj)(p),r()}catch(d){r(d)}}),1)},6891:(e,r,t)=>{t.d(r,{Jj:()=>l});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 l(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 l(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),p=(a.data.argumentList||[]).map(m);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]]=m(a.data.value),d=!0;break;case"APPLY":d=t.apply(r,p);break;case"CONSTRUCT":d=function(e){return Object.assign(e,{[i]:!0})}(new t(...p));break;case"ENDPOINT":{const{port1:r,port2:t}=new MessageChannel;l(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]=b(t);r.postMessage(Object.assign(Object.assign({},i),{id:c}),a),"RELEASE"===u&&(r.removeEventListener("message",n),h(r),o in e&&"function"==typeof e[o]&&e[o]())})).catch((e=>{const[t,i]=b({value:new TypeError("Unserializable return value"),[s]:0});r.postMessage(Object.assign(Object.assign({},t),{id:c}),i)}))})),r.start&&r.start()}function h(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 p(e){return _(e,{type:"RELEASE"}).then((()=>{h(e)}))}const d=new WeakMap,y="FinalizationRegistry"in globalThis&&new FinalizationRegistry((e=>{const r=(d.get(e)||0)-1;d.set(e,r),0===r&&p(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){y&&y.unregister(e)}(o),p(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(m);return t.then.bind(t)}return g(e,[...r,n])},set(t,n,a){f(i);const[o,s]=b(a);return _(e,{type:"SET",path:[...r,n].map((e=>e.toString())),value:o},s).then(m)},apply(t,a,o){f(i);const s=r[r.length-1];if(s===n)return _(e,{type:"ENDPOINT"}).then(m);if("bind"===s)return g(e,r.slice(0,-1));const[c,u]=v(o);return _(e,{type:"APPLY",path:r.map((e=>e.toString())),argumentList:c},u).then(m)},construct(t,n){f(i);const[a,o]=v(n);return _(e,{type:"CONSTRUCT",path:r.map((e=>e.toString())),argumentList:a},o).then(m)}});return function(e,r){const t=(d.get(r)||0)+1;d.set(r,t),y&&y.register(e,r,e)}(o,e),o}function v(e){const r=e.map(b);return[r.map((e=>e[0])),(t=r.map((e=>e[1])),Array.prototype.concat.apply([],t))];var t}const w=new WeakMap;function b(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 m(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)}))}}},s={};function c(e){var r=s[e];if(void 0!==r)return r.exports;var t=s[e]={exports:{}};return o[e](t,t.exports,c),t.exports}c.m=o,c.x=()=>{var e=c.O(void 0,[933],(()=>c(9669)));return e=c.O(e)},e="function"==typeof Symbol?Symbol("webpack queues"):"__webpack_queues__",r="function"==typeof Symbol?Symbol("webpack exports"):"__webpack_exports__",t="function"==typeof Symbol?Symbol("webpack error"):"__webpack_error__",i=e=>{e&&e.d<1&&(e.d=1,e.forEach((e=>e.r--)),e.forEach((e=>e.r--?e.r++:e())))},c.a=(n,a,o)=>{var s;o&&((s=[]).d=-1);var c,u,l,h=new Set,f=n.exports,p=new Promise(((e,r)=>{l=r,u=e}));p[r]=f,p[e]=e=>(s&&e(s),h.forEach(e),p.catch((e=>{}))),n.exports=p,a((n=>{var a;c=(n=>n.map((n=>{if(null!==n&&"object"==typeof n){if(n[e])return n;if(n.then){var a=[];a.d=0,n.then((e=>{o[r]=e,i(a)}),(e=>{o[t]=e,i(a)}));var o={};return o[e]=e=>e(a),o}}var s={};return s[e]=e=>{},s[r]=n,s})))(n);var o=()=>c.map((e=>{if(e[t])throw e[t];return e[r]})),u=new Promise((r=>{(a=()=>r(o)).r=0;var t=e=>e!==s&&!h.has(e)&&(h.add(e),e&&!e.d&&(a.r++,e.push(a)));c.map((r=>r[e](t)))}));return a.r?u:o()}),(e=>(e?l(p[t]=e):u(f),i(s)))),s&&s.d<0&&(s.d=0)},n=[],c.O=(e,r,t,i)=>{if(!r){var a=1/0;for(l=0;l=i)&&Object.keys(c.O).every((e=>c.O[e](r[s])))?r.splice(s--,1):(o=!1,i0&&n[l-1][2]>i;l--)n[l]=n[l-1];n[l]=[r,t,i]},c.d=(e,r)=>{for(var t in r)c.o(r,t)&&!c.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:r[t]})},c.f={},c.e=e=>Promise.all(Object.keys(c.f).reduce(((r,t)=>(c.f[t](e,r),r)),[])),c.u=e=>e+".bundle.js",c.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),c.o=(e,r)=>Object.prototype.hasOwnProperty.call(e,r),(()=>{var e;c.g.importScripts&&(e=c.g.location+"");var r=c.g.document;if(!e&&r&&(r.currentScript&&(e=r.currentScript.src),!e)){var t=r.getElementsByTagName("script");if(t.length)for(var i=t.length-1;i>-1&&!e;)e=t[i--].src}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),c.p=e})(),(()=>{c.b=self.location+"";var e={530:1};c.f.i=(r,t)=>{e[r]||importScripts(c.p+c.u(r))};var r=self.webpackChunkaleo_website=self.webpackChunkaleo_website||[],t=r.push.bind(r);r.push=r=>{var[i,n,a]=r;for(var o in n)c.o(n,o)&&(c.m[o]=n[o]);for(a&&a(c);i.length;)e[i.pop()]=1;t(r)}})(),a=c.x,c.x=()=>c.e(933).then(a);c.x()})(); //# sourceMappingURL=530.bundle.js.map \ No newline at end of file diff --git a/530.bundle.js.map b/530.bundle.js.map index 5a4ec7201..43c5f2496 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,+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mBrZ,KAvBCwD,IACnB,IAAK8T,EAAUiC,EAAaC,GAAWhW,EACvC,IAAI,IAAI+R,KAAYgE,EAChBjE,EAAoBwC,EAAEyB,EAAahE,KACrCD,EAAoBM,EAAEL,GAAYgE,EAAYhE,IAIhD,IADGiE,GAASA,EAAQlE,GACdgC,EAAShZ,QACd8a,EAAgB9B,EAASmC,OAAS,EACnCH,EAA2B9V,EAAK,MfnB7BpI,EAAOka,EAAoBO,EAC/BP,EAAoBO,EAAI,IAChBP,EAAoB7N,EAAE,KAAK4K,KAAKjX,GgBDdka,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 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 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}) {\n this.proverUri = params.proverUri;\n this.verifierUri = params.verifierUri;\n this.cacheKey = params.cacheKey;\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 (\"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.fetchKeys(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 fetchKeys(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 bondPublicKeys(): Promise {\n return this.fetchKeys(CREDITS_PROGRAM_KEYS.bond_public.prover, CREDITS_PROGRAM_KEYS.bond_public.verifier, CREDITS_PROGRAM_KEYS.bond_public.locator)\n }\n\n bondValidatorKeys(): Promise {\n return this.fetchKeys(CREDITS_PROGRAM_KEYS.bond_validator.prover, CREDITS_PROGRAM_KEYS.bond_validator.verifier, CREDITS_PROGRAM_KEYS.bond_validator.locator)\n }\n\n claimUnbondPublicKeys(): Promise {\n return this.fetchKeys(CREDITS_PROGRAM_KEYS.claim_unbond_public.prover, CREDITS_PROGRAM_KEYS.claim_unbond_public.verifier, CREDITS_PROGRAM_KEYS.claim_unbond_public.locator)\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.fetchKeys(CREDITS_PROGRAM_KEYS.transfer_private.prover, CREDITS_PROGRAM_KEYS.transfer_private.verifier, CREDITS_PROGRAM_KEYS.transfer_private.locator);\n } else if (PRIVATE_TO_PUBLIC_TRANSFER.has(visibility)) {\n return await this.fetchKeys(CREDITS_PROGRAM_KEYS.transfer_private_to_public.prover, CREDITS_PROGRAM_KEYS.transfer_private_to_public.verifier, CREDITS_PROGRAM_KEYS.transfer_private_to_public.locator);\n } else if (PUBLIC_TRANSFER.has(visibility)) {\n return await this.fetchKeys(CREDITS_PROGRAM_KEYS.transfer_public.prover, CREDITS_PROGRAM_KEYS.transfer_public.verifier, CREDITS_PROGRAM_KEYS.transfer_public.locator);\n } else if (PUBLIC_TRANSFER_AS_SIGNER.has(visibility)) {\n return await this.fetchKeys(CREDITS_PROGRAM_KEYS.transfer_public_as_signer.prover, CREDITS_PROGRAM_KEYS.transfer_public_as_signer.verifier, CREDITS_PROGRAM_KEYS.transfer_public_as_signer.locator);\n } else if (PUBLIC_TO_PRIVATE_TRANSFER.has(visibility)) {\n return await this.fetchKeys(CREDITS_PROGRAM_KEYS.transfer_public_to_private.prover, CREDITS_PROGRAM_KEYS.transfer_public_to_private.verifier, CREDITS_PROGRAM_KEYS.transfer_public_to_private.locator);\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.fetchKeys(CREDITS_PROGRAM_KEYS.join.prover, CREDITS_PROGRAM_KEYS.join.verifier, CREDITS_PROGRAM_KEYS.join.locator);\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.fetchKeys(CREDITS_PROGRAM_KEYS.split.prover, CREDITS_PROGRAM_KEYS.split.verifier, CREDITS_PROGRAM_KEYS.split.locator);\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.fetchKeys(CREDITS_PROGRAM_KEYS.fee_private.prover, CREDITS_PROGRAM_KEYS.fee_private.verifier, CREDITS_PROGRAM_KEYS.fee_private.locator);\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.fetchKeys(CREDITS_PROGRAM_KEYS.fee_public.prover, CREDITS_PROGRAM_KEYS.fee_public.verifier, CREDITS_PROGRAM_KEYS.fee_public.locator);\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.fetchKeys(CREDITS_PROGRAM_KEYS.unbond_public.prover, CREDITS_PROGRAM_KEYS.unbond_public.verifier, CREDITS_PROGRAM_KEYS.unbond_public.locator);\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.executeOffline(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 {string | undefined} caller The caller of the function (if calling transfer_public)\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 caller?: string,\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, caller, 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} caller The caller of the transfer (may be different from the signer)\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 caller: string,\n recipient: string,\n fee: number,\n privateKey?: PrivateKey,\n offlineQuery?: OfflineQuery\n ): Promise {\n return this.buildTransferTransaction(amount, recipient, \"public\", fee, false, caller, 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, 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 {string | undefined} caller The caller of the function (if calling transfer_public)\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 caller?: string,\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, caller, 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 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 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};\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 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 executeOffline: (\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 executeOffline(\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 = { executeOffline, 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","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","fetchKeys","getVerifyingKey","bondPublicKeys","CREDITS_PROGRAM_KEYS","bond_public","prover","verifier","locator","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","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","keyPair","synthesizeKeyPair","buildTransferTransaction","amount","recipient","transferType","caller","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","executeOffline","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","name","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,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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IM,EAAUH,EAASI,qBAAqB,UAC5C,GAAGD,EAAQza,OAEV,IADA,IAAID,EAAI0a,EAAQza,OAAS,EAClBD,GAAK,IAAMoa,GAAWA,EAAYM,EAAQ1a,KAAKya,GAExD,CAID,IAAKL,EAAW,MAAM,IAAI7c,MAAM,yDAChC6c,EAAYA,EAAU/X,QAAQ,OAAQ,IAAIA,QAAQ,QAAS,IAAIA,QAAQ,YAAa,KACpF2U,EAAoBvB,EAAI2E,YClBxBpD,EAAoB4D,EAAIC,KAAKP,SAAW,GAIxC,IAAIQ,EAAkB,CACrB,IAAK,GAgBN9D,EAAoB2C,EAAE3Z,EAAI,CAAC4Z,EAASE,KAE/BgB,EAAgBlB,IAElBS,cAAcrD,EAAoBvB,EAAIuB,EAAoB+C,EAAEH,GAE9D,EAGD,IAAImB,EAAqBF,KAA+B,yBAAIA,KAA+B,0BAAK,GAC5FG,EAA6BD,EAAmBpZ,KAAK+T,KAAKqF,GAC9DA,EAAmBpZ,KAvBCwD,IACnB,IAAK6T,EAAUiC,EAAaC,GAAW/V,EACvC,IAAI,IAAI8R,KAAYgE,EAChBjE,EAAoBwC,EAAEyB,EAAahE,KACrCD,EAAoBM,EAAEL,GAAYgE,EAAYhE,IAIhD,IADGiE,GAASA,EAAQlE,GACdgC,EAAS/Y,QACd6a,EAAgB9B,EAASmC,OAAS,EACnCH,EAA2B7V,EAAK,MfnB7BpI,EAAOia,EAAoBO,EAC/BP,EAAoBO,EAAI,IAChBP,EAAoB5N,EAAE,KAAK2K,KAAKhX,GgBDdia,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 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 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}) {\n this.proverUri = params.proverUri;\n this.verifierUri = params.verifierUri;\n this.cacheKey = params.cacheKey;\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 (\"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.fetchKeys(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 fetchKeys(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 bondPublicKeys(): Promise {\n return this.fetchKeys(CREDITS_PROGRAM_KEYS.bond_public.prover, CREDITS_PROGRAM_KEYS.bond_public.verifier, CREDITS_PROGRAM_KEYS.bond_public.locator)\n }\n\n bondValidatorKeys(): Promise {\n return this.fetchKeys(CREDITS_PROGRAM_KEYS.bond_validator.prover, CREDITS_PROGRAM_KEYS.bond_validator.verifier, CREDITS_PROGRAM_KEYS.bond_validator.locator)\n }\n\n claimUnbondPublicKeys(): Promise {\n return this.fetchKeys(CREDITS_PROGRAM_KEYS.claim_unbond_public.prover, CREDITS_PROGRAM_KEYS.claim_unbond_public.verifier, CREDITS_PROGRAM_KEYS.claim_unbond_public.locator)\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.fetchKeys(CREDITS_PROGRAM_KEYS.transfer_private.prover, CREDITS_PROGRAM_KEYS.transfer_private.verifier, CREDITS_PROGRAM_KEYS.transfer_private.locator);\n } else if (PRIVATE_TO_PUBLIC_TRANSFER.has(visibility)) {\n return await this.fetchKeys(CREDITS_PROGRAM_KEYS.transfer_private_to_public.prover, CREDITS_PROGRAM_KEYS.transfer_private_to_public.verifier, CREDITS_PROGRAM_KEYS.transfer_private_to_public.locator);\n } else if (PUBLIC_TRANSFER.has(visibility)) {\n return await this.fetchKeys(CREDITS_PROGRAM_KEYS.transfer_public.prover, CREDITS_PROGRAM_KEYS.transfer_public.verifier, CREDITS_PROGRAM_KEYS.transfer_public.locator);\n } else if (PUBLIC_TRANSFER_AS_SIGNER.has(visibility)) {\n return await this.fetchKeys(CREDITS_PROGRAM_KEYS.transfer_public_as_signer.prover, CREDITS_PROGRAM_KEYS.transfer_public_as_signer.verifier, CREDITS_PROGRAM_KEYS.transfer_public_as_signer.locator);\n } else if (PUBLIC_TO_PRIVATE_TRANSFER.has(visibility)) {\n return await this.fetchKeys(CREDITS_PROGRAM_KEYS.transfer_public_to_private.prover, CREDITS_PROGRAM_KEYS.transfer_public_to_private.verifier, CREDITS_PROGRAM_KEYS.transfer_public_to_private.locator);\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.fetchKeys(CREDITS_PROGRAM_KEYS.join.prover, CREDITS_PROGRAM_KEYS.join.verifier, CREDITS_PROGRAM_KEYS.join.locator);\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.fetchKeys(CREDITS_PROGRAM_KEYS.split.prover, CREDITS_PROGRAM_KEYS.split.verifier, CREDITS_PROGRAM_KEYS.split.locator);\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.fetchKeys(CREDITS_PROGRAM_KEYS.fee_private.prover, CREDITS_PROGRAM_KEYS.fee_private.verifier, CREDITS_PROGRAM_KEYS.fee_private.locator);\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.fetchKeys(CREDITS_PROGRAM_KEYS.fee_public.prover, CREDITS_PROGRAM_KEYS.fee_public.verifier, CREDITS_PROGRAM_KEYS.fee_public.locator);\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.fetchKeys(CREDITS_PROGRAM_KEYS.unbond_public.prover, CREDITS_PROGRAM_KEYS.unbond_public.verifier, CREDITS_PROGRAM_KEYS.unbond_public.locator);\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 {string | undefined} caller The caller of the function (if calling transfer_public)\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 caller?: string,\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, caller, 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} caller The caller of the transfer (may be different from the signer)\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 caller: string,\n recipient: string,\n fee: number,\n privateKey?: PrivateKey,\n offlineQuery?: OfflineQuery\n ): Promise {\n return this.buildTransferTransaction(amount, recipient, \"public\", fee, false, caller, 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, 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 {string | undefined} caller The caller of the function (if calling transfer_public)\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 caller?: string,\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, caller, 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 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 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};\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 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","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","fetchKeys","getVerifyingKey","bondPublicKeys","CREDITS_PROGRAM_KEYS","bond_public","prover","verifier","locator","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","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","keyPair","synthesizeKeyPair","buildTransferTransaction","amount","recipient","transferType","caller","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","name","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/63.bundle.js b/63.bundle.js deleted file mode 100644 index 5199f9933..000000000 --- a/63.bundle.js +++ /dev/null @@ -1,2 +0,0 @@ -(self.webpackChunkaleo_website=self.webpackChunkaleo_website||[]).push([[63],{5128:(_,t,e)=>{_.exports=e.p+"c65a205fb6c9a1c6018a.js"},8249:(_,t,e)=>{_.exports=e.p+"4e18189c68509261e165.wasm"},2063:(_,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",(_=>{i.unref&&i.unref(),n(i)}),{capture:!0,once:!0}),i.postMessage({module:t,memory:e,address:r})}))}let R;e.d(t,{$r:()=>p_,CK:()=>E,L:()=>v_,PD:()=>h_,XV:()=>S_,YW:()=>P_,_q:()=>f_,fW:()=>m_,hz:()=>V_,zW:()=>y_});const C=new Array(128).fill(void 0);function i(_){return C[_]}C.push(void 0,null,!0,!1);let U=C.length;function o(_){_<132||(C[_]=U,U=_)}function a(_){const t=i(_);return o(_),t}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 B=null;function s(){return null!==B&&B.buffer===R.memory.buffer||(B=new Uint8Array(R.memory.buffer)),B}function c(_,t){return _>>>=0,I.decode(s().slice(_,_+t))}function w(_){U===C.length&&C.push(C.length+1);const t=U;return U=C[t],C[t]=_,t}let M=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 g(_,t,e){if(void 0===e){const e=W.encode(_),r=t(e.length,1)>>>0;return s().subarray(r,r+e.length).set(e),M=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+=D(_,t).written}return M=o,n}function b(_){return null==_}let q=null;function d(){return null!==q&&q.buffer===R.memory.buffer||(q=new Int32Array(R.memory.buffer)),q}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}function f(_,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?R.__wbindgen_export_3.get(n.dtor)(t,n.b):n.a=t}};return i.original=n,i}function u(_,t,e){R.wasm_bindgen__convert__closures__invoke1_mut__h53d50e21bb2d5c71(_,t,w(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),M=_.length,e}function m(_,t,e,r){try{const o=R.__wbindgen_add_to_stack_pointer(-16);p(_,z),p(t,i_),p(e,G);const s=g(r,R.__wbindgen_malloc,R.__wbindgen_realloc),c=M;R.verifyFunctionExecution(o,_.__wbg_ptr,t.__wbg_ptr,e.__wbg_ptr,s,c);var n=d()[o/4+0],i=d()[o/4+1];if(d()[o/4+2])throw a(i);return 0!==n}finally{R.__wbindgen_add_to_stack_pointer(16)}}let $=null;function h(){return null!==$&&$.buffer===R.memory.buffer||($=new BigInt64Array(R.memory.buffer)),$}function v(_,t){return _>>>=0,s().subarray(_/1,_/1+t)}function k(_){R.runRayonThread(_)}function P(_,t){return a(R.initThreadPool(w(_),t))}function x(_,t){try{return _.apply(this,t)}catch(_){R.__wbindgen_exn_store(w(_))}}function S(_,t,e,r){R.wasm_bindgen__convert__closures__invoke2_mut__he97f6a3b9df30e2b(_,t,w(e),w(r))}let N=class _{static __wrap(t){t>>>=0;const e=Object.create(_.prototype);return e.__wbg_ptr=t,e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,_}free(){const _=this.__destroy_into_raw();R.__wbg_address_free(_)}static from_private_key(t){p(t,X);const e=R.address_from_private_key(t.__wbg_ptr);return _.__wrap(e)}static from_view_key(t){p(t,o_);const e=R.address_from_view_key(t.__wbg_ptr);return _.__wrap(e)}static from_string(t){const e=g(t,R.__wbindgen_malloc,R.__wbindgen_realloc),r=M,n=R.address_from_string(e,r);return _.__wrap(n)}to_string(){let _,t;try{const n=R.__wbindgen_add_to_stack_pointer(-16);R.address_to_string(n,this.__wbg_ptr);var e=d()[n/4+0],r=d()[n/4+1];return _=e,t=r,c(e,r)}finally{R.__wbindgen_add_to_stack_pointer(16),R.__wbindgen_free(_,t,1)}}verify(_,t){const e=y(_,R.__wbindgen_malloc),r=M;p(t,r_);return 0!==R.address_verify(this.__wbg_ptr,e,r,t.__wbg_ptr)}},z=class _{static __wrap(t){t>>>=0;const e=Object.create(_.prototype);return e.__wbg_ptr=t,e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,_}free(){const _=this.__destroy_into_raw();R.__wbg_execution_free(_)}toString(){let _,t;try{const n=R.__wbindgen_add_to_stack_pointer(-16);R.execution_toString(n,this.__wbg_ptr);var e=d()[n/4+0],r=d()[n/4+1];return _=e,t=r,c(e,r)}finally{R.__wbindgen_add_to_stack_pointer(16),R.__wbindgen_free(_,t,1)}}static fromString(t){try{const n=R.__wbindgen_add_to_stack_pointer(-16),i=g(t,R.__wbindgen_malloc,R.__wbindgen_realloc),o=M;R.execution_fromString(n,i,o);var e=d()[n/4+0],r=d()[n/4+1];if(d()[n/4+2])throw a(r);return _.__wrap(e)}finally{R.__wbindgen_add_to_stack_pointer(16)}}},J=class _{static __wrap(t){t>>>=0;const e=Object.create(_.prototype);return e.__wbg_ptr=t,e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,_}free(){const _=this.__destroy_into_raw();R.__wbg_executionresponse_free(_)}getOutputs(){return a(R.executionresponse_getOutputs(this.__wbg_ptr))}getExecution(){const _=R.executionresponse_getExecution(this.__wbg_ptr);return 0===_?void 0:z.__wrap(_)}getKeys(){try{const e=R.__wbindgen_add_to_stack_pointer(-16);R.executionresponse_getKeys(e,this.__wbg_ptr);var _=d()[e/4+0],t=d()[e/4+1];if(d()[e/4+2])throw a(t);return H.__wrap(_)}finally{R.__wbindgen_add_to_stack_pointer(16)}}getProvingKey(){const _=R.executionresponse_getProvingKey(this.__wbg_ptr);return 0===_?void 0:__.__wrap(_)}getVerifyingKey(){const _=R.executionresponse_getVerifyingKey(this.__wbg_ptr);return i_.__wrap(_)}getFunctionId(){let _,t;try{const n=R.__wbindgen_add_to_stack_pointer(-16);R.executionresponse_getFunctionId(n,this.__wbg_ptr);var e=d()[n/4+0],r=d()[n/4+1];return _=e,t=r,c(e,r)}finally{R.__wbindgen_add_to_stack_pointer(16),R.__wbindgen_free(_,t,1)}}getProgram(){const _=R.executionresponse_getProgram(this.__wbg_ptr);return G.__wrap(_)}},L=class _{static __wrap(t){t>>>=0;const e=Object.create(_.prototype);return e.__wbg_ptr=t,e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,_}free(){const _=this.__destroy_into_raw();R.__wbg_field_free(_)}toString(){let _,t;try{const n=R.__wbindgen_add_to_stack_pointer(-16);R.field_toString(n,this.__wbg_ptr);var e=d()[n/4+0],r=d()[n/4+1];return _=e,t=r,c(e,r)}finally{R.__wbindgen_add_to_stack_pointer(16),R.__wbindgen_free(_,t,1)}}static fromString(t){try{const n=R.__wbindgen_add_to_stack_pointer(-16),i=g(t,R.__wbindgen_malloc,R.__wbindgen_realloc),o=M;R.field_fromString(n,i,o);var e=d()[n/4+0],r=d()[n/4+1];if(d()[n/4+2])throw a(r);return _.__wrap(e)}finally{R.__wbindgen_add_to_stack_pointer(16)}}};class H{static __wrap(_){_>>>=0;const t=Object.create(H.prototype);return t.__wbg_ptr=_,t}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,_}free(){const _=this.__destroy_into_raw();R.__wbg_keypair_free(_)}constructor(_,t){p(_,__);var e=_.__destroy_into_raw();p(t,i_);var r=t.__destroy_into_raw();const n=R.keypair_new(e,r);return H.__wrap(n)}provingKey(){try{const e=R.__wbindgen_add_to_stack_pointer(-16);R.keypair_provingKey(e,this.__wbg_ptr);var _=d()[e/4+0],t=d()[e/4+1];if(d()[e/4+2])throw a(t);return __.__wrap(_)}finally{R.__wbindgen_add_to_stack_pointer(16)}}verifyingKey(){try{const e=R.__wbindgen_add_to_stack_pointer(-16);R.keypair_verifyingKey(e,this.__wbg_ptr);var _=d()[e/4+0],t=d()[e/4+1];if(d()[e/4+2])throw a(t);return i_.__wrap(_)}finally{R.__wbindgen_add_to_stack_pointer(16)}}}let Q=class _{static __wrap(t){t>>>=0;const e=Object.create(_.prototype);return e.__wbg_ptr=t,e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,_}free(){const _=this.__destroy_into_raw();R.__wbg_offlinequery_free(_)}constructor(t){try{const n=R.__wbindgen_add_to_stack_pointer(-16),i=g(t,R.__wbindgen_malloc,R.__wbindgen_realloc),o=M;R.offlinequery_new(n,i,o);var e=d()[n/4+0],r=d()[n/4+1];if(d()[n/4+2])throw a(r);return _.__wrap(e)}finally{R.__wbindgen_add_to_stack_pointer(16)}}addStatePath(_,t){try{const r=R.__wbindgen_add_to_stack_pointer(-16),n=g(_,R.__wbindgen_malloc,R.__wbindgen_realloc),i=M,o=g(t,R.__wbindgen_malloc,R.__wbindgen_realloc),s=M;R.offlinequery_addStatePath(r,this.__wbg_ptr,n,i,o,s);var e=d()[r/4+0];if(d()[r/4+1])throw a(e)}finally{R.__wbindgen_add_to_stack_pointer(16)}}toString(){let _,t;try{const n=R.__wbindgen_add_to_stack_pointer(-16);R.offlinequery_toString(n,this.__wbg_ptr);var e=d()[n/4+0],r=d()[n/4+1];return _=e,t=r,c(e,r)}finally{R.__wbindgen_add_to_stack_pointer(16),R.__wbindgen_free(_,t,1)}}static fromString(t){try{const n=R.__wbindgen_add_to_stack_pointer(-16),i=g(t,R.__wbindgen_malloc,R.__wbindgen_realloc),o=M;R.offlinequery_fromString(n,i,o);var e=d()[n/4+0],r=d()[n/4+1];if(d()[n/4+2])throw a(r);return _.__wrap(e)}finally{R.__wbindgen_add_to_stack_pointer(16)}}},X=class _{static __wrap(t){t>>>=0;const e=Object.create(_.prototype);return e.__wbg_ptr=t,e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,_}free(){const _=this.__destroy_into_raw();R.__wbg_privatekey_free(_)}constructor(){const t=R.privatekey_new();return _.__wrap(t)}static from_seed_unchecked(t){const e=y(t,R.__wbindgen_malloc),r=M,n=R.privatekey_from_seed_unchecked(e,r);return _.__wrap(n)}static from_string(t){try{const n=R.__wbindgen_add_to_stack_pointer(-16),i=g(t,R.__wbindgen_malloc,R.__wbindgen_realloc),o=M;R.privatekey_from_string(n,i,o);var e=d()[n/4+0],r=d()[n/4+1];if(d()[n/4+2])throw a(r);return _.__wrap(e)}finally{R.__wbindgen_add_to_stack_pointer(16)}}to_string(){let _,t;try{const n=R.__wbindgen_add_to_stack_pointer(-16);R.privatekey_to_string(n,this.__wbg_ptr);var e=d()[n/4+0],r=d()[n/4+1];return _=e,t=r,c(e,r)}finally{R.__wbindgen_add_to_stack_pointer(16),R.__wbindgen_free(_,t,1)}}to_view_key(){const _=R.privatekey_to_view_key(this.__wbg_ptr);return o_.__wrap(_)}to_address(){const _=R.address_from_private_key(this.__wbg_ptr);return N.__wrap(_)}sign(_){const t=y(_,R.__wbindgen_malloc),e=M,r=R.privatekey_sign(this.__wbg_ptr,t,e);return r_.__wrap(r)}static newEncrypted(_){try{const r=R.__wbindgen_add_to_stack_pointer(-16),n=g(_,R.__wbindgen_malloc,R.__wbindgen_realloc),i=M;R.privatekey_newEncrypted(r,n,i);var t=d()[r/4+0],e=d()[r/4+1];if(d()[r/4+2])throw a(e);return Y.__wrap(t)}finally{R.__wbindgen_add_to_stack_pointer(16)}}toCiphertext(_){try{const r=R.__wbindgen_add_to_stack_pointer(-16),n=g(_,R.__wbindgen_malloc,R.__wbindgen_realloc),i=M;R.privatekey_toCiphertext(r,this.__wbg_ptr,n,i);var t=d()[r/4+0],e=d()[r/4+1];if(d()[r/4+2])throw a(e);return Y.__wrap(t)}finally{R.__wbindgen_add_to_stack_pointer(16)}}static fromPrivateKeyCiphertext(t,e){try{const i=R.__wbindgen_add_to_stack_pointer(-16);p(t,Y);const o=g(e,R.__wbindgen_malloc,R.__wbindgen_realloc),s=M;R.privatekey_fromPrivateKeyCiphertext(i,t.__wbg_ptr,o,s);var r=d()[i/4+0],n=d()[i/4+1];if(d()[i/4+2])throw a(n);return _.__wrap(r)}finally{R.__wbindgen_add_to_stack_pointer(16)}}},Y=class _{static __wrap(t){t>>>=0;const e=Object.create(_.prototype);return e.__wbg_ptr=t,e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,_}free(){const _=this.__destroy_into_raw();R.__wbg_privatekeyciphertext_free(_)}static encryptPrivateKey(t,e){try{const i=R.__wbindgen_add_to_stack_pointer(-16);p(t,X);const o=g(e,R.__wbindgen_malloc,R.__wbindgen_realloc),s=M;R.privatekey_toCiphertext(i,t.__wbg_ptr,o,s);var r=d()[i/4+0],n=d()[i/4+1];if(d()[i/4+2])throw a(n);return _.__wrap(r)}finally{R.__wbindgen_add_to_stack_pointer(16)}}decryptToPrivateKey(_){try{const r=R.__wbindgen_add_to_stack_pointer(-16),n=g(_,R.__wbindgen_malloc,R.__wbindgen_realloc),i=M;R.privatekeyciphertext_decryptToPrivateKey(r,this.__wbg_ptr,n,i);var t=d()[r/4+0],e=d()[r/4+1];if(d()[r/4+2])throw a(e);return X.__wrap(t)}finally{R.__wbindgen_add_to_stack_pointer(16)}}toString(){let _,t;try{const n=R.__wbindgen_add_to_stack_pointer(-16);R.privatekeyciphertext_toString(n,this.__wbg_ptr);var e=d()[n/4+0],r=d()[n/4+1];return _=e,t=r,c(e,r)}finally{R.__wbindgen_add_to_stack_pointer(16),R.__wbindgen_free(_,t,1)}}static fromString(t){try{const n=R.__wbindgen_add_to_stack_pointer(-16),i=g(t,R.__wbindgen_malloc,R.__wbindgen_realloc),o=M;R.privatekeyciphertext_fromString(n,i,o);var e=d()[n/4+0],r=d()[n/4+1];if(d()[n/4+2])throw a(r);return _.__wrap(e)}finally{R.__wbindgen_add_to_stack_pointer(16)}}},G=class _{static __wrap(t){t>>>=0;const e=Object.create(_.prototype);return e.__wbg_ptr=t,e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,_}free(){const _=this.__destroy_into_raw();R.__wbg_program_free(_)}static fromString(t){try{const n=R.__wbindgen_add_to_stack_pointer(-16),i=g(t,R.__wbindgen_malloc,R.__wbindgen_realloc),o=M;R.program_fromString(n,i,o);var e=d()[n/4+0],r=d()[n/4+1];if(d()[n/4+2])throw a(r);return _.__wrap(e)}finally{R.__wbindgen_add_to_stack_pointer(16)}}toString(){let _,t;try{const n=R.__wbindgen_add_to_stack_pointer(-16);R.program_toString(n,this.__wbg_ptr);var e=d()[n/4+0],r=d()[n/4+1];return _=e,t=r,c(e,r)}finally{R.__wbindgen_add_to_stack_pointer(16),R.__wbindgen_free(_,t,1)}}hasFunction(_){const t=g(_,R.__wbindgen_malloc,R.__wbindgen_realloc),e=M;return 0!==R.program_hasFunction(this.__wbg_ptr,t,e)}getFunctions(){return a(R.program_getFunctions(this.__wbg_ptr))}getFunctionInputs(_){try{const r=R.__wbindgen_add_to_stack_pointer(-16),n=g(_,R.__wbindgen_malloc,R.__wbindgen_realloc),i=M;R.program_getFunctionInputs(r,this.__wbg_ptr,n,i);var t=d()[r/4+0],e=d()[r/4+1];if(d()[r/4+2])throw a(e);return a(t)}finally{R.__wbindgen_add_to_stack_pointer(16)}}getMappings(){try{const e=R.__wbindgen_add_to_stack_pointer(-16);R.program_getMappings(e,this.__wbg_ptr);var _=d()[e/4+0],t=d()[e/4+1];if(d()[e/4+2])throw a(t);return a(_)}finally{R.__wbindgen_add_to_stack_pointer(16)}}getRecordMembers(_){try{const r=R.__wbindgen_add_to_stack_pointer(-16),n=g(_,R.__wbindgen_malloc,R.__wbindgen_realloc),i=M;R.program_getRecordMembers(r,this.__wbg_ptr,n,i);var t=d()[r/4+0],e=d()[r/4+1];if(d()[r/4+2])throw a(e);return a(t)}finally{R.__wbindgen_add_to_stack_pointer(16)}}getStructMembers(_){try{const r=R.__wbindgen_add_to_stack_pointer(-16),n=g(_,R.__wbindgen_malloc,R.__wbindgen_realloc),i=M;R.program_getStructMembers(r,this.__wbg_ptr,n,i);var t=d()[r/4+0],e=d()[r/4+1];if(d()[r/4+2])throw a(e);return a(t)}finally{R.__wbindgen_add_to_stack_pointer(16)}}static getCreditsProgram(){const t=R.program_getCreditsProgram();return _.__wrap(t)}id(){let _,t;try{const n=R.__wbindgen_add_to_stack_pointer(-16);R.program_id(n,this.__wbg_ptr);var e=d()[n/4+0],r=d()[n/4+1];return _=e,t=r,c(e,r)}finally{R.__wbindgen_add_to_stack_pointer(16),R.__wbindgen_free(_,t,1)}}isEqual(t){p(t,_);return 0!==R.program_isEqual(this.__wbg_ptr,t.__wbg_ptr)}getImports(){return a(R.program_getImports(this.__wbg_ptr))}},Z=class{__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,_}free(){const _=this.__destroy_into_raw();R.__wbg_programmanager_free(_)}static buildDeploymentTransaction(_,t,e,r,n,i,o,s,c){p(_,X);const d=g(t,R.__wbindgen_malloc,R.__wbindgen_realloc),l=M;let f=0;b(r)||(p(r,e_),f=r.__destroy_into_raw());var u=b(n)?0:g(n,R.__wbindgen_malloc,R.__wbindgen_realloc),y=M;let m=0;b(o)||(p(o,__),m=o.__destroy_into_raw());let h=0;b(s)||(p(s,i_),h=s.__destroy_into_raw());let v=0;b(c)||(p(c,Q),v=c.__destroy_into_raw());return a(R.programmanager_buildDeploymentTransaction(_.__wbg_ptr,d,l,e,f,u,y,b(i)?0:w(i),m,h,v))}static estimateDeploymentFee(_,t){const e=g(_,R.__wbindgen_malloc,R.__wbindgen_realloc),r=M;return a(R.programmanager_estimateDeploymentFee(e,r,b(t)?0:w(t)))}static estimateProgramNameCost(_){try{const r=R.__wbindgen_add_to_stack_pointer(-16),n=g(_,R.__wbindgen_malloc,R.__wbindgen_realloc),i=M;R.programmanager_estimateProgramNameCost(r,n,i);var t=h()[r/8+0],e=d()[r/4+2];if(d()[r/4+3])throw a(e);return BigInt.asUintN(64,t)}finally{R.__wbindgen_add_to_stack_pointer(16)}}static executeFunctionOffline(_,t,e,r,n,i,o,s,c,d,l){p(_,X);const f=g(t,R.__wbindgen_malloc,R.__wbindgen_realloc),u=M,y=g(e,R.__wbindgen_malloc,R.__wbindgen_realloc),m=M;let h=0;b(s)||(p(s,__),h=s.__destroy_into_raw());let v=0;b(c)||(p(c,i_),v=c.__destroy_into_raw());var k=b(d)?0:g(d,R.__wbindgen_malloc,R.__wbindgen_realloc),P=M;let x=0;b(l)||(p(l,Q),x=l.__destroy_into_raw());return a(R.programmanager_executeFunctionOffline(_.__wbg_ptr,f,u,y,m,w(r),n,i,b(o)?0:w(o),h,v,k,P,x))}static buildExecutionTransaction(_,t,e,r,n,i,o,s,c,d,l,f,u){p(_,X);const y=g(t,R.__wbindgen_malloc,R.__wbindgen_realloc),m=M,h=g(e,R.__wbindgen_malloc,R.__wbindgen_realloc),v=M;let k=0;b(i)||(p(i,e_),k=i.__destroy_into_raw());var P=b(o)?0:g(o,R.__wbindgen_malloc,R.__wbindgen_realloc),x=M;let S=0;b(c)||(p(c,__),S=c.__destroy_into_raw());let V=0;b(d)||(p(d,i_),V=d.__destroy_into_raw());let T=0;b(l)||(p(l,__),T=l.__destroy_into_raw());let A=0;b(f)||(p(f,i_),A=f.__destroy_into_raw());let F=0;b(u)||(p(u,Q),F=u.__destroy_into_raw());return a(R.programmanager_buildExecutionTransaction(_.__wbg_ptr,y,m,h,v,w(r),n,k,P,x,b(s)?0:w(s),S,V,T,A,F))}static estimateExecutionFee(_,t,e,r,n,i,o,s,c){p(_,X);const d=g(t,R.__wbindgen_malloc,R.__wbindgen_realloc),l=M,f=g(e,R.__wbindgen_malloc,R.__wbindgen_realloc),u=M;var y=b(n)?0:g(n,R.__wbindgen_malloc,R.__wbindgen_realloc),m=M;let h=0;b(o)||(p(o,__),h=o.__destroy_into_raw());let v=0;b(s)||(p(s,i_),v=s.__destroy_into_raw());let k=0;b(c)||(p(c,Q),k=c.__destroy_into_raw());return a(R.programmanager_estimateExecutionFee(_.__wbg_ptr,d,l,f,u,w(r),y,m,b(i)?0:w(i),h,v,k))}static estimateFinalizeFee(_,t){try{const n=R.__wbindgen_add_to_stack_pointer(-16),i=g(_,R.__wbindgen_malloc,R.__wbindgen_realloc),o=M,s=g(t,R.__wbindgen_malloc,R.__wbindgen_realloc),c=M;R.programmanager_estimateFinalizeFee(n,i,o,s,c);var e=h()[n/8+0],r=d()[n/4+2];if(d()[n/4+3])throw a(r);return BigInt.asUintN(64,e)}finally{R.__wbindgen_add_to_stack_pointer(16)}}static buildJoinTransaction(_,t,e,r,n,i,o,s,c,w,d){p(_,X),p(t,e_);var l=t.__destroy_into_raw();p(e,e_);var f=e.__destroy_into_raw();let u=0;b(n)||(p(n,e_),u=n.__destroy_into_raw());var y=b(i)?0:g(i,R.__wbindgen_malloc,R.__wbindgen_realloc),m=M;let h=0;b(o)||(p(o,__),h=o.__destroy_into_raw());let v=0;b(s)||(p(s,i_),v=s.__destroy_into_raw());let k=0;b(c)||(p(c,__),k=c.__destroy_into_raw());let P=0;b(w)||(p(w,i_),P=w.__destroy_into_raw());let x=0;b(d)||(p(d,Q),x=d.__destroy_into_raw());return a(R.programmanager_buildJoinTransaction(_.__wbg_ptr,l,f,r,u,y,m,h,v,k,P,x))}static buildSplitTransaction(_,t,e,r,n,i,o){p(_,X),p(e,e_);var s=e.__destroy_into_raw(),c=b(r)?0:g(r,R.__wbindgen_malloc,R.__wbindgen_realloc),w=M;let d=0;b(n)||(p(n,__),d=n.__destroy_into_raw());let l=0;b(i)||(p(i,i_),l=i.__destroy_into_raw());let f=0;b(o)||(p(o,Q),f=o.__destroy_into_raw());return a(R.programmanager_buildSplitTransaction(_.__wbg_ptr,t,s,c,w,d,l,f))}static buildTransferTransaction(_,t,e,r,n,i,o,s,c,w,d,l,f){p(_,X);const u=g(e,R.__wbindgen_malloc,R.__wbindgen_realloc),y=M,m=g(r,R.__wbindgen_malloc,R.__wbindgen_realloc),h=M;let v=0;b(n)||(p(n,e_),v=n.__destroy_into_raw());let k=0;b(o)||(p(o,e_),k=o.__destroy_into_raw());var P=b(s)?0:g(s,R.__wbindgen_malloc,R.__wbindgen_realloc),x=M;let S=0;b(c)||(p(c,__),S=c.__destroy_into_raw());let V=0;b(w)||(p(w,i_),V=w.__destroy_into_raw());let T=0;b(d)||(p(d,__),T=d.__destroy_into_raw());let A=0;b(l)||(p(l,i_),A=l.__destroy_into_raw());let F=0;b(f)||(p(f,Q),F=f.__destroy_into_raw());return a(R.programmanager_buildTransferTransaction(_.__wbg_ptr,t,u,y,m,h,v,i,k,P,x,S,V,T,A,F))}static synthesizeKeyPair(_,t,e,r,n){p(_,X);const i=g(t,R.__wbindgen_malloc,R.__wbindgen_realloc),o=M,s=g(e,R.__wbindgen_malloc,R.__wbindgen_realloc),c=M;return a(R.programmanager_synthesizeKeyPair(_.__wbg_ptr,i,o,s,c,w(r),b(n)?0:w(n)))}},__=class _{static __wrap(t){t>>>=0;const e=Object.create(_.prototype);return e.__wbg_ptr=t,e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,_}free(){const _=this.__destroy_into_raw();R.__wbg_provingkey_free(_)}isBondPublicProver(){return 0!==R.provingkey_isBondPublicProver(this.__wbg_ptr)}isClaimUnbondPublicProver(){return 0!==R.provingkey_isClaimUnbondPublicProver(this.__wbg_ptr)}isFeePrivateProver(){return 0!==R.provingkey_isFeePrivateProver(this.__wbg_ptr)}isFeePublicProver(){return 0!==R.provingkey_isFeePublicProver(this.__wbg_ptr)}isInclusionProver(){return 0!==R.provingkey_isInclusionProver(this.__wbg_ptr)}isJoinProver(){return 0!==R.provingkey_isJoinProver(this.__wbg_ptr)}isSetValidatorStateProver(){return 0!==R.provingkey_isSetValidatorStateProver(this.__wbg_ptr)}isSplitProver(){return 0!==R.provingkey_isSplitProver(this.__wbg_ptr)}isTransferPrivateProver(){return 0!==R.provingkey_isTransferPrivateProver(this.__wbg_ptr)}isTransferPrivateToPublicProver(){return 0!==R.provingkey_isTransferPrivateToPublicProver(this.__wbg_ptr)}isTransferPublicProver(){return 0!==R.provingkey_isTransferPublicProver(this.__wbg_ptr)}isTransferPublicToPrivateProver(){return 0!==R.provingkey_isTransferPublicToPrivateProver(this.__wbg_ptr)}isUnbondDelegatorAsValidatorProver(){return 0!==R.provingkey_isUnbondDelegatorAsValidatorProver(this.__wbg_ptr)}isUnbondPublicProver(){return 0!==R.provingkey_isUnbondPublicProver(this.__wbg_ptr)}checksum(){let _,t;try{const n=R.__wbindgen_add_to_stack_pointer(-16);R.provingkey_checksum(n,this.__wbg_ptr);var e=d()[n/4+0],r=d()[n/4+1];return _=e,t=r,c(e,r)}finally{R.__wbindgen_add_to_stack_pointer(16),R.__wbindgen_free(_,t,1)}}copy(){const t=R.provingkey_copy(this.__wbg_ptr);return _.__wrap(t)}static fromBytes(t){try{const n=R.__wbindgen_add_to_stack_pointer(-16),i=y(t,R.__wbindgen_malloc),o=M;R.provingkey_fromBytes(n,i,o);var e=d()[n/4+0],r=d()[n/4+1];if(d()[n/4+2])throw a(r);return _.__wrap(e)}finally{R.__wbindgen_add_to_stack_pointer(16)}}static fromString(t){try{const n=R.__wbindgen_add_to_stack_pointer(-16),i=g(t,R.__wbindgen_malloc,R.__wbindgen_realloc),o=M;R.provingkey_fromString(n,i,o);var e=d()[n/4+0],r=d()[n/4+1];if(d()[n/4+2])throw a(r);return _.__wrap(e)}finally{R.__wbindgen_add_to_stack_pointer(16)}}toBytes(){try{const n=R.__wbindgen_add_to_stack_pointer(-16);R.provingkey_toBytes(n,this.__wbg_ptr);var _=d()[n/4+0],t=d()[n/4+1],e=d()[n/4+2];if(d()[n/4+3])throw a(e);var r=v(_,t).slice();return R.__wbindgen_free(_,1*t),r}finally{R.__wbindgen_add_to_stack_pointer(16)}}toString(){let _,t;try{const n=R.__wbindgen_add_to_stack_pointer(-16);R.provingkey_toString(n,this.__wbg_ptr);var e=d()[n/4+0],r=d()[n/4+1];return _=e,t=r,c(e,r)}finally{R.__wbindgen_add_to_stack_pointer(16),R.__wbindgen_free(_,t,1)}}},t_=class _{static __wrap(t){t>>>=0;const e=Object.create(_.prototype);return e.__wbg_ptr=t,e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,_}free(){const _=this.__destroy_into_raw();R.__wbg_recordciphertext_free(_)}static fromString(t){try{const n=R.__wbindgen_add_to_stack_pointer(-16),i=g(t,R.__wbindgen_malloc,R.__wbindgen_realloc),o=M;R.recordciphertext_fromString(n,i,o);var e=d()[n/4+0],r=d()[n/4+1];if(d()[n/4+2])throw a(r);return _.__wrap(e)}finally{R.__wbindgen_add_to_stack_pointer(16)}}toString(){let _,t;try{const n=R.__wbindgen_add_to_stack_pointer(-16);R.recordciphertext_toString(n,this.__wbg_ptr);var e=d()[n/4+0],r=d()[n/4+1];return _=e,t=r,c(e,r)}finally{R.__wbindgen_add_to_stack_pointer(16),R.__wbindgen_free(_,t,1)}}decrypt(_){try{const r=R.__wbindgen_add_to_stack_pointer(-16);p(_,o_),R.recordciphertext_decrypt(r,this.__wbg_ptr,_.__wbg_ptr);var t=d()[r/4+0],e=d()[r/4+1];if(d()[r/4+2])throw a(e);return e_.__wrap(t)}finally{R.__wbindgen_add_to_stack_pointer(16)}}isOwner(_){p(_,o_);return 0!==R.recordciphertext_isOwner(this.__wbg_ptr,_.__wbg_ptr)}},e_=class _{static __wrap(t){t>>>=0;const e=Object.create(_.prototype);return e.__wbg_ptr=t,e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,_}free(){const _=this.__destroy_into_raw();R.__wbg_recordplaintext_free(_)}commitment(_,t){try{const n=R.__wbindgen_add_to_stack_pointer(-16),i=g(_,R.__wbindgen_malloc,R.__wbindgen_realloc),o=M,s=g(t,R.__wbindgen_malloc,R.__wbindgen_realloc),c=M;R.recordplaintext_commitment(n,this.__wbg_ptr,i,o,s,c);var e=d()[n/4+0],r=d()[n/4+1];if(d()[n/4+2])throw a(r);return L.__wrap(e)}finally{R.__wbindgen_add_to_stack_pointer(16)}}static fromString(t){try{const n=R.__wbindgen_add_to_stack_pointer(-16),i=g(t,R.__wbindgen_malloc,R.__wbindgen_realloc),o=M;R.recordplaintext_fromString(n,i,o);var e=d()[n/4+0],r=d()[n/4+1];if(d()[n/4+2])throw a(r);return _.__wrap(e)}finally{R.__wbindgen_add_to_stack_pointer(16)}}toString(){let _,t;try{const n=R.__wbindgen_add_to_stack_pointer(-16);R.recordplaintext_toString(n,this.__wbg_ptr);var e=d()[n/4+0],r=d()[n/4+1];return _=e,t=r,c(e,r)}finally{R.__wbindgen_add_to_stack_pointer(16),R.__wbindgen_free(_,t,1)}}microcredits(){const _=R.recordplaintext_microcredits(this.__wbg_ptr);return BigInt.asUintN(64,_)}nonce(){let _,t;try{const n=R.__wbindgen_add_to_stack_pointer(-16);R.recordplaintext_nonce(n,this.__wbg_ptr);var e=d()[n/4+0],r=d()[n/4+1];return _=e,t=r,c(e,r)}finally{R.__wbindgen_add_to_stack_pointer(16),R.__wbindgen_free(_,t,1)}}serialNumberString(_,t,e){let r,n;try{const f=R.__wbindgen_add_to_stack_pointer(-16);p(_,X);const u=g(t,R.__wbindgen_malloc,R.__wbindgen_realloc),y=M,m=g(e,R.__wbindgen_malloc,R.__wbindgen_realloc),h=M;R.recordplaintext_serialNumberString(f,this.__wbg_ptr,_.__wbg_ptr,u,y,m,h);var i=d()[f/4+0],o=d()[f/4+1],s=d()[f/4+2],w=d()[f/4+3],b=i,l=o;if(w)throw b=0,l=0,a(s);return r=b,n=l,c(b,l)}finally{R.__wbindgen_add_to_stack_pointer(16),R.__wbindgen_free(r,n,1)}}},r_=class _{static __wrap(t){t>>>=0;const e=Object.create(_.prototype);return e.__wbg_ptr=t,e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,_}free(){const _=this.__destroy_into_raw();R.__wbg_signature_free(_)}static sign(t,e){p(t,X);const r=y(e,R.__wbindgen_malloc),n=M,i=R.privatekey_sign(t.__wbg_ptr,r,n);return _.__wrap(i)}verify(_,t){p(_,N);const e=y(t,R.__wbindgen_malloc),r=M;return 0!==R.signature_verify(this.__wbg_ptr,_.__wbg_ptr,e,r)}static from_string(t){const e=g(t,R.__wbindgen_malloc,R.__wbindgen_realloc),r=M,n=R.signature_from_string(e,r);return _.__wrap(n)}to_string(){let _,t;try{const n=R.__wbindgen_add_to_stack_pointer(-16);R.signature_to_string(n,this.__wbg_ptr);var e=d()[n/4+0],r=d()[n/4+1];return _=e,t=r,c(e,r)}finally{R.__wbindgen_add_to_stack_pointer(16),R.__wbindgen_free(_,t,1)}}},n_=class _{static __wrap(t){t>>>=0;const e=Object.create(_.prototype);return e.__wbg_ptr=t,e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,_}free(){const _=this.__destroy_into_raw();R.__wbg_transaction_free(_)}static fromString(t){try{const n=R.__wbindgen_add_to_stack_pointer(-16),i=g(t,R.__wbindgen_malloc,R.__wbindgen_realloc),o=M;R.transaction_fromString(n,i,o);var e=d()[n/4+0],r=d()[n/4+1];if(d()[n/4+2])throw a(r);return _.__wrap(e)}finally{R.__wbindgen_add_to_stack_pointer(16)}}toString(){let _,t;try{const n=R.__wbindgen_add_to_stack_pointer(-16);R.transaction_toString(n,this.__wbg_ptr);var e=d()[n/4+0],r=d()[n/4+1];return _=e,t=r,c(e,r)}finally{R.__wbindgen_add_to_stack_pointer(16),R.__wbindgen_free(_,t,1)}}transactionId(){let _,t;try{const n=R.__wbindgen_add_to_stack_pointer(-16);R.transaction_transactionId(n,this.__wbg_ptr);var e=d()[n/4+0],r=d()[n/4+1];return _=e,t=r,c(e,r)}finally{R.__wbindgen_add_to_stack_pointer(16),R.__wbindgen_free(_,t,1)}}transactionType(){let _,t;try{const n=R.__wbindgen_add_to_stack_pointer(-16);R.transaction_transactionType(n,this.__wbg_ptr);var e=d()[n/4+0],r=d()[n/4+1];return _=e,t=r,c(e,r)}finally{R.__wbindgen_add_to_stack_pointer(16),R.__wbindgen_free(_,t,1)}}},i_=class _{static __wrap(t){t>>>=0;const e=Object.create(_.prototype);return e.__wbg_ptr=t,e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,_}free(){const _=this.__destroy_into_raw();R.__wbg_verifyingkey_free(_)}static bondPublicVerifier(){const t=R.verifyingkey_bondPublicVerifier();return _.__wrap(t)}static claimUnbondPublicVerifier(){const t=R.verifyingkey_claimUnbondPublicVerifier();return _.__wrap(t)}static feePrivateVerifier(){const t=R.verifyingkey_feePrivateVerifier();return _.__wrap(t)}static feePublicVerifier(){const t=R.verifyingkey_feePublicVerifier();return _.__wrap(t)}static inclusionVerifier(){const t=R.verifyingkey_inclusionVerifier();return _.__wrap(t)}static joinVerifier(){const t=R.verifyingkey_joinVerifier();return _.__wrap(t)}static setValidatorStateVerifier(){const t=R.verifyingkey_setValidatorStateVerifier();return _.__wrap(t)}static splitVerifier(){const t=R.verifyingkey_splitVerifier();return _.__wrap(t)}static transferPrivateVerifier(){const t=R.verifyingkey_transferPrivateVerifier();return _.__wrap(t)}static transferPrivateToPublicVerifier(){const t=R.verifyingkey_transferPrivateToPublicVerifier();return _.__wrap(t)}static transferPublicVerifier(){const t=R.verifyingkey_transferPublicVerifier();return _.__wrap(t)}static transferPublicToPrivateVerifier(){const t=R.verifyingkey_transferPublicToPrivateVerifier();return _.__wrap(t)}static unbondDelegatorAsValidatorVerifier(){const t=R.verifyingkey_unbondDelegatorAsValidatorVerifier();return _.__wrap(t)}static unbondPublicVerifier(){const t=R.verifyingkey_unbondPublicVerifier();return _.__wrap(t)}isBondPublicVerifier(){return 0!==R.verifyingkey_isBondPublicVerifier(this.__wbg_ptr)}isClaimUnbondPublicVerifier(){return 0!==R.verifyingkey_isClaimUnbondPublicVerifier(this.__wbg_ptr)}isFeePrivateVerifier(){return 0!==R.verifyingkey_isFeePrivateVerifier(this.__wbg_ptr)}isFeePublicVerifier(){return 0!==R.verifyingkey_isFeePublicVerifier(this.__wbg_ptr)}isInclusionVerifier(){return 0!==R.verifyingkey_isInclusionVerifier(this.__wbg_ptr)}isJoinVerifier(){return 0!==R.verifyingkey_isJoinVerifier(this.__wbg_ptr)}isSetValidatorStateVerifier(){return 0!==R.verifyingkey_isSetValidatorStateVerifier(this.__wbg_ptr)}isSplitVerifier(){return 0!==R.verifyingkey_isSplitVerifier(this.__wbg_ptr)}isTransferPrivateVerifier(){return 0!==R.verifyingkey_isTransferPrivateVerifier(this.__wbg_ptr)}isTransferPrivateToPublicVerifier(){return 0!==R.verifyingkey_isTransferPrivateToPublicVerifier(this.__wbg_ptr)}isTransferPublicVerifier(){return 0!==R.verifyingkey_isTransferPublicVerifier(this.__wbg_ptr)}isTransferPublicToPrivateVerifier(){return 0!==R.verifyingkey_isTransferPublicToPrivateVerifier(this.__wbg_ptr)}isUnbondDelegatorAsValidatorVerifier(){return 0!==R.verifyingkey_isUnbondDelegatorAsValidatorVerifier(this.__wbg_ptr)}isUnbondPublicVerifier(){return 0!==R.verifyingkey_isUnbondPublicVerifier(this.__wbg_ptr)}checksum(){let _,t;try{const n=R.__wbindgen_add_to_stack_pointer(-16);R.verifyingkey_checksum(n,this.__wbg_ptr);var e=d()[n/4+0],r=d()[n/4+1];return _=e,t=r,c(e,r)}finally{R.__wbindgen_add_to_stack_pointer(16),R.__wbindgen_free(_,t,1)}}copy(){const t=R.provingkey_copy(this.__wbg_ptr);return _.__wrap(t)}static fromBytes(t){try{const n=R.__wbindgen_add_to_stack_pointer(-16),i=y(t,R.__wbindgen_malloc),o=M;R.verifyingkey_fromBytes(n,i,o);var e=d()[n/4+0],r=d()[n/4+1];if(d()[n/4+2])throw a(r);return _.__wrap(e)}finally{R.__wbindgen_add_to_stack_pointer(16)}}static fromString(t){try{const n=R.__wbindgen_add_to_stack_pointer(-16),i=g(t,R.__wbindgen_malloc,R.__wbindgen_realloc),o=M;R.verifyingkey_fromString(n,i,o);var e=d()[n/4+0],r=d()[n/4+1];if(d()[n/4+2])throw a(r);return _.__wrap(e)}finally{R.__wbindgen_add_to_stack_pointer(16)}}toBytes(){try{const n=R.__wbindgen_add_to_stack_pointer(-16);R.verifyingkey_toBytes(n,this.__wbg_ptr);var _=d()[n/4+0],t=d()[n/4+1],e=d()[n/4+2];if(d()[n/4+3])throw a(e);var r=v(_,t).slice();return R.__wbindgen_free(_,1*t),r}finally{R.__wbindgen_add_to_stack_pointer(16)}}toString(){let _,t;try{const n=R.__wbindgen_add_to_stack_pointer(-16);R.verifyingkey_toString(n,this.__wbg_ptr);var e=d()[n/4+0],r=d()[n/4+1];return _=e,t=r,c(e,r)}finally{R.__wbindgen_add_to_stack_pointer(16),R.__wbindgen_free(_,t,1)}}},o_=class _{static __wrap(t){t>>>=0;const e=Object.create(_.prototype);return e.__wbg_ptr=t,e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,_}free(){const _=this.__destroy_into_raw();R.__wbg_viewkey_free(_)}static from_private_key(t){p(t,X);const e=R.privatekey_to_view_key(t.__wbg_ptr);return _.__wrap(e)}static from_string(t){const e=g(t,R.__wbindgen_malloc,R.__wbindgen_realloc),r=M,n=R.viewkey_from_string(e,r);return _.__wrap(n)}to_string(){let _,t;try{const n=R.__wbindgen_add_to_stack_pointer(-16);R.viewkey_to_string(n,this.__wbg_ptr);var e=d()[n/4+0],r=d()[n/4+1];return _=e,t=r,c(e,r)}finally{R.__wbindgen_add_to_stack_pointer(16),R.__wbindgen_free(_,t,1)}}to_address(){const _=R.address_from_view_key(this.__wbg_ptr);return N.__wrap(_)}decrypt(_){let t,e;try{const b=R.__wbindgen_add_to_stack_pointer(-16),l=g(_,R.__wbindgen_malloc,R.__wbindgen_realloc),f=M;R.viewkey_decrypt(b,this.__wbg_ptr,l,f);var r=d()[b/4+0],n=d()[b/4+1],i=d()[b/4+2],o=d()[b/4+3],s=r,w=n;if(o)throw s=0,w=0,a(i);return t=s,e=w,c(s,w)}finally{R.__wbindgen_add_to_stack_pointer(16),R.__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 T(){const _={wbg:{}};return _.wbg.__wbindgen_object_drop_ref=function(_){a(_)},_.wbg.__wbg_new_daafff584c71593b=function(){return x((function(){return w(new XMLHttpRequest)}),arguments)},_.wbg.__wbg_overrideMimeType_1a661d17da5f8baf=function(){return x((function(_,t,e){i(_).overrideMimeType(c(t,e))}),arguments)},_.wbg.__wbg_open_56fa1eb95989f6a5=function(){return x((function(_,t,e,r,n,o){i(_).open(c(t,e),c(r,n),0!==o)}),arguments)},_.wbg.__wbg_send_9f5007eae908c72e=function(){return x((function(_){i(_).send()}),arguments)},_.wbg.__wbg_response_f2acf2ecbe021710=function(){return x((function(_){return w(i(_).response)}),arguments)},_.wbg.__wbg_new_b51585de1b234aff=function(){return w(new Object)},_.wbg.__wbindgen_string_new=function(_,t){return w(c(_,t))},_.wbg.__wbg_set_092e06b0f9d71865=function(){return x((function(_,t,e){return Reflect.set(i(_),i(t),i(e))}),arguments)},_.wbg.__wbg_new_1eead62f64ca15ce=function(){return x((function(){return w(new Headers)}),arguments)},_.wbg.__wbindgen_object_clone_ref=function(_){return w(i(_))},_.wbg.__wbg_append_fda9e3432e3e88da=function(){return x((function(_,t,e,r,n){i(_).append(c(t,e),c(r,n))}),arguments)},_.wbg.__wbg_new_55c9955722952374=function(){return x((function(){return w(new AbortController)}),arguments)},_.wbg.__wbg_signal_4bd18fb489af2d4c=function(_){return w(i(_).signal)},_.wbg.__wbg_instanceof_Response_fc4327dbfcdf5ced=function(_){let t;try{t=i(_)instanceof Response}catch{t=!1}return t},_.wbg.__wbg_status_ac85a3142a84caa2=function(_){return i(_).status},_.wbg.__wbg_url_8503de97f69da463=function(_,t){const e=g(i(t).url,R.__wbindgen_malloc,R.__wbindgen_realloc),r=M;d()[_/4+1]=r,d()[_/4+0]=e},_.wbg.__wbg_headers_b70de86b8e989bc0=function(_){return w(i(_).headers)},_.wbg.__wbg_iterator_97f0c81209c6c35a=function(){return w(Symbol.iterator)},_.wbg.__wbg_get_97b561fb56f034b5=function(){return x((function(_,t){return w(Reflect.get(i(_),i(t)))}),arguments)},_.wbg.__wbindgen_is_function=function(_){return"function"==typeof i(_)},_.wbg.__wbg_call_cb65541d95d71282=function(){return x((function(_,t){return w(i(_).call(i(t)))}),arguments)},_.wbg.__wbindgen_is_object=function(_){const t=i(_);return"object"==typeof t&&null!==t},_.wbg.__wbg_next_526fc47e980da008=function(_){return w(i(_).next)},_.wbg.__wbg_next_ddb3312ca1c4e32a=function(){return x((function(_){return w(i(_).next())}),arguments)},_.wbg.__wbg_done_5c1f01fb660d73b5=function(_){return i(_).done},_.wbg.__wbg_value_1695675138684bd5=function(_){return w(i(_).value)},_.wbg.__wbg_abort_654b796176d117aa=function(_){i(_).abort()},_.wbg.__wbg_stringify_e25465938f3f611f=function(){return x((function(_){return w(JSON.stringify(i(_)))}),arguments)},_.wbg.__wbindgen_string_get=function(_,t){const e=i(t),r="string"==typeof e?e:void 0;var n=b(r)?0:g(r,R.__wbindgen_malloc,R.__wbindgen_realloc),o=M;d()[_/4+1]=o,d()[_/4+0]=n},_.wbg.__wbg_call_01734de55d61e11d=function(){return x((function(_,t,e){return w(i(_).call(i(t),i(e)))}),arguments)},_.wbg.__wbg_keypair_new=function(_){return w(H.__wrap(_))},_.wbg.__wbg_log_0159ca40cddf5b15=function(_,t){console.log(c(_,t))},_.wbg.__wbg_transaction_new=function(_){return w(n_.__wrap(_))},_.wbg.__wbindgen_bigint_from_u64=function(_){return w(BigInt.asUintN(64,_))},_.wbg.__wbindgen_module=function(){return w(j.__wbindgen_wasm_module)},_.wbg.__wbindgen_memory=function(){return w(R.memory)},_.wbg.__wbg_spawnWorker_f6acaddb2e29dc4a=function(_,t,e,r){return w(n(i(_),i(t),i(e),r))},_.wbg.__wbg_executionresponse_new=function(_){return w(J.__wrap(_))},_.wbg.__wbg_newwithlength_3ec098a360da1909=function(_){return w(new Array(_>>>0))},_.wbg.__wbg_set_502d29070ea18557=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_arrayBuffer_288fb3538806e85c=function(){return x((function(_){return w(i(_).arrayBuffer())}),arguments)},_.wbg.__wbg_new_8125e318e6245eed=function(_){return w(new Uint8Array(i(_)))},_.wbg.__wbg_length_72e2208bbc0efc61=function(_){return i(_).length},_.wbg.__wbg_new_43f1b47c28813cbd=function(_,t){try{var e={a:_,b:t};const r=new Promise(((_,t)=>{const r=e.a;e.a=0;try{return S(r,e.b,_,t)}finally{e.a=r}}));return w(r)}finally{e.a=e.b=0}},_.wbg.__wbg_new_898a68150f225f2e=function(){return w(new Array)},_.wbg.__wbg_push_ca1c26067ef907ac=function(_,t){return i(_).push(i(t))},_.wbg.__wbindgen_number_new=function(_){return w(_)},_.wbg.__wbg_new_abda76e883ba8a5f=function(){return w(new Error)},_.wbg.__wbg_stack_658279fe44541cf6=function(_,t){const e=g(i(t).stack,R.__wbindgen_malloc,R.__wbindgen_realloc),r=M;d()[_/4+1]=r,d()[_/4+0]=e},_.wbg.__wbg_error_f851667af71bcfc6=function(_,t){let e,r;try{e=_,r=t,console.error(c(_,t))}finally{R.__wbindgen_free(e,r,1)}},_.wbg.__wbg_subarray_13db269f57aa838d=function(_,t,e){return w(i(_).subarray(t>>>0,e>>>0))},_.wbg.__wbg_getRandomValues_37fa2ca9e4e07fab=function(){return x((function(_,t){i(_).getRandomValues(i(t))}),arguments)},_.wbg.__wbg_buffer_085ec1f694018c4f=function(_){return w(i(_).buffer)},_.wbg.__wbg_set_5cf90238115182c3=function(_,t,e){i(_).set(i(t),e>>>0)},_.wbg.__wbg_newwithbyteoffsetandlength_6da8e527659b86aa=function(_,t,e){return w(new Uint8Array(i(_),t>>>0,e>>>0))},_.wbg.__wbg_randomFillSync_dc1e9a60c158336d=function(){return x((function(_,t){i(_).randomFillSync(a(t))}),arguments)},_.wbg.__wbg_crypto_c48a774b022d20ac=function(_){return w(i(_).crypto)},_.wbg.__wbg_process_298734cf255a885d=function(_){return w(i(_).process)},_.wbg.__wbg_versions_e2e78e134e3e5d01=function(_){return w(i(_).versions)},_.wbg.__wbg_node_1cd7a5d853dbea79=function(_){return w(i(_).node)},_.wbg.__wbindgen_is_string=function(_){return"string"==typeof i(_)},_.wbg.__wbg_msCrypto_bcb970640f50a1e8=function(_){return w(i(_).msCrypto)},_.wbg.__wbg_newwithlength_e5d69174d6984cd7=function(_){return w(new Uint8Array(_>>>0))},_.wbg.__wbg_require_8f08ceecec0f4fee=function(){return x((function(){return w(module.require)}),arguments)},_.wbg.__wbg_length_fff51ee6522a1a18=function(_){return i(_).length},_.wbg.__wbg_get_44be0491f933a435=function(_,t){return w(i(_)[t>>>0])},_.wbg.__wbg_self_1ff1d729e9aae938=function(){return x((function(){return w(self.self)}),arguments)},_.wbg.__wbg_window_5f4faef6c12b79ec=function(){return x((function(){return w(window.window)}),arguments)},_.wbg.__wbg_globalThis_1d39714405582d3c=function(){return x((function(){return w(globalThis.globalThis)}),arguments)},_.wbg.__wbg_global_651f05c6a0944d1c=function(){return x((function(){return w(global.global)}),arguments)},_.wbg.__wbindgen_is_undefined=function(_){return void 0===i(_)},_.wbg.__wbg_newnoargs_581967eacc0e2604=function(_,t){return w(new Function(c(_,t)))},_.wbg.__wbg_has_c5fcd020291e56b8=function(){return x((function(_,t){return Reflect.has(i(_),i(t))}),arguments)},_.wbg.__wbg_fetch_8eaf01857a5bb21f=function(_,t){return w(i(_).fetch(i(t)))},_.wbg.__wbg_fetch_b5d6bebed1e6c2d2=function(_){return w(fetch(i(_)))},_.wbg.__wbindgen_debug_string=function(_,t){const e=g(l(i(t)),R.__wbindgen_malloc,R.__wbindgen_realloc),r=M;d()[_/4+1]=r,d()[_/4+0]=e},_.wbg.__wbindgen_throw=function(_,t){throw new Error(c(_,t))},_.wbg.__wbindgen_rethrow=function(_){throw a(_)},_.wbg.__wbg_then_b2267541e2a73865=function(_,t,e){return w(i(_).then(i(t),i(e)))},_.wbg.__wbg_then_f7e06ee3c11698eb=function(_,t){return w(i(_).then(i(t)))},_.wbg.__wbg_resolve_53698b95aaf7fcf8=function(_){return w(Promise.resolve(i(_)))},_.wbg.__wbg_waitAsync_60fb5e2e86467e31=function(){return w(Atomics.waitAsync)},_.wbg.__wbg_new_a0af68041688e8fd=function(_){return w(new Int32Array(i(_)))},_.wbg.__wbg_waitAsync_73fd6eb3bace0a8d=function(_,t,e){return w(Atomics.waitAsync(i(_),t,e))},_.wbg.__wbg_async_e1a2a669aacf35ff=function(_){return i(_).async},_.wbg.__wbg_value_555e4f564193db05=function(_){return w(i(_).value)},_.wbg.__wbindgen_link_22046963fe0b707a=function(_){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 "),R.__wbindgen_malloc,R.__wbindgen_realloc),e=M;d()[_/4+1]=e,d()[_/4+0]=t},_.wbg.__wbg_new_8e7322f46d5d019c=function(){return x((function(_,t){return w(new Worker(c(_,t)))}),arguments)},_.wbg.__wbg_setonmessage_f0bd0280573b7084=function(_,t){i(_).onmessage=i(t)},_.wbg.__wbg_of_3f69007bb4eeae65=function(_,t,e){return w(Array.of(i(_),i(t),i(e)))},_.wbg.__wbg_postMessage_8c609e2bde333d9c=function(){return x((function(_,t){i(_).postMessage(i(t))}),arguments)},_.wbg.__wbg_data_ab99ae4a2e1e8bc9=function(_){return w(i(_).data)},_.wbg.__wbg_newwithstrandinit_cad5cd6038c7ff5d=function(){return x((function(_,t,e){return w(new Request(c(_,t),i(e)))}),arguments)},_.wbg.__wbg_status_114ef6fe27fb8b00=function(){return x((function(_){return i(_).status}),arguments)},_.wbg.__wbg_responseText_da275667251fd153=function(){return x((function(_,t){const e=i(t).responseText;var r=b(e)?0:g(e,R.__wbindgen_malloc,R.__wbindgen_realloc),n=M;d()[_/4+1]=n,d()[_/4+0]=r}),arguments)},_.wbg.__wbindgen_closure_wrapper5654=function(_,t,e){return w(f(_,t,543,u))},_.wbg.__wbindgen_closure_wrapper5677=function(_,t,e){return w(f(_,t,543,u))},_}function A(_,t){_.wbg.memory=t||new WebAssembly.Memory({initial:169,maximum:65536,shared:!0})}function F(_,t){return R=_.exports,j.__wbindgen_wasm_module=t,$=null,q=null,B=null,R.__wbindgen_start(),R}function O(_,t){if(void 0!==R)return R;const e=T();A(e,t),_ instanceof WebAssembly.Module||(_=new WebAssembly.Module(_));return F(new WebAssembly.Instance(_,e),_)}async function j(_,t){if(void 0!==R)return R;const e=T();("string"==typeof _||"function"==typeof Request&&_ instanceof Request||"function"==typeof URL&&_ instanceof URL)&&(_=fetch(_)),A(e,t);const{instance:r,module:n}=await V(await _,e);return F(r,n)}var K=Object.freeze({__proto__:null,Address:N,Execution:z,ExecutionResponse:J,Field:L,KeyPair:H,OfflineQuery:Q,PrivateKey:X,PrivateKeyCiphertext:Y,Program:G,ProgramManager:Z,ProvingKey:__,RecordCiphertext:t_,RecordPlaintext:e_,Signature:r_,Transaction:n_,VerifyingKey:i_,ViewKey:o_,default:j,initSync:O,initThreadPool:P,runRayonThread:k,verifyFunctionExecution:m});const a_="assets/aleo_wasm.wasm";const{initThreadPool:s_,Address:c_,Execution:w_,ExecutionResponse:g_,Field:b_,OfflineQuery:d_,Private:l_,PrivateKey:f_,PrivateKeyCiphertext:u_,Program:p_,ProvingKey:y_,RecordCiphertext:m_,RecordPlaintext:h_,ProgramManager:v_,Signature:k_,Transaction:P_,ViewKey:x_,VerifyingKey:S_,verifyFunctionExecution:V_}=await(async(_={})=>{let{importHook:t,serverPath:e,initializeHook:r}=_,n=a_;return null!=e&&(n=e+/[^\/\\]*$/.exec(n)[0]),null!=t&&(n=t(n)),null!=r?await r(j,n):await j(n),K})({importHook:()=>new URL(e(8249),e.b)});async function E(_){null==_&&(_=navigator.hardwareConcurrency),console.info(`Spawning ${_} threads`),await s_(new URL(e(5128),e.b),_)}r()}catch(T_){r(T_)}}),1)}}]); -//# 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 5e3ef945a..000000000 --- a/63.bundle.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"63.bundle.js","mappings":"uOAAA,SAASA,EAAYC,EAAKC,EAAQC,EAAQC,GAClC,OAAO,IAAIC,SAASC,IAChB,MAAMC,EAAS,IAAIC,OAAOP,EAAK,CAC3BQ,KAAM,WAGVF,EAAOG,iBAAiB,WAAYC,IAG5BJ,EAAOK,OACPL,EAAOK,QAGXN,EAAQC,EAAO,GAChB,CACCM,SAAS,EACTC,MAAM,IAGVP,EAAOQ,YAAY,CACfb,SACAC,SACAC,WACF,GAEd,CAEA,IAAIY,E,2GAEJ,MAAMC,EAAO,IAAIC,MAAM,KAAKC,UAAKC,GAIjC,SAASC,EAAUC,GAAO,OAAOL,EAAKK,EAA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,MACD9hB,eAAgB+hB,GAAkB,QAClCthB,GAAO,UACP2B,GAAS,kBACTK,GAAiB,MACjBkB,GAAK,aACLc,GAAY,QACZud,GAAO,WACP3c,GAAU,qBACVuB,GAAoB,QACpBO,GAAO,WACP0F,GAAU,iBACV2C,GAAgB,gBAChBS,GAAe,eACfyR,GAAc,UACd1Q,GAAS,YACTK,GAAW,QACXwE,GAAO,aACP/D,GAAY,wBACZ1S,SD6/HoBgX,OAAO6L,EAAM,CAAC,KACtB,IAAI,WAACC,EAAU,WAAEC,EAAU,eAAEC,GAAkBH,EAE3CI,EAAaP,GAiBjB,OAfkB,MAAdK,IACAE,EAAaF,EAAa,YAAY3lB,KAAK6lB,GAAY,IAGzC,MAAdH,IACAG,EAAaH,EAAWG,IAGN,MAAlBD,QACMA,EAAexH,EAAYyH,SAG3BzH,EAAWyH,GAGdnB,CAAO,EChhIpBoB,CAAK,CACXJ,WAAYA,IACD,IAAIX,IAAI,eAIvBnL,eAAepW,EAAeuiB,GACX,MAAXA,IACAA,EAAUC,UAAUC,qBAGxB/L,QAAQgM,KAAM,YAAWH,mBAEnBR,GAAmB,IAAIR,IAAI,aAA+BgB,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 // 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\n resolve(worker);\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 }\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\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\n } else {\n state.a = a;\n }\n }\n };\n real.original = state;\n\n return real;\n}\nfunction __wbg_adapter_34(arg0, arg1, arg2) {\n wasm.wasm_bindgen__convert__closures__invoke1_mut__h53d50e21bb2d5c71(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_251(arg0, arg1, arg2, arg3) {\n wasm.wasm_bindgen__convert__closures__invoke2_mut__he97f6a3b9df30e2b(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));\n}\n\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\n return obj;\n }\n\n __destroy_into_raw() {\n const ptr = this.__wbg_ptr;\n this.__wbg_ptr = 0;\n\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/**\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\n return obj;\n }\n\n __destroy_into_raw() {\n const ptr = this.__wbg_ptr;\n this.__wbg_ptr = 0;\n\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/**\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\n return obj;\n }\n\n __destroy_into_raw() {\n const ptr = this.__wbg_ptr;\n this.__wbg_ptr = 0;\n\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/**\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\n return obj;\n }\n\n __destroy_into_raw() {\n const ptr = this.__wbg_ptr;\n this.__wbg_ptr = 0;\n\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/**\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\n return obj;\n }\n\n __destroy_into_raw() {\n const ptr = this.__wbg_ptr;\n this.__wbg_ptr = 0;\n\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 return KeyPair.__wrap(ret);\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/**\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\n return obj;\n }\n\n __destroy_into_raw() {\n const ptr = this.__wbg_ptr;\n this.__wbg_ptr = 0;\n\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 return OfflineQuery.__wrap(r0);\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/**\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\n return obj;\n }\n\n __destroy_into_raw() {\n const ptr = this.__wbg_ptr;\n this.__wbg_ptr = 0;\n\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 return PrivateKey.__wrap(ret);\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.address_from_private_key(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/**\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\n return obj;\n }\n\n __destroy_into_raw() {\n const ptr = this.__wbg_ptr;\n this.__wbg_ptr = 0;\n\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/**\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\n return obj;\n }\n\n __destroy_into_raw() {\n const ptr = this.__wbg_ptr;\n this.__wbg_ptr = 0;\n\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 * 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/**\n*/\nclass ProgramManager {\n\n __destroy_into_raw() {\n const ptr = this.__wbg_ptr;\n this.__wbg_ptr = 0;\n\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/**\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\n return obj;\n }\n\n __destroy_into_raw() {\n const ptr = this.__wbg_ptr;\n this.__wbg_ptr = 0;\n\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 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_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_delegator_as_validator function\n *\n * @example\n * const provingKey = ProvingKey.fromBytes(\"unbond_delegator_as_validator_proving_key.bin\");\n * provingKey.isUnbondDelegatorAsValidatorProver() ? console.log(\"Key verified\") : throw new Error(\"Invalid key\");\n *\n * @returns {boolean} returns true if the proving key is for the unbond_delegator_as_validator function, false if otherwise\n * @returns {boolean}\n */\n isUnbondDelegatorAsValidatorProver() {\n const ret = wasm.provingkey_isUnbondDelegatorAsValidatorProver(this.__wbg_ptr);\n return ret !== 0;\n }\n /**\n * Verify if the proving key is for the unbond_delegator_as_delegator function\n *\n * @example\n * const provingKey = ProvingKey.fromBytes(\"unbond_delegator_as_delegator_proving_key.bin\");\n * provingKey.isUnbondDelegatorAsDelegatorProver() ? console.log(\"Key verified\") : throw new Error(\"Invalid key\");\n *\n * @returns {boolean} returns true if the proving key is for the unbond_delegator_as_delegator 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);\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/**\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\n return obj;\n }\n\n __destroy_into_raw() {\n const ptr = this.__wbg_ptr;\n this.__wbg_ptr = 0;\n\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/**\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\n return obj;\n }\n\n __destroy_into_raw() {\n const ptr = this.__wbg_ptr;\n this.__wbg_ptr = 0;\n\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/**\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\n return obj;\n }\n\n __destroy_into_raw() {\n const ptr = this.__wbg_ptr;\n this.__wbg_ptr = 0;\n\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/**\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\n return obj;\n }\n\n __destroy_into_raw() {\n const ptr = this.__wbg_ptr;\n this.__wbg_ptr = 0;\n\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/**\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\n return obj;\n }\n\n __destroy_into_raw() {\n const ptr = this.__wbg_ptr;\n this.__wbg_ptr = 0;\n\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 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_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_delegator_as_delegator function\n *\n * @returns {VerifyingKey} Verifying key for the unbond_delegator_as_delegator function\n * @returns {VerifyingKey}\n */\n static unbondDelegatorAsValidatorVerifier() {\n const ret = wasm.verifyingkey_unbondDelegatorAsValidatorVerifier();\n return VerifyingKey.__wrap(ret);\n }\n /**\n * Returns the verifying key for the unbond_delegator_as_delegator function\n *\n * @returns {VerifyingKey} Verifying key for the unbond_delegator_as_delegator 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 * 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_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_delegator_as_delegator function\n *\n * @returns {bool}\n * @returns {boolean}\n */\n isUnbondDelegatorAsValidatorVerifier() {\n const ret = wasm.verifyingkey_isUnbondDelegatorAsValidatorVerifier(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.provingkey_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);\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/**\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\n return obj;\n }\n\n __destroy_into_raw() {\n const ptr = this.__wbg_ptr;\n this.__wbg_ptr = 0;\n\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_daafff584c71593b = function() { return handleError(function () {\n const ret = new XMLHttpRequest();\n return addHeapObject(ret);\n }, arguments) };\n imports.wbg.__wbg_overrideMimeType_1a661d17da5f8baf = function() { return handleError(function (arg0, arg1, arg2) {\n getObject(arg0).overrideMimeType(getStringFromWasm0(arg1, arg2));\n }, arguments) };\n imports.wbg.__wbg_open_56fa1eb95989f6a5 = 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_9f5007eae908c72e = function() { return handleError(function (arg0) {\n getObject(arg0).send();\n }, arguments) };\n imports.wbg.__wbg_response_f2acf2ecbe021710 = function() { return handleError(function (arg0) {\n const ret = getObject(arg0).response;\n return addHeapObject(ret);\n }, arguments) };\n imports.wbg.__wbg_new_b51585de1b234aff = 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_092e06b0f9d71865 = 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_1eead62f64ca15ce = 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_append_fda9e3432e3e88da = 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_new_55c9955722952374 = function() { return handleError(function () {\n const ret = new AbortController();\n return addHeapObject(ret);\n }, arguments) };\n imports.wbg.__wbg_signal_4bd18fb489af2d4c = function(arg0) {\n const ret = getObject(arg0).signal;\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_instanceof_Response_fc4327dbfcdf5ced = 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_ac85a3142a84caa2 = function(arg0) {\n const ret = getObject(arg0).status;\n return ret;\n };\n imports.wbg.__wbg_url_8503de97f69da463 = 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_b70de86b8e989bc0 = function(arg0) {\n const ret = getObject(arg0).headers;\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_iterator_97f0c81209c6c35a = function() {\n const ret = Symbol.iterator;\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_get_97b561fb56f034b5 = 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_cb65541d95d71282 = 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_526fc47e980da008 = function(arg0) {\n const ret = getObject(arg0).next;\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_next_ddb3312ca1c4e32a = function() { return handleError(function (arg0) {\n const ret = getObject(arg0).next();\n return addHeapObject(ret);\n }, arguments) };\n imports.wbg.__wbg_done_5c1f01fb660d73b5 = function(arg0) {\n const ret = getObject(arg0).done;\n return ret;\n };\n imports.wbg.__wbg_value_1695675138684bd5 = function(arg0) {\n const ret = getObject(arg0).value;\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_abort_654b796176d117aa = function(arg0) {\n getObject(arg0).abort();\n };\n imports.wbg.__wbg_stringify_e25465938f3f611f = 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_call_01734de55d61e11d = 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.__wbg_log_0159ca40cddf5b15 = function(arg0, arg1) {\n console.log(getStringFromWasm0(arg0, arg1));\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.__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);\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_3ec098a360da1909 = function(arg0) {\n const ret = new Array(arg0 >>> 0);\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_set_502d29070ea18557 = 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_arrayBuffer_288fb3538806e85c = function() { return handleError(function (arg0) {\n const ret = getObject(arg0).arrayBuffer();\n return addHeapObject(ret);\n }, arguments) };\n imports.wbg.__wbg_new_8125e318e6245eed = function(arg0) {\n const ret = new Uint8Array(getObject(arg0));\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_length_72e2208bbc0efc61 = function(arg0) {\n const ret = getObject(arg0).length;\n return ret;\n };\n imports.wbg.__wbg_new_43f1b47c28813cbd = 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_251(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.__wbg_new_898a68150f225f2e = function() {\n const ret = new Array();\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_push_ca1c26067ef907ac = function(arg0, arg1) {\n const ret = getObject(arg0).push(getObject(arg1));\n return ret;\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_subarray_13db269f57aa838d = function(arg0, arg1, arg2) {\n const ret = getObject(arg0).subarray(arg1 >>> 0, arg2 >>> 0);\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_getRandomValues_37fa2ca9e4e07fab = function() { return handleError(function (arg0, arg1) {\n getObject(arg0).getRandomValues(getObject(arg1));\n }, arguments) };\n imports.wbg.__wbg_buffer_085ec1f694018c4f = function(arg0) {\n const ret = getObject(arg0).buffer;\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_set_5cf90238115182c3 = function(arg0, arg1, arg2) {\n getObject(arg0).set(getObject(arg1), arg2 >>> 0);\n };\n imports.wbg.__wbg_newwithbyteoffsetandlength_6da8e527659b86aa = 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_dc1e9a60c158336d = function() { return handleError(function (arg0, arg1) {\n getObject(arg0).randomFillSync(takeObject(arg1));\n }, arguments) };\n imports.wbg.__wbg_crypto_c48a774b022d20ac = function(arg0) {\n const ret = getObject(arg0).crypto;\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_process_298734cf255a885d = function(arg0) {\n const ret = getObject(arg0).process;\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_versions_e2e78e134e3e5d01 = function(arg0) {\n const ret = getObject(arg0).versions;\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_node_1cd7a5d853dbea79 = 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_msCrypto_bcb970640f50a1e8 = function(arg0) {\n const ret = getObject(arg0).msCrypto;\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_newwithlength_e5d69174d6984cd7 = function(arg0) {\n const ret = new Uint8Array(arg0 >>> 0);\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_require_8f08ceecec0f4fee = function() { return handleError(function () {\n const ret = module.require;\n return addHeapObject(ret);\n }, arguments) };\n imports.wbg.__wbg_length_fff51ee6522a1a18 = function(arg0) {\n const ret = getObject(arg0).length;\n return ret;\n };\n imports.wbg.__wbg_get_44be0491f933a435 = function(arg0, arg1) {\n const ret = getObject(arg0)[arg1 >>> 0];\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_self_1ff1d729e9aae938 = function() { return handleError(function () {\n const ret = self.self;\n return addHeapObject(ret);\n }, arguments) };\n imports.wbg.__wbg_window_5f4faef6c12b79ec = function() { return handleError(function () {\n const ret = window.window;\n return addHeapObject(ret);\n }, arguments) };\n imports.wbg.__wbg_globalThis_1d39714405582d3c = function() { return handleError(function () {\n const ret = globalThis.globalThis;\n return addHeapObject(ret);\n }, arguments) };\n imports.wbg.__wbg_global_651f05c6a0944d1c = 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_581967eacc0e2604 = function(arg0, arg1) {\n const ret = new Function(getStringFromWasm0(arg0, arg1));\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_has_c5fcd020291e56b8 = 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_8eaf01857a5bb21f = function(arg0, arg1) {\n const ret = getObject(arg0).fetch(getObject(arg1));\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_fetch_b5d6bebed1e6c2d2 = function(arg0) {\n const ret = fetch(getObject(arg0));\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_b2267541e2a73865 = function(arg0, arg1, arg2) {\n const ret = getObject(arg0).then(getObject(arg1), getObject(arg2));\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_then_f7e06ee3c11698eb = function(arg0, arg1) {\n const ret = getObject(arg0).then(getObject(arg1));\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_resolve_53698b95aaf7fcf8 = function(arg0) {\n const ret = Promise.resolve(getObject(arg0));\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_waitAsync_60fb5e2e86467e31 = function() {\n const ret = Atomics.waitAsync;\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_new_a0af68041688e8fd = function(arg0) {\n const ret = new Int32Array(getObject(arg0));\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_waitAsync_73fd6eb3bace0a8d = function(arg0, arg1, arg2) {\n const ret = Atomics.waitAsync(getObject(arg0), arg1, arg2);\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_async_e1a2a669aacf35ff = function(arg0) {\n const ret = getObject(arg0).async;\n return ret;\n };\n imports.wbg.__wbg_value_555e4f564193db05 = function(arg0) {\n const ret = getObject(arg0).value;\n return addHeapObject(ret);\n };\n imports.wbg.__wbindgen_link_22046963fe0b707a = 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_8e7322f46d5d019c = 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_f0bd0280573b7084 = function(arg0, arg1) {\n getObject(arg0).onmessage = getObject(arg1);\n };\n imports.wbg.__wbg_of_3f69007bb4eeae65 = 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_8c609e2bde333d9c = function() { return handleError(function (arg0, arg1) {\n getObject(arg0).postMessage(getObject(arg1));\n }, arguments) };\n imports.wbg.__wbg_data_ab99ae4a2e1e8bc9 = function(arg0) {\n const ret = getObject(arg0).data;\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_newwithstrandinit_cad5cd6038c7ff5d = 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_status_114ef6fe27fb8b00 = function() { return handleError(function (arg0) {\n const ret = getObject(arg0).status;\n return ret;\n }, arguments) };\n imports.wbg.__wbg_responseText_da275667251fd153 = 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_wrapper5654 = function(arg0, arg1, arg2) {\n const ret = makeMutClosure(arg0, arg1, 543, __wbg_adapter_34);\n return addHeapObject(ret);\n };\n imports.wbg.__wbindgen_closure_wrapper5677 = function(arg0, arg1, arg2) {\n const ret = makeMutClosure(arg0, arg1, 543, __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:169,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 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 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 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","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","makeMutClosure","arg0","arg1","dtor","f","state","a","b","cnt","real","args","__wbindgen_export_3","get","original","__wbg_adapter_34","arg2","wasm_bindgen__convert__closures__invoke1_mut__h53d50e21bb2d5c71","_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_251","arg3","wasm_bindgen__convert__closures__invoke2_mut__he97f6a3b9df30e2b","Address","__wrap","Object","create","prototype","__destroy_into_raw","free","__wbg_address_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","Execution","__wbg_execution_free","execution_toString","fromString","execution_fromString","ExecutionResponse","__wbg_executionresponse_free","getOutputs","executionresponse_getOutputs","getExecution","executionresponse_getExecution","getKeys","executionresponse_getKeys","KeyPair","getProvingKey","executionresponse_getProvingKey","ProvingKey$1","getVerifyingKey","executionresponse_getVerifyingKey","getFunctionId","executionresponse_getFunctionId","getProgram","executionresponse_getProgram","Field","__wbg_field_free","field_toString","field","field_fromString","__wbg_keypair_free","constructor","proving_key","ptr1","keypair_new","provingKey","keypair_provingKey","verifyingKey","keypair_verifyingKey","OfflineQuery","__wbg_offlinequery_free","state_root","offlinequery_new","addStatePath","commitment","state_path","len1","offlinequery_addStatePath","offlinequery_toString","s","offlinequery_fromString","PrivateKey","__wbg_privatekey_free","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","Address$1","sign","privatekey_sign","newEncrypted","secret","privatekey_newEncrypted","PrivateKeyCiphertext$1","toCiphertext","privatekey_toCiphertext","fromPrivateKeyCiphertext","ciphertext","privatekey_fromPrivateKeyCiphertext","PrivateKeyCiphertext","__wbg_privatekeyciphertext_free","encryptPrivateKey","decryptToPrivateKey","privatekeyciphertext_decryptToPrivateKey","privatekeyciphertext_toString","privatekeyciphertext_fromString","Program","__wbg_program_free","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","isEqual","other","program_isEqual","getImports","program_getImports","__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","ProvingKey","__wbg_provingkey_free","isBondPublicProver","provingkey_isBondPublicProver","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","isTransferPublicToPrivateProver","provingkey_isTransferPublicToPrivateProver","isUnbondDelegatorAsValidatorProver","provingkey_isUnbondDelegatorAsValidatorProver","isUnbondPublicProver","provingkey_isUnbondPublicProver","checksum","provingkey_checksum","copy","provingkey_copy","fromBytes","bytes","provingkey_fromBytes","string","provingkey_fromString","toBytes","provingkey_toBytes","v1","provingkey_toString","RecordCiphertext","__wbg_recordciphertext_free","record","recordciphertext_fromString","recordciphertext_toString","decrypt","recordciphertext_decrypt","isOwner","recordciphertext_isOwner","RecordPlaintext","__wbg_recordplaintext_free","recordplaintext_commitment","Field$1","recordplaintext_fromString","recordplaintext_toString","microcredits","recordplaintext_microcredits","nonce","recordplaintext_nonce","serialNumberString","deferred4_0","deferred4_1","recordplaintext_serialNumberString","r3","Signature","__wbg_signature_free","signature_verify","signature_from_string","signature_to_string","Transaction","__wbg_transaction_free","transaction","transaction_fromString","transaction_toString","transactionId","transaction_transactionId","transactionType","transaction_transactionType","VerifyingKey","__wbg_verifyingkey_free","bondPublicVerifier","verifyingkey_bondPublicVerifier","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","transferPublicToPrivateVerifier","verifyingkey_transferPublicToPrivateVerifier","unbondDelegatorAsValidatorVerifier","verifyingkey_unbondDelegatorAsValidatorVerifier","unbondPublicVerifier","verifyingkey_unbondPublicVerifier","isBondPublicVerifier","verifyingkey_isBondPublicVerifier","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","isTransferPublicToPrivateVerifier","verifyingkey_isTransferPublicToPrivateVerifier","isUnbondDelegatorAsValidatorVerifier","verifyingkey_isUnbondDelegatorAsValidatorVerifier","isUnbondPublicVerifier","verifyingkey_isUnbondPublicVerifier","verifyingkey_checksum","verifyingkey_fromBytes","verifyingkey_fromString","verifyingkey_toBytes","verifyingkey_toString","ViewKey","__wbg_viewkey_free","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_daafff584c71593b","XMLHttpRequest","arguments","__wbg_overrideMimeType_1a661d17da5f8baf","overrideMimeType","__wbg_open_56fa1eb95989f6a5","arg4","arg5","open","__wbg_send_9f5007eae908c72e","send","__wbg_response_f2acf2ecbe021710","response","__wbg_new_b51585de1b234aff","__wbindgen_string_new","__wbg_set_092e06b0f9d71865","Reflect","__wbg_new_1eead62f64ca15ce","Headers","__wbindgen_object_clone_ref","__wbg_append_fda9e3432e3e88da","append","__wbg_new_55c9955722952374","AbortController","__wbg_signal_4bd18fb489af2d4c","signal","__wbg_instanceof_Response_fc4327dbfcdf5ced","result","__wbg_status_ac85a3142a84caa2","status","__wbg_url_8503de97f69da463","__wbg_headers_b70de86b8e989bc0","__wbg_iterator_97f0c81209c6c35a","Symbol","iterator","__wbg_get_97b561fb56f034b5","__wbindgen_is_function","__wbg_call_cb65541d95d71282","__wbindgen_is_object","__wbg_next_526fc47e980da008","next","__wbg_next_ddb3312ca1c4e32a","__wbg_done_5c1f01fb660d73b5","done","__wbg_value_1695675138684bd5","value","__wbg_abort_654b796176d117aa","abort","__wbg_stringify_e25465938f3f611f","__wbindgen_string_get","__wbg_call_01734de55d61e11d","__wbg_keypair_new","__wbg_log_0159ca40cddf5b15","log","__wbg_transaction_new","Transaction$1","__wbindgen_bigint_from_u64","__wbindgen_module","__wbg_init","__wbindgen_wasm_module","__wbindgen_memory","__wbg_spawnWorker_f6acaddb2e29dc4a","__wbg_executionresponse_new","ExecutionResponse$1","__wbg_newwithlength_3ec098a360da1909","__wbg_set_502d29070ea18557","__wbindgen_cb_drop","__wbg_arrayBuffer_288fb3538806e85c","__wbg_new_8125e318e6245eed","__wbg_length_72e2208bbc0efc61","__wbg_new_43f1b47c28813cbd","state0","cb0","__wbg_new_898a68150f225f2e","__wbg_push_ca1c26067ef907ac","__wbindgen_number_new","__wbg_new_abda76e883ba8a5f","__wbg_stack_658279fe44541cf6","__wbg_error_f851667af71bcfc6","deferred0_0","deferred0_1","error","__wbg_subarray_13db269f57aa838d","__wbg_getRandomValues_37fa2ca9e4e07fab","getRandomValues","__wbg_buffer_085ec1f694018c4f","__wbg_set_5cf90238115182c3","__wbg_newwithbyteoffsetandlength_6da8e527659b86aa","__wbg_randomFillSync_dc1e9a60c158336d","randomFillSync","__wbg_crypto_c48a774b022d20ac","crypto","__wbg_process_298734cf255a885d","process","__wbg_versions_e2e78e134e3e5d01","versions","__wbg_node_1cd7a5d853dbea79","node","__wbindgen_is_string","__wbg_msCrypto_bcb970640f50a1e8","msCrypto","__wbg_newwithlength_e5d69174d6984cd7","__wbg_require_8f08ceecec0f4fee","require","__wbg_length_fff51ee6522a1a18","__wbg_get_44be0491f933a435","__wbg_self_1ff1d729e9aae938","self","__wbg_window_5f4faef6c12b79ec","window","__wbg_globalThis_1d39714405582d3c","globalThis","__wbg_global_651f05c6a0944d1c","global","__wbindgen_is_undefined","__wbg_newnoargs_581967eacc0e2604","Function","__wbg_has_c5fcd020291e56b8","has","__wbg_fetch_8eaf01857a5bb21f","fetch","__wbg_fetch_b5d6bebed1e6c2d2","__wbindgen_debug_string","__wbindgen_throw","__wbindgen_rethrow","__wbg_then_b2267541e2a73865","then","__wbg_then_f7e06ee3c11698eb","__wbg_resolve_53698b95aaf7fcf8","__wbg_waitAsync_60fb5e2e86467e31","Atomics","waitAsync","__wbg_new_a0af68041688e8fd","__wbg_waitAsync_73fd6eb3bace0a8d","__wbg_async_e1a2a669aacf35ff","__wbg_value_555e4f564193db05","__wbindgen_link_22046963fe0b707a","encodeURIComponent","__wbg_new_8e7322f46d5d019c","__wbg_setonmessage_f0bd0280573b7084","onmessage","__wbg_of_3f69007bb4eeae65","of","__wbg_postMessage_8c609e2bde333d9c","__wbg_data_ab99ae4a2e1e8bc9","data","__wbg_newwithstrandinit_cad5cd6038c7ff5d","Request","__wbg_status_114ef6fe27fb8b00","__wbg_responseText_da275667251fd153","responseText","__wbindgen_closure_wrapper5654","__wbindgen_closure_wrapper5677","__wbg_init_memory","maybe_memory","Memory","initial","maximum","shared","__wbg_finalize_init","exports","__wbindgen_start","initSync","Module","input","URL","freeze","__proto__","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/798.bundle.js b/798.bundle.js deleted file mode 100644 index 58c8e95c0..000000000 --- a/798.bundle.js +++ /dev/null @@ -1,2 +0,0 @@ -(self.webpackChunkaleo_website=self.webpackChunkaleo_website||[]).push([[798],{3798:(e,r,t)=>{t.a(e,(async(e,i)=>{try{t.d(r,{AleoKeyProvider:()=>d,AleoKeyProviderParams:()=>u,PrivateKey:()=>o._q,ProgramManager:()=>y,ProgramManagerBase:()=>o.L,initThreadPool:()=>o.CK,verifyFunctionExecution:()=>o.hz});var o=t(2063),a=e([o]);o=(a.then?(await a)():a)[0];async function n(e){const r=await fetch(e);if(!r.ok)throw new Error(r.status+" could not get URL "+e);return r}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 h{host;account;constructor(e){this.host=e+"/testnet3"}setAccount(e){this.account=e}getAccount(){return this.account}setHost(e){this.host=e+"/testnet3"}async fetchData(e="/"){try{const r=await n(this.host+e);return await r.json()}catch(e){throw new Error("Error fetching data.")}}async findUnspentRecords(e,r,t,i,a,n){if(n=n||[],e<0)throw new Error("Start height must be greater than or equal to 0");const s=new Array;let c,f,l,h,u=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");l=this.account._privateKey}else try{l=t instanceof o._q?t:o._q.from_string(t)}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(f="number"==typeof r&&r<=h?r:h,e>f)throw new Error("Start height must be less than or equal to end height.");for(;f>e;){c=f-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()+"-"+f.toString()),console.warn("Error: ",e),u+=1,u>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 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 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 o.$r.fromString(e)}catch(r){try{return o.$r.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 o.$r?e:await this.getProgramObject(e)).getImports();for(let e=0;e0&&!v)try{v=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.`)}return await o.L.buildExecutionTransaction(g,y,r,a,t,c,this.host,v,f,h,b,w,d)}async execute(e,r,t,i,o,a,n,s,c,f,l,h,u){const d=await this.buildExecutionTransaction(e,r,t,i,o,a,n,s,c,f,l,h,u);return await this.networkClient.submitTransaction(d)}async run(e,r,t,i,a,n,s,c,f,l){let h=f;if(void 0===f&&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(n)}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,r,t,i,!1,a,s,c,this.host,l)}async join(e,r,t,i,a,n,s,c){let f,h,u=s;if(void 0===s&&void 0!==this.account&&(u=this.account.privateKey()),void 0===u)throw"No private key provided and no private key set in the ProgramManager";try{f=i?await this.keyProvider.feePrivateKeys():await this.keyProvider.feePublicKeys(),h=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[d,y]=f,[v,p]=h;try{n=i?await this.getCreditsRecord(t,[],n,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 o.PD?e:o.PD.fromString(e),r=r instanceof o.PD?r:o.PD.fromString(r)}catch(e){throw l("Records provided are not valid. Please ensure they are valid plaintext records.")}const g=await o.L.buildJoinTransaction(u,e,r,t,n,this.host,v,p,d,y,c);return await this.networkClient.submitTransaction(g)}async split(e,r,t,i){let a,n=t;if(void 0===n&&void 0!==this.account&&(n=this.account.privateKey()),void 0===n)throw"No private key provided and no private key set in the ProgramManager";try{a=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[s,c]=a;try{r=r instanceof o.PD?r:o.PD.fromString(r)}catch(e){throw l("Record provided is not valid. Please ensure it is a valid plaintext record.")}const f=await o.L.buildSplitTransaction(n,e,r,this.host,s,c,i);return await this.networkClient.submitTransaction(f)}async synthesizeKeys(e,r,t,i){let a,n=i;void 0===n&&(n=void 0!==this.account?this.account.privateKey():new o._q);try{a=await this.networkClient.getProgramImports(e);const i=await o.L.synthesizeKeyPair(n,e,r,t,a);return[i.provingKey(),i.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,r,t,i,a,n,s,h,u,d){t=f(t);let y,v,p=u;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{y=a?await this.keyProvider.feePrivateKeys():await this.keyProvider.feePublicKeys(),v=await this.keyProvider.transferKeys(t)}catch(e){throw l(`Error finding fee keys. Key finder response: '${e}'. Please ensure your key provider is configured correctly.`)}const[g,b]=y,[w,_]=v;try{const e=[];c(t)?(s=await this.getCreditsRecord(i,[],s,n),e.push(s.nonce())):s=void 0,h=a?await this.getCreditsRecord(i,e,h,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.`)}return await o.L.buildTransferTransaction(p,e,r,t,s,i,h,this.host,w,_,g,b,d)}async buildTransferPublicTransaction(e,r,t,i,o){return this.buildTransferTransaction(e,r,"public",t,!1,void 0,void 0,void 0,i,o)}async transfer(e,r,t,i,o,a,n,s,c,f){const l=await this.buildTransferTransaction(e,r,t,i,o,a,n,s,c,f);return await this.networkClient.submitTransaction(l)}async buildBondPublicTransaction(e,r,t={}){r=Math.trunc(1e6*r);const{offlineParams:i={},executionParams:o={}}=t||{};let{programName:a="credits.aleo",functionName:n="bond_public",fee:s=o?.fee||.86,privateFee:c=!1,recordSearchParams:f,keySearchParams:l,feeRecord:h,provingKey:d,verifyingKey:y,privateKey:v}=o;void 0===l&&(l=new u({proverUri:p.bond_public.prover,verifierUri:p.bond_public.verifier,cacheKey:"credits.aleo/bond_public"}));const{offlineQuery:g}=i;return await this.buildExecutionTransaction(a,n,s,c,[e,`${r.toString()}u64`],f,l,h,d,y,v,g,this.creditsProgram())}async bondPublic(e,r,t={}){const i=await this.buildBondPublicTransaction(e,r,t);return await this.networkClient.submitTransaction(i)}async buildUnbondPublicTransaction(e,r={}){e=Math.trunc(1e6*e);const{offlineParams:t={},executionParams:i={}}=r||{};let{programName:o="credits.aleo",functionName:a="unbond_public",fee:n=i?.fee||1.3,privateFee:s=!1,recordSearchParams:c,keySearchParams:f,feeRecord:l,provingKey:h,verifyingKey:d,privateKey:y}=i;void 0===f&&(f=new u({proverUri:p.unbond_public.prover,verifierUri:p.unbond_public.verifier,cacheKey:"credits.aleo/unbond_public"}));const{offlineQuery:v}=t;return this.buildExecutionTransaction(o,a,n,s,[`${e.toString()}u64`],c,f,l,h,d,y,v,this.creditsProgram())}async unbondPublic(e,r={}){const t=await this.buildUnbondPublicTransaction(e,r);return await this.networkClient.submitTransaction(t)}async buildClaimUnbondPublicTransaction(e={}){const{offlineParams:r={},executionParams:t={}}=e||{};let{programName:i="credits.aleo",functionName:o="claim_unbond_public",fee:a=t?.fee||2,privateFee:n=!1,recordSearchParams:s,keySearchParams:c,feeRecord:f,provingKey:l,verifyingKey:h,privateKey:d}=t;void 0===c&&(c=new u({proverUri:p.claim_unbond_public.prover,verifierUri:p.claim_unbond_public.verifier,cacheKey:"credits.aleo/claim_unbond_public"}));const{offlineQuery:y}=r;return await this.buildExecutionTransaction(i,o,a,n,[],s,c,f,l,h,d,y,this.creditsProgram())}async claimUnbondPublic(e={}){const r=await this.buildClaimUnbondPublicTransaction(e);return await this.networkClient.submitTransaction(r)}async setValidatorState(e,r={}){const{offlineParams:t={},executionParams:i={}}=r||{};let{programName:o="credits.aleo",functionName:a="set_validator_state",fee:n=1,privateFee:s=!1,recordSearchParams:c,keySearchParams:f,feeRecord:l,provingKey:h,verifyingKey:d,privateKey:y}=i;void 0===f&&(f=new u({proverUri:p.set_validator_state.prover,verifierUri:p.set_validator_state.verifier,cacheKey:"credits.aleo/set_validator_state"}));const{offlineQuery:v}=t;return await this.execute(o,a,n,s,[e.toString()],c,f,l,h,d,y,v)}async unbondDelegatorAsValidator(e,r={}){const{offlineParams:t={},executionParams:i={}}=r||{};let{programName:o="credits.aleo",functionName:a="unbond_delegator_as_validator",fee:n=1,privateFee:s=!1,recordSearchParams:c,keySearchParams:f,feeRecord:l,provingKey:h,verifyingKey:d,privateKey:y}=i;void 0===f&&(f=new u({proverUri:p.unbond_delegator_as_validator.prover,verifierUri:p.unbond_delegator_as_validator.verifier,cacheKey:"credits.aleo/unbond_delegator_as_validator"}));const{offlineQuery:v}=t;return await this.execute(o,a,n,s,[e],c,f,l,h,d,y,v)}verifyExecution(e){try{const r=e.getExecution(),t=e.getFunctionId(),i=e.getProgram(),a=e.getVerifyingKey();return(0,o.hz)(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 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,r,t,i){try{return t instanceof o.PD?t:o.PD.fromString(t)}catch(t){try{const t=this.recordProvider;return await t.findCreditsRecord(e,!0,r,i)}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 g.has(e)}function f(e){return b.has(e)?e:l(`Invalid transfer type '${e}'. Valid transfer types are 'private', 'privateToPublic', 'public', and 'publicToPrivate'.`)}const v="https://testnet3.parameters.aleo.org/",p={bond_public:{locator:"credits.aleo/bond_public",prover:v+"bond_public.prover.9c3547d",verifier:"bond_public.verifier.10315ae",verifyingKey:o.XV.bondPublicVerifier},claim_unbond_public:{locator:"credits.aleo/claim_unbond_public",prover:v+"claim_unbond_public.prover.f8b64aa",verifier:"claim_unbond_public.verifier.8fd7445",verifyingKey:o.XV.claimUnbondPublicVerifier},fee_private:{locator:"credits.aleo/fee_private",prover:v+"fee_private.prover.43fab98",verifier:"fee_private.verifier.f3dfefc",verifyingKey:o.XV.feePrivateVerifier},fee_public:{locator:"credits.aleo/fee_public",prover:v+"fee_public.prover.634f153",verifier:"fee_public.verifier.09eeb4f",verifyingKey:o.XV.feePublicVerifier},inclusion:{locator:"inclusion",prover:v+"inclusion.prover.cd85cc5",verifier:"inclusion.verifier.e6f3add",verifyingKey:o.XV.inclusionVerifier},join:{locator:"credits.aleo/join",prover:v+"join.prover.1a76fe8",verifier:"join.verifier.4f1701b",verifyingKey:o.XV.joinVerifier},set_validator_state:{locator:"credits.aleo/set_validator_state",prover:v+"set_validator_state.prover.5ce19be",verifier:"set_validator_state.verifier.730d95b",verifyingKey:o.XV.setValidatorStateVerifier},split:{locator:"credits.aleo/split",prover:v+"split.prover.e6d12b9",verifier:"split.verifier.2f9733d",verifyingKey:o.XV.splitVerifier},transfer_private:{locator:"credits.aleo/transfer_private",prover:v+"transfer_private.prover.2b487c0",verifier:"transfer_private.verifier.3a3cbba",verifyingKey:o.XV.transferPrivateVerifier},transfer_private_to_public:{locator:"credits.aleo/transfer_private_to_public",prover:v+"transfer_private_to_public.prover.1ff64cb",verifier:"transfer_private_to_public.verifier.d5b60de",verifyingKey:o.XV.transferPrivateToPublicVerifier},transfer_public:{locator:"credits.aleo/transfer_public",prover:v+"transfer_public.prover.a74565e",verifier:"transfer_public.verifier.a4c2906",verifyingKey:o.XV.transferPublicVerifier},transfer_public_to_private:{locator:"credits.aleo/transfer_public_to_private",prover:v+"transfer_public_to_private.prover.1bcddf9",verifier:"transfer_public_to_private.verifier.b094554",verifyingKey:o.XV.transferPublicToPrivateVerifier},unbond_delegator_as_validator:{locator:"credits.aleo/unbond_delegator_as_validator",prover:v+"unbond_delegator_as_validator.prover.115a86b",verifier:"unbond_delegator_as_validator.verifier.9585609",verifyingKey:o.XV.unbondDelegatorAsValidatorVerifier},unbond_public:{locator:"credits.aleo/unbond_public",prover:v+"unbond_public.prover.9547c05",verifier:"unbond_public.verifier.09873cd",verifyingKey:o.XV.unbondPublicVerifier}},g=new Set(["transfer_private","private","transferPrivate","transfer_private_to_public","privateToPublic","transferPrivateToPublic"]),b=new Set(["transfer_private","private","transferPrivate","transfer_private_to_public","privateToPublic","transferPrivateToPublic","transfer_public","public","transferPublic","transfer_public_to_private","publicToPrivate","transferPublicToPrivate"]),w=new Set(["private","transfer_private","transferPrivate"]),_=new Set(["private_to_public","privateToPublic","transfer_private_to_public","transferPrivateToPublic"]),m=new Set(["public","transfer_public","transferPublic"]),P=new Set(["public_to_private","publicToPrivate","transfer_public_to_private","transferPublicToPrivate"]);function l(e){throw console.error(e),e}i()}catch(K){i(K)}}))}}]); -//# sourceMappingURL=798.bundle.js.map \ No newline at end of file diff --git a/798.bundle.js.map b/798.bundle.js.map deleted file mode 100644 index f21f4313e..000000000 --- a/798.bundle.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"798.bundle.js","mappings":"iWAAOA,eAAeC,EAAIC,GACtB,MAAMC,QAAiBC,MAAMF,GAE7B,IAAKC,EAASE,GACV,MAAM,IAAIC,MAAMH,EAASI,OAAS,sBAAwBL,GAG9D,OAAOC,CACX,CAGOH,eAAeQ,EAAKN,EAAmBO,GAC1CA,EAAQC,OAAS,OAEjB,MAAMP,QAAiBC,MAAMF,EAAKO,GAElC,IAAKN,EAASE,GACV,MAAM,IAAIC,MAAMH,EAASI,OAAS,uBAAyBL,GAG/D,OAAOC,CACX,CCMA,MAAMQ,EACJC,KACAC,QAEAC,WAAAA,CAAYF,GACVG,KAAKH,KAAOA,EAAO,W,CAWrBI,UAAAA,CAAWH,GACTE,KAAKF,QAAUA,C,CASjBI,UAAAA,GACE,OAAOF,KAAKF,O,CASdK,OAAAA,CAAQN,GACNG,KAAKH,KAAOA,EAAO,W,CAGrB,eAAMO,CACFjB,EAAM,KAER,IACE,MAAMC,QAAiBF,EAAIc,KAAKH,KAAOV,GACvC,aAAaC,EAASiB,MACvB,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,GAI9B,QAA0B,IAAfZ,EAA4B,CACrC,QAA4B,IAAjBV,KAAKF,QACd,MAAM,IAAIP,MAAM,oGAEhB2B,EAAqBlB,KAAKF,QAAQyB,WAErC,MACC,IACEL,EAAqBR,aAAsBc,EAAAA,GAAad,EAAac,EAAAA,GAAWC,YAAYf,EAC7F,CAAC,MAAOJ,GACP,MAAM,IAAIf,MAAM,sCACjB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e,GAEjB,MADAzC,QAAQxD,MAAMiG,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) {\n const response = await fetch(url);\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\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 account: Account | undefined;\n\n constructor(host: string) {\n this.host = host + \"/testnet3\";\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 + \"/testnet3\";\n }\n\n async fetchData(\n url = \"/\",\n ): Promise {\n try {\n const response = await get(this.host + url);\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 /**\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: {\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, ProgramImports }\n","import { ProvingKey, VerifyingKey, CREDITS_PROGRAM_KEYS, KEY_STORE, PRIVATE_TRANSFER, PRIVATE_TO_PUBLIC_TRANSFER, PUBLIC_TRANSFER, PUBLIC_TO_PRIVATE_TRANSFER} 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 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}) {\n this.proverUri = params.proverUri;\n this.verifierUri = params.verifierUri;\n this.cacheKey = params.cacheKey;\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 /**\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 * const AleoProviderParams = new AleoProviderParams(\"https://testnet3.parameters.aleo.org/transfer_private.\");\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 (\"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.fetchKeys(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://vm.aleo.org/api\", 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(\"https://testnet3.parameters.aleo.org/transfer_private.prover.2a9a6f2\", \"https://testnet3.parameters.aleo.org/transfer_private.verifier.3a59762\");\n */\n async fetchKeys(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 bondPublicKeys(): Promise {\n return this.fetchKeys(CREDITS_PROGRAM_KEYS.bond_public.prover, CREDITS_PROGRAM_KEYS.bond_public.verifier, CREDITS_PROGRAM_KEYS.bond_public.locator)\n }\n\n claimUnbondPublicKeys(): Promise {\n return this.fetchKeys(CREDITS_PROGRAM_KEYS.claim_unbond_public.prover, CREDITS_PROGRAM_KEYS.claim_unbond_public.verifier, CREDITS_PROGRAM_KEYS.claim_unbond_public.locator)\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://vm.aleo.org/api\");\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://vm.aleo.org/api\", 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.fetchKeys(CREDITS_PROGRAM_KEYS.transfer_private.prover, CREDITS_PROGRAM_KEYS.transfer_private.verifier, CREDITS_PROGRAM_KEYS.transfer_private.locator);\n } else if (PRIVATE_TO_PUBLIC_TRANSFER.has(visibility)) {\n return await this.fetchKeys(CREDITS_PROGRAM_KEYS.transfer_private_to_public.prover, CREDITS_PROGRAM_KEYS.transfer_private_to_public.verifier, CREDITS_PROGRAM_KEYS.transfer_private_to_public.locator);\n } else if (PUBLIC_TRANSFER.has(visibility)) {\n return await this.fetchKeys(CREDITS_PROGRAM_KEYS.transfer_public.prover, CREDITS_PROGRAM_KEYS.transfer_public.verifier, CREDITS_PROGRAM_KEYS.transfer_public.locator);\n } else if (PUBLIC_TO_PRIVATE_TRANSFER.has(visibility)) {\n return await this.fetchKeys(CREDITS_PROGRAM_KEYS.transfer_public_to_private.prover, CREDITS_PROGRAM_KEYS.transfer_public_to_private.verifier, CREDITS_PROGRAM_KEYS.transfer_public_to_private.locator);\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.fetchKeys(CREDITS_PROGRAM_KEYS.join.prover, CREDITS_PROGRAM_KEYS.join.verifier, CREDITS_PROGRAM_KEYS.join.locator);\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.fetchKeys(CREDITS_PROGRAM_KEYS.split.prover, CREDITS_PROGRAM_KEYS.split.verifier, CREDITS_PROGRAM_KEYS.split.locator);\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.fetchKeys(CREDITS_PROGRAM_KEYS.fee_private.prover, CREDITS_PROGRAM_KEYS.fee_private.verifier, CREDITS_PROGRAM_KEYS.fee_private.locator);\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.fetchKeys(CREDITS_PROGRAM_KEYS.fee_public.prover, CREDITS_PROGRAM_KEYS.fee_public.verifier, CREDITS_PROGRAM_KEYS.fee_public.locator);\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.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_to_private.verifier:\n return CREDITS_PROGRAM_KEYS.transfer_public_to_private.verifyingKey();\n case CREDITS_PROGRAM_KEYS.unbond_delegator_as_validator.verifier:\n return CREDITS_PROGRAM_KEYS.unbond_delegator_as_validator.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.fetchKeys(CREDITS_PROGRAM_KEYS.unbond_public.prover, CREDITS_PROGRAM_KEYS.unbond_public.verifier, CREDITS_PROGRAM_KEYS.unbond_public.locator);\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 \"@aleohq/wasm/dist/crates/aleo_wasm\";\n\n// TODO put this somewhere where it makes more sense\ninterface ExecutionParams {\n programName?: string;\n functionName?: string;\n fee?: number;\n privateFee?: boolean;\n recordSearchParams?: any;\n keySearchParams?: any;\n feeRecord?: any;\n provingKey?: any;\n verifyingKey?: any;\n privateKey?: any;\n}\ninterface OfflineParams {\n offlineQuery?: OfflineQuery\n}\ninterface Options {\n offlineParams?: OfflineParams;\n executionParams?: ExecutionParams;\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 if (!host) {\n this.host = \"https://api.explorer.aleo.org/v1\";\n this.networkClient = new AleoNetworkClient(this.host);\n } else {\n this.host = host;\n this.networkClient = new AleoNetworkClient(host);\n }\n\n if (!keyProvider) {\n this.keyProvider = new AleoKeyProvider();\n } else {\n this.keyProvider = keyProvider;\n }\n\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 * Build an execution transaction for later submission to the Aleo network.\n *\n * @param {string} programName Program name containing the function to be executed\n * @param {string} functionName Function name to execute\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 {string[]} inputs Inputs to the function\n * @param {RecordSearchParams} recordSearchParams Optional parameters for searching for a record to pay the fee for\n * the execution transaction\n * @param {KeySearchParams} keySearchParams Optional parameters for finding the matching proving & verifying keys\n * for the function\n * @param {string | RecordPlaintext | undefined} feeRecord Optional Fee record to use for the transaction\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 * @param {string | Program | undefined} program Optional program source code to use for the transaction\n * @param {ProgramImports} imports Programs that the program being executed imports\n * @returns {Promise}\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://vm.aleo.org/api\");\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 programName = \"hello_hello.aleo\";\n * const programManager = new ProgramManager(\"https://vm.aleo.org/api\", keyProvider, recordProvider);\n * const keySearchParams = { \"cacheKey\": \"hello_hello:hello\" };\n * const transaction = await programManager.execute(programName, \"hello_hello\", 0.020, [\"5u32\", \"5u32\"], undefined, undefined, undefined, keySearchParams);\n * const result = await programManager.networkClient.submitTransaction(transaction);\n */\n async buildExecutionTransaction(\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 ): Promise {\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 * Execute an Aleo program on the Aleo network\n *\n * @param {string} programName Program name containing the function to be executed\n * @param {string} functionName Function name to execute\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 {string[]} inputs Inputs to the function\n * @param {RecordSearchParams} recordSearchParams Optional parameters for searching for a record to pay the fee for\n * the execution transaction\n * @param {KeySearchParams} keySearchParams Optional parameters for finding the matching proving & verifying keys\n * for the function\n * @param {string | RecordPlaintext | undefined} feeRecord Optional Fee record to use for the transaction\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 * // Create a new NetworkClient, KeyProvider, and RecordProvider using official Aleo record, key, and network providers\n * const networkClient = new AleoNetworkClient(\"https://vm.aleo.org/api\");\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 programName = \"hello_hello.aleo\";\n * const programManager = new ProgramManager(\"https://vm.aleo.org/api\", keyProvider, recordProvider);\n * const keySearchParams = { \"cacheKey\": \"hello_hello:hello\" };\n * const tx_id = await programManager.execute(programName, \"hello_hello\", 0.020, [\"5u32\", \"5u32\"], undefined, undefined, undefined, keySearchParams);\n * const transaction = await programManager.networkClient.getTransaction(tx_id);\n */\n async execute(\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 ): Promise {\n const tx = await this.buildExecutionTransaction(programName, functionName, fee, privateFee, inputs, recordSearchParams, keySearchParams, feeRecord, provingKey, verifyingKey, privateKey, offlineQuery, program);\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 '@aleohq/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.executeOffline(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://vm.aleo.org/api\");\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://vm.aleo.org/api\", 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://vm.aleo.org/api\");\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://vm.aleo.org/api\", 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 * @example\n * // Create a new NetworkClient, KeyProvider, and RecordProvider\n * const networkClient = new AleoNetworkClient(\"https://vm.aleo.org/api\");\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://vm.aleo.org/api\", 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 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 * 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://vm.aleo.org/api\");\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://vm.aleo.org/api\", 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 staking committee 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\n * const tx_id = await programManager.bondPublic(\"aleo1rhgdu77hgyqd3xjj8ucu3jj9r2krwz6mnzyd80gncr5fxcwlh5rsvzp9px\", 2000000);\n *\n * @returns string\n * @param {string} 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 {number} amount The amount of credits to bond\n * @param {Options} options Options for the execution\n */\n async buildBondPublicTransaction(address: string, amount: number, options: Options = {}) {\n amount = Math.trunc(amount*1000000);\n\n const {\n offlineParams = {},\n executionParams = {}\n } = options || {};\n\n let {\n programName = \"credits.aleo\",\n functionName = \"bond_public\",\n fee = executionParams?.fee || 0.86,\n privateFee = false,\n recordSearchParams,\n keySearchParams,\n feeRecord,\n provingKey,\n verifyingKey,\n privateKey\n } = executionParams;\n\n if (keySearchParams === undefined) {\n keySearchParams = new AleoKeyProviderParams(\n {\n proverUri: CREDITS_PROGRAM_KEYS.bond_public.prover,\n verifierUri: CREDITS_PROGRAM_KEYS.bond_public.verifier,\n cacheKey: \"credits.aleo/bond_public\"\n });\n }\n\n const {\n offlineQuery,\n } = offlineParams;\n\n return await this.buildExecutionTransaction(programName, functionName, fee, privateFee, [address, `${amount.toString()}u64`], recordSearchParams, keySearchParams, feeRecord, provingKey, verifyingKey, privateKey, offlineQuery, this.creditsProgram());\n }\n\n /**\n * Bond credits to a staking committee\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(\"aleo1rhgdu77hgyqd3xjj8ucu3jj9r2krwz6mnzyd80gncr5fxcwlh5rsvzp9px\", 2000000);\n *\n * @returns string\n * @param {string} 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 {number} amount The amount of credits to bond\n * @param {Options} options Options for the execution\n */\n async bondPublic(address: string, amount: number, options: Options = {}) {\n const tx = await this.buildBondPublicTransaction(address, amount, options);\n return await this.networkClient.submitTransaction(tx);\n }\n\n /**\n * Build a transaction to unbond a specified amount of staked credits to be used later\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.unbondPublic(10);\n *\n * @returns string\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 {Options} options Options for the execution\n */\n async buildUnbondPublicTransaction(amount: number, options: Options = {}): Promise {\n amount = Math.trunc(amount*1000000);\n\n const {\n offlineParams = {},\n executionParams = {}\n } = options || {};\n\n let {\n programName = \"credits.aleo\",\n functionName = \"unbond_public\",\n fee = executionParams?.fee || 1.3,\n privateFee = false,\n recordSearchParams,\n keySearchParams,\n feeRecord,\n provingKey,\n verifyingKey,\n privateKey\n } = executionParams;\n\n if (keySearchParams === undefined) {\n keySearchParams = new AleoKeyProviderParams(\n {\n proverUri: CREDITS_PROGRAM_KEYS.unbond_public.prover,\n verifierUri: CREDITS_PROGRAM_KEYS.unbond_public.verifier,\n cacheKey: \"credits.aleo/unbond_public\"\n });\n }\n\n const {\n offlineQuery,\n } = offlineParams;\n\n return this.buildExecutionTransaction(programName, functionName, fee, privateFee, [`${amount.toString()}u64`], recordSearchParams, keySearchParams, feeRecord, provingKey, verifyingKey, privateKey, offlineQuery, this.creditsProgram());\n }\n\n /**\n * Unbond a specified amount of staked credits to be used later\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.unbondPublic(10);\n *\n * @returns string\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 {Options} options Options for the execution\n */\n async unbondPublic(amount: number, options: Options = {}): Promise {\n const tx = await this.buildUnbondPublicTransaction(amount, options);\n return await this.networkClient.submitTransaction(tx);\n }\n\n /**\n * Build a transaction to Claim unbonded credits for later submission. If credits have been unbonded by the account\n * executing this function, this method will 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();\n *\n * @returns string\n * @param {Options} options\n */\n async buildClaimUnbondPublicTransaction(options: Options = {}): Promise {\n const {\n offlineParams = {},\n executionParams = {}\n } = options || {};\n\n let {\n programName = \"credits.aleo\",\n functionName = \"claim_unbond_public\",\n fee = executionParams?.fee || 2,\n privateFee = false,\n recordSearchParams,\n keySearchParams,\n feeRecord,\n provingKey,\n verifyingKey,\n privateKey\n } = executionParams;\n\n if (keySearchParams === undefined) {\n keySearchParams = new AleoKeyProviderParams(\n {\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 }\n\n const {\n offlineQuery,\n } = offlineParams;\n\n return await this.buildExecutionTransaction(programName, functionName, fee, privateFee, [], recordSearchParams, keySearchParams, feeRecord, provingKey, verifyingKey, privateKey, offlineQuery, this.creditsProgram());\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();\n *\n * @returns string\n * @param {Options} options\n */\n async claimUnbondPublic(options: Options = {}): Promise {\n const tx = await this.buildClaimUnbondPublicTransaction(options);\n return await this.networkClient.submitTransaction(tx);\n }\n\n /**\n * Set Validator State\n * @returns string\n * @param {boolean} validator_state\n * @param options\n */\n async setValidatorState(validator_state: boolean, options: Options = {}) {\n const {\n offlineParams = {},\n executionParams = {}\n } = options || {};\n\n let {\n programName = \"credits.aleo\",\n functionName = \"set_validator_state\",\n fee = 1,\n privateFee = false,\n recordSearchParams,\n keySearchParams,\n feeRecord,\n provingKey,\n verifyingKey,\n privateKey\n } = executionParams;\n\n if (keySearchParams === undefined) {\n keySearchParams = new AleoKeyProviderParams(\n {\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 }\n\n const {\n offlineQuery,\n } = offlineParams;\n\n return await this.execute(programName, functionName, fee, privateFee, [validator_state.toString()], recordSearchParams, keySearchParams, feeRecord, provingKey, verifyingKey, privateKey, offlineQuery);\n }\n\n /**\n * Unbond Delegator As Validator\n * @returns string\n * @param {string} address\n * @param options\n */\n async unbondDelegatorAsValidator(address:string, options: Options = {}) {\n const {\n offlineParams = {},\n executionParams = {}\n } = options || {};\n\n let {\n programName = \"credits.aleo\",\n functionName = \"unbond_delegator_as_validator\",\n fee = 1,\n privateFee = false,\n recordSearchParams,\n keySearchParams,\n feeRecord,\n provingKey,\n verifyingKey,\n privateKey\n } = executionParams;\n\n if (keySearchParams === undefined) {\n keySearchParams = new AleoKeyProviderParams(\n {\n proverUri: CREDITS_PROGRAM_KEYS.unbond_delegator_as_validator.prover,\n verifierUri: CREDITS_PROGRAM_KEYS.unbond_delegator_as_validator.verifier,\n cacheKey: \"credits.aleo/unbond_delegator_as_validator\"\n });\n }\n\n const {\n offlineQuery,\n } = offlineParams;\n\n return await this.execute(programName, functionName, fee, privateFee, [address], recordSearchParams, keySearchParams, feeRecord, provingKey, verifyingKey, privateKey, offlineQuery);\n }\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} from \"@aleohq/wasm\";\nconst KEY_STORE = \"https://testnet3.parameters.aleo.org/\";\n\nconst CREDITS_PROGRAM_KEYS = {\n bond_public: {\n locator: \"credits.aleo/bond_public\",\n prover: KEY_STORE + \"bond_public.prover.9c3547d\",\n verifier: \"bond_public.verifier.10315ae\",\n verifyingKey: VerifyingKey.bondPublicVerifier\n },\n claim_unbond_public: {\n locator: \"credits.aleo/claim_unbond_public\",\n prover: KEY_STORE + \"claim_unbond_public.prover.f8b64aa\",\n verifier: \"claim_unbond_public.verifier.8fd7445\",\n verifyingKey: VerifyingKey.claimUnbondPublicVerifier\n },\n fee_private: {\n locator: \"credits.aleo/fee_private\",\n prover: KEY_STORE + \"fee_private.prover.43fab98\",\n verifier: \"fee_private.verifier.f3dfefc\",\n verifyingKey: VerifyingKey.feePrivateVerifier\n },\n fee_public: {\n locator: \"credits.aleo/fee_public\",\n prover: KEY_STORE + \"fee_public.prover.634f153\",\n verifier: \"fee_public.verifier.09eeb4f\",\n verifyingKey: VerifyingKey.feePublicVerifier\n },\n inclusion: {\n locator: \"inclusion\",\n prover: KEY_STORE + \"inclusion.prover.cd85cc5\",\n verifier: \"inclusion.verifier.e6f3add\",\n verifyingKey: VerifyingKey.inclusionVerifier\n },\n join: {\n locator: \"credits.aleo/join\",\n prover: KEY_STORE + \"join.prover.1a76fe8\",\n verifier: \"join.verifier.4f1701b\",\n verifyingKey: VerifyingKey.joinVerifier\n },\n set_validator_state: {\n locator: \"credits.aleo/set_validator_state\",\n prover: KEY_STORE + \"set_validator_state.prover.5ce19be\",\n verifier: \"set_validator_state.verifier.730d95b\",\n verifyingKey: VerifyingKey.setValidatorStateVerifier\n },\n split: {\n locator: \"credits.aleo/split\",\n prover: KEY_STORE + \"split.prover.e6d12b9\",\n verifier: \"split.verifier.2f9733d\",\n verifyingKey: VerifyingKey.splitVerifier\n },\n transfer_private: {\n locator: \"credits.aleo/transfer_private\",\n prover: KEY_STORE + \"transfer_private.prover.2b487c0\",\n verifier: \"transfer_private.verifier.3a3cbba\",\n verifyingKey: VerifyingKey.transferPrivateVerifier\n },\n transfer_private_to_public: {\n locator: \"credits.aleo/transfer_private_to_public\",\n prover: KEY_STORE + \"transfer_private_to_public.prover.1ff64cb\",\n verifier: \"transfer_private_to_public.verifier.d5b60de\",\n verifyingKey: VerifyingKey.transferPrivateToPublicVerifier\n },\n transfer_public: {\n locator: \"credits.aleo/transfer_public\",\n prover: KEY_STORE + \"transfer_public.prover.a74565e\",\n verifier: \"transfer_public.verifier.a4c2906\",\n verifyingKey: VerifyingKey.transferPublicVerifier\n },\n transfer_public_to_private: {\n locator: \"credits.aleo/transfer_public_to_private\",\n prover: KEY_STORE + \"transfer_public_to_private.prover.1bcddf9\",\n verifier: \"transfer_public_to_private.verifier.b094554\",\n verifyingKey: VerifyingKey.transferPublicToPrivateVerifier\n },\n unbond_delegator_as_validator: {\n locator: \"credits.aleo/unbond_delegator_as_validator\",\n prover: KEY_STORE + \"unbond_delegator_as_validator.prover.115a86b\",\n verifier: \"unbond_delegator_as_validator.verifier.9585609\",\n verifyingKey: VerifyingKey.unbondDelegatorAsValidatorVerifier\n },\n unbond_public: {\n locator: \"credits.aleo/unbond_public\",\n prover: KEY_STORE + \"unbond_public.prover.9547c05\",\n verifier: \"unbond_public.verifier.09873cd\",\n verifyingKey: VerifyingKey.unbondPublicVerifier\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 \"public\",\n \"transferPublic\",\n \"transfer_public_to_private\",\n \"publicToPrivate\",\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_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 \"@aleohq/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 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_TO_PRIVATE_TRANSFER,\n VALID_TRANSFER_TYPES,\n logAndThrow,\n};\n"],"names":["async","get","url","response","fetch","ok","Error","status","post","options","method","AleoNetworkClient","host","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","headers","message","AleoKeyProviderParams","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","fetchKeys","getVerifyingKey","bondPublicKeys","CREDITS_PROGRAM_KEYS","bond_public","prover","verifier","locator","claimUnbondPublicKeys","claim_unbond_public","transferKeys","visibility","PRIVATE_TRANSFER","transfer_private","PRIVATE_TO_PUBLIC_TRANSFER","transfer_private_to_public","PUBLIC_TRANSFER","transfer_public","PUBLIC_TO_PRIVATE_TRANSFER","transfer_public_to_private","joinKeys","join","splitKeys","split","feePrivateKeys","fee_private","feePublicKeys","fee_public","inclusion","set_validator_state","unbond_delegator_as_validator","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","keyPair","synthesizeKeyPair","buildTransferTransaction","amount","recipient","transferType","validateTransferType","transferProvingKey","transferVerifyingKey","requiresAmountRecord","buildTransferPublicTransaction","transfer","buildBondPublicTransaction","address","Math","trunc","offlineParams","executionParams","creditsProgram","bondPublic","buildUnbondPublicTransaction","unbondPublic","buildClaimUnbondPublicTransaction","claimUnbondPublic","setValidatorState","validator_state","unbondDelegatorAsValidator","verifyExecution","executionResponse","getExecution","getFunctionId","verifyFunctionExecution","createProgramFromSource","getCreditsProgram","verifyProgram","findCreditsRecord","PRIVATE_TRANSFER_TYPES","VALID_TRANSFER_TYPES","bondPublicVerifier","claimUnbondPublicVerifier","feePrivateVerifier","feePublicVerifier","inclusionVerifier","joinVerifier","setValidatorStateVerifier","splitVerifier","transferPrivateVerifier","transferPrivateToPublicVerifier","transferPublicVerifier","transferPublicToPrivateVerifier","unbondDelegatorAsValidatorVerifier","unbondPublicVerifier","Set"],"sourceRoot":""} \ No newline at end of file diff --git a/849.bundle.js b/849.bundle.js deleted file mode 100644 index 907254540..000000000 --- a/849.bundle.js +++ /dev/null @@ -1,3 +0,0 @@ -/*! For license information please see 849.bundle.js.LICENSE.txt */ -(()=>{var e,r,t,i,o,n,a={3798:(e,r,t)=>{t.a(e,(async(e,i)=>{try{t.d(r,{AleoKeyProvider:()=>p,AleoKeyProviderParams:()=>h,ProgramManager:()=>d});var o=t(2063),n=e([o]);o=(n.then?(await n)():n)[0];async function a(e){const r=await fetch(e);if(!r.ok)throw new Error(r.status+" could not get URL "+e);return r}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 u{host;account;constructor(e){this.host=e+"/testnet3"}setAccount(e){this.account=e}getAccount(){return this.account}setHost(e){this.host=e+"/testnet3"}async fetchData(e="/"){try{const r=await a(this.host+e);return await r.json()}catch(e){throw new Error("Error fetching data.")}}async findUnspentRecords(e,r,t,i,n,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,l,f,u,h=0,p=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");f=this.account._privateKey}else try{f=t instanceof o._q?t:o._q.from_string(t)}catch(e){throw new Error("Error parsing private key provided.")}const d=f.to_view_key();try{const e=await this.getLatestHeight();if("number"!=typeof e)throw new Error("Error fetching latest block height.");u=e}catch(e){throw new Error("Error fetching latest block height.")}if(l="number"==typeof r&&r<=u?r:u,e>l)throw new Error("Start height must be less than or equal to end height.");for(;l>e;){c=l-50,c=BigInt(n))))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 n&&(p+=r.microcredits(),p>=BigInt(n)))return s;if(s.length>=i.length)return s}}}}}catch(e){}}}}}}}catch(e){if(console.warn("Error fetching blocks in range: "+c.toString()+"-"+l.toString()),console.warn("Error: ",e),h+=1,h>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 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 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 o.$r.fromString(e)}catch(r){try{return o.$r.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 o.$r?e:await this.getProgramObject(e)).getImports();for(let e=0;e0&&!y)try{y=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.`)}return await o.L.buildExecutionTransaction(g,d,r,n,t,c,this.host,y,l,u,b,w,p)}async execute(e,r,t,i,o,n,a,s,c,l,f,u,h){const p=await this.buildExecutionTransaction(e,r,t,i,o,n,a,s,c,l,f,u,h);return await this.networkClient.submitTransaction(p)}async run(e,r,t,i,n,a,s,c,l,f){let u=l;if(void 0===l&&void 0!==this.account&&(u=this.account.privateKey()),void 0===u)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(u,e,r,t,i,!1,n,s,c,this.host,f)}async join(e,r,t,i,n,a,s,c){let l,u,h=s;if(void 0===s&&void 0!==this.account&&(h=this.account.privateKey()),void 0===h)throw"No private key provided and no private key set in the ProgramManager";try{l=i?await this.keyProvider.feePrivateKeys():await this.keyProvider.feePublicKeys(),u=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[p,d]=l,[y,v]=u;try{a=i?await this.getCreditsRecord(t,[],a,n):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 o.PD?e:o.PD.fromString(e),r=r instanceof o.PD?r:o.PD.fromString(r)}catch(e){throw f("Records provided are not valid. Please ensure they are valid plaintext records.")}const g=await o.L.buildJoinTransaction(h,e,r,t,a,this.host,y,v,p,d,c);return await this.networkClient.submitTransaction(g)}async split(e,r,t,i){let n,a=t;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{n=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]=n;try{r=r instanceof o.PD?r:o.PD.fromString(r)}catch(e){throw f("Record provided is not valid. Please ensure it is a valid plaintext record.")}const l=await o.L.buildSplitTransaction(a,e,r,this.host,s,c,i);return await this.networkClient.submitTransaction(l)}async synthesizeKeys(e,r,t,i){let n,a=i;void 0===a&&(a=void 0!==this.account?this.account.privateKey():new o._q);try{n=await this.networkClient.getProgramImports(e);const i=await o.L.synthesizeKeyPair(a,e,r,t,n);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,n,a,s,u,h,p){t=l(t);let d,y,v=h;if(void 0===v&&void 0!==this.account&&(v=this.account.privateKey()),void 0===v)throw"No private key provided and no private key set in the ProgramManager";try{d=n?await this.keyProvider.feePrivateKeys():await this.keyProvider.feePublicKeys(),y=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[g,b]=d,[w,m]=y;try{const e=[];c(t)?(s=await this.getCreditsRecord(i,[],s,a),e.push(s.nonce())):s=void 0,u=n?await this.getCreditsRecord(i,e,u,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.`)}return await o.L.buildTransferTransaction(v,e,r,t,s,i,u,this.host,w,m,g,b,p)}async buildTransferPublicTransaction(e,r,t,i,o){return this.buildTransferTransaction(e,r,"public",t,!1,void 0,void 0,void 0,i,o)}async transfer(e,r,t,i,o,n,a,s,c,l){const f=await this.buildTransferTransaction(e,r,t,i,o,n,a,s,c,l);return await this.networkClient.submitTransaction(f)}async buildBondPublicTransaction(e,r,t={}){r=Math.trunc(1e6*r);const{offlineParams:i={},executionParams:o={}}=t||{};let{programName:n="credits.aleo",functionName:a="bond_public",fee:s=o?.fee||.86,privateFee:c=!1,recordSearchParams:l,keySearchParams:f,feeRecord:u,provingKey:p,verifyingKey:d,privateKey:y}=o;void 0===f&&(f=new h({proverUri:v.bond_public.prover,verifierUri:v.bond_public.verifier,cacheKey:"credits.aleo/bond_public"}));const{offlineQuery:g}=i;return await this.buildExecutionTransaction(n,a,s,c,[e,`${r.toString()}u64`],l,f,u,p,d,y,g,this.creditsProgram())}async bondPublic(e,r,t={}){const i=await this.buildBondPublicTransaction(e,r,t);return await this.networkClient.submitTransaction(i)}async buildUnbondPublicTransaction(e,r={}){e=Math.trunc(1e6*e);const{offlineParams:t={},executionParams:i={}}=r||{};let{programName:o="credits.aleo",functionName:n="unbond_public",fee:a=i?.fee||1.3,privateFee:s=!1,recordSearchParams:c,keySearchParams:l,feeRecord:f,provingKey:u,verifyingKey:p,privateKey:d}=i;void 0===l&&(l=new h({proverUri:v.unbond_public.prover,verifierUri:v.unbond_public.verifier,cacheKey:"credits.aleo/unbond_public"}));const{offlineQuery:y}=t;return this.buildExecutionTransaction(o,n,a,s,[`${e.toString()}u64`],c,l,f,u,p,d,y,this.creditsProgram())}async unbondPublic(e,r={}){const t=await this.buildUnbondPublicTransaction(e,r);return await this.networkClient.submitTransaction(t)}async buildClaimUnbondPublicTransaction(e={}){const{offlineParams:r={},executionParams:t={}}=e||{};let{programName:i="credits.aleo",functionName:o="claim_unbond_public",fee:n=t?.fee||2,privateFee:a=!1,recordSearchParams:s,keySearchParams:c,feeRecord:l,provingKey:f,verifyingKey:u,privateKey:p}=t;void 0===c&&(c=new h({proverUri:v.claim_unbond_public.prover,verifierUri:v.claim_unbond_public.verifier,cacheKey:"credits.aleo/claim_unbond_public"}));const{offlineQuery:d}=r;return await this.buildExecutionTransaction(i,o,n,a,[],s,c,l,f,u,p,d,this.creditsProgram())}async claimUnbondPublic(e={}){const r=await this.buildClaimUnbondPublicTransaction(e);return await this.networkClient.submitTransaction(r)}async setValidatorState(e,r={}){const{offlineParams:t={},executionParams:i={}}=r||{};let{programName:o="credits.aleo",functionName:n="set_validator_state",fee:a=1,privateFee:s=!1,recordSearchParams:c,keySearchParams:l,feeRecord:f,provingKey:u,verifyingKey:p,privateKey:d}=i;void 0===l&&(l=new h({proverUri:v.set_validator_state.prover,verifierUri:v.set_validator_state.verifier,cacheKey:"credits.aleo/set_validator_state"}));const{offlineQuery:y}=t;return await this.execute(o,n,a,s,[e.toString()],c,l,f,u,p,d,y)}async unbondDelegatorAsValidator(e,r={}){const{offlineParams:t={},executionParams:i={}}=r||{};let{programName:o="credits.aleo",functionName:n="unbond_delegator_as_validator",fee:a=1,privateFee:s=!1,recordSearchParams:c,keySearchParams:l,feeRecord:f,provingKey:u,verifyingKey:p,privateKey:d}=i;void 0===l&&(l=new h({proverUri:v.unbond_delegator_as_validator.prover,verifierUri:v.unbond_delegator_as_validator.verifier,cacheKey:"credits.aleo/unbond_delegator_as_validator"}));const{offlineQuery:y}=t;return await this.execute(o,n,a,s,[e],c,l,f,u,p,d,y)}verifyExecution(e){try{const r=e.getExecution(),t=e.getFunctionId(),i=e.getProgram(),n=e.getVerifyingKey();return(0,o.hz)(r,n,i,t)}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,r,t,i){try{return t instanceof o.PD?t:o.PD.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 c(e){return g.has(e)}function l(e){return b.has(e)?e:f(`Invalid transfer type '${e}'. Valid transfer types are 'private', 'privateToPublic', 'public', and 'publicToPrivate'.`)}const y="https://testnet3.parameters.aleo.org/",v={bond_public:{locator:"credits.aleo/bond_public",prover:y+"bond_public.prover.9c3547d",verifier:"bond_public.verifier.10315ae",verifyingKey:o.XV.bondPublicVerifier},claim_unbond_public:{locator:"credits.aleo/claim_unbond_public",prover:y+"claim_unbond_public.prover.f8b64aa",verifier:"claim_unbond_public.verifier.8fd7445",verifyingKey:o.XV.claimUnbondPublicVerifier},fee_private:{locator:"credits.aleo/fee_private",prover:y+"fee_private.prover.43fab98",verifier:"fee_private.verifier.f3dfefc",verifyingKey:o.XV.feePrivateVerifier},fee_public:{locator:"credits.aleo/fee_public",prover:y+"fee_public.prover.634f153",verifier:"fee_public.verifier.09eeb4f",verifyingKey:o.XV.feePublicVerifier},inclusion:{locator:"inclusion",prover:y+"inclusion.prover.cd85cc5",verifier:"inclusion.verifier.e6f3add",verifyingKey:o.XV.inclusionVerifier},join:{locator:"credits.aleo/join",prover:y+"join.prover.1a76fe8",verifier:"join.verifier.4f1701b",verifyingKey:o.XV.joinVerifier},set_validator_state:{locator:"credits.aleo/set_validator_state",prover:y+"set_validator_state.prover.5ce19be",verifier:"set_validator_state.verifier.730d95b",verifyingKey:o.XV.setValidatorStateVerifier},split:{locator:"credits.aleo/split",prover:y+"split.prover.e6d12b9",verifier:"split.verifier.2f9733d",verifyingKey:o.XV.splitVerifier},transfer_private:{locator:"credits.aleo/transfer_private",prover:y+"transfer_private.prover.2b487c0",verifier:"transfer_private.verifier.3a3cbba",verifyingKey:o.XV.transferPrivateVerifier},transfer_private_to_public:{locator:"credits.aleo/transfer_private_to_public",prover:y+"transfer_private_to_public.prover.1ff64cb",verifier:"transfer_private_to_public.verifier.d5b60de",verifyingKey:o.XV.transferPrivateToPublicVerifier},transfer_public:{locator:"credits.aleo/transfer_public",prover:y+"transfer_public.prover.a74565e",verifier:"transfer_public.verifier.a4c2906",verifyingKey:o.XV.transferPublicVerifier},transfer_public_to_private:{locator:"credits.aleo/transfer_public_to_private",prover:y+"transfer_public_to_private.prover.1bcddf9",verifier:"transfer_public_to_private.verifier.b094554",verifyingKey:o.XV.transferPublicToPrivateVerifier},unbond_delegator_as_validator:{locator:"credits.aleo/unbond_delegator_as_validator",prover:y+"unbond_delegator_as_validator.prover.115a86b",verifier:"unbond_delegator_as_validator.verifier.9585609",verifyingKey:o.XV.unbondDelegatorAsValidatorVerifier},unbond_public:{locator:"credits.aleo/unbond_public",prover:y+"unbond_public.prover.9547c05",verifier:"unbond_public.verifier.09873cd",verifyingKey:o.XV.unbondPublicVerifier}},g=new Set(["transfer_private","private","transferPrivate","transfer_private_to_public","privateToPublic","transferPrivateToPublic"]),b=new Set(["transfer_private","private","transferPrivate","transfer_private_to_public","privateToPublic","transferPrivateToPublic","transfer_public","public","transferPublic","transfer_public_to_private","publicToPrivate","transferPublicToPrivate"]),w=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_to_private","publicToPrivate","transfer_public_to_private","transferPublicToPrivate"]);function f(e){throw console.error(e),e}i()}catch(k){i(k)}}))},8726:(e,r,t)=>{t.a(e,(async(e,r)=>{try{var i=t(3798),o=t(8991),n=t(2063),a=e([i,n]);[i,n]=a.then?(await a)():a,await(0,n.CK)();const l="https://api.explorer.aleo.org/v1",f=new i.AleoKeyProvider,u=new i.ProgramManager(l,f,void 0);f.useCache(!0);let h="";async function s(e,r,t,o,a=!1){console.log("Web worker: Executing function locally...");const s=performance.now();try{const c=u.createProgramFromSource(e);if(c instanceof Error)throw"Error creating program from source";const l=c.id();if(!c.hasFunction(r))throw`Program ${l} does not contain function ${r}`;const p=`${l}:${r}`,d=await u.networkClient.getProgramImports(e);if(d instanceof Error)throw"Error getting program imports";if(h!==e){const i=await u.synthesizeKeys(e,r,t,n._q.from_string(o));u.keyProvider.cacheKeys(p,i),h=e}const y=new i.AleoKeyProviderParams({cacheKey:p}),v=await u.run(e,r,t,a,d,y,void 0,void 0,n._q.from_string(o));console.log(`Web worker: Local execution completed in ${performance.now()-s} ms`);const g=v.getOutputs(),b=v.getExecution();let w="";const m=f.getKeys(p);if(m instanceof Error)throw"Could not get verifying key";const _=m[1];return b?((0,n.hz)(b,_,c,"hello"),w=b.toString(),console.log("Execution verified successfully: "+b)):w="",console.log(`Function execution response: ${g}`),{outputs:g,execution:w}}catch(e){return console.error(e),e?e.toString():"Unknown error"}}async function c(){return(new n._q).to_string()}const p={executeOffline:s,getPrivateKey:c};(0,o.Jj)(p),r()}catch(d){r(d)}}),1)},8991:(e,r,t)=>{t.d(r,{Jj:()=>f});const i=Symbol("Comlink.proxy"),o=Symbol("Comlink.endpoint"),n=Symbol("Comlink.releaseProxy"),a=Symbol("Comlink.finalizer"),s=Symbol("Comlink.thrown"),c=e=>"object"==typeof e&&null!==e||"function"==typeof e,l=new Map([["proxy",{canHandle:e=>c(e)&&e[i],serialize(e){const{port1:r,port2:t}=new MessageChannel;return f(e,r),[t,[t]]},deserialize(e){return e.start(),v(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 f(e,r=globalThis,t=["*"]){r.addEventListener("message",(function o(n){if(!n||!n.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,n.origin))return void console.warn(`Invalid origin '${n.origin}' for comlink proxy`);const{id:c,type:l,path:h}=Object.assign({path:[]},n.data),p=(n.data.argumentList||[]).map(m);let d;try{const r=h.slice(0,-1).reduce(((e,r)=>e[r]),e),t=h.reduce(((e,r)=>e[r]),e);switch(l){case"GET":d=t;break;case"SET":r[h.slice(-1)[0]]=m(n.data.value),d=!0;break;case"APPLY":d=t.apply(r,p);break;case"CONSTRUCT":d=function(e){return Object.assign(e,{[i]:!0})}(new t(...p));break;case"ENDPOINT":{const{port1:r,port2:t}=new MessageChannel;f(e,t),d=function(e,r){return b.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,n]=w(t);r.postMessage(Object.assign(Object.assign({},i),{id:c}),n),"RELEASE"===l&&(r.removeEventListener("message",o),u(r),a in e&&"function"==typeof e[a]&&e[a]())})).catch((e=>{const[t,i]=w({value:new TypeError("Unserializable return value"),[s]:0});r.postMessage(Object.assign(Object.assign({},t),{id:c}),i)}))})),r.start&&r.start()}function u(e){(function(e){return"MessagePort"===e.constructor.name})(e)&&e.close()}function h(e){if(e)throw new Error("Proxy has been released and is not useable")}function p(e){return _(e,{type:"RELEASE"}).then((()=>{u(e)}))}const d=new WeakMap,y="FinalizationRegistry"in globalThis&&new FinalizationRegistry((e=>{const r=(d.get(e)||0)-1;d.set(e,r),0===r&&p(e)}));function v(e,r=[],t=function(){}){let i=!1;const a=new Proxy(t,{get(t,o){if(h(i),o===n)return()=>{!function(e){y&&y.unregister(e)}(a),p(e),i=!0};if("then"===o){if(0===r.length)return{then:()=>a};const t=_(e,{type:"GET",path:r.map((e=>e.toString()))}).then(m);return t.then.bind(t)}return v(e,[...r,o])},set(t,o,n){h(i);const[a,s]=w(n);return _(e,{type:"SET",path:[...r,o].map((e=>e.toString())),value:a},s).then(m)},apply(t,n,a){h(i);const s=r[r.length-1];if(s===o)return _(e,{type:"ENDPOINT"}).then(m);if("bind"===s)return v(e,r.slice(0,-1));const[c,l]=g(a);return _(e,{type:"APPLY",path:r.map((e=>e.toString())),argumentList:c},l).then(m)},construct(t,o){h(i);const[n,a]=g(o);return _(e,{type:"CONSTRUCT",path:r.map((e=>e.toString())),argumentList:n},a).then(m)}});return function(e,r){const t=(d.get(r)||0)+1;d.set(r,t),y&&y.register(e,r,e)}(a,e),a}function g(e){const r=e.map(w);return[r.map((e=>e[0])),(t=r.map((e=>e[1])),Array.prototype.concat.apply([],t))];var t}const b=new WeakMap;function w(e){for(const[r,t]of l)if(t.canHandle(e)){const[i,o]=t.serialize(e);return[{type:"HANDLER",name:r,value:i},o]}return[{type:"RAW",value:e},b.get(e)||[]]}function m(e){switch(e.type){case"HANDLER":return l.get(e.name).deserialize(e.value);case"RAW":return e.value}}function _(e,r,t){return new Promise((i=>{const o=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===o&&(e.removeEventListener("message",r),i(t.data))})),e.start&&e.start(),e.postMessage(Object.assign({id:o},r),t)}))}}},s={};function c(e){var r=s[e];if(void 0!==r)return r.exports;var t=s[e]={exports:{}};return a[e](t,t.exports,c),t.exports}c.m=a,c.x=()=>{var e=c.O(void 0,[63],(()=>c(8726)));return e=c.O(e)},e="function"==typeof Symbol?Symbol("webpack queues"):"__webpack_queues__",r="function"==typeof Symbol?Symbol("webpack exports"):"__webpack_exports__",t="function"==typeof Symbol?Symbol("webpack error"):"__webpack_error__",i=e=>{e&&e.d<1&&(e.d=1,e.forEach((e=>e.r--)),e.forEach((e=>e.r--?e.r++:e())))},c.a=(o,n,a)=>{var s;a&&((s=[]).d=-1);var c,l,f,u=new Set,h=o.exports,p=new Promise(((e,r)=>{f=r,l=e}));p[r]=h,p[e]=e=>(s&&e(s),u.forEach(e),p.catch((e=>{}))),o.exports=p,n((o=>{var n;c=(o=>o.map((o=>{if(null!==o&&"object"==typeof o){if(o[e])return o;if(o.then){var n=[];n.d=0,o.then((e=>{a[r]=e,i(n)}),(e=>{a[t]=e,i(n)}));var a={};return a[e]=e=>e(n),a}}var s={};return s[e]=e=>{},s[r]=o,s})))(o);var a=()=>c.map((e=>{if(e[t])throw e[t];return e[r]})),l=new Promise((r=>{(n=()=>r(a)).r=0;var t=e=>e!==s&&!u.has(e)&&(u.add(e),e&&!e.d&&(n.r++,e.push(n)));c.map((r=>r[e](t)))}));return n.r?l:a()}),(e=>(e?f(p[t]=e):l(h),i(s)))),s&&s.d<0&&(s.d=0)},o=[],c.O=(e,r,t,i)=>{if(!r){var n=1/0;for(f=0;f=i)&&Object.keys(c.O).every((e=>c.O[e](r[s])))?r.splice(s--,1):(a=!1,i0&&o[f-1][2]>i;f--)o[f]=o[f-1];o[f]=[r,t,i]},c.d=(e,r)=>{for(var t in r)c.o(r,t)&&!c.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:r[t]})},c.f={},c.e=e=>Promise.all(Object.keys(c.f).reduce(((r,t)=>(c.f[t](e,r),r)),[])),c.u=e=>e+".bundle.js",c.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),c.o=(e,r)=>Object.prototype.hasOwnProperty.call(e,r),(()=>{var e;c.g.importScripts&&(e=c.g.location+"");var r=c.g.document;if(!e&&r&&(r.currentScript&&(e=r.currentScript.src),!e)){var t=r.getElementsByTagName("script");if(t.length)for(var i=t.length-1;i>-1&&!e;)e=t[i--].src}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),c.p=e})(),(()=>{c.b=self.location+"";var e={849:1,798:1};c.f.i=(r,t)=>{e[r]||importScripts(c.p+c.u(r))};var r=self.webpackChunkaleo_website=self.webpackChunkaleo_website||[],t=r.push.bind(r);r.push=r=>{var[i,o,n]=r;for(var a in o)c.o(o,a)&&(c.m[a]=o[a]);for(n&&n(c);i.length;)e[i.pop()]=1;t(r)}})(),n=c.x,c.x=()=>c.e(63).then(n);c.x()})(); -//# sourceMappingURL=849.bundle.js.map \ No newline at end of file diff --git a/849.bundle.js.LICENSE.txt b/849.bundle.js.LICENSE.txt deleted file mode 100644 index 479a8e58b..000000000 --- a/849.bundle.js.LICENSE.txt +++ /dev/null @@ -1,5 +0,0 @@ -/** - * @license - * Copyright 2019 Google LLC - * SPDX-License-Identifier: Apache-2.0 - */ diff --git a/849.bundle.js.map b/849.bundle.js.map deleted file mode 100644 index 2f9d4854a..000000000 --- a/849.bundle.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"849.bundle.js","mappings":";UAAIA,EACAC,EACAC,EACAC,ECHAC,ECAAC,+KCAGC,eAAeC,EAAIC,GACtB,MAAMC,QAAiBC,MAAMF,GAE7B,IAAKC,EAASE,GACV,MAAM,IAAIC,MAAMH,EAASI,OAAS,sBAAwBL,GAG9D,OAAOC,CACX,CAGOH,eAAeQ,EAAKN,EAAmBO,GAC1CA,EAAQC,OAAS,OAEjB,MAAMP,QAAiBC,MAAMF,EAAKO,GAElC,IAAKN,EAASE,GACV,MAAM,IAAIC,MAAMH,EAASI,OAAS,uBAAyBL,GAG/D,OAAOC,CACX,CCMA,MAAMQ,EACJC,KACAC,QAEAC,WAAAA,CAAYF,GACVG,KAAKH,KAAOA,EAAO,YAWrBI,UAAAA,CAAWH,GACTE,KAAKF,QAAUA,EASjBI,UAAAA,GACE,OAAOF,KAAKF,QASdK,OAAAA,CAAQN,GACNG,KAAKH,KAAOA,EAAO,YAGrB,eAAMO,CACFjB,EAAM,KAER,IACE,MAAMC,QAAiBF,EAAIc,KAAKH,KAAOV,GACvC,aAAaC,EAASiB,MACvB,CAAC,MAAOC,GACP,MAAM,IAAIf,MAAM,uBACjB,EA0BH,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,O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4D,EAAIC,KAAKP,SAAW,GAIxC,IAAIQ,EAAkB,CACrB,IAAK,EACL,IAAK,GAgBN9D,EAAoB2C,EAAE3Z,EAAI,CAAC4Z,EAASE,KAE/BgB,EAAgBlB,IAElBS,cAAcrD,EAAoBvB,EAAIuB,EAAoB+C,EAAEH,GAE9D,EAGD,IAAImB,EAAqBF,KAA+B,yBAAIA,KAA+B,0BAAK,GAC5FG,EAA6BD,EAAmBpZ,KAAK+T,KAAKqF,GAC9DA,EAAmBpZ,KAvBCuD,IACnB,IAAK8T,EAAUiC,EAAaC,GAAWhW,EACvC,IAAI,IAAI+R,KAAYgE,EAChBjE,EAAoBwC,EAAEyB,EAAahE,KACrCD,EAAoBM,EAAEL,GAAYgE,EAAYhE,IAIhD,IADGiE,GAASA,EAAQlE,GACdgC,EAAS/Y,QACd6a,EAAgB9B,EAASmC,OAAS,EACnCH,EAA2B9V,EAAK,MfpB7BlI,EAAOga,EAAoBO,EAC/BP,EAAoBO,EAAI,IAChBP,EAAoBhO,EAAE,IAAI+K,KAAK/W,GgBDbga,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(63).then(next);\n};","export async function get(url: URL | string) {\n const response = await fetch(url);\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\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 account: Account | undefined;\n\n constructor(host: string) {\n this.host = host + \"/testnet3\";\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 + \"/testnet3\";\n }\n\n async fetchData(\n url = \"/\",\n ): Promise {\n try {\n const response = await get(this.host + url);\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 /**\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: {\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, ProgramImports }\n","import { ProvingKey, VerifyingKey, CREDITS_PROGRAM_KEYS, KEY_STORE, PRIVATE_TRANSFER, PRIVATE_TO_PUBLIC_TRANSFER, PUBLIC_TRANSFER, PUBLIC_TO_PRIVATE_TRANSFER} 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 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}) {\n this.proverUri = params.proverUri;\n this.verifierUri = params.verifierUri;\n this.cacheKey = params.cacheKey;\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 /**\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 * const AleoProviderParams = new AleoProviderParams(\"https://testnet3.parameters.aleo.org/transfer_private.\");\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 (\"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.fetchKeys(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://vm.aleo.org/api\", 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(\"https://testnet3.parameters.aleo.org/transfer_private.prover.2a9a6f2\", \"https://testnet3.parameters.aleo.org/transfer_private.verifier.3a59762\");\n */\n async fetchKeys(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 bondPublicKeys(): Promise {\n return this.fetchKeys(CREDITS_PROGRAM_KEYS.bond_public.prover, CREDITS_PROGRAM_KEYS.bond_public.verifier, CREDITS_PROGRAM_KEYS.bond_public.locator)\n }\n\n claimUnbondPublicKeys(): Promise {\n return this.fetchKeys(CREDITS_PROGRAM_KEYS.claim_unbond_public.prover, CREDITS_PROGRAM_KEYS.claim_unbond_public.verifier, CREDITS_PROGRAM_KEYS.claim_unbond_public.locator)\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://vm.aleo.org/api\");\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://vm.aleo.org/api\", 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.fetchKeys(CREDITS_PROGRAM_KEYS.transfer_private.prover, CREDITS_PROGRAM_KEYS.transfer_private.verifier, CREDITS_PROGRAM_KEYS.transfer_private.locator);\n } else if (PRIVATE_TO_PUBLIC_TRANSFER.has(visibility)) {\n return await this.fetchKeys(CREDITS_PROGRAM_KEYS.transfer_private_to_public.prover, CREDITS_PROGRAM_KEYS.transfer_private_to_public.verifier, CREDITS_PROGRAM_KEYS.transfer_private_to_public.locator);\n } else if (PUBLIC_TRANSFER.has(visibility)) {\n return await this.fetchKeys(CREDITS_PROGRAM_KEYS.transfer_public.prover, CREDITS_PROGRAM_KEYS.transfer_public.verifier, CREDITS_PROGRAM_KEYS.transfer_public.locator);\n } else if (PUBLIC_TO_PRIVATE_TRANSFER.has(visibility)) {\n return await this.fetchKeys(CREDITS_PROGRAM_KEYS.transfer_public_to_private.prover, CREDITS_PROGRAM_KEYS.transfer_public_to_private.verifier, CREDITS_PROGRAM_KEYS.transfer_public_to_private.locator);\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.fetchKeys(CREDITS_PROGRAM_KEYS.join.prover, CREDITS_PROGRAM_KEYS.join.verifier, CREDITS_PROGRAM_KEYS.join.locator);\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.fetchKeys(CREDITS_PROGRAM_KEYS.split.prover, CREDITS_PROGRAM_KEYS.split.verifier, CREDITS_PROGRAM_KEYS.split.locator);\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.fetchKeys(CREDITS_PROGRAM_KEYS.fee_private.prover, CREDITS_PROGRAM_KEYS.fee_private.verifier, CREDITS_PROGRAM_KEYS.fee_private.locator);\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.fetchKeys(CREDITS_PROGRAM_KEYS.fee_public.prover, CREDITS_PROGRAM_KEYS.fee_public.verifier, CREDITS_PROGRAM_KEYS.fee_public.locator);\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.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_to_private.verifier:\n return CREDITS_PROGRAM_KEYS.transfer_public_to_private.verifyingKey();\n case CREDITS_PROGRAM_KEYS.unbond_delegator_as_validator.verifier:\n return CREDITS_PROGRAM_KEYS.unbond_delegator_as_validator.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.fetchKeys(CREDITS_PROGRAM_KEYS.unbond_public.prover, CREDITS_PROGRAM_KEYS.unbond_public.verifier, CREDITS_PROGRAM_KEYS.unbond_public.locator);\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 \"@aleohq/wasm/dist/crates/aleo_wasm\";\n\n// TODO put this somewhere where it makes more sense\ninterface ExecutionParams {\n programName?: string;\n functionName?: string;\n fee?: number;\n privateFee?: boolean;\n recordSearchParams?: any;\n keySearchParams?: any;\n feeRecord?: any;\n provingKey?: any;\n verifyingKey?: any;\n privateKey?: any;\n}\ninterface OfflineParams {\n offlineQuery?: OfflineQuery\n}\ninterface Options {\n offlineParams?: OfflineParams;\n executionParams?: ExecutionParams;\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 if (!host) {\n this.host = \"https://api.explorer.aleo.org/v1\";\n this.networkClient = new AleoNetworkClient(this.host);\n } else {\n this.host = host;\n this.networkClient = new AleoNetworkClient(host);\n }\n\n if (!keyProvider) {\n this.keyProvider = new AleoKeyProvider();\n } else {\n this.keyProvider = keyProvider;\n }\n\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 * Build an execution transaction for later submission to the Aleo network.\n *\n * @param {string} programName Program name containing the function to be executed\n * @param {string} functionName Function name to execute\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 {string[]} inputs Inputs to the function\n * @param {RecordSearchParams} recordSearchParams Optional parameters for searching for a record to pay the fee for\n * the execution transaction\n * @param {KeySearchParams} keySearchParams Optional parameters for finding the matching proving & verifying keys\n * for the function\n * @param {string | RecordPlaintext | undefined} feeRecord Optional Fee record to use for the transaction\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 * @param {string | Program | undefined} program Optional program source code to use for the transaction\n * @param {ProgramImports} imports Programs that the program being executed imports\n * @returns {Promise}\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://vm.aleo.org/api\");\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 programName = \"hello_hello.aleo\";\n * const programManager = new ProgramManager(\"https://vm.aleo.org/api\", keyProvider, recordProvider);\n * const keySearchParams = { \"cacheKey\": \"hello_hello:hello\" };\n * const transaction = await programManager.execute(programName, \"hello_hello\", 0.020, [\"5u32\", \"5u32\"], undefined, undefined, undefined, keySearchParams);\n * const result = await programManager.networkClient.submitTransaction(transaction);\n */\n async buildExecutionTransaction(\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 ): Promise {\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 * Execute an Aleo program on the Aleo network\n *\n * @param {string} programName Program name containing the function to be executed\n * @param {string} functionName Function name to execute\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 {string[]} inputs Inputs to the function\n * @param {RecordSearchParams} recordSearchParams Optional parameters for searching for a record to pay the fee for\n * the execution transaction\n * @param {KeySearchParams} keySearchParams Optional parameters for finding the matching proving & verifying keys\n * for the function\n * @param {string | RecordPlaintext | undefined} feeRecord Optional Fee record to use for the transaction\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 * // Create a new NetworkClient, KeyProvider, and RecordProvider using official Aleo record, key, and network providers\n * const networkClient = new AleoNetworkClient(\"https://vm.aleo.org/api\");\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 programName = \"hello_hello.aleo\";\n * const programManager = new ProgramManager(\"https://vm.aleo.org/api\", keyProvider, recordProvider);\n * const keySearchParams = { \"cacheKey\": \"hello_hello:hello\" };\n * const tx_id = await programManager.execute(programName, \"hello_hello\", 0.020, [\"5u32\", \"5u32\"], undefined, undefined, undefined, keySearchParams);\n * const transaction = await programManager.networkClient.getTransaction(tx_id);\n */\n async execute(\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 ): Promise {\n const tx = await this.buildExecutionTransaction(programName, functionName, fee, privateFee, inputs, recordSearchParams, keySearchParams, feeRecord, provingKey, verifyingKey, privateKey, offlineQuery, program);\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 '@aleohq/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.executeOffline(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://vm.aleo.org/api\");\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://vm.aleo.org/api\", 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://vm.aleo.org/api\");\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://vm.aleo.org/api\", 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 * @example\n * // Create a new NetworkClient, KeyProvider, and RecordProvider\n * const networkClient = new AleoNetworkClient(\"https://vm.aleo.org/api\");\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://vm.aleo.org/api\", 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 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 * 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://vm.aleo.org/api\");\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://vm.aleo.org/api\", 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 staking committee 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\n * const tx_id = await programManager.bondPublic(\"aleo1rhgdu77hgyqd3xjj8ucu3jj9r2krwz6mnzyd80gncr5fxcwlh5rsvzp9px\", 2000000);\n *\n * @returns string\n * @param {string} 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 {number} amount The amount of credits to bond\n * @param {Options} options Options for the execution\n */\n async buildBondPublicTransaction(address: string, amount: number, options: Options = {}) {\n amount = Math.trunc(amount*1000000);\n\n const {\n offlineParams = {},\n executionParams = {}\n } = options || {};\n\n let {\n programName = \"credits.aleo\",\n functionName = \"bond_public\",\n fee = executionParams?.fee || 0.86,\n privateFee = false,\n recordSearchParams,\n keySearchParams,\n feeRecord,\n provingKey,\n verifyingKey,\n privateKey\n } = executionParams;\n\n if (keySearchParams === undefined) {\n keySearchParams = new AleoKeyProviderParams(\n {\n proverUri: CREDITS_PROGRAM_KEYS.bond_public.prover,\n verifierUri: CREDITS_PROGRAM_KEYS.bond_public.verifier,\n cacheKey: \"credits.aleo/bond_public\"\n });\n }\n\n const {\n offlineQuery,\n } = offlineParams;\n\n return await this.buildExecutionTransaction(programName, functionName, fee, privateFee, [address, `${amount.toString()}u64`], recordSearchParams, keySearchParams, feeRecord, provingKey, verifyingKey, privateKey, offlineQuery, this.creditsProgram());\n }\n\n /**\n * Bond credits to a staking committee\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(\"aleo1rhgdu77hgyqd3xjj8ucu3jj9r2krwz6mnzyd80gncr5fxcwlh5rsvzp9px\", 2000000);\n *\n * @returns string\n * @param {string} 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 {number} amount The amount of credits to bond\n * @param {Options} options Options for the execution\n */\n async bondPublic(address: string, amount: number, options: Options = {}) {\n const tx = await this.buildBondPublicTransaction(address, amount, options);\n return await this.networkClient.submitTransaction(tx);\n }\n\n /**\n * Build a transaction to unbond a specified amount of staked credits to be used later\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.unbondPublic(10);\n *\n * @returns string\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 {Options} options Options for the execution\n */\n async buildUnbondPublicTransaction(amount: number, options: Options = {}): Promise {\n amount = Math.trunc(amount*1000000);\n\n const {\n offlineParams = {},\n executionParams = {}\n } = options || {};\n\n let {\n programName = \"credits.aleo\",\n functionName = \"unbond_public\",\n fee = executionParams?.fee || 1.3,\n privateFee = false,\n recordSearchParams,\n keySearchParams,\n feeRecord,\n provingKey,\n verifyingKey,\n privateKey\n } = executionParams;\n\n if (keySearchParams === undefined) {\n keySearchParams = new AleoKeyProviderParams(\n {\n proverUri: CREDITS_PROGRAM_KEYS.unbond_public.prover,\n verifierUri: CREDITS_PROGRAM_KEYS.unbond_public.verifier,\n cacheKey: \"credits.aleo/unbond_public\"\n });\n }\n\n const {\n offlineQuery,\n } = offlineParams;\n\n return this.buildExecutionTransaction(programName, functionName, fee, privateFee, [`${amount.toString()}u64`], recordSearchParams, keySearchParams, feeRecord, provingKey, verifyingKey, privateKey, offlineQuery, this.creditsProgram());\n }\n\n /**\n * Unbond a specified amount of staked credits to be used later\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.unbondPublic(10);\n *\n * @returns string\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 {Options} options Options for the execution\n */\n async unbondPublic(amount: number, options: Options = {}): Promise {\n const tx = await this.buildUnbondPublicTransaction(amount, options);\n return await this.networkClient.submitTransaction(tx);\n }\n\n /**\n * Build a transaction to Claim unbonded credits for later submission. If credits have been unbonded by the account\n * executing this function, this method will 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();\n *\n * @returns string\n * @param {Options} options\n */\n async buildClaimUnbondPublicTransaction(options: Options = {}): Promise {\n const {\n offlineParams = {},\n executionParams = {}\n } = options || {};\n\n let {\n programName = \"credits.aleo\",\n functionName = \"claim_unbond_public\",\n fee = executionParams?.fee || 2,\n privateFee = false,\n recordSearchParams,\n keySearchParams,\n feeRecord,\n provingKey,\n verifyingKey,\n privateKey\n } = executionParams;\n\n if (keySearchParams === undefined) {\n keySearchParams = new AleoKeyProviderParams(\n {\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 }\n\n const {\n offlineQuery,\n } = offlineParams;\n\n return await this.buildExecutionTransaction(programName, functionName, fee, privateFee, [], recordSearchParams, keySearchParams, feeRecord, provingKey, verifyingKey, privateKey, offlineQuery, this.creditsProgram());\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();\n *\n * @returns string\n * @param {Options} options\n */\n async claimUnbondPublic(options: Options = {}): Promise {\n const tx = await this.buildClaimUnbondPublicTransaction(options);\n return await this.networkClient.submitTransaction(tx);\n }\n\n /**\n * Set Validator State\n * @returns string\n * @param {boolean} validator_state\n * @param options\n */\n async setValidatorState(validator_state: boolean, options: Options = {}) {\n const {\n offlineParams = {},\n executionParams = {}\n } = options || {};\n\n let {\n programName = \"credits.aleo\",\n functionName = \"set_validator_state\",\n fee = 1,\n privateFee = false,\n recordSearchParams,\n keySearchParams,\n feeRecord,\n provingKey,\n verifyingKey,\n privateKey\n } = executionParams;\n\n if (keySearchParams === undefined) {\n keySearchParams = new AleoKeyProviderParams(\n {\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 }\n\n const {\n offlineQuery,\n } = offlineParams;\n\n return await this.execute(programName, functionName, fee, privateFee, [validator_state.toString()], recordSearchParams, keySearchParams, feeRecord, provingKey, verifyingKey, privateKey, offlineQuery);\n }\n\n /**\n * Unbond Delegator As Validator\n * @returns string\n * @param {string} address\n * @param options\n */\n async unbondDelegatorAsValidator(address:string, options: Options = {}) {\n const {\n offlineParams = {},\n executionParams = {}\n } = options || {};\n\n let {\n programName = \"credits.aleo\",\n functionName = \"unbond_delegator_as_validator\",\n fee = 1,\n privateFee = false,\n recordSearchParams,\n keySearchParams,\n feeRecord,\n provingKey,\n verifyingKey,\n privateKey\n } = executionParams;\n\n if (keySearchParams === undefined) {\n keySearchParams = new AleoKeyProviderParams(\n {\n proverUri: CREDITS_PROGRAM_KEYS.unbond_delegator_as_validator.prover,\n verifierUri: CREDITS_PROGRAM_KEYS.unbond_delegator_as_validator.verifier,\n cacheKey: \"credits.aleo/unbond_delegator_as_validator\"\n });\n }\n\n const {\n offlineQuery,\n } = offlineParams;\n\n return await this.execute(programName, functionName, fee, privateFee, [address], recordSearchParams, keySearchParams, feeRecord, provingKey, verifyingKey, privateKey, offlineQuery);\n }\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} from \"@aleohq/wasm\";\nconst KEY_STORE = \"https://testnet3.parameters.aleo.org/\";\n\nconst CREDITS_PROGRAM_KEYS = {\n bond_public: {\n locator: \"credits.aleo/bond_public\",\n prover: KEY_STORE + \"bond_public.prover.9c3547d\",\n verifier: \"bond_public.verifier.10315ae\",\n verifyingKey: VerifyingKey.bondPublicVerifier\n },\n claim_unbond_public: {\n locator: \"credits.aleo/claim_unbond_public\",\n prover: KEY_STORE + \"claim_unbond_public.prover.f8b64aa\",\n verifier: \"claim_unbond_public.verifier.8fd7445\",\n verifyingKey: VerifyingKey.claimUnbondPublicVerifier\n },\n fee_private: {\n locator: \"credits.aleo/fee_private\",\n prover: KEY_STORE + \"fee_private.prover.43fab98\",\n verifier: \"fee_private.verifier.f3dfefc\",\n verifyingKey: VerifyingKey.feePrivateVerifier\n },\n fee_public: {\n locator: \"credits.aleo/fee_public\",\n prover: KEY_STORE + \"fee_public.prover.634f153\",\n verifier: \"fee_public.verifier.09eeb4f\",\n verifyingKey: VerifyingKey.feePublicVerifier\n },\n inclusion: {\n locator: \"inclusion\",\n prover: KEY_STORE + \"inclusion.prover.cd85cc5\",\n verifier: \"inclusion.verifier.e6f3add\",\n verifyingKey: VerifyingKey.inclusionVerifier\n },\n join: {\n locator: \"credits.aleo/join\",\n prover: KEY_STORE + \"join.prover.1a76fe8\",\n verifier: \"join.verifier.4f1701b\",\n verifyingKey: VerifyingKey.joinVerifier\n },\n set_validator_state: {\n locator: \"credits.aleo/set_validator_state\",\n prover: KEY_STORE + \"set_validator_state.prover.5ce19be\",\n verifier: \"set_validator_state.verifier.730d95b\",\n verifyingKey: VerifyingKey.setValidatorStateVerifier\n },\n split: {\n locator: \"credits.aleo/split\",\n prover: KEY_STORE + \"split.prover.e6d12b9\",\n verifier: \"split.verifier.2f9733d\",\n verifyingKey: VerifyingKey.splitVerifier\n },\n transfer_private: {\n locator: \"credits.aleo/transfer_private\",\n prover: KEY_STORE + \"transfer_private.prover.2b487c0\",\n verifier: \"transfer_private.verifier.3a3cbba\",\n verifyingKey: VerifyingKey.transferPrivateVerifier\n },\n transfer_private_to_public: {\n locator: \"credits.aleo/transfer_private_to_public\",\n prover: KEY_STORE + \"transfer_private_to_public.prover.1ff64cb\",\n verifier: \"transfer_private_to_public.verifier.d5b60de\",\n verifyingKey: VerifyingKey.transferPrivateToPublicVerifier\n },\n transfer_public: {\n locator: \"credits.aleo/transfer_public\",\n prover: KEY_STORE + \"transfer_public.prover.a74565e\",\n verifier: \"transfer_public.verifier.a4c2906\",\n verifyingKey: VerifyingKey.transferPublicVerifier\n },\n transfer_public_to_private: {\n locator: \"credits.aleo/transfer_public_to_private\",\n prover: KEY_STORE + \"transfer_public_to_private.prover.1bcddf9\",\n verifier: \"transfer_public_to_private.verifier.b094554\",\n verifyingKey: VerifyingKey.transferPublicToPrivateVerifier\n },\n unbond_delegator_as_validator: {\n locator: \"credits.aleo/unbond_delegator_as_validator\",\n prover: KEY_STORE + \"unbond_delegator_as_validator.prover.115a86b\",\n verifier: \"unbond_delegator_as_validator.verifier.9585609\",\n verifyingKey: VerifyingKey.unbondDelegatorAsValidatorVerifier\n },\n unbond_public: {\n locator: \"credits.aleo/unbond_public\",\n prover: KEY_STORE + \"unbond_public.prover.9547c05\",\n verifier: \"unbond_public.verifier.09873cd\",\n verifyingKey: VerifyingKey.unbondPublicVerifier\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 \"public\",\n \"transferPublic\",\n \"transfer_public_to_private\",\n \"publicToPrivate\",\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_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 \"@aleohq/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 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_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 executeOffline: (\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 executeOffline(\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 = { executeOffline, 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, [63], () => (__webpack_require__(8726)))\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\t849: 1,\n\t798: 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","response","fetch","ok","Error","status","post","options","method","AleoNetworkClient","host","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","headers","message","AleoKeyProviderParams","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","fetchKeys","getVerifyingKey","bondPublicKeys","CREDITS_PROGRAM_KEYS","bond_public","prover","verifier","locator","claimUnbondPublicKeys","claim_unbond_public","transferKeys","visibility","PRIVATE_TRANSFER","transfer_private","PRIVATE_TO_PUBLIC_TRANSFER","transfer_private_to_public","PUBLIC_TRANSFER","transfer_public","PUBLIC_TO_PRIVATE_TRANSFER","transfer_public_to_private","joinKeys","join","splitKeys","split","feePrivateKeys","fee_private","feePublicKeys","fee_public","inclusion","set_validator_state","unbond_delegator_as_validator","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","keyPair","synthesizeKeyPair","buildTransferTransaction","amount","recipient","transferType","validateTransferType","transferProvingKey","transferVerifyingKey","requiresAmountRecord","buildTransferPublicTransaction","transfer","buildBondPublicTransaction","address","Math","trunc","offlineParams","executionParams","creditsProgram","bondPublic","buildUnbondPublicTransaction","unbondPublic","buildClaimUnbondPublicTransaction","claimUnbondPublic","setValidatorState","validator_state","unbondDelegatorAsValidator","verifyExecution","executionResponse","getExecution","getFunctionId","verifyFunctionExecution","createProgramFromSource","getCreditsProgram","verifyProgram","findCreditsRecord","PRIVATE_TRANSFER_TYPES","VALID_TRANSFER_TYPES","bondPublicVerifier","claimUnbondPublicVerifier","feePrivateVerifier","feePublicVerifier","inclusionVerifier","joinVerifier","setValidatorStateVerifier","splitVerifier","transferPrivateVerifier","transferPrivateToPublicVerifier","transferPublicVerifier","transferPublicToPrivateVerifier","unbondDelegatorAsValidatorVerifier","unbondPublicVerifier","Set","initThreadPool","defaultHost","programManager","lastLocalProgram","executeOffline","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","name","stack","Object","assign","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/933.bundle.js b/933.bundle.js index 5a00ce56e..25150acca 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+"1a0284815ba528021375.js"},5934:(_,t,e)=>{_.exports=e.p+"4077cd2c61f1662ef9e3.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__h927aa242fc71dbdb(_,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__hbf3e91360cbaa199(_,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_call_b3ca7c6051f9bec1=function(){return S((function(_,t,e){return g(i(_).call(i(t),i(e)))}),arguments)},_.wbg.__wbindgen_bigint_from_u64=function(_){return g(BigInt.asUintN(64,_))},_.wbg.__wbg_transaction_new=function(_){return g(k_.__wrap(_))},_.wbg.__wbg_executionresponse_new=function(_){return g(X.__wrap(_))},_.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_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_wrapper5762=function(_,t,e){return g(u(_,t,538,f))},_.wbg.__wbindgen_closure_wrapper5787=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+"bd1596cd75301fef51e7.js"},5934:(_,t,e)=>{_.exports=e.p+"108f2867fde2069b7ac6.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 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_transaction_new=function(_){return g(k_.__wrap(_))},_.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_bigint_from_u64=function(_){return g(BigInt.asUintN(64,_))},_.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_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_executionresponse_new=function(_){return g(X.__wrap(_))},_.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(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 cd0bcfae6..ea471d2f0 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,EAAQC,GAClC,OAAO,IAAIC,SAASC,IAChB,MAAMC,EAAS,IAAIC,OAAOP,EAAK,CAC3BQ,KAAM,WAGVF,EAAOG,iBAAiB,WAAYC,IAGhCC,YAAW,KACPN,EAAQC,GAIJA,EAA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WAACC,EAAU,WAAEC,EAAU,eAAEC,GAAkBH,EAE3CI,EAAaP,GAiBjB,OAfkB,MAAdK,IACAE,EAAaF,EAAa,YAAY9qB,KAAKgrB,GAAY,IAGzC,MAAdH,IACAG,EAAaH,EAAWG,IAGN,MAAlBD,QACMA,EAAevH,EAAYwH,SAG3BxH,EAAWwH,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__h927aa242fc71dbdb(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__hbf3e91360cbaa199(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_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.__wbindgen_bigint_from_u64 = function(arg0) {\n const ret = BigInt.asUintN(64, 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_executionresponse_new = function(arg0) {\n const ret = ExecutionResponse.__wrap(arg0);\n return addHeapObject(ret);\n };\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_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_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_wrapper5762 = function(arg0, arg1, arg2) {\n const ret = makeMutClosure(arg0, arg1, 538, __wbg_adapter_34);\n return addHeapObject(ret);\n };\n imports.wbg.__wbindgen_closure_wrapper5787 = 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__h927aa242fc71dbdb","_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__hbf3e91360cbaa199","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_call_b3ca7c6051f9bec1","__wbindgen_bigint_from_u64","__wbg_transaction_new","Transaction$1","__wbg_executionresponse_new","ExecutionResponse$1","__wbg_log_0159ca40cddf5b15","log","__wbg_newwithlength_66ae46612e7f0234","__wbg_set_d4638f722068f043","__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_wrapper5762","__wbindgen_closure_wrapper5787","__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,G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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_279(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 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_transaction_new = function(arg0) {\n const ret = Transaction.__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_keypair_new = function(arg0) {\n const ret = KeyPair.__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.__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_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_executionresponse_new = function(arg0) {\n const ret = ExecutionResponse.__wrap(arg0);\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_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__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_279","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","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_transaction_new","Transaction$1","__wbg_call_b3ca7c6051f9bec1","__wbg_keypair_new","__wbindgen_bigint_from_u64","__wbindgen_module","__wbg_init","__wbindgen_wasm_module","__wbindgen_memory","__wbg_spawnWorker_f6acaddb2e29dc4a","__wbg_log_0159ca40cddf5b15","log","__wbg_newwithlength_66ae46612e7f0234","__wbg_set_d4638f722068f043","__wbg_executionresponse_new","ExecutionResponse$1","__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/1a0284815ba528021375.js b/bd1596cd75301fef51e7.js similarity index 97% rename from 1a0284815ba528021375.js rename to bd1596cd75301fef51e7.js index 74f12ba8a..9adde19cb 100644 --- a/1a0284815ba528021375.js +++ b/bd1596cd75301fef51e7.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__h927aa242fc71dbdb(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_call_b3ca7c6051f9bec1=function(){return x((function(_,t,r){return c(e(_).call(e(t),e(r)))}),arguments)},t.wbg.__wbindgen_bigint_from_u64=function(_){return c(BigInt.asUintN(64,_))},t.wbg.__wbg_transaction_new=function(_){return c(r_.__wrap(_))},t.wbg.__wbg_executionresponse_new=function(_){return c(O.__wrap(_))},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_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__hbf3e91360cbaa199(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_wrapper5762=function(_,t,e){return c(m(_,t,538,h))},t.wbg.__wbindgen_closure_wrapper5787=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 +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/c65a205fb6c9a1c6018a.js b/c65a205fb6c9a1c6018a.js deleted file mode 100644 index 5ec4bedcd..000000000 --- a/c65a205fb6c9a1c6018a.js +++ /dev/null @@ -1 +0,0 @@ -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 w=0;const g="undefined"!=typeof TextEncoder?new TextEncoder("utf-8"):{encode:()=>{throw Error("TextEncoder not available")}},b=function(_,t){const e=g.encode(_);return t.set(e),{read:_.length,written:e.length}};function d(_,t,e){if(void 0===e){const e=g.encode(_),r=t(e.length,1)>>>0;return a().subarray(r,r+e.length).set(e),w=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+=b(_,t).written}return w=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}function y(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):i.a=e}};return o.original=i,o}function m(t,e,r){_.wasm_bindgen__convert__closures__invoke1_mut__h53d50e21bb2d5c71(t,e,c(r))}function h(_,t){if(!(_ instanceof t))throw new Error(`expected instance of ${t.name}`);return _.ptr}function v(_,t){const e=t(1*_.length,1)>>>0;return a().set(_,e/1),w=_.length,e}let k=null;function P(){return null!==k&&k.buffer===_.memory.buffer||(k=new BigInt64Array(_.memory.buffer)),k}function S(_,t){return _>>>=0,a().subarray(_/1,_/1+t)}function V(t,e){try{return t.apply(this,e)}catch(t){_.__wbindgen_exn_store(c(t))}}class x{static __wrap(_){_>>>=0;const t=Object.create(x.prototype);return t.__wbg_ptr=_,t}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,_}free(){const t=this.__destroy_into_raw();_.__wbg_address_free(t)}static from_private_key(t){h(t,E);const e=_.address_from_private_key(t.__wbg_ptr);return x.__wrap(e)}static from_view_key(t){h(t,W);const e=_.address_from_view_key(t.__wbg_ptr);return x.__wrap(e)}static from_string(t){const e=d(t,_.__wbindgen_malloc,_.__wbindgen_realloc),r=w,n=_.address_from_string(e,r);return x.__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=v(t,_.__wbindgen_malloc),n=w;h(e,C);return 0!==_.address_verify(this.__wbg_ptr,r,n,e.__wbg_ptr)}}class T{static __wrap(_){_>>>=0;const t=Object.create(T.prototype);return t.__wbg_ptr=_,t}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,_}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=d(t,_.__wbindgen_malloc,_.__wbindgen_realloc),a=w;_.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 T.__wrap(e)}finally{_.__wbindgen_add_to_stack_pointer(16)}}}class A{static __wrap(_){_>>>=0;const t=Object.create(A.prototype);return t.__wbg_ptr=_,t}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,_}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:T.__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 O.__wrap(t)}finally{_.__wbindgen_add_to_stack_pointer(16)}}getProvingKey(){const t=_.executionresponse_getProvingKey(this.__wbg_ptr);return 0===t?void 0:R.__wrap(t)}getVerifyingKey(){const t=_.executionresponse_getVerifyingKey(this.__wbg_ptr);return D.__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 I.__wrap(t)}}class F{static __wrap(_){_>>>=0;const t=Object.create(F.prototype);return t.__wbg_ptr=_,t}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,_}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=d(t,_.__wbindgen_malloc,_.__wbindgen_realloc),a=w;_.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 F.__wrap(e)}finally{_.__wbindgen_add_to_stack_pointer(16)}}}class O{static __wrap(_){_>>>=0;const t=Object.create(O.prototype);return t.__wbg_ptr=_,t}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,_}free(){const t=this.__destroy_into_raw();_.__wbg_keypair_free(t)}constructor(t,e){h(t,R);var r=t.__destroy_into_raw();h(e,D);var n=e.__destroy_into_raw();const i=_.keypair_new(r,n);return O.__wrap(i)}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 R.__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 D.__wrap(t)}finally{_.__wbindgen_add_to_stack_pointer(16)}}}class j{static __wrap(_){_>>>=0;const t=Object.create(j.prototype);return t.__wbg_ptr=_,t}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,_}free(){const t=this.__destroy_into_raw();_.__wbg_offlinequery_free(t)}constructor(t){try{const i=_.__wbindgen_add_to_stack_pointer(-16),o=d(t,_.__wbindgen_malloc,_.__wbindgen_realloc),a=w;_.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 j.__wrap(e)}finally{_.__wbindgen_add_to_stack_pointer(16)}}addStatePath(t,e){try{const i=_.__wbindgen_add_to_stack_pointer(-16),o=d(t,_.__wbindgen_malloc,_.__wbindgen_realloc),a=w,s=d(e,_.__wbindgen_malloc,_.__wbindgen_realloc),c=w;_.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=d(t,_.__wbindgen_malloc,_.__wbindgen_realloc),a=w;_.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 j.__wrap(e)}finally{_.__wbindgen_add_to_stack_pointer(16)}}}class E{static __wrap(_){_>>>=0;const t=Object.create(E.prototype);return t.__wbg_ptr=_,t}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,_}free(){const t=this.__destroy_into_raw();_.__wbg_privatekey_free(t)}constructor(){const t=_.privatekey_new();return E.__wrap(t)}static from_seed_unchecked(t){const e=v(t,_.__wbindgen_malloc),r=w,n=_.privatekey_from_seed_unchecked(e,r);return E.__wrap(n)}static from_string(t){try{const i=_.__wbindgen_add_to_stack_pointer(-16),o=d(t,_.__wbindgen_malloc,_.__wbindgen_realloc),a=w;_.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 E.__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 W.__wrap(t)}to_address(){const t=_.address_from_private_key(this.__wbg_ptr);return x.__wrap(t)}sign(t){const e=v(t,_.__wbindgen_malloc),r=w,n=_.privatekey_sign(this.__wbg_ptr,e,r);return C.__wrap(n)}static newEncrypted(t){try{const i=_.__wbindgen_add_to_stack_pointer(-16),o=d(t,_.__wbindgen_malloc,_.__wbindgen_realloc),a=w;_.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 U.__wrap(e)}finally{_.__wbindgen_add_to_stack_pointer(16)}}toCiphertext(t){try{const i=_.__wbindgen_add_to_stack_pointer(-16),o=d(t,_.__wbindgen_malloc,_.__wbindgen_realloc),a=w;_.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 U.__wrap(e)}finally{_.__wbindgen_add_to_stack_pointer(16)}}static fromPrivateKeyCiphertext(t,e){try{const o=_.__wbindgen_add_to_stack_pointer(-16);h(t,U);const a=d(e,_.__wbindgen_malloc,_.__wbindgen_realloc),s=w;_.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 E.__wrap(r)}finally{_.__wbindgen_add_to_stack_pointer(16)}}}class U{static __wrap(_){_>>>=0;const t=Object.create(U.prototype);return t.__wbg_ptr=_,t}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,_}free(){const t=this.__destroy_into_raw();_.__wbg_privatekeyciphertext_free(t)}static encryptPrivateKey(t,e){try{const o=_.__wbindgen_add_to_stack_pointer(-16);h(t,E);const a=d(e,_.__wbindgen_malloc,_.__wbindgen_realloc),s=w;_.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 U.__wrap(r)}finally{_.__wbindgen_add_to_stack_pointer(16)}}decryptToPrivateKey(t){try{const i=_.__wbindgen_add_to_stack_pointer(-16),o=d(t,_.__wbindgen_malloc,_.__wbindgen_realloc),a=w;_.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 E.__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=d(t,_.__wbindgen_malloc,_.__wbindgen_realloc),a=w;_.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 U.__wrap(e)}finally{_.__wbindgen_add_to_stack_pointer(16)}}}class I{static __wrap(_){_>>>=0;const t=Object.create(I.prototype);return t.__wbg_ptr=_,t}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,_}free(){const t=this.__destroy_into_raw();_.__wbg_program_free(t)}static fromString(t){try{const i=_.__wbindgen_add_to_stack_pointer(-16),o=d(t,_.__wbindgen_malloc,_.__wbindgen_realloc),a=w;_.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 I.__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=d(t,_.__wbindgen_malloc,_.__wbindgen_realloc),r=w;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=d(t,_.__wbindgen_malloc,_.__wbindgen_realloc),a=w;_.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=d(t,_.__wbindgen_malloc,_.__wbindgen_realloc),a=w;_.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=d(t,_.__wbindgen_malloc,_.__wbindgen_realloc),a=w;_.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 I.__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)}}isEqual(t){h(t,I);return 0!==_.program_isEqual(this.__wbg_ptr,t.__wbg_ptr)}getImports(){return n(_.program_getImports(this.__wbg_ptr))}}class R{static __wrap(_){_>>>=0;const t=Object.create(R.prototype);return t.__wbg_ptr=_,t}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,_}free(){const t=this.__destroy_into_raw();_.__wbg_provingkey_free(t)}isBondPublicProver(){return 0!==_.provingkey_isBondPublicProver(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)}isTransferPublicToPrivateProver(){return 0!==_.provingkey_isTransferPublicToPrivateProver(this.__wbg_ptr)}isUnbondDelegatorAsValidatorProver(){return 0!==_.provingkey_isUnbondDelegatorAsValidatorProver(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 R.__wrap(t)}static fromBytes(t){try{const i=_.__wbindgen_add_to_stack_pointer(-16),o=v(t,_.__wbindgen_malloc),a=w;_.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 R.__wrap(e)}finally{_.__wbindgen_add_to_stack_pointer(16)}}static fromString(t){try{const i=_.__wbindgen_add_to_stack_pointer(-16),o=d(t,_.__wbindgen_malloc,_.__wbindgen_realloc),a=w;_.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 R.__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=S(t,e).slice();return _.__wbindgen_free(t,1*e),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)}}}class K{static __wrap(_){_>>>=0;const t=Object.create(K.prototype);return t.__wbg_ptr=_,t}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,_}free(){const t=this.__destroy_into_raw();_.__wbg_recordciphertext_free(t)}static fromString(t){try{const i=_.__wbindgen_add_to_stack_pointer(-16),o=d(t,_.__wbindgen_malloc,_.__wbindgen_realloc),a=w;_.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 K.__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);h(t,W),_.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 B.__wrap(e)}finally{_.__wbindgen_add_to_stack_pointer(16)}}isOwner(t){h(t,W);return 0!==_.recordciphertext_isOwner(this.__wbg_ptr,t.__wbg_ptr)}}class B{static __wrap(_){_>>>=0;const t=Object.create(B.prototype);return t.__wbg_ptr=_,t}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,_}free(){const t=this.__destroy_into_raw();_.__wbg_recordplaintext_free(t)}commitment(t,e){try{const o=_.__wbindgen_add_to_stack_pointer(-16),a=d(t,_.__wbindgen_malloc,_.__wbindgen_realloc),s=w,c=d(e,_.__wbindgen_malloc,_.__wbindgen_realloc),g=w;_.recordplaintext_commitment(o,this.__wbg_ptr,a,s,c,g);var r=f()[o/4+0],i=f()[o/4+1];if(f()[o/4+2])throw n(i);return F.__wrap(r)}finally{_.__wbindgen_add_to_stack_pointer(16)}}static fromString(t){try{const i=_.__wbindgen_add_to_stack_pointer(-16),o=d(t,_.__wbindgen_malloc,_.__wbindgen_realloc),a=w;_.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 B.__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);h(t,E);const y=d(e,_.__wbindgen_malloc,_.__wbindgen_realloc),m=w,v=d(r,_.__wbindgen_malloc,_.__wbindgen_realloc),k=w;_.recordplaintext_serialNumberString(p,this.__wbg_ptr,t.__wbg_ptr,y,m,v,k);var a=f()[p/4+0],c=f()[p/4+1],g=f()[p/4+2],b=f()[p/4+3],l=a,u=c;if(b)throw l=0,u=0,n(g);return i=l,o=u,s(l,u)}finally{_.__wbindgen_add_to_stack_pointer(16),_.__wbindgen_free(i,o,1)}}}class C{static __wrap(_){_>>>=0;const t=Object.create(C.prototype);return t.__wbg_ptr=_,t}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,_}free(){const t=this.__destroy_into_raw();_.__wbg_signature_free(t)}static sign(t,e){h(t,E);const r=v(e,_.__wbindgen_malloc),n=w,i=_.privatekey_sign(t.__wbg_ptr,r,n);return C.__wrap(i)}verify(t,e){h(t,x);const r=v(e,_.__wbindgen_malloc),n=w;return 0!==_.signature_verify(this.__wbg_ptr,t.__wbg_ptr,r,n)}static from_string(t){const e=d(t,_.__wbindgen_malloc,_.__wbindgen_realloc),r=w,n=_.signature_from_string(e,r);return C.__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)}}}class M{static __wrap(_){_>>>=0;const t=Object.create(M.prototype);return t.__wbg_ptr=_,t}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,_}free(){const t=this.__destroy_into_raw();_.__wbg_transaction_free(t)}static fromString(t){try{const i=_.__wbindgen_add_to_stack_pointer(-16),o=d(t,_.__wbindgen_malloc,_.__wbindgen_realloc),a=w;_.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 M.__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)}}}class D{static __wrap(_){_>>>=0;const t=Object.create(D.prototype);return t.__wbg_ptr=_,t}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,_}free(){const t=this.__destroy_into_raw();_.__wbg_verifyingkey_free(t)}static bondPublicVerifier(){const t=_.verifyingkey_bondPublicVerifier();return D.__wrap(t)}static claimUnbondPublicVerifier(){const t=_.verifyingkey_claimUnbondPublicVerifier();return D.__wrap(t)}static feePrivateVerifier(){const t=_.verifyingkey_feePrivateVerifier();return D.__wrap(t)}static feePublicVerifier(){const t=_.verifyingkey_feePublicVerifier();return D.__wrap(t)}static inclusionVerifier(){const t=_.verifyingkey_inclusionVerifier();return D.__wrap(t)}static joinVerifier(){const t=_.verifyingkey_joinVerifier();return D.__wrap(t)}static setValidatorStateVerifier(){const t=_.verifyingkey_setValidatorStateVerifier();return D.__wrap(t)}static splitVerifier(){const t=_.verifyingkey_splitVerifier();return D.__wrap(t)}static transferPrivateVerifier(){const t=_.verifyingkey_transferPrivateVerifier();return D.__wrap(t)}static transferPrivateToPublicVerifier(){const t=_.verifyingkey_transferPrivateToPublicVerifier();return D.__wrap(t)}static transferPublicVerifier(){const t=_.verifyingkey_transferPublicVerifier();return D.__wrap(t)}static transferPublicToPrivateVerifier(){const t=_.verifyingkey_transferPublicToPrivateVerifier();return D.__wrap(t)}static unbondDelegatorAsValidatorVerifier(){const t=_.verifyingkey_unbondDelegatorAsValidatorVerifier();return D.__wrap(t)}static unbondPublicVerifier(){const t=_.verifyingkey_unbondPublicVerifier();return D.__wrap(t)}isBondPublicVerifier(){return 0!==_.verifyingkey_isBondPublicVerifier(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)}isTransferPublicToPrivateVerifier(){return 0!==_.verifyingkey_isTransferPublicToPrivateVerifier(this.__wbg_ptr)}isUnbondDelegatorAsValidatorVerifier(){return 0!==_.verifyingkey_isUnbondDelegatorAsValidatorVerifier(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=_.provingkey_copy(this.__wbg_ptr);return D.__wrap(t)}static fromBytes(t){try{const i=_.__wbindgen_add_to_stack_pointer(-16),o=v(t,_.__wbindgen_malloc),a=w;_.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 D.__wrap(e)}finally{_.__wbindgen_add_to_stack_pointer(16)}}static fromString(t){try{const i=_.__wbindgen_add_to_stack_pointer(-16),o=d(t,_.__wbindgen_malloc,_.__wbindgen_realloc),a=w;_.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 D.__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=S(t,e).slice();return _.__wbindgen_free(t,1*e),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)}}}class W{static __wrap(_){_>>>=0;const t=Object.create(W.prototype);return t.__wbg_ptr=_,t}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,_}free(){const t=this.__destroy_into_raw();_.__wbg_viewkey_free(t)}static from_private_key(t){h(t,E);const e=_.privatekey_to_view_key(t.__wbg_ptr);return W.__wrap(e)}static from_string(t){const e=d(t,_.__wbindgen_malloc,_.__wbindgen_realloc),r=w,n=_.viewkey_from_string(e,r);return W.__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 x.__wrap(t)}decrypt(t){let e,r;try{const l=_.__wbindgen_add_to_stack_pointer(-16),u=d(t,_.__wbindgen_malloc,_.__wbindgen_realloc),p=w;_.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],g=i,b=o;if(c)throw g=0,b=0,n(a);return e=g,r=b,s(g,b)}finally{_.__wbindgen_add_to_stack_pointer(16),_.__wbindgen_free(e,r,1)}}}function q(){const t={wbg:{}};return t.wbg.__wbindgen_object_drop_ref=function(_){n(_)},t.wbg.__wbg_new_daafff584c71593b=function(){return V((function(){return c(new XMLHttpRequest)}),arguments)},t.wbg.__wbg_overrideMimeType_1a661d17da5f8baf=function(){return V((function(_,t,r){e(_).overrideMimeType(s(t,r))}),arguments)},t.wbg.__wbg_open_56fa1eb95989f6a5=function(){return V((function(_,t,r,n,i,o){e(_).open(s(t,r),s(n,i),0!==o)}),arguments)},t.wbg.__wbg_send_9f5007eae908c72e=function(){return V((function(_){e(_).send()}),arguments)},t.wbg.__wbg_response_f2acf2ecbe021710=function(){return V((function(_){return c(e(_).response)}),arguments)},t.wbg.__wbg_new_b51585de1b234aff=function(){return c(new Object)},t.wbg.__wbindgen_string_new=function(_,t){return c(s(_,t))},t.wbg.__wbg_set_092e06b0f9d71865=function(){return V((function(_,t,r){return Reflect.set(e(_),e(t),e(r))}),arguments)},t.wbg.__wbg_new_1eead62f64ca15ce=function(){return V((function(){return c(new Headers)}),arguments)},t.wbg.__wbindgen_object_clone_ref=function(_){return c(e(_))},t.wbg.__wbg_append_fda9e3432e3e88da=function(){return V((function(_,t,r,n,i){e(_).append(s(t,r),s(n,i))}),arguments)},t.wbg.__wbg_new_55c9955722952374=function(){return V((function(){return c(new AbortController)}),arguments)},t.wbg.__wbg_signal_4bd18fb489af2d4c=function(_){return c(e(_).signal)},t.wbg.__wbg_instanceof_Response_fc4327dbfcdf5ced=function(_){let t;try{t=e(_)instanceof Response}catch{t=!1}return t},t.wbg.__wbg_status_ac85a3142a84caa2=function(_){return e(_).status},t.wbg.__wbg_url_8503de97f69da463=function(t,r){const n=d(e(r).url,_.__wbindgen_malloc,_.__wbindgen_realloc),i=w;f()[t/4+1]=i,f()[t/4+0]=n},t.wbg.__wbg_headers_b70de86b8e989bc0=function(_){return c(e(_).headers)},t.wbg.__wbg_iterator_97f0c81209c6c35a=function(){return c(Symbol.iterator)},t.wbg.__wbg_get_97b561fb56f034b5=function(){return V((function(_,t){return c(Reflect.get(e(_),e(t)))}),arguments)},t.wbg.__wbindgen_is_function=function(_){return"function"==typeof e(_)},t.wbg.__wbg_call_cb65541d95d71282=function(){return V((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_526fc47e980da008=function(_){return c(e(_).next)},t.wbg.__wbg_next_ddb3312ca1c4e32a=function(){return V((function(_){return c(e(_).next())}),arguments)},t.wbg.__wbg_done_5c1f01fb660d73b5=function(_){return e(_).done},t.wbg.__wbg_value_1695675138684bd5=function(_){return c(e(_).value)},t.wbg.__wbg_abort_654b796176d117aa=function(_){e(_).abort()},t.wbg.__wbg_stringify_e25465938f3f611f=function(){return V((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:d(i,_.__wbindgen_malloc,_.__wbindgen_realloc),a=w;f()[t/4+1]=a,f()[t/4+0]=o},t.wbg.__wbg_call_01734de55d61e11d=function(){return V((function(_,t,r){return c(e(_).call(e(t),e(r)))}),arguments)},t.wbg.__wbg_keypair_new=function(_){return c(O.__wrap(_))},t.wbg.__wbg_log_0159ca40cddf5b15=function(_,t){console.log(s(_,t))},t.wbg.__wbg_transaction_new=function(_){return c(M.__wrap(_))},t.wbg.__wbindgen_bigint_from_u64=function(_){return c(BigInt.asUintN(64,_))},t.wbg.__wbindgen_module=function(){return c(J.__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",(_=>{i.unref&&i.unref(),n(i)}),{capture:!0,once:!0}),i.postMessage({module:t,memory:e,address:r})}))}(e(_),e(t),e(r),n))},t.wbg.__wbg_executionresponse_new=function(_){return c(A.__wrap(_))},t.wbg.__wbg_newwithlength_3ec098a360da1909=function(_){return c(new Array(_>>>0))},t.wbg.__wbg_set_502d29070ea18557=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_arrayBuffer_288fb3538806e85c=function(){return V((function(_){return c(e(_).arrayBuffer())}),arguments)},t.wbg.__wbg_new_8125e318e6245eed=function(_){return c(new Uint8Array(e(_)))},t.wbg.__wbg_length_72e2208bbc0efc61=function(_){return e(_).length},t.wbg.__wbg_new_43f1b47c28813cbd=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__he97f6a3b9df30e2b(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.__wbg_new_898a68150f225f2e=function(){return c(new Array)},t.wbg.__wbg_push_ca1c26067ef907ac=function(_,t){return e(_).push(e(t))},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=d(e(r).stack,_.__wbindgen_malloc,_.__wbindgen_realloc),i=w;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_subarray_13db269f57aa838d=function(_,t,r){return c(e(_).subarray(t>>>0,r>>>0))},t.wbg.__wbg_getRandomValues_37fa2ca9e4e07fab=function(){return V((function(_,t){e(_).getRandomValues(e(t))}),arguments)},t.wbg.__wbg_buffer_085ec1f694018c4f=function(_){return c(e(_).buffer)},t.wbg.__wbg_set_5cf90238115182c3=function(_,t,r){e(_).set(e(t),r>>>0)},t.wbg.__wbg_newwithbyteoffsetandlength_6da8e527659b86aa=function(_,t,r){return c(new Uint8Array(e(_),t>>>0,r>>>0))},t.wbg.__wbg_randomFillSync_dc1e9a60c158336d=function(){return V((function(_,t){e(_).randomFillSync(n(t))}),arguments)},t.wbg.__wbg_crypto_c48a774b022d20ac=function(_){return c(e(_).crypto)},t.wbg.__wbg_process_298734cf255a885d=function(_){return c(e(_).process)},t.wbg.__wbg_versions_e2e78e134e3e5d01=function(_){return c(e(_).versions)},t.wbg.__wbg_node_1cd7a5d853dbea79=function(_){return c(e(_).node)},t.wbg.__wbindgen_is_string=function(_){return"string"==typeof e(_)},t.wbg.__wbg_msCrypto_bcb970640f50a1e8=function(_){return c(e(_).msCrypto)},t.wbg.__wbg_newwithlength_e5d69174d6984cd7=function(_){return c(new Uint8Array(_>>>0))},t.wbg.__wbg_require_8f08ceecec0f4fee=function(){return V((function(){return c(module.require)}),arguments)},t.wbg.__wbg_length_fff51ee6522a1a18=function(_){return e(_).length},t.wbg.__wbg_get_44be0491f933a435=function(_,t){return c(e(_)[t>>>0])},t.wbg.__wbg_self_1ff1d729e9aae938=function(){return V((function(){return c(self.self)}),arguments)},t.wbg.__wbg_window_5f4faef6c12b79ec=function(){return V((function(){return c(window.window)}),arguments)},t.wbg.__wbg_globalThis_1d39714405582d3c=function(){return V((function(){return c(globalThis.globalThis)}),arguments)},t.wbg.__wbg_global_651f05c6a0944d1c=function(){return V((function(){return c(global.global)}),arguments)},t.wbg.__wbindgen_is_undefined=function(_){return void 0===e(_)},t.wbg.__wbg_newnoargs_581967eacc0e2604=function(_,t){return c(new Function(s(_,t)))},t.wbg.__wbg_has_c5fcd020291e56b8=function(){return V((function(_,t){return Reflect.has(e(_),e(t))}),arguments)},t.wbg.__wbg_fetch_8eaf01857a5bb21f=function(_,t){return c(e(_).fetch(e(t)))},t.wbg.__wbg_fetch_b5d6bebed1e6c2d2=function(_){return c(fetch(e(_)))},t.wbg.__wbindgen_debug_string=function(t,r){const n=d(p(e(r)),_.__wbindgen_malloc,_.__wbindgen_realloc),i=w;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_b2267541e2a73865=function(_,t,r){return c(e(_).then(e(t),e(r)))},t.wbg.__wbg_then_f7e06ee3c11698eb=function(_,t){return c(e(_).then(e(t)))},t.wbg.__wbg_resolve_53698b95aaf7fcf8=function(_){return c(Promise.resolve(e(_)))},t.wbg.__wbg_waitAsync_60fb5e2e86467e31=function(){return c(Atomics.waitAsync)},t.wbg.__wbg_new_a0af68041688e8fd=function(_){return c(new Int32Array(e(_)))},t.wbg.__wbg_waitAsync_73fd6eb3bace0a8d=function(_,t,r){return c(Atomics.waitAsync(e(_),t,r))},t.wbg.__wbg_async_e1a2a669aacf35ff=function(_){return e(_).async},t.wbg.__wbg_value_555e4f564193db05=function(_){return c(e(_).value)},t.wbg.__wbindgen_link_22046963fe0b707a=function(t){const e=d("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=w;f()[t/4+1]=r,f()[t/4+0]=e},t.wbg.__wbg_new_8e7322f46d5d019c=function(){return V((function(_,t){return c(new Worker(s(_,t)))}),arguments)},t.wbg.__wbg_setonmessage_f0bd0280573b7084=function(_,t){e(_).onmessage=e(t)},t.wbg.__wbg_of_3f69007bb4eeae65=function(_,t,r){return c(Array.of(e(_),e(t),e(r)))},t.wbg.__wbg_postMessage_8c609e2bde333d9c=function(){return V((function(_,t){e(_).postMessage(e(t))}),arguments)},t.wbg.__wbg_data_ab99ae4a2e1e8bc9=function(_){return c(e(_).data)},t.wbg.__wbg_newwithstrandinit_cad5cd6038c7ff5d=function(){return V((function(_,t,r){return c(new Request(s(_,t),e(r)))}),arguments)},t.wbg.__wbg_status_114ef6fe27fb8b00=function(){return V((function(_){return e(_).status}),arguments)},t.wbg.__wbg_responseText_da275667251fd153=function(){return V((function(t,r){const n=e(r).responseText;var i=l(n)?0:d(n,_.__wbindgen_malloc,_.__wbindgen_realloc),o=w;f()[t/4+1]=o,f()[t/4+0]=i}),arguments)},t.wbg.__wbindgen_closure_wrapper5654=function(_,t,e){return c(y(_,t,543,m))},t.wbg.__wbindgen_closure_wrapper5677=function(_,t,e){return c(y(_,t,543,m))},t}function N(_,t){_.wbg.memory=t||new WebAssembly.Memory({initial:169,maximum:65536,shared:!0})}function $(t,e){return _=t.exports,J.__wbindgen_wasm_module=e,k=null,u=null,o=null,_.__wbindgen_start(),_}async function J(t,e){if(void 0!==_)return _;const r=q();("string"==typeof t||"function"==typeof Request&&t instanceof Request||"function"==typeof URL&&t instanceof URL)&&(t=fetch(t)),N(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 $(n,i)}var z=Object.freeze({__proto__:null,Address:x,Execution:T,ExecutionResponse:A,Field:F,KeyPair:O,OfflineQuery:j,PrivateKey:E,PrivateKeyCiphertext:U,Program:I,ProgramManager:class{__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,_}free(){const t=this.__destroy_into_raw();_.__wbg_programmanager_free(t)}static buildDeploymentTransaction(t,e,r,i,o,a,s,g,b){h(t,E);const u=d(e,_.__wbindgen_malloc,_.__wbindgen_realloc),f=w;let p=0;l(i)||(h(i,B),p=i.__destroy_into_raw());var y=l(o)?0:d(o,_.__wbindgen_malloc,_.__wbindgen_realloc),m=w;let v=0;l(s)||(h(s,R),v=s.__destroy_into_raw());let k=0;l(g)||(h(g,D),k=g.__destroy_into_raw());let P=0;l(b)||(h(b,j),P=b.__destroy_into_raw());return n(_.programmanager_buildDeploymentTransaction(t.__wbg_ptr,u,f,r,p,y,m,l(a)?0:c(a),v,k,P))}static estimateDeploymentFee(t,e){const r=d(t,_.__wbindgen_malloc,_.__wbindgen_realloc),i=w;return n(_.programmanager_estimateDeploymentFee(r,i,l(e)?0:c(e)))}static estimateProgramNameCost(t){try{const i=_.__wbindgen_add_to_stack_pointer(-16),o=d(t,_.__wbindgen_malloc,_.__wbindgen_realloc),a=w;_.programmanager_estimateProgramNameCost(i,o,a);var e=P()[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,g,b,u,f){h(t,E);const p=d(e,_.__wbindgen_malloc,_.__wbindgen_realloc),y=w,m=d(r,_.__wbindgen_malloc,_.__wbindgen_realloc),v=w;let k=0;l(g)||(h(g,R),k=g.__destroy_into_raw());let P=0;l(b)||(h(b,D),P=b.__destroy_into_raw());var S=l(u)?0:d(u,_.__wbindgen_malloc,_.__wbindgen_realloc),V=w;let x=0;l(f)||(h(f,j),x=f.__destroy_into_raw());return n(_.programmanager_executeFunctionOffline(t.__wbg_ptr,p,y,m,v,c(i),o,a,l(s)?0:c(s),k,P,S,V,x))}static buildExecutionTransaction(t,e,r,i,o,a,s,g,b,u,f,p,y){h(t,E);const m=d(e,_.__wbindgen_malloc,_.__wbindgen_realloc),v=w,k=d(r,_.__wbindgen_malloc,_.__wbindgen_realloc),P=w;let S=0;l(a)||(h(a,B),S=a.__destroy_into_raw());var V=l(s)?0:d(s,_.__wbindgen_malloc,_.__wbindgen_realloc),x=w;let T=0;l(b)||(h(b,R),T=b.__destroy_into_raw());let A=0;l(u)||(h(u,D),A=u.__destroy_into_raw());let F=0;l(f)||(h(f,R),F=f.__destroy_into_raw());let O=0;l(p)||(h(p,D),O=p.__destroy_into_raw());let U=0;l(y)||(h(y,j),U=y.__destroy_into_raw());return n(_.programmanager_buildExecutionTransaction(t.__wbg_ptr,m,v,k,P,c(i),o,S,V,x,l(g)?0:c(g),T,A,F,O,U))}static estimateExecutionFee(t,e,r,i,o,a,s,g,b){h(t,E);const u=d(e,_.__wbindgen_malloc,_.__wbindgen_realloc),f=w,p=d(r,_.__wbindgen_malloc,_.__wbindgen_realloc),y=w;var m=l(o)?0:d(o,_.__wbindgen_malloc,_.__wbindgen_realloc),v=w;let k=0;l(s)||(h(s,R),k=s.__destroy_into_raw());let P=0;l(g)||(h(g,D),P=g.__destroy_into_raw());let S=0;l(b)||(h(b,j),S=b.__destroy_into_raw());return n(_.programmanager_estimateExecutionFee(t.__wbg_ptr,u,f,p,y,c(i),m,v,l(a)?0:c(a),k,P,S))}static estimateFinalizeFee(t,e){try{const o=_.__wbindgen_add_to_stack_pointer(-16),a=d(t,_.__wbindgen_malloc,_.__wbindgen_realloc),s=w,c=d(e,_.__wbindgen_malloc,_.__wbindgen_realloc),g=w;_.programmanager_estimateFinalizeFee(o,a,s,c,g);var r=P()[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,g,b,u){h(t,E),h(e,B);var f=e.__destroy_into_raw();h(r,B);var p=r.__destroy_into_raw();let y=0;l(o)||(h(o,B),y=o.__destroy_into_raw());var m=l(a)?0:d(a,_.__wbindgen_malloc,_.__wbindgen_realloc),v=w;let k=0;l(s)||(h(s,R),k=s.__destroy_into_raw());let P=0;l(c)||(h(c,D),P=c.__destroy_into_raw());let S=0;l(g)||(h(g,R),S=g.__destroy_into_raw());let V=0;l(b)||(h(b,D),V=b.__destroy_into_raw());let x=0;l(u)||(h(u,j),x=u.__destroy_into_raw());return n(_.programmanager_buildJoinTransaction(t.__wbg_ptr,f,p,i,y,m,v,k,P,S,V,x))}static buildSplitTransaction(t,e,r,i,o,a,s){h(t,E),h(r,B);var c=r.__destroy_into_raw(),g=l(i)?0:d(i,_.__wbindgen_malloc,_.__wbindgen_realloc),b=w;let u=0;l(o)||(h(o,R),u=o.__destroy_into_raw());let f=0;l(a)||(h(a,D),f=a.__destroy_into_raw());let p=0;l(s)||(h(s,j),p=s.__destroy_into_raw());return n(_.programmanager_buildSplitTransaction(t.__wbg_ptr,e,c,g,b,u,f,p))}static buildTransferTransaction(t,e,r,i,o,a,s,c,g,b,u,f,p){h(t,E);const y=d(r,_.__wbindgen_malloc,_.__wbindgen_realloc),m=w,v=d(i,_.__wbindgen_malloc,_.__wbindgen_realloc),k=w;let P=0;l(o)||(h(o,B),P=o.__destroy_into_raw());let S=0;l(s)||(h(s,B),S=s.__destroy_into_raw());var V=l(c)?0:d(c,_.__wbindgen_malloc,_.__wbindgen_realloc),x=w;let T=0;l(g)||(h(g,R),T=g.__destroy_into_raw());let A=0;l(b)||(h(b,D),A=b.__destroy_into_raw());let F=0;l(u)||(h(u,R),F=u.__destroy_into_raw());let O=0;l(f)||(h(f,D),O=f.__destroy_into_raw());let U=0;l(p)||(h(p,j),U=p.__destroy_into_raw());return n(_.programmanager_buildTransferTransaction(t.__wbg_ptr,e,y,m,v,k,P,a,S,V,x,T,A,F,O,U))}static synthesizeKeyPair(t,e,r,i,o){h(t,E);const a=d(e,_.__wbindgen_malloc,_.__wbindgen_realloc),s=w,g=d(r,_.__wbindgen_malloc,_.__wbindgen_realloc),b=w;return n(_.programmanager_synthesizeKeyPair(t.__wbg_ptr,a,s,g,b,c(i),l(o)?0:c(o)))}},ProvingKey:R,RecordCiphertext:K,RecordPlaintext:B,Signature:C,Transaction:M,VerifyingKey:D,ViewKey:W,default:J,initSync:function(t,e){if(void 0!==_)return _;const r=q();return N(r,e),t instanceof WebAssembly.Module||(t=new WebAssembly.Module(t)),$(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);h(t,T),h(e,D),h(r,I);const c=d(i,_.__wbindgen_malloc,_.__wbindgen_realloc),g=w;_.verifyFunctionExecution(s,t.__wbg_ptr,e.__wbg_ptr,r.__wbg_ptr,c,g);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(J,n):await J(n),z})); \ No newline at end of file diff --git a/index.bundle.js b/index.bundle.js index f5a275f19..a6df75c67 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}},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",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"});e.exports=r},4967:(e,t,n)=>{var r="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g;e.exports=r},3447:(e,t,n)=>{var r=n(3991),o=Object.prototype,i=o.hasOwnProperty,a=o.toString,l=r?r.toStringTag:void 0;e.exports=function(e){var t=i.call(e,l),n=e[l];try{e[l]=void 0;var r=!0}catch(e){}var 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