@iota/dapp-kit 0.2.0 → 0.3.0

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 (437) hide show
  1. package/CHANGELOG.md +13 -0
  2. package/README.md +14 -12
  3. package/dist/cjs/components/AccountDropdownMenu.css +26 -54
  4. package/dist/cjs/components/AccountDropdownMenu.css.css +18 -27
  5. package/dist/cjs/components/AccountDropdownMenu.css.css.map +3 -3
  6. package/dist/cjs/components/AccountDropdownMenu.css.d.ts +0 -1
  7. package/dist/cjs/components/AccountDropdownMenu.css.js +4 -6
  8. package/dist/cjs/components/AccountDropdownMenu.css.js.map +2 -2
  9. package/dist/cjs/components/AccountDropdownMenu.css.map +3 -3
  10. package/dist/cjs/components/AccountDropdownMenu.d.ts +3 -1
  11. package/dist/cjs/components/AccountDropdownMenu.js +25 -21
  12. package/dist/cjs/components/AccountDropdownMenu.js.map +3 -3
  13. package/dist/cjs/components/ConnectButton.css +181 -190
  14. package/dist/cjs/components/ConnectButton.css.map +3 -3
  15. package/dist/cjs/components/ConnectButton.d.ts +5 -3
  16. package/dist/cjs/components/ConnectButton.js +344 -669
  17. package/dist/cjs/components/ConnectButton.js.map +4 -4
  18. package/dist/cjs/components/IotaClientProvider.d.ts +0 -1
  19. package/dist/cjs/components/WalletProvider.d.ts +3 -3
  20. package/dist/cjs/components/WalletProvider.js +107 -152
  21. package/dist/cjs/components/WalletProvider.js.map +3 -3
  22. package/dist/cjs/components/connect-modal/ConnectModal.css +214 -172
  23. package/dist/cjs/components/connect-modal/ConnectModal.css.css +69 -32
  24. package/dist/cjs/components/connect-modal/ConnectModal.css.css.map +3 -3
  25. package/dist/cjs/components/connect-modal/ConnectModal.css.d.ts +5 -1
  26. package/dist/cjs/components/connect-modal/ConnectModal.css.js +15 -7
  27. package/dist/cjs/components/connect-modal/ConnectModal.css.js.map +2 -2
  28. package/dist/cjs/components/connect-modal/ConnectModal.css.map +3 -3
  29. package/dist/cjs/components/connect-modal/ConnectModal.js +411 -707
  30. package/dist/cjs/components/connect-modal/ConnectModal.js.map +4 -4
  31. package/dist/cjs/components/connect-modal/InfoSection.css +7 -11
  32. package/dist/cjs/components/connect-modal/InfoSection.css.css.map +1 -1
  33. package/dist/cjs/components/connect-modal/InfoSection.css.map +3 -3
  34. package/dist/cjs/components/connect-modal/InfoSection.js +1 -1
  35. package/dist/cjs/components/connect-modal/InfoSection.js.map +2 -2
  36. package/dist/cjs/components/connect-modal/views/ConnectionStatus.css +145 -0
  37. package/dist/cjs/components/connect-modal/views/ConnectionStatus.css.css +32 -0
  38. package/dist/cjs/components/connect-modal/views/ConnectionStatus.css.css.map +7 -0
  39. package/dist/cjs/components/connect-modal/views/ConnectionStatus.css.d.ts +5 -0
  40. package/dist/cjs/components/connect-modal/views/ConnectionStatus.css.js +35 -0
  41. package/dist/cjs/components/connect-modal/views/ConnectionStatus.css.js.map +7 -0
  42. package/dist/cjs/components/connect-modal/views/ConnectionStatus.css.map +7 -0
  43. package/dist/cjs/components/connect-modal/views/ConnectionStatus.d.ts +8 -0
  44. package/dist/cjs/components/connect-modal/views/ConnectionStatus.js +173 -0
  45. package/dist/cjs/components/connect-modal/views/ConnectionStatus.js.map +7 -0
  46. package/dist/cjs/components/connect-modal/views/GetTheWallet.css.css.map +1 -1
  47. package/dist/cjs/components/connect-modal/views/GetTheWallet.css.map +1 -1
  48. package/dist/cjs/components/connect-modal/views/GetTheWallet.js +12 -391
  49. package/dist/cjs/components/connect-modal/views/GetTheWallet.js.map +2 -2
  50. package/dist/cjs/components/connect-modal/views/GettingStarted.css +144 -0
  51. package/dist/cjs/components/connect-modal/views/GettingStarted.css.css +23 -0
  52. package/dist/cjs/components/connect-modal/views/GettingStarted.css.css.map +7 -0
  53. package/dist/cjs/components/connect-modal/views/GettingStarted.css.d.ts +3 -0
  54. package/dist/cjs/components/connect-modal/views/GettingStarted.css.js +31 -0
  55. package/dist/cjs/components/connect-modal/views/GettingStarted.css.js.map +7 -0
  56. package/dist/cjs/components/connect-modal/views/GettingStarted.css.map +7 -0
  57. package/dist/cjs/components/connect-modal/views/GettingStarted.d.ts +1 -0
  58. package/dist/cjs/components/connect-modal/views/GettingStarted.js +172 -0
  59. package/dist/cjs/components/connect-modal/views/GettingStarted.js.map +7 -0
  60. package/dist/cjs/components/connect-modal/views/WhatIsAWallet.css +95 -0
  61. package/dist/cjs/components/connect-modal/views/WhatIsAWallet.css.css +17 -0
  62. package/dist/cjs/components/connect-modal/views/WhatIsAWallet.css.css.map +7 -0
  63. package/dist/cjs/components/connect-modal/views/WhatIsAWallet.css.d.ts +2 -0
  64. package/dist/cjs/components/connect-modal/views/WhatIsAWallet.css.js +29 -0
  65. package/dist/cjs/components/connect-modal/views/WhatIsAWallet.css.js.map +7 -0
  66. package/dist/cjs/components/connect-modal/views/WhatIsAWallet.css.map +7 -0
  67. package/dist/cjs/components/connect-modal/views/WhatIsAWallet.d.ts +1 -0
  68. package/dist/cjs/components/connect-modal/views/WhatIsAWallet.js +135 -0
  69. package/dist/cjs/components/connect-modal/views/WhatIsAWallet.js.map +7 -0
  70. package/dist/cjs/components/connect-modal/views/index.css +115 -124
  71. package/dist/cjs/components/connect-modal/views/index.css.map +3 -3
  72. package/dist/cjs/components/connect-modal/views/index.d.ts +2 -1
  73. package/dist/cjs/components/connect-modal/views/index.js +136 -640
  74. package/dist/cjs/components/connect-modal/views/index.js.map +4 -4
  75. package/dist/cjs/components/connect-modal/wallet-list/WalletList.css +10 -22
  76. package/dist/cjs/components/connect-modal/wallet-list/WalletList.css.css +2 -5
  77. package/dist/cjs/components/connect-modal/wallet-list/WalletList.css.css.map +3 -3
  78. package/dist/cjs/components/connect-modal/wallet-list/WalletList.css.js.map +1 -1
  79. package/dist/cjs/components/connect-modal/wallet-list/WalletList.css.map +3 -3
  80. package/dist/cjs/components/connect-modal/wallet-list/WalletList.d.ts +4 -4
  81. package/dist/cjs/components/connect-modal/wallet-list/WalletList.js +61 -38
  82. package/dist/cjs/components/connect-modal/wallet-list/WalletList.js.map +4 -4
  83. package/dist/cjs/components/connect-modal/wallet-list/WalletListItem.css +8 -17
  84. package/dist/cjs/components/connect-modal/wallet-list/WalletListItem.css.css +8 -17
  85. package/dist/cjs/components/connect-modal/wallet-list/WalletListItem.css.css.map +3 -3
  86. package/dist/cjs/components/connect-modal/wallet-list/WalletListItem.css.d.ts +0 -1
  87. package/dist/cjs/components/connect-modal/wallet-list/WalletListItem.css.js +2 -4
  88. package/dist/cjs/components/connect-modal/wallet-list/WalletListItem.css.js.map +2 -2
  89. package/dist/cjs/components/connect-modal/wallet-list/WalletListItem.css.map +3 -3
  90. package/dist/cjs/components/connect-modal/wallet-list/WalletListItem.js +5 -32
  91. package/dist/cjs/components/connect-modal/wallet-list/WalletListItem.js.map +4 -4
  92. package/dist/cjs/components/icons/BackIcon.d.ts +2 -0
  93. package/dist/cjs/components/icons/BackIcon.js +36 -0
  94. package/dist/cjs/components/icons/BackIcon.js.map +7 -0
  95. package/dist/cjs/components/icons/IotaIcon.js +12 -391
  96. package/dist/cjs/components/icons/IotaIcon.js.map +2 -2
  97. package/dist/cjs/components/styling/InjectedThemeStyles.js +2 -0
  98. package/dist/cjs/components/styling/InjectedThemeStyles.js.map +2 -2
  99. package/dist/cjs/components/styling/StyleMarker.css +1 -16
  100. package/dist/cjs/components/styling/StyleMarker.css.css +1 -16
  101. package/dist/cjs/components/styling/StyleMarker.css.css.map +3 -3
  102. package/dist/cjs/components/styling/StyleMarker.css.map +3 -3
  103. package/dist/cjs/components/styling/StyleMarker.d.ts +0 -1
  104. package/dist/cjs/components/styling/StyleMarker.js +4 -4
  105. package/dist/cjs/components/styling/StyleMarker.js.map +3 -3
  106. package/dist/cjs/components/ui/Button.css.css.map +1 -1
  107. package/dist/cjs/components/ui/Button.css.map +1 -1
  108. package/dist/cjs/components/ui/Button.d.ts +1 -1
  109. package/dist/cjs/components/ui/Heading.css.css.map +1 -1
  110. package/dist/cjs/components/ui/Heading.css.map +1 -1
  111. package/dist/cjs/components/ui/Heading.d.ts +0 -1
  112. package/dist/cjs/components/ui/IconButton.css.css.map +1 -1
  113. package/dist/cjs/components/ui/IconButton.css.map +1 -1
  114. package/dist/cjs/components/ui/IconButton.d.ts +1 -1
  115. package/dist/cjs/components/ui/Text.css +7 -11
  116. package/dist/cjs/components/ui/Text.css.css +7 -11
  117. package/dist/cjs/components/ui/Text.css.css.map +3 -3
  118. package/dist/cjs/components/ui/Text.css.d.ts +0 -3
  119. package/dist/cjs/components/ui/Text.css.js +1 -1
  120. package/dist/cjs/components/ui/Text.css.js.map +2 -2
  121. package/dist/cjs/components/ui/Text.css.map +3 -3
  122. package/dist/cjs/components/ui/Text.d.ts +0 -1
  123. package/dist/cjs/components/ui/Text.js +1 -1
  124. package/dist/cjs/components/ui/Text.js.map +2 -2
  125. package/dist/cjs/constants/styleDataAttribute.js.map +1 -1
  126. package/dist/cjs/constants/walletDefaults.d.ts +2 -2
  127. package/dist/cjs/constants/walletDefaults.js +4 -5
  128. package/dist/cjs/constants/walletDefaults.js.map +2 -2
  129. package/dist/cjs/constants/walletMutationKeys.d.ts +3 -2
  130. package/dist/cjs/constants/walletMutationKeys.js +4 -3
  131. package/dist/cjs/constants/walletMutationKeys.js.map +2 -2
  132. package/dist/cjs/contexts/walletContext.d.ts +1 -2
  133. package/dist/cjs/hooks/useIotaClientInfiniteQuery.js.map +2 -2
  134. package/dist/cjs/hooks/useIotaClientQuery.js +3 -1
  135. package/dist/cjs/hooks/useIotaClientQuery.js.map +2 -2
  136. package/dist/cjs/hooks/wallet/useAutoConnectWallet.js +17 -7
  137. package/dist/cjs/hooks/wallet/useAutoConnectWallet.js.map +2 -2
  138. package/dist/cjs/hooks/wallet/useConnectWallet.js +10 -4
  139. package/dist/cjs/hooks/wallet/useConnectWallet.js.map +2 -2
  140. package/dist/cjs/hooks/wallet/useCurrentWallet.d.ts +3 -0
  141. package/dist/cjs/hooks/wallet/useCurrentWallet.js +7 -3
  142. package/dist/cjs/hooks/wallet/useCurrentWallet.js.map +2 -2
  143. package/dist/cjs/hooks/wallet/useDisconnectWallet.js +11 -6
  144. package/dist/cjs/hooks/wallet/useDisconnectWallet.js.map +2 -2
  145. package/dist/cjs/hooks/wallet/useReportTransactionEffects.d.ts +15 -0
  146. package/dist/cjs/hooks/wallet/{useSignTransactionBlock.js → useReportTransactionEffects.js} +41 -37
  147. package/dist/cjs/hooks/wallet/useReportTransactionEffects.js.map +7 -0
  148. package/dist/cjs/hooks/wallet/useSignAndExecuteTransaction.d.ts +29 -0
  149. package/dist/cjs/hooks/wallet/useSignAndExecuteTransaction.js +252 -0
  150. package/dist/cjs/hooks/wallet/useSignAndExecuteTransaction.js.map +7 -0
  151. package/dist/cjs/hooks/wallet/useSignPersonalMessage.js +21 -27
  152. package/dist/cjs/hooks/wallet/useSignPersonalMessage.js.map +2 -2
  153. package/dist/cjs/hooks/wallet/useSignTransaction.d.ts +18 -0
  154. package/dist/cjs/hooks/wallet/{useSignAndExecuteTransactionBlock.js → useSignTransaction.js} +86 -46
  155. package/dist/cjs/hooks/wallet/useSignTransaction.js.map +7 -0
  156. package/dist/cjs/hooks/wallet/useSwitchAccount.js +11 -6
  157. package/dist/cjs/hooks/wallet/useSwitchAccount.js.map +2 -2
  158. package/dist/cjs/hooks/wallet/useUnsafeBurnerWallet.js +45 -33
  159. package/dist/cjs/hooks/wallet/useUnsafeBurnerWallet.js.map +2 -2
  160. package/dist/cjs/hooks/wallet/useWalletPropertiesChanged.js +7 -3
  161. package/dist/cjs/hooks/wallet/useWalletPropertiesChanged.js.map +2 -2
  162. package/dist/cjs/hooks/wallet/useWalletsChanged.d.ts +1 -1
  163. package/dist/cjs/hooks/wallet/useWalletsChanged.js +7 -6
  164. package/dist/cjs/hooks/wallet/useWalletsChanged.js.map +2 -2
  165. package/dist/cjs/index.css +232 -241
  166. package/dist/cjs/index.css.map +3 -3
  167. package/dist/cjs/index.d.ts +4 -3
  168. package/dist/cjs/index.js +816 -1042
  169. package/dist/cjs/index.js.map +4 -4
  170. package/dist/cjs/themes/lightTheme.js +19 -19
  171. package/dist/cjs/themes/lightTheme.js.map +1 -1
  172. package/dist/cjs/themes/themeContract.js.map +1 -1
  173. package/dist/cjs/types.d.ts +1 -1
  174. package/dist/cjs/types.js.map +1 -1
  175. package/dist/cjs/utils/assertUnreachable.js.map +1 -1
  176. package/dist/cjs/utils/walletUtils.d.ts +2 -2
  177. package/dist/cjs/utils/walletUtils.js +2 -2
  178. package/dist/cjs/utils/walletUtils.js.map +2 -2
  179. package/dist/cjs/walletStore.d.ts +3 -2
  180. package/dist/cjs/walletStore.js +8 -4
  181. package/dist/cjs/walletStore.js.map +2 -2
  182. package/dist/esm/components/AccountDropdownMenu.css +26 -54
  183. package/dist/esm/components/AccountDropdownMenu.css.css +18 -27
  184. package/dist/esm/components/AccountDropdownMenu.css.css.map +3 -3
  185. package/dist/esm/components/AccountDropdownMenu.css.d.ts +0 -1
  186. package/dist/esm/components/AccountDropdownMenu.css.js +4 -6
  187. package/dist/esm/components/AccountDropdownMenu.css.js.map +2 -2
  188. package/dist/esm/components/AccountDropdownMenu.css.map +3 -3
  189. package/dist/esm/components/AccountDropdownMenu.d.ts +3 -1
  190. package/dist/esm/components/AccountDropdownMenu.js +25 -21
  191. package/dist/esm/components/AccountDropdownMenu.js.map +3 -3
  192. package/dist/esm/components/ConnectButton.css +181 -190
  193. package/dist/esm/components/ConnectButton.css.map +3 -3
  194. package/dist/esm/components/ConnectButton.d.ts +5 -3
  195. package/dist/esm/components/ConnectButton.js +344 -669
  196. package/dist/esm/components/ConnectButton.js.map +4 -4
  197. package/dist/esm/components/IotaClientProvider.d.ts +0 -1
  198. package/dist/esm/components/WalletProvider.d.ts +3 -3
  199. package/dist/esm/components/WalletProvider.js +106 -151
  200. package/dist/esm/components/WalletProvider.js.map +3 -3
  201. package/dist/esm/components/connect-modal/ConnectModal.css +214 -172
  202. package/dist/esm/components/connect-modal/ConnectModal.css.css +69 -32
  203. package/dist/esm/components/connect-modal/ConnectModal.css.css.map +3 -3
  204. package/dist/esm/components/connect-modal/ConnectModal.css.d.ts +5 -1
  205. package/dist/esm/components/connect-modal/ConnectModal.css.js +15 -7
  206. package/dist/esm/components/connect-modal/ConnectModal.css.js.map +2 -2
  207. package/dist/esm/components/connect-modal/ConnectModal.css.map +3 -3
  208. package/dist/esm/components/connect-modal/ConnectModal.js +407 -703
  209. package/dist/esm/components/connect-modal/ConnectModal.js.map +4 -4
  210. package/dist/esm/components/connect-modal/InfoSection.css +7 -11
  211. package/dist/esm/components/connect-modal/InfoSection.css.css.map +1 -1
  212. package/dist/esm/components/connect-modal/InfoSection.css.map +3 -3
  213. package/dist/esm/components/connect-modal/InfoSection.js +1 -1
  214. package/dist/esm/components/connect-modal/InfoSection.js.map +2 -2
  215. package/dist/esm/components/connect-modal/views/ConnectionStatus.css +145 -0
  216. package/dist/esm/components/connect-modal/views/ConnectionStatus.css.css +32 -0
  217. package/dist/esm/components/connect-modal/views/ConnectionStatus.css.css.map +7 -0
  218. package/dist/esm/components/connect-modal/views/ConnectionStatus.css.d.ts +5 -0
  219. package/dist/esm/components/connect-modal/views/ConnectionStatus.css.js +14 -0
  220. package/dist/esm/components/connect-modal/views/ConnectionStatus.css.js.map +7 -0
  221. package/dist/esm/components/connect-modal/views/ConnectionStatus.css.map +7 -0
  222. package/dist/esm/components/connect-modal/views/ConnectionStatus.d.ts +8 -0
  223. package/dist/esm/components/connect-modal/views/ConnectionStatus.js +140 -0
  224. package/dist/esm/components/connect-modal/views/ConnectionStatus.js.map +7 -0
  225. package/dist/esm/components/connect-modal/views/GetTheWallet.css.css.map +1 -1
  226. package/dist/esm/components/connect-modal/views/GetTheWallet.css.map +1 -1
  227. package/dist/esm/components/connect-modal/views/GetTheWallet.js +12 -391
  228. package/dist/esm/components/connect-modal/views/GetTheWallet.js.map +2 -2
  229. package/dist/esm/components/connect-modal/views/GettingStarted.css +144 -0
  230. package/dist/esm/components/connect-modal/views/GettingStarted.css.css +23 -0
  231. package/dist/esm/components/connect-modal/views/GettingStarted.css.css.map +7 -0
  232. package/dist/esm/components/connect-modal/views/GettingStarted.css.d.ts +3 -0
  233. package/dist/esm/components/connect-modal/views/GettingStarted.css.js +10 -0
  234. package/dist/esm/components/connect-modal/views/GettingStarted.css.js.map +7 -0
  235. package/dist/esm/components/connect-modal/views/GettingStarted.css.map +7 -0
  236. package/dist/esm/components/connect-modal/views/GettingStarted.d.ts +1 -0
  237. package/dist/esm/components/connect-modal/views/GettingStarted.js +139 -0
  238. package/dist/esm/components/connect-modal/views/GettingStarted.js.map +7 -0
  239. package/dist/esm/components/connect-modal/views/WhatIsAWallet.css +95 -0
  240. package/dist/esm/components/connect-modal/views/WhatIsAWallet.css.css +17 -0
  241. package/dist/esm/components/connect-modal/views/WhatIsAWallet.css.css.map +7 -0
  242. package/dist/esm/components/connect-modal/views/WhatIsAWallet.css.d.ts +2 -0
  243. package/dist/esm/components/connect-modal/views/WhatIsAWallet.css.js +8 -0
  244. package/dist/esm/components/connect-modal/views/WhatIsAWallet.css.js.map +7 -0
  245. package/dist/esm/components/connect-modal/views/WhatIsAWallet.css.map +7 -0
  246. package/dist/esm/components/connect-modal/views/WhatIsAWallet.d.ts +1 -0
  247. package/dist/esm/components/connect-modal/views/WhatIsAWallet.js +102 -0
  248. package/dist/esm/components/connect-modal/views/WhatIsAWallet.js.map +7 -0
  249. package/dist/esm/components/connect-modal/views/index.css +115 -124
  250. package/dist/esm/components/connect-modal/views/index.css.map +3 -3
  251. package/dist/esm/components/connect-modal/views/index.d.ts +2 -1
  252. package/dist/esm/components/connect-modal/views/index.js +141 -645
  253. package/dist/esm/components/connect-modal/views/index.js.map +4 -4
  254. package/dist/esm/components/connect-modal/wallet-list/WalletList.css +10 -22
  255. package/dist/esm/components/connect-modal/wallet-list/WalletList.css.css +2 -5
  256. package/dist/esm/components/connect-modal/wallet-list/WalletList.css.css.map +3 -3
  257. package/dist/esm/components/connect-modal/wallet-list/WalletList.css.js.map +1 -1
  258. package/dist/esm/components/connect-modal/wallet-list/WalletList.css.map +3 -3
  259. package/dist/esm/components/connect-modal/wallet-list/WalletList.d.ts +4 -4
  260. package/dist/esm/components/connect-modal/wallet-list/WalletList.js +61 -38
  261. package/dist/esm/components/connect-modal/wallet-list/WalletList.js.map +4 -4
  262. package/dist/esm/components/connect-modal/wallet-list/WalletListItem.css +8 -17
  263. package/dist/esm/components/connect-modal/wallet-list/WalletListItem.css.css +8 -17
  264. package/dist/esm/components/connect-modal/wallet-list/WalletListItem.css.css.map +3 -3
  265. package/dist/esm/components/connect-modal/wallet-list/WalletListItem.css.d.ts +0 -1
  266. package/dist/esm/components/connect-modal/wallet-list/WalletListItem.css.js +2 -4
  267. package/dist/esm/components/connect-modal/wallet-list/WalletListItem.css.js.map +2 -2
  268. package/dist/esm/components/connect-modal/wallet-list/WalletListItem.css.map +3 -3
  269. package/dist/esm/components/connect-modal/wallet-list/WalletListItem.js +5 -32
  270. package/dist/esm/components/connect-modal/wallet-list/WalletListItem.js.map +4 -4
  271. package/dist/esm/components/icons/BackIcon.d.ts +2 -0
  272. package/dist/esm/components/icons/BackIcon.js +15 -0
  273. package/dist/esm/components/icons/BackIcon.js.map +7 -0
  274. package/dist/esm/components/icons/IotaIcon.js +12 -391
  275. package/dist/esm/components/icons/IotaIcon.js.map +2 -2
  276. package/dist/esm/components/styling/InjectedThemeStyles.js +2 -0
  277. package/dist/esm/components/styling/InjectedThemeStyles.js.map +2 -2
  278. package/dist/esm/components/styling/StyleMarker.css +1 -16
  279. package/dist/esm/components/styling/StyleMarker.css.css +1 -16
  280. package/dist/esm/components/styling/StyleMarker.css.css.map +3 -3
  281. package/dist/esm/components/styling/StyleMarker.css.js +4 -4
  282. package/dist/esm/components/styling/StyleMarker.css.js.map +3 -3
  283. package/dist/esm/components/styling/StyleMarker.css.map +3 -3
  284. package/dist/esm/components/styling/StyleMarker.d.ts +0 -1
  285. package/dist/esm/components/styling/StyleMarker.js +4 -4
  286. package/dist/esm/components/styling/StyleMarker.js.map +3 -3
  287. package/dist/esm/components/ui/Button.css.css.map +1 -1
  288. package/dist/esm/components/ui/Button.css.map +1 -1
  289. package/dist/esm/components/ui/Button.d.ts +1 -1
  290. package/dist/esm/components/ui/Heading.css.css.map +1 -1
  291. package/dist/esm/components/ui/Heading.css.map +1 -1
  292. package/dist/esm/components/ui/Heading.d.ts +0 -1
  293. package/dist/esm/components/ui/IconButton.css.css.map +1 -1
  294. package/dist/esm/components/ui/IconButton.css.map +1 -1
  295. package/dist/esm/components/ui/IconButton.d.ts +1 -1
  296. package/dist/esm/components/ui/Text.css +7 -11
  297. package/dist/esm/components/ui/Text.css.css +7 -11
  298. package/dist/esm/components/ui/Text.css.css.map +3 -3
  299. package/dist/esm/components/ui/Text.css.d.ts +0 -3
  300. package/dist/esm/components/ui/Text.css.js +1 -1
  301. package/dist/esm/components/ui/Text.css.js.map +2 -2
  302. package/dist/esm/components/ui/Text.css.map +3 -3
  303. package/dist/esm/components/ui/Text.d.ts +0 -1
  304. package/dist/esm/components/ui/Text.js +1 -1
  305. package/dist/esm/components/ui/Text.js.map +2 -2
  306. package/dist/esm/constants/styleDataAttribute.js.map +1 -1
  307. package/dist/esm/constants/walletDefaults.d.ts +2 -2
  308. package/dist/esm/constants/walletDefaults.js +4 -5
  309. package/dist/esm/constants/walletDefaults.js.map +2 -2
  310. package/dist/esm/constants/walletMutationKeys.d.ts +3 -2
  311. package/dist/esm/constants/walletMutationKeys.js +4 -3
  312. package/dist/esm/constants/walletMutationKeys.js.map +2 -2
  313. package/dist/esm/contexts/walletContext.d.ts +1 -2
  314. package/dist/esm/hooks/useIotaClientInfiniteQuery.js.map +2 -2
  315. package/dist/esm/hooks/useIotaClientQuery.js +3 -1
  316. package/dist/esm/hooks/useIotaClientQuery.js.map +2 -2
  317. package/dist/esm/hooks/wallet/useAutoConnectWallet.js +17 -7
  318. package/dist/esm/hooks/wallet/useAutoConnectWallet.js.map +2 -2
  319. package/dist/esm/hooks/wallet/useConnectWallet.js +10 -4
  320. package/dist/esm/hooks/wallet/useConnectWallet.js.map +2 -2
  321. package/dist/esm/hooks/wallet/useCurrentWallet.d.ts +3 -0
  322. package/dist/esm/hooks/wallet/useCurrentWallet.js +7 -3
  323. package/dist/esm/hooks/wallet/useCurrentWallet.js.map +2 -2
  324. package/dist/esm/hooks/wallet/useDisconnectWallet.js +11 -6
  325. package/dist/esm/hooks/wallet/useDisconnectWallet.js.map +2 -2
  326. package/dist/esm/hooks/wallet/useReportTransactionEffects.d.ts +15 -0
  327. package/dist/esm/hooks/wallet/{useSignTransactionBlock.js → useReportTransactionEffects.js} +38 -34
  328. package/dist/esm/hooks/wallet/useReportTransactionEffects.js.map +7 -0
  329. package/dist/esm/hooks/wallet/useSignAndExecuteTransaction.d.ts +29 -0
  330. package/dist/esm/hooks/wallet/useSignAndExecuteTransaction.js +231 -0
  331. package/dist/esm/hooks/wallet/useSignAndExecuteTransaction.js.map +7 -0
  332. package/dist/esm/hooks/wallet/useSignPersonalMessage.js +21 -27
  333. package/dist/esm/hooks/wallet/useSignPersonalMessage.js.map +2 -2
  334. package/dist/esm/hooks/wallet/useSignTransaction.d.ts +18 -0
  335. package/dist/esm/hooks/wallet/{useSignAndExecuteTransactionBlock.js → useSignTransaction.js} +83 -43
  336. package/dist/esm/hooks/wallet/useSignTransaction.js.map +7 -0
  337. package/dist/esm/hooks/wallet/useSwitchAccount.js +11 -6
  338. package/dist/esm/hooks/wallet/useSwitchAccount.js.map +2 -2
  339. package/dist/esm/hooks/wallet/useUnsafeBurnerWallet.js +44 -32
  340. package/dist/esm/hooks/wallet/useUnsafeBurnerWallet.js.map +2 -2
  341. package/dist/esm/hooks/wallet/useWalletPropertiesChanged.js +7 -3
  342. package/dist/esm/hooks/wallet/useWalletPropertiesChanged.js.map +2 -2
  343. package/dist/esm/hooks/wallet/useWalletsChanged.d.ts +1 -1
  344. package/dist/esm/hooks/wallet/useWalletsChanged.js +7 -6
  345. package/dist/esm/hooks/wallet/useWalletsChanged.js.map +2 -2
  346. package/dist/esm/index.css +232 -241
  347. package/dist/esm/index.css.map +3 -3
  348. package/dist/esm/index.d.ts +4 -3
  349. package/dist/esm/index.js +818 -1044
  350. package/dist/esm/index.js.map +4 -4
  351. package/dist/esm/themes/lightTheme.js +19 -19
  352. package/dist/esm/themes/lightTheme.js.map +1 -1
  353. package/dist/esm/themes/themeContract.js.map +1 -1
  354. package/dist/esm/types.d.ts +1 -1
  355. package/dist/esm/utils/assertUnreachable.js.map +1 -1
  356. package/dist/esm/utils/walletUtils.d.ts +2 -2
  357. package/dist/esm/utils/walletUtils.js +2 -2
  358. package/dist/esm/utils/walletUtils.js.map +2 -2
  359. package/dist/esm/walletStore.d.ts +3 -2
  360. package/dist/esm/walletStore.js +8 -4
  361. package/dist/esm/walletStore.js.map +2 -2
  362. package/dist/index.css/package.json +5 -0
  363. package/dist/tsconfig.esm.tsbuildinfo +1 -1
  364. package/dist/tsconfig.tsbuildinfo +1 -1
  365. package/package.json +27 -28
  366. package/src/components/AccountDropdownMenu.css.ts +11 -17
  367. package/src/components/AccountDropdownMenu.tsx +10 -5
  368. package/src/components/ConnectButton.tsx +12 -5
  369. package/src/components/WalletProvider.tsx +11 -22
  370. package/src/components/connect-modal/ConnectModal.css.ts +58 -17
  371. package/src/components/connect-modal/ConnectModal.tsx +101 -16
  372. package/src/components/connect-modal/views/ConnectionStatus.css.ts +36 -0
  373. package/src/components/connect-modal/views/ConnectionStatus.tsx +55 -0
  374. package/src/components/connect-modal/views/GettingStarted.css.ts +26 -0
  375. package/src/components/connect-modal/views/GettingStarted.tsx +40 -0
  376. package/src/components/connect-modal/views/WhatIsAWallet.css.ts +20 -0
  377. package/src/components/connect-modal/views/WhatIsAWallet.tsx +24 -0
  378. package/src/components/connect-modal/views/index.ts +2 -1
  379. package/src/components/connect-modal/wallet-list/WalletList.css.ts +1 -5
  380. package/src/components/connect-modal/wallet-list/WalletList.tsx +25 -11
  381. package/src/components/connect-modal/wallet-list/WalletListItem.css.ts +6 -14
  382. package/src/components/connect-modal/wallet-list/WalletListItem.tsx +9 -12
  383. package/src/components/icons/BackIcon.tsx +18 -0
  384. package/src/components/icons/IotaIcon.tsx +6 -222
  385. package/src/components/styling/InjectedThemeStyles.tsx +4 -0
  386. package/src/components/styling/StyleMarker.css.ts +0 -15
  387. package/src/components/ui/Text.css.ts +1 -1
  388. package/src/constants/walletDefaults.ts +6 -5
  389. package/src/constants/walletMutationKeys.ts +3 -2
  390. package/src/hooks/useIotaClientInfiniteQuery.ts +2 -1
  391. package/src/hooks/useIotaClientQuery.ts +3 -1
  392. package/src/hooks/wallet/useAutoConnectWallet.ts +1 -1
  393. package/src/hooks/wallet/useConnectWallet.ts +6 -1
  394. package/src/hooks/wallet/useCurrentWallet.ts +4 -0
  395. package/src/hooks/wallet/useReportTransactionEffects.ts +87 -0
  396. package/src/hooks/wallet/useSignAndExecuteTransaction.ts +165 -0
  397. package/src/hooks/wallet/useSignPersonalMessage.ts +11 -25
  398. package/src/hooks/wallet/useSignTransaction.ts +117 -0
  399. package/src/hooks/wallet/useUnsafeBurnerWallet.ts +41 -18
  400. package/src/hooks/wallet/useWalletsChanged.ts +5 -4
  401. package/src/index.ts +4 -3
  402. package/src/themes/lightTheme.ts +19 -19
  403. package/src/types.ts +1 -1
  404. package/src/utils/walletUtils.ts +8 -3
  405. package/src/walletStore.ts +12 -1
  406. package/dist/cjs/components/connect-modal/views/WalletConnect.css +0 -179
  407. package/dist/cjs/components/connect-modal/views/WalletConnect.css.css +0 -51
  408. package/dist/cjs/components/connect-modal/views/WalletConnect.css.css.map +0 -7
  409. package/dist/cjs/components/connect-modal/views/WalletConnect.css.d.ts +0 -8
  410. package/dist/cjs/components/connect-modal/views/WalletConnect.css.js +0 -41
  411. package/dist/cjs/components/connect-modal/views/WalletConnect.css.js.map +0 -7
  412. package/dist/cjs/components/connect-modal/views/WalletConnect.css.map +0 -7
  413. package/dist/cjs/components/connect-modal/views/WalletConnect.d.ts +0 -7
  414. package/dist/cjs/components/connect-modal/views/WalletConnect.js +0 -325
  415. package/dist/cjs/components/connect-modal/views/WalletConnect.js.map +0 -7
  416. package/dist/cjs/hooks/wallet/useSignAndExecuteTransactionBlock.d.ts +0 -15
  417. package/dist/cjs/hooks/wallet/useSignAndExecuteTransactionBlock.js.map +0 -7
  418. package/dist/cjs/hooks/wallet/useSignTransactionBlock.d.ts +0 -13
  419. package/dist/cjs/hooks/wallet/useSignTransactionBlock.js.map +0 -7
  420. package/dist/esm/components/connect-modal/views/WalletConnect.css +0 -179
  421. package/dist/esm/components/connect-modal/views/WalletConnect.css.css +0 -51
  422. package/dist/esm/components/connect-modal/views/WalletConnect.css.css.map +0 -7
  423. package/dist/esm/components/connect-modal/views/WalletConnect.css.d.ts +0 -8
  424. package/dist/esm/components/connect-modal/views/WalletConnect.css.js +0 -20
  425. package/dist/esm/components/connect-modal/views/WalletConnect.css.js.map +0 -7
  426. package/dist/esm/components/connect-modal/views/WalletConnect.css.map +0 -7
  427. package/dist/esm/components/connect-modal/views/WalletConnect.d.ts +0 -7
  428. package/dist/esm/components/connect-modal/views/WalletConnect.js +0 -294
  429. package/dist/esm/components/connect-modal/views/WalletConnect.js.map +0 -7
  430. package/dist/esm/hooks/wallet/useSignAndExecuteTransactionBlock.d.ts +0 -15
  431. package/dist/esm/hooks/wallet/useSignAndExecuteTransactionBlock.js.map +0 -7
  432. package/dist/esm/hooks/wallet/useSignTransactionBlock.d.ts +0 -13
  433. package/dist/esm/hooks/wallet/useSignTransactionBlock.js.map +0 -7
  434. package/src/components/connect-modal/views/WalletConnect.css.ts +0 -55
  435. package/src/components/connect-modal/views/WalletConnect.tsx +0 -79
  436. package/src/hooks/wallet/useSignAndExecuteTransactionBlock.ts +0 -117
  437. package/src/hooks/wallet/useSignTransactionBlock.ts +0 -85
package/dist/esm/index.js CHANGED
@@ -4,6 +4,9 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
4
  var __getOwnPropNames = Object.getOwnPropertyNames;
5
5
  var __getProtoOf = Object.getPrototypeOf;
6
6
  var __hasOwnProp = Object.prototype.hasOwnProperty;
7
+ var __typeError = (msg) => {
8
+ throw TypeError(msg);
9
+ };
7
10
  var __esm = (fn, res) => function __init() {
8
11
  return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res;
9
12
  };
@@ -26,23 +29,13 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
26
29
  isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
27
30
  mod
28
31
  ));
29
- var __accessCheck = (obj, member, msg) => {
30
- if (!member.has(obj))
31
- throw TypeError("Cannot " + msg);
32
- };
33
- var __privateGet = (obj, member, getter) => {
34
- __accessCheck(obj, member, "read from private field");
35
- return getter ? getter.call(obj) : member.get(obj);
36
- };
37
- var __privateAdd = (obj, member, value) => {
38
- if (member.has(obj))
39
- throw TypeError("Cannot add the same private member more than once");
40
- member instanceof WeakSet ? member.add(obj) : member.set(obj, value);
41
- };
32
+ var __accessCheck = (obj, member, msg) => member.has(obj) || __typeError("Cannot " + msg);
33
+ var __privateGet = (obj, member, getter) => (__accessCheck(obj, member, "read from private field"), getter ? getter.call(obj) : member.get(obj));
34
+ var __privateAdd = (obj, member, value) => member.has(obj) ? __typeError("Cannot add the same private member more than once") : member instanceof WeakSet ? member.add(obj) : member.set(obj, value);
42
35
 
43
- // vanilla-extract-css-ns:src/components/styling/StyleMarker.css.ts.vanilla.css?source=#H4sIAAAAAAAAA51US4/TMBC+91fMcYtiqYXCIT0iIe6LxHkSe2Orrm2NJyRZxH9HtrttmrAL4hLJ4+8xL6cetCL18G4LPzcAjR9FNM/GdTU0nqQi0fjxuAFovfVUww+kByEkhiBOhkWORtF4OW0T6sk7Fk94NnZaYXkKviMMehIJ9iWjbqxontWKk26+K9NpjsJ5OqOdEXiya8bC5TGBbpwha/2rjTVOCf1nyswnwb5mVGEpZkUiBmxzH98gZuRjAW6Pm1+bukyj6Zm9KyPBEBQSulbV4LxTyaLB9tSR750Ul7kwoYsBSTledNQ4rcjwajqz+F2d8/iiktnVxXYWKetSwy4dAkqZKfl0RuqMy4driViqYzWykKr1hGy8u5W4NvA9p0RfIFclbyvobZGzJl4X40Vp5n6f2FVB7yvQ7yvQHyrQhwr0xwr0p6L4RieHdcfuK63FoJo089iSt7ZBypKDkaxr2B/C+ApMMGF7urzI/AoJpenjaplS2IjRInVly/+yGa+46f7c3N6/RumHVFZUDDvYwX4XxvJZ2N/cPpcfQdH8lvS2x//I/rJDhzBC9NbIRfa/AfAolD6tBAAA
44
- var init_ = __esm({
45
- "vanilla-extract-css-ns:src/components/styling/StyleMarker.css.ts.vanilla.css?source=#H4sIAAAAAAAAA51US4/TMBC+91fMcYtiqYXCIT0iIe6LxHkSe2Orrm2NJyRZxH9HtrttmrAL4hLJ4+8xL6cetCL18G4LPzcAjR9FNM/GdTU0nqQi0fjxuAFovfVUww+kByEkhiBOhkWORtF4OW0T6sk7Fk94NnZaYXkKviMMehIJ9iWjbqxontWKk26+K9NpjsJ5OqOdEXiya8bC5TGBbpwha/2rjTVOCf1nyswnwb5mVGEpZkUiBmxzH98gZuRjAW6Pm1+bukyj6Zm9KyPBEBQSulbV4LxTyaLB9tSR750Ul7kwoYsBSTledNQ4rcjwajqz+F2d8/iiktnVxXYWKetSwy4dAkqZKfl0RuqMy4driViqYzWykKr1hGy8u5W4NvA9p0RfIFclbyvobZGzJl4X40Vp5n6f2FVB7yvQ7yvQHyrQhwr0xwr0p6L4RieHdcfuK63FoJo089iSt7ZBypKDkaxr2B/C+ApMMGF7urzI/AoJpenjaplS2IjRInVly/+yGa+46f7c3N6/RumHVFZUDDvYwX4XxvJZ2N/cPpcfQdH8lvS2x//I/rJDhzBC9NbIRfa/AfAolD6tBAAA"() {
36
+ // vanilla-extract-css-ns:src/components/styling/StyleMarker.css.ts.vanilla.css?source=OndoZXJlKCopIHsKICBib3gtc2l6aW5nOiBib3JkZXItYm94OwogIGNvbG9yOiB2YXIoLS1kYXBwLWtpdC1jb2xvcnMtYm9keSk7CiAgZm9udC1mYW1pbHk6IHZhcigtLWRhcHAta2l0LXR5cG9ncmFwaHktZm9udEZhbWlseSk7CiAgZm9udC1zaXplOiB2YXIoLS1kYXBwLWtpdC1mb250V2VpZ2h0cy1ub3JtYWwpOwogIGZvbnQtc3R5bGU6IHZhcigtLWRhcHAta2l0LXR5cG9ncmFwaHktZm9udFN0eWxlKTsKICBmb250LXdlaWdodDogdmFyKC0tZGFwcC1raXQtZm9udFdlaWdodHMtbm9ybWFsKTsKICBsaW5lLWhlaWdodDogdmFyKC0tZGFwcC1raXQtdHlwb2dyYXBoeS1saW5lSGVpZ2h0KTsKICBsZXR0ZXItc3BhY2luZzogdmFyKC0tZGFwcC1raXQtdHlwb2dyYXBoeS1sZXR0ZXJTcGFjaW5nKTsKfQo6d2hlcmUoYnV0dG9uKSB7CiAgYXBwZWFyYW5jZTogbm9uZTsKICBiYWNrZ3JvdW5kLWNvbG9yOiB0cmFuc3BhcmVudDsKICBmb250LXNpemU6IGluaGVyaXQ7CiAgZm9udC1mYW1pbHk6IGluaGVyaXQ7CiAgbGluZS1oZWlnaHQ6IGluaGVyaXQ7CiAgbGV0dGVyLXNwYWNpbmc6IGluaGVyaXQ7CiAgY29sb3I6IGluaGVyaXQ7CiAgYm9yZGVyOiAwOwogIHBhZGRpbmc6IDA7CiAgbWFyZ2luOiAwOwp9Cjp3aGVyZShhKSB7CiAgdGV4dC1kZWNvcmF0aW9uOiBub25lOwogIGNvbG9yOiBpbmhlcml0OwogIG91dGxpbmU6IG5vbmU7Cn0KOndoZXJlKG9sLCB1bCkgewogIGxpc3Qtc3R5bGU6IG5vbmU7CiAgbWFyZ2luOiAwOwogIHBhZGRpbmc6IDA7Cn0KOndoZXJlKGgxLCBoMiwgaDMsIGg0LCBoNSwgaDYpIHsKICBmb250LXNpemU6IGluaGVyaXQ7CiAgZm9udC13ZWlnaHQ6IGluaGVyaXQ7CiAgbWFyZ2luOiAwOwp9
37
+ var init_StyleMarker_css_ts_vanilla = __esm({
38
+ "vanilla-extract-css-ns:src/components/styling/StyleMarker.css.ts.vanilla.css?source=OndoZXJlKCopIHsKICBib3gtc2l6aW5nOiBib3JkZXItYm94OwogIGNvbG9yOiB2YXIoLS1kYXBwLWtpdC1jb2xvcnMtYm9keSk7CiAgZm9udC1mYW1pbHk6IHZhcigtLWRhcHAta2l0LXR5cG9ncmFwaHktZm9udEZhbWlseSk7CiAgZm9udC1zaXplOiB2YXIoLS1kYXBwLWtpdC1mb250V2VpZ2h0cy1ub3JtYWwpOwogIGZvbnQtc3R5bGU6IHZhcigtLWRhcHAta2l0LXR5cG9ncmFwaHktZm9udFN0eWxlKTsKICBmb250LXdlaWdodDogdmFyKC0tZGFwcC1raXQtZm9udFdlaWdodHMtbm9ybWFsKTsKICBsaW5lLWhlaWdodDogdmFyKC0tZGFwcC1raXQtdHlwb2dyYXBoeS1saW5lSGVpZ2h0KTsKICBsZXR0ZXItc3BhY2luZzogdmFyKC0tZGFwcC1raXQtdHlwb2dyYXBoeS1sZXR0ZXJTcGFjaW5nKTsKfQo6d2hlcmUoYnV0dG9uKSB7CiAgYXBwZWFyYW5jZTogbm9uZTsKICBiYWNrZ3JvdW5kLWNvbG9yOiB0cmFuc3BhcmVudDsKICBmb250LXNpemU6IGluaGVyaXQ7CiAgZm9udC1mYW1pbHk6IGluaGVyaXQ7CiAgbGluZS1oZWlnaHQ6IGluaGVyaXQ7CiAgbGV0dGVyLXNwYWNpbmc6IGluaGVyaXQ7CiAgY29sb3I6IGluaGVyaXQ7CiAgYm9yZGVyOiAwOwogIHBhZGRpbmc6IDA7CiAgbWFyZ2luOiAwOwp9Cjp3aGVyZShhKSB7CiAgdGV4dC1kZWNvcmF0aW9uOiBub25lOwogIGNvbG9yOiBpbmhlcml0OwogIG91dGxpbmU6IG5vbmU7Cn0KOndoZXJlKG9sLCB1bCkgewogIGxpc3Qtc3R5bGU6IG5vbmU7CiAgbWFyZ2luOiAwOwogIHBhZGRpbmc6IDA7Cn0KOndoZXJlKGgxLCBoMiwgaDMsIGg0LCBoNSwgaDYpIHsKICBmb250LXNpemU6IGluaGVyaXQ7CiAgZm9udC13ZWlnaHQ6IGluaGVyaXQ7CiAgbWFyZ2luOiAwOwp9"() {
46
39
  }
47
40
  });
48
41
 
@@ -50,18 +43,136 @@ var init_ = __esm({
50
43
  var require_StyleMarker_css = __commonJS({
51
44
  "src/components/styling/StyleMarker.css.ts"() {
52
45
  "use strict";
53
- init_();
46
+ init_StyleMarker_css_ts_vanilla();
54
47
  }
55
48
  });
56
49
 
57
50
  // src/components/connect-modal/ConnectModal.tsx
58
51
  import * as Dialog from "@radix-ui/react-dialog";
59
- import { useState as useState2 } from "react";
52
+ import clsx6 from "clsx";
53
+ import { useState } from "react";
60
54
 
61
- // src/components/icons/CloseIcon.tsx
55
+ // src/hooks/wallet/useConnectWallet.ts
56
+ import { isSupportedChain } from "@iota/wallet-standard";
57
+ import { useMutation } from "@tanstack/react-query";
58
+
59
+ // src/constants/walletMutationKeys.ts
60
+ var walletMutationKeys = {
61
+ all: { baseScope: "wallet" },
62
+ connectWallet: formMutationKeyFn("connect-wallet"),
63
+ autoconnectWallet: formMutationKeyFn("autoconnect-wallet"),
64
+ disconnectWallet: formMutationKeyFn("disconnect-wallet"),
65
+ signPersonalMessage: formMutationKeyFn("sign-personal-message"),
66
+ signTransaction: formMutationKeyFn("sign-transaction"),
67
+ signAndExecuteTransaction: formMutationKeyFn("sign-and-execute-transaction"),
68
+ switchAccount: formMutationKeyFn("switch-account"),
69
+ reportTransactionEffects: formMutationKeyFn("report-transaction-effects")
70
+ };
71
+ function formMutationKeyFn(baseEntity) {
72
+ return function mutationKeyFn(additionalKeys = []) {
73
+ return [{ ...walletMutationKeys.all, baseEntity }, ...additionalKeys];
74
+ };
75
+ }
76
+
77
+ // src/hooks/wallet/useWalletStore.ts
78
+ import { useContext } from "react";
79
+ import { useStore } from "zustand";
80
+
81
+ // src/contexts/walletContext.ts
82
+ import { createContext } from "react";
83
+ var WalletContext = createContext(null);
84
+
85
+ // src/hooks/wallet/useWalletStore.ts
86
+ function useWalletStore(selector) {
87
+ const store = useContext(WalletContext);
88
+ if (!store) {
89
+ throw new Error(
90
+ "Could not find WalletContext. Ensure that you have set up the WalletProvider."
91
+ );
92
+ }
93
+ return useStore(store, selector);
94
+ }
95
+
96
+ // src/hooks/wallet/useConnectWallet.ts
97
+ function useConnectWallet({
98
+ mutationKey,
99
+ ...mutationOptions
100
+ } = {}) {
101
+ const setWalletConnected = useWalletStore((state) => state.setWalletConnected);
102
+ const setConnectionStatus = useWalletStore((state) => state.setConnectionStatus);
103
+ return useMutation({
104
+ mutationKey: walletMutationKeys.connectWallet(mutationKey),
105
+ mutationFn: async ({ wallet, accountAddress, ...connectArgs }) => {
106
+ try {
107
+ setConnectionStatus("connecting");
108
+ const connectResult = await wallet.features["standard:connect"].connect(connectArgs);
109
+ const connectedIotaAccounts = connectResult.accounts.filter(
110
+ (account) => account.chains.some(isSupportedChain)
111
+ );
112
+ const selectedAccount = getSelectedAccount(connectedIotaAccounts, accountAddress);
113
+ setWalletConnected(
114
+ wallet,
115
+ connectedIotaAccounts,
116
+ selectedAccount,
117
+ connectResult.supportedIntents
118
+ );
119
+ return { accounts: connectedIotaAccounts };
120
+ } catch (error) {
121
+ setConnectionStatus("disconnected");
122
+ throw error;
123
+ }
124
+ },
125
+ ...mutationOptions
126
+ });
127
+ }
128
+ function getSelectedAccount(connectedAccounts, accountAddress) {
129
+ if (connectedAccounts.length === 0) {
130
+ return null;
131
+ }
132
+ if (accountAddress) {
133
+ const selectedAccount = connectedAccounts.find(
134
+ (account) => account.address === accountAddress
135
+ );
136
+ return selectedAccount ?? connectedAccounts[0];
137
+ }
138
+ return connectedAccounts[0];
139
+ }
140
+
141
+ // src/utils/walletUtils.ts
142
+ import { getWallets, isWalletWithRequiredFeatureSet } from "@iota/wallet-standard";
143
+ function getRegisteredWallets(preferredWallets, walletFilter) {
144
+ const walletsApi = getWallets();
145
+ const wallets = walletsApi.get();
146
+ const iotaWallets = wallets.filter(
147
+ (wallet) => isWalletWithRequiredFeatureSet(wallet) && (!walletFilter || walletFilter(wallet))
148
+ );
149
+ return [
150
+ // Preferred wallets, in order:
151
+ ...preferredWallets.map((name) => iotaWallets.find((wallet) => wallet.name === name)).filter(Boolean),
152
+ // Wallets in default order:
153
+ ...iotaWallets.filter((wallet) => !preferredWallets.includes(wallet.name))
154
+ ];
155
+ }
156
+ function getWalletUniqueIdentifier(wallet) {
157
+ return wallet?.id ?? wallet?.name;
158
+ }
159
+
160
+ // src/components/icons/BackIcon.tsx
62
161
  import { jsx } from "react/jsx-runtime";
162
+ function BackIcon(props) {
163
+ return /* @__PURE__ */ jsx("svg", { width: 24, height: 24, fill: "none", xmlns: "http://www.w3.org/2000/svg", ...props, children: /* @__PURE__ */ jsx(
164
+ "path",
165
+ {
166
+ d: "M7.57 12.262c0 .341.13.629.403.895l5.175 5.059c.204.205.45.307.751.307.609 0 1.101-.485 1.101-1.087 0-.293-.123-.574-.349-.8L10.14 12.27l4.511-4.375A1.13 1.13 0 0 0 15 7.087C15 6.485 14.508 6 13.9 6c-.295 0-.54.103-.752.308l-5.175 5.058c-.28.28-.404.56-.404.896Z",
167
+ fill: "currentColor"
168
+ }
169
+ ) });
170
+ }
171
+
172
+ // src/components/icons/CloseIcon.tsx
173
+ import { jsx as jsx2 } from "react/jsx-runtime";
63
174
  function CloseIcon(props) {
64
- return /* @__PURE__ */ jsx("svg", { width: 10, height: 10, fill: "none", xmlns: "http://www.w3.org/2000/svg", ...props, children: /* @__PURE__ */ jsx(
175
+ return /* @__PURE__ */ jsx2("svg", { width: 10, height: 10, fill: "none", xmlns: "http://www.w3.org/2000/svg", ...props, children: /* @__PURE__ */ jsx2(
65
176
  "path",
66
177
  {
67
178
  d: "M9.708.292a.999.999 0 0 0-1.413 0l-3.289 3.29L1.717.291A.999.999 0 0 0 .305 1.705l3.289 3.289-3.29 3.289a.999.999 0 1 0 1.413 1.412l3.29-3.289 3.288 3.29a.999.999 0 0 0 1.413-1.413l-3.29-3.29 3.29-3.288a.999.999 0 0 0 0-1.413Z",
@@ -81,8 +192,8 @@ var styleDataAttribute = { [styleDataAttributeName]: "" };
81
192
 
82
193
  // src/components/styling/StyleMarker.tsx
83
194
  var import_StyleMarker_css = __toESM(require_StyleMarker_css());
84
- import { jsx as jsx2 } from "react/jsx-runtime";
85
- var StyleMarker = forwardRef(({ children, ...props }, forwardedRef) => /* @__PURE__ */ jsx2(Slot, { ref: forwardedRef, ...props, ...styleDataAttribute, children }));
195
+ import { jsx as jsx3 } from "react/jsx-runtime";
196
+ var StyleMarker = forwardRef(({ children, ...props }, forwardedRef) => /* @__PURE__ */ jsx3(Slot, { ref: forwardedRef, ...props, ...styleDataAttribute, children }));
86
197
  StyleMarker.displayName = "StyleMarker";
87
198
 
88
199
  // src/components/ui/Heading.tsx
@@ -95,7 +206,7 @@ import { createRuntimeFn as _7a468 } from "@vanilla-extract/recipes/createRuntim
95
206
  var headingVariants = _7a468({ defaultClassName: "Heading__12b5l8i0", variantClassNames: { size: { sm: "Heading_headingVariants_size_sm__12b5l8i1", md: "Heading_headingVariants_size_md__12b5l8i2", lg: "Heading_headingVariants_size_lg__12b5l8i3", xl: "Heading_headingVariants_size_xl__12b5l8i4" }, weight: { normal: "Heading_headingVariants_weight_normal__12b5l8i5", bold: "Heading_headingVariants_weight_bold__12b5l8i6" }, truncate: { true: "Heading_headingVariants_truncate_true__12b5l8i7" } }, defaultVariants: { size: "lg", weight: "bold" }, compoundVariants: [] });
96
207
 
97
208
  // src/components/ui/Heading.tsx
98
- import { jsx as jsx3 } from "react/jsx-runtime";
209
+ import { jsx as jsx4 } from "react/jsx-runtime";
99
210
  var Heading = forwardRef2(
100
211
  ({
101
212
  children,
@@ -107,13 +218,13 @@ var Heading = forwardRef2(
107
218
  truncate,
108
219
  ...headingProps
109
220
  }, forwardedRef) => {
110
- return /* @__PURE__ */ jsx3(
221
+ return /* @__PURE__ */ jsx4(
111
222
  Slot2,
112
223
  {
113
224
  ...headingProps,
114
225
  ref: forwardedRef,
115
226
  className: clsx(headingVariants({ size, weight, truncate }), className),
116
- children: asChild ? children : /* @__PURE__ */ jsx3(Tag, { children })
227
+ children: asChild ? children : /* @__PURE__ */ jsx4(Tag, { children })
117
228
  }
118
229
  );
119
230
  }
@@ -129,190 +240,241 @@ import { forwardRef as forwardRef3 } from "react";
129
240
  var container = "IconButton_container__ap1qll0";
130
241
 
131
242
  // src/components/ui/IconButton.tsx
132
- import { jsx as jsx4 } from "react/jsx-runtime";
243
+ import { jsx as jsx5 } from "react/jsx-runtime";
133
244
  var IconButton = forwardRef3(
134
245
  ({ className, asChild = false, ...props }, forwardedRef) => {
135
246
  const Comp = asChild ? Slot3 : "button";
136
- return /* @__PURE__ */ jsx4(Comp, { ...props, className: clsx2(container, className), ref: forwardedRef });
247
+ return /* @__PURE__ */ jsx5(Comp, { ...props, className: clsx2(container, className), ref: forwardedRef });
137
248
  }
138
249
  );
139
250
  IconButton.displayName = "Button";
140
251
 
141
252
  // src/components/connect-modal/ConnectModal.css.ts
142
- var closeButtonContainer = "ConnectModal_closeButtonContainer__17mljma5";
143
- var content = "ConnectModal_content__17mljma3";
253
+ var backButtonContainer = "ConnectModal_backButtonContainer__17mljma6";
254
+ var closeButtonContainer = "ConnectModal_closeButtonContainer__17mljma7";
255
+ var content = "ConnectModal_content__17mljma2";
144
256
  var overlay = "ConnectModal_overlay__17mljma0";
145
- var separator = "ConnectModal_separator__17mljma2";
257
+ var selectedViewContainer = "ConnectModal_selectedViewContainer__17mljma5";
146
258
  var title = "ConnectModal_title__17mljma1";
147
- var walletListContent = "ConnectModal_walletListContent__17mljma6";
259
+ var viewContainer = "ConnectModal_viewContainer__17mljma4";
260
+ var walletListContainer = "ConnectModal_walletListContainer__17mljma9";
261
+ var walletListContainerWithViewSelected = "ConnectModal_walletListContainerWithViewSelected__17mljmaa";
262
+ var walletListContent = "ConnectModal_walletListContent__17mljma8";
263
+ var whatIsAWalletButton = "ConnectModal_whatIsAWalletButton__17mljma3";
148
264
 
149
- // src/hooks/wallet/useWalletStore.ts
150
- import { useContext } from "react";
151
- import { useStore } from "zustand";
265
+ // src/components/ui/Button.tsx
266
+ import { Slot as Slot4 } from "@radix-ui/react-slot";
267
+ import clsx3 from "clsx";
268
+ import { forwardRef as forwardRef4 } from "react";
152
269
 
153
- // src/contexts/walletContext.ts
154
- import { createContext } from "react";
155
- var WalletContext = createContext(null);
270
+ // src/components/ui/Button.css.ts
271
+ import { createRuntimeFn as _7a4682 } from "@vanilla-extract/recipes/createRuntimeFn";
272
+ var buttonVariants = _7a4682({ defaultClassName: "Button_buttonVariants__ctbx2n0", variantClassNames: { variant: { primary: "Button_buttonVariants_variant_primary__ctbx2n1", outline: "Button_buttonVariants_variant_outline__ctbx2n2" }, size: { md: "Button_buttonVariants_size_md__ctbx2n3", lg: "Button_buttonVariants_size_lg__ctbx2n4" } }, defaultVariants: { variant: "primary", size: "md" }, compoundVariants: [] });
156
273
 
157
- // src/hooks/wallet/useWalletStore.ts
158
- function useWalletStore(selector) {
159
- const store = useContext(WalletContext);
160
- if (!store) {
161
- throw new Error(
162
- "Could not find WalletContext. Ensure that you have set up the WalletProvider."
274
+ // src/components/ui/Button.tsx
275
+ import { jsx as jsx6 } from "react/jsx-runtime";
276
+ var Button = forwardRef4(
277
+ ({ className, variant, size, asChild = false, ...props }, forwardedRef) => {
278
+ const Comp = asChild ? Slot4 : "button";
279
+ return /* @__PURE__ */ jsx6(
280
+ Comp,
281
+ {
282
+ ...props,
283
+ className: clsx3(buttonVariants({ variant, size }), className),
284
+ ref: forwardedRef
285
+ }
163
286
  );
164
287
  }
165
- return useStore(store, selector);
166
- }
288
+ );
289
+ Button.displayName = "Button";
167
290
 
168
- // src/hooks/wallet/useWallets.ts
169
- function useWallets() {
170
- return useWalletStore((state) => state.wallets);
291
+ // src/components/ui/Text.tsx
292
+ import { Slot as Slot5 } from "@radix-ui/react-slot";
293
+ import clsx4 from "clsx";
294
+ import { forwardRef as forwardRef5 } from "react";
295
+
296
+ // src/components/ui/Text.css.ts
297
+ import { createRuntimeFn as _7a4683 } from "@vanilla-extract/recipes/createRuntimeFn";
298
+ var textVariants = _7a4683({ defaultClassName: "Text__aprhbd0", variantClassNames: { size: { sm: "Text_textVariants_size_sm__aprhbd1" }, weight: { normal: "Text_textVariants_weight_normal__aprhbd2", medium: "Text_textVariants_weight_medium__aprhbd3", bold: "Text_textVariants_weight_bold__aprhbd4" }, color: { muted: "Text_textVariants_color_muted__aprhbd5", danger: "Text_textVariants_color_danger__aprhbd6" }, mono: { true: "Text_textVariants_mono_true__aprhbd7" } }, defaultVariants: { size: "sm", weight: "normal" }, compoundVariants: [] });
299
+
300
+ // src/components/ui/Text.tsx
301
+ import { jsx as jsx7 } from "react/jsx-runtime";
302
+ var Text = forwardRef5(
303
+ ({
304
+ children,
305
+ className,
306
+ asChild = false,
307
+ as: Tag = "div",
308
+ size,
309
+ weight,
310
+ color,
311
+ mono,
312
+ ...textProps
313
+ }, forwardedRef) => {
314
+ return /* @__PURE__ */ jsx7(
315
+ Slot5,
316
+ {
317
+ ...textProps,
318
+ ref: forwardedRef,
319
+ className: clsx4(textVariants({ size, weight, color, mono }), className),
320
+ children: asChild ? children : /* @__PURE__ */ jsx7(Tag, { children })
321
+ }
322
+ );
323
+ }
324
+ );
325
+ Text.displayName = "Text";
326
+
327
+ // src/components/connect-modal/views/ConnectionStatus.css.ts
328
+ var connectionStatus = "ConnectionStatus_connectionStatus__c5q1ll3";
329
+ var container2 = "ConnectionStatus_container__c5q1ll0";
330
+ var retryButtonContainer = "ConnectionStatus_retryButtonContainer__c5q1ll4";
331
+ var title2 = "ConnectionStatus_title__c5q1ll2";
332
+ var walletIcon = "ConnectionStatus_walletIcon__c5q1ll1";
333
+
334
+ // src/components/connect-modal/views/ConnectionStatus.tsx
335
+ import { jsx as jsx8, jsxs } from "react/jsx-runtime";
336
+ function ConnectionStatus({
337
+ selectedWallet,
338
+ hadConnectionError,
339
+ onRetryConnection
340
+ }) {
341
+ return /* @__PURE__ */ jsxs("div", { className: container2, children: [
342
+ /* @__PURE__ */ jsx8(
343
+ "img",
344
+ {
345
+ className: walletIcon,
346
+ src: selectedWallet.icon,
347
+ alt: `${selectedWallet.name} logo`
348
+ }
349
+ ),
350
+ /* @__PURE__ */ jsx8("div", { className: title2, children: /* @__PURE__ */ jsxs(Heading, { as: "h2", size: "xl", children: [
351
+ "Opening ",
352
+ selectedWallet.name
353
+ ] }) }),
354
+ /* @__PURE__ */ jsx8("div", { className: connectionStatus, children: hadConnectionError ? /* @__PURE__ */ jsx8(Text, { color: "danger", children: "Connection failed" }) : /* @__PURE__ */ jsx8(Text, { color: "muted", children: "Confirm connection in the wallet..." }) }),
355
+ hadConnectionError ? /* @__PURE__ */ jsx8("div", { className: retryButtonContainer, children: /* @__PURE__ */ jsx8(
356
+ Button,
357
+ {
358
+ type: "button",
359
+ variant: "outline",
360
+ onClick: () => onRetryConnection(selectedWallet),
361
+ children: "Retry Connection"
362
+ }
363
+ ) }) : null
364
+ ] });
171
365
  }
172
366
 
173
- // src/components/connect-modal/views/WalletConnect.tsx
174
- import { useState } from "react";
367
+ // src/components/connect-modal/InfoSection.css.ts
368
+ var container3 = "InfoSection_container__1d1nrmt0";
175
369
 
176
- // src/utils/walletUtils.ts
177
- import { getWallets, isWalletWithRequiredFeatureSet } from "@iota/wallet-standard";
178
- function getRegisteredWallets(preferredWallets, requiredFeatures) {
179
- const walletsApi = getWallets();
180
- const wallets = walletsApi.get();
181
- const iotaWallets = wallets.filter(
182
- (wallet) => isWalletWithRequiredFeatureSet(wallet, requiredFeatures)
183
- );
184
- return [
185
- // Preferred wallets, in order:
186
- ...preferredWallets.map((name) => iotaWallets.find((wallet) => wallet.name === name)).filter(Boolean),
187
- // Wallets in default order:
188
- ...iotaWallets.filter((wallet) => !preferredWallets.includes(wallet.name))
189
- ];
370
+ // src/components/connect-modal/InfoSection.tsx
371
+ import { jsx as jsx9, jsxs as jsxs2 } from "react/jsx-runtime";
372
+ function InfoSection({ title: title3, children }) {
373
+ return /* @__PURE__ */ jsxs2("section", { className: container3, children: [
374
+ /* @__PURE__ */ jsx9(Heading, { as: "h3", size: "sm", weight: "normal", children: title3 }),
375
+ /* @__PURE__ */ jsx9(Text, { weight: "medium", color: "muted", children })
376
+ ] });
190
377
  }
191
- function getWalletUniqueIdentifier(wallet) {
192
- return wallet?.id ?? wallet?.name;
378
+
379
+ // src/components/connect-modal/views/GettingStarted.css.ts
380
+ var container4 = "GettingStarted_container__qu36t90";
381
+ var content2 = "GettingStarted_content__qu36t91";
382
+ var installButtonContainer = "GettingStarted_installButtonContainer__qu36t92";
383
+
384
+ // src/components/connect-modal/views/GettingStarted.tsx
385
+ import { jsx as jsx10, jsxs as jsxs3 } from "react/jsx-runtime";
386
+ function GettingStarted() {
387
+ return /* @__PURE__ */ jsxs3("div", { className: container4, children: [
388
+ /* @__PURE__ */ jsx10(Heading, { as: "h2", children: "Get Started with IOTA" }),
389
+ /* @__PURE__ */ jsxs3("div", { className: content2, children: [
390
+ /* @__PURE__ */ jsx10(InfoSection, { title: "Install the IOTA Wallet Extension", children: "We recommend pinning IOTA Wallet to your taskbar for quicker access." }),
391
+ /* @__PURE__ */ jsx10(InfoSection, { title: "Create or Import a Wallet", children: "Be sure to back up your wallet using a secure method. Never share your secret phrase with anyone." }),
392
+ /* @__PURE__ */ jsx10(InfoSection, { title: "Refresh Your Browser", children: "Once you set up your wallet, refresh this window browser to load up the extension." }),
393
+ /* @__PURE__ */ jsx10("div", { className: installButtonContainer, children: /* @__PURE__ */ jsx10(Button, { variant: "outline", asChild: true, children: /* @__PURE__ */ jsx10(
394
+ "a",
395
+ {
396
+ href: "https://chrome.google.com/webstore/detail/iota-wallet/opcgpfmipidbgpenhmajoajpbobppdil",
397
+ target: "_blank",
398
+ rel: "noreferrer",
399
+ children: "Install Wallet Extension"
400
+ }
401
+ ) }) })
402
+ ] })
403
+ ] });
193
404
  }
194
405
 
195
- // src/hooks/wallet/useConnectWallet.ts
196
- import { isSupportedChain } from "@iota/wallet-standard";
197
- import { useMutation } from "@tanstack/react-query";
406
+ // src/components/connect-modal/views/WhatIsAWallet.css.ts
407
+ var container5 = "WhatIsAWallet_container__1kdcimq0";
408
+ var content3 = "WhatIsAWallet_content__1kdcimq1";
409
+
410
+ // src/components/connect-modal/views/WhatIsAWallet.tsx
411
+ import { jsx as jsx11, jsxs as jsxs4 } from "react/jsx-runtime";
412
+ function WhatIsAWallet() {
413
+ return /* @__PURE__ */ jsxs4("div", { className: container5, children: [
414
+ /* @__PURE__ */ jsx11(Heading, { as: "h2", children: "What is a Wallet" }),
415
+ /* @__PURE__ */ jsxs4("div", { className: content3, children: [
416
+ /* @__PURE__ */ jsx11(InfoSection, { title: "Easy Login", children: "No need to create new accounts and passwords for every website. Just connect your wallet and get going." }),
417
+ /* @__PURE__ */ jsx11(InfoSection, { title: "Store your Digital Assets", children: "Send, receive, store, and display your digital assets like NFTs & coins." })
418
+ ] })
419
+ ] });
420
+ }
198
421
 
199
- // src/constants/walletMutationKeys.ts
200
- var walletMutationKeys = {
201
- all: { baseScope: "wallet" },
202
- connectWallet: formMutationKeyFn("connect-wallet"),
203
- autoconnectWallet: formMutationKeyFn("autoconnect-wallet"),
204
- disconnectWallet: formMutationKeyFn("disconnect-wallet"),
205
- signPersonalMessage: formMutationKeyFn("sign-personal-message"),
206
- signTransactionBlock: formMutationKeyFn("sign-transaction-block"),
207
- signAndExecuteTransactionBlock: formMutationKeyFn("sign-and-execute-transaction-block"),
208
- switchAccount: formMutationKeyFn("switch-account")
209
- };
210
- function formMutationKeyFn(baseEntity) {
211
- return function mutationKeyFn(additionalKeys = []) {
212
- return [{ ...walletMutationKeys.all, baseEntity }, ...additionalKeys];
213
- };
422
+ // src/hooks/wallet/useWallets.ts
423
+ function useWallets() {
424
+ return useWalletStore((state) => state.wallets);
214
425
  }
215
426
 
216
- // src/hooks/wallet/useConnectWallet.ts
217
- function useConnectWallet({
218
- mutationKey,
219
- ...mutationOptions
220
- } = {}) {
221
- const setWalletConnected = useWalletStore((state) => state.setWalletConnected);
222
- const setConnectionStatus = useWalletStore((state) => state.setConnectionStatus);
223
- return useMutation({
224
- mutationKey: walletMutationKeys.connectWallet(mutationKey),
225
- mutationFn: async ({ wallet, accountAddress, ...connectArgs }) => {
226
- try {
227
- setConnectionStatus("connecting");
228
- const connectResult = await wallet.features["standard:connect"].connect(connectArgs);
229
- const connectedIotaAccounts = connectResult.accounts.filter(
230
- (account) => account.chains.some(isSupportedChain)
231
- );
232
- const selectedAccount = getSelectedAccount(connectedIotaAccounts, accountAddress);
233
- setWalletConnected(wallet, connectedIotaAccounts, selectedAccount);
234
- return { accounts: connectedIotaAccounts };
235
- } catch (error) {
236
- setConnectionStatus("disconnected");
237
- throw error;
427
+ // src/components/icons/IotaIcon.tsx
428
+ import { jsx as jsx12, jsxs as jsxs5 } from "react/jsx-runtime";
429
+ function IotaIcon(props) {
430
+ return /* @__PURE__ */ jsxs5("svg", { width: 28, height: 28, fill: "none", xmlns: "http://www.w3.org/2000/svg", ...props, children: [
431
+ /* @__PURE__ */ jsx12("rect", { width: 28, height: 28, rx: 6, fill: "#6FBCF0" }),
432
+ /* @__PURE__ */ jsx12(
433
+ "path",
434
+ {
435
+ fillRule: "evenodd",
436
+ clipRule: "evenodd",
437
+ d: "M7.942 20.527A6.875 6.875 0 0 0 13.957 24c2.51 0 4.759-1.298 6.015-3.473a6.875 6.875 0 0 0 0-6.945l-5.29-9.164a.837.837 0 0 0-1.45 0l-5.29 9.164a6.875 6.875 0 0 0 0 6.945Zm4.524-11.75 1.128-1.953a.418.418 0 0 1 .725 0l4.34 7.516a5.365 5.365 0 0 1 .449 4.442 4.675 4.675 0 0 0-.223-.73c-.599-1.512-1.954-2.68-4.029-3.47-1.426-.54-2.336-1.336-2.706-2.364-.476-1.326.021-2.77.316-3.44Zm-1.923 3.332L9.255 14.34a5.373 5.373 0 0 0 0 5.43 5.373 5.373 0 0 0 4.702 2.714 5.38 5.38 0 0 0 3.472-1.247c.125-.314.51-1.462.034-2.646-.44-1.093-1.5-1.965-3.15-2.594-1.864-.707-3.076-1.811-3.6-3.28a4.601 4.601 0 0 1-.17-.608Z",
438
+ fill: "#fff"
238
439
  }
239
- },
240
- ...mutationOptions
241
- });
242
- }
243
- function getSelectedAccount(connectedAccounts, accountAddress) {
244
- if (connectedAccounts.length === 0) {
245
- return null;
246
- }
247
- if (accountAddress) {
248
- const selectedAccount = connectedAccounts.find(
249
- (account) => account.address === accountAddress
250
- );
251
- return selectedAccount ?? connectedAccounts[0];
252
- }
253
- return connectedAccounts[0];
440
+ )
441
+ ] });
254
442
  }
255
443
 
256
444
  // src/components/connect-modal/wallet-list/WalletList.css.ts
257
- var container2 = "WalletList_container__1tkdegw0";
445
+ var container6 = "WalletList_container__1tkdegw0";
258
446
 
259
447
  // src/components/connect-modal/wallet-list/WalletListItem.tsx
260
- import { clsx as clsx3 } from "clsx";
448
+ import { clsx as clsx5 } from "clsx";
261
449
 
262
450
  // src/components/connect-modal/wallet-list/WalletListItem.css.ts
263
- var container3 = "WalletListItem_container__1vrvezk0";
451
+ var container7 = "WalletListItem_container__1vrvezk0";
264
452
  var selectedWalletItem = "WalletListItem_selectedWalletItem__1vrvezk2";
265
- var walletIcon = "WalletListItem_walletIcon__1vrvezk4";
453
+ var walletIcon2 = "WalletListItem_walletIcon__1vrvezk3";
266
454
  var walletItem = "WalletListItem_walletItem__1vrvezk1";
267
- var walletName = "WalletListItem_walletName__1vrvezk3";
268
-
269
- // src/components/icons/ArrowRightIcon.tsx
270
- import { jsx as jsx5 } from "react/jsx-runtime";
271
- function ArrowRightIcon(props) {
272
- return /* @__PURE__ */ jsx5(
273
- "svg",
274
- {
275
- xmlns: "http://www.w3.org/2000/svg",
276
- width: "24",
277
- height: "24",
278
- viewBox: "0 0 24 24",
279
- fill: "none",
280
- ...props,
281
- children: /* @__PURE__ */ jsx5(
282
- "path",
283
- {
284
- fill: "currentColor",
285
- d: "m10.707 6.293 5 5a1 1 0 0 1 0 1.414l-5 5a1 1 0 0 1-1.414-1.414L13.586 12 9.293 7.707a1 1 0 0 1 1.414-1.414Z"
286
- }
287
- )
288
- }
289
- );
290
- }
291
455
 
292
456
  // src/components/connect-modal/wallet-list/WalletListItem.tsx
293
- import { jsx as jsx6, jsxs } from "react/jsx-runtime";
294
- function WalletListItem({ name, icon: icon3, onClick, isSelected = false }) {
295
- return /* @__PURE__ */ jsx6("li", { className: container3, children: /* @__PURE__ */ jsxs(
457
+ import { jsx as jsx13, jsxs as jsxs6 } from "react/jsx-runtime";
458
+ function WalletListItem({ name, icon, onClick, isSelected = false }) {
459
+ return /* @__PURE__ */ jsx13("li", { className: container7, children: /* @__PURE__ */ jsxs6(
296
460
  "button",
297
461
  {
298
- className: clsx3(walletItem, { [selectedWalletItem]: isSelected }),
462
+ className: clsx5(walletItem, { [selectedWalletItem]: isSelected }),
299
463
  type: "button",
300
464
  onClick,
301
465
  children: [
302
- /* @__PURE__ */ jsxs("div", { className: clsx3(walletName), children: [
303
- typeof icon3 === "string" ? /* @__PURE__ */ jsx6("img", { className: walletIcon, src: icon3, alt: `${name} logo` }) : icon3,
304
- /* @__PURE__ */ jsx6(Heading, { size: "md", truncate: true, asChild: true, children: /* @__PURE__ */ jsx6("div", { children: name }) })
305
- ] }),
306
- /* @__PURE__ */ jsx6(ArrowRightIcon, {})
466
+ typeof icon === "string" ? /* @__PURE__ */ jsx13("img", { className: walletIcon2, src: icon, alt: `${name} logo` }) : icon,
467
+ /* @__PURE__ */ jsx13(Heading, { size: "md", truncate: true, asChild: true, children: /* @__PURE__ */ jsx13("div", { children: name }) })
307
468
  ]
308
469
  }
309
470
  ) });
310
471
  }
311
472
 
312
473
  // src/components/connect-modal/wallet-list/WalletList.tsx
313
- import { jsx as jsx7 } from "react/jsx-runtime";
314
- function WalletList({ selectedWalletName, onSelect, wallets }) {
315
- return /* @__PURE__ */ jsx7("ul", { className: container2, children: wallets.map((wallet) => /* @__PURE__ */ jsx7(
474
+ import { jsx as jsx14 } from "react/jsx-runtime";
475
+ function WalletList({ selectedWalletName, onPlaceholderClick, onSelect }) {
476
+ const wallets = useWallets();
477
+ return /* @__PURE__ */ jsx14("ul", { className: container6, children: wallets.length > 0 ? wallets.map((wallet) => /* @__PURE__ */ jsx14(
316
478
  WalletListItem,
317
479
  {
318
480
  name: wallet.name,
@@ -321,597 +483,126 @@ function WalletList({ selectedWalletName, onSelect, wallets }) {
321
483
  onClick: () => onSelect(wallet)
322
484
  },
323
485
  getWalletUniqueIdentifier(wallet)
324
- )) });
486
+ )) : /* @__PURE__ */ jsx14(
487
+ WalletListItem,
488
+ {
489
+ name: "IOTA Wallet",
490
+ icon: /* @__PURE__ */ jsx14(IotaIcon, {}),
491
+ onClick: onPlaceholderClick,
492
+ isSelected: true
493
+ }
494
+ ) });
325
495
  }
326
496
 
327
- // src/components/connect-modal/views/WalletConnect.css.ts
328
- var confirmText = "WalletConnect_confirmText__uo0o3s6";
329
- var errorContainer = "WalletConnect_errorContainer__uo0o3s2";
330
- var errorMessage = "WalletConnect_errorMessage__uo0o3s3";
331
- var openingText = "WalletConnect_openingText__uo0o3s5";
332
- var separator2 = "WalletConnect_separator__uo0o3s7";
333
- var successContainer = "WalletConnect_successContainer__uo0o3s4";
334
- var walletConnectContainer = "WalletConnect_walletConnectContainer__uo0o3s0";
335
- var walletConnectFooter = "WalletConnect_walletConnectFooter__uo0o3s1";
336
-
337
- // src/components/ui/Button.tsx
338
- import { Slot as Slot4 } from "@radix-ui/react-slot";
339
- import clsx4 from "clsx";
340
- import { forwardRef as forwardRef4 } from "react";
341
-
342
- // src/components/ui/Button.css.ts
343
- import { createRuntimeFn as _7a4682 } from "@vanilla-extract/recipes/createRuntimeFn";
344
- var buttonVariants = _7a4682({ defaultClassName: "Button_buttonVariants__ctbx2n0", variantClassNames: { variant: { primary: "Button_buttonVariants_variant_primary__ctbx2n1", outline: "Button_buttonVariants_variant_outline__ctbx2n2" }, size: { md: "Button_buttonVariants_size_md__ctbx2n3", lg: "Button_buttonVariants_size_lg__ctbx2n4" } }, defaultVariants: { variant: "primary", size: "md" }, compoundVariants: [] });
345
-
346
- // src/components/ui/Button.tsx
347
- import { jsx as jsx8 } from "react/jsx-runtime";
348
- var Button = forwardRef4(
349
- ({ className, variant, size, asChild = false, ...props }, forwardedRef) => {
350
- const Comp = asChild ? Slot4 : "button";
351
- return /* @__PURE__ */ jsx8(
352
- Comp,
353
- {
354
- ...props,
355
- className: clsx4(buttonVariants({ variant, size }), className),
356
- ref: forwardedRef
357
- }
358
- );
359
- }
360
- );
361
- Button.displayName = "Button";
362
-
363
- // src/components/connect-modal/views/WalletConnect.tsx
364
- import { Fragment, jsx as jsx9, jsxs as jsxs2 } from "react/jsx-runtime";
365
- function WalletConnectListView({ wallets, onOpenChange }) {
497
+ // src/components/connect-modal/ConnectModal.tsx
498
+ import { jsx as jsx15, jsxs as jsxs7 } from "react/jsx-runtime";
499
+ function ConnectModal({ trigger, open, defaultOpen, onOpenChange }) {
500
+ const [isModalOpen, setModalOpen] = useState(open ?? defaultOpen);
501
+ const [currentView, setCurrentView] = useState();
366
502
  const [selectedWallet, setSelectedWallet] = useState();
367
503
  const { mutate, isError } = useConnectWallet();
368
- function handleSelectWallet(wallet) {
369
- if (getWalletUniqueIdentifier(selectedWallet) !== getWalletUniqueIdentifier(wallet)) {
370
- setSelectedWallet(wallet);
371
- connectWallet(wallet);
372
- }
373
- }
374
- function resetSelection() {
504
+ const resetSelection = () => {
375
505
  setSelectedWallet(void 0);
376
- }
377
- function handleOpenChange(open) {
378
- if (!open) {
506
+ setCurrentView(void 0);
507
+ };
508
+ const handleOpenChange = (open2) => {
509
+ if (!open2) {
379
510
  resetSelection();
380
511
  }
381
- onOpenChange(open);
382
- }
383
- function connectWallet(wallet) {
512
+ setModalOpen(open2);
513
+ onOpenChange?.(open2);
514
+ };
515
+ const connectWallet = (wallet) => {
516
+ setCurrentView("connection-status");
384
517
  mutate(
385
518
  { wallet },
386
519
  {
387
520
  onSuccess: () => handleOpenChange(false)
388
521
  }
389
522
  );
523
+ };
524
+ let modalContent;
525
+ switch (currentView) {
526
+ case "what-is-a-wallet":
527
+ modalContent = /* @__PURE__ */ jsx15(WhatIsAWallet, {});
528
+ break;
529
+ case "getting-started":
530
+ modalContent = /* @__PURE__ */ jsx15(GettingStarted, {});
531
+ break;
532
+ case "connection-status":
533
+ modalContent = /* @__PURE__ */ jsx15(
534
+ ConnectionStatus,
535
+ {
536
+ selectedWallet,
537
+ hadConnectionError: isError,
538
+ onRetryConnection: connectWallet
539
+ }
540
+ );
541
+ break;
542
+ default:
543
+ modalContent = /* @__PURE__ */ jsx15(WhatIsAWallet, {});
390
544
  }
391
- return /* @__PURE__ */ jsxs2(Fragment, { children: [
392
- /* @__PURE__ */ jsx9("div", { className: walletConnectContainer, children: /* @__PURE__ */ jsx9(
393
- WalletList,
394
- {
395
- selectedWalletName: getWalletUniqueIdentifier(selectedWallet),
396
- onSelect: handleSelectWallet,
397
- wallets
398
- }
399
- ) }),
400
- selectedWallet && /* @__PURE__ */ jsx9("div", { className: walletConnectFooter, children: isError ? /* @__PURE__ */ jsxs2("div", { className: errorContainer, children: [
401
- /* @__PURE__ */ jsx9("p", { className: errorMessage, children: "Connection failed" }),
402
- /* @__PURE__ */ jsx9(
403
- Button,
545
+ return /* @__PURE__ */ jsxs7(Dialog.Root, { open: open ?? isModalOpen, onOpenChange: handleOpenChange, children: [
546
+ /* @__PURE__ */ jsx15(Dialog.Trigger, { asChild: true, children: trigger }),
547
+ /* @__PURE__ */ jsx15(Dialog.Portal, { children: /* @__PURE__ */ jsx15(StyleMarker, { children: /* @__PURE__ */ jsx15(Dialog.Overlay, { className: overlay, children: /* @__PURE__ */ jsxs7(Dialog.Content, { className: content, "aria-describedby": void 0, children: [
548
+ /* @__PURE__ */ jsxs7(
549
+ "div",
404
550
  {
405
- size: "md",
406
- variant: "outline",
407
- onClick: () => connectWallet(selectedWallet),
408
- children: "Retry"
551
+ className: clsx6(walletListContainer, {
552
+ [walletListContainerWithViewSelected]: !!currentView
553
+ }),
554
+ children: [
555
+ /* @__PURE__ */ jsxs7("div", { className: walletListContent, children: [
556
+ /* @__PURE__ */ jsx15(Dialog.Title, { className: title, asChild: true, children: /* @__PURE__ */ jsx15(Heading, { as: "h2", children: "Connect a Wallet" }) }),
557
+ /* @__PURE__ */ jsx15(
558
+ WalletList,
559
+ {
560
+ selectedWalletName: getWalletUniqueIdentifier(
561
+ selectedWallet
562
+ ),
563
+ onPlaceholderClick: () => setCurrentView("getting-started"),
564
+ onSelect: (wallet) => {
565
+ if (getWalletUniqueIdentifier(selectedWallet) !== getWalletUniqueIdentifier(wallet)) {
566
+ setSelectedWallet(wallet);
567
+ connectWallet(wallet);
568
+ }
569
+ }
570
+ }
571
+ )
572
+ ] }),
573
+ /* @__PURE__ */ jsx15(
574
+ "button",
575
+ {
576
+ className: whatIsAWalletButton,
577
+ onClick: () => setCurrentView("what-is-a-wallet"),
578
+ type: "button",
579
+ children: "What is a Wallet?"
580
+ }
581
+ )
582
+ ]
409
583
  }
410
- )
411
- ] }) : /* @__PURE__ */ jsxs2("div", { className: successContainer, children: [
412
- /* @__PURE__ */ jsxs2("p", { className: openingText, children: [
413
- "Opening ",
414
- selectedWallet.name,
415
- "..."
416
- ] }),
417
- /* @__PURE__ */ jsx9("div", { className: separator2 }),
418
- /* @__PURE__ */ jsx9("p", { className: confirmText, children: "Please confirm the connection in your wallet" })
419
- ] }) })
420
- ] });
421
- }
422
-
423
- // src/utils/stateStorage.ts
424
- function createInMemoryStore() {
425
- const store = /* @__PURE__ */ new Map();
426
- return {
427
- getItem(key) {
428
- return store.get(key);
429
- },
430
- setItem(key, value) {
431
- store.set(key, value);
432
- },
433
- removeItem(key) {
434
- store.delete(key);
435
- }
436
- };
437
- }
438
-
439
- // src/constants/walletDefaults.ts
440
- var IOTA_WALLET_NAME = "Iota Wallet";
441
- var DEFAULT_STORAGE = typeof window !== "undefined" && window.localStorage ? localStorage : createInMemoryStore();
442
- var DEFAULT_STORAGE_KEY = "iota-dapp-kit:wallet-connection-info";
443
- var DEFAULT_REQUIRED_FEATURES = [
444
- "iota:signTransactionBlock"
445
- ];
446
- var DEFAULT_PREFERRED_WALLETS = [IOTA_WALLET_NAME];
447
- var WALLET_CHROME_EXTENSION_ID = "TODO";
448
- var WALLET_DOWNLOAD_URL = "https://chromewebstore.google.com/detail/" + WALLET_CHROME_EXTENSION_ID;
449
-
450
- // src/components/icons/ArrowTopRightIcon.tsx
451
- import { jsx as jsx10 } from "react/jsx-runtime";
452
- function ArrowTopRightIcon(props) {
453
- return /* @__PURE__ */ jsx10(
454
- "svg",
455
- {
456
- xmlns: "http://www.w3.org/2000/svg",
457
- width: "24",
458
- height: "24",
459
- viewBox: "0 0 24 24",
460
- fill: "none",
461
- ...props,
462
- children: /* @__PURE__ */ jsx10(
463
- "path",
584
+ ),
585
+ /* @__PURE__ */ jsxs7(
586
+ "div",
464
587
  {
465
- d: "M17.4825 6.29014C17.3873 6.19563 17.2778 6.12421 17.161 6.07588C17.0431 6.02699 16.9138 6 16.7782 6L8.70711 6C8.15482 6 7.70711 6.44772 7.70711 7C7.70711 7.55228 8.15482 8 8.70711 8L14.364 8L6.29289 16.0711C5.90237 16.4616 5.90237 17.0948 6.29289 17.4853C6.68342 17.8758 7.31658 17.8758 7.70711 17.4853L15.7782 9.41421V15.0711C15.7782 15.6234 16.2259 16.0711 16.7782 16.0711C17.3305 16.0711 17.7782 15.6234 17.7782 15.0711L17.7782 7.0008C17.7782 6.86458 17.7509 6.73391 17.7016 6.61556C17.6531 6.49895 17.5816 6.38966 17.487 6.29464L17.4853 6.29289L17.4825 6.29014Z",
466
- fill: "currentColor"
588
+ className: clsx6(viewContainer, {
589
+ [selectedViewContainer]: !!currentView
590
+ }),
591
+ children: [
592
+ /* @__PURE__ */ jsx15("div", { className: backButtonContainer, children: /* @__PURE__ */ jsx15(
593
+ IconButton,
594
+ {
595
+ type: "button",
596
+ "aria-label": "Back",
597
+ onClick: () => resetSelection(),
598
+ children: /* @__PURE__ */ jsx15(BackIcon, {})
599
+ }
600
+ ) }),
601
+ modalContent
602
+ ]
467
603
  }
468
- )
469
- }
470
- );
471
- }
472
-
473
- // src/components/icons/IotaIcon.tsx
474
- import { jsx as jsx11, jsxs as jsxs3 } from "react/jsx-runtime";
475
- function IotaIcon(props) {
476
- return /* @__PURE__ */ jsxs3(
477
- "svg",
478
- {
479
- xmlns: "http://www.w3.org/2000/svg",
480
- width: "24",
481
- height: "24",
482
- viewBox: "0 0 24 24",
483
- fill: "none",
484
- ...props,
485
- children: [
486
- /* @__PURE__ */ jsx11(
487
- "path",
488
- {
489
- d: "M18.2698 2.25899C18.2698 2.95431 17.7023 3.51797 17.0023 3.51797C16.3024 3.51797 15.7349 2.95431 15.7349 2.25899C15.7349 1.56367 16.3024 1 17.0023 1C17.7023 1 18.2698 1.56367 18.2698 2.25899Z",
490
- fill: "currentColor"
491
- }
492
- ),
493
- /* @__PURE__ */ jsx11(
494
- "path",
495
- {
496
- d: "M19.6946 20.0436C19.6946 20.7389 19.1272 21.3026 18.4272 21.3026C17.7272 21.3026 17.1598 20.7389 17.1598 20.0436C17.1598 19.3483 17.7272 18.7846 18.4272 18.7846C19.1272 18.7846 19.6946 19.3483 19.6946 20.0436Z",
497
- fill: "currentColor"
498
- }
499
- ),
500
- /* @__PURE__ */ jsx11(
501
- "path",
502
- {
503
- d: "M17.3647 6.66519C17.952 6.66519 18.4282 6.19222 18.4282 5.60878C18.4282 5.02534 17.952 4.55236 17.3647 4.55236C16.7773 4.55236 16.3012 5.02534 16.3012 5.60878C16.3012 6.19222 16.7773 6.66519 17.3647 6.66519Z",
504
- fill: "currentColor"
505
- }
506
- ),
507
- /* @__PURE__ */ jsx11(
508
- "path",
509
- {
510
- d: "M21.2564 6.01379C21.2564 6.59723 20.7802 7.0702 20.1929 7.0702C19.6055 7.0702 19.1294 6.59723 19.1294 6.01379C19.1294 5.43034 19.6055 4.95737 20.1929 4.95737C20.7802 4.95737 21.2564 5.43034 21.2564 6.01379Z",
511
- fill: "currentColor"
512
- }
513
- ),
514
- /* @__PURE__ */ jsx11(
515
- "path",
516
- {
517
- d: "M17.0027 9.34312C17.5028 9.34312 17.9083 8.94036 17.9083 8.44353C17.9083 7.9467 17.5028 7.54394 17.0027 7.54394C16.5026 7.54394 16.0971 7.9467 16.0971 8.44353C16.0971 8.94036 16.5026 9.34312 17.0027 9.34312Z",
518
- fill: "currentColor"
519
- }
520
- ),
521
- /* @__PURE__ */ jsx11(
522
- "path",
523
- {
524
- d: "M20.7373 8.82346C20.7373 9.32029 20.3318 9.72305 19.8317 9.72305C19.3315 9.72305 18.9261 9.32029 18.9261 8.82346C18.9261 8.32663 19.3315 7.92388 19.8317 7.92388C20.3318 7.92388 20.7373 8.32663 20.7373 8.82346Z",
525
- fill: "currentColor"
526
- }
527
- ),
528
- /* @__PURE__ */ jsx11(
529
- "path",
530
- {
531
- d: "M22.0944 10.6007C22.5945 10.6007 23 10.1979 23 9.70111C23 9.20428 22.5945 8.80152 22.0944 8.80152C21.5942 8.80152 21.1888 9.20428 21.1888 9.70111C21.1888 10.1979 21.5942 10.6007 22.0944 10.6007Z",
532
- fill: "currentColor"
533
- }
534
- ),
535
- /* @__PURE__ */ jsx11(
536
- "path",
537
- {
538
- d: "M19.7849 11.0954C19.7849 11.5297 19.4305 11.8817 18.9933 11.8817C18.5562 11.8817 18.2018 11.5297 18.2018 11.0954C18.2018 10.6611 18.5562 10.3091 18.9933 10.3091C19.4305 10.3091 19.7849 10.6611 19.7849 11.0954Z",
539
- fill: "currentColor"
540
- }
541
- ),
542
- /* @__PURE__ */ jsx11(
543
- "path",
544
- {
545
- d: "M16.1651 11.4988C16.6023 11.4988 16.9567 11.1467 16.9567 10.7124C16.9567 10.2782 16.6023 9.92612 16.1651 9.92612C15.7279 9.92612 15.3735 10.2782 15.3735 10.7124C15.3735 11.1467 15.7279 11.4988 16.1651 11.4988Z",
546
- fill: "currentColor"
547
- }
548
- ),
549
- /* @__PURE__ */ jsx11(
550
- "path",
551
- {
552
- d: "M22.0722 11.9708C22.0722 12.405 21.7178 12.7571 21.2806 12.7571C20.8434 12.7571 20.489 12.405 20.489 11.9708C20.489 11.5365 20.8434 11.1845 21.2806 11.1845C21.7178 11.1845 22.0722 11.5365 22.0722 11.9708Z",
553
- fill: "currentColor"
554
- }
555
- ),
556
- /* @__PURE__ */ jsx11(
557
- "path",
558
- {
559
- d: "M17.8618 13.5243C18.2372 13.5243 18.5415 13.222 18.5415 12.849C18.5415 12.4761 18.2372 12.1738 17.8618 12.1738C17.4864 12.1738 17.182 12.4761 17.182 12.849C17.182 13.222 17.4864 13.5243 17.8618 13.5243Z",
560
- fill: "currentColor"
561
- }
562
- ),
563
- /* @__PURE__ */ jsx11(
564
- "path",
565
- {
566
- d: "M20.8296 13.7024C20.8296 14.0753 20.5252 14.3776 20.1498 14.3776C19.7744 14.3776 19.4701 14.0753 19.4701 13.7024C19.4701 13.3294 19.7744 13.0271 20.1498 13.0271C20.5252 13.0271 20.8296 13.3294 20.8296 13.7024Z",
567
- fill: "currentColor"
568
- }
569
- ),
570
- /* @__PURE__ */ jsx11(
571
- "path",
572
- {
573
- d: "M15.0558 13.12C15.4312 13.12 15.7356 12.8177 15.7356 12.4448C15.7356 12.0719 15.4312 11.7695 15.0558 11.7695C14.6804 11.7695 14.3761 12.0719 14.3761 12.4448C14.3761 12.8177 14.6804 13.12 15.0558 13.12Z",
574
- fill: "currentColor"
575
- }
576
- ),
577
- /* @__PURE__ */ jsx11(
578
- "path",
579
- {
580
- d: "M17.1825 14.0625C17.1825 14.3729 16.9292 14.6245 16.6168 14.6245C16.3043 14.6245 16.0511 14.3729 16.0511 14.0625C16.0511 13.7521 16.3043 13.5005 16.6168 13.5005C16.9292 13.5005 17.1825 13.7521 17.1825 14.0625Z",
581
- fill: "currentColor"
582
- }
583
- ),
584
- /* @__PURE__ */ jsx11(
585
- "path",
586
- {
587
- d: "M17.59 16.1771C17.8649 16.1771 18.0878 15.9557 18.0878 15.6826C18.0878 15.4095 17.8649 15.1882 17.59 15.1882C17.3151 15.1882 17.0923 15.4095 17.0923 15.6826C17.0923 15.9557 17.3151 16.1771 17.59 16.1771Z",
588
- fill: "currentColor"
589
- }
590
- ),
591
- /* @__PURE__ */ jsx11(
592
- "path",
593
- {
594
- d: "M16.7985 16.0872C16.7985 16.311 16.6159 16.4924 16.3906 16.4924C16.1654 16.4924 15.9828 16.311 15.9828 16.0872C15.9828 15.8635 16.1654 15.6821 16.3906 15.6821C16.6159 15.6821 16.7985 15.8635 16.7985 16.0872Z",
595
- fill: "currentColor"
596
- }
597
- ),
598
- /* @__PURE__ */ jsx11(
599
- "path",
600
- {
601
- d: "M15.3273 15.3222C15.6022 15.3222 15.825 15.1008 15.825 14.8278C15.825 14.5547 15.6022 14.3333 15.3273 14.3333C15.0524 14.3333 14.8295 14.5547 14.8295 14.8278C14.8295 15.1008 15.0524 15.3222 15.3273 15.3222Z",
602
- fill: "currentColor"
603
- }
604
- ),
605
- /* @__PURE__ */ jsx11(
606
- "path",
607
- {
608
- d: "M14.3535 13.6818C14.3535 13.9922 14.1003 14.2438 13.7878 14.2438C13.4754 14.2438 13.2221 13.9922 13.2221 13.6818C13.2221 13.3714 13.4754 13.1198 13.7878 13.1198C14.1003 13.1198 14.3535 13.3714 14.3535 13.6818Z",
609
- fill: "currentColor"
610
- }
611
- ),
612
- /* @__PURE__ */ jsx11(
613
- "path",
614
- {
615
- d: "M13.7663 10.0159C14.0788 10.0159 14.3321 9.76428 14.3321 9.45391C14.3321 9.14355 14.0788 8.89194 13.7663 8.89194C13.4539 8.89194 13.2006 9.14355 13.2006 9.45391C13.2006 9.76428 13.4539 10.0159 13.7663 10.0159Z",
616
- fill: "currentColor"
617
- }
618
- ),
619
- /* @__PURE__ */ jsx11(
620
- "path",
621
- {
622
- d: "M14.5115 7.54296C14.5115 7.81603 14.2886 8.03741 14.0137 8.03741C13.7388 8.03741 13.516 7.81603 13.516 7.54296C13.516 7.26988 13.7388 7.04851 14.0137 7.04851C14.2886 7.04851 14.5115 7.26988 14.5115 7.54296Z",
623
- fill: "currentColor"
624
- }
625
- ),
626
- /* @__PURE__ */ jsx11(
627
- "path",
628
- {
629
- d: "M14.5576 6.41961C14.7828 6.41961 14.9654 6.23823 14.9654 6.01447C14.9654 5.79072 14.7828 5.60933 14.5576 5.60933C14.3323 5.60933 14.1497 5.79072 14.1497 6.01447C14.1497 6.23823 14.3323 6.41961 14.5576 6.41961Z",
630
- fill: "currentColor"
631
- }
632
- ),
633
- /* @__PURE__ */ jsx11(
634
- "path",
635
- {
636
- d: "M14.1056 5.16003C14.1056 5.4331 13.8827 5.65448 13.6078 5.65448C13.3329 5.65448 13.1101 5.4331 13.1101 5.16003C13.1101 4.88695 13.3329 4.66558 13.6078 4.66558C13.8827 4.66558 14.1056 4.88695 14.1056 5.16003Z",
637
- fill: "currentColor"
638
- }
639
- ),
640
- /* @__PURE__ */ jsx11(
641
- "path",
642
- {
643
- d: "M18.8818 15.4808C19.1943 15.4808 19.4475 15.2292 19.4475 14.9189C19.4475 14.6085 19.1943 14.3569 18.8818 14.3569C18.5694 14.3569 18.3161 14.6085 18.3161 14.9189C18.3161 15.2292 18.5694 15.4808 18.8818 15.4808Z",
644
- fill: "currentColor"
645
- }
646
- ),
647
- /* @__PURE__ */ jsx11(
648
- "path",
649
- {
650
- d: "M12.8827 4.43881C12.8827 4.74918 12.6294 5.00078 12.3169 5.00078C12.0045 5.00078 11.7512 4.74918 11.7512 4.43881C11.7512 4.12845 12.0045 3.87684 12.3169 3.87684C12.6294 3.87684 12.8827 4.12845 12.8827 4.43881Z",
651
- fill: "currentColor"
652
- }
653
- ),
654
- /* @__PURE__ */ jsx11(
655
- "path",
656
- {
657
- d: "M12.7029 7.38447C13.0153 7.38447 13.2686 7.13287 13.2686 6.8225C13.2686 6.51214 13.0153 6.26053 12.7029 6.26053C12.3904 6.26053 12.1371 6.51214 12.1371 6.8225C12.1371 7.13287 12.3904 7.38447 12.7029 7.38447Z",
658
- fill: "currentColor"
659
- }
660
- ),
661
- /* @__PURE__ */ jsx11(
662
- "path",
663
- {
664
- d: "M12.7485 8.98132C12.7485 9.35424 12.4442 9.65656 12.0688 9.65656C11.6934 9.65656 11.389 9.35424 11.389 8.98132C11.389 8.6084 11.6934 8.30609 12.0688 8.30609C12.4442 8.30609 12.7485 8.6084 12.7485 8.98132Z",
665
- fill: "currentColor"
666
- }
667
- ),
668
- /* @__PURE__ */ jsx11(
669
- "path",
670
- {
671
- d: "M10.0077 9.65685C10.4448 9.65685 10.7992 9.3048 10.7992 8.87053C10.7992 8.43626 10.4448 8.08421 10.0077 8.08421C9.57049 8.08421 9.21609 8.43626 9.21609 8.87053C9.21609 9.3048 9.57049 9.65685 10.0077 9.65685Z",
672
- fill: "currentColor"
673
- }
674
- ),
675
- /* @__PURE__ */ jsx11(
676
- "path",
677
- {
678
- d: "M8.51443 9.29686C8.51443 9.79369 8.10898 10.1964 7.60883 10.1964C7.10868 10.1964 6.70323 9.79369 6.70323 9.29686C6.70323 8.80003 7.10868 8.39727 7.60883 8.39727C8.10898 8.39727 8.51443 8.80003 8.51443 9.29686Z",
679
- fill: "currentColor"
680
- }
681
- ),
682
- /* @__PURE__ */ jsx11(
683
- "path",
684
- {
685
- d: "M4.98453 11.4774C5.57188 11.4774 6.04801 11.0044 6.04801 10.421C6.04801 9.83755 5.57188 9.36458 4.98453 9.36458C4.39719 9.36458 3.92105 9.83755 3.92105 10.421C3.92105 11.0044 4.39719 11.4774 4.98453 11.4774Z",
686
- fill: "currentColor"
687
- }
688
- ),
689
- /* @__PURE__ */ jsx11(
690
- "path",
691
- {
692
- d: "M3.53481 12.3773C3.53481 13.0726 2.96737 13.6363 2.2674 13.6363C1.56744 13.6363 1 13.0726 1 12.3773C1 11.682 1.56744 11.1183 2.2674 11.1183C2.96737 11.1183 3.53481 11.682 3.53481 12.3773Z",
693
- fill: "currentColor"
694
- }
695
- ),
696
- /* @__PURE__ */ jsx11(
697
- "path",
698
- {
699
- d: "M3.92108 8.846C4.50842 8.846 4.98455 8.37303 4.98455 7.78959C4.98455 7.20614 4.50842 6.73317 3.92108 6.73317C3.33373 6.73317 2.8576 7.20614 2.8576 7.78959C2.8576 8.37303 3.33373 8.846 3.92108 8.846Z",
700
- fill: "currentColor"
701
- }
702
- ),
703
- /* @__PURE__ */ jsx11(
704
- "path",
705
- {
706
- d: "M7.45097 6.66545C7.45097 7.16228 7.04552 7.56504 6.54537 7.56504C6.04522 7.56504 5.63977 7.16228 5.63977 6.66545C5.63977 6.16862 6.04522 5.76586 6.54537 5.76586C7.04552 5.76586 7.45097 6.16862 7.45097 6.66545Z",
707
- fill: "currentColor"
708
- }
709
- ),
710
- /* @__PURE__ */ jsx11(
711
- "path",
712
- {
713
- d: "M6.16173 5.18211C6.66188 5.18211 7.06733 4.77935 7.06733 4.28252C7.06733 3.78569 6.66188 3.38293 6.16173 3.38293C5.66158 3.38293 5.25613 3.78569 5.25613 4.28252C5.25613 4.77935 5.66158 5.18211 6.16173 5.18211Z",
714
- fill: "currentColor"
715
- }
716
- ),
717
- /* @__PURE__ */ jsx11(
718
- "path",
719
- {
720
- d: "M9.35214 3.85619C9.35214 4.29046 8.99774 4.64251 8.56057 4.64251C8.12339 4.64251 7.76899 4.29046 7.76899 3.85619C7.76899 3.42192 8.12339 3.06987 8.56057 3.06987C8.99774 3.06987 9.35214 3.42192 9.35214 3.85619Z",
721
- fill: "currentColor"
722
- }
723
- ),
724
- /* @__PURE__ */ jsx11(
725
- "path",
726
- {
727
- d: "M10.6194 4.64374C10.9948 4.64374 11.2991 4.34143 11.2991 3.9685C11.2991 3.59558 10.9948 3.29327 10.6194 3.29327C10.244 3.29327 9.93964 3.59558 9.93964 3.9685C9.93964 4.34143 10.244 4.64374 10.6194 4.64374Z",
728
- fill: "currentColor"
729
- }
730
- ),
731
- /* @__PURE__ */ jsx11(
732
- "path",
733
- {
734
- d: "M11.6828 6.3522C11.6828 6.72512 11.3784 7.02743 11.003 7.02743C10.6276 7.02743 10.3233 6.72512 10.3233 6.3522C10.3233 5.97927 10.6276 5.67696 11.003 5.67696C11.3784 5.67696 11.6828 5.97927 11.6828 6.3522Z",
735
- fill: "currentColor"
736
- }
737
- ),
738
- /* @__PURE__ */ jsx11(
739
- "path",
740
- {
741
- d: "M8.94421 7.04748C9.38139 7.04748 9.73579 6.69543 9.73579 6.26116C9.73579 5.82688 9.38139 5.47484 8.94421 5.47484C8.50703 5.47484 8.15263 5.82688 8.15263 6.26116C8.15263 6.69543 8.50703 7.04748 8.94421 7.04748Z",
742
- fill: "currentColor"
743
- }
744
- ),
745
- /* @__PURE__ */ jsx11(
746
- "path",
747
- {
748
- d: "M7.1115 12.6253C7.1115 12.849 6.9289 13.0304 6.70365 13.0304C6.4784 13.0304 6.2958 12.849 6.2958 12.6253C6.2958 12.4015 6.4784 12.2201 6.70365 12.2201C6.9289 12.2201 7.1115 12.4015 7.1115 12.6253Z",
749
- fill: "currentColor"
750
- }
751
- ),
752
- /* @__PURE__ */ jsx11(
753
- "path",
754
- {
755
- d: "M8.33273 12.8261C8.60763 12.8261 8.83048 12.6047 8.83048 12.3316C8.83048 12.0585 8.60763 11.8372 8.33273 11.8372C8.05782 11.8372 7.83497 12.0585 7.83497 12.3316C7.83497 12.6047 8.05782 12.8261 8.33273 12.8261Z",
756
- fill: "currentColor"
757
- }
758
- ),
759
- /* @__PURE__ */ jsx11(
760
- "path",
761
- {
762
- d: "M10.6874 11.5899C10.6874 11.9003 10.4342 12.1519 10.1217 12.1519C9.80928 12.1519 9.55599 11.9003 9.55599 11.5899C9.55599 11.2795 9.80928 11.0279 10.1217 11.0279C10.4342 11.0279 10.6874 11.2795 10.6874 11.5899Z",
763
- fill: "currentColor"
764
- }
765
- ),
766
- /* @__PURE__ */ jsx11(
767
- "path",
768
- {
769
- d: "M10.5519 13.9513C10.9273 13.9513 11.2316 13.649 11.2316 13.2761C11.2316 12.9031 10.9273 12.6008 10.5519 12.6008C10.1764 12.6008 9.87212 12.9031 9.87212 13.2761C9.87212 13.649 10.1764 13.9513 10.5519 13.9513Z",
770
- fill: "currentColor"
771
- }
772
- ),
773
- /* @__PURE__ */ jsx11(
774
- "path",
775
- {
776
- d: "M8.94418 13.8163C8.94418 14.1267 8.69089 14.3783 8.37845 14.3783C8.06601 14.3783 7.81272 14.1267 7.81272 13.8163C7.81272 13.5059 8.06601 13.2543 8.37845 13.2543C8.69089 13.2543 8.94418 13.5059 8.94418 13.8163Z",
777
- fill: "currentColor"
778
- }
779
- ),
780
- /* @__PURE__ */ jsx11(
781
- "path",
782
- {
783
- d: "M6.45595 14.3542C6.73085 14.3542 6.9537 14.1328 6.9537 13.8597C6.9537 13.5866 6.73085 13.3653 6.45595 13.3653C6.18105 13.3653 5.95819 13.5866 5.95819 13.8597C5.95819 14.1328 6.18105 14.3542 6.45595 14.3542Z",
784
- fill: "currentColor"
785
- }
786
- ),
787
- /* @__PURE__ */ jsx11(
788
- "path",
789
- {
790
- d: "M7.04361 15.3451C7.04361 15.6555 6.79033 15.9071 6.47788 15.9071C6.16544 15.9071 5.91216 15.6555 5.91216 15.3451C5.91216 15.0348 6.16544 14.7832 6.47788 14.7832C6.79033 14.7832 7.04361 15.0348 7.04361 15.3451Z",
791
- fill: "currentColor"
792
- }
793
- ),
794
- /* @__PURE__ */ jsx11(
795
- "path",
796
- {
797
- d: "M8.78634 16.1997C9.16176 16.1997 9.46609 15.8974 9.46609 15.5245C9.46609 15.1516 9.16176 14.8493 8.78634 14.8493C8.41093 14.8493 8.10659 15.1516 8.10659 15.5245C8.10659 15.8974 8.41093 16.1997 8.78634 16.1997Z",
798
- fill: "currentColor"
799
- }
800
- ),
801
- /* @__PURE__ */ jsx11(
802
- "path",
803
- {
804
- d: "M12.2709 15.1196C12.2709 15.5539 11.9165 15.906 11.4793 15.906C11.0421 15.906 10.6877 15.5539 10.6877 15.1196C10.6877 14.6854 11.0421 14.3333 11.4793 14.3333C11.9165 14.3333 12.2709 14.6854 12.2709 15.1196Z",
805
- fill: "currentColor"
806
- }
807
- ),
808
- /* @__PURE__ */ jsx11(
809
- "path",
810
- {
811
- d: "M13.0642 17.8635C13.5644 17.8635 13.9698 17.4607 13.9698 16.9639C13.9698 16.4671 13.5644 16.0643 13.0642 16.0643C12.5641 16.0643 12.1586 16.4671 12.1586 16.9639C12.1586 17.4607 12.5641 17.8635 13.0642 17.8635Z",
812
- fill: "currentColor"
813
- }
814
- ),
815
- /* @__PURE__ */ jsx11(
816
- "path",
817
- {
818
- d: "M10.5276 17.3445C10.5276 17.7788 10.1732 18.1308 9.73605 18.1308C9.29887 18.1308 8.94447 17.7788 8.94447 17.3445C8.94447 16.9103 9.29887 16.5582 9.73605 16.5582C10.1732 16.5582 10.5276 16.9103 10.5276 17.3445Z",
819
- fill: "currentColor"
820
- }
821
- ),
822
- /* @__PURE__ */ jsx11(
823
- "path",
824
- {
825
- d: "M7.8585 19.6612C8.29568 19.6612 8.65008 19.3092 8.65008 18.8749C8.65008 18.4406 8.29568 18.0886 7.8585 18.0886C7.42132 18.0886 7.06692 18.4406 7.06692 18.8749C7.06692 19.3092 7.42132 19.6612 7.8585 19.6612Z",
826
- fill: "currentColor"
827
- }
828
- ),
829
- /* @__PURE__ */ jsx11(
830
- "path",
831
- {
832
- d: "M10.3252 20.7404C10.3252 21.2372 9.91977 21.64 9.41962 21.64C8.91947 21.64 8.51402 21.2372 8.51402 20.7404C8.51402 20.2436 8.91947 19.8408 9.41962 19.8408C9.91977 19.8408 10.3252 20.2436 10.3252 20.7404Z",
833
- fill: "currentColor"
834
- }
835
- ),
836
- /* @__PURE__ */ jsx11(
837
- "path",
838
- {
839
- d: "M13.5843 22C14.1716 22 14.6477 21.527 14.6477 20.9436C14.6477 20.3601 14.1716 19.8872 13.5843 19.8872C12.9969 19.8872 12.5208 20.3601 12.5208 20.9436C12.5208 21.527 12.9969 22 13.5843 22Z",
840
- fill: "currentColor"
841
- }
842
- ),
843
- /* @__PURE__ */ jsx11(
844
- "path",
845
- {
846
- d: "M12.2051 19.2123C12.2051 19.7091 11.7996 20.1119 11.2995 20.1119C10.7993 20.1119 10.3939 19.7091 10.3939 19.2123C10.3939 18.7155 10.7993 18.3127 11.2995 18.3127C11.7996 18.3127 12.2051 18.7155 12.2051 19.2123Z",
847
- fill: "currentColor"
848
- }
849
- ),
850
- /* @__PURE__ */ jsx11(
851
- "path",
852
- {
853
- d: "M15.3275 19.7516C15.9149 19.7516 16.391 19.2786 16.391 18.6951C16.391 18.1117 15.9149 17.6387 15.3275 17.6387C14.7402 17.6387 14.2641 18.1117 14.2641 18.6951C14.2641 19.2786 14.7402 19.7516 15.3275 19.7516Z",
854
- fill: "currentColor"
855
- }
856
- ),
857
- /* @__PURE__ */ jsx11(
858
- "path",
859
- {
860
- d: "M7.58701 17.0534C7.58701 17.4263 7.28268 17.7286 6.90726 17.7286C6.53185 17.7286 6.22751 17.4263 6.22751 17.0534C6.22751 16.6804 6.53185 16.3781 6.90726 16.3781C7.28268 16.3781 7.58701 16.6804 7.58701 17.0534Z",
861
- fill: "currentColor"
862
- }
863
- )
864
- ]
865
- }
866
- );
867
- }
868
-
869
- // src/components/connect-modal/views/GetTheWallet.css.ts
870
- var button = "GetTheWallet_button__1iomrym3";
871
- var container4 = "GetTheWallet_container__1iomrym0";
872
- var content2 = "GetTheWallet_content__1iomrym1";
873
- var icon = "GetTheWallet_icon__1iomrym4";
874
- var text = "GetTheWallet_text__1iomrym2";
875
-
876
- // src/components/connect-modal/views/GetTheWallet.tsx
877
- import { jsx as jsx12, jsxs as jsxs4 } from "react/jsx-runtime";
878
- function GetTheWalletView() {
879
- return /* @__PURE__ */ jsxs4("div", { className: container4, children: [
880
- /* @__PURE__ */ jsxs4("div", { className: content2, children: [
881
- /* @__PURE__ */ jsx12(IotaIcon, { className: icon, width: 48, height: 48 }),
882
- /* @__PURE__ */ jsx12("p", { className: text, children: "Don't have a wallet yet?" })
883
- ] }),
884
- /* @__PURE__ */ jsx12("a", { href: WALLET_DOWNLOAD_URL, target: "_blank", rel: "noopener noreferrer", children: /* @__PURE__ */ jsxs4(Button, { size: "md", variant: "primary", className: button, children: [
885
- "Get the IOTA wallet",
886
- /* @__PURE__ */ jsx12(ArrowTopRightIcon, { width: 16, height: 16 })
887
- ] }) })
888
- ] });
889
- }
890
-
891
- // src/components/connect-modal/ConnectModal.tsx
892
- import { jsx as jsx13, jsxs as jsxs5 } from "react/jsx-runtime";
893
- function ConnectModal({ trigger, open, defaultOpen, onOpenChange }) {
894
- const wallets = useWallets();
895
- const [isModalOpen, setModalOpen] = useState2(open ?? defaultOpen);
896
- const handleOpenChange = (open2) => {
897
- setModalOpen(open2);
898
- onOpenChange?.(open2);
899
- };
900
- return /* @__PURE__ */ jsxs5(Dialog.Root, { open: open ?? isModalOpen, onOpenChange: handleOpenChange, children: [
901
- /* @__PURE__ */ jsx13(Dialog.Trigger, { asChild: true, children: trigger }),
902
- /* @__PURE__ */ jsx13(Dialog.Portal, { children: /* @__PURE__ */ jsx13(StyleMarker, { children: /* @__PURE__ */ jsx13(Dialog.Overlay, { className: overlay, children: /* @__PURE__ */ jsxs5(Dialog.Content, { className: content, "aria-describedby": void 0, children: [
903
- /* @__PURE__ */ jsxs5("div", { className: walletListContent, children: [
904
- /* @__PURE__ */ jsx13(Dialog.Title, { className: title, asChild: true, children: /* @__PURE__ */ jsx13(Heading, { as: "h2", children: "Connect a Wallet" }) }),
905
- /* @__PURE__ */ jsx13("div", { className: separator }),
906
- wallets?.length ? /* @__PURE__ */ jsx13(
907
- WalletConnectListView,
908
- {
909
- wallets,
910
- onOpenChange: handleOpenChange
911
- }
912
- ) : /* @__PURE__ */ jsx13(GetTheWalletView, {})
913
- ] }),
914
- /* @__PURE__ */ jsx13(Dialog.Close, { className: closeButtonContainer, asChild: true, children: /* @__PURE__ */ jsx13(IconButton, { type: "button", "aria-label": "Close", children: /* @__PURE__ */ jsx13(CloseIcon, {}) }) })
604
+ ),
605
+ /* @__PURE__ */ jsx15(Dialog.Close, { className: closeButtonContainer, asChild: true, children: /* @__PURE__ */ jsx15(IconButton, { type: "button", "aria-label": "Close", children: /* @__PURE__ */ jsx15(CloseIcon, {}) }) })
915
606
  ] }) }) }) })
916
607
  ] });
917
608
  }
@@ -924,7 +615,7 @@ function useCurrentAccount() {
924
615
  // src/components/AccountDropdownMenu.tsx
925
616
  import { formatAddress } from "@iota/iota-sdk/utils";
926
617
  import * as DropdownMenu from "@radix-ui/react-dropdown-menu";
927
- import clsx6 from "clsx";
618
+ import clsx7 from "clsx";
928
619
 
929
620
  // src/hooks/wallet/useAccounts.ts
930
621
  function useAccounts() {
@@ -947,31 +638,35 @@ var WalletAccountNotFoundError = class extends Error {
947
638
  // src/hooks/wallet/useCurrentWallet.ts
948
639
  function useCurrentWallet() {
949
640
  const currentWallet = useWalletStore((state) => state.currentWallet);
950
- const connectionStatus = useWalletStore((state) => state.connectionStatus);
951
- switch (connectionStatus) {
641
+ const connectionStatus2 = useWalletStore((state) => state.connectionStatus);
642
+ const supportedIntents = useWalletStore((state) => state.supportedIntents);
643
+ switch (connectionStatus2) {
952
644
  case "connecting":
953
645
  return {
954
- connectionStatus,
646
+ connectionStatus: connectionStatus2,
955
647
  currentWallet: null,
956
648
  isDisconnected: false,
957
649
  isConnecting: true,
958
- isConnected: false
650
+ isConnected: false,
651
+ supportedIntents: []
959
652
  };
960
653
  case "disconnected":
961
654
  return {
962
- connectionStatus,
655
+ connectionStatus: connectionStatus2,
963
656
  currentWallet: null,
964
657
  isDisconnected: true,
965
658
  isConnecting: false,
966
- isConnected: false
659
+ isConnected: false,
660
+ supportedIntents: []
967
661
  };
968
662
  case "connected": {
969
663
  return {
970
- connectionStatus,
664
+ connectionStatus: connectionStatus2,
971
665
  currentWallet,
972
666
  isDisconnected: false,
973
667
  isConnecting: false,
974
- isConnected: true
668
+ isConnected: true,
669
+ supportedIntents
975
670
  };
976
671
  }
977
672
  }
@@ -1034,88 +729,51 @@ function useSwitchAccount({
1034
729
 
1035
730
  // src/components/AccountDropdownMenu.css.ts
1036
731
  var connectedAccount = "AccountDropdownMenu_connectedAccount__1x0gmpf0";
1037
- var icon2 = "AccountDropdownMenu_icon__1x0gmpf2";
1038
- var menuContainer = "AccountDropdownMenu_menuContainer__1x0gmpf1";
1039
- var menuContent = "AccountDropdownMenu_menuContent__1x0gmpf3";
1040
- var menuItem = "AccountDropdownMenu_menuItem__1x0gmpf4";
1041
- var separator3 = "AccountDropdownMenu_separator__1x0gmpf6";
1042
- var switchAccountMenuItem = "AccountDropdownMenu_switchAccountMenuItem__1x0gmpf5";
1043
-
1044
- // src/components/icons/CheckIcon.tsx
1045
- import { jsx as jsx14 } from "react/jsx-runtime";
1046
- function CheckIcon(props) {
1047
- return /* @__PURE__ */ jsx14("svg", { xmlns: "http://www.w3.org/2000/svg", width: 16, height: 16, fill: "none", ...props, children: /* @__PURE__ */ jsx14(
1048
- "path",
1049
- {
1050
- fill: "currentColor",
1051
- d: "m11.726 5.048-4.73 5.156-1.722-1.879a.72.72 0 0 0-.529-.23.722.722 0 0 0-.525.24.858.858 0 0 0-.22.573.86.86 0 0 0 .211.576l2.255 2.458c.14.153.332.24.53.24.2 0 .391-.087.532-.24l5.261-5.735A.86.86 0 0 0 13 5.63a.858.858 0 0 0-.22-.572.722.722 0 0 0-.525-.24.72.72 0 0 0-.529.23Z"
1052
- }
1053
- ) });
1054
- }
1055
-
1056
- // src/components/icons/ChevronIcon.tsx
1057
- import { jsx as jsx15 } from "react/jsx-runtime";
1058
- function ChevronIcon(props) {
1059
- return /* @__PURE__ */ jsx15("svg", { xmlns: "http://www.w3.org/2000/svg", width: 16, height: 16, fill: "none", ...props, children: /* @__PURE__ */ jsx15(
1060
- "path",
1061
- {
1062
- stroke: "#A0B6C3",
1063
- strokeLinecap: "round",
1064
- strokeLinejoin: "round",
1065
- strokeWidth: 1.5,
1066
- d: "m4 6 4 4 4-4"
1067
- }
1068
- ) });
1069
- }
1070
-
1071
- // src/components/ui/Text.tsx
1072
- import { Slot as Slot5 } from "@radix-ui/react-slot";
1073
- import clsx5 from "clsx";
1074
- import { forwardRef as forwardRef5 } from "react";
1075
-
1076
- // src/components/ui/Text.css.ts
1077
- import { createRuntimeFn as _7a4683 } from "@vanilla-extract/recipes/createRuntimeFn";
1078
- var textVariants = _7a4683({ defaultClassName: "Text__aprhbd0", variantClassNames: { size: { sm: "Text_textVariants_size_sm__aprhbd1" }, weight: { normal: "Text_textVariants_weight_normal__aprhbd2", medium: "Text_textVariants_weight_medium__aprhbd3", bold: "Text_textVariants_weight_bold__aprhbd4" }, color: { body: "Text_textVariants_color_body__aprhbd5", muted: "Text_textVariants_color_muted__aprhbd6", danger: "Text_textVariants_color_danger__aprhbd7" }, mono: { true: "Text_textVariants_mono_true__aprhbd8" } }, defaultVariants: { size: "sm", weight: "normal" }, compoundVariants: [] });
1079
-
1080
- // src/components/ui/Text.tsx
1081
- import { jsx as jsx16 } from "react/jsx-runtime";
1082
- var Text = forwardRef5(
1083
- ({
1084
- children,
1085
- className,
1086
- asChild = false,
1087
- as: Tag = "div",
1088
- size,
1089
- weight,
1090
- color,
1091
- mono,
1092
- ...textProps
1093
- }, forwardedRef) => {
1094
- return /* @__PURE__ */ jsx16(
1095
- Slot5,
1096
- {
1097
- ...textProps,
1098
- ref: forwardedRef,
1099
- className: clsx5(textVariants({ size, weight, color, mono }), className),
1100
- children: asChild ? children : /* @__PURE__ */ jsx16(Tag, { children })
1101
- }
1102
- );
1103
- }
1104
- );
1105
- Text.displayName = "Text";
732
+ var menuContainer = "AccountDropdownMenu_menuContainer__1x0gmpf1";
733
+ var menuContent = "AccountDropdownMenu_menuContent__1x0gmpf2";
734
+ var menuItem = "AccountDropdownMenu_menuItem__1x0gmpf3";
735
+ var separator = "AccountDropdownMenu_separator__1x0gmpf5";
736
+ var switchAccountMenuItem = "AccountDropdownMenu_switchAccountMenuItem__1x0gmpf4";
737
+
738
+ // src/components/icons/CheckIcon.tsx
739
+ import { jsx as jsx16 } from "react/jsx-runtime";
740
+ function CheckIcon(props) {
741
+ return /* @__PURE__ */ jsx16("svg", { xmlns: "http://www.w3.org/2000/svg", width: 16, height: 16, fill: "none", ...props, children: /* @__PURE__ */ jsx16(
742
+ "path",
743
+ {
744
+ fill: "currentColor",
745
+ d: "m11.726 5.048-4.73 5.156-1.722-1.879a.72.72 0 0 0-.529-.23.722.722 0 0 0-.525.24.858.858 0 0 0-.22.573.86.86 0 0 0 .211.576l2.255 2.458c.14.153.332.24.53.24.2 0 .391-.087.532-.24l5.261-5.735A.86.86 0 0 0 13 5.63a.858.858 0 0 0-.22-.572.722.722 0 0 0-.525-.24.72.72 0 0 0-.529.23Z"
746
+ }
747
+ ) });
748
+ }
749
+
750
+ // src/components/icons/ChevronIcon.tsx
751
+ import { jsx as jsx17 } from "react/jsx-runtime";
752
+ function ChevronIcon(props) {
753
+ return /* @__PURE__ */ jsx17("svg", { xmlns: "http://www.w3.org/2000/svg", width: 16, height: 16, fill: "none", ...props, children: /* @__PURE__ */ jsx17(
754
+ "path",
755
+ {
756
+ stroke: "#A0B6C3",
757
+ strokeLinecap: "round",
758
+ strokeLinejoin: "round",
759
+ strokeWidth: 1.5,
760
+ d: "m4 6 4 4 4-4"
761
+ }
762
+ ) });
763
+ }
1106
764
 
1107
765
  // src/components/AccountDropdownMenu.tsx
1108
- import { jsx as jsx17, jsxs as jsxs6 } from "react/jsx-runtime";
1109
- function AccountDropdownMenu({ currentAccount }) {
766
+ import { jsx as jsx18, jsxs as jsxs8 } from "react/jsx-runtime";
767
+ function AccountDropdownMenu({ currentAccount, size = "lg" }) {
1110
768
  const { mutate: disconnectWallet } = useDisconnectWallet();
1111
769
  const accounts = useAccounts();
1112
- return /* @__PURE__ */ jsxs6(DropdownMenu.Root, { modal: false, children: [
1113
- /* @__PURE__ */ jsx17(StyleMarker, { children: /* @__PURE__ */ jsx17(DropdownMenu.Trigger, { asChild: true, children: /* @__PURE__ */ jsxs6(Button, { size: "md", className: connectedAccount, children: [
1114
- /* @__PURE__ */ jsx17(Text, { children: currentAccount.label ?? formatAddress(currentAccount.address) }),
1115
- /* @__PURE__ */ jsx17(ChevronIcon, { className: icon2 })
770
+ return /* @__PURE__ */ jsxs8(DropdownMenu.Root, { modal: false, children: [
771
+ /* @__PURE__ */ jsx18(StyleMarker, { children: /* @__PURE__ */ jsx18(DropdownMenu.Trigger, { asChild: true, children: /* @__PURE__ */ jsxs8(Button, { size, className: connectedAccount, children: [
772
+ /* @__PURE__ */ jsx18(Text, { mono: true, weight: "bold", children: currentAccount.label ?? formatAddress(currentAccount.address) }),
773
+ /* @__PURE__ */ jsx18(ChevronIcon, {})
1116
774
  ] }) }) }),
1117
- /* @__PURE__ */ jsx17(DropdownMenu.Portal, { children: /* @__PURE__ */ jsx17(StyleMarker, { className: menuContainer, children: /* @__PURE__ */ jsxs6(DropdownMenu.Content, { className: menuContent, children: [
1118
- accounts.map((account) => /* @__PURE__ */ jsx17(
775
+ /* @__PURE__ */ jsx18(DropdownMenu.Portal, { children: /* @__PURE__ */ jsx18(StyleMarker, { className: menuContainer, children: /* @__PURE__ */ jsxs8(DropdownMenu.Content, { className: menuContent, children: [
776
+ accounts.map((account) => /* @__PURE__ */ jsx18(
1119
777
  AccountDropdownMenuItem,
1120
778
  {
1121
779
  account,
@@ -1123,11 +781,11 @@ function AccountDropdownMenu({ currentAccount }) {
1123
781
  },
1124
782
  account.address
1125
783
  )),
1126
- /* @__PURE__ */ jsx17(DropdownMenu.Separator, { className: separator3 }),
1127
- /* @__PURE__ */ jsx17(
784
+ /* @__PURE__ */ jsx18(DropdownMenu.Separator, { className: separator }),
785
+ /* @__PURE__ */ jsx18(
1128
786
  DropdownMenu.Item,
1129
787
  {
1130
- className: clsx6(menuItem),
788
+ className: clsx7(menuItem),
1131
789
  onSelect: () => disconnectWallet(),
1132
790
  children: "Disconnect"
1133
791
  }
@@ -1140,35 +798,39 @@ function AccountDropdownMenuItem({
1140
798
  active
1141
799
  }) {
1142
800
  const { mutate: switchAccount } = useSwitchAccount();
1143
- return /* @__PURE__ */ jsxs6(
801
+ return /* @__PURE__ */ jsxs8(
1144
802
  DropdownMenu.Item,
1145
803
  {
1146
- className: clsx6(menuItem, switchAccountMenuItem),
804
+ className: clsx7(menuItem, switchAccountMenuItem),
1147
805
  onSelect: () => switchAccount({ account }),
1148
806
  children: [
1149
- /* @__PURE__ */ jsx17(Text, { children: account.label ?? formatAddress(account.address) }),
1150
- active ? /* @__PURE__ */ jsx17(CheckIcon, {}) : null
807
+ /* @__PURE__ */ jsx18(Text, { mono: true, children: account.label ?? formatAddress(account.address) }),
808
+ active ? /* @__PURE__ */ jsx18(CheckIcon, {}) : null
1151
809
  ]
1152
810
  }
1153
811
  );
1154
812
  }
1155
813
 
1156
814
  // src/components/ConnectButton.tsx
1157
- import { jsx as jsx18 } from "react/jsx-runtime";
1158
- function ConnectButton({ connectText = "Connect", ...buttonProps }) {
815
+ import { jsx as jsx19 } from "react/jsx-runtime";
816
+ function ConnectButton({
817
+ connectText = "Connect Wallet",
818
+ size,
819
+ ...buttonProps
820
+ }) {
1159
821
  const currentAccount = useCurrentAccount();
1160
- return currentAccount ? /* @__PURE__ */ jsx18(AccountDropdownMenu, { currentAccount }) : /* @__PURE__ */ jsx18(
822
+ return currentAccount ? /* @__PURE__ */ jsx19(AccountDropdownMenu, { currentAccount, size }) : /* @__PURE__ */ jsx19(
1161
823
  ConnectModal,
1162
824
  {
1163
- trigger: /* @__PURE__ */ jsx18(StyleMarker, { children: /* @__PURE__ */ jsx18(Button, { ...buttonProps, children: connectText }) })
825
+ trigger: /* @__PURE__ */ jsx19(StyleMarker, { children: /* @__PURE__ */ jsx19(Button, { ...buttonProps, size, children: connectText }) })
1164
826
  }
1165
827
  );
1166
828
  }
1167
829
 
1168
830
  // src/components/IotaClientProvider.tsx
1169
831
  import { getNetwork, isIotaClient, Network, IotaClient } from "@iota/iota-sdk/client";
1170
- import { createContext as createContext2, useMemo, useState as useState3 } from "react";
1171
- import { jsx as jsx19 } from "react/jsx-runtime";
832
+ import { createContext as createContext2, useMemo, useState as useState2 } from "react";
833
+ import { jsx as jsx20 } from "react/jsx-runtime";
1172
834
  var IotaClientContext = createContext2(null);
1173
835
  var DEFAULT_NETWORKS = {
1174
836
  localnet: { url: getNetwork(Network.Local).url }
@@ -1183,7 +845,7 @@ function IotaClientProvider(props) {
1183
845
  const { onNetworkChange, network, children } = props;
1184
846
  const networks = props.networks ?? DEFAULT_NETWORKS;
1185
847
  const createClient2 = props.createClient ?? DEFAULT_CREATE_CLIENT;
1186
- const [selectedNetwork, setSelectedNetwork] = useState3(
848
+ const [selectedNetwork, setSelectedNetwork] = useState2(
1187
849
  props.network ?? props.defaultNetwork ?? Object.keys(networks)[0]
1188
850
  );
1189
851
  const currentNetwork = props.network ?? selectedNetwork;
@@ -1207,15 +869,41 @@ function IotaClientProvider(props) {
1207
869
  }
1208
870
  };
1209
871
  }, [client, networks, selectedNetwork, currentNetwork, network, onNetworkChange]);
1210
- return /* @__PURE__ */ jsx19(IotaClientContext.Provider, { value: ctx, children });
872
+ return /* @__PURE__ */ jsx20(IotaClientContext.Provider, { value: ctx, children });
1211
873
  }
1212
874
 
1213
875
  // src/components/WalletProvider.tsx
1214
876
  import { useRef } from "react";
1215
877
 
878
+ // src/utils/stateStorage.ts
879
+ function createInMemoryStore() {
880
+ const store = /* @__PURE__ */ new Map();
881
+ return {
882
+ getItem(key) {
883
+ return store.get(key);
884
+ },
885
+ setItem(key, value) {
886
+ store.set(key, value);
887
+ },
888
+ removeItem(key) {
889
+ store.delete(key);
890
+ }
891
+ };
892
+ }
893
+
894
+ // src/constants/walletDefaults.ts
895
+ var IOTA_WALLET_NAME = "IOTA Wallet";
896
+ var DEFAULT_STORAGE = typeof window !== "undefined" && window.localStorage ? localStorage : createInMemoryStore();
897
+ var DEFAULT_STORAGE_KEY = "iota-dapp-kit:wallet-connection-info";
898
+ var SIGN_FEATURES = ["iota:signTransaction"];
899
+ var DEFAULT_WALLET_FILTER = (wallet) => SIGN_FEATURES.some((feature) => wallet.features[feature]);
900
+ var DEFAULT_PREFERRED_WALLETS = [IOTA_WALLET_NAME];
901
+ var WALLET_CHROME_EXTENSION_ID = "TODO";
902
+ var WALLET_DOWNLOAD_URL = "https://chromewebstore.google.com/detail/" + WALLET_CHROME_EXTENSION_ID;
903
+
1216
904
  // src/hooks/wallet/useAutoConnectWallet.ts
1217
905
  import { useQuery } from "@tanstack/react-query";
1218
- import { useLayoutEffect, useState as useState4 } from "react";
906
+ import { useLayoutEffect, useState as useState3 } from "react";
1219
907
  function useAutoConnectWallet() {
1220
908
  const { mutateAsync: connectWallet } = useConnectWallet();
1221
909
  const autoConnectEnabled = useWalletStore((state) => state.autoConnectEnabled);
@@ -1225,7 +913,7 @@ function useAutoConnectWallet() {
1225
913
  );
1226
914
  const wallets = useWallets();
1227
915
  const { isConnected } = useCurrentWallet();
1228
- const [clientOnly, setClientOnly] = useState4(false);
916
+ const [clientOnly, setClientOnly] = useState3(false);
1229
917
  useLayoutEffect(() => {
1230
918
  setClientOnly(true);
1231
919
  }, []);
@@ -1290,6 +978,8 @@ function useAutoConnectWallet() {
1290
978
 
1291
979
  // src/hooks/wallet/useUnsafeBurnerWallet.ts
1292
980
  import { Ed25519Keypair } from "@iota/iota-sdk/keypairs/ed25519";
981
+ import { Transaction } from "@iota/iota-sdk/transactions";
982
+ import { toB64 } from "@iota/iota-sdk/utils";
1293
983
  import { getWallets as getWallets2, ReadonlyWalletAccount, SUPPORTED_CHAINS } from "@iota/wallet-standard";
1294
984
  import { useEffect } from "react";
1295
985
 
@@ -1321,7 +1011,7 @@ function useUnsafeBurnerWallet(enabled) {
1321
1011
  }, [enabled, iotaClient]);
1322
1012
  }
1323
1013
  function registerUnsafeBurnerWallet(iotaClient) {
1324
- var _on, _connect, _signPersonalMessage, _signTransactionBlock, _signAndExecuteTransactionBlock;
1014
+ var _on, _connect, _signPersonalMessage, _signTransaction, _signAndExecuteTransaction;
1325
1015
  const walletsApi = getWallets2();
1326
1016
  const registeredWallets = walletsApi.get();
1327
1017
  if (registeredWallets.find((wallet) => wallet.name === WALLET_NAME)) {
@@ -1338,7 +1028,7 @@ function registerUnsafeBurnerWallet(iotaClient) {
1338
1028
  address: keypair.getPublicKey().toIotaAddress(),
1339
1029
  publicKey: keypair.getPublicKey().toIotaBytes(),
1340
1030
  chains: ["iota:unknown"],
1341
- features: ["iota:signAndExecuteTransactionBlock", "iota:signTransactionBlock"]
1031
+ features: ["iota:signTransaction", "iota:signAndExecuteTransaction"]
1342
1032
  });
1343
1033
  class UnsafeBurnerWallet {
1344
1034
  constructor() {
@@ -1353,23 +1043,40 @@ function registerUnsafeBurnerWallet(iotaClient) {
1353
1043
  const { bytes, signature } = await keypair.signPersonalMessage(messageInput.message);
1354
1044
  return { bytes, signature };
1355
1045
  });
1356
- __privateAdd(this, _signTransactionBlock, async (transactionInput) => {
1357
- const { bytes, signature } = await transactionInput.transactionBlock.sign({
1046
+ __privateAdd(this, _signTransaction, async (transactionInput) => {
1047
+ const { bytes, signature } = await Transaction.from(
1048
+ await transactionInput.transaction.toJSON()
1049
+ ).sign({
1358
1050
  client: iotaClient,
1359
1051
  signer: keypair
1360
1052
  });
1053
+ transactionInput.signal?.throwIfAborted();
1361
1054
  return {
1362
- transactionBlockBytes: bytes,
1055
+ bytes,
1363
1056
  signature
1364
1057
  };
1365
1058
  });
1366
- __privateAdd(this, _signAndExecuteTransactionBlock, async (transactionInput) => {
1367
- return await iotaClient.signAndExecuteTransactionBlock({
1368
- signer: keypair,
1369
- transactionBlock: transactionInput.transactionBlock,
1370
- options: transactionInput.options,
1371
- requestType: transactionInput.requestType
1059
+ __privateAdd(this, _signAndExecuteTransaction, async (transactionInput) => {
1060
+ const { bytes, signature } = await Transaction.from(
1061
+ await transactionInput.transaction.toJSON()
1062
+ ).sign({
1063
+ client: iotaClient,
1064
+ signer: keypair
1065
+ });
1066
+ transactionInput.signal?.throwIfAborted();
1067
+ const { rawEffects, digest } = await iotaClient.executeTransactionBlock({
1068
+ signature,
1069
+ transactionBlock: bytes,
1070
+ options: {
1071
+ showRawEffects: true
1072
+ }
1372
1073
  });
1074
+ return {
1075
+ bytes,
1076
+ signature,
1077
+ digest,
1078
+ effects: toB64(new Uint8Array(rawEffects))
1079
+ };
1373
1080
  });
1374
1081
  }
1375
1082
  get version() {
@@ -1381,7 +1088,7 @@ function registerUnsafeBurnerWallet(iotaClient) {
1381
1088
  get icon() {
1382
1089
  return "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADwAAAA8CAYAAAA6/NlyAAAJrElEQVR42tWbe2xT1x3H7UxAyD3XrdrSbGXlUbKWsq5rWdVuVOMRSEqSOmnVRZMmJqZNYv1nf3R/jWmVmVrtRRM/YwPd1nVTNcrE3pQCoikrIRAC4VVNY0hlD9ZOo1uCfe3ra9979v0dcy3s5Pper76Oh/STE+495/4+5/c85zqe2f7HAx5vKsS+monJj/CdHi/f4/HWW4f6AwdblmXjTM0NyS+movKtw9v+j6C5gKhyTMTTpA2x15Qwy+Pz75motOGdgKep8WF5ATgVZIt5NeO2wMqD0hfVGNPh3oYaYflsjG0l63PeyLCDnqbsLpZIhaRNFI+Ox+Le5KB0RybK8gDmJOkI07U4i/FhT1NDQl8Me5rUIfaDfELOJ0NsFa/SJQHm1WLsHcDqRWiy9BCL8s0N5t6UWWFVvxplejYm60hC91cNjPtzCTZsAptCVoeLP8PDDQJNCSodap6H+LtE8ZcdkvVkkD38vwDn4/Jvy4EhBhZSvRaUHiTXn31gJJxkUPoClBKKFizM+inhVA2cYIdM4HJouPvoe9s9H+KzDhyGK6KkmIqitBhww2C11rjQL2L4kgUwFxk8yPyzauUA3Pk/353XnA6zKbKCaQ2UlMvJF6W5uF5F8yHfZWZpC9HRmBziaEpm1bpY9XvhxuWJRldC7Mt03WlZwpjnkZUNa2DMG2EaPj9MGd2l2mofd0hQ7ZSopsXckHxVCUp32fXGdD0ZktrgFUmMqwhcWFjp87RArsD+9bn585IRaSHAKgBL3SZwOTRc8BKg7yYoskp5OJDiiPmF2Sj7ox0siYJ7lJA04EqvzZ9B1xSVt6PlW0IxZgUMJdZYAJuWngLQt9IRuZXmoTEkmci8ZtTXTViUKyasA9FRun5d8z6bfw0gYWm9mmCXxZatQgxfC7I2NVpRYQOxKWppLs4mcgn5NcibgL1K40xYp8CYY5TXEpjcb3LAJ0OZyyg3+2nySm6fjEtzkEz+7VBx3RTb+60z9dma7pkvwO2QQL5HzTtAdpKF7euw/HuzfrosBHy+ZsBimzbQshjWTVMDgez53B5MbjcGbr1ZjdUJOM5O0SLXzJ2R+uOA1dMAVoLsm5zb73JSId8t8Aa1LsAJdoTCrCaw6e3NC2DdFMUXWRg173mysJNOSUNskUJ1cOlXa2LhcbgmSszXYSn9hl3KSxTDjrZ2cbbfbWDyumsh9m3e7zCG7a3ETt+gtI7fx6lEOanZKDVvuA2cjYmt5xNOd2Louz3IQ12UZ2Zo3lkb9cDlvSs6m4Vk5Yqlabs0B97wT7PUuCXQz0Bnt9QxMPTW4iwBtmUlY8hFsHJPlzcQ1xuG75CVK1kXofCUGnU9fg1aVD7kfE9MoabtYkcAvIUYS2op3Hc3TTrDQzIAeojugTVLFolWDR6wFPtY0R66n6HltwjCIawnE2ymresk9NtN+pfUUi0mX6RJLfrh9zMRaRPOqubSA8W2MNzC0mHpK7j2ruuw5mYkxl5+2+HGQeg4yNYg7vNg+xMxFsuRMuiTsRJZG3cysAl4D9n4aC4un8L9qUyVvbCyYwFXX1nGUxFf1cCiEQqy75O+TpMwYKNKSPQUqhLyyWLsRbESLctx0YnixgfphRWA8pOPc+N4F9d+eV9V4OlCX/As5w5g+wtGhJGukp5go2R3D7EW9rSDcnGL56YgJHj+8GcFND/Vy41jj/H0jxc6HU/AA2QlR01UlH3D7CmITQnJq4lVWBi1yl8XYEh278c5H++F+Iui7r7bYR8tH/gbqoJN7fVODUhLYVVxzmYCEyOxFg7RUVa0egCHZZ55eRHnp/tKgMna6s/bbMdTxZgMzl9CCcmq7k690OzDfaeSN4QcsREjsQpgXHwyWyfg9K5WE7hc6JqTWjyihObfygOFOkv6i5K5TZx8LsL1sVS4NL8ItiB7sgAcEKcWHfUCVhK3kUVnBNbfXIs4l5xAv5sJs234eTUy93L0Au2otQOw5ORMyfQ6WwexFupVSHowG6uThXfebmlhWojMS3fazmMeGxEI6S2SUti6RAo2vKohVuH3qUG5FWm/PjH8kzutgSH5g58xrVwzIbZkxHf7OFjFC+wrMDXcpOqOKX/g01U/XPvVJyxdWsiJblqYmnZoWbDxAcR56X5WPuh4ewcL5PY9JBRUYjc7fzjG6Uc3mHBWbg23X1BLaFHOSnrw4bWiNAXSEWcWRntIignXTP/oDsfKZX66mMbZAPfhviU1AyYmJLYAMZa/QXjUSeIiixpj3UUFtd884KytjN7EjdGNNMbWwtlf3FvbQ4OQtIoYSzbxqVDLXMTxP8jnnbiyKcaJLvueGLD6kXW2sKZov1tpn7hwXf3ZUvq0K2FXOM7Op/Xgb6PhxsWIErYGVuK3WGXWkkwMMZVCVl5kWtax5A6usgemvnx4DelUcYcFC0eIbcbXKzggeyBjeXIhkftaKknJKLtnuSg7KmKQsrH+1nqbmLWY6w/tBGy/8xrruR5SM99LLIjfT/4ZbNZnQEPssIVb21rKTGRIPDagNoLdFMKgcuLc/TF6Bulk6c7ovg4TU+XvS6FNw1tDfVqH9MOPmBDui0hcK6wz744FlDjNe0m3aVldJYagtI6YbF+3ZGPsQHlN1vbeh8lJofqJ+uo9Zi4wXZxKFiXKGxbHT7pNq71oNg4Qi6MviE0FpRVqjGXILYoJ4tCjdYU1rWeMdPLc/ochj3B9pGNGL4NupGPRlUl35KMVxFLNO6ZnxYlBsUPqoMkbUqAb6VhMVKQ7MVT1dYdrL8hzEAcjpmvjHKphgaFb0ZVJZw7dwVD9q5fkgPTRbBxnzmGfgRLQsMCkG+moQdcp6GzzZsL2MGyllvBNGWM9RqMCk26kI7aBK526csVShZTfzid6FEzeiNAGP92jpCPQEbrW7EW5MbZxAz/fN9lg0IbQaaxrQ83/VoKPb/HqJx67Hw+43CDQBPsX0gm6ufXNvH4vP9rZapzx7+Nn+oxZAjfo2caZ3n350c5W6FSEdQ86sNarj3c/jRV+H42AXsdGRBfPPIlnb/mUtxzWXfALn/PmRze2Gud6E/xsXwYtnlsWN8Tc5/oyxjn/jvyJrlY82xLUfWuPr/TqxzuXQZkIP9M7CXiyuP4B4WmsTnNhzinjrD+WO9bRhmdZWLXe4EKRtV5tpN3Hx3s2G+d79/MJf4qff0LnE72kfFEs4ITQvWLMab8C131dP9n9Je1Yx000Nz2jAf+UJwCBchc3NvGR1Qx71XXY2Ww1Jvx7YalzAPkX9rp5E5Z+pv+ja8bE43uN491b9dHO9Xx4lUxziLn21Nai/wXWM6t9vkvtrwAAAABJRU5ErkJggg==";
1383
1090
  }
1384
- // Return the Iota chains that your wallet supports.
1091
+ // Return the IOTA chains that your wallet supports.
1385
1092
  get chains() {
1386
1093
  return SUPPORTED_CHAINS;
1387
1094
  }
@@ -1402,13 +1109,13 @@ function registerUnsafeBurnerWallet(iotaClient) {
1402
1109
  version: "1.0.0",
1403
1110
  signPersonalMessage: __privateGet(this, _signPersonalMessage)
1404
1111
  },
1405
- "iota:signTransactionBlock": {
1406
- version: "1.0.0",
1407
- signTransactionBlock: __privateGet(this, _signTransactionBlock)
1112
+ "iota:signTransaction": {
1113
+ version: "2.0.0",
1114
+ signTransaction: __privateGet(this, _signTransaction)
1408
1115
  },
1409
- "iota:signAndExecuteTransactionBlock": {
1410
- version: "1.0.0",
1411
- signAndExecuteTransactionBlock: __privateGet(this, _signAndExecuteTransactionBlock)
1116
+ "iota:signAndExecuteTransaction": {
1117
+ version: "2.0.0",
1118
+ signAndExecuteTransaction: __privateGet(this, _signAndExecuteTransaction)
1412
1119
  }
1413
1120
  };
1414
1121
  }
@@ -1416,8 +1123,8 @@ function registerUnsafeBurnerWallet(iotaClient) {
1416
1123
  _on = new WeakMap();
1417
1124
  _connect = new WeakMap();
1418
1125
  _signPersonalMessage = new WeakMap();
1419
- _signTransactionBlock = new WeakMap();
1420
- _signAndExecuteTransactionBlock = new WeakMap();
1126
+ _signTransaction = new WeakMap();
1127
+ _signAndExecuteTransaction = new WeakMap();
1421
1128
  return walletsApi.register(new UnsafeBurnerWallet());
1422
1129
  }
1423
1130
 
@@ -1442,17 +1149,18 @@ function useWalletPropertiesChanged() {
1442
1149
  // src/hooks/wallet/useWalletsChanged.ts
1443
1150
  import { getWallets as getWallets3 } from "@iota/wallet-standard";
1444
1151
  import { useEffect as useEffect3 } from "react";
1445
- function useWalletsChanged(preferredWallets, requiredFeatures) {
1152
+ function useWalletsChanged(preferredWallets, walletFilter) {
1446
1153
  const setWalletRegistered = useWalletStore((state) => state.setWalletRegistered);
1447
1154
  const setWalletUnregistered = useWalletStore((state) => state.setWalletUnregistered);
1448
1155
  useEffect3(() => {
1449
1156
  const walletsApi = getWallets3();
1157
+ setWalletRegistered(getRegisteredWallets(preferredWallets, walletFilter));
1450
1158
  const unsubscribeFromRegister = walletsApi.on("register", () => {
1451
- setWalletRegistered(getRegisteredWallets(preferredWallets, requiredFeatures));
1159
+ setWalletRegistered(getRegisteredWallets(preferredWallets, walletFilter));
1452
1160
  });
1453
1161
  const unsubscribeFromUnregister = walletsApi.on("unregister", (unregisteredWallet) => {
1454
1162
  setWalletUnregistered(
1455
- getRegisteredWallets(preferredWallets, requiredFeatures),
1163
+ getRegisteredWallets(preferredWallets, walletFilter),
1456
1164
  unregisteredWallet
1457
1165
  );
1458
1166
  });
@@ -1460,38 +1168,38 @@ function useWalletsChanged(preferredWallets, requiredFeatures) {
1460
1168
  unsubscribeFromRegister();
1461
1169
  unsubscribeFromUnregister();
1462
1170
  };
1463
- }, [preferredWallets, requiredFeatures, setWalletRegistered, setWalletUnregistered]);
1171
+ }, [preferredWallets, walletFilter, setWalletRegistered, setWalletUnregistered]);
1464
1172
  }
1465
1173
 
1466
1174
  // src/themes/lightTheme.ts
1467
1175
  var lightTheme = {
1468
1176
  blurs: {
1469
- modalOverlay: "blur(12px)"
1177
+ modalOverlay: "blur(0)"
1470
1178
  },
1471
1179
  backgroundColors: {
1472
- primaryButton: "#DDE4F0",
1473
- primaryButtonHover: "#002F6D14",
1474
- outlineButtonHover: "#002F6D14",
1475
- modalOverlay: "rgba(0, 47, 109, 0.72)",
1476
- modalPrimary: "#ffffff",
1477
- modalSecondary: "#e3eaf6",
1180
+ primaryButton: "#F6F7F9",
1181
+ primaryButtonHover: "#F0F2F5",
1182
+ outlineButtonHover: "#F4F4F5",
1183
+ modalOverlay: "rgba(24 36 53 / 20%)",
1184
+ modalPrimary: "white",
1185
+ modalSecondary: "#F7F8F8",
1478
1186
  iconButton: "transparent",
1479
1187
  dropdownMenu: "#FFFFFF",
1480
- dropdownMenuSeparator: "#002f6d14",
1481
- walletItemSelected: "#EFF4FA",
1482
- walletItemHover: "rgba(0, 103, 238, 0.12)",
1188
+ dropdownMenuSeparator: "#F3F6F8",
1189
+ walletItemSelected: "white",
1190
+ walletItemHover: "#3C424226",
1483
1191
  scrollThumb: "#cad4e2"
1484
1192
  },
1485
1193
  borderColors: {
1486
- outlineButton: "#6E7787"
1194
+ outlineButton: "#E4E4E7"
1487
1195
  },
1488
1196
  colors: {
1489
- primaryButton: "#171D26",
1490
- outlineButtonHover: "#E3EAF6",
1491
- iconButton: "#171D26",
1492
- body: "#171D26",
1493
- bodyMuted: "#545E6E",
1494
- bodyDanger: "#B51431"
1197
+ primaryButton: "#373737",
1198
+ outlineButtonHover: "#373737",
1199
+ iconButton: "#000000",
1200
+ body: "#182435",
1201
+ bodyMuted: "#767A81",
1202
+ bodyDanger: "#FF794B"
1495
1203
  },
1496
1204
  radii: {
1497
1205
  small: "6px",
@@ -1514,8 +1222,8 @@ var lightTheme = {
1514
1222
  typography: {
1515
1223
  fontFamily: 'ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"',
1516
1224
  fontStyle: "normal",
1517
- lineHeight: "24px",
1518
- letterSpacing: "0.1px"
1225
+ lineHeight: "1.3",
1226
+ letterSpacing: "1"
1519
1227
  },
1520
1228
  spacing: {
1521
1229
  xxsmall: "4px",
@@ -1547,19 +1255,21 @@ function createWalletStore({
1547
1255
  lastConnectedAccountAddress: null,
1548
1256
  lastConnectedWalletName: null,
1549
1257
  connectionStatus: "disconnected",
1550
- setConnectionStatus(connectionStatus) {
1258
+ supportedIntents: [],
1259
+ setConnectionStatus(connectionStatus2) {
1551
1260
  set(() => ({
1552
- connectionStatus
1261
+ connectionStatus: connectionStatus2
1553
1262
  }));
1554
1263
  },
1555
- setWalletConnected(wallet, connectedAccounts, selectedAccount) {
1264
+ setWalletConnected(wallet, connectedAccounts, selectedAccount, supportedIntents = []) {
1556
1265
  set(() => ({
1557
1266
  accounts: connectedAccounts,
1558
1267
  currentWallet: wallet,
1559
1268
  currentAccount: selectedAccount,
1560
1269
  lastConnectedWalletName: getWalletUniqueIdentifier(wallet),
1561
1270
  lastConnectedAccountAddress: selectedAccount?.address,
1562
- connectionStatus: "connected"
1271
+ connectionStatus: "connected",
1272
+ supportedIntents
1563
1273
  }));
1564
1274
  },
1565
1275
  setWalletDisconnected() {
@@ -1569,7 +1279,8 @@ function createWalletStore({
1569
1279
  currentAccount: null,
1570
1280
  lastConnectedWalletName: null,
1571
1281
  lastConnectedAccountAddress: null,
1572
- connectionStatus: "disconnected"
1282
+ connectionStatus: "disconnected",
1283
+ supportedIntents: []
1573
1284
  }));
1574
1285
  },
1575
1286
  setAccountSwitched(selectedAccount) {
@@ -1590,7 +1301,8 @@ function createWalletStore({
1590
1301
  currentAccount: null,
1591
1302
  lastConnectedWalletName: null,
1592
1303
  lastConnectedAccountAddress: null,
1593
- connectionStatus: "disconnected"
1304
+ connectionStatus: "disconnected",
1305
+ supportedIntents: []
1594
1306
  }));
1595
1307
  } else {
1596
1308
  set(() => ({ wallets: updatedWallets }));
@@ -1691,12 +1403,14 @@ var themeVars = createGlobalThemeContract(
1691
1403
  );
1692
1404
 
1693
1405
  // src/components/styling/InjectedThemeStyles.tsx
1694
- import { jsx as jsx20 } from "react/jsx-runtime";
1406
+ import { jsx as jsx21 } from "react/jsx-runtime";
1695
1407
  function InjectedThemeStyles({ theme }) {
1696
1408
  const themeStyles = Array.isArray(theme) ? getDynamicThemeStyles(theme) : getStaticThemeStyles(theme);
1697
- return /* @__PURE__ */ jsx20(
1409
+ return /* @__PURE__ */ jsx21(
1698
1410
  "style",
1699
1411
  {
1412
+ precedence: "default",
1413
+ href: "iota-dapp-kit-theme",
1700
1414
  dangerouslySetInnerHTML: {
1701
1415
  __html: themeStyles
1702
1416
  }
@@ -1717,107 +1431,34 @@ function cssStringFromTheme(theme) {
1717
1431
  return Object.entries(assignInlineVars(themeVars, theme)).map(([key, value]) => `${key}:${value};`).join("");
1718
1432
  }
1719
1433
 
1720
- // src/themes/darkTheme.ts
1721
- var darkTheme = {
1722
- blurs: {
1723
- modalOverlay: "blur(12px)"
1724
- },
1725
- backgroundColors: {
1726
- primaryButton: "#253041",
1727
- primaryButtonHover: "#313D50",
1728
- outlineButtonHover: "#313D50",
1729
- modalOverlay: "rgba(0, 47, 109, 0.72)",
1730
- modalPrimary: "#0f141c",
1731
- modalSecondary: "#171d26",
1732
- iconButton: "transparent",
1733
- dropdownMenu: "#0f141c",
1734
- dropdownMenuSeparator: "#bed8ff14",
1735
- walletItemSelected: "#171D26",
1736
- walletItemHover: "rgba(190, 216, 255, 0.12)",
1737
- scrollThumb: "#3c4656"
1738
- },
1739
- borderColors: {
1740
- outlineButton: "#8892A1"
1741
- },
1742
- colors: {
1743
- primaryButton: "#E3EAF6",
1744
- outlineButtonHover: "#171D26",
1745
- iconButton: "#E3EAF6",
1746
- body: "#E3EAF6",
1747
- bodyMuted: "#8892A1",
1748
- bodyDanger: "#FFB0BE"
1749
- },
1750
- radii: {
1751
- small: "6px",
1752
- medium: "8px",
1753
- large: "12px",
1754
- xlarge: "16px",
1755
- full: "120px"
1756
- },
1757
- fontWeights: {
1758
- normal: "400",
1759
- medium: "500",
1760
- bold: "600"
1761
- },
1762
- fontSizes: {
1763
- small: "14px",
1764
- medium: "16px",
1765
- large: "18px",
1766
- xlarge: "20px"
1767
- },
1768
- typography: {
1769
- fontFamily: 'ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"',
1770
- fontStyle: "normal",
1771
- lineHeight: "24px",
1772
- letterSpacing: "0.1px"
1773
- },
1774
- spacing: {
1775
- xxsmall: "4px",
1776
- xsmall: "8px",
1777
- small: "12px",
1778
- medium: "16px",
1779
- large: "24px",
1780
- xlarge: "32px"
1781
- }
1782
- };
1783
-
1784
1434
  // src/components/WalletProvider.tsx
1785
- import { jsx as jsx21, jsxs as jsxs7 } from "react/jsx-runtime";
1786
- var themeWithSelectorAndMediaQuery = [
1787
- {
1788
- selector: ".dark",
1789
- variables: darkTheme
1790
- },
1791
- {
1792
- variables: lightTheme
1793
- }
1794
- ];
1435
+ import { jsx as jsx22, jsxs as jsxs9 } from "react/jsx-runtime";
1795
1436
  function WalletProvider({
1796
1437
  preferredWallets = DEFAULT_PREFERRED_WALLETS,
1797
- requiredFeatures = DEFAULT_REQUIRED_FEATURES,
1438
+ walletFilter = DEFAULT_WALLET_FILTER,
1798
1439
  storage = DEFAULT_STORAGE,
1799
1440
  storageKey = DEFAULT_STORAGE_KEY,
1800
1441
  enableUnsafeBurner = false,
1801
1442
  autoConnect = false,
1802
- theme = themeWithSelectorAndMediaQuery,
1443
+ theme = lightTheme,
1803
1444
  children
1804
1445
  }) {
1805
1446
  const storeRef = useRef(
1806
1447
  createWalletStore({
1807
1448
  autoConnectEnabled: autoConnect,
1808
- wallets: getRegisteredWallets(preferredWallets, requiredFeatures),
1449
+ wallets: getRegisteredWallets(preferredWallets, walletFilter),
1809
1450
  storage: storage || createInMemoryStore(),
1810
1451
  storageKey
1811
1452
  })
1812
1453
  );
1813
- return /* @__PURE__ */ jsx21(WalletContext.Provider, { value: storeRef.current, children: /* @__PURE__ */ jsxs7(
1454
+ return /* @__PURE__ */ jsx22(WalletContext.Provider, { value: storeRef.current, children: /* @__PURE__ */ jsxs9(
1814
1455
  WalletConnectionManager,
1815
1456
  {
1816
1457
  preferredWallets,
1817
- requiredFeatures,
1458
+ walletFilter,
1818
1459
  enableUnsafeBurner,
1819
1460
  children: [
1820
- theme ? /* @__PURE__ */ jsx21(InjectedThemeStyles, { theme }) : null,
1461
+ theme ? /* @__PURE__ */ jsx22(InjectedThemeStyles, { theme }) : null,
1821
1462
  children
1822
1463
  ]
1823
1464
  }
@@ -1825,11 +1466,11 @@ function WalletProvider({
1825
1466
  }
1826
1467
  function WalletConnectionManager({
1827
1468
  preferredWallets = DEFAULT_PREFERRED_WALLETS,
1828
- requiredFeatures = DEFAULT_REQUIRED_FEATURES,
1469
+ walletFilter = DEFAULT_WALLET_FILTER,
1829
1470
  enableUnsafeBurner = false,
1830
1471
  children
1831
1472
  }) {
1832
- useWalletsChanged(preferredWallets, requiredFeatures);
1473
+ useWalletsChanged(preferredWallets, walletFilter);
1833
1474
  useWalletPropertiesChanged();
1834
1475
  useUnsafeBurnerWallet(enableUnsafeBurner);
1835
1476
  useAutoConnectWallet();
@@ -1903,7 +1544,9 @@ function useIotaClientQuery(...args) {
1903
1544
  ...options,
1904
1545
  queryKey: [iotaContext.network, method, params, ...queryKey],
1905
1546
  queryFn: async () => {
1906
- return await iotaContext.client[method](params);
1547
+ return await iotaContext.client[method](
1548
+ params
1549
+ );
1907
1550
  }
1908
1551
  });
1909
1552
  }
@@ -1930,146 +1573,276 @@ function useIotaClientQueries({
1930
1573
  });
1931
1574
  }
1932
1575
 
1933
- // src/hooks/wallet/useSignAndExecuteTransactionBlock.ts
1576
+ // src/hooks/wallet/useSignAndExecuteTransaction.ts
1577
+ import { toB64 as toB643 } from "@iota/iota-sdk/utils";
1578
+ import { signTransaction } from "@iota/wallet-standard";
1579
+ import { useMutation as useMutation6 } from "@tanstack/react-query";
1580
+
1581
+ // src/hooks/wallet/useReportTransactionEffects.ts
1582
+ import { toB64 as toB642 } from "@iota/iota-sdk/utils";
1934
1583
  import { useMutation as useMutation5 } from "@tanstack/react-query";
1935
- function useSignAndExecuteTransactionBlock({
1584
+ function useReportTransactionEffects({
1936
1585
  mutationKey,
1937
- executeFromWallet,
1938
1586
  ...mutationOptions
1939
1587
  } = {}) {
1940
1588
  const { currentWallet } = useCurrentWallet();
1941
1589
  const currentAccount = useCurrentAccount();
1942
- const client = useIotaClient();
1943
1590
  return useMutation5({
1944
- mutationKey: walletMutationKeys.signAndExecuteTransactionBlock(mutationKey),
1945
- mutationFn: async ({ requestType, options, ...signTransactionBlockArgs }) => {
1591
+ mutationKey: walletMutationKeys.reportTransactionEffects(mutationKey),
1592
+ mutationFn: async ({
1593
+ effects,
1594
+ chain = currentWallet?.chains[0],
1595
+ account = currentAccount
1596
+ }) => {
1946
1597
  if (!currentWallet) {
1947
1598
  throw new WalletNotConnectedError("No wallet is connected.");
1948
1599
  }
1949
- const signerAccount = signTransactionBlockArgs.account ?? currentAccount;
1950
- if (!signerAccount) {
1600
+ if (!account) {
1951
1601
  throw new WalletNoAccountSelectedError(
1952
- "No wallet account is selected to sign and execute the transaction block with."
1602
+ "No wallet account is selected to report transaction effects for"
1953
1603
  );
1954
1604
  }
1955
- if (executeFromWallet) {
1956
- const walletFeature2 = currentWallet.features["iota:signAndExecuteTransactionBlock"];
1957
- if (!walletFeature2) {
1958
- throw new WalletFeatureNotSupportedError(
1959
- "This wallet doesn't support the `signAndExecuteTransactionBlock` feature."
1960
- );
1961
- }
1962
- return walletFeature2.signAndExecuteTransactionBlock({
1963
- ...signTransactionBlockArgs,
1964
- account: signerAccount,
1965
- chain: signTransactionBlockArgs.chain ?? signerAccount.chains[0],
1966
- requestType,
1967
- options
1605
+ const reportTransactionEffectsFeature = currentWallet.features["iota:reportTransactionEffects"];
1606
+ if (reportTransactionEffectsFeature) {
1607
+ return await reportTransactionEffectsFeature.reportTransactionEffects({
1608
+ effects: Array.isArray(effects) ? toB642(new Uint8Array(effects)) : effects,
1609
+ account,
1610
+ chain: chain ?? currentWallet?.chains[0]
1968
1611
  });
1969
1612
  }
1970
- const walletFeature = currentWallet.features["iota:signTransactionBlock"];
1971
- if (!walletFeature) {
1613
+ },
1614
+ ...mutationOptions
1615
+ });
1616
+ }
1617
+
1618
+ // src/hooks/wallet/useSignAndExecuteTransaction.ts
1619
+ function useSignAndExecuteTransaction({
1620
+ mutationKey,
1621
+ execute,
1622
+ ...mutationOptions
1623
+ } = {}) {
1624
+ const { currentWallet, supportedIntents } = useCurrentWallet();
1625
+ const currentAccount = useCurrentAccount();
1626
+ const client = useIotaClient();
1627
+ const { mutate: reportTransactionEffects } = useReportTransactionEffects();
1628
+ const executeTransaction = execute ?? (async ({ bytes, signature }) => {
1629
+ const { digest, rawEffects } = await client.executeTransactionBlock({
1630
+ transactionBlock: bytes,
1631
+ signature,
1632
+ options: {
1633
+ showRawEffects: true
1634
+ }
1635
+ });
1636
+ return {
1637
+ digest,
1638
+ rawEffects,
1639
+ effects: toB643(new Uint8Array(rawEffects)),
1640
+ bytes,
1641
+ signature
1642
+ };
1643
+ });
1644
+ return useMutation6({
1645
+ mutationKey: walletMutationKeys.signAndExecuteTransaction(mutationKey),
1646
+ mutationFn: async ({ transaction, ...signTransactionArgs }) => {
1647
+ if (!currentWallet) {
1648
+ throw new WalletNotConnectedError("No wallet is connected.");
1649
+ }
1650
+ const signerAccount = signTransactionArgs.account ?? currentAccount;
1651
+ if (!signerAccount) {
1652
+ throw new WalletNoAccountSelectedError(
1653
+ "No wallet account is selected to sign the transaction with."
1654
+ );
1655
+ }
1656
+ const chain = signTransactionArgs.chain ?? signerAccount?.chains[0];
1657
+ if (!currentWallet.features["iota:signTransaction"]) {
1972
1658
  throw new WalletFeatureNotSupportedError(
1973
- "This wallet doesn't support the `signTransactionBlock` feature."
1659
+ "This wallet doesn't support the `signTransaction` feature."
1974
1660
  );
1975
1661
  }
1976
- const { signature, transactionBlockBytes } = await walletFeature.signTransactionBlock({
1977
- ...signTransactionBlockArgs,
1662
+ const { signature, bytes } = await signTransaction(currentWallet, {
1663
+ ...signTransactionArgs,
1664
+ transaction: {
1665
+ async toJSON() {
1666
+ return typeof transaction === "string" ? transaction : await transaction.toJSON({
1667
+ supportedIntents,
1668
+ client
1669
+ });
1670
+ }
1671
+ },
1978
1672
  account: signerAccount,
1979
- chain: signTransactionBlockArgs.chain ?? signerAccount.chains[0]
1980
- });
1981
- return client.executeTransactionBlock({
1982
- transactionBlock: transactionBlockBytes,
1983
- signature,
1984
- requestType,
1985
- options
1673
+ chain: signTransactionArgs.chain ?? signerAccount.chains[0]
1986
1674
  });
1675
+ const result = await executeTransaction({ bytes, signature });
1676
+ let effects;
1677
+ if ("effects" in result && result.effects?.bcs) {
1678
+ effects = result.effects.bcs;
1679
+ } else if ("rawEffects" in result) {
1680
+ effects = toB643(new Uint8Array(result.rawEffects));
1681
+ } else {
1682
+ throw new Error("Could not parse effects from transaction result.");
1683
+ }
1684
+ reportTransactionEffects({ effects, account: signerAccount, chain });
1685
+ return result;
1987
1686
  },
1988
1687
  ...mutationOptions
1989
1688
  });
1990
1689
  }
1991
1690
 
1992
1691
  // src/hooks/wallet/useSignPersonalMessage.ts
1993
- import { useMutation as useMutation6 } from "@tanstack/react-query";
1692
+ import { useMutation as useMutation7 } from "@tanstack/react-query";
1994
1693
  function useSignPersonalMessage({
1995
1694
  mutationKey,
1996
1695
  ...mutationOptions
1997
1696
  } = {}) {
1998
1697
  const { currentWallet } = useCurrentWallet();
1999
1698
  const currentAccount = useCurrentAccount();
2000
- return useMutation6({
1699
+ return useMutation7({
2001
1700
  mutationKey: walletMutationKeys.signPersonalMessage(mutationKey),
2002
1701
  mutationFn: async (signPersonalMessageArgs) => {
2003
1702
  if (!currentWallet) {
2004
1703
  throw new WalletNotConnectedError("No wallet is connected.");
2005
1704
  }
1705
+ const signPersonalMessageFeature = currentWallet.features["iota:signPersonalMessage"];
1706
+ if (!signPersonalMessageFeature) {
1707
+ throw new WalletFeatureNotSupportedError(
1708
+ "This wallet doesn't support the `signPersonalMessage` feature."
1709
+ );
1710
+ }
2006
1711
  const signerAccount = signPersonalMessageArgs.account ?? currentAccount;
2007
1712
  if (!signerAccount) {
2008
1713
  throw new WalletNoAccountSelectedError(
2009
1714
  "No wallet account is selected to sign the personal message with."
2010
1715
  );
2011
1716
  }
2012
- const signPersonalMessageFeature = currentWallet.features["iota:signPersonalMessage"];
2013
- if (signPersonalMessageFeature) {
2014
- return await signPersonalMessageFeature.signPersonalMessage({
2015
- ...signPersonalMessageArgs,
2016
- account: signerAccount
2017
- });
2018
- }
2019
- const signMessageFeature = currentWallet.features["iota:signMessage"];
2020
- if (signMessageFeature) {
2021
- console.warn(
2022
- "This wallet doesn't support the `signPersonalMessage` feature... falling back to `signMessage`."
2023
- );
2024
- const { messageBytes, signature } = await signMessageFeature.signMessage({
2025
- ...signPersonalMessageArgs,
2026
- account: signerAccount
2027
- });
2028
- return { bytes: messageBytes, signature };
2029
- }
2030
- throw new WalletFeatureNotSupportedError(
2031
- "This wallet doesn't support the `signPersonalMessage` feature."
2032
- );
1717
+ return await signPersonalMessageFeature.signPersonalMessage({
1718
+ ...signPersonalMessageArgs,
1719
+ account: signerAccount
1720
+ });
2033
1721
  },
2034
1722
  ...mutationOptions
2035
1723
  });
2036
1724
  }
2037
1725
 
2038
- // src/hooks/wallet/useSignTransactionBlock.ts
2039
- import { useMutation as useMutation7 } from "@tanstack/react-query";
2040
- function useSignTransactionBlock({
1726
+ // src/hooks/wallet/useSignTransaction.ts
1727
+ import { signTransaction as signTransaction2 } from "@iota/wallet-standard";
1728
+ import { useMutation as useMutation8 } from "@tanstack/react-query";
1729
+ function useSignTransaction({
2041
1730
  mutationKey,
2042
1731
  ...mutationOptions
2043
1732
  } = {}) {
2044
1733
  const { currentWallet } = useCurrentWallet();
2045
1734
  const currentAccount = useCurrentAccount();
2046
- return useMutation7({
2047
- mutationKey: walletMutationKeys.signTransactionBlock(mutationKey),
2048
- mutationFn: async (signTransactionBlockArgs) => {
1735
+ const client = useIotaClient();
1736
+ const { mutate: reportTransactionEffects } = useReportTransactionEffects();
1737
+ return useMutation8({
1738
+ mutationKey: walletMutationKeys.signTransaction(mutationKey),
1739
+ mutationFn: async ({ transaction, ...signTransactionArgs }) => {
2049
1740
  if (!currentWallet) {
2050
1741
  throw new WalletNotConnectedError("No wallet is connected.");
2051
1742
  }
2052
- const signerAccount = signTransactionBlockArgs.account ?? currentAccount;
1743
+ const signerAccount = signTransactionArgs.account ?? currentAccount;
2053
1744
  if (!signerAccount) {
2054
1745
  throw new WalletNoAccountSelectedError(
2055
- "No wallet account is selected to sign the transaction block with."
1746
+ "No wallet account is selected to sign the transaction with."
2056
1747
  );
2057
1748
  }
2058
- const walletFeature = currentWallet.features["iota:signTransactionBlock"];
2059
- if (!walletFeature) {
1749
+ if (!currentWallet.features["iota:signTransaction"]) {
2060
1750
  throw new WalletFeatureNotSupportedError(
2061
- "This wallet doesn't support the `SignTransactionBlock` feature."
1751
+ "This wallet doesn't support the `signTransaction` feature."
2062
1752
  );
2063
1753
  }
2064
- return await walletFeature.signTransactionBlock({
2065
- ...signTransactionBlockArgs,
1754
+ const { bytes, signature } = await signTransaction2(currentWallet, {
1755
+ ...signTransactionArgs,
1756
+ transaction: {
1757
+ toJSON: async () => {
1758
+ return typeof transaction === "string" ? transaction : await transaction.toJSON({
1759
+ supportedIntents: [],
1760
+ client
1761
+ });
1762
+ }
1763
+ },
2066
1764
  account: signerAccount,
2067
- chain: signTransactionBlockArgs.chain ?? signerAccount.chains[0]
1765
+ chain: signTransactionArgs.chain ?? signerAccount.chains[0]
2068
1766
  });
1767
+ return {
1768
+ bytes,
1769
+ signature,
1770
+ reportTransactionEffects: (effects) => {
1771
+ reportTransactionEffects({
1772
+ effects,
1773
+ account: signerAccount,
1774
+ chain: signTransactionArgs.chain ?? signerAccount.chains[0]
1775
+ });
1776
+ }
1777
+ };
2069
1778
  },
2070
1779
  ...mutationOptions
2071
1780
  });
2072
1781
  }
1782
+
1783
+ // src/themes/darkTheme.ts
1784
+ var darkTheme = {
1785
+ blurs: {
1786
+ modalOverlay: "blur(12px)"
1787
+ },
1788
+ backgroundColors: {
1789
+ primaryButton: "#253041",
1790
+ primaryButtonHover: "#313D50",
1791
+ outlineButtonHover: "#313D50",
1792
+ modalOverlay: "rgba(0, 47, 109, 0.72)",
1793
+ modalPrimary: "#0f141c",
1794
+ modalSecondary: "#171d26",
1795
+ iconButton: "transparent",
1796
+ dropdownMenu: "#0f141c",
1797
+ dropdownMenuSeparator: "#bed8ff14",
1798
+ walletItemSelected: "#171D26",
1799
+ walletItemHover: "rgba(190, 216, 255, 0.12)",
1800
+ scrollThumb: "#3c4656"
1801
+ },
1802
+ borderColors: {
1803
+ outlineButton: "#8892A1"
1804
+ },
1805
+ colors: {
1806
+ primaryButton: "#E3EAF6",
1807
+ outlineButtonHover: "#171D26",
1808
+ iconButton: "#E3EAF6",
1809
+ body: "#E3EAF6",
1810
+ bodyMuted: "#8892A1",
1811
+ bodyDanger: "#FFB0BE"
1812
+ },
1813
+ radii: {
1814
+ small: "6px",
1815
+ medium: "8px",
1816
+ large: "12px",
1817
+ xlarge: "16px",
1818
+ full: "120px"
1819
+ },
1820
+ fontWeights: {
1821
+ normal: "400",
1822
+ medium: "500",
1823
+ bold: "600"
1824
+ },
1825
+ fontSizes: {
1826
+ small: "14px",
1827
+ medium: "16px",
1828
+ large: "18px",
1829
+ xlarge: "20px"
1830
+ },
1831
+ typography: {
1832
+ fontFamily: 'ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"',
1833
+ fontStyle: "normal",
1834
+ lineHeight: "24px",
1835
+ letterSpacing: "0.1px"
1836
+ },
1837
+ spacing: {
1838
+ xxsmall: "4px",
1839
+ xsmall: "8px",
1840
+ small: "12px",
1841
+ medium: "16px",
1842
+ large: "24px",
1843
+ xlarge: "32px"
1844
+ }
1845
+ };
2073
1846
  export {
2074
1847
  ConnectButton,
2075
1848
  ConnectModal,
@@ -2091,9 +1864,10 @@ export {
2091
1864
  useIotaClientMutation,
2092
1865
  useIotaClientQueries,
2093
1866
  useIotaClientQuery,
2094
- useSignAndExecuteTransactionBlock,
1867
+ useReportTransactionEffects,
1868
+ useSignAndExecuteTransaction,
2095
1869
  useSignPersonalMessage,
2096
- useSignTransactionBlock,
1870
+ useSignTransaction,
2097
1871
  useSwitchAccount,
2098
1872
  useWallets
2099
1873
  };