@wormhole-foundation/wormhole-connect 1.1.7-beta.0-development → 1.1.8-beta.1-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/{algorand-Bg-MfjsH.js → algorand-vDDEz6KP.js} +2 -2
- package/dist/assets/{ccip-Bk3xy3UX.js → ccip-DQXRFvqz.js} +1 -1
- package/dist/assets/{cosmwasm-xANzAboS.js → cosmwasm-DP4CIVSM.js} +2 -2
- package/dist/assets/{evm-B20gvxWA.js → evm-BB3755Wr.js} +1 -1
- package/dist/assets/{evm-CZSGnl_A.js → evm-C48USybm.js} +4 -4
- package/dist/assets/{index-eLk_b8u9.js → index-BU0ECMia.js} +1 -1
- package/dist/assets/{index-DyD6kblh.js → index-BbJVBTsE.js} +1 -1
- package/dist/assets/{index-BYxgRLLh.js → index-BhEp9mlK.js} +1 -1
- package/dist/assets/{index-CI40JjNh.js → index-BjxXYs1y.js} +2 -2
- package/dist/assets/{index-D3WFv54i.js → index-Bvun80fl.js} +1 -1
- package/dist/assets/{index-jD6ZZ5Tu.js → index-Bz-32kSJ.js} +1 -1
- package/dist/assets/{index-CLcPjTbq.js → index-CVb8oZT5.js} +2 -2
- package/dist/assets/{index-BN1xR-e3.js → index-Cx-EaiKs.js} +1 -1
- package/dist/assets/index-DP2zLB5d.js +5 -0
- package/dist/assets/{index-Bmx9-Bo8.js → index-DjbIKpGg.js} +1 -1
- package/dist/assets/{index-CxijOPcm.js → index-re-SltAL.js} +1 -1
- package/dist/assets/{index.es-CXW154rj.js → index.es-B57TzKWR.js} +2 -2
- package/dist/assets/{solana-DOaiyZir.js → solana-Bc-ePjuF.js} +1 -1
- package/dist/assets/{sui-mXOoFb4M.js → sui-DVNpNCUB.js} +4 -4
- package/dist/assets/{unsignedTransaction-0WUum9tP.js → unsignedTransaction-CPy_oMd2.js} +1 -1
- package/dist/assets/unsignedTransaction-arVvzoJx.js +1 -0
- package/dist/main.js +68 -68
- package/dist/src/config/devnet/chains.d.ts.map +1 -1
- package/dist/src/config/devnet/tokens.d.ts.map +1 -1
- package/dist/src/config/mainnet/chains.d.ts.map +1 -1
- package/dist/src/config/mainnet/tokens.d.ts.map +1 -1
- package/dist/src/config/testnet/chains.d.ts.map +1 -1
- package/dist/src/config/testnet/tokens.d.ts.map +1 -1
- package/dist/src/config/types.d.ts +4 -3
- package/dist/src/config/types.d.ts.map +1 -1
- package/dist/src/icons/ChainIcons.d.ts +9 -0
- package/dist/src/icons/ChainIcons.d.ts.map +1 -0
- package/dist/src/icons/Chains/APT.d.ts +4 -0
- package/dist/src/icons/Chains/APT.d.ts.map +1 -0
- package/dist/src/icons/Chains/ARBITRUM.d.ts +4 -0
- package/dist/src/icons/Chains/ARBITRUM.d.ts.map +1 -0
- package/dist/src/icons/Chains/AVAX.d.ts +4 -0
- package/dist/src/icons/Chains/AVAX.d.ts.map +1 -0
- package/dist/src/icons/Chains/BASE.d.ts +4 -0
- package/dist/src/icons/Chains/BASE.d.ts.map +1 -0
- package/dist/src/icons/Chains/BLAST.d.ts +4 -0
- package/dist/src/icons/Chains/BLAST.d.ts.map +1 -0
- package/dist/src/icons/Chains/BSC.d.ts +4 -0
- package/dist/src/icons/Chains/BSC.d.ts.map +1 -0
- package/dist/src/icons/Chains/CELO.d.ts +4 -0
- package/dist/src/icons/Chains/CELO.d.ts.map +1 -0
- package/dist/src/icons/Chains/ETH.d.ts +4 -0
- package/dist/src/icons/Chains/ETH.d.ts.map +1 -0
- package/dist/src/icons/Chains/FTM.d.ts +4 -0
- package/dist/src/icons/Chains/FTM.d.ts.map +1 -0
- package/dist/src/icons/Chains/GLMR.d.ts +4 -0
- package/dist/src/icons/Chains/GLMR.d.ts.map +1 -0
- package/dist/src/icons/Chains/KAIA.d.ts +4 -0
- package/dist/src/icons/Chains/KAIA.d.ts.map +1 -0
- package/dist/src/icons/Chains/MANTLE.d.ts +4 -0
- package/dist/src/icons/Chains/MANTLE.d.ts.map +1 -0
- package/dist/src/icons/Chains/OPTIMISM.d.ts +4 -0
- package/dist/src/icons/Chains/OPTIMISM.d.ts.map +1 -0
- package/dist/src/icons/Chains/OSMO.d.ts +4 -0
- package/dist/src/icons/Chains/OSMO.d.ts.map +1 -0
- package/dist/src/icons/{Tokens/MATIC.d.ts → Chains/POLY.d.ts} +1 -1
- package/dist/src/icons/Chains/POLY.d.ts.map +1 -0
- package/dist/src/icons/Chains/SCROLL.d.ts +4 -0
- package/dist/src/icons/Chains/SCROLL.d.ts.map +1 -0
- package/dist/src/icons/Chains/SOL.d.ts +4 -0
- package/dist/src/icons/Chains/SOL.d.ts.map +1 -0
- package/dist/src/icons/Chains/SUI.d.ts +4 -0
- package/dist/src/icons/Chains/SUI.d.ts.map +1 -0
- package/dist/src/icons/Chains/XLAYER.d.ts +4 -0
- package/dist/src/icons/Chains/XLAYER.d.ts.map +1 -0
- package/dist/src/icons/{Tokens/noIcon.d.ts → Chains/empty.d.ts} +1 -1
- package/dist/src/icons/Chains/empty.d.ts.map +1 -0
- package/dist/src/icons/Error.d.ts +5 -0
- package/dist/src/icons/Error.d.ts.map +1 -0
- package/dist/src/icons/TokenIcons.d.ts +4 -4
- package/dist/src/icons/TokenIcons.d.ts.map +1 -1
- package/dist/src/icons/Tokens/POLY.d.ts +4 -0
- package/dist/src/icons/Tokens/POLY.d.ts.map +1 -0
- package/{lib/src/icons/Tokens/noIcon.d.ts → dist/src/icons/Tokens/empty.d.ts} +1 -1
- package/dist/src/icons/Tokens/empty.d.ts.map +1 -0
- package/dist/src/icons/Warning.d.ts +5 -0
- package/dist/src/icons/Warning.d.ts.map +1 -0
- package/dist/src/utils/sdkv2.d.ts.map +1 -1
- package/dist/src/views/v2/Bridge/AmountInput/index.d.ts.map +1 -1
- package/dist/src/views/v2/Bridge/AssetPicker/ChainList.d.ts.map +1 -1
- package/dist/src/views/v2/Bridge/AssetPicker/index.d.ts.map +1 -1
- package/dist/src/views/v2/Bridge/Routes/SingleRoute.d.ts.map +1 -1
- package/dist/src/views/v2/Bridge/SwapInputs/index.d.ts.map +1 -1
- package/dist/src/views/v2/Redeem/TransactionDetails/index.d.ts.map +1 -1
- package/dist/src/views/v2/TxHistory/Item/index.d.ts.map +1 -1
- package/lib/{algorand-DsJKeIr5.mjs → algorand-CnhJd_dq.mjs} +3 -3
- package/lib/{algorand-BixJkKlf.js → algorand-F3xFUrZu.js} +1 -1
- package/lib/{aptos-BfNT2MMg.js → aptos-CUGJTnxp.js} +2 -2
- package/lib/{aptos-prTLw0zg.mjs → aptos-DZsV2iRv.mjs} +1 -1
- package/lib/{aptos-DP1G2KNL.mjs → aptos-Dzo7tWbP.mjs} +3 -3
- package/lib/{aptos-DSDxN2Oh.js → aptos-JorFrRlO.js} +1 -1
- package/lib/{ccip-DqvPZUFd.mjs → ccip-CGdvCMfU.mjs} +1 -1
- package/lib/{ccip-CORtuKLa.js → ccip-WvYiDS-K.js} +1 -1
- package/lib/{cosmwasm-CARLnvsg.mjs → cosmwasm-DN0AHdEC.mjs} +6 -6
- package/lib/{cosmwasm-D_THf_Jx.js → cosmwasm-Dg8T1AeT.js} +2 -2
- package/lib/{events-ByywXw-I.js → events-D8Ws4SSV.js} +1 -1
- package/lib/{events-D26WqMv7.mjs → events-DdSBahX7.mjs} +1 -1
- package/lib/{evm-B4avmxZ0.js → evm-3fprRMRy.js} +1 -1
- package/lib/{evm-PZUgLFER.js → evm-D-BOv3OA.js} +4 -4
- package/lib/{evm-qAJdXmfg.mjs → evm-DnhPF5dt.mjs} +12 -12
- package/lib/{evm-BIZUXCC2.mjs → evm-H_bKmdGg.mjs} +7 -7
- package/lib/{index-Dcw9cmF1.js → index--DjYWDRB.js} +1 -1
- package/lib/{index-7QTP5abI.js → index-B-zhCYHk.js} +1 -1
- package/lib/{index-C3wsSYLo.mjs → index-B17OfY1l.mjs} +2 -2
- package/lib/{index-Uwpj8GZq.js → index-B1wNeKc9.js} +1 -1
- package/lib/{index-D2AdBTEw.mjs → index-BHklNnJk.mjs} +4 -4
- package/lib/{index-DCWQkYP9.mjs → index-BVOQlHAu.mjs} +2 -2
- package/lib/{index-CZyMJdwZ.mjs → index-BcmVWAO0.mjs} +1 -1
- package/lib/{index-Bk4O6F71.mjs → index-BdfG3lJW.mjs} +1 -1
- package/lib/index-BjJ4BDhi.js +5 -0
- package/lib/{index-Bo-4EpMy.mjs → index-BlV7bTcP.mjs} +11 -11
- package/lib/{index-CjqSmvJv.mjs → index-BpgHIKBe.mjs} +11785 -10206
- package/lib/{index-B12QivYB.mjs → index-BuynHxM5.mjs} +140 -149
- package/lib/{index-Dui1f--u.mjs → index-BvmOowYJ.mjs} +4 -4
- package/lib/{index-Ci2My7Wd.js → index-C7Ggs6qV.js} +1 -1
- package/lib/{index-CyivlCUm.mjs → index-C7iFAy5u.mjs} +1 -1
- package/lib/{index-CjwkPmul.mjs → index-CMboM3K3.mjs} +2 -2
- package/lib/{index-B_MZPnqY.mjs → index-CXSjmxbe.mjs} +2 -2
- package/lib/{index-DkGpLtjt.js → index-CYuWGvEH.js} +1 -1
- package/lib/{index-C9pDNiDb.mjs → index-C_rNtVK6.mjs} +2 -2
- package/lib/{index-CPTLMohs.js → index-CjVR2y_P.js} +1 -1
- package/lib/index-CnSAQLrV.mjs +3816 -0
- package/lib/{index-DHqcaM3p.js → index-CqEKPcR6.js} +1 -1
- package/lib/{index-ByoyzlD8.mjs → index-D2ZeoQJK.mjs} +2 -2
- package/lib/{index-aGiZ0Ii1.mjs → index-D3KQzv3w.mjs} +3 -3
- package/lib/{index-pRsBJecB.mjs → index-D3R38eof.mjs} +2 -2
- package/lib/{index-BlY7x8aT.js → index-D4UVCCA_.js} +1 -1
- package/lib/{index-CQJHdG55.mjs → index-D5V8xUx6.mjs} +2 -2
- package/lib/{index-De8biE2M.mjs → index-DCDfhwO6.mjs} +1 -1
- package/lib/{index-BrMNAxOe.js → index-DJNuweoE.js} +1 -1
- package/lib/{index-BMrLuIZN.js → index-DK3NwBVm.js} +1 -1
- package/lib/{index-BsusxMly.js → index-DLboWTYu.js} +1 -1
- package/lib/{index-DPqJrtJC.js → index-DWjlQfKm.js} +1 -1
- package/lib/{index-DVYpLXjZ.mjs → index-DayCZrK8.mjs} +2 -2
- package/lib/{index-CwU49oAB.mjs → index-DeqerBZA.mjs} +2 -2
- package/lib/{index-DW5lODgc.js → index-DgegRtGl.js} +1 -1
- package/lib/{index-9uqt3JNu.js → index-DpDevDxN.js} +1 -1
- package/lib/{index-CYf3zJ9U.js → index-Ds1qW639.js} +1 -1
- package/lib/{index-0HzcGIG7.js → index-DwrJnKct.js} +1 -1
- package/lib/{index-DLtY6fYS.js → index-YHxHDLCx.js} +1 -1
- package/lib/index-ZxjZ25k7.js +5 -0
- package/lib/{index-CTR28Kqb.js → index-_H1GTLUN.js} +1 -1
- package/lib/{index-BckHu5WB.mjs → index-a0jcclYd.mjs} +4 -4
- package/lib/{index-Cm4mzU66.js → index-dJYuE1XM.js} +1 -1
- package/lib/{index-By-bUyoB.mjs → index-fWs1RWi9.mjs} +2 -2
- package/lib/{index-C0BdeM6x.js → index-tgY8ENKu.js} +1 -1
- package/lib/{index-C7GdFYql.js → index-uRFn7LyP.js} +83 -83
- package/lib/{index.es-Cck7Q64X.mjs → index.es-DmO_K9V9.mjs} +5 -5
- package/lib/{index.es-AHohFAAx.js → index.es-ebfnW8JA.js} +2 -2
- package/lib/index.js +1 -1
- package/lib/index.mjs +2 -2
- package/lib/{keccak-BH-QLSRT.mjs → keccak-C4VHYT3-.mjs} +1 -1
- package/lib/{keccak-eY58RWPu.js → keccak-CspXZGIt.js} +1 -1
- package/lib/{pbkdf2-BfOdx-Dl.mjs → pbkdf2-B6Kn0zmY.mjs} +1 -1
- package/lib/{pbkdf2-CSYv20wX.js → pbkdf2-DtpaWNtQ.js} +1 -1
- package/lib/{signer-B8jRb0nz.js → signer-DBqxRPZ3.js} +1 -1
- package/lib/{signer-DS-_n4Nt.mjs → signer-DZsY9TLP.mjs} +1 -1
- package/lib/{solana--qAtGpyY.mjs → solana-BABTG8N7.mjs} +4 -4
- package/lib/solana-CR8CywCk.mjs +16 -0
- package/lib/solana-CUDRhtZZ.js +1 -0
- package/lib/{solana-BSRpQGAt.js → solana-DEDJJyBR.js} +1 -1
- package/lib/{solanaEmbed.esm-BQflKuI4.mjs → solanaEmbed.esm-BAbo7-i8.mjs} +3 -3
- package/lib/{solanaEmbed.esm-5JVQ2kx5.js → solanaEmbed.esm-BIOABkzi.js} +1 -1
- package/lib/src/config/devnet/chains.d.ts.map +1 -1
- package/lib/src/config/devnet/tokens.d.ts.map +1 -1
- package/lib/src/config/mainnet/chains.d.ts.map +1 -1
- package/lib/src/config/mainnet/tokens.d.ts.map +1 -1
- package/lib/src/config/testnet/chains.d.ts.map +1 -1
- package/lib/src/config/testnet/tokens.d.ts.map +1 -1
- package/lib/src/config/types.d.ts +4 -3
- package/lib/src/config/types.d.ts.map +1 -1
- package/lib/src/icons/ChainIcons.d.ts +9 -0
- package/lib/src/icons/ChainIcons.d.ts.map +1 -0
- package/lib/src/icons/Chains/APT.d.ts +4 -0
- package/lib/src/icons/Chains/APT.d.ts.map +1 -0
- package/lib/src/icons/Chains/ARBITRUM.d.ts +4 -0
- package/lib/src/icons/Chains/ARBITRUM.d.ts.map +1 -0
- package/lib/src/icons/Chains/AVAX.d.ts +4 -0
- package/lib/src/icons/Chains/AVAX.d.ts.map +1 -0
- package/lib/src/icons/Chains/BASE.d.ts +4 -0
- package/lib/src/icons/Chains/BASE.d.ts.map +1 -0
- package/lib/src/icons/Chains/BLAST.d.ts +4 -0
- package/lib/src/icons/Chains/BLAST.d.ts.map +1 -0
- package/lib/src/icons/Chains/BSC.d.ts +4 -0
- package/lib/src/icons/Chains/BSC.d.ts.map +1 -0
- package/lib/src/icons/Chains/CELO.d.ts +4 -0
- package/lib/src/icons/Chains/CELO.d.ts.map +1 -0
- package/lib/src/icons/Chains/ETH.d.ts +4 -0
- package/lib/src/icons/Chains/ETH.d.ts.map +1 -0
- package/lib/src/icons/Chains/FTM.d.ts +4 -0
- package/lib/src/icons/Chains/FTM.d.ts.map +1 -0
- package/lib/src/icons/Chains/GLMR.d.ts +4 -0
- package/lib/src/icons/Chains/GLMR.d.ts.map +1 -0
- package/lib/src/icons/Chains/KAIA.d.ts +4 -0
- package/lib/src/icons/Chains/KAIA.d.ts.map +1 -0
- package/lib/src/icons/Chains/MANTLE.d.ts +4 -0
- package/lib/src/icons/Chains/MANTLE.d.ts.map +1 -0
- package/lib/src/icons/Chains/OPTIMISM.d.ts +4 -0
- package/lib/src/icons/Chains/OPTIMISM.d.ts.map +1 -0
- package/lib/src/icons/Chains/OSMO.d.ts +4 -0
- package/lib/src/icons/Chains/OSMO.d.ts.map +1 -0
- package/lib/src/icons/{Tokens/MATIC.d.ts → Chains/POLY.d.ts} +1 -1
- package/lib/src/icons/Chains/POLY.d.ts.map +1 -0
- package/lib/src/icons/Chains/SCROLL.d.ts +4 -0
- package/lib/src/icons/Chains/SCROLL.d.ts.map +1 -0
- package/lib/src/icons/Chains/SOL.d.ts +4 -0
- package/lib/src/icons/Chains/SOL.d.ts.map +1 -0
- package/lib/src/icons/Chains/SUI.d.ts +4 -0
- package/lib/src/icons/Chains/SUI.d.ts.map +1 -0
- package/lib/src/icons/Chains/XLAYER.d.ts +4 -0
- package/lib/src/icons/Chains/XLAYER.d.ts.map +1 -0
- package/lib/src/icons/Chains/empty.d.ts +4 -0
- package/lib/src/icons/Chains/empty.d.ts.map +1 -0
- package/lib/src/icons/Error.d.ts +5 -0
- package/lib/src/icons/Error.d.ts.map +1 -0
- package/lib/src/icons/TokenIcons.d.ts +4 -4
- package/lib/src/icons/TokenIcons.d.ts.map +1 -1
- package/lib/src/icons/Tokens/POLY.d.ts +4 -0
- package/lib/src/icons/Tokens/POLY.d.ts.map +1 -0
- package/lib/src/icons/Tokens/empty.d.ts +4 -0
- package/lib/src/icons/Tokens/empty.d.ts.map +1 -0
- package/lib/src/icons/Warning.d.ts +5 -0
- package/lib/src/icons/Warning.d.ts.map +1 -0
- package/lib/src/utils/sdkv2.d.ts.map +1 -1
- package/lib/src/views/v2/Bridge/AmountInput/index.d.ts.map +1 -1
- package/lib/src/views/v2/Bridge/AssetPicker/ChainList.d.ts.map +1 -1
- package/lib/src/views/v2/Bridge/AssetPicker/index.d.ts.map +1 -1
- package/lib/src/views/v2/Bridge/Routes/SingleRoute.d.ts.map +1 -1
- package/lib/src/views/v2/Bridge/SwapInputs/index.d.ts.map +1 -1
- package/lib/src/views/v2/Redeem/TransactionDetails/index.d.ts.map +1 -1
- package/lib/src/views/v2/TxHistory/Item/index.d.ts.map +1 -1
- package/lib/{sui-CHdzm0pJ.js → sui-CD_LLkGE.js} +2 -2
- package/lib/{sui-CTaDMtDE.mjs → sui-CfiEBlu_.mjs} +74 -75
- package/lib/{sui-BrXrepC3.mjs → sui-DYCvDMMh.mjs} +1 -1
- package/lib/{sui-B9mPyuqg.js → sui-Da1ir949.js} +1 -1
- package/lib/unsignedTransaction-BD81leu1.mjs +16 -0
- package/lib/{unsignedTransaction-B6O-8vao.js → unsignedTransaction-BNppfIUA.js} +1 -1
- package/lib/unsignedTransaction-DzSLsK-p.js +1 -0
- package/lib/{unsignedTransaction-BLH74msy.mjs → unsignedTransaction-l29mWyX4.mjs} +4 -4
- package/package.json +17 -17
- package/dist/src/icons/Tokens/MATIC.d.ts.map +0 -1
- package/dist/src/icons/Tokens/noIcon.d.ts.map +0 -1
- package/dist/src/utils/repairVaa.d.ts +0 -4
- package/dist/src/utils/repairVaa.d.ts.map +0 -1
- package/lib/index-CqmsT5vZ.js +0 -5
- package/lib/solana-Dcts27AJ.js +0 -1
- package/lib/solana-qJnrP02J.mjs +0 -16
- package/lib/src/icons/Tokens/MATIC.d.ts.map +0 -1
- package/lib/src/icons/Tokens/noIcon.d.ts.map +0 -1
- package/lib/src/utils/repairVaa.d.ts +0 -4
- package/lib/src/utils/repairVaa.d.ts.map +0 -1
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index-
|
|
2
|
-
var A=Object.defineProperty;var x=(e,n,t)=>n in e?A(e,n,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[n]=t;var l=(e,n,t)=>x(e,typeof n!="symbol"?n+"":n,t);import{af as C,ag as R,bn as w,ai as S,bo as i,aj as T,bp as y,al as E,am as p,bq as h,an as j,aq as N,br as k,bs as B,_,a4 as D}from"../main.js";class I extends C{}const g=class g extends R{constructor(n,t){super(n,t??S(n,g._platform))}getRpc(n){if(n in this.config)return new i.Algodv2("",this.config[n].rpc);throw new Error("No configuration available for chain: "+n)}getChain(n){if(n in this.config)return new I(n,this);throw new Error("No configuration available for chain: "+n)}static nativeTokenId(n,t){if(!g.isSupportedChain(t))throw new Error(`invalid chain for Algorand: ${t}`);return T.chainAddress(t,y)}static isNativeTokenId(n,t,o){return!g.isSupportedChain(t)||o.chain!==t?!1:this.nativeTokenId(n,t)==o}static isSupportedChain(n){return E(n)===g._platform}static async getDecimals(n,t,o){const a=p(o)?0:new h(o).toInt();if(a===0)return j(g._platform);const d=await t.getAssetByID(a).do(),r=i.modelsv2.Asset.from_obj_for_encoding(d);if(!r.params||!r.params.decimals)throw new Error("Could not fetch token details");return Number(r.params.decimals)}static async getBalance(n,t,o,a){const d=p(a)?0:new h(a).toInt();if(d===0){const c=await t.accountInformation(o).do(),u=i.modelsv2.Account.from_obj_for_encoding(c);return BigInt(u.amount)}const r=await t.accountAssetInformation(o,d).do(),s=i.modelsv2.AssetHolding.from_obj_for_encoding(r);return BigInt(s.amount)}static async getBalances(n,t,o,a){let d;if(a.includes("native")){const s=await t.accountInformation(o).do(),c=i.modelsv2.Account.from_obj_for_encoding(s);d=BigInt(c.amount)}return a.map(async s=>{if(p(s))return{native:d};const c=new h(s).toInt(),u=await t.accountAssetInformation(o,c).do(),f=i.modelsv2.AssetHolding.from_obj_for_encoding(u);return BigInt(f.amount)}).reduce((s,c)=>Object.assign(s,c),{})}static async sendWait(n,t,o){const r=o.map((f,b)=>i.decodeSignedTransaction(f)).map((f,b)=>f.txn.txID()),{txId:s}=await t.sendRawTransaction(o).do();if(!s)throw new Error("Transaction(s) failed to send");const c=await i.waitForConfirmation(t,s,4);if(!i.modelsv2.PendingTransactionResponse.from_obj_for_encoding(c).confirmedRound)throw new Error("Transaction(s) could not be confirmed in 4 rounds");return r}static async getLatestBlock(n){const t=await n.status().do(),o=i.modelsv2.NodeStatusResponse.from_obj_for_encoding(t);if(!o.lastRound)throw new Error("Error getting status from node");return Number(o.lastRound)}static async getLatestFinalizedBlock(n){const t=await n.status().do(),o=i.modelsv2.NodeStatusResponse.from_obj_for_encoding(t);if(!o.lastRound)throw new Error("Error getting status from node");return Number(o.lastRound)}static chainFromChainId(n){const t=N(g._platform,n);if(t===void 0)throw new Error(`Unknown native chain id ${n}`);const[o,a]=t;return[o,a]}static async chainFromRpc(n){const t=await n.versionsCheck().do(),o=i.modelsv2.Version.from_obj_for_encoding(t);return this.chainFromChainId(o.genesisId)}};l(g,"_platform",w);let m=g;async function $(e,n){const[t,o]=await m.chainFromRpc(e);return new P(o,e,n)}class P{constructor(n,t,o,a=!1){l(this,"_chain");l(this,"_debug");l(this,"_account");this._chain=n,this._debug=a,this._account=k(o)}chain(){return this._chain}address(){return this._account.addr}async sign(n){const t=[],o=n.map((r,s)=>r.transaction.tx),a=B(o),d=n.map((r,s)=>(r.transaction.tx=a[s],r));for(const r of d){const{description:s,transaction:c}=r,{tx:u,signer:f}=c;this._debug&&(console.log(u._getDictForDisplay()),console.log(u.txID())),f?(this._debug&&console.log(`Signing: ${s} with signer ${f.address} for address ${this.address()}`),t.push(await f.signTxn(u))):(this._debug&&console.log(`Signing: ${s} without signer for address ${this.address()}`),t.push(u.signTxn(this._account.sk)))}return t}}const F={Address:h,Platform:m,getSigner:$,protocols:{WormholeCore:()=>_(()=>import("./index-
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index-re-SltAL.js","main.js","main.css","assets/index-BbJVBTsE.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
var A=Object.defineProperty;var x=(e,n,t)=>n in e?A(e,n,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[n]=t;var l=(e,n,t)=>x(e,typeof n!="symbol"?n+"":n,t);import{af as C,ag as R,bn as w,ai as S,bo as i,aj as T,bp as y,al as E,am as p,bq as h,an as j,aq as N,br as k,bs as B,_,a4 as D}from"../main.js";class I extends C{}const g=class g extends R{constructor(n,t){super(n,t??S(n,g._platform))}getRpc(n){if(n in this.config)return new i.Algodv2("",this.config[n].rpc);throw new Error("No configuration available for chain: "+n)}getChain(n){if(n in this.config)return new I(n,this);throw new Error("No configuration available for chain: "+n)}static nativeTokenId(n,t){if(!g.isSupportedChain(t))throw new Error(`invalid chain for Algorand: ${t}`);return T.chainAddress(t,y)}static isNativeTokenId(n,t,o){return!g.isSupportedChain(t)||o.chain!==t?!1:this.nativeTokenId(n,t)==o}static isSupportedChain(n){return E(n)===g._platform}static async getDecimals(n,t,o){const a=p(o)?0:new h(o).toInt();if(a===0)return j(g._platform);const d=await t.getAssetByID(a).do(),r=i.modelsv2.Asset.from_obj_for_encoding(d);if(!r.params||!r.params.decimals)throw new Error("Could not fetch token details");return Number(r.params.decimals)}static async getBalance(n,t,o,a){const d=p(a)?0:new h(a).toInt();if(d===0){const c=await t.accountInformation(o).do(),u=i.modelsv2.Account.from_obj_for_encoding(c);return BigInt(u.amount)}const r=await t.accountAssetInformation(o,d).do(),s=i.modelsv2.AssetHolding.from_obj_for_encoding(r);return BigInt(s.amount)}static async getBalances(n,t,o,a){let d;if(a.includes("native")){const s=await t.accountInformation(o).do(),c=i.modelsv2.Account.from_obj_for_encoding(s);d=BigInt(c.amount)}return a.map(async s=>{if(p(s))return{native:d};const c=new h(s).toInt(),u=await t.accountAssetInformation(o,c).do(),f=i.modelsv2.AssetHolding.from_obj_for_encoding(u);return BigInt(f.amount)}).reduce((s,c)=>Object.assign(s,c),{})}static async sendWait(n,t,o){const r=o.map((f,b)=>i.decodeSignedTransaction(f)).map((f,b)=>f.txn.txID()),{txId:s}=await t.sendRawTransaction(o).do();if(!s)throw new Error("Transaction(s) failed to send");const c=await i.waitForConfirmation(t,s,4);if(!i.modelsv2.PendingTransactionResponse.from_obj_for_encoding(c).confirmedRound)throw new Error("Transaction(s) could not be confirmed in 4 rounds");return r}static async getLatestBlock(n){const t=await n.status().do(),o=i.modelsv2.NodeStatusResponse.from_obj_for_encoding(t);if(!o.lastRound)throw new Error("Error getting status from node");return Number(o.lastRound)}static async getLatestFinalizedBlock(n){const t=await n.status().do(),o=i.modelsv2.NodeStatusResponse.from_obj_for_encoding(t);if(!o.lastRound)throw new Error("Error getting status from node");return Number(o.lastRound)}static chainFromChainId(n){const t=N(g._platform,n);if(t===void 0)throw new Error(`Unknown native chain id ${n}`);const[o,a]=t;return[o,a]}static async chainFromRpc(n){const t=await n.versionsCheck().do(),o=i.modelsv2.Version.from_obj_for_encoding(t);return this.chainFromChainId(o.genesisId)}};l(g,"_platform",w);let m=g;async function $(e,n){const[t,o]=await m.chainFromRpc(e);return new P(o,e,n)}class P{constructor(n,t,o,a=!1){l(this,"_chain");l(this,"_debug");l(this,"_account");this._chain=n,this._debug=a,this._account=k(o)}chain(){return this._chain}address(){return this._account.addr}async sign(n){const t=[],o=n.map((r,s)=>r.transaction.tx),a=B(o),d=n.map((r,s)=>(r.transaction.tx=a[s],r));for(const r of d){const{description:s,transaction:c}=r,{tx:u,signer:f}=c;this._debug&&(console.log(u._getDictForDisplay()),console.log(u.txID())),f?(this._debug&&console.log(`Signing: ${s} with signer ${f.address} for address ${this.address()}`),t.push(await f.signTxn(u))):(this._debug&&console.log(`Signing: ${s} without signer for address ${this.address()}`),t.push(u.signTxn(this._account.sk)))}return t}}const F={Address:h,Platform:m,getSigner:$,protocols:{WormholeCore:()=>_(()=>import("./index-re-SltAL.js").then(e=>e.i),__vite__mapDeps([0,1,2])),TokenBridge:()=>_(()=>import("./index-BbJVBTsE.js"),__vite__mapDeps([3,0,1,2]))},getChain:(e,n,t)=>new I(n,new m(e,D(e,w,{[n]:t})))},U=Object.freeze(Object.defineProperty({__proto__:null,default:F},Symbol.toStringTag,{value:"Module"}));export{m as A,U as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{B as l,g as w,s as y,i as p,I as h,d as g,c as k,a as O,b as L,H as m,f as E}from"./evm-
|
|
1
|
+
import{B as l,g as w,s as y,i as p,I as h,d as g,c as k,a as O,b as L,H as m,f as E}from"./evm-C48USybm.js";import"../main.js";import"./index-wTEu0lCN.js";class x extends l{constructor({callbackSelector:e,cause:a,data:n,extraData:c,sender:d,urls:r}){var i;super(a.shortMessage||"An error occurred while fetching for an offchain result.",{cause:a,metaMessages:[...a.metaMessages||[],(i=a.metaMessages)!=null&&i.length?"":[],"Offchain Gateway Call:",r&&[" Gateway URL(s):",...r.map(u=>` ${w(u)}`)],` Sender: ${d}`,` Data: ${n}`,` Callback selector: ${e}`,` Extra data: ${c}`].flat()}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"OffchainLookupError"})}}class M extends l{constructor({result:e,url:a}){super("Offchain gateway response is malformed. Response data must be a hex value.",{metaMessages:[`Gateway URL: ${w(a)}`,`Response: ${y(e)}`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"OffchainLookupResponseMalformedError"})}}class R extends l{constructor({sender:e,to:a}){super("Reverted sender address does not match target contract address (`to`).",{metaMessages:[`Contract address: ${a}`,`OffchainLookup sender address: ${e}`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"OffchainLookupSenderMismatchError"})}}function $(o,e){if(!p(o))throw new h({address:o});if(!p(e))throw new h({address:e});return o.toLowerCase()===e.toLowerCase()}const j="0x556f1830",S={name:"OffchainLookup",type:"error",inputs:[{name:"sender",type:"address"},{name:"urls",type:"string[]"},{name:"callData",type:"bytes"},{name:"callbackFunction",type:"bytes4"},{name:"extraData",type:"bytes"}]};async function D(o,{blockNumber:e,blockTag:a,data:n,to:c}){const{args:d}=g({data:n,abi:[S]}),[r,i,u,t,s]=d;try{if(!$(c,r))throw new R({sender:r,to:c});const f=await A({data:u,sender:r,urls:i}),{data:b}=await k(o,{blockNumber:e,blockTag:a,data:O([t,L([{type:"bytes"},{type:"bytes"}],[f,s])]),to:c});return b}catch(f){throw new x({callbackSelector:t,cause:f,data:n,extraData:s,sender:r,urls:i})}}async function A({data:o,sender:e,urls:a}){var c;let n=new Error("An unknown error occurred.");for(let d=0;d<a.length;d++){const r=a[d],i=r.includes("{data}")?"GET":"POST",u=i==="POST"?{data:o,sender:e}:void 0;try{const t=await fetch(r.replace("{sender}",e).replace("{data}",o),{body:JSON.stringify(u),method:i});let s;if((c=t.headers.get("Content-Type"))!=null&&c.startsWith("application/json")?s=(await t.json()).data:s=await t.text(),!t.ok){n=new m({body:u,details:s!=null&&s.error?y(s.error):t.statusText,headers:t.headers,status:t.status,url:r});continue}if(!E(s)){n=new M({result:s,url:r});continue}return s}catch(t){n=new m({body:u,details:t.message,url:r})}}throw n}export{A as ccipFetch,D as offchainLookup,S as offchainLookupAbiItem,j as offchainLookupSignature};
|