@dodoex/wallet-web3 0.6.3 → 0.6.5

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 (217) hide show
  1. package/dist/PhArrowCircleDown-4a08ae8e.js +14 -0
  2. package/dist/PhArrowClockwise-401ea1c0.js +14 -0
  3. package/dist/PhArrowDown-789ae7d2.js +14 -0
  4. package/dist/PhArrowLeft-2e6d4940.js +14 -0
  5. package/dist/PhArrowRight-2928b0dc.js +14 -0
  6. package/dist/PhArrowSquareOut-17d61d08.js +14 -0
  7. package/dist/PhArrowUp-1cfcf9df.js +14 -0
  8. package/dist/PhArrowUpRight-552c41cb.js +14 -0
  9. package/dist/PhArrowsClockwise-92a70162.js +14 -0
  10. package/dist/PhArrowsDownUp-ce27c8a7.js +14 -0
  11. package/dist/PhArrowsLeftRight-ed549dc7.js +14 -0
  12. package/dist/PhBank-92a1a1df.js +14 -0
  13. package/dist/PhBrowser-495dc3ce.js +14 -0
  14. package/dist/PhCaretDown-610f20fc.js +14 -0
  15. package/dist/PhCaretLeft-2a86ee53.js +14 -0
  16. package/dist/PhCaretRight-f3057f58.js +14 -0
  17. package/dist/PhCaretUp-7b74b8cb.js +14 -0
  18. package/dist/PhCheck-c514f32c.js +14 -0
  19. package/dist/PhCircleHalf-3bfd24c9.js +14 -0
  20. package/dist/PhClock-29284ead.js +14 -0
  21. package/dist/PhCompass-101d3241.js +14 -0
  22. package/dist/PhCopy-d92dcd27.js +14 -0
  23. package/dist/PhCreditCard-d8d77fc2.js +14 -0
  24. package/dist/PhCurrencyDollar-6553df79.js +14 -0
  25. package/dist/PhDesktop-91653c8e.js +14 -0
  26. package/dist/PhDeviceMobile-0f3d8fa2.js +14 -0
  27. package/dist/PhDotsThree-67debca2.js +14 -0
  28. package/dist/PhEnvelope-f83faab2.js +14 -0
  29. package/dist/PhFunnelSimple-5058af43.js +14 -0
  30. package/dist/PhGlobe-c4653621.js +14 -0
  31. package/dist/PhIdentificationCard-848bf9a1.js +14 -0
  32. package/dist/PhImage-de71fc6b.js +14 -0
  33. package/dist/PhInfo-9614a766.js +14 -0
  34. package/dist/PhLightbulb-7d582ae7.js +14 -0
  35. package/dist/PhMagnifyingGlass-c926bd63.js +14 -0
  36. package/dist/PhPaperPlaneRight-76b25832.js +14 -0
  37. package/dist/PhPlus-767ddc55.js +14 -0
  38. package/dist/PhPower-95f188dd.js +14 -0
  39. package/dist/PhPuzzlePiece-f016afe5.js +14 -0
  40. package/dist/PhQrCode-e9b7ab93.js +14 -0
  41. package/dist/PhQuestion-ea0e639d.js +14 -0
  42. package/dist/PhQuestionMark-13d6338e.js +14 -0
  43. package/dist/PhSealCheck-45bb7b9c.js +14 -0
  44. package/dist/PhSignOut-6b91c59c.js +14 -0
  45. package/dist/PhSpinner-eb9b7ac1.js +14 -0
  46. package/dist/PhTrash-758cc3b3.js +14 -0
  47. package/dist/PhUser-0834861d.js +14 -0
  48. package/dist/PhVault-e4d6f9af.js +14 -0
  49. package/dist/PhWallet-5e257abe.js +14 -0
  50. package/dist/PhWarning-6af3740e.js +14 -0
  51. package/dist/PhWarningCircle-a78fd8e8.js +14 -0
  52. package/dist/PhX-60c46532.js +14 -0
  53. package/dist/{__tslib-2b1b6d17.js → __tslib-6d6a586c.js} +1 -1
  54. package/dist/{alchemy-provider-5870b6fa-b23243a1.js → alchemy-provider-5870b6fa-a9fe5aa5.js} +1 -1
  55. package/dist/{alchemy-websocket-provider-213da986-559da73b.js → alchemy-websocket-provider-213da986-16164c2e.js} +1 -1
  56. package/dist/basic-77fe1b96.js +1320 -0
  57. package/dist/{blocto-8e69bccf.js → blocto-ab8ba330.js} +1 -1
  58. package/dist/{ccip-99b4ad16.js → ccip-e246f9cf.js} +1 -1
  59. package/dist/cjs/PhArrowCircleDown-df23d036.cjs +14 -0
  60. package/dist/cjs/PhArrowClockwise-440d23dc.cjs +14 -0
  61. package/dist/cjs/PhArrowDown-252590ed.cjs +14 -0
  62. package/dist/cjs/PhArrowLeft-d480faa4.cjs +14 -0
  63. package/dist/cjs/PhArrowRight-969dbdd8.cjs +14 -0
  64. package/dist/cjs/PhArrowSquareOut-eabfdecb.cjs +14 -0
  65. package/dist/cjs/PhArrowUp-66bd5f15.cjs +14 -0
  66. package/dist/cjs/PhArrowUpRight-6df3b31b.cjs +14 -0
  67. package/dist/cjs/PhArrowsClockwise-3a9d2dc6.cjs +14 -0
  68. package/dist/cjs/PhArrowsDownUp-47a7788f.cjs +14 -0
  69. package/dist/cjs/PhArrowsLeftRight-f90368dd.cjs +14 -0
  70. package/dist/cjs/PhBank-670a2708.cjs +14 -0
  71. package/dist/cjs/PhBrowser-b9c35fd1.cjs +14 -0
  72. package/dist/cjs/PhCaretDown-11a46455.cjs +14 -0
  73. package/dist/cjs/PhCaretLeft-04f11ca7.cjs +14 -0
  74. package/dist/cjs/PhCaretRight-391111c1.cjs +14 -0
  75. package/dist/cjs/PhCaretUp-b17dccf6.cjs +14 -0
  76. package/dist/cjs/PhCheck-08bf36b0.cjs +14 -0
  77. package/dist/cjs/PhCircleHalf-0a9eac35.cjs +14 -0
  78. package/dist/cjs/PhClock-cf1cc2cb.cjs +14 -0
  79. package/dist/cjs/PhCompass-e9671b30.cjs +14 -0
  80. package/dist/cjs/PhCopy-9132cbc5.cjs +14 -0
  81. package/dist/cjs/PhCreditCard-853e1556.cjs +14 -0
  82. package/dist/cjs/PhCurrencyDollar-34eea829.cjs +14 -0
  83. package/dist/cjs/PhDesktop-c02b883b.cjs +14 -0
  84. package/dist/cjs/PhDeviceMobile-93c2088c.cjs +14 -0
  85. package/dist/cjs/PhDotsThree-69beaba7.cjs +14 -0
  86. package/dist/cjs/PhEnvelope-86ee730e.cjs +14 -0
  87. package/dist/cjs/PhFunnelSimple-056c2f76.cjs +14 -0
  88. package/dist/cjs/PhGlobe-64c4ee8e.cjs +14 -0
  89. package/dist/cjs/PhIdentificationCard-ec7a98e0.cjs +14 -0
  90. package/dist/cjs/PhImage-07904cbb.cjs +14 -0
  91. package/dist/cjs/PhInfo-34eeeace.cjs +14 -0
  92. package/dist/cjs/PhLightbulb-39ebe854.cjs +14 -0
  93. package/dist/cjs/PhMagnifyingGlass-2fbe4400.cjs +14 -0
  94. package/dist/cjs/PhPaperPlaneRight-e06c210f.cjs +14 -0
  95. package/dist/cjs/PhPlus-03a04ed3.cjs +14 -0
  96. package/dist/cjs/PhPower-4cc2ecb8.cjs +14 -0
  97. package/dist/cjs/PhPuzzlePiece-035d561e.cjs +14 -0
  98. package/dist/cjs/PhQrCode-37e23b36.cjs +14 -0
  99. package/dist/cjs/PhQuestion-bfba435e.cjs +14 -0
  100. package/dist/cjs/PhQuestionMark-8ef38ecf.cjs +14 -0
  101. package/dist/cjs/PhSealCheck-5458de15.cjs +14 -0
  102. package/dist/cjs/PhSignOut-2d177ea1.cjs +14 -0
  103. package/dist/cjs/PhSpinner-e7c590df.cjs +14 -0
  104. package/dist/cjs/PhTrash-1920f5dc.cjs +14 -0
  105. package/dist/cjs/PhUser-84a1a685.cjs +14 -0
  106. package/dist/cjs/PhVault-1493c03f.cjs +14 -0
  107. package/dist/cjs/PhWallet-f0502f03.cjs +14 -0
  108. package/dist/cjs/PhWarning-1bf637ba.cjs +14 -0
  109. package/dist/cjs/PhWarningCircle-b1747661.cjs +14 -0
  110. package/dist/cjs/PhX-f864d86c.cjs +14 -0
  111. package/dist/cjs/{__tslib-91c50e46.cjs → __tslib-a9f27ba6.cjs} +1 -1
  112. package/dist/cjs/{alchemy-provider-5870b6fa-a824dbf0.cjs → alchemy-provider-5870b6fa-bb1c607e.cjs} +1 -1
  113. package/dist/cjs/{alchemy-websocket-provider-213da986-f96378c8.cjs → alchemy-websocket-provider-213da986-521569b5.cjs} +1 -1
  114. package/dist/cjs/basic-b777d2b1.cjs +1320 -0
  115. package/dist/cjs/{blocto-255deb25.cjs → blocto-09e0d574.cjs} +1 -1
  116. package/dist/cjs/{ccip-58f4c3ce.cjs → ccip-6ebee1cf.cjs} +1 -1
  117. package/dist/cjs/core-78a709db.cjs +210 -0
  118. package/dist/cjs/{draggabilly-b00ba129.cjs → draggabilly-76af6217.cjs} +1 -1
  119. package/dist/cjs/features-fa5c5622.cjs +1 -0
  120. package/dist/cjs/id-c0538166.cjs +1 -0
  121. package/dist/cjs/{index-4cb4044e.cjs → index-07e81389.cjs} +1 -1
  122. package/dist/cjs/{index-28fe8dc2.cjs → index-093cef5a.cjs} +2 -2
  123. package/dist/cjs/{index-0f3e4a4a.cjs → index-208df3f3.cjs} +1 -1
  124. package/dist/cjs/{index-9cbeb66d.cjs → index-253e7cce.cjs} +1 -1
  125. package/dist/cjs/index-2e8e7a50.cjs +4 -0
  126. package/dist/cjs/index-395b933d.cjs +2 -0
  127. package/dist/cjs/{index-b0eb86b6.cjs → index-54d7fc75.cjs} +1 -1
  128. package/dist/cjs/{index-5d1879f6.cjs → index-5d28acf4.cjs} +3 -3
  129. package/dist/cjs/{index-02043814.cjs → index-5dac528b.cjs} +4 -4
  130. package/dist/cjs/index-702e8f89.cjs +15 -0
  131. package/dist/cjs/{index-7d213984.cjs → index-823e17e6.cjs} +1 -1
  132. package/dist/cjs/{index-2c339ec0.cjs → index-916994aa.cjs} +1 -1
  133. package/dist/cjs/{index-96c22872.cjs → index-a2b665f4.cjs} +1 -1
  134. package/dist/cjs/{index-110f55af.cjs → index-b099293c.cjs} +1 -1
  135. package/dist/cjs/index-d72ddbc1.cjs +17 -0
  136. package/dist/cjs/index-ef4ef0cc.cjs +1449 -0
  137. package/dist/cjs/index.cjs +1 -1
  138. package/dist/cjs/{interface-a67cd05c.cjs → interface-4947cfa6.cjs} +1 -1
  139. package/dist/cjs/lib-typedarrays-a9baf142.cjs +1 -0
  140. package/dist/cjs/native-55bb141d.cjs +1 -0
  141. package/dist/cjs/{portis-ec737dc5.cjs → portis-08d9d731.cjs} +1 -1
  142. package/dist/cjs/property-29e6f732.cjs +29 -0
  143. package/dist/cjs/providers/connector/safeGnosis/query.d.ts +2 -1
  144. package/dist/cjs/providers/connector/types.d.ts +1 -1
  145. package/dist/cjs/providers/wallets/index.d.ts +1 -0
  146. package/dist/cjs/rainbow-6e84bcfa.cjs +1 -0
  147. package/dist/cjs/sha224-b46bc3e6.cjs +1 -0
  148. package/dist/cjs/sha256-ccd47519.cjs +1 -0
  149. package/dist/cjs/{typed-data-65a82f1e.cjs → typed-data-5176b792.cjs} +1 -1
  150. package/dist/cjs/uAuth-b29d2670.cjs +1 -0
  151. package/dist/cjs/w3m-modal-70bcf6d8.cjs +2380 -0
  152. package/dist/cjs/walletConnect-20d477a9.cjs +1 -0
  153. package/dist/cjs/{walletLink-095edc5f.cjs → walletLink-08b8da20.cjs} +2 -2
  154. package/dist/core-4d7ad6f2.js +210 -0
  155. package/dist/{draggabilly-919fe798.js → draggabilly-daf3b444.js} +1 -1
  156. package/dist/features-d8d1c9ce.js +1 -0
  157. package/dist/id-d4d22b29.js +1 -0
  158. package/dist/{index-de7476e4.js → index-09298bd0.js} +7 -7
  159. package/dist/{index-085a063c.js → index-244a8189.js} +1 -1
  160. package/dist/{index-23ae718c.js → index-2ad0fb2a.js} +1 -1
  161. package/dist/index-35d87b79.js +17 -0
  162. package/dist/{index-bbaf7a43.js → index-587ff998.js} +1 -1
  163. package/dist/{index-601a6250.js → index-750a7dfe.js} +1 -1
  164. package/dist/{index-cc764016.js → index-8bd12de1.js} +1 -1
  165. package/dist/{index-6382b40b.js → index-938686fb.js} +1 -1
  166. package/dist/{index-3cf73206.js → index-9d7fee1e.js} +2 -2
  167. package/dist/{index-fd3058aa.js → index-aa744ca0.js} +1 -1
  168. package/dist/{index-7fabb817.js → index-b7d25e8a.js} +3 -3
  169. package/dist/index-bb1a0019.js +15 -0
  170. package/dist/index-c5ca8a4e.js +4 -0
  171. package/dist/{index-f5d95949.js → index-cddbc8e8.js} +1 -1
  172. package/dist/index-f095c09e.js +2 -0
  173. package/dist/index-ffdf981b.js +1449 -0
  174. package/dist/index.js +1 -1
  175. package/dist/{interface-82bdcddb.js → interface-0c535796.js} +1 -1
  176. package/dist/lib-typedarrays-979d2723.js +1 -0
  177. package/dist/native-029c50f7.js +1 -0
  178. package/dist/{portis-0a2bd95e.js → portis-9602ac9f.js} +1 -1
  179. package/dist/property-8eb37909.js +35 -0
  180. package/dist/providers/connector/safeGnosis/query.d.ts +2 -1
  181. package/dist/providers/connector/types.d.ts +1 -1
  182. package/dist/providers/wallets/index.d.ts +1 -0
  183. package/dist/rainbow-ccab7a95.js +1 -0
  184. package/dist/sha224-fe98e1bf.js +1 -0
  185. package/dist/sha256-5a24dfd5.js +1 -0
  186. package/dist/{typed-data-83d7ae9a.js → typed-data-3a3d44dc.js} +1 -1
  187. package/dist/uAuth-27f5728d.js +1 -0
  188. package/dist/w3m-modal-49add722.js +2380 -0
  189. package/dist/walletConnect-a541881e.js +1 -0
  190. package/dist/{walletLink-1b3cb067.js → walletLink-67264328.js} +2 -2
  191. package/package.json +5 -5
  192. package/dist/_commonjs-dynamic-modules-7cfc9805.js +0 -1
  193. package/dist/cjs/_commonjs-dynamic-modules-f09a98c7.cjs +0 -1
  194. package/dist/cjs/id-0c26cee0.cjs +0 -1
  195. package/dist/cjs/index-21f86827.cjs +0 -17
  196. package/dist/cjs/index-35edc6a0.cjs +0 -60
  197. package/dist/cjs/index-568647cf.cjs +0 -15
  198. package/dist/cjs/index-9f2a69d5.cjs +0 -1
  199. package/dist/cjs/index.es-2a36620f.cjs +0 -9
  200. package/dist/cjs/lib-typedarrays-f921c603.cjs +0 -1
  201. package/dist/cjs/rainbow-322fb6a9.cjs +0 -1
  202. package/dist/cjs/sha224-f0657d8a.cjs +0 -1
  203. package/dist/cjs/sha256-a0c6063a.cjs +0 -1
  204. package/dist/cjs/uAuth-d389b45d.cjs +0 -1
  205. package/dist/cjs/walletConnect-3c32ceb8.cjs +0 -1
  206. package/dist/id-bc1ef47c.js +0 -1
  207. package/dist/index-24d19ee3.js +0 -15
  208. package/dist/index-65d96278.js +0 -60
  209. package/dist/index-e4c02dc7.js +0 -17
  210. package/dist/index-f08d6a6b.js +0 -1
  211. package/dist/index.es-474ba2f2.js +0 -9
  212. package/dist/lib-typedarrays-becaa8ad.js +0 -1
  213. package/dist/rainbow-aa24fa3b.js +0 -1
  214. package/dist/sha224-e9d5a920.js +0 -1
  215. package/dist/sha256-65d6895c.js +0 -1
  216. package/dist/uAuth-8aef513a.js +0 -1
  217. package/dist/walletConnect-f12ca9e1.js +0 -1
@@ -1,4 +1,4 @@
1
- "use strict";var t=require("./index-02043814.cjs");function i(t,i){return i.forEach((function(i){i&&"string"!=typeof i&&!Array.isArray(i)&&Object.keys(i).forEach((function(e){if("default"!==e&&!(e in t)){var n=Object.getOwnPropertyDescriptor(i,e);Object.defineProperty(t,e,n.get?n:{enumerable:!0,get:function(){return i[e]}})}}))})),Object.freeze(t)}var e,n={exports:{}},o={exports:{}};function s(){return e||(e=1,t=o,function(i,e){t.exports?t.exports=e():i.getSize=e()}(window,(function(){function t(t){let i=parseFloat(t);return-1==t.indexOf("%")&&!isNaN(i)&&i}let i=["paddingLeft","paddingRight","paddingTop","paddingBottom","marginLeft","marginRight","marginTop","marginBottom","borderLeftWidth","borderRightWidth","borderTopWidth","borderBottomWidth"];return function(e){if("string"==typeof e&&(e=document.querySelector(e)),!e||"object"!=typeof e||!e.nodeType)return;let n=getComputedStyle(e);if("none"==n.display)return function(){let t={width:0,height:0,innerWidth:0,innerHeight:0,outerWidth:0,outerHeight:0};return i.forEach((i=>{t[i]=0})),t}();let o={};o.width=e.offsetWidth,o.height=e.offsetHeight;let s=o.isBorderBox="border-box"==n.boxSizing;i.forEach((t=>{let i=n[t],e=parseFloat(i);o[t]=isNaN(e)?0:e}));let r=o.paddingLeft+o.paddingRight,h=o.paddingTop+o.paddingBottom,a=o.marginLeft+o.marginRight,d=o.marginTop+o.marginBottom,l=o.borderLeftWidth+o.borderRightWidth,c=o.borderTopWidth+o.borderBottomWidth,u=t(n.width);!1!==u&&(o.width=u+(s?0:r+l));let p=t(n.height);return!1!==p&&(o.height=p+(s?0:h+c)),o.innerWidth=o.width-(r+l),o.innerHeight=o.height-(h+c),o.outerWidth=o.width+a,o.outerHeight=o.height+d,o}}))),o.exports;var t}var r,h,a,d={exports:{}},l={exports:{}};function c(){return r||(r=1,i=l,e="undefined"!=typeof window?window:t.commonjsGlobal,n=function(){function t(){}let i=t.prototype;return i.on=function(t,i){if(!t||!i)return this;let e=this._events=this._events||{},n=e[t]=e[t]||[];return n.includes(i)||n.push(i),this},i.once=function(t,i){if(!t||!i)return this;this.on(t,i);let e=this._onceEvents=this._onceEvents||{};return(e[t]=e[t]||{})[i]=!0,this},i.off=function(t,i){let e=this._events&&this._events[t];if(!e||!e.length)return this;let n=e.indexOf(i);return-1!=n&&e.splice(n,1),this},i.emitEvent=function(t,i){let e=this._events&&this._events[t];if(!e||!e.length)return this;e=e.slice(0),i=i||[];let n=this._onceEvents&&this._onceEvents[t];for(let o of e)n&&n[o]&&(this.off(t,o),delete n[o]),o.apply(this,i);return this},i.allOff=function(){return delete this._events,delete this._onceEvents,this},t},i.exports?i.exports=n():e.EvEmitter=n()),l.exports;var i,e,n}
1
+ "use strict";var t=require("./index-5dac528b.cjs");function i(t,i){return i.forEach((function(i){i&&"string"!=typeof i&&!Array.isArray(i)&&Object.keys(i).forEach((function(e){if("default"!==e&&!(e in t)){var n=Object.getOwnPropertyDescriptor(i,e);Object.defineProperty(t,e,n.get?n:{enumerable:!0,get:function(){return i[e]}})}}))})),Object.freeze(t)}var e,n={exports:{}},o={exports:{}};function s(){return e||(e=1,t=o,function(i,e){t.exports?t.exports=e():i.getSize=e()}(window,(function(){function t(t){let i=parseFloat(t);return-1==t.indexOf("%")&&!isNaN(i)&&i}let i=["paddingLeft","paddingRight","paddingTop","paddingBottom","marginLeft","marginRight","marginTop","marginBottom","borderLeftWidth","borderRightWidth","borderTopWidth","borderBottomWidth"];return function(e){if("string"==typeof e&&(e=document.querySelector(e)),!e||"object"!=typeof e||!e.nodeType)return;let n=getComputedStyle(e);if("none"==n.display)return function(){let t={width:0,height:0,innerWidth:0,innerHeight:0,outerWidth:0,outerHeight:0};return i.forEach((i=>{t[i]=0})),t}();let o={};o.width=e.offsetWidth,o.height=e.offsetHeight;let s=o.isBorderBox="border-box"==n.boxSizing;i.forEach((t=>{let i=n[t],e=parseFloat(i);o[t]=isNaN(e)?0:e}));let r=o.paddingLeft+o.paddingRight,h=o.paddingTop+o.paddingBottom,a=o.marginLeft+o.marginRight,d=o.marginTop+o.marginBottom,l=o.borderLeftWidth+o.borderRightWidth,c=o.borderTopWidth+o.borderBottomWidth,u=t(n.width);!1!==u&&(o.width=u+(s?0:r+l));let p=t(n.height);return!1!==p&&(o.height=p+(s?0:h+c)),o.innerWidth=o.width-(r+l),o.innerHeight=o.height-(h+c),o.outerWidth=o.width+a,o.outerHeight=o.height+d,o}}))),o.exports;var t}var r,h,a,d={exports:{}},l={exports:{}};function c(){return r||(r=1,i=l,e="undefined"!=typeof window?window:t.commonjsGlobal,n=function(){function t(){}let i=t.prototype;return i.on=function(t,i){if(!t||!i)return this;let e=this._events=this._events||{},n=e[t]=e[t]||[];return n.includes(i)||n.push(i),this},i.once=function(t,i){if(!t||!i)return this;this.on(t,i);let e=this._onceEvents=this._onceEvents||{};return(e[t]=e[t]||{})[i]=!0,this},i.off=function(t,i){let e=this._events&&this._events[t];if(!e||!e.length)return this;let n=e.indexOf(i);return-1!=n&&e.splice(n,1),this},i.emitEvent=function(t,i){let e=this._events&&this._events[t];if(!e||!e.length)return this;e=e.slice(0),i=i||[];let n=this._onceEvents&&this._onceEvents[t];for(let o of e)n&&n[o]&&(this.off(t,o),delete n[o]),o.apply(this,i);return this},i.allOff=function(){return delete this._events,delete this._onceEvents,this},t},i.exports?i.exports=n():e.EvEmitter=n()),l.exports;var i,e,n}
2
2
  /*!
3
3
  * Unidragger v3.0.1
4
4
  * Draggable base class
@@ -0,0 +1 @@
1
+ "use strict";var e=require("./core-78a709db.cjs");require("events"),require("./index-2e8e7a50.cjs"),require("./__tslib-a9f27ba6.cjs"),require("./index-5dac528b.cjs"),require("@ethersproject/providers"),require("zustand"),require("@ethersproject/bytes"),require("@ethersproject/properties"),require("@ethersproject/address"),require("@ethersproject/abstract-signer"),require("buffer"),require("@ethersproject/abstract-provider"),require("@ethersproject/contracts"),require("@ethersproject/constants"),require("@ethersproject/transactions");class t{constructor(e){this.getNonce=e.getNonce}async createMessage(e){const t={accountAddress:e.accountAddress,chainId:e.chainId,version:"1",domain:"undefined"==typeof document?"Unknown Domain":document.location.host,uri:"undefined"==typeof document?"Unknown URI":document.location.href,resources:this.resources,nonce:await this.getNonce(e),issuedAt:this.stringifyDate(new Date),statement:void 0,expirationTime:void 0,notBefore:void 0},r={toString:()=>this.stringify(t)};return Object.assign(t,r)}stringify(e){const t=this.getNetworkName(e.chainId);return[`${e.domain} wants you to sign in with your ${t} account:`,e.accountAddress,e.statement?`\n${e.statement}\n`:"",`URI: ${e.uri}`,`Version: ${e.version}`,`Chain ID: ${e.chainId}`,`Nonce: ${e.nonce}`,e.issuedAt&&`Issued At: ${e.issuedAt}`,e.expirationTime&&`Expiration Time: ${e.expirationTime}`,e.notBefore&&`Not Before: ${e.notBefore}`,e.requestId&&`Request ID: ${e.requestId}`,e.resources?.length&&e.resources.reduce(((e,t)=>`${e}\n- ${t}`),"Resources:")].filter((e=>"string"==typeof e)).join("\n").trim()}getNetworkName(t){const r=e.ChainController.getAllRequestedCaipNetworks();return e.NetworkUtil.getNetworkNameByCaipNetworkId(r,t)}stringifyDate(e){return e.toISOString()}}exports.ReownAuthentication=class{constructor(r={}){this.otpUuid=null,this.listeners={sessionChanged:[]},this.localAuthStorageKey=r.localAuthStorageKey||e.SafeLocalStorageKeys.SIWX_AUTH_TOKEN,this.localNonceStorageKey=r.localNonceStorageKey||e.SafeLocalStorageKeys.SIWX_NONCE_TOKEN,this.required=r.required??!0,this.messenger=new t({getNonce:this.getNonce.bind(this)})}async createMessage(e){return this.messenger.createMessage(e)}async addSession(e){const t=await this.request({method:"POST",key:"authenticate",body:{data:e.data,message:e.message,signature:e.signature,clientId:this.getClientId(),walletInfo:this.getWalletInfo()},headers:["nonce","otp"]});this.setStorageToken(t.token,this.localAuthStorageKey),this.emit("sessionChanged",e),this.setAppKitAccountUser(function(e){const t=e.split(".");if(3!==t.length)throw new Error("Invalid token");const r=t[1];if("string"!=typeof r)throw new Error("Invalid token");const s=r.replace(/-/gu,"+").replace(/_/gu,"/"),o=s.padEnd(s.length+(4-s.length%4)%4,"=");return JSON.parse(atob(o))}(t.token)),this.otpUuid=null}async getSessions(e,t){try{if(!this.getStorageToken(this.localAuthStorageKey))return[];const r=await this.request({method:"GET",key:"me",query:{},headers:["auth"]});if(!r)return[];const s=r.address.toLowerCase()===t.toLowerCase(),o=r.caip2Network===e;if(!s||!o)return[];const n={data:{accountAddress:r.address,chainId:r.caip2Network},message:"",signature:""};return this.emit("sessionChanged",n),this.setAppKitAccountUser(r),[n]}catch{return[]}}async revokeSession(e,t){return Promise.resolve(this.clearStorageTokens())}async setSessions(t){if(0===t.length)this.clearStorageTokens();else{const r=t.find((t=>t.data.chainId===e.getActiveCaipNetwork()?.caipNetworkId))||t[0];await this.addSession(r)}}getRequired(){return this.required}async getSessionAccount(){if(!this.getStorageToken(this.localAuthStorageKey))throw new Error("Not authenticated");return this.request({method:"GET",key:"me",body:void 0,query:{includeAppKitAccount:!0},headers:["auth"]})}async setSessionAccountMetadata(e=null){if(!this.getStorageToken(this.localAuthStorageKey))throw new Error("Not authenticated");return this.request({method:"PUT",key:"account-metadata",body:{metadata:e},headers:["auth"]})}on(e,t){return this.listeners[e].push(t),()=>{this.listeners[e]=this.listeners[e].filter((e=>e!==t))}}removeAllListeners(){Object.keys(this.listeners).forEach((e=>{this.listeners[e]=[]}))}async requestEmailOtp({email:e,account:t}){const r=await this.request({method:"POST",key:"otp",body:{email:e,account:t}});return this.otpUuid=r.uuid,this.messenger.resources=[`email:${e}`],r}confirmEmailOtp({code:e}){return this.request({method:"PUT",key:"otp",body:{code:e},headers:["otp"]})}async request({method:t,key:r,query:s,body:o,headers:n}){const{projectId:i,st:a,sv:c}=this.getSDKProperties(),u=new URL(`${e.ConstantsUtil.W3M_API_URL}/auth/v1/${String(r)}`);u.searchParams.set("projectId",i),u.searchParams.set("st",a),u.searchParams.set("sv",c),s&&Object.entries(s).forEach((([e,t])=>u.searchParams.set(e,String(t))));const h=await fetch(u,{method:t,body:o?JSON.stringify(o):void 0,headers:Array.isArray(n)?n.reduce(((e,t)=>{switch(t){case"nonce":e["x-nonce-jwt"]=`Bearer ${this.getStorageToken(this.localNonceStorageKey)}`;break;case"auth":e.Authorization=`Bearer ${this.getStorageToken(this.localAuthStorageKey)}`;break;case"otp":this.otpUuid&&(e["x-otp"]=this.otpUuid)}return e}),{}):void 0});if(!h.ok)throw new Error(await h.text());return h.headers.get("content-type")?.includes("application/json")?h.json():null}getStorageToken(t){return e.SafeLocalStorage.getItem(t)}setStorageToken(t,r){e.SafeLocalStorage.setItem(r,t)}clearStorageTokens(){this.otpUuid=null,e.SafeLocalStorage.removeItem(this.localAuthStorageKey),e.SafeLocalStorage.removeItem(this.localNonceStorageKey),this.emit("sessionChanged",void 0)}async getNonce(){const{nonce:e,token:t}=await this.request({method:"GET",key:"nonce"});return this.setStorageToken(t,this.localNonceStorageKey),e}getClientId(){return e.BlockchainApiController.state.clientId}getWalletInfo(){const t=e.ChainController.getAccountData()?.connectedWalletInfo;if(!t)return;if("social"in t&&"identifier"in t){return{type:"social",social:t.social,identifier:t.identifier}}const{name:r,icon:s}=t;let o="unknown";switch(t.type){case"EXTERNAL":case"INJECTED":case"ANNOUNCED":o="extension";break;case"WALLET_CONNECT":o="walletconnect";break;default:o="unknown"}return{type:o,name:r,icon:s}}getSDKProperties(){return e.ApiController._getSdkProperties()}emit(e,t){this.listeners[e].forEach((e=>e(t)))}setAppKitAccountUser(t){const{email:r}=t;r&&Object.values(e.ConstantsUtil.CHAIN).forEach((t=>{e.ChainController.setAccountProp("user",{email:r},t)}))}},exports.ReownAuthenticationMessenger=t;
@@ -0,0 +1 @@
1
+ "use strict";var e=require("./index-5dac528b.cjs");exports.id=function(t){return e.keccak256(e.toUtf8Bytes(t))};