@wormhole-foundation/wormhole-connect 1.0.0-beta.4-development → 1.0.0-beta.5-development
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/{ccip-Dn5z57Cx.js → ccip-B-OK94pJ.js} +1 -1
- package/dist/assets/{evm-Ci-t-8ei.js → evm-CPj7oFVL.js} +4 -4
- package/dist/assets/{index-DlyJ6Tua.js → index-BWMdho2w.js} +2 -2
- package/dist/assets/{index-Da59NFoY.js → index-DGFWhjyA.js} +1 -1
- package/dist/assets/{index-yInQCZK6.js → index-Ddso83Ti.js} +1 -1
- package/dist/assets/{index.es-DUffrgf3.js → index.es-VchQxXD4.js} +2 -2
- package/dist/main.js +41 -41
- package/dist/src/views/v2/Bridge/AmountInput/index.d.ts.map +1 -1
- package/lib/{algorand-BZfir-Gt.js → algorand-DFJZIdnH.js} +1 -1
- package/lib/{algorand-B9ai7AKk.mjs → algorand-qEY4HHOc.mjs} +3 -3
- package/lib/{aptos-ZpPdNMHJ.mjs → aptos-BCuZuiBG.mjs} +1 -1
- package/lib/{aptos-CX7jOv1y.js → aptos-BHw0JlTE.js} +1 -1
- package/lib/{aptos-D_w5IEUK.js → aptos-D-S8DXGs.js} +2 -2
- package/lib/{aptos-BiWZASIH.mjs → aptos-DoqExVYR.mjs} +3 -3
- package/lib/{ccip-CLMQ2RsP.js → ccip-CXJ3nCk_.js} +1 -1
- package/lib/{ccip-lVzudYcQ.mjs → ccip-_0LmpQds.mjs} +1 -1
- package/lib/{cosmos-B3YMB-qs.mjs → cosmos-0un-E2-0.mjs} +6 -6
- package/lib/{cosmos-6rjmrhY_.js → cosmos-DCgWSBll.js} +1 -1
- package/lib/{cosmwasm-DMVssDjU.js → cosmwasm-BsEhYnuw.js} +2 -2
- package/lib/{cosmwasm-SnVdtN68.mjs → cosmwasm-DvwgrLe6.mjs} +7 -7
- package/lib/{events-pgsgrP1S.mjs → events-BL2eUG60.mjs} +1 -1
- package/lib/{events-t6i_QSEn.js → events-wpqGOay9.js} +1 -1
- package/lib/{evm-DFJuxSg1.js → evm-B46tP5Ah.js} +1 -1
- package/lib/{evm-D7GRIPdg.js → evm-BOrFw20j.js} +4 -4
- package/lib/{evm-Bd3DzKCY.mjs → evm-CkxKsuQ-.mjs} +7 -7
- package/lib/{evm-DiQodX72.mjs → evm-kynWl8-i.mjs} +5 -5
- package/lib/{index-C_JBf5AE.js → index-6gwCyfQU.js} +1 -1
- package/lib/{index-DG5KwGj7.mjs → index-BHOu1oLq.mjs} +3 -3
- package/lib/{index-CcKxlhe-.js → index-BNWJG0G4.js} +1 -1
- package/lib/{index-hiGmsL0b.mjs → index-BOppeFAI.mjs} +1 -1
- package/lib/{index-B64jLBfI.mjs → index-BTBmklHJ.mjs} +2 -2
- package/lib/{index-EPcXyhD3.js → index-BVz1aMw3.js} +1 -1
- package/lib/{index-BjpzXqrL.js → index-BWNh4wvK.js} +1 -1
- package/lib/{index-DllSkb9h.js → index-BwCIDEBK.js} +1 -1
- package/lib/{index-D4-zCm-j.js → index-C4ri6eMC.js} +1 -1
- package/lib/{index-CvRFH7pa.js → index-C7amSMG9.js} +1 -1
- package/lib/{index-CE4mRmPN.js → index-CAkX47d8.js} +1 -1
- package/lib/{index-BZ7LatAr.js → index-CDGktAjP.js} +3 -3
- package/lib/{index-BAqClXT6.js → index-CFVm1KSi.js} +1 -1
- package/lib/{index-DJgWkkqj.mjs → index-CLH7U4rp.mjs} +2 -2
- package/lib/{index-B_FxM4qi.js → index-CNIDBiCc.js} +1 -1
- package/lib/{index-DLXjX60f.js → index-CPgdgK8L.js} +1 -1
- package/lib/{index-0YCaekiF.mjs → index-CTwzW64I.mjs} +2 -2
- package/lib/{index-B5TmFc4M.js → index-CUInBQd6.js} +1 -1
- package/lib/{index-mAuqp4GD.js → index-CaFGZvKm.js} +1 -1
- package/lib/{index-DZbeM9gY.mjs → index-Cb47usqO.mjs} +2 -2
- package/lib/{index-EhUlCH18.mjs → index-CjwA7HmM.mjs} +23 -33
- package/lib/{index-BT7_dDgl.mjs → index-CkPaHAgJ.mjs} +3 -3
- package/lib/{index-B2aC_g_3.js → index-ClLbfY74.js} +1 -1
- package/lib/{index-CFVJznfe.js → index-ClRkhvNK.js} +1 -1
- package/lib/{index-C4NKqUWK.mjs → index-Cm3iq-IJ.mjs} +1 -1
- package/lib/{index-DWmEAYa2.js → index-CtJdy4GW.js} +1 -1
- package/lib/{index-CkyGUP8I.mjs → index-D0W1ZmqN.mjs} +2 -2
- package/lib/{index-0QJFchou.mjs → index-D5SPCl8N.mjs} +2 -2
- package/lib/{index-CpM8O4af.mjs → index-D6Sqxs9J.mjs} +4 -4
- package/lib/{index-fD6yeQDw.mjs → index-DC65dQZI.mjs} +7 -7
- package/lib/{index-BkyCouQJ.js → index-DICIR39L.js} +1 -1
- package/lib/{index-DVnPDtFx.mjs → index-DIddLRbN.mjs} +1 -1
- package/lib/{index-bpVbPzFG.mjs → index-DSSXLwpv.mjs} +1 -1
- package/lib/{index-Cl110Yt1.js → index-DVKptZW_.js} +1 -1
- package/lib/{index-Dk2OkATw.js → index-DcbhKZoU.js} +1 -1
- package/lib/{index-DPq8nS1b.mjs → index-DojwGTf0.mjs} +1 -1
- package/lib/{index-C9xfXphF.mjs → index-DrQrqu4U.mjs} +2 -2
- package/lib/{index-Bd6ExIDW.mjs → index-DvQkOUhD.mjs} +4 -4
- package/lib/{index-fPs98C_X.mjs → index-Dw4gUoPq.mjs} +2 -2
- package/lib/{index-DUn9bDrk.mjs → index-IypSUdxl.mjs} +2 -2
- package/lib/{index-2LZtNZ5P.js → index-QfqpopxL.js} +1 -1
- package/lib/{index-BhrO8yNx.mjs → index-SiA6wvOM.mjs} +2 -2
- package/lib/{index-VI9qDjx0.js → index-dZuWNqUJ.js} +1 -1
- package/lib/{index-BYv5Tbwe.mjs → index-fzN-meRd.mjs} +1 -1
- package/lib/{index-QqzqKjF9.js → index-hWgZ0Dfs.js} +1 -1
- package/lib/{index-048e7Uvl.js → index-tKKMDrTV.js} +1 -1
- package/lib/{index-BcbPoWss.mjs → index-tKooq_Tx.mjs} +3 -3
- package/lib/{index-CdFX-OBR.mjs → index-yd8RiLQo.mjs} +4 -4
- package/lib/{index.es-WCp4WrVw.js → index.es-BfpZO8dT.js} +2 -2
- package/lib/{index.es-B4wQLKJO.mjs → index.es-P5wvRtJq.mjs} +5 -5
- package/lib/index.js +1 -1
- package/lib/index.mjs +1 -1
- package/lib/{libsodium-wrappers-DnY3rBzj.mjs → libsodium-wrappers-BB6-Iffd.mjs} +1 -1
- package/lib/{libsodium-wrappers-BdZeVEOK.js → libsodium-wrappers-BvMpC4vD.js} +1 -1
- package/lib/{pako.esm-doGHPq3v.mjs → pako.esm-C7QrkxRd.mjs} +3 -3
- package/lib/{pako.esm-CpOVp0Fg.js → pako.esm-DlDLS2rv.js} +1 -1
- package/lib/{pbkdf2-CR1mMO6P.mjs → pbkdf2-DMV4l9Li.mjs} +1 -1
- package/lib/{pbkdf2-DRrUaAek.js → pbkdf2-Di1EjoiV.js} +1 -1
- package/lib/{sei-ReMraEM4.mjs → sei-CnR3Aw9g.mjs} +4 -4
- package/lib/{sei-BHskcl2R.js → sei-RTyi_UJs.js} +1 -1
- package/lib/{signer-BwkEV8NR.mjs → signer-BAztlcE7.mjs} +1 -1
- package/lib/{signer-C5udfQih.js → signer-CbhSUdvo.js} +1 -1
- package/lib/solana-Bkh_veaR.mjs +16 -0
- package/lib/solana-CKipdoh2.js +1 -0
- package/lib/{solana-kr2Et-_M.mjs → solana-CP3uz3z9.mjs} +4 -4
- package/lib/{solana-BWRzXH9-.js → solana-Cglhypga.js} +1 -1
- package/lib/{solanaEmbed.esm-8hegnauD.js → solanaEmbed.esm-8VvaQIYa.js} +1 -1
- package/lib/{solanaEmbed.esm-HLygiesN.mjs → solanaEmbed.esm-DfSXcnar.mjs} +4 -4
- package/lib/src/views/v2/Bridge/AmountInput/index.d.ts.map +1 -1
- package/lib/{sui-BWRqoTdl.js → sui-BLA0P5P1.js} +2 -2
- package/lib/{sui-BocrppL0.js → sui-BMLSVXBy.js} +1 -1
- package/lib/{sui-B6XCpe1d.mjs → sui-C73zQuHR.mjs} +1 -1
- package/lib/{sui-BuZPAcI0.mjs → sui-WPdV6u03.mjs} +4 -4
- package/lib/{unsignedTransaction-oXk8lD5s.mjs → unsignedTransaction-BWLDqwPd.mjs} +2 -2
- package/lib/{unsignedTransaction-DSuqsGgb.js → unsignedTransaction-Cl0WbHFW.js} +1 -1
- package/lib/{utils-SML27G4C.js → utils-CA5brb9u.js} +1 -1
- package/lib/{utils-fI-uXUZk.mjs → utils-Cd5O9nI7.mjs} +2 -2
- package/package.json +1 -1
- package/lib/solana-ci1dqiv5.mjs +0 -16
- package/lib/solana-gFEm46ZS.js +0 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Z as $, cF as J5, ds as Y5, ac as V1, dt as K4, h as X5 } from "./index-
|
|
2
|
-
import { h as e7, e as t7 } from "./evm-
|
|
1
|
+
import { Z as $, cF as J5, ds as Y5, ac as V1, dt as K4, h as X5 } from "./index-CjwA7HmM.mjs";
|
|
2
|
+
import { h as e7, e as t7 } from "./evm-CkxKsuQ-.mjs";
|
|
3
3
|
import * as C3 from "react";
|
|
4
4
|
import w, { createContext as n7, useState as o3, useEffect as j0, useCallback as r7, useContext as i7 } from "react";
|
|
5
5
|
import o7 from "react-dom";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var T=Object.defineProperty;var C=(m,e,t)=>e in m?T(m,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):m[e]=t;var d=(m,e,t)=>C(m,typeof e!="symbol"?e+"":e,t);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("./index-
|
|
1
|
+
"use strict";var T=Object.defineProperty;var C=(m,e,t)=>e in m?T(m,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):m[e]=t;var d=(m,e,t)=>C(m,typeof e!="symbol"?e+"":e,t);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("./index-hWgZ0Dfs.js");const c=require("./cosmwasm-BsEhYnuw.js"),i=require("./unsignedTransaction-Cl0WbHFW.js"),s=require("./index-CDGktAjP.js");class l{constructor(e,t,r,n){d(this,"network");d(this,"chain");d(this,"rpc");d(this,"contracts");d(this,"tokenBridge");d(this,"translator");this.network=e,this.chain=t,this.rpc=r,this.contracts=n;const a=this.contracts.tokenBridge;if(!a)throw new Error(`Wormhole Token Bridge contract for domain ${t} not found`);if(this.tokenBridge=a,this.translator=this.contracts.translator,this.translator!==void 0&&this.translator==="")throw new Error("Translator address may be undefined but not empty string")}static async fromRpc(e,t){const[r,n]=await c.CosmwasmPlatform.chainFromRpc(e),a=t[n];if(a.network!==r)throw new Error(`Network mismatch: ${a.network} != ${r}`);return new l(r,n,e,t[n].contracts)}async isWrappedAsset(e){try{return await this.getOriginalAsset(e),!0}catch{}return!1}async hasWrappedAsset(e){try{return await this.getWrappedAsset(e),!0}catch{}return!1}async getWrappedAsset(e){if(e.chain===this.chain)throw new Error(`Expected foreign chain, got ${e.chain}`);if(s.isNative(e.address))throw new Error("Native asset cannot be a wrapped asset");const t=s.b64.encode(e.address.toUniversalAddress().toUint8Array()),{address:r}=await this.rpc.queryContractSmart(this.tokenBridge,{wrapped_registry:{chain:s.toChainId(e.chain),address:t}});return s.toNative(this.chain,r)}async getOriginalAsset(e){let t=new s.CosmwasmAddress(e);t.denomType==="factory"&&(t=c.Gateway.factoryToCw20(t));const r=await this.rpc.queryContractSmart(t.toString(),{wrapped_asset_info:{}}),n=s.toChain(r.asset_chain),a=s.b64.decode(r.asset_address);return{chain:n,address:new s.UniversalAddress(new Uint8Array(a))}}async getTokenUniversalAddress(e){return new s.CosmwasmAddress(e).toUniversalAddress()}async getTokenNativeAddress(e,t){return new s.CosmwasmAddress(t).toNative()}async isTransferCompleted(e){const t=s.b64.encode(s.serialize(e));return(await this.rpc.queryContractSmart(this.tokenBridge,{is_vaa_redeemed:{vaa:t}})).is_redeemed}async*createAttestation(e,t){if(!t)throw new Error("Payer required to create attestation");const r=new s.CosmwasmAddress(e).toString(),n=new s.CosmwasmAddress(t).toString(),a=0,w=s.isNative(e)?{native_token:{denom:c.CosmwasmPlatform.getNativeDenom(this.network,this.chain)}}:{token:{contract_addr:r}};yield this.createUnsignedTx({msgs:[i.buildExecuteMsg(n,this.tokenBridge,{create_asset_meta:{asset_info:w,nonce:a}})],fee:i.computeFee(this.network,this.chain),memo:"Wormhole - Create Attestation"},"TokenBridge.createAttestation")}async*submitAttestation(e,t){if(!t)throw new Error("Payer required to submit attestation");const r=new s.CosmwasmAddress(t).toString();yield this.createUnsignedTx({msgs:[i.buildExecuteMsg(r,this.tokenBridge,{submit_vaa:{data:s.serialize(e)}})],fee:i.computeFee(this.network,this.chain),memo:"Wormhole - Submit Attestation"},"TokenBridge.submitAttestation")}async*transfer(e,t,r,n,a){const w=Math.round(Math.random()*1e5),u="0",k=s.toChainId(t.chain),A=s.b64.encode(t.address.toUniversalAddress().toUint8Array()),v=c.CosmwasmPlatform.getNativeDenom(this.network,this.chain),f=s.isNative(r);let o=f?v:r.toString();o.startsWith("factory")&&(o=c.Gateway.factoryToCw20(new s.CosmwasmAddress(o)).toString());const g=new s.CosmwasmAddress(e).toString(),p=h=>{const y={asset:{amount:n.toString(),info:h},recipient_chain:k,recipient:A,fee:u,nonce:w};return a?{initiate_transfer_with_payload:{...y,payload:s.b64.encode(a)}}:{initiate_transfer:y}};if(f){const h=[i.buildExecuteMsg(g,this.tokenBridge,{deposit_tokens:{}},[{amount:n.toString(),denom:o}]),i.buildExecuteMsg(g,this.tokenBridge,p({native_token:{denom:o}}))];yield this.createUnsignedTx({msgs:h,fee:i.computeFee(this.network,this.chain),memo:"Wormhole - Initiate Native Transfer"},"TokenBridge.transferNative")}else{const h=[i.buildExecuteMsg(g,o,{increase_allowance:{spender:this.tokenBridge,amount:n.toString(),expires:{never:{}}}}),i.buildExecuteMsg(g,this.tokenBridge,p({token:{contract_addr:o}}),[{amount:n.toString(),denom:o}])];yield this.createUnsignedTx({msgs:h,fee:i.computeFee(this.network,this.chain),memo:"Wormhole - Initiate Transfer"},"TokenBridge.transfer")}}async*redeem(e,t,r=!0){const n=s.b64.encode(s.serialize(t)),a=new s.CosmwasmAddress(e).toString(),u=this.translator&&new s.CosmwasmAddress(this.translator).toUniversalAddress().equals(t.payload.to.address)?i.buildExecuteMsg(a,this.translator,{complete_transfer_and_convert:{vaa:n}}):i.buildExecuteMsg(a,this.tokenBridge,{submit_vaa:{data:n}});yield this.createUnsignedTx({msgs:[u],fee:i.computeFee(this.network,this.chain),memo:"Wormhole - Complete Transfer"},"TokenBridge.redeem")}async parseTransactionDetails(e){throw new Error("Not implemented")}async getWrappedNative(){return s.toNative(this.chain,c.CosmwasmPlatform.getNativeDenom(this.network,this.chain))}createUnsignedTx(e,t,r=!1){return new i.CosmwasmUnsignedTransaction(e,this.network,this.chain,t,r)}}s.registerProtocol(s._platform$3,"TokenBridge",l);exports.CosmwasmTokenBridge=l;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var m=Object.defineProperty;var w=(i,e,t)=>e in i?m(i,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[e]=t;var s=(i,e,t)=>w(i,typeof e!="symbol"?e+"":e,t);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("./index-
|
|
1
|
+
"use strict";var m=Object.defineProperty;var w=(i,e,t)=>e in i?m(i,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[e]=t;var s=(i,e,t)=>w(i,typeof e!="symbol"?e+"":e,t);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("./index-CDGktAjP.js"),g=require("./aptos-D-S8DXGs.js");class d{constructor(e,t,r,o){s(this,"network");s(this,"chain");s(this,"connection");s(this,"contracts");s(this,"chainId");s(this,"coreBridge");this.network=e,this.chain=t,this.connection=r,this.contracts=o,this.chainId=c.toChainId(t);const n=o.coreBridge;if(!n)throw new Error(`CoreBridge contract Address for chain ${t} not found`);this.coreBridge=n}getGuardianSet(e){throw new Error("Method not implemented.")}getGuardianSetIndex(){throw new Error("Method not implemented.")}getMessageFee(){throw new Error("Method not implemented.")}static async fromRpc(e,t){const[r,o]=await g.AptosPlatform.chainFromRpc(e),n=t[o];if(n.network!==r)throw new Error(`Network mismatch: ${n.network} !== ${r}`);return new d(r,o,e,n.contracts)}async*publishMessage(e,t){throw new Error("Method not implemented.")}async*verifyMessage(e,t){throw new Error("Not implemented.")}async parseTransaction(e){return(await this.parseMessages(e)).map(r=>({chain:r.emitterChain,emitter:r.emitterAddress,sequence:r.sequence}))}async parseMessages(e){const t=await this.connection.getTransactionByHash(e);if(t.type!=="user_transaction")throw new Error(`${e} is not a user_transaction`);const o=t.events.filter(n=>n.type.endsWith("WormholeMessage"));if(!o||o.length===0)throw new Error(`WormholeMessage not found for ${e}`);return o.map(n=>{const a=n.data,h=new c.UniversalAddress(BigInt(a.sender).toString(16).padStart(64,"0"));return c.createVAA("Uint8Array",{guardianSet:0,emitterChain:this.chain,emitterAddress:h,sequence:BigInt(a.sequence),timestamp:Number(a.timestamp),consistencyLevel:a.consistency_level,nonce:Number(a.nonce),signatures:[],payload:c.hex.decode(a.payload)})})}}c.registerProtocol("Aptos","WormholeCore",d);exports.AptosWormholeCore=d;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
var m = Object.defineProperty;
|
|
2
2
|
var w = (i, e, t) => e in i ? m(i, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : i[e] = t;
|
|
3
3
|
var a = (i, e, t) => w(i, typeof e != "symbol" ? e + "" : e, t);
|
|
4
|
-
import { C as u } from "./cosmwasm-
|
|
5
|
-
import { cL as g, c9 as l, u as h, bR as p, a9 as f } from "./index-
|
|
4
|
+
import { C as u } from "./cosmwasm-DvwgrLe6.mjs";
|
|
5
|
+
import { cL as g, c9 as l, u as h, bR as p, a9 as f } from "./index-CjwA7HmM.mjs";
|
|
6
6
|
class c {
|
|
7
7
|
constructor(e, t, s, r) {
|
|
8
8
|
a(this, "network");
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var h=Object.defineProperty;var m=(a,e,r)=>e in a?h(a,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):a[e]=r;var o=(a,e,r)=>m(a,typeof e!="symbol"?e+"":e,r);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("./index-
|
|
1
|
+
"use strict";var h=Object.defineProperty;var m=(a,e,r)=>e in a?h(a,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):a[e]=r;var o=(a,e,r)=>m(a,typeof e!="symbol"?e+"":e,r);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("./index-CDGktAjP.js"),u=require("./sui-BLA0P5P1.js");class d{constructor(e,r,t,n){o(this,"network");o(this,"chain");o(this,"provider");o(this,"contracts");o(this,"chainId");o(this,"coreBridgePackageId");this.network=e,this.chain=r,this.provider=t,this.contracts=n,this.chainId=c.toChainId(r);const s=n.coreBridge;if(!s)throw new Error(`CoreBridge contract Address for chain ${r} not found`);this.coreBridgePackageId=s}getGuardianSet(e){throw new Error("Method not implemented.")}getMessageFee(){throw new Error("Method not implemented.")}static async fromRpc(e,r){const[t,n]=await u.SuiPlatform.chainFromRpc(e),s=r[n];if(s.network!==t)throw new Error(`Network mismatch: ${s.network} !== ${t}`);return new d(t,n,e,s.contracts)}async*verifyMessage(e,r){throw new Error("Method not implemented.")}async*publishMessage(e,r){throw new Error("Method not implemented.")}async parseTransaction(e){return(await this.parseMessages(e)).map(t=>({emitter:t.emitterAddress,sequence:t.sequence,chain:this.chain}))}async getGuardianSetIndex(){throw new Error("Method not implemented.")}async parseMessages(e){var n;const t=(n=(await this.provider.getTransactionBlock({digest:e,options:{showEvents:!0,showEffects:!0,showInput:!0}})).events)==null?void 0:n.filter(s=>s.type.endsWith("WormholeMessage"));if(!t||t.length==0)throw new Error("WormholeMessage not found");return t.map(s=>{const i=s.parsedJson;return c.createVAA("Uint8Array",{emitterChain:this.chain,emitterAddress:new c.SuiAddress(i.sender).toUniversalAddress(),sequence:BigInt(i.sequence),guardianSet:0,timestamp:Number(i.timestamp),consistencyLevel:i.consistency_level,nonce:i.nonce,signatures:[],payload:new Uint8Array(i.payload)})})}}c.registerProtocol("Sui","WormholeCore",d);exports.SuiWormholeCore=d;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var D=Object.defineProperty;var q=(o,e,n)=>e in o?D(o,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):o[e]=n;var p=(o,e,n)=>q(o,typeof e!="symbol"?e+"":e,n);const t=require("./index-BZ7LatAr.js"),H=require("./algorand-BZfir-Gt.js");class j{constructor(e,n,r,s,i=!1){p(this,"transaction");p(this,"network");p(this,"chain");p(this,"description");p(this,"parallelizable");this.transaction=e,this.network=n,this.chain=r,this.description=s,this.parallelizable=i}}const K=1002e3,O=15,U=127,L=8,R=U*L,V=U*O,N=L*V,m={_limit:127,encodingLength:o=>{let e=0;for(;o>=128;e++)o>>=7;return e+1},encode:(o,e,n)=>{if(typeof o=="bigint"&&(o=t.safeBigIntToNumber(o)),o<0)throw new RangeError("value must be unsigned");const r=m.encodingLength(o);if(e=e||new ArrayBuffer(r),n=n||0,e.byteLength<n+r)throw new RangeError("the buffer is too small to encode the number at the offset");const s=new Uint8Array(e,n);let i=0;for(;m._limit<o;)s[i++]=o&m._limit|128,o>>=7;return s[i]=Number(o),s},decode:(o,e=0)=>{let n=0,r=0,s;do{if(s=o[e+r],s===void 0)throw new RangeError("offset out of range");n+=(s&m._limit)<<r*7,r++}while(128<=s);return n}},u={forMessageId:(o,e)=>{const n=t.decodeAddress(t.getApplicationAddress(o)).publicKey,r=e.emitter.toUniversalAddress().toUint8Array(),s=t.bignum.toBytes(BigInt(t.toChainId(e.chain)),2),i=t.bytes.concat(s,r);return u.fromData({appId:o,appAddress:n,idx:e.sequence/BigInt(N),address:i})},forWrappedAsset:(o,e)=>{if(t.isNative(e.address))throw new Error("native asset cannot be a wrapped asset");const n=t.decodeAddress(t.getApplicationAddress(o)).publicKey;return u.fromData({appId:o,appAddress:n,idx:BigInt(t.toChainId(e.chain)),address:e.address.toUniversalAddress().toUint8Array()})},forNativeAsset:(o,e)=>{const n=t.decodeAddress(t.getApplicationAddress(o)).publicKey;return u.fromData({appId:o,appAddress:n,idx:e,address:t.bytes.encode("native")})},forGuardianSet:(o,e)=>{const n=t.decodeAddress(t.getApplicationAddress(o)).publicKey;return u.fromData({appId:o,appAddress:n,idx:BigInt(e),address:t.bytes.encode("guardian")})},forEmitter:(o,e)=>{const n=t.decodeAddress(t.getApplicationAddress(o)).publicKey;return u.fromData({appId:o,appAddress:n,idx:0n,address:e})},_encode:o=>typeof o=="bigint"?[t.hex.encode(m.encode(o))]:[t.hex.encode(m.encode(o.length)),t.hex.encode(o)],fromData:o=>{const e=["0620010181",...u._encode(o.idx),"4880",...u._encode(o.address),"483110810612443119221244311881",...u._encode(o.appId),"1244312080",...u._encode(o.appAddress),"124431018100124431093203124431153203124422"],n=t.hex.decode(e.join(""));return new t.LogicSigAccount(n)},decodeLocalState:async(o,e,n)=>{let r;try{const a=await o.accountApplicationInformation(n,t.safeBigIntToNumber(e)).do();r=t.AccountApplicationResponse.from_obj_for_encoding(a).appLocalState}catch{return new Uint8Array}const s=t.b64.encode("meta");let i=new Map;for(const a of r.keyValue){if(a.key===s)continue;const g=t.b64.decode(a.key)[0],l=t.b64.decode(a.value.bytes);i.set(g,l)}const d=[];for(let a=0;a<O;a++)i.has(a)&&d.push(i.get(a));return t.bytes.concat(...d)},checkBitsSet:async(o,e,n,r)=>{let s=!1,i;const d=await o.accountInformation(n).do(),g=t.Account.from_obj_for_encoding(d).appsLocalState;if(g&&g.forEach(h=>{BigInt(h.id)===e&&(i=h.keyValue)}),(i==null?void 0:i.length)===0)return s;const l=BigInt(N),f=BigInt(8),y=r/l*l,b=t.safeBigIntToNumber(r-y),T=Math.floor(b/R),x=Math.floor((b-T*R)/8),B=t.b64.encode(t.bignum.toBytes(T,1));return i==null||i.forEach(h=>{if(h.key===B){const _=t.dist.Buffer.from(h.value.bytes,"base64"),w=1<<t.safeBigIntToNumber(r%f);s=(_[x]&w)!=0;return}}),s},storageAccountExists:async(o,e,n)=>{try{const r=await o.accountApplicationInformation(e,t.safeBigIntToNumber(n)).do();return Object.keys(r).length>0}catch{}return!1}},c=class c{constructor(e,n,r,s){p(this,"network");p(this,"chain");p(this,"connection");p(this,"contracts");p(this,"chainId");p(this,"coreAppId");p(this,"coreAppAddress");p(this,"tokenBridgeAppId");p(this,"tokenBridgeAppAddress");if(this.network=e,this.chain=n,this.connection=r,this.contracts=s,this.chainId=t.toChainId(n),!s.coreBridge)throw new Error(`Core contract address for chain ${n} not found`);const i=BigInt(s.coreBridge);if(this.coreAppId=i,this.coreAppAddress=t.getApplicationAddress(i),!s.tokenBridge)throw new Error(`TokenBridge contract address for chain ${n} not found`);const d=BigInt(s.tokenBridge);this.tokenBridgeAppId=d,this.tokenBridgeAppAddress=t.getApplicationAddress(d)}getGuardianSet(e){throw new Error("Method not implemented.")}async*verifyMessage(e,n,r){const s=new t.AlgorandAddress(e).toString(),i=await c.submitVAAHeader(this.connection,this.coreAppId,r??this.coreAppId,n,s);for(const d of i.txs)yield this.createUnsignedTx(d,"Core.verifyMessage")}static async fromRpc(e,n){const[r,s]=await H.AlgorandPlatform.chainFromRpc(e),i=n[s];if(i.network!==r)throw new Error(`Network mismatch: ${i.network} !== ${r}`);return new c(r,s,e,i.contracts)}async*publishMessage(e,n){const r=new t.AlgorandAddress(e),s=r.toString(),i=await this.connection.getTransactionParams().do(),d=u.forEmitter(this.coreAppId,r.toUint8Array()),{accounts:a,txs:g}=await c.maybeCreateStorageTx(this.connection,s,this.coreAppId,d,i);for(const f of g)yield this.createUnsignedTx(f,"Core.publishMessage",!0);const l=t.makeApplicationCallTxnFromObject({from:s,appIndex:t.safeBigIntToNumber(this.coreAppId),appArgs:[c.publishMessage,n,t.bignum.toBytes(0n,8)],accounts:a,onComplete:t.OnApplicationComplete.NoOpOC,suggestedParams:i});yield this.createUnsignedTx({tx:l},"Core.publishMessage",!0)}async getMessageFee(){var s;const e=await this.connection.getApplicationByID(t.safeBigIntToNumber(this.coreAppId)).do(),r=(s=t.Application.from_obj_for_encoding(e).params.globalState)==null?void 0:s.find(i=>i.key===c.feeKey);return r?BigInt(r.value.uint):0n}async getGuardianSetIndex(){throw new Error("Not implemented")}async parseTransaction(e){const n=await this.connection.pendingTransactionInformation(e).do(),r=t.PendingTransactionResponse.from_obj_for_encoding(n);return this.parseTx(r).map(s=>({chain:s.emitterChain,emitter:s.emitterAddress,sequence:s.sequence}))}async parseMessages(e){const n=await this.connection.pendingTransactionInformation(e).do(),r=t.PendingTransactionResponse.from_obj_for_encoding(n);return this.parseTx(r)}parseTx(e){const n=[];if(e.innerTxns&&e.innerTxns.length>0&&n.push(...e.innerTxns.flatMap(g=>this.parseTx(g))),BigInt(e.txn.txn.apid??0)!==this.coreAppId||!e.logs||e.logs.length===0)return n;const r=e.txn.txn.apaa??[];if(r.length!==3||!t.bytes.equals(new Uint8Array(r[0]),c.publishMessage))return n;const s=t.bignum.decode(e.logs[0]),i=new t.AlgorandAddress(e.txn.txn.snd).toUniversalAddress(),d=new Uint8Array(r[1]),a=t.bignum.decode(r[2]);return n.push(t.createVAA("Uint8Array",{emitterChain:this.chain,emitterAddress:i,sequence:s,guardianSet:0,timestamp:0,consistencyLevel:0,nonce:Number(a),payload:d,signatures:[]})),n}static async maybeCreateStorageTx(e,n,r,s,i){const d=t.getApplicationAddress(r),a=s.address(),g=[];if(await u.storageAccountExists(e,a,r))return{accounts:[a],txs:g};i=i??await e.getTransactionParams().do();const l=t.makePaymentTxnWithSuggestedParamsFromObject({from:n,to:a,amount:K,suggestedParams:i});l.fee=l.fee*2,g.push({tx:l});const f=t.makeApplicationOptInTxnFromObject({from:a,appIndex:t.safeBigIntToNumber(r),rekeyTo:d,suggestedParams:i});return f.fee=0,g.push({tx:f,signer:{address:s.address(),signTxn:y=>Promise.resolve(t.signLogicSigTransaction(y,s).blob)}}),{accounts:[a],txs:g}}static async submitVAAHeader(e,n,r,s,i,d){d=d??await e.getTransactionParams().do();let a=[];const g=u.forMessageId(r,{chain:s.emitterChain,sequence:s.sequence,emitter:s.emitterAddress}),{accounts:l,txs:f}=await c.maybeCreateStorageTx(e,i,r,g,d);a.push(...f);const y=u.forGuardianSet(n,s.guardianSet),{accounts:[b],txs:T}=await c.maybeCreateStorageTx(e,i,n,y,d);a.push(...T);let x=[...l,b];const B=await u.decodeLocalState(e,n,b),h=t.keccak_256(s.hash),_=s.signatures.length,w=Math.ceil(_/c.MAX_SIGS_PER_TXN),k=20,C=new t.LogicSigAccount(c.ALGO_VERIFY);for(let M=0;M<w;M++){const v=M*c.MAX_SIGS_PER_TXN,S=s.signatures.slice(v,v+c.MAX_SIGS_PER_TXN),F=S.length*k,G=new Uint8Array(F);for(let A=0;A<S.length;A++){const P=S[A],Y=B.slice(P.guardianIndex*k+1,(P.guardianIndex+1)*k+1);G.set(Y,A*20)}const X=t.makeApplicationCallTxnFromObject({appArgs:[c.verifySigs,t.bytes.concat(...S.map(A=>t.bytes.concat(new Uint8Array([A.guardianIndex]),A.signature.encode()))),G,h],accounts:x,appIndex:t.safeBigIntToNumber(n),from:c.ALGO_VERIFY_HASH,onComplete:t.OnApplicationComplete.NoOpOC,suggestedParams:d});X.fee=0,a.push({tx:X,signer:{address:C.address(),signTxn:A=>Promise.resolve(t.signLogicSigTransaction(A,C).blob)}})}const E=t.makeApplicationCallTxnFromObject({appArgs:[c.verifyVaa,t.serialize(s)],accounts:x,appIndex:t.safeBigIntToNumber(n),from:i,onComplete:t.OnApplicationComplete.NoOpOC,suggestedParams:d});return E.fee=E.fee*(2+w),a.push({tx:E}),{accounts:x,txs:a}}createUnsignedTx(e,n,r=!0){return new j(e,this.network,this.chain,n,r)}};p(c,"MAX_SIGS_PER_TXN",6),p(c,"ALGO_VERIFY_HASH","EZATROXX2HISIRZDRGXW4LRQ46Z6IUJYYIHU3PJGP7P5IQDPKVX42N767A"),p(c,"ALGO_VERIFY",new Uint8Array([6,32,4,1,0,32,20,38,1,0,49,32,50,3,18,68,49,1,35,18,68,49,16,129,6,18,68,54,26,1,54,26,3,54,26,2,136,0,3,68,34,67,53,2,53,1,53,0,40,53,240,40,53,241,52,0,21,53,5,35,53,3,35,53,4,52,3,52,5,12,65,0,68,52,1,52,0,52,3,129,65,8,34,88,23,52,0,52,3,34,8,36,88,52,0,52,3,129,33,8,36,88,7,0,53,241,53,240,52,2,52,4,37,88,52,240,52,241,80,2,87,12,20,18,68,52,3,129,66,8,53,3,52,4,37,8,53,4,66,255,180,34,137])),p(c,"feeKey",t.b64.encode("MessageFee")),p(c,"verifyVaa",t.bytes.encode("verifyVAA")),p(c,"verifySigs",t.bytes.encode("verifySigs")),p(c,"publishMessage",t.bytes.encode("publishMessage"));let I=c;t.registerProtocol("Algorand","WormholeCore",I);const z=Object.freeze(Object.defineProperty({__proto__:null,AlgorandWormholeCore:I,BITS_PER_BYTE:L,BITS_PER_KEY:R,MAX_BITS:N,MAX_BYTES:V,MAX_BYTES_PER_KEY:U,MAX_KEYS:O,SEED_AMT:K,StorageLogicSig:u,varint:m},Symbol.toStringTag,{value:"Module"}));exports.AlgorandUnsignedTransaction=j;exports.AlgorandWormholeCore=I;exports.StorageLogicSig=u;exports.index=z;
|
|
1
|
+
"use strict";var D=Object.defineProperty;var q=(o,e,n)=>e in o?D(o,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):o[e]=n;var p=(o,e,n)=>q(o,typeof e!="symbol"?e+"":e,n);const t=require("./index-CDGktAjP.js"),H=require("./algorand-DFJZIdnH.js");class j{constructor(e,n,r,s,i=!1){p(this,"transaction");p(this,"network");p(this,"chain");p(this,"description");p(this,"parallelizable");this.transaction=e,this.network=n,this.chain=r,this.description=s,this.parallelizable=i}}const K=1002e3,O=15,U=127,L=8,R=U*L,V=U*O,N=L*V,m={_limit:127,encodingLength:o=>{let e=0;for(;o>=128;e++)o>>=7;return e+1},encode:(o,e,n)=>{if(typeof o=="bigint"&&(o=t.safeBigIntToNumber(o)),o<0)throw new RangeError("value must be unsigned");const r=m.encodingLength(o);if(e=e||new ArrayBuffer(r),n=n||0,e.byteLength<n+r)throw new RangeError("the buffer is too small to encode the number at the offset");const s=new Uint8Array(e,n);let i=0;for(;m._limit<o;)s[i++]=o&m._limit|128,o>>=7;return s[i]=Number(o),s},decode:(o,e=0)=>{let n=0,r=0,s;do{if(s=o[e+r],s===void 0)throw new RangeError("offset out of range");n+=(s&m._limit)<<r*7,r++}while(128<=s);return n}},u={forMessageId:(o,e)=>{const n=t.decodeAddress(t.getApplicationAddress(o)).publicKey,r=e.emitter.toUniversalAddress().toUint8Array(),s=t.bignum.toBytes(BigInt(t.toChainId(e.chain)),2),i=t.bytes.concat(s,r);return u.fromData({appId:o,appAddress:n,idx:e.sequence/BigInt(N),address:i})},forWrappedAsset:(o,e)=>{if(t.isNative(e.address))throw new Error("native asset cannot be a wrapped asset");const n=t.decodeAddress(t.getApplicationAddress(o)).publicKey;return u.fromData({appId:o,appAddress:n,idx:BigInt(t.toChainId(e.chain)),address:e.address.toUniversalAddress().toUint8Array()})},forNativeAsset:(o,e)=>{const n=t.decodeAddress(t.getApplicationAddress(o)).publicKey;return u.fromData({appId:o,appAddress:n,idx:e,address:t.bytes.encode("native")})},forGuardianSet:(o,e)=>{const n=t.decodeAddress(t.getApplicationAddress(o)).publicKey;return u.fromData({appId:o,appAddress:n,idx:BigInt(e),address:t.bytes.encode("guardian")})},forEmitter:(o,e)=>{const n=t.decodeAddress(t.getApplicationAddress(o)).publicKey;return u.fromData({appId:o,appAddress:n,idx:0n,address:e})},_encode:o=>typeof o=="bigint"?[t.hex.encode(m.encode(o))]:[t.hex.encode(m.encode(o.length)),t.hex.encode(o)],fromData:o=>{const e=["0620010181",...u._encode(o.idx),"4880",...u._encode(o.address),"483110810612443119221244311881",...u._encode(o.appId),"1244312080",...u._encode(o.appAddress),"124431018100124431093203124431153203124422"],n=t.hex.decode(e.join(""));return new t.LogicSigAccount(n)},decodeLocalState:async(o,e,n)=>{let r;try{const a=await o.accountApplicationInformation(n,t.safeBigIntToNumber(e)).do();r=t.AccountApplicationResponse.from_obj_for_encoding(a).appLocalState}catch{return new Uint8Array}const s=t.b64.encode("meta");let i=new Map;for(const a of r.keyValue){if(a.key===s)continue;const g=t.b64.decode(a.key)[0],l=t.b64.decode(a.value.bytes);i.set(g,l)}const d=[];for(let a=0;a<O;a++)i.has(a)&&d.push(i.get(a));return t.bytes.concat(...d)},checkBitsSet:async(o,e,n,r)=>{let s=!1,i;const d=await o.accountInformation(n).do(),g=t.Account.from_obj_for_encoding(d).appsLocalState;if(g&&g.forEach(h=>{BigInt(h.id)===e&&(i=h.keyValue)}),(i==null?void 0:i.length)===0)return s;const l=BigInt(N),f=BigInt(8),y=r/l*l,b=t.safeBigIntToNumber(r-y),T=Math.floor(b/R),x=Math.floor((b-T*R)/8),B=t.b64.encode(t.bignum.toBytes(T,1));return i==null||i.forEach(h=>{if(h.key===B){const _=t.dist.Buffer.from(h.value.bytes,"base64"),w=1<<t.safeBigIntToNumber(r%f);s=(_[x]&w)!=0;return}}),s},storageAccountExists:async(o,e,n)=>{try{const r=await o.accountApplicationInformation(e,t.safeBigIntToNumber(n)).do();return Object.keys(r).length>0}catch{}return!1}},c=class c{constructor(e,n,r,s){p(this,"network");p(this,"chain");p(this,"connection");p(this,"contracts");p(this,"chainId");p(this,"coreAppId");p(this,"coreAppAddress");p(this,"tokenBridgeAppId");p(this,"tokenBridgeAppAddress");if(this.network=e,this.chain=n,this.connection=r,this.contracts=s,this.chainId=t.toChainId(n),!s.coreBridge)throw new Error(`Core contract address for chain ${n} not found`);const i=BigInt(s.coreBridge);if(this.coreAppId=i,this.coreAppAddress=t.getApplicationAddress(i),!s.tokenBridge)throw new Error(`TokenBridge contract address for chain ${n} not found`);const d=BigInt(s.tokenBridge);this.tokenBridgeAppId=d,this.tokenBridgeAppAddress=t.getApplicationAddress(d)}getGuardianSet(e){throw new Error("Method not implemented.")}async*verifyMessage(e,n,r){const s=new t.AlgorandAddress(e).toString(),i=await c.submitVAAHeader(this.connection,this.coreAppId,r??this.coreAppId,n,s);for(const d of i.txs)yield this.createUnsignedTx(d,"Core.verifyMessage")}static async fromRpc(e,n){const[r,s]=await H.AlgorandPlatform.chainFromRpc(e),i=n[s];if(i.network!==r)throw new Error(`Network mismatch: ${i.network} !== ${r}`);return new c(r,s,e,i.contracts)}async*publishMessage(e,n){const r=new t.AlgorandAddress(e),s=r.toString(),i=await this.connection.getTransactionParams().do(),d=u.forEmitter(this.coreAppId,r.toUint8Array()),{accounts:a,txs:g}=await c.maybeCreateStorageTx(this.connection,s,this.coreAppId,d,i);for(const f of g)yield this.createUnsignedTx(f,"Core.publishMessage",!0);const l=t.makeApplicationCallTxnFromObject({from:s,appIndex:t.safeBigIntToNumber(this.coreAppId),appArgs:[c.publishMessage,n,t.bignum.toBytes(0n,8)],accounts:a,onComplete:t.OnApplicationComplete.NoOpOC,suggestedParams:i});yield this.createUnsignedTx({tx:l},"Core.publishMessage",!0)}async getMessageFee(){var s;const e=await this.connection.getApplicationByID(t.safeBigIntToNumber(this.coreAppId)).do(),r=(s=t.Application.from_obj_for_encoding(e).params.globalState)==null?void 0:s.find(i=>i.key===c.feeKey);return r?BigInt(r.value.uint):0n}async getGuardianSetIndex(){throw new Error("Not implemented")}async parseTransaction(e){const n=await this.connection.pendingTransactionInformation(e).do(),r=t.PendingTransactionResponse.from_obj_for_encoding(n);return this.parseTx(r).map(s=>({chain:s.emitterChain,emitter:s.emitterAddress,sequence:s.sequence}))}async parseMessages(e){const n=await this.connection.pendingTransactionInformation(e).do(),r=t.PendingTransactionResponse.from_obj_for_encoding(n);return this.parseTx(r)}parseTx(e){const n=[];if(e.innerTxns&&e.innerTxns.length>0&&n.push(...e.innerTxns.flatMap(g=>this.parseTx(g))),BigInt(e.txn.txn.apid??0)!==this.coreAppId||!e.logs||e.logs.length===0)return n;const r=e.txn.txn.apaa??[];if(r.length!==3||!t.bytes.equals(new Uint8Array(r[0]),c.publishMessage))return n;const s=t.bignum.decode(e.logs[0]),i=new t.AlgorandAddress(e.txn.txn.snd).toUniversalAddress(),d=new Uint8Array(r[1]),a=t.bignum.decode(r[2]);return n.push(t.createVAA("Uint8Array",{emitterChain:this.chain,emitterAddress:i,sequence:s,guardianSet:0,timestamp:0,consistencyLevel:0,nonce:Number(a),payload:d,signatures:[]})),n}static async maybeCreateStorageTx(e,n,r,s,i){const d=t.getApplicationAddress(r),a=s.address(),g=[];if(await u.storageAccountExists(e,a,r))return{accounts:[a],txs:g};i=i??await e.getTransactionParams().do();const l=t.makePaymentTxnWithSuggestedParamsFromObject({from:n,to:a,amount:K,suggestedParams:i});l.fee=l.fee*2,g.push({tx:l});const f=t.makeApplicationOptInTxnFromObject({from:a,appIndex:t.safeBigIntToNumber(r),rekeyTo:d,suggestedParams:i});return f.fee=0,g.push({tx:f,signer:{address:s.address(),signTxn:y=>Promise.resolve(t.signLogicSigTransaction(y,s).blob)}}),{accounts:[a],txs:g}}static async submitVAAHeader(e,n,r,s,i,d){d=d??await e.getTransactionParams().do();let a=[];const g=u.forMessageId(r,{chain:s.emitterChain,sequence:s.sequence,emitter:s.emitterAddress}),{accounts:l,txs:f}=await c.maybeCreateStorageTx(e,i,r,g,d);a.push(...f);const y=u.forGuardianSet(n,s.guardianSet),{accounts:[b],txs:T}=await c.maybeCreateStorageTx(e,i,n,y,d);a.push(...T);let x=[...l,b];const B=await u.decodeLocalState(e,n,b),h=t.keccak_256(s.hash),_=s.signatures.length,w=Math.ceil(_/c.MAX_SIGS_PER_TXN),k=20,C=new t.LogicSigAccount(c.ALGO_VERIFY);for(let M=0;M<w;M++){const v=M*c.MAX_SIGS_PER_TXN,S=s.signatures.slice(v,v+c.MAX_SIGS_PER_TXN),F=S.length*k,G=new Uint8Array(F);for(let A=0;A<S.length;A++){const P=S[A],Y=B.slice(P.guardianIndex*k+1,(P.guardianIndex+1)*k+1);G.set(Y,A*20)}const X=t.makeApplicationCallTxnFromObject({appArgs:[c.verifySigs,t.bytes.concat(...S.map(A=>t.bytes.concat(new Uint8Array([A.guardianIndex]),A.signature.encode()))),G,h],accounts:x,appIndex:t.safeBigIntToNumber(n),from:c.ALGO_VERIFY_HASH,onComplete:t.OnApplicationComplete.NoOpOC,suggestedParams:d});X.fee=0,a.push({tx:X,signer:{address:C.address(),signTxn:A=>Promise.resolve(t.signLogicSigTransaction(A,C).blob)}})}const E=t.makeApplicationCallTxnFromObject({appArgs:[c.verifyVaa,t.serialize(s)],accounts:x,appIndex:t.safeBigIntToNumber(n),from:i,onComplete:t.OnApplicationComplete.NoOpOC,suggestedParams:d});return E.fee=E.fee*(2+w),a.push({tx:E}),{accounts:x,txs:a}}createUnsignedTx(e,n,r=!0){return new j(e,this.network,this.chain,n,r)}};p(c,"MAX_SIGS_PER_TXN",6),p(c,"ALGO_VERIFY_HASH","EZATROXX2HISIRZDRGXW4LRQ46Z6IUJYYIHU3PJGP7P5IQDPKVX42N767A"),p(c,"ALGO_VERIFY",new Uint8Array([6,32,4,1,0,32,20,38,1,0,49,32,50,3,18,68,49,1,35,18,68,49,16,129,6,18,68,54,26,1,54,26,3,54,26,2,136,0,3,68,34,67,53,2,53,1,53,0,40,53,240,40,53,241,52,0,21,53,5,35,53,3,35,53,4,52,3,52,5,12,65,0,68,52,1,52,0,52,3,129,65,8,34,88,23,52,0,52,3,34,8,36,88,52,0,52,3,129,33,8,36,88,7,0,53,241,53,240,52,2,52,4,37,88,52,240,52,241,80,2,87,12,20,18,68,52,3,129,66,8,53,3,52,4,37,8,53,4,66,255,180,34,137])),p(c,"feeKey",t.b64.encode("MessageFee")),p(c,"verifyVaa",t.bytes.encode("verifyVAA")),p(c,"verifySigs",t.bytes.encode("verifySigs")),p(c,"publishMessage",t.bytes.encode("publishMessage"));let I=c;t.registerProtocol("Algorand","WormholeCore",I);const z=Object.freeze(Object.defineProperty({__proto__:null,AlgorandWormholeCore:I,BITS_PER_BYTE:L,BITS_PER_KEY:R,MAX_BITS:N,MAX_BYTES:V,MAX_BYTES_PER_KEY:U,MAX_KEYS:O,SEED_AMT:K,StorageLogicSig:u,varint:m},Symbol.toStringTag,{value:"Module"}));exports.AlgorandUnsignedTransaction=j;exports.AlgorandWormholeCore=I;exports.StorageLogicSig=u;exports.index=z;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
var d = Object.defineProperty;
|
|
2
2
|
var h = (i, e, r) => e in i ? d(i, e, { enumerable: !0, configurable: !0, writable: !0, value: r }) : i[e] = r;
|
|
3
3
|
var o = (i, e, r) => h(i, typeof e != "symbol" ? e + "" : e, r);
|
|
4
|
-
import { a8 as m, cL as w, Q as g, bR as p } from "./index-
|
|
5
|
-
import { S as u } from "./sui-
|
|
4
|
+
import { a8 as m, cL as w, Q as g, bR as p } from "./index-CjwA7HmM.mjs";
|
|
5
|
+
import { S as u } from "./sui-WPdV6u03.mjs";
|
|
6
6
|
class c {
|
|
7
7
|
constructor(e, r, t, n) {
|
|
8
8
|
o(this, "network");
|
|
@@ -89948,7 +89948,7 @@ const { chains: chains$3 } = CONFIG.MAINNET, MAINNET_CHAINS = {
|
|
|
89948
89948
|
}
|
|
89949
89949
|
return T;
|
|
89950
89950
|
}
|
|
89951
|
-
}, capitalize$1 = (T) => T[0].toUpperCase() + T.slice(1), __vite_import_meta_env__$2 = { BASE_URL: "/", DEV: !1, MODE: "production", PROD: !0, REACT_APP_CONNECT_GIT_HASH: "
|
|
89951
|
+
}, capitalize$1 = (T) => T[0].toUpperCase() + T.slice(1), __vite_import_meta_env__$2 = { BASE_URL: "/", DEV: !1, MODE: "production", PROD: !0, REACT_APP_CONNECT_GIT_HASH: "d90abfc17d7f6dabad6e4eaf30e06236336df324", REACT_APP_CONNECT_VERSION: "1.0.0-beta.5-development", SSR: !1 }, {
|
|
89952
89952
|
REACT_APP_ETHEREUM_RPC,
|
|
89953
89953
|
REACT_APP_SOLANA_RPC,
|
|
89954
89954
|
REACT_APP_POLYGON_RPC,
|
|
@@ -91644,7 +91644,7 @@ const { chains: chains$3 } = CONFIG.MAINNET, MAINNET_CHAINS = {
|
|
|
91644
91644
|
icon: Icon.MANTLE,
|
|
91645
91645
|
maxBlockSearch: 2e3
|
|
91646
91646
|
}
|
|
91647
|
-
}, __vite_import_meta_env__$1 = { BASE_URL: "/", DEV: !1, MODE: "production", PROD: !0, REACT_APP_CONNECT_GIT_HASH: "
|
|
91647
|
+
}, __vite_import_meta_env__$1 = { BASE_URL: "/", DEV: !1, MODE: "production", PROD: !0, REACT_APP_CONNECT_GIT_HASH: "d90abfc17d7f6dabad6e4eaf30e06236336df324", REACT_APP_CONNECT_VERSION: "1.0.0-beta.5-development", SSR: !1 }, {
|
|
91648
91648
|
REACT_APP_SEPOLIA_RPC,
|
|
91649
91649
|
REACT_APP_BSC_TESTNET_RPC,
|
|
91650
91650
|
REACT_APP_FUJI_RPC,
|
|
@@ -92288,7 +92288,7 @@ const { chains: chains$3 } = CONFIG.MAINNET, MAINNET_CHAINS = {
|
|
|
92288
92288
|
icon: Icon.OSMO,
|
|
92289
92289
|
maxBlockSearch: 0
|
|
92290
92290
|
}
|
|
92291
|
-
}, __vite_import_meta_env__ = { BASE_URL: "/", DEV: !1, MODE: "production", PROD: !0, REACT_APP_CONNECT_GIT_HASH: "
|
|
92291
|
+
}, __vite_import_meta_env__ = { BASE_URL: "/", DEV: !1, MODE: "production", PROD: !0, REACT_APP_CONNECT_GIT_HASH: "d90abfc17d7f6dabad6e4eaf30e06236336df324", REACT_APP_CONNECT_VERSION: "1.0.0-beta.5-development", SSR: !1 }, {
|
|
92292
92292
|
REACT_APP_ETHEREUM_DEVNET_RPC,
|
|
92293
92293
|
REACT_APP_OSMOSIS_DEVNET_RPC,
|
|
92294
92294
|
REACT_APP_WORMCHAIN_DEVNET_RPC,
|
|
@@ -92352,7 +92352,7 @@ const { chains: chains$3 } = CONFIG.MAINNET, MAINNET_CHAINS = {
|
|
|
92352
92352
|
index: 0,
|
|
92353
92353
|
keys: ["0x13947Bd48b18E53fdAeEe77F3473391aC727C638"]
|
|
92354
92354
|
}
|
|
92355
|
-
}, WORMSCAN = "https://wormholescan.io/#/", CONNECT_VERSION = "1.0.0-beta.
|
|
92355
|
+
}, WORMSCAN = "https://wormholescan.io/#/", CONNECT_VERSION = "1.0.0-beta.5-development", CONNECT_GIT_HASH = "d90abfc17d7f6dabad6e4eaf30e06236336df324", CHAIN_ORDER = [
|
|
92356
92356
|
"Ethereum",
|
|
92357
92357
|
"Solana",
|
|
92358
92358
|
"Arbitrum",
|
|
@@ -97951,7 +97951,7 @@ class SDKConverter {
|
|
|
97951
97951
|
);
|
|
97952
97952
|
}
|
|
97953
97953
|
}
|
|
97954
|
-
const evm = async () => (await import("./evm-
|
|
97954
|
+
const evm = async () => (await import("./evm-kynWl8-i.mjs")).default, solana$1 = async () => (await import("./solana-Bkh_veaR.mjs")).default, aptos$1 = async () => (await import("./aptos-DoqExVYR.mjs").then((T) => T.a)).default, sui = async () => (await import("./sui-WPdV6u03.mjs").then((T) => T.s)).default, cosmwasm = async () => (await import("./cosmwasm-DvwgrLe6.mjs").then((T) => T.Q)).default, algorand = async () => (await import("./algorand-qEY4HHOc.mjs").then((T) => T.a)).default;
|
|
97955
97955
|
var eventemitter3 = { exports: {} };
|
|
97956
97956
|
(function(T) {
|
|
97957
97957
|
var e = Object.prototype.hasOwnProperty, C = "~";
|
|
@@ -98294,14 +98294,14 @@ const walletConnection = {
|
|
|
98294
98294
|
if (C.getNetworkInfo().chainId !== T) {
|
|
98295
98295
|
if ($.context === Context.ETH)
|
|
98296
98296
|
try {
|
|
98297
|
-
const { switchChain: J } = await import("./evm-
|
|
98297
|
+
const { switchChain: J } = await import("./evm-CkxKsuQ-.mjs").then((ee) => ee.j);
|
|
98298
98298
|
await J(C, T);
|
|
98299
98299
|
} catch (J) {
|
|
98300
98300
|
if (J instanceof NotSupported) return;
|
|
98301
98301
|
throw J;
|
|
98302
98302
|
}
|
|
98303
98303
|
if ($.context === Context.COSMOS) {
|
|
98304
|
-
const { switchChain: J } = await import("./cosmos-
|
|
98304
|
+
const { switchChain: J } = await import("./cosmos-0un-E2-0.mjs");
|
|
98305
98305
|
await J(C, T);
|
|
98306
98306
|
}
|
|
98307
98307
|
return C.getAddress();
|
|
@@ -98314,7 +98314,7 @@ const walletConnection = {
|
|
|
98314
98314
|
if (!J)
|
|
98315
98315
|
throw new Error("wallet is undefined");
|
|
98316
98316
|
if (V.context === Context.ETH) {
|
|
98317
|
-
const { signAndSendTransaction: ee } = await import("./evm-
|
|
98317
|
+
const { signAndSendTransaction: ee } = await import("./evm-CkxKsuQ-.mjs").then((ne) => ne.j);
|
|
98318
98318
|
return await ee(
|
|
98319
98319
|
e,
|
|
98320
98320
|
J,
|
|
@@ -98322,20 +98322,20 @@ const walletConnection = {
|
|
|
98322
98322
|
$
|
|
98323
98323
|
);
|
|
98324
98324
|
} else if (V.context === Context.SOLANA) {
|
|
98325
|
-
const { signAndSendTransaction: ee } = await import("./solana-
|
|
98325
|
+
const { signAndSendTransaction: ee } = await import("./solana-CP3uz3z9.mjs");
|
|
98326
98326
|
return await ee(
|
|
98327
98327
|
e,
|
|
98328
98328
|
J,
|
|
98329
98329
|
$
|
|
98330
98330
|
);
|
|
98331
98331
|
} else if (V.context === Context.SUI) {
|
|
98332
|
-
const { signAndSendTransaction: ee } = await import("./sui-
|
|
98332
|
+
const { signAndSendTransaction: ee } = await import("./sui-C73zQuHR.mjs");
|
|
98333
98333
|
return (await ee(
|
|
98334
98334
|
e,
|
|
98335
98335
|
J
|
|
98336
98336
|
)).id;
|
|
98337
98337
|
} else if (V.context === Context.APTOS) {
|
|
98338
|
-
const { signAndSendTransaction: ee } = await import("./aptos-
|
|
98338
|
+
const { signAndSendTransaction: ee } = await import("./aptos-BCuZuiBG.mjs");
|
|
98339
98339
|
return (await ee(
|
|
98340
98340
|
e,
|
|
98341
98341
|
J
|
|
@@ -98357,39 +98357,39 @@ const walletConnection = {
|
|
|
98357
98357
|
if (T === void 0)
|
|
98358
98358
|
return [];
|
|
98359
98359
|
if (T.context === Context.ETH) {
|
|
98360
|
-
const { wallets: e } = await import("./evm-
|
|
98360
|
+
const { wallets: e } = await import("./evm-CkxKsuQ-.mjs").then((C) => C.j);
|
|
98361
98361
|
return Object.values(mapWallets(e, Context.ETH));
|
|
98362
98362
|
} else if (T.context === Context.SOLANA) {
|
|
98363
|
-
const { fetchOptions: e } = await import("./solana-
|
|
98363
|
+
const { fetchOptions: e } = await import("./solana-CP3uz3z9.mjs"), C = e();
|
|
98364
98364
|
return Object.values(mapWallets(C, Context.SOLANA));
|
|
98365
98365
|
} else if (T.context === Context.SUI) {
|
|
98366
|
-
const C = await (await import("./sui-
|
|
98366
|
+
const C = await (await import("./sui-C73zQuHR.mjs")).fetchOptions();
|
|
98367
98367
|
return Object.values(mapWallets(C, Context.SUI));
|
|
98368
98368
|
} else if (T.context === Context.APTOS) {
|
|
98369
|
-
const C = (await import("./aptos-
|
|
98369
|
+
const C = (await import("./aptos-BCuZuiBG.mjs")).fetchOptions();
|
|
98370
98370
|
return Object.values(mapWallets(C, Context.APTOS));
|
|
98371
98371
|
} else if (T.context === Context.SEI) {
|
|
98372
|
-
const C = await (await import("./sei-
|
|
98372
|
+
const C = await (await import("./sei-CnR3Aw9g.mjs")).fetchOptions();
|
|
98373
98373
|
return Object.values(mapWallets(C, Context.SEI));
|
|
98374
98374
|
} else if (T.context === Context.COSMOS)
|
|
98375
98375
|
if (T.key === "Evmos") {
|
|
98376
98376
|
const {
|
|
98377
98377
|
wallets: { cosmosEvm: e }
|
|
98378
|
-
} = await import("./cosmos-
|
|
98378
|
+
} = await import("./cosmos-0un-E2-0.mjs");
|
|
98379
98379
|
return Object.values(
|
|
98380
98380
|
mapWallets(e, Context.COSMOS, ["OKX Wallet"])
|
|
98381
98381
|
);
|
|
98382
98382
|
} else if (T.key === "Injective") {
|
|
98383
98383
|
const {
|
|
98384
98384
|
wallets: { cosmosEvm: e }
|
|
98385
|
-
} = await import("./cosmos-
|
|
98385
|
+
} = await import("./cosmos-0un-E2-0.mjs");
|
|
98386
98386
|
return Object.values(
|
|
98387
98387
|
mapWallets(e, Context.COSMOS, ["OKX Wallet"])
|
|
98388
98388
|
);
|
|
98389
98389
|
} else {
|
|
98390
98390
|
const {
|
|
98391
98391
|
wallets: { cosmos: e }
|
|
98392
|
-
} = await import("./cosmos-
|
|
98392
|
+
} = await import("./cosmos-0un-E2-0.mjs");
|
|
98393
98393
|
return Object.values(mapWallets(e, Context.COSMOS));
|
|
98394
98394
|
}
|
|
98395
98395
|
return [];
|
|
@@ -110903,7 +110903,7 @@ function scale(T, e, C) {
|
|
|
110903
110903
|
registerProtocol(_platform$1, "Ntt", EvmNtt);
|
|
110904
110904
|
class SolanaChain extends ChainContext {
|
|
110905
110905
|
async getTokenAccount(e, C) {
|
|
110906
|
-
const { getAssociatedTokenAddress: $ } = await import("./index-
|
|
110906
|
+
const { getAssociatedTokenAddress: $ } = await import("./index-DojwGTf0.mjs"), V = new SolanaAddress(C).unwrap(), J = new SolanaAddress(e).unwrap(), ee = await $(V, J);
|
|
110907
110907
|
return {
|
|
110908
110908
|
chain: this.chain,
|
|
110909
110909
|
address: new SolanaAddress(ee.toString())
|
|
@@ -148985,7 +148985,8 @@ const TokenItem$1 = memo(TokenItem), useStyles$i = makeStyles()((T) => ({
|
|
|
148985
148985
|
}) => {
|
|
148986
148986
|
const [$, V] = useState(T), J = c(e, INPUT_DEBOUNCE), ee = useCallback(
|
|
148987
148987
|
(te) => {
|
|
148988
|
-
|
|
148988
|
+
const ne = Number(te.target.value);
|
|
148989
|
+
isNaN(ne) || ne < 0 || (V(te.target.value), J(te.target.value));
|
|
148989
148990
|
},
|
|
148990
148991
|
[]
|
|
148991
148992
|
);
|
|
@@ -149014,15 +149015,6 @@ const TokenItem$1 = memo(TokenItem), useStyles$i = makeStyles()((T) => ({
|
|
|
149014
149015
|
},
|
|
149015
149016
|
balance: {
|
|
149016
149017
|
color: T.palette.text.secondary
|
|
149017
|
-
},
|
|
149018
|
-
amountInput: {
|
|
149019
|
-
"&::-webkit-outer-spin-button, &::-webkit-inner-spin-button": {
|
|
149020
|
-
webkitAppearance: "none",
|
|
149021
|
-
margin: 0
|
|
149022
|
-
},
|
|
149023
|
-
'&[type="number"]': {
|
|
149024
|
-
mozAppearance: "textfield"
|
|
149025
|
-
}
|
|
149026
149018
|
}
|
|
149027
149019
|
})), AmountInput = (T) => {
|
|
149028
149020
|
const { classes: e } = useStyles$f(), C = useDispatch(), $ = useTheme$1(), { sending: V } = useSelector(
|
|
@@ -149109,9 +149101,7 @@ const TokenItem$1 = memo(TokenItem), useStyles$i = makeStyles()((T) => ({
|
|
|
149109
149101
|
endAdornment: /* @__PURE__ */ jsxRuntimeExports.jsx(InputAdornment, { position: "end", children: /* @__PURE__ */ jsxRuntimeExports.jsxs(Stack, { alignItems: "end", children: [
|
|
149110
149102
|
fe,
|
|
149111
149103
|
ue
|
|
149112
|
-
] }) })
|
|
149113
|
-
type: "number",
|
|
149114
|
-
classes: { input: e.amountInput }
|
|
149104
|
+
] }) })
|
|
149115
149105
|
}
|
|
149116
149106
|
}
|
|
149117
149107
|
) }) }),
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
var Zr = Object.defineProperty;
|
|
2
2
|
var Qr = (t, e, r) => e in t ? Zr(t, e, { enumerable: !0, configurable: !0, writable: !0, value: r }) : t[e] = r;
|
|
3
3
|
var C = (t, e, r) => Qr(t, typeof e != "symbol" ? e + "" : e, r);
|
|
4
|
-
import { ac as Yr, F as en, cS as ft, L as tn, cT as hr, cU as ke, aj as rn, c7 as nt, c8 as nn, c9 as nr, a8 as ce, Q as ge, p as oe, bF as sn, ce as ir, cb as an, cV as on, bM as ht, N as cn, u as De, a5 as un, cp as sr, cW as dn, O as ar, bR as gr } from "./index-
|
|
5
|
-
import { g as tt, a as gt, i as Ve, S as Y, b as H, p as ln, c as fn, d as it, u as ze, e as pr, f as hn, h as He, j as gn, k as pn } from "./sui-
|
|
6
|
-
import "./index-
|
|
4
|
+
import { ac as Yr, F as en, cS as ft, L as tn, cT as hr, cU as ke, aj as rn, c7 as nt, c8 as nn, c9 as nr, a8 as ce, Q as ge, p as oe, bF as sn, ce as ir, cb as an, cV as on, bM as ht, N as cn, u as De, a5 as un, cp as sr, cW as dn, O as ar, bR as gr } from "./index-CjwA7HmM.mjs";
|
|
5
|
+
import { g as tt, a as gt, i as Ve, S as Y, b as H, p as ln, c as fn, d as it, u as ze, e as pr, f as hn, h as He, j as gn, k as pn } from "./sui-WPdV6u03.mjs";
|
|
6
|
+
import "./index-Cb47usqO.mjs";
|
|
7
7
|
class yr {
|
|
8
8
|
constructor(e, r, n, i, s = !1) {
|
|
9
9
|
C(this, "transaction");
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const U=require("./index-BZ7LatAr.js"),mr=U.getAugmentedNamespace(U.sha256$1),br=U.getAugmentedNamespace(U.sha3$1);var L=Object.prototype.toString,nr=function(r){var e=L.call(r),t=e==="[object Arguments]";return t||(t=e!=="[object Array]"&&r!==null&&typeof r=="object"&&typeof r.length=="number"&&r.length>=0&&L.call(r.callee)==="[object Function]"),t},N,z;function Ar(){if(z)return N;z=1;var n;if(!Object.keys){var r=Object.prototype.hasOwnProperty,e=Object.prototype.toString,t=nr,o=Object.prototype.propertyIsEnumerable,i=!o.call({toString:null},"toString"),s=o.call(function(){},"prototype"),p=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],u=function(l){var y=l.constructor;return y&&y.prototype===l},v={$applicationCache:!0,$console:!0,$external:!0,$frame:!0,$frameElement:!0,$frames:!0,$innerHeight:!0,$innerWidth:!0,$onmozfullscreenchange:!0,$onmozfullscreenerror:!0,$outerHeight:!0,$outerWidth:!0,$pageXOffset:!0,$pageYOffset:!0,$parent:!0,$scrollLeft:!0,$scrollTop:!0,$scrollX:!0,$scrollY:!0,$self:!0,$webkitIndexedDB:!0,$webkitStorageInfo:!0,$window:!0},c=function(){if(typeof window>"u")return!1;for(var l in window)try{if(!v["$"+l]&&r.call(window,l)&&window[l]!==null&&typeof window[l]=="object")try{u(window[l])}catch{return!0}}catch{return!0}return!1}(),g=function(l){if(typeof window>"u"||!c)return u(l);try{return u(l)}catch{return!1}};n=function(y){var d=y!==null&&typeof y=="object",h=e.call(y)==="[object Function]",K=t(y),gr=d&&e.call(y)==="[object String]",O=[];if(!d&&!h&&!K)throw new TypeError("Object.keys called on a non-object");var dr=s&&h;if(gr&&y.length>0&&!r.call(y,0))for(var D=0;D<y.length;++D)O.push(String(D));if(K&&y.length>0)for(var x=0;x<y.length;++x)O.push(String(x));else for(var k in y)!(dr&&k==="prototype")&&r.call(y,k)&&O.push(String(k));if(i)for(var hr=g(y),E=0;E<p.length;++E)!(hr&&p[E]==="constructor")&&r.call(y,p[E])&&O.push(p[E]);return O}}return N=n,N}var Pr=Array.prototype.slice,Sr=nr,Y=Object.keys,F=Y?function(r){return Y(r)}:Ar(),H=Object.keys;F.shim=function(){if(Object.keys){var r=function(){var e=Object.keys(arguments);return e&&e.length===arguments.length}(1,2);r||(Object.keys=function(t){return Sr(t)?H(Pr.call(t)):H(t)})}else Object.keys=F;return Object.keys||F};var ar=F,wr=Error,$r=EvalError,Or=RangeError,Er=ReferenceError,ir=SyntaxError,C=TypeError,Ir=URIError,yr=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var r={},e=Symbol("test"),t=Object(e);if(typeof e=="string"||Object.prototype.toString.call(e)!=="[object Symbol]"||Object.prototype.toString.call(t)!=="[object Symbol]")return!1;var o=42;r[e]=o;for(e in r)return!1;if(typeof Object.keys=="function"&&Object.keys(r).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(r).length!==0)return!1;var i=Object.getOwnPropertySymbols(r);if(i.length!==1||i[0]!==e||!Object.prototype.propertyIsEnumerable.call(r,e))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var s=Object.getOwnPropertyDescriptor(r,e);if(s.value!==o||s.enumerable!==!0)return!1}return!0},X=typeof Symbol<"u"&&Symbol,Fr=yr,Rr=function(){return typeof X!="function"||typeof Symbol!="function"||typeof X("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:Fr()},T={__proto__:null,foo:{}},jr=Object,Ur=function(){return{__proto__:T}.foo===T.foo&&!(T instanceof jr)},_r="Function.prototype.bind called on incompatible ",Br=Object.prototype.toString,Dr=Math.max,xr="[object Function]",Q=function(r,e){for(var t=[],o=0;o<r.length;o+=1)t[o]=r[o];for(var i=0;i<e.length;i+=1)t[i+r.length]=e[i];return t},kr=function(r,e){for(var t=[],o=e,i=0;o<r.length;o+=1,i+=1)t[i]=r[o];return t},Nr=function(n,r){for(var e="",t=0;t<n.length;t+=1)e+=n[t],t+1<n.length&&(e+=r);return e},Tr=function(r){var e=this;if(typeof e!="function"||Br.apply(e)!==xr)throw new TypeError(_r+e);for(var t=kr(arguments,1),o,i=function(){if(this instanceof o){var c=e.apply(this,Q(t,arguments));return Object(c)===c?c:this}return e.apply(r,Q(t,arguments))},s=Dr(0,e.length-t.length),p=[],u=0;u<s;u++)p[u]="$"+u;if(o=Function("binder","return function ("+Nr(p,",")+"){ return binder.apply(this,arguments); }")(i),e.prototype){var v=function(){};v.prototype=e.prototype,o.prototype=new v,v.prototype=null}return o},Gr=Tr,q=Function.prototype.bind||Gr,Wr=Function.prototype.call,Mr=Object.prototype.hasOwnProperty,Cr=q,qr=Cr.call(Wr,Mr),a,Jr=wr,Vr=$r,Kr=Or,Lr=Er,$=ir,w=C,zr=Ir,pr=Function,G=function(n){try{return pr('"use strict"; return ('+n+").constructor;")()}catch{}},m=Object.getOwnPropertyDescriptor;if(m)try{m({},"")}catch{m=null}var W=function(){throw new w},Yr=m?function(){try{return arguments.callee,W}catch{try{return m(arguments,"callee").get}catch{return W}}}():W,A=Rr(),Hr=Ur(),f=Object.getPrototypeOf||(Hr?function(n){return n.__proto__}:null),S={},Xr=typeof Uint8Array>"u"||!f?a:f(Uint8Array),b={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?a:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?a:ArrayBuffer,"%ArrayIteratorPrototype%":A&&f?f([][Symbol.iterator]()):a,"%AsyncFromSyncIteratorPrototype%":a,"%AsyncFunction%":S,"%AsyncGenerator%":S,"%AsyncGeneratorFunction%":S,"%AsyncIteratorPrototype%":S,"%Atomics%":typeof Atomics>"u"?a:Atomics,"%BigInt%":typeof BigInt>"u"?a:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?a:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?a:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?a:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Jr,"%eval%":eval,"%EvalError%":Vr,"%Float32Array%":typeof Float32Array>"u"?a:Float32Array,"%Float64Array%":typeof Float64Array>"u"?a:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?a:FinalizationRegistry,"%Function%":pr,"%GeneratorFunction%":S,"%Int8Array%":typeof Int8Array>"u"?a:Int8Array,"%Int16Array%":typeof Int16Array>"u"?a:Int16Array,"%Int32Array%":typeof Int32Array>"u"?a:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":A&&f?f(f([][Symbol.iterator]())):a,"%JSON%":typeof JSON=="object"?JSON:a,"%Map%":typeof Map>"u"?a:Map,"%MapIteratorPrototype%":typeof Map>"u"||!A||!f?a:f(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?a:Promise,"%Proxy%":typeof Proxy>"u"?a:Proxy,"%RangeError%":Kr,"%ReferenceError%":Lr,"%Reflect%":typeof Reflect>"u"?a:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?a:Set,"%SetIteratorPrototype%":typeof Set>"u"||!A||!f?a:f(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?a:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":A&&f?f(""[Symbol.iterator]()):a,"%Symbol%":A?Symbol:a,"%SyntaxError%":$,"%ThrowTypeError%":Yr,"%TypedArray%":Xr,"%TypeError%":w,"%Uint8Array%":typeof Uint8Array>"u"?a:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?a:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?a:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?a:Uint32Array,"%URIError%":zr,"%WeakMap%":typeof WeakMap>"u"?a:WeakMap,"%WeakRef%":typeof WeakRef>"u"?a:WeakRef,"%WeakSet%":typeof WeakSet>"u"?a:WeakSet};if(f)try{null.error}catch(n){var Qr=f(f(n));b["%Error.prototype%"]=Qr}var Zr=function n(r){var e;if(r==="%AsyncFunction%")e=G("async function () {}");else if(r==="%GeneratorFunction%")e=G("function* () {}");else if(r==="%AsyncGeneratorFunction%")e=G("async function* () {}");else if(r==="%AsyncGenerator%"){var t=n("%AsyncGeneratorFunction%");t&&(e=t.prototype)}else if(r==="%AsyncIteratorPrototype%"){var o=n("%AsyncGenerator%");o&&f&&(e=f(o.prototype))}return b[r]=e,e},Z={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},I=q,_=qr,re=I.call(Function.call,Array.prototype.concat),ee=I.call(Function.apply,Array.prototype.splice),rr=I.call(Function.call,String.prototype.replace),B=I.call(Function.call,String.prototype.slice),te=I.call(Function.call,RegExp.prototype.exec),oe=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,ne=/\\(\\)?/g,ae=function(r){var e=B(r,0,1),t=B(r,-1);if(e==="%"&&t!=="%")throw new $("invalid intrinsic syntax, expected closing `%`");if(t==="%"&&e!=="%")throw new $("invalid intrinsic syntax, expected opening `%`");var o=[];return rr(r,oe,function(i,s,p,u){o[o.length]=p?rr(u,ne,"$1"):s||i}),o},ie=function(r,e){var t=r,o;if(_(Z,t)&&(o=Z[t],t="%"+o[0]+"%"),_(b,t)){var i=b[t];if(i===S&&(i=Zr(t)),typeof i>"u"&&!e)throw new w("intrinsic "+r+" exists, but is not available. Please file an issue!");return{alias:o,name:t,value:i}}throw new $("intrinsic "+r+" does not exist!")},J=function(r,e){if(typeof r!="string"||r.length===0)throw new w("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof e!="boolean")throw new w('"allowMissing" argument must be a boolean');if(te(/^%?[^%]*%?$/,r)===null)throw new $("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var t=ae(r),o=t.length>0?t[0]:"",i=ie("%"+o+"%",e),s=i.name,p=i.value,u=!1,v=i.alias;v&&(o=v[0],ee(t,re([0,1],v)));for(var c=1,g=!0;c<t.length;c+=1){var l=t[c],y=B(l,0,1),d=B(l,-1);if((y==='"'||y==="'"||y==="`"||d==='"'||d==="'"||d==="`")&&y!==d)throw new $("property names with quotes must have matching quotes");if((l==="constructor"||!g)&&(u=!0),o+="."+l,s="%"+o+"%",_(b,s))p=b[s];else if(p!=null){if(!(l in p)){if(!e)throw new w("base intrinsic for "+r+" exists, but the property is not available.");return}if(m&&c+1>=t.length){var h=m(p,l);g=!!h,g&&"get"in h&&!("originalValue"in h.get)?p=h.get:p=p[l]}else g=_(p,l),p=p[l];g&&!u&&(b[s]=p)}}return p},ye=J,R=ye("%Object.defineProperty%",!0)||!1;if(R)try{R({},"a",{value:1})}catch{R=!1}var V=R,pe=J,j=pe("%Object.getOwnPropertyDescriptor%",!0);if(j)try{j([],"length")}catch{j=null}var lr=j,er=V,le=ir,P=C,tr=lr,ur=function(r,e,t){if(!r||typeof r!="object"&&typeof r!="function")throw new P("`obj` must be an object or a function`");if(typeof e!="string"&&typeof e!="symbol")throw new P("`property` must be a string or a symbol`");if(arguments.length>3&&typeof arguments[3]!="boolean"&&arguments[3]!==null)throw new P("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&typeof arguments[4]!="boolean"&&arguments[4]!==null)throw new P("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&typeof arguments[5]!="boolean"&&arguments[5]!==null)throw new P("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&typeof arguments[6]!="boolean")throw new P("`loose`, if provided, must be a boolean");var o=arguments.length>3?arguments[3]:null,i=arguments.length>4?arguments[4]:null,s=arguments.length>5?arguments[5]:null,p=arguments.length>6?arguments[6]:!1,u=!!tr&&tr(r,e);if(er)er(r,e,{configurable:s===null&&u?u.configurable:!s,enumerable:o===null&&u?u.enumerable:!o,value:t,writable:i===null&&u?u.writable:!i});else if(p||!o&&!i&&!s)r[e]=t;else throw new le("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.")},M=V,fr=function(){return!!M};fr.hasArrayLengthDefineBug=function(){if(!M)return null;try{return M([],"length",{value:1}).length!==1}catch{return!0}};var sr=fr,ue=ar,fe=typeof Symbol=="function"&&typeof Symbol("foo")=="symbol",se=Object.prototype.toString,ce=Array.prototype.concat,or=ur,ve=function(n){return typeof n=="function"&&se.call(n)==="[object Function]"},cr=sr(),ge=function(n,r,e,t){if(r in n){if(t===!0){if(n[r]===e)return}else if(!ve(t)||!t())return}cr?or(n,r,e,!0):or(n,r,e)},vr=function(n,r){var e=arguments.length>2?arguments[2]:{},t=ue(r);fe&&(t=ce.call(t,Object.getOwnPropertySymbols(r)));for(var o=0;o<t.length;o+=1)ge(n,t[o],r[t[o]],e[t[o]])};vr.supportsDescriptors=!!cr;var de=vr;exports.defineDataProperty=ur;exports.defineProperties_1=de;exports.esDefineProperty=V;exports.functionBind=q;exports.getIntrinsic=J;exports.gopd=lr;exports.hasPropertyDescriptors_1=sr;exports.objectKeys=ar;exports.require$$0=mr;exports.require$$0$1=br;exports.shams=yr;exports.type=C;
|
|
1
|
+
"use strict";const U=require("./index-CDGktAjP.js"),mr=U.getAugmentedNamespace(U.sha256$1),br=U.getAugmentedNamespace(U.sha3$1);var L=Object.prototype.toString,nr=function(r){var e=L.call(r),t=e==="[object Arguments]";return t||(t=e!=="[object Array]"&&r!==null&&typeof r=="object"&&typeof r.length=="number"&&r.length>=0&&L.call(r.callee)==="[object Function]"),t},N,z;function Ar(){if(z)return N;z=1;var n;if(!Object.keys){var r=Object.prototype.hasOwnProperty,e=Object.prototype.toString,t=nr,o=Object.prototype.propertyIsEnumerable,i=!o.call({toString:null},"toString"),s=o.call(function(){},"prototype"),p=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],u=function(l){var y=l.constructor;return y&&y.prototype===l},v={$applicationCache:!0,$console:!0,$external:!0,$frame:!0,$frameElement:!0,$frames:!0,$innerHeight:!0,$innerWidth:!0,$onmozfullscreenchange:!0,$onmozfullscreenerror:!0,$outerHeight:!0,$outerWidth:!0,$pageXOffset:!0,$pageYOffset:!0,$parent:!0,$scrollLeft:!0,$scrollTop:!0,$scrollX:!0,$scrollY:!0,$self:!0,$webkitIndexedDB:!0,$webkitStorageInfo:!0,$window:!0},c=function(){if(typeof window>"u")return!1;for(var l in window)try{if(!v["$"+l]&&r.call(window,l)&&window[l]!==null&&typeof window[l]=="object")try{u(window[l])}catch{return!0}}catch{return!0}return!1}(),g=function(l){if(typeof window>"u"||!c)return u(l);try{return u(l)}catch{return!1}};n=function(y){var d=y!==null&&typeof y=="object",h=e.call(y)==="[object Function]",K=t(y),gr=d&&e.call(y)==="[object String]",O=[];if(!d&&!h&&!K)throw new TypeError("Object.keys called on a non-object");var dr=s&&h;if(gr&&y.length>0&&!r.call(y,0))for(var D=0;D<y.length;++D)O.push(String(D));if(K&&y.length>0)for(var x=0;x<y.length;++x)O.push(String(x));else for(var k in y)!(dr&&k==="prototype")&&r.call(y,k)&&O.push(String(k));if(i)for(var hr=g(y),E=0;E<p.length;++E)!(hr&&p[E]==="constructor")&&r.call(y,p[E])&&O.push(p[E]);return O}}return N=n,N}var Pr=Array.prototype.slice,Sr=nr,Y=Object.keys,F=Y?function(r){return Y(r)}:Ar(),H=Object.keys;F.shim=function(){if(Object.keys){var r=function(){var e=Object.keys(arguments);return e&&e.length===arguments.length}(1,2);r||(Object.keys=function(t){return Sr(t)?H(Pr.call(t)):H(t)})}else Object.keys=F;return Object.keys||F};var ar=F,wr=Error,$r=EvalError,Or=RangeError,Er=ReferenceError,ir=SyntaxError,C=TypeError,Ir=URIError,yr=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var r={},e=Symbol("test"),t=Object(e);if(typeof e=="string"||Object.prototype.toString.call(e)!=="[object Symbol]"||Object.prototype.toString.call(t)!=="[object Symbol]")return!1;var o=42;r[e]=o;for(e in r)return!1;if(typeof Object.keys=="function"&&Object.keys(r).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(r).length!==0)return!1;var i=Object.getOwnPropertySymbols(r);if(i.length!==1||i[0]!==e||!Object.prototype.propertyIsEnumerable.call(r,e))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var s=Object.getOwnPropertyDescriptor(r,e);if(s.value!==o||s.enumerable!==!0)return!1}return!0},X=typeof Symbol<"u"&&Symbol,Fr=yr,Rr=function(){return typeof X!="function"||typeof Symbol!="function"||typeof X("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:Fr()},T={__proto__:null,foo:{}},jr=Object,Ur=function(){return{__proto__:T}.foo===T.foo&&!(T instanceof jr)},_r="Function.prototype.bind called on incompatible ",Br=Object.prototype.toString,Dr=Math.max,xr="[object Function]",Q=function(r,e){for(var t=[],o=0;o<r.length;o+=1)t[o]=r[o];for(var i=0;i<e.length;i+=1)t[i+r.length]=e[i];return t},kr=function(r,e){for(var t=[],o=e,i=0;o<r.length;o+=1,i+=1)t[i]=r[o];return t},Nr=function(n,r){for(var e="",t=0;t<n.length;t+=1)e+=n[t],t+1<n.length&&(e+=r);return e},Tr=function(r){var e=this;if(typeof e!="function"||Br.apply(e)!==xr)throw new TypeError(_r+e);for(var t=kr(arguments,1),o,i=function(){if(this instanceof o){var c=e.apply(this,Q(t,arguments));return Object(c)===c?c:this}return e.apply(r,Q(t,arguments))},s=Dr(0,e.length-t.length),p=[],u=0;u<s;u++)p[u]="$"+u;if(o=Function("binder","return function ("+Nr(p,",")+"){ return binder.apply(this,arguments); }")(i),e.prototype){var v=function(){};v.prototype=e.prototype,o.prototype=new v,v.prototype=null}return o},Gr=Tr,q=Function.prototype.bind||Gr,Wr=Function.prototype.call,Mr=Object.prototype.hasOwnProperty,Cr=q,qr=Cr.call(Wr,Mr),a,Jr=wr,Vr=$r,Kr=Or,Lr=Er,$=ir,w=C,zr=Ir,pr=Function,G=function(n){try{return pr('"use strict"; return ('+n+").constructor;")()}catch{}},m=Object.getOwnPropertyDescriptor;if(m)try{m({},"")}catch{m=null}var W=function(){throw new w},Yr=m?function(){try{return arguments.callee,W}catch{try{return m(arguments,"callee").get}catch{return W}}}():W,A=Rr(),Hr=Ur(),f=Object.getPrototypeOf||(Hr?function(n){return n.__proto__}:null),S={},Xr=typeof Uint8Array>"u"||!f?a:f(Uint8Array),b={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?a:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?a:ArrayBuffer,"%ArrayIteratorPrototype%":A&&f?f([][Symbol.iterator]()):a,"%AsyncFromSyncIteratorPrototype%":a,"%AsyncFunction%":S,"%AsyncGenerator%":S,"%AsyncGeneratorFunction%":S,"%AsyncIteratorPrototype%":S,"%Atomics%":typeof Atomics>"u"?a:Atomics,"%BigInt%":typeof BigInt>"u"?a:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?a:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?a:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?a:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Jr,"%eval%":eval,"%EvalError%":Vr,"%Float32Array%":typeof Float32Array>"u"?a:Float32Array,"%Float64Array%":typeof Float64Array>"u"?a:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?a:FinalizationRegistry,"%Function%":pr,"%GeneratorFunction%":S,"%Int8Array%":typeof Int8Array>"u"?a:Int8Array,"%Int16Array%":typeof Int16Array>"u"?a:Int16Array,"%Int32Array%":typeof Int32Array>"u"?a:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":A&&f?f(f([][Symbol.iterator]())):a,"%JSON%":typeof JSON=="object"?JSON:a,"%Map%":typeof Map>"u"?a:Map,"%MapIteratorPrototype%":typeof Map>"u"||!A||!f?a:f(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?a:Promise,"%Proxy%":typeof Proxy>"u"?a:Proxy,"%RangeError%":Kr,"%ReferenceError%":Lr,"%Reflect%":typeof Reflect>"u"?a:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?a:Set,"%SetIteratorPrototype%":typeof Set>"u"||!A||!f?a:f(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?a:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":A&&f?f(""[Symbol.iterator]()):a,"%Symbol%":A?Symbol:a,"%SyntaxError%":$,"%ThrowTypeError%":Yr,"%TypedArray%":Xr,"%TypeError%":w,"%Uint8Array%":typeof Uint8Array>"u"?a:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?a:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?a:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?a:Uint32Array,"%URIError%":zr,"%WeakMap%":typeof WeakMap>"u"?a:WeakMap,"%WeakRef%":typeof WeakRef>"u"?a:WeakRef,"%WeakSet%":typeof WeakSet>"u"?a:WeakSet};if(f)try{null.error}catch(n){var Qr=f(f(n));b["%Error.prototype%"]=Qr}var Zr=function n(r){var e;if(r==="%AsyncFunction%")e=G("async function () {}");else if(r==="%GeneratorFunction%")e=G("function* () {}");else if(r==="%AsyncGeneratorFunction%")e=G("async function* () {}");else if(r==="%AsyncGenerator%"){var t=n("%AsyncGeneratorFunction%");t&&(e=t.prototype)}else if(r==="%AsyncIteratorPrototype%"){var o=n("%AsyncGenerator%");o&&f&&(e=f(o.prototype))}return b[r]=e,e},Z={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},I=q,_=qr,re=I.call(Function.call,Array.prototype.concat),ee=I.call(Function.apply,Array.prototype.splice),rr=I.call(Function.call,String.prototype.replace),B=I.call(Function.call,String.prototype.slice),te=I.call(Function.call,RegExp.prototype.exec),oe=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,ne=/\\(\\)?/g,ae=function(r){var e=B(r,0,1),t=B(r,-1);if(e==="%"&&t!=="%")throw new $("invalid intrinsic syntax, expected closing `%`");if(t==="%"&&e!=="%")throw new $("invalid intrinsic syntax, expected opening `%`");var o=[];return rr(r,oe,function(i,s,p,u){o[o.length]=p?rr(u,ne,"$1"):s||i}),o},ie=function(r,e){var t=r,o;if(_(Z,t)&&(o=Z[t],t="%"+o[0]+"%"),_(b,t)){var i=b[t];if(i===S&&(i=Zr(t)),typeof i>"u"&&!e)throw new w("intrinsic "+r+" exists, but is not available. Please file an issue!");return{alias:o,name:t,value:i}}throw new $("intrinsic "+r+" does not exist!")},J=function(r,e){if(typeof r!="string"||r.length===0)throw new w("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof e!="boolean")throw new w('"allowMissing" argument must be a boolean');if(te(/^%?[^%]*%?$/,r)===null)throw new $("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var t=ae(r),o=t.length>0?t[0]:"",i=ie("%"+o+"%",e),s=i.name,p=i.value,u=!1,v=i.alias;v&&(o=v[0],ee(t,re([0,1],v)));for(var c=1,g=!0;c<t.length;c+=1){var l=t[c],y=B(l,0,1),d=B(l,-1);if((y==='"'||y==="'"||y==="`"||d==='"'||d==="'"||d==="`")&&y!==d)throw new $("property names with quotes must have matching quotes");if((l==="constructor"||!g)&&(u=!0),o+="."+l,s="%"+o+"%",_(b,s))p=b[s];else if(p!=null){if(!(l in p)){if(!e)throw new w("base intrinsic for "+r+" exists, but the property is not available.");return}if(m&&c+1>=t.length){var h=m(p,l);g=!!h,g&&"get"in h&&!("originalValue"in h.get)?p=h.get:p=p[l]}else g=_(p,l),p=p[l];g&&!u&&(b[s]=p)}}return p},ye=J,R=ye("%Object.defineProperty%",!0)||!1;if(R)try{R({},"a",{value:1})}catch{R=!1}var V=R,pe=J,j=pe("%Object.getOwnPropertyDescriptor%",!0);if(j)try{j([],"length")}catch{j=null}var lr=j,er=V,le=ir,P=C,tr=lr,ur=function(r,e,t){if(!r||typeof r!="object"&&typeof r!="function")throw new P("`obj` must be an object or a function`");if(typeof e!="string"&&typeof e!="symbol")throw new P("`property` must be a string or a symbol`");if(arguments.length>3&&typeof arguments[3]!="boolean"&&arguments[3]!==null)throw new P("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&typeof arguments[4]!="boolean"&&arguments[4]!==null)throw new P("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&typeof arguments[5]!="boolean"&&arguments[5]!==null)throw new P("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&typeof arguments[6]!="boolean")throw new P("`loose`, if provided, must be a boolean");var o=arguments.length>3?arguments[3]:null,i=arguments.length>4?arguments[4]:null,s=arguments.length>5?arguments[5]:null,p=arguments.length>6?arguments[6]:!1,u=!!tr&&tr(r,e);if(er)er(r,e,{configurable:s===null&&u?u.configurable:!s,enumerable:o===null&&u?u.enumerable:!o,value:t,writable:i===null&&u?u.writable:!i});else if(p||!o&&!i&&!s)r[e]=t;else throw new le("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.")},M=V,fr=function(){return!!M};fr.hasArrayLengthDefineBug=function(){if(!M)return null;try{return M([],"length",{value:1}).length!==1}catch{return!0}};var sr=fr,ue=ar,fe=typeof Symbol=="function"&&typeof Symbol("foo")=="symbol",se=Object.prototype.toString,ce=Array.prototype.concat,or=ur,ve=function(n){return typeof n=="function"&&se.call(n)==="[object Function]"},cr=sr(),ge=function(n,r,e,t){if(r in n){if(t===!0){if(n[r]===e)return}else if(!ve(t)||!t())return}cr?or(n,r,e,!0):or(n,r,e)},vr=function(n,r){var e=arguments.length>2?arguments[2]:{},t=ue(r);fe&&(t=ce.call(t,Object.getOwnPropertySymbols(r)));for(var o=0;o<t.length;o+=1)ge(n,t[o],r[t[o]],e[t[o]])};vr.supportsDescriptors=!!cr;var de=vr;exports.defineDataProperty=ur;exports.defineProperties_1=de;exports.esDefineProperty=V;exports.functionBind=q;exports.getIntrinsic=J;exports.gopd=lr;exports.hasPropertyDescriptors_1=sr;exports.objectKeys=ar;exports.require$$0=mr;exports.require$$0$1=br;exports.shams=yr;exports.type=C;
|