@wormhole-foundation/wormhole-connect 3.0.0-beta.0-development → 3.0.0-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/main.js +49 -49
- package/dist/src/components/SampleApp/index.d.ts.map +1 -1
- package/dist/src/config/index.d.ts.map +1 -1
- package/dist/src/config/types.d.ts +2 -0
- package/dist/src/config/types.d.ts.map +1 -1
- package/dist/src/exports/executor.d.ts +2 -0
- package/dist/src/exports/executor.d.ts.map +1 -0
- package/dist/src/hooks/useFetchSupportedRoutes.d.ts.map +1 -1
- package/dist/src/utils/index.d.ts +1 -0
- package/dist/src/utils/index.d.ts.map +1 -1
- package/dist/src/utils/sdkv2.d.ts +0 -1
- package/dist/src/utils/sdkv2.d.ts.map +1 -1
- package/dist/src/views/v2/Bridge/Routes/SingleRoute.d.ts.map +1 -1
- package/dist/src/views/v2/Redeem/TransactionDetails/index.d.ts.map +1 -1
- package/dist/src/views/v2/Redeem/index.d.ts.map +1 -1
- package/lib/account-CKUCmcgT.mjs +30 -0
- package/lib/account-QG_Hi4er.js +1 -0
- package/lib/address-B-_yHNB2.js +1 -0
- package/lib/{address-D74XlMdi.mjs → address-B9anhmbU.mjs} +5 -5
- package/lib/address-Cj96wodd.mjs +64 -0
- package/lib/{address-DXFbgyJW.mjs → address-Drr_9OcK.mjs} +93 -93
- package/lib/aptos-BZ2mcuTd.js +2 -0
- package/lib/aptos-DPIwkCrX.mjs +68 -0
- package/lib/{aptos-WhWqMfkU.js → aptos-Da6iqpC-.js} +1 -1
- package/lib/{aptos-BckWT_Pe.mjs → aptos-Dz4Js3_d.mjs} +3 -3
- package/lib/{base64-DPCMLrON.mjs → base64-BcnUThiU.mjs} +1 -1
- package/lib/{blake2b-BmQx89Cf.mjs → blake2b-CnkNeJT4.mjs} +1 -1
- package/lib/{browser-ponyfill-Zjbs5ehD.mjs → browser-ponyfill-oWZrCgRw.mjs} +1 -1
- package/lib/{ccip-DiNEz9KN.js → ccip-Bb-IPrNA.js} +1 -1
- package/lib/{ccip-B45dpIhp.mjs → ccip-Ceg_B70t.mjs} +1 -1
- package/lib/{chain-DaAd2Ztf.mjs → chain-CNVMEdrk.mjs} +1 -1
- package/lib/{chunk-IMTC3J2M-Bn3rs7tb.mjs → chunk-IMTC3J2M-B7fKwIuX.mjs} +3 -3
- package/lib/{constants-CbKC2uxb.mjs → constants-Ba9GwEM1.mjs} +1 -1
- package/lib/constants-BqqwmYZc.js +1 -0
- package/lib/{contract-BI_HDILr.mjs → contract-DANWVftx.mjs} +1 -1
- package/lib/{create-CzWSWmF_.mjs → create-B9LwWha4.mjs} +1 -1
- package/lib/{evm-DFyxDQ-x.js → evm-1T5rGzcO.js} +3 -3
- package/lib/{evm-DgG5biHb.mjs → evm-B552wdhN.mjs} +9 -9
- package/lib/{evm-Es3E89UO.mjs → evm-DarNu22s.mjs} +9 -9
- package/lib/executor.d.ts +2 -0
- package/lib/executor.js +1 -0
- package/lib/executor.mjs +828 -0
- package/lib/hosted.js +1 -1
- package/lib/hosted.mjs +1 -1
- package/lib/index-2f5GRlqp.mjs +46 -0
- package/lib/{index-Blt9MjZK.mjs → index-B1XGfrNH.mjs} +1 -1
- package/lib/{index-DUiyW0v6.js → index-B40ktVOy.js} +1 -1
- package/lib/{index-jfL73ugq.mjs → index-B4NYDFvU.mjs} +5 -5
- package/lib/{index--QOOnO1S.mjs → index-BAuH_G93.mjs} +5 -5
- package/lib/{index-C9ZemP81.mjs → index-BHMN5Px3.mjs} +2 -2
- package/lib/{index-CGbZMLbJ.mjs → index-BO0DC-jc.mjs} +3 -3
- package/lib/{index-BziywkBj.mjs → index-BQ0RlDhv.mjs} +246 -272
- package/lib/{index-Cuu-xM0U.mjs → index-BR4w3fuE.mjs} +5 -5
- package/lib/{index-DnOkd5VL.js → index-BTNmmLkb.js} +1 -1
- package/lib/{index-BQwsEzas.mjs → index-BlJpOhTM.mjs} +5 -5
- package/lib/{index-CjL3WbDp.js → index-Blzzdktm.js} +1 -1
- package/lib/{index-Bc7EWiox.js → index-Bn1o04G7.js} +80 -80
- package/lib/index-C2Pe6i5V.js +1 -0
- package/lib/{index-5xE5bjpW.mjs → index-C9XIIFQK.mjs} +1 -1
- package/lib/{index-XFRw6zfV.mjs → index-CCRPy0B_.mjs} +2 -2
- package/lib/index-CE0rxdUf.js +1 -0
- package/lib/{index-Bu6LLuxH.mjs → index-CEXcD8Mw.mjs} +4 -4
- package/lib/{index-BLYjmYmu.mjs → index-CKg04pdA.mjs} +5 -5
- package/lib/{index-CxW1HjrT.mjs → index-CM_IP492.mjs} +14 -14
- package/lib/{index-pjyIirVB.mjs → index-CT2-qOL1.mjs} +2 -2
- package/lib/{index-DFHQnDR7.mjs → index-CYdhveYx.mjs} +6 -6
- package/lib/{index-COkWxUoe.mjs → index-Cda4HnP1.mjs} +5 -5
- package/lib/{index-BYzONVwG.mjs → index-CfC3_uPF.mjs} +7 -7
- package/lib/index-DC1ot7tO.js +1 -0
- package/lib/{index-v0MO46Zl.mjs → index-DHAgduQ-.mjs} +4 -4
- package/lib/{index-DQjqwKVk.mjs → index-DSSOE7Me.mjs} +2 -2
- package/lib/{index-BbCcdl9J.mjs → index-DoFo485M.mjs} +73 -72
- package/lib/{index-BNjB0Q50.mjs → index-DvxmZnxH.mjs} +5 -5
- package/lib/{index-ju2wtFjy.mjs → index-Dw7INWis.mjs} +7 -7
- package/lib/{index-t94-e3qG.js → index-VhcNuaP6.js} +1 -1
- package/lib/index-dpkTW-H8.js +1 -0
- package/lib/index-f_27F6WX.js +1 -0
- package/lib/{index-BkHLwIMc.mjs → index-l0sxQXRT.mjs} +1 -1
- package/lib/{index-CdOqWihR.mjs → index-mXHkgOxH.mjs} +4 -4
- package/lib/{index-C2jOUiub.mjs → index-pN0Dgjjf.mjs} +5 -5
- package/lib/{index-B7U-me-L.mjs → index-pNqQSm4p.mjs} +6628 -6659
- package/lib/{index.es-BYLVcsBS.js → index.es-_N4sKEIC.js} +1 -1
- package/lib/{index.es-BrgiiIYV.mjs → index.es-rEir51oG.mjs} +7 -7
- package/lib/index.js +1 -1
- package/lib/index.mjs +5 -5
- package/lib/mayan.mjs +10 -10
- package/lib/{mint-BjwZUbPm.mjs → mint-DVxIczlI.mjs} +2 -2
- package/lib/ntt.js +1 -1
- package/lib/ntt.mjs +10 -10
- package/lib/{platform-pi9E7cPR.mjs → platform-CbDx4hex.mjs} +4 -4
- package/lib/platform-CyTWPtDR.js +1 -0
- package/lib/{platform-C-edrCmf.mjs → platform-D-nUFU0e.mjs} +6 -6
- package/lib/platform-PaIJsXKV.mjs +118 -0
- package/lib/{provider-jsonrpc-BjcoR80W.mjs → provider-jsonrpc-C_IZFSfB.mjs} +2 -2
- package/lib/{sha3-B1KxiAa7.mjs → sha3-DQQvDwj1.mjs} +1 -1
- package/lib/{signer-CgLO7fBA.mjs → signer-CsMX8mEc.mjs} +6 -6
- package/lib/{solana-DA48rYUK.js → solana-BRQmi9BN.js} +1 -1
- package/lib/solana-C_0khyJw.mjs +18 -0
- package/lib/{solana-Pjpx_PkM.js → solana-CrjSp_Zk.js} +1 -1
- package/lib/{solana-CvaeYBIB.mjs → solana-SQhnN3yB.mjs} +6 -6
- package/lib/{solanaEmbed.esm-jxAhxZ9V.js → solanaEmbed.esm-B7IRXgnI.js} +1 -1
- package/lib/{solanaEmbed.esm-Gti-Nr19.mjs → solanaEmbed.esm-Din0Z51P.mjs} +3 -3
- package/lib/src/components/SampleApp/index.d.ts.map +1 -1
- package/lib/src/config/index.d.ts.map +1 -1
- package/lib/src/config/types.d.ts +2 -0
- package/lib/src/config/types.d.ts.map +1 -1
- package/lib/src/exports/executor.d.ts +2 -0
- package/lib/src/exports/executor.d.ts.map +1 -0
- package/lib/src/hooks/useFetchSupportedRoutes.d.ts.map +1 -1
- package/lib/src/utils/index.d.ts +1 -0
- package/lib/src/utils/index.d.ts.map +1 -1
- package/lib/src/utils/sdkv2.d.ts +0 -1
- package/lib/src/utils/sdkv2.d.ts.map +1 -1
- package/lib/src/views/v2/Bridge/Routes/SingleRoute.d.ts.map +1 -1
- package/lib/src/views/v2/Redeem/TransactionDetails/index.d.ts.map +1 -1
- package/lib/src/views/v2/Redeem/index.d.ts.map +1 -1
- package/lib/{sui-CuwmPzXZ.mjs → sui-BSLo7-bI.mjs} +14 -14
- package/lib/{sui-Bi1J0W_P.mjs → sui-BePFnRSc.mjs} +3 -3
- package/lib/{sui-uSCH-o_h.js → sui-C7KPm3kD.js} +1 -1
- package/lib/{tokens-DcqY0jHv.js → tokens-CChVRIuE.js} +1 -1
- package/lib/{tokens-DOx4hiaR.mjs → tokens-CyKAZUN-.mjs} +4 -4
- package/lib/{units-YO78Cq5F.mjs → units-DP5zqyxn.mjs} +9 -9
- package/lib/{unsignedTransaction-Cj476rGh.mjs → unsignedTransaction-fSrwDjHx.mjs} +9 -9
- package/lib/{web3--AtxvLIy.mjs → web3-DCo8oN-v.mjs} +4 -4
- package/package.json +16 -1
- package/lib/aptos-VwYOwtQy.mjs +0 -179
- package/lib/aptos-hc5GrCHO.js +0 -2
- package/lib/constants-Cib4VRZO.js +0 -1
- package/lib/index-BlzRxQ82.js +0 -1
- package/lib/index-CJXmILJz.js +0 -1
- package/lib/index-C_dsyQjC.mjs +0 -46
- package/lib/index-CpuzvBlL.js +0 -1
- package/lib/index-Cxg2C7RE.js +0 -1
- package/lib/index-DDAGOrv0.js +0 -1
- package/lib/solana-qHqB-cdc.mjs +0 -18
|
@@ -13,10 +13,10 @@ var Cx = (c, e, x, a) => ({
|
|
|
13
13
|
return O(c, e, a);
|
|
14
14
|
}
|
|
15
15
|
});
|
|
16
|
-
import {
|
|
17
|
-
import { E as bx, a as Me } from "./platform-
|
|
18
|
-
import { c as De, S as $e, p as Be, r as Fe, a as Fx, s as _x, A as Kx, b as Z0, T as _e, d as Ox, e as N0, f as L0, g as Ke, h as Ge, V as Ve } from "./provider-jsonrpc-
|
|
19
|
-
import { a as m0, c as We, i as Gx, g as Vx, t as ze, b as Ye, d as He } from "./contract-
|
|
16
|
+
import { b7 as u, b8 as w, b9 as Te, ba as Ix, bb as Ce, bc as u0, bd as Q0, ay as hx, be as l0, bf as V, bg as l, bh as Ie, bi as kx, ag as ux, bj as Y, bk as px, bl as ke, bm as Bx, bn as Oe, bo as yx, bp as Se, bq as ve, aR as Pe, br as Ue, aW as Le } from "./address-Drr_9OcK.mjs";
|
|
17
|
+
import { E as bx, a as Me } from "./platform-D-nUFU0e.mjs";
|
|
18
|
+
import { c as De, S as $e, p as Be, r as Fe, a as Fx, s as _x, A as Kx, b as Z0, T as _e, d as Ox, e as N0, f as L0, g as Ke, h as Ge, V as Ve } from "./provider-jsonrpc-C_IZFSfB.mjs";
|
|
19
|
+
import { a as m0, c as We, i as Gx, g as Vx, t as ze, b as Ye, d as He } from "./contract-DANWVftx.mjs";
|
|
20
20
|
function Je(c) {
|
|
21
21
|
const e = u(c, "randomBytes");
|
|
22
22
|
e[6] = e[6] & 15 | 64, e[8] = e[8] & 63 | 128;
|
|
@@ -1594,11 +1594,11 @@ const Va = {
|
|
|
1594
1594
|
Platform: bx,
|
|
1595
1595
|
getSigner: Da,
|
|
1596
1596
|
protocols: {
|
|
1597
|
-
WormholeCore: () => import("./index-
|
|
1598
|
-
TokenBridge: () => import("./index-
|
|
1599
|
-
PorticoBridge: () => import("./index-
|
|
1600
|
-
CircleBridge: () => import("./index-
|
|
1601
|
-
TBTCBridge: () => import("./index-
|
|
1597
|
+
WormholeCore: () => import("./index-CKg04pdA.mjs"),
|
|
1598
|
+
TokenBridge: () => import("./index-B4NYDFvU.mjs"),
|
|
1599
|
+
PorticoBridge: () => import("./index-CYdhveYx.mjs"),
|
|
1600
|
+
CircleBridge: () => import("./index-CM_IP492.mjs"),
|
|
1601
|
+
TBTCBridge: () => import("./index-pN0Dgjjf.mjs")
|
|
1602
1602
|
},
|
|
1603
1603
|
getChain: (c, e, x) => new Me(e, new bx(c, Ue(c, Le, {
|
|
1604
1604
|
[e]: x
|
|
@@ -3,13 +3,13 @@ var Aa = (e) => {
|
|
|
3
3
|
};
|
|
4
4
|
var Ia = (e, t, r) => t.has(e) || Aa("Cannot " + r);
|
|
5
5
|
var vn = (e, t, r) => (Ia(e, t, "read from private field"), r ? r.call(e) : t.get(e)), Ea = (e, t, r) => t.has(e) ? Aa("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(e) : t.set(e, r), xa = (e, t, r, n) => (Ia(e, t, "write to private field"), n ? n.call(e, r) : t.set(e, r), r);
|
|
6
|
-
import { C as Xo, W as qo, N as Rn,
|
|
7
|
-
import {
|
|
8
|
-
import { j as oc } from "./provider-jsonrpc-
|
|
9
|
-
import { t as cc, C as lc, f as uc } from "./contract-
|
|
10
|
-
import { f as hc, a as dc } from "./units-
|
|
6
|
+
import { C as Xo, W as qo, N as Rn, a as $o, b as $e, c as Jr, B as ec, i as tc, d as rc, r as nc, s as sc, e as _r } from "./index-pNqQSm4p.mjs";
|
|
7
|
+
import { bg as Na, d as Wn, g as ac, ab as ic } from "./address-Drr_9OcK.mjs";
|
|
8
|
+
import { j as oc } from "./provider-jsonrpc-C_IZFSfB.mjs";
|
|
9
|
+
import { t as cc, C as lc, f as uc } from "./contract-DANWVftx.mjs";
|
|
10
|
+
import { f as hc, a as dc } from "./units-DP5zqyxn.mjs";
|
|
11
11
|
import "react";
|
|
12
|
-
import "./index-
|
|
12
|
+
import "./index-B1XGfrNH.mjs";
|
|
13
13
|
var kt;
|
|
14
14
|
class pc extends oc {
|
|
15
15
|
/**
|
|
@@ -4320,7 +4320,7 @@ async function gn(e, t) {
|
|
|
4320
4320
|
});
|
|
4321
4321
|
return j === "0x" ? { data: void 0 } : { data: j };
|
|
4322
4322
|
} catch (E) {
|
|
4323
|
-
const I = Zu(E), { offchainLookup: l, offchainLookupSignature: b } = await import("./ccip-
|
|
4323
|
+
const I = Zu(E), { offchainLookup: l, offchainLookupSignature: b } = await import("./ccip-Ceg_B70t.mjs");
|
|
4324
4324
|
if ((I == null ? void 0 : I.slice(0, 10)) === b && f)
|
|
4325
4325
|
return { data: await l(e, { data: I, to: f }) };
|
|
4326
4326
|
throw Ru(E, {
|
|
@@ -13983,7 +13983,7 @@ var Dd = Object.defineProperty, Cd = function(e, t, r) {
|
|
|
13983
13983
|
case 0:
|
|
13984
13984
|
return !Jt(i, Vt) || a || o ? (h = !((c = i.options) === null || c === void 0) && c.infuraId ? {} : i.chains.reduce(function(f, m) {
|
|
13985
13985
|
return ti(Qr({}, f), vo({}, m.id, m.rpcUrls.default.http[0]));
|
|
13986
|
-
}, {}), [4, import("./index-
|
|
13986
|
+
}, {}), [4, import("./index-DvxmZnxH.mjs")]) : [3, 2];
|
|
13987
13987
|
case 1:
|
|
13988
13988
|
d = p.sent().default, Fn(i, Vt, new d(ti(Qr({}, i.options), { chainId: a, rpc: Qr({}, h, (u = i.options) === null || u === void 0 ? void 0 : u.rpc) }))), p.label = 2;
|
|
13989
13989
|
case 2:
|
|
@@ -15560,7 +15560,7 @@ xs = async function() {
|
|
|
15560
15560
|
};
|
|
15561
15561
|
ma = /* @__PURE__ */ new WeakSet();
|
|
15562
15562
|
Vo = async function() {
|
|
15563
|
-
const { EthereumProvider: e } = await import("./index.es-
|
|
15563
|
+
const { EthereumProvider: e } = await import("./index.es-rEir51oG.mjs"), t = this.chains.map(({ id: r }) => r);
|
|
15564
15564
|
if (t.length) {
|
|
15565
15565
|
const {
|
|
15566
15566
|
projectId: r,
|
package/lib/executor.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var fe=Object.defineProperty;var me=(e,a,t)=>a in e?fe(e,a,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[a]=t;var d=(e,a,t)=>me(e,typeof a!="symbol"?a+"":a,t);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("./address-RcMobNYE.js"),P=require("./chain-itK5uGYL.js"),j=require("./chunk-IMTC3J2M-D-un3eDX.js"),le=require("./platform-CyTWPtDR.js"),te=require("./address-B-_yHNB2.js"),he=require("./unsignedTransaction-C1YeEl4G.js"),V=require("./platform-CG_VHRJU.js"),ge=require("./contract-MJZ8ZoSX.js"),pe=require("./unsignedTransaction-B7AZXsTD.js"),x=require("./platform-PNwsacZi.js"),Ce=require("./index-BeQ668oT.js"),re=require("./address-CNhzoegm.js"),be=require("./unsignedTransaction-DzSLsK-p.js"),we=require("./index-B-S6avdv.js"),Ae=require("./index-FCA-cXcS.js"),E=require("./web3-CjTx3huW.js"),X=require("./unsignedTransaction-DFUF8DSp.js"),ye=require("./account-QG_Hi4er.js"),z={Testnet:"https://executor-testnet.labsapis.com",Mainnet:"https://executor.labsapis.com"},U={Testnet:{Aptos:"0x14a12d1fd6ef371b70c2113155534ec152ec7f779e281b54866c796c9a4a58d3",Avalanche:"0x2cfEC91B50f657Cc86Ec693542527ac3e03bF742",BaseSepolia:"0x4983C6bD3bB7DA9EECe71cfa7AE4C67CAbf362F0",Sepolia:"0x0F78904c750801391EbBf308181e9d6fc892B0f3",Solana:"CXGRA5SCc8jxDbaQPZrmmZNu2JV34DP7gFW4m31uC1zs"},Mainnet:{Aptos:"0x9f5ad7d5c2d067ca4abb6d8d6aba44c15596b71a1def8eb4596089b527bb2eb1",Arbitrum:"0x55Dd4466BFec29527C54A72fd306efb54e5F7027",Avalanche:"0xd331819478b74d8a7B8EA631118B4a4e50F6EbD1",Base:"0x08FEB1838C3d7F8509DA1EBb9a11a94c1f006cb2",Ethereum:"0xeEFb36c4458dA7798742cf038C5c27E07aB9c51E",Optimism:"0xBC6f9d1CBa49DB365728478cefa02F6743617637",Polygon:"0x007995f2AEcfBC745f20a7AE8D3a02c0EbF46264",Unichain:"0xA7aBDb8f2108901c586543BD5e10E4fA263F4A47",Solana:"CXGRA5SCc8jxDbaQPZrmmZNu2JV34DP7gFW4m31uC1zs"}},J={Testnet:{executorId:"0x4000cfe2955d8355b3d3cf186f854fea9f787a457257056926fde1ec977670eb",executorRequestsId:"0x2d9ccf3cce3f7dce408e5455e90b80a8161ad9673d1366c2a5def60ad93657a8"},Mainnet:{executorId:"0xdb0fe8bb1e2b5be628adbea0636063325073e1070ee11e4281457dfd7f158235",executorRequestsId:"0xc030df7a3eed1494fa4b64aa8ab63a79041cf1114f4ff2b7ab5aca1c684a21a7"}},xe={Testnet:"execXUrAsMnqMmTHj5m7N1YQgsDz3cwGLYCYyuDRciV",Mainnet:"execXUrAsMnqMmTHj5m7N1YQgsDz3cwGLYCYyuDRciV"},Ee=5001n,Se={Testnet:{Aptos:5000n,Avalanche:200000n,BaseSepolia:200000n,Sepolia:200000n,Solana:250000n,Sui:8000000n},Mainnet:{Aptos:5000n,Arbitrum:400000n,Avalanche:250000n,Base:250000n,Ethereum:250000n,Optimism:250000n,Polygon:250000n,Unichain:250000n,Solana:250000n,Sui:8000000n}},ve={Testnet:{Aptos:"0x23b54f6e29bba7f4123d088f4cfcd83f5e23a049de15895b119ce5a6cb5faa91",Avalanche:"0x8F26A0025dcCc6Cfc07A7d38756280a10E295ad7",BaseSepolia:"0x8F26A0025dcCc6Cfc07A7d38756280a10E295ad7",Sepolia:"0x8F26A0025dcCc6Cfc07A7d38756280a10E295ad7",Solana:"9r6q2iEg4MBevjC8reaLmQUDxueF3vabUoqDkZ2LoAYe",Sui:"0x30bd9b3d5ad00f38fd0c314139ba47ccb3c78353d99880d81125ca0c370b415e"},Mainnet:{Aptos:"0x1f177e724a874ab6267172a3049291c480fc665883e6a3ac95d0909492c09dc8",Solana:"JB3rmygUVuVZzgkxvMdV8mSKLJeQAkSXEK284Dqsziah",Sui:"0xbfa1240e48c622d97881473953be730091161b7931d89bd6afe667841cf69ef4",Arbitrum:"0xF11e0efF8b11Ce382645dd75352fC16b3aB3551E",Avalanche:"0xF11e0efF8b11Ce382645dd75352fC16b3aB3551E",Base:"0xF11e0efF8b11Ce382645dd75352fC16b3aB3551E",Ethereum:"0xF11e0efF8b11Ce382645dd75352fC16b3aB3551E",Optimism:"0xF11e0efF8b11Ce382645dd75352fC16b3aB3551E",Polygon:"0xF11e0efF8b11Ce382645dd75352fC16b3aB3551E",Unichain:"0xF11e0efF8b11Ce382645dd75352fC16b3aB3551E"}};var b;(function(e){e.Pending="pending",e.Failed="failed",e.Unsupported="unsupported",e.Submitted="submitted",e.Underpaid="underpaid",e.Aborted="aborted"})(b||(b={}));async function Pe(e){const a=`${z[e]}/v0/capabilities`;try{return(await s.axios.get(a)).data}catch{throw new Error(`Failed to fetch capabilities for network: ${e}.`)}}async function Fe(e,a,t,r){const n=`${z[e]}/v0/quote`;try{return(await s.axios.post(n,{srcChain:s.toChainId(a),dstChain:s.toChainId(t),relayInstructions:r})).data}catch{throw new Error("Failed to fetch signed quote.")}}async function Ie(e,a,t){const r=`${z[e]}/v0/status/tx`;try{return(await s.axios.post(r,{txHash:a,chainId:s.toChainId(t)})).data}catch{throw new Error(`Failed to fetch status for txHash: ${a}.`)}}const De=65535n;function Me(e,a){if(a>De)throw new Error("dBps exceeds max u16");if(a>0){const t=e*a/100000n,r=e-t;return{referrerFee:t,remainingAmount:r}}return{referrerFee:0n,remainingAmount:e}}const Be=[{name:"gasLimit",binary:"uint",size:16},{name:"msgValue",binary:"uint",size:16}],Te=[{name:"dropOff",binary:"uint",size:16},{name:"recipient",...s.universalAddressItem}],ze=[{name:"request",binary:"switch",idSize:1,idTag:"type",layouts:[[[1,"GasInstruction"],Be],[[2,"GasDropOffInstruction"],Te]]}],H=[{name:"requests",binary:"array",layout:ze}];var Z;(function(e){e.ERM1="ERM1",e.ERV1="ERV1",e.ERN1="ERN1",e.ERC1="ERC1"})(Z||(Z={}));const Ue={to:e=>new Date(Number(e*1000n)),from:e=>BigInt(e.getTime())/1000n},$e=[{name:"quote",binary:"switch",idSize:4,idTag:"prefix",layouts:[[[1162948657,"EQ01"],[{name:"quoterAddress",binary:"bytes",size:20},{name:"payeeAddress",binary:"bytes",size:32},{name:"srcChain",binary:"uint",size:2},{name:"dstChain",binary:"uint",size:2},{name:"expiryTime",binary:"uint",size:8,custom:Ue},{name:"baseFee",binary:"uint",size:8},{name:"dstGasPrice",binary:"uint",size:8},{name:"srcPrice",binary:"uint",size:8},{name:"dstPrice",binary:"uint",size:8}]]]}],ne=[...$e,{name:"signature",binary:"bytes",size:65}];class ${constructor(a,t,r,n){d(this,"network");d(this,"chain");d(this,"provider");d(this,"contracts");d(this,"usdcId");d(this,"shimContract");var c;if(this.network=a,this.chain=t,this.provider=r,this.contracts=n,a==="Devnet")throw new Error("CCTPW7Executor not supported on Devnet");const i=s.usdcContract.get(this.network,this.chain);if(!i)throw new Error(`No USDC contract configured for network=${this.network} chain=${this.chain}`);this.usdcId=i;const o=(c=U[a])==null?void 0:c[t];if(!o)throw new Error(`Shim contract for ${t} not found`);this.shimContract=o}static async fromRpc(a,t){const[r,n]=await le.AptosPlatform.chainFromRpc(a),i=t[n];if(!i)throw new Error(`No config found for ${n}`);if(i.network!==r)throw new Error(`Network mismatch: ${i.network} != ${r}`);return new $(r,n,a,i.contracts)}async*transfer(a,t,r){const n=new te.AptosAddress(a).unwrap(),i=j.l.from(t.address.toUniversalAddress().toUint8Array()),o=j.l.from(this.usdcId),c=r.remainingAmount+r.referrerFee,u=s.circleChainId.get(this.network,t.chain),m=n,l=n,h=[c,u,i.toString(),o.toString(),r.estimatedCost,s.toChainId(t.chain),m,r.signedQuote,r.relayInstructions,r.referrerFeeDbps,l],f={function:`${this.shimContract}::cctp_v1_with_executor::deposit_for_burn_entry`,functionArguments:h};yield this.createUnsignedTx(f,"AtposCCTPW7Executor.Transfer")}createUnsignedTx(a,t,r=!1){return new he.AptosUnsignedTransaction(a,this.network,this.chain,t,r)}}P.registerProtocol(te._platform,"CCTPW7Executor",$);class R{constructor(a,t,r,n){d(this,"network");d(this,"chain");d(this,"provider");d(this,"contracts");d(this,"chainId");d(this,"shimContract");var o;if(this.network=a,this.chain=t,this.provider=r,this.contracts=n,a==="Devnet")throw new Error("CCTPW7Executor not supported on Devnet");this.chainId=s.networkChainToNativeChainId.get(a,t);const i=(o=U[a])==null?void 0:o[t];if(!i)throw new Error(`Shim contract for ${t} not found`);this.shimContract=i}static async fromRpc(a,t){const[r,n]=await V.EvmPlatform.chainFromRpc(a),i=t[n];if(i.network!==r)throw new Error(`Network mismatch: ${i.network} != ${r}`);return new R(r,n,a,i.contracts)}async*transfer(a,t,r){const n=new s.EvmAddress(a).toString(),i=t.address.toUniversalAddress().toUint8Array(),o=r.remainingAmount+r.referrerFee,c=s.usdcContract.get(this.network,this.chain),u=V.EvmPlatform.getTokenImplementation(this.provider,c);if(await u.allowance(n,this.shimContract)<o){const g=await u.approve.populateTransaction(this.shimContract,o);yield this.createUnsignedTx(s.addFrom(g,n),"ERC20.approve of EvmCCTPW7Executor",!1)}const l=["function depositForBurn(uint256 amount, uint16 destinationChain, uint32 destinationDomain, bytes32 mintRecipient, address burnToken, (address refundAddress, bytes signedQuote, bytes instructions) executorArgs, (uint16 dbps, address payee) feeArgs) external payable returns (uint64 nonce)"],f=await new ge.Contract(this.shimContract,l,this.provider).getFunction("depositForBurn").populateTransaction(o,s.toChainId(t.chain),s.circleChainId.get(this.network,t.chain),i,c,{refundAddress:n,signedQuote:r.signedQuote,instructions:r.relayInstructions},{dbps:r.referrerFeeDbps,payee:r.referrer.address.toString()});f.value=r.estimatedCost,yield this.createUnsignedTx(s.addFrom(f,n),"EvmCCTPW7Executor.depositForBurn")}createUnsignedTx(a,t,r=!1){return new pe.EvmUnsignedTransaction(s.addChainId(a,this.chainId),this.network,this.chain,t,r)}}P.registerProtocol(s._platform,"CCTPW7Executor",R);class q{constructor(a,t,r,n){d(this,"network");d(this,"chain");d(this,"provider");d(this,"contracts");d(this,"usdcId");d(this,"usdcTreasuryId");d(this,"tokenMessengerId");d(this,"tokenMessengerStateId");d(this,"messageTransmitterId");d(this,"messageTransmitterStateId");d(this,"executorId");d(this,"executorRequestsId");var m,l,h,f;if(this.network=a,this.chain=t,this.provider=r,this.contracts=n,a==="Devnet")throw new Error("CCTPW7Executor not supported on Devnet");const i=(g,C)=>{if(!g)throw new Error(C);return g};this.usdcId=i(s.usdcContract.get(this.network,this.chain),`No USDC contract configured for network=${this.network} chain=${this.chain}`);const{tokenMessengerState:o,messageTransmitterState:c,usdcTreasury:u}=Ce.suiCircleObjects(a);this.usdcTreasuryId=u,this.tokenMessengerId=i((m=n.cctp)==null?void 0:m.tokenMessenger,`Circle Token Messenger contract for domain ${t} not found`),this.messageTransmitterId=i((l=n.cctp)==null?void 0:l.messageTransmitter,`Circle Message Transmitter contract for domain ${t} not found`),this.tokenMessengerStateId=o,this.messageTransmitterStateId=c,this.executorId=i((h=J[a])==null?void 0:h.executorId,`Executor contract for ${a} not found`),this.executorRequestsId=i((f=J[a])==null?void 0:f.executorRequestsId,`Executor requests contract for ${a} not found`)}static async fromRpc(a,t){const[r,n]=await x.SuiPlatform.chainFromRpc(a),i=t[n];if(i.network!==r)throw new Error(`Network mismatch: ${i.network} != ${r}`);return new q(r,n,a,i.contracts)}async*transfer(a,t,r){const n=new x.Transaction,i=new re.SuiAddress(a).unwrap(),o=s.circleChainId.get(this.network,t.chain),[c,...u]=await x.SuiPlatform.getCoins(this.provider,a,this.usdcId);if(c===void 0)throw new Error("No USDC in wallet");const m=n.object(c.coinObjectId);u.length>0&&n.mergeCoins(m,u.map(p=>n.object(p.coinObjectId)));let l;if(r.referrerFee>0n){const[p,y]=n.splitCoins(m,[r.remainingAmount,r.referrerFee]);l=p,n.transferObjects([y],s.canonicalAddress(r.referrer))}else{const[p]=n.splitCoins(m,[r.remainingAmount]);l=p}const[h,f]=n.moveCall({target:`${this.tokenMessengerId}::deposit_for_burn::deposit_for_burn`,arguments:[l,n.pure.u32(o),n.pure.address(t.address.toUniversalAddress().toString()),n.object(this.tokenMessengerStateId),n.object(this.messageTransmitterStateId),n.object("0x403"),n.object(this.usdcTreasuryId)],typeArguments:[this.usdcId]}),[g]=n.moveCall({target:`${this.messageTransmitterId}::message::source_domain`,arguments:[f]}),[C]=n.moveCall({target:`${this.messageTransmitterId}::message::nonce`,arguments:[f]}),[w]=n.moveCall({target:`${this.executorRequestsId}::executor_requests::make_cctp_v1_request`,arguments:[g,C]}),[A]=n.splitCoins(n.gas,[n.pure.u64(r.estimatedCost)]);n.moveCall({target:`${this.executorId}::executor::request_execution`,arguments:[A,n.object(x.SUI_CLOCK_OBJECT_ID),n.pure.u16(s.toChainId(t.chain)),n.pure.address("0x0"),n.pure.address(i),n.pure.vector("u8",r.signedQuote),w,n.pure.vector("u8",r.relayInstructions)]}),yield this.createUnsignedTx(n,"SuiCCTPW7Executor.Transfer")}createUnsignedTx(a,t,r=!1){return new be.SuiUnsignedTransaction(a,this.network,this.chain,t,r)}}P.registerProtocol(x._platform,"CCTPW7Executor",q);const F=new s.PublicKey("TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA");new s.PublicKey("TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb");const N=new s.PublicKey("ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL");new s.PublicKey("So11111111111111111111111111111111111111112");new s.PublicKey("9pan9bMn5HatX4EJdBwg9VgCa7Uz5HL8N1m5D3NdXejP");class Re extends Error{constructor(a){super(a)}}class qe extends Re{constructor(){super(...arguments),this.name="TokenOwnerOffCurveError"}}var T;(function(e){e[e.InitializeMint=0]="InitializeMint",e[e.InitializeAccount=1]="InitializeAccount",e[e.InitializeMultisig=2]="InitializeMultisig",e[e.Transfer=3]="Transfer",e[e.Approve=4]="Approve",e[e.Revoke=5]="Revoke",e[e.SetAuthority=6]="SetAuthority",e[e.MintTo=7]="MintTo",e[e.Burn=8]="Burn",e[e.CloseAccount=9]="CloseAccount",e[e.FreezeAccount=10]="FreezeAccount",e[e.ThawAccount=11]="ThawAccount",e[e.TransferChecked=12]="TransferChecked",e[e.ApproveChecked=13]="ApproveChecked",e[e.MintToChecked=14]="MintToChecked",e[e.BurnChecked=15]="BurnChecked",e[e.InitializeAccount2=16]="InitializeAccount2",e[e.SyncNative=17]="SyncNative",e[e.InitializeAccount3=18]="InitializeAccount3",e[e.InitializeMultisig2=19]="InitializeMultisig2",e[e.InitializeMint2=20]="InitializeMint2",e[e.GetAccountDataSize=21]="GetAccountDataSize",e[e.InitializeImmutableOwner=22]="InitializeImmutableOwner",e[e.AmountToUiAmount=23]="AmountToUiAmount",e[e.UiAmountToAmount=24]="UiAmountToAmount",e[e.InitializeMintCloseAuthority=25]="InitializeMintCloseAuthority",e[e.TransferFeeExtension=26]="TransferFeeExtension",e[e.ConfidentialTransferExtension=27]="ConfidentialTransferExtension",e[e.DefaultAccountStateExtension=28]="DefaultAccountStateExtension",e[e.Reallocate=29]="Reallocate",e[e.MemoTransferExtension=30]="MemoTransferExtension",e[e.CreateNativeMint=31]="CreateNativeMint",e[e.InitializeNonTransferableMint=32]="InitializeNonTransferableMint",e[e.InterestBearingMintExtension=33]="InterestBearingMintExtension",e[e.CpiGuardExtension=34]="CpiGuardExtension",e[e.InitializePermanentDelegate=35]="InitializePermanentDelegate",e[e.TransferHookExtension=36]="TransferHookExtension",e[e.MetadataPointerExtension=39]="MetadataPointerExtension"})(T||(T={}));function Ne(e,a,t){if(t.length){e.push({pubkey:a,isSigner:!1,isWritable:!1});for(const r of t)e.push({pubkey:r instanceof s.PublicKey?r:r.publicKey,isSigner:!0,isWritable:!1})}else e.push({pubkey:a,isSigner:!0,isWritable:!1});return e}const We=s.struct([s.u32("mintAuthorityOption"),E.publicKey("mintAuthority"),E.u64("supply"),s.u8("decimals"),E.bool("isInitialized"),s.u32("freezeAuthorityOption"),E.publicKey("freezeAuthority")]);We.span;function Y(e,a,t=!1,r=F,n=N){if(!t&&!s.PublicKey.isOnCurve(a.toBuffer()))throw new qe;const[i]=s.PublicKey.findProgramAddressSync([a.toBuffer(),r.toBuffer(),e.toBuffer()],n);return i}function _e(e,a,t,r,n=F,i=N){return Oe(e,a,t,r,s.dist.Buffer.from([1]),n,i)}function Oe(e,a,t,r,n,i=F,o=N){const c=[{pubkey:e,isSigner:!0,isWritable:!0},{pubkey:a,isSigner:!1,isWritable:!0},{pubkey:t,isSigner:!1,isWritable:!1},{pubkey:r,isSigner:!1,isWritable:!1},{pubkey:s.SystemProgram.programId,isSigner:!1,isWritable:!1},{pubkey:i,isSigner:!1,isWritable:!1}];return new s.TransactionInstruction({keys:c,programId:o,data:n})}const ee=s.struct([s.u8("instruction"),E.u64("amount")]);function ke(e,a,t,r,n=[],i=F){const o=Ne([{pubkey:e,isSigner:!1,isWritable:!0},{pubkey:a,isSigner:!1,isWritable:!0}],t,n),c=s.dist.Buffer.alloc(ee.span);return ee.encode({instruction:T.Transfer,amount:BigInt(r)},c),new s.TransactionInstruction({keys:o,programId:i,data:c})}const Ge={version:"0.1.0",name:"example_cctp_with_executor",instructions:[{name:"relayLastMessage",accounts:[{name:"payer",isMut:!0,isSigner:!0},{name:"payee",isMut:!0,isSigner:!1},{name:"messageTransmitter",isMut:!1,isSigner:!1},{name:"executorProgram",isMut:!1,isSigner:!1},{name:"systemProgram",isMut:!1,isSigner:!1}],args:[{name:"args",type:{defined:"relayLastMessageArgs"}}]}],types:[{name:"relayLastMessageArgs",type:{kind:"struct",fields:[{name:"recipientChain",type:"u16"},{name:"execAmount",type:"u64"},{name:"signedQuoteBytes",type:"bytes"},{name:"relayInstructions",type:"bytes"}]}}]};class W{constructor(a,t,r,n){d(this,"network");d(this,"chain");d(this,"connection");d(this,"contracts");d(this,"tokenMessengerProgramId");d(this,"messageTransmitterProgramId");d(this,"shimProgramId");d(this,"executorProgramId");var o,c,u;if(this.network=a,this.chain=t,this.connection=r,this.contracts=n,a==="Devnet")throw new Error("CCTPW7Executor not supported on Devnet");const i=(m,l)=>{if(!m)throw new Error(l);return new s.PublicKey(m)};this.tokenMessengerProgramId=i((o=n.cctp)==null?void 0:o.tokenMessenger,`Circle Token Messenger contract for domain ${t} not found`),this.messageTransmitterProgramId=i((c=n.cctp)==null?void 0:c.messageTransmitter,`Circle Message Transmitter contract for domain ${t} not found`),this.shimProgramId=i((u=U[a])==null?void 0:u[t],`Shim contract for ${t} not found`),this.executorProgramId=i(xe[a],`Executor contract for ${a} not found`)}static async fromRpc(a,t){const[r,n]=await X.SolanaPlatform.chainFromRpc(a),i=t[n];if(i.network!==r)throw new Error(`Network mismatch: ${i.network} != ${r}`);return new W(r,n,a,i.contracts)}async*transfer(a,t,r){const n=new s.PublicKey(s.usdcContract.get(this.network,this.chain)),i=new s.SolanaAddress(a).unwrap(),o=Y(n,i),c=new s.SolanaAddress(r.referrer.address).unwrap(),u=new s.Transaction;if(u.feePayer=i,r.referrerFee>0n){const w=Y(n,c);await this.connection.getAccountInfo(w)||u.add(_e(i,w,c,n)),u.add(ke(o,w,i,r.referrerFee))}const m=s.circleChainId.get(this.network,t.chain),l=t.address.toUniversalAddress(),h=s.Keypair.generate();u.add(await we.createDepositForBurnInstruction(this.messageTransmitterProgramId,this.tokenMessengerProgramId,n,m,i,o,l,r.remainingAmount,h.publicKey));const f=new Ae.Program(Ge,this.shimProgramId,{connection:null}),g=s.deserialize$1(ne,r.signedQuote),C=ye.deriveAddress("message_transmitter",this.messageTransmitterProgramId);u.add(await f.methods.relayLastMessage({execAmount:new s.BN(r.estimatedCost.toString()),recipientChain:s.toChainId(t.chain),signedQuoteBytes:s.dist.Buffer.from(r.signedQuote),relayInstructions:s.dist.Buffer.from(r.relayInstructions)}).accounts({payer:i,messageTransmitter:C,payee:new s.PublicKey(g.quote.payeeAddress),executorProgram:this.executorProgramId}).instruction()),yield this.createUnsignedTx({transaction:u,signers:[h]},"SvmCCTPW7Executor.Transfer")}createUnsignedTx(a,t,r=!1){return new X.SolanaUnsignedTransaction(a,this.network,this.chain,t,r)}}P.registerProtocol(s._platform$1,"CCTPW7Executor",W);let S;function Le(e){if(e.referrerFeeDbps<0||e.referrerFeeDbps>65535n)throw new Error("Referrer fee must be between 0 and 65535");class a extends v{}return d(a,"config",e),a}class v extends s.AutomaticRoute{constructor(){super(...arguments);d(this,"staticConfig",this.constructor.config)}static supportedNetworks(){return["Mainnet","Testnet"]}static supportedChains(t){return s.circleContractChains.has(t)?s.circleContractChains.get(t):[]}static async supportedDestinationTokens(t,r,n){const i=s.usdcContract.get(r.network,r.chain);if(!(i&&s.isSameToken(t,s.Wormhole.tokenId(r.chain,i))))return[];const{network:o,chain:c}=n;return s.usdcContract.has(o,c)?[s.Wormhole.chainAddress(c,s.usdcContract.get(o,c))]:[]}getDefaultOptions(){return{nativeGas:0}}async validate(t,r){var i;return(i=r.options)!=null&&i.nativeGas&&(r.options.nativeGas<0||r.options.nativeGas>1)?{valid:!1,error:new Error("Invalid native gas percentage"),params:r}:{valid:!0,params:{normalizedParams:{amount:t.parseAmount(r.amount)},options:r.options??this.getDefaultOptions(),...r}}}async quote(t,r){var L,Q;const{fromChain:n,toChain:i}=t;if(!s.usdcContract.get(n.network,n.chain))throw new Error("Invalid transfer, no USDC contract on source");const c=s.usdcContract.get(i.network,i.chain);if(!c)throw new Error("Invalid transfer, no USDC contract on destination");const u=(L=ve[n.network])==null?void 0:L[n.chain];if(!u)return{success:!1,error:new Error("No referrer address found")};const m=s.Wormhole.chainAddress(n.chain,u),l=this.staticConfig.referrerFeeDbps,{referrerFee:h,remainingAmount:f}=Me(s.units(r.normalizedParams.amount),this.staticConfig.referrerFeeDbps);if(f<=0n)return{success:!1,error:new Error("Amount after fee <= 0")};const g=(Q=Se[n.network])==null?void 0:Q[i.chain];if(!g)return{success:!1,error:new Error("Gas limit not found")};const C=await Pe(n.network);if(!C[s.toChainId(n.chain)])return{success:!1,error:new Error("Unsupported source chain")};const A=C[s.toChainId(i.chain)];if(!A||!A.requestPrefixes.includes("ERC1"))return{success:!1,error:new Error("Unsupported destination chain")};const{recipient:p}=t;let y=!0;if(p&&i.chain==="Solana"){const de=s.Wormhole.parseAddress("Solana",c),ue=await i.getTokenAccount(p.address,de),K=await i.getRpc();y=await K.getAccountInfo(new s.SolanaAddress(ue.address).unwrap())!==null,!y&&!S&&(S=BigInt(await K.getMinimumBalanceForRentExemption(165)))}let I=0n;i.chain==="Solana"&&(I+=Ee,!y&&S&&(I+=S));const D=[];D.push({request:{type:"GasInstruction",gasLimit:g,msgValue:I}});const _=BigInt(A.gasDropOffLimit),M=r.options.nativeGas&&_>0n?BigInt(Math.round(r.options.nativeGas*100))*_/100n:0n;(M>0n||!y)&&D.push({request:{type:"GasDropOffInstruction",dropOff:M,recipient:p?p.address.toUniversalAddress():new s.UniversalAddress(new Uint8Array(32))}});const O=s.serialize$1(H,{requests:D}),B=await Fe(n.network,n.chain,i.chain,s.hex.encode(O,!0));if(!B.estimatedCost)return{success:!1,error:new Error("No estimated cost")};const k=s.hex.decode(B.signedQuote),se=s.deserialize$1(ne,k),ae=n.chain==="Polygon"?2e3*200:s.estimateFinalityTime(n.chain)+1e3,G=BigInt(B.estimatedCost),ie={signedQuote:k,relayInstructions:O,estimatedCost:G,referrer:m,referrerFee:h,remainingAmount:f,referrerFeeDbps:l},[oe,ce]=await Promise.all([n.getDecimals("native"),i.getDecimals("native")]);return{success:!0,params:r,sourceToken:{token:t.source.id,amount:r.normalizedParams.amount},destinationToken:{token:t.destination.id,amount:s.fromBaseUnits(f,t.destination.decimals)},relayFee:{token:s.nativeTokenId(n.chain),amount:s.fromBaseUnits(G,oe)},destinationNativeGas:s.fromBaseUnits(M,ce),eta:ae,expires:se.quote.expiryTime,details:ie}}async initiate(t,r,n,i){if(!n.details)throw new Error("Missing quote details");s.deserialize$1(H,n.details.relayInstructions).requests.forEach(({request:f})=>{if(f.type==="GasDropOffInstruction"&&!f.recipient.equals(i.address.toUniversalAddress()))throw new Error("Gas drop-off recipient does not match")});const c=await t.fromChain.getProtocol("CCTPW7Executor"),u=s.Wormhole.parseAddress(r.chain(),r.address());let m=i;if(i.chain==="Solana"){const f=s.Wormhole.parseAddress("Solana",s.usdcContract.get(t.toChain.network,t.toChain.chain));m=await t.toChain.getTokenAccount(i.address,f)}const l=await c.transfer(u,m,n.details),h=await s.signSendWait(t.fromChain,l,r);return{from:t.fromChain.chain,to:t.toChain.chain,state:s.TransferState.SourceInitiated,originTxs:h}}async*track(t,r){if(s.isCompleted(t)||s.isFailed(t))return t;let n=r||60*60*1e3;for(;n>0;){const i=Date.now();if(s.isSourceInitiated(t)||s.isSourceFinalized(t)||s.isAttested(t))try{const[o]=await Ie(this.wh.network,t.originTxs.at(-1).txid,t.from);if(!o)throw new Error("No transaction status found");const c=o==null?void 0:o.status;if((c===b.Failed||c===b.Underpaid||c===b.Unsupported||c===b.Aborted)&&(t={...t,state:s.TransferState.Failed,error:new re.RelayFailedError(`Relay failed with status: ${c}`)}),c===b.Submitted&&(t={...t,state:s.TransferState.DestinationFinalized,attestation:{id:o.id,attestation:{}}}),yield t,s.isCompleted(t)||s.isFailed(t))return t}catch(o){console.error(`Error fetching transaction status: ${o.message||o}`)}await new Promise(o=>setTimeout(o,3e3)),n-=Date.now()-i}return t}}d(v,"NATIVE_GAS_DROPOFF_SUPPORTED",!0),d(v,"config",{referrerFeeDbps:0n}),d(v,"meta",{name:"CCTPW7ExecutorRoute",provider:"W7 Executor"});exports.cctpW7ExecutorRoute=Le;
|