thirdweb 5.70.0-nightly-ecaa304a812188da3c81888bb52ca6064093c139-20241121000332 → 5.70.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 (50) hide show
  1. package/dist/cjs/react/core/social/useSocialProfiles.js +1 -1
  2. package/dist/cjs/react/web/ui/PayEmbed.js +138 -7
  3. package/dist/cjs/react/web/ui/PayEmbed.js.map +1 -1
  4. package/dist/cjs/react/web/ui/prebuilt/Account/address.js +1 -1
  5. package/dist/cjs/react/web/ui/prebuilt/Account/avatar.js +1 -1
  6. package/dist/cjs/react/web/ui/prebuilt/Account/balance.js +1 -1
  7. package/dist/cjs/react/web/ui/prebuilt/Account/blobbie.js +1 -0
  8. package/dist/cjs/react/web/ui/prebuilt/Account/blobbie.js.map +1 -1
  9. package/dist/cjs/react/web/ui/prebuilt/Account/name.js +1 -1
  10. package/dist/cjs/react/web/ui/prebuilt/Account/provider.js +1 -1
  11. package/dist/cjs/react/web/ui/prebuilt/NFT/name.js +1 -1
  12. package/dist/cjs/version.js +1 -1
  13. package/dist/cjs/version.js.map +1 -1
  14. package/dist/esm/react/core/social/useSocialProfiles.js +1 -1
  15. package/dist/esm/react/web/ui/PayEmbed.js +138 -7
  16. package/dist/esm/react/web/ui/PayEmbed.js.map +1 -1
  17. package/dist/esm/react/web/ui/prebuilt/Account/address.js +1 -1
  18. package/dist/esm/react/web/ui/prebuilt/Account/avatar.js +1 -1
  19. package/dist/esm/react/web/ui/prebuilt/Account/balance.js +1 -1
  20. package/dist/esm/react/web/ui/prebuilt/Account/blobbie.js +1 -0
  21. package/dist/esm/react/web/ui/prebuilt/Account/blobbie.js.map +1 -1
  22. package/dist/esm/react/web/ui/prebuilt/Account/name.js +1 -1
  23. package/dist/esm/react/web/ui/prebuilt/Account/provider.js +1 -1
  24. package/dist/esm/react/web/ui/prebuilt/NFT/name.js +1 -1
  25. package/dist/esm/version.js +1 -1
  26. package/dist/esm/version.js.map +1 -1
  27. package/dist/types/react/core/social/useSocialProfiles.d.ts +1 -1
  28. package/dist/types/react/web/ui/PayEmbed.d.ts +138 -7
  29. package/dist/types/react/web/ui/PayEmbed.d.ts.map +1 -1
  30. package/dist/types/react/web/ui/prebuilt/Account/address.d.ts +2 -2
  31. package/dist/types/react/web/ui/prebuilt/Account/avatar.d.ts +2 -2
  32. package/dist/types/react/web/ui/prebuilt/Account/balance.d.ts +2 -2
  33. package/dist/types/react/web/ui/prebuilt/Account/blobbie.d.ts +1 -0
  34. package/dist/types/react/web/ui/prebuilt/Account/blobbie.d.ts.map +1 -1
  35. package/dist/types/react/web/ui/prebuilt/Account/name.d.ts +2 -2
  36. package/dist/types/react/web/ui/prebuilt/Account/provider.d.ts +2 -2
  37. package/dist/types/react/web/ui/prebuilt/NFT/name.d.ts +1 -1
  38. package/dist/types/version.d.ts +1 -1
  39. package/dist/types/version.d.ts.map +1 -1
  40. package/package.json +1 -1
  41. package/src/react/core/social/useSocialProfiles.ts +1 -1
  42. package/src/react/web/ui/PayEmbed.tsx +138 -7
  43. package/src/react/web/ui/prebuilt/Account/address.tsx +2 -2
  44. package/src/react/web/ui/prebuilt/Account/avatar.tsx +2 -2
  45. package/src/react/web/ui/prebuilt/Account/balance.tsx +2 -2
  46. package/src/react/web/ui/prebuilt/Account/blobbie.tsx +1 -0
  47. package/src/react/web/ui/prebuilt/Account/name.tsx +2 -2
  48. package/src/react/web/ui/prebuilt/Account/provider.tsx +2 -2
  49. package/src/react/web/ui/prebuilt/NFT/name.tsx +1 -1
  50. package/src/version.ts +1 -1
@@ -11,7 +11,7 @@ const profiles_js_1 = require("../../../social/profiles.js");
11
11
  * @returns A React Query result containing the social profiles.
12
12
  *
13
13
  * @example
14
- * ```ts
14
+ * ```tsx
15
15
  * import { useSocialProfiles } from "thirdweb/react";
16
16
  * const { data: profiles } = useSocialProfiles({
17
17
  * client,
@@ -13,26 +13,157 @@ const ExecutingScreen_js_1 = require("./TransactionButton/ExecutingScreen.js");
13
13
  const DynamicHeight_js_1 = require("./components/DynamicHeight.js");
14
14
  const Spinner_js_1 = require("./components/Spinner.js");
15
15
  /**
16
- * Embed thirdweb Pay UI for Buy tokens using Crypto or Credit Card.
17
- *
18
- * PayEmbed also renders a "Connect" button if the user is not connected to a wallet. You can customize the options for "Connect" button using the `connectOptions` prop.
16
+ * Embed a prebuilt UI for funding wallets, purchases or transactions with crypto or fiat.
19
17
  *
20
18
  * @param props - Props of type [`PayEmbedProps`](https://portal.thirdweb.com/references/typescript/v5/PayEmbedProps) to configure the PayEmbed component.
21
19
  *
22
20
  * @example
21
+ * ### Default configuration
22
+ *
23
+ * By default, the `PayEmbed` component will allows users to fund their wallets with crypto or fiat on any of the supported chains..
24
+ *
25
+ * ```tsx
26
+ * <PayEmbed
27
+ * client={client}
28
+ * />
29
+ * ```
30
+ *
31
+ * ### Top up wallets
32
+ *
33
+ * You can set the `mode` option to `"fund_wallet"` to allow users to top up their wallets with crypto or fiat.
34
+ *
35
+ * ```tsx
36
+ * <PayEmbed
37
+ * client={client}
38
+ * payOptions={{
39
+ * mode: "fund_wallet",
40
+ * metadata: {
41
+ * name: "Get funds", // title of the payment modal
42
+ * },
43
+ * prefillBuy: {
44
+ * chain: base, // chain to prefill the buy screen with
45
+ * amount: "0.01", // amount to prefill the buy screen with
46
+ * },
47
+ * }}
48
+ * />
49
+ * ```
50
+ *
51
+ * ### Direct Payments
52
+ *
53
+ * You can set the `mode` option to `"direct_payment"` to allow users to make a direct payment to a wallet address.
54
+ *
55
+ * ```tsx
56
+ * <PayEmbed
57
+ * client={client}
58
+ * theme={"light"}
59
+ * payOptions={{
60
+ * mode: "direct_payment",
61
+ * paymentInfo: {
62
+ * amount: "35",
63
+ * chain: base,
64
+ * token: getDefaultToken(base, "USDC"),
65
+ * sellerAddress: "0x...", // the wallet address of the seller
66
+ * },
67
+ * metadata: {
68
+ * name: "Black Hoodie (Size L)",
69
+ * image: "/drip-hoodie.png",
70
+ * },
71
+ * }}
72
+ * />
73
+ * ```
74
+ *
75
+ * ### Transactions
76
+ *
77
+ * You can set the `mode` option to `"transaction"` to allow users to execute a transaction with a different wallet, chain or token.
78
+ *
79
+ * ```tsx
80
+ * <PayEmbed
81
+ * client={client}
82
+ * payOptions={{
83
+ * mode: "transaction",
84
+ * // can be any transaction
85
+ * transaction: claimTo({
86
+ * contract: nftContract,
87
+ * quantity: 1n,
88
+ * tokenId: 0n,
89
+ * to: "0x...",
90
+ * }),
91
+ * // this could be any metadata, including NFT metadata
92
+ * metadata: {
93
+ * name: "VIP Ticket",
94
+ * image: "https://...",
95
+ * },
96
+ * }}
97
+ * />
98
+ * ```
99
+ *
100
+ * You can also handle ERC20 payments by passing `erc20value` to your transaction:
101
+ *
102
+ * ```tsx
103
+ * <PayEmbed
104
+ * client={client}
105
+ * payOptions={{
106
+ * mode: "transaction",
107
+ * transaction: prepareContractCall({
108
+ * contract: yourContract,
109
+ * functionName: "purchase",
110
+ * args: [arg1, arg2, ...],
111
+ * erc20value: {
112
+ * token: USDC_TOKEN_ADDRESS, // the erc20 token required to purchase
113
+ * amount: toUnits("100", 6), // the amount of erc20 token required to purchase
114
+ * },
115
+ * }),
116
+ * }}
117
+ * />
118
+ * ```
119
+ *
120
+ * ### Enable/Disable payment methods
121
+ *
122
+ * You can disable the use of crypto or fiat by setting the `buyWithCrypto` or `buyWithFiat` options to `false`.
123
+ *
124
+ * ```tsx
125
+ * <PayEmbed
126
+ * client={client}
127
+ * payOptions={{
128
+ * buyWithFiat: false,
129
+ * }}
130
+ * />
131
+ *
132
+ * ### Customize the UI
133
+ *
134
+ * You can customize the UI of the `PayEmbed` component by passing a custom theme object to the `theme` prop.
135
+ *
136
+ * ```tsx
137
+ * <PayEmbed
138
+ * client={client}
139
+ * theme={darkTheme({
140
+ * colors: {
141
+ * modalBg: "red",
142
+ * },
143
+ * })}
144
+ * />
145
+ * ```
146
+ *
147
+ * Refer to the [`Theme`](https://portal.thirdweb.com/references/typescript/v5/Theme) type for more details.
148
+ *
149
+ * ### Configure the wallet connection
150
+ *
151
+ * You can customize the wallet connection flow by passing a `connectOptions` object to the `PayEmbed` component.
152
+ *
23
153
  * ```tsx
24
154
  * <PayEmbed
25
155
  * client={client}
26
156
  * connectOptions={{
27
157
  * connectModal: {
28
158
  * size: 'compact',
159
+ * title: "Sign in",
29
160
  * }
30
161
  * }}
31
- * payOptions={{
32
- * buyWithCrypto: false,
33
- * }}
34
- * />
162
+ * />
35
163
  * ```
164
+ *
165
+ * Refer to the [`PayEmbedConnectOptions`](https://portal.thirdweb.com/references/typescript/v5/PayEmbedConnectOptions) type for more details.
166
+ *
36
167
  * @buyCrypto
37
168
  */
38
169
  function PayEmbed(props) {
@@ -1 +1 @@
1
- {"version":3,"file":"PayEmbed.js","sourceRoot":"","sources":["../../../../../src/react/web/ui/PayEmbed.tsx"],"names":[],"mappings":";AAAA,YAAY,CAAC;;AAgKb,4BA8FC;;AA5PD,iCAA4C;AAO5C,4FAAsF;AAOtF,sFAAkF;AAElF,2EAAuE;AACvE,oFAA8E;AAC9E,2EAAiE;AACjE,+EAA2E;AAC3E,oEAA8D;AAC9D,wDAAkD;AAkHlD;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,SAAgB,QAAQ,CAAC,KAAoB;IAC3C,MAAM,WAAW,GAAG,IAAA,sCAAgB,EAAC,KAAK,CAAC,MAAM,IAAI,OAAO,CAAC,CAAC;IAC9D,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,GAAG,IAAA,gBAAQ,EAAuB,KAAK,CAAC,CAAC;IAClE,MAAM,KAAK,GAAG,KAAK,CAAC,KAAK,IAAI,MAAM,CAAC;IACpC,MAAM,iBAAiB,GAAG,IAAA,4CAAoB,GAAE,CAAC;IAEjD,2DAA2D;IAC3D,IAAA,iBAAS,EAAC,GAAG,EAAE;QACb,IAAI,KAAK,CAAC,cAAc,EAAE,KAAK,EAAE,CAAC;YAChC,iBAAiB,CAAC,YAAY,CAAC,CAAC,KAAK,CAAC,cAAc,EAA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AM,EAAE,GAAG,EAAE;wBACX,SAAS,CAAC,KAAK,CAAC,CAAC;oBACnB,CAAC,EACD,QAAQ,EAAE,GAAG,EAAE,GAAE,CAAC,GAClB,CACH,IACF,CACJ,CAAC;IACJ,CAAC;IAED,OAAO,CACL,uBAAC,4CAAmB,IAAC,KAAK,EAAE,KAAK,YAC/B,uBAAC,gCAAc,IACb,SAAS,EAAC,SAAS,EACnB,KAAK,EAAE,KAAK,CAAC,KAAK,EAClB,SAAS,EAAE,KAAK,CAAC,SAAS,YAE1B,uBAAC,gCAAa,cAAE,OAAO,GAAiB,GACzB,GACG,CACvB,CAAC;AACJ,CAAC"}
@@ -38,7 +38,7 @@ const provider_js_1 = require("./provider.js");
38
38
  * ```
39
39
  *
40
40
  * @component
41
- * @account
41
+ * @wallet
42
42
  * @beta
43
43
  */
44
44
  function AccountAddress({ formatFn, ...restProps }) {
@@ -91,7 +91,7 @@ const provider_js_1 = require("./provider.js");
91
91
  * ```
92
92
  * @returns An <img /> if the avatar is resolved successfully
93
93
  * @component
94
- * @account
94
+ * @wallet
95
95
  * @beta
96
96
  */
97
97
  function AccountAvatar({ socialType, resolverAddress, resolverChain, loadingComponent, fallbackComponent, queryOptions, ...restProps }) {
@@ -78,7 +78,7 @@ const provider_js_1 = require("./provider.js");
78
78
  * ```
79
79
  *
80
80
  * @component
81
- * @account
81
+ * @wallet
82
82
  * @beta
83
83
  */
84
84
  function AccountBalance({ chain, tokenAddress, formatFn, loadingComponent, fallbackComponent, queryOptions, ...restProps }) {
@@ -8,6 +8,7 @@ const provider_js_1 = require("./provider.js");
8
8
  * A wrapper for the Blobbie component
9
9
  * @param props BlobbieProps
10
10
  * @beta
11
+ * @wallet
11
12
  */
12
13
  function AccountBlobbie(props) {
13
14
  const { address } = (0, provider_js_1.useAccountContext)();
@@ -1 +1 @@
1
- {"version":3,"file":"blobbie.js","sourceRoot":"","sources":["../../../../../../../src/react/web/ui/prebuilt/Account/blobbie.tsx"],"names":[],"mappings":";;AAQA,wCAGC;;AAXD,+DAA4E;AAC5E,+CAAkD;AAElD;;;;GAIG;AACH,SAAgB,cAAc,CAAC,KAAoC;IACjE,MAAM,EAAE,OAAO,EAAE,GAAG,IAAA,+BAAiB,GAAE,CAAC;IACxC,OAAO,uBAAC,oBAAO,OAAK,KAAK,EAAE,OAAO,EAAE,OAAO,GAAI,CAAC;AAClD,CAAC"}
1
+ {"version":3,"file":"blobbie.js","sourceRoot":"","sources":["../../../../../../../src/react/web/ui/prebuilt/Account/blobbie.tsx"],"names":[],"mappings":";;AASA,wCAGC;;AAZD,+DAA4E;AAC5E,+CAAkD;AAElD;;;;;GAKG;AACH,SAAgB,cAAc,CAAC,KAAoC;IACjE,MAAM,EAAE,OAAO,EAAE,GAAG,IAAA,+BAAiB,GAAE,CAAC;IACxC,OAAO,uBAAC,oBAAO,OAAK,KAAK,EAAE,OAAO,EAAE,OAAO,GAAI,CAAC;AAClD,CAAC"}
@@ -70,7 +70,7 @@ const provider_js_1 = require("./provider.js");
70
70
  * ```
71
71
  *
72
72
  * @component
73
- * @account
73
+ * @wallet
74
74
  * @beta
75
75
  */
76
76
  function AccountName({ resolverAddress, resolverChain, socialType, formatFn, queryOptions, loadingComponent, fallbackComponent, ...restProps }) {
@@ -24,7 +24,7 @@ const AccountProviderContext = /* @__PURE__ */ (0, react_1.createContext)(undefi
24
24
  * ```
25
25
  *
26
26
  * @component
27
- * @account
27
+ * @wallet
28
28
  * @beta
29
29
  */
30
30
  function AccountProvider(props) {
@@ -9,7 +9,6 @@ const provider_js_1 = require("./provider.js");
9
9
  * so you can style it just like how you would style a <span> element.
10
10
  * @returns A <span> element containing the name of the NFT
11
11
  *
12
- * @component
13
12
  * @example
14
13
  * ### Basic usage
15
14
  * ```tsx
@@ -48,6 +47,7 @@ const provider_js_1 = require("./provider.js");
48
47
  * ```
49
48
  *
50
49
  * @nft
50
+ * @component
51
51
  * @beta
52
52
  */
53
53
  function NFTName({ loadingComponent, fallbackComponent, queryOptions, ...restProps }) {
@@ -1,5 +1,5 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.version = void 0;
4
- exports.version = "5.70.0-nightly-ecaa304a812188da3c81888bb52ca6064093c139-20241121000332";
4
+ exports.version = "5.70.0";
5
5
  //# sourceMappingURL=version.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"version.js","sourceRoot":"","sources":["../../src/version.ts"],"names":[],"mappings":";;;AAAa,QAAA,OAAO,GAAG,wEAAwE,CAAC"}
1
+ {"version":3,"file":"version.js","sourceRoot":"","sources":["../../src/version.ts"],"names":[],"mappings":";;;AAAa,QAAA,OAAO,GAAG,QAAQ,CAAC"}
@@ -8,7 +8,7 @@ import { getSocialProfiles } from "../../../social/profiles.js";
8
8
  * @returns A React Query result containing the social profiles.
9
9
  *
10
10
  * @example
11
- * ```ts
11
+ * ```tsx
12
12
  * import { useSocialProfiles } from "thirdweb/react";
13
13
  * const { data: profiles } = useSocialProfiles({
14
14
  * client,
@@ -10,26 +10,157 @@ import { ExecutingTxScreen } from "./TransactionButton/ExecutingScreen.js";
10
10
  import { DynamicHeight } from "./components/DynamicHeight.js";
11
11
  import { Spinner } from "./components/Spinner.js";
12
12
  /**
13
- * Embed thirdweb Pay UI for Buy tokens using Crypto or Credit Card.
14
- *
15
- * PayEmbed also renders a "Connect" button if the user is not connected to a wallet. You can customize the options for "Connect" button using the `connectOptions` prop.
13
+ * Embed a prebuilt UI for funding wallets, purchases or transactions with crypto or fiat.
16
14
  *
17
15
  * @param props - Props of type [`PayEmbedProps`](https://portal.thirdweb.com/references/typescript/v5/PayEmbedProps) to configure the PayEmbed component.
18
16
  *
19
17
  * @example
18
+ * ### Default configuration
19
+ *
20
+ * By default, the `PayEmbed` component will allows users to fund their wallets with crypto or fiat on any of the supported chains..
21
+ *
22
+ * ```tsx
23
+ * <PayEmbed
24
+ * client={client}
25
+ * />
26
+ * ```
27
+ *
28
+ * ### Top up wallets
29
+ *
30
+ * You can set the `mode` option to `"fund_wallet"` to allow users to top up their wallets with crypto or fiat.
31
+ *
32
+ * ```tsx
33
+ * <PayEmbed
34
+ * client={client}
35
+ * payOptions={{
36
+ * mode: "fund_wallet",
37
+ * metadata: {
38
+ * name: "Get funds", // title of the payment modal
39
+ * },
40
+ * prefillBuy: {
41
+ * chain: base, // chain to prefill the buy screen with
42
+ * amount: "0.01", // amount to prefill the buy screen with
43
+ * },
44
+ * }}
45
+ * />
46
+ * ```
47
+ *
48
+ * ### Direct Payments
49
+ *
50
+ * You can set the `mode` option to `"direct_payment"` to allow users to make a direct payment to a wallet address.
51
+ *
52
+ * ```tsx
53
+ * <PayEmbed
54
+ * client={client}
55
+ * theme={"light"}
56
+ * payOptions={{
57
+ * mode: "direct_payment",
58
+ * paymentInfo: {
59
+ * amount: "35",
60
+ * chain: base,
61
+ * token: getDefaultToken(base, "USDC"),
62
+ * sellerAddress: "0x...", // the wallet address of the seller
63
+ * },
64
+ * metadata: {
65
+ * name: "Black Hoodie (Size L)",
66
+ * image: "/drip-hoodie.png",
67
+ * },
68
+ * }}
69
+ * />
70
+ * ```
71
+ *
72
+ * ### Transactions
73
+ *
74
+ * You can set the `mode` option to `"transaction"` to allow users to execute a transaction with a different wallet, chain or token.
75
+ *
76
+ * ```tsx
77
+ * <PayEmbed
78
+ * client={client}
79
+ * payOptions={{
80
+ * mode: "transaction",
81
+ * // can be any transaction
82
+ * transaction: claimTo({
83
+ * contract: nftContract,
84
+ * quantity: 1n,
85
+ * tokenId: 0n,
86
+ * to: "0x...",
87
+ * }),
88
+ * // this could be any metadata, including NFT metadata
89
+ * metadata: {
90
+ * name: "VIP Ticket",
91
+ * image: "https://...",
92
+ * },
93
+ * }}
94
+ * />
95
+ * ```
96
+ *
97
+ * You can also handle ERC20 payments by passing `erc20value` to your transaction:
98
+ *
99
+ * ```tsx
100
+ * <PayEmbed
101
+ * client={client}
102
+ * payOptions={{
103
+ * mode: "transaction",
104
+ * transaction: prepareContractCall({
105
+ * contract: yourContract,
106
+ * functionName: "purchase",
107
+ * args: [arg1, arg2, ...],
108
+ * erc20value: {
109
+ * token: USDC_TOKEN_ADDRESS, // the erc20 token required to purchase
110
+ * amount: toUnits("100", 6), // the amount of erc20 token required to purchase
111
+ * },
112
+ * }),
113
+ * }}
114
+ * />
115
+ * ```
116
+ *
117
+ * ### Enable/Disable payment methods
118
+ *
119
+ * You can disable the use of crypto or fiat by setting the `buyWithCrypto` or `buyWithFiat` options to `false`.
120
+ *
121
+ * ```tsx
122
+ * <PayEmbed
123
+ * client={client}
124
+ * payOptions={{
125
+ * buyWithFiat: false,
126
+ * }}
127
+ * />
128
+ *
129
+ * ### Customize the UI
130
+ *
131
+ * You can customize the UI of the `PayEmbed` component by passing a custom theme object to the `theme` prop.
132
+ *
133
+ * ```tsx
134
+ * <PayEmbed
135
+ * client={client}
136
+ * theme={darkTheme({
137
+ * colors: {
138
+ * modalBg: "red",
139
+ * },
140
+ * })}
141
+ * />
142
+ * ```
143
+ *
144
+ * Refer to the [`Theme`](https://portal.thirdweb.com/references/typescript/v5/Theme) type for more details.
145
+ *
146
+ * ### Configure the wallet connection
147
+ *
148
+ * You can customize the wallet connection flow by passing a `connectOptions` object to the `PayEmbed` component.
149
+ *
20
150
  * ```tsx
21
151
  * <PayEmbed
22
152
  * client={client}
23
153
  * connectOptions={{
24
154
  * connectModal: {
25
155
  * size: 'compact',
156
+ * title: "Sign in",
26
157
  * }
27
158
  * }}
28
- * payOptions={{
29
- * buyWithCrypto: false,
30
- * }}
31
- * />
159
+ * />
32
160
  * ```
161
+ *
162
+ * Refer to the [`PayEmbedConnectOptions`](https://portal.thirdweb.com/references/typescript/v5/PayEmbedConnectOptions) type for more details.
163
+ *
33
164
  * @buyCrypto
34
165
  */
35
166
  export function PayEmbed(props) {
@@ -1 +1 @@
1
- {"version":3,"file":"PayEmbed.js","sourceRoot":"","sources":["../../../../../src/react/web/ui/PayEmbed.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,EAAE,SA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EAAE;wBACX,SAAS,CAAC,KAAK,CAAC,CAAC;oBACnB,CAAC,EACD,QAAQ,EAAE,GAAG,EAAE,GAAE,CAAC,GAClB,CACH,IACF,CACJ,CAAC;IACJ,CAAC;IAED,OAAO,CACL,KAAC,mBAAmB,IAAC,KAAK,EAAE,KAAK,YAC/B,KAAC,cAAc,IACb,SAAS,EAAC,SAAS,EACnB,KAAK,EAAE,KAAK,CAAC,KAAK,EAClB,SAAS,EAAE,KAAK,CAAC,SAAS,YAE1B,KAAC,aAAa,cAAE,OAAO,GAAiB,GACzB,GACG,CACvB,CAAC;AACJ,CAAC"}
@@ -35,7 +35,7 @@ import { useAccountContext } from "./provider.js";
35
35
  * ```
36
36
  *
37
37
  * @component
38
- * @account
38
+ * @wallet
39
39
  * @beta
40
40
  */
41
41
  export function AccountAddress({ formatFn, ...restProps }) {
@@ -88,7 +88,7 @@ import { useAccountContext } from "./provider.js";
88
88
  * ```
89
89
  * @returns An <img /> if the avatar is resolved successfully
90
90
  * @component
91
- * @account
91
+ * @wallet
92
92
  * @beta
93
93
  */
94
94
  export function AccountAvatar({ socialType, resolverAddress, resolverChain, loadingComponent, fallbackComponent, queryOptions, ...restProps }) {
@@ -75,7 +75,7 @@ import { useAccountContext } from "./provider.js";
75
75
  * ```
76
76
  *
77
77
  * @component
78
- * @account
78
+ * @wallet
79
79
  * @beta
80
80
  */
81
81
  export function AccountBalance({ chain, tokenAddress, formatFn, loadingComponent, fallbackComponent, queryOptions, ...restProps }) {
@@ -5,6 +5,7 @@ import { useAccountContext } from "./provider.js";
5
5
  * A wrapper for the Blobbie component
6
6
  * @param props BlobbieProps
7
7
  * @beta
8
+ * @wallet
8
9
  */
9
10
  export function AccountBlobbie(props) {
10
11
  const { address } = useAccountContext();
@@ -1 +1 @@
1
- {"version":3,"file":"blobbie.js","sourceRoot":"","sources":["../../../../../../../src/react/web/ui/prebuilt/Account/blobbie.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,OAAO,EAAqB,MAAM,gCAAgC,CAAC;AAC5E,OAAO,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAC;AAElD;;;;GAIG;AACH,MAAM,UAAU,cAAc,CAAC,KAAoC;IACjE,MAAM,EAAE,OAAO,EAAE,GAAG,iBAAiB,EAAE,CAAC;IACxC,OAAO,KAAC,OAAO,OAAK,KAAK,EAAE,OAAO,EAAE,OAAO,GAAI,CAAC;AAClD,CAAC"}
1
+ {"version":3,"file":"blobbie.js","sourceRoot":"","sources":["../../../../../../../src/react/web/ui/prebuilt/Account/blobbie.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,OAAO,EAAqB,MAAM,gCAAgC,CAAC;AAC5E,OAAO,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAC;AAElD;;;;;GAKG;AACH,MAAM,UAAU,cAAc,CAAC,KAAoC;IACjE,MAAM,EAAE,OAAO,EAAE,GAAG,iBAAiB,EAAE,CAAC;IACxC,OAAO,KAAC,OAAO,OAAK,KAAK,EAAE,OAAO,EAAE,OAAO,GAAI,CAAC;AAClD,CAAC"}
@@ -67,7 +67,7 @@ import { useAccountContext } from "./provider.js";
67
67
  * ```
68
68
  *
69
69
  * @component
70
- * @account
70
+ * @wallet
71
71
  * @beta
72
72
  */
73
73
  export function AccountName({ resolverAddress, resolverChain, socialType, formatFn, queryOptions, loadingComponent, fallbackComponent, ...restProps }) {
@@ -20,7 +20,7 @@ const AccountProviderContext = /* @__PURE__ */ createContext(undefined);
20
20
  * ```
21
21
  *
22
22
  * @component
23
- * @account
23
+ * @wallet
24
24
  * @beta
25
25
  */
26
26
  export function AccountProvider(props) {
@@ -6,7 +6,6 @@ import { useNFTContext } from "./provider.js";
6
6
  * so you can style it just like how you would style a <span> element.
7
7
  * @returns A <span> element containing the name of the NFT
8
8
  *
9
- * @component
10
9
  * @example
11
10
  * ### Basic usage
12
11
  * ```tsx
@@ -45,6 +44,7 @@ import { useNFTContext } from "./provider.js";
45
44
  * ```
46
45
  *
47
46
  * @nft
47
+ * @component
48
48
  * @beta
49
49
  */
50
50
  export function NFTName({ loadingComponent, fallbackComponent, queryOptions, ...restProps }) {
@@ -1,2 +1,2 @@
1
- export const version = "5.70.0-nightly-ecaa304a812188da3c81888bb52ca6064093c139-20241121000332";
1
+ export const version = "5.70.0";
2
2
  //# sourceMappingURL=version.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"version.js","sourceRoot":"","sources":["../../src/version.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,OAAO,GAAG,wEAAwE,CAAC"}
1
+ {"version":3,"file":"version.js","sourceRoot":"","sources":["../../src/version.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,OAAO,GAAG,QAAQ,CAAC"}
@@ -7,7 +7,7 @@ import type { ThirdwebClient } from "../../../client/client.js";
7
7
  * @returns A React Query result containing the social profiles.
8
8
  *
9
9
  * @example
10
- * ```ts
10
+ * ```tsx
11
11
  * import { useSocialProfiles } from "thirdweb/react";
12
12
  * const { data: profiles } = useSocialProfiles({
13
13
  * client,
@@ -115,26 +115,157 @@ export type PayEmbedProps = {
115
115
  className?: string;
116
116
  };
117
117
  /**
118
- * Embed thirdweb Pay UI for Buy tokens using Crypto or Credit Card.
119
- *
120
- * PayEmbed also renders a "Connect" button if the user is not connected to a wallet. You can customize the options for "Connect" button using the `connectOptions` prop.
118
+ * Embed a prebuilt UI for funding wallets, purchases or transactions with crypto or fiat.
121
119
  *
122
120
  * @param props - Props of type [`PayEmbedProps`](https://portal.thirdweb.com/references/typescript/v5/PayEmbedProps) to configure the PayEmbed component.
123
121
  *
124
122
  * @example
123
+ * ### Default configuration
124
+ *
125
+ * By default, the `PayEmbed` component will allows users to fund their wallets with crypto or fiat on any of the supported chains..
126
+ *
127
+ * ```tsx
128
+ * <PayEmbed
129
+ * client={client}
130
+ * />
131
+ * ```
132
+ *
133
+ * ### Top up wallets
134
+ *
135
+ * You can set the `mode` option to `"fund_wallet"` to allow users to top up their wallets with crypto or fiat.
136
+ *
137
+ * ```tsx
138
+ * <PayEmbed
139
+ * client={client}
140
+ * payOptions={{
141
+ * mode: "fund_wallet",
142
+ * metadata: {
143
+ * name: "Get funds", // title of the payment modal
144
+ * },
145
+ * prefillBuy: {
146
+ * chain: base, // chain to prefill the buy screen with
147
+ * amount: "0.01", // amount to prefill the buy screen with
148
+ * },
149
+ * }}
150
+ * />
151
+ * ```
152
+ *
153
+ * ### Direct Payments
154
+ *
155
+ * You can set the `mode` option to `"direct_payment"` to allow users to make a direct payment to a wallet address.
156
+ *
157
+ * ```tsx
158
+ * <PayEmbed
159
+ * client={client}
160
+ * theme={"light"}
161
+ * payOptions={{
162
+ * mode: "direct_payment",
163
+ * paymentInfo: {
164
+ * amount: "35",
165
+ * chain: base,
166
+ * token: getDefaultToken(base, "USDC"),
167
+ * sellerAddress: "0x...", // the wallet address of the seller
168
+ * },
169
+ * metadata: {
170
+ * name: "Black Hoodie (Size L)",
171
+ * image: "/drip-hoodie.png",
172
+ * },
173
+ * }}
174
+ * />
175
+ * ```
176
+ *
177
+ * ### Transactions
178
+ *
179
+ * You can set the `mode` option to `"transaction"` to allow users to execute a transaction with a different wallet, chain or token.
180
+ *
181
+ * ```tsx
182
+ * <PayEmbed
183
+ * client={client}
184
+ * payOptions={{
185
+ * mode: "transaction",
186
+ * // can be any transaction
187
+ * transaction: claimTo({
188
+ * contract: nftContract,
189
+ * quantity: 1n,
190
+ * tokenId: 0n,
191
+ * to: "0x...",
192
+ * }),
193
+ * // this could be any metadata, including NFT metadata
194
+ * metadata: {
195
+ * name: "VIP Ticket",
196
+ * image: "https://...",
197
+ * },
198
+ * }}
199
+ * />
200
+ * ```
201
+ *
202
+ * You can also handle ERC20 payments by passing `erc20value` to your transaction:
203
+ *
204
+ * ```tsx
205
+ * <PayEmbed
206
+ * client={client}
207
+ * payOptions={{
208
+ * mode: "transaction",
209
+ * transaction: prepareContractCall({
210
+ * contract: yourContract,
211
+ * functionName: "purchase",
212
+ * args: [arg1, arg2, ...],
213
+ * erc20value: {
214
+ * token: USDC_TOKEN_ADDRESS, // the erc20 token required to purchase
215
+ * amount: toUnits("100", 6), // the amount of erc20 token required to purchase
216
+ * },
217
+ * }),
218
+ * }}
219
+ * />
220
+ * ```
221
+ *
222
+ * ### Enable/Disable payment methods
223
+ *
224
+ * You can disable the use of crypto or fiat by setting the `buyWithCrypto` or `buyWithFiat` options to `false`.
225
+ *
226
+ * ```tsx
227
+ * <PayEmbed
228
+ * client={client}
229
+ * payOptions={{
230
+ * buyWithFiat: false,
231
+ * }}
232
+ * />
233
+ *
234
+ * ### Customize the UI
235
+ *
236
+ * You can customize the UI of the `PayEmbed` component by passing a custom theme object to the `theme` prop.
237
+ *
238
+ * ```tsx
239
+ * <PayEmbed
240
+ * client={client}
241
+ * theme={darkTheme({
242
+ * colors: {
243
+ * modalBg: "red",
244
+ * },
245
+ * })}
246
+ * />
247
+ * ```
248
+ *
249
+ * Refer to the [`Theme`](https://portal.thirdweb.com/references/typescript/v5/Theme) type for more details.
250
+ *
251
+ * ### Configure the wallet connection
252
+ *
253
+ * You can customize the wallet connection flow by passing a `connectOptions` object to the `PayEmbed` component.
254
+ *
125
255
  * ```tsx
126
256
  * <PayEmbed
127
257
  * client={client}
128
258
  * connectOptions={{
129
259
  * connectModal: {
130
260
  * size: 'compact',
261
+ * title: "Sign in",
131
262
  * }
132
263
  * }}
133
- * payOptions={{
134
- * buyWithCrypto: false,
135
- * }}
136
- * />
264
+ * />
137
265
  * ```
266
+ *
267
+ * Refer to the [`PayEmbedConnectOptions`](https://portal.thirdweb.com/references/typescript/v5/PayEmbedConnectOptions) type for more details.
268
+ *
138
269
  * @buyCrypto
139
270
  */
140
271
  export declare function PayEmbed(props: PayEmbedProps): import("react/jsx-runtime.js").JSX.Element;
@@ -1 +1 @@
1
- {"version":3,"file":"PayEmbed.d.ts","sourceRoot":"","sources":["../../../../../src/react/web/ui/PayEmbed.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,0BAA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G;IACnC;;;OAGG;IACH,YAAY,CAAC,EAAE,iCAAiC,CAAC;IAEjD;;;;;;;OAOG;IACH,aAAa,CAAC,EAAE;QACd,SAAS,CAAC,EAAE,MAAM,CAAC;KACpB,CAAC;IAEF;;;;;OAKG;IACH,kBAAkB,CAAC,EAAE,kBAAkB,CAAC;IAExC;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;IACnB;;;;;;;;;OASG;IACH,WAAW,CAAC,EACR;QACE,OAAO,EAAE,MAAM,CAAC;KACjB,GACD,OAAO,CAAC;IAEZ;;OAEG;IACH,WAAW,CAAC,EAAE,WAAW,CAAC;IAE1B;;;;;;;;;;;;;OAaG;IACH,KAAK,CAAC,EAAE,KAAK,CAAC;IAEd;;;;;;;;;;;;;;;;;;;;OAoBG;IACH,MAAM,CAAC,EAAE,KAAK,EAAE,CAAC;IAEjB;;OAEG;IACH,kBAAkB,CAAC,EAAE,MAAM,EAAE,CAAC;IAE9B;;;;OAIG;IACH,cAAc,CAAC,EAAE,OAAO,CAAC;IAEzB;;;;;OAKG;IACH,IAAI,CAAC,EAAE,eAAe,CAAC;CACxB,CAAC"}
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * @component
3
- * @account
3
+ * @wallet
4
4
  */
5
5
  export interface AccountAddressProps extends Omit<React.HTMLAttributes<HTMLSpanElement>, "children"> {
6
6
  /**
@@ -45,7 +45,7 @@ export interface AccountAddressProps extends Omit<React.HTMLAttributes<HTMLSpanE
45
45
  * ```
46
46
  *
47
47
  * @component
48
- * @account
48
+ * @wallet
49
49
  * @beta
50
50
  */
51
51
  export declare function AccountAddress({ formatFn, ...restProps }: AccountAddressProps): import("react/jsx-runtime.js").JSX.Element;
@@ -6,7 +6,7 @@ import type { SocialProfile } from "../../../../../social/types.js";
6
6
  /**
7
7
  * Props for the AccountAvatar component
8
8
  * @component
9
- * @account
9
+ * @wallet
10
10
  */
11
11
  export interface AccountAvatarProps extends Omit<React.ImgHTMLAttributes<HTMLImageElement>, "src">, Omit<ResolveNameOptions, "client" | "address"> {
12
12
  /**
@@ -135,7 +135,7 @@ export interface AccountAvatarProps extends Omit<React.ImgHTMLAttributes<HTMLIma
135
135
  * ```
136
136
  * @returns An <img /> if the avatar is resolved successfully
137
137
  * @component
138
- * @account
138
+ * @wallet
139
139
  * @beta
140
140
  */
141
141
  export declare function AccountAvatar({ socialType, resolverAddress, resolverChain, loadingComponent, fallbackComponent, queryOptions, ...restProps }: AccountAvatarProps): import("react/jsx-runtime.js").JSX.Element | null;
@@ -6,7 +6,7 @@ import { type GetWalletBalanceResult } from "../../../../../wallets/utils/getWal
6
6
  /**
7
7
  * Props for the AccountBalance component
8
8
  * @component
9
- * @account
9
+ * @wallet
10
10
  */
11
11
  export interface AccountBalanceProps extends Omit<React.HTMLAttributes<HTMLSpanElement>, "children"> {
12
12
  /**
@@ -130,7 +130,7 @@ export interface AccountBalanceProps extends Omit<React.HTMLAttributes<HTMLSpanE
130
130
  * ```
131
131
  *
132
132
  * @component
133
- * @account
133
+ * @wallet
134
134
  * @beta
135
135
  */
136
136
  export declare function AccountBalance({ chain, tokenAddress, formatFn, loadingComponent, fallbackComponent, queryOptions, ...restProps }: AccountBalanceProps): import("react/jsx-runtime.js").JSX.Element | null;
@@ -3,6 +3,7 @@ import { type BlobbieProps } from "../../ConnectWallet/Blobbie.js";
3
3
  * A wrapper for the Blobbie component
4
4
  * @param props BlobbieProps
5
5
  * @beta
6
+ * @wallet
6
7
  */
7
8
  export declare function AccountBlobbie(props: Omit<BlobbieProps, "address">): import("react/jsx-runtime.js").JSX.Element;
8
9
  //# sourceMappingURL=blobbie.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"blobbie.d.ts","sourceRoot":"","sources":["../../../../../../../src/react/web/ui/prebuilt/Account/blobbie.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAW,KAAK,YAAY,EAAE,MAAM,gCAAgC,CAAC;AAG5E;;;;GAIG;AACH,wBAAgB,cAAc,CAAC,KAAK,EAAE,IAAI,CAAC,YAAY,EAAE,SAAS,CAAC,8CAGlE"}
1
+ {"version":3,"file":"blobbie.d.ts","sourceRoot":"","sources":["../../../../../../../src/react/web/ui/prebuilt/Account/blobbie.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAW,KAAK,YAAY,EAAE,MAAM,gCAAgC,CAAC;AAG5E;;;;;GAKG;AACH,wBAAgB,cAAc,CAAC,KAAK,EAAE,IAAI,CAAC,YAAY,EAAE,SAAS,CAAC,8CAGlE"}
@@ -6,7 +6,7 @@ import type { SocialProfile } from "../../../../../social/types.js";
6
6
  /**
7
7
  * Props for the AccountName component
8
8
  * @component
9
- * @account
9
+ * @wallet
10
10
  */
11
11
  export interface AccountNameProps extends Omit<React.HTMLAttributes<HTMLSpanElement>, "children">, Omit<ResolveNameOptions, "client" | "address"> {
12
12
  /**
@@ -112,7 +112,7 @@ export interface AccountNameProps extends Omit<React.HTMLAttributes<HTMLSpanElem
112
112
  * ```
113
113
  *
114
114
  * @component
115
- * @account
115
+ * @wallet
116
116
  * @beta
117
117
  */
118
118
  export declare function AccountName({ resolverAddress, resolverChain, socialType, formatFn, queryOptions, loadingComponent, fallbackComponent, ...restProps }: AccountNameProps): import("react/jsx-runtime.js").JSX.Element | null;
@@ -4,7 +4,7 @@ import type { ThirdwebClient } from "../../../../../client/client.js";
4
4
  /**
5
5
  * Props for the <AccountProvider /> component
6
6
  * @component
7
- * @account
7
+ * @wallet
8
8
  */
9
9
  export type AccountProviderProps = {
10
10
  /**
@@ -34,7 +34,7 @@ export type AccountProviderProps = {
34
34
  * ```
35
35
  *
36
36
  * @component
37
- * @account
37
+ * @wallet
38
38
  * @beta
39
39
  */
40
40
  export declare function AccountProvider(props: React.PropsWithChildren<AccountProviderProps>): import("react/jsx-runtime.js").JSX.Element;
@@ -14,7 +14,6 @@ export interface NFTNameProps extends Omit<React.HTMLAttributes<HTMLSpanElement>
14
14
  * so you can style it just like how you would style a <span> element.
15
15
  * @returns A <span> element containing the name of the NFT
16
16
  *
17
- * @component
18
17
  * @example
19
18
  * ### Basic usage
20
19
  * ```tsx
@@ -53,6 +52,7 @@ export interface NFTNameProps extends Omit<React.HTMLAttributes<HTMLSpanElement>
53
52
  * ```
54
53
  *
55
54
  * @nft
55
+ * @component
56
56
  * @beta
57
57
  */
58
58
  export declare function NFTName({ loadingComponent, fallbackComponent, queryOptions, ...restProps }: NFTNameProps): import("react/jsx-runtime.js").JSX.Element | null;
@@ -1,2 +1,2 @@
1
- export declare const version = "5.70.0-nightly-ecaa304a812188da3c81888bb52ca6064093c139-20241121000332";
1
+ export declare const version = "5.70.0";
2
2
  //# sourceMappingURL=version.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"version.d.ts","sourceRoot":"","sources":["../../src/version.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,OAAO,2EAA2E,CAAC"}
1
+ {"version":3,"file":"version.d.ts","sourceRoot":"","sources":["../../src/version.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,OAAO,WAAW,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "thirdweb",
3
- "version": "5.70.0-nightly-ecaa304a812188da3c81888bb52ca6064093c139-20241121000332",
3
+ "version": "5.70.0",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/thirdweb-dev/js.git#main"
@@ -10,7 +10,7 @@ import { getSocialProfiles } from "../../../social/profiles.js";
10
10
  * @returns A React Query result containing the social profiles.
11
11
  *
12
12
  * @example
13
- * ```ts
13
+ * ```tsx
14
14
  * import { useSocialProfiles } from "thirdweb/react";
15
15
  * const { data: profiles } = useSocialProfiles({
16
16
  * client,
@@ -136,26 +136,157 @@ export type PayEmbedProps = {
136
136
  };
137
137
 
138
138
  /**
139
- * Embed thirdweb Pay UI for Buy tokens using Crypto or Credit Card.
140
- *
141
- * PayEmbed also renders a "Connect" button if the user is not connected to a wallet. You can customize the options for "Connect" button using the `connectOptions` prop.
139
+ * Embed a prebuilt UI for funding wallets, purchases or transactions with crypto or fiat.
142
140
  *
143
141
  * @param props - Props of type [`PayEmbedProps`](https://portal.thirdweb.com/references/typescript/v5/PayEmbedProps) to configure the PayEmbed component.
144
142
  *
145
143
  * @example
144
+ * ### Default configuration
145
+ *
146
+ * By default, the `PayEmbed` component will allows users to fund their wallets with crypto or fiat on any of the supported chains..
147
+ *
148
+ * ```tsx
149
+ * <PayEmbed
150
+ * client={client}
151
+ * />
152
+ * ```
153
+ *
154
+ * ### Top up wallets
155
+ *
156
+ * You can set the `mode` option to `"fund_wallet"` to allow users to top up their wallets with crypto or fiat.
157
+ *
158
+ * ```tsx
159
+ * <PayEmbed
160
+ * client={client}
161
+ * payOptions={{
162
+ * mode: "fund_wallet",
163
+ * metadata: {
164
+ * name: "Get funds", // title of the payment modal
165
+ * },
166
+ * prefillBuy: {
167
+ * chain: base, // chain to prefill the buy screen with
168
+ * amount: "0.01", // amount to prefill the buy screen with
169
+ * },
170
+ * }}
171
+ * />
172
+ * ```
173
+ *
174
+ * ### Direct Payments
175
+ *
176
+ * You can set the `mode` option to `"direct_payment"` to allow users to make a direct payment to a wallet address.
177
+ *
178
+ * ```tsx
179
+ * <PayEmbed
180
+ * client={client}
181
+ * theme={"light"}
182
+ * payOptions={{
183
+ * mode: "direct_payment",
184
+ * paymentInfo: {
185
+ * amount: "35",
186
+ * chain: base,
187
+ * token: getDefaultToken(base, "USDC"),
188
+ * sellerAddress: "0x...", // the wallet address of the seller
189
+ * },
190
+ * metadata: {
191
+ * name: "Black Hoodie (Size L)",
192
+ * image: "/drip-hoodie.png",
193
+ * },
194
+ * }}
195
+ * />
196
+ * ```
197
+ *
198
+ * ### Transactions
199
+ *
200
+ * You can set the `mode` option to `"transaction"` to allow users to execute a transaction with a different wallet, chain or token.
201
+ *
202
+ * ```tsx
203
+ * <PayEmbed
204
+ * client={client}
205
+ * payOptions={{
206
+ * mode: "transaction",
207
+ * // can be any transaction
208
+ * transaction: claimTo({
209
+ * contract: nftContract,
210
+ * quantity: 1n,
211
+ * tokenId: 0n,
212
+ * to: "0x...",
213
+ * }),
214
+ * // this could be any metadata, including NFT metadata
215
+ * metadata: {
216
+ * name: "VIP Ticket",
217
+ * image: "https://...",
218
+ * },
219
+ * }}
220
+ * />
221
+ * ```
222
+ *
223
+ * You can also handle ERC20 payments by passing `erc20value` to your transaction:
224
+ *
225
+ * ```tsx
226
+ * <PayEmbed
227
+ * client={client}
228
+ * payOptions={{
229
+ * mode: "transaction",
230
+ * transaction: prepareContractCall({
231
+ * contract: yourContract,
232
+ * functionName: "purchase",
233
+ * args: [arg1, arg2, ...],
234
+ * erc20value: {
235
+ * token: USDC_TOKEN_ADDRESS, // the erc20 token required to purchase
236
+ * amount: toUnits("100", 6), // the amount of erc20 token required to purchase
237
+ * },
238
+ * }),
239
+ * }}
240
+ * />
241
+ * ```
242
+ *
243
+ * ### Enable/Disable payment methods
244
+ *
245
+ * You can disable the use of crypto or fiat by setting the `buyWithCrypto` or `buyWithFiat` options to `false`.
246
+ *
247
+ * ```tsx
248
+ * <PayEmbed
249
+ * client={client}
250
+ * payOptions={{
251
+ * buyWithFiat: false,
252
+ * }}
253
+ * />
254
+ *
255
+ * ### Customize the UI
256
+ *
257
+ * You can customize the UI of the `PayEmbed` component by passing a custom theme object to the `theme` prop.
258
+ *
259
+ * ```tsx
260
+ * <PayEmbed
261
+ * client={client}
262
+ * theme={darkTheme({
263
+ * colors: {
264
+ * modalBg: "red",
265
+ * },
266
+ * })}
267
+ * />
268
+ * ```
269
+ *
270
+ * Refer to the [`Theme`](https://portal.thirdweb.com/references/typescript/v5/Theme) type for more details.
271
+ *
272
+ * ### Configure the wallet connection
273
+ *
274
+ * You can customize the wallet connection flow by passing a `connectOptions` object to the `PayEmbed` component.
275
+ *
146
276
  * ```tsx
147
277
  * <PayEmbed
148
278
  * client={client}
149
279
  * connectOptions={{
150
280
  * connectModal: {
151
281
  * size: 'compact',
282
+ * title: "Sign in",
152
283
  * }
153
284
  * }}
154
- * payOptions={{
155
- * buyWithCrypto: false,
156
- * }}
157
- * />
285
+ * />
158
286
  * ```
287
+ *
288
+ * Refer to the [`PayEmbedConnectOptions`](https://portal.thirdweb.com/references/typescript/v5/PayEmbedConnectOptions) type for more details.
289
+ *
159
290
  * @buyCrypto
160
291
  */
161
292
  export function PayEmbed(props: PayEmbedProps) {
@@ -4,7 +4,7 @@ import { useAccountContext } from "./provider.js";
4
4
 
5
5
  /**
6
6
  * @component
7
- * @account
7
+ * @wallet
8
8
  */
9
9
  export interface AccountAddressProps
10
10
  extends Omit<React.HTMLAttributes<HTMLSpanElement>, "children"> {
@@ -51,7 +51,7 @@ export interface AccountAddressProps
51
51
  * ```
52
52
  *
53
53
  * @component
54
- * @account
54
+ * @wallet
55
55
  * @beta
56
56
  */
57
57
  export function AccountAddress({
@@ -16,7 +16,7 @@ import { useAccountContext } from "./provider.js";
16
16
  /**
17
17
  * Props for the AccountAvatar component
18
18
  * @component
19
- * @account
19
+ * @wallet
20
20
  */
21
21
  export interface AccountAvatarProps
22
22
  extends Omit<React.ImgHTMLAttributes<HTMLImageElement>, "src">,
@@ -150,7 +150,7 @@ export interface AccountAvatarProps
150
150
  * ```
151
151
  * @returns An <img /> if the avatar is resolved successfully
152
152
  * @component
153
- * @account
153
+ * @wallet
154
154
  * @beta
155
155
  */
156
156
  export function AccountAvatar({
@@ -14,7 +14,7 @@ import { useAccountContext } from "./provider.js";
14
14
  /**
15
15
  * Props for the AccountBalance component
16
16
  * @component
17
- * @account
17
+ * @wallet
18
18
  */
19
19
  export interface AccountBalanceProps
20
20
  extends Omit<React.HTMLAttributes<HTMLSpanElement>, "children"> {
@@ -143,7 +143,7 @@ export interface AccountBalanceProps
143
143
  * ```
144
144
  *
145
145
  * @component
146
- * @account
146
+ * @wallet
147
147
  * @beta
148
148
  */
149
149
  export function AccountBalance({
@@ -5,6 +5,7 @@ import { useAccountContext } from "./provider.js";
5
5
  * A wrapper for the Blobbie component
6
6
  * @param props BlobbieProps
7
7
  * @beta
8
+ * @wallet
8
9
  */
9
10
  export function AccountBlobbie(props: Omit<BlobbieProps, "address">) {
10
11
  const { address } = useAccountContext();
@@ -14,7 +14,7 @@ import { useAccountContext } from "./provider.js";
14
14
  /**
15
15
  * Props for the AccountName component
16
16
  * @component
17
- * @account
17
+ * @wallet
18
18
  */
19
19
  export interface AccountNameProps
20
20
  extends Omit<React.HTMLAttributes<HTMLSpanElement>, "children">,
@@ -123,7 +123,7 @@ export interface AccountNameProps
123
123
  * ```
124
124
  *
125
125
  * @component
126
- * @account
126
+ * @wallet
127
127
  * @beta
128
128
  */
129
129
  export function AccountName({
@@ -7,7 +7,7 @@ import type { ThirdwebClient } from "../../../../../client/client.js";
7
7
  /**
8
8
  * Props for the <AccountProvider /> component
9
9
  * @component
10
- * @account
10
+ * @wallet
11
11
  */
12
12
  export type AccountProviderProps = {
13
13
  /**
@@ -42,7 +42,7 @@ const AccountProviderContext = /* @__PURE__ */ createContext<
42
42
  * ```
43
43
  *
44
44
  * @component
45
- * @account
45
+ * @wallet
46
46
  * @beta
47
47
  */
48
48
  export function AccountProvider(
@@ -19,7 +19,6 @@ export interface NFTNameProps
19
19
  * so you can style it just like how you would style a <span> element.
20
20
  * @returns A <span> element containing the name of the NFT
21
21
  *
22
- * @component
23
22
  * @example
24
23
  * ### Basic usage
25
24
  * ```tsx
@@ -58,6 +57,7 @@ export interface NFTNameProps
58
57
  * ```
59
58
  *
60
59
  * @nft
60
+ * @component
61
61
  * @beta
62
62
  */
63
63
  export function NFTName({
package/src/version.ts CHANGED
@@ -1 +1 @@
1
- export const version = "5.70.0-nightly-ecaa304a812188da3c81888bb52ca6064093c139-20241121000332";
1
+ export const version = "5.70.0";