thirdweb 5.61.5 → 5.61.7-nightly-da9f1964e4ae74ed5d33666788e2d16e4d56614d-20241015000333

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 (208) hide show
  1. package/dist/cjs/contract/deployment/deploy-with-abi.js +13 -0
  2. package/dist/cjs/contract/deployment/deploy-with-abi.js.map +1 -1
  3. package/dist/cjs/exports/extensions/unstoppable-domains.js +6 -1
  4. package/dist/cjs/exports/extensions/unstoppable-domains.js.map +1 -1
  5. package/dist/cjs/extensions/modules/__generated__/BatchMetadataERC1155/events/BatchMetadataUpdate.js +1 -1
  6. package/dist/cjs/extensions/modules/__generated__/BatchMetadataERC1155/events/BatchMetadataUpdate.js.map +1 -1
  7. package/dist/cjs/extensions/modules/__generated__/BatchMetadataERC1155/read/getBatchIndex.js +114 -0
  8. package/dist/cjs/extensions/modules/__generated__/BatchMetadataERC1155/read/getBatchIndex.js.map +1 -0
  9. package/dist/cjs/extensions/modules/__generated__/BatchMetadataERC1155/read/getMetadataBatch.js +128 -0
  10. package/dist/cjs/extensions/modules/__generated__/BatchMetadataERC1155/read/getMetadataBatch.js.map +1 -0
  11. package/dist/cjs/extensions/modules/__generated__/BatchMetadataERC1155/read/getModuleConfig.js +109 -0
  12. package/dist/cjs/extensions/modules/__generated__/BatchMetadataERC1155/read/getModuleConfig.js.map +1 -0
  13. package/dist/cjs/extensions/modules/__generated__/BatchMetadataERC1155/write/setBaseURI.js +124 -0
  14. package/dist/cjs/extensions/modules/__generated__/BatchMetadataERC1155/write/setBaseURI.js.map +1 -0
  15. package/dist/cjs/extensions/modules/__generated__/BatchMetadataERC721/events/BatchMetadataUpdate.js +1 -1
  16. package/dist/cjs/extensions/modules/__generated__/BatchMetadataERC721/events/BatchMetadataUpdate.js.map +1 -1
  17. package/dist/cjs/extensions/modules/__generated__/BatchMetadataERC721/read/getBatchIndex.js +114 -0
  18. package/dist/cjs/extensions/modules/__generated__/BatchMetadataERC721/read/getBatchIndex.js.map +1 -0
  19. package/dist/cjs/extensions/modules/__generated__/BatchMetadataERC721/read/getMetadataBatch.js +128 -0
  20. package/dist/cjs/extensions/modules/__generated__/BatchMetadataERC721/read/getMetadataBatch.js.map +1 -0
  21. package/dist/cjs/extensions/modules/__generated__/BatchMetadataERC721/read/getModuleConfig.js +109 -0
  22. package/dist/cjs/extensions/modules/__generated__/BatchMetadataERC721/read/getModuleConfig.js.map +1 -0
  23. package/dist/cjs/extensions/modules/__generated__/BatchMetadataERC721/write/setBaseURI.js +124 -0
  24. package/dist/cjs/extensions/modules/__generated__/BatchMetadataERC721/write/setBaseURI.js.map +1 -0
  25. package/dist/cjs/extensions/modules/__generated__/SequentialTokenIdERC1155/encode/encodeBytesOnInstall.js +29 -0
  26. package/dist/cjs/extensions/modules/__generated__/SequentialTokenIdERC1155/encode/encodeBytesOnInstall.js.map +1 -0
  27. package/dist/cjs/extensions/modules/__generated__/SequentialTokenIdERC1155/module/install.js +11 -6
  28. package/dist/cjs/extensions/modules/__generated__/SequentialTokenIdERC1155/module/install.js.map +1 -1
  29. package/dist/cjs/extensions/modules/__generated__/SequentialTokenIdERC1155/read/getModuleConfig.js +109 -0
  30. package/dist/cjs/extensions/modules/__generated__/SequentialTokenIdERC1155/read/getModuleConfig.js.map +1 -0
  31. package/dist/cjs/extensions/modules/__generated__/SequentialTokenIdERC1155/write/updateTokenIdERC1155.js +121 -0
  32. package/dist/cjs/extensions/modules/__generated__/SequentialTokenIdERC1155/write/updateTokenIdERC1155.js.map +1 -0
  33. package/dist/cjs/extensions/prebuilts/deploy-published.js +0 -17
  34. package/dist/cjs/extensions/prebuilts/deploy-published.js.map +1 -1
  35. package/dist/cjs/extensions/unstoppable-domains/__generated__/UnstoppableDomains/read/exists.js +114 -0
  36. package/dist/cjs/extensions/unstoppable-domains/__generated__/UnstoppableDomains/read/exists.js.map +1 -0
  37. package/dist/cjs/extensions/unstoppable-domains/read/resolveAddress.js +6 -0
  38. package/dist/cjs/extensions/unstoppable-domains/read/resolveAddress.js.map +1 -1
  39. package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/swap/useSwapSupportedChains.js +1 -1
  40. package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/swap/useSwapSupportedChains.js.map +1 -1
  41. package/dist/cjs/react/web/ui/ConnectWallet/useConnectModal.js.map +1 -1
  42. package/dist/cjs/transaction/read-contract.js +11 -19
  43. package/dist/cjs/transaction/read-contract.js.map +1 -1
  44. package/dist/cjs/version.js +1 -1
  45. package/dist/cjs/version.js.map +1 -1
  46. package/dist/cjs/wallets/in-app/web/lib/actions/get-enclave-user-status.js +0 -2
  47. package/dist/cjs/wallets/in-app/web/lib/actions/get-enclave-user-status.js.map +1 -1
  48. package/dist/cjs/wallets/in-app/web/lib/actions/sign-message.enclave.js +3 -0
  49. package/dist/cjs/wallets/in-app/web/lib/actions/sign-message.enclave.js.map +1 -1
  50. package/dist/cjs/wallets/in-app/web/lib/actions/sign-transaction.enclave.js +3 -1
  51. package/dist/cjs/wallets/in-app/web/lib/actions/sign-transaction.enclave.js.map +1 -1
  52. package/dist/cjs/wallets/in-app/web/lib/actions/sign-typed-data.enclave.js +3 -0
  53. package/dist/cjs/wallets/in-app/web/lib/actions/sign-typed-data.enclave.js.map +1 -1
  54. package/dist/cjs/wallets/wallet-connect/receiver/index.js +1 -1
  55. package/dist/cjs/wallets/wallet-connect/receiver/session-request.js +13 -14
  56. package/dist/cjs/wallets/wallet-connect/receiver/session-request.js.map +1 -1
  57. package/dist/esm/contract/deployment/deploy-with-abi.js +13 -0
  58. package/dist/esm/contract/deployment/deploy-with-abi.js.map +1 -1
  59. package/dist/esm/exports/extensions/unstoppable-domains.js +4 -0
  60. package/dist/esm/exports/extensions/unstoppable-domains.js.map +1 -1
  61. package/dist/esm/extensions/modules/__generated__/BatchMetadataERC1155/events/BatchMetadataUpdate.js +1 -1
  62. package/dist/esm/extensions/modules/__generated__/BatchMetadataERC1155/events/BatchMetadataUpdate.js.map +1 -1
  63. package/dist/esm/extensions/modules/__generated__/BatchMetadataERC1155/read/getBatchIndex.js +106 -0
  64. package/dist/esm/extensions/modules/__generated__/BatchMetadataERC1155/read/getBatchIndex.js.map +1 -0
  65. package/dist/esm/extensions/modules/__generated__/BatchMetadataERC1155/read/getMetadataBatch.js +120 -0
  66. package/dist/esm/extensions/modules/__generated__/BatchMetadataERC1155/read/getMetadataBatch.js.map +1 -0
  67. package/dist/esm/extensions/modules/__generated__/BatchMetadataERC1155/read/getModuleConfig.js +103 -0
  68. package/dist/esm/extensions/modules/__generated__/BatchMetadataERC1155/read/getModuleConfig.js.map +1 -0
  69. package/dist/esm/extensions/modules/__generated__/BatchMetadataERC1155/write/setBaseURI.js +117 -0
  70. package/dist/esm/extensions/modules/__generated__/BatchMetadataERC1155/write/setBaseURI.js.map +1 -0
  71. package/dist/esm/extensions/modules/__generated__/BatchMetadataERC721/events/BatchMetadataUpdate.js +1 -1
  72. package/dist/esm/extensions/modules/__generated__/BatchMetadataERC721/events/BatchMetadataUpdate.js.map +1 -1
  73. package/dist/esm/extensions/modules/__generated__/BatchMetadataERC721/read/getBatchIndex.js +106 -0
  74. package/dist/esm/extensions/modules/__generated__/BatchMetadataERC721/read/getBatchIndex.js.map +1 -0
  75. package/dist/esm/extensions/modules/__generated__/BatchMetadataERC721/read/getMetadataBatch.js +120 -0
  76. package/dist/esm/extensions/modules/__generated__/BatchMetadataERC721/read/getMetadataBatch.js.map +1 -0
  77. package/dist/esm/extensions/modules/__generated__/BatchMetadataERC721/read/getModuleConfig.js +103 -0
  78. package/dist/esm/extensions/modules/__generated__/BatchMetadataERC721/read/getModuleConfig.js.map +1 -0
  79. package/dist/esm/extensions/modules/__generated__/BatchMetadataERC721/write/setBaseURI.js +117 -0
  80. package/dist/esm/extensions/modules/__generated__/BatchMetadataERC721/write/setBaseURI.js.map +1 -0
  81. package/dist/esm/extensions/modules/__generated__/SequentialTokenIdERC1155/encode/encodeBytesOnInstall.js +25 -0
  82. package/dist/esm/extensions/modules/__generated__/SequentialTokenIdERC1155/encode/encodeBytesOnInstall.js.map +1 -0
  83. package/dist/esm/extensions/modules/__generated__/SequentialTokenIdERC1155/module/install.js +11 -6
  84. package/dist/esm/extensions/modules/__generated__/SequentialTokenIdERC1155/module/install.js.map +1 -1
  85. package/dist/esm/extensions/modules/__generated__/SequentialTokenIdERC1155/read/getModuleConfig.js +103 -0
  86. package/dist/esm/extensions/modules/__generated__/SequentialTokenIdERC1155/read/getModuleConfig.js.map +1 -0
  87. package/dist/esm/extensions/modules/__generated__/SequentialTokenIdERC1155/write/updateTokenIdERC1155.js +114 -0
  88. package/dist/esm/extensions/modules/__generated__/SequentialTokenIdERC1155/write/updateTokenIdERC1155.js.map +1 -0
  89. package/dist/esm/extensions/prebuilts/deploy-published.js +0 -18
  90. package/dist/esm/extensions/prebuilts/deploy-published.js.map +1 -1
  91. package/dist/esm/extensions/unstoppable-domains/__generated__/UnstoppableDomains/read/exists.js +106 -0
  92. package/dist/esm/extensions/unstoppable-domains/__generated__/UnstoppableDomains/read/exists.js.map +1 -0
  93. package/dist/esm/extensions/unstoppable-domains/read/resolveAddress.js +6 -0
  94. package/dist/esm/extensions/unstoppable-domains/read/resolveAddress.js.map +1 -1
  95. package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/swap/useSwapSupportedChains.js +1 -1
  96. package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/swap/useSwapSupportedChains.js.map +1 -1
  97. package/dist/esm/react/web/ui/ConnectWallet/useConnectModal.js.map +1 -1
  98. package/dist/esm/transaction/read-contract.js +11 -19
  99. package/dist/esm/transaction/read-contract.js.map +1 -1
  100. package/dist/esm/version.js +1 -1
  101. package/dist/esm/version.js.map +1 -1
  102. package/dist/esm/wallets/in-app/web/lib/actions/get-enclave-user-status.js +0 -2
  103. package/dist/esm/wallets/in-app/web/lib/actions/get-enclave-user-status.js.map +1 -1
  104. package/dist/esm/wallets/in-app/web/lib/actions/sign-message.enclave.js +3 -0
  105. package/dist/esm/wallets/in-app/web/lib/actions/sign-message.enclave.js.map +1 -1
  106. package/dist/esm/wallets/in-app/web/lib/actions/sign-transaction.enclave.js +3 -1
  107. package/dist/esm/wallets/in-app/web/lib/actions/sign-transaction.enclave.js.map +1 -1
  108. package/dist/esm/wallets/in-app/web/lib/actions/sign-typed-data.enclave.js +3 -0
  109. package/dist/esm/wallets/in-app/web/lib/actions/sign-typed-data.enclave.js.map +1 -1
  110. package/dist/esm/wallets/wallet-connect/receiver/index.js +1 -1
  111. package/dist/esm/wallets/wallet-connect/receiver/session-request.js +6 -7
  112. package/dist/esm/wallets/wallet-connect/receiver/session-request.js.map +1 -1
  113. package/dist/types/contract/deployment/deploy-with-abi.d.ts.map +1 -1
  114. package/dist/types/exports/extensions/unstoppable-domains.d.ts +2 -0
  115. package/dist/types/exports/extensions/unstoppable-domains.d.ts.map +1 -1
  116. package/dist/types/extensions/modules/__generated__/BatchMetadataERC1155/events/BatchMetadataUpdate.d.ts +5 -2
  117. package/dist/types/extensions/modules/__generated__/BatchMetadataERC1155/events/BatchMetadataUpdate.d.ts.map +1 -1
  118. package/dist/types/extensions/modules/__generated__/BatchMetadataERC1155/read/getBatchIndex.d.ts +83 -0
  119. package/dist/types/extensions/modules/__generated__/BatchMetadataERC1155/read/getBatchIndex.d.ts.map +1 -0
  120. package/dist/types/extensions/modules/__generated__/BatchMetadataERC1155/read/getMetadataBatch.d.ts +91 -0
  121. package/dist/types/extensions/modules/__generated__/BatchMetadataERC1155/read/getMetadataBatch.d.ts.map +1 -0
  122. package/dist/types/extensions/modules/__generated__/BatchMetadataERC1155/read/getModuleConfig.d.ts +66 -0
  123. package/dist/types/extensions/modules/__generated__/BatchMetadataERC1155/read/getModuleConfig.d.ts.map +1 -0
  124. package/dist/types/extensions/modules/__generated__/BatchMetadataERC1155/write/setBaseURI.d.ts +86 -0
  125. package/dist/types/extensions/modules/__generated__/BatchMetadataERC1155/write/setBaseURI.d.ts.map +1 -0
  126. package/dist/types/extensions/modules/__generated__/BatchMetadataERC721/events/BatchMetadataUpdate.d.ts +5 -2
  127. package/dist/types/extensions/modules/__generated__/BatchMetadataERC721/events/BatchMetadataUpdate.d.ts.map +1 -1
  128. package/dist/types/extensions/modules/__generated__/BatchMetadataERC721/read/getBatchIndex.d.ts +83 -0
  129. package/dist/types/extensions/modules/__generated__/BatchMetadataERC721/read/getBatchIndex.d.ts.map +1 -0
  130. package/dist/types/extensions/modules/__generated__/BatchMetadataERC721/read/getMetadataBatch.d.ts +91 -0
  131. package/dist/types/extensions/modules/__generated__/BatchMetadataERC721/read/getMetadataBatch.d.ts.map +1 -0
  132. package/dist/types/extensions/modules/__generated__/BatchMetadataERC721/read/getModuleConfig.d.ts +66 -0
  133. package/dist/types/extensions/modules/__generated__/BatchMetadataERC721/read/getModuleConfig.d.ts.map +1 -0
  134. package/dist/types/extensions/modules/__generated__/BatchMetadataERC721/write/setBaseURI.d.ts +86 -0
  135. package/dist/types/extensions/modules/__generated__/BatchMetadataERC721/write/setBaseURI.d.ts.map +1 -0
  136. package/dist/types/extensions/modules/__generated__/SequentialTokenIdERC1155/encode/encodeBytesOnInstall.d.ts +26 -0
  137. package/dist/types/extensions/modules/__generated__/SequentialTokenIdERC1155/encode/encodeBytesOnInstall.d.ts.map +1 -0
  138. package/dist/types/extensions/modules/__generated__/SequentialTokenIdERC1155/module/install.d.ts +11 -6
  139. package/dist/types/extensions/modules/__generated__/SequentialTokenIdERC1155/module/install.d.ts.map +1 -1
  140. package/dist/types/extensions/modules/__generated__/SequentialTokenIdERC1155/read/getModuleConfig.d.ts +66 -0
  141. package/dist/types/extensions/modules/__generated__/SequentialTokenIdERC1155/read/getModuleConfig.d.ts.map +1 -0
  142. package/dist/types/extensions/modules/__generated__/SequentialTokenIdERC1155/write/updateTokenIdERC1155.d.ts +79 -0
  143. package/dist/types/extensions/modules/__generated__/SequentialTokenIdERC1155/write/updateTokenIdERC1155.d.ts.map +1 -0
  144. package/dist/types/extensions/prebuilts/deploy-published.d.ts.map +1 -1
  145. package/dist/types/extensions/unstoppable-domains/__generated__/UnstoppableDomains/read/exists.d.ts +83 -0
  146. package/dist/types/extensions/unstoppable-domains/__generated__/UnstoppableDomains/read/exists.d.ts.map +1 -0
  147. package/dist/types/extensions/unstoppable-domains/read/resolveAddress.d.ts.map +1 -1
  148. package/dist/types/react/web/ui/ConnectWallet/useConnectModal.d.ts +8 -0
  149. package/dist/types/react/web/ui/ConnectWallet/useConnectModal.d.ts.map +1 -1
  150. package/dist/types/transaction/read-contract.d.ts +11 -19
  151. package/dist/types/transaction/read-contract.d.ts.map +1 -1
  152. package/dist/types/version.d.ts +1 -1
  153. package/dist/types/version.d.ts.map +1 -1
  154. package/dist/types/wallets/in-app/core/authentication/types.d.ts +6 -0
  155. package/dist/types/wallets/in-app/core/authentication/types.d.ts.map +1 -1
  156. package/dist/types/wallets/in-app/web/lib/actions/get-enclave-user-status.d.ts.map +1 -1
  157. package/dist/types/wallets/in-app/web/lib/actions/sign-message.enclave.d.ts.map +1 -1
  158. package/dist/types/wallets/in-app/web/lib/actions/sign-transaction.enclave.d.ts.map +1 -1
  159. package/dist/types/wallets/in-app/web/lib/actions/sign-typed-data.enclave.d.ts.map +1 -1
  160. package/dist/types/wallets/wallet-connect/receiver/index.d.ts +1 -1
  161. package/dist/types/wallets/wallet-connect/receiver/session-request.d.ts.map +1 -1
  162. package/package.json +28 -28
  163. package/src/contract/deployment/deploy-with-abi.ts +14 -0
  164. package/src/exports/extensions/unstoppable-domains.ts +9 -0
  165. package/src/extensions/ens/resolve-avatar.test.ts +1 -4
  166. package/src/extensions/erc1155/read/getNFTs.test.ts +44 -0
  167. package/src/extensions/erc1155/write/lazyMint.test.ts +35 -0
  168. package/src/extensions/erc1155/write/mintAdditionalSupplyTo.test.ts +38 -0
  169. package/src/extensions/erc1155/write/mintTo.test.ts +43 -0
  170. package/src/extensions/erc20/read/isERC20.test.ts +1 -1
  171. package/src/extensions/erc20/write/transferBatch.test.ts +1 -1
  172. package/src/extensions/modules/MintableERC1155/mintableERC1155.test.ts +3 -1
  173. package/src/extensions/modules/__generated__/BatchMetadataERC1155/events/BatchMetadataUpdate.ts +1 -1
  174. package/src/extensions/modules/__generated__/BatchMetadataERC1155/read/getBatchIndex.ts +125 -0
  175. package/src/extensions/modules/__generated__/BatchMetadataERC1155/read/getMetadataBatch.ts +142 -0
  176. package/src/extensions/modules/__generated__/BatchMetadataERC1155/read/getModuleConfig.ts +109 -0
  177. package/src/extensions/modules/__generated__/BatchMetadataERC1155/write/setBaseURI.ts +148 -0
  178. package/src/extensions/modules/__generated__/BatchMetadataERC721/events/BatchMetadataUpdate.ts +1 -1
  179. package/src/extensions/modules/__generated__/BatchMetadataERC721/read/getBatchIndex.ts +125 -0
  180. package/src/extensions/modules/__generated__/BatchMetadataERC721/read/getMetadataBatch.ts +142 -0
  181. package/src/extensions/modules/__generated__/BatchMetadataERC721/read/getModuleConfig.ts +109 -0
  182. package/src/extensions/modules/__generated__/BatchMetadataERC721/write/setBaseURI.ts +148 -0
  183. package/src/extensions/modules/__generated__/SequentialTokenIdERC1155/encode/encodeBytesOnInstall.ts +40 -0
  184. package/src/extensions/modules/__generated__/SequentialTokenIdERC1155/module/install.ts +18 -9
  185. package/src/extensions/modules/__generated__/SequentialTokenIdERC1155/read/getModuleConfig.ts +109 -0
  186. package/src/extensions/modules/__generated__/SequentialTokenIdERC1155/write/updateTokenIdERC1155.ts +145 -0
  187. package/src/extensions/prebuilts/deploy-published.ts +0 -19
  188. package/src/extensions/unstoppable-domains/__generated__/UnstoppableDomains/read/exists.ts +121 -0
  189. package/src/extensions/unstoppable-domains/read/resolveAddress.test.ts +11 -0
  190. package/src/extensions/unstoppable-domains/read/resolveAddress.ts +9 -0
  191. package/src/react/web/ui/ConnectWallet/screens/Buy/swap/useSwapSupportedChains.ts +1 -1
  192. package/src/react/web/ui/ConnectWallet/useConnectModal.tsx +11 -0
  193. package/src/transaction/read-contract.ts +11 -19
  194. package/src/version.ts +1 -1
  195. package/src/wallets/in-app/core/authentication/types.ts +13 -2
  196. package/src/wallets/in-app/web/lib/actions/get-enclave-user-status.ts +0 -2
  197. package/src/wallets/in-app/web/lib/actions/sign-message.enclave.ts +4 -0
  198. package/src/wallets/in-app/web/lib/actions/sign-transaction.enclave.ts +4 -1
  199. package/src/wallets/in-app/web/lib/actions/sign-typed-data.enclave.ts +4 -0
  200. package/src/wallets/wallet-connect/receiver/index.ts +1 -1
  201. package/src/wallets/wallet-connect/receiver/session-request.ts +6 -23
  202. package/dist/cjs/extensions/modules/__generated__/SequentialTokenIdERC1155/read/encodeBytesOnInstall.js +0 -70
  203. package/dist/cjs/extensions/modules/__generated__/SequentialTokenIdERC1155/read/encodeBytesOnInstall.js.map +0 -1
  204. package/dist/esm/extensions/modules/__generated__/SequentialTokenIdERC1155/read/encodeBytesOnInstall.js +0 -64
  205. package/dist/esm/extensions/modules/__generated__/SequentialTokenIdERC1155/read/encodeBytesOnInstall.js.map +0 -1
  206. package/dist/types/extensions/modules/__generated__/SequentialTokenIdERC1155/read/encodeBytesOnInstall.d.ts +0 -44
  207. package/dist/types/extensions/modules/__generated__/SequentialTokenIdERC1155/read/encodeBytesOnInstall.d.ts.map +0 -1
  208. package/src/extensions/modules/__generated__/SequentialTokenIdERC1155/read/encodeBytesOnInstall.ts +0 -70
@@ -0,0 +1,109 @@
1
+ import { readContract } from "../../../../../transaction/read-contract.js";
2
+ import type { BaseTransactionOptions } from "../../../../../transaction/types.js";
3
+
4
+ import { decodeAbiParameters } from "viem";
5
+ import type { Hex } from "../../../../../utils/encoding/hex.js";
6
+ import { detectMethod } from "../../../../../utils/bytecode/detectExtension.js";
7
+
8
+ export const FN_SELECTOR = "0x89e04e0e" as const;
9
+ const FN_INPUTS = [] as const;
10
+ const FN_OUTPUTS = [
11
+ {
12
+ type: "tuple",
13
+ name: "config",
14
+ components: [
15
+ {
16
+ type: "bool",
17
+ name: "registerInstallationCallback",
18
+ },
19
+ {
20
+ type: "bytes4[]",
21
+ name: "requiredInterfaces",
22
+ },
23
+ {
24
+ type: "bytes4[]",
25
+ name: "supportedInterfaces",
26
+ },
27
+ {
28
+ type: "tuple[]",
29
+ name: "callbackFunctions",
30
+ components: [
31
+ {
32
+ type: "bytes4",
33
+ name: "selector",
34
+ },
35
+ ],
36
+ },
37
+ {
38
+ type: "tuple[]",
39
+ name: "fallbackFunctions",
40
+ components: [
41
+ {
42
+ type: "bytes4",
43
+ name: "selector",
44
+ },
45
+ {
46
+ type: "uint256",
47
+ name: "permissionBits",
48
+ },
49
+ ],
50
+ },
51
+ ],
52
+ },
53
+ ] as const;
54
+
55
+ /**
56
+ * Checks if the `getModuleConfig` method is supported by the given contract.
57
+ * @param availableSelectors An array of 4byte function selectors of the contract. You can get this in various ways, such as using "whatsabi" or if you have the ABI of the contract available you can use it to generate the selectors.
58
+ * @returns A boolean indicating if the `getModuleConfig` method is supported.
59
+ * @modules SequentialTokenIdERC1155
60
+ * @example
61
+ * ```ts
62
+ * import { SequentialTokenIdERC1155 } from "thirdweb/modules";
63
+ * const supported = SequentialTokenIdERC1155.isGetModuleConfigSupported(["0x..."]);
64
+ * ```
65
+ */
66
+ export function isGetModuleConfigSupported(availableSelectors: string[]) {
67
+ return detectMethod({
68
+ availableSelectors,
69
+ method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const,
70
+ });
71
+ }
72
+
73
+ /**
74
+ * Decodes the result of the getModuleConfig function call.
75
+ * @param result - The hexadecimal result to decode.
76
+ * @returns The decoded result as per the FN_OUTPUTS definition.
77
+ * @modules SequentialTokenIdERC1155
78
+ * @example
79
+ * ```ts
80
+ * import { SequentialTokenIdERC1155 } from "thirdweb/modules";
81
+ * const result = SequentialTokenIdERC1155.decodeGetModuleConfigResultResult("...");
82
+ * ```
83
+ */
84
+ export function decodeGetModuleConfigResult(result: Hex) {
85
+ return decodeAbiParameters(FN_OUTPUTS, result)[0];
86
+ }
87
+
88
+ /**
89
+ * Calls the "getModuleConfig" function on the contract.
90
+ * @param options - The options for the getModuleConfig function.
91
+ * @returns The parsed result of the function call.
92
+ * @modules SequentialTokenIdERC1155
93
+ * @example
94
+ * ```ts
95
+ * import { SequentialTokenIdERC1155 } from "thirdweb/modules";
96
+ *
97
+ * const result = await SequentialTokenIdERC1155.getModuleConfig({
98
+ * contract,
99
+ * });
100
+ *
101
+ * ```
102
+ */
103
+ export async function getModuleConfig(options: BaseTransactionOptions) {
104
+ return readContract({
105
+ contract: options.contract,
106
+ method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const,
107
+ params: [],
108
+ });
109
+ }
@@ -0,0 +1,145 @@
1
+ import type { AbiParameterToPrimitiveType } from "abitype";
2
+ import type {
3
+ BaseTransactionOptions,
4
+ WithOverrides,
5
+ } from "../../../../../transaction/types.js";
6
+ import { prepareContractCall } from "../../../../../transaction/prepare-contract-call.js";
7
+ import { encodeAbiParameters } from "../../../../../utils/abi/encodeAbiParameters.js";
8
+ import { once } from "../../../../../utils/promise/once.js";
9
+ import { detectMethod } from "../../../../../utils/bytecode/detectExtension.js";
10
+
11
+ /**
12
+ * Represents the parameters for the "updateTokenIdERC1155" function.
13
+ */
14
+ export type UpdateTokenIdERC1155Params = WithOverrides<{
15
+ tokenId: AbiParameterToPrimitiveType<{ type: "uint256"; name: "_tokenId" }>;
16
+ }>;
17
+
18
+ export const FN_SELECTOR = "0x034eb4dd" as const;
19
+ const FN_INPUTS = [
20
+ {
21
+ type: "uint256",
22
+ name: "_tokenId",
23
+ },
24
+ ] as const;
25
+ const FN_OUTPUTS = [
26
+ {
27
+ type: "uint256",
28
+ },
29
+ ] as const;
30
+
31
+ /**
32
+ * Checks if the `updateTokenIdERC1155` method is supported by the given contract.
33
+ * @param availableSelectors An array of 4byte function selectors of the contract. You can get this in various ways, such as using "whatsabi" or if you have the ABI of the contract available you can use it to generate the selectors.
34
+ * @returns A boolean indicating if the `updateTokenIdERC1155` method is supported.
35
+ * @modules SequentialTokenIdERC1155
36
+ * @example
37
+ * ```ts
38
+ * import { SequentialTokenIdERC1155 } from "thirdweb/modules";
39
+ *
40
+ * const supported = SequentialTokenIdERC1155.isUpdateTokenIdERC1155Supported(["0x..."]);
41
+ * ```
42
+ */
43
+ export function isUpdateTokenIdERC1155Supported(availableSelectors: string[]) {
44
+ return detectMethod({
45
+ availableSelectors,
46
+ method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const,
47
+ });
48
+ }
49
+
50
+ /**
51
+ * Encodes the parameters for the "updateTokenIdERC1155" function.
52
+ * @param options - The options for the updateTokenIdERC1155 function.
53
+ * @returns The encoded ABI parameters.
54
+ * @modules SequentialTokenIdERC1155
55
+ * @example
56
+ * ```ts
57
+ * import { SequentialTokenIdERC1155 } from "thirdweb/modules";
58
+ * const result = SequentialTokenIdERC1155.encodeUpdateTokenIdERC1155Params({
59
+ * tokenId: ...,
60
+ * });
61
+ * ```
62
+ */
63
+ export function encodeUpdateTokenIdERC1155Params(
64
+ options: UpdateTokenIdERC1155Params,
65
+ ) {
66
+ return encodeAbiParameters(FN_INPUTS, [options.tokenId]);
67
+ }
68
+
69
+ /**
70
+ * Encodes the "updateTokenIdERC1155" function into a Hex string with its parameters.
71
+ * @param options - The options for the updateTokenIdERC1155 function.
72
+ * @returns The encoded hexadecimal string.
73
+ * @modules SequentialTokenIdERC1155
74
+ * @example
75
+ * ```ts
76
+ * import { SequentialTokenIdERC1155 } from "thirdweb/modules";
77
+ * const result = SequentialTokenIdERC1155.encodeUpdateTokenIdERC1155({
78
+ * tokenId: ...,
79
+ * });
80
+ * ```
81
+ */
82
+ export function encodeUpdateTokenIdERC1155(
83
+ options: UpdateTokenIdERC1155Params,
84
+ ) {
85
+ // we do a "manual" concat here to avoid the overhead of the "concatHex" function
86
+ // we can do this because we know the specific formats of the values
87
+ return (FN_SELECTOR +
88
+ encodeUpdateTokenIdERC1155Params(options).slice(
89
+ 2,
90
+ )) as `${typeof FN_SELECTOR}${string}`;
91
+ }
92
+
93
+ /**
94
+ * Prepares a transaction to call the "updateTokenIdERC1155" function on the contract.
95
+ * @param options - The options for the "updateTokenIdERC1155" function.
96
+ * @returns A prepared transaction object.
97
+ * @modules SequentialTokenIdERC1155
98
+ * @example
99
+ * ```ts
100
+ * import { sendTransaction } from "thirdweb";
101
+ * import { SequentialTokenIdERC1155 } from "thirdweb/modules";
102
+ *
103
+ * const transaction = SequentialTokenIdERC1155.updateTokenIdERC1155({
104
+ * contract,
105
+ * tokenId: ...,
106
+ * overrides: {
107
+ * ...
108
+ * }
109
+ * });
110
+ *
111
+ * // Send the transaction
112
+ * await sendTransaction({ transaction, account });
113
+ * ```
114
+ */
115
+ export function updateTokenIdERC1155(
116
+ options: BaseTransactionOptions<
117
+ | UpdateTokenIdERC1155Params
118
+ | {
119
+ asyncParams: () => Promise<UpdateTokenIdERC1155Params>;
120
+ }
121
+ >,
122
+ ) {
123
+ const asyncOptions = once(async () => {
124
+ return "asyncParams" in options ? await options.asyncParams() : options;
125
+ });
126
+
127
+ return prepareContractCall({
128
+ contract: options.contract,
129
+ method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const,
130
+ params: async () => {
131
+ const resolvedOptions = await asyncOptions();
132
+ return [resolvedOptions.tokenId] as const;
133
+ },
134
+ value: async () => (await asyncOptions()).overrides?.value,
135
+ accessList: async () => (await asyncOptions()).overrides?.accessList,
136
+ gas: async () => (await asyncOptions()).overrides?.gas,
137
+ gasPrice: async () => (await asyncOptions()).overrides?.gasPrice,
138
+ maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas,
139
+ maxPriorityFeePerGas: async () =>
140
+ (await asyncOptions()).overrides?.maxPriorityFeePerGas,
141
+ nonce: async () => (await asyncOptions()).overrides?.nonce,
142
+ extraGas: async () => (await asyncOptions()).overrides?.extraGas,
143
+ erc20Value: async () => (await asyncOptions()).overrides?.erc20Value,
144
+ });
145
+ }
@@ -4,8 +4,6 @@ import type { ThirdwebClient } from "../../client/client.js";
4
4
  import { type ThirdwebContract, getContract } from "../../contract/contract.js";
5
5
  import { fetchPublishedContractMetadata } from "../../contract/deployment/publisher.js";
6
6
  import { getOrDeployInfraContractFromMetadata } from "../../contract/deployment/utils/bootstrap.js";
7
- import {} from "../../contract/deployment/utils/infra.js";
8
- import { zkDeployContract } from "../../contract/deployment/zksync/zkDeployContract.js";
9
7
  import { sendAndConfirmTransaction } from "../../transaction/actions/send-and-confirm-transaction.js";
10
8
  import { simulateTransaction } from "../../transaction/actions/simulate.js";
11
9
  import { prepareContractCall } from "../../transaction/prepare-contract-call.js";
@@ -18,7 +16,6 @@ import {
18
16
  fetchBytecodeFromCompilerMetadata,
19
17
  } from "../../utils/any-evm/deploy-metadata.js";
20
18
  import type { FetchDeployMetadataResult } from "../../utils/any-evm/deploy-metadata.js";
21
- import { isZkSyncChain } from "../../utils/any-evm/zksync/isZkSyncChain.js";
22
19
  import type { Hex } from "../../utils/encoding/hex.js";
23
20
  import type { Account } from "../../wallets/interfaces/wallet.js";
24
21
  import { getAllDefaultConstructorParamsForImplementation } from "./get-required-transactions.js";
@@ -263,22 +260,6 @@ async function directDeploy(options: {
263
260
  const { account, client, chain, compilerMetadata, contractParams, salt } =
264
261
  options;
265
262
 
266
- if (await isZkSyncChain(chain)) {
267
- return zkDeployContract({
268
- account,
269
- client,
270
- chain,
271
- bytecode: await fetchBytecodeFromCompilerMetadata({
272
- compilerMetadata,
273
- client,
274
- chain,
275
- }),
276
- abi: compilerMetadata.abi,
277
- params: contractParams,
278
- salt,
279
- });
280
- }
281
-
282
263
  const { deployContract } = await import(
283
264
  "../../contract/deployment/deploy-with-abi.js"
284
265
  );
@@ -0,0 +1,121 @@
1
+ import type { AbiParameterToPrimitiveType } from "abitype";
2
+ import { readContract } from "../../../../../transaction/read-contract.js";
3
+ import type { BaseTransactionOptions } from "../../../../../transaction/types.js";
4
+ import { encodeAbiParameters } from "../../../../../utils/abi/encodeAbiParameters.js";
5
+ import { decodeAbiParameters } from "viem";
6
+ import type { Hex } from "../../../../../utils/encoding/hex.js";
7
+ import { detectMethod } from "../../../../../utils/bytecode/detectExtension.js";
8
+
9
+ /**
10
+ * Represents the parameters for the "exists" function.
11
+ */
12
+ export type ExistsParams = {
13
+ tokenId: AbiParameterToPrimitiveType<{ type: "uint256"; name: "tokenId" }>;
14
+ };
15
+
16
+ export const FN_SELECTOR = "0x4f558e79" as const;
17
+ const FN_INPUTS = [
18
+ {
19
+ type: "uint256",
20
+ name: "tokenId",
21
+ },
22
+ ] as const;
23
+ const FN_OUTPUTS = [
24
+ {
25
+ type: "bool",
26
+ },
27
+ ] as const;
28
+
29
+ /**
30
+ * Checks if the `exists` method is supported by the given contract.
31
+ * @param availableSelectors An array of 4byte function selectors of the contract. You can get this in various ways, such as using "whatsabi" or if you have the ABI of the contract available you can use it to generate the selectors.
32
+ * @returns A boolean indicating if the `exists` method is supported.
33
+ * @extension UNSTOPPABLE-DOMAINS
34
+ * @example
35
+ * ```ts
36
+ * import { isExistsSupported } from "thirdweb/extensions/unstoppable-domains";
37
+ * const supported = isExistsSupported(["0x..."]);
38
+ * ```
39
+ */
40
+ export function isExistsSupported(availableSelectors: string[]) {
41
+ return detectMethod({
42
+ availableSelectors,
43
+ method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const,
44
+ });
45
+ }
46
+
47
+ /**
48
+ * Encodes the parameters for the "exists" function.
49
+ * @param options - The options for the exists function.
50
+ * @returns The encoded ABI parameters.
51
+ * @extension UNSTOPPABLE-DOMAINS
52
+ * @example
53
+ * ```ts
54
+ * import { encodeExistsParams } from "thirdweb/extensions/unstoppable-domains";
55
+ * const result = encodeExistsParams({
56
+ * tokenId: ...,
57
+ * });
58
+ * ```
59
+ */
60
+ export function encodeExistsParams(options: ExistsParams) {
61
+ return encodeAbiParameters(FN_INPUTS, [options.tokenId]);
62
+ }
63
+
64
+ /**
65
+ * Encodes the "exists" function into a Hex string with its parameters.
66
+ * @param options - The options for the exists function.
67
+ * @returns The encoded hexadecimal string.
68
+ * @extension UNSTOPPABLE-DOMAINS
69
+ * @example
70
+ * ```ts
71
+ * import { encodeExists } from "thirdweb/extensions/unstoppable-domains";
72
+ * const result = encodeExists({
73
+ * tokenId: ...,
74
+ * });
75
+ * ```
76
+ */
77
+ export function encodeExists(options: ExistsParams) {
78
+ // we do a "manual" concat here to avoid the overhead of the "concatHex" function
79
+ // we can do this because we know the specific formats of the values
80
+ return (FN_SELECTOR +
81
+ encodeExistsParams(options).slice(2)) as `${typeof FN_SELECTOR}${string}`;
82
+ }
83
+
84
+ /**
85
+ * Decodes the result of the exists function call.
86
+ * @param result - The hexadecimal result to decode.
87
+ * @returns The decoded result as per the FN_OUTPUTS definition.
88
+ * @extension UNSTOPPABLE-DOMAINS
89
+ * @example
90
+ * ```ts
91
+ * import { decodeExistsResult } from "thirdweb/extensions/unstoppable-domains";
92
+ * const result = decodeExistsResultResult("...");
93
+ * ```
94
+ */
95
+ export function decodeExistsResult(result: Hex) {
96
+ return decodeAbiParameters(FN_OUTPUTS, result)[0];
97
+ }
98
+
99
+ /**
100
+ * Calls the "exists" function on the contract.
101
+ * @param options - The options for the exists function.
102
+ * @returns The parsed result of the function call.
103
+ * @extension UNSTOPPABLE-DOMAINS
104
+ * @example
105
+ * ```ts
106
+ * import { exists } from "thirdweb/extensions/unstoppable-domains";
107
+ *
108
+ * const result = await exists({
109
+ * contract,
110
+ * tokenId: ...,
111
+ * });
112
+ *
113
+ * ```
114
+ */
115
+ export async function exists(options: BaseTransactionOptions<ExistsParams>) {
116
+ return readContract({
117
+ contract: options.contract,
118
+ method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const,
119
+ params: [options.tokenId],
120
+ });
121
+ }
@@ -15,4 +15,15 @@ describe("Unstoppable Domain: resolve address", () => {
15
15
  ).toLowerCase(),
16
16
  ).toBe("0x12345674b599ce99958242b3D3741e7b01841DF3".toLowerCase());
17
17
  });
18
+
19
+ it("should throw an error with a non-existent domain name", async () => {
20
+ await expect(() =>
21
+ resolveAddress({
22
+ name: "thirdwebsdk.thissuredoesnotexist",
23
+ client: TEST_CLIENT,
24
+ }),
25
+ ).rejects.toThrowError(
26
+ "Could not resolve a valid tokenId from the domain: thirdwebsdk.thissuredoesnotexist. Make sure it exists.",
27
+ );
28
+ });
18
29
  });
@@ -4,6 +4,7 @@ import type { ThirdwebClient } from "../../../client/client.js";
4
4
  import { getContract } from "../../../contract/contract.js";
5
5
  import { getAddress, isAddress } from "../../../utils/address.js";
6
6
  import { withCache } from "../../../utils/promise/withCache.js";
7
+ import { exists } from "../__generated__/UnstoppableDomains/read/exists.js";
7
8
  import { getMany } from "../__generated__/UnstoppableDomains/read/getMany.js";
8
9
  import { namehash } from "../__generated__/UnstoppableDomains/read/namehash.js";
9
10
  import { UD_POLYGON_MAINNET } from "../consts.js";
@@ -71,6 +72,14 @@ export async function resolveAddress(
71
72
  labels: name.split("."),
72
73
  });
73
74
 
75
+ // `namehash` always return a value, we should use `exists` to make sure it's valid
76
+ const _exists = await exists({ contract, tokenId: possibleTokenId });
77
+ if (!_exists) {
78
+ throw new Error(
79
+ `Could not resolve a valid tokenId from the domain: ${name}. Make sure it exists.`,
80
+ );
81
+ }
82
+
74
83
  // Resolve ETH address from the tokenId
75
84
  const resolved = await getMany({
76
85
  contract,
@@ -42,7 +42,7 @@ async function fetchBuySupportedDestinations(
42
42
  async () => {
43
43
  const fetchWithHeaders = getClientFetch(client);
44
44
  const res = await fetchWithHeaders(
45
- `${getPaySupportedDestinations()}?isTestMode=${isTestMode}`,
45
+ `${getPaySupportedDestinations()}${isTestMode ? "?isTestMode=true" : ""}`,
46
46
  );
47
47
  const data = (await res.json()) as Response;
48
48
  return data.result.map((item) => ({
@@ -5,6 +5,7 @@ import type { Wallet } from "../../../../wallets/interfaces/wallet.js";
5
5
  import type { SmartWalletOptions } from "../../../../wallets/smart/types.js";
6
6
  import type { AppMetadata } from "../../../../wallets/types.js";
7
7
  import type { Theme } from "../../../core/design-system/index.js";
8
+ import type { SiweAuthOptions } from "../../../core/hooks/auth/useSiweAuth.js";
8
9
  import { SetRootElementContext } from "../../../core/providers/RootElementContext.js";
9
10
  import { WalletUIStatesProvider } from "../../providers/wallet-ui-states-provider.js";
10
11
  import { canFitWideModal } from "../../utils/canFitWideModal.js";
@@ -432,4 +433,14 @@ export type UseConnectModalOptions = {
432
433
  * If you want to hide the branding, set this prop to `false`
433
434
  */
434
435
  showThirdwebBranding?: boolean;
436
+
437
+ /**
438
+ * Enable SIWE (Sign in with Ethererum) by passing an object of type `SiweAuthOptions` to
439
+ * enforce the users to sign a message after connecting their wallet to authenticate themselves.
440
+ *
441
+ * Refer to the [`SiweAuthOptions`](https://portal.thirdweb.com/references/typescript/v5/SiweAuthOptions) for more details
442
+ */
443
+ auth?: SiweAuthOptions;
435
444
  };
445
+
446
+ // TODO: consilidate Button/Embed/Modal props into one type with extras
@@ -72,31 +72,16 @@ export type ReadContractOptions<
72
72
  /**
73
73
  * ### Reads state from a deployed smart contract.
74
74
  *
75
- * You can use raw read calls or read [extensions](https://portal.thirdweb.com/typescript/v5/extensions/use) to read from a contract.
75
+ * Use this for raw read calls from a contract, but you can also use read [extensions](https://portal.thirdweb.com/typescript/v5/extensions/use) for predefined methods for common standards.
76
76
  *
77
77
  * @param options - The transaction options.
78
78
  * @returns A promise that resolves with the result of the read call.
79
79
  * @transaction
80
80
  * @example
81
81
  *
82
- * ### Using a contract read extension
82
+ * ### Raw contract call (recommended)
83
83
  *
84
- * ```ts
85
- * import { getContract } from "thirdweb";
86
- * import { sepolia } from "thirdweb/chains";
87
- * import { useReadContract } from "thirdweb/react";
88
- * import { getOwnedNFTs } form "thirdweb/extensions/erc721";
89
- *
90
- * const contract = getContract({
91
- * client,
92
- * address: "0x...",
93
- * chain: sepolia,
94
- * });
95
- *
96
- * const { data, isLoading } = useReadContract(getOwnedNFTs, { contract, owner: address });
97
- * ```
98
- *
99
- * ### Using a raw contract call
84
+ * You can read from any contract by using the solidity signature of the function you want to call.
100
85
  *
101
86
  * ```ts
102
87
  * import { getContract } from "thirdweb";
@@ -116,7 +101,14 @@ export type ReadContractOptions<
116
101
  * });
117
102
  * ```
118
103
  *
119
- * ### Using `resolveMethod`
104
+ * Note that this is type safe, the params types will be enforced based on the signature.
105
+ *
106
+ * ### Raw contract call with `resolveMethod`
107
+ *
108
+ * If you don't have the solidity signature of the function you want to call, you can use the `resolveMethod` helper to resolve the method from any deployed contract.
109
+ *
110
+ * Note that this is not type safe, and will also have a 1 time overhead of resolving the contract ABI.
111
+ *
120
112
  * ```ts
121
113
  * import { getContract, resolveMethod } from "thirdweb";
122
114
  * import { sepolia } from "thirdweb/chains";
package/src/version.ts CHANGED
@@ -1 +1 @@
1
- export const version = "5.61.5";
1
+ export const version = "5.61.7-nightly-da9f1964e4ae74ed5d33666788e2d16e4d56614d-20241015000333";
@@ -36,8 +36,19 @@ export type SingleStepAuthArgsType =
36
36
  | SocialAuthArgsType
37
37
  | { strategy: "jwt"; jwt: string; encryptionKey: string }
38
38
  | { strategy: "auth_endpoint"; payload: string; encryptionKey: string }
39
- | { strategy: "iframe_email_verification"; email: string }
40
- | { strategy: "iframe" }
39
+ | {
40
+ /**
41
+ * @deprecated
42
+ */
43
+ strategy: "iframe_email_verification";
44
+ email: string;
45
+ }
46
+ | {
47
+ /**
48
+ * @deprecated
49
+ */
50
+ strategy: "iframe";
51
+ }
41
52
  | {
42
53
  strategy: "passkey";
43
54
  /**
@@ -32,13 +32,11 @@ export async function getUserStatus({
32
32
  );
33
33
 
34
34
  if (!response.ok) {
35
- console.log("response", response.status);
36
35
  if (response.status === 401) {
37
36
  // 401 response indicates there is no user logged in, so we return undefined
38
37
  return undefined;
39
38
  }
40
39
  const result = await response.json();
41
- console.log("result", result);
42
40
  throw new Error(`Failed to get user status: ${result.error}`);
43
41
  }
44
42
 
@@ -22,6 +22,10 @@ export async function signMessage({
22
22
  const clientFetch = getClientFetch(client, ecosystem);
23
23
  const authToken = await storage.getAuthCookie();
24
24
 
25
+ if (!authToken) {
26
+ throw new Error("No auth token found when signing message");
27
+ }
28
+
25
29
  const response = await clientFetch(
26
30
  `${getThirdwebBaseUrl("inAppWallet")}/api/v1/enclave-wallet/sign-message`,
27
31
  {
@@ -17,10 +17,13 @@ export async function signTransaction({
17
17
  payload: Record<string, Hex | number | undefined>;
18
18
  storage: ClientScopedStorage;
19
19
  }) {
20
- console.log("payload", payload);
21
20
  const clientFetch = getClientFetch(client, ecosystem);
22
21
  const authToken = await storage.getAuthCookie();
23
22
 
23
+ if (!authToken) {
24
+ throw new Error("No auth token found when signing transaction");
25
+ }
26
+
24
27
  const response = await clientFetch(
25
28
  `${getThirdwebBaseUrl("inAppWallet")}/api/v1/enclave-wallet/sign-transaction`,
26
29
  {
@@ -24,6 +24,10 @@ export async function signTypedData<
24
24
  const clientFetch = getClientFetch(client, ecosystem);
25
25
  const authToken = await storage.getAuthCookie();
26
26
 
27
+ if (!authToken) {
28
+ throw new Error("No auth token found when signing typed data");
29
+ }
30
+
27
31
  const response = await clientFetch(
28
32
  `${getThirdwebBaseUrl("inAppWallet")}/api/v1/enclave-wallet/sign-typed-data`,
29
33
  {
@@ -284,7 +284,7 @@ export async function createWalletConnectClient(
284
284
  * client: client,
285
285
  * });
286
286
  *
287
- * const session = await createWalletConnectSession({
287
+ * const session = createWalletConnectSession({
288
288
  * walletConnectClient: client,
289
289
  * uri: "wc:...",
290
290
  * });