thirdweb 5.105.40-nightly-89eeac1f8a20596ab93b92cf2bbcc76175ceec09-20250831000413 → 5.105.41

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 (89) hide show
  1. package/dist/cjs/react/core/hooks/pay/useBuyWithFiatQuotesForProviders.js +1 -0
  2. package/dist/cjs/react/core/hooks/pay/useBuyWithFiatQuotesForProviders.js.map +1 -1
  3. package/dist/cjs/react/core/hooks/transaction/useSendTransaction.js.map +1 -1
  4. package/dist/cjs/react/web/hooks/transaction/useSendTransaction.js +1 -1
  5. package/dist/cjs/react/web/hooks/transaction/useSendTransaction.js.map +1 -1
  6. package/dist/cjs/react/web/ui/Bridge/BridgeOrchestrator.js +2 -2
  7. package/dist/cjs/react/web/ui/Bridge/BridgeOrchestrator.js.map +1 -1
  8. package/dist/cjs/react/web/ui/Bridge/BuyWidget.js +1 -1
  9. package/dist/cjs/react/web/ui/Bridge/BuyWidget.js.map +1 -1
  10. package/dist/cjs/react/web/ui/Bridge/CheckoutWidget.js +1 -1
  11. package/dist/cjs/react/web/ui/Bridge/CheckoutWidget.js.map +1 -1
  12. package/dist/cjs/react/web/ui/Bridge/TransactionWidget.js +1 -1
  13. package/dist/cjs/react/web/ui/Bridge/TransactionWidget.js.map +1 -1
  14. package/dist/cjs/react/web/ui/Bridge/payment-selection/FiatProviderSelection.js +2 -1
  15. package/dist/cjs/react/web/ui/Bridge/payment-selection/FiatProviderSelection.js.map +1 -1
  16. package/dist/cjs/react/web/ui/Bridge/payment-selection/PaymentSelection.js +2 -2
  17. package/dist/cjs/react/web/ui/Bridge/payment-selection/PaymentSelection.js.map +1 -1
  18. package/dist/cjs/react/web/ui/TransactionButton/TransactionModal.js +1 -1
  19. package/dist/cjs/react/web/ui/TransactionButton/TransactionModal.js.map +1 -1
  20. package/dist/cjs/stories/Bridge/BridgeOrchestrator.stories.js +1 -0
  21. package/dist/cjs/stories/Bridge/BridgeOrchestrator.stories.js.map +1 -1
  22. package/dist/cjs/stories/Bridge/PaymentSelection.stories.js +1 -0
  23. package/dist/cjs/stories/Bridge/PaymentSelection.stories.js.map +1 -1
  24. package/dist/cjs/version.js +1 -1
  25. package/dist/cjs/version.js.map +1 -1
  26. package/dist/esm/react/core/hooks/pay/useBuyWithFiatQuotesForProviders.js +1 -0
  27. package/dist/esm/react/core/hooks/pay/useBuyWithFiatQuotesForProviders.js.map +1 -1
  28. package/dist/esm/react/core/hooks/transaction/useSendTransaction.js.map +1 -1
  29. package/dist/esm/react/web/hooks/transaction/useSendTransaction.js +1 -1
  30. package/dist/esm/react/web/hooks/transaction/useSendTransaction.js.map +1 -1
  31. package/dist/esm/react/web/ui/Bridge/BridgeOrchestrator.js +2 -2
  32. package/dist/esm/react/web/ui/Bridge/BridgeOrchestrator.js.map +1 -1
  33. package/dist/esm/react/web/ui/Bridge/BuyWidget.js +1 -1
  34. package/dist/esm/react/web/ui/Bridge/BuyWidget.js.map +1 -1
  35. package/dist/esm/react/web/ui/Bridge/CheckoutWidget.js +1 -1
  36. package/dist/esm/react/web/ui/Bridge/CheckoutWidget.js.map +1 -1
  37. package/dist/esm/react/web/ui/Bridge/TransactionWidget.js +1 -1
  38. package/dist/esm/react/web/ui/Bridge/TransactionWidget.js.map +1 -1
  39. package/dist/esm/react/web/ui/Bridge/payment-selection/FiatProviderSelection.js +2 -1
  40. package/dist/esm/react/web/ui/Bridge/payment-selection/FiatProviderSelection.js.map +1 -1
  41. package/dist/esm/react/web/ui/Bridge/payment-selection/PaymentSelection.js +2 -2
  42. package/dist/esm/react/web/ui/Bridge/payment-selection/PaymentSelection.js.map +1 -1
  43. package/dist/esm/react/web/ui/TransactionButton/TransactionModal.js +1 -1
  44. package/dist/esm/react/web/ui/TransactionButton/TransactionModal.js.map +1 -1
  45. package/dist/esm/stories/Bridge/BridgeOrchestrator.stories.js +1 -0
  46. package/dist/esm/stories/Bridge/BridgeOrchestrator.stories.js.map +1 -1
  47. package/dist/esm/stories/Bridge/PaymentSelection.stories.js +1 -0
  48. package/dist/esm/stories/Bridge/PaymentSelection.stories.js.map +1 -1
  49. package/dist/esm/version.js +1 -1
  50. package/dist/esm/version.js.map +1 -1
  51. package/dist/types/react/core/hooks/pay/useBuyWithFiatQuotesForProviders.d.ts +4 -0
  52. package/dist/types/react/core/hooks/pay/useBuyWithFiatQuotesForProviders.d.ts.map +1 -1
  53. package/dist/types/react/core/hooks/transaction/useSendTransaction.d.ts +4 -0
  54. package/dist/types/react/core/hooks/transaction/useSendTransaction.d.ts.map +1 -1
  55. package/dist/types/react/web/hooks/transaction/useSendTransaction.d.ts.map +1 -1
  56. package/dist/types/react/web/ui/Bridge/BridgeOrchestrator.d.ts +5 -1
  57. package/dist/types/react/web/ui/Bridge/BridgeOrchestrator.d.ts.map +1 -1
  58. package/dist/types/react/web/ui/Bridge/BuyWidget.d.ts +4 -0
  59. package/dist/types/react/web/ui/Bridge/BuyWidget.d.ts.map +1 -1
  60. package/dist/types/react/web/ui/Bridge/CheckoutWidget.d.ts +4 -0
  61. package/dist/types/react/web/ui/Bridge/CheckoutWidget.d.ts.map +1 -1
  62. package/dist/types/react/web/ui/Bridge/TransactionWidget.d.ts +2 -0
  63. package/dist/types/react/web/ui/Bridge/TransactionWidget.d.ts.map +1 -1
  64. package/dist/types/react/web/ui/Bridge/payment-selection/FiatProviderSelection.d.ts +2 -1
  65. package/dist/types/react/web/ui/Bridge/payment-selection/FiatProviderSelection.d.ts.map +1 -1
  66. package/dist/types/react/web/ui/Bridge/payment-selection/PaymentSelection.d.ts +5 -1
  67. package/dist/types/react/web/ui/Bridge/payment-selection/PaymentSelection.d.ts.map +1 -1
  68. package/dist/types/react/web/ui/TransactionButton/TransactionModal.d.ts +1 -0
  69. package/dist/types/react/web/ui/TransactionButton/TransactionModal.d.ts.map +1 -1
  70. package/dist/types/stories/Bridge/BridgeOrchestrator.stories.d.ts +1 -0
  71. package/dist/types/stories/Bridge/BridgeOrchestrator.stories.d.ts.map +1 -1
  72. package/dist/types/stories/Bridge/PaymentSelection.stories.d.ts +1 -0
  73. package/dist/types/stories/Bridge/PaymentSelection.stories.d.ts.map +1 -1
  74. package/dist/types/version.d.ts +1 -1
  75. package/dist/types/version.d.ts.map +1 -1
  76. package/package.json +3 -3
  77. package/src/react/core/hooks/pay/useBuyWithFiatQuotesForProviders.ts +5 -0
  78. package/src/react/core/hooks/transaction/useSendTransaction.ts +4 -0
  79. package/src/react/web/hooks/transaction/useSendTransaction.tsx +1 -0
  80. package/src/react/web/ui/Bridge/BridgeOrchestrator.tsx +7 -0
  81. package/src/react/web/ui/Bridge/BuyWidget.tsx +6 -0
  82. package/src/react/web/ui/Bridge/CheckoutWidget.tsx +6 -0
  83. package/src/react/web/ui/Bridge/TransactionWidget.tsx +4 -0
  84. package/src/react/web/ui/Bridge/payment-selection/FiatProviderSelection.tsx +3 -0
  85. package/src/react/web/ui/Bridge/payment-selection/PaymentSelection.tsx +7 -0
  86. package/src/react/web/ui/TransactionButton/TransactionModal.tsx +2 -0
  87. package/src/stories/Bridge/BridgeOrchestrator.stories.tsx +1 -0
  88. package/src/stories/Bridge/PaymentSelection.stories.tsx +1 -0
  89. package/src/version.ts +1 -1
package/package.json CHANGED
@@ -39,8 +39,8 @@
39
39
  "uqr": "0.1.2",
40
40
  "viem": "2.33.2",
41
41
  "zod": "3.25.75",
42
- "@thirdweb-dev/insight": "1.1.1",
43
- "@thirdweb-dev/engine": "3.2.1"
42
+ "@thirdweb-dev/engine": "3.2.1",
43
+ "@thirdweb-dev/insight": "1.1.1"
44
44
  },
45
45
  "devDependencies": {
46
46
  "@aws-sdk/client-kms": "3.592.0",
@@ -388,7 +388,7 @@
388
388
  }
389
389
  },
390
390
  "typings": "./dist/types/exports/thirdweb.d.ts",
391
- "version": "5.105.40-nightly-89eeac1f8a20596ab93b92cf2bbcc76175ceec09-20250831000413",
391
+ "version": "5.105.41",
392
392
  "scripts": {
393
393
  "bench": "vitest -c ./test/vitest.config.ts bench",
394
394
  "bench:compare": "bun run ./benchmarks/run.ts",
@@ -33,6 +33,10 @@ type UseBuyWithFiatQuotesForProvidersParams = {
33
33
  * The fiat currency (e.g., "USD"). Defaults to "USD".
34
34
  */
35
35
  currency?: string;
36
+ /**
37
+ * The user's ISO 3166 alpha-2 country code. This is used to determine onramp provider support.
38
+ */
39
+ country?: string;
36
40
  };
37
41
 
38
42
  /**
@@ -89,6 +93,7 @@ export function useBuyWithFiatQuotesForProviders(
89
93
  onramp: provider,
90
94
  receiver: params.receiver,
91
95
  tokenAddress: params.tokenAddress,
96
+ country: params.country,
92
97
  });
93
98
  },
94
99
  queryKey: ["onramp-prepare", provider, params],
@@ -90,6 +90,10 @@ export type SendTransactionPayModalConfig =
90
90
  },
91
91
  ) => void;
92
92
  showThirdwebBranding?: boolean;
93
+ /**
94
+ * The user's ISO 3166 alpha-2 country code. This is used to determine onramp provider support.
95
+ */
96
+ country?: string;
93
97
  }
94
98
  | false;
95
99
 
@@ -137,6 +137,7 @@ export function useSendTransaction(config: SendTransactionConfig = {}) {
137
137
  if (payModal === false) return;
138
138
  setRootEl(
139
139
  <TransactionModal
140
+ country={payModal?.country}
140
141
  client={data.tx.client}
141
142
  localeId={payModal?.locale || "en_US"}
142
143
  modalMode={data.mode}
@@ -125,6 +125,11 @@ export interface BridgeOrchestratorProps {
125
125
  */
126
126
  paymentMethods?: ("crypto" | "card")[];
127
127
 
128
+ /**
129
+ * The user's ISO 3166 alpha-2 country code. This is used to determine onramp provider support.
130
+ */
131
+ country: string | undefined;
132
+
128
133
  /**
129
134
  * Whether to show thirdweb branding in the widget.
130
135
  * @default true
@@ -148,6 +153,7 @@ export function BridgeOrchestrator({
148
153
  paymentMethods = ["crypto", "card"],
149
154
  showThirdwebBranding = true,
150
155
  supportedTokens,
156
+ country = "US",
151
157
  }: BridgeOrchestratorProps) {
152
158
  // Initialize adapters
153
159
  const adapters = useMemo(
@@ -319,6 +325,7 @@ export function BridgeOrchestrator({
319
325
  receiverAddress={state.context.receiverAddress}
320
326
  currency={uiOptions.currency}
321
327
  supportedTokens={supportedTokens}
328
+ country={country}
322
329
  />
323
330
  )}
324
331
 
@@ -184,6 +184,11 @@ export type BuyWidgetProps = {
184
184
  */
185
185
  currency?: SupportedFiatCurrency;
186
186
 
187
+ /**
188
+ * The user's ISO 3166 alpha-2 country code. This is used to determine onramp provider support.
189
+ */
190
+ country?: string;
191
+
187
192
  /**
188
193
  * Custom label for the main action button.
189
194
  */
@@ -432,6 +437,7 @@ export function BuyWidget(props: BuyWidgetProps) {
432
437
  // Show normal bridge orchestrator
433
438
  content = (
434
439
  <BridgeOrchestrator
440
+ country={props.country}
435
441
  supportedTokens={props.supportedTokens}
436
442
  client={props.client}
437
443
  connectLocale={localeQuery.data}
@@ -193,6 +193,11 @@ export type CheckoutWidgetProps = {
193
193
  */
194
194
  currency?: SupportedFiatCurrency;
195
195
 
196
+ /**
197
+ * The user's ISO 3166 alpha-2 country code. This is used to determine onramp provider support.
198
+ */
199
+ country?: string;
200
+
196
201
  /**
197
202
  * Custom label for the main action button.
198
203
  */
@@ -400,6 +405,7 @@ export function CheckoutWidget(props: CheckoutWidgetProps) {
400
405
  // Show normal bridge orchestrator
401
406
  content = (
402
407
  <BridgeOrchestrator
408
+ country={props.country}
403
409
  client={props.client}
404
410
  connectLocale={localeQuery.data}
405
411
  connectOptions={props.connectOptions}
@@ -193,6 +193,9 @@ export type TransactionWidgetProps = {
193
193
  */
194
194
  currency?: SupportedFiatCurrency;
195
195
 
196
+ /** The user's ISO 3166 alpha-2 country code. This is used to determine onramp provider support. */
197
+ country?: string;
198
+
196
199
  /**
197
200
  * Custom label for the main action button.
198
201
  */
@@ -442,6 +445,7 @@ export function TransactionWidget(props: TransactionWidgetProps) {
442
445
  // Show normal bridge orchestrator
443
446
  content = (
444
447
  <BridgeOrchestrator
448
+ country={props.country}
445
449
  supportedTokens={props.supportedTokens}
446
450
  client={props.client}
447
451
  connectLocale={localeQuery.data}
@@ -28,6 +28,7 @@ interface FiatProviderSelectionProps {
28
28
  toAddress: string;
29
29
  toAmount?: string;
30
30
  currency?: SupportedFiatCurrency;
31
+ country: string | undefined;
31
32
  }
32
33
 
33
34
  const PROVIDERS = [
@@ -59,6 +60,7 @@ export function FiatProviderSelection({
59
60
  toAddress,
60
61
  toAmount,
61
62
  currency,
63
+ country,
62
64
  }: FiatProviderSelectionProps) {
63
65
  const theme = useCustomTheme();
64
66
 
@@ -70,6 +72,7 @@ export function FiatProviderSelection({
70
72
  currency: currency || "USD",
71
73
  receiver: checksumAddress(toAddress),
72
74
  tokenAddress: checksumAddress(toTokenAddress),
75
+ country,
73
76
  });
74
77
 
75
78
  const quotes = useMemo(() => {
@@ -91,6 +91,11 @@ export interface PaymentSelectionProps {
91
91
  */
92
92
  currency?: SupportedFiatCurrency;
93
93
 
94
+ /**
95
+ * The user's ISO 3166 alpha-2 country code. This is used to determine onramp provider support.
96
+ */
97
+ country: string | undefined;
98
+
94
99
  supportedTokens?: SupportedTokens;
95
100
  }
96
101
 
@@ -115,6 +120,7 @@ export function PaymentSelection({
115
120
  supportedTokens,
116
121
  feePayer,
117
122
  currency,
123
+ country,
118
124
  }: PaymentSelectionProps) {
119
125
  const connectedWallets = useConnectedWallets();
120
126
  const activeWallet = useActiveWallet();
@@ -298,6 +304,7 @@ export function PaymentSelection({
298
304
 
299
305
  {currentStep.type === "fiatProviderSelection" && (
300
306
  <FiatProviderSelection
307
+ country={country}
301
308
  client={client}
302
309
  onProviderSelected={handleOnrampProviderSelected}
303
310
  toAddress={receiverAddress || ""}
@@ -33,6 +33,7 @@ type ModalProps = {
33
33
  payOptions: PayUIOptions;
34
34
  onTxSent: (data: WaitForReceiptOptions) => void;
35
35
  modalMode: "buy" | "deposit";
36
+ country?: string;
36
37
  };
37
38
 
38
39
  export function TransactionModal(props: ModalProps) {
@@ -116,6 +117,7 @@ function TransactionModalContent(props: ModalProps & { onBack?: () => void }) {
116
117
 
117
118
  return (
118
119
  <BridgeOrchestrator
120
+ country={props.country}
119
121
  client={props.client}
120
122
  connectLocale={localeQuery.data}
121
123
  connectOptions={undefined}
@@ -42,6 +42,7 @@ const meta = {
42
42
  onError: (error) => console.error("Bridge error:", error),
43
43
  theme: "dark",
44
44
  uiOptions: FUND_WALLET_UI_OPTIONS.usdcDefault,
45
+ country: "US",
45
46
  },
46
47
  argTypes: {
47
48
  onCancel: { action: "flow cancelled" },
@@ -32,6 +32,7 @@ const meta = {
32
32
  onError: (error) => console.error("Error:", error),
33
33
  onPaymentMethodSelected: (_paymentMethod) => {},
34
34
  theme: "dark",
35
+ country: "US",
35
36
  },
36
37
  argTypes: {
37
38
  connectLocale: {
package/src/version.ts CHANGED
@@ -1 +1 @@
1
- export const version = "5.105.40-nightly-89eeac1f8a20596ab93b92cf2bbcc76175ceec09-20250831000413";
1
+ export const version = "5.105.41";