@wormhole-foundation/wormhole-connect 2.4.0-beta.5-development → 2.4.0-beta.6-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.
Files changed (92) hide show
  1. package/dist/main.js +3 -3
  2. package/dist/src/components/SampleApp/index.d.ts.map +1 -1
  3. package/dist/src/theme.d.ts +2 -0
  4. package/dist/src/theme.d.ts.map +1 -1
  5. package/dist/src/utils/coingecko.d.ts.map +1 -1
  6. package/dist/src/views/v2/Bridge/AmountInput/index.d.ts.map +1 -1
  7. package/dist/src/views/v2/Bridge/AssetPicker/index.d.ts.map +1 -1
  8. package/lib/{aptos-DWjNHjEr.js → aptos-B2d701iL.js} +2 -2
  9. package/lib/{aptos-BbcbhTYm.js → aptos-BYgw8KbL.js} +1 -1
  10. package/lib/{aptos-Bm_dl-Sm.mjs → aptos-Cx2NRBhV.mjs} +5 -5
  11. package/lib/{aptos-tST8jYJD.mjs → aptos-D32iveio.mjs} +2 -2
  12. package/lib/{base64-U98S6T0_.mjs → base64-CS-t4Jp3.mjs} +1 -1
  13. package/lib/{base64-z-NzkTcM.js → base64-KGHVh_fo.js} +1 -1
  14. package/lib/{ccip-4kkdFBy9.js → ccip-CkdoT4fo.js} +1 -1
  15. package/lib/{ccip-CzIVguK4.mjs → ccip-DT5SVCsk.mjs} +1 -1
  16. package/lib/{chunk-IMTC3J2M-BkF-uSqL.mjs → chunk-IMTC3J2M-BekcMtbR.mjs} +3 -3
  17. package/lib/{chunk-IMTC3J2M-D9V8xLCp.js → chunk-IMTC3J2M-Bp7UmuL7.js} +1 -1
  18. package/lib/{evm-YfeWQlF5.mjs → evm-C2wdlyGy.mjs} +5 -5
  19. package/lib/{evm-ENyRMNuv.js → evm-ZrLPh0aT.js} +1 -1
  20. package/lib/{evm-BSCCtd8A.js → evm-gtANOzh_.js} +3 -3
  21. package/lib/{evm-BVICyV8L.mjs → evm-pqv5AmPx.mjs} +6 -6
  22. package/lib/{index-ByKaNDA7.mjs → index-3CcycgxO.mjs} +2 -2
  23. package/lib/{index-DHo7otfk.js → index-3n8R7_nm.js} +1 -1
  24. package/lib/{index-DOydP0Ra.mjs → index-6KA_om4J.mjs} +2 -2
  25. package/lib/{index-DJ17vId9.mjs → index-B5zEqERt.mjs} +2 -2
  26. package/lib/{index-CRfcoCAy.mjs → index-B7w-Z1qw.mjs} +1 -1
  27. package/lib/{index-BpqVHbdc.js → index-BFhdLIwV.js} +4 -4
  28. package/lib/{index-0ALUTgtr.mjs → index-BQkj72G3.mjs} +3 -3
  29. package/lib/{index-COOq9Yre.js → index-BRaDJTdV.js} +1 -1
  30. package/lib/{index-Cio3MIbP.mjs → index-BS7yguuC.mjs} +2 -2
  31. package/lib/{index-tWdeaq3O.js → index-Bc6-KGpl.js} +1 -1
  32. package/lib/{index-C8mQJEzu.js → index-Be_nyvv-.js} +1 -1
  33. package/lib/{index-5StF040W.mjs → index-Bpw-luLW.mjs} +1 -1
  34. package/lib/{index-BvyrFhuS.mjs → index-BrFiV6ml.mjs} +2 -2
  35. package/lib/{index-DV3sBKmN.mjs → index-Bv3a66FQ.mjs} +1 -1
  36. package/lib/{index-IsMPgaBj.mjs → index-C8__-BvE.mjs} +2 -2
  37. package/lib/{index-DsQWOOoH.mjs → index-CN7rbmv3.mjs} +1 -1
  38. package/lib/{index-BH76Gm64.js → index-CNdN0i2J.js} +1 -1
  39. package/lib/{index-C9uP2nLx.js → index-CRb9IbJP.js} +1 -1
  40. package/lib/{index-CFDAWb0X.js → index-ChdaB60-.js} +1 -1
  41. package/lib/{index-xTj52Pcp.js → index-CkCqt7a-.js} +1 -1
  42. package/lib/{index-Gq1AaNfJ.js → index-ClFZzjWo.js} +1 -1
  43. package/lib/{index-Cm3sAIIe.mjs → index-Cxo7XEgx.mjs} +1 -1
  44. package/lib/{index-BxFyTBij.js → index-D2WzZE5z.js} +1 -1
  45. package/lib/{index-Me4j3SkB.js → index-D41-bb9L.js} +1 -1
  46. package/lib/{index-Z8OXKqvR.js → index-D6IPbglF.js} +1 -1
  47. package/lib/{index-DQIEuT2z.js → index-DIXRIs-8.js} +1 -1
  48. package/lib/{index-GzxoZgwg.js → index-DPBbWUgq.js} +1 -1
  49. package/lib/{index-VIbVNXaj.js → index-DSxGwgfz.js} +1 -1
  50. package/lib/{index-B4i6ANNh.mjs → index-DVX_Ui4H.mjs} +2 -2
  51. package/lib/{index-6NRj6D5S.mjs → index-DVsO6_MG.mjs} +28 -27
  52. package/lib/{index-CkmesAuC.mjs → index-DXqgaeP7.mjs} +1 -1
  53. package/lib/{index-DpiBI2wV.js → index-DfF1QWxf.js} +1 -1
  54. package/lib/{index-BArAN3-r.mjs → index-DkWk2Ei2.mjs} +4 -4
  55. package/lib/{index-BfHTgqOZ.js → index-DoxjwHxG.js} +1 -1
  56. package/lib/{index-CwCGT3bW.mjs → index-Dq6f4FNC.mjs} +2 -2
  57. package/lib/{index-BRWk1KLF.mjs → index-DssifKHm.mjs} +1 -1
  58. package/lib/{index-CbNgmtU7.mjs → index-DuydCAHj.mjs} +1 -1
  59. package/lib/{index-nvmWtaEp.js → index-KlmCOa1v.js} +1 -1
  60. package/lib/{index-DMGq-P-n.mjs → index-LDJw-t-c.mjs} +2 -2
  61. package/lib/{index-8rarLRXW.js → index-Lf0LuGqV.js} +1 -1
  62. package/lib/{index-C-xA8IEi.mjs → index-Nij_Saob.mjs} +3 -3
  63. package/lib/{index-CU761Hwu.js → index-SiongsQ9.js} +1 -1
  64. package/lib/{index-uAi7Hgz5.js → index-Vr5ewH9o.js} +1 -1
  65. package/lib/{index-DbFCRZIL.mjs → index-ZBFKA4Z2.mjs} +1 -1
  66. package/lib/{index-BfdWU9Y5.js → index-o-2ADG2m.js} +1 -1
  67. package/lib/{index-Ty2OFCqQ.mjs → index-rpNMowr_.mjs} +1 -1
  68. package/lib/{index.es-C6kXpySz.js → index.es-BF1IWsY6.js} +2 -2
  69. package/lib/{index.es-GYnz6s6j.mjs → index.es-CI_klE4T.mjs} +5 -5
  70. package/lib/index.js +1 -1
  71. package/lib/index.mjs +1 -1
  72. package/lib/{signer-BHB7SxtT.mjs → signer-B7IqWjWF.mjs} +1 -1
  73. package/lib/{signer-C1EeLbAG.js → signer-IUSxOc-V.js} +1 -1
  74. package/lib/{solana-Q0OdKPAe.mjs → solana-BjSKSZug.mjs} +4 -4
  75. package/lib/{solana-DzB5-MhL.js → solana-BlsRfkyh.js} +1 -1
  76. package/lib/solana-D7OBO42M.mjs +17 -0
  77. package/lib/solana-uNqtUduY.js +1 -0
  78. package/lib/{solanaEmbed.esm-BZupTABA.mjs → solanaEmbed.esm-C2yV7iVs.mjs} +1 -1
  79. package/lib/{solanaEmbed.esm-sERTASiF.js → solanaEmbed.esm-CLpBoYFx.js} +1 -1
  80. package/lib/src/components/SampleApp/index.d.ts.map +1 -1
  81. package/lib/src/theme.d.ts +2 -0
  82. package/lib/src/theme.d.ts.map +1 -1
  83. package/lib/src/utils/coingecko.d.ts.map +1 -1
  84. package/lib/src/views/v2/Bridge/AmountInput/index.d.ts.map +1 -1
  85. package/lib/src/views/v2/Bridge/AssetPicker/index.d.ts.map +1 -1
  86. package/lib/{sui-Dk9s2xZt.js → sui-5P-JTGT2.js} +1 -1
  87. package/lib/{sui-Hz2Goaqc.mjs → sui-B0N24-KV.mjs} +1 -1
  88. package/lib/{sui-CxxJykl3.js → sui-C-8cs2Zt.js} +1 -1
  89. package/lib/{sui-BrEJo3ss.mjs → sui-DpF0u1Gb.mjs} +5 -5
  90. package/package.json +1 -1
  91. package/lib/solana-C6wUNLMT.mjs +0 -17
  92. package/lib/solana-CVuGjBKt.js +0 -1
@@ -13,7 +13,7 @@ var E = (e, t, s, i) => ({
13
13
  return h(e, t, i);
14
14
  }
15
15
  });
16
- import { A as W, d as b, W as $, E as f, P as M, a as R, b as j, c as q, _ as z } from "./index-6NRj6D5S.mjs";
16
+ import { A as W, d as b, W as $, E as f, P as M, a as R, b as j, c as q, _ as z } from "./index-DVsO6_MG.mjs";
17
17
  var a, c;
18
18
  const w = class w extends W {
19
19
  /**
@@ -126,11 +126,11 @@ const Q = {
126
126
  Platform: f,
127
127
  getSigner: H,
128
128
  protocols: {
129
- WormholeCore: () => import("./index-6NRj6D5S.mjs").then((e) => e.dF),
130
- TokenBridge: () => import("./index-CbNgmtU7.mjs"),
131
- PorticoBridge: () => import("./index-CwCGT3bW.mjs"),
132
- CircleBridge: () => import("./index-DOydP0Ra.mjs"),
133
- TBTCBridge: () => import("./index-Ty2OFCqQ.mjs")
129
+ WormholeCore: () => import("./index-DVsO6_MG.mjs").then((e) => e.dF),
130
+ TokenBridge: () => import("./index-DuydCAHj.mjs"),
131
+ PorticoBridge: () => import("./index-Dq6f4FNC.mjs"),
132
+ CircleBridge: () => import("./index-6KA_om4J.mjs"),
133
+ TBTCBridge: () => import("./index-rpNMowr_.mjs")
134
134
  },
135
135
  getChain: (e, t, s) => new R(t, new f(e, q(e, z, {
136
136
  [t]: s
@@ -1,9 +1,9 @@
1
1
  var S = Object.defineProperty;
2
2
  var b = (a, e, t) => e in a ? S(a, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : a[e] = t;
3
3
  var i = (a, e, t) => b(a, typeof e != "symbol" ? e + "" : e, t);
4
- import { ch as v, ci as f, cj as x, cf as I, ck as A, b2 as w, bw as U, b9 as $, bx as m, r as o, ay as k, p as c, m as h, cl as C, bC as T, O as E, bz as F, k as _, ba as u, cm as O, bf as W } from "./index-6NRj6D5S.mjs";
4
+ import { ch as v, ci as f, cj as x, cf as I, ck as A, b2 as w, bw as U, b9 as $, bx as m, r as o, ay as k, p as c, m as h, cl as C, bC as T, O as E, bz as F, k as _, ba as u, cm as O, bf as W } from "./index-DVsO6_MG.mjs";
5
5
  import { A as N } from "./unsignedTransaction-BDOQhqcZ.mjs";
6
- import { A as Q } from "./aptos-Bm_dl-Sm.mjs";
6
+ import { A as Q } from "./aptos-Cx2NRBhV.mjs";
7
7
  const R = [
8
8
  { name: "tokenBridgeAddress", ...f },
9
9
  { name: "chain", ...x() },
@@ -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-BpqVHbdc.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
+ "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-BFhdLIwV.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,8 +1,8 @@
1
1
  var Y = Object.defineProperty;
2
2
  var Z = (n, f, e) => f in n ? Y(n, f, { enumerable: !0, configurable: !0, writable: !0, value: e }) : n[f] = e;
3
3
  var d = (n, f, e) => Z(n, typeof f != "symbol" ? f + "" : f, e);
4
- import { N as y, bg as f0, bh as W, bi as p, bj as e0, bk as a0, bl as t0, bm as _, bn as b0, bo as n0, bp as d0, b4 as L, bq as O, E as v, b as C, br as D, r as N, b8 as u, bs as q, bb as c0, bt as U, bd as H, be as j, b2 as s0, bu as i0, bv as I, b1 as S, $, bf as V, _ as G } from "./index-6NRj6D5S.mjs";
5
- import "./index-CbNgmtU7.mjs";
4
+ import { N as y, bg as f0, bh as W, bi as p, bj as e0, bk as a0, bl as t0, bm as _, bn as b0, bo as n0, bp as d0, b4 as L, bq as O, E as v, b as C, br as D, r as N, b8 as u, bs as q, bb as c0, bt as U, bd as H, be as j, b2 as s0, bu as i0, bv as I, b1 as S, $, bf as V, _ as G } from "./index-DVsO6_MG.mjs";
5
+ import "./index-DuydCAHj.mjs";
6
6
  const r0 = new RegExp("^bytes([0-9]+)$"), p0 = new RegExp("^(u?int)([0-9]*)$"), y0 = new RegExp("^(.*)\\[([0-9]*)\\]$");
7
7
  function J(n, f, e) {
8
8
  switch (n) {
@@ -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-6NRj6D5S.mjs";
2
- import { b0 as R } from "./index-6NRj6D5S.mjs";
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-DVsO6_MG.mjs";
2
+ import { b0 as R } from "./index-DVsO6_MG.mjs";
3
3
  class l extends Error {
4
4
  constructor(r) {
5
5
  super(r);
@@ -1,7 +1,7 @@
1
1
  var d = Object.defineProperty;
2
2
  var h = (i, e, r) => e in i ? d(i, e, { enumerable: !0, configurable: !0, writable: !0, value: r }) : i[e] = r;
3
3
  var o = (i, e, r) => h(i, typeof e != "symbol" ? e + "" : e, r);
4
- import { b2 as m, I as w, cg as g, K as p, bf as u } from "./index-6NRj6D5S.mjs";
4
+ import { b2 as m, I as w, cg as g, K as p, bf as u } from "./index-DVsO6_MG.mjs";
5
5
  class c {
6
6
  constructor(e, r, t, n) {
7
7
  o(this, "network");