@wormhole-foundation/wormhole-connect 4.1.0-beta.0-development → 4.1.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/README.md +1 -1
- package/dist/main.mjs +68 -68
- package/dist/src/config/testnet/chains.d.ts.map +1 -1
- package/dist/src/config/testnet/rpcs.d.ts.map +1 -1
- package/dist/src/config/testnet/tokens.d.ts.map +1 -1
- package/dist/src/sdklegacy/config/TESTNET.d.ts.map +1 -1
- package/lib/{aptos-BRApiL_4.mjs → aptos-B84P9rJZ.mjs} +2 -2
- package/lib/{aptos-d56Mw8DO.js → aptos-DWDR5o78.js} +1 -1
- package/lib/{basic-DjAbnFVK.mjs → basic-BERCwt2M.mjs} +2 -2
- package/lib/{basic-DR75AlQZ.mjs → basic-CukRIaOD.mjs} +2 -2
- package/lib/{basic-BxzNlZH2.js → basic-DJXXfABO.js} +1 -1
- package/lib/{basic-Bj1RjRlj.js → basic-NhXxxbR1.js} +1 -1
- package/lib/{constants-Bkyn6tLV.js → constants-B9TBfA4z.js} +1 -1
- package/lib/{constants-PWEvTwIh.mjs → constants-VaoVbllu.mjs} +4 -4
- package/lib/{core-CkIseV8K.mjs → core-BCZrVb_s.mjs} +5 -5
- package/lib/{core-CCO0WKg_.js → core-BE6SS7Ye.js} +3 -3
- package/lib/{evm-BAU31wxF.js → evm--K7mr7Kr.js} +2 -2
- package/lib/{evm-9NnChBii.js → evm-C5BixKBn.js} +1 -1
- package/lib/{evm-2dSclZz6.mjs → evm-CmmnpcFD.mjs} +3 -3
- package/lib/{evm-CMxUV_bG.mjs → evm-DKaWm7eC.mjs} +3 -3
- package/lib/hosted.js +1 -1
- package/lib/hosted.mjs +1 -1
- package/lib/{hypercore-DJV-pPts.js → hypercore-4R7JGmbr.js} +1 -1
- package/lib/{hypercore-Bmlyd4uI.mjs → hypercore-birmbh9T.mjs} +9 -9
- package/lib/{index-arjwwpj2.mjs → index-BN_2mA2n.mjs} +1 -1
- package/lib/{index-C5j1HoFr.js → index-BRFbmsc_.js} +1 -1
- package/lib/{index-CS6YnwIH.js → index-BTcij9Np.js} +1 -1
- package/lib/{index-cRi8si5A.js → index-BUbUhbMe.js} +1 -1
- package/lib/{index-DUyGY36L.js → index-Bs28m4ya.js} +1 -1
- package/lib/{index-B16yfCYF.mjs → index-C8YhpD9T.mjs} +1 -1
- package/lib/{index-BYuhx88C.js → index-C8eqQ_7p.js} +1 -1
- package/lib/{index-CZHdN9pg.js → index-CED5jdrg.js} +1 -1
- package/lib/{index-Cl9Df47-.mjs → index-CH0iw38J.mjs} +1 -1
- package/lib/{index-hyk_rzOj.mjs → index-CR1itkLl.mjs} +700 -683
- package/lib/{index-CHvWl09c.js → index-Cw0jWBks.js} +1 -1
- package/lib/{index-BXsTZ9x_.mjs → index-DSnylejH.mjs} +23 -15
- package/lib/{index-CPGWCfWD.js → index-HrZv1SyT.js} +8 -8
- package/lib/{index-_IZO0QRl.mjs → index-N4FkpEh9.mjs} +1 -1
- package/lib/{index-Ds7-hb1n.mjs → index-Txz5xwr6.mjs} +1 -1
- package/lib/{index-BCKX-m7h.mjs → index-pYTU7pQK.mjs} +1 -1
- package/lib/{index.es-ByyzusUN.mjs → index.es-B0fk_42a.mjs} +3 -3
- package/lib/{index.es-BC9c-IV7.mjs → index.es-CDqFguL5.mjs} +2 -2
- package/lib/{index.es-BmZ1Eaml.js → index.es-Dg6IFrL4.js} +1 -1
- package/lib/{index.es-DxdcaWwJ.js → index.es-DmmqAOLD.js} +3 -3
- package/lib/index.js +1 -1
- package/lib/index.mjs +6 -6
- package/lib/lifi.js +1 -1
- package/lib/lifi.mjs +2 -2
- package/lib/mayan.js +1 -1
- package/lib/mayan.mjs +2 -2
- package/lib/monad.js +1 -1
- package/lib/monad.mjs +1 -1
- package/lib/ntt.js +1 -1
- package/lib/ntt.mjs +1 -1
- package/lib/{secp256k1-BLiUzGcX.js → secp256k1-BkoM1Jum.js} +1 -1
- package/lib/{secp256k1-r0ke-jeG.js → secp256k1-CcVQkYNr.js} +1 -1
- package/lib/{secp256k1-D24BZJAq.js → secp256k1-CglUNI04.js} +1 -1
- package/lib/{secp256k1-rufcCDcw.mjs → secp256k1-DROP2Lhv.mjs} +1 -1
- package/lib/{secp256k1-ZQ8UIhmk.mjs → secp256k1-DzRCmd6a.mjs} +1 -1
- package/lib/{secp256k1-CXRI4XfW.mjs → secp256k1-LTcmQEQ5.mjs} +1 -1
- package/lib/{solana-CXtk3UX1.js → solana-C4k_Yg7w.js} +4 -4
- package/lib/{solana-lhrSUH_P.mjs → solana-D1LVIhGd.mjs} +8 -8
- package/lib/{solanaEmbed.esm-BMynjubZ.js → solanaEmbed.esm--Ac-IlRA.js} +1 -1
- package/lib/{solanaEmbed.esm-CFu0h50b.mjs → solanaEmbed.esm-AvWQUA9e.mjs} +2 -2
- package/lib/src/config/testnet/chains.d.ts.map +1 -1
- package/lib/src/config/testnet/rpcs.d.ts.map +1 -1
- package/lib/src/config/testnet/tokens.d.ts.map +1 -1
- package/lib/src/sdklegacy/config/TESTNET.d.ts.map +1 -1
- package/lib/{sui-CZNJPZ5q.mjs → sui-BPAb7kcs.mjs} +2 -2
- package/lib/{sui-CBxh7zmc.js → sui-CgmDTkXK.js} +1 -1
- package/lib/{tokenHelpers-DZRdlDO-.js → tokenHelpers-CbE0g9BP.js} +1 -1
- package/lib/{tokenHelpers-DT6mPtNP.mjs → tokenHelpers-DvWQs1tu.mjs} +1 -1
- package/lib/{tokens-FIs8YBYj.mjs → tokens-BJDttoCp.mjs} +1 -1
- package/lib/{tokens--uOMY2-j.js → tokens-CvZuVW-g.js} +1 -1
- package/lib/{w3m-modal-B5PtkowQ.js → w3m-modal-ByamyZny.js} +1 -1
- package/lib/{w3m-modal-CBYJj-sR.mjs → w3m-modal-CtQ0TPA4.mjs} +2 -2
- package/lib/{w3m-modal-h85Jyy9l.mjs → w3m-modal-DM5Pf8SH.mjs} +2 -2
- package/lib/{w3m-modal-B3FfPDki.js → w3m-modal-k23UDiov.js} +1 -1
- package/package.json +6 -6
package/lib/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const r=require("react/jsx-runtime"),y=require("react"),Q=require("./platform-CCG_jgOO.js"),d0=require("@mui/material/ScopedCssBaseline"),Be=require("@mui/material/styles"),C=require("./index-
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const r=require("react/jsx-runtime"),y=require("react"),Q=require("./platform-CCG_jgOO.js"),d0=require("@mui/material/ScopedCssBaseline"),Be=require("@mui/material/styles"),C=require("./index-HrZv1SyT.js"),De=require("./hypercore-4R7JGmbr.js"),ge=require("@mui/material/Box"),G=require("@mui/material"),qe=require("./unsignedTransaction-DA4tlY5u.js"),xa=require("./constants-B9TBfA4z.js"),pe=require("./index-Cw0jWBks.js"),vt=require("./mint-CxQ6P5lT.js"),Le=require("@mui/material/Stack"),sr=require("@mui/material/Tooltip"),ae=require("@mui/material/Typography"),g0=require("@mui/icons-material/ContentCopy"),f0=require("@mui/icons-material/Done"),h0=require("@mui/icons-material/WarningAmberRounded"),Fo=require("@mui/material/Link"),j0=require("./dijkstra-Coh98Vg7.js"),Ho=require("@mui/material/SwipeableDrawer"),Jt=require("@mui/material/IconButton"),Go=require("@mui/icons-material/CloseRounded"),zt=require("@mui/material/CircularProgress"),Vo=require("@mui/material/List"),Gt=require("@mui/material/ListItemButton"),Jo=require("@mui/material/ListItemIcon"),qo=require("@mui/material/TextField"),Xo=require("@mui/material/Button"),dn=require("@mui/material/Card"),gn=require("@mui/material/CardContent"),y0=require("@mui/material/Badge"),Ca=require("@mui/material/Popover"),Ta=require("@mui/icons-material/ExpandLess"),ma=require("@mui/icons-material/ExpandMore"),N0=require("@mui/material/InputAdornment"),I0=require("@mui/icons-material/ArrowOutward"),pa=require("@mui/icons-material/ArrowBackRounded"),L0=require("@mui/icons-material/InfoOutline"),ri=require("@mui/material/ToggleButton"),Da=require("@mui/material/ToggleButtonGroup"),x0=require("@mui/icons-material/Close"),$o=require("@mui/material/CardActionArea"),Aa=require("@mui/material/CardHeader"),so=require("@mui/material/Divider"),C0=require("@mui/icons-material/InfoOutlined"),wa=require("@mui/material/Collapse"),T0=require("@mui/material/Switch"),m0=require("@mui/material/Modal"),fr=require("@mui/material/Skeleton"),p0=require("@mui/icons-material/SwapHoriz"),D0=require("@mui/material/LinearProgress"),js=require("./utils-DMf7wRGI.js"),ys=require("./tokens-CvZuVW-g.js"),A0=require("./index-BhMcIAHt.js");function w0(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const i=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,i.get?i:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const Fe=w0(y);var hi={exports:{}},hr={};/**
|
|
2
2
|
* @license React
|
|
3
3
|
* use-sync-external-store-with-selector.production.js
|
|
4
4
|
*
|
package/lib/index.mjs
CHANGED
|
@@ -4,14 +4,14 @@ import De, { useMemo as K, useCallback as ge, useRef as Ke, useEffect as je, use
|
|
|
4
4
|
import { p as oe, c as Fc, a as Qs, u as Tt, f as Lt, W as en, b as ni, T as Gc, n as Vc, i as Br, d as Gt, g as b2, t as ii, e as Jo, h as N1, j as Fe, k as Jc, w as Kn, s as qc, l as Xc, m as O2, o as bn, q as qo, r as pn, v as $c, x as Kc, y as eo, R as I1, z as to, A as L1, B as j1 } from "./platform-Cil_UtAQ.mjs";
|
|
5
5
|
import e4 from "@mui/material/ScopedCssBaseline";
|
|
6
6
|
import { useTheme as qe, createTheme as t4, ThemeProvider as n4 } from "@mui/material/styles";
|
|
7
|
-
import { c as P, i as v2, g as fn, a as k2, T as i4, b as r4, d as Xo, e as C1, f as o4, t as lr, h as s4, j as un, m as a4, s as Ps, k as Y2, l as $o, E as c4, n as Ko, o as U2, p as Te, q as _2, r as R2, u as l4, v as es, w as Q2, x as u4, y as mt, z as vr, A as M4, B as P2, U as kr, C as ts, D as $t, F as Bs, G as d4, H as g4, I as T1, J as f4, K as B2, L as h4, M as ur, N as x1, O as y4, P as N4 } from "./index-
|
|
8
|
-
import { W as Gg, a2 as Vg, a3 as Jg, $ as qg, Y as Xg, a1 as $g, Z as Kg, a6 as e7, _ as t7, a4 as n7, a5 as i7, a0 as r7, Q as o7, R as s7, V as a7, S as c7, X as l7 } from "./index-
|
|
9
|
-
import { W as I4, T as Ve, w as Z2, i as L4, s as j4, g as W2 } from "./hypercore-
|
|
7
|
+
import { c as P, i as v2, g as fn, a as k2, T as i4, b as r4, d as Xo, e as C1, f as o4, t as lr, h as s4, j as un, m as a4, s as Ps, k as Y2, l as $o, E as c4, n as Ko, o as U2, p as Te, q as _2, r as R2, u as l4, v as es, w as Q2, x as u4, y as mt, z as vr, A as M4, B as P2, U as kr, C as ts, D as $t, F as Bs, G as d4, H as g4, I as T1, J as f4, K as B2, L as h4, M as ur, N as x1, O as y4, P as N4 } from "./index-CR1itkLl.mjs";
|
|
8
|
+
import { W as Gg, a2 as Vg, a3 as Jg, $ as qg, Y as Xg, a1 as $g, Z as Kg, a6 as e7, _ as t7, a4 as n7, a5 as i7, a0 as r7, Q as o7, R as s7, V as a7, S as c7, X as l7 } from "./index-CR1itkLl.mjs";
|
|
9
|
+
import { W as I4, T as Ve, w as Z2, i as L4, s as j4, g as W2 } from "./hypercore-birmbh9T.mjs";
|
|
10
10
|
import ye from "@mui/material/Box";
|
|
11
11
|
import { useTheme as Ee, Box as fe, createSvgIcon as st, Collapse as C4, Select as T4, MenuItem as p1, CircularProgress as x4, Typography as Mt, Button as H2, DialogTitle as p4, Dialog as D4, useMediaQuery as Vt, ListItemButton as F2, Tooltip as Zr, Stack as An, Skeleton as Wt, ListItemIcon as m4, Card as G2, CardContent as A4, TextField as w4 } from "@mui/material";
|
|
12
12
|
import { C as Wr, P as wn, g as Zs, i as S4, c as Fi } from "./unsignedTransaction-DCDxTFq8.mjs";
|
|
13
|
-
import { W as V2 } from "./constants-
|
|
14
|
-
import { i as Hr, S as Sn, a as En, b as Ws, c as Hs, d as J2, e as q2, f as X2, g as D1 } from "./index-
|
|
13
|
+
import { W as V2 } from "./constants-VaoVbllu.mjs";
|
|
14
|
+
import { i as Hr, S as Sn, a as En, b as Ws, c as Hs, d as J2, e as q2, f as X2, g as D1 } from "./index-C8YhpD9T.mjs";
|
|
15
15
|
import { g as ki, T as E4, a as z4, b as b4, N as O4 } from "./mint-CoNdQTGM.mjs";
|
|
16
16
|
import me from "@mui/material/Stack";
|
|
17
17
|
import Fr from "@mui/material/Tooltip";
|
|
@@ -54,7 +54,7 @@ import no from "@mui/material/Skeleton";
|
|
|
54
54
|
import F4 from "@mui/icons-material/SwapHoriz";
|
|
55
55
|
import G4 from "@mui/material/LinearProgress";
|
|
56
56
|
import { l as m1 } from "./utils-BSxsyW2c.mjs";
|
|
57
|
-
import { findToken as A1 } from "./tokens-
|
|
57
|
+
import { findToken as A1 } from "./tokens-BJDttoCp.mjs";
|
|
58
58
|
import { r as V4 } from "./index-BQ0lWQfT.mjs";
|
|
59
59
|
var Gi = { exports: {} }, io = {};
|
|
60
60
|
/**
|
package/lib/lifi.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./utils-DMf7wRGI.js"),T=require("./tokenHelpers-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./utils-DMf7wRGI.js"),T=require("./tokenHelpers-CbE0g9BP.js"),S=require("./index-HrZv1SyT.js"),s=require("./platform-CCG_jgOO.js"),C=n=>{if(!n.estimate.fromAmountUSD)throw new e.SDKError(new e.ValidationError("Missing 'fromAmountUSD' in step estimate."));if(!n.estimate.toAmountUSD)throw new e.SDKError(new e.ValidationError("Missing 'toAmountUSD' in step estimate."));return{id:n.id,fromChainId:n.action.fromToken.chainId,fromToken:n.action.fromToken,fromAmount:n.action.fromAmount,fromAmountUSD:n.estimate.fromAmountUSD,fromAddress:n.action.fromAddress,toChainId:n.action.toToken.chainId,toToken:n.action.toToken,toAmount:n.estimate.toAmount,toAmountMin:n.estimate.toAmountMin,toAmountUSD:n.estimate.toAmountUSD,toAddress:n.action.toAddress||n.action.fromAddress,gasCostUSD:n.estimate.gasCosts?.[0]?.amountUSD||"0",steps:[n],insurance:{state:"NOT_INSURABLE",feeAmountUsd:"0"}}};class h extends s.AutomaticRoute{static meta={name:"LiFi",provider:"LiFi"};static NATIVE_GAS_DROPOFF_SUPPORTED=!1;static IS_AUTOMATIC=!0;config;getDefaultOptions(){return{slippage:e.DEFAULT_SLIPPAGE_PERCENT,maxPriceImpact:e.DEFAULT_MAX_PRICE_IMPACT_PERCENT,allowDestinationCall:!1}}static supportedNetworks(){return["Mainnet"]}static supportedChains(t){return e.supportedChains(t)}static isProtocolSupported(t){return e.supportedChains(t.network).includes(t.chain)}static async supportedDestinationTokens(t,i,o){return T.getAllTokenIdsForChain(o.chain)}async validate(t,i){if(t.fromChain.chain===t.toChain.chain)return{valid:!1,params:i,error:new Error("Same chain swaps are disabled")};const d=i.options?.slippage??e.DEFAULT_SLIPPAGE_PERCENT;if(d<0||d>1)return{valid:!1,params:i,error:new Error("Invalid slippage value")};const r=i.options?.maxPriceImpact??e.DEFAULT_MAX_PRICE_IMPACT_PERCENT;if(r<0||r>1)return{valid:!1,params:i,error:new Error("Invalid maxPriceImpact value")};const f=i.options?.bridges??e.DEFAULT_BRIDGES,l=i.options?.exchanges??e.DEFAULT_EXCHANGES;return{valid:!0,params:{...i,normalizedParams:{slippage:d,maxPriceImpact:r,bridges:f,exchanges:l}}}}fetchQuote(t,i){const{fromChain:o,toChain:d}=t,{normalizedParams:a}=i,r=e.toLifiChainId(o.chain),g=e.toLifiChainId(d.chain),f=t.sender?s.canonicalAddress(t.sender):e.generateThrowawayAddress(o.chain),l=t.recipient?s.canonicalAddress(t.recipient):e.generateThrowawayAddress(d.chain),{integrator:m,feePercent:u}=this.getFeeConfig(t),c={fromChain:r,toChain:g,fromToken:e.toLifiTokenAddress(t.source.id),toToken:e.toLifiTokenAddress(t.destination.id),fromAmount:s.units(t.parseAmount(i.amount)).toString(),fromAddress:f,toAddress:l,slippage:i.normalizedParams.slippage,maxPriceImpact:i.normalizedParams.maxPriceImpact,integrator:m,referrer:i.options.referrer,fee:u};return a.bridges?.allow&&(c.allowBridges=a.bridges.allow),a.bridges?.deny&&(c.denyBridges=a.bridges.deny),a.bridges?.prefer&&(c.preferBridges=a.bridges.prefer),a.exchanges?.allow&&(c.allowExchanges=a.exchanges.allow),a.exchanges?.deny&&(c.denyExchanges=a.exchanges.deny),a.exchanges?.prefer&&(c.preferExchanges=a.exchanges.prefer),e.getQuote(c)}getFeeConfig(t){return this.config?.getFeeConfig?this.config.getFeeConfig(t):{integrator:e.DEFAULT_INTEGRATOR,feePercent:0}}async quote(t,i){try{const o=await this.fetchQuote(t,i);return{success:!0,params:i,sourceToken:{token:t.source.id,amount:s.fromBaseUnits(BigInt(o.estimate?.fromAmount.toString()),t.source.decimals)},destinationToken:{token:t.destination.id,amount:s.fromBaseUnits(BigInt(o.estimate?.toAmount.toString()),t.destination.decimals)},eta:(o.estimate?.executionDuration||e.DEFAULT_ETA_SECONDS)*e.MILLISECONDS_PER_SECOND,details:o,provider:o.toolDetails.name}}catch(o){return{success:!1,error:o}}}async initiate(t,i,o,d){const a=i.address(),r=s.canonicalAddress(d),g=await t.fromChain.getRpc(),f=[],l={...o.details,fromAddress:a,toAddress:r},m=C(l),u={request:t,signer:i,rpc:g,txs:f};if(t.fromChain.chain==="Solana")await e.executeSolanaSteps(m,u);else if(t.fromChain.chain==="Sui")await e.executeSuiSteps(m,u);else{const A=await e.getNativeChainId(t.fromChain);await e.executeEvmSteps(m,u,o,A,e.toLifiTokenAddress)}const c={from:t.fromChain.chain,to:t.toChain.chain,state:s.TransferState.SourceInitiated,originTxs:f,tool:o.details.tool};return Object.assign(c,{tool:o.details?.tool})}async*track(t,i=e.DEFAULT_TIMEOUT){if(s.isCompleted(t)||s.isRedeemed(t)||s.isRefunded(t))return t;let o=i;for(;o>0;){const d=Date.now();if(s.isSourceInitiated(t)||s.isSourceFinalized(t)||s.isAttested(t)){const a=await e.getTransactionStatus(this.wh.network,t.originTxs[t.originTxs.length-1],e.toLifiChainId(t.from).toString(),e.toLifiChainId(t.to).toString(),t.tool);if(!a)throw new Error("Failed to fetch transfer status");if(a.status==="DONE"){const r={...t,originTxs:[{chain:t.from,txid:a.sending.txHash}],attestation:{},state:s.TransferState.DestinationFinalized};return yield r,r}else if(a.status==="FAILED"){const r={...t,originTxs:[{chain:t.from,txid:a.sending.txHash}],refundTxs:[],state:s.TransferState.Refunded,attestation:{}};return yield r,r}}await S.sleep(e.POLLING_INTERVAL_MS),o-=Date.now()-d}return t}transferUrl(t){return`https://scan.li.fi/tx/${t}`}}function E(n){return e.config.set({integrator:e.DEFAULT_INTEGRATOR,apiUrl:n.apiUrl??e.DEFAULT_API_URL}),class extends h{config=n}}exports.LiFiRoute=h;exports.createLiFiRouteWithConfig=E;
|
package/lib/lifi.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { S as p, V as S, D as T, a as C, s as I, b as P, c as U, t as g, g as x, d as h, e as _, f as w, h as F, M as L, i as R, j as k, k as v, m as N, n as y, o as M, P as O, p as b, q as B } from "./utils-BSxsyW2c.mjs";
|
|
2
|
-
import { g as Q } from "./tokenHelpers-
|
|
3
|
-
import { n as z } from "./index-
|
|
2
|
+
import { g as Q } from "./tokenHelpers-DvWQs1tu.mjs";
|
|
3
|
+
import { n as z } from "./index-CR1itkLl.mjs";
|
|
4
4
|
import { M as G, N as u, u as V, f as E, e as A, q as H, Y as j, x as X, _ as K, $ as W, v as Y } from "./platform-Cil_UtAQ.mjs";
|
|
5
5
|
const $ = (n) => {
|
|
6
6
|
if (!n.estimate.fromAmountUSD)
|