@wormhole-foundation/wormhole-connect 2.4.0-beta.0-development → 2.4.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 +69 -69
- package/dist/src/AppRouter.d.ts.map +1 -1
- package/dist/src/views/v2/Bridge/AssetPicker/SearchableList/SearchInput.d.ts.map +1 -1
- package/lib/{aptos-DnxWRCRB.mjs → aptos-D2mcs2UL.mjs} +5 -5
- package/lib/{aptos-DcTjD1lJ.js → aptos-DdFczU7e.js} +2 -2
- package/lib/{aptos-BTpUtaW-.mjs → aptos-DtPWZNgN.mjs} +2 -2
- package/lib/{aptos-DS0-rHVZ.js → aptos-XhjZe7kZ.js} +1 -1
- package/lib/{base64-CjOXecL7.mjs → base64-h_e6H8AK.mjs} +1 -1
- package/lib/{base64-CVyXjJWf.js → base64-q-JGzzQo.js} +1 -1
- package/lib/{ccip-BOel6WSL.js → ccip-CO5WUP_N.js} +1 -1
- package/lib/{ccip-BbJ1o9T-.mjs → ccip-DuSd_NrA.mjs} +1 -1
- package/lib/{chunk-IMTC3J2M-BrDKbQVz.mjs → chunk-IMTC3J2M-4bsIZD4z.mjs} +3 -3
- package/lib/{chunk-IMTC3J2M-CqtkoBKc.js → chunk-IMTC3J2M-DATbOiv9.js} +1 -1
- package/lib/{events-D6MWKkPX.mjs → events-BHzYkXv0.mjs} +1 -1
- package/lib/{events-pQkwnfUJ.js → events-CDKTsN8F.js} +1 -1
- package/lib/{evm-BHQYgtpv.mjs → evm-BB4chPcS.mjs} +5 -5
- package/lib/{evm-C3UjfrTr.js → evm-BiUA3wA6.js} +3 -3
- package/lib/{evm-Hx6QC0HY.js → evm-HLbglJpt.js} +1 -1
- package/lib/{evm-BxUaJBLl.mjs → evm-Ot6xhgdL.mjs} +5 -5
- package/lib/{index-CIQU1shG.mjs → index-5SNveB_H.mjs} +2 -2
- package/lib/{index-BSjP4FrI.mjs → index-B0GXJEZF.mjs} +1 -1
- package/lib/{index-B7LhAKz5.js → index-B5zRpLNY.js} +1 -1
- package/lib/{index-D7n4prqr.js → index-B63Rp6mZ.js} +1 -1
- package/lib/{index-O8UVKLGl.mjs → index-B7sdth-W.mjs} +1 -1
- package/lib/{index-5xjB9V8j.mjs → index-BDREYjeb.mjs} +1 -1
- package/lib/{index-BWJGyl85.js → index-BLlpWXP6.js} +4 -4
- package/lib/{index-BgqcVYO7.js → index-BNKmpg6n.js} +1 -1
- package/lib/{index-DjgulkZE.mjs → index-BN_dUboO.mjs} +2 -2
- package/lib/{index-DbjWlAHX.js → index-BTF-tAOp.js} +1 -1
- package/lib/{index-qnN1Q9Ij.js → index-BYQUk_2l.js} +1 -1
- package/lib/{index-B_9A8dJ6.mjs → index-BkLU29f8.mjs} +2 -2
- package/lib/{index-dNe18-Un.mjs → index-BydSbu00.mjs} +2 -2
- package/lib/{index-J43c6MPe.js → index-C09NCF2Q.js} +1 -1
- package/lib/{index-DbQXXFom.mjs → index-C2GFgH1e.mjs} +4 -4
- package/lib/{index-wulEniZp.js → index-C4m-IYq4.js} +1 -1
- package/lib/{index-D0a8y8Mh.mjs → index-CSzw0A9y.mjs} +41 -37
- package/lib/{index--SEtRFko.js → index-CY7dT7wA.js} +1 -1
- package/lib/{index-BQ4A3naZ.js → index-Cam2pnK1.js} +1 -1
- package/lib/{index-CScoqwN4.js → index-CcbTflQ3.js} +1 -1
- package/lib/{index-CPQr5cug.mjs → index-CmgaaF2k.mjs} +3 -3
- package/lib/{index-CHJ3Hd17.js → index-Cnxvd65L.js} +1 -1
- package/lib/{index-ByEAo43Q.mjs → index-DASSZUWc.mjs} +1 -1
- package/lib/{index-BdEtzmYl.mjs → index-DFJwb8Hv.mjs} +5 -5
- package/lib/{index-mCDp1LfO.js → index-DJjvM0nk.js} +1 -1
- package/lib/{index-Dl0l5rDS.mjs → index-DK7R9BIb.mjs} +1 -1
- package/lib/{index-B4pLuatS.mjs → index-DTDaTG6O.mjs} +1 -1
- package/lib/{index-J2XaC-Bz.mjs → index-DUmm0BUq.mjs} +1 -1
- package/lib/{index-JUiwdFFH.js → index-Dfw9KJ41.js} +1 -1
- package/lib/{index-B9b9NZYa.mjs → index-DilzacRr.mjs} +1 -1
- package/lib/{index-DAG5dGZ1.mjs → index-DjLDoi8u.mjs} +2 -2
- package/lib/{index-B65WVJdG.js → index-Dk5wC_Sb.js} +1 -1
- package/lib/{index-KBei6sIJ.js → index-Dp-iHuvk.js} +1 -1
- package/lib/{index-Dtid8wZn.js → index-F_hsheGy.js} +1 -1
- package/lib/{index-DzOGtIVm.mjs → index-GiFMIgQQ.mjs} +1 -1
- package/lib/{index-CRXpO_JH.mjs → index-_8tHp6ud.mjs} +2 -2
- package/lib/{index-DltYg91h.js → index-ayI3JKYy.js} +1 -1
- package/lib/{index-Dxj_2peW.js → index-bkY-eb9f.js} +1 -1
- package/lib/{index-CRSdow6b.js → index-hMv3TRWB.js} +1 -1
- package/lib/{index-CJCc5iPP.js → index-je5coaxE.js} +1 -1
- package/lib/{index-DyKhWQdb.mjs → index-pMNbkZpE.mjs} +2 -2
- package/lib/{index-D5Fedozd.mjs → index-xGZBjUqe.mjs} +2 -2
- package/lib/{index.es-CJF6-6PT.mjs → index.es-BFHE-LBv.mjs} +6 -6
- package/lib/{index.es-DaVMrD6a.js → index.es-BsIaUAAV.js} +2 -2
- package/lib/index.js +1 -1
- package/lib/index.mjs +1 -1
- package/lib/{signer-DggCUMSE.mjs → signer-BXzrKemm.mjs} +1 -1
- package/lib/{signer-CDGwFxE3.js → signer-ZS0ci0JQ.js} +1 -1
- package/lib/{solana-BlJbxPXt.mjs → solana-BVpjarrK.mjs} +4 -4
- package/lib/{solana-B1apL758.js → solana-C0YimUxY.js} +1 -1
- package/lib/solana-Cp0bYtYT.js +1 -0
- package/lib/{solana-AxmF0STw.mjs → solana-CzlybUjZ.mjs} +5 -5
- package/lib/{solanaEmbed.esm-V77sYKsQ.mjs → solanaEmbed.esm-m9YQIWCJ.mjs} +2 -2
- package/lib/{solanaEmbed.esm-DbF0znBR.js → solanaEmbed.esm-pCfT3Ec2.js} +1 -1
- package/lib/src/AppRouter.d.ts.map +1 -1
- package/lib/src/views/v2/Bridge/AssetPicker/SearchableList/SearchInput.d.ts.map +1 -1
- package/lib/{sui-_Kd5rXRu.mjs → sui-BE3bjZhY.mjs} +5 -5
- package/lib/{sui-7kx497T2.mjs → sui-BT15d9L_.mjs} +1 -1
- package/lib/{sui-gAForqj9.js → sui-BZbpPMtU.js} +1 -1
- package/lib/{sui-Nh_bCxGG.js → sui-CC1_cttE.js} +1 -1
- package/package.json +1 -1
- package/lib/solana-Dkhi64tK.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var h=Object.defineProperty;var m=(a,e,t)=>e in a?h(a,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):a[e]=t;var s=(a,e,t)=>m(a,typeof e!="symbol"?e+"":e,t);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("./index-
|
|
1
|
+
"use strict";var h=Object.defineProperty;var m=(a,e,t)=>e in a?h(a,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):a[e]=t;var s=(a,e,t)=>m(a,typeof e!="symbol"?e+"":e,t);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("./index-BLlpWXP6.js"),w=require("./aptos-DdFczU7e.js");class c{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=i.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 w.AptosPlatform.chainFromRpc(e),n=t[o];if(n.network!==r)throw new Error(`Network mismatch: ${n.network} !== ${r}`);return new c(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({transactionHash:e});if(t.type!=="user_transaction")throw new Error(`${e} is not a user_transaction`);const r=t.events.filter(o=>o.type.endsWith("WormholeMessage"));if(!r||r.length===0)throw new Error(`WormholeMessage not found for ${e}`);return r.map(o=>{const n=o.data,d=new i.UniversalAddress(BigInt(n.sender).toString(16).padStart(64,"0"));return i.createVAA("Uint8Array",{guardianSet:0,emitterChain:this.chain,emitterAddress:d,sequence:BigInt(n.sequence),timestamp:Number(n.timestamp),consistencyLevel:n.consistency_level,nonce:Number(n.nonce),signatures:[],payload:i.hex.decode(n.payload)})})}}i.registerProtocol("Aptos","WormholeCore",c);exports.AptosWormholeCore=c;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const d=require("./index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const d=require("./index-DJjvM0nk.js"),ko=require("./dijkstra-CtFxn7S9.js"),Mo=require("./index-BLlpWXP6.js");/**
|
|
2
2
|
* @license
|
|
3
3
|
* Copyright 2019 Google LLC
|
|
4
4
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { aU as f, aV as c, a9 as s, aW as O, aX as t, aY as o, aZ as d, a_ as A, a$ as p } from "./index-
|
|
2
|
-
import { b0 as R } from "./index-
|
|
1
|
+
import { aU as f, aV as c, a9 as s, aW as O, aX as t, aY as o, aZ as d, a_ as A, a$ as p } from "./index-CSzw0A9y.mjs";
|
|
2
|
+
import { b0 as R } from "./index-CSzw0A9y.mjs";
|
|
3
3
|
class l extends Error {
|
|
4
4
|
constructor(r) {
|
|
5
5
|
super(r);
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
var d = Object.defineProperty;
|
|
2
2
|
var h = (a, e, t) => e in a ? d(a, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : a[e] = t;
|
|
3
3
|
var o = (a, e, t) => h(a, typeof e != "symbol" ? e + "" : e, t);
|
|
4
|
-
import { b2 as m, bx as w, c8 as g, r as p, bf as u } from "./index-
|
|
5
|
-
import { A as l } from "./aptos-
|
|
4
|
+
import { b2 as m, bx as w, c8 as g, r as p, bf as u } from "./index-CSzw0A9y.mjs";
|
|
5
|
+
import { A as l } from "./aptos-D2mcs2UL.mjs";
|
|
6
6
|
class i {
|
|
7
7
|
constructor(e, t, r, s) {
|
|
8
8
|
o(this, "network");
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var b=Object.defineProperty;var T=(g,s,t)=>s in g?b(g,s,{enumerable:!0,configurable:!0,writable:!0,value:t}):g[s]=t;var o=(g,s,t)=>T(g,typeof s!="symbol"?s+"":s,t);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("./index-
|
|
1
|
+
"use strict";var b=Object.defineProperty;var T=(g,s,t)=>s in g?b(g,s,{enumerable:!0,configurable:!0,writable:!0,value:t}):g[s]=t;var o=(g,s,t)=>T(g,typeof s!="symbol"?s+"":s,t);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("./index-BLlpWXP6.js"),I=[["Testnet",{tokenMessengerState:"0x5252abd1137094ed1db3e0d75bc36abcd287aee4bc310f8e047727ef5682e7c2",messageTransmitterState:"0x98234bd0fa9ac12cc0a20a144a22e36d6a32f7e0a97baaeaf9c76cdc6d122d2e",usdcTreasury:"0x7170137d4a6431bf83351ac025baf462909bffe2877d87716374fb42b9629ebe"}],["Mainnet",{tokenMessengerState:"0x45993eecc0382f37419864992c12faee2238f5cfe22b98ad3bf455baf65c8a2f",messageTransmitterState:"0xf68268c3d9b1df3215f2439400c1c4ea08ac4ef4bb7d6f3ca6a2a239e17510af",usdcTreasury:"0x57d6725e7a8b49a7b2a612f6bd66ab5f39fc95332ca48be421c3229d514a6de7"}]],k=a.constMap(I,[0,1]);class l{constructor(s,t,r,e){o(this,"network");o(this,"chain");o(this,"provider");o(this,"contracts");o(this,"usdcId");o(this,"usdcTreasuryId");o(this,"tokenMessengerId");o(this,"tokenMessengerStateId");o(this,"messageTransmitterId");o(this,"messageTransmitterStateId");var u,m,h,f;if(this.network=s,this.chain=t,this.provider=r,this.contracts=e,s==="Devnet")throw new Error("CircleBridge not supported on Devnet");const n=a.usdcContract.get(this.network,this.chain);if(!n)throw new Error(`No USDC contract configured for network=${this.network} chain=${this.chain}`);const{tokenMessengerState:c,messageTransmitterState:i,usdcTreasury:d}=k(s);if(!((u=e.cctp)!=null&&u.tokenMessenger))throw new Error(`Circle Token Messenger contract for domain ${t} not found`);if(!((m=e.cctp)!=null&&m.messageTransmitter))throw new Error(`Circle Message Transmitter contract for domain ${t} not found`);this.usdcId=n,this.usdcTreasuryId=d,this.tokenMessengerId=(h=e.cctp)==null?void 0:h.tokenMessenger,this.messageTransmitterId=(f=e.cctp)==null?void 0:f.messageTransmitter,this.tokenMessengerStateId=c,this.messageTransmitterStateId=i}async*transfer(s,t,r){const e=new a.Transaction$1,n=a.circleChainId.get(this.network,t.chain),[c,...i]=await a.SuiPlatform.getCoins(this.provider,s,this.usdcId);if(c===void 0)throw new Error("No USDC in wallet");const d=e.object(c.coinObjectId);i.length>0&&e.mergeCoins(d,i.map(m=>e.object(m.coinObjectId)));const[u]=e.splitCoins(d,[r]);e.moveCall({target:`${this.tokenMessengerId}::deposit_for_burn::deposit_for_burn`,arguments:[u,e.pure.u32(n),e.pure.address(t.address.toUniversalAddress().toString()),e.object(this.tokenMessengerStateId),e.object(this.messageTransmitterStateId),e.object("0x403"),e.object(this.usdcTreasuryId)],typeArguments:[this.usdcId]}),yield this.createUnsignedTx(e,"Sui.CircleBridge.Transfer")}async isTransferCompleted(s){const t=new a.Transaction$1;t.moveCall({target:`${this.messageTransmitterId}::state::is_nonce_used`,arguments:[t.object(this.messageTransmitterStateId),t.pure.u32(s.sourceDomain),t.pure.u64(s.nonce)]});const r=await this.provider.devInspectTransactionBlock({sender:"0x0000000000000000000000000000000000000000000000000000000000000000",transactionBlock:t});try{return!!r.results[0].returnValues[0][0][0]}catch(e){return console.error(`Error reading if nonce was used: ${e}`),!1}}async*redeem(s,t,r){const e=new a.Transaction$1,[n]=e.moveCall({target:`${this.messageTransmitterId}::receive_message::receive_message`,arguments:[e.pure.vector("u8",a.CircleBridge.serialize(t)),e.pure.vector("u8",a.hex.decode(r)),e.object(this.messageTransmitterStateId)]});if(!n)throw new Error("Failed to produce receipt");const[c]=e.moveCall({target:`${this.tokenMessengerId}::handle_receive_message::handle_receive_message`,arguments:[n,e.object(this.tokenMessengerStateId),e.object("0x403"),e.object(this.usdcTreasuryId)],typeArguments:[this.usdcId]});if(!c)throw new Error("Failed to produce stamp receipt ticket with burn message");const[i]=e.moveCall({target:`${this.tokenMessengerId}::handle_receive_message::deconstruct_stamp_receipt_ticket_with_burn_message`,arguments:[c]});if(!i)throw new Error("Failed to produce stamp receipt ticket");const[d]=e.moveCall({target:`${this.messageTransmitterId}::receive_message::stamp_receipt`,arguments:[i,e.object(this.messageTransmitterStateId)],typeArguments:[`${this.tokenMessengerId}::message_transmitter_authenticator::MessageTransmitterAuthenticator`]});if(!d)throw new Error("Failed to produce stamped receipt");e.moveCall({target:`${this.messageTransmitterId}::receive_message::complete_receive_message`,arguments:[d,e.object(this.messageTransmitterStateId)]}),yield this.createUnsignedTx(e,"Sui.CircleBridge.Redeem")}async parseTransactionDetails(s){var p;const t=await this.provider.waitForTransaction({digest:s,options:{showEvents:!0,showEffects:!0,showInput:!0}});if(!t)throw new Error("Transaction not found");if(!t.events)throw new Error("Transaction events not found");const r=(p=t.events)==null?void 0:p.find(w=>w.type.includes("send_message::MessageSent"));if(!r)throw new Error("No MessageSent event found");const e=new Uint8Array((r==null?void 0:r.parsedJson).message),[n,c]=a.CircleBridge.deserialize(e),{payload:i}=n,d=i.messageSender,u=i.mintRecipient,m=a.toCircleChain(this.network,n.sourceDomain),h=a.toCircleChain(this.network,n.destinationDomain),f={chain:m,address:i.burnToken};return{from:{chain:m,address:d},to:{chain:h,address:u},token:f,amount:i.amount,message:n,id:{hash:c}}}static async fromRpc(s,t){const[r,e]=await a.SuiPlatform.chainFromRpc(s),n=t[e];if(n.network!==r)throw new Error(`Network mismatch: ${n.network} != ${r}`);return new l(r,e,s,n.contracts)}createUnsignedTx(s,t,r=!1){return new a.SuiUnsignedTransaction(s,this.network,this.chain,t,r)}}a.registerProtocol("Sui","CircleBridge",l);exports.SuiCircleBridge=l;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { aP as Do, cG as uy, O as De, cH as Zy, Q as Pv, au as eg } from "./index-
|
|
2
|
-
import { h as tg, e as ng } from "./index-
|
|
3
|
-
import { e as iy, d as ag } from "./base64-
|
|
1
|
+
import { aP as Do, cG as uy, O as De, cH as Zy, Q as Pv, au as eg } from "./index-CSzw0A9y.mjs";
|
|
2
|
+
import { h as tg, e as ng } from "./index-B0GXJEZF.mjs";
|
|
3
|
+
import { e as iy, d as ag } from "./base64-h_e6H8AK.mjs";
|
|
4
4
|
import * as Wf from "react";
|
|
5
5
|
import d1, { createContext as lg, useState as is, useEffect as Ky, useCallback as ug, useContext as ig } from "react";
|
|
6
|
-
import { L as ot, B as mn, d as i2, a as o0, h as U2, b as og, c as w9, g as od, e as Jy, k as cd, f as wr, i as cg, j as Tr, D as vs } from "./index-
|
|
6
|
+
import { L as ot, B as mn, d as i2, a as o0, h as U2, b as og, c as w9, g as od, e as Jy, k as cd, f as wr, i as cg, j as Tr, D as vs } from "./index-GiFMIgQQ.mjs";
|
|
7
7
|
function rd(c, i) {
|
|
8
8
|
(i == null || i > c.length) && (i = c.length);
|
|
9
9
|
for (var d = 0, f = new Array(i); d < i; d++) f[d] = c[d];
|
|
@@ -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-BLlpWXP6.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 c.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;
|
|
@@ -76613,7 +76613,7 @@ const MAINNET_TOKENS = [
|
|
|
76613
76613
|
index: 0,
|
|
76614
76614
|
keys: ["0x13947Bd48b18E53fdAeEe77F3473391aC727C638"]
|
|
76615
76615
|
}
|
|
76616
|
-
}, WORMSCAN = "https://wormholescan.io/#/", CONNECT_VERSION = "2.4.0-beta.
|
|
76616
|
+
}, WORMSCAN = "https://wormholescan.io/#/", CONNECT_VERSION = "2.4.0-beta.1-development", CONNECT_GIT_HASH = "8bd526f9ef82027b8fdd42b48fd692433b0e55cb", CHAIN_ORDER = [
|
|
76617
76617
|
"Ethereum",
|
|
76618
76618
|
"Solana",
|
|
76619
76619
|
"Arbitrum",
|
|
@@ -76653,7 +76653,7 @@ function wrapEventHandler(t) {
|
|
|
76653
76653
|
}
|
|
76654
76654
|
};
|
|
76655
76655
|
}
|
|
76656
|
-
const evm = async () => (await import("./evm-
|
|
76656
|
+
const evm = async () => (await import("./evm-BB4chPcS.mjs")).default, solana$1 = async () => (await import("./solana-CzlybUjZ.mjs")).default, aptos$1 = async () => (await import("./aptos-D2mcs2UL.mjs").then((t) => t.a)).default, sui = async () => (await import("./sui-BE3bjZhY.mjs")).default, COINGECKO_URL = "https://api.coingecko.com", COINGECKO_URL_PRO = "https://pro-api.coingecko.com", NATIVE_TOKEN_IDS = {
|
|
76657
76657
|
Solana: "solana",
|
|
76658
76658
|
Ethereum: "ethereum",
|
|
76659
76659
|
Arbitrum: "ethereum",
|
|
@@ -184975,7 +184975,7 @@ const walletConnection = {
|
|
|
184975
184975
|
if (s.getNetworkInfo().chainId !== t) {
|
|
184976
184976
|
if (l.context === Context.ETH)
|
|
184977
184977
|
try {
|
|
184978
|
-
await (await import("./evm-
|
|
184978
|
+
await (await import("./evm-Ot6xhgdL.mjs").then((p) => p.k)).switchChain(s, t);
|
|
184979
184979
|
} catch (u) {
|
|
184980
184980
|
if (u instanceof NotSupported) return;
|
|
184981
184981
|
throw u;
|
|
@@ -184990,25 +184990,25 @@ const walletConnection = {
|
|
|
184990
184990
|
if (!u)
|
|
184991
184991
|
throw new Error("wallet is undefined");
|
|
184992
184992
|
if (d.context === Context.ETH)
|
|
184993
|
-
return await (await import("./evm-
|
|
184993
|
+
return await (await import("./evm-Ot6xhgdL.mjs").then((y) => y.k)).signAndSendTransaction(
|
|
184994
184994
|
e,
|
|
184995
184995
|
u,
|
|
184996
184996
|
t,
|
|
184997
184997
|
l
|
|
184998
184998
|
);
|
|
184999
184999
|
if (d.context === Context.SOLANA)
|
|
185000
|
-
return await (await import("./solana-
|
|
185000
|
+
return await (await import("./solana-BVpjarrK.mjs")).signAndSendTransaction(
|
|
185001
185001
|
e,
|
|
185002
185002
|
u,
|
|
185003
185003
|
l
|
|
185004
185004
|
);
|
|
185005
185005
|
if (d.context === Context.SUI)
|
|
185006
|
-
return (await (await import("./sui-
|
|
185006
|
+
return (await (await import("./sui-BT15d9L_.mjs")).signAndSendTransaction(
|
|
185007
185007
|
e,
|
|
185008
185008
|
u
|
|
185009
185009
|
)).id;
|
|
185010
185010
|
if (d.context === Context.APTOS)
|
|
185011
|
-
return (await (await import("./aptos-
|
|
185011
|
+
return (await (await import("./aptos-DtPWZNgN.mjs")).signAndSendTransaction(
|
|
185012
185012
|
e,
|
|
185013
185013
|
u
|
|
185014
185014
|
)).id;
|
|
@@ -185028,16 +185028,16 @@ const walletConnection = {
|
|
|
185028
185028
|
if (t === void 0)
|
|
185029
185029
|
return [];
|
|
185030
185030
|
if (t.context === Context.ETH) {
|
|
185031
|
-
const e = await import("./evm-
|
|
185031
|
+
const e = await import("./evm-Ot6xhgdL.mjs").then((s) => s.k);
|
|
185032
185032
|
return Object.values(mapWallets(e.wallets, Context.ETH));
|
|
185033
185033
|
} else if (t.context === Context.SOLANA) {
|
|
185034
|
-
const s = (await import("./solana-
|
|
185034
|
+
const s = (await import("./solana-BVpjarrK.mjs")).fetchOptions();
|
|
185035
185035
|
return Object.values(mapWallets(s, Context.SOLANA));
|
|
185036
185036
|
} else if (t.context === Context.SUI) {
|
|
185037
|
-
const s = await (await import("./sui-
|
|
185037
|
+
const s = await (await import("./sui-BT15d9L_.mjs")).fetchOptions();
|
|
185038
185038
|
return Object.values(mapWallets(s, Context.SUI));
|
|
185039
185039
|
} else if (t.context === Context.APTOS) {
|
|
185040
|
-
const s = (await import("./aptos-
|
|
185040
|
+
const s = (await import("./aptos-DtPWZNgN.mjs")).fetchOptions();
|
|
185041
185041
|
return Object.values(mapWallets(s, Context.APTOS));
|
|
185042
185042
|
}
|
|
185043
185043
|
return [];
|
|
@@ -185244,11 +185244,16 @@ class SDKv2Route {
|
|
|
185244
185244
|
const isNttSupportedToken = async (t, e, s) => {
|
|
185245
185245
|
const l = async (m) => {
|
|
185246
185246
|
const y = config$1.routes.get(m);
|
|
185247
|
-
|
|
185248
|
-
|
|
185249
|
-
|
|
185250
|
-
|
|
185251
|
-
|
|
185247
|
+
if (!y) return !1;
|
|
185248
|
+
try {
|
|
185249
|
+
return (await y.rc.supportedDestinationTokens(
|
|
185250
|
+
t,
|
|
185251
|
+
e,
|
|
185252
|
+
s
|
|
185253
|
+
)).length > 0;
|
|
185254
|
+
} catch {
|
|
185255
|
+
return !1;
|
|
185256
|
+
}
|
|
185252
185257
|
}, [d, u, p] = await Promise.all([
|
|
185253
185258
|
l("ManualNtt"),
|
|
185254
185259
|
l("AutomaticNtt"),
|
|
@@ -197472,7 +197477,7 @@ function scale(t, e, s) {
|
|
|
197472
197477
|
registerProtocol(_platform$2, "Ntt", EvmNtt);
|
|
197473
197478
|
class SolanaChain extends ChainContext {
|
|
197474
197479
|
async getTokenAccount(e, s) {
|
|
197475
|
-
const { getAssociatedTokenAddress: l } = await import("./index-
|
|
197480
|
+
const { getAssociatedTokenAddress: l } = await import("./index-BkLU29f8.mjs"), d = new SolanaAddress(s).unwrap(), u = new SolanaAddress(e).unwrap(), p = await l(d, u);
|
|
197476
197481
|
return {
|
|
197477
197482
|
chain: this.chain,
|
|
197478
197483
|
address: new SolanaAddress(p.toString())
|
|
@@ -238123,12 +238128,12 @@ const PlusIcon = createSvgIcon$1(
|
|
|
238123
238128
|
}
|
|
238124
238129
|
}));
|
|
238125
238130
|
function SearchInput(t) {
|
|
238126
|
-
const { classes: e } = useStyles$m();
|
|
238131
|
+
const { classes: e } = useStyles$m(), s = useTheme$1(), l = useMediaQuery(s.breakpoints.down("sm"));
|
|
238127
238132
|
return /* @__PURE__ */ jsx(Box, { sx: { padding: "0 16px" }, children: /* @__PURE__ */ jsx(
|
|
238128
238133
|
TextField,
|
|
238129
238134
|
{
|
|
238130
238135
|
className: e.input,
|
|
238131
|
-
autoFocus: !
|
|
238136
|
+
autoFocus: !l,
|
|
238132
238137
|
fullWidth: !0,
|
|
238133
238138
|
inputProps: {
|
|
238134
238139
|
style: {
|
|
@@ -238154,7 +238159,7 @@ function SearchInput(t) {
|
|
|
238154
238159
|
},
|
|
238155
238160
|
variant: "outlined",
|
|
238156
238161
|
value: t.value,
|
|
238157
|
-
onChange: (
|
|
238162
|
+
onChange: (d) => t.onChange(d.target.value),
|
|
238158
238163
|
InputProps: {
|
|
238159
238164
|
startAdornment: /* @__PURE__ */ jsx(InputAdornment, { position: "start", children: /* @__PURE__ */ jsx(SearchIcon, { className: e.icon }) })
|
|
238160
238165
|
}
|
|
@@ -244679,29 +244684,28 @@ const useTransactionHistory = (t) => {
|
|
|
244679
244684
|
}
|
|
244680
244685
|
}
|
|
244681
244686
|
}));
|
|
244682
|
-
let _HAS_SET_CONFIG_SSG = !1;
|
|
244683
244687
|
function AppRouter(t) {
|
|
244684
|
-
const { classes: e } = useStyles(), s = useDispatch(), l = useContext(RouteContext), d = useCallback((
|
|
244685
|
-
isEmptyObject(
|
|
244688
|
+
const { classes: e } = useStyles(), s = useDispatch(), l = useContext(RouteContext), d = useRef(!1), u = useCallback((h) => {
|
|
244689
|
+
isEmptyObject(h) || setConfig(h), config$1.triggerEvent({
|
|
244686
244690
|
type: "load",
|
|
244687
|
-
config:
|
|
244691
|
+
config: h
|
|
244688
244692
|
});
|
|
244689
244693
|
}, []);
|
|
244690
|
-
|
|
244691
|
-
t.config &&
|
|
244694
|
+
d.current || (t.config && u(t.config), d.current = !0), useEffect(() => {
|
|
244695
|
+
t.config && u(t.config);
|
|
244692
244696
|
}, [t.config]);
|
|
244693
|
-
const
|
|
244697
|
+
const p = useSelector((h) => h.router.route), m = usePrevious(p), { hasExternalSearch: y } = useExternalSearch();
|
|
244694
244698
|
return useEffect(() => {
|
|
244695
|
-
const
|
|
244696
|
-
|
|
244697
|
-
}, [
|
|
244698
|
-
|
|
244699
|
-
}, [
|
|
244700
|
-
|
|
244701
|
-
|
|
244702
|
-
|
|
244703
|
-
|
|
244704
|
-
|
|
244699
|
+
const h = "redeem", v = "bridge";
|
|
244700
|
+
m === h && p !== h && (s(clearRedeem()), s(clearWallets()), l.clear(), config$1.whLegacy.registerProviders()), p === v && m !== v && m !== "history" && s(clearTransfer());
|
|
244701
|
+
}, [p, m, s]), useEffect(() => {
|
|
244702
|
+
y && (s(clearRedeem()), s(setRoute("search")));
|
|
244703
|
+
}, [y, s]), /* @__PURE__ */ jsxs("div", { className: e.appContent, children: [
|
|
244704
|
+
p === "bridge" && /* @__PURE__ */ jsx(Bridge, {}),
|
|
244705
|
+
p === "redeem" && /* @__PURE__ */ jsx(Redeem, {}),
|
|
244706
|
+
p === "search" && /* @__PURE__ */ jsx(TxSearch, {}),
|
|
244707
|
+
p === "history" && /* @__PURE__ */ jsx(TxHistory, {}),
|
|
244708
|
+
p === "terms" && /* @__PURE__ */ jsx(Terms, {})
|
|
244705
244709
|
] });
|
|
244706
244710
|
}
|
|
244707
244711
|
const light = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const e=require("./index-
|
|
1
|
+
"use strict";const e=require("./index-BLlpWXP6.js");function I(n,t,o,s){e.ahash(n);const a=e.checkOpts({dkLen:32,asyncTick:10},s),{c:d,dkLen:i,asyncTick:r}=a;if(e.anumber(d),e.anumber(i),e.anumber(r),d<1)throw new Error("PBKDF2: iterations (c) should be >= 1");const l=e.toBytes(t),u=e.toBytes(o),f=new Uint8Array(i),p=e.hmac.create(n,l),c=p._cloneInto().update(u);return{c:d,dkLen:i,asyncTick:r,DK:f,PRF:p,PRFSalt:c}}function L(n,t,o,s,a){return n.destroy(),t.destroy(),s&&s.destroy(),a.fill(0),o}function g(n,t,o,s){const{c:a,dkLen:d,DK:i,PRF:r,PRFSalt:l}=I(n,t,o,s);let u;const f=new Uint8Array(4),p=e.createView(f),c=new Uint8Array(r.outputLen);for(let w=1,y=0;y<d;w++,y+=r.outputLen){const m=i.subarray(y,y+r.outputLen);p.setInt32(0,w,!1),(u=l._cloneInto(u)).update(f).digestInto(c),m.set(c.subarray(0,m.length));for(let h=1;h<a;h++){r._cloneInto(u).update(c).digestInto(c);for(let k=0;k<m.length;k++)m[k]^=c[k]}}return L(r,l,i,u,c)}/*! scure-bip39 - MIT License (c) 2022 Patricio Palladino, Paul Miller (paulmillr.com) */function b(n){if(typeof n!="string")throw new TypeError("invalid mnemonic type: "+typeof n);return n.normalize("NFKD")}function F(n){const t=b(n),o=t.split(" ");if(![12,15,18,21,24].includes(o.length))throw new Error("Invalid mnemonic");return{nfkd:t,words:o}}const S=n=>b("mnemonic"+n);function T(n,t=""){return g(e.sha512,F(n).nfkd,S(t),{c:2048,dkLen:64})}exports.mnemonicToSeedSync=T;
|