thirdweb 5.105.5 → 5.105.6-nightly-9f88b5c2beedd51730dbe4f2dfdd15e6bcb6e967-20250703000433

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 (118) hide show
  1. package/dist/cjs/bridge/Buy.js.map +1 -1
  2. package/dist/cjs/bridge/Onramp.js.map +1 -1
  3. package/dist/cjs/bridge/OnrampStatus.js.map +1 -1
  4. package/dist/cjs/bridge/Sell.js.map +1 -1
  5. package/dist/cjs/bridge/Transfer.js.map +1 -1
  6. package/dist/cjs/extensions/erc7702/account/createSessionKey.js +1 -1
  7. package/dist/cjs/pay/buyWithCrypto/getQuote.js.map +1 -1
  8. package/dist/cjs/pay/buyWithCrypto/getStatus.js +1 -1
  9. package/dist/cjs/pay/buyWithCrypto/getStatus.js.map +1 -1
  10. package/dist/cjs/pay/buyWithCrypto/getTransfer.js.map +1 -1
  11. package/dist/cjs/pay/buyWithFiat/getQuote.js.map +1 -1
  12. package/dist/cjs/pay/buyWithFiat/getStatus.js +1 -1
  13. package/dist/cjs/pay/buyWithFiat/getStatus.js.map +1 -1
  14. package/dist/cjs/pay/types.js +3 -0
  15. package/dist/cjs/pay/types.js.map +1 -0
  16. package/dist/cjs/react/core/hooks/transaction/useSendTransaction.js.map +1 -1
  17. package/dist/cjs/react/web/ui/Bridge/BridgeOrchestrator.js.map +1 -1
  18. package/dist/cjs/react/web/ui/Bridge/BuyWidget.js.map +1 -1
  19. package/dist/cjs/react/web/ui/Bridge/CheckoutWidget.js.map +1 -1
  20. package/dist/cjs/react/web/ui/Bridge/QuoteLoader.js.map +1 -1
  21. package/dist/cjs/react/web/ui/Bridge/TransactionWidget.js.map +1 -1
  22. package/dist/cjs/react/web/ui/PayEmbed.js.map +1 -1
  23. package/dist/cjs/version.js +1 -1
  24. package/dist/cjs/version.js.map +1 -1
  25. package/dist/esm/bridge/Buy.js.map +1 -1
  26. package/dist/esm/bridge/Onramp.js.map +1 -1
  27. package/dist/esm/bridge/OnrampStatus.js.map +1 -1
  28. package/dist/esm/bridge/Sell.js.map +1 -1
  29. package/dist/esm/bridge/Transfer.js.map +1 -1
  30. package/dist/esm/extensions/erc7702/account/createSessionKey.js +1 -1
  31. package/dist/esm/pay/buyWithCrypto/getQuote.js.map +1 -1
  32. package/dist/esm/pay/buyWithCrypto/getStatus.js +1 -1
  33. package/dist/esm/pay/buyWithCrypto/getStatus.js.map +1 -1
  34. package/dist/esm/pay/buyWithCrypto/getTransfer.js.map +1 -1
  35. package/dist/esm/pay/buyWithFiat/getQuote.js.map +1 -1
  36. package/dist/esm/pay/buyWithFiat/getStatus.js +1 -1
  37. package/dist/esm/pay/buyWithFiat/getStatus.js.map +1 -1
  38. package/dist/esm/pay/types.js +2 -0
  39. package/dist/esm/pay/types.js.map +1 -0
  40. package/dist/esm/react/core/hooks/transaction/useSendTransaction.js.map +1 -1
  41. package/dist/esm/react/web/ui/Bridge/BridgeOrchestrator.js.map +1 -1
  42. package/dist/esm/react/web/ui/Bridge/BuyWidget.js.map +1 -1
  43. package/dist/esm/react/web/ui/Bridge/CheckoutWidget.js.map +1 -1
  44. package/dist/esm/react/web/ui/Bridge/QuoteLoader.js.map +1 -1
  45. package/dist/esm/react/web/ui/Bridge/TransactionWidget.js.map +1 -1
  46. package/dist/esm/react/web/ui/PayEmbed.js.map +1 -1
  47. package/dist/esm/version.js +1 -1
  48. package/dist/esm/version.js.map +1 -1
  49. package/dist/types/bridge/Buy.d.ts +3 -2
  50. package/dist/types/bridge/Buy.d.ts.map +1 -1
  51. package/dist/types/bridge/Onramp.d.ts +3 -2
  52. package/dist/types/bridge/Onramp.d.ts.map +1 -1
  53. package/dist/types/bridge/OnrampStatus.d.ts +5 -4
  54. package/dist/types/bridge/OnrampStatus.d.ts.map +1 -1
  55. package/dist/types/bridge/Sell.d.ts +3 -2
  56. package/dist/types/bridge/Sell.d.ts.map +1 -1
  57. package/dist/types/bridge/Transfer.d.ts +3 -2
  58. package/dist/types/bridge/Transfer.d.ts.map +1 -1
  59. package/dist/types/bridge/types/Status.d.ts +4 -3
  60. package/dist/types/bridge/types/Status.d.ts.map +1 -1
  61. package/dist/types/extensions/erc7702/account/createSessionKey.d.ts +1 -1
  62. package/dist/types/pay/buyWithCrypto/getQuote.d.ts +2 -1
  63. package/dist/types/pay/buyWithCrypto/getQuote.d.ts.map +1 -1
  64. package/dist/types/pay/buyWithCrypto/getStatus.d.ts +2 -1
  65. package/dist/types/pay/buyWithCrypto/getStatus.d.ts.map +1 -1
  66. package/dist/types/pay/buyWithCrypto/getTransfer.d.ts +2 -1
  67. package/dist/types/pay/buyWithCrypto/getTransfer.d.ts.map +1 -1
  68. package/dist/types/pay/buyWithFiat/getQuote.d.ts +2 -1
  69. package/dist/types/pay/buyWithFiat/getQuote.d.ts.map +1 -1
  70. package/dist/types/pay/buyWithFiat/getStatus.d.ts +2 -1
  71. package/dist/types/pay/buyWithFiat/getStatus.d.ts.map +1 -1
  72. package/dist/types/pay/types.d.ts +2 -0
  73. package/dist/types/pay/types.d.ts.map +1 -0
  74. package/dist/types/react/core/hooks/connection/ConnectButtonProps.d.ts +2 -1
  75. package/dist/types/react/core/hooks/connection/ConnectButtonProps.d.ts.map +1 -1
  76. package/dist/types/react/core/hooks/transaction/useSendTransaction.d.ts +2 -1
  77. package/dist/types/react/core/hooks/transaction/useSendTransaction.d.ts.map +1 -1
  78. package/dist/types/react/web/ui/Bridge/BridgeOrchestrator.d.ts +2 -1
  79. package/dist/types/react/web/ui/Bridge/BridgeOrchestrator.d.ts.map +1 -1
  80. package/dist/types/react/web/ui/Bridge/BuyWidget.d.ts +2 -1
  81. package/dist/types/react/web/ui/Bridge/BuyWidget.d.ts.map +1 -1
  82. package/dist/types/react/web/ui/Bridge/CheckoutWidget.d.ts +2 -1
  83. package/dist/types/react/web/ui/Bridge/CheckoutWidget.d.ts.map +1 -1
  84. package/dist/types/react/web/ui/Bridge/QuoteLoader.d.ts +2 -1
  85. package/dist/types/react/web/ui/Bridge/QuoteLoader.d.ts.map +1 -1
  86. package/dist/types/react/web/ui/Bridge/TransactionWidget.d.ts +2 -1
  87. package/dist/types/react/web/ui/Bridge/TransactionWidget.d.ts.map +1 -1
  88. package/dist/types/react/web/ui/PayEmbed.d.ts.map +1 -1
  89. package/dist/types/stories/Bridge/BridgeOrchestrator.stories.d.ts.map +1 -1
  90. package/dist/types/stories/Bridge/DirectPayment.stories.d.ts.map +1 -1
  91. package/dist/types/stories/Bridge/FundWallet.stories.d.ts.map +1 -1
  92. package/dist/types/stories/Bridge/SuccessScreen.stories.d.ts.map +1 -1
  93. package/dist/types/stories/Bridge/TransactionPayment.stories.d.ts.map +1 -1
  94. package/dist/types/version.d.ts +1 -1
  95. package/dist/types/version.d.ts.map +1 -1
  96. package/package.json +1 -1
  97. package/src/bridge/Buy.ts +3 -2
  98. package/src/bridge/Onramp.ts +4 -3
  99. package/src/bridge/OnrampStatus.ts +5 -4
  100. package/src/bridge/Sell.ts +3 -2
  101. package/src/bridge/Transfer.ts +3 -2
  102. package/src/bridge/types/Status.ts +4 -3
  103. package/src/extensions/erc7702/account/createSessionKey.ts +1 -1
  104. package/src/pay/buyWithCrypto/getQuote.ts +2 -1
  105. package/src/pay/buyWithCrypto/getStatus.ts +7 -6
  106. package/src/pay/buyWithCrypto/getTransfer.ts +2 -1
  107. package/src/pay/buyWithFiat/getQuote.ts +2 -1
  108. package/src/pay/buyWithFiat/getStatus.ts +4 -3
  109. package/src/pay/types.ts +1 -0
  110. package/src/react/core/hooks/connection/ConnectButtonProps.ts +2 -1
  111. package/src/react/core/hooks/transaction/useSendTransaction.ts +2 -1
  112. package/src/react/web/ui/Bridge/BridgeOrchestrator.tsx +2 -1
  113. package/src/react/web/ui/Bridge/BuyWidget.tsx +2 -1
  114. package/src/react/web/ui/Bridge/CheckoutWidget.tsx +2 -1
  115. package/src/react/web/ui/Bridge/QuoteLoader.tsx +3 -2
  116. package/src/react/web/ui/Bridge/TransactionWidget.tsx +2 -1
  117. package/src/react/web/ui/PayEmbed.tsx +3 -9
  118. package/src/version.ts +1 -1
@@ -1,4 +1,5 @@
1
1
  import type { Address as ox__Address, Hex as ox__Hex } from "ox";
2
+ import type { PurchaseData } from "../../pay/types.js";
2
3
  import type { Token } from "./Token.js";
3
4
  export type Status =
4
5
  | {
@@ -18,7 +19,7 @@ export type Status =
18
19
  chainId: number;
19
20
  transactionHash: ox__Hex.Hex;
20
21
  }>;
21
- purchaseData?: unknown;
22
+ purchaseData?: PurchaseData;
22
23
  }
23
24
  | {
24
25
  status: "PENDING";
@@ -36,7 +37,7 @@ export type Status =
36
37
  chainId: number;
37
38
  transactionHash: ox__Hex.Hex;
38
39
  }>;
39
- purchaseData?: unknown;
40
+ purchaseData?: PurchaseData;
40
41
  }
41
42
  | {
42
43
  status: "FAILED";
@@ -45,7 +46,7 @@ export type Status =
45
46
  chainId: number;
46
47
  transactionHash: ox__Hex.Hex;
47
48
  }>;
48
- purchaseData?: unknown;
49
+ purchaseData?: PurchaseData;
49
50
  }
50
51
  | {
51
52
  status: "NOT_FOUND";
@@ -52,7 +52,7 @@ export type CreateSessionKeyOptions = {
52
52
  * @returns The transaction object to be sent.
53
53
  * @example
54
54
  * ```ts
55
- * import { createSessionKey } from 'thirdweb/extensions/7702';
55
+ * import { createSessionKey } from 'thirdweb/wallets/in-app';
56
56
  * import { sendTransaction } from 'thirdweb';
57
57
  *
58
58
  * const transaction = createSessionKey({
@@ -7,6 +7,7 @@ import { NATIVE_TOKEN_ADDRESS } from "../../constants/addresses.js";
7
7
  import { getContract } from "../../contract/contract.js";
8
8
  import { decimals } from "../../extensions/erc20/read/decimals.js";
9
9
  import type { PrepareTransactionOptions } from "../../transaction/prepare-transaction.js";
10
+ import type { PurchaseData } from "../types.js";
10
11
  import type {
11
12
  QuoteApprovalInfo,
12
13
  QuotePaymentToken,
@@ -76,7 +77,7 @@ export type GetBuyWithCryptoQuoteParams = {
76
77
  *
77
78
  * This details will be stored with the purchase and can be retrieved later via the status API or Webhook
78
79
  */
79
- purchaseData?: object;
80
+ purchaseData?: PurchaseData;
80
81
 
81
82
  /**
82
83
  * The maximum slippage in basis points (bps) allowed for the swap.
@@ -3,6 +3,7 @@ import type { Token } from "../../bridge/types/Token.js";
3
3
  import type { ThirdwebClient } from "../../client/client.js";
4
4
  import type { Hex } from "../../utils/encoding/hex.js";
5
5
  import { toTokens } from "../../utils/units.js";
6
+ import type { PurchaseData } from "../types.js";
6
7
  import type {
7
8
  PayOnChainTransactionDetails,
8
9
  PayTokenInfo,
@@ -80,7 +81,7 @@ export type BuyWithCryptoStatus =
80
81
  toAddress: string;
81
82
  failureMessage?: string;
82
83
  bridge?: string;
83
- purchaseData?: object;
84
+ purchaseData?: PurchaseData;
84
85
  };
85
86
 
86
87
  export type ValidBuyWithCryptoStatus = Exclude<
@@ -162,7 +163,7 @@ export async function getBuyWithCryptoStatus(
162
163
  originTokenAddress: result.originTokenAddress,
163
164
  originTransaction,
164
165
  paymentId: result.paymentId,
165
- purchaseData: result.purchaseData as object | undefined,
166
+ purchaseData: result.purchaseData,
166
167
  receiver: result.receiver,
167
168
  sender: result.sender,
168
169
  status: result.status,
@@ -178,7 +179,7 @@ export async function getBuyWithCryptoStatus(
178
179
  originToken: result.originToken,
179
180
  originTokenAddress: result.originTokenAddress,
180
181
  paymentId: result.paymentId,
181
- purchaseData: result.purchaseData as object | undefined,
182
+ purchaseData: result.purchaseData,
182
183
  receiver: result.receiver,
183
184
  sender: result.sender,
184
185
  status: result.status,
@@ -202,7 +203,7 @@ export async function getBuyWithCryptoStatus(
202
203
  originTokenAddress: "",
203
204
  originTransaction,
204
205
  paymentId: "",
205
- purchaseData: result.purchaseData as object | undefined,
206
+ purchaseData: result.purchaseData,
206
207
  receiver: "",
207
208
  sender: "",
208
209
  status: result.status,
@@ -230,7 +231,7 @@ function toBuyWithCryptoStatus(args: {
230
231
  originChainId: number;
231
232
  destinationChainId: number;
232
233
  status: Status["status"];
233
- purchaseData?: object;
234
+ purchaseData?: PurchaseData;
234
235
  sender: string;
235
236
  receiver: string;
236
237
  paymentId: string;
@@ -277,7 +278,7 @@ function toBuyWithCryptoStatus(args: {
277
278
  transactionHash: destinationTransaction?.transactionHash ?? "",
278
279
  },
279
280
  fromAddress: sender,
280
- purchaseData: purchaseData as object | undefined, // TODO transfer type?
281
+ purchaseData: purchaseData,
281
282
  quote: {
282
283
  createdAt: new Date().toISOString(),
283
284
  estimated: {
@@ -7,6 +7,7 @@ import { NATIVE_TOKEN_ADDRESS } from "../../constants/addresses.js";
7
7
  import { getContract } from "../../contract/contract.js";
8
8
  import { decimals } from "../../extensions/erc20/read/decimals.js";
9
9
  import type { PrepareTransactionOptions } from "../../transaction/prepare-transaction.js";
10
+ import type { PurchaseData } from "../types.js";
10
11
  import type { QuoteApprovalInfo, QuotePaymentToken } from "./commonTypes.js";
11
12
 
12
13
  /**
@@ -54,7 +55,7 @@ export type GetBuyWithCryptoTransferParams = {
54
55
  *
55
56
  * This details will be stored with the purchase and can be retrieved later via the status API or Webhook
56
57
  */
57
- purchaseData?: object;
58
+ purchaseData?: PurchaseData;
58
59
 
59
60
  /**
60
61
  * For direct transfers, specify who will pay for the transfer fee. Can be "sender" or "receiver".
@@ -6,6 +6,7 @@ import { getContract } from "../../contract/contract.js";
6
6
  import { decimals } from "../../extensions/erc20/read/decimals.js";
7
7
  import type { CurrencyMeta } from "../../react/web/ui/ConnectWallet/screens/Buy/fiat/currencies.js";
8
8
  import { toTokens, toUnits } from "../../utils/units.js";
9
+ import type { PurchaseData } from "../types.js";
9
10
  import type { FiatProvider, PayTokenInfo } from "../utils/commonTypes.js";
10
11
  /**
11
12
  * Parameters for [`getBuyWithFiatQuote`](https://portal.thirdweb.com/references/typescript/v5/getBuyWithFiatQuote) function
@@ -80,7 +81,7 @@ export type GetBuyWithFiatQuoteParams = {
80
81
  *
81
82
  * This details will be stored with the purchase and can be retrieved later via the status API or Webhook
82
83
  */
83
- purchaseData?: object;
84
+ purchaseData?: PurchaseData;
84
85
 
85
86
  /**
86
87
  * Optional parameter to onramp gas with the purchase
@@ -1,5 +1,6 @@
1
1
  import { status as onrampStatus } from "../../bridge/OnrampStatus.js";
2
2
  import type { ThirdwebClient } from "../../client/client.js";
3
+ import type { PurchaseData } from "../types.js";
3
4
  import type {
4
5
  PayOnChainTransactionDetails,
5
6
  PayTokenInfo,
@@ -109,7 +110,7 @@ export type BuyWithFiatStatus =
109
110
  /**
110
111
  * Arbitrary data sent at the time of fetching the quote
111
112
  */
112
- purchaseData?: object;
113
+ purchaseData?: PurchaseData;
113
114
  };
114
115
 
115
116
  /**
@@ -202,7 +203,7 @@ function buildPlaceholderStatus(args: {
202
203
  | "PENDING_PAYMENT"
203
204
  | "PAYMENT_FAILED"
204
205
  | "ON_RAMP_TRANSFER_COMPLETED";
205
- purchaseData?: unknown;
206
+ purchaseData?: PurchaseData;
206
207
  }): BuyWithFiatStatus {
207
208
  const { intentId, status, purchaseData } = args;
208
209
 
@@ -253,7 +254,7 @@ function buildPlaceholderStatus(args: {
253
254
  const base: Exclude<BuyWithFiatStatus, { status: "NOT_FOUND" }> = {
254
255
  fromAddress: "",
255
256
  intentId,
256
- purchaseData: purchaseData as object | undefined,
257
+ purchaseData,
257
258
  quote,
258
259
  status,
259
260
  toAddress: "",
@@ -0,0 +1 @@
1
+ export type PurchaseData = Record<string, unknown>;
@@ -4,6 +4,7 @@ import type { ThirdwebClient } from "../../../../client/client.js";
4
4
  import type { BuyWithCryptoStatus } from "../../../../pay/buyWithCrypto/getStatus.js";
5
5
  import type { BuyWithFiatStatus } from "../../../../pay/buyWithFiat/getStatus.js";
6
6
  import type { SupportedFiatCurrency } from "../../../../pay/convert/type.js";
7
+ import type { PurchaseData } from "../../../../pay/types.js";
7
8
  import type { FiatProvider } from "../../../../pay/utils/commonTypes.js";
8
9
  import type { AssetTabs } from "../../../../react/web/ui/ConnectWallet/screens/ViewAssets.js";
9
10
  import type { PreparedTransaction } from "../../../../transaction/prepare-transaction.js";
@@ -117,7 +118,7 @@ export type PayUIOptions = Prettify<
117
118
  *
118
119
  * This details will be stored with the purchase and can be retrieved later via the status API or Webhook
119
120
  */
120
- purchaseData?: object;
121
+ purchaseData?: PurchaseData;
121
122
 
122
123
  /**
123
124
  * Callback to be called when the user successfully completes the purchase.
@@ -6,6 +6,7 @@ import * as Bridge from "../../../../bridge/index.js";
6
6
  import type { Chain } from "../../../../chains/types.js";
7
7
  import type { BuyWithCryptoStatus } from "../../../../pay/buyWithCrypto/getStatus.js";
8
8
  import type { BuyWithFiatStatus } from "../../../../pay/buyWithFiat/getStatus.js";
9
+ import type { PurchaseData } from "../../../../pay/types.js";
9
10
  import type { FiatProvider } from "../../../../pay/utils/commonTypes.js";
10
11
  import type { GaslessOptions } from "../../../../transaction/actions/gasless/types.js";
11
12
  import { sendTransaction } from "../../../../transaction/actions/send-transaction.js";
@@ -65,7 +66,7 @@ export type SendTransactionPayModalConfig =
65
66
  testMode?: boolean;
66
67
  preferredProvider?: FiatProvider;
67
68
  };
68
- purchaseData?: object;
69
+ purchaseData?: PurchaseData;
69
70
  /**
70
71
  * Callback to be called when the user successfully completes the purchase.
71
72
  */
@@ -2,6 +2,7 @@
2
2
  import { useCallback, useMemo } from "react";
3
3
  import type { Token } from "../../../../bridge/types/Token.js";
4
4
  import type { ThirdwebClient } from "../../../../client/client.js";
5
+ import type { PurchaseData } from "../../../../pay/types.js";
5
6
  import type { PreparedTransaction } from "../../../../transaction/prepare-transaction.js";
6
7
  import type { Address } from "../../../../utils/address.js";
7
8
  import { webLocalStorage } from "../../../../utils/storage/webStorage.js";
@@ -102,7 +103,7 @@ export interface BridgeOrchestratorProps {
102
103
  /**
103
104
  * Optional purchase data for the payment
104
105
  */
105
- purchaseData: object | undefined;
106
+ purchaseData?: PurchaseData;
106
107
 
107
108
  /**
108
109
  * Optional payment link ID for the payment
@@ -7,6 +7,7 @@ import type { Chain } from "../../../../chains/types.js";
7
7
  import type { ThirdwebClient } from "../../../../client/client.js";
8
8
  import { NATIVE_TOKEN_ADDRESS } from "../../../../constants/addresses.js";
9
9
  import { getToken } from "../../../../pay/convert/get-token.js";
10
+ import type { PurchaseData } from "../../../../pay/types.js";
10
11
  import {
11
12
  type Address,
12
13
  checksumAddress,
@@ -139,7 +140,7 @@ export type BuyWidgetProps = {
139
140
  /**
140
141
  * Arbitrary data to be included in the returned status and webhook events.
141
142
  */
142
- purchaseData?: Record<string, unknown>;
143
+ purchaseData?: PurchaseData;
143
144
 
144
145
  /**
145
146
  * Callback triggered when the purchase is successful.
@@ -7,6 +7,7 @@ import type { Chain } from "../../../../chains/types.js";
7
7
  import type { ThirdwebClient } from "../../../../client/client.js";
8
8
  import { NATIVE_TOKEN_ADDRESS } from "../../../../constants/addresses.js";
9
9
  import { getToken } from "../../../../pay/convert/get-token.js";
10
+ import type { PurchaseData } from "../../../../pay/types.js";
10
11
  import { type Address, checksumAddress } from "../../../../utils/address.js";
11
12
  import { stringify } from "../../../../utils/json.js";
12
13
  import type { Wallet } from "../../../../wallets/interfaces/wallet.js";
@@ -145,7 +146,7 @@ export type CheckoutWidgetProps = {
145
146
  /**
146
147
  * Arbitrary data to be included in the returned status and webhook events.
147
148
  */
148
- purchaseData?: Record<string, unknown>;
149
+ purchaseData?: PurchaseData;
149
150
 
150
151
  /**
151
152
  * Callback triggered when the purchase is successful.
@@ -4,6 +4,7 @@ import { useEffect } from "react";
4
4
  import { trackPayEvent } from "../../../../analytics/track/pay.js";
5
5
  import type { Token } from "../../../../bridge/types/Token.js";
6
6
  import type { ThirdwebClient } from "../../../../client/client.js";
7
+ import type { PurchaseData } from "../../../../pay/types.js";
7
8
  import { toUnits } from "../../../../utils/units.js";
8
9
  import {
9
10
  type BridgePrepareRequest,
@@ -69,7 +70,7 @@ interface QuoteLoaderProps {
69
70
  /**
70
71
  * Optional purchase data for the payment
71
72
  */
72
- purchaseData?: object;
73
+ purchaseData?: PurchaseData;
73
74
 
74
75
  /**
75
76
  * Optional payment link ID for the payment
@@ -175,7 +176,7 @@ function getBridgeParams(args: {
175
176
  client: ThirdwebClient;
176
177
  sender?: string;
177
178
  feePayer?: "sender" | "receiver";
178
- purchaseData?: object;
179
+ purchaseData?: PurchaseData;
179
180
  paymentLinkId?: string;
180
181
  }): UseBridgePrepareParams {
181
182
  const { paymentMethod, amount, destinationToken, receiver, client, sender } =
@@ -7,6 +7,7 @@ import type { Chain } from "../../../../chains/types.js";
7
7
  import type { ThirdwebClient } from "../../../../client/client.js";
8
8
  import { NATIVE_TOKEN_ADDRESS } from "../../../../constants/addresses.js";
9
9
  import { getToken } from "../../../../pay/convert/get-token.js";
10
+ import type { PurchaseData } from "../../../../pay/types.js";
10
11
  import {
11
12
  type PreparedTransaction,
12
13
  prepareTransaction,
@@ -143,7 +144,7 @@ export type TransactionWidgetProps = {
143
144
  /**
144
145
  * Arbitrary data to be included in the returned status and webhook events.
145
146
  */
146
- purchaseData?: Record<string, unknown>;
147
+ purchaseData?: PurchaseData;
147
148
 
148
149
  /**
149
150
  * Callback triggered when the purchase is successful.
@@ -363,9 +363,7 @@ export function PayEmbed(props: PayEmbedProps) {
363
363
  ? ["card"]
364
364
  : ["crypto", "card"]
365
365
  }
366
- purchaseData={
367
- props.payOptions?.purchaseData as Record<string, unknown> | undefined
368
- }
366
+ purchaseData={props.payOptions?.purchaseData}
369
367
  theme={theme}
370
368
  title={metadata?.name || "Buy"}
371
369
  tokenAddress={
@@ -390,9 +388,7 @@ export function PayEmbed(props: PayEmbedProps) {
390
388
  ? ["crypto"]
391
389
  : ["crypto", "card"]
392
390
  }
393
- purchaseData={
394
- props.payOptions?.purchaseData as Record<string, unknown> | undefined
395
- }
391
+ purchaseData={props.payOptions?.purchaseData}
396
392
  seller={props.payOptions.paymentInfo.sellerAddress as Address}
397
393
  theme={theme}
398
394
  tokenAddress={
@@ -414,9 +410,7 @@ export function PayEmbed(props: PayEmbedProps) {
414
410
  ? ["crypto"]
415
411
  : ["crypto", "card"]
416
412
  }
417
- purchaseData={
418
- props.payOptions?.purchaseData as Record<string, unknown> | undefined
419
- }
413
+ purchaseData={props.payOptions?.purchaseData}
420
414
  theme={theme}
421
415
  title={metadata?.name}
422
416
  transaction={props.payOptions.transaction}
package/src/version.ts CHANGED
@@ -1 +1 @@
1
- export const version = "5.105.5";
1
+ export const version = "5.105.6-nightly-9f88b5c2beedd51730dbe4f2dfdd15e6bcb6e967-20250703000433";