@wormhole-foundation/wormhole-connect 3.0.0-beta.7-development → 3.0.0-beta.9-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 (153) hide show
  1. package/dist/main.js +48 -48
  2. package/dist/src/config/tokens.d.ts +0 -1
  3. package/dist/src/config/tokens.d.ts.map +1 -1
  4. package/dist/src/contexts/TokensContext.d.ts.map +1 -1
  5. package/dist/src/utils/errors.d.ts +1 -0
  6. package/dist/src/utils/errors.d.ts.map +1 -1
  7. package/dist/src/views/v2/Bridge/WalletConnector/Sidebar.d.ts.map +1 -1
  8. package/dist/src/views/v2/Redeem/TransactionDetails/index.d.ts.map +1 -1
  9. package/lib/{account-QG_Hi4er.js → account-BSFuCEgk.js} +1 -1
  10. package/lib/{account-BK8xMTUI.mjs → account-y1ICRMSr.mjs} +1 -1
  11. package/lib/{address-B-_yHNB2.js → address-BwcXVurJ.js} +1 -1
  12. package/lib/{address-CNhzoegm.js → address-D8qNQEOW.js} +1 -1
  13. package/lib/{address-BWXkejmE.mjs → address-DaoiwqzU.mjs} +1 -1
  14. package/lib/{address-RcMobNYE.js → address-DnSRsubO.js} +7 -7
  15. package/lib/{address-CBux52Na.mjs → address-DqsMcbcT.mjs} +612 -588
  16. package/lib/{address-DKHa7TFU.mjs → address-S7wMItHX.mjs} +1 -1
  17. package/lib/{aptos-9aq-5gkF.mjs → aptos-CSVdIYqJ.mjs} +3 -3
  18. package/lib/{aptos-XxKO9242.js → aptos-C_j04MF5.js} +1 -1
  19. package/lib/{aptos-C180o9od.mjs → aptos-C_sLjrbm.mjs} +15 -15
  20. package/lib/{aptos-BZ2mcuTd.js → aptos-ma6bumqy.js} +2 -2
  21. package/lib/{base64-Dmj19Uvu.mjs → base64-B2xumR3a.mjs} +3 -2
  22. package/lib/{base64-BfY07bq5.js → base64-a1Dr6hMt.js} +1 -1
  23. package/lib/{blake2b-CgbIfNRX.mjs → blake2b-CR50AGep.mjs} +1 -1
  24. package/lib/{blake2b-CoM94_cH.js → blake2b-Dkm1d7Wp.js} +1 -1
  25. package/lib/{browser-ponyfill-BAEAyXvw.js → browser-ponyfill-BTt_ELXG.js} +1 -1
  26. package/lib/{browser-ponyfill-BecG2Lnb.mjs → browser-ponyfill-uCX78ltK.mjs} +1 -1
  27. package/lib/{ccip-CUqskd5M.mjs → ccip-69mFHkV9.mjs} +1 -1
  28. package/lib/{ccip-oytFtCzk.js → ccip-BFyWlloE.js} +1 -1
  29. package/lib/{chain-itK5uGYL.js → chain-Cio41-Lr.js} +1 -1
  30. package/lib/{chain-sKZNJgPZ.mjs → chain-DbmG-oEQ.mjs} +1 -1
  31. package/lib/{chunk-IMTC3J2M-DKLPKqnP.mjs → chunk-IMTC3J2M-CmFt3nz5.mjs} +137 -135
  32. package/lib/chunk-IMTC3J2M-NMBEZ4p8.js +471 -0
  33. package/lib/{constants-DrDsewBe.mjs → constants-JcrZQeMq.mjs} +3 -3
  34. package/lib/{constants-Bmrui4ZY.js → constants-lsjPx3va.js} +1 -1
  35. package/lib/{contract-MJZ8ZoSX.js → contract-CcVq6MSa.js} +1 -1
  36. package/lib/{contract-BVaUamai.mjs → contract-DrK81GRi.mjs} +109 -109
  37. package/lib/create-BtJgfMdJ.mjs +18 -0
  38. package/lib/{create-DO_-1_Hb.js → create-Q6N34YQz.js} +1 -1
  39. package/lib/{evm-IjnSHeSg.mjs → evm--hXXT-db.mjs} +9 -9
  40. package/lib/{evm-C-aa4dBG.mjs → evm-BBqhcxFC.mjs} +83 -83
  41. package/lib/{evm-D_r84vhS.js → evm-CNq2zXwl.js} +3 -3
  42. package/lib/{evm-ZSzF-61X.js → evm-l0300AWS.js} +2 -2
  43. package/lib/executor.js +470 -1
  44. package/lib/executor.mjs +7106 -560
  45. package/lib/hosted.js +1 -1
  46. package/lib/hosted.mjs +1 -1
  47. package/lib/{index-aA-2Ygs3.mjs → index-98w8rrCe.mjs} +1 -1
  48. package/lib/{index-Bb8InrQU.mjs → index-9dr91dtY.mjs} +2 -2
  49. package/lib/{index-DNaxNpBa.js → index-BABC5__9.js} +1 -1
  50. package/lib/{index-CapdlI6H.js → index-BAjc-UZH.js} +1 -1
  51. package/lib/{index-Cx-ODuWg.mjs → index-BN-aj3dN.mjs} +4 -4
  52. package/lib/{index-BeQ668oT.js → index-BV7XVrd8.js} +1 -1
  53. package/lib/{index-CKaF7Gzs.mjs → index-BbUxOO56.mjs} +14 -14
  54. package/lib/{index-D3cDkU4S.js → index-BfPE3vDw.js} +1 -1
  55. package/lib/{index-Batb-GTa.mjs → index-BlCHxlUD.mjs} +5 -5
  56. package/lib/{index-CZYUYK5K.js → index-BnCQiOiA.js} +1 -1
  57. package/lib/{index-CsdQttEt.mjs → index-BqmCeCU_.mjs} +5 -5
  58. package/lib/{index-Ce0EI1tW.mjs → index-BtrXSq3R.mjs} +5 -5
  59. package/lib/{index-CE0rxdUf.js → index-C-ORpsiU.js} +1 -1
  60. package/lib/{index-DyE-3pz1.js → index-C0un9IYm.js} +1 -1
  61. package/lib/{index-DdvRmaTh.mjs → index-C4HPXgbm.mjs} +7 -7
  62. package/lib/{index-DgIxcujP.mjs → index-COkYtNvE.mjs} +36 -36
  63. package/lib/{index-CLy98PXT.mjs → index-COs6VyCx.mjs} +13 -13
  64. package/lib/{index-43m4zMem.js → index-COsUDXFI.js} +1 -1
  65. package/lib/{index-B36we0ml.mjs → index-CUYHyKgr.mjs} +7 -7
  66. package/lib/{index-BcAXCy1h.js → index-CUyxr8OX.js} +1 -1
  67. package/lib/{index-DDBLdcME.mjs → index-CX0qxE9A.mjs} +11 -11
  68. package/lib/{index-C2Pe6i5V.js → index-CiFTvTwg.js} +1 -1
  69. package/lib/{index-DNcx7dMI.mjs → index-CofxOTyV.mjs} +5 -5
  70. package/lib/{index-BGqRY1Ww.js → index-CsR_y9ji.js} +1 -1
  71. package/lib/{index-CA5XKv-J.js → index-CuoxLyOv.js} +1 -1
  72. package/lib/{index-DRCX2iXw.js → index-CvEfOpn2.js} +1 -1
  73. package/lib/{index-CV3K6bKD.js → index-Cxwfq1al.js} +1 -1
  74. package/lib/{index-CjroDahP.mjs → index-D0tl0B36.mjs} +2 -2
  75. package/lib/{index-f_27F6WX.js → index-D4KtQtgE.js} +1 -1
  76. package/lib/{index-D2o0FZvZ.js → index-D74ZE0n9.js} +1 -1
  77. package/lib/{index-DkZjpCle.js → index-DLFGcXjy.js} +1 -1
  78. package/lib/{index-07cEoDZD.mjs → index-DNvr2HlM.mjs} +13 -13
  79. package/lib/{index-Cu7gFSJv.mjs → index-DPfKYdEf.mjs} +1 -1
  80. package/lib/{index-Bogu114a.js → index-Db3GFx2x.js} +1 -1
  81. package/lib/{index-Dt-63Ecw.js → index-DbJV-Hi3.js} +1 -1
  82. package/lib/{index-B-S6avdv.js → index-DebLDCcs.js} +1 -1
  83. package/lib/{index-DC1ot7tO.js → index-DjbQ-yfQ.js} +1 -1
  84. package/lib/{index-Cry2AYTm.mjs → index-DsKRmXnW.mjs} +3 -3
  85. package/lib/{index-FCA-cXcS.js → index-DtUeWT1n.js} +1 -1
  86. package/lib/{index-DyvQhGPY.mjs → index-DtfwfGsA.mjs} +2 -2
  87. package/lib/{index-DDBdrN7Y.mjs → index-DvozGHS-.mjs} +7070 -7093
  88. package/lib/{index-Cyo0tNu5.mjs → index-Dx7nqevs.mjs} +2 -2
  89. package/lib/{index-Blzzdktm.js → index-LJw0S70V.js} +1 -1
  90. package/lib/{index-rAnJYuJr.mjs → index-Nh2mSVy3.mjs} +9 -9
  91. package/lib/{index-B5XhLD_L.mjs → index-S_O9ybUy.mjs} +5 -5
  92. package/lib/{index-CIhJm6vf.js → index-S_dcknx7.js} +86 -86
  93. package/lib/{index-Dsaj5lf_.js → index-U1ceHkB6.js} +1 -1
  94. package/lib/{index-BUlzgqNa.mjs → index-Yp3NfcfI.mjs} +4 -4
  95. package/lib/{index-DRleG63r.mjs → index-Z48MvcFr.mjs} +1 -1
  96. package/lib/{index-B9hin5U8.mjs → index-ejTR4WLF.mjs} +5 -5
  97. package/lib/{index-BUfjw4S2.mjs → index-kyD2rWx8.mjs} +11 -11
  98. package/lib/{index-BL4H4RbP.js → index-lG1-neJv.js} +1 -1
  99. package/lib/{index-CuDLHfKb.mjs → index-sz4KACqf.mjs} +5 -5
  100. package/lib/{index-dpkTW-H8.js → index-vIUqmO0o.js} +1 -1
  101. package/lib/{index.es-MXzok_Dp.js → index.es-C4RhqFy8.js} +2 -2
  102. package/lib/{index.es-C6ziEcYX.mjs → index.es-D5O0G4Af.mjs} +7 -7
  103. package/lib/index.js +1 -1
  104. package/lib/index.mjs +1 -1
  105. package/lib/mayan.js +1 -1
  106. package/lib/mayan.mjs +10 -10
  107. package/lib/{mint-C3SdQH_S.mjs → mint-CKsi-DrV.mjs} +2 -2
  108. package/lib/{mint-BxtkCWBh.js → mint-DNcbNuI1.js} +1 -1
  109. package/lib/ntt.js +1 -1
  110. package/lib/ntt.mjs +10 -10
  111. package/lib/{platform-Czq0KkFa.mjs → platform-BCxJ-CNM.mjs} +7 -7
  112. package/lib/{platform-CG_VHRJU.js → platform-BqUizEYV.js} +1 -1
  113. package/lib/{platform-CUeBR_i4.mjs → platform-CB3TPh7I.mjs} +17 -17
  114. package/lib/{platform-CyTWPtDR.js → platform-CGIgJRY3.js} +1 -1
  115. package/lib/{platform-PNwsacZi.js → platform-D7pe3gG2.js} +1 -1
  116. package/lib/{platform-Droe0nZu.mjs → platform-DTVt42uH.mjs} +4 -4
  117. package/lib/provider-jsonrpc-DYBOGqdj.js +1 -0
  118. package/lib/{provider-jsonrpc-CVWSLk8g.mjs → provider-jsonrpc-MOE1VIOF.mjs} +155 -155
  119. package/lib/{sha3-BMK6V2DM.mjs → sha3-BZUtvEPh.mjs} +1 -1
  120. package/lib/{sha3-uufRWTnZ.js → sha3-c6o5MDKC.js} +1 -1
  121. package/lib/{signer-L9IdBy4K.js → signer-BAFbrQDv.js} +1 -1
  122. package/lib/{signer-CYkXKdE1.mjs → signer-CwtXMDcn.mjs} +25 -25
  123. package/lib/solana-Cg0N1W8e.js +1 -0
  124. package/lib/{solana-iU2xZ6yu.js → solana-DIO5mbHM.js} +1 -1
  125. package/lib/{solana-CE7DDmW7.mjs → solana-Dr5BmG1x.mjs} +6 -6
  126. package/lib/solana-mJ922Ek9.mjs +18 -0
  127. package/lib/{solanaEmbed.esm-BtaI5pum.mjs → solanaEmbed.esm-C4t2kCSL.mjs} +3 -3
  128. package/lib/{solanaEmbed.esm-DUsdVcC-.js → solanaEmbed.esm-D0xXx6VI.js} +1 -1
  129. package/lib/src/config/tokens.d.ts +0 -1
  130. package/lib/src/config/tokens.d.ts.map +1 -1
  131. package/lib/src/contexts/TokensContext.d.ts.map +1 -1
  132. package/lib/src/utils/errors.d.ts +1 -0
  133. package/lib/src/utils/errors.d.ts.map +1 -1
  134. package/lib/src/views/v2/Bridge/WalletConnector/Sidebar.d.ts.map +1 -1
  135. package/lib/src/views/v2/Redeem/TransactionDetails/index.d.ts.map +1 -1
  136. package/lib/{sui-BIE_b_7o.mjs → sui-AbsMI4yt.mjs} +3 -3
  137. package/lib/{sui-CNPKXqM6.js → sui-BSJIqJNt.js} +1 -1
  138. package/lib/{sui-Dva2w10T.js → sui-Bzh8kAZm.js} +1 -1
  139. package/lib/{sui-BJsKaZg2.mjs → sui-CZTSBdD4.mjs} +16 -16
  140. package/lib/{tokens-D4usSvOD.js → tokens-BUeRxOcP.js} +1 -1
  141. package/lib/{tokens-CQnhplD_.mjs → tokens-Vm--egzg.mjs} +4 -4
  142. package/lib/{units-CPUigdwl.js → units-LPlUOt3D.js} +1 -1
  143. package/lib/{units-YkCOGDr9.mjs → units-b10-QTSu.mjs} +28 -28
  144. package/lib/{unsignedTransaction-C0WXQMmv.mjs → unsignedTransaction-BJw0T6uN.mjs} +28 -28
  145. package/lib/{unsignedTransaction-DFUF8DSp.js → unsignedTransaction-CIkLJt6N.js} +1 -1
  146. package/lib/{web3-B3Usc-Qj.mjs → web3-BHuP7CTp.mjs} +7 -7
  147. package/lib/{web3-CjTx3huW.js → web3-SO_UBSxv.js} +1 -1
  148. package/package.json +2 -2
  149. package/lib/chunk-IMTC3J2M-D-un3eDX.js +0 -471
  150. package/lib/create-CQ6n4Ga8.mjs +0 -18
  151. package/lib/provider-jsonrpc-1gjszS3Q.js +0 -1
  152. package/lib/solana-BRQmi9BN.js +0 -1
  153. package/lib/solana-Bs7_C3BS.mjs +0 -18
@@ -1,7 +1,7 @@
1
1
  var F = Object.defineProperty;
2
2
  var M = (t, e, r) => e in t ? F(t, e, { enumerable: !0, configurable: !0, writable: !0, value: r }) : t[e] = r;
3
3
  var y = (t, e, r) => M(t, typeof e != "symbol" ? e + "" : e, r);
4
- import { ac as R, Z as j, _ as k, a3 as U, $ as B } from "./address-CBux52Na.mjs";
4
+ import { a9 as R, Z as j, _ as k, a3 as U, $ as B } from "./address-DqsMcbcT.mjs";
5
5
  class rt extends Error {
6
6
  constructor(r) {
7
7
  super(`Minimum transfer amount is ${R(r)}`);
@@ -1,9 +1,9 @@
1
1
  var Uf = Object.defineProperty;
2
2
  var Cf = (t, e, n) => e in t ? Uf(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n;
3
3
  var Jn = (t, e, n) => Cf(t, typeof e != "symbol" ? e + "" : e, n);
4
- import { n as St, k as zf, W as kf, l as Va, N as Za, c as qa, B as Of, g as Lf, e as jf } from "./index-DDBdrN7Y.mjs";
5
- import { d as Je, az as Pf, g as Iu, V as _f, ca as ss, X as kn } from "./address-CBux52Na.mjs";
6
- import { B as Xo, l as $e, f as mn, E as Ke, m as pr, d as Fn, a as as, e as Ye, r as ar, n as Gn, z as ii, b as Mu, c as un, g as on, I as Bf, h as Es, j as Rf, i as oi, k as Ff, p as Nu, q as gr, y as Jo, u as Ai, s as cr, v as xu, w as Wf, L as cs, x as Qf, A as mo, t as is, C as Kf, D as Su, F as Hf, G as Yf, H as Gf, J as Vf, K as Zf, M as qf } from "./chunk-IMTC3J2M-DKLPKqnP.mjs";
4
+ import { n as St, k as zf, W as kf, l as Va, N as Za, c as qa, B as Of, g as Lf, e as jf } from "./index-DvozGHS-.mjs";
5
+ import { d as Je, az as Pf, g as Iu, V as _f, bf as ss, X as kn } from "./address-DqsMcbcT.mjs";
6
+ import { B as Xo, l as $e, f as mn, E as Ke, m as pr, d as Fn, a as as, e as Ye, r as ar, n as Gn, z as ii, b as Mu, c as un, g as on, I as Bf, h as Es, i as Rf, k as oi, q as Ff, u as Nu, v as gr, y as Jo, w as Ai, s as cr, x as xu, A as Wf, L as cs, C as Qf, D as mo, t as is, F as Kf, G as Su, J as Hf, K as Yf, M as Gf, j as Vf, N as Zf, O as qf } from "./chunk-IMTC3J2M-CmFt3nz5.mjs";
7
7
  import { g as Xf } from "./wallets-B2tqS5lZ.mjs";
8
8
  function Bs(t, e) {
9
9
  if (!!!t)
@@ -1,4 +1,4 @@
1
- "use strict";var Jh=Object.defineProperty;var $h=(t,e,n)=>e in t?Jh(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n;var Kn=(t,e,n)=>$h(t,typeof e!="symbol"?e+"":e,n);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const Ge=require("./index-CIhJm6vf.js"),ke=require("./address-RcMobNYE.js"),U=require("./chunk-IMTC3J2M-D-un3eDX.js"),ef=require("./wallets-5qGJd8Hk.js");function bs(t,e){if(!!!t)throw new Error(e)}function tf(t){return typeof t=="object"&&t!==null}function nf(t,e){if(!!!t)throw new Error("Unexpected invariant triggered.")}const rf=/\r\n|[\n\r]/g;function Ji(t,e){let n=0,r=1;for(const s of t.body.matchAll(rf)){if(typeof s.index=="number"||nf(!1),s.index>=e)break;n=s.index+s[0].length,r+=1}return{line:r,column:e+1-n}}function sf(t){return Jc(t.source,Ji(t.source,t.start))}function Jc(t,e){const n=t.locationOffset.column-1,r="".padStart(n)+t.body,s=e.line-1,o=t.locationOffset.line-1,c=e.line+o,l=e.line===1?n:0,f=e.column+l,p=`${t.name}:${c}:${f}
1
+ "use strict";var Jh=Object.defineProperty;var $h=(t,e,n)=>e in t?Jh(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n;var Kn=(t,e,n)=>$h(t,typeof e!="symbol"?e+"":e,n);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const Ge=require("./index-S_dcknx7.js"),ke=require("./address-DnSRsubO.js"),U=require("./chunk-IMTC3J2M-NMBEZ4p8.js"),ef=require("./wallets-5qGJd8Hk.js");function bs(t,e){if(!!!t)throw new Error(e)}function tf(t){return typeof t=="object"&&t!==null}function nf(t,e){if(!!!t)throw new Error("Unexpected invariant triggered.")}const rf=/\r\n|[\n\r]/g;function Ji(t,e){let n=0,r=1;for(const s of t.body.matchAll(rf)){if(typeof s.index=="number"||nf(!1),s.index>=e)break;n=s.index+s[0].length,r+=1}return{line:r,column:e+1-n}}function sf(t){return Jc(t.source,Ji(t.source,t.start))}function Jc(t,e){const n=t.locationOffset.column-1,r="".padStart(n)+t.body,s=e.line-1,o=t.locationOffset.line-1,c=e.line+o,l=e.line===1?n:0,f=e.column+l,p=`${t.name}:${c}:${f}
2
2
  `,y=r.split(/\r\n|[\n\r]/g),w=y[s];if(w.length>120){const b=Math.floor(f/80),S=f%80,I=[];for(let k=0;k<w.length;k+=80)I.push(w.slice(k,k+80));return p+Ma([[`${c} |`,I[0]],...I.slice(1,b+1).map(k=>["|",k]),["|","^".padStart(S)],["|",I[b+1]]])}return p+Ma([[`${c-1} |`,y[s-1]],[`${c} |`,w],["|","^".padStart(f)],[`${c+1} |`,y[s+1]]])}function Ma(t){const e=t.filter(([r,s])=>s!==void 0),n=Math.max(...e.map(([r])=>r.length));return e.map(([r,s])=>r.padStart(n)+(s?" "+s:"")).join(`
3
3
  `)}function of(t){const e=t[0];return e==null||"kind"in e||"length"in e?{nodes:e,source:t[1],positions:t[2],path:t[3],originalError:t[4],extensions:t[5]}:e}class Uo extends Error{constructor(e,...n){var r,s,o;const{nodes:c,source:l,positions:f,path:p,originalError:y,extensions:w}=of(n);super(e),this.name="GraphQLError",this.path=p??void 0,this.originalError=y??void 0,this.nodes=Na(Array.isArray(c)?c:c?[c]:void 0);const b=Na((r=this.nodes)===null||r===void 0?void 0:r.map(I=>I.loc).filter(I=>I!=null));this.source=l??(b==null||(s=b[0])===null||s===void 0?void 0:s.source),this.positions=f??(b==null?void 0:b.map(I=>I.start)),this.locations=f&&l?f.map(I=>Ji(l,I)):b==null?void 0:b.map(I=>Ji(I.source,I.start));const S=tf(y==null?void 0:y.extensions)?y==null?void 0:y.extensions:void 0;this.extensions=(o=w??S)!==null&&o!==void 0?o:Object.create(null),Object.defineProperties(this,{message:{writable:!0,enumerable:!0},name:{enumerable:!1},nodes:{enumerable:!1},source:{enumerable:!1},positions:{enumerable:!1},originalError:{enumerable:!1}}),y!=null&&y.stack?Object.defineProperty(this,"stack",{value:y.stack,writable:!0,configurable:!0}):Error.captureStackTrace?Error.captureStackTrace(this,Uo):Object.defineProperty(this,"stack",{value:Error().stack,writable:!0,configurable:!0})}get[Symbol.toStringTag](){return"GraphQLError"}toString(){let e=this.message;if(this.nodes)for(const n of this.nodes)n.loc&&(e+=`
4
4
 
@@ -1,12 +1,12 @@
1
1
  var d = Object.defineProperty;
2
2
  var p = (n, t, s) => t in n ? d(n, t, { enumerable: !0, configurable: !0, writable: !0, value: s }) : n[t] = s;
3
- var r = (n, t, s) => p(n, typeof t != "symbol" ? t + "" : t, s);
4
- import { A as o, a as u } from "./platform-Czq0KkFa.mjs";
5
- import { o as g, z as m } from "./chunk-IMTC3J2M-DKLPKqnP.mjs";
6
- import { a3 as _, br as f } from "./address-CBux52Na.mjs";
7
- import { A as l, _ as A } from "./address-BWXkejmE.mjs";
3
+ var o = (n, t, s) => p(n, typeof t != "symbol" ? t + "" : t, s);
4
+ import { A as r, a as u } from "./platform-BCxJ-CNM.mjs";
5
+ import { o as g, z as m } from "./chunk-IMTC3J2M-CmFt3nz5.mjs";
6
+ import { a3 as _, bU as f } from "./address-DqsMcbcT.mjs";
7
+ import { A as l, _ as A } from "./address-DaoiwqzU.mjs";
8
8
  async function S(n, t) {
9
- const [s, i] = await o.chainFromRpc(n), a = g.fromPrivateKey({
9
+ const [s, i] = await r.chainFromRpc(n), a = g.fromPrivateKey({
10
10
  // TODO: support secp256k1
11
11
  privateKey: new m(_.decode(t))
12
12
  });
@@ -14,10 +14,10 @@ async function S(n, t) {
14
14
  }
15
15
  class w {
16
16
  constructor(t, s, i, a) {
17
- r(this, "_chain");
18
- r(this, "_account");
19
- r(this, "_rpc");
20
- r(this, "_debug");
17
+ o(this, "_chain");
18
+ o(this, "_account");
19
+ o(this, "_rpc");
20
+ o(this, "_debug");
21
21
  this._chain = t, this._account = s, this._rpc = i, this._debug = a;
22
22
  }
23
23
  chain() {
@@ -52,14 +52,14 @@ ${JSON.stringify(i, null, 2)}`);
52
52
  }
53
53
  const P = {
54
54
  Address: l,
55
- Platform: o,
55
+ Platform: r,
56
56
  getSigner: S,
57
57
  protocols: {
58
- WormholeCore: () => import("./index-BUlzgqNa.mjs"),
59
- TokenBridge: () => import("./index-07cEoDZD.mjs"),
60
- CircleBridge: () => import("./index-BUfjw4S2.mjs")
58
+ WormholeCore: () => import("./index-Yp3NfcfI.mjs"),
59
+ TokenBridge: () => import("./index-DNvr2HlM.mjs"),
60
+ CircleBridge: () => import("./index-kyD2rWx8.mjs")
61
61
  },
62
- getChain: (n, t, s) => new u(t, new o(n, f(n, A, {
62
+ getChain: (n, t, s) => new u(t, new r(n, f(n, A, {
63
63
  [t]: s
64
64
  })))
65
65
  };
@@ -1,2 +1,2 @@
1
- "use strict";var g=Object.defineProperty;var p=(n,t,s)=>t in n?g(n,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):n[t]=s;var i=(n,t,s)=>p(n,typeof t!="symbol"?t+"":t,s);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("./platform-CyTWPtDR.js"),a=require("./chunk-IMTC3J2M-D-un3eDX.js"),h=require("./address-RcMobNYE.js"),c=require("./address-B-_yHNB2.js");async function _(n,t){const[s,e]=await o.AptosPlatform.chainFromRpc(n),r=a.o.fromPrivateKey({privateKey:new a.z(h.hex.decode(t))});return new f(e,r,n)}class f{constructor(t,s,e,r){i(this,"_chain");i(this,"_account");i(this,"_rpc");i(this,"_debug");this._chain=t,this._account=s,this._rpc=e,this._debug=r}chain(){return this._chain}address(){return this._account.accountAddress.toString()}async signAndSend(t){const s=[];for(const e of t){const{description:r,transaction:u}=e;this._debug&&console.log(`Signing: ${r} for ${this.address()}`);const d=await this._rpc.transaction.build.simple({sender:this._account.accountAddress,data:u}),{hash:l}=await this._simSignSend(d);s.push(l)}return s}async _simSignSend(t){return await this._rpc.transaction.simulate.simple({signerPublicKey:this._account.publicKey,transaction:t}).then(s=>s.forEach(e=>{if(!e.success)throw new Error(`Transaction failed: ${e.vm_status}
2
- ${JSON.stringify(e,null,2)}`)})),this._rpc.signAndSubmitTransaction({signer:this._account,transaction:t}).then(s=>this._rpc.waitForTransaction({transactionHash:s.hash}))}}const m={Address:c.AptosAddress,Platform:o.AptosPlatform,getSigner:_,protocols:{WormholeCore:()=>Promise.resolve().then(()=>require("./index-C2Pe6i5V.js")),TokenBridge:()=>Promise.resolve().then(()=>require("./index-f_27F6WX.js")),CircleBridge:()=>Promise.resolve().then(()=>require("./index-DC1ot7tO.js"))},getChain:(n,t,s)=>new o.AptosChain(t,new o.AptosPlatform(n,h.applyChainsConfigConfigOverrides(n,c._platform,{[t]:s})))};exports.default=m;
1
+ "use strict";var g=Object.defineProperty;var p=(n,t,s)=>t in n?g(n,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):n[t]=s;var i=(n,t,s)=>p(n,typeof t!="symbol"?t+"":t,s);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("./platform-CGIgJRY3.js"),a=require("./chunk-IMTC3J2M-NMBEZ4p8.js"),h=require("./address-DnSRsubO.js"),c=require("./address-BwcXVurJ.js");async function _(n,t){const[s,e]=await o.AptosPlatform.chainFromRpc(n),r=a.o.fromPrivateKey({privateKey:new a.z(h.hex.decode(t))});return new f(e,r,n)}class f{constructor(t,s,e,r){i(this,"_chain");i(this,"_account");i(this,"_rpc");i(this,"_debug");this._chain=t,this._account=s,this._rpc=e,this._debug=r}chain(){return this._chain}address(){return this._account.accountAddress.toString()}async signAndSend(t){const s=[];for(const e of t){const{description:r,transaction:u}=e;this._debug&&console.log(`Signing: ${r} for ${this.address()}`);const d=await this._rpc.transaction.build.simple({sender:this._account.accountAddress,data:u}),{hash:l}=await this._simSignSend(d);s.push(l)}return s}async _simSignSend(t){return await this._rpc.transaction.simulate.simple({signerPublicKey:this._account.publicKey,transaction:t}).then(s=>s.forEach(e=>{if(!e.success)throw new Error(`Transaction failed: ${e.vm_status}
2
+ ${JSON.stringify(e,null,2)}`)})),this._rpc.signAndSubmitTransaction({signer:this._account,transaction:t}).then(s=>this._rpc.waitForTransaction({transactionHash:s.hash}))}}const m={Address:c.AptosAddress,Platform:o.AptosPlatform,getSigner:_,protocols:{WormholeCore:()=>Promise.resolve().then(()=>require("./index-CiFTvTwg.js")),TokenBridge:()=>Promise.resolve().then(()=>require("./index-D4KtQtgE.js")),CircleBridge:()=>Promise.resolve().then(()=>require("./index-DjbQ-yfQ.js"))},getChain:(n,t,s)=>new o.AptosChain(t,new o.AptosPlatform(n,h.applyChainsConfigConfigOverrides(n,c._platform,{[t]:s})))};exports.default=m;
@@ -1,4 +1,4 @@
1
- import { d as x } from "./address-CBux52Na.mjs";
1
+ import { d as x } from "./address-DqsMcbcT.mjs";
2
2
  const s = typeof x.Buffer == "function", h = typeof TextDecoder == "function" ? new TextDecoder() : void 0, c = typeof TextEncoder == "function" ? new TextEncoder() : void 0, C = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=", d = Array.prototype.slice.call(C), l = ((t) => {
3
3
  let e = {};
4
4
  return t.forEach((o, n) => e[o] = n), e;
@@ -44,6 +44,7 @@ const s = typeof x.Buffer == "function", h = typeof TextDecoder == "function" ?
44
44
  return o;
45
45
  }, y = typeof atob == "function" ? (t) => atob(p(t)) : s ? (t) => x.Buffer.from(t, "base64").toString("binary") : z, Z = s ? (t) => A(x.Buffer.from(t, "base64")) : (t) => A(y(t).split("").map((e) => e.charCodeAt(0))), I = s ? (t) => x.Buffer.from(t, "base64").toString("utf8") : h ? (t) => h.decode(Z(t)) : (t) => v(y(t)), P = (t) => p(t.replace(/[-_]/g, (e) => e == "-" ? "+" : "/")), k = (t) => I(P(t));
46
46
  export {
47
+ j as a,
47
48
  k as d,
48
- j as e
49
+ E as e
49
50
  };
@@ -1 +1 @@
1
- "use strict";const s=require("./address-RcMobNYE.js"),d=typeof s.dist.Buffer=="function",c=typeof TextDecoder=="function"?new TextDecoder:void 0,h=typeof TextEncoder=="function"?new TextEncoder:void 0,C="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",x=Array.prototype.slice.call(C),u=(t=>{let e={};return t.forEach((o,n)=>e[o]=n),e})(x),m=/^(?:[A-Za-z\d+\/]{4})*?(?:[A-Za-z\d+\/]{2}(?:==)?|[A-Za-z\d+\/]{3}=?)?$/,r=String.fromCharCode.bind(String),A=typeof Uint8Array.from=="function"?Uint8Array.from.bind(Uint8Array):t=>new Uint8Array(Array.prototype.slice.call(t,0)),_=t=>t.replace(/=/g,"").replace(/[+\/]/g,e=>e=="+"?"-":"_"),g=t=>t.replace(/[^A-Za-z0-9\+\/]/g,""),F=t=>{let e,o,n,f,a="";const l=t.length%3;for(let i=0;i<t.length;){if((o=t.charCodeAt(i++))>255||(n=t.charCodeAt(i++))>255||(f=t.charCodeAt(i++))>255)throw new TypeError("invalid character found");e=o<<16|n<<8|f,a+=x[e>>18&63]+x[e>>12&63]+x[e>>6&63]+x[e&63]}return l?a.slice(0,l-3)+"===".substring(l):a},p=typeof btoa=="function"?t=>btoa(t):d?t=>s.dist.Buffer.from(t,"binary").toString("base64"):F,B=d?t=>s.dist.Buffer.from(t).toString("base64"):t=>{let o=[];for(let n=0,f=t.length;n<f;n+=4096)o.push(r.apply(null,t.subarray(n,n+4096)));return p(o.join(""))},D=t=>{if(t.length<2){var e=t.charCodeAt(0);return e<128?t:e<2048?r(192|e>>>6)+r(128|e&63):r(224|e>>>12&15)+r(128|e>>>6&63)+r(128|e&63)}else{var e=65536+(t.charCodeAt(0)-55296)*1024+(t.charCodeAt(1)-56320);return r(240|e>>>18&7)+r(128|e>>>12&63)+r(128|e>>>6&63)+r(128|e&63)}},U=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,w=t=>t.replace(U,D),b=d?t=>s.dist.Buffer.from(t,"utf8").toString("base64"):h?t=>B(h.encode(t)):t=>p(w(t)),E=(t,e=!1)=>e?_(b(t)):b(t),S=t=>E(t,!0),T=/[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g,v=t=>{switch(t.length){case 4:var e=(7&t.charCodeAt(0))<<18|(63&t.charCodeAt(1))<<12|(63&t.charCodeAt(2))<<6|63&t.charCodeAt(3),o=e-65536;return r((o>>>10)+55296)+r((o&1023)+56320);case 3:return r((15&t.charCodeAt(0))<<12|(63&t.charCodeAt(1))<<6|63&t.charCodeAt(2));default:return r((31&t.charCodeAt(0))<<6|63&t.charCodeAt(1))}},z=t=>t.replace(T,v),Z=t=>{if(t=t.replace(/\s+/g,""),!m.test(t))throw new TypeError("malformed base64.");t+="==".slice(2-(t.length&3));let e,o="",n,f;for(let a=0;a<t.length;)e=u[t.charAt(a++)]<<18|u[t.charAt(a++)]<<12|(n=u[t.charAt(a++)])<<6|(f=u[t.charAt(a++)]),o+=n===64?r(e>>16&255):f===64?r(e>>16&255,e>>8&255):r(e>>16&255,e>>8&255,e&255);return o},y=typeof atob=="function"?t=>atob(g(t)):d?t=>s.dist.Buffer.from(t,"base64").toString("binary"):Z,I=d?t=>A(s.dist.Buffer.from(t,"base64")):t=>A(y(t).split("").map(e=>e.charCodeAt(0))),R=d?t=>s.dist.Buffer.from(t,"base64").toString("utf8"):c?t=>c.decode(I(t)):t=>z(y(t)),P=t=>g(t.replace(/[-_]/g,e=>e=="-"?"+":"/")),j=t=>R(P(t));exports.decode=j;exports.encodeURI=S;
1
+ "use strict";const s=require("./address-DnSRsubO.js"),d=typeof s.dist.Buffer=="function",c=typeof TextDecoder=="function"?new TextDecoder:void 0,h=typeof TextEncoder=="function"?new TextEncoder:void 0,m="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",x=Array.prototype.slice.call(m),u=(t=>{let e={};return t.forEach((o,n)=>e[o]=n),e})(x),_=/^(?:[A-Za-z\d+\/]{4})*?(?:[A-Za-z\d+\/]{2}(?:==)?|[A-Za-z\d+\/]{3}=?)?$/,r=String.fromCharCode.bind(String),A=typeof Uint8Array.from=="function"?Uint8Array.from.bind(Uint8Array):t=>new Uint8Array(Array.prototype.slice.call(t,0)),F=t=>t.replace(/=/g,"").replace(/[+\/]/g,e=>e=="+"?"-":"_"),g=t=>t.replace(/[^A-Za-z0-9\+\/]/g,""),B=t=>{let e,o,n,f,a="";const l=t.length%3;for(let i=0;i<t.length;){if((o=t.charCodeAt(i++))>255||(n=t.charCodeAt(i++))>255||(f=t.charCodeAt(i++))>255)throw new TypeError("invalid character found");e=o<<16|n<<8|f,a+=x[e>>18&63]+x[e>>12&63]+x[e>>6&63]+x[e&63]}return l?a.slice(0,l-3)+"===".substring(l):a},p=typeof btoa=="function"?t=>btoa(t):d?t=>s.dist.Buffer.from(t,"binary").toString("base64"):B,D=d?t=>s.dist.Buffer.from(t).toString("base64"):t=>{let o=[];for(let n=0,f=t.length;n<f;n+=4096)o.push(r.apply(null,t.subarray(n,n+4096)));return p(o.join(""))},U=t=>{if(t.length<2){var e=t.charCodeAt(0);return e<128?t:e<2048?r(192|e>>>6)+r(128|e&63):r(224|e>>>12&15)+r(128|e>>>6&63)+r(128|e&63)}else{var e=65536+(t.charCodeAt(0)-55296)*1024+(t.charCodeAt(1)-56320);return r(240|e>>>18&7)+r(128|e>>>12&63)+r(128|e>>>6&63)+r(128|e&63)}},w=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,E=t=>t.replace(w,U),b=d?t=>s.dist.Buffer.from(t,"utf8").toString("base64"):h?t=>D(h.encode(t)):t=>p(E(t)),y=(t,e=!1)=>e?F(b(t)):b(t),S=t=>y(t,!0),T=/[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g,v=t=>{switch(t.length){case 4:var e=(7&t.charCodeAt(0))<<18|(63&t.charCodeAt(1))<<12|(63&t.charCodeAt(2))<<6|63&t.charCodeAt(3),o=e-65536;return r((o>>>10)+55296)+r((o&1023)+56320);case 3:return r((15&t.charCodeAt(0))<<12|(63&t.charCodeAt(1))<<6|63&t.charCodeAt(2));default:return r((31&t.charCodeAt(0))<<6|63&t.charCodeAt(1))}},z=t=>t.replace(T,v),Z=t=>{if(t=t.replace(/\s+/g,""),!_.test(t))throw new TypeError("malformed base64.");t+="==".slice(2-(t.length&3));let e,o="",n,f;for(let a=0;a<t.length;)e=u[t.charAt(a++)]<<18|u[t.charAt(a++)]<<12|(n=u[t.charAt(a++)])<<6|(f=u[t.charAt(a++)]),o+=n===64?r(e>>16&255):f===64?r(e>>16&255,e>>8&255):r(e>>16&255,e>>8&255,e&255);return o},C=typeof atob=="function"?t=>atob(g(t)):d?t=>s.dist.Buffer.from(t,"base64").toString("binary"):Z,I=d?t=>A(s.dist.Buffer.from(t,"base64")):t=>A(C(t).split("").map(e=>e.charCodeAt(0))),R=d?t=>s.dist.Buffer.from(t,"base64").toString("utf8"):c?t=>c.decode(I(t)):t=>z(C(t)),P=t=>g(t.replace(/[-_]/g,e=>e=="-"?"+":"/")),j=t=>R(P(t));exports.decode=j;exports.encode=y;exports.encodeURI=S;
@@ -1,4 +1,4 @@
1
- import { b$ as S, c0 as H, c1 as g, c2 as I, c3 as E, c4 as L, c5 as D, c6 as U, c7 as w, c8 as z, c9 as y } from "./address-CBux52Na.mjs";
1
+ import { cp as S, cq as H, cr as g, cs as I, ct as E, cu as L, cv as D, cw as U, cx as w, cy as z, cz as y } from "./address-DqsMcbcT.mjs";
2
2
  const C = /* @__PURE__ */ new Uint8Array([
3
3
  0,
4
4
  1,
@@ -1 +1 @@
1
- "use strict";const e=require("./address-RcMobNYE.js"),x=new Uint8Array([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,14,10,4,8,9,15,13,6,1,12,0,2,11,7,5,3,11,8,12,0,5,2,15,13,10,14,3,6,7,1,9,4,7,9,3,1,13,12,11,14,2,6,5,10,4,0,15,8,9,0,5,7,2,4,10,15,14,1,11,12,6,8,3,13,2,12,6,10,0,11,8,3,4,13,7,5,15,14,1,9,12,5,1,15,14,13,4,10,0,7,6,3,9,2,8,11,13,11,7,14,12,1,3,9,5,0,15,4,8,6,2,10,6,15,14,9,11,3,0,8,12,2,13,7,1,4,10,5,10,2,8,4,7,6,1,5,15,11,9,14,3,12,13,0,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,14,10,4,8,9,15,13,6,1,12,0,2,11,7,5,3,11,8,12,0,5,2,15,13,10,14,3,6,7,1,9,4,7,9,3,1,13,12,11,14,2,6,5,10,4,0,15,8,9,0,5,7,2,4,10,15,14,1,11,12,6,8,3,13,2,12,6,10,0,11,8,3,4,13,7,5,15,14,1,9]);class S extends e.Hash$1{constructor(h,i,s={},u,v,l){if(super(),this.blockLen=h,this.outputLen=i,this.length=0,this.pos=0,this.finished=!1,this.destroyed=!1,e.anumber(h),e.anumber(i),e.anumber(u),i<0||i>u)throw new Error("outputLen bigger than keyLen");if(s.key!==void 0&&(s.key.length<1||s.key.length>u))throw new Error("key length must be undefined or 1.."+u);if(s.salt!==void 0&&s.salt.length!==v)throw new Error("salt must be undefined or "+v);if(s.personalization!==void 0&&s.personalization.length!==l)throw new Error("personalization must be undefined or "+l);this.buffer=new Uint8Array(h),this.buffer32=e.u32$2(this.buffer)}update(h){e.aexists(this);const{blockLen:i,buffer:s,buffer32:u}=this;h=e.toBytes$1(h);const v=h.length,l=h.byteOffset,n=h.buffer;for(let r=0;r<v;){this.pos===i&&(e.isLE||e.byteSwap32(u),this.compress(u,0,!1),e.isLE||e.byteSwap32(u),this.pos=0);const o=Math.min(i-this.pos,v-r),f=l+r;if(o===i&&!(f%4)&&r+o<v){const a=new Uint32Array(n,f,Math.floor((v-r)/4));e.isLE||e.byteSwap32(a);for(let y=0;r+i<v;y+=u.length,r+=i)this.length+=i,this.compress(a,y,!1);e.isLE||e.byteSwap32(a);continue}s.set(h.subarray(r,r+o),this.pos),this.pos+=o,this.length+=o,r+=o}return this}digestInto(h){e.aexists(this),e.aoutput(h,this);const{pos:i,buffer32:s}=this;this.finished=!0,this.buffer.subarray(i).fill(0),e.isLE||e.byteSwap32(s),this.compress(s,0,!0),e.isLE||e.byteSwap32(s);const u=e.u32$2(h);this.get().forEach((v,l)=>u[l]=e.byteSwapIfBE(v))}digest(){const{buffer:h,outputLen:i}=this;this.digestInto(h);const s=h.slice(0,i);return this.destroy(),s}_cloneInto(h){const{buffer:i,length:s,finished:u,destroyed:v,outputLen:l,pos:n}=this;return h||(h=new this.constructor({dkLen:l})),h.set(...this.get()),h.length=s,h.finished=u,h.destroyed=v,h.outputLen=l,h.buffer.set(i),h.pos=n,h}}const c=new Uint32Array([4089235720,1779033703,2227873595,3144134277,4271175723,1013904242,1595750129,2773480762,2917565137,1359893119,725511199,2600822924,4215389547,528734635,327033209,1541459225]),t=new Uint32Array(32);function $(B,h,i,s,u,v){const l=u[v],n=u[v+1];let r=t[2*B],o=t[2*B+1],f=t[2*h],a=t[2*h+1],y=t[2*i],w=t[2*i+1],b=t[2*s],d=t[2*s+1],p=e.u64$1.add3L(r,f,l);o=e.u64$1.add3H(p,o,a,n),r=p|0,{Dh:d,Dl:b}={Dh:d^o,Dl:b^r},{Dh:d,Dl:b}={Dh:e.u64$1.rotr32H(d,b),Dl:e.u64$1.rotr32L(d,b)},{h:w,l:y}=e.u64$1.add(w,y,d,b),{Bh:a,Bl:f}={Bh:a^w,Bl:f^y},{Bh:a,Bl:f}={Bh:e.u64$1.rotrSH(a,f,24),Bl:e.u64$1.rotrSL(a,f,24)},t[2*B]=r,t[2*B+1]=o,t[2*h]=f,t[2*h+1]=a,t[2*i]=y,t[2*i+1]=w,t[2*s]=b,t[2*s+1]=d}function E(B,h,i,s,u,v){const l=u[v],n=u[v+1];let r=t[2*B],o=t[2*B+1],f=t[2*h],a=t[2*h+1],y=t[2*i],w=t[2*i+1],b=t[2*s],d=t[2*s+1],p=e.u64$1.add3L(r,f,l);o=e.u64$1.add3H(p,o,a,n),r=p|0,{Dh:d,Dl:b}={Dh:d^o,Dl:b^r},{Dh:d,Dl:b}={Dh:e.u64$1.rotrSH(d,b,16),Dl:e.u64$1.rotrSL(d,b,16)},{h:w,l:y}=e.u64$1.add(w,y,d,b),{Bh:a,Bl:f}={Bh:a^w,Bl:f^y},{Bh:a,Bl:f}={Bh:e.u64$1.rotrBH(a,f,63),Bl:e.u64$1.rotrBL(a,f,63)},t[2*B]=r,t[2*B+1]=o,t[2*h]=f,t[2*h+1]=a,t[2*i]=y,t[2*i+1]=w,t[2*s]=b,t[2*s+1]=d}class L extends S{constructor(h={}){super(128,h.dkLen===void 0?64:h.dkLen,h,64,16,16),this.v0l=c[0]|0,this.v0h=c[1]|0,this.v1l=c[2]|0,this.v1h=c[3]|0,this.v2l=c[4]|0,this.v2h=c[5]|0,this.v3l=c[6]|0,this.v3h=c[7]|0,this.v4l=c[8]|0,this.v4h=c[9]|0,this.v5l=c[10]|0,this.v5h=c[11]|0,this.v6l=c[12]|0,this.v6h=c[13]|0,this.v7l=c[14]|0,this.v7h=c[15]|0;const i=h.key?h.key.length:0;if(this.v0l^=this.outputLen|i<<8|65536|1<<24,h.salt){const s=e.u32$2(e.toBytes$1(h.salt));this.v4l^=e.byteSwapIfBE(s[0]),this.v4h^=e.byteSwapIfBE(s[1]),this.v5l^=e.byteSwapIfBE(s[2]),this.v5h^=e.byteSwapIfBE(s[3])}if(h.personalization){const s=e.u32$2(e.toBytes$1(h.personalization));this.v6l^=e.byteSwapIfBE(s[0]),this.v6h^=e.byteSwapIfBE(s[1]),this.v7l^=e.byteSwapIfBE(s[2]),this.v7h^=e.byteSwapIfBE(s[3])}if(h.key){const s=new Uint8Array(this.blockLen);s.set(e.toBytes$1(h.key)),this.update(s)}}get(){let{v0l:h,v0h:i,v1l:s,v1h:u,v2l:v,v2h:l,v3l:n,v3h:r,v4l:o,v4h:f,v5l:a,v5h:y,v6l:w,v6h:b,v7l:d,v7h:p}=this;return[h,i,s,u,v,l,n,r,o,f,a,y,w,b,d,p]}set(h,i,s,u,v,l,n,r,o,f,a,y,w,b,d,p){this.v0l=h|0,this.v0h=i|0,this.v1l=s|0,this.v1h=u|0,this.v2l=v|0,this.v2h=l|0,this.v3l=n|0,this.v3h=r|0,this.v4l=o|0,this.v4h=f|0,this.v5l=a|0,this.v5h=y|0,this.v6l=w|0,this.v6h=b|0,this.v7l=d|0,this.v7h=p|0}compress(h,i,s){this.get().forEach((r,o)=>t[o]=r),t.set(c,16);let{h:u,l:v}=e.u64$1.fromBig(BigInt(this.length));t[24]=c[8]^v,t[25]=c[9]^u,s&&(t[28]=~t[28],t[29]=~t[29]);let l=0;const n=x;for(let r=0;r<12;r++)$(0,4,8,12,h,i+2*n[l++]),E(0,4,8,12,h,i+2*n[l++]),$(1,5,9,13,h,i+2*n[l++]),E(1,5,9,13,h,i+2*n[l++]),$(2,6,10,14,h,i+2*n[l++]),E(2,6,10,14,h,i+2*n[l++]),$(3,7,11,15,h,i+2*n[l++]),E(3,7,11,15,h,i+2*n[l++]),$(0,5,10,15,h,i+2*n[l++]),E(0,5,10,15,h,i+2*n[l++]),$(1,6,11,12,h,i+2*n[l++]),E(1,6,11,12,h,i+2*n[l++]),$(2,7,8,13,h,i+2*n[l++]),E(2,7,8,13,h,i+2*n[l++]),$(3,4,9,14,h,i+2*n[l++]),E(3,4,9,14,h,i+2*n[l++]);this.v0l^=t[0]^t[16],this.v0h^=t[1]^t[17],this.v1l^=t[2]^t[18],this.v1h^=t[3]^t[19],this.v2l^=t[4]^t[20],this.v2h^=t[5]^t[21],this.v3l^=t[6]^t[22],this.v3h^=t[7]^t[23],this.v4l^=t[8]^t[24],this.v4h^=t[9]^t[25],this.v5l^=t[10]^t[26],this.v5h^=t[11]^t[27],this.v6l^=t[12]^t[28],this.v6h^=t[13]^t[29],this.v7l^=t[14]^t[30],this.v7h^=t[15]^t[31],t.fill(0)}destroy(){this.destroyed=!0,this.buffer32.fill(0),this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)}}const I=e.wrapConstructorWithOpts(B=>new L(B));exports.blake2b=I;
1
+ "use strict";const e=require("./address-DnSRsubO.js"),x=new Uint8Array([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,14,10,4,8,9,15,13,6,1,12,0,2,11,7,5,3,11,8,12,0,5,2,15,13,10,14,3,6,7,1,9,4,7,9,3,1,13,12,11,14,2,6,5,10,4,0,15,8,9,0,5,7,2,4,10,15,14,1,11,12,6,8,3,13,2,12,6,10,0,11,8,3,4,13,7,5,15,14,1,9,12,5,1,15,14,13,4,10,0,7,6,3,9,2,8,11,13,11,7,14,12,1,3,9,5,0,15,4,8,6,2,10,6,15,14,9,11,3,0,8,12,2,13,7,1,4,10,5,10,2,8,4,7,6,1,5,15,11,9,14,3,12,13,0,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,14,10,4,8,9,15,13,6,1,12,0,2,11,7,5,3,11,8,12,0,5,2,15,13,10,14,3,6,7,1,9,4,7,9,3,1,13,12,11,14,2,6,5,10,4,0,15,8,9,0,5,7,2,4,10,15,14,1,11,12,6,8,3,13,2,12,6,10,0,11,8,3,4,13,7,5,15,14,1,9]);class S extends e.Hash$1{constructor(h,i,s={},u,v,l){if(super(),this.blockLen=h,this.outputLen=i,this.length=0,this.pos=0,this.finished=!1,this.destroyed=!1,e.anumber(h),e.anumber(i),e.anumber(u),i<0||i>u)throw new Error("outputLen bigger than keyLen");if(s.key!==void 0&&(s.key.length<1||s.key.length>u))throw new Error("key length must be undefined or 1.."+u);if(s.salt!==void 0&&s.salt.length!==v)throw new Error("salt must be undefined or "+v);if(s.personalization!==void 0&&s.personalization.length!==l)throw new Error("personalization must be undefined or "+l);this.buffer=new Uint8Array(h),this.buffer32=e.u32$2(this.buffer)}update(h){e.aexists(this);const{blockLen:i,buffer:s,buffer32:u}=this;h=e.toBytes$1(h);const v=h.length,l=h.byteOffset,n=h.buffer;for(let r=0;r<v;){this.pos===i&&(e.isLE||e.byteSwap32(u),this.compress(u,0,!1),e.isLE||e.byteSwap32(u),this.pos=0);const o=Math.min(i-this.pos,v-r),f=l+r;if(o===i&&!(f%4)&&r+o<v){const a=new Uint32Array(n,f,Math.floor((v-r)/4));e.isLE||e.byteSwap32(a);for(let y=0;r+i<v;y+=u.length,r+=i)this.length+=i,this.compress(a,y,!1);e.isLE||e.byteSwap32(a);continue}s.set(h.subarray(r,r+o),this.pos),this.pos+=o,this.length+=o,r+=o}return this}digestInto(h){e.aexists(this),e.aoutput(h,this);const{pos:i,buffer32:s}=this;this.finished=!0,this.buffer.subarray(i).fill(0),e.isLE||e.byteSwap32(s),this.compress(s,0,!0),e.isLE||e.byteSwap32(s);const u=e.u32$2(h);this.get().forEach((v,l)=>u[l]=e.byteSwapIfBE(v))}digest(){const{buffer:h,outputLen:i}=this;this.digestInto(h);const s=h.slice(0,i);return this.destroy(),s}_cloneInto(h){const{buffer:i,length:s,finished:u,destroyed:v,outputLen:l,pos:n}=this;return h||(h=new this.constructor({dkLen:l})),h.set(...this.get()),h.length=s,h.finished=u,h.destroyed=v,h.outputLen=l,h.buffer.set(i),h.pos=n,h}}const c=new Uint32Array([4089235720,1779033703,2227873595,3144134277,4271175723,1013904242,1595750129,2773480762,2917565137,1359893119,725511199,2600822924,4215389547,528734635,327033209,1541459225]),t=new Uint32Array(32);function $(B,h,i,s,u,v){const l=u[v],n=u[v+1];let r=t[2*B],o=t[2*B+1],f=t[2*h],a=t[2*h+1],y=t[2*i],w=t[2*i+1],b=t[2*s],d=t[2*s+1],p=e.u64$1.add3L(r,f,l);o=e.u64$1.add3H(p,o,a,n),r=p|0,{Dh:d,Dl:b}={Dh:d^o,Dl:b^r},{Dh:d,Dl:b}={Dh:e.u64$1.rotr32H(d,b),Dl:e.u64$1.rotr32L(d,b)},{h:w,l:y}=e.u64$1.add(w,y,d,b),{Bh:a,Bl:f}={Bh:a^w,Bl:f^y},{Bh:a,Bl:f}={Bh:e.u64$1.rotrSH(a,f,24),Bl:e.u64$1.rotrSL(a,f,24)},t[2*B]=r,t[2*B+1]=o,t[2*h]=f,t[2*h+1]=a,t[2*i]=y,t[2*i+1]=w,t[2*s]=b,t[2*s+1]=d}function E(B,h,i,s,u,v){const l=u[v],n=u[v+1];let r=t[2*B],o=t[2*B+1],f=t[2*h],a=t[2*h+1],y=t[2*i],w=t[2*i+1],b=t[2*s],d=t[2*s+1],p=e.u64$1.add3L(r,f,l);o=e.u64$1.add3H(p,o,a,n),r=p|0,{Dh:d,Dl:b}={Dh:d^o,Dl:b^r},{Dh:d,Dl:b}={Dh:e.u64$1.rotrSH(d,b,16),Dl:e.u64$1.rotrSL(d,b,16)},{h:w,l:y}=e.u64$1.add(w,y,d,b),{Bh:a,Bl:f}={Bh:a^w,Bl:f^y},{Bh:a,Bl:f}={Bh:e.u64$1.rotrBH(a,f,63),Bl:e.u64$1.rotrBL(a,f,63)},t[2*B]=r,t[2*B+1]=o,t[2*h]=f,t[2*h+1]=a,t[2*i]=y,t[2*i+1]=w,t[2*s]=b,t[2*s+1]=d}class L extends S{constructor(h={}){super(128,h.dkLen===void 0?64:h.dkLen,h,64,16,16),this.v0l=c[0]|0,this.v0h=c[1]|0,this.v1l=c[2]|0,this.v1h=c[3]|0,this.v2l=c[4]|0,this.v2h=c[5]|0,this.v3l=c[6]|0,this.v3h=c[7]|0,this.v4l=c[8]|0,this.v4h=c[9]|0,this.v5l=c[10]|0,this.v5h=c[11]|0,this.v6l=c[12]|0,this.v6h=c[13]|0,this.v7l=c[14]|0,this.v7h=c[15]|0;const i=h.key?h.key.length:0;if(this.v0l^=this.outputLen|i<<8|65536|1<<24,h.salt){const s=e.u32$2(e.toBytes$1(h.salt));this.v4l^=e.byteSwapIfBE(s[0]),this.v4h^=e.byteSwapIfBE(s[1]),this.v5l^=e.byteSwapIfBE(s[2]),this.v5h^=e.byteSwapIfBE(s[3])}if(h.personalization){const s=e.u32$2(e.toBytes$1(h.personalization));this.v6l^=e.byteSwapIfBE(s[0]),this.v6h^=e.byteSwapIfBE(s[1]),this.v7l^=e.byteSwapIfBE(s[2]),this.v7h^=e.byteSwapIfBE(s[3])}if(h.key){const s=new Uint8Array(this.blockLen);s.set(e.toBytes$1(h.key)),this.update(s)}}get(){let{v0l:h,v0h:i,v1l:s,v1h:u,v2l:v,v2h:l,v3l:n,v3h:r,v4l:o,v4h:f,v5l:a,v5h:y,v6l:w,v6h:b,v7l:d,v7h:p}=this;return[h,i,s,u,v,l,n,r,o,f,a,y,w,b,d,p]}set(h,i,s,u,v,l,n,r,o,f,a,y,w,b,d,p){this.v0l=h|0,this.v0h=i|0,this.v1l=s|0,this.v1h=u|0,this.v2l=v|0,this.v2h=l|0,this.v3l=n|0,this.v3h=r|0,this.v4l=o|0,this.v4h=f|0,this.v5l=a|0,this.v5h=y|0,this.v6l=w|0,this.v6h=b|0,this.v7l=d|0,this.v7h=p|0}compress(h,i,s){this.get().forEach((r,o)=>t[o]=r),t.set(c,16);let{h:u,l:v}=e.u64$1.fromBig(BigInt(this.length));t[24]=c[8]^v,t[25]=c[9]^u,s&&(t[28]=~t[28],t[29]=~t[29]);let l=0;const n=x;for(let r=0;r<12;r++)$(0,4,8,12,h,i+2*n[l++]),E(0,4,8,12,h,i+2*n[l++]),$(1,5,9,13,h,i+2*n[l++]),E(1,5,9,13,h,i+2*n[l++]),$(2,6,10,14,h,i+2*n[l++]),E(2,6,10,14,h,i+2*n[l++]),$(3,7,11,15,h,i+2*n[l++]),E(3,7,11,15,h,i+2*n[l++]),$(0,5,10,15,h,i+2*n[l++]),E(0,5,10,15,h,i+2*n[l++]),$(1,6,11,12,h,i+2*n[l++]),E(1,6,11,12,h,i+2*n[l++]),$(2,7,8,13,h,i+2*n[l++]),E(2,7,8,13,h,i+2*n[l++]),$(3,4,9,14,h,i+2*n[l++]),E(3,4,9,14,h,i+2*n[l++]);this.v0l^=t[0]^t[16],this.v0h^=t[1]^t[17],this.v1l^=t[2]^t[18],this.v1h^=t[3]^t[19],this.v2l^=t[4]^t[20],this.v2h^=t[5]^t[21],this.v3l^=t[6]^t[22],this.v3h^=t[7]^t[23],this.v4l^=t[8]^t[24],this.v4h^=t[9]^t[25],this.v5l^=t[10]^t[26],this.v5h^=t[11]^t[27],this.v6l^=t[12]^t[28],this.v6h^=t[13]^t[29],this.v7l^=t[14]^t[30],this.v7h^=t[15]^t[31],t.fill(0)}destroy(){this.destroyed=!0,this.buffer32.fill(0),this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)}}const I=e.wrapConstructorWithOpts(B=>new L(B));exports.blake2b=I;
@@ -1,2 +1,2 @@
1
- "use strict";const w=require("./address-RcMobNYE.js");var D={exports:{}};(function(j,d){var v=typeof globalThis<"u"&&globalThis||typeof self<"u"&&self||typeof w.commonjsGlobal<"u"&&w.commonjsGlobal,E=function(){function m(){this.fetch=!1,this.DOMException=v.DOMException}return m.prototype=v,new m}();(function(m){(function(h){var a=typeof m<"u"&&m||typeof self<"u"&&self||typeof w.commonjsGlobal<"u"&&w.commonjsGlobal||{},u={searchParams:"URLSearchParams"in a,iterable:"Symbol"in a&&"iterator"in Symbol,blob:"FileReader"in a&&"Blob"in a&&function(){try{return new Blob,!0}catch{return!1}}(),formData:"FormData"in a,arrayBuffer:"ArrayBuffer"in a};function H(e){return e&&DataView.prototype.isPrototypeOf(e)}if(u.arrayBuffer)var F=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],S=ArrayBuffer.isView||function(e){return e&&F.indexOf(Object.prototype.toString.call(e))>-1};function b(e){if(typeof e!="string"&&(e=String(e)),/[^a-z0-9\-#$%&'*+.^_`|~!]/i.test(e)||e==="")throw new TypeError('Invalid character in header field name: "'+e+'"');return e.toLowerCase()}function A(e){return typeof e!="string"&&(e=String(e)),e}function g(e){var t={next:function(){var r=e.shift();return{done:r===void 0,value:r}}};return u.iterable&&(t[Symbol.iterator]=function(){return t}),t}function i(e){this.map={},e instanceof i?e.forEach(function(t,r){this.append(r,t)},this):Array.isArray(e)?e.forEach(function(t){if(t.length!=2)throw new TypeError("Headers constructor: expected name/value pair to be length 2, found"+t.length);this.append(t[0],t[1])},this):e&&Object.getOwnPropertyNames(e).forEach(function(t){this.append(t,e[t])},this)}i.prototype.append=function(e,t){e=b(e),t=A(t);var r=this.map[e];this.map[e]=r?r+", "+t:t},i.prototype.delete=function(e){delete this.map[b(e)]},i.prototype.get=function(e){return e=b(e),this.has(e)?this.map[e]:null},i.prototype.has=function(e){return this.map.hasOwnProperty(b(e))},i.prototype.set=function(e,t){this.map[b(e)]=A(t)},i.prototype.forEach=function(e,t){for(var r in this.map)this.map.hasOwnProperty(r)&&e.call(t,this.map[r],r,this)},i.prototype.keys=function(){var e=[];return this.forEach(function(t,r){e.push(r)}),g(e)},i.prototype.values=function(){var e=[];return this.forEach(function(t){e.push(t)}),g(e)},i.prototype.entries=function(){var e=[];return this.forEach(function(t,r){e.push([r,t])}),g(e)},u.iterable&&(i.prototype[Symbol.iterator]=i.prototype.entries);function T(e){if(!e._noBody){if(e.bodyUsed)return Promise.reject(new TypeError("Already read"));e.bodyUsed=!0}}function P(e){return new Promise(function(t,r){e.onload=function(){t(e.result)},e.onerror=function(){r(e.error)}})}function C(e){var t=new FileReader,r=P(t);return t.readAsArrayBuffer(e),r}function I(e){var t=new FileReader,r=P(t),n=/charset=([A-Za-z0-9_-]+)/.exec(e.type),s=n?n[1]:"utf-8";return t.readAsText(e,s),r}function M(e){for(var t=new Uint8Array(e),r=new Array(t.length),n=0;n<t.length;n++)r[n]=String.fromCharCode(t[n]);return r.join("")}function x(e){if(e.slice)return e.slice(0);var t=new Uint8Array(e.byteLength);return t.set(new Uint8Array(e)),t.buffer}function R(){return this.bodyUsed=!1,this._initBody=function(e){this.bodyUsed=this.bodyUsed,this._bodyInit=e,e?typeof e=="string"?this._bodyText=e:u.blob&&Blob.prototype.isPrototypeOf(e)?this._bodyBlob=e:u.formData&&FormData.prototype.isPrototypeOf(e)?this._bodyFormData=e:u.searchParams&&URLSearchParams.prototype.isPrototypeOf(e)?this._bodyText=e.toString():u.arrayBuffer&&u.blob&&H(e)?(this._bodyArrayBuffer=x(e.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):u.arrayBuffer&&(ArrayBuffer.prototype.isPrototypeOf(e)||S(e))?this._bodyArrayBuffer=x(e):this._bodyText=e=Object.prototype.toString.call(e):(this._noBody=!0,this._bodyText=""),this.headers.get("content-type")||(typeof e=="string"?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):u.searchParams&&URLSearchParams.prototype.isPrototypeOf(e)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},u.blob&&(this.blob=function(){var e=T(this);if(e)return e;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))}),this.arrayBuffer=function(){if(this._bodyArrayBuffer){var e=T(this);return e||(ArrayBuffer.isView(this._bodyArrayBuffer)?Promise.resolve(this._bodyArrayBuffer.buffer.slice(this._bodyArrayBuffer.byteOffset,this._bodyArrayBuffer.byteOffset+this._bodyArrayBuffer.byteLength)):Promise.resolve(this._bodyArrayBuffer))}else{if(u.blob)return this.blob().then(C);throw new Error("could not read as ArrayBuffer")}},this.text=function(){var e=T(this);if(e)return e;if(this._bodyBlob)return I(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(M(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},u.formData&&(this.formData=function(){return this.text().then(G)}),this.json=function(){return this.text().then(JSON.parse)},this}var q=["CONNECT","DELETE","GET","HEAD","OPTIONS","PATCH","POST","PUT","TRACE"];function L(e){var t=e.toUpperCase();return q.indexOf(t)>-1?t:e}function l(e,t){if(!(this instanceof l))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');t=t||{};var r=t.body;if(e instanceof l){if(e.bodyUsed)throw new TypeError("Already read");this.url=e.url,this.credentials=e.credentials,t.headers||(this.headers=new i(e.headers)),this.method=e.method,this.mode=e.mode,this.signal=e.signal,!r&&e._bodyInit!=null&&(r=e._bodyInit,e.bodyUsed=!0)}else this.url=String(e);if(this.credentials=t.credentials||this.credentials||"same-origin",(t.headers||!this.headers)&&(this.headers=new i(t.headers)),this.method=L(t.method||this.method||"GET"),this.mode=t.mode||this.mode||null,this.signal=t.signal||this.signal||function(){if("AbortController"in a){var o=new AbortController;return o.signal}}(),this.referrer=null,(this.method==="GET"||this.method==="HEAD")&&r)throw new TypeError("Body not allowed for GET or HEAD requests");if(this._initBody(r),(this.method==="GET"||this.method==="HEAD")&&(t.cache==="no-store"||t.cache==="no-cache")){var n=/([?&])_=[^&]*/;if(n.test(this.url))this.url=this.url.replace(n,"$1_="+new Date().getTime());else{var s=/\?/;this.url+=(s.test(this.url)?"&":"?")+"_="+new Date().getTime()}}}l.prototype.clone=function(){return new l(this,{body:this._bodyInit})};function G(e){var t=new FormData;return e.trim().split("&").forEach(function(r){if(r){var n=r.split("="),s=n.shift().replace(/\+/g," "),o=n.join("=").replace(/\+/g," ");t.append(decodeURIComponent(s),decodeURIComponent(o))}}),t}function N(e){var t=new i,r=e.replace(/\r?\n[\t ]+/g," ");return r.split("\r").map(function(n){return n.indexOf(`
1
+ "use strict";const w=require("./address-DnSRsubO.js");var D={exports:{}};(function(j,d){var v=typeof globalThis<"u"&&globalThis||typeof self<"u"&&self||typeof w.commonjsGlobal<"u"&&w.commonjsGlobal,E=function(){function m(){this.fetch=!1,this.DOMException=v.DOMException}return m.prototype=v,new m}();(function(m){(function(h){var a=typeof m<"u"&&m||typeof self<"u"&&self||typeof w.commonjsGlobal<"u"&&w.commonjsGlobal||{},u={searchParams:"URLSearchParams"in a,iterable:"Symbol"in a&&"iterator"in Symbol,blob:"FileReader"in a&&"Blob"in a&&function(){try{return new Blob,!0}catch{return!1}}(),formData:"FormData"in a,arrayBuffer:"ArrayBuffer"in a};function H(e){return e&&DataView.prototype.isPrototypeOf(e)}if(u.arrayBuffer)var F=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],S=ArrayBuffer.isView||function(e){return e&&F.indexOf(Object.prototype.toString.call(e))>-1};function b(e){if(typeof e!="string"&&(e=String(e)),/[^a-z0-9\-#$%&'*+.^_`|~!]/i.test(e)||e==="")throw new TypeError('Invalid character in header field name: "'+e+'"');return e.toLowerCase()}function A(e){return typeof e!="string"&&(e=String(e)),e}function g(e){var t={next:function(){var r=e.shift();return{done:r===void 0,value:r}}};return u.iterable&&(t[Symbol.iterator]=function(){return t}),t}function i(e){this.map={},e instanceof i?e.forEach(function(t,r){this.append(r,t)},this):Array.isArray(e)?e.forEach(function(t){if(t.length!=2)throw new TypeError("Headers constructor: expected name/value pair to be length 2, found"+t.length);this.append(t[0],t[1])},this):e&&Object.getOwnPropertyNames(e).forEach(function(t){this.append(t,e[t])},this)}i.prototype.append=function(e,t){e=b(e),t=A(t);var r=this.map[e];this.map[e]=r?r+", "+t:t},i.prototype.delete=function(e){delete this.map[b(e)]},i.prototype.get=function(e){return e=b(e),this.has(e)?this.map[e]:null},i.prototype.has=function(e){return this.map.hasOwnProperty(b(e))},i.prototype.set=function(e,t){this.map[b(e)]=A(t)},i.prototype.forEach=function(e,t){for(var r in this.map)this.map.hasOwnProperty(r)&&e.call(t,this.map[r],r,this)},i.prototype.keys=function(){var e=[];return this.forEach(function(t,r){e.push(r)}),g(e)},i.prototype.values=function(){var e=[];return this.forEach(function(t){e.push(t)}),g(e)},i.prototype.entries=function(){var e=[];return this.forEach(function(t,r){e.push([r,t])}),g(e)},u.iterable&&(i.prototype[Symbol.iterator]=i.prototype.entries);function T(e){if(!e._noBody){if(e.bodyUsed)return Promise.reject(new TypeError("Already read"));e.bodyUsed=!0}}function P(e){return new Promise(function(t,r){e.onload=function(){t(e.result)},e.onerror=function(){r(e.error)}})}function C(e){var t=new FileReader,r=P(t);return t.readAsArrayBuffer(e),r}function I(e){var t=new FileReader,r=P(t),n=/charset=([A-Za-z0-9_-]+)/.exec(e.type),s=n?n[1]:"utf-8";return t.readAsText(e,s),r}function M(e){for(var t=new Uint8Array(e),r=new Array(t.length),n=0;n<t.length;n++)r[n]=String.fromCharCode(t[n]);return r.join("")}function x(e){if(e.slice)return e.slice(0);var t=new Uint8Array(e.byteLength);return t.set(new Uint8Array(e)),t.buffer}function R(){return this.bodyUsed=!1,this._initBody=function(e){this.bodyUsed=this.bodyUsed,this._bodyInit=e,e?typeof e=="string"?this._bodyText=e:u.blob&&Blob.prototype.isPrototypeOf(e)?this._bodyBlob=e:u.formData&&FormData.prototype.isPrototypeOf(e)?this._bodyFormData=e:u.searchParams&&URLSearchParams.prototype.isPrototypeOf(e)?this._bodyText=e.toString():u.arrayBuffer&&u.blob&&H(e)?(this._bodyArrayBuffer=x(e.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):u.arrayBuffer&&(ArrayBuffer.prototype.isPrototypeOf(e)||S(e))?this._bodyArrayBuffer=x(e):this._bodyText=e=Object.prototype.toString.call(e):(this._noBody=!0,this._bodyText=""),this.headers.get("content-type")||(typeof e=="string"?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):u.searchParams&&URLSearchParams.prototype.isPrototypeOf(e)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},u.blob&&(this.blob=function(){var e=T(this);if(e)return e;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))}),this.arrayBuffer=function(){if(this._bodyArrayBuffer){var e=T(this);return e||(ArrayBuffer.isView(this._bodyArrayBuffer)?Promise.resolve(this._bodyArrayBuffer.buffer.slice(this._bodyArrayBuffer.byteOffset,this._bodyArrayBuffer.byteOffset+this._bodyArrayBuffer.byteLength)):Promise.resolve(this._bodyArrayBuffer))}else{if(u.blob)return this.blob().then(C);throw new Error("could not read as ArrayBuffer")}},this.text=function(){var e=T(this);if(e)return e;if(this._bodyBlob)return I(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(M(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},u.formData&&(this.formData=function(){return this.text().then(G)}),this.json=function(){return this.text().then(JSON.parse)},this}var q=["CONNECT","DELETE","GET","HEAD","OPTIONS","PATCH","POST","PUT","TRACE"];function L(e){var t=e.toUpperCase();return q.indexOf(t)>-1?t:e}function l(e,t){if(!(this instanceof l))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');t=t||{};var r=t.body;if(e instanceof l){if(e.bodyUsed)throw new TypeError("Already read");this.url=e.url,this.credentials=e.credentials,t.headers||(this.headers=new i(e.headers)),this.method=e.method,this.mode=e.mode,this.signal=e.signal,!r&&e._bodyInit!=null&&(r=e._bodyInit,e.bodyUsed=!0)}else this.url=String(e);if(this.credentials=t.credentials||this.credentials||"same-origin",(t.headers||!this.headers)&&(this.headers=new i(t.headers)),this.method=L(t.method||this.method||"GET"),this.mode=t.mode||this.mode||null,this.signal=t.signal||this.signal||function(){if("AbortController"in a){var o=new AbortController;return o.signal}}(),this.referrer=null,(this.method==="GET"||this.method==="HEAD")&&r)throw new TypeError("Body not allowed for GET or HEAD requests");if(this._initBody(r),(this.method==="GET"||this.method==="HEAD")&&(t.cache==="no-store"||t.cache==="no-cache")){var n=/([?&])_=[^&]*/;if(n.test(this.url))this.url=this.url.replace(n,"$1_="+new Date().getTime());else{var s=/\?/;this.url+=(s.test(this.url)?"&":"?")+"_="+new Date().getTime()}}}l.prototype.clone=function(){return new l(this,{body:this._bodyInit})};function G(e){var t=new FormData;return e.trim().split("&").forEach(function(r){if(r){var n=r.split("="),s=n.shift().replace(/\+/g," "),o=n.join("=").replace(/\+/g," ");t.append(decodeURIComponent(s),decodeURIComponent(o))}}),t}function N(e){var t=new i,r=e.replace(/\r?\n[\t ]+/g," ");return r.split("\r").map(function(n){return n.indexOf(`
2
2
  `)===0?n.substr(1,n.length):n}).forEach(function(n){var s=n.split(":"),o=s.shift().trim();if(o){var _=s.join(":").trim();try{t.append(o,_)}catch(O){console.warn("Response "+O.message)}}}),t}R.call(l.prototype);function c(e,t){if(!(this instanceof c))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');if(t||(t={}),this.type="default",this.status=t.status===void 0?200:t.status,this.status<200||this.status>599)throw new RangeError("Failed to construct 'Response': The status provided (0) is outside the range [200, 599].");this.ok=this.status>=200&&this.status<300,this.statusText=t.statusText===void 0?"":""+t.statusText,this.headers=new i(t.headers),this.url=t.url||"",this._initBody(e)}R.call(c.prototype),c.prototype.clone=function(){return new c(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new i(this.headers),url:this.url})},c.error=function(){var e=new c(null,{status:200,statusText:""});return e.ok=!1,e.status=0,e.type="error",e};var k=[301,302,303,307,308];c.redirect=function(e,t){if(k.indexOf(t)===-1)throw new RangeError("Invalid status code");return new c(null,{status:t,headers:{location:e}})},h.DOMException=a.DOMException;try{new h.DOMException}catch{h.DOMException=function(t,r){this.message=t,this.name=r;var n=Error(t);this.stack=n.stack},h.DOMException.prototype=Object.create(Error.prototype),h.DOMException.prototype.constructor=h.DOMException}function B(e,t){return new Promise(function(r,n){var s=new l(e,t);if(s.signal&&s.signal.aborted)return n(new h.DOMException("Aborted","AbortError"));var o=new XMLHttpRequest;function _(){o.abort()}o.onload=function(){var f={statusText:o.statusText,headers:N(o.getAllResponseHeaders()||"")};s.url.indexOf("file://")===0&&(o.status<200||o.status>599)?f.status=200:f.status=o.status,f.url="responseURL"in o?o.responseURL:f.headers.get("X-Request-URL");var y="response"in o?o.response:o.responseText;setTimeout(function(){r(new c(y,f))},0)},o.onerror=function(){setTimeout(function(){n(new TypeError("Network request failed"))},0)},o.ontimeout=function(){setTimeout(function(){n(new TypeError("Network request timed out"))},0)},o.onabort=function(){setTimeout(function(){n(new h.DOMException("Aborted","AbortError"))},0)};function O(f){try{return f===""&&a.location.href?a.location.href:f}catch{return f}}if(o.open(s.method,O(s.url),!0),s.credentials==="include"?o.withCredentials=!0:s.credentials==="omit"&&(o.withCredentials=!1),"responseType"in o&&(u.blob?o.responseType="blob":u.arrayBuffer&&(o.responseType="arraybuffer")),t&&typeof t.headers=="object"&&!(t.headers instanceof i||a.Headers&&t.headers instanceof a.Headers)){var U=[];Object.getOwnPropertyNames(t.headers).forEach(function(f){U.push(b(f)),o.setRequestHeader(f,A(t.headers[f]))}),s.headers.forEach(function(f,y){U.indexOf(y)===-1&&o.setRequestHeader(y,f)})}else s.headers.forEach(function(f,y){o.setRequestHeader(y,f)});s.signal&&(s.signal.addEventListener("abort",_),o.onreadystatechange=function(){o.readyState===4&&s.signal.removeEventListener("abort",_)}),o.send(typeof s._bodyInit>"u"?null:s._bodyInit)})}return B.polyfill=!0,a.fetch||(a.fetch=B,a.Headers=i,a.Request=l,a.Response=c),h.Headers=i,h.Request=l,h.Response=c,h.fetch=B,Object.defineProperty(h,"__esModule",{value:!0}),h})({})})(E),E.fetch.ponyfill=!0,delete E.fetch.polyfill;var p=v.fetch?v:E;d=p.fetch,d.default=p.fetch,d.fetch=p.fetch,d.Headers=p.Headers,d.Request=p.Request,d.Response=p.Response,j.exports=d})(D,D.exports);var V=D.exports;const z=w.getDefaultExportFromCjs(V);exports.o=z;
@@ -1,4 +1,4 @@
1
- import { g as G, V as _ } from "./address-CBux52Na.mjs";
1
+ import { g as G, V as _ } from "./address-DqsMcbcT.mjs";
2
2
  var x = { exports: {} };
3
3
  (function(j, d) {
4
4
  var w = typeof globalThis < "u" && globalThis || typeof self < "u" && self || typeof _ < "u" && _, v = function() {
@@ -1,4 +1,4 @@
1
- import { B as l, g as w, a as y, i as p, I as h, d as g, b as k, e as O, f as L, h as m, j as E } from "./evm-IjnSHeSg.mjs";
1
+ import { B as l, g as w, a as y, i as p, I as h, d as g, b as k, e as O, f as L, h as m, j as E } from "./evm--hXXT-db.mjs";
2
2
  class x extends l {
3
3
  constructor({ callbackSelector: e, cause: a, data: o, extraData: c, sender: d, urls: r }) {
4
4
  var i;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./evm-D_r84vhS.js");class y extends e.BaseError{constructor({callbackSelector:r,cause:t,data:c,extraData:i,sender:u,urls:a}){var d;super(t.shortMessage||"An error occurred while fetching for an offchain result.",{cause:t,metaMessages:[...t.metaMessages||[],(d=t.metaMessages)!=null&&d.length?"":[],"Offchain Gateway Call:",a&&[" Gateway URL(s):",...a.map(f=>` ${e.getUrl(f)}`)],` Sender: ${u}`,` Data: ${c}`,` Callback selector: ${r}`,` Extra data: ${i}`].flat()}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"OffchainLookupError"})}}class w extends e.BaseError{constructor({result:r,url:t}){super("Offchain gateway response is malformed. Response data must be a hex value.",{metaMessages:[`Gateway URL: ${e.getUrl(t)}`,`Response: ${e.stringify(r)}`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"OffchainLookupResponseMalformedError"})}}class b extends e.BaseError{constructor({sender:r,to:t}){super("Reverted sender address does not match target contract address (`to`).",{metaMessages:[`Contract address: ${t}`,`OffchainLookup sender address: ${r}`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"OffchainLookupSenderMismatchError"})}}function g(n,r){if(!e.isAddress(n))throw new e.InvalidAddressError({address:n});if(!e.isAddress(r))throw new e.InvalidAddressError({address:r});return n.toLowerCase()===r.toLowerCase()}const k="0x556f1830",p={name:"OffchainLookup",type:"error",inputs:[{name:"sender",type:"address"},{name:"urls",type:"string[]"},{name:"callData",type:"bytes"},{name:"callbackFunction",type:"bytes4"},{name:"extraData",type:"bytes"}]};async function E(n,{blockNumber:r,blockTag:t,data:c,to:i}){const{args:u}=e.decodeErrorResult({data:c,abi:[p]}),[a,d,f,s,o]=u;try{if(!g(i,a))throw new b({sender:a,to:i});const l=await h({data:f,sender:a,urls:d}),{data:m}=await e.call(n,{blockNumber:r,blockTag:t,data:e.concat([s,e.encodeAbiParameters([{type:"bytes"},{type:"bytes"}],[l,o])]),to:i});return m}catch(l){throw new y({callbackSelector:s,cause:l,data:c,extraData:o,sender:a,urls:d})}}async function h({data:n,sender:r,urls:t}){var i;let c=new Error("An unknown error occurred.");for(let u=0;u<t.length;u++){const a=t[u],d=a.includes("{data}")?"GET":"POST",f=d==="POST"?{data:n,sender:r}:void 0;try{const s=await fetch(a.replace("{sender}",r).replace("{data}",n),{body:JSON.stringify(f),method:d});let o;if((i=s.headers.get("Content-Type"))!=null&&i.startsWith("application/json")?o=(await s.json()).data:o=await s.text(),!s.ok){c=new e.HttpRequestError({body:f,details:o!=null&&o.error?e.stringify(o.error):s.statusText,headers:s.headers,status:s.status,url:a});continue}if(!e.isHex(o)){c=new w({result:o,url:a});continue}return o}catch(s){c=new e.HttpRequestError({body:f,details:s.message,url:a})}}throw c}exports.ccipFetch=h;exports.offchainLookup=E;exports.offchainLookupAbiItem=p;exports.offchainLookupSignature=k;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./evm-CNq2zXwl.js");class y extends e.BaseError{constructor({callbackSelector:r,cause:t,data:c,extraData:i,sender:u,urls:a}){var d;super(t.shortMessage||"An error occurred while fetching for an offchain result.",{cause:t,metaMessages:[...t.metaMessages||[],(d=t.metaMessages)!=null&&d.length?"":[],"Offchain Gateway Call:",a&&[" Gateway URL(s):",...a.map(f=>` ${e.getUrl(f)}`)],` Sender: ${u}`,` Data: ${c}`,` Callback selector: ${r}`,` Extra data: ${i}`].flat()}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"OffchainLookupError"})}}class w extends e.BaseError{constructor({result:r,url:t}){super("Offchain gateway response is malformed. Response data must be a hex value.",{metaMessages:[`Gateway URL: ${e.getUrl(t)}`,`Response: ${e.stringify(r)}`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"OffchainLookupResponseMalformedError"})}}class b extends e.BaseError{constructor({sender:r,to:t}){super("Reverted sender address does not match target contract address (`to`).",{metaMessages:[`Contract address: ${t}`,`OffchainLookup sender address: ${r}`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"OffchainLookupSenderMismatchError"})}}function g(n,r){if(!e.isAddress(n))throw new e.InvalidAddressError({address:n});if(!e.isAddress(r))throw new e.InvalidAddressError({address:r});return n.toLowerCase()===r.toLowerCase()}const k="0x556f1830",p={name:"OffchainLookup",type:"error",inputs:[{name:"sender",type:"address"},{name:"urls",type:"string[]"},{name:"callData",type:"bytes"},{name:"callbackFunction",type:"bytes4"},{name:"extraData",type:"bytes"}]};async function E(n,{blockNumber:r,blockTag:t,data:c,to:i}){const{args:u}=e.decodeErrorResult({data:c,abi:[p]}),[a,d,f,s,o]=u;try{if(!g(i,a))throw new b({sender:a,to:i});const l=await h({data:f,sender:a,urls:d}),{data:m}=await e.call(n,{blockNumber:r,blockTag:t,data:e.concat([s,e.encodeAbiParameters([{type:"bytes"},{type:"bytes"}],[l,o])]),to:i});return m}catch(l){throw new y({callbackSelector:s,cause:l,data:c,extraData:o,sender:a,urls:d})}}async function h({data:n,sender:r,urls:t}){var i;let c=new Error("An unknown error occurred.");for(let u=0;u<t.length;u++){const a=t[u],d=a.includes("{data}")?"GET":"POST",f=d==="POST"?{data:n,sender:r}:void 0;try{const s=await fetch(a.replace("{sender}",r).replace("{data}",n),{body:JSON.stringify(f),method:d});let o;if((i=s.headers.get("Content-Type"))!=null&&i.startsWith("application/json")?o=(await s.json()).data:o=await s.text(),!s.ok){c=new e.HttpRequestError({body:f,details:o!=null&&o.error?e.stringify(o.error):s.statusText,headers:s.headers,status:s.status,url:a});continue}if(!e.isHex(o)){c=new w({result:o,url:a});continue}return o}catch(s){c=new e.HttpRequestError({body:f,details:s.message,url:a})}}throw c}exports.ccipFetch=h;exports.offchainLookup=E;exports.offchainLookupAbiItem=p;exports.offchainLookupSignature=k;
@@ -1 +1 @@
1
- "use strict";var u=Object.defineProperty;var d=(e,t,i)=>t in e?u(e,t,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[t]=i;var o=(e,t,i)=>d(e,typeof t!="symbol"?t+"":t,i);const n=require("./address-RcMobNYE.js");function f(e){return"getVersion"in e}const s={};function B(e,t,i){t in s||(s[t]={});const r=s[t];if(e in r)throw new Error(`Protocol ${e} for protocol ${t} has already registered`);s[t][e]=i}function m(e,t){const i=n.isChain(e)?n.chainToPlatform.get(e):e;return t in s?i in s[t]:!1}function l(e,t){if(t in s){const i=s[t];if(i&&e in i){const r=i[e];if(r)return r}}throw new Error(`No protocols registered for ${e}:${t}. This may be because the platform specific protocol implementation is not registered (by installing and importing it) or no implementation exists for this platform`)}const w=(e,t,i,r)=>l(e,t).fromRpc(i,r);class P{constructor(t,i){o(this,"network");o(this,"config");this.network=t,this.config=i}utils(){return this.constructor}getProtocol(t,i){return w(this.utils()._platform,t,i,this.config)}getProtocolInitializer(t){return l(this.utils()._platform,t)}async parseWormholeMessages(t,i,r){return(await this.getProtocol("WormholeCore",i)).parseTransaction(r)}}class k{constructor(t,i,r){o(this,"network");o(this,"chain");o(this,"config");o(this,"platform");o(this,"rpc");o(this,"protocols",new Map);o(this,"supportsWormholeCore",()=>this.supportsProtocol("WormholeCore"));o(this,"getWormholeCore",()=>this.getProtocol("WormholeCore"));o(this,"supportsTokenBridge",()=>this.supportsProtocol("TokenBridge"));o(this,"getTokenBridge",()=>this.getProtocol("TokenBridge"));o(this,"supportsAutomaticTokenBridge",()=>this.supportsProtocol("AutomaticTokenBridge"));o(this,"getAutomaticTokenBridge",()=>this.getProtocol("AutomaticTokenBridge"));o(this,"supportsCircleBridge",()=>this.supportsProtocol("CircleBridge"));o(this,"getCircleBridge",()=>this.getProtocol("CircleBridge"));o(this,"supportsAutomaticCircleBridge",()=>this.supportsProtocol("AutomaticCircleBridge"));o(this,"getAutomaticCircleBridge",()=>this.getProtocol("AutomaticCircleBridge"));o(this,"supportsIbcBridge",()=>this.supportsProtocol("IbcBridge"));o(this,"getIbcBridge",()=>this.getProtocol("IbcBridge"));o(this,"supportsPorticoBridge",()=>this.supportsProtocol("PorticoBridge"));o(this,"getPorticoBridge",()=>this.getProtocol("PorticoBridge"));o(this,"supportsTBTCBridge",()=>this.supportsProtocol("TBTCBridge"));o(this,"getTBTCBridge",()=>this.getProtocol("TBTCBridge"));this.config=i.config[t],this.platform=i,this.chain=this.config.key,this.network=this.config.network,this.rpc=r}getRpc(){return this.rpc=this.rpc?this.rpc:this.platform.getRpc(this.chain),this.rpc}async getDecimals(t){if(n.isNative(t))return this.config.nativeTokenDecimals;if(this.config.tokenMap){const i=n.canonicalAddress({chain:this.chain,address:t}),r=n.getTokenByAddress(this.network,this.chain,i);if(r)return r.decimals}return this.platform.utils().getDecimals(this.chain,await this.getRpc(),t)}async getBalance(t,i){return this.platform.utils().getBalance(this.chain,await this.getRpc(),t,i)}async getLatestBlock(){return this.platform.utils().getLatestBlock(await this.getRpc())}async getLatestFinalizedBlock(){return this.platform.utils().getLatestFinalizedBlock(await this.getRpc())}async parseTransaction(t){return this.platform.parseWormholeMessages(this.chain,await this.getRpc(),t)}async sendWait(t){return this.platform.utils().sendWait(this.chain,await this.getRpc(),t)}getToken(t){if(this.config.tokenMap&&t in this.config.tokenMap)return this.config.tokenMap[t]}async getNativeWrappedTokenId(){if(this.config.wrappedNative){const{address:i}=this.config.wrappedNative;return{chain:this.chain,address:n.toNative(this.chain,i)}}const t=await this.getTokenBridge();return{chain:this.chain,address:await t.getWrappedNative()}}async getTokenAccount(t,i){return{chain:this.chain,address:t}}supportsProtocol(t){return m(this.chain,t)}async getProtocol(t,i,r){if(!i&&this.protocols.has(t))return this.protocols.get(t);const c=i?{...this.config.contracts,...i}:this.config.contracts,h=r??await this.getRpc(),g=this.platform.getProtocolInitializer(t);let a;if(r){if(i)throw new Error("Custom contracts are currently not supported with custom rpc connection. Add the contracts to the base config.");a=await this.platform.getProtocol(t,h)}else if(f(g)){const p=await g.getVersion(h,c);a=new g(this.network,this.chain,h,c,p)}else a=new g(this.network,this.chain,h,c);return i||this.protocols.set(t,a),a}}exports.ChainContext=k;exports.PlatformContext=P;exports.registerProtocol=B;
1
+ "use strict";var u=Object.defineProperty;var d=(e,t,i)=>t in e?u(e,t,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[t]=i;var o=(e,t,i)=>d(e,typeof t!="symbol"?t+"":t,i);const n=require("./address-DnSRsubO.js");function f(e){return"getVersion"in e}const s={};function B(e,t,i){t in s||(s[t]={});const r=s[t];if(e in r)throw new Error(`Protocol ${e} for protocol ${t} has already registered`);s[t][e]=i}function m(e,t){const i=n.isChain(e)?n.chainToPlatform.get(e):e;return t in s?i in s[t]:!1}function l(e,t){if(t in s){const i=s[t];if(i&&e in i){const r=i[e];if(r)return r}}throw new Error(`No protocols registered for ${e}:${t}. This may be because the platform specific protocol implementation is not registered (by installing and importing it) or no implementation exists for this platform`)}const w=(e,t,i,r)=>l(e,t).fromRpc(i,r);class P{constructor(t,i){o(this,"network");o(this,"config");this.network=t,this.config=i}utils(){return this.constructor}getProtocol(t,i){return w(this.utils()._platform,t,i,this.config)}getProtocolInitializer(t){return l(this.utils()._platform,t)}async parseWormholeMessages(t,i,r){return(await this.getProtocol("WormholeCore",i)).parseTransaction(r)}}class k{constructor(t,i,r){o(this,"network");o(this,"chain");o(this,"config");o(this,"platform");o(this,"rpc");o(this,"protocols",new Map);o(this,"supportsWormholeCore",()=>this.supportsProtocol("WormholeCore"));o(this,"getWormholeCore",()=>this.getProtocol("WormholeCore"));o(this,"supportsTokenBridge",()=>this.supportsProtocol("TokenBridge"));o(this,"getTokenBridge",()=>this.getProtocol("TokenBridge"));o(this,"supportsAutomaticTokenBridge",()=>this.supportsProtocol("AutomaticTokenBridge"));o(this,"getAutomaticTokenBridge",()=>this.getProtocol("AutomaticTokenBridge"));o(this,"supportsCircleBridge",()=>this.supportsProtocol("CircleBridge"));o(this,"getCircleBridge",()=>this.getProtocol("CircleBridge"));o(this,"supportsAutomaticCircleBridge",()=>this.supportsProtocol("AutomaticCircleBridge"));o(this,"getAutomaticCircleBridge",()=>this.getProtocol("AutomaticCircleBridge"));o(this,"supportsIbcBridge",()=>this.supportsProtocol("IbcBridge"));o(this,"getIbcBridge",()=>this.getProtocol("IbcBridge"));o(this,"supportsPorticoBridge",()=>this.supportsProtocol("PorticoBridge"));o(this,"getPorticoBridge",()=>this.getProtocol("PorticoBridge"));o(this,"supportsTBTCBridge",()=>this.supportsProtocol("TBTCBridge"));o(this,"getTBTCBridge",()=>this.getProtocol("TBTCBridge"));this.config=i.config[t],this.platform=i,this.chain=this.config.key,this.network=this.config.network,this.rpc=r}getRpc(){return this.rpc=this.rpc?this.rpc:this.platform.getRpc(this.chain),this.rpc}async getDecimals(t){if(n.isNative(t))return this.config.nativeTokenDecimals;if(this.config.tokenMap){const i=n.canonicalAddress({chain:this.chain,address:t}),r=n.getTokenByAddress(this.network,this.chain,i);if(r)return r.decimals}return this.platform.utils().getDecimals(this.chain,await this.getRpc(),t)}async getBalance(t,i){return this.platform.utils().getBalance(this.chain,await this.getRpc(),t,i)}async getLatestBlock(){return this.platform.utils().getLatestBlock(await this.getRpc())}async getLatestFinalizedBlock(){return this.platform.utils().getLatestFinalizedBlock(await this.getRpc())}async parseTransaction(t){return this.platform.parseWormholeMessages(this.chain,await this.getRpc(),t)}async sendWait(t){return this.platform.utils().sendWait(this.chain,await this.getRpc(),t)}getToken(t){if(this.config.tokenMap&&t in this.config.tokenMap)return this.config.tokenMap[t]}async getNativeWrappedTokenId(){if(this.config.wrappedNative){const{address:i}=this.config.wrappedNative;return{chain:this.chain,address:n.toNative(this.chain,i)}}const t=await this.getTokenBridge();return{chain:this.chain,address:await t.getWrappedNative()}}async getTokenAccount(t,i){return{chain:this.chain,address:t}}supportsProtocol(t){return m(this.chain,t)}async getProtocol(t,i,r){if(!i&&this.protocols.has(t))return this.protocols.get(t);const c=i?{...this.config.contracts,...i}:this.config.contracts,h=r??await this.getRpc(),g=this.platform.getProtocolInitializer(t);let a;if(r){if(i)throw new Error("Custom contracts are currently not supported with custom rpc connection. Add the contracts to the base config.");a=await this.platform.getProtocol(t,h)}else if(f(g)){const p=await g.getVersion(h,c);a=new g(this.network,this.chain,h,c,p)}else a=new g(this.network,this.chain,h,c);return i||this.protocols.set(t,a),a}}exports.ChainContext=k;exports.PlatformContext=P;exports.registerProtocol=B;
@@ -1,7 +1,7 @@
1
1
  var l = Object.defineProperty;
2
2
  var u = (r, t, i) => t in r ? l(r, t, { enumerable: !0, configurable: !0, writable: !0, value: i }) : r[t] = i;
3
3
  var o = (r, t, i) => u(r, typeof t != "symbol" ? t + "" : t, i);
4
- import { a6 as d, a5 as f, k as B, v as m, bZ as w, a7 as k } from "./address-CBux52Na.mjs";
4
+ import { a6 as d, a5 as f, k as B, v as m, cn as w, a7 as k } from "./address-DqsMcbcT.mjs";
5
5
  function P(r) {
6
6
  return "getVersion" in r;
7
7
  }