thirdweb 5.41.0 → 5.42.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (180) hide show
  1. package/dist/cjs/adapters/wallet-adapter.js +12 -1
  2. package/dist/cjs/adapters/wallet-adapter.js.map +1 -1
  3. package/dist/cjs/client/client.js +19 -1
  4. package/dist/cjs/client/client.js.map +1 -1
  5. package/dist/cjs/exports/extensions/common.js +3 -1
  6. package/dist/cjs/exports/extensions/common.js.map +1 -1
  7. package/dist/cjs/exports/extensions/erc1155.js +2 -1
  8. package/dist/cjs/exports/extensions/erc1155.js.map +1 -1
  9. package/dist/cjs/exports/react.js +7 -2
  10. package/dist/cjs/exports/react.js.map +1 -1
  11. package/dist/cjs/exports/utils.js +3 -1
  12. package/dist/cjs/exports/utils.js.map +1 -1
  13. package/dist/cjs/exports/wallets/in-app.js.map +1 -1
  14. package/dist/cjs/exports/wallets.js.map +1 -1
  15. package/dist/cjs/exports/wallets.native.js.map +1 -1
  16. package/dist/cjs/react/core/hooks/others/useChainQuery.js +19 -3
  17. package/dist/cjs/react/core/hooks/others/useChainQuery.js.map +1 -1
  18. package/dist/cjs/react/core/hooks/transaction/transaction-button-utils.js.map +1 -1
  19. package/dist/cjs/react/web/ui/AutoConnect/AutoConnect.js +5 -0
  20. package/dist/cjs/react/web/ui/AutoConnect/AutoConnect.js.map +1 -1
  21. package/dist/cjs/react/web/ui/ConnectWallet/ConnectButton.js +196 -2
  22. package/dist/cjs/react/web/ui/ConnectWallet/ConnectButton.js.map +1 -1
  23. package/dist/cjs/react/web/ui/ConnectWallet/Modal/ConnectEmbed.js +109 -3
  24. package/dist/cjs/react/web/ui/ConnectWallet/Modal/ConnectEmbed.js.map +1 -1
  25. package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/DirectPaymentModeScreen.js +1 -1
  26. package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/DirectPaymentModeScreen.js.map +1 -1
  27. package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/TransactionModeScreen.js +1 -1
  28. package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/TransactionModeScreen.js.map +1 -1
  29. package/dist/cjs/react/web/ui/prebuilt/thirdweb/BuyDirectListingButton/index.js +127 -0
  30. package/dist/cjs/react/web/ui/prebuilt/thirdweb/BuyDirectListingButton/index.js.map +1 -0
  31. package/dist/cjs/react/web/ui/prebuilt/thirdweb/ClaimButton/index.js +70 -3
  32. package/dist/cjs/react/web/ui/prebuilt/thirdweb/ClaimButton/index.js.map +1 -1
  33. package/dist/cjs/react/web/wallets/shared/ConnectWalletSocialOptions.js +19 -7
  34. package/dist/cjs/react/web/wallets/shared/ConnectWalletSocialOptions.js.map +1 -1
  35. package/dist/cjs/storage/download.js +44 -4
  36. package/dist/cjs/storage/download.js.map +1 -1
  37. package/dist/cjs/utils/contract/parse-abi-params.js +87 -0
  38. package/dist/cjs/utils/contract/parse-abi-params.js.map +1 -0
  39. package/dist/cjs/version.js +1 -1
  40. package/dist/cjs/wallets/create-wallet.js +73 -0
  41. package/dist/cjs/wallets/create-wallet.js.map +1 -1
  42. package/dist/cjs/wallets/in-app/core/wallet/index.js +2 -3
  43. package/dist/cjs/wallets/in-app/core/wallet/index.js.map +1 -1
  44. package/dist/cjs/wallets/in-app/web/ecosystem.js +29 -3
  45. package/dist/cjs/wallets/in-app/web/ecosystem.js.map +1 -1
  46. package/dist/cjs/wallets/in-app/web/in-app.js +100 -5
  47. package/dist/cjs/wallets/in-app/web/in-app.js.map +1 -1
  48. package/dist/cjs/wallets/smart/smart-wallet.js +71 -5
  49. package/dist/cjs/wallets/smart/smart-wallet.js.map +1 -1
  50. package/dist/esm/adapters/wallet-adapter.js +12 -1
  51. package/dist/esm/adapters/wallet-adapter.js.map +1 -1
  52. package/dist/esm/client/client.js +19 -1
  53. package/dist/esm/client/client.js.map +1 -1
  54. package/dist/esm/exports/extensions/common.js +1 -0
  55. package/dist/esm/exports/extensions/common.js.map +1 -1
  56. package/dist/esm/exports/extensions/erc1155.js +1 -1
  57. package/dist/esm/exports/extensions/erc1155.js.map +1 -1
  58. package/dist/esm/exports/react.js +3 -0
  59. package/dist/esm/exports/react.js.map +1 -1
  60. package/dist/esm/exports/utils.js +1 -0
  61. package/dist/esm/exports/utils.js.map +1 -1
  62. package/dist/esm/exports/wallets/in-app.js.map +1 -1
  63. package/dist/esm/exports/wallets.js.map +1 -1
  64. package/dist/esm/exports/wallets.native.js.map +1 -1
  65. package/dist/esm/react/core/hooks/others/useChainQuery.js +19 -3
  66. package/dist/esm/react/core/hooks/others/useChainQuery.js.map +1 -1
  67. package/dist/esm/react/core/hooks/transaction/transaction-button-utils.js.map +1 -1
  68. package/dist/esm/react/web/ui/AutoConnect/AutoConnect.js +5 -0
  69. package/dist/esm/react/web/ui/AutoConnect/AutoConnect.js.map +1 -1
  70. package/dist/esm/react/web/ui/ConnectWallet/ConnectButton.js +196 -2
  71. package/dist/esm/react/web/ui/ConnectWallet/ConnectButton.js.map +1 -1
  72. package/dist/esm/react/web/ui/ConnectWallet/Modal/ConnectEmbed.js +109 -3
  73. package/dist/esm/react/web/ui/ConnectWallet/Modal/ConnectEmbed.js.map +1 -1
  74. package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/DirectPaymentModeScreen.js +2 -2
  75. package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/DirectPaymentModeScreen.js.map +1 -1
  76. package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/TransactionModeScreen.js +2 -2
  77. package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/TransactionModeScreen.js.map +1 -1
  78. package/dist/esm/react/web/ui/prebuilt/thirdweb/BuyDirectListingButton/index.js +124 -0
  79. package/dist/esm/react/web/ui/prebuilt/thirdweb/BuyDirectListingButton/index.js.map +1 -0
  80. package/dist/esm/react/web/ui/prebuilt/thirdweb/ClaimButton/index.js +69 -3
  81. package/dist/esm/react/web/ui/prebuilt/thirdweb/ClaimButton/index.js.map +1 -1
  82. package/dist/esm/react/web/wallets/shared/ConnectWalletSocialOptions.js +19 -7
  83. package/dist/esm/react/web/wallets/shared/ConnectWalletSocialOptions.js.map +1 -1
  84. package/dist/esm/storage/download.js +44 -4
  85. package/dist/esm/storage/download.js.map +1 -1
  86. package/dist/esm/utils/contract/parse-abi-params.js +84 -0
  87. package/dist/esm/utils/contract/parse-abi-params.js.map +1 -0
  88. package/dist/esm/version.js +1 -1
  89. package/dist/esm/wallets/create-wallet.js +73 -0
  90. package/dist/esm/wallets/create-wallet.js.map +1 -1
  91. package/dist/esm/wallets/in-app/core/wallet/index.js +2 -3
  92. package/dist/esm/wallets/in-app/core/wallet/index.js.map +1 -1
  93. package/dist/esm/wallets/in-app/web/ecosystem.js +29 -3
  94. package/dist/esm/wallets/in-app/web/ecosystem.js.map +1 -1
  95. package/dist/esm/wallets/in-app/web/in-app.js +100 -5
  96. package/dist/esm/wallets/in-app/web/in-app.js.map +1 -1
  97. package/dist/esm/wallets/smart/smart-wallet.js +71 -5
  98. package/dist/esm/wallets/smart/smart-wallet.js.map +1 -1
  99. package/dist/types/adapters/wallet-adapter.d.ts +12 -1
  100. package/dist/types/adapters/wallet-adapter.d.ts.map +1 -1
  101. package/dist/types/client/client.d.ts +19 -1
  102. package/dist/types/client/client.d.ts.map +1 -1
  103. package/dist/types/exports/extensions/common.d.ts +1 -0
  104. package/dist/types/exports/extensions/common.d.ts.map +1 -1
  105. package/dist/types/exports/extensions/erc1155.d.ts +1 -1
  106. package/dist/types/exports/extensions/erc1155.d.ts.map +1 -1
  107. package/dist/types/exports/react.d.ts +2 -0
  108. package/dist/types/exports/react.d.ts.map +1 -1
  109. package/dist/types/exports/utils.d.ts +2 -0
  110. package/dist/types/exports/utils.d.ts.map +1 -1
  111. package/dist/types/exports/wallets/in-app.d.ts +1 -0
  112. package/dist/types/exports/wallets/in-app.d.ts.map +1 -1
  113. package/dist/types/exports/wallets.d.ts +4 -2
  114. package/dist/types/exports/wallets.d.ts.map +1 -1
  115. package/dist/types/exports/wallets.native.d.ts +3 -2
  116. package/dist/types/exports/wallets.native.d.ts.map +1 -1
  117. package/dist/types/react/core/hooks/others/useChainQuery.d.ts +21 -4
  118. package/dist/types/react/core/hooks/others/useChainQuery.d.ts.map +1 -1
  119. package/dist/types/react/core/hooks/transaction/transaction-button-utils.d.ts +1 -0
  120. package/dist/types/react/core/hooks/transaction/transaction-button-utils.d.ts.map +1 -1
  121. package/dist/types/react/web/ui/AutoConnect/AutoConnect.d.ts +5 -0
  122. package/dist/types/react/web/ui/AutoConnect/AutoConnect.d.ts.map +1 -1
  123. package/dist/types/react/web/ui/ConnectWallet/ConnectButton.d.ts +196 -2
  124. package/dist/types/react/web/ui/ConnectWallet/ConnectButton.d.ts.map +1 -1
  125. package/dist/types/react/web/ui/ConnectWallet/Modal/ConnectEmbed.d.ts +109 -3
  126. package/dist/types/react/web/ui/ConnectWallet/Modal/ConnectEmbed.d.ts.map +1 -1
  127. package/dist/types/react/web/ui/PayEmbed.d.ts +1 -1
  128. package/dist/types/react/web/ui/prebuilt/thirdweb/BuyDirectListingButton/index.d.ts +63 -0
  129. package/dist/types/react/web/ui/prebuilt/thirdweb/BuyDirectListingButton/index.d.ts.map +1 -0
  130. package/dist/types/react/web/ui/prebuilt/thirdweb/ClaimButton/index.d.ts +21 -0
  131. package/dist/types/react/web/ui/prebuilt/thirdweb/ClaimButton/index.d.ts.map +1 -1
  132. package/dist/types/react/web/wallets/shared/ConnectWalletSocialOptions.d.ts.map +1 -1
  133. package/dist/types/storage/download.d.ts +43 -3
  134. package/dist/types/storage/download.d.ts.map +1 -1
  135. package/dist/types/utils/contract/parse-abi-params.d.ts +29 -0
  136. package/dist/types/utils/contract/parse-abi-params.d.ts.map +1 -0
  137. package/dist/types/version.d.ts +1 -1
  138. package/dist/types/wallets/create-wallet.d.ts +73 -0
  139. package/dist/types/wallets/create-wallet.d.ts.map +1 -1
  140. package/dist/types/wallets/ecosystem/types.d.ts +5 -4
  141. package/dist/types/wallets/ecosystem/types.d.ts.map +1 -1
  142. package/dist/types/wallets/in-app/core/wallet/index.d.ts.map +1 -1
  143. package/dist/types/wallets/in-app/web/ecosystem.d.ts +29 -3
  144. package/dist/types/wallets/in-app/web/ecosystem.d.ts.map +1 -1
  145. package/dist/types/wallets/in-app/web/in-app.d.ts +100 -5
  146. package/dist/types/wallets/in-app/web/in-app.d.ts.map +1 -1
  147. package/dist/types/wallets/smart/smart-wallet.d.ts +71 -5
  148. package/dist/types/wallets/smart/smart-wallet.d.ts.map +1 -1
  149. package/package.json +1 -1
  150. package/src/adapters/wallet-adapter.ts +12 -1
  151. package/src/client/client.ts +19 -1
  152. package/src/exports/extensions/common.ts +5 -0
  153. package/src/exports/extensions/erc1155.ts +1 -0
  154. package/src/exports/react.ts +7 -0
  155. package/src/exports/utils.ts +3 -0
  156. package/src/exports/wallets/in-app.ts +6 -0
  157. package/src/exports/wallets.native.ts +8 -1
  158. package/src/exports/wallets.ts +13 -1
  159. package/src/react/core/hooks/others/useChainQuery.ts +24 -4
  160. package/src/react/core/hooks/transaction/transaction-button-utils.ts +1 -0
  161. package/src/react/web/ui/AutoConnect/AutoConnect.tsx +5 -0
  162. package/src/react/web/ui/ConnectWallet/ConnectButton.tsx +196 -2
  163. package/src/react/web/ui/ConnectWallet/Modal/ConnectEmbed.tsx +109 -3
  164. package/src/react/web/ui/ConnectWallet/screens/Buy/DirectPaymentModeScreen.tsx +2 -2
  165. package/src/react/web/ui/ConnectWallet/screens/Buy/TransactionModeScreen.tsx +2 -2
  166. package/src/react/web/ui/PayEmbed.tsx +1 -1
  167. package/src/react/web/ui/prebuilt/thirdweb/BuyDirectListingButton/BuyDirectListingButton.test.tsx +27 -0
  168. package/src/react/web/ui/prebuilt/thirdweb/BuyDirectListingButton/index.tsx +200 -0
  169. package/src/react/web/ui/prebuilt/thirdweb/ClaimButton/index.tsx +78 -5
  170. package/src/react/web/wallets/shared/ConnectWalletSocialOptions.tsx +19 -8
  171. package/src/storage/download.ts +47 -4
  172. package/src/utils/contract/parse-abi-params.test.ts +160 -0
  173. package/src/utils/contract/parse-abi-params.ts +90 -0
  174. package/src/version.ts +1 -1
  175. package/src/wallets/create-wallet.ts +73 -0
  176. package/src/wallets/ecosystem/types.ts +9 -5
  177. package/src/wallets/in-app/core/wallet/index.ts +2 -3
  178. package/src/wallets/in-app/web/ecosystem.ts +29 -3
  179. package/src/wallets/in-app/web/in-app.ts +100 -5
  180. package/src/wallets/smart/smart-wallet.ts +71 -5
@@ -1,20 +1,126 @@
1
1
  import type { ConnectEmbedProps } from "../../../../core/hooks/connection/ConnectEmbedProps.js";
2
2
  /**
3
- * A component that allows the user to connect their wallet.
3
+ * An inline wallet connection component that allows to:
4
4
  *
5
- * it renders the same UI as the [`ConnectButton`](https://portal.thirdweb.com/react/v4/components/ConnectButton) component's modal - but directly on the page instead of being in a modal.
5
+ * - Connect to 350+ external wallets
6
+ * - Connect with email, phone, passkey or socials
7
+ * - Convert any wallet to a ERC4337 smart wallet for gasless transactions
8
+ * - Sign in with ethereum (Auth)
9
+ *
10
+ * It renders the same UI as the [`ConnectButton`](https://portal.thirdweb.com/react/v5/ConnectButton) component's modal - but directly inline in the page instead of being in a modal.
11
+ *
12
+ * Once connected, the component does not render any UI. It only renders UI if wallet is not connected.
6
13
  *
7
- * It only renders UI if wallet is not connected
8
14
  * @example
15
+ *
16
+ * ## Default setup
17
+ *
9
18
  * ```tsx
19
+ * import { createThirdwebClient } from "thirdweb";
20
+ * import { ConnectEmbed } from "thirdweb/react";
21
+ *
22
+ * const client = createThirdwebClient({ clientId: "YOUR_CLIENT_ID" });
23
+ *
10
24
  * <ConnectEmbed
11
25
  * client={client}
12
26
  * />
13
27
  * ```
28
+ *
29
+ * [View all available config options](https://portal.thirdweb.com/references/typescript/v5/ConnectEmbedProps)
30
+ *
31
+ * ## Customization options
32
+ *
33
+ * ### Customizing wallet options
34
+ *
35
+ * ```tsx
36
+ * <ConnectEmbed
37
+ * client={client}
38
+ * wallets={[
39
+ * createWallet("io.metamask"),
40
+ * createWallet("com.coinbase.wallet"),
41
+ * createWallet("me.rainbow"),
42
+ * ]}
43
+ * />
44
+ * ```
45
+ *
46
+ * [View all available wallets](https://portal.thirdweb.com/typescript/v5/supported-wallets)
47
+ *
48
+ * ### Customizing the default chain to connect to
49
+ *
50
+ * ```tsx
51
+ * import { base } from "thirdweb/chains";
52
+ *
53
+ * <ConnectEmbed
54
+ * client={client}
55
+ * chain={base}
56
+ * />
57
+ * ```
58
+ *
59
+ * ### Enabling sign in with ethereum (Auth)
60
+ *
61
+ * ```tsx
62
+ * <ConnectEmbed
63
+ * client={client}
64
+ * auth={{
65
+ * isLoggedIn: async (address) => {
66
+ * console.log("checking if logged in!", { address });
67
+ * return await isLoggedIn();
68
+ * },
69
+ * doLogin: async (params) => {
70
+ * console.log("logging in!");
71
+ * await login(params);
72
+ * },
73
+ * getLoginPayload: async ({ address }) =>
74
+ * generatePayload({ address }),
75
+ * doLogout: async () => {
76
+ * console.log("logging out!");
77
+ * await logout();
78
+ * },
79
+ * }}
80
+ * />;
81
+ * ```
82
+ *
83
+ * ### Customizing the theme
84
+ *
85
+ * ```tsx
86
+ * <ConnectEmbed
87
+ * client={client}
88
+ * theme="light"
89
+ * />
90
+ * ```
91
+ *
92
+ * For more granular control, you can also pass a custom theme object:
93
+ *
94
+ * ```tsx
95
+ * <ConnectEmbed
96
+ * client={client}
97
+ * theme={lightTheme({
98
+ * colors: {
99
+ * modalBg: "red",
100
+ * },
101
+ * })}
102
+ * />
103
+ * ```
104
+ *
105
+ * [View all available themes properties](https://portal.thirdweb.com/references/typescript/v5/Theme)
106
+ *
107
+ * ### Changing the display language
108
+ *
109
+ * ```tsx
110
+ * <ConnectEmbed
111
+ * client={client}
112
+ * locale="ja_JP"
113
+ * />
114
+ * ```
115
+ *
116
+ * [View all available locales](https://portal.thirdweb.com/references/typescript/v5/LocaleId)
117
+ *
14
118
  * @param props -
15
119
  * The props for the `ConnectEmbed` component.
16
120
  *
17
121
  * Refer to the [`ConnectEmbedProps`](https://portal.thirdweb.com/references/typescript/v5/ConnectEmbedProps) type for more details
122
+ *
123
+ * @returns A JSX element that renders the <ConnectEmbed> component.
18
124
  * @component
19
125
  */
20
126
  export declare function ConnectEmbed(props: ConnectEmbedProps): import("react/jsx-runtime.js").JSX.Element;
@@ -1 +1 @@
1
- {"version":3,"file":"ConnectEmbed.d.ts","sourceRoot":"","sources":["../../../../../../../src/react/web/ui/ConnectWallet/Modal/ConnectEmbed.tsx"],"names":[],"mappings":"AAgBA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,wDAAwD,CAAC;AAyBhG;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,YAAY,CAAC,KAAK,EAAE,iBAAiB,8CA+GpD;AAuHD,eAAO,MAAM,cAAc;;SAtRG,MAAO,WAAW;;eAuRnC,SAAS,GAAG,MAAM;yGAwB7B,CAAC"}
1
+ {"version":3,"file":"ConnectEmbed.d.ts","sourceRoot":"","sources":["../../../../../../../src/react/web/ui/ConnectWallet/Modal/ConnectEmbed.tsx"],"names":[],"mappings":"AAgBA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,wDAAwD,CAAC;AAyBhG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2HG;AACH,wBAAgB,YAAY,CAAC,KAAK,EAAE,iBAAiB,8CA+GpD;AAuHD,eAAO,MAAM,cAAc;;SAhYG,MAAO,WAAW;;eAiYnC,SAAS,GAAG,MAAM;yGAwB7B,CAAC"}
@@ -14,7 +14,7 @@ import type { LocaleId } from "./types.js";
14
14
  export type PayEmbedProps = {
15
15
  /**
16
16
  * Override the default tokens shown in PayEmbed uI
17
- *
17
+ * @component
18
18
  * By default, PayEmbed shows a few popular tokens for Pay supported chains
19
19
  * @example
20
20
  *
@@ -0,0 +1,63 @@
1
+ import type { Chain } from "../../../../../../chains/types.js";
2
+ import type { ThirdwebClient } from "../../../../../../client/client.js";
3
+ import type { TransactionButtonProps } from "../../../../../core/hooks/transaction/transaction-button-utils.js";
4
+ export type BuyDirectListingButtonProps = Omit<TransactionButtonProps, "transaction"> & {
5
+ /**
6
+ * The contract address of the Marketplace v3 contract.
7
+ */
8
+ contractAddress: string;
9
+ /**
10
+ * The chain which the Drop contract is deployed on
11
+ */
12
+ chain: Chain;
13
+ /**
14
+ * thirdweb Client
15
+ */
16
+ client: ThirdwebClient;
17
+ /**
18
+ * ID of the marketplace's DirectListing
19
+ */
20
+ listingId: bigint;
21
+ /**
22
+ * Qty to buy (optional)
23
+ *
24
+ * - For ERC721 listing: the `quantity` is always hard-coded to 1n - passing this props doesn't do anything
25
+ *
26
+ * - For ERC1155 listing: the `quantity` defaults to the quantity of the listing if not specified.
27
+ *
28
+ * The component will also throw an error if you pass a `quantity` and it's greater than the listing's quantity
29
+ */
30
+ quantity?: bigint;
31
+ };
32
+ /**
33
+ * This button is used with thirdweb Marketplace v3 contract, for buying NFT(s) from a listing.
34
+ *
35
+ * Under the hood, it prepares a transaction using the [`buyFromListing` extension](https://portal.thirdweb.com/references/typescript/v5/marketplace/buyFromListing)
36
+ * and then pass it to a <TransactionButton />
37
+ *
38
+ * Since it uses the TransactionButton, it can take in any props that can be passed
39
+ * to the [`TransactionButton`](https://portal.thirdweb.com/references/typescript/v5/TransactionButton)
40
+ *
41
+ *
42
+ * @param props
43
+ * @returns <TransactionButton />
44
+ *
45
+ * @example
46
+ * ```tsx
47
+ * import { BuyDirectListingButton } from "thirdweb/react";
48
+ *
49
+ * <BuyDirectListingButton
50
+ * contractAddress="0x..." // contract address of the marketplace v3
51
+ * chain={...} // the chain which the marketplace contract is deployed on
52
+ * client={...} // thirdweb client
53
+ * listingId={100n} // the listingId or the item you want to buy
54
+ * quantity={1n} // optional - see the docs to learn more
55
+ * >
56
+ * Buy NFT
57
+ * </BuyDirectListingButton>
58
+ * ```
59
+ *
60
+ * @component
61
+ */
62
+ export declare function BuyDirectListingButton(props: BuyDirectListingButtonProps): import("react/jsx-runtime.js").JSX.Element;
63
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../../src/react/web/ui/prebuilt/thirdweb/BuyDirectListingButton/index.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,mCAAmC,CAAC;AAC/D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oCAAoC,CAAC;AAKzE,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,mEAAmE,CAAC;AAKhH,MAAM,MAAM,2BAA2B,GAAG,IAAI,CAC5C,sBAAsB,EACtB,aAAa,CACd,GAAG;IACF;;OAEG;IACH,eAAe,EAAE,MAAM,CAAC;IAExB;;OAEG;IACH,KAAK,EAAE,KAAK,CAAC;IAEb;;OAEG;IACH,MAAM,EAAE,cAAc,CAAC;IAEvB;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;IAElB;;;;;;;;OAQG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,wBAAgB,sBAAsB,CAAC,KAAK,EAAE,2BAA2B,8CAuGxE"}
@@ -1,5 +1,6 @@
1
1
  import { type ThirdwebContract } from "../../../../../../contract/contract.js";
2
2
  import type { PreparedTransaction } from "../../../../../../transaction/prepare-transaction.js";
3
+ import type { BaseTransactionOptions } from "../../../../../../transaction/types.js";
3
4
  import type { Account } from "../../../../../../wallets/interfaces/wallet.js";
4
5
  import type { ClaimButtonProps, ClaimParams, Erc20ClaimParams, Erc721ClaimParams, Erc1155ClaimParams } from "./types.js";
5
6
  /**
@@ -14,6 +15,7 @@ import type { ClaimButtonProps, ClaimParams, Erc20ClaimParams, Erc721ClaimParams
14
15
  * @param props
15
16
  * @returns A wrapper for TransactionButton
16
17
  *
18
+ * @component
17
19
  * @example
18
20
  *
19
21
  * ```tsx
@@ -63,9 +65,28 @@ import type { ClaimButtonProps, ClaimParams, Erc20ClaimParams, Erc721ClaimParams
63
65
  * Claim now
64
66
  * </ClaimButton>
65
67
  *
68
+ * // Attach custom Pay metadata
69
+ * <ClaimButton
70
+ * payModal={{
71
+ * metadata: {
72
+ * name: "Van Gogh Starry Night",
73
+ * image: "https://unsplash.com/starry-night.png"
74
+ * }
75
+ * }}
76
+ * >...</ClaimButton>
77
+ *
66
78
  * ```
67
79
  */
68
80
  export declare function ClaimButton(props: ClaimButtonProps): import("react/jsx-runtime.js").JSX.Element;
81
+ /**
82
+ * @internal
83
+ */
84
+ export declare function getPayMetadata(options: BaseTransactionOptions<{
85
+ tokenId?: bigint;
86
+ }>): Promise<{
87
+ name?: string;
88
+ image?: string;
89
+ }>;
69
90
  /**
70
91
  * @internal Export for test
71
92
  */
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../../src/react/web/ui/prebuilt/thirdweb/ClaimButton/index.tsx"],"names":[],"mappings":"AAEA,OAAO,EACL,KAAK,gBAAgB,EAEtB,MAAM,wCAAwC,CAAC;AAChD,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,sDAAsD,CAAC;AAChG,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,gDAAgD,CAAC;AAG9E,OAAO,KAAK,EACV,gBAAgB,EAChB,WAAW,EACX,gBAAgB,EAChB,iBAAiB,EACjB,kBAAkB,EACnB,MAAM,YAAY,CAAC;AAEpB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8DG;AACH,wBAAgB,WAAW,CAAC,KAAK,EAAE,gBAAgB,8CAmBlD;AAED;;GAEG;AACH,wBAAsB,mBAAmB,CAAC,EACxC,QAAQ,EACR,OAAO,EACP,WAAW,GACZ,EAAE;IACD,QAAQ,EAAE,gBAAgB,CAAC;IAC3B,OAAO,EAAE,OAAO,GAAG,SAAS,CAAC;IAC7B,WAAW,EAAE,WAAW,CAAC;CAC1B,GAAG,OAAO,CAAC,mBAAmB,CAAC,CAc/B;AAED;;GAEG;AACH,wBAAsB,gBAAgB,CAAC,EACrC,QAAQ,EACR,OAAO,EACP,WAAW,GACZ,EAAE;IACD,QAAQ,EAAE,gBAAgB,CAAC;IAC3B,OAAO,EAAE,OAAO,GAAG,SAAS,CAAC;IAC7B,WAAW,EAAE,iBAAiB,CAAC;CAChC,8JAuBA;AAED;;GAEG;AACH,wBAAsB,iBAAiB,CAAC,EACtC,QAAQ,EACR,OAAO,EACP,WAAW,GACZ,EAAE;IACD,QAAQ,EAAE,gBAAgB,CAAC;IAC3B,OAAO,EAAE,OAAO,GAAG,SAAS,CAAC;IAC7B,WAAW,EAAE,kBAAkB,CAAC;CACjC,8JAwBA;AAED;;GAEG;AACH,wBAAsB,eAAe,CAAC,EACpC,QAAQ,EACR,OAAO,EACP,WAAW,GACZ,EAAE;IACD,QAAQ,EAAE,gBAAgB,CAAC;IAC3B,OAAO,EAAE,OAAO,GAAG,SAAS,CAAC;IAC7B,WAAW,EAAE,gBAAgB,CAAC;CAC/B,8JA4BA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../../src/react/web/ui/prebuilt/thirdweb/ClaimButton/index.tsx"],"names":[],"mappings":"AAEA,OAAO,EACL,KAAK,gBAAgB,EAEtB,MAAM,wCAAwC,CAAC;AAGhD,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,sDAAsD,CAAC;AAChG,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,wCAAwC,CAAC;AACrF,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,gDAAgD,CAAC;AAK9E,OAAO,KAAK,EACV,gBAAgB,EAChB,WAAW,EACX,gBAAgB,EAChB,iBAAiB,EACjB,kBAAkB,EACnB,MAAM,YAAY,CAAC;AAEpB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyEG;AACH,wBAAgB,WAAW,CAAC,KAAK,EAAE,gBAAgB,8CAqDlD;AAED;;GAEG;AACH,wBAAsB,cAAc,CAClC,OAAO,EAAE,sBAAsB,CAAC;IAAE,OAAO,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC,GACpD,OAAO,CAAC;IAAE,IAAI,CAAC,EAAE,MAAM,CAAC;IAAC,KAAK,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC,CAgB5C;AAED;;GAEG;AACH,wBAAsB,mBAAmB,CAAC,EACxC,QAAQ,EACR,OAAO,EACP,WAAW,GACZ,EAAE;IACD,QAAQ,EAAE,gBAAgB,CAAC;IAC3B,OAAO,EAAE,OAAO,GAAG,SAAS,CAAC;IAC7B,WAAW,EAAE,WAAW,CAAC;CAC1B,GAAG,OAAO,CAAC,mBAAmB,CAAC,CAc/B;AAED;;GAEG;AACH,wBAAsB,gBAAgB,CAAC,EACrC,QAAQ,EACR,OAAO,EACP,WAAW,GACZ,EAAE;IACD,QAAQ,EAAE,gBAAgB,CAAC;IAC3B,OAAO,EAAE,OAAO,GAAG,SAAS,CAAC;IAC7B,WAAW,EAAE,iBAAiB,CAAC;CAChC,8JAuBA;AAED;;GAEG;AACH,wBAAsB,iBAAiB,CAAC,EACtC,QAAQ,EACR,OAAO,EACP,WAAW,GACZ,EAAE;IACD,QAAQ,EAAE,gBAAgB,CAAC;IAC3B,OAAO,EAAE,OAAO,GAAG,SAAS,CAAC;IAC7B,WAAW,EAAE,kBAAkB,CAAC;CACjC,8JAwBA;AAED;;GAEG;AACH,wBAAsB,eAAe,CAAC,EACpC,QAAQ,EACR,OAAO,EACP,WAAW,GACZ,EAAE;IACD,QAAQ,EAAE,gBAAgB,CAAC;IAC3B,OAAO,EAAE,OAAO,GAAG,SAAS,CAAC;IAC7B,WAAW,EAAE,gBAAgB,CAAC;CAC/B,8JA4BA"}
@@ -1 +1 @@
1
- {"version":3,"file":"ConnectWalletSocialOptions.d.ts","sourceRoot":"","sources":["../../../../../../src/react/web/wallets/shared/ConnectWalletSocialOptions.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,6BAA6B,CAAC;AACzD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAKnE,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,0CAA0C,CAAC;AAChF,OAAO,EAEL,KAAK,gBAAgB,EAEtB,MAAM,8BAA8B,CAAC;AACtC,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,qCAAqC,CAAC;AAuB7E,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAG3D,MAAM,MAAM,0BAA0B,GAClC,SAAS,GACT;IACE,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,WAAW,CAAC,EAAE;QACZ,IAAI,EAAE,gBAAgB,CAAC;QACvB,iBAAiB,EAAE,OAAO,CAAC,OAAO,CAAC,CAAC;KACrC,CAAC;IACF,YAAY,CAAC,EAAE,OAAO,CAAC;CACxB,CAAC;AAWN,MAAM,MAAM,+BAA+B,GAAG;IAC5C,MAAM,EAAE,MAAM,IAAI,CAAC;IACnB,IAAI,EAAE,MAAM,IAAI,CAAC;IACjB,MAAM,EAAE,iBAAiB,CAAC;IAC1B,MAAM,EAAE,MAAM,CAAC,iBAAiB,CAAC,GAAG,MAAM,CAAC,OAAO,CAAC,CAAC;IACpD,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;IACpB,KAAK,EAAE,KAAK,GAAG,SAAS,CAAC;IACzB,MAAM,EAAE,cAAc,CAAC;IACvB,IAAI,EAAE,SAAS,GAAG,MAAM,CAAC;CAC1B,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,0BAA0B,UAC9B,+BAA+B,+CA4SvC,CAAC"}
1
+ {"version":3,"file":"ConnectWalletSocialOptions.d.ts","sourceRoot":"","sources":["../../../../../../src/react/web/wallets/shared/ConnectWalletSocialOptions.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,6BAA6B,CAAC;AACzD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAKnE,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,0CAA0C,CAAC;AAChF,OAAO,EAEL,KAAK,gBAAgB,EAEtB,MAAM,8BAA8B,CAAC;AACtC,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,qCAAqC,CAAC;AAuB7E,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAG3D,MAAM,MAAM,0BAA0B,GAClC,SAAS,GACT;IACE,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,WAAW,CAAC,EAAE;QACZ,IAAI,EAAE,gBAAgB,CAAC;QACvB,iBAAiB,EAAE,OAAO,CAAC,OAAO,CAAC,CAAC;KACrC,CAAC;IACF,YAAY,CAAC,EAAE,OAAO,CAAC;CACxB,CAAC;AAWN,MAAM,MAAM,+BAA+B,GAAG;IAC5C,MAAM,EAAE,MAAM,IAAI,CAAC;IACnB,IAAI,EAAE,MAAM,IAAI,CAAC;IACjB,MAAM,EAAE,iBAAiB,CAAC;IAC1B,MAAM,EAAE,MAAM,CAAC,iBAAiB,CAAC,GAAG,MAAM,CAAC,OAAO,CAAC,CAAC;IACpD,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;IACpB,KAAK,EAAE,KAAK,GAAG,SAAS,CAAC;IACzB,MAAM,EAAE,cAAc,CAAC;IACvB,IAAI,EAAE,SAAS,GAAG,MAAM,CAAC;CAC1B,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,0BAA0B,UAC9B,+BAA+B,+CAuTvC,CAAC"}
@@ -4,18 +4,58 @@ export type DownloadOptions = Prettify<ResolveSchemeOptions & {
4
4
  requestTimeoutMs?: number;
5
5
  }>;
6
6
  /**
7
- * Downloads a file from the specified URI.
7
+ * @description Downloads a file from the specified IPFS, Arweave, or HTTP URI.
8
+ *
9
+ * `download` will parse the provided URI based on its scheme (ipfs://, ar://, https://) and convert it to a URL to fetch the file from thirdweb's storage service.
10
+ *
8
11
  * @param options - The download options.
9
- * @returns A Promise that resolves to the downloaded file.
10
- * @throws An error if the URI scheme is invalid.
12
+ * @param options.client - The Thirdweb client. See [createThirdwebClient](https://portal.thirdweb.com/references/typescript/v5/createThirdwebClient).
13
+ * @param options.uri - The URI of the file to download. Can be IPFS, Arweave, or HTTP.
14
+ * @param [options.requestTimeoutMs] - The maximum time in milliseconds to wait for the request to complete. Defaults to 60 seconds (60,000 milliseconds).
15
+ *
16
+ * @returns Asynchronously returns the network response from fetching the file.
17
+ * @throws An error if the URI scheme is invalid or if the request fails.
18
+ *
11
19
  * @example
20
+ * Download a file from IPFS:
12
21
  * ```ts
13
22
  * import { download } from "thirdweb/storage";
23
+ * import { createThirdwebClient } from "@thirdweb-dev/sdk";
24
+ *
25
+ * const client = createThirdwebClient({ clientId: "YOUR_CLIENT_ID" });
26
+ *
14
27
  * const file = await download({
15
28
  * client,
16
29
  * uri: "ipfs://Qm...",
17
30
  * });
18
31
  * ```
32
+ *
33
+ * Download a file from Arweave:
34
+ * ```ts
35
+ * import { download } from "thirdweb/storage";
36
+ * import { createThirdwebClient } from "@thirdweb-dev/sdk";
37
+ *
38
+ * const client = createThirdwebClient({ clientId: "YOUR_CLIENT_ID" });
39
+ *
40
+ * const file = await download({
41
+ * client,
42
+ * uri: "ar://{arweave-transaction-id}",
43
+ * });
44
+ * ```
45
+ *
46
+ * Download a file from HTTP:
47
+ * ```ts
48
+ * import { download } from "thirdweb/storage";
49
+ * import { createThirdwebClient } from "@thirdweb-dev/sdk";
50
+ *
51
+ * const client = createThirdwebClient({ clientId: "YOUR_CLIENT_ID" });
52
+ *
53
+ * const file = await download({
54
+ * client,
55
+ * uri: "https://example.com/file.txt",
56
+ * });
57
+ * ```
58
+ *
19
59
  * @storage
20
60
  */
21
61
  export declare function download(options: DownloadOptions): Promise<Response>;
@@ -1 +1 @@
1
- {"version":3,"file":"download.d.ts","sourceRoot":"","sources":["../../../src/storage/download.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,oBAAoB,EAAiB,MAAM,kBAAkB,CAAC;AAC5E,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAC;AAEvD,MAAM,MAAM,eAAe,GAAG,QAAQ,CACpC,oBAAoB,GAAG;IACrB,gBAAgB,CAAC,EAAE,MAAM,CAAC;CAC3B,CACF,CAAC;AAEF;;;;;;;;;;;;;;GAcG;AACH,wBAAsB,QAAQ,CAAC,OAAO,EAAE,eAAe,qBAkBtD"}
1
+ {"version":3,"file":"download.d.ts","sourceRoot":"","sources":["../../../src/storage/download.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,oBAAoB,EAAiB,MAAM,kBAAkB,CAAC;AAC5E,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAC;AAEvD,MAAM,MAAM,eAAe,GAAG,QAAQ,CACpC,oBAAoB,GAAG;IACrB,gBAAgB,CAAC,EAAE,MAAM,CAAC;CAC3B,CACF,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsDG;AACH,wBAAsB,QAAQ,CAAC,OAAO,EAAE,eAAe,qBAqBtD"}
@@ -0,0 +1,29 @@
1
+ /**
2
+ * Converts an array of parameter values to their respective types based on the provided type array.
3
+ *
4
+ * This utility function is particularly useful for ensuring that parameter values are correctly formatted
5
+ * according to the expected types before they are used in further processing or passed to a Solidity smart contract.
6
+ *
7
+ * @param {string[]} constructorParamTypes - An array of type strings indicating the expected types of the values,
8
+ * following Solidity type conventions (e.g., "address", "uint256", "bool").
9
+ * @param {unknown[]} constructorParamValues - An array of values to be converted according to the types.
10
+ * @returns - An array of values converted to their respective types.
11
+ *
12
+ * @example
13
+ * ```ts
14
+ * import { parseAbiParams } from "thirdweb/utils";
15
+ *
16
+ * const example1 = parseAbiParams(
17
+ * ["address", "uint256"],
18
+ * ["0x.....", "1200000"]
19
+ * ); // result: ["0x......", 1200000n]
20
+ *
21
+ * const example2 = parseAbiParams(
22
+ * ["address", "bool"],
23
+ * ["0x.....", "true"]
24
+ * ); // result: ["0x......", true]
25
+ * ```
26
+ * @utils
27
+ */
28
+ export declare function parseAbiParams(constructorParamTypes: string[], constructorParamValues: unknown[]): Array<string | bigint | boolean>;
29
+ //# sourceMappingURL=parse-abi-params.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"parse-abi-params.d.ts","sourceRoot":"","sources":["../../../../src/utils/contract/parse-abi-params.ts"],"names":[],"mappings":"AAGA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,wBAAgB,cAAc,CAC5B,qBAAqB,EAAE,MAAM,EAAE,EAC/B,sBAAsB,EAAE,OAAO,EAAE,GAChC,KAAK,CAAC,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC,CAwDlC"}
@@ -1,2 +1,2 @@
1
- export declare const version = "5.41.0";
1
+ export declare const version = "5.42.0";
2
2
  //# sourceMappingURL=version.d.ts.map
@@ -2,9 +2,31 @@ import type { Wallet } from "./interfaces/wallet.js";
2
2
  import type { CreateWalletArgs, WalletId } from "./wallet-types.js";
3
3
  /**
4
4
  * Creates a wallet based on the provided ID and arguments.
5
+ *
6
+ * - Supports 350+ wallets
7
+ * - Handles both injected browser wallets and WalletConnect sessions
8
+ *
9
+ * [View all available wallets](https://portal.thirdweb.com/typescript/v5/supported-wallets)
10
+ *
5
11
  * @param args - The arguments for creating the wallet.
12
+ * @param args.id - The ID of the wallet to create, this will be autocompleted by your IDE.
13
+ * [View all available wallets](https://portal.thirdweb.com/typescript/v5/supported-wallets)
14
+ * @param args.createOptions - The options for creating the wallet.
15
+ * The arguments are different for each wallet type.
16
+ * Refer to the [WalletCreationOptions](https://portal.thirdweb.com/references/typescript/v5/WalletCreationOptions) type for more details.
6
17
  * @returns - The created wallet.
7
18
  * @example
19
+ *
20
+ * ## Connecting the wallet
21
+ *
22
+ * Once created, you can connect the wallet to your app by calling the `connect` method.
23
+ *
24
+ * The `connect` method returns a promise that resolves to the connected account.
25
+ *
26
+ * Each wallet type can have different connect options. [View the different connect options](https://portal.thirdweb.com/references/typescript/v5/WalletConnectionOption)
27
+ *
28
+ * ## Connecting to an injected wallet
29
+ *
8
30
  * ```ts
9
31
  * import { createWallet } from "thirdweb/wallets";
10
32
  *
@@ -14,6 +36,57 @@ import type { CreateWalletArgs, WalletId } from "./wallet-types.js";
14
36
  * client,
15
37
  * });
16
38
  * ```
39
+ *
40
+ * You can check if a wallet is installed by calling the [injectedProvider](https://portal.thirdweb.com/references/typescript/v5/injectedProvider) method.
41
+ *
42
+ * ## Connecting via WalletConnect modal
43
+ *
44
+ * ```ts
45
+ * import { createWallet } from "thirdweb/wallets";
46
+ *
47
+ * const metamaskWallet = createWallet("io.metamask");
48
+ *
49
+ * await metamask.connect({
50
+ * client,
51
+ * walletConnect: {
52
+ * projectId: "YOUR_PROJECT_ID",
53
+ * showQrModal: true,
54
+ * appMetadata: {
55
+ * name: "My App",
56
+ * url: "https://my-app.com",
57
+ * description: "my app description",
58
+ * logoUrl: "https://path/to/my-app/logo.svg",
59
+ * },
60
+ * },
61
+ * });
62
+ * ```
63
+ * [View ConnectWallet connection options](https://portal.thirdweb.com/references/typescript/v5/WCConnectOptions)
64
+ *
65
+ * ## Connecting with coinbase wallet
66
+ *
67
+ * ```ts
68
+ * import { createWallet } from "thirdweb/wallets";
69
+ *
70
+ * const cbWallet = createWallet("com.coinbase.wallet", {
71
+ * appMetadata: {
72
+ * name: "My App",
73
+ * url: "https://my-app.com",
74
+ * description: "my app description",
75
+ * logoUrl: "https://path/to/my-app/logo.svg",
76
+ * },
77
+ * walletConfig: {
78
+ * // options: 'all' | 'smartWalletOnly' | 'eoaOnly'
79
+ * options: 'all',
80
+ * },
81
+ * });
82
+ *
83
+ * const account = await cbWallet.connect({
84
+ * client,
85
+ * });
86
+ * ```
87
+ *
88
+ * [View Coinbase wallet creation options](https://portal.thirdweb.com/references/typescript/v5/CoinbaseWalletCreationOptions)
89
+ *
17
90
  * @wallet
18
91
  */
19
92
  export declare function createWallet<const ID extends WalletId>(...args: CreateWalletArgs<ID>): Wallet<ID>;
@@ -1 +1 @@
1
- {"version":3,"file":"create-wallet.d.ts","sourceRoot":"","sources":["../../../src/wallets/create-wallet.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAW,MAAM,EAAE,MAAM,wBAAwB,CAAC;AAC9D,OAAO,KAAK,EACV,gBAAgB,EAIhB,QAAQ,EACT,MAAM,mBAAmB,CAAC;AAkB3B;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,YAAY,CAAC,KAAK,CAAC,EAAE,SAAS,QAAQ,EACpD,GAAG,IAAI,EAAE,gBAAgB,CAAC,EAAE,CAAC,GAC5B,MAAM,CAAC,EAAE,CAAC,CAyPZ;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,aAAa,4BAE5B"}
1
+ {"version":3,"file":"create-wallet.d.ts","sourceRoot":"","sources":["../../../src/wallets/create-wallet.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAW,MAAM,EAAE,MAAM,wBAAwB,CAAC;AAC9D,OAAO,KAAK,EACV,gBAAgB,EAIhB,QAAQ,EACT,MAAM,mBAAmB,CAAC;AAkB3B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwFG;AACH,wBAAgB,YAAY,CAAC,KAAK,CAAC,EAAE,SAAS,QAAQ,EACpD,GAAG,IAAI,EAAE,gBAAgB,CAAC,EAAE,CAAC,GAC5B,MAAM,CAAC,EAAE,CAAC,CAyPZ;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,aAAa,4BAE5B"}
@@ -1,3 +1,4 @@
1
+ import type { Prettify } from "../../utils/type-utils.js";
1
2
  import type { InAppWalletAutoConnectOptions, InAppWalletConnectionOptions } from "../in-app/core/wallet/types.js";
2
3
  import type { Ecosystem } from "../in-app/web/types.js";
3
4
  export type EcosystemWalletCreationOptions = {
@@ -6,10 +7,10 @@ export type EcosystemWalletCreationOptions = {
6
7
  mode?: "popup" | "redirect";
7
8
  };
8
9
  };
9
- export type EcosystemWalletConnectionOptions = InAppWalletConnectionOptions & {
10
+ export type EcosystemWalletConnectionOptions = Prettify<InAppWalletConnectionOptions & {
10
11
  ecosystem: Ecosystem;
11
- };
12
- export type EcosystemWalletAutoConnectOptions = InAppWalletAutoConnectOptions & {
12
+ }>;
13
+ export type EcosystemWalletAutoConnectOptions = Prettify<InAppWalletAutoConnectOptions & {
13
14
  ecosystem: Ecosystem;
14
- };
15
+ }>;
15
16
  //# sourceMappingURL=types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/wallets/ecosystem/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,6BAA6B,EAC7B,4BAA4B,EAC7B,MAAM,gCAAgC,CAAC;AACxC,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AAExD,MAAM,MAAM,8BAA8B,GAAG;IAC3C,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,IAAI,CAAC,EAAE;QACL,IAAI,CAAC,EAAE,OAAO,GAAG,UAAU,CAAC;KAC7B,CAAC;CACH,CAAC;AAEF,MAAM,MAAM,gCAAgC,GAAG,4BAA4B,GAAG;IAC5E,SAAS,EAAE,SAAS,CAAC;CACtB,CAAC;AACF,MAAM,MAAM,iCAAiC,GAC3C,6BAA6B,GAAG;IAAE,SAAS,EAAE,SAAS,CAAA;CAAE,CAAC"}
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/wallets/ecosystem/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,2BAA2B,CAAC;AAC1D,OAAO,KAAK,EACV,6BAA6B,EAC7B,4BAA4B,EAC7B,MAAM,gCAAgC,CAAC;AACxC,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AAExD,MAAM,MAAM,8BAA8B,GAAG;IAC3C,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,IAAI,CAAC,EAAE;QACL,IAAI,CAAC,EAAE,OAAO,GAAG,UAAU,CAAC;KAC7B,CAAC;CACH,CAAC;AAEF,MAAM,MAAM,gCAAgC,GAAG,QAAQ,CACrD,4BAA4B,GAAG;IAC7B,SAAS,EAAE,SAAS,CAAC;CACtB,CACF,CAAC;AACF,MAAM,MAAM,iCAAiC,GAAG,QAAQ,CACtD,6BAA6B,GAAG;IAAE,SAAS,EAAE,SAAS,CAAA;CAAE,CACzD,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/wallets/in-app/core/wallet/index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,6BAA6B,CAAC;AAMzD,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,+BAA+B,CAAC;AACrE,OAAO,KAAK,EAAE,iBAAiB,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAC5E,OAAO,KAAK,EACV,gBAAgB,EAChB,0BAA0B,EAC1B,sBAAsB,EACvB,MAAM,0BAA0B,CAAC;AAElC,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AAEjE;;;;;GAKG;AACH,wBAAgB,aAAa,CAC3B,MAAM,EAAE,MAAM,CAAC,QAAQ,CAAC,GACvB,MAAM,IAAI,MAAM,CAAC,OAAO,GAAG,UAAU,CAAC,CAExC;AAED;;GAEG;AACH,wBAAsB,kBAAkB,CACtC,OAAO,EACH,sBAAsB,CAAC,OAAO,CAAC,GAC/B,sBAAsB,CAAC,iBAAiB,CAAC,EAC7C,aAAa,EACT,gBAAgB,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,GAC5B,gBAAgB,CAAC,iBAAiB,CAAC,CAAC,CAAC,CAAC,EAC1C,SAAS,EAAE,cAAc,GACxB,OAAO,CAAC,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC,CAgC3B;AAED;;GAEG;AACH,wBAAsB,sBAAsB,CAC1C,OAAO,EACH,0BAA0B,CAAC,OAAO,CAAC,GACnC,0BAA0B,CAAC,iBAAiB,CAAC,EACjD,aAAa,EACT,gBAAgB,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,GAC5B,gBAAgB,CAAC,iBAAiB,CAAC,CAAC,CAAC,CAAC,EAC1C,SAAS,EAAE,cAAc,GACxB,OAAO,CAAC,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC,CA0B3B"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/wallets/in-app/core/wallet/index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,6BAA6B,CAAC;AAMzD,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,+BAA+B,CAAC;AACrE,OAAO,KAAK,EAAE,iBAAiB,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAC5E,OAAO,KAAK,EACV,gBAAgB,EAChB,0BAA0B,EAC1B,sBAAsB,EACvB,MAAM,0BAA0B,CAAC;AAElC,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AAEjE;;;;;GAKG;AACH,wBAAgB,aAAa,CAC3B,MAAM,EAAE,MAAM,CAAC,QAAQ,CAAC,GACvB,MAAM,IAAI,MAAM,CAAC,OAAO,GAAG,UAAU,CAAC,CAExC;AAED;;GAEG;AACH,wBAAsB,kBAAkB,CACtC,OAAO,EACH,sBAAsB,CAAC,OAAO,CAAC,GAC/B,sBAAsB,CAAC,iBAAiB,CAAC,EAC7C,aAAa,EACT,gBAAgB,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,GAC5B,gBAAgB,CAAC,iBAAiB,CAAC,CAAC,CAAC,CAAC,EAC1C,SAAS,EAAE,cAAc,GACxB,OAAO,CAAC,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC,CA+B3B;AAED;;GAEG;AACH,wBAAsB,sBAAsB,CAC1C,OAAO,EACH,0BAA0B,CAAC,OAAO,CAAC,GACnC,0BAA0B,CAAC,iBAAiB,CAAC,EACjD,aAAa,EACT,gBAAgB,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,GAC5B,gBAAgB,CAAC,iBAAiB,CAAC,CAAC,CAAC,CAAC,EAC1C,SAAS,EAAE,cAAc,GACxB,OAAO,CAAC,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC,CA0B3B"}
@@ -1,10 +1,29 @@
1
1
  import type { Wallet } from "../../interfaces/wallet.js";
2
2
  import type { CreateWalletArgs, EcosystemWalletId } from "../../wallet-types.js";
3
3
  /**
4
- * Creates an ecosystem wallet.
4
+ * Creates an [Ecosystem Wallet](https://portal.thirdweb.com/connect/ecosystems/overview) based on various authentication methods.
5
+ *
6
+ * Available authentication methods:
7
+ * - Email
8
+ * - Phone
9
+ * - Passkey
10
+ * - Google
11
+ * - Apple
12
+ * - Facebook
13
+ * - Discord
14
+ * - Farcaster
15
+ *
16
+ * Can also be configured to use Account Abstraction to directly connect to a ERC4337 smart account based on those authentication methods.
17
+ *
18
+ * Refer to [inAppWallet](https://portal.thirdweb.com/references/typescript/v5/inAppWallet) for detailed usage examples.
19
+ *
5
20
  * @param createOptions - configuration options
21
+ * Refer to [EcosystemWalletCreationOptions](https://portal.thirdweb.com/references/typescript/v5/EcosystemWalletCreationOptions) for more details.
6
22
  * @returns The created ecosystem wallet.
7
23
  * @example
24
+ *
25
+ * ### Connect to an ecosystem wallet
26
+ *
8
27
  * ```ts
9
28
  * import { ecosystemWallet } from "thirdweb/wallets";
10
29
  *
@@ -17,14 +36,21 @@ import type { CreateWalletArgs, EcosystemWalletId } from "../../wallet-types.js"
17
36
  * });
18
37
  * ```
19
38
  *
20
- * Connect to a restricted ecosystem wallet with your designated partner ID
21
- * @note The parnter ID will be provided to you by the ecosystem with which you're integrating.
39
+ * [View all connection options](https://portal.thirdweb.com/references/typescript/v5/EcosystemWalletConnectionOptions)
40
+ *
41
+ * ### Connect to a restricted ecosystem wallet with your designated partner ID
42
+ *
43
+ * The parnter ID will be provided to you by the ecosystem with which you're integrating.
44
+ *
22
45
  * ```ts
23
46
  * import { ecosystemWallet } from "thirdweb/wallets";
24
47
  * const wallet = ecosystemWallet("ecosystem.hooli", {
25
48
  * partnerId: "..."
26
49
  * });
27
50
  * ```
51
+ *
52
+ * Refer to [inAppWallet](https://portal.thirdweb.com/references/typescript/v5/inAppWallet) for more usage examples.
53
+ *
28
54
  * @wallet
29
55
  */
30
56
  export declare function ecosystemWallet(...args: CreateWalletArgs<EcosystemWalletId>): Wallet<EcosystemWalletId>;
@@ -1 +1 @@
1
- {"version":3,"file":"ecosystem.d.ts","sourceRoot":"","sources":["../../../../../src/wallets/in-app/web/ecosystem.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,4BAA4B,CAAC;AACzD,OAAO,KAAK,EACV,gBAAgB,EAChB,iBAAiB,EAClB,MAAM,uBAAuB,CAAC;AAG/B;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,wBAAgB,eAAe,CAC7B,GAAG,IAAI,EAAE,gBAAgB,CAAC,iBAAiB,CAAC,GAC3C,MAAM,CAAC,iBAAiB,CAAC,CAgB3B"}
1
+ {"version":3,"file":"ecosystem.d.ts","sourceRoot":"","sources":["../../../../../src/wallets/in-app/web/ecosystem.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,4BAA4B,CAAC;AACzD,OAAO,KAAK,EACV,gBAAgB,EAChB,iBAAiB,EAClB,MAAM,uBAAuB,CAAC;AAG/B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoDG;AACH,wBAAgB,eAAe,CAC7B,GAAG,IAAI,EAAE,gBAAgB,CAAC,iBAAiB,CAAC,GAC3C,MAAM,CAAC,iBAAiB,CAAC,CAgB3B"}