thirdweb 5.69.0 → 5.70.0-nightly-ecaa304a812188da3c81888bb52ca6064093c139-20241121000332

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 (453) hide show
  1. package/dist/cjs/client/client.js +1 -0
  2. package/dist/cjs/client/client.js.map +1 -1
  3. package/dist/cjs/exports/react.js +32 -3
  4. package/dist/cjs/exports/react.js.map +1 -1
  5. package/dist/cjs/extensions/erc721/lazyMinting/read/getBatchesToReveal.js +1 -1
  6. package/dist/cjs/extensions/modules/common/checkModulesCompatibility.js +5 -0
  7. package/dist/cjs/extensions/modules/common/checkModulesCompatibility.js.map +1 -1
  8. package/dist/cjs/extensions/pack/createNewPack.js +2 -1
  9. package/dist/cjs/extensions/pack/createNewPack.js.map +1 -1
  10. package/dist/cjs/extensions/prebuilts/deploy-pack.js +1 -0
  11. package/dist/cjs/extensions/prebuilts/deploy-pack.js.map +1 -1
  12. package/dist/cjs/extensions/thirdweb/write/publish.js +4 -0
  13. package/dist/cjs/extensions/thirdweb/write/publish.js.map +1 -1
  14. package/dist/cjs/react/core/hooks/others/useChainQuery.js +3 -3
  15. package/dist/cjs/react/core/hooks/rpc/useBlockNumber.js +1 -1
  16. package/dist/cjs/react/core/hooks/wallets/useCapabilities.js +1 -1
  17. package/dist/cjs/react/core/hooks/wallets/useSendCalls.js +3 -3
  18. package/dist/cjs/react/core/providers/connection-manager.js +3 -0
  19. package/dist/cjs/react/core/providers/connection-manager.js.map +1 -1
  20. package/dist/cjs/react/core/utils/wallet.js +2 -1
  21. package/dist/cjs/react/core/utils/wallet.js.map +1 -1
  22. package/dist/cjs/react/core/utils/walletIcon.js +2 -0
  23. package/dist/cjs/react/core/utils/walletIcon.js.map +1 -1
  24. package/dist/cjs/react/native/hooks/wallets/useProfiles.js +1 -1
  25. package/dist/cjs/react/native/providers/thirdweb-provider.js +1 -0
  26. package/dist/cjs/react/native/providers/thirdweb-provider.js.map +1 -1
  27. package/dist/cjs/react/native/ui/AutoConnect/AutoConnect.js +1 -0
  28. package/dist/cjs/react/native/ui/AutoConnect/AutoConnect.js.map +1 -1
  29. package/dist/cjs/react/native/ui/connect/ConnectModal.js +1 -0
  30. package/dist/cjs/react/native/ui/connect/ConnectModal.js.map +1 -1
  31. package/dist/cjs/react/native/ui/transaction/TransactionButton.js +1 -0
  32. package/dist/cjs/react/native/ui/transaction/TransactionButton.js.map +1 -1
  33. package/dist/cjs/react/web/hooks/wallets/useProfiles.js +1 -1
  34. package/dist/cjs/react/web/providers/thirdweb-provider.js +1 -0
  35. package/dist/cjs/react/web/providers/thirdweb-provider.js.map +1 -1
  36. package/dist/cjs/react/web/ui/AutoConnect/AutoConnect.js +1 -0
  37. package/dist/cjs/react/web/ui/AutoConnect/AutoConnect.js.map +1 -1
  38. package/dist/cjs/react/web/ui/ConnectWallet/Blobbie.js +19 -4
  39. package/dist/cjs/react/web/ui/ConnectWallet/Blobbie.js.map +1 -1
  40. package/dist/cjs/react/web/ui/ConnectWallet/ConnectButton.js +21 -19
  41. package/dist/cjs/react/web/ui/ConnectWallet/ConnectButton.js.map +1 -1
  42. package/dist/cjs/react/web/ui/ConnectWallet/Details.js +18 -13
  43. package/dist/cjs/react/web/ui/ConnectWallet/Details.js.map +1 -1
  44. package/dist/cjs/react/web/ui/ConnectWallet/Modal/ConnectEmbed.js +1 -0
  45. package/dist/cjs/react/web/ui/ConnectWallet/Modal/ConnectEmbed.js.map +1 -1
  46. package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/BuyScreen.js +9 -0
  47. package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/BuyScreen.js.map +1 -1
  48. package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/TransactionModeScreen.js +15 -2
  49. package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/TransactionModeScreen.js.map +1 -1
  50. package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/main/useBuyTxStates.js +2 -2
  51. package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/main/useBuyTxStates.js.map +1 -1
  52. package/dist/cjs/react/web/ui/PayEmbed.js +1 -0
  53. package/dist/cjs/react/web/ui/PayEmbed.js.map +1 -1
  54. package/dist/cjs/react/web/ui/SiteEmbed.js +3 -2
  55. package/dist/cjs/react/web/ui/SiteEmbed.js.map +1 -1
  56. package/dist/cjs/react/web/ui/SiteLink.js +2 -1
  57. package/dist/cjs/react/web/ui/SiteLink.js.map +1 -1
  58. package/dist/cjs/react/web/ui/TransactionButton/index.js +1 -0
  59. package/dist/cjs/react/web/ui/TransactionButton/index.js.map +1 -1
  60. package/dist/cjs/react/web/ui/prebuilt/Account/address.js +49 -0
  61. package/dist/cjs/react/web/ui/prebuilt/Account/address.js.map +1 -0
  62. package/dist/cjs/react/web/ui/prebuilt/Account/avatar.js +144 -0
  63. package/dist/cjs/react/web/ui/prebuilt/Account/avatar.js.map +1 -0
  64. package/dist/cjs/react/web/ui/prebuilt/Account/balance.js +122 -0
  65. package/dist/cjs/react/web/ui/prebuilt/Account/balance.js.map +1 -0
  66. package/dist/cjs/react/web/ui/prebuilt/Account/blobbie.js +16 -0
  67. package/dist/cjs/react/web/ui/prebuilt/Account/blobbie.js.map +1 -0
  68. package/dist/cjs/react/web/ui/prebuilt/Account/name.js +106 -0
  69. package/dist/cjs/react/web/ui/prebuilt/Account/name.js.map +1 -0
  70. package/dist/cjs/react/web/ui/prebuilt/Account/provider.js +43 -0
  71. package/dist/cjs/react/web/ui/prebuilt/Account/provider.js.map +1 -0
  72. package/dist/cjs/react/web/ui/prebuilt/NFT/description.js +69 -0
  73. package/dist/cjs/react/web/ui/prebuilt/NFT/description.js.map +1 -0
  74. package/dist/cjs/react/web/ui/prebuilt/NFT/hooks.js +45 -0
  75. package/dist/cjs/react/web/ui/prebuilt/NFT/hooks.js.map +1 -0
  76. package/dist/cjs/react/web/ui/prebuilt/NFT/media.js +82 -0
  77. package/dist/cjs/react/web/ui/prebuilt/NFT/media.js.map +1 -0
  78. package/dist/cjs/react/web/ui/prebuilt/NFT/name.js +68 -0
  79. package/dist/cjs/react/web/ui/prebuilt/NFT/name.js.map +1 -0
  80. package/dist/cjs/react/web/ui/prebuilt/NFT/provider.js +55 -0
  81. package/dist/cjs/react/web/ui/prebuilt/NFT/provider.js.map +1 -0
  82. package/dist/cjs/react/web/ui/prebuilt/Token/icon.js +113 -0
  83. package/dist/cjs/react/web/ui/prebuilt/Token/icon.js.map +1 -0
  84. package/dist/cjs/react/web/ui/prebuilt/Token/name.js +137 -0
  85. package/dist/cjs/react/web/ui/prebuilt/Token/name.js.map +1 -0
  86. package/dist/cjs/react/web/ui/prebuilt/Token/provider.js +54 -0
  87. package/dist/cjs/react/web/ui/prebuilt/Token/provider.js.map +1 -0
  88. package/dist/cjs/react/web/ui/prebuilt/Token/symbol.js +134 -0
  89. package/dist/cjs/react/web/ui/prebuilt/Token/symbol.js.map +1 -0
  90. package/dist/cjs/react/web/ui/prebuilt/thirdweb/BuyDirectListingButton/index.js +1 -0
  91. package/dist/cjs/react/web/ui/prebuilt/thirdweb/BuyDirectListingButton/index.js.map +1 -1
  92. package/dist/cjs/react/web/ui/prebuilt/thirdweb/ClaimButton/index.js +1 -0
  93. package/dist/cjs/react/web/ui/prebuilt/thirdweb/ClaimButton/index.js.map +1 -1
  94. package/dist/cjs/react/web/ui/prebuilt/thirdweb/CreateDirectListingButton/index.js +1 -0
  95. package/dist/cjs/react/web/ui/prebuilt/thirdweb/CreateDirectListingButton/index.js.map +1 -1
  96. package/dist/cjs/storage/unpin.js +1 -1
  97. package/dist/cjs/storage/upload.js +1 -0
  98. package/dist/cjs/storage/upload.js.map +1 -1
  99. package/dist/cjs/transaction/actions/to-serializable-transaction.js +1 -1
  100. package/dist/cjs/transaction/actions/zksync/send-eip712-transaction.js +5 -0
  101. package/dist/cjs/transaction/actions/zksync/send-eip712-transaction.js.map +1 -1
  102. package/dist/cjs/utils/any-evm/zksync/isZkSyncChain.js +5 -0
  103. package/dist/cjs/utils/any-evm/zksync/isZkSyncChain.js.map +1 -1
  104. package/dist/cjs/utils/config.js +9 -0
  105. package/dist/cjs/utils/config.js.map +1 -1
  106. package/dist/cjs/utils/json.js +7 -4
  107. package/dist/cjs/utils/json.js.map +1 -1
  108. package/dist/cjs/version.js +1 -1
  109. package/dist/cjs/version.js.map +1 -1
  110. package/dist/cjs/wallets/eip5792/get-calls-status.js +1 -1
  111. package/dist/cjs/wallets/eip5792/get-capabilities.js +1 -1
  112. package/dist/cjs/wallets/eip5792/send-calls.js +2 -2
  113. package/dist/cjs/wallets/eip5792/wait-for-bundle.js +1 -1
  114. package/dist/cjs/wallets/in-app/core/users/getUser.js +1 -1
  115. package/dist/cjs/wallets/in-app/web/ecosystem.js +7 -17
  116. package/dist/cjs/wallets/in-app/web/ecosystem.js.map +1 -1
  117. package/dist/cjs/wallets/in-app/web/in-app.js +2 -17
  118. package/dist/cjs/wallets/in-app/web/in-app.js.map +1 -1
  119. package/dist/cjs/wallets/in-app/web/lib/auth/index.js +1 -0
  120. package/dist/cjs/wallets/in-app/web/lib/auth/index.js.map +1 -1
  121. package/dist/cjs/wallets/in-app/web/lib/auth/passkeys.js +17 -16
  122. package/dist/cjs/wallets/in-app/web/lib/auth/passkeys.js.map +1 -1
  123. package/dist/cjs/wallets/smart/smart-wallet.js +1 -0
  124. package/dist/cjs/wallets/smart/smart-wallet.js.map +1 -1
  125. package/dist/esm/client/client.js +1 -0
  126. package/dist/esm/client/client.js.map +1 -1
  127. package/dist/esm/exports/react.js +17 -1
  128. package/dist/esm/exports/react.js.map +1 -1
  129. package/dist/esm/extensions/erc721/lazyMinting/read/getBatchesToReveal.js +1 -1
  130. package/dist/esm/extensions/modules/common/checkModulesCompatibility.js +5 -0
  131. package/dist/esm/extensions/modules/common/checkModulesCompatibility.js.map +1 -1
  132. package/dist/esm/extensions/pack/createNewPack.js +2 -1
  133. package/dist/esm/extensions/pack/createNewPack.js.map +1 -1
  134. package/dist/esm/extensions/prebuilts/deploy-pack.js +1 -0
  135. package/dist/esm/extensions/prebuilts/deploy-pack.js.map +1 -1
  136. package/dist/esm/extensions/thirdweb/write/publish.js +4 -0
  137. package/dist/esm/extensions/thirdweb/write/publish.js.map +1 -1
  138. package/dist/esm/react/core/hooks/others/useChainQuery.js +3 -3
  139. package/dist/esm/react/core/hooks/rpc/useBlockNumber.js +1 -1
  140. package/dist/esm/react/core/hooks/wallets/useCapabilities.js +1 -1
  141. package/dist/esm/react/core/hooks/wallets/useSendCalls.js +3 -3
  142. package/dist/esm/react/core/providers/connection-manager.js +3 -0
  143. package/dist/esm/react/core/providers/connection-manager.js.map +1 -1
  144. package/dist/esm/react/core/utils/wallet.js +2 -1
  145. package/dist/esm/react/core/utils/wallet.js.map +1 -1
  146. package/dist/esm/react/core/utils/walletIcon.js +2 -0
  147. package/dist/esm/react/core/utils/walletIcon.js.map +1 -1
  148. package/dist/esm/react/native/hooks/wallets/useProfiles.js +1 -1
  149. package/dist/esm/react/native/providers/thirdweb-provider.js +1 -0
  150. package/dist/esm/react/native/providers/thirdweb-provider.js.map +1 -1
  151. package/dist/esm/react/native/ui/AutoConnect/AutoConnect.js +1 -0
  152. package/dist/esm/react/native/ui/AutoConnect/AutoConnect.js.map +1 -1
  153. package/dist/esm/react/native/ui/connect/ConnectModal.js +1 -0
  154. package/dist/esm/react/native/ui/connect/ConnectModal.js.map +1 -1
  155. package/dist/esm/react/native/ui/transaction/TransactionButton.js +1 -0
  156. package/dist/esm/react/native/ui/transaction/TransactionButton.js.map +1 -1
  157. package/dist/esm/react/web/hooks/wallets/useProfiles.js +1 -1
  158. package/dist/esm/react/web/providers/thirdweb-provider.js +1 -0
  159. package/dist/esm/react/web/providers/thirdweb-provider.js.map +1 -1
  160. package/dist/esm/react/web/ui/AutoConnect/AutoConnect.js +1 -0
  161. package/dist/esm/react/web/ui/AutoConnect/AutoConnect.js.map +1 -1
  162. package/dist/esm/react/web/ui/ConnectWallet/Blobbie.js +19 -4
  163. package/dist/esm/react/web/ui/ConnectWallet/Blobbie.js.map +1 -1
  164. package/dist/esm/react/web/ui/ConnectWallet/ConnectButton.js +21 -19
  165. package/dist/esm/react/web/ui/ConnectWallet/ConnectButton.js.map +1 -1
  166. package/dist/esm/react/web/ui/ConnectWallet/Details.js +19 -14
  167. package/dist/esm/react/web/ui/ConnectWallet/Details.js.map +1 -1
  168. package/dist/esm/react/web/ui/ConnectWallet/Modal/ConnectEmbed.js +1 -0
  169. package/dist/esm/react/web/ui/ConnectWallet/Modal/ConnectEmbed.js.map +1 -1
  170. package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/BuyScreen.js +9 -0
  171. package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/BuyScreen.js.map +1 -1
  172. package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/TransactionModeScreen.js +15 -2
  173. package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/TransactionModeScreen.js.map +1 -1
  174. package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/main/useBuyTxStates.js +2 -2
  175. package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/main/useBuyTxStates.js.map +1 -1
  176. package/dist/esm/react/web/ui/PayEmbed.js +1 -0
  177. package/dist/esm/react/web/ui/PayEmbed.js.map +1 -1
  178. package/dist/esm/react/web/ui/SiteEmbed.js +3 -2
  179. package/dist/esm/react/web/ui/SiteEmbed.js.map +1 -1
  180. package/dist/esm/react/web/ui/SiteLink.js +2 -1
  181. package/dist/esm/react/web/ui/SiteLink.js.map +1 -1
  182. package/dist/esm/react/web/ui/TransactionButton/index.js +1 -0
  183. package/dist/esm/react/web/ui/TransactionButton/index.js.map +1 -1
  184. package/dist/esm/react/web/ui/prebuilt/Account/address.js +46 -0
  185. package/dist/esm/react/web/ui/prebuilt/Account/address.js.map +1 -0
  186. package/dist/esm/react/web/ui/prebuilt/Account/avatar.js +141 -0
  187. package/dist/esm/react/web/ui/prebuilt/Account/avatar.js.map +1 -0
  188. package/dist/esm/react/web/ui/prebuilt/Account/balance.js +119 -0
  189. package/dist/esm/react/web/ui/prebuilt/Account/balance.js.map +1 -0
  190. package/dist/esm/react/web/ui/prebuilt/Account/blobbie.js +13 -0
  191. package/dist/esm/react/web/ui/prebuilt/Account/blobbie.js.map +1 -0
  192. package/dist/esm/react/web/ui/prebuilt/Account/name.js +103 -0
  193. package/dist/esm/react/web/ui/prebuilt/Account/name.js.map +1 -0
  194. package/dist/esm/react/web/ui/prebuilt/Account/provider.js +39 -0
  195. package/dist/esm/react/web/ui/prebuilt/Account/provider.js.map +1 -0
  196. package/dist/esm/react/web/ui/prebuilt/NFT/description.js +66 -0
  197. package/dist/esm/react/web/ui/prebuilt/NFT/description.js.map +1 -0
  198. package/dist/esm/react/web/ui/prebuilt/NFT/hooks.js +41 -0
  199. package/dist/esm/react/web/ui/prebuilt/NFT/hooks.js.map +1 -0
  200. package/dist/esm/react/web/ui/prebuilt/NFT/media.js +79 -0
  201. package/dist/esm/react/web/ui/prebuilt/NFT/media.js.map +1 -0
  202. package/dist/esm/react/web/ui/prebuilt/NFT/name.js +65 -0
  203. package/dist/esm/react/web/ui/prebuilt/NFT/name.js.map +1 -0
  204. package/dist/esm/react/web/ui/prebuilt/NFT/provider.js +50 -0
  205. package/dist/esm/react/web/ui/prebuilt/NFT/provider.js.map +1 -0
  206. package/dist/esm/react/web/ui/prebuilt/Token/icon.js +110 -0
  207. package/dist/esm/react/web/ui/prebuilt/Token/icon.js.map +1 -0
  208. package/dist/esm/react/web/ui/prebuilt/Token/name.js +134 -0
  209. package/dist/esm/react/web/ui/prebuilt/Token/name.js.map +1 -0
  210. package/dist/esm/react/web/ui/prebuilt/Token/provider.js +50 -0
  211. package/dist/esm/react/web/ui/prebuilt/Token/provider.js.map +1 -0
  212. package/dist/esm/react/web/ui/prebuilt/Token/symbol.js +131 -0
  213. package/dist/esm/react/web/ui/prebuilt/Token/symbol.js.map +1 -0
  214. package/dist/esm/react/web/ui/prebuilt/thirdweb/BuyDirectListingButton/index.js +1 -0
  215. package/dist/esm/react/web/ui/prebuilt/thirdweb/BuyDirectListingButton/index.js.map +1 -1
  216. package/dist/esm/react/web/ui/prebuilt/thirdweb/ClaimButton/index.js +1 -0
  217. package/dist/esm/react/web/ui/prebuilt/thirdweb/ClaimButton/index.js.map +1 -1
  218. package/dist/esm/react/web/ui/prebuilt/thirdweb/CreateDirectListingButton/index.js +1 -0
  219. package/dist/esm/react/web/ui/prebuilt/thirdweb/CreateDirectListingButton/index.js.map +1 -1
  220. package/dist/esm/storage/unpin.js +1 -1
  221. package/dist/esm/storage/upload.js +1 -0
  222. package/dist/esm/storage/upload.js.map +1 -1
  223. package/dist/esm/transaction/actions/to-serializable-transaction.js +1 -1
  224. package/dist/esm/transaction/actions/zksync/send-eip712-transaction.js +5 -0
  225. package/dist/esm/transaction/actions/zksync/send-eip712-transaction.js.map +1 -1
  226. package/dist/esm/utils/any-evm/zksync/isZkSyncChain.js +5 -0
  227. package/dist/esm/utils/any-evm/zksync/isZkSyncChain.js.map +1 -1
  228. package/dist/esm/utils/config.js +9 -0
  229. package/dist/esm/utils/config.js.map +1 -1
  230. package/dist/esm/utils/json.js +6 -2
  231. package/dist/esm/utils/json.js.map +1 -1
  232. package/dist/esm/version.js +1 -1
  233. package/dist/esm/version.js.map +1 -1
  234. package/dist/esm/wallets/eip5792/get-calls-status.js +1 -1
  235. package/dist/esm/wallets/eip5792/get-capabilities.js +1 -1
  236. package/dist/esm/wallets/eip5792/send-calls.js +2 -2
  237. package/dist/esm/wallets/eip5792/wait-for-bundle.js +1 -1
  238. package/dist/esm/wallets/in-app/core/users/getUser.js +1 -1
  239. package/dist/esm/wallets/in-app/web/ecosystem.js +7 -17
  240. package/dist/esm/wallets/in-app/web/ecosystem.js.map +1 -1
  241. package/dist/esm/wallets/in-app/web/in-app.js +2 -17
  242. package/dist/esm/wallets/in-app/web/in-app.js.map +1 -1
  243. package/dist/esm/wallets/in-app/web/lib/auth/index.js +1 -0
  244. package/dist/esm/wallets/in-app/web/lib/auth/index.js.map +1 -1
  245. package/dist/esm/wallets/in-app/web/lib/auth/passkeys.js +18 -17
  246. package/dist/esm/wallets/in-app/web/lib/auth/passkeys.js.map +1 -1
  247. package/dist/esm/wallets/smart/smart-wallet.js +1 -0
  248. package/dist/esm/wallets/smart/smart-wallet.js.map +1 -1
  249. package/dist/types/client/client.d.ts +1 -0
  250. package/dist/types/client/client.d.ts.map +1 -1
  251. package/dist/types/exports/react.d.ts +14 -1
  252. package/dist/types/exports/react.d.ts.map +1 -1
  253. package/dist/types/extensions/erc721/lazyMinting/read/getBatchesToReveal.d.ts +1 -1
  254. package/dist/types/extensions/modules/common/checkModulesCompatibility.d.ts +5 -0
  255. package/dist/types/extensions/modules/common/checkModulesCompatibility.d.ts.map +1 -1
  256. package/dist/types/extensions/pack/createNewPack.d.ts +2 -2
  257. package/dist/types/extensions/pack/createNewPack.d.ts.map +1 -1
  258. package/dist/types/extensions/prebuilts/deploy-pack.d.ts +1 -0
  259. package/dist/types/extensions/prebuilts/deploy-pack.d.ts.map +1 -1
  260. package/dist/types/extensions/thirdweb/write/publish.d.ts +4 -0
  261. package/dist/types/extensions/thirdweb/write/publish.d.ts.map +1 -1
  262. package/dist/types/react/core/hooks/others/useChainQuery.d.ts +3 -3
  263. package/dist/types/react/core/hooks/rpc/useBlockNumber.d.ts +1 -1
  264. package/dist/types/react/core/hooks/wallets/useCapabilities.d.ts +1 -1
  265. package/dist/types/react/core/hooks/wallets/useSendCalls.d.ts +3 -3
  266. package/dist/types/react/core/providers/connection-manager.d.ts +3 -0
  267. package/dist/types/react/core/providers/connection-manager.d.ts.map +1 -1
  268. package/dist/types/react/core/utils/wallet.d.ts +2 -1
  269. package/dist/types/react/core/utils/wallet.d.ts.map +1 -1
  270. package/dist/types/react/core/utils/walletIcon.d.ts +2 -0
  271. package/dist/types/react/core/utils/walletIcon.d.ts.map +1 -1
  272. package/dist/types/react/native/hooks/wallets/useProfiles.d.ts +1 -1
  273. package/dist/types/react/native/providers/thirdweb-provider.d.ts +1 -0
  274. package/dist/types/react/native/providers/thirdweb-provider.d.ts.map +1 -1
  275. package/dist/types/react/native/ui/AutoConnect/AutoConnect.d.ts +1 -0
  276. package/dist/types/react/native/ui/AutoConnect/AutoConnect.d.ts.map +1 -1
  277. package/dist/types/react/native/ui/connect/ConnectModal.d.ts +1 -0
  278. package/dist/types/react/native/ui/connect/ConnectModal.d.ts.map +1 -1
  279. package/dist/types/react/native/ui/transaction/TransactionButton.d.ts +1 -0
  280. package/dist/types/react/native/ui/transaction/TransactionButton.d.ts.map +1 -1
  281. package/dist/types/react/web/hooks/wallets/useProfiles.d.ts +1 -1
  282. package/dist/types/react/web/providers/thirdweb-provider.d.ts +1 -0
  283. package/dist/types/react/web/providers/thirdweb-provider.d.ts.map +1 -1
  284. package/dist/types/react/web/ui/AutoConnect/AutoConnect.d.ts +1 -0
  285. package/dist/types/react/web/ui/AutoConnect/AutoConnect.d.ts.map +1 -1
  286. package/dist/types/react/web/ui/ConnectWallet/Blobbie.d.ts +22 -5
  287. package/dist/types/react/web/ui/ConnectWallet/Blobbie.d.ts.map +1 -1
  288. package/dist/types/react/web/ui/ConnectWallet/ConnectButton.d.ts +2 -1
  289. package/dist/types/react/web/ui/ConnectWallet/ConnectButton.d.ts.map +1 -1
  290. package/dist/types/react/web/ui/ConnectWallet/Details.d.ts.map +1 -1
  291. package/dist/types/react/web/ui/ConnectWallet/Modal/ConnectEmbed.d.ts +1 -0
  292. package/dist/types/react/web/ui/ConnectWallet/Modal/ConnectEmbed.d.ts.map +1 -1
  293. package/dist/types/react/web/ui/ConnectWallet/screens/Buy/BuyScreen.d.ts.map +1 -1
  294. package/dist/types/react/web/ui/ConnectWallet/screens/Buy/TransactionModeScreen.d.ts.map +1 -1
  295. package/dist/types/react/web/ui/ConnectWallet/screens/Buy/main/useBuyTxStates.d.ts.map +1 -1
  296. package/dist/types/react/web/ui/PayEmbed.d.ts +2 -2
  297. package/dist/types/react/web/ui/PayEmbed.d.ts.map +1 -1
  298. package/dist/types/react/web/ui/SiteEmbed.d.ts +3 -2
  299. package/dist/types/react/web/ui/SiteEmbed.d.ts.map +1 -1
  300. package/dist/types/react/web/ui/SiteLink.d.ts +2 -1
  301. package/dist/types/react/web/ui/SiteLink.d.ts.map +1 -1
  302. package/dist/types/react/web/ui/TransactionButton/index.d.ts +1 -0
  303. package/dist/types/react/web/ui/TransactionButton/index.d.ts.map +1 -1
  304. package/dist/types/react/web/ui/prebuilt/Account/address.d.ts +52 -0
  305. package/dist/types/react/web/ui/prebuilt/Account/address.d.ts.map +1 -0
  306. package/dist/types/react/web/ui/prebuilt/Account/avatar.d.ts +142 -0
  307. package/dist/types/react/web/ui/prebuilt/Account/avatar.d.ts.map +1 -0
  308. package/dist/types/react/web/ui/prebuilt/Account/balance.d.ts +137 -0
  309. package/dist/types/react/web/ui/prebuilt/Account/balance.d.ts.map +1 -0
  310. package/dist/types/react/web/ui/prebuilt/Account/blobbie.d.ts +8 -0
  311. package/dist/types/react/web/ui/prebuilt/Account/blobbie.d.ts.map +1 -0
  312. package/dist/types/react/web/ui/prebuilt/Account/name.d.ts +119 -0
  313. package/dist/types/react/web/ui/prebuilt/Account/name.d.ts.map +1 -0
  314. package/dist/types/react/web/ui/prebuilt/Account/provider.d.ts +45 -0
  315. package/dist/types/react/web/ui/prebuilt/Account/provider.d.ts.map +1 -0
  316. package/dist/types/react/web/ui/prebuilt/NFT/description.d.ts +59 -0
  317. package/dist/types/react/web/ui/prebuilt/NFT/description.d.ts.map +1 -0
  318. package/dist/types/react/web/ui/prebuilt/NFT/hooks.d.ts +14 -0
  319. package/dist/types/react/web/ui/prebuilt/NFT/hooks.d.ts.map +1 -0
  320. package/dist/types/react/web/ui/prebuilt/NFT/media.d.ts +75 -0
  321. package/dist/types/react/web/ui/prebuilt/NFT/media.d.ts.map +1 -0
  322. package/dist/types/react/web/ui/prebuilt/NFT/name.d.ts +59 -0
  323. package/dist/types/react/web/ui/prebuilt/NFT/name.d.ts.map +1 -0
  324. package/dist/types/react/web/ui/prebuilt/NFT/provider.d.ts +55 -0
  325. package/dist/types/react/web/ui/prebuilt/NFT/provider.d.ts.map +1 -0
  326. package/dist/types/react/web/ui/prebuilt/Token/icon.d.ts +95 -0
  327. package/dist/types/react/web/ui/prebuilt/Token/icon.d.ts.map +1 -0
  328. package/dist/types/react/web/ui/prebuilt/Token/name.d.ts +140 -0
  329. package/dist/types/react/web/ui/prebuilt/Token/name.d.ts.map +1 -0
  330. package/dist/types/react/web/ui/prebuilt/Token/provider.d.ts +61 -0
  331. package/dist/types/react/web/ui/prebuilt/Token/provider.d.ts.map +1 -0
  332. package/dist/types/react/web/ui/prebuilt/Token/symbol.d.ts +137 -0
  333. package/dist/types/react/web/ui/prebuilt/Token/symbol.d.ts.map +1 -0
  334. package/dist/types/react/web/ui/prebuilt/thirdweb/BuyDirectListingButton/index.d.ts +1 -0
  335. package/dist/types/react/web/ui/prebuilt/thirdweb/BuyDirectListingButton/index.d.ts.map +1 -1
  336. package/dist/types/react/web/ui/prebuilt/thirdweb/ClaimButton/index.d.ts +1 -0
  337. package/dist/types/react/web/ui/prebuilt/thirdweb/ClaimButton/index.d.ts.map +1 -1
  338. package/dist/types/react/web/ui/prebuilt/thirdweb/CreateDirectListingButton/index.d.ts +1 -0
  339. package/dist/types/react/web/ui/prebuilt/thirdweb/CreateDirectListingButton/index.d.ts.map +1 -1
  340. package/dist/types/storage/unpin.d.ts +1 -1
  341. package/dist/types/storage/upload.d.ts +1 -0
  342. package/dist/types/storage/upload.d.ts.map +1 -1
  343. package/dist/types/transaction/actions/to-serializable-transaction.d.ts +1 -1
  344. package/dist/types/transaction/actions/zksync/send-eip712-transaction.d.ts +5 -0
  345. package/dist/types/transaction/actions/zksync/send-eip712-transaction.d.ts.map +1 -1
  346. package/dist/types/utils/any-evm/zksync/isZkSyncChain.d.ts +5 -0
  347. package/dist/types/utils/any-evm/zksync/isZkSyncChain.d.ts.map +1 -1
  348. package/dist/types/utils/config.d.ts +9 -0
  349. package/dist/types/utils/config.d.ts.map +1 -1
  350. package/dist/types/utils/json.d.ts +1 -1
  351. package/dist/types/utils/json.d.ts.map +1 -1
  352. package/dist/types/version.d.ts +1 -1
  353. package/dist/types/version.d.ts.map +1 -1
  354. package/dist/types/wallets/eip5792/get-calls-status.d.ts +1 -1
  355. package/dist/types/wallets/eip5792/get-capabilities.d.ts +1 -1
  356. package/dist/types/wallets/eip5792/send-calls.d.ts +2 -2
  357. package/dist/types/wallets/eip5792/wait-for-bundle.d.ts +1 -1
  358. package/dist/types/wallets/in-app/core/users/getUser.d.ts +1 -1
  359. package/dist/types/wallets/in-app/web/ecosystem.d.ts +7 -17
  360. package/dist/types/wallets/in-app/web/ecosystem.d.ts.map +1 -1
  361. package/dist/types/wallets/in-app/web/in-app.d.ts +2 -17
  362. package/dist/types/wallets/in-app/web/in-app.d.ts.map +1 -1
  363. package/dist/types/wallets/in-app/web/lib/auth/index.d.ts +1 -0
  364. package/dist/types/wallets/in-app/web/lib/auth/index.d.ts.map +1 -1
  365. package/dist/types/wallets/in-app/web/lib/auth/passkeys.d.ts.map +1 -1
  366. package/dist/types/wallets/smart/smart-wallet.d.ts +1 -0
  367. package/dist/types/wallets/smart/smart-wallet.d.ts.map +1 -1
  368. package/package.json +2 -2
  369. package/src/client/client.ts +1 -0
  370. package/src/exports/react.ts +56 -2
  371. package/src/extensions/erc721/lazyMinting/read/getBatchesToReveal.ts +1 -1
  372. package/src/extensions/modules/common/checkModulesCompatibility.ts +5 -0
  373. package/src/extensions/pack/createNewPack.ts +8 -3
  374. package/src/extensions/prebuilts/deploy-pack.ts +1 -0
  375. package/src/extensions/thirdweb/write/publish.ts +4 -0
  376. package/src/react/core/hooks/others/useChainQuery.ts +3 -3
  377. package/src/react/core/hooks/rpc/useBlockNumber.ts +1 -1
  378. package/src/react/core/hooks/wallets/useCapabilities.ts +1 -1
  379. package/src/react/core/hooks/wallets/useSendCalls.ts +3 -3
  380. package/src/react/core/providers/connection-manager.tsx +3 -0
  381. package/src/react/core/utils/wallet.ts +2 -1
  382. package/src/react/core/utils/walletIcon.ts +2 -0
  383. package/src/react/native/hooks/wallets/useProfiles.ts +1 -1
  384. package/src/react/native/providers/thirdweb-provider.tsx +1 -0
  385. package/src/react/native/ui/AutoConnect/AutoConnect.tsx +1 -0
  386. package/src/react/native/ui/connect/ConnectModal.tsx +1 -0
  387. package/src/react/native/ui/transaction/TransactionButton.tsx +1 -0
  388. package/src/react/web/hooks/wallets/useProfiles.ts +1 -1
  389. package/src/react/web/providers/thirdweb-provider.tsx +1 -0
  390. package/src/react/web/ui/AutoConnect/AutoConnect.tsx +1 -0
  391. package/src/react/web/ui/ConnectWallet/Blobbie.tsx +31 -4
  392. package/src/react/web/ui/ConnectWallet/ConnectButton.tsx +36 -32
  393. package/src/react/web/ui/ConnectWallet/Details.tsx +91 -58
  394. package/src/react/web/ui/ConnectWallet/Modal/ConnectEmbed.tsx +1 -0
  395. package/src/react/web/ui/ConnectWallet/screens/Buy/BuyScreen.tsx +23 -0
  396. package/src/react/web/ui/ConnectWallet/screens/Buy/TransactionModeScreen.tsx +43 -2
  397. package/src/react/web/ui/ConnectWallet/screens/Buy/main/useBuyTxStates.ts +2 -3
  398. package/src/react/web/ui/PayEmbed.tsx +2 -2
  399. package/src/react/web/ui/SiteEmbed.tsx +3 -2
  400. package/src/react/web/ui/SiteLink.tsx +2 -1
  401. package/src/react/web/ui/TransactionButton/index.tsx +1 -0
  402. package/src/react/web/ui/prebuilt/Account/address.test.tsx +28 -0
  403. package/src/react/web/ui/prebuilt/Account/address.tsx +64 -0
  404. package/src/react/web/ui/prebuilt/Account/avatar.test.tsx +48 -0
  405. package/src/react/web/ui/prebuilt/Account/avatar.tsx +221 -0
  406. package/src/react/web/ui/prebuilt/Account/balance.test.tsx +54 -0
  407. package/src/react/web/ui/prebuilt/Account/balance.tsx +202 -0
  408. package/src/react/web/ui/prebuilt/Account/blobbie.tsx +12 -0
  409. package/src/react/web/ui/prebuilt/Account/name.test.tsx +62 -0
  410. package/src/react/web/ui/prebuilt/Account/name.tsx +175 -0
  411. package/src/react/web/ui/prebuilt/Account/provider.test.tsx +38 -0
  412. package/src/react/web/ui/prebuilt/Account/provider.tsx +69 -0
  413. package/src/react/web/ui/prebuilt/NFT/NFT.test.tsx +17 -14
  414. package/src/react/web/ui/prebuilt/NFT/description.tsx +87 -0
  415. package/src/react/web/ui/prebuilt/NFT/hooks.tsx +53 -0
  416. package/src/react/web/ui/prebuilt/NFT/media.tsx +119 -0
  417. package/src/react/web/ui/prebuilt/NFT/name.tsx +85 -0
  418. package/src/react/web/ui/prebuilt/NFT/provider.tsx +75 -0
  419. package/src/react/web/ui/prebuilt/Token/icon.tsx +164 -0
  420. package/src/react/web/ui/prebuilt/Token/name.tsx +201 -0
  421. package/src/react/web/ui/prebuilt/Token/provider.tsx +86 -0
  422. package/src/react/web/ui/prebuilt/Token/symbol.tsx +201 -0
  423. package/src/react/web/ui/prebuilt/thirdweb/BuyDirectListingButton/index.tsx +1 -0
  424. package/src/react/web/ui/prebuilt/thirdweb/ClaimButton/index.tsx +1 -0
  425. package/src/react/web/ui/prebuilt/thirdweb/CreateDirectListingButton/index.tsx +1 -0
  426. package/src/storage/unpin.ts +1 -1
  427. package/src/storage/upload.ts +1 -0
  428. package/src/transaction/actions/to-serializable-transaction.ts +1 -1
  429. package/src/transaction/actions/zksync/send-eip712-transaction.ts +5 -0
  430. package/src/utils/any-evm/zksync/isZkSyncChain.ts +5 -0
  431. package/src/utils/config.ts +9 -0
  432. package/src/utils/json.ts +8 -2
  433. package/src/version.ts +1 -1
  434. package/src/wallets/eip5792/get-calls-status.ts +1 -1
  435. package/src/wallets/eip5792/get-capabilities.ts +1 -1
  436. package/src/wallets/eip5792/send-calls.ts +2 -2
  437. package/src/wallets/eip5792/wait-for-bundle.ts +1 -1
  438. package/src/wallets/in-app/core/users/getUser.ts +1 -1
  439. package/src/wallets/in-app/web/ecosystem.ts +7 -17
  440. package/src/wallets/in-app/web/in-app.ts +2 -17
  441. package/src/wallets/in-app/web/lib/auth/index.ts +1 -0
  442. package/src/wallets/in-app/web/lib/auth/passkeys.ts +24 -23
  443. package/src/wallets/smart/smart-wallet.ts +1 -0
  444. package/dist/cjs/react/web/ui/prebuilt/NFT/NFT.js +0 -217
  445. package/dist/cjs/react/web/ui/prebuilt/NFT/NFT.js.map +0 -1
  446. package/dist/esm/react/web/ui/prebuilt/NFT/NFT.js +0 -212
  447. package/dist/esm/react/web/ui/prebuilt/NFT/NFT.js.map +0 -1
  448. package/dist/types/react/web/ui/prebuilt/NFT/NFT.d.ts +0 -76
  449. package/dist/types/react/web/ui/prebuilt/NFT/NFT.d.ts.map +0 -1
  450. package/src/extensions/prebuilts/deploy-published.test.ts +0 -132
  451. package/src/react/web/ui/prebuilt/NFT/NFT.tsx +0 -272
  452. package/src/wallets/smart/smart-wallet-integration-v07.test.ts +0 -270
  453. package/src/wallets/smart/smart-wallet-integration.test.ts +0 -375
@@ -18,6 +18,11 @@ import {
18
18
  FN_SELECTOR as getModuleConfigSelector,
19
19
  } from "../__generated__/IModule/read/getModuleConfig.js";
20
20
 
21
+ /**
22
+ * Check if the given modules are compatible with the given core contract
23
+ * @param options
24
+ * @modules
25
+ */
21
26
  export async function checkModulesCompatibility(options: {
22
27
  coreBytecode: string;
23
28
  moduleBytecodes: string[];
@@ -1,7 +1,10 @@
1
1
  import type { ThirdwebClient } from "../../client/client.js";
2
2
  import { type ThirdwebContract, getContract } from "../../contract/contract.js";
3
3
  import { upload } from "../../storage/upload.js";
4
- import type { BaseTransactionOptions } from "../../transaction/types.js";
4
+ import type {
5
+ BaseTransactionOptions,
6
+ WithOverrides,
7
+ } from "../../transaction/types.js";
5
8
  import type { NFTInput } from "../../utils/nft/parseNft.js";
6
9
  import { toUnits } from "../../utils/units.js";
7
10
  import type { AddPackContentsParams } from "./__generated__/IPack/write/addPackContents.js";
@@ -114,7 +117,7 @@ export type CreateNewPackParams = {
114
117
  * ```
115
118
  */
116
119
  export function createNewPack(
117
- options: BaseTransactionOptions<CreateNewPackParams>,
120
+ options: WithOverrides<BaseTransactionOptions<CreateNewPackParams>>,
118
121
  ) {
119
122
  return createPack({
120
123
  contract: options.contract,
@@ -126,7 +129,7 @@ export function createNewPack(
126
129
  * @internal
127
130
  */
128
131
  async function getCreatePackParams(
129
- options: BaseTransactionOptions<CreateNewPackParams>,
132
+ options: WithOverrides<BaseTransactionOptions<CreateNewPackParams>>,
130
133
  ): Promise<CreatePackParams> {
131
134
  const {
132
135
  contract,
@@ -138,6 +141,7 @@ async function getCreatePackParams(
138
141
  erc721Rewards,
139
142
  erc1155Rewards,
140
143
  tokenOwner,
144
+ overrides,
141
145
  } = options;
142
146
  const [erc20Content, erc721Content, erc1155Content, packUri] =
143
147
  await Promise.all([
@@ -179,6 +183,7 @@ async function getCreatePackParams(
179
183
  // openStartTimestamp should be in seconds and not millisecond
180
184
  openStartTimestamp: BigInt(Math.ceil(openStartTimestamp.getTime() / 1000)),
181
185
  amountDistributedPerOpen,
186
+ overrides,
182
187
  };
183
188
  }
184
189
 
@@ -73,6 +73,7 @@ export type DeployPackContractOptions = Prettify<
73
73
  * },
74
74
  * });
75
75
  * ```
76
+ * @extension DEPLOY
76
77
  */
77
78
  export async function deployPackContract(options: DeployPackContractOptions) {
78
79
  const { chain, client, account, params } = options;
@@ -113,6 +113,10 @@ export function publishContract(
113
113
  });
114
114
  }
115
115
 
116
+ /**
117
+ * Returns the default publisher contract on polygon
118
+ * @utils
119
+ */
116
120
  export function getContractPublisher(client: ThirdwebClient) {
117
121
  return getContract({
118
122
  client,
@@ -144,13 +144,13 @@ function getQueryOptions(chain?: Chain) {
144
144
  }
145
145
 
146
146
  /**
147
- * @description Retrieves metadata for a chain such as name, icon, available faucets, block explorers, etc.
147
+ * Retrieves metadata for a chain such as name, icon, available faucets, block explorers, etc.
148
148
  *
149
149
  * @param chain - Chain to retrieve metadata for, see [defineChain](https://portal.thirdweb.com/references/typescript/v5/defineChain) for how to create a chain from a chain ID.
150
- * @returns A React Query result containing the chain metadata, @see {@link ChainMetadata}.
150
+ * @returns A React Query result containing the chain metadata
151
151
  *
152
152
  * @example
153
- * ```jsx
153
+ * ```
154
154
  * import { useChainMetadata } from "thirdweb/react";
155
155
  *
156
156
  * const { data: chainMetadata } = useChainMetadata(defineChain(11155111));
@@ -18,7 +18,7 @@ export type UseBlockNumberOptions = {
18
18
  * @param options - The options for the hook.
19
19
  * @returns The latest block number.
20
20
  * @example
21
- * ```jsx
21
+ * ```ts
22
22
  * import { useBlockNumber } from "thirdweb/react";
23
23
  * const blockNumber = useBlockNumber({client, chain});
24
24
  * ```
@@ -8,7 +8,7 @@ import { useActiveWallet } from "./useActiveWallet.js";
8
8
  /**
9
9
  * A hook to get the current wallet's capabilities according to [EIP-5792](https://eips.ethereum.org/EIPS/eip-5792).
10
10
  *
11
- * @note This function is dependent on the wallet's support for EIP-5792, but will not throw.
11
+ * This function is dependent on the wallet's support for EIP-5792, but will not throw.
12
12
  * **The returned object contains a `message` field detailing any issues with the wallet's support for EIP-5792.**
13
13
  *
14
14
  * @returns a React Query object.
@@ -24,8 +24,8 @@ import { useActiveWallet } from "./useActiveWallet.js";
24
24
  *
25
25
  * When calls are sent, all contracts that are interacted with will have their corresponding reads revalidated via React Query.
26
26
  *
27
- * @note This hook is dependent on the wallet's support for EIP-5792 and could fail.
28
- * @note The mutatuon function will use your currently connected wallet by default, but you can pass it a specific wallet to use if you'd like.
27
+ * This hook is dependent on the wallet's support for EIP-5792 and could fail.
28
+ * The mutatuon function will use your currently connected wallet by default, but you can pass it a specific wallet to use if you'd like.
29
29
  *
30
30
  * @returns A React Query mutatuon object to interact with {@link sendCalls}
31
31
  * @throws an error if the wallet does not support EIP-5792.
@@ -76,7 +76,7 @@ import { useActiveWallet } from "./useActiveWallet.js";
76
76
  * });
77
77
  * ```
78
78
  *
79
- * @note We recommend proxying any paymaster calls via an API route you setup and control.
79
+ * We recommend proxying any paymaster calls via an API route you setup and control.
80
80
  * @extension EIP5792
81
81
  */
82
82
  export function useSendCalls({
@@ -7,6 +7,9 @@ export const ConnectionManagerCtx = createContext<
7
7
  ConnectionManager | undefined
8
8
  >(undefined);
9
9
 
10
+ /**
11
+ * @internal
12
+ */
10
13
  export function useConnectionManager() {
11
14
  const connectionManager = useConnectionManagerCtx("useConnectionManager");
12
15
  if (!connectionManager) {
@@ -77,7 +77,8 @@ export function useEnsAvatar(options: {
77
77
  }
78
78
 
79
79
  /**
80
- * @internal
80
+ * @internal This hook is only being used in our react-native package
81
+ * It can be removed once we migrate the RN UI code to our headless components (AccountProvider, AccountName etc.)
81
82
  */
82
83
  export function useConnectedWalletDetails(
83
84
  client: ThirdwebClient,
@@ -62,6 +62,8 @@ export const socialIcons = {
62
62
  * const googleIcon = getSocialIcon("google")
63
63
  * const appleIcon = getSocialIcon("apple")
64
64
  * ```
65
+ *
66
+ * @walletUtils
65
67
  */
66
68
  export function getSocialIcon(provider: AuthOption | ({} & string)): string {
67
69
  switch (provider) {
@@ -10,7 +10,7 @@ import { useAdminWallet } from "../../../core/hooks/wallets/useAdminWallet.js";
10
10
  * Retrieves all linked profiles of the connected in-app or ecosystem account.
11
11
  *
12
12
  * @returns A React Query result containing the linked profiles for the connected in-app account.
13
- * @note This hook will only run if the connected wallet supports account linking.
13
+ * This hook will only run if the connected wallet supports account linking.
14
14
  *
15
15
  * @example
16
16
  * ```jsx
@@ -23,6 +23,7 @@ import { ThirdwebProviderCore } from "../../core/providers/thirdweb-provider.js"
23
23
  * }
24
24
  * ```
25
25
  * @component
26
+ * @walletConnection
26
27
  */
27
28
  export function ThirdwebProvider(
28
29
  props: React.PropsWithChildren<{
@@ -32,6 +32,7 @@ import { useAutoConnect } from "../../hooks/wallets/useAutoConnect.js";
32
32
  * }
33
33
  * ```
34
34
  * @component
35
+ * @walletConnection
35
36
  */
36
37
  export function AutoConnect(props: AutoConnectProps) {
37
38
  useAutoConnect(props);
@@ -61,6 +61,7 @@ export type ModalState =
61
61
  *
62
62
  * Refer to the [`ConnectEmbedProps`](https://portal.thirdweb.com/references/typescript/v5/ConnectEmbedProps) type for more details
63
63
  * @component
64
+ * @walletConnection
64
65
  */
65
66
  export function ConnectEmbed(props: ConnectEmbedProps) {
66
67
  const theme = parseTheme(props.theme);
@@ -25,6 +25,7 @@ import { ThemedSpinner } from "../components/spinner.js";
25
25
  * </TransactionButton>
26
26
  * ```
27
27
  * @component
28
+ * @transaction
28
29
  */
29
30
  export function TransactionButton(props: TransactionButtonProps) {
30
31
  const {
@@ -10,7 +10,7 @@ import { useAdminWallet } from "../../../core/hooks/wallets/useAdminWallet.js";
10
10
  * Retrieves all linked profiles of the connected in-app or ecosystem account.
11
11
  *
12
12
  * @returns A React Query result containing the linked profiles for the connected in-app account.
13
- * @note This hook will only run if the connected wallet supports account linking.
13
+ * This hook will only run if the connected wallet supports account linking.
14
14
  *
15
15
  * @example
16
16
  * ```jsx
@@ -23,6 +23,7 @@ import { ThirdwebProviderCore } from "../../core/providers/thirdweb-provider.js"
23
23
  * }
24
24
  * ```
25
25
  * @component
26
+ * @walletConnection
26
27
  */
27
28
  export function ThirdwebProvider(
28
29
  props: React.PropsWithChildren<{
@@ -37,6 +37,7 @@ import { useAutoConnect } from "../../hooks/wallets/useAutoConnect.js";
37
37
  * }
38
38
  * ```
39
39
  * @component
40
+ * @walletConnection
40
41
  */
41
42
  export function AutoConnect(props: AutoConnectProps) {
42
43
  useAutoConnect(props);
@@ -21,13 +21,34 @@ const COLOR_OPTIONS = [
21
21
  ["#fda4af", "#be123c"],
22
22
  ];
23
23
 
24
+ /**
25
+ * Props for the Blobbie component
26
+ * @component
27
+ */
28
+ export type BlobbieProps = {
29
+ address: Address;
30
+ style?: Omit<React.CSSProperties, "backgroundImage">;
31
+ className?: string;
32
+ size?: number;
33
+ };
34
+
24
35
  /**
25
36
  * A unique gradient avatar based on the provided address.
26
37
  * @param props The component props.
27
38
  * @param props.address The address to generate the gradient with.
28
- * @param props.size The size of each side of the square avatar (in pixels)
39
+ * @param props.style The CSS style for the component - excluding `backgroundImage`
40
+ * @param props.className The className for the component
41
+ * @param props.size The size of each side of the square avatar (in pixels). This prop will override the `width` and `height` attributes from the `style` prop.
42
+ * @component
43
+ * @wallet
44
+ * @example
45
+ * ```tsx
46
+ * import { Blobbie } from "thirdweb/react";
47
+ *
48
+ * <Blobbie address="0x...." className="w-10 h-10" />
49
+ * ```
29
50
  */
30
- export function Blobbie(props: { address: Address; size: number }) {
51
+ export function Blobbie(props: BlobbieProps) {
31
52
  const id = useId();
32
53
  const colors = useMemo(
33
54
  () =>
@@ -41,10 +62,16 @@ export function Blobbie(props: { address: Address; size: number }) {
41
62
  <div
42
63
  id={id}
43
64
  style={{
44
- width: `${props.size}px`,
45
- height: `${props.size}px`,
65
+ ...props.style,
46
66
  backgroundImage: `radial-gradient(ellipse at left bottom, ${colors[0]}, ${colors[1]})`,
67
+ ...(props.size
68
+ ? {
69
+ width: `${props.size}px`,
70
+ height: `${props.size}px`,
71
+ }
72
+ : undefined),
47
73
  }}
74
+ className={props.className}
48
75
  />
49
76
  );
50
77
  }
@@ -23,6 +23,7 @@ import { Spinner } from "../components/Spinner.js";
23
23
  import { Container } from "../components/basic.js";
24
24
  import { Button } from "../components/buttons.js";
25
25
  import { fadeInAnimation } from "../design-system/animations.js";
26
+ import { AccountProvider } from "../prebuilt/Account/provider.js";
26
27
  import { ConnectedWalletDetails } from "./Details.js";
27
28
  import ConnectModal from "./Modal/ConnectModal.js";
28
29
  import { LockIcon } from "./icons/LockIcon.js";
@@ -187,7 +188,7 @@ const TW_CONNECT_WALLET = "tw-connect-wallet";
187
188
  * client={client}
188
189
  * connectModal={{
189
190
  * title: "Sign in to MyApp",
190
- * titleIcon: https://example.com/logo.png,
191
+ * titleIcon: "https://example.com/logo.png",
191
192
  * size: "compact",
192
193
  * }}
193
194
  * />
@@ -269,6 +270,7 @@ const TW_CONNECT_WALLET = "tw-connect-wallet";
269
270
  * @returns A JSX element that renders the <ConnectButton> component.
270
271
  *
271
272
  * @component
273
+ * @walletConnection
272
274
  */
273
275
  export function ConnectButton(props: ConnectButtonProps) {
274
276
  const wallets = useMemo(
@@ -531,37 +533,39 @@ function ConnectButtonInner(
531
533
  }
532
534
 
533
535
  return (
534
- <ConnectedWalletDetails
535
- theme={theme}
536
- detailsButton={props.detailsButton}
537
- detailsModal={props.detailsModal}
538
- supportedTokens={supportedTokens}
539
- supportedNFTs={props.supportedNFTs}
540
- onDisconnect={(info) => {
541
- // logout on explicit disconnect!
542
- if (siweAuth.requiresAuth) {
543
- siweAuth.doLogout();
544
- }
545
- props.onDisconnect?.(info);
546
- }}
547
- chains={props?.chains || []}
548
- chain={props.chain}
549
- switchButton={props.switchButton}
550
- client={props.client}
551
- connectLocale={locale}
552
- connectOptions={{
553
- accountAbstraction: props.accountAbstraction,
554
- appMetadata: props.appMetadata,
555
- chain: props.chain,
556
- chains: props.chains,
557
- connectModal: props.connectModal,
558
- recommendedWallets: props.recommendedWallets,
559
- showAllWallets: props.showAllWallets,
560
- walletConnect: props.walletConnect,
561
- wallets: props.wallets,
562
- hiddenWallets: props.detailsModal?.hiddenWallets,
563
- }}
564
- />
536
+ <AccountProvider address={activeAccount.address} client={props.client}>
537
+ <ConnectedWalletDetails
538
+ theme={theme}
539
+ detailsButton={props.detailsButton}
540
+ detailsModal={props.detailsModal}
541
+ supportedTokens={supportedTokens}
542
+ supportedNFTs={props.supportedNFTs}
543
+ onDisconnect={(info) => {
544
+ // logout on explicit disconnect!
545
+ if (siweAuth.requiresAuth) {
546
+ siweAuth.doLogout();
547
+ }
548
+ props.onDisconnect?.(info);
549
+ }}
550
+ chains={props?.chains || []}
551
+ chain={props.chain}
552
+ switchButton={props.switchButton}
553
+ client={props.client}
554
+ connectLocale={locale}
555
+ connectOptions={{
556
+ accountAbstraction: props.accountAbstraction,
557
+ appMetadata: props.appMetadata,
558
+ chain: props.chain,
559
+ chains: props.chains,
560
+ connectModal: props.connectModal,
561
+ recommendedWallets: props.recommendedWallets,
562
+ showAllWallets: props.showAllWallets,
563
+ walletConnect: props.walletConnect,
564
+ wallets: props.wallets,
565
+ hiddenWallets: props.detailsModal?.hiddenWallets,
566
+ }}
567
+ />
568
+ </AccountProvider>
565
569
  );
566
570
  }
567
571
 
@@ -15,6 +15,7 @@ import type { Chain } from "../../../../chains/types.js";
15
15
  import type { ThirdwebClient } from "../../../../client/client.js";
16
16
  import { getContract } from "../../../../contract/contract.js";
17
17
  import { getLastAuthProvider } from "../../../../react/core/utils/storage.js";
18
+ import { shortenAddress } from "../../../../utils/address.js";
18
19
  import { isContractDeployed } from "../../../../utils/bytecode/is-contract-deployed.js";
19
20
  import { formatNumber } from "../../../../utils/formatNumber.js";
20
21
  import { webLocalStorage } from "../../../../utils/storage/webStorage.js";
@@ -67,10 +68,7 @@ import type {
67
68
  SupportedTokens,
68
69
  } from "../../../core/utils/defaultTokens.js";
69
70
  import { hasSmartAccount } from "../../../core/utils/isSmartWallet.js";
70
- import {
71
- useConnectedWalletDetails,
72
- useWalletInfo,
73
- } from "../../../core/utils/wallet.js";
71
+ import { useWalletInfo } from "../../../core/utils/wallet.js";
74
72
  import { WalletUIStatesProvider } from "../../providers/wallet-ui-states-provider.js";
75
73
  import { ChainIcon } from "../components/ChainIcon.js";
76
74
  import { CopyIcon } from "../components/CopyIcon.js";
@@ -86,8 +84,13 @@ import { Button, IconButton } from "../components/buttons.js";
86
84
  import { Link, Text } from "../components/text.js";
87
85
  import { fadeInAnimation } from "../design-system/animations.js";
88
86
  import { StyledButton } from "../design-system/elements.js";
87
+ import { AccountAddress } from "../prebuilt/Account/address.js";
88
+ import { AccountAvatar } from "../prebuilt/Account/avatar.js";
89
+ import { AccountBalance } from "../prebuilt/Account/balance.js";
90
+ import { AccountBlobbie } from "../prebuilt/Account/blobbie.js";
91
+ import { AccountName } from "../prebuilt/Account/name.js";
92
+ import { AccountProvider } from "../prebuilt/Account/provider.js";
89
93
  import type { LocaleId } from "../types.js";
90
- import { Blobbie } from "./Blobbie.js";
91
94
  import { MenuButton, MenuLink } from "./MenuButton.js";
92
95
  import { ScreenSetupContext, useSetupScreen } from "./Modal/screen.js";
93
96
  import {
@@ -140,18 +143,10 @@ export const ConnectedWalletDetails: React.FC<{
140
143
  connectOptions: DetailsModalConnectOptions | undefined;
141
144
  }> = (props) => {
142
145
  const { connectLocale: locale, client } = props;
143
-
144
146
  const setRootEl = useContext(SetRootElementContext);
145
147
  const activeAccount = useActiveAccount();
146
148
  const walletChain = useActiveWalletChain();
147
149
 
148
- const { pfp, name, balanceQuery } = useConnectedWalletDetails(
149
- client,
150
- walletChain,
151
- activeAccount,
152
- props.detailsButton?.displayBalanceToken,
153
- );
154
-
155
150
  function closeModal() {
156
151
  setRootEl(null);
157
152
  }
@@ -199,8 +194,6 @@ export const ConnectedWalletDetails: React.FC<{
199
194
  );
200
195
  }
201
196
 
202
- const avatarSrc = props.detailsButton?.connectedAccountAvatarUrl || pfp;
203
-
204
197
  const combinedClassName = `${TW_CONNECTED_WALLET} ${props.detailsButton?.className || ""}`;
205
198
 
206
199
  return (
@@ -219,10 +212,10 @@ export const ConnectedWalletDetails: React.FC<{
219
212
  height: "35px",
220
213
  }}
221
214
  >
222
- {avatarSrc ? (
215
+ {props.detailsButton?.connectedAccountAvatarUrl ? (
223
216
  <img
224
217
  alt=""
225
- src={avatarSrc}
218
+ src={props.detailsButton.connectedAccountAvatarUrl}
226
219
  style={{
227
220
  height: "100%",
228
221
  width: "100%",
@@ -230,7 +223,16 @@ export const ConnectedWalletDetails: React.FC<{
230
223
  }}
231
224
  />
232
225
  ) : (
233
- activeAccount && <Blobbie address={activeAccount.address} size={35} />
226
+ activeAccount && (
227
+ <AccountAvatar
228
+ loadingComponent={<AccountBlobbie size={35} />}
229
+ fallbackComponent={<AccountBlobbie size={35} />}
230
+ queryOptions={{
231
+ refetchOnWindowFocus: false,
232
+ refetchOnMount: false,
233
+ }}
234
+ />
235
+ )
234
236
  )}
235
237
  </Container>
236
238
  <Container
@@ -243,29 +245,47 @@ export const ConnectedWalletDetails: React.FC<{
243
245
  }}
244
246
  >
245
247
  {/* Address */}
246
- <Text
247
- size="xs"
248
- color="primaryText"
249
- weight={500}
250
- className={`${TW_CONNECTED_WALLET}__address`}
251
- >
252
- {props.detailsButton?.connectedAccountName ?? name}
253
- </Text>
254
-
255
- {/* Balance */}
256
- {balanceQuery.data ? (
248
+ {props.detailsButton?.connectedAccountName ? (
257
249
  <Text
258
- className={`${TW_CONNECTED_WALLET}__balance`}
259
250
  size="xs"
260
- color="secondaryText"
261
- weight={400}
251
+ color="primaryText"
252
+ weight={500}
253
+ className={`${TW_CONNECTED_WALLET}__address`}
262
254
  >
263
- {formatBalanceOnButton(Number(balanceQuery.data.displayValue))}{" "}
264
- {balanceQuery.data.symbol}
255
+ {props.detailsButton.connectedAccountName}
265
256
  </Text>
266
257
  ) : (
267
- <Skeleton height={fontSize.xs} width="70px" />
258
+ <Text
259
+ size="xs"
260
+ color="primaryText"
261
+ weight={500}
262
+ className={`${TW_CONNECTED_WALLET}__address`}
263
+ >
264
+ <AccountName
265
+ loadingComponent={<AccountAddress formatFn={shortenAddress} />}
266
+ fallbackComponent={<AccountAddress formatFn={shortenAddress} />}
267
+ />
268
+ </Text>
268
269
  )}
270
+
271
+ <Text
272
+ className={`${TW_CONNECTED_WALLET}__balance`}
273
+ size="xs"
274
+ color="secondaryText"
275
+ weight={400}
276
+ >
277
+ <AccountBalance
278
+ chain={walletChain}
279
+ loadingComponent={<Skeleton height={fontSize.xs} width="70px" />}
280
+ fallbackComponent={<Skeleton height={fontSize.xs} width="70px" />}
281
+ formatFn={formatBalanceOnButton}
282
+ tokenAddress={
283
+ props.detailsButton?.displayBalanceToken?.[
284
+ Number(walletChain?.id)
285
+ ]
286
+ }
287
+ />
288
+ </Text>
269
289
  </Container>
270
290
  </WalletInfoButton>
271
291
  );
@@ -295,12 +315,6 @@ function DetailsModal(props: {
295
315
  const { client, locale } = props;
296
316
  const walletChain = useActiveWalletChain();
297
317
  const activeAccount = useActiveAccount();
298
- const { pfp, name, balanceQuery } = useConnectedWalletDetails(
299
- client,
300
- walletChain,
301
- activeAccount,
302
- props.displayBalanceToken,
303
- );
304
318
  const theme = parseTheme(props.theme);
305
319
 
306
320
  const activeWallet = useActiveWallet();
@@ -363,12 +377,15 @@ function DetailsModal(props: {
363
377
  <Text color="primaryText" size="md" multiline>
364
378
  {chainNameQuery.name || `Unknown chain #${walletChain?.id}`}
365
379
  <Text color="secondaryText" size="xs">
366
- {balanceQuery.data ? (
367
- formatNumber(Number(balanceQuery.data.displayValue), 9)
368
- ) : (
369
- <Skeleton height="1em" width="100px" />
370
- )}{" "}
371
- {balanceQuery.data?.symbol}
380
+ <AccountBalance
381
+ fallbackComponent={<Skeleton height="1em" width="100px" />}
382
+ loadingComponent={<Skeleton height="1em" width="100px" />}
383
+ formatFn={(num: number) => formatNumber(num, 9)}
384
+ chain={walletChain}
385
+ tokenAddress={
386
+ props.displayBalanceToken?.[Number(walletChain?.id)]
387
+ }
388
+ />
372
389
  </Text>
373
390
  </Text>
374
391
  )}
@@ -384,8 +401,6 @@ function DetailsModal(props: {
384
401
  </MenuButton>
385
402
  );
386
403
 
387
- const avatarSrc = props.detailsModal?.connectedAccountAvatarUrl ?? pfp;
388
-
389
404
  const { hideSendFunds, hideReceiveFunds, hideBuyFunds } =
390
405
  props.detailsModal || {};
391
406
 
@@ -407,9 +422,9 @@ function DetailsModal(props: {
407
422
  overflow: "hidden",
408
423
  }}
409
424
  >
410
- {avatarSrc ? (
425
+ {props.detailsModal?.connectedAccountAvatarUrl ? (
411
426
  <img
412
- src={avatarSrc}
427
+ src={props.detailsModal.connectedAccountAvatarUrl}
413
428
  style={{
414
429
  height: "100%",
415
430
  width: "100%",
@@ -419,9 +434,9 @@ function DetailsModal(props: {
419
434
  />
420
435
  ) : (
421
436
  activeAccount && (
422
- <Blobbie
423
- address={activeAccount.address}
424
- size={Number(iconSize.xxl)}
437
+ <AccountAvatar
438
+ loadingComponent={<AccountBlobbie size={Number(iconSize.xxl)} />}
439
+ fallbackComponent={<AccountBlobbie size={Number(iconSize.xxl)} />}
425
440
  />
426
441
  )
427
442
  )}
@@ -496,9 +511,22 @@ function DetailsModal(props: {
496
511
  alignItems: "center",
497
512
  }}
498
513
  >
499
- <Text color="primaryText" weight={500} size="md">
500
- {props.detailsModal?.connectedAccountName ?? name}
501
- </Text>
514
+ {props.detailsModal?.connectedAccountName ? (
515
+ <Text color="primaryText" weight={500} size="md">
516
+ {props.detailsModal.connectedAccountName}
517
+ </Text>
518
+ ) : (
519
+ <Text color="primaryText" weight={500} size="md">
520
+ <AccountName
521
+ loadingComponent={
522
+ <AccountAddress formatFn={shortenAddress} />
523
+ }
524
+ fallbackComponent={
525
+ <AccountAddress formatFn={shortenAddress} />
526
+ }
527
+ />
528
+ </Text>
529
+ )}
502
530
  <IconButton>
503
531
  <CopyIcon
504
532
  text={activeAccount?.address || ""}
@@ -964,7 +992,12 @@ function DetailsModal(props: {
964
992
  }
965
993
  }}
966
994
  >
967
- {content}
995
+ <AccountProvider
996
+ address={activeAccount?.address || ""}
997
+ client={client}
998
+ >
999
+ {content}
1000
+ </AccountProvider>
968
1001
  </Modal>
969
1002
  </ScreenSetupContext.Provider>
970
1003
  </WalletUIStatesProvider>