@wormhole-foundation/wormhole-connect 1.0.0-beta.3-development → 1.0.0-beta.4-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 (152) hide show
  1. package/dist/assets/{ccip-YN27M9dL.js → ccip-Dn5z57Cx.js} +1 -1
  2. package/dist/assets/{evm-wKiUiV3-.js → evm-Ci-t-8ei.js} +4 -4
  3. package/dist/assets/{index-8fbGA94c.js → index-Da59NFoY.js} +1 -1
  4. package/dist/assets/{index-B9_Snb-C.js → index-DlyJ6Tua.js} +2 -2
  5. package/dist/assets/{index-BBy_QGBB.js → index-yInQCZK6.js} +1 -1
  6. package/dist/assets/{index.es-BY7lrdO_.js → index.es-DUffrgf3.js} +2 -2
  7. package/dist/main.js +115 -62
  8. package/dist/src/components/v2/Button.d.ts +1 -1
  9. package/dist/src/components/v2/Button.d.ts.map +1 -1
  10. package/dist/src/config/types.d.ts +17 -3
  11. package/dist/src/config/types.d.ts.map +1 -1
  12. package/dist/src/hooks/useTransactionHistory.d.ts +1 -1
  13. package/dist/src/hooks/useTransactionHistory.d.ts.map +1 -1
  14. package/dist/src/hooks/useTransactionHistoryMayan.d.ts.map +1 -1
  15. package/dist/src/hooks/useTransactionHistoryWHScan.d.ts.map +1 -1
  16. package/dist/src/icons/TxReadyForClaim.d.ts +2 -2
  17. package/dist/src/icons/TxReadyForClaim.d.ts.map +1 -1
  18. package/dist/src/utils/inProgressTxCache.d.ts +5 -0
  19. package/dist/src/utils/inProgressTxCache.d.ts.map +1 -0
  20. package/dist/src/utils/polling.d.ts +5 -0
  21. package/dist/src/utils/polling.d.ts.map +1 -0
  22. package/dist/src/utils/sdkv2.d.ts +3 -2
  23. package/dist/src/utils/sdkv2.d.ts.map +1 -1
  24. package/dist/src/views/v2/Bridge/ReviewTransaction/index.d.ts.map +1 -1
  25. package/dist/src/views/v2/Bridge/index.d.ts.map +1 -1
  26. package/dist/src/views/v2/Redeem/index.d.ts.map +1 -1
  27. package/dist/src/views/v2/TxHistory/Widget/Item.d.ts +8 -0
  28. package/dist/src/views/v2/TxHistory/Widget/Item.d.ts.map +1 -0
  29. package/dist/src/views/v2/TxHistory/Widget/index.d.ts +4 -0
  30. package/dist/src/views/v2/TxHistory/Widget/index.d.ts.map +1 -0
  31. package/dist/src/views/v2/TxHistory/index.d.ts.map +1 -1
  32. package/lib/{algorand-BZLSulqp.mjs → algorand-B9ai7AKk.mjs} +3 -3
  33. package/lib/{algorand-DIrI8hux.js → algorand-BZfir-Gt.js} +1 -1
  34. package/lib/{aptos-BXyptrTk.mjs → aptos-BiWZASIH.mjs} +3 -3
  35. package/lib/{aptos-B61S9Mku.js → aptos-CX7jOv1y.js} +1 -1
  36. package/lib/{aptos-poOCeL-e.js → aptos-D_w5IEUK.js} +2 -2
  37. package/lib/{aptos-ClFQX748.mjs → aptos-ZpPdNMHJ.mjs} +1 -1
  38. package/lib/{ccip-CROSeCCn.js → ccip-CLMQ2RsP.js} +1 -1
  39. package/lib/{ccip-BcLqF-ov.mjs → ccip-lVzudYcQ.mjs} +1 -1
  40. package/lib/{cosmos-D-fRtzTz.js → cosmos-6rjmrhY_.js} +1 -1
  41. package/lib/{cosmos-B7IowZE9.mjs → cosmos-B3YMB-qs.mjs} +6 -6
  42. package/lib/{cosmwasm-BU28GqyN.js → cosmwasm-DMVssDjU.js} +2 -2
  43. package/lib/{cosmwasm-i8-2LBd4.mjs → cosmwasm-SnVdtN68.mjs} +7 -7
  44. package/lib/{events-BIfEV615.mjs → events-pgsgrP1S.mjs} +1 -1
  45. package/lib/{events-CG085uVS.js → events-t6i_QSEn.js} +1 -1
  46. package/lib/{evm-BG4p6wWc.mjs → evm-Bd3DzKCY.mjs} +7 -7
  47. package/lib/{evm-DSo1klm4.js → evm-D7GRIPdg.js} +4 -4
  48. package/lib/{evm-z72BQwjo.js → evm-DFJuxSg1.js} +1 -1
  49. package/lib/{evm-DqVh4NBz.mjs → evm-DiQodX72.mjs} +5 -5
  50. package/lib/{index-BrFyHtHO.js → index-048e7Uvl.js} +1 -1
  51. package/lib/{index-Bn9MsO0e.mjs → index-0QJFchou.mjs} +2 -2
  52. package/lib/{index-DjSK9SdK.mjs → index-0YCaekiF.mjs} +2 -2
  53. package/lib/{index-GyFHGs5Z.js → index-2LZtNZ5P.js} +1 -1
  54. package/lib/{index-C1XMdJFH.js → index-B2aC_g_3.js} +1 -1
  55. package/lib/{index-Cf-xLfst.js → index-B5TmFc4M.js} +1 -1
  56. package/lib/{index-l3VuXtv4.mjs → index-B64jLBfI.mjs} +2 -2
  57. package/lib/{index-CkrE6mmF.js → index-BAqClXT6.js} +1 -1
  58. package/lib/{index--orPBbEs.mjs → index-BT7_dDgl.mjs} +3 -3
  59. package/lib/{index-DTj0BYI6.mjs → index-BYv5Tbwe.mjs} +1 -1
  60. package/lib/{index-ByG9EJHX.js → index-BZ7LatAr.js} +137 -84
  61. package/lib/{index-BhfoV5RZ.js → index-B_FxM4qi.js} +1 -1
  62. package/lib/{index-B3uNul6-.mjs → index-BcbPoWss.mjs} +3 -3
  63. package/lib/{index-C262JAz4.mjs → index-Bd6ExIDW.mjs} +4 -4
  64. package/lib/{index-C2ZrCXVv.mjs → index-BhrO8yNx.mjs} +2 -2
  65. package/lib/{index--kQS0wX-.js → index-BjpzXqrL.js} +1 -1
  66. package/lib/{index-2u6Q9y32.js → index-BkyCouQJ.js} +1 -1
  67. package/lib/{index-DGI2tbSC.mjs → index-C4NKqUWK.mjs} +1 -1
  68. package/lib/{index-3CEBQmCn.mjs → index-C9xfXphF.mjs} +2 -2
  69. package/lib/{index-CdnXAZl6.js → index-CE4mRmPN.js} +1 -1
  70. package/lib/{index-CJJaUncM.js → index-CFVJznfe.js} +1 -1
  71. package/lib/{index-Coqx-ZYc.js → index-C_JBf5AE.js} +1 -1
  72. package/lib/{index-9Ifk_2V6.js → index-CcKxlhe-.js} +1 -1
  73. package/lib/{index-C3Ztf7te.mjs → index-CdFX-OBR.mjs} +4 -4
  74. package/lib/{index-BUcxdUpo.mjs → index-CkyGUP8I.mjs} +2 -2
  75. package/lib/{index-eY_q88kc.js → index-Cl110Yt1.js} +1 -1
  76. package/lib/{index-C8UyzBg3.mjs → index-CpM8O4af.mjs} +4 -4
  77. package/lib/{index-CytdQ1id.js → index-CvRFH7pa.js} +1 -1
  78. package/lib/{index-DkmEXbbA.js → index-D4-zCm-j.js} +1 -1
  79. package/lib/{index-B-bMfv9J.mjs → index-DG5KwGj7.mjs} +3 -3
  80. package/lib/{index-Cfu2mlWW.mjs → index-DJgWkkqj.mjs} +2 -2
  81. package/lib/{index-xrevpHY6.js → index-DLXjX60f.js} +1 -1
  82. package/lib/{index-B51snNHX.mjs → index-DPq8nS1b.mjs} +1 -1
  83. package/lib/{index-DTtBAHqC.mjs → index-DUn9bDrk.mjs} +2 -2
  84. package/lib/{index-C8tIBuyM.mjs → index-DVnPDtFx.mjs} +1 -1
  85. package/lib/{index-DEfagu36.js → index-DWmEAYa2.js} +1 -1
  86. package/lib/{index-DTLOaiZ5.mjs → index-DZbeM9gY.mjs} +2 -2
  87. package/lib/{index-CLiemfL3.js → index-Dk2OkATw.js} +1 -1
  88. package/lib/{index-x3yNXPc-.js → index-DllSkb9h.js} +1 -1
  89. package/lib/{index-CQ_e_FtW.js → index-EPcXyhD3.js} +1 -1
  90. package/lib/{index-BDhzG0Bz.mjs → index-EhUlCH18.mjs} +5312 -4798
  91. package/lib/{index-CYfEuKEC.js → index-QqzqKjF9.js} +1 -1
  92. package/lib/{index-D1GFc9u_.js → index-VI9qDjx0.js} +1 -1
  93. package/lib/{index-C1t8_dYP.mjs → index-bpVbPzFG.mjs} +1 -1
  94. package/lib/{index-BM3TrHYu.mjs → index-fD6yeQDw.mjs} +7 -7
  95. package/lib/{index-C1fq1xT0.mjs → index-fPs98C_X.mjs} +2 -2
  96. package/lib/{index-Xxsx46yX.mjs → index-hiGmsL0b.mjs} +1 -1
  97. package/lib/{index-CGmv-GLf.js → index-mAuqp4GD.js} +1 -1
  98. package/lib/{index.es-zlUSra_a.mjs → index.es-B4wQLKJO.mjs} +5 -5
  99. package/lib/{index.es-CTYy3A6V.js → index.es-WCp4WrVw.js} +2 -2
  100. package/lib/index.js +1 -1
  101. package/lib/index.mjs +1 -1
  102. package/lib/{libsodium-wrappers-_Sv3nUjE.js → libsodium-wrappers-BdZeVEOK.js} +1 -1
  103. package/lib/{libsodium-wrappers-BL6m46dv.mjs → libsodium-wrappers-DnY3rBzj.mjs} +1 -1
  104. package/lib/{pako.esm-CEjOh_1P.js → pako.esm-CpOVp0Fg.js} +1 -1
  105. package/lib/{pako.esm-Bf33_673.mjs → pako.esm-doGHPq3v.mjs} +3 -3
  106. package/lib/{pbkdf2-C3vdgkb4.mjs → pbkdf2-CR1mMO6P.mjs} +1 -1
  107. package/lib/{pbkdf2-BJ3CFykt.js → pbkdf2-DRrUaAek.js} +1 -1
  108. package/lib/{sei-LGYYUG8M.js → sei-BHskcl2R.js} +1 -1
  109. package/lib/{sei-BXWrZef6.mjs → sei-ReMraEM4.mjs} +4 -4
  110. package/lib/{signer-DaJj3hCp.mjs → signer-BwkEV8NR.mjs} +1 -1
  111. package/lib/{signer-BQ4T60Nz.js → signer-C5udfQih.js} +1 -1
  112. package/lib/{solana-AQlZomQ6.js → solana-BWRzXH9-.js} +1 -1
  113. package/lib/solana-ci1dqiv5.mjs +16 -0
  114. package/lib/solana-gFEm46ZS.js +1 -0
  115. package/lib/{solana-Cl4jwD2F.mjs → solana-kr2Et-_M.mjs} +4 -4
  116. package/lib/{solanaEmbed.esm-B_5axZif.js → solanaEmbed.esm-8hegnauD.js} +1 -1
  117. package/lib/{solanaEmbed.esm-DEMxZG02.mjs → solanaEmbed.esm-HLygiesN.mjs} +4 -4
  118. package/lib/src/components/v2/Button.d.ts +1 -1
  119. package/lib/src/components/v2/Button.d.ts.map +1 -1
  120. package/lib/src/config/types.d.ts +17 -3
  121. package/lib/src/config/types.d.ts.map +1 -1
  122. package/lib/src/hooks/useTransactionHistory.d.ts +1 -1
  123. package/lib/src/hooks/useTransactionHistory.d.ts.map +1 -1
  124. package/lib/src/hooks/useTransactionHistoryMayan.d.ts.map +1 -1
  125. package/lib/src/hooks/useTransactionHistoryWHScan.d.ts.map +1 -1
  126. package/lib/src/icons/TxReadyForClaim.d.ts +2 -2
  127. package/lib/src/icons/TxReadyForClaim.d.ts.map +1 -1
  128. package/lib/src/utils/inProgressTxCache.d.ts +5 -0
  129. package/lib/src/utils/inProgressTxCache.d.ts.map +1 -0
  130. package/lib/src/utils/polling.d.ts +5 -0
  131. package/lib/src/utils/polling.d.ts.map +1 -0
  132. package/lib/src/utils/sdkv2.d.ts +3 -2
  133. package/lib/src/utils/sdkv2.d.ts.map +1 -1
  134. package/lib/src/views/v2/Bridge/ReviewTransaction/index.d.ts.map +1 -1
  135. package/lib/src/views/v2/Bridge/index.d.ts.map +1 -1
  136. package/lib/src/views/v2/Redeem/index.d.ts.map +1 -1
  137. package/lib/src/views/v2/TxHistory/Widget/Item.d.ts +8 -0
  138. package/lib/src/views/v2/TxHistory/Widget/Item.d.ts.map +1 -0
  139. package/lib/src/views/v2/TxHistory/Widget/index.d.ts +4 -0
  140. package/lib/src/views/v2/TxHistory/Widget/index.d.ts.map +1 -0
  141. package/lib/src/views/v2/TxHistory/index.d.ts.map +1 -1
  142. package/lib/{sui-DfdFzATl.mjs → sui-B6XCpe1d.mjs} +1 -1
  143. package/lib/{sui-IAt2YxVB.js → sui-BWRqoTdl.js} +2 -2
  144. package/lib/{sui-tX-807Bw.js → sui-BocrppL0.js} +1 -1
  145. package/lib/{sui-BpKCqOiX.mjs → sui-BuZPAcI0.mjs} +4 -4
  146. package/lib/{unsignedTransaction-BzNQ2WFS.js → unsignedTransaction-DSuqsGgb.js} +1 -1
  147. package/lib/{unsignedTransaction-B1rzGa0o.mjs → unsignedTransaction-oXk8lD5s.mjs} +2 -2
  148. package/lib/{utils-DZZcQv7V.js → utils-SML27G4C.js} +1 -1
  149. package/lib/{utils-Xa6ErDQY.mjs → utils-fI-uXUZk.mjs} +2 -2
  150. package/package.json +1 -1
  151. package/lib/solana-6EZacoKb.js +0 -1
  152. package/lib/solana-CbB3tRah.mjs +0 -16
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const Ge=require("./events-CG085uVS.js"),ie=require("./index-ByG9EJHX.js"),D=require("./index-DEfagu36.js"),N=require("./index-eY_q88kc.js");var qv={};(function(a){const t=D.strictUriEncode,r=D.decodeUriComponent,s=D.splitOnFirst,o=D.filterObj,u=f=>f==null,l=Symbol("encodeFragmentIdentifier");function y(f){switch(f.arrayFormat){case"index":return m=>(w,_)=>{const P=w.length;return _===void 0||f.skipNull&&_===null||f.skipEmptyString&&_===""?w:_===null?[...w,[R(m,f),"[",P,"]"].join("")]:[...w,[R(m,f),"[",R(P,f),"]=",R(_,f)].join("")]};case"bracket":return m=>(w,_)=>_===void 0||f.skipNull&&_===null||f.skipEmptyString&&_===""?w:_===null?[...w,[R(m,f),"[]"].join("")]:[...w,[R(m,f),"[]=",R(_,f)].join("")];case"colon-list-separator":return m=>(w,_)=>_===void 0||f.skipNull&&_===null||f.skipEmptyString&&_===""?w:_===null?[...w,[R(m,f),":list="].join("")]:[...w,[R(m,f),":list=",R(_,f)].join("")];case"comma":case"separator":case"bracket-separator":{const m=f.arrayFormat==="bracket-separator"?"[]=":"=";return w=>(_,P)=>P===void 0||f.skipNull&&P===null||f.skipEmptyString&&P===""?_:(P=P===null?"":P,_.length===0?[[R(w,f),m,R(P,f)].join("")]:[[_,R(P,f)].join(f.arrayFormatSeparator)])}default:return m=>(w,_)=>_===void 0||f.skipNull&&_===null||f.skipEmptyString&&_===""?w:_===null?[...w,R(m,f)]:[...w,[R(m,f),"=",R(_,f)].join("")]}}function I(f){let m;switch(f.arrayFormat){case"index":return(w,_,P)=>{if(m=/\[(\d*)\]$/.exec(w),w=w.replace(/\[\d*\]$/,""),!m){P[w]=_;return}P[w]===void 0&&(P[w]={}),P[w][m[1]]=_};case"bracket":return(w,_,P)=>{if(m=/(\[\])$/.exec(w),w=w.replace(/\[\]$/,""),!m){P[w]=_;return}if(P[w]===void 0){P[w]=[_];return}P[w]=[].concat(P[w],_)};case"colon-list-separator":return(w,_,P)=>{if(m=/(:list)$/.exec(w),w=w.replace(/:list$/,""),!m){P[w]=_;return}if(P[w]===void 0){P[w]=[_];return}P[w]=[].concat(P[w],_)};case"comma":case"separator":return(w,_,P)=>{const U=typeof _=="string"&&_.includes(f.arrayFormatSeparator),F=typeof _=="string"&&!U&&x(_,f).includes(f.arrayFormatSeparator);_=F?x(_,f):_;const X=U||F?_.split(f.arrayFormatSeparator).map(Cr=>x(Cr,f)):_===null?_:x(_,f);P[w]=X};case"bracket-separator":return(w,_,P)=>{const U=/(\[\])$/.test(w);if(w=w.replace(/\[\]$/,""),!U){P[w]=_&&x(_,f);return}const F=_===null?[]:_.split(f.arrayFormatSeparator).map(X=>x(X,f));if(P[w]===void 0){P[w]=F;return}P[w]=[].concat(P[w],F)};default:return(w,_,P)=>{if(P[w]===void 0){P[w]=_;return}P[w]=[].concat(P[w],_)}}}function S(f){if(typeof f!="string"||f.length!==1)throw new TypeError("arrayFormatSeparator must be single character string")}function R(f,m){return m.encode?m.strict?t(f):encodeURIComponent(f):f}function x(f,m){return m.decode?r(f):f}function j(f){return Array.isArray(f)?f.sort():typeof f=="object"?j(Object.keys(f)).sort((m,w)=>Number(m)-Number(w)).map(m=>f[m]):f}function B(f){const m=f.indexOf("#");return m!==-1&&(f=f.slice(0,m)),f}function k(f){let m="";const w=f.indexOf("#");return w!==-1&&(m=f.slice(w)),m}function re(f){f=B(f);const m=f.indexOf("?");return m===-1?"":f.slice(m+1)}function ne(f,m){return m.parseNumbers&&!Number.isNaN(Number(f))&&typeof f=="string"&&f.trim()!==""?f=Number(f):m.parseBooleans&&f!==null&&(f.toLowerCase()==="true"||f.toLowerCase()==="false")&&(f=f.toLowerCase()==="true"),f}function oe(f,m){m=Object.assign({decode:!0,sort:!0,arrayFormat:"none",arrayFormatSeparator:",",parseNumbers:!1,parseBooleans:!1},m),S(m.arrayFormatSeparator);const w=I(m),_=Object.create(null);if(typeof f!="string"||(f=f.trim().replace(/^[?#&]/,""),!f))return _;for(const P of f.split("&")){if(P==="")continue;let[U,F]=s(m.decode?P.replace(/\+/g," "):P,"=");F=F===void 0?null:["comma","separator","bracket-separator"].includes(m.arrayFormat)?F:x(F,m),w(x(U,m),F,_)}for(const P of Object.keys(_)){const U=_[P];if(typeof U=="object"&&U!==null)for(const F of Object.keys(U))U[F]=ne(U[F],m);else _[P]=ne(U,m)}return m.sort===!1?_:(m.sort===!0?Object.keys(_).sort():Object.keys(_).sort(m.sort)).reduce((P,U)=>{const F=_[U];return F&&typeof F=="object"&&!Array.isArray(F)?P[U]=j(F):P[U]=F,P},Object.create(null))}a.extract=re,a.parse=oe,a.stringify=(f,m)=>{if(!f)return"";m=Object.assign({encode:!0,strict:!0,arrayFormat:"none",arrayFormatSeparator:","},m),S(m.arrayFormatSeparator);const w=F=>m.skipNull&&u(f[F])||m.skipEmptyString&&f[F]==="",_=y(m),P={};for(const F of Object.keys(f))w(F)||(P[F]=f[F]);const U=Object.keys(P);return m.sort!==!1&&U.sort(m.sort),U.map(F=>{const X=f[F];return X===void 0?"":X===null?R(F,m):Array.isArray(X)?X.length===0&&m.arrayFormat==="bracket-separator"?R(F,m)+"[]":X.reduce(_(F),[]).join("&"):R(F,m)+"="+R(X,m)}).filter(F=>F.length>0).join("&")},a.parseUrl=(f,m)=>{m=Object.assign({decode:!0},m);const[w,_]=s(f,"#");return Object.assign({url:w.split("?")[0]||"",query:oe(re(f),m)},m&&m.parseFragmentIdentifier&&_?{fragmentIdentifier:x(_,m)}:{})},a.stringifyUrl=(f,m)=>{m=Object.assign({encode:!0,strict:!0,[l]:!0},m);const w=B(f.url).split("?")[0]||"",_=a.extract(f.url),P=a.parse(_,{sort:!1}),U=Object.assign(P,f.query);let F=a.stringify(U,m);F&&(F=`?${F}`);let X=k(f.url);return f.fragmentIdentifier&&(X=`#${m[l]?R(f.fragmentIdentifier,m):f.fragmentIdentifier}`),`${w}${F}${X}`},a.pick=(f,m,w)=>{w=Object.assign({parseFragmentIdentifier:!0,[l]:!1},w);const{url:_,query:P,fragmentIdentifier:U}=a.parseUrl(f,w);return a.stringifyUrl({url:_,query:o(P,m),fragmentIdentifier:U},w)},a.exclude=(f,m,w)=>{const _=Array.isArray(m)?P=>!m.includes(P):(P,U)=>!m(P,U);return a.pick(f,_,w)}})(qv);function Uv(a,t=[]){const r=[];return Object.keys(a).forEach(s=>{if(t.length&&!t.includes(s))return;const o=a[s];r.push(...o.accounts)}),r}const Mv={INVALID_METHOD:{message:"Invalid method.",code:1001},INVALID_EVENT:{message:"Invalid event.",code:1002},INVALID_UPDATE_REQUEST:{message:"Invalid update request.",code:1003},INVALID_EXTEND_REQUEST:{message:"Invalid extend request.",code:1004},INVALID_SESSION_SETTLE_REQUEST:{message:"Invalid session settle request.",code:1005},UNAUTHORIZED_METHOD:{message:"Unauthorized method.",code:3001},UNAUTHORIZED_EVENT:{message:"Unauthorized event.",code:3002},UNAUTHORIZED_UPDATE_REQUEST:{message:"Unauthorized update request.",code:3003},UNAUTHORIZED_EXTEND_REQUEST:{message:"Unauthorized extend request.",code:3004},USER_REJECTED:{message:"User rejected.",code:5e3},USER_REJECTED_CHAINS:{message:"User rejected chains.",code:5001},USER_REJECTED_METHODS:{message:"User rejected methods.",code:5002},USER_REJECTED_EVENTS:{message:"User rejected events.",code:5003},UNSUPPORTED_CHAINS:{message:"Unsupported chains.",code:5100},UNSUPPORTED_METHODS:{message:"Unsupported methods.",code:5101},UNSUPPORTED_EVENTS:{message:"Unsupported events.",code:5102},UNSUPPORTED_ACCOUNTS:{message:"Unsupported accounts.",code:5103},UNSUPPORTED_NAMESPACE_KEY:{message:"Unsupported namespace key.",code:5104},USER_DISCONNECTED:{message:"User disconnected.",code:6e3},SESSION_SETTLEMENT_FAILED:{message:"Session settlement failed.",code:7e3},WC_METHOD_UNSUPPORTED:{message:"Unsupported wc_ method.",code:10001}};function Lv(a,t){const{message:r,code:s}=Mv[a];return{message:r,code:s}}function so(a,t){return!!Array.isArray(a)}var Or={};/*! *****************************************************************************
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const Ge=require("./events-t6i_QSEn.js"),ie=require("./index-BZ7LatAr.js"),D=require("./index-DWmEAYa2.js"),N=require("./index-Cl110Yt1.js");var qv={};(function(a){const t=D.strictUriEncode,r=D.decodeUriComponent,s=D.splitOnFirst,o=D.filterObj,u=f=>f==null,l=Symbol("encodeFragmentIdentifier");function y(f){switch(f.arrayFormat){case"index":return m=>(w,_)=>{const P=w.length;return _===void 0||f.skipNull&&_===null||f.skipEmptyString&&_===""?w:_===null?[...w,[R(m,f),"[",P,"]"].join("")]:[...w,[R(m,f),"[",R(P,f),"]=",R(_,f)].join("")]};case"bracket":return m=>(w,_)=>_===void 0||f.skipNull&&_===null||f.skipEmptyString&&_===""?w:_===null?[...w,[R(m,f),"[]"].join("")]:[...w,[R(m,f),"[]=",R(_,f)].join("")];case"colon-list-separator":return m=>(w,_)=>_===void 0||f.skipNull&&_===null||f.skipEmptyString&&_===""?w:_===null?[...w,[R(m,f),":list="].join("")]:[...w,[R(m,f),":list=",R(_,f)].join("")];case"comma":case"separator":case"bracket-separator":{const m=f.arrayFormat==="bracket-separator"?"[]=":"=";return w=>(_,P)=>P===void 0||f.skipNull&&P===null||f.skipEmptyString&&P===""?_:(P=P===null?"":P,_.length===0?[[R(w,f),m,R(P,f)].join("")]:[[_,R(P,f)].join(f.arrayFormatSeparator)])}default:return m=>(w,_)=>_===void 0||f.skipNull&&_===null||f.skipEmptyString&&_===""?w:_===null?[...w,R(m,f)]:[...w,[R(m,f),"=",R(_,f)].join("")]}}function I(f){let m;switch(f.arrayFormat){case"index":return(w,_,P)=>{if(m=/\[(\d*)\]$/.exec(w),w=w.replace(/\[\d*\]$/,""),!m){P[w]=_;return}P[w]===void 0&&(P[w]={}),P[w][m[1]]=_};case"bracket":return(w,_,P)=>{if(m=/(\[\])$/.exec(w),w=w.replace(/\[\]$/,""),!m){P[w]=_;return}if(P[w]===void 0){P[w]=[_];return}P[w]=[].concat(P[w],_)};case"colon-list-separator":return(w,_,P)=>{if(m=/(:list)$/.exec(w),w=w.replace(/:list$/,""),!m){P[w]=_;return}if(P[w]===void 0){P[w]=[_];return}P[w]=[].concat(P[w],_)};case"comma":case"separator":return(w,_,P)=>{const U=typeof _=="string"&&_.includes(f.arrayFormatSeparator),F=typeof _=="string"&&!U&&x(_,f).includes(f.arrayFormatSeparator);_=F?x(_,f):_;const X=U||F?_.split(f.arrayFormatSeparator).map(Cr=>x(Cr,f)):_===null?_:x(_,f);P[w]=X};case"bracket-separator":return(w,_,P)=>{const U=/(\[\])$/.test(w);if(w=w.replace(/\[\]$/,""),!U){P[w]=_&&x(_,f);return}const F=_===null?[]:_.split(f.arrayFormatSeparator).map(X=>x(X,f));if(P[w]===void 0){P[w]=F;return}P[w]=[].concat(P[w],F)};default:return(w,_,P)=>{if(P[w]===void 0){P[w]=_;return}P[w]=[].concat(P[w],_)}}}function S(f){if(typeof f!="string"||f.length!==1)throw new TypeError("arrayFormatSeparator must be single character string")}function R(f,m){return m.encode?m.strict?t(f):encodeURIComponent(f):f}function x(f,m){return m.decode?r(f):f}function j(f){return Array.isArray(f)?f.sort():typeof f=="object"?j(Object.keys(f)).sort((m,w)=>Number(m)-Number(w)).map(m=>f[m]):f}function B(f){const m=f.indexOf("#");return m!==-1&&(f=f.slice(0,m)),f}function k(f){let m="";const w=f.indexOf("#");return w!==-1&&(m=f.slice(w)),m}function re(f){f=B(f);const m=f.indexOf("?");return m===-1?"":f.slice(m+1)}function ne(f,m){return m.parseNumbers&&!Number.isNaN(Number(f))&&typeof f=="string"&&f.trim()!==""?f=Number(f):m.parseBooleans&&f!==null&&(f.toLowerCase()==="true"||f.toLowerCase()==="false")&&(f=f.toLowerCase()==="true"),f}function oe(f,m){m=Object.assign({decode:!0,sort:!0,arrayFormat:"none",arrayFormatSeparator:",",parseNumbers:!1,parseBooleans:!1},m),S(m.arrayFormatSeparator);const w=I(m),_=Object.create(null);if(typeof f!="string"||(f=f.trim().replace(/^[?#&]/,""),!f))return _;for(const P of f.split("&")){if(P==="")continue;let[U,F]=s(m.decode?P.replace(/\+/g," "):P,"=");F=F===void 0?null:["comma","separator","bracket-separator"].includes(m.arrayFormat)?F:x(F,m),w(x(U,m),F,_)}for(const P of Object.keys(_)){const U=_[P];if(typeof U=="object"&&U!==null)for(const F of Object.keys(U))U[F]=ne(U[F],m);else _[P]=ne(U,m)}return m.sort===!1?_:(m.sort===!0?Object.keys(_).sort():Object.keys(_).sort(m.sort)).reduce((P,U)=>{const F=_[U];return F&&typeof F=="object"&&!Array.isArray(F)?P[U]=j(F):P[U]=F,P},Object.create(null))}a.extract=re,a.parse=oe,a.stringify=(f,m)=>{if(!f)return"";m=Object.assign({encode:!0,strict:!0,arrayFormat:"none",arrayFormatSeparator:","},m),S(m.arrayFormatSeparator);const w=F=>m.skipNull&&u(f[F])||m.skipEmptyString&&f[F]==="",_=y(m),P={};for(const F of Object.keys(f))w(F)||(P[F]=f[F]);const U=Object.keys(P);return m.sort!==!1&&U.sort(m.sort),U.map(F=>{const X=f[F];return X===void 0?"":X===null?R(F,m):Array.isArray(X)?X.length===0&&m.arrayFormat==="bracket-separator"?R(F,m)+"[]":X.reduce(_(F),[]).join("&"):R(F,m)+"="+R(X,m)}).filter(F=>F.length>0).join("&")},a.parseUrl=(f,m)=>{m=Object.assign({decode:!0},m);const[w,_]=s(f,"#");return Object.assign({url:w.split("?")[0]||"",query:oe(re(f),m)},m&&m.parseFragmentIdentifier&&_?{fragmentIdentifier:x(_,m)}:{})},a.stringifyUrl=(f,m)=>{m=Object.assign({encode:!0,strict:!0,[l]:!0},m);const w=B(f.url).split("?")[0]||"",_=a.extract(f.url),P=a.parse(_,{sort:!1}),U=Object.assign(P,f.query);let F=a.stringify(U,m);F&&(F=`?${F}`);let X=k(f.url);return f.fragmentIdentifier&&(X=`#${m[l]?R(f.fragmentIdentifier,m):f.fragmentIdentifier}`),`${w}${F}${X}`},a.pick=(f,m,w)=>{w=Object.assign({parseFragmentIdentifier:!0,[l]:!1},w);const{url:_,query:P,fragmentIdentifier:U}=a.parseUrl(f,w);return a.stringifyUrl({url:_,query:o(P,m),fragmentIdentifier:U},w)},a.exclude=(f,m,w)=>{const _=Array.isArray(m)?P=>!m.includes(P):(P,U)=>!m(P,U);return a.pick(f,_,w)}})(qv);function Uv(a,t=[]){const r=[];return Object.keys(a).forEach(s=>{if(t.length&&!t.includes(s))return;const o=a[s];r.push(...o.accounts)}),r}const Mv={INVALID_METHOD:{message:"Invalid method.",code:1001},INVALID_EVENT:{message:"Invalid event.",code:1002},INVALID_UPDATE_REQUEST:{message:"Invalid update request.",code:1003},INVALID_EXTEND_REQUEST:{message:"Invalid extend request.",code:1004},INVALID_SESSION_SETTLE_REQUEST:{message:"Invalid session settle request.",code:1005},UNAUTHORIZED_METHOD:{message:"Unauthorized method.",code:3001},UNAUTHORIZED_EVENT:{message:"Unauthorized event.",code:3002},UNAUTHORIZED_UPDATE_REQUEST:{message:"Unauthorized update request.",code:3003},UNAUTHORIZED_EXTEND_REQUEST:{message:"Unauthorized extend request.",code:3004},USER_REJECTED:{message:"User rejected.",code:5e3},USER_REJECTED_CHAINS:{message:"User rejected chains.",code:5001},USER_REJECTED_METHODS:{message:"User rejected methods.",code:5002},USER_REJECTED_EVENTS:{message:"User rejected events.",code:5003},UNSUPPORTED_CHAINS:{message:"Unsupported chains.",code:5100},UNSUPPORTED_METHODS:{message:"Unsupported methods.",code:5101},UNSUPPORTED_EVENTS:{message:"Unsupported events.",code:5102},UNSUPPORTED_ACCOUNTS:{message:"Unsupported accounts.",code:5103},UNSUPPORTED_NAMESPACE_KEY:{message:"Unsupported namespace key.",code:5104},USER_DISCONNECTED:{message:"User disconnected.",code:6e3},SESSION_SETTLEMENT_FAILED:{message:"Session settlement failed.",code:7e3},WC_METHOD_UNSUPPORTED:{message:"Unsupported wc_ method.",code:10001}};function Lv(a,t){const{message:r,code:s}=Mv[a];return{message:r,code:s}}function so(a,t){return!!Array.isArray(a)}var Or={};/*! *****************************************************************************
2
2
  Copyright (c) Microsoft Corporation.
3
3
 
4
4
  Permission to use, copy, modify, and/or distribute this software for any
@@ -43,4 +43,4 @@ __p += '`),te&&(T+=`' +
43
43
  function print() { __p += __j.call(arguments, '') }
44
44
  `:`;
45
45
  `)+T+`return __p
46
- }`;var Q=tu(function(){return se(d,z+"return "+T).apply(r,g)});if(Q.source=T,Fn(Q))throw Q;return Q}function Vm(e){return ae(e).toLowerCase()}function Km(e){return ae(e).toUpperCase()}function Bm(e,i,n){if(e=ae(e),e&&(n||i===r))return ha(e);if(!e||!(i=He(i)))return e;var c=ot(e),h=ot(i),d=la(c,h),g=pa(c,h)+1;return Mt(c,d,g).join("")}function Jm(e,i,n){if(e=ae(e),e&&(n||i===r))return e.slice(0,fa(e)+1);if(!e||!(i=He(i)))return e;var c=ot(e),h=pa(c,ot(i))+1;return Mt(c,0,h).join("")}function Gm(e,i,n){if(e=ae(e),e&&(n||i===r))return e.replace(Ts,"");if(!e||!(i=He(i)))return e;var c=ot(e),h=la(c,ot(i));return Mt(c,h).join("")}function Wm(e,i){var n=Cr,c=kh;if(fe(i)){var h="separator"in i?i.separator:h;n="length"in i?W(i.length):n,c="omission"in i?He(i.omission):c}e=ae(e);var d=e.length;if(hr(e)){var g=ot(e);d=g.length}if(n>=d)return e;var v=n-lr(c);if(v<1)return c;var E=g?Mt(g,0,v).join(""):e.slice(0,v);if(h===r)return E+c;if(g&&(v+=E.length-v),jn(h)){if(e.slice(v).search(h)){var C,$=E;for(h.global||(h=Qs(h.source,ae(xo.exec(h))+"g")),h.lastIndex=0;C=h.exec($);)var T=C.index;E=E.slice(0,T===r?v:T)}}else if(e.indexOf(He(h),v)!=v){var M=E.lastIndexOf(h);M>-1&&(E=E.slice(0,M))}return E+c}function Qm(e){return e=ae(e),e&&ol.test(e)?e.replace(Ao,Pp):e}var Ym=vr(function(e,i,n){return e+(n?" ":"")+i.toUpperCase()}),Un=rc("toUpperCase");function eu(e,i,n){return e=ae(e),i=n?r:i,i===r?wp(e)?Rp(e):hp(e):e.match(i)||[]}var tu=Y(function(e,i){try{return ze(e,r,i)}catch(n){return Fn(n)?n:new J(n)}}),Zm=Et(function(e,i){return Qe(i,function(n){n=gt(n),_t(e,n,xn(e[n],e))}),e});function Xm(e){var i=e==null?0:e.length,n=H();return e=i?pe(e,function(c){if(typeof c[1]!="function")throw new Ye(l);return[n(c[0]),c[1]]}):[],Y(function(c){for(var h=-1;++h<i;){var d=e[h];if(ze(d[0],this,c))return ze(d[1],this,c)}})}function ev(e){return Pd(Xe(e,x))}function Mn(e){return function(){return e}}function tv(e,i){return e==null||e!==e?i:e}var rv=sc(),iv=sc(!0);function qe(e){return e}function Ln(e){return Fa(typeof e=="function"?e:Xe(e,x))}function sv(e){return Da(Xe(e,x))}function nv(e,i){return qa(e,Xe(i,x))}var ov=Y(function(e,i){return function(n){return Br(n,e,i)}}),av=Y(function(e,i){return function(n){return Br(e,n,i)}});function zn(e,i,n){var c=Ee(i),h=ki(i,c);n==null&&!(fe(i)&&(h.length||!c.length))&&(n=i,i=e,e=this,h=ki(i,Ee(i)));var d=!(fe(n)&&"chain"in n)||!!n.chain,g=Pt(e);return Qe(h,function(v){var E=i[v];e[v]=E,g&&(e.prototype[v]=function(){var C=this.__chain__;if(d||C){var $=e(this.__wrapped__),T=$.__actions__=Fe(this.__actions__);return T.push({func:E,args:arguments,thisArg:e}),$.__chain__=C,$}return E.apply(e,Tt([this.value()],arguments))})}),e}function cv(){return Pe._===this&&(Pe._=Tp),this}function kn(){}function uv(e){return e=W(e),Y(function(i){return Ua(i,e)})}var hv=wn(pe),lv=wn(na),pv=wn(Hs);function ru(e){return On(e)?Vs(gt(e)):zd(e)}function dv(e){return function(i){return e==null?r:Yt(e,i)}}var fv=oc(),gv=oc(!0);function Hn(){return[]}function Vn(){return!1}function yv(){return{}}function mv(){return""}function vv(){return!0}function wv(e,i){if(e=W(e),e<1||e>$t)return[];var n=pt,c=Re(e,pt);i=H(i),e-=pt;for(var h=Js(c,i);++n<e;)i(n);return h}function _v(e){return G(e)?pe(e,gt):Ve(e)?[e]:Fe(Ec(ae(e)))}function bv(e){var i=++$p;return ae(e)+i}var Ev=Gi(function(e,i){return e+i},0),Iv=_n("ceil"),Pv=Gi(function(e,i){return e/i},1),Sv=_n("floor");function Ov(e){return e&&e.length?zi(e,qe,nn):r}function Rv(e,i){return e&&e.length?zi(e,H(i,2),nn):r}function Nv(e){return ca(e,qe)}function Av(e,i){return ca(e,H(i,2))}function Cv(e){return e&&e.length?zi(e,qe,un):r}function $v(e,i){return e&&e.length?zi(e,H(i,2),un):r}var xv=Gi(function(e,i){return e*i},1),Tv=_n("round"),Fv=Gi(function(e,i){return e-i},0);function jv(e){return e&&e.length?Bs(e,qe):0}function Dv(e,i){return e&&e.length?Bs(e,H(i,2)):0}return p.after=sy,p.ary=Tc,p.assign=Ky,p.assignIn=Jc,p.assignInWith=as,p.assignWith=By,p.at=Jy,p.before=Fc,p.bind=xn,p.bindAll=Zm,p.bindKey=jc,p.castArray=yy,p.chain=Cc,p.chunk=Sf,p.compact=Of,p.concat=Rf,p.cond=Xm,p.conforms=ev,p.constant=Mn,p.countBy=jg,p.create=Gy,p.curry=Dc,p.curryRight=qc,p.debounce=Uc,p.defaults=Wy,p.defaultsDeep=Qy,p.defer=ny,p.delay=oy,p.difference=Nf,p.differenceBy=Af,p.differenceWith=Cf,p.drop=$f,p.dropRight=xf,p.dropRightWhile=Tf,p.dropWhile=Ff,p.fill=jf,p.filter=qg,p.flatMap=Lg,p.flatMapDeep=zg,p.flatMapDepth=kg,p.flatten=Oc,p.flattenDeep=Df,p.flattenDepth=qf,p.flip=ay,p.flow=rv,p.flowRight=iv,p.fromPairs=Uf,p.functions=im,p.functionsIn=sm,p.groupBy=Hg,p.initial=Lf,p.intersection=zf,p.intersectionBy=kf,p.intersectionWith=Hf,p.invert=om,p.invertBy=am,p.invokeMap=Kg,p.iteratee=Ln,p.keyBy=Bg,p.keys=Ee,p.keysIn=De,p.map=ts,p.mapKeys=um,p.mapValues=hm,p.matches=sv,p.matchesProperty=nv,p.memoize=is,p.merge=lm,p.mergeWith=Gc,p.method=ov,p.methodOf=av,p.mixin=zn,p.negate=ss,p.nthArg=uv,p.omit=pm,p.omitBy=dm,p.once=cy,p.orderBy=Jg,p.over=hv,p.overArgs=uy,p.overEvery=lv,p.overSome=pv,p.partial=Tn,p.partialRight=Mc,p.partition=Gg,p.pick=fm,p.pickBy=Wc,p.property=ru,p.propertyOf=dv,p.pull=Jf,p.pullAll=Nc,p.pullAllBy=Gf,p.pullAllWith=Wf,p.pullAt=Qf,p.range=fv,p.rangeRight=gv,p.rearg=hy,p.reject=Yg,p.remove=Yf,p.rest=ly,p.reverse=Cn,p.sampleSize=Xg,p.set=ym,p.setWith=mm,p.shuffle=ey,p.slice=Zf,p.sortBy=iy,p.sortedUniq=ng,p.sortedUniqBy=og,p.split=Lm,p.spread=py,p.tail=ag,p.take=cg,p.takeRight=ug,p.takeRightWhile=hg,p.takeWhile=lg,p.tap=Og,p.throttle=dy,p.thru=es,p.toArray=Vc,p.toPairs=Qc,p.toPairsIn=Yc,p.toPath=_v,p.toPlainObject=Bc,p.transform=vm,p.unary=fy,p.union=pg,p.unionBy=dg,p.unionWith=fg,p.uniq=gg,p.uniqBy=yg,p.uniqWith=mg,p.unset=wm,p.unzip=$n,p.unzipWith=Ac,p.update=_m,p.updateWith=bm,p.values=br,p.valuesIn=Em,p.without=vg,p.words=eu,p.wrap=gy,p.xor=wg,p.xorBy=_g,p.xorWith=bg,p.zip=Eg,p.zipObject=Ig,p.zipObjectDeep=Pg,p.zipWith=Sg,p.entries=Qc,p.entriesIn=Yc,p.extend=Jc,p.extendWith=as,zn(p,p),p.add=Ev,p.attempt=tu,p.camelCase=Om,p.capitalize=Zc,p.ceil=Iv,p.clamp=Im,p.clone=my,p.cloneDeep=wy,p.cloneDeepWith=_y,p.cloneWith=vy,p.conformsTo=by,p.deburr=Xc,p.defaultTo=tv,p.divide=Pv,p.endsWith=Rm,p.eq=ct,p.escape=Nm,p.escapeRegExp=Am,p.every=Dg,p.find=Ug,p.findIndex=Pc,p.findKey=Yy,p.findLast=Mg,p.findLastIndex=Sc,p.findLastKey=Zy,p.floor=Sv,p.forEach=$c,p.forEachRight=xc,p.forIn=Xy,p.forInRight=em,p.forOwn=tm,p.forOwnRight=rm,p.get=Dn,p.gt=Ey,p.gte=Iy,p.has=nm,p.hasIn=qn,p.head=Rc,p.identity=qe,p.includes=Vg,p.indexOf=Mf,p.inRange=Pm,p.invoke=cm,p.isArguments=er,p.isArray=G,p.isArrayBuffer=Py,p.isArrayLike=je,p.isArrayLikeObject=ye,p.isBoolean=Sy,p.isBuffer=Lt,p.isDate=Oy,p.isElement=Ry,p.isEmpty=Ny,p.isEqual=Ay,p.isEqualWith=Cy,p.isError=Fn,p.isFinite=$y,p.isFunction=Pt,p.isInteger=Lc,p.isLength=ns,p.isMap=zc,p.isMatch=xy,p.isMatchWith=Ty,p.isNaN=Fy,p.isNative=jy,p.isNil=qy,p.isNull=Dy,p.isNumber=kc,p.isObject=fe,p.isObjectLike=ge,p.isPlainObject=Zr,p.isRegExp=jn,p.isSafeInteger=Uy,p.isSet=Hc,p.isString=os,p.isSymbol=Ve,p.isTypedArray=_r,p.isUndefined=My,p.isWeakMap=Ly,p.isWeakSet=zy,p.join=Vf,p.kebabCase=Cm,p.last=tt,p.lastIndexOf=Kf,p.lowerCase=$m,p.lowerFirst=xm,p.lt=ky,p.lte=Hy,p.max=Ov,p.maxBy=Rv,p.mean=Nv,p.meanBy=Av,p.min=Cv,p.minBy=$v,p.stubArray=Hn,p.stubFalse=Vn,p.stubObject=yv,p.stubString=mv,p.stubTrue=vv,p.multiply=xv,p.nth=Bf,p.noConflict=cv,p.noop=kn,p.now=rs,p.pad=Tm,p.padEnd=Fm,p.padStart=jm,p.parseInt=Dm,p.random=Sm,p.reduce=Wg,p.reduceRight=Qg,p.repeat=qm,p.replace=Um,p.result=gm,p.round=Tv,p.runInContext=b,p.sample=Zg,p.size=ty,p.snakeCase=Mm,p.some=ry,p.sortedIndex=Xf,p.sortedIndexBy=eg,p.sortedIndexOf=tg,p.sortedLastIndex=rg,p.sortedLastIndexBy=ig,p.sortedLastIndexOf=sg,p.startCase=zm,p.startsWith=km,p.subtract=Fv,p.sum=jv,p.sumBy=Dv,p.template=Hm,p.times=wv,p.toFinite=St,p.toInteger=W,p.toLength=Kc,p.toLower=Vm,p.toNumber=rt,p.toSafeInteger=Vy,p.toString=ae,p.toUpper=Km,p.trim=Bm,p.trimEnd=Jm,p.trimStart=Gm,p.truncate=Wm,p.unescape=Qm,p.uniqueId=bv,p.upperCase=Ym,p.upperFirst=Un,p.each=$c,p.eachRight=xc,p.first=Rc,zn(p,function(){var e={};return dt(p,function(i,n){ce.call(p.prototype,n)||(e[n]=i)}),e}(),{chain:!1}),p.VERSION=s,Qe(["bind","bindKey","curry","curryRight","partial","partialRight"],function(e){p[e].placeholder=p}),Qe(["drop","take"],function(e,i){ee.prototype[e]=function(n){n=n===r?1:be(W(n),0);var c=this.__filtered__&&!i?new ee(this):this.clone();return c.__filtered__?c.__takeCount__=Re(n,c.__takeCount__):c.__views__.push({size:Re(n,pt),type:e+(c.__dir__<0?"Right":"")}),c},ee.prototype[e+"Right"]=function(n){return this.reverse()[e](n).reverse()}}),Qe(["filter","map","takeWhile"],function(e,i){var n=i+1,c=n==Oo||n==Bh;ee.prototype[e]=function(h){var d=this.clone();return d.__iteratees__.push({iteratee:H(h,3),type:n}),d.__filtered__=d.__filtered__||c,d}}),Qe(["head","last"],function(e,i){var n="take"+(i?"Right":"");ee.prototype[e]=function(){return this[n](1).value()[0]}}),Qe(["initial","tail"],function(e,i){var n="drop"+(i?"":"Right");ee.prototype[e]=function(){return this.__filtered__?new ee(this):this[n](1)}}),ee.prototype.compact=function(){return this.filter(qe)},ee.prototype.find=function(e){return this.filter(e).head()},ee.prototype.findLast=function(e){return this.reverse().find(e)},ee.prototype.invokeMap=Y(function(e,i){return typeof e=="function"?new ee(this):this.map(function(n){return Br(n,e,i)})}),ee.prototype.reject=function(e){return this.filter(ss(H(e)))},ee.prototype.slice=function(e,i){e=W(e);var n=this;return n.__filtered__&&(e>0||i<0)?new ee(n):(e<0?n=n.takeRight(-e):e&&(n=n.drop(e)),i!==r&&(i=W(i),n=i<0?n.dropRight(-i):n.take(i-e)),n)},ee.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},ee.prototype.toArray=function(){return this.take(pt)},dt(ee.prototype,function(e,i){var n=/^(?:filter|find|map|reject)|While$/.test(i),c=/^(?:head|last)$/.test(i),h=p[c?"take"+(i=="last"?"Right":""):i],d=c||/^find/.test(i);h&&(p.prototype[i]=function(){var g=this.__wrapped__,v=c?[1]:arguments,E=g instanceof ee,C=v[0],$=E||G(g),T=function(Z){var te=h.apply(p,Tt([Z],v));return c&&M?te[0]:te};$&&n&&typeof C=="function"&&C.length!=1&&(E=$=!1);var M=this.__chain__,z=!!this.__actions__.length,V=d&&!M,Q=E&&!z;if(!d&&$){g=Q?g:new ee(this);var K=e.apply(g,v);return K.__actions__.push({func:es,args:[T],thisArg:r}),new Ze(K,M)}return V&&Q?e.apply(this,v):(K=this.thru(T),V?c?K.value()[0]:K.value():K)})}),Qe(["pop","push","shift","sort","splice","unshift"],function(e){var i=Oi[e],n=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",c=/^(?:pop|shift)$/.test(e);p.prototype[e]=function(){var h=arguments;if(c&&!this.__chain__){var d=this.value();return i.apply(G(d)?d:[],h)}return this[n](function(g){return i.apply(G(g)?g:[],h)})}}),dt(ee.prototype,function(e,i){var n=p[i];if(n){var c=n.name+"";ce.call(gr,c)||(gr[c]=[]),gr[c].push({name:i,func:n})}}),gr[Ji(r,oe).name]=[{name:"wrapper",func:r}],ee.prototype.clone=Wp,ee.prototype.reverse=Qp,ee.prototype.value=Yp,p.prototype.at=Rg,p.prototype.chain=Ng,p.prototype.commit=Ag,p.prototype.next=Cg,p.prototype.plant=xg,p.prototype.reverse=Tg,p.prototype.toJSON=p.prototype.valueOf=p.prototype.value=Fg,p.prototype.first=p.prototype.head,Mr&&(p.prototype[Mr]=$g),p},pr=Np();Bt?((Bt.exports=pr)._=pr,Ms._=pr):Pe._=pr}).call(ni)})(yo,yo.exports);var Bb=Object.defineProperty,Jb=Object.defineProperties,Gb=Object.getOwnPropertyDescriptors,Zu=Object.getOwnPropertySymbols,Wb=Object.prototype.hasOwnProperty,Qb=Object.prototype.propertyIsEnumerable,Xu=(a,t,r)=>t in a?Bb(a,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):a[t]=r,hs=(a,t)=>{for(var r in t||(t={}))Wb.call(t,r)&&Xu(a,r,t[r]);if(Zu)for(var r of Zu(t))Qb.call(t,r)&&Xu(a,r,t[r]);return a},Yb=(a,t)=>Jb(a,Gb(t));function Ht(a,t,r){var s;const o=Sw(a);return((s=t.rpcMap)==null?void 0:s[o.reference])||`${Kb}?chainId=${o.namespace}:${o.reference}&projectId=${r}`}function nr(a){return a.includes(":")?a.split(":")[1]:a}function Uh(a){return a.map(t=>`${t.split(":")[0]}:${t.split(":")[1]}`)}function Zb(a,t){const r=Object.keys(t.namespaces).filter(o=>o.includes(a));if(!r.length)return[];const s=[];return r.forEach(o=>{const u=t.namespaces[o].accounts;s.push(...u)}),s}function Xb(a={},t={}){const r=eh(a),s=eh(t);return yo.exports.merge(r,s)}function eh(a){var t,r,s,o;const u={};if(!Sr(a))return u;for(const[l,y]of Object.entries(a)){const I=_o(l)?[l]:y.chains,S=y.methods||[],R=y.events||[],x=y.rpcMap||{},j=oi(l);u[j]=Yb(hs(hs({},u[j]),y),{chains:Jn(I,(t=u[j])==null?void 0:t.chains),methods:Jn(S,(r=u[j])==null?void 0:r.methods),events:Jn(R,(s=u[j])==null?void 0:s.events),rpcMap:hs(hs({},x),(o=u[j])==null?void 0:o.rpcMap)})}return u}function eE(a){return a.includes(":")?a.split(":")[2]:a}function tE(a){const t={};for(const[r,s]of Object.entries(a)){const o=s.methods||[],u=s.events||[],l=s.accounts||[],y=_o(r)?[r]:s.chains?s.chains:Uh(s.accounts);t[r]={chains:y,methods:o,events:u,accounts:l}}return t}function eo(a){return typeof a=="number"?a:a.includes("0x")?parseInt(a,16):a.includes(":")?Number(a.split(":")[1]):Number(a)}const Mh={},de=a=>Mh[a],to=(a,t)=>{Mh[a]=t};class rE{constructor(t){this.name="polkadot",this.namespace=t.namespace,this.events=de("events"),this.client=de("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(t){this.namespace=Object.assign(this.namespace,t)}requestAccounts(){return this.getAccounts()}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const t=this.namespace.chains[0];if(!t)throw new Error("ChainId not found");return t.split(":")[1]}request(t){return this.namespace.methods.includes(t.request.method)?this.client.request(t):this.getHttpProvider().request(t.request)}setDefaultChain(t,r){this.httpProviders[t]||this.setHttpProvider(t,r),this.chainId=t,this.events.emit(Ct.DEFAULT_CHAIN_CHANGED,`${this.name}:${t}`)}getAccounts(){const t=this.namespace.accounts;return t?t.filter(r=>r.split(":")[1]===this.chainId.toString()).map(r=>r.split(":")[2])||[]:[]}createHttpProviders(){const t={};return this.namespace.chains.forEach(r=>{var s;const o=nr(r);t[o]=this.createHttpProvider(o,(s=this.namespace.rpcMap)==null?void 0:s[r])}),t}getHttpProvider(){const t=`${this.name}:${this.chainId}`,r=this.httpProviders[t];if(typeof r>"u")throw new Error(`JSON-RPC provider for ${t} not found`);return r}setHttpProvider(t,r){const s=this.createHttpProvider(t,r);s&&(this.httpProviders[t]=s)}createHttpProvider(t,r){const s=r||Ht(t,this.namespace,this.client.core.projectId);if(!s)throw new Error(`No RPC url provided for chainId: ${t}`);return new At(new Vt(s,de("disableProviderPing")))}}class iE{constructor(t){this.name="eip155",this.namespace=t.namespace,this.events=de("events"),this.client=de("client"),this.httpProviders=this.createHttpProviders(),this.chainId=parseInt(this.getDefaultChain())}async request(t){switch(t.request.method){case"eth_requestAccounts":return this.getAccounts();case"eth_accounts":return this.getAccounts();case"wallet_switchEthereumChain":return await this.handleSwitchChain(t);case"eth_chainId":return parseInt(this.getDefaultChain())}return this.namespace.methods.includes(t.request.method)?await this.client.request(t):this.getHttpProvider().request(t.request)}updateNamespace(t){this.namespace=Object.assign(this.namespace,t)}setDefaultChain(t,r){this.httpProviders[t]||this.setHttpProvider(parseInt(t),r),this.chainId=parseInt(t),this.events.emit(Ct.DEFAULT_CHAIN_CHANGED,`${this.name}:${t}`)}requestAccounts(){return this.getAccounts()}getDefaultChain(){if(this.chainId)return this.chainId.toString();if(this.namespace.defaultChain)return this.namespace.defaultChain;const t=this.namespace.chains[0];if(!t)throw new Error("ChainId not found");return t.split(":")[1]}createHttpProvider(t,r){const s=r||Ht(`${this.name}:${t}`,this.namespace,this.client.core.projectId);if(!s)throw new Error(`No RPC url provided for chainId: ${t}`);return new At(new Vt(s,de("disableProviderPing")))}setHttpProvider(t,r){const s=this.createHttpProvider(t,r);s&&(this.httpProviders[t]=s)}createHttpProviders(){const t={};return this.namespace.chains.forEach(r=>{var s;const o=parseInt(nr(r));t[o]=this.createHttpProvider(o,(s=this.namespace.rpcMap)==null?void 0:s[r])}),t}getAccounts(){const t=this.namespace.accounts;return t?[...new Set(t.filter(r=>r.split(":")[1]===this.chainId.toString()).map(r=>r.split(":")[2]))]:[]}getHttpProvider(){const t=this.chainId,r=this.httpProviders[t];if(typeof r>"u")throw new Error(`JSON-RPC provider for ${t} not found`);return r}async handleSwitchChain(t){var r,s;let o=t.request.params?(r=t.request.params[0])==null?void 0:r.chainId:"0x0";o=o.startsWith("0x")?o:`0x${o}`;const u=parseInt(o,16);if(this.isChainApproved(u))this.setDefaultChain(`${u}`);else if(this.namespace.methods.includes("wallet_switchEthereumChain"))await this.client.request({topic:t.topic,request:{method:t.request.method,params:[{chainId:o}]},chainId:(s=this.namespace.chains)==null?void 0:s[0]}),this.setDefaultChain(`${u}`);else throw new Error(`Failed to switch to chain 'eip155:${u}'. The chain is not approved or the wallet does not support 'wallet_switchEthereumChain' method.`);return null}isChainApproved(t){return this.namespace.chains.includes(`${this.name}:${t}`)}}class sE{constructor(t){this.name="solana",this.namespace=t.namespace,this.events=de("events"),this.client=de("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(t){this.namespace=Object.assign(this.namespace,t)}requestAccounts(){return this.getAccounts()}request(t){return this.namespace.methods.includes(t.request.method)?this.client.request(t):this.getHttpProvider().request(t.request)}setDefaultChain(t,r){this.httpProviders[t]||this.setHttpProvider(t,r),this.chainId=t,this.events.emit(Ct.DEFAULT_CHAIN_CHANGED,`${this.name}:${t}`)}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const t=this.namespace.chains[0];if(!t)throw new Error("ChainId not found");return t.split(":")[1]}getAccounts(){const t=this.namespace.accounts;return t?[...new Set(t.filter(r=>r.split(":")[1]===this.chainId.toString()).map(r=>r.split(":")[2]))]:[]}createHttpProviders(){const t={};return this.namespace.chains.forEach(r=>{var s;const o=nr(r);t[o]=this.createHttpProvider(o,(s=this.namespace.rpcMap)==null?void 0:s[r])}),t}getHttpProvider(){const t=`${this.name}:${this.chainId}`,r=this.httpProviders[t];if(typeof r>"u")throw new Error(`JSON-RPC provider for ${t} not found`);return r}setHttpProvider(t,r){const s=this.createHttpProvider(t,r);s&&(this.httpProviders[t]=s)}createHttpProvider(t,r){const s=r||Ht(t,this.namespace,this.client.core.projectId);if(!s)throw new Error(`No RPC url provided for chainId: ${t}`);return new At(new Vt(s,de("disableProviderPing")))}}class nE{constructor(t){this.name="cosmos",this.namespace=t.namespace,this.events=de("events"),this.client=de("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(t){this.namespace=Object.assign(this.namespace,t)}requestAccounts(){return this.getAccounts()}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const t=this.namespace.chains[0];if(!t)throw new Error("ChainId not found");return t.split(":")[1]}request(t){return this.namespace.methods.includes(t.request.method)?this.client.request(t):this.getHttpProvider().request(t.request)}setDefaultChain(t,r){this.httpProviders[t]||this.setHttpProvider(t,r),this.chainId=t,this.events.emit(Ct.DEFAULT_CHAIN_CHANGED,`${this.name}:${this.chainId}`)}getAccounts(){const t=this.namespace.accounts;return t?[...new Set(t.filter(r=>r.split(":")[1]===this.chainId.toString()).map(r=>r.split(":")[2]))]:[]}createHttpProviders(){const t={};return this.namespace.chains.forEach(r=>{var s;const o=nr(r);t[o]=this.createHttpProvider(o,(s=this.namespace.rpcMap)==null?void 0:s[r])}),t}getHttpProvider(){const t=`${this.name}:${this.chainId}`,r=this.httpProviders[t];if(typeof r>"u")throw new Error(`JSON-RPC provider for ${t} not found`);return r}setHttpProvider(t,r){const s=this.createHttpProvider(t,r);s&&(this.httpProviders[t]=s)}createHttpProvider(t,r){const s=r||Ht(t,this.namespace,this.client.core.projectId);if(!s)throw new Error(`No RPC url provided for chainId: ${t}`);return new At(new Vt(s,de("disableProviderPing")))}}class oE{constructor(t){this.name="cip34",this.namespace=t.namespace,this.events=de("events"),this.client=de("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(t){this.namespace=Object.assign(this.namespace,t)}requestAccounts(){return this.getAccounts()}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const t=this.namespace.chains[0];if(!t)throw new Error("ChainId not found");return t.split(":")[1]}request(t){return this.namespace.methods.includes(t.request.method)?this.client.request(t):this.getHttpProvider().request(t.request)}setDefaultChain(t,r){this.httpProviders[t]||this.setHttpProvider(t,r),this.chainId=t,this.events.emit(Ct.DEFAULT_CHAIN_CHANGED,`${this.name}:${this.chainId}`)}getAccounts(){const t=this.namespace.accounts;return t?[...new Set(t.filter(r=>r.split(":")[1]===this.chainId.toString()).map(r=>r.split(":")[2]))]:[]}createHttpProviders(){const t={};return this.namespace.chains.forEach(r=>{const s=this.getCardanoRPCUrl(r),o=nr(r);t[o]=this.createHttpProvider(o,s)}),t}getHttpProvider(){const t=`${this.name}:${this.chainId}`,r=this.httpProviders[t];if(typeof r>"u")throw new Error(`JSON-RPC provider for ${t} not found`);return r}getCardanoRPCUrl(t){const r=this.namespace.rpcMap;if(r)return r[t]}setHttpProvider(t,r){const s=this.createHttpProvider(t,r);s&&(this.httpProviders[t]=s)}createHttpProvider(t,r){const s=r||this.getCardanoRPCUrl(t);if(!s)throw new Error(`No RPC url provided for chainId: ${t}`);return new At(new Vt(s,de("disableProviderPing")))}}class aE{constructor(t){this.name="elrond",this.namespace=t.namespace,this.events=de("events"),this.client=de("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(t){this.namespace=Object.assign(this.namespace,t)}requestAccounts(){return this.getAccounts()}request(t){return this.namespace.methods.includes(t.request.method)?this.client.request(t):this.getHttpProvider().request(t.request)}setDefaultChain(t,r){this.httpProviders[t]||this.setHttpProvider(t,r),this.chainId=t,this.events.emit(Ct.DEFAULT_CHAIN_CHANGED,`${this.name}:${t}`)}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const t=this.namespace.chains[0];if(!t)throw new Error("ChainId not found");return t.split(":")[1]}getAccounts(){const t=this.namespace.accounts;return t?[...new Set(t.filter(r=>r.split(":")[1]===this.chainId.toString()).map(r=>r.split(":")[2]))]:[]}createHttpProviders(){const t={};return this.namespace.chains.forEach(r=>{var s;const o=nr(r);t[o]=this.createHttpProvider(o,(s=this.namespace.rpcMap)==null?void 0:s[r])}),t}getHttpProvider(){const t=`${this.name}:${this.chainId}`,r=this.httpProviders[t];if(typeof r>"u")throw new Error(`JSON-RPC provider for ${t} not found`);return r}setHttpProvider(t,r){const s=this.createHttpProvider(t,r);s&&(this.httpProviders[t]=s)}createHttpProvider(t,r){const s=r||Ht(t,this.namespace,this.client.core.projectId);if(!s)throw new Error(`No RPC url provided for chainId: ${t}`);return new At(new Vt(s,de("disableProviderPing")))}}class cE{constructor(t){this.name="multiversx",this.namespace=t.namespace,this.events=de("events"),this.client=de("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(t){this.namespace=Object.assign(this.namespace,t)}requestAccounts(){return this.getAccounts()}request(t){return this.namespace.methods.includes(t.request.method)?this.client.request(t):this.getHttpProvider().request(t.request)}setDefaultChain(t,r){this.httpProviders[t]||this.setHttpProvider(t,r),this.chainId=t,this.events.emit(Ct.DEFAULT_CHAIN_CHANGED,`${this.name}:${t}`)}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const t=this.namespace.chains[0];if(!t)throw new Error("ChainId not found");return t.split(":")[1]}getAccounts(){const t=this.namespace.accounts;return t?[...new Set(t.filter(r=>r.split(":")[1]===this.chainId.toString()).map(r=>r.split(":")[2]))]:[]}createHttpProviders(){const t={};return this.namespace.chains.forEach(r=>{var s;const o=nr(r);t[o]=this.createHttpProvider(o,(s=this.namespace.rpcMap)==null?void 0:s[r])}),t}getHttpProvider(){const t=`${this.name}:${this.chainId}`,r=this.httpProviders[t];if(typeof r>"u")throw new Error(`JSON-RPC provider for ${t} not found`);return r}setHttpProvider(t,r){const s=this.createHttpProvider(t,r);s&&(this.httpProviders[t]=s)}createHttpProvider(t,r){const s=r||Ht(t,this.namespace,this.client.core.projectId);if(!s)throw new Error(`No RPC url provided for chainId: ${t}`);return new At(new Vt(s,de("disableProviderPing")))}}class uE{constructor(t){this.name="near",this.namespace=t.namespace,this.events=de("events"),this.client=de("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(t){this.namespace=Object.assign(this.namespace,t)}requestAccounts(){return this.getAccounts()}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const t=this.namespace.chains[0];if(!t)throw new Error("ChainId not found");return t.split(":")[1]}request(t){return this.namespace.methods.includes(t.request.method)?this.client.request(t):this.getHttpProvider().request(t.request)}setDefaultChain(t,r){if(this.chainId=t,!this.httpProviders[t]){const s=r||Ht(`${this.name}:${t}`,this.namespace);if(!s)throw new Error(`No RPC url provided for chainId: ${t}`);this.setHttpProvider(t,s)}this.events.emit(Ct.DEFAULT_CHAIN_CHANGED,`${this.name}:${this.chainId}`)}getAccounts(){const t=this.namespace.accounts;return t?t.filter(r=>r.split(":")[1]===this.chainId.toString()).map(r=>r.split(":")[2])||[]:[]}createHttpProviders(){const t={};return this.namespace.chains.forEach(r=>{var s;t[r]=this.createHttpProvider(r,(s=this.namespace.rpcMap)==null?void 0:s[r])}),t}getHttpProvider(){const t=`${this.name}:${this.chainId}`,r=this.httpProviders[t];if(typeof r>"u")throw new Error(`JSON-RPC provider for ${t} not found`);return r}setHttpProvider(t,r){const s=this.createHttpProvider(t,r);s&&(this.httpProviders[t]=s)}createHttpProvider(t,r){const s=r||Ht(t,this.namespace);return typeof s>"u"?void 0:new At(new Vt(s,de("disableProviderPing")))}}var hE=Object.defineProperty,lE=Object.defineProperties,pE=Object.getOwnPropertyDescriptors,th=Object.getOwnPropertySymbols,dE=Object.prototype.hasOwnProperty,fE=Object.prototype.propertyIsEnumerable,rh=(a,t,r)=>t in a?hE(a,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):a[t]=r,ls=(a,t)=>{for(var r in t||(t={}))dE.call(t,r)&&rh(a,r,t[r]);if(th)for(var r of th(t))fE.call(t,r)&&rh(a,r,t[r]);return a},ro=(a,t)=>lE(a,pE(t));class So{constructor(t){this.events=new Ge.Dt,this.rpcProviders={},this.shouldAbortPairingAttempt=!1,this.maxPairingAttempts=10,this.disableProviderPing=!1,this.providerOpts=t,this.logger=typeof(t==null?void 0:t.logger)<"u"&&typeof(t==null?void 0:t.logger)!="string"?t.logger:N.ot(N.k({level:(t==null?void 0:t.logger)||Qu})),this.disableProviderPing=(t==null?void 0:t.disableProviderPing)||!1}static async init(t){const r=new So(t);return await r.initialize(),r}async request(t,r){const[s,o]=this.validateChain(r);if(!this.session)throw new Error("Please call connect() before request()");return await this.getProvider(s).request({request:ls({},t),chainId:`${s}:${o}`,topic:this.session.topic})}sendAsync(t,r,s){const o=new Date().getTime();this.request(t,s).then(u=>r(null,N.formatJsonRpcResult(o,u))).catch(u=>r(u,void 0))}async enable(){if(!this.client)throw new Error("Sign Client not initialized");return this.session||await this.connect({namespaces:this.namespaces,optionalNamespaces:this.optionalNamespaces,sessionProperties:this.sessionProperties}),await this.requestAccounts()}async disconnect(){var t;if(!this.session)throw new Error("Please call connect() before enable()");await this.client.disconnect({topic:(t=this.session)==null?void 0:t.topic,reason:ve("USER_DISCONNECTED")}),await this.cleanup()}async connect(t){if(!this.client)throw new Error("Sign Client not initialized");if(this.setNamespaces(t),await this.cleanupPendingPairings(),!t.skipPairing)return await this.pair(t.pairingTopic)}on(t,r){this.events.on(t,r)}once(t,r){this.events.once(t,r)}removeListener(t,r){this.events.removeListener(t,r)}off(t,r){this.events.off(t,r)}get isWalletConnect(){return!0}async pair(t){this.shouldAbortPairingAttempt=!1;let r=0;do{if(this.shouldAbortPairingAttempt)throw new Error("Pairing aborted");if(r>=this.maxPairingAttempts)throw new Error("Max auto pairing attempts reached");const{uri:s,approval:o}=await this.client.connect({pairingTopic:t,requiredNamespaces:this.namespaces,optionalNamespaces:this.optionalNamespaces,sessionProperties:this.sessionProperties});s&&(this.uri=s,this.events.emit("display_uri",s)),await o().then(u=>{this.session=u,this.namespaces||(this.namespaces=tE(u.namespaces),this.persist("namespaces",this.namespaces))}).catch(u=>{if(u.message!==Dh)throw u;r++})}while(!this.session);return this.onConnect(),this.session}setDefaultChain(t,r){try{if(!this.session)return;const[s,o]=this.validateChain(t);this.getProvider(s).setDefaultChain(o,r)}catch(s){if(!/Please call connect/.test(s.message))throw s}}async cleanupPendingPairings(t={}){this.logger.info("Cleaning up inactive pairings...");const r=this.client.pairing.getAll();if(ir(r)){for(const s of r)t.deletePairings?this.client.core.expirer.set(s.topic,0):await this.client.core.relayer.subscriber.unsubscribe(s.topic);this.logger.info(`Inactive pairings cleared: ${r.length}`)}}abortPairingAttempt(){this.shouldAbortPairingAttempt=!0}async checkStorage(){if(this.namespaces=await this.getFromStore("namespaces"),this.optionalNamespaces=await this.getFromStore("optionalNamespaces")||{},this.client.session.length){const t=this.client.session.keys.length-1;this.session=this.client.session.get(this.client.session.keys[t]),this.createProviders()}}async initialize(){this.logger.trace("Initialized"),await this.createClient(),await this.checkStorage(),this.registerEventListeners()}async createClient(){this.client=this.providerOpts.client||await Fb.init({logger:this.providerOpts.logger||Qu,relayUrl:this.providerOpts.relayUrl||kb,projectId:this.providerOpts.projectId,metadata:this.providerOpts.metadata,storageOptions:this.providerOpts.storageOptions,storage:this.providerOpts.storage,name:this.providerOpts.name}),this.logger.trace("SignClient Initialized")}createProviders(){if(!this.client)throw new Error("Sign Client not initialized");if(!this.session)throw new Error("Session not initialized. Please call connect() before enable()");const t=[...new Set(Object.keys(this.session.namespaces).map(r=>oi(r)))];to("client",this.client),to("events",this.events),to("disableProviderPing",this.disableProviderPing),t.forEach(r=>{if(!this.session)return;const s=Zb(r,this.session),o=Uh(s),u=Xb(this.namespaces,this.optionalNamespaces),l=ro(ls({},u[r]),{accounts:s,chains:o});switch(r){case"eip155":this.rpcProviders[r]=new iE({namespace:l});break;case"solana":this.rpcProviders[r]=new sE({namespace:l});break;case"cosmos":this.rpcProviders[r]=new nE({namespace:l});break;case"polkadot":this.rpcProviders[r]=new rE({namespace:l});break;case"cip34":this.rpcProviders[r]=new oE({namespace:l});break;case"elrond":this.rpcProviders[r]=new aE({namespace:l});break;case"multiversx":this.rpcProviders[r]=new cE({namespace:l});break;case"near":this.rpcProviders[r]=new uE({namespace:l});break}})}registerEventListeners(){if(typeof this.client>"u")throw new Error("Sign Client is not initialized");this.client.on("session_ping",t=>{this.events.emit("session_ping",t)}),this.client.on("session_event",t=>{const{params:r}=t,{event:s}=r;if(s.name==="accountsChanged"){const o=s.data;o&&ir(o)&&this.events.emit("accountsChanged",o.map(eE))}else if(s.name==="chainChanged"){const o=r.chainId,u=r.event.data,l=oi(o),y=eo(o)!==eo(u)?`${l}:${eo(u)}`:o;this.onChainChanged(y)}else this.events.emit(s.name,s.data);this.events.emit("session_event",t)}),this.client.on("session_update",({topic:t,params:r})=>{var s;const{namespaces:o}=r,u=(s=this.client)==null?void 0:s.session.get(t);this.session=ro(ls({},u),{namespaces:o}),this.onSessionUpdate(),this.events.emit("session_update",{topic:t,params:r})}),this.client.on("session_delete",async t=>{await this.cleanup(),this.events.emit("session_delete",t),this.events.emit("disconnect",ro(ls({},ve("USER_DISCONNECTED")),{data:t.topic}))}),this.on(Ct.DEFAULT_CHAIN_CHANGED,t=>{this.onChainChanged(t,!0)})}getProvider(t){if(!this.rpcProviders[t])throw new Error(`Provider not found: ${t}`);return this.rpcProviders[t]}onSessionUpdate(){Object.keys(this.rpcProviders).forEach(t=>{var r;this.getProvider(t).updateNamespace((r=this.session)==null?void 0:r.namespaces[t])})}setNamespaces(t){const{namespaces:r,optionalNamespaces:s,sessionProperties:o}=t;r&&Object.keys(r).length&&(this.namespaces=r),s&&Object.keys(s).length&&(this.optionalNamespaces=s),this.sessionProperties=o,this.persist("namespaces",r),this.persist("optionalNamespaces",s)}validateChain(t){const[r,s]=(t==null?void 0:t.split(":"))||["",""];if(!this.namespaces||!Object.keys(this.namespaces).length)return[r,s];if(r&&!Object.keys(this.namespaces||{}).map(l=>oi(l)).includes(r))throw new Error(`Namespace '${r}' is not configured. Please call connect() first with namespace config.`);if(r&&s)return[r,s];const o=oi(Object.keys(this.namespaces)[0]),u=this.rpcProviders[o].getDefaultChain();return[o,u]}async requestAccounts(){const[t]=this.validateChain();return await this.getProvider(t).requestAccounts()}onChainChanged(t,r=!1){var s;if(!this.namespaces)return;const[o,u]=this.validateChain(t);r||this.getProvider(o).setDefaultChain(u),((s=this.namespaces[o])!=null?s:this.namespaces[`${o}:${u}`]).defaultChain=u,this.persist("namespaces",this.namespaces),this.events.emit("chainChanged",u)}onConnect(){this.createProviders(),this.events.emit("connect",{session:this.session})}async cleanup(){this.session=void 0,this.namespaces=void 0,this.optionalNamespaces=void 0,this.sessionProperties=void 0,this.persist("namespaces",void 0),this.persist("optionalNamespaces",void 0),this.persist("sessionProperties",void 0),await this.cleanupPendingPairings({deletePairings:!0})}persist(t,r){this.client.core.storage.setItem(`${Yu}/${t}`,r)}async getFromStore(t){return await this.client.core.storage.getItem(`${Yu}/${t}`)}}const gE=So,yE="wc",mE="ethereum_provider",vE=`${yE}@2:${mE}:`,wE="https://rpc.walletconnect.com/v1/",ys=["eth_sendTransaction","personal_sign"],Lh=["eth_accounts","eth_requestAccounts","eth_sendRawTransaction","eth_sign","eth_signTransaction","eth_signTypedData","eth_signTypedData_v3","eth_signTypedData_v4","eth_sendTransaction","personal_sign","wallet_switchEthereumChain","wallet_addEthereumChain","wallet_getPermissions","wallet_requestPermissions","wallet_registerOnboarding","wallet_watchAsset","wallet_scanQRCode"],ms=["chainChanged","accountsChanged"],zh=["chainChanged","accountsChanged","message","disconnect","connect"];var _E=Object.defineProperty,bE=Object.defineProperties,EE=Object.getOwnPropertyDescriptors,ih=Object.getOwnPropertySymbols,IE=Object.prototype.hasOwnProperty,PE=Object.prototype.propertyIsEnumerable,sh=(a,t,r)=>t in a?_E(a,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):a[t]=r,ci=(a,t)=>{for(var r in t||(t={}))IE.call(t,r)&&sh(a,r,t[r]);if(ih)for(var r of ih(t))PE.call(t,r)&&sh(a,r,t[r]);return a},nh=(a,t)=>bE(a,EE(t));function vs(a){return Number(a[0].split(":")[1])}function io(a){return`0x${a.toString(16)}`}function SE(a){const{chains:t,optionalChains:r,methods:s,optionalMethods:o,events:u,optionalEvents:l,rpcMap:y}=a;if(!so(t))throw new Error("Invalid chains");const I={chains:t,methods:s||ys,events:u||ms,rpcMap:ci({},t.length?{[vs(t)]:y[vs(t)]}:{})},S=u==null?void 0:u.filter(B=>!ms.includes(B)),R=s==null?void 0:s.filter(B=>!ys.includes(B));if(!r&&!l&&!o&&!(S!=null&&S.length)&&!(R!=null&&R.length))return{required:t.length?I:void 0};const x=(S==null?void 0:S.length)&&(R==null?void 0:R.length)||!r,j={chains:[...new Set(x?I.chains.concat(r||[]):r)],methods:[...new Set(I.methods.concat(o!=null&&o.length?o:Lh))],events:[...new Set(I.events.concat(l!=null&&l.length?l:zh))],rpcMap:y};return{required:t.length?I:void 0,optional:r.length?j:void 0}}class Es{constructor(){this.events=new Ge.eventsExports.EventEmitter,this.namespace="eip155",this.accounts=[],this.chainId=1,this.STORAGE_KEY=vE,this.on=(t,r)=>(this.events.on(t,r),this),this.once=(t,r)=>(this.events.once(t,r),this),this.removeListener=(t,r)=>(this.events.removeListener(t,r),this),this.off=(t,r)=>(this.events.off(t,r),this),this.parseAccount=t=>this.isCompatibleChainId(t)?this.parseAccountId(t).address:t,this.signer={},this.rpc={}}static async init(t){const r=new Es;return await r.initialize(t),r}async request(t){return await this.signer.request(t,this.formatChainId(this.chainId))}sendAsync(t,r){this.signer.sendAsync(t,r,this.formatChainId(this.chainId))}get connected(){return this.signer.client?this.signer.client.core.relayer.connected:!1}get connecting(){return this.signer.client?this.signer.client.core.relayer.connecting:!1}async enable(){return this.session||await this.connect(),await this.request({method:"eth_requestAccounts"})}async connect(t){if(!this.signer.client)throw new Error("Provider not initialized. Call init() first");this.loadConnectOpts(t);const{required:r,optional:s}=SE(this.rpc);try{const o=await new Promise(async(l,y)=>{var I;this.rpc.showQrModal&&((I=this.modal)==null||I.subscribeModal(S=>{!S.open&&!this.signer.session&&(this.signer.abortPairingAttempt(),y(new Error("Connection request reset. Please try again.")))})),await this.signer.connect(nh(ci({namespaces:ci({},r&&{[this.namespace]:r})},s&&{optionalNamespaces:{[this.namespace]:s}}),{pairingTopic:t==null?void 0:t.pairingTopic})).then(S=>{l(S)}).catch(S=>{y(new Error(S.message))})});if(!o)return;const u=Uv(o.namespaces,[this.namespace]);this.setChainIds(this.rpc.chains.length?this.rpc.chains:u),this.setAccounts(u),this.events.emit("connect",{chainId:io(this.chainId)})}catch(o){throw this.signer.logger.error(o),o}finally{this.modal&&this.modal.closeModal()}}async disconnect(){this.session&&await this.signer.disconnect(),this.reset()}get isWalletConnect(){return!0}get session(){return this.signer.session}registerEventListeners(){this.signer.on("session_event",t=>{const{params:r}=t,{event:s}=r;s.name==="accountsChanged"?(this.accounts=this.parseAccounts(s.data),this.events.emit("accountsChanged",this.accounts)):s.name==="chainChanged"?this.setChainId(this.formatChainId(s.data)):this.events.emit(s.name,s.data),this.events.emit("session_event",t)}),this.signer.on("chainChanged",t=>{const r=parseInt(t);this.chainId=r,this.events.emit("chainChanged",io(this.chainId)),this.persist()}),this.signer.on("session_update",t=>{this.events.emit("session_update",t)}),this.signer.on("session_delete",t=>{this.reset(),this.events.emit("session_delete",t),this.events.emit("disconnect",nh(ci({},Lv("USER_DISCONNECTED")),{data:t.topic,name:"USER_DISCONNECTED"}))}),this.signer.on("display_uri",t=>{var r,s;this.rpc.showQrModal&&((r=this.modal)==null||r.closeModal(),(s=this.modal)==null||s.openModal({uri:t})),this.events.emit("display_uri",t)})}switchEthereumChain(t){this.request({method:"wallet_switchEthereumChain",params:[{chainId:t.toString(16)}]})}isCompatibleChainId(t){return typeof t=="string"?t.startsWith(`${this.namespace}:`):!1}formatChainId(t){return`${this.namespace}:${t}`}parseChainId(t){return Number(t.split(":")[1])}setChainIds(t){const r=t.filter(s=>this.isCompatibleChainId(s)).map(s=>this.parseChainId(s));r.length&&(this.chainId=r[0],this.events.emit("chainChanged",io(this.chainId)),this.persist())}setChainId(t){if(this.isCompatibleChainId(t)){const r=this.parseChainId(t);this.chainId=r,this.switchEthereumChain(r)}}parseAccountId(t){const[r,s,o]=t.split(":");return{chainId:`${r}:${s}`,address:o}}setAccounts(t){this.accounts=t.filter(r=>this.parseChainId(this.parseAccountId(r).chainId)===this.chainId).map(r=>this.parseAccountId(r).address),this.events.emit("accountsChanged",this.accounts)}getRpcConfig(t){var r,s;const o=(r=t==null?void 0:t.chains)!=null?r:[],u=(s=t==null?void 0:t.optionalChains)!=null?s:[],l=o.concat(u);if(!l.length)throw new Error("No chains specified in either `chains` or `optionalChains`");const y=o.length?(t==null?void 0:t.methods)||ys:[],I=o.length?(t==null?void 0:t.events)||ms:[],S=(t==null?void 0:t.optionalMethods)||[],R=(t==null?void 0:t.optionalEvents)||[],x=(t==null?void 0:t.rpcMap)||this.buildRpcMap(l,t.projectId),j=(t==null?void 0:t.qrModalOptions)||void 0;return{chains:o==null?void 0:o.map(B=>this.formatChainId(B)),optionalChains:u.map(B=>this.formatChainId(B)),methods:y,events:I,optionalMethods:S,optionalEvents:R,rpcMap:x,showQrModal:!!(t!=null&&t.showQrModal),qrModalOptions:j,projectId:t.projectId,metadata:t.metadata}}buildRpcMap(t,r){const s={};return t.forEach(o=>{s[o]=this.getRpcUrl(o,r)}),s}async initialize(t){if(this.rpc=this.getRpcConfig(t),this.chainId=this.rpc.chains.length?vs(this.rpc.chains):vs(this.rpc.optionalChains),this.signer=await gE.init({projectId:this.rpc.projectId,metadata:this.rpc.metadata,disableProviderPing:t.disableProviderPing,relayUrl:t.relayUrl,storageOptions:t.storageOptions}),this.registerEventListeners(),await this.loadPersistedSession(),this.rpc.showQrModal){let r;try{const{WalletConnectModal:s}=await Promise.resolve().then(()=>require("./index-CQ_e_FtW.js")).then(o=>o.index);r=s}catch{throw new Error("To use QR modal, please install @walletconnect/modal package")}if(r)try{this.modal=new r(ci({projectId:this.rpc.projectId},this.rpc.qrModalOptions))}catch(s){throw this.signer.logger.error(s),new Error("Could not generate WalletConnectModal Instance")}}}loadConnectOpts(t){if(!t)return;const{chains:r,optionalChains:s,rpcMap:o}=t;r&&so(r)&&(this.rpc.chains=r.map(u=>this.formatChainId(u)),r.forEach(u=>{this.rpc.rpcMap[u]=(o==null?void 0:o[u])||this.getRpcUrl(u)})),s&&so(s)&&(this.rpc.optionalChains=[],this.rpc.optionalChains=s==null?void 0:s.map(u=>this.formatChainId(u)),s.forEach(u=>{this.rpc.rpcMap[u]=(o==null?void 0:o[u])||this.getRpcUrl(u)}))}getRpcUrl(t,r){var s;return((s=this.rpc.rpcMap)==null?void 0:s[t])||`${wE}?chainId=eip155:${t}&projectId=${r||this.rpc.projectId}`}async loadPersistedSession(){if(!this.session)return;const t=await this.signer.client.core.storage.getItem(`${this.STORAGE_KEY}/chainId`),r=this.session.namespaces[`${this.namespace}:${t}`]?this.session.namespaces[`${this.namespace}:${t}`]:this.session.namespaces[this.namespace];this.setChainIds(t?[this.formatChainId(t)]:r==null?void 0:r.accounts),this.setAccounts(r==null?void 0:r.accounts)}reset(){this.chainId=1,this.accounts=[]}persist(){this.session&&this.signer.client.core.storage.setItem(`${this.STORAGE_KEY}/chainId`,this.chainId)}parseAccounts(t){return typeof t=="string"||t instanceof String?[this.parseAccount(t)]:t.map(r=>this.parseAccount(r))}}const OE=Es;exports.EthereumProvider=OE;exports.OPTIONAL_EVENTS=zh;exports.OPTIONAL_METHODS=Lh;exports.REQUIRED_EVENTS=ms;exports.REQUIRED_METHODS=ys;exports.default=Es;
46
+ }`;var Q=tu(function(){return se(d,z+"return "+T).apply(r,g)});if(Q.source=T,Fn(Q))throw Q;return Q}function Vm(e){return ae(e).toLowerCase()}function Km(e){return ae(e).toUpperCase()}function Bm(e,i,n){if(e=ae(e),e&&(n||i===r))return ha(e);if(!e||!(i=He(i)))return e;var c=ot(e),h=ot(i),d=la(c,h),g=pa(c,h)+1;return Mt(c,d,g).join("")}function Jm(e,i,n){if(e=ae(e),e&&(n||i===r))return e.slice(0,fa(e)+1);if(!e||!(i=He(i)))return e;var c=ot(e),h=pa(c,ot(i))+1;return Mt(c,0,h).join("")}function Gm(e,i,n){if(e=ae(e),e&&(n||i===r))return e.replace(Ts,"");if(!e||!(i=He(i)))return e;var c=ot(e),h=la(c,ot(i));return Mt(c,h).join("")}function Wm(e,i){var n=Cr,c=kh;if(fe(i)){var h="separator"in i?i.separator:h;n="length"in i?W(i.length):n,c="omission"in i?He(i.omission):c}e=ae(e);var d=e.length;if(hr(e)){var g=ot(e);d=g.length}if(n>=d)return e;var v=n-lr(c);if(v<1)return c;var E=g?Mt(g,0,v).join(""):e.slice(0,v);if(h===r)return E+c;if(g&&(v+=E.length-v),jn(h)){if(e.slice(v).search(h)){var C,$=E;for(h.global||(h=Qs(h.source,ae(xo.exec(h))+"g")),h.lastIndex=0;C=h.exec($);)var T=C.index;E=E.slice(0,T===r?v:T)}}else if(e.indexOf(He(h),v)!=v){var M=E.lastIndexOf(h);M>-1&&(E=E.slice(0,M))}return E+c}function Qm(e){return e=ae(e),e&&ol.test(e)?e.replace(Ao,Pp):e}var Ym=vr(function(e,i,n){return e+(n?" ":"")+i.toUpperCase()}),Un=rc("toUpperCase");function eu(e,i,n){return e=ae(e),i=n?r:i,i===r?wp(e)?Rp(e):hp(e):e.match(i)||[]}var tu=Y(function(e,i){try{return ze(e,r,i)}catch(n){return Fn(n)?n:new J(n)}}),Zm=Et(function(e,i){return Qe(i,function(n){n=gt(n),_t(e,n,xn(e[n],e))}),e});function Xm(e){var i=e==null?0:e.length,n=H();return e=i?pe(e,function(c){if(typeof c[1]!="function")throw new Ye(l);return[n(c[0]),c[1]]}):[],Y(function(c){for(var h=-1;++h<i;){var d=e[h];if(ze(d[0],this,c))return ze(d[1],this,c)}})}function ev(e){return Pd(Xe(e,x))}function Mn(e){return function(){return e}}function tv(e,i){return e==null||e!==e?i:e}var rv=sc(),iv=sc(!0);function qe(e){return e}function Ln(e){return Fa(typeof e=="function"?e:Xe(e,x))}function sv(e){return Da(Xe(e,x))}function nv(e,i){return qa(e,Xe(i,x))}var ov=Y(function(e,i){return function(n){return Br(n,e,i)}}),av=Y(function(e,i){return function(n){return Br(e,n,i)}});function zn(e,i,n){var c=Ee(i),h=ki(i,c);n==null&&!(fe(i)&&(h.length||!c.length))&&(n=i,i=e,e=this,h=ki(i,Ee(i)));var d=!(fe(n)&&"chain"in n)||!!n.chain,g=Pt(e);return Qe(h,function(v){var E=i[v];e[v]=E,g&&(e.prototype[v]=function(){var C=this.__chain__;if(d||C){var $=e(this.__wrapped__),T=$.__actions__=Fe(this.__actions__);return T.push({func:E,args:arguments,thisArg:e}),$.__chain__=C,$}return E.apply(e,Tt([this.value()],arguments))})}),e}function cv(){return Pe._===this&&(Pe._=Tp),this}function kn(){}function uv(e){return e=W(e),Y(function(i){return Ua(i,e)})}var hv=wn(pe),lv=wn(na),pv=wn(Hs);function ru(e){return On(e)?Vs(gt(e)):zd(e)}function dv(e){return function(i){return e==null?r:Yt(e,i)}}var fv=oc(),gv=oc(!0);function Hn(){return[]}function Vn(){return!1}function yv(){return{}}function mv(){return""}function vv(){return!0}function wv(e,i){if(e=W(e),e<1||e>$t)return[];var n=pt,c=Re(e,pt);i=H(i),e-=pt;for(var h=Js(c,i);++n<e;)i(n);return h}function _v(e){return G(e)?pe(e,gt):Ve(e)?[e]:Fe(Ec(ae(e)))}function bv(e){var i=++$p;return ae(e)+i}var Ev=Gi(function(e,i){return e+i},0),Iv=_n("ceil"),Pv=Gi(function(e,i){return e/i},1),Sv=_n("floor");function Ov(e){return e&&e.length?zi(e,qe,nn):r}function Rv(e,i){return e&&e.length?zi(e,H(i,2),nn):r}function Nv(e){return ca(e,qe)}function Av(e,i){return ca(e,H(i,2))}function Cv(e){return e&&e.length?zi(e,qe,un):r}function $v(e,i){return e&&e.length?zi(e,H(i,2),un):r}var xv=Gi(function(e,i){return e*i},1),Tv=_n("round"),Fv=Gi(function(e,i){return e-i},0);function jv(e){return e&&e.length?Bs(e,qe):0}function Dv(e,i){return e&&e.length?Bs(e,H(i,2)):0}return p.after=sy,p.ary=Tc,p.assign=Ky,p.assignIn=Jc,p.assignInWith=as,p.assignWith=By,p.at=Jy,p.before=Fc,p.bind=xn,p.bindAll=Zm,p.bindKey=jc,p.castArray=yy,p.chain=Cc,p.chunk=Sf,p.compact=Of,p.concat=Rf,p.cond=Xm,p.conforms=ev,p.constant=Mn,p.countBy=jg,p.create=Gy,p.curry=Dc,p.curryRight=qc,p.debounce=Uc,p.defaults=Wy,p.defaultsDeep=Qy,p.defer=ny,p.delay=oy,p.difference=Nf,p.differenceBy=Af,p.differenceWith=Cf,p.drop=$f,p.dropRight=xf,p.dropRightWhile=Tf,p.dropWhile=Ff,p.fill=jf,p.filter=qg,p.flatMap=Lg,p.flatMapDeep=zg,p.flatMapDepth=kg,p.flatten=Oc,p.flattenDeep=Df,p.flattenDepth=qf,p.flip=ay,p.flow=rv,p.flowRight=iv,p.fromPairs=Uf,p.functions=im,p.functionsIn=sm,p.groupBy=Hg,p.initial=Lf,p.intersection=zf,p.intersectionBy=kf,p.intersectionWith=Hf,p.invert=om,p.invertBy=am,p.invokeMap=Kg,p.iteratee=Ln,p.keyBy=Bg,p.keys=Ee,p.keysIn=De,p.map=ts,p.mapKeys=um,p.mapValues=hm,p.matches=sv,p.matchesProperty=nv,p.memoize=is,p.merge=lm,p.mergeWith=Gc,p.method=ov,p.methodOf=av,p.mixin=zn,p.negate=ss,p.nthArg=uv,p.omit=pm,p.omitBy=dm,p.once=cy,p.orderBy=Jg,p.over=hv,p.overArgs=uy,p.overEvery=lv,p.overSome=pv,p.partial=Tn,p.partialRight=Mc,p.partition=Gg,p.pick=fm,p.pickBy=Wc,p.property=ru,p.propertyOf=dv,p.pull=Jf,p.pullAll=Nc,p.pullAllBy=Gf,p.pullAllWith=Wf,p.pullAt=Qf,p.range=fv,p.rangeRight=gv,p.rearg=hy,p.reject=Yg,p.remove=Yf,p.rest=ly,p.reverse=Cn,p.sampleSize=Xg,p.set=ym,p.setWith=mm,p.shuffle=ey,p.slice=Zf,p.sortBy=iy,p.sortedUniq=ng,p.sortedUniqBy=og,p.split=Lm,p.spread=py,p.tail=ag,p.take=cg,p.takeRight=ug,p.takeRightWhile=hg,p.takeWhile=lg,p.tap=Og,p.throttle=dy,p.thru=es,p.toArray=Vc,p.toPairs=Qc,p.toPairsIn=Yc,p.toPath=_v,p.toPlainObject=Bc,p.transform=vm,p.unary=fy,p.union=pg,p.unionBy=dg,p.unionWith=fg,p.uniq=gg,p.uniqBy=yg,p.uniqWith=mg,p.unset=wm,p.unzip=$n,p.unzipWith=Ac,p.update=_m,p.updateWith=bm,p.values=br,p.valuesIn=Em,p.without=vg,p.words=eu,p.wrap=gy,p.xor=wg,p.xorBy=_g,p.xorWith=bg,p.zip=Eg,p.zipObject=Ig,p.zipObjectDeep=Pg,p.zipWith=Sg,p.entries=Qc,p.entriesIn=Yc,p.extend=Jc,p.extendWith=as,zn(p,p),p.add=Ev,p.attempt=tu,p.camelCase=Om,p.capitalize=Zc,p.ceil=Iv,p.clamp=Im,p.clone=my,p.cloneDeep=wy,p.cloneDeepWith=_y,p.cloneWith=vy,p.conformsTo=by,p.deburr=Xc,p.defaultTo=tv,p.divide=Pv,p.endsWith=Rm,p.eq=ct,p.escape=Nm,p.escapeRegExp=Am,p.every=Dg,p.find=Ug,p.findIndex=Pc,p.findKey=Yy,p.findLast=Mg,p.findLastIndex=Sc,p.findLastKey=Zy,p.floor=Sv,p.forEach=$c,p.forEachRight=xc,p.forIn=Xy,p.forInRight=em,p.forOwn=tm,p.forOwnRight=rm,p.get=Dn,p.gt=Ey,p.gte=Iy,p.has=nm,p.hasIn=qn,p.head=Rc,p.identity=qe,p.includes=Vg,p.indexOf=Mf,p.inRange=Pm,p.invoke=cm,p.isArguments=er,p.isArray=G,p.isArrayBuffer=Py,p.isArrayLike=je,p.isArrayLikeObject=ye,p.isBoolean=Sy,p.isBuffer=Lt,p.isDate=Oy,p.isElement=Ry,p.isEmpty=Ny,p.isEqual=Ay,p.isEqualWith=Cy,p.isError=Fn,p.isFinite=$y,p.isFunction=Pt,p.isInteger=Lc,p.isLength=ns,p.isMap=zc,p.isMatch=xy,p.isMatchWith=Ty,p.isNaN=Fy,p.isNative=jy,p.isNil=qy,p.isNull=Dy,p.isNumber=kc,p.isObject=fe,p.isObjectLike=ge,p.isPlainObject=Zr,p.isRegExp=jn,p.isSafeInteger=Uy,p.isSet=Hc,p.isString=os,p.isSymbol=Ve,p.isTypedArray=_r,p.isUndefined=My,p.isWeakMap=Ly,p.isWeakSet=zy,p.join=Vf,p.kebabCase=Cm,p.last=tt,p.lastIndexOf=Kf,p.lowerCase=$m,p.lowerFirst=xm,p.lt=ky,p.lte=Hy,p.max=Ov,p.maxBy=Rv,p.mean=Nv,p.meanBy=Av,p.min=Cv,p.minBy=$v,p.stubArray=Hn,p.stubFalse=Vn,p.stubObject=yv,p.stubString=mv,p.stubTrue=vv,p.multiply=xv,p.nth=Bf,p.noConflict=cv,p.noop=kn,p.now=rs,p.pad=Tm,p.padEnd=Fm,p.padStart=jm,p.parseInt=Dm,p.random=Sm,p.reduce=Wg,p.reduceRight=Qg,p.repeat=qm,p.replace=Um,p.result=gm,p.round=Tv,p.runInContext=b,p.sample=Zg,p.size=ty,p.snakeCase=Mm,p.some=ry,p.sortedIndex=Xf,p.sortedIndexBy=eg,p.sortedIndexOf=tg,p.sortedLastIndex=rg,p.sortedLastIndexBy=ig,p.sortedLastIndexOf=sg,p.startCase=zm,p.startsWith=km,p.subtract=Fv,p.sum=jv,p.sumBy=Dv,p.template=Hm,p.times=wv,p.toFinite=St,p.toInteger=W,p.toLength=Kc,p.toLower=Vm,p.toNumber=rt,p.toSafeInteger=Vy,p.toString=ae,p.toUpper=Km,p.trim=Bm,p.trimEnd=Jm,p.trimStart=Gm,p.truncate=Wm,p.unescape=Qm,p.uniqueId=bv,p.upperCase=Ym,p.upperFirst=Un,p.each=$c,p.eachRight=xc,p.first=Rc,zn(p,function(){var e={};return dt(p,function(i,n){ce.call(p.prototype,n)||(e[n]=i)}),e}(),{chain:!1}),p.VERSION=s,Qe(["bind","bindKey","curry","curryRight","partial","partialRight"],function(e){p[e].placeholder=p}),Qe(["drop","take"],function(e,i){ee.prototype[e]=function(n){n=n===r?1:be(W(n),0);var c=this.__filtered__&&!i?new ee(this):this.clone();return c.__filtered__?c.__takeCount__=Re(n,c.__takeCount__):c.__views__.push({size:Re(n,pt),type:e+(c.__dir__<0?"Right":"")}),c},ee.prototype[e+"Right"]=function(n){return this.reverse()[e](n).reverse()}}),Qe(["filter","map","takeWhile"],function(e,i){var n=i+1,c=n==Oo||n==Bh;ee.prototype[e]=function(h){var d=this.clone();return d.__iteratees__.push({iteratee:H(h,3),type:n}),d.__filtered__=d.__filtered__||c,d}}),Qe(["head","last"],function(e,i){var n="take"+(i?"Right":"");ee.prototype[e]=function(){return this[n](1).value()[0]}}),Qe(["initial","tail"],function(e,i){var n="drop"+(i?"":"Right");ee.prototype[e]=function(){return this.__filtered__?new ee(this):this[n](1)}}),ee.prototype.compact=function(){return this.filter(qe)},ee.prototype.find=function(e){return this.filter(e).head()},ee.prototype.findLast=function(e){return this.reverse().find(e)},ee.prototype.invokeMap=Y(function(e,i){return typeof e=="function"?new ee(this):this.map(function(n){return Br(n,e,i)})}),ee.prototype.reject=function(e){return this.filter(ss(H(e)))},ee.prototype.slice=function(e,i){e=W(e);var n=this;return n.__filtered__&&(e>0||i<0)?new ee(n):(e<0?n=n.takeRight(-e):e&&(n=n.drop(e)),i!==r&&(i=W(i),n=i<0?n.dropRight(-i):n.take(i-e)),n)},ee.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},ee.prototype.toArray=function(){return this.take(pt)},dt(ee.prototype,function(e,i){var n=/^(?:filter|find|map|reject)|While$/.test(i),c=/^(?:head|last)$/.test(i),h=p[c?"take"+(i=="last"?"Right":""):i],d=c||/^find/.test(i);h&&(p.prototype[i]=function(){var g=this.__wrapped__,v=c?[1]:arguments,E=g instanceof ee,C=v[0],$=E||G(g),T=function(Z){var te=h.apply(p,Tt([Z],v));return c&&M?te[0]:te};$&&n&&typeof C=="function"&&C.length!=1&&(E=$=!1);var M=this.__chain__,z=!!this.__actions__.length,V=d&&!M,Q=E&&!z;if(!d&&$){g=Q?g:new ee(this);var K=e.apply(g,v);return K.__actions__.push({func:es,args:[T],thisArg:r}),new Ze(K,M)}return V&&Q?e.apply(this,v):(K=this.thru(T),V?c?K.value()[0]:K.value():K)})}),Qe(["pop","push","shift","sort","splice","unshift"],function(e){var i=Oi[e],n=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",c=/^(?:pop|shift)$/.test(e);p.prototype[e]=function(){var h=arguments;if(c&&!this.__chain__){var d=this.value();return i.apply(G(d)?d:[],h)}return this[n](function(g){return i.apply(G(g)?g:[],h)})}}),dt(ee.prototype,function(e,i){var n=p[i];if(n){var c=n.name+"";ce.call(gr,c)||(gr[c]=[]),gr[c].push({name:i,func:n})}}),gr[Ji(r,oe).name]=[{name:"wrapper",func:r}],ee.prototype.clone=Wp,ee.prototype.reverse=Qp,ee.prototype.value=Yp,p.prototype.at=Rg,p.prototype.chain=Ng,p.prototype.commit=Ag,p.prototype.next=Cg,p.prototype.plant=xg,p.prototype.reverse=Tg,p.prototype.toJSON=p.prototype.valueOf=p.prototype.value=Fg,p.prototype.first=p.prototype.head,Mr&&(p.prototype[Mr]=$g),p},pr=Np();Bt?((Bt.exports=pr)._=pr,Ms._=pr):Pe._=pr}).call(ni)})(yo,yo.exports);var Bb=Object.defineProperty,Jb=Object.defineProperties,Gb=Object.getOwnPropertyDescriptors,Zu=Object.getOwnPropertySymbols,Wb=Object.prototype.hasOwnProperty,Qb=Object.prototype.propertyIsEnumerable,Xu=(a,t,r)=>t in a?Bb(a,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):a[t]=r,hs=(a,t)=>{for(var r in t||(t={}))Wb.call(t,r)&&Xu(a,r,t[r]);if(Zu)for(var r of Zu(t))Qb.call(t,r)&&Xu(a,r,t[r]);return a},Yb=(a,t)=>Jb(a,Gb(t));function Ht(a,t,r){var s;const o=Sw(a);return((s=t.rpcMap)==null?void 0:s[o.reference])||`${Kb}?chainId=${o.namespace}:${o.reference}&projectId=${r}`}function nr(a){return a.includes(":")?a.split(":")[1]:a}function Uh(a){return a.map(t=>`${t.split(":")[0]}:${t.split(":")[1]}`)}function Zb(a,t){const r=Object.keys(t.namespaces).filter(o=>o.includes(a));if(!r.length)return[];const s=[];return r.forEach(o=>{const u=t.namespaces[o].accounts;s.push(...u)}),s}function Xb(a={},t={}){const r=eh(a),s=eh(t);return yo.exports.merge(r,s)}function eh(a){var t,r,s,o;const u={};if(!Sr(a))return u;for(const[l,y]of Object.entries(a)){const I=_o(l)?[l]:y.chains,S=y.methods||[],R=y.events||[],x=y.rpcMap||{},j=oi(l);u[j]=Yb(hs(hs({},u[j]),y),{chains:Jn(I,(t=u[j])==null?void 0:t.chains),methods:Jn(S,(r=u[j])==null?void 0:r.methods),events:Jn(R,(s=u[j])==null?void 0:s.events),rpcMap:hs(hs({},x),(o=u[j])==null?void 0:o.rpcMap)})}return u}function eE(a){return a.includes(":")?a.split(":")[2]:a}function tE(a){const t={};for(const[r,s]of Object.entries(a)){const o=s.methods||[],u=s.events||[],l=s.accounts||[],y=_o(r)?[r]:s.chains?s.chains:Uh(s.accounts);t[r]={chains:y,methods:o,events:u,accounts:l}}return t}function eo(a){return typeof a=="number"?a:a.includes("0x")?parseInt(a,16):a.includes(":")?Number(a.split(":")[1]):Number(a)}const Mh={},de=a=>Mh[a],to=(a,t)=>{Mh[a]=t};class rE{constructor(t){this.name="polkadot",this.namespace=t.namespace,this.events=de("events"),this.client=de("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(t){this.namespace=Object.assign(this.namespace,t)}requestAccounts(){return this.getAccounts()}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const t=this.namespace.chains[0];if(!t)throw new Error("ChainId not found");return t.split(":")[1]}request(t){return this.namespace.methods.includes(t.request.method)?this.client.request(t):this.getHttpProvider().request(t.request)}setDefaultChain(t,r){this.httpProviders[t]||this.setHttpProvider(t,r),this.chainId=t,this.events.emit(Ct.DEFAULT_CHAIN_CHANGED,`${this.name}:${t}`)}getAccounts(){const t=this.namespace.accounts;return t?t.filter(r=>r.split(":")[1]===this.chainId.toString()).map(r=>r.split(":")[2])||[]:[]}createHttpProviders(){const t={};return this.namespace.chains.forEach(r=>{var s;const o=nr(r);t[o]=this.createHttpProvider(o,(s=this.namespace.rpcMap)==null?void 0:s[r])}),t}getHttpProvider(){const t=`${this.name}:${this.chainId}`,r=this.httpProviders[t];if(typeof r>"u")throw new Error(`JSON-RPC provider for ${t} not found`);return r}setHttpProvider(t,r){const s=this.createHttpProvider(t,r);s&&(this.httpProviders[t]=s)}createHttpProvider(t,r){const s=r||Ht(t,this.namespace,this.client.core.projectId);if(!s)throw new Error(`No RPC url provided for chainId: ${t}`);return new At(new Vt(s,de("disableProviderPing")))}}class iE{constructor(t){this.name="eip155",this.namespace=t.namespace,this.events=de("events"),this.client=de("client"),this.httpProviders=this.createHttpProviders(),this.chainId=parseInt(this.getDefaultChain())}async request(t){switch(t.request.method){case"eth_requestAccounts":return this.getAccounts();case"eth_accounts":return this.getAccounts();case"wallet_switchEthereumChain":return await this.handleSwitchChain(t);case"eth_chainId":return parseInt(this.getDefaultChain())}return this.namespace.methods.includes(t.request.method)?await this.client.request(t):this.getHttpProvider().request(t.request)}updateNamespace(t){this.namespace=Object.assign(this.namespace,t)}setDefaultChain(t,r){this.httpProviders[t]||this.setHttpProvider(parseInt(t),r),this.chainId=parseInt(t),this.events.emit(Ct.DEFAULT_CHAIN_CHANGED,`${this.name}:${t}`)}requestAccounts(){return this.getAccounts()}getDefaultChain(){if(this.chainId)return this.chainId.toString();if(this.namespace.defaultChain)return this.namespace.defaultChain;const t=this.namespace.chains[0];if(!t)throw new Error("ChainId not found");return t.split(":")[1]}createHttpProvider(t,r){const s=r||Ht(`${this.name}:${t}`,this.namespace,this.client.core.projectId);if(!s)throw new Error(`No RPC url provided for chainId: ${t}`);return new At(new Vt(s,de("disableProviderPing")))}setHttpProvider(t,r){const s=this.createHttpProvider(t,r);s&&(this.httpProviders[t]=s)}createHttpProviders(){const t={};return this.namespace.chains.forEach(r=>{var s;const o=parseInt(nr(r));t[o]=this.createHttpProvider(o,(s=this.namespace.rpcMap)==null?void 0:s[r])}),t}getAccounts(){const t=this.namespace.accounts;return t?[...new Set(t.filter(r=>r.split(":")[1]===this.chainId.toString()).map(r=>r.split(":")[2]))]:[]}getHttpProvider(){const t=this.chainId,r=this.httpProviders[t];if(typeof r>"u")throw new Error(`JSON-RPC provider for ${t} not found`);return r}async handleSwitchChain(t){var r,s;let o=t.request.params?(r=t.request.params[0])==null?void 0:r.chainId:"0x0";o=o.startsWith("0x")?o:`0x${o}`;const u=parseInt(o,16);if(this.isChainApproved(u))this.setDefaultChain(`${u}`);else if(this.namespace.methods.includes("wallet_switchEthereumChain"))await this.client.request({topic:t.topic,request:{method:t.request.method,params:[{chainId:o}]},chainId:(s=this.namespace.chains)==null?void 0:s[0]}),this.setDefaultChain(`${u}`);else throw new Error(`Failed to switch to chain 'eip155:${u}'. The chain is not approved or the wallet does not support 'wallet_switchEthereumChain' method.`);return null}isChainApproved(t){return this.namespace.chains.includes(`${this.name}:${t}`)}}class sE{constructor(t){this.name="solana",this.namespace=t.namespace,this.events=de("events"),this.client=de("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(t){this.namespace=Object.assign(this.namespace,t)}requestAccounts(){return this.getAccounts()}request(t){return this.namespace.methods.includes(t.request.method)?this.client.request(t):this.getHttpProvider().request(t.request)}setDefaultChain(t,r){this.httpProviders[t]||this.setHttpProvider(t,r),this.chainId=t,this.events.emit(Ct.DEFAULT_CHAIN_CHANGED,`${this.name}:${t}`)}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const t=this.namespace.chains[0];if(!t)throw new Error("ChainId not found");return t.split(":")[1]}getAccounts(){const t=this.namespace.accounts;return t?[...new Set(t.filter(r=>r.split(":")[1]===this.chainId.toString()).map(r=>r.split(":")[2]))]:[]}createHttpProviders(){const t={};return this.namespace.chains.forEach(r=>{var s;const o=nr(r);t[o]=this.createHttpProvider(o,(s=this.namespace.rpcMap)==null?void 0:s[r])}),t}getHttpProvider(){const t=`${this.name}:${this.chainId}`,r=this.httpProviders[t];if(typeof r>"u")throw new Error(`JSON-RPC provider for ${t} not found`);return r}setHttpProvider(t,r){const s=this.createHttpProvider(t,r);s&&(this.httpProviders[t]=s)}createHttpProvider(t,r){const s=r||Ht(t,this.namespace,this.client.core.projectId);if(!s)throw new Error(`No RPC url provided for chainId: ${t}`);return new At(new Vt(s,de("disableProviderPing")))}}class nE{constructor(t){this.name="cosmos",this.namespace=t.namespace,this.events=de("events"),this.client=de("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(t){this.namespace=Object.assign(this.namespace,t)}requestAccounts(){return this.getAccounts()}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const t=this.namespace.chains[0];if(!t)throw new Error("ChainId not found");return t.split(":")[1]}request(t){return this.namespace.methods.includes(t.request.method)?this.client.request(t):this.getHttpProvider().request(t.request)}setDefaultChain(t,r){this.httpProviders[t]||this.setHttpProvider(t,r),this.chainId=t,this.events.emit(Ct.DEFAULT_CHAIN_CHANGED,`${this.name}:${this.chainId}`)}getAccounts(){const t=this.namespace.accounts;return t?[...new Set(t.filter(r=>r.split(":")[1]===this.chainId.toString()).map(r=>r.split(":")[2]))]:[]}createHttpProviders(){const t={};return this.namespace.chains.forEach(r=>{var s;const o=nr(r);t[o]=this.createHttpProvider(o,(s=this.namespace.rpcMap)==null?void 0:s[r])}),t}getHttpProvider(){const t=`${this.name}:${this.chainId}`,r=this.httpProviders[t];if(typeof r>"u")throw new Error(`JSON-RPC provider for ${t} not found`);return r}setHttpProvider(t,r){const s=this.createHttpProvider(t,r);s&&(this.httpProviders[t]=s)}createHttpProvider(t,r){const s=r||Ht(t,this.namespace,this.client.core.projectId);if(!s)throw new Error(`No RPC url provided for chainId: ${t}`);return new At(new Vt(s,de("disableProviderPing")))}}class oE{constructor(t){this.name="cip34",this.namespace=t.namespace,this.events=de("events"),this.client=de("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(t){this.namespace=Object.assign(this.namespace,t)}requestAccounts(){return this.getAccounts()}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const t=this.namespace.chains[0];if(!t)throw new Error("ChainId not found");return t.split(":")[1]}request(t){return this.namespace.methods.includes(t.request.method)?this.client.request(t):this.getHttpProvider().request(t.request)}setDefaultChain(t,r){this.httpProviders[t]||this.setHttpProvider(t,r),this.chainId=t,this.events.emit(Ct.DEFAULT_CHAIN_CHANGED,`${this.name}:${this.chainId}`)}getAccounts(){const t=this.namespace.accounts;return t?[...new Set(t.filter(r=>r.split(":")[1]===this.chainId.toString()).map(r=>r.split(":")[2]))]:[]}createHttpProviders(){const t={};return this.namespace.chains.forEach(r=>{const s=this.getCardanoRPCUrl(r),o=nr(r);t[o]=this.createHttpProvider(o,s)}),t}getHttpProvider(){const t=`${this.name}:${this.chainId}`,r=this.httpProviders[t];if(typeof r>"u")throw new Error(`JSON-RPC provider for ${t} not found`);return r}getCardanoRPCUrl(t){const r=this.namespace.rpcMap;if(r)return r[t]}setHttpProvider(t,r){const s=this.createHttpProvider(t,r);s&&(this.httpProviders[t]=s)}createHttpProvider(t,r){const s=r||this.getCardanoRPCUrl(t);if(!s)throw new Error(`No RPC url provided for chainId: ${t}`);return new At(new Vt(s,de("disableProviderPing")))}}class aE{constructor(t){this.name="elrond",this.namespace=t.namespace,this.events=de("events"),this.client=de("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(t){this.namespace=Object.assign(this.namespace,t)}requestAccounts(){return this.getAccounts()}request(t){return this.namespace.methods.includes(t.request.method)?this.client.request(t):this.getHttpProvider().request(t.request)}setDefaultChain(t,r){this.httpProviders[t]||this.setHttpProvider(t,r),this.chainId=t,this.events.emit(Ct.DEFAULT_CHAIN_CHANGED,`${this.name}:${t}`)}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const t=this.namespace.chains[0];if(!t)throw new Error("ChainId not found");return t.split(":")[1]}getAccounts(){const t=this.namespace.accounts;return t?[...new Set(t.filter(r=>r.split(":")[1]===this.chainId.toString()).map(r=>r.split(":")[2]))]:[]}createHttpProviders(){const t={};return this.namespace.chains.forEach(r=>{var s;const o=nr(r);t[o]=this.createHttpProvider(o,(s=this.namespace.rpcMap)==null?void 0:s[r])}),t}getHttpProvider(){const t=`${this.name}:${this.chainId}`,r=this.httpProviders[t];if(typeof r>"u")throw new Error(`JSON-RPC provider for ${t} not found`);return r}setHttpProvider(t,r){const s=this.createHttpProvider(t,r);s&&(this.httpProviders[t]=s)}createHttpProvider(t,r){const s=r||Ht(t,this.namespace,this.client.core.projectId);if(!s)throw new Error(`No RPC url provided for chainId: ${t}`);return new At(new Vt(s,de("disableProviderPing")))}}class cE{constructor(t){this.name="multiversx",this.namespace=t.namespace,this.events=de("events"),this.client=de("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(t){this.namespace=Object.assign(this.namespace,t)}requestAccounts(){return this.getAccounts()}request(t){return this.namespace.methods.includes(t.request.method)?this.client.request(t):this.getHttpProvider().request(t.request)}setDefaultChain(t,r){this.httpProviders[t]||this.setHttpProvider(t,r),this.chainId=t,this.events.emit(Ct.DEFAULT_CHAIN_CHANGED,`${this.name}:${t}`)}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const t=this.namespace.chains[0];if(!t)throw new Error("ChainId not found");return t.split(":")[1]}getAccounts(){const t=this.namespace.accounts;return t?[...new Set(t.filter(r=>r.split(":")[1]===this.chainId.toString()).map(r=>r.split(":")[2]))]:[]}createHttpProviders(){const t={};return this.namespace.chains.forEach(r=>{var s;const o=nr(r);t[o]=this.createHttpProvider(o,(s=this.namespace.rpcMap)==null?void 0:s[r])}),t}getHttpProvider(){const t=`${this.name}:${this.chainId}`,r=this.httpProviders[t];if(typeof r>"u")throw new Error(`JSON-RPC provider for ${t} not found`);return r}setHttpProvider(t,r){const s=this.createHttpProvider(t,r);s&&(this.httpProviders[t]=s)}createHttpProvider(t,r){const s=r||Ht(t,this.namespace,this.client.core.projectId);if(!s)throw new Error(`No RPC url provided for chainId: ${t}`);return new At(new Vt(s,de("disableProviderPing")))}}class uE{constructor(t){this.name="near",this.namespace=t.namespace,this.events=de("events"),this.client=de("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(t){this.namespace=Object.assign(this.namespace,t)}requestAccounts(){return this.getAccounts()}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const t=this.namespace.chains[0];if(!t)throw new Error("ChainId not found");return t.split(":")[1]}request(t){return this.namespace.methods.includes(t.request.method)?this.client.request(t):this.getHttpProvider().request(t.request)}setDefaultChain(t,r){if(this.chainId=t,!this.httpProviders[t]){const s=r||Ht(`${this.name}:${t}`,this.namespace);if(!s)throw new Error(`No RPC url provided for chainId: ${t}`);this.setHttpProvider(t,s)}this.events.emit(Ct.DEFAULT_CHAIN_CHANGED,`${this.name}:${this.chainId}`)}getAccounts(){const t=this.namespace.accounts;return t?t.filter(r=>r.split(":")[1]===this.chainId.toString()).map(r=>r.split(":")[2])||[]:[]}createHttpProviders(){const t={};return this.namespace.chains.forEach(r=>{var s;t[r]=this.createHttpProvider(r,(s=this.namespace.rpcMap)==null?void 0:s[r])}),t}getHttpProvider(){const t=`${this.name}:${this.chainId}`,r=this.httpProviders[t];if(typeof r>"u")throw new Error(`JSON-RPC provider for ${t} not found`);return r}setHttpProvider(t,r){const s=this.createHttpProvider(t,r);s&&(this.httpProviders[t]=s)}createHttpProvider(t,r){const s=r||Ht(t,this.namespace);return typeof s>"u"?void 0:new At(new Vt(s,de("disableProviderPing")))}}var hE=Object.defineProperty,lE=Object.defineProperties,pE=Object.getOwnPropertyDescriptors,th=Object.getOwnPropertySymbols,dE=Object.prototype.hasOwnProperty,fE=Object.prototype.propertyIsEnumerable,rh=(a,t,r)=>t in a?hE(a,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):a[t]=r,ls=(a,t)=>{for(var r in t||(t={}))dE.call(t,r)&&rh(a,r,t[r]);if(th)for(var r of th(t))fE.call(t,r)&&rh(a,r,t[r]);return a},ro=(a,t)=>lE(a,pE(t));class So{constructor(t){this.events=new Ge.Dt,this.rpcProviders={},this.shouldAbortPairingAttempt=!1,this.maxPairingAttempts=10,this.disableProviderPing=!1,this.providerOpts=t,this.logger=typeof(t==null?void 0:t.logger)<"u"&&typeof(t==null?void 0:t.logger)!="string"?t.logger:N.ot(N.k({level:(t==null?void 0:t.logger)||Qu})),this.disableProviderPing=(t==null?void 0:t.disableProviderPing)||!1}static async init(t){const r=new So(t);return await r.initialize(),r}async request(t,r){const[s,o]=this.validateChain(r);if(!this.session)throw new Error("Please call connect() before request()");return await this.getProvider(s).request({request:ls({},t),chainId:`${s}:${o}`,topic:this.session.topic})}sendAsync(t,r,s){const o=new Date().getTime();this.request(t,s).then(u=>r(null,N.formatJsonRpcResult(o,u))).catch(u=>r(u,void 0))}async enable(){if(!this.client)throw new Error("Sign Client not initialized");return this.session||await this.connect({namespaces:this.namespaces,optionalNamespaces:this.optionalNamespaces,sessionProperties:this.sessionProperties}),await this.requestAccounts()}async disconnect(){var t;if(!this.session)throw new Error("Please call connect() before enable()");await this.client.disconnect({topic:(t=this.session)==null?void 0:t.topic,reason:ve("USER_DISCONNECTED")}),await this.cleanup()}async connect(t){if(!this.client)throw new Error("Sign Client not initialized");if(this.setNamespaces(t),await this.cleanupPendingPairings(),!t.skipPairing)return await this.pair(t.pairingTopic)}on(t,r){this.events.on(t,r)}once(t,r){this.events.once(t,r)}removeListener(t,r){this.events.removeListener(t,r)}off(t,r){this.events.off(t,r)}get isWalletConnect(){return!0}async pair(t){this.shouldAbortPairingAttempt=!1;let r=0;do{if(this.shouldAbortPairingAttempt)throw new Error("Pairing aborted");if(r>=this.maxPairingAttempts)throw new Error("Max auto pairing attempts reached");const{uri:s,approval:o}=await this.client.connect({pairingTopic:t,requiredNamespaces:this.namespaces,optionalNamespaces:this.optionalNamespaces,sessionProperties:this.sessionProperties});s&&(this.uri=s,this.events.emit("display_uri",s)),await o().then(u=>{this.session=u,this.namespaces||(this.namespaces=tE(u.namespaces),this.persist("namespaces",this.namespaces))}).catch(u=>{if(u.message!==Dh)throw u;r++})}while(!this.session);return this.onConnect(),this.session}setDefaultChain(t,r){try{if(!this.session)return;const[s,o]=this.validateChain(t);this.getProvider(s).setDefaultChain(o,r)}catch(s){if(!/Please call connect/.test(s.message))throw s}}async cleanupPendingPairings(t={}){this.logger.info("Cleaning up inactive pairings...");const r=this.client.pairing.getAll();if(ir(r)){for(const s of r)t.deletePairings?this.client.core.expirer.set(s.topic,0):await this.client.core.relayer.subscriber.unsubscribe(s.topic);this.logger.info(`Inactive pairings cleared: ${r.length}`)}}abortPairingAttempt(){this.shouldAbortPairingAttempt=!0}async checkStorage(){if(this.namespaces=await this.getFromStore("namespaces"),this.optionalNamespaces=await this.getFromStore("optionalNamespaces")||{},this.client.session.length){const t=this.client.session.keys.length-1;this.session=this.client.session.get(this.client.session.keys[t]),this.createProviders()}}async initialize(){this.logger.trace("Initialized"),await this.createClient(),await this.checkStorage(),this.registerEventListeners()}async createClient(){this.client=this.providerOpts.client||await Fb.init({logger:this.providerOpts.logger||Qu,relayUrl:this.providerOpts.relayUrl||kb,projectId:this.providerOpts.projectId,metadata:this.providerOpts.metadata,storageOptions:this.providerOpts.storageOptions,storage:this.providerOpts.storage,name:this.providerOpts.name}),this.logger.trace("SignClient Initialized")}createProviders(){if(!this.client)throw new Error("Sign Client not initialized");if(!this.session)throw new Error("Session not initialized. Please call connect() before enable()");const t=[...new Set(Object.keys(this.session.namespaces).map(r=>oi(r)))];to("client",this.client),to("events",this.events),to("disableProviderPing",this.disableProviderPing),t.forEach(r=>{if(!this.session)return;const s=Zb(r,this.session),o=Uh(s),u=Xb(this.namespaces,this.optionalNamespaces),l=ro(ls({},u[r]),{accounts:s,chains:o});switch(r){case"eip155":this.rpcProviders[r]=new iE({namespace:l});break;case"solana":this.rpcProviders[r]=new sE({namespace:l});break;case"cosmos":this.rpcProviders[r]=new nE({namespace:l});break;case"polkadot":this.rpcProviders[r]=new rE({namespace:l});break;case"cip34":this.rpcProviders[r]=new oE({namespace:l});break;case"elrond":this.rpcProviders[r]=new aE({namespace:l});break;case"multiversx":this.rpcProviders[r]=new cE({namespace:l});break;case"near":this.rpcProviders[r]=new uE({namespace:l});break}})}registerEventListeners(){if(typeof this.client>"u")throw new Error("Sign Client is not initialized");this.client.on("session_ping",t=>{this.events.emit("session_ping",t)}),this.client.on("session_event",t=>{const{params:r}=t,{event:s}=r;if(s.name==="accountsChanged"){const o=s.data;o&&ir(o)&&this.events.emit("accountsChanged",o.map(eE))}else if(s.name==="chainChanged"){const o=r.chainId,u=r.event.data,l=oi(o),y=eo(o)!==eo(u)?`${l}:${eo(u)}`:o;this.onChainChanged(y)}else this.events.emit(s.name,s.data);this.events.emit("session_event",t)}),this.client.on("session_update",({topic:t,params:r})=>{var s;const{namespaces:o}=r,u=(s=this.client)==null?void 0:s.session.get(t);this.session=ro(ls({},u),{namespaces:o}),this.onSessionUpdate(),this.events.emit("session_update",{topic:t,params:r})}),this.client.on("session_delete",async t=>{await this.cleanup(),this.events.emit("session_delete",t),this.events.emit("disconnect",ro(ls({},ve("USER_DISCONNECTED")),{data:t.topic}))}),this.on(Ct.DEFAULT_CHAIN_CHANGED,t=>{this.onChainChanged(t,!0)})}getProvider(t){if(!this.rpcProviders[t])throw new Error(`Provider not found: ${t}`);return this.rpcProviders[t]}onSessionUpdate(){Object.keys(this.rpcProviders).forEach(t=>{var r;this.getProvider(t).updateNamespace((r=this.session)==null?void 0:r.namespaces[t])})}setNamespaces(t){const{namespaces:r,optionalNamespaces:s,sessionProperties:o}=t;r&&Object.keys(r).length&&(this.namespaces=r),s&&Object.keys(s).length&&(this.optionalNamespaces=s),this.sessionProperties=o,this.persist("namespaces",r),this.persist("optionalNamespaces",s)}validateChain(t){const[r,s]=(t==null?void 0:t.split(":"))||["",""];if(!this.namespaces||!Object.keys(this.namespaces).length)return[r,s];if(r&&!Object.keys(this.namespaces||{}).map(l=>oi(l)).includes(r))throw new Error(`Namespace '${r}' is not configured. Please call connect() first with namespace config.`);if(r&&s)return[r,s];const o=oi(Object.keys(this.namespaces)[0]),u=this.rpcProviders[o].getDefaultChain();return[o,u]}async requestAccounts(){const[t]=this.validateChain();return await this.getProvider(t).requestAccounts()}onChainChanged(t,r=!1){var s;if(!this.namespaces)return;const[o,u]=this.validateChain(t);r||this.getProvider(o).setDefaultChain(u),((s=this.namespaces[o])!=null?s:this.namespaces[`${o}:${u}`]).defaultChain=u,this.persist("namespaces",this.namespaces),this.events.emit("chainChanged",u)}onConnect(){this.createProviders(),this.events.emit("connect",{session:this.session})}async cleanup(){this.session=void 0,this.namespaces=void 0,this.optionalNamespaces=void 0,this.sessionProperties=void 0,this.persist("namespaces",void 0),this.persist("optionalNamespaces",void 0),this.persist("sessionProperties",void 0),await this.cleanupPendingPairings({deletePairings:!0})}persist(t,r){this.client.core.storage.setItem(`${Yu}/${t}`,r)}async getFromStore(t){return await this.client.core.storage.getItem(`${Yu}/${t}`)}}const gE=So,yE="wc",mE="ethereum_provider",vE=`${yE}@2:${mE}:`,wE="https://rpc.walletconnect.com/v1/",ys=["eth_sendTransaction","personal_sign"],Lh=["eth_accounts","eth_requestAccounts","eth_sendRawTransaction","eth_sign","eth_signTransaction","eth_signTypedData","eth_signTypedData_v3","eth_signTypedData_v4","eth_sendTransaction","personal_sign","wallet_switchEthereumChain","wallet_addEthereumChain","wallet_getPermissions","wallet_requestPermissions","wallet_registerOnboarding","wallet_watchAsset","wallet_scanQRCode"],ms=["chainChanged","accountsChanged"],zh=["chainChanged","accountsChanged","message","disconnect","connect"];var _E=Object.defineProperty,bE=Object.defineProperties,EE=Object.getOwnPropertyDescriptors,ih=Object.getOwnPropertySymbols,IE=Object.prototype.hasOwnProperty,PE=Object.prototype.propertyIsEnumerable,sh=(a,t,r)=>t in a?_E(a,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):a[t]=r,ci=(a,t)=>{for(var r in t||(t={}))IE.call(t,r)&&sh(a,r,t[r]);if(ih)for(var r of ih(t))PE.call(t,r)&&sh(a,r,t[r]);return a},nh=(a,t)=>bE(a,EE(t));function vs(a){return Number(a[0].split(":")[1])}function io(a){return`0x${a.toString(16)}`}function SE(a){const{chains:t,optionalChains:r,methods:s,optionalMethods:o,events:u,optionalEvents:l,rpcMap:y}=a;if(!so(t))throw new Error("Invalid chains");const I={chains:t,methods:s||ys,events:u||ms,rpcMap:ci({},t.length?{[vs(t)]:y[vs(t)]}:{})},S=u==null?void 0:u.filter(B=>!ms.includes(B)),R=s==null?void 0:s.filter(B=>!ys.includes(B));if(!r&&!l&&!o&&!(S!=null&&S.length)&&!(R!=null&&R.length))return{required:t.length?I:void 0};const x=(S==null?void 0:S.length)&&(R==null?void 0:R.length)||!r,j={chains:[...new Set(x?I.chains.concat(r||[]):r)],methods:[...new Set(I.methods.concat(o!=null&&o.length?o:Lh))],events:[...new Set(I.events.concat(l!=null&&l.length?l:zh))],rpcMap:y};return{required:t.length?I:void 0,optional:r.length?j:void 0}}class Es{constructor(){this.events=new Ge.eventsExports.EventEmitter,this.namespace="eip155",this.accounts=[],this.chainId=1,this.STORAGE_KEY=vE,this.on=(t,r)=>(this.events.on(t,r),this),this.once=(t,r)=>(this.events.once(t,r),this),this.removeListener=(t,r)=>(this.events.removeListener(t,r),this),this.off=(t,r)=>(this.events.off(t,r),this),this.parseAccount=t=>this.isCompatibleChainId(t)?this.parseAccountId(t).address:t,this.signer={},this.rpc={}}static async init(t){const r=new Es;return await r.initialize(t),r}async request(t){return await this.signer.request(t,this.formatChainId(this.chainId))}sendAsync(t,r){this.signer.sendAsync(t,r,this.formatChainId(this.chainId))}get connected(){return this.signer.client?this.signer.client.core.relayer.connected:!1}get connecting(){return this.signer.client?this.signer.client.core.relayer.connecting:!1}async enable(){return this.session||await this.connect(),await this.request({method:"eth_requestAccounts"})}async connect(t){if(!this.signer.client)throw new Error("Provider not initialized. Call init() first");this.loadConnectOpts(t);const{required:r,optional:s}=SE(this.rpc);try{const o=await new Promise(async(l,y)=>{var I;this.rpc.showQrModal&&((I=this.modal)==null||I.subscribeModal(S=>{!S.open&&!this.signer.session&&(this.signer.abortPairingAttempt(),y(new Error("Connection request reset. Please try again.")))})),await this.signer.connect(nh(ci({namespaces:ci({},r&&{[this.namespace]:r})},s&&{optionalNamespaces:{[this.namespace]:s}}),{pairingTopic:t==null?void 0:t.pairingTopic})).then(S=>{l(S)}).catch(S=>{y(new Error(S.message))})});if(!o)return;const u=Uv(o.namespaces,[this.namespace]);this.setChainIds(this.rpc.chains.length?this.rpc.chains:u),this.setAccounts(u),this.events.emit("connect",{chainId:io(this.chainId)})}catch(o){throw this.signer.logger.error(o),o}finally{this.modal&&this.modal.closeModal()}}async disconnect(){this.session&&await this.signer.disconnect(),this.reset()}get isWalletConnect(){return!0}get session(){return this.signer.session}registerEventListeners(){this.signer.on("session_event",t=>{const{params:r}=t,{event:s}=r;s.name==="accountsChanged"?(this.accounts=this.parseAccounts(s.data),this.events.emit("accountsChanged",this.accounts)):s.name==="chainChanged"?this.setChainId(this.formatChainId(s.data)):this.events.emit(s.name,s.data),this.events.emit("session_event",t)}),this.signer.on("chainChanged",t=>{const r=parseInt(t);this.chainId=r,this.events.emit("chainChanged",io(this.chainId)),this.persist()}),this.signer.on("session_update",t=>{this.events.emit("session_update",t)}),this.signer.on("session_delete",t=>{this.reset(),this.events.emit("session_delete",t),this.events.emit("disconnect",nh(ci({},Lv("USER_DISCONNECTED")),{data:t.topic,name:"USER_DISCONNECTED"}))}),this.signer.on("display_uri",t=>{var r,s;this.rpc.showQrModal&&((r=this.modal)==null||r.closeModal(),(s=this.modal)==null||s.openModal({uri:t})),this.events.emit("display_uri",t)})}switchEthereumChain(t){this.request({method:"wallet_switchEthereumChain",params:[{chainId:t.toString(16)}]})}isCompatibleChainId(t){return typeof t=="string"?t.startsWith(`${this.namespace}:`):!1}formatChainId(t){return`${this.namespace}:${t}`}parseChainId(t){return Number(t.split(":")[1])}setChainIds(t){const r=t.filter(s=>this.isCompatibleChainId(s)).map(s=>this.parseChainId(s));r.length&&(this.chainId=r[0],this.events.emit("chainChanged",io(this.chainId)),this.persist())}setChainId(t){if(this.isCompatibleChainId(t)){const r=this.parseChainId(t);this.chainId=r,this.switchEthereumChain(r)}}parseAccountId(t){const[r,s,o]=t.split(":");return{chainId:`${r}:${s}`,address:o}}setAccounts(t){this.accounts=t.filter(r=>this.parseChainId(this.parseAccountId(r).chainId)===this.chainId).map(r=>this.parseAccountId(r).address),this.events.emit("accountsChanged",this.accounts)}getRpcConfig(t){var r,s;const o=(r=t==null?void 0:t.chains)!=null?r:[],u=(s=t==null?void 0:t.optionalChains)!=null?s:[],l=o.concat(u);if(!l.length)throw new Error("No chains specified in either `chains` or `optionalChains`");const y=o.length?(t==null?void 0:t.methods)||ys:[],I=o.length?(t==null?void 0:t.events)||ms:[],S=(t==null?void 0:t.optionalMethods)||[],R=(t==null?void 0:t.optionalEvents)||[],x=(t==null?void 0:t.rpcMap)||this.buildRpcMap(l,t.projectId),j=(t==null?void 0:t.qrModalOptions)||void 0;return{chains:o==null?void 0:o.map(B=>this.formatChainId(B)),optionalChains:u.map(B=>this.formatChainId(B)),methods:y,events:I,optionalMethods:S,optionalEvents:R,rpcMap:x,showQrModal:!!(t!=null&&t.showQrModal),qrModalOptions:j,projectId:t.projectId,metadata:t.metadata}}buildRpcMap(t,r){const s={};return t.forEach(o=>{s[o]=this.getRpcUrl(o,r)}),s}async initialize(t){if(this.rpc=this.getRpcConfig(t),this.chainId=this.rpc.chains.length?vs(this.rpc.chains):vs(this.rpc.optionalChains),this.signer=await gE.init({projectId:this.rpc.projectId,metadata:this.rpc.metadata,disableProviderPing:t.disableProviderPing,relayUrl:t.relayUrl,storageOptions:t.storageOptions}),this.registerEventListeners(),await this.loadPersistedSession(),this.rpc.showQrModal){let r;try{const{WalletConnectModal:s}=await Promise.resolve().then(()=>require("./index-EPcXyhD3.js")).then(o=>o.index);r=s}catch{throw new Error("To use QR modal, please install @walletconnect/modal package")}if(r)try{this.modal=new r(ci({projectId:this.rpc.projectId},this.rpc.qrModalOptions))}catch(s){throw this.signer.logger.error(s),new Error("Could not generate WalletConnectModal Instance")}}}loadConnectOpts(t){if(!t)return;const{chains:r,optionalChains:s,rpcMap:o}=t;r&&so(r)&&(this.rpc.chains=r.map(u=>this.formatChainId(u)),r.forEach(u=>{this.rpc.rpcMap[u]=(o==null?void 0:o[u])||this.getRpcUrl(u)})),s&&so(s)&&(this.rpc.optionalChains=[],this.rpc.optionalChains=s==null?void 0:s.map(u=>this.formatChainId(u)),s.forEach(u=>{this.rpc.rpcMap[u]=(o==null?void 0:o[u])||this.getRpcUrl(u)}))}getRpcUrl(t,r){var s;return((s=this.rpc.rpcMap)==null?void 0:s[t])||`${wE}?chainId=eip155:${t}&projectId=${r||this.rpc.projectId}`}async loadPersistedSession(){if(!this.session)return;const t=await this.signer.client.core.storage.getItem(`${this.STORAGE_KEY}/chainId`),r=this.session.namespaces[`${this.namespace}:${t}`]?this.session.namespaces[`${this.namespace}:${t}`]:this.session.namespaces[this.namespace];this.setChainIds(t?[this.formatChainId(t)]:r==null?void 0:r.accounts),this.setAccounts(r==null?void 0:r.accounts)}reset(){this.chainId=1,this.accounts=[]}persist(){this.session&&this.signer.client.core.storage.setItem(`${this.STORAGE_KEY}/chainId`,this.chainId)}parseAccounts(t){return typeof t=="string"||t instanceof String?[this.parseAccount(t)]:t.map(r=>this.parseAccount(r))}}const OE=Es;exports.EthereumProvider=OE;exports.OPTIONAL_EVENTS=zh;exports.OPTIONAL_METHODS=Lh;exports.REQUIRED_EVENTS=ms;exports.REQUIRED_METHODS=ys;exports.default=Es;
package/lib/index.js CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t=require("./index-ByG9EJHX.js");exports.AutomaticCCTPRoute=t.AutomaticCCTPRoute;exports.AutomaticTokenBridgeRoute=t.AutomaticTokenBridgeRoute;exports.CCTPRoute=t.CCTPRoute;exports.DEFAULT_ROUTES=t.DEFAULT_ROUTES;exports.MAINNET=t.MAINNET;exports.MayanRoute=t.MayanRoute;exports.MayanRouteMCTP=t.MayanRouteMCTP;exports.MayanRouteSWIFT=t.MayanRouteSWIFT;exports.MayanRouteWH=t.MayanRouteWH;exports.TESTNET=t.TESTNET;exports.TokenBridgeRoute=t.TokenBridgeRoute;exports.dark=t.dark;exports.default=t.WormholeConnect;exports.light=t.light;exports.nttAutomaticRoute=t.nttAutomaticRoute;exports.nttManualRoute=t.nttManualRoute;exports.nttRoutes=t.nttRoutes;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t=require("./index-BZ7LatAr.js");exports.AutomaticCCTPRoute=t.AutomaticCCTPRoute;exports.AutomaticTokenBridgeRoute=t.AutomaticTokenBridgeRoute;exports.CCTPRoute=t.CCTPRoute;exports.DEFAULT_ROUTES=t.DEFAULT_ROUTES;exports.MAINNET=t.MAINNET;exports.MayanRoute=t.MayanRoute;exports.MayanRouteMCTP=t.MayanRouteMCTP;exports.MayanRouteSWIFT=t.MayanRouteSWIFT;exports.MayanRouteWH=t.MayanRouteWH;exports.TESTNET=t.TESTNET;exports.TokenBridgeRoute=t.TokenBridgeRoute;exports.dark=t.dark;exports.default=t.WormholeConnect;exports.light=t.light;exports.nttAutomaticRoute=t.nttAutomaticRoute;exports.nttManualRoute=t.nttManualRoute;exports.nttRoutes=t.nttRoutes;
package/lib/index.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import { dV as d, dT as o, dW as s, dP as e, dL as u, dX as R, dZ as T, d_ as n, dY as M, dM as i, dU as r, dN as A, dK as C, dO as E, dR as m, dS as y, dQ as N } from "./index-BDhzG0Bz.mjs";
1
+ import { dV as d, dT as o, dW as s, dP as e, dL as u, dX as R, dZ as T, d_ as n, dY as M, dM as i, dU as r, dN as A, dK as C, dO as E, dR as m, dS as y, dQ as N } from "./index-EhUlCH18.mjs";
2
2
  export {
3
3
  d as AutomaticCCTPRoute,
4
4
  o as AutomaticTokenBridgeRoute,