thirdweb 5.47.1-nightly-574ff0295dcbb39f2ddd753c9e8a264498aae99e-20240819000344 → 5.48.0-nightly-cbd6fd87d0120c6013ef354fe8ff22293e4c08e2-20240820000346

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 (260) hide show
  1. package/dist/cjs/exports/utils.js +7 -1
  2. package/dist/cjs/exports/utils.js.map +1 -1
  3. package/dist/cjs/extensions/erc721/read/getOwnedNFTs.js +1 -0
  4. package/dist/cjs/extensions/erc721/read/getOwnedNFTs.js.map +1 -1
  5. package/dist/cjs/react/core/hooks/transaction/transaction-button-utils.js.map +1 -1
  6. package/dist/cjs/react/core/hooks/transaction/useSendTransaction.js +10 -1
  7. package/dist/cjs/react/core/hooks/transaction/useSendTransaction.js.map +1 -1
  8. package/dist/cjs/react/core/hooks/wallets/useAddConnectedWallet.js +23 -0
  9. package/dist/cjs/react/core/hooks/wallets/useAddConnectedWallet.js.map +1 -0
  10. package/dist/cjs/react/native/ui/connect/ConnectModal.js +1 -0
  11. package/dist/cjs/react/native/ui/connect/ConnectModal.js.map +1 -1
  12. package/dist/cjs/react/native/ui/transaction/TransactionButton.js +1 -1
  13. package/dist/cjs/react/web/ui/ConnectWallet/Blobbie.js +23 -37
  14. package/dist/cjs/react/web/ui/ConnectWallet/Blobbie.js.map +1 -1
  15. package/dist/cjs/react/web/ui/ConnectWallet/Details.js +2 -2
  16. package/dist/cjs/react/web/ui/ConnectWallet/Details.js.map +1 -1
  17. package/dist/cjs/react/web/ui/ConnectWallet/Modal/AllWalletsUI.js +3 -1
  18. package/dist/cjs/react/web/ui/ConnectWallet/Modal/AllWalletsUI.js.map +1 -1
  19. package/dist/cjs/react/web/ui/ConnectWallet/Modal/AnyWalletConnectUI.js +1 -1
  20. package/dist/cjs/react/web/ui/ConnectWallet/Modal/AnyWalletConnectUI.js.map +1 -1
  21. package/dist/cjs/react/web/ui/ConnectWallet/WalletSelector.js +8 -6
  22. package/dist/cjs/react/web/ui/ConnectWallet/WalletSelector.js.map +1 -1
  23. package/dist/cjs/react/web/ui/ConnectWallet/locale/en.js +1 -1
  24. package/dist/cjs/react/web/ui/ConnectWallet/screens/Details/WalletManagerScreen.js +2 -2
  25. package/dist/cjs/react/web/ui/ConnectWallet/screens/Details/WalletManagerScreen.js.map +1 -1
  26. package/dist/cjs/react/web/ui/ConnectWallet/screens/LinkProfileScreen.js +1 -1
  27. package/dist/cjs/react/web/ui/ConnectWallet/screens/LinkProfileScreen.js.map +1 -1
  28. package/dist/cjs/react/web/ui/TransactionButton/index.js +1 -1
  29. package/dist/cjs/react/web/wallets/in-app/InAppWalletConnectUI.js +4 -0
  30. package/dist/cjs/react/web/wallets/in-app/InAppWalletConnectUI.js.map +1 -1
  31. package/dist/cjs/react/web/wallets/in-app/WalletAuth.js +70 -0
  32. package/dist/cjs/react/web/wallets/in-app/WalletAuth.js.map +1 -0
  33. package/dist/cjs/react/web/wallets/shared/ConnectWalletSocialOptions.js +9 -1
  34. package/dist/cjs/react/web/wallets/shared/ConnectWalletSocialOptions.js.map +1 -1
  35. package/dist/cjs/react/web/wallets/shared/ErrorState.js +14 -0
  36. package/dist/cjs/react/web/wallets/shared/ErrorState.js.map +1 -0
  37. package/dist/cjs/react/web/wallets/shared/LoadingState.js +19 -0
  38. package/dist/cjs/react/web/wallets/shared/LoadingState.js.map +1 -0
  39. package/dist/cjs/react/web/wallets/shared/PassKeyLogin.js +6 -20
  40. package/dist/cjs/react/web/wallets/shared/PassKeyLogin.js.map +1 -1
  41. package/dist/cjs/react/web/wallets/shared/locale/de.js +1 -0
  42. package/dist/cjs/react/web/wallets/shared/locale/de.js.map +1 -1
  43. package/dist/cjs/react/web/wallets/shared/locale/en.js +2 -1
  44. package/dist/cjs/react/web/wallets/shared/locale/en.js.map +1 -1
  45. package/dist/cjs/react/web/wallets/shared/locale/es.js +1 -0
  46. package/dist/cjs/react/web/wallets/shared/locale/es.js.map +1 -1
  47. package/dist/cjs/react/web/wallets/shared/locale/fr.js +1 -0
  48. package/dist/cjs/react/web/wallets/shared/locale/fr.js.map +1 -1
  49. package/dist/cjs/react/web/wallets/shared/locale/ja.js +1 -0
  50. package/dist/cjs/react/web/wallets/shared/locale/ja.js.map +1 -1
  51. package/dist/cjs/react/web/wallets/shared/locale/kr.js +1 -0
  52. package/dist/cjs/react/web/wallets/shared/locale/kr.js.map +1 -1
  53. package/dist/cjs/react/web/wallets/shared/locale/tl.js +1 -0
  54. package/dist/cjs/react/web/wallets/shared/locale/tl.js.map +1 -1
  55. package/dist/cjs/react/web/wallets/shared/locale/vi.js +1 -0
  56. package/dist/cjs/react/web/wallets/shared/locale/vi.js.map +1 -1
  57. package/dist/cjs/transaction/actions/gasless/providers/biconomy.js.map +1 -1
  58. package/dist/cjs/transaction/actions/gasless/providers/engine.js.map +1 -1
  59. package/dist/cjs/transaction/actions/gasless/providers/openzeppelin.js.map +1 -1
  60. package/dist/cjs/transaction/prepare-contract-call.js +1 -1
  61. package/dist/cjs/transaction/read-contract.js +21 -2
  62. package/dist/cjs/transaction/read-contract.js.map +1 -1
  63. package/dist/cjs/utils/bigint.js +2 -0
  64. package/dist/cjs/utils/bigint.js.map +1 -1
  65. package/dist/cjs/version.js +1 -1
  66. package/dist/cjs/wallets/in-app/core/authentication/getLoginPath.js +1 -1
  67. package/dist/cjs/wallets/in-app/core/authentication/getLoginPath.js.map +1 -1
  68. package/dist/cjs/wallets/manager/index.js +0 -1
  69. package/dist/cjs/wallets/manager/index.js.map +1 -1
  70. package/dist/cjs/wallets/types.js +0 -1
  71. package/dist/cjs/wallets/types.js.map +1 -1
  72. package/dist/esm/exports/utils.js +4 -0
  73. package/dist/esm/exports/utils.js.map +1 -1
  74. package/dist/esm/extensions/erc721/read/getOwnedNFTs.js +1 -0
  75. package/dist/esm/extensions/erc721/read/getOwnedNFTs.js.map +1 -1
  76. package/dist/esm/react/core/hooks/transaction/transaction-button-utils.js.map +1 -1
  77. package/dist/esm/react/core/hooks/transaction/useSendTransaction.js +10 -1
  78. package/dist/esm/react/core/hooks/transaction/useSendTransaction.js.map +1 -1
  79. package/dist/esm/react/core/hooks/wallets/useAddConnectedWallet.js +20 -0
  80. package/dist/esm/react/core/hooks/wallets/useAddConnectedWallet.js.map +1 -0
  81. package/dist/esm/react/native/ui/connect/ConnectModal.js +1 -1
  82. package/dist/esm/react/native/ui/connect/ConnectModal.js.map +1 -1
  83. package/dist/esm/react/native/ui/transaction/TransactionButton.js +1 -1
  84. package/dist/esm/react/web/ui/ConnectWallet/Blobbie.js +24 -38
  85. package/dist/esm/react/web/ui/ConnectWallet/Blobbie.js.map +1 -1
  86. package/dist/esm/react/web/ui/ConnectWallet/Details.js +2 -2
  87. package/dist/esm/react/web/ui/ConnectWallet/Details.js.map +1 -1
  88. package/dist/esm/react/web/ui/ConnectWallet/Modal/AllWalletsUI.js +3 -1
  89. package/dist/esm/react/web/ui/ConnectWallet/Modal/AllWalletsUI.js.map +1 -1
  90. package/dist/esm/react/web/ui/ConnectWallet/Modal/AnyWalletConnectUI.js +1 -1
  91. package/dist/esm/react/web/ui/ConnectWallet/Modal/AnyWalletConnectUI.js.map +1 -1
  92. package/dist/esm/react/web/ui/ConnectWallet/WalletSelector.js +8 -6
  93. package/dist/esm/react/web/ui/ConnectWallet/WalletSelector.js.map +1 -1
  94. package/dist/esm/react/web/ui/ConnectWallet/locale/en.js +1 -1
  95. package/dist/esm/react/web/ui/ConnectWallet/screens/Details/WalletManagerScreen.js +3 -3
  96. package/dist/esm/react/web/ui/ConnectWallet/screens/Details/WalletManagerScreen.js.map +1 -1
  97. package/dist/esm/react/web/ui/ConnectWallet/screens/LinkProfileScreen.js +1 -1
  98. package/dist/esm/react/web/ui/ConnectWallet/screens/LinkProfileScreen.js.map +1 -1
  99. package/dist/esm/react/web/ui/TransactionButton/index.js +1 -1
  100. package/dist/esm/react/web/wallets/in-app/InAppWalletConnectUI.js +4 -0
  101. package/dist/esm/react/web/wallets/in-app/InAppWalletConnectUI.js.map +1 -1
  102. package/dist/esm/react/web/wallets/in-app/WalletAuth.js +67 -0
  103. package/dist/esm/react/web/wallets/in-app/WalletAuth.js.map +1 -0
  104. package/dist/esm/react/web/wallets/shared/ConnectWalletSocialOptions.js +10 -2
  105. package/dist/esm/react/web/wallets/shared/ConnectWalletSocialOptions.js.map +1 -1
  106. package/dist/esm/react/web/wallets/shared/ErrorState.js +11 -0
  107. package/dist/esm/react/web/wallets/shared/ErrorState.js.map +1 -0
  108. package/dist/esm/react/web/wallets/shared/LoadingState.js +16 -0
  109. package/dist/esm/react/web/wallets/shared/LoadingState.js.map +1 -0
  110. package/dist/esm/react/web/wallets/shared/PassKeyLogin.js +4 -18
  111. package/dist/esm/react/web/wallets/shared/PassKeyLogin.js.map +1 -1
  112. package/dist/esm/react/web/wallets/shared/locale/de.js +1 -0
  113. package/dist/esm/react/web/wallets/shared/locale/de.js.map +1 -1
  114. package/dist/esm/react/web/wallets/shared/locale/en.js +2 -1
  115. package/dist/esm/react/web/wallets/shared/locale/en.js.map +1 -1
  116. package/dist/esm/react/web/wallets/shared/locale/es.js +1 -0
  117. package/dist/esm/react/web/wallets/shared/locale/es.js.map +1 -1
  118. package/dist/esm/react/web/wallets/shared/locale/fr.js +1 -0
  119. package/dist/esm/react/web/wallets/shared/locale/fr.js.map +1 -1
  120. package/dist/esm/react/web/wallets/shared/locale/ja.js +1 -0
  121. package/dist/esm/react/web/wallets/shared/locale/ja.js.map +1 -1
  122. package/dist/esm/react/web/wallets/shared/locale/kr.js +1 -0
  123. package/dist/esm/react/web/wallets/shared/locale/kr.js.map +1 -1
  124. package/dist/esm/react/web/wallets/shared/locale/tl.js +1 -0
  125. package/dist/esm/react/web/wallets/shared/locale/tl.js.map +1 -1
  126. package/dist/esm/react/web/wallets/shared/locale/vi.js +1 -0
  127. package/dist/esm/react/web/wallets/shared/locale/vi.js.map +1 -1
  128. package/dist/esm/transaction/actions/gasless/providers/biconomy.js.map +1 -1
  129. package/dist/esm/transaction/actions/gasless/providers/engine.js.map +1 -1
  130. package/dist/esm/transaction/actions/gasless/providers/openzeppelin.js.map +1 -1
  131. package/dist/esm/transaction/prepare-contract-call.js +1 -1
  132. package/dist/esm/transaction/read-contract.js +21 -2
  133. package/dist/esm/transaction/read-contract.js.map +1 -1
  134. package/dist/esm/utils/bigint.js +2 -0
  135. package/dist/esm/utils/bigint.js.map +1 -1
  136. package/dist/esm/version.js +1 -1
  137. package/dist/esm/wallets/in-app/core/authentication/getLoginPath.js +1 -1
  138. package/dist/esm/wallets/in-app/core/authentication/getLoginPath.js.map +1 -1
  139. package/dist/esm/wallets/manager/index.js +0 -1
  140. package/dist/esm/wallets/manager/index.js.map +1 -1
  141. package/dist/esm/wallets/types.js +0 -1
  142. package/dist/esm/wallets/types.js.map +1 -1
  143. package/dist/types/exports/transaction.d.ts +7 -0
  144. package/dist/types/exports/transaction.d.ts.map +1 -1
  145. package/dist/types/exports/utils.d.ts +1 -0
  146. package/dist/types/exports/utils.d.ts.map +1 -1
  147. package/dist/types/extensions/erc721/read/getOwnedNFTs.d.ts +1 -0
  148. package/dist/types/extensions/erc721/read/getOwnedNFTs.d.ts.map +1 -1
  149. package/dist/types/react/core/hooks/transaction/transaction-button-utils.d.ts +1 -0
  150. package/dist/types/react/core/hooks/transaction/transaction-button-utils.d.ts.map +1 -1
  151. package/dist/types/react/core/hooks/transaction/useSendTransaction.d.ts.map +1 -1
  152. package/dist/types/react/core/hooks/wallets/useAddConnectedWallet.d.ts +16 -0
  153. package/dist/types/react/core/hooks/wallets/useAddConnectedWallet.d.ts.map +1 -0
  154. package/dist/types/react/native/ui/connect/ConnectModal.d.ts +3 -0
  155. package/dist/types/react/native/ui/connect/ConnectModal.d.ts.map +1 -1
  156. package/dist/types/react/native/ui/transaction/TransactionButton.d.ts +1 -1
  157. package/dist/types/react/web/ui/ConnectWallet/Blobbie.d.ts +1 -1
  158. package/dist/types/react/web/ui/ConnectWallet/Blobbie.d.ts.map +1 -1
  159. package/dist/types/react/web/ui/ConnectWallet/Details.d.ts.map +1 -1
  160. package/dist/types/react/web/ui/ConnectWallet/Modal/AllWalletsUI.d.ts +1 -0
  161. package/dist/types/react/web/ui/ConnectWallet/Modal/AllWalletsUI.d.ts.map +1 -1
  162. package/dist/types/react/web/ui/ConnectWallet/Modal/AnyWalletConnectUI.d.ts.map +1 -1
  163. package/dist/types/react/web/ui/ConnectWallet/WalletSelector.d.ts +1 -0
  164. package/dist/types/react/web/ui/ConnectWallet/WalletSelector.d.ts.map +1 -1
  165. package/dist/types/react/web/ui/ConnectWallet/screens/LinkProfileScreen.d.ts +3 -0
  166. package/dist/types/react/web/ui/ConnectWallet/screens/LinkProfileScreen.d.ts.map +1 -1
  167. package/dist/types/react/web/ui/TransactionButton/index.d.ts +1 -1
  168. package/dist/types/react/web/wallets/in-app/InAppWalletConnectUI.d.ts +3 -0
  169. package/dist/types/react/web/wallets/in-app/InAppWalletConnectUI.d.ts.map +1 -1
  170. package/dist/types/react/web/wallets/in-app/WalletAuth.d.ts +24 -0
  171. package/dist/types/react/web/wallets/in-app/WalletAuth.d.ts.map +1 -0
  172. package/dist/types/react/web/wallets/shared/ConnectWalletSocialOptions.d.ts +1 -0
  173. package/dist/types/react/web/wallets/shared/ConnectWalletSocialOptions.d.ts.map +1 -1
  174. package/dist/types/react/web/wallets/shared/ErrorState.d.ts +5 -0
  175. package/dist/types/react/web/wallets/shared/ErrorState.d.ts.map +1 -0
  176. package/dist/types/react/web/wallets/shared/LoadingState.d.ts +7 -0
  177. package/dist/types/react/web/wallets/shared/LoadingState.d.ts.map +1 -0
  178. package/dist/types/react/web/wallets/shared/PassKeyLogin.d.ts.map +1 -1
  179. package/dist/types/react/web/wallets/shared/locale/de.d.ts +1 -0
  180. package/dist/types/react/web/wallets/shared/locale/de.d.ts.map +1 -1
  181. package/dist/types/react/web/wallets/shared/locale/en.d.ts +1 -0
  182. package/dist/types/react/web/wallets/shared/locale/en.d.ts.map +1 -1
  183. package/dist/types/react/web/wallets/shared/locale/es.d.ts +1 -0
  184. package/dist/types/react/web/wallets/shared/locale/es.d.ts.map +1 -1
  185. package/dist/types/react/web/wallets/shared/locale/fr.d.ts +1 -0
  186. package/dist/types/react/web/wallets/shared/locale/fr.d.ts.map +1 -1
  187. package/dist/types/react/web/wallets/shared/locale/ja.d.ts +1 -0
  188. package/dist/types/react/web/wallets/shared/locale/ja.d.ts.map +1 -1
  189. package/dist/types/react/web/wallets/shared/locale/kr.d.ts +1 -0
  190. package/dist/types/react/web/wallets/shared/locale/kr.d.ts.map +1 -1
  191. package/dist/types/react/web/wallets/shared/locale/tl.d.ts +1 -0
  192. package/dist/types/react/web/wallets/shared/locale/tl.d.ts.map +1 -1
  193. package/dist/types/react/web/wallets/shared/locale/types.d.ts +1 -0
  194. package/dist/types/react/web/wallets/shared/locale/types.d.ts.map +1 -1
  195. package/dist/types/react/web/wallets/shared/locale/vi.d.ts +1 -0
  196. package/dist/types/react/web/wallets/shared/locale/vi.d.ts.map +1 -1
  197. package/dist/types/transaction/actions/gasless/providers/biconomy.d.ts +3 -0
  198. package/dist/types/transaction/actions/gasless/providers/biconomy.d.ts.map +1 -1
  199. package/dist/types/transaction/actions/gasless/providers/engine.d.ts +3 -0
  200. package/dist/types/transaction/actions/gasless/providers/engine.d.ts.map +1 -1
  201. package/dist/types/transaction/actions/gasless/providers/openzeppelin.d.ts +3 -0
  202. package/dist/types/transaction/actions/gasless/providers/openzeppelin.d.ts.map +1 -1
  203. package/dist/types/transaction/actions/gasless/types.d.ts +12 -0
  204. package/dist/types/transaction/actions/gasless/types.d.ts.map +1 -1
  205. package/dist/types/transaction/prepare-contract-call.d.ts +1 -1
  206. package/dist/types/transaction/read-contract.d.ts +21 -2
  207. package/dist/types/transaction/read-contract.d.ts.map +1 -1
  208. package/dist/types/utils/bigint.d.ts +2 -0
  209. package/dist/types/utils/bigint.d.ts.map +1 -1
  210. package/dist/types/version.d.ts +1 -1
  211. package/dist/types/wallets/in-app/core/authentication/getLoginPath.d.ts +2 -2
  212. package/dist/types/wallets/in-app/core/authentication/getLoginPath.d.ts.map +1 -1
  213. package/dist/types/wallets/manager/index.d.ts.map +1 -1
  214. package/dist/types/wallets/types.d.ts +1 -1
  215. package/dist/types/wallets/types.d.ts.map +1 -1
  216. package/package.json +1 -1
  217. package/src/exports/transaction.ts +8 -0
  218. package/src/exports/utils.ts +5 -0
  219. package/src/extensions/erc721/read/getOwnedNFTs.ts +1 -0
  220. package/src/extensions/lens/read/resolveAddress.test.ts +1 -1
  221. package/src/react/core/hooks/transaction/transaction-button-utils.ts +1 -0
  222. package/src/react/core/hooks/transaction/useSendTransaction.ts +13 -1
  223. package/src/react/core/hooks/wallets/useAddConnectedWallet.ts +20 -0
  224. package/src/react/native/ui/connect/ConnectModal.tsx +1 -1
  225. package/src/react/native/ui/transaction/TransactionButton.tsx +1 -1
  226. package/src/react/web/ui/ConnectWallet/Blobbie.tsx +33 -117
  227. package/src/react/web/ui/ConnectWallet/Details.tsx +2 -1
  228. package/src/react/web/ui/ConnectWallet/Modal/AllWalletsUI.tsx +4 -1
  229. package/src/react/web/ui/ConnectWallet/Modal/AnyWalletConnectUI.tsx +1 -0
  230. package/src/react/web/ui/ConnectWallet/WalletSelector.tsx +10 -1
  231. package/src/react/web/ui/ConnectWallet/locale/en.ts +1 -1
  232. package/src/react/web/ui/ConnectWallet/screens/Details/WalletManagerScreen.tsx +3 -3
  233. package/src/react/web/ui/ConnectWallet/screens/LinkProfileScreen.tsx +2 -0
  234. package/src/react/web/ui/TransactionButton/index.tsx +1 -1
  235. package/src/react/web/wallets/in-app/InAppWalletConnectUI.tsx +18 -0
  236. package/src/react/web/wallets/in-app/WalletAuth.tsx +166 -0
  237. package/src/react/web/wallets/shared/ConnectWalletSocialOptions.tsx +22 -0
  238. package/src/react/web/wallets/shared/ErrorState.tsx +29 -0
  239. package/src/react/web/wallets/shared/LoadingState.tsx +47 -0
  240. package/src/react/web/wallets/shared/PassKeyLogin.tsx +4 -67
  241. package/src/react/web/wallets/shared/locale/de.ts +1 -0
  242. package/src/react/web/wallets/shared/locale/en.ts +2 -1
  243. package/src/react/web/wallets/shared/locale/es.ts +1 -0
  244. package/src/react/web/wallets/shared/locale/fr.ts +1 -0
  245. package/src/react/web/wallets/shared/locale/ja.ts +1 -0
  246. package/src/react/web/wallets/shared/locale/kr.ts +1 -0
  247. package/src/react/web/wallets/shared/locale/tl.ts +1 -0
  248. package/src/react/web/wallets/shared/locale/types.ts +1 -0
  249. package/src/react/web/wallets/shared/locale/vi.ts +1 -0
  250. package/src/transaction/actions/gasless/providers/biconomy.ts +3 -0
  251. package/src/transaction/actions/gasless/providers/engine.ts +3 -0
  252. package/src/transaction/actions/gasless/providers/openzeppelin.ts +3 -0
  253. package/src/transaction/actions/gasless/types.ts +12 -0
  254. package/src/transaction/prepare-contract-call.ts +1 -1
  255. package/src/transaction/read-contract.ts +21 -2
  256. package/src/utils/bigint.ts +2 -0
  257. package/src/version.ts +1 -1
  258. package/src/wallets/in-app/core/authentication/getLoginPath.ts +4 -4
  259. package/src/wallets/manager/index.ts +0 -2
  260. package/src/wallets/types.ts +0 -1
@@ -12,7 +12,7 @@ const connectLocaleEn: ConnectLocale = {
12
12
  installed: "Installed",
13
13
  buy: "Buy",
14
14
  continueAsGuest: "Continue as guest",
15
- connectAWallet: "Connect a wallet",
15
+ connectAWallet: "Connect a Wallet",
16
16
  newToWallets: "New to wallets?",
17
17
  getStarted: "Get started",
18
18
  guest: "Guest",
@@ -1,4 +1,4 @@
1
- import { CheckIcon, CrossCircledIcon, PlusIcon } from "@radix-ui/react-icons";
1
+ import { CheckIcon, MinusIcon, PlusIcon } from "@radix-ui/react-icons";
2
2
  import { useState } from "react";
3
3
  import type { Chain } from "../../../../../../chains/types.js";
4
4
  import type { ThirdwebClient } from "../../../../../../client/client.js";
@@ -187,11 +187,11 @@ function WalletManangerButton(props: {
187
187
  disconnect(props.wallet);
188
188
  }}
189
189
  >
190
- <CrossCircledIcon
190
+ <MinusIcon
191
191
  width={iconSize.md}
192
192
  height={iconSize.md}
193
193
  style={{
194
- color: theme.colors.danger,
194
+ color: theme.colors.secondaryText,
195
195
  }}
196
196
  />
197
197
  </IconButton>
@@ -23,6 +23,7 @@ export function LinkProfileScreen(props: {
23
23
  onBack: () => void;
24
24
  locale: ConnectLocale;
25
25
  client: ThirdwebClient;
26
+ walletConnect: { projectId?: string } | undefined;
26
27
  }) {
27
28
  const activeWallet = useActiveWallet();
28
29
  const chain = useActiveWalletChain();
@@ -36,6 +37,7 @@ export function LinkProfileScreen(props: {
36
37
  return (
37
38
  <Suspense fallback={<LoadingScreen />}>
38
39
  <InAppWalletConnectUI
40
+ walletConnect={props.walletConnect}
39
41
  wallet={activeWallet as Wallet<"inApp">}
40
42
  done={() => {
41
43
  queryClient.invalidateQueries({ queryKey: ["profiles"] });
@@ -11,7 +11,7 @@ import { Button } from "../components/buttons.js";
11
11
 
12
12
  /**
13
13
  * TransactionButton component is used to render a button that triggers a transaction.
14
- * - It shows a "Switch Network" button if the connected wallet is on a different chain than the transaction.
14
+ * It shows a "Switch Network" button if the connected wallet is on a different chain than the transaction.
15
15
  * @param props - The props for this component.
16
16
  * Refer to [TransactionButtonProps](https://portal.thirdweb.com/references/typescript/v5/TransactionButtonProps) for details.
17
17
  * @example
@@ -14,6 +14,7 @@ import { OTPLoginUI } from "../shared/OTPLoginUI.js";
14
14
  import { PassKeyLogin } from "../shared/PassKeyLogin.js";
15
15
  import { SocialLogin } from "../shared/SocialLogin.js";
16
16
  import { InAppWalletFormUIScreen } from "./InAppWalletFormUI.js";
17
+ import { WalletAuth } from "./WalletAuth.js";
17
18
  import { useInAppWalletLocale } from "./useInAppWalletLocale.js";
18
19
 
19
20
  /**
@@ -36,6 +37,7 @@ function InAppWalletConnectUI(props: {
36
37
  chain: Chain | undefined;
37
38
  connectLocale: ConnectLocale;
38
39
  isLinking?: boolean;
40
+ walletConnect: { projectId?: string } | undefined;
39
41
  }) {
40
42
  const data = useSelectionData();
41
43
  const setSelectionData = useSetSelectionData();
@@ -99,6 +101,22 @@ function InAppWalletConnectUI(props: {
99
101
  );
100
102
  }
101
103
 
104
+ if (state?.walletLogin) {
105
+ return (
106
+ <WalletAuth
107
+ meta={props.meta}
108
+ inAppLocale={locale}
109
+ walletConnect={props.walletConnect}
110
+ wallet={props.wallet}
111
+ client={props.client}
112
+ size={props.size}
113
+ done={done}
114
+ onBack={goBackToMain || (() => setSelectionData({}))}
115
+ locale={props.connectLocale}
116
+ />
117
+ );
118
+ }
119
+
102
120
  if (state?.socialLogin) {
103
121
  return (
104
122
  <SocialLogin
@@ -0,0 +1,166 @@
1
+ import { Suspense, useRef, useState } from "react";
2
+ import { defineChain } from "../../../../chains/utils.js";
3
+ import type { ThirdwebClient } from "../../../../client/client.js";
4
+ import { linkProfile } from "../../../../wallets/in-app/core/wallet/profiles.js";
5
+ import type { Wallet } from "../../../../wallets/interfaces/wallet.js";
6
+ import { iconSize } from "../../../core/design-system/index.js";
7
+ import { useAddConnectedWallet } from "../../../core/hooks/wallets/useAddConnectedWallet.js";
8
+ import AllWalletsUI from "../../ui/ConnectWallet/Modal/AllWalletsUI.js";
9
+ import { WalletSelector } from "../../ui/ConnectWallet/WalletSelector.js";
10
+ import type { ConnectLocale } from "../../ui/ConnectWallet/locale/types.js";
11
+ import { Spacer } from "../../ui/components/Spacer.js";
12
+ import { WalletImage } from "../../ui/components/WalletImage.js";
13
+ import { Container, ModalHeader } from "../../ui/components/basic.js";
14
+ import { getDefaultWallets } from "../defaultWallets.js";
15
+ import { ErrorState } from "../shared/ErrorState.js";
16
+ import { LoadingScreen } from "../shared/LoadingScreen.js";
17
+ import { LoadingState } from "../shared/LoadingState.js";
18
+ import type { InAppWalletLocale } from "../shared/locale/types.js";
19
+
20
+ export function WalletAuth(props: {
21
+ wallet: Wallet<"inApp">;
22
+ client: ThirdwebClient;
23
+ done: () => void;
24
+ size: "compact" | "wide";
25
+ locale: ConnectLocale;
26
+ inAppLocale: InAppWalletLocale;
27
+ onBack: () => void;
28
+ walletConnect: { projectId?: string } | undefined;
29
+ meta?: {
30
+ title?: string;
31
+ titleIconUrl?: string;
32
+ showThirdwebBranding?: boolean;
33
+ termsOfServiceUrl?: string;
34
+ privacyPolicyUrl?: string;
35
+ };
36
+ }) {
37
+ const { wallet, done } = props;
38
+ const addConnectedWallet = useAddConnectedWallet();
39
+ const walletToConnect = useRef<Wallet>();
40
+ const [status, setStatus] = useState<"loading" | "error" | "selecting">(
41
+ "selecting",
42
+ );
43
+ const [error, setError] = useState<string | undefined>();
44
+ const [showAll, setShowAll] = useState<boolean>(false);
45
+
46
+ const back = () => {
47
+ setStatus("selecting");
48
+ walletToConnect.current = undefined;
49
+ props.onBack();
50
+ };
51
+
52
+ async function login(walletToLink: Wallet) {
53
+ setStatus("loading");
54
+ walletToConnect.current = walletToLink;
55
+ try {
56
+ await linkProfile(wallet as Wallet<"inApp">, {
57
+ strategy: "wallet",
58
+ wallet: walletToLink,
59
+ chain: wallet.getChain() || defineChain(1),
60
+ }).catch((e) => {
61
+ setError(e.message);
62
+ throw e;
63
+ });
64
+ addConnectedWallet(walletToLink);
65
+ done();
66
+ } catch {
67
+ setStatus("error");
68
+ }
69
+ }
70
+
71
+ if (!walletToConnect.current) {
72
+ if (showAll) {
73
+ return (
74
+ <Suspense fallback={<LoadingScreen />}>
75
+ <AllWalletsUI
76
+ onBack={() => setShowAll(false)}
77
+ onSelect={async (newWallet) => {
78
+ login(newWallet);
79
+ setShowAll(false);
80
+ }}
81
+ client={props.client}
82
+ connectLocale={props.locale}
83
+ recommendedWallets={undefined}
84
+ specifiedWallets={[]}
85
+ size={props.size}
86
+ disableSelectionDataReset={true}
87
+ />
88
+ </Suspense>
89
+ );
90
+ }
91
+ return (
92
+ <WalletSelector
93
+ title={props.locale.connectAWallet}
94
+ wallets={getDefaultWallets()}
95
+ selectWallet={async (newWallet) => {
96
+ login(newWallet);
97
+ }}
98
+ onShowAll={() => {
99
+ setShowAll(true);
100
+ }}
101
+ done={() => {}}
102
+ goBack={back}
103
+ setModalVisibility={() => {}}
104
+ client={props.client}
105
+ connectLocale={props.locale}
106
+ isEmbed={false}
107
+ recommendedWallets={undefined}
108
+ chain={wallet.getChain()}
109
+ showAllWallets={true}
110
+ chains={[]}
111
+ size={props.size}
112
+ meta={props.meta || {}}
113
+ walletConnect={props.walletConnect}
114
+ modalHeader={{ title: props.inAppLocale.linkWallet, onBack: back }}
115
+ walletIdsToHide={["inApp"]}
116
+ disableSelectionDataReset={true}
117
+ />
118
+ );
119
+ }
120
+
121
+ return (
122
+ <Container animate="fadein" fullHeight flex="column">
123
+ <Container p="lg">
124
+ <ModalHeader title={props.inAppLocale.linkWallet} onBack={back} />
125
+ </Container>
126
+
127
+ <Container
128
+ px={props.size === "wide" ? "xxl" : "lg"}
129
+ expand
130
+ flex="column"
131
+ center="y"
132
+ >
133
+ <div>
134
+ {status === "error" ? (
135
+ <>
136
+ <ErrorState
137
+ onTryAgain={() => {
138
+ if (!walletToConnect.current) {
139
+ throw new Error("Failed to connect to unknown wallet");
140
+ }
141
+ login(walletToConnect.current);
142
+ }}
143
+ title={error || "Failed to Login"}
144
+ />
145
+ <Spacer y="lg" />
146
+ </>
147
+ ) : (
148
+ <>
149
+ <LoadingState
150
+ title="Sign in with your wallet"
151
+ subtitle="A pop-up prompt will appear to sign-in and verify your wallet"
152
+ icon={
153
+ <WalletImage
154
+ id={walletToConnect.current.id ?? ""}
155
+ size={iconSize.xl}
156
+ client={props.client}
157
+ />
158
+ }
159
+ />
160
+ </>
161
+ )}
162
+ </div>
163
+ </Container>
164
+ </Container>
165
+ );
166
+ }
@@ -26,6 +26,7 @@ import {
26
26
  import { setLastAuthProvider } from "../../../core/utils/storage.js";
27
27
  import {
28
28
  emailIcon,
29
+ getWalletIcon,
29
30
  passkeyIcon,
30
31
  phoneIcon,
31
32
  socialIcons,
@@ -52,6 +53,7 @@ export type ConnectWalletSelectUIState =
52
53
  connectionPromise: Promise<Account | Profile[]>;
53
54
  };
54
55
  passkeyLogin?: boolean;
56
+ walletLogin?: boolean;
55
57
  };
56
58
 
57
59
  const defaultAuthOptions: AuthOption[] = [
@@ -242,6 +244,13 @@ export const ConnectWalletSocialOptions = (
242
244
  props.select();
243
245
  }
244
246
 
247
+ function handleWalletLogin() {
248
+ setData({
249
+ walletLogin: true,
250
+ });
251
+ props.select();
252
+ }
253
+
245
254
  const showOnlyIcons = socialLogins.length > 2;
246
255
 
247
256
  return (
@@ -390,6 +399,19 @@ export const ConnectWalletSocialOptions = (
390
399
  />
391
400
  </>
392
401
  )}
402
+
403
+ {props.isLinking && (
404
+ <>
405
+ <WalletTypeRowButton
406
+ client={props.client}
407
+ icon={getWalletIcon("")}
408
+ onClick={() => {
409
+ handleWalletLogin();
410
+ }}
411
+ title={locale.linkWallet}
412
+ />
413
+ </>
414
+ )}
393
415
  </Container>
394
416
  );
395
417
  };
@@ -0,0 +1,29 @@
1
+ import { iconSize } from "../../../../react/core/design-system/index.js";
2
+ import { AccentFailIcon } from "../../ui/ConnectWallet/icons/AccentFailIcon.js";
3
+ import { Spacer } from "../../ui/components/Spacer.js";
4
+ import { Container } from "../../ui/components/basic.js";
5
+ import { Button } from "../../ui/components/buttons.js";
6
+ import { Text } from "../../ui/components/text.js";
7
+
8
+ export function ErrorState(props: {
9
+ onTryAgain: () => void;
10
+ title: string;
11
+ }) {
12
+ return (
13
+ <Container animate="fadein">
14
+ <Spacer y="xxl" />
15
+ <Container flex="row" center="x">
16
+ <AccentFailIcon size={iconSize["3xl"]} />
17
+ </Container>
18
+ <Spacer y="lg" />
19
+ <Text center color="primaryText" size="md">
20
+ {props.title}
21
+ </Text>
22
+ <Spacer y="xl" />
23
+ <Spacer y="xxl" />
24
+ <Button variant="accent" fullWidth onClick={props.onTryAgain}>
25
+ Try Again
26
+ </Button>
27
+ </Container>
28
+ );
29
+ }
@@ -0,0 +1,47 @@
1
+ import type { ReactNode } from "react";
2
+ import { Spacer } from "../../ui/components/Spacer.js";
3
+ import { Spinner } from "../../ui/components/Spinner.js";
4
+ import { Container } from "../../ui/components/basic.js";
5
+ import { Text } from "../../ui/components/text.js";
6
+
7
+ export function LoadingState(props: {
8
+ title: string;
9
+ subtitle: string;
10
+ icon: ReactNode;
11
+ }) {
12
+ return (
13
+ <Container animate="fadein">
14
+ <Spacer y="xxl" />
15
+ <Container
16
+ flex="row"
17
+ center="x"
18
+ style={{
19
+ position: "relative",
20
+ }}
21
+ >
22
+ <Spinner size="4xl" color="accentText" />
23
+ <Container
24
+ color="accentText"
25
+ style={{
26
+ position: "absolute",
27
+ top: "50%",
28
+ left: "50%",
29
+ transform: "translate(-50%, -50%)",
30
+ }}
31
+ >
32
+ {props.icon}
33
+ </Container>
34
+ </Container>
35
+ <Spacer y="xl" />
36
+ <Text center color="primaryText" size="lg">
37
+ {props.title}
38
+ </Text>
39
+ <Spacer y="md" />
40
+ <Text multiline center>
41
+ {props.subtitle}
42
+ </Text>
43
+ <Spacer y="xxl" />
44
+ <Spacer y="xxl" />
45
+ </Container>
46
+ );
47
+ }
@@ -7,15 +7,14 @@ import { isEcosystemWallet } from "../../../../wallets/ecosystem/is-ecosystem-wa
7
7
  import { hasStoredPasskey } from "../../../../wallets/in-app/web/lib/auth/passkeys.js";
8
8
  import { iconSize } from "../../../core/design-system/index.js";
9
9
  import { setLastAuthProvider } from "../../../core/utils/storage.js";
10
- import { AccentFailIcon } from "../../ui/ConnectWallet/icons/AccentFailIcon.js";
11
10
  import { FingerPrintIcon } from "../../ui/ConnectWallet/icons/FingerPrintIcon.js";
12
11
  import type { ConnectLocale } from "../../ui/ConnectWallet/locale/types.js";
13
12
  import { Spacer } from "../../ui/components/Spacer.js";
14
- import { Spinner } from "../../ui/components/Spinner.js";
15
13
  import { Container, ModalHeader } from "../../ui/components/basic.js";
16
14
  import { Button } from "../../ui/components/buttons.js";
17
- import { Text } from "../../ui/components/text.js";
15
+ import { ErrorState } from "./ErrorState.js";
18
16
  import { LoadingScreen } from "./LoadingScreen.js";
17
+ import { LoadingState } from "./LoadingState.js";
19
18
 
20
19
  // is passkey stored?
21
20
  // - login
@@ -179,6 +178,7 @@ function LoginScreen(props: {
179
178
  <LoadingState
180
179
  title="Requesting Passkey"
181
180
  subtitle="A pop-up prompt will appear to sign-in and verify your passkey"
181
+ icon={<FingerPrintIcon size={iconSize.xxl} />}
182
182
  />
183
183
  );
184
184
  }
@@ -252,6 +252,7 @@ function SignupScreen(props: {
252
252
  <LoadingState
253
253
  title="Creating Passkey"
254
254
  subtitle="A pop-up prompt will appear to sign-in and verify your passkey"
255
+ icon={<FingerPrintIcon size={iconSize.xxl} />}
255
256
  />
256
257
  );
257
258
  }
@@ -297,67 +298,3 @@ function SelectLoginMethod(props: {
297
298
  </Container>
298
299
  );
299
300
  }
300
-
301
- function ErrorState(props: {
302
- onTryAgain: () => void;
303
- title: string;
304
- }) {
305
- return (
306
- <Container animate="fadein">
307
- <Spacer y="xxl" />
308
- <Container flex="row" center="x">
309
- <AccentFailIcon size={iconSize["3xl"]} />
310
- </Container>
311
- <Spacer y="lg" />
312
- <Text center color="primaryText" size="md">
313
- {props.title}
314
- </Text>
315
- <Spacer y="xl" />
316
- <Spacer y="xxl" />
317
- <Button variant="accent" fullWidth onClick={props.onTryAgain}>
318
- Try Again
319
- </Button>
320
- </Container>
321
- );
322
- }
323
-
324
- function LoadingState(props: {
325
- title: string;
326
- subtitle: string;
327
- }) {
328
- return (
329
- <Container animate="fadein">
330
- <Spacer y="xxl" />
331
- <Container
332
- flex="row"
333
- center="x"
334
- style={{
335
- position: "relative",
336
- }}
337
- >
338
- <Spinner size="4xl" color="accentText" />
339
- <Container
340
- color="accentText"
341
- style={{
342
- position: "absolute",
343
- top: "50%",
344
- left: "50%",
345
- transform: "translate(-50%, -50%)",
346
- }}
347
- >
348
- <FingerPrintIcon size={iconSize.xxl} />
349
- </Container>
350
- </Container>
351
- <Spacer y="xl" />
352
- <Text center color="primaryText" size="lg">
353
- {props.title}
354
- </Text>
355
- <Spacer y="md" />
356
- <Text multiline center>
357
- {props.subtitle}
358
- </Text>
359
- <Spacer y="xxl" />
360
- <Spacer y="xxl" />
361
- </Container>
362
- );
363
- }
@@ -56,4 +56,5 @@ export default {
56
56
  signInWithPhone: "Mit Telefonnummer anmelden",
57
57
  phoneRequired: "Telefonnummer ist erforderlich",
58
58
  passkey: "Passkey",
59
+ linkWallet: "Link a Wallet",
59
60
  } satisfies InAppWalletLocale;
@@ -53,6 +53,7 @@ export default {
53
53
  invalidPhone: "Invalid phone number",
54
54
  phonePlaceholder: "Phone number",
55
55
  signInWithPhone: "Sign in with phone number",
56
- phoneRequired: "phone number is required",
56
+ phoneRequired: "Phone number is required",
57
57
  passkey: "Passkey",
58
+ linkWallet: "Link a Wallet",
58
59
  } satisfies InAppWalletLocale;
@@ -55,4 +55,5 @@ export default {
55
55
  phoneRequired: "Se requiere número de teléfono",
56
56
  signInWithEmail: "Iniciar sesión con correo electrónico",
57
57
  passkey: "Clave de acceso",
58
+ linkWallet: "Link a Wallet",
58
59
  } satisfies InAppWalletLocale;
@@ -56,4 +56,5 @@ export default {
56
56
  signInWithPhone: "Se connecter avec le numéro de téléphone",
57
57
  phoneRequired: "Le numéro de téléphone est requis",
58
58
  passkey: "Passkey",
59
+ linkWallet: "Link a Wallet",
59
60
  } satisfies InAppWalletLocale;
@@ -54,4 +54,5 @@ export default {
54
54
  signInWithPhone: "電話番号でサインイン",
55
55
  phoneRequired: "電話番号は必須です",
56
56
  passkey: "パスキー",
57
+ linkWallet: "Link a Wallet",
57
58
  } satisfies InAppWalletLocale;
@@ -52,4 +52,5 @@ export default {
52
52
  signInWithPhone: "전화번호로 로그인",
53
53
  phoneRequired: "전화번호가 필요합니다",
54
54
  passkey: "비밀번호",
55
+ linkWallet: "Link a Wallet",
55
56
  } satisfies InAppWalletLocale;
@@ -55,4 +55,5 @@ export default {
55
55
  signInWithPhone: "Mag-login gamit ang numero ng telepono",
56
56
  phoneRequired: "Kinakailangan ang numero ng telepono",
57
57
  passkey: "Passkey",
58
+ linkWallet: "Link a Wallet",
58
59
  } satisfies InAppWalletLocale;
@@ -50,4 +50,5 @@ export type InAppWalletLocale = {
50
50
  submitEmail: string;
51
51
  maxAccountsExceeded: string;
52
52
  passkey: string;
53
+ linkWallet: string;
53
54
  };
@@ -55,4 +55,5 @@ export default {
55
55
  signInWithPhone: "Đăng nhập bằng số điện thoại",
56
56
  phoneRequired: "Vui lòng nhập số điện thoại",
57
57
  passkey: "Passkey",
58
+ linkWallet: "Link a Wallet",
58
59
  } satisfies InAppWalletLocale;
@@ -10,6 +10,9 @@ import type { PreparedTransaction } from "../../../prepare-transaction.js";
10
10
  import { readContract } from "../../../read-contract.js";
11
11
  import type { WaitForReceiptOptions } from "../../wait-for-tx-receipt.js";
12
12
 
13
+ /**
14
+ * @transaction
15
+ */
13
16
  export type BiconomyOptions = {
14
17
  provider: "biconomy";
15
18
  // you can find the correct forwarder for your network here: https://docs-gasless.biconomy.io/misc/contract-addresses
@@ -10,6 +10,9 @@ import {
10
10
  waitForReceipt,
11
11
  } from "../../wait-for-tx-receipt.js";
12
12
 
13
+ /**
14
+ * @transaction
15
+ */
13
16
  export type EngineOptions = {
14
17
  provider: "engine";
15
18
  relayerUrl: string;
@@ -8,6 +8,9 @@ import type { PreparedTransaction } from "../../../prepare-transaction.js";
8
8
  import { readContract } from "../../../read-contract.js";
9
9
  import type { WaitForReceiptOptions } from "../../wait-for-tx-receipt.js";
10
10
 
11
+ /**
12
+ * @transaction
13
+ */
11
14
  export type OpenZeppelinOptions = {
12
15
  provider: "openzeppelin";
13
16
  relayerUrl: string;
@@ -2,6 +2,18 @@ import type { BiconomyOptions } from "./providers/biconomy.js";
2
2
  import type { EngineOptions } from "./providers/engine.js";
3
3
  import type { OpenZeppelinOptions } from "./providers/openzeppelin.js";
4
4
 
5
+ /**
6
+ * Gasless configs for sending gasless transactions.
7
+ * This config is used in:
8
+ * - [`TransactionButton`](https://portal.thirdweb.com/references/typescript/v5/TransactionButton)
9
+ * - [`sendTransaction`](https://portal.thirdweb.com/references/typescript/v5/sendTransaction)
10
+ * - [`useSendTransaction`](https://portal.thirdweb.com/references/typescript/v5/useSendTransaction)
11
+ * - [`sendAndConfirmTransaction`](https://portal.thirdweb.com/references/typescript/v5/sendAndConfirmTransaction)
12
+ * - [`useSendAndConfirmTransaction`](https://portal.thirdweb.com/references/typescript/v5/useSendAndConfirmTransaction)
13
+ *
14
+ * Please refer to the docs of those components above for more info.
15
+ * @transaction
16
+ */
5
17
  export type GaslessOptions =
6
18
  | EngineOptions
7
19
  | OpenZeppelinOptions
@@ -113,7 +113,7 @@ export type PrepareContractCallOptions<
113
113
  * });
114
114
  * ```
115
115
  *
116
- * ### Usage with a the ABI defined on the contract:
116
+ * ### Usage with the ABI defined on the contract:
117
117
  *
118
118
  * ```ts
119
119
  * import { getContract, prepareContractCall } from "thirdweb";
@@ -70,7 +70,7 @@ export type ReadContractOptions<
70
70
  >;
71
71
 
72
72
  /**
73
- * Reads state from a deployed smart contract.
73
+ * ### Reads state from a deployed smart contract.
74
74
  *
75
75
  * You can use raw read calls or read [extensions](https://portal.thirdweb.com/typescript/v5/extensions/use) to read from a contract.
76
76
  *
@@ -111,7 +111,26 @@ export type ReadContractOptions<
111
111
  *
112
112
  * const { data, isLoading } = useReadContract({
113
113
  * contract,
114
- * method: "function tokenURI(uint256 tokenId) returns (string)"});
114
+ * method: "function tokenURI(uint256 tokenId) returns (string)"}),
115
+ * params: [1n],
116
+ * });
117
+ * ```
118
+ *
119
+ * ### Using `resolveMethod`
120
+ * ```ts
121
+ * import { getContract, resolveMethod } from "thirdweb";
122
+ * import { sepolia } from "thirdweb/chains";
123
+ * import { useReadContract } from "thirdweb/react";
124
+ *
125
+ * const contract = getContract({
126
+ * client,
127
+ * address: "0x...",
128
+ * chain: sepolia,
129
+ * });
130
+ *
131
+ * const { data, isLoading } = useReadContract({
132
+ * contract,
133
+ * method: resolveMethod("tokenURI"),
115
134
  * params: [1n],
116
135
  * });
117
136
  * ```