thirdweb 5.105.40 → 5.105.42-nightly-2d76cf904079cc74809f571b67ac746fad7aa04f-20250909000351

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 (189) hide show
  1. package/dist/cjs/extensions/erc7702/__generated__/MinimalAccount/events/Executed.js +4 -2
  2. package/dist/cjs/extensions/erc7702/__generated__/MinimalAccount/events/Executed.js.map +1 -1
  3. package/dist/cjs/extensions/erc7702/__generated__/MinimalAccount/events/SessionCreated.js +3 -2
  4. package/dist/cjs/extensions/erc7702/__generated__/MinimalAccount/events/SessionCreated.js.map +1 -1
  5. package/dist/cjs/extensions/erc7702/__generated__/MinimalAccount/events/ValueReceived.js +32 -0
  6. package/dist/cjs/extensions/erc7702/__generated__/MinimalAccount/events/ValueReceived.js.map +1 -0
  7. package/dist/cjs/extensions/erc7702/__generated__/MinimalAccount/read/eip712Domain.js +7 -7
  8. package/dist/cjs/extensions/erc7702/__generated__/MinimalAccount/read/eip712Domain.js.map +1 -1
  9. package/dist/cjs/extensions/erc7702/__generated__/MinimalAccount/read/getCallPoliciesForSigner.js +20 -20
  10. package/dist/cjs/extensions/erc7702/__generated__/MinimalAccount/read/getCallPoliciesForSigner.js.map +1 -1
  11. package/dist/cjs/extensions/erc7702/__generated__/MinimalAccount/read/getSessionExpirationForSigner.js +1 -1
  12. package/dist/cjs/extensions/erc7702/__generated__/MinimalAccount/read/getSessionExpirationForSigner.js.map +1 -1
  13. package/dist/cjs/extensions/erc7702/__generated__/MinimalAccount/read/getSessionStateForSigner.js +20 -20
  14. package/dist/cjs/extensions/erc7702/__generated__/MinimalAccount/read/getSessionStateForSigner.js.map +1 -1
  15. package/dist/cjs/extensions/erc7702/__generated__/MinimalAccount/read/getTransferPoliciesForSigner.js +9 -9
  16. package/dist/cjs/extensions/erc7702/__generated__/MinimalAccount/read/getTransferPoliciesForSigner.js.map +1 -1
  17. package/dist/cjs/extensions/erc7702/__generated__/MinimalAccount/read/isWildcardSigner.js +1 -1
  18. package/dist/cjs/extensions/erc7702/__generated__/MinimalAccount/read/isWildcardSigner.js.map +1 -1
  19. package/dist/cjs/extensions/erc7702/__generated__/MinimalAccount/write/createSessionWithSig.js +45 -45
  20. package/dist/cjs/extensions/erc7702/__generated__/MinimalAccount/write/createSessionWithSig.js.map +1 -1
  21. package/dist/cjs/extensions/erc7702/__generated__/MinimalAccount/write/execute.js +14 -14
  22. package/dist/cjs/extensions/erc7702/__generated__/MinimalAccount/write/execute.js.map +1 -1
  23. package/dist/cjs/extensions/erc7702/__generated__/MinimalAccount/write/executeWithSig.js +18 -18
  24. package/dist/cjs/extensions/erc7702/__generated__/MinimalAccount/write/executeWithSig.js.map +1 -1
  25. package/dist/cjs/gas/fee-data.js +1 -1
  26. package/dist/cjs/gas/fee-data.js.map +1 -1
  27. package/dist/cjs/react/core/hooks/pay/useBuyWithFiatQuotesForProviders.js +1 -0
  28. package/dist/cjs/react/core/hooks/pay/useBuyWithFiatQuotesForProviders.js.map +1 -1
  29. package/dist/cjs/react/core/hooks/transaction/useSendTransaction.js.map +1 -1
  30. package/dist/cjs/react/web/hooks/transaction/useSendTransaction.js +1 -1
  31. package/dist/cjs/react/web/hooks/transaction/useSendTransaction.js.map +1 -1
  32. package/dist/cjs/react/web/ui/Bridge/BridgeOrchestrator.js +2 -2
  33. package/dist/cjs/react/web/ui/Bridge/BridgeOrchestrator.js.map +1 -1
  34. package/dist/cjs/react/web/ui/Bridge/BuyWidget.js +1 -1
  35. package/dist/cjs/react/web/ui/Bridge/BuyWidget.js.map +1 -1
  36. package/dist/cjs/react/web/ui/Bridge/CheckoutWidget.js +1 -1
  37. package/dist/cjs/react/web/ui/Bridge/CheckoutWidget.js.map +1 -1
  38. package/dist/cjs/react/web/ui/Bridge/TransactionWidget.js +1 -1
  39. package/dist/cjs/react/web/ui/Bridge/TransactionWidget.js.map +1 -1
  40. package/dist/cjs/react/web/ui/Bridge/payment-selection/FiatProviderSelection.js +2 -1
  41. package/dist/cjs/react/web/ui/Bridge/payment-selection/FiatProviderSelection.js.map +1 -1
  42. package/dist/cjs/react/web/ui/Bridge/payment-selection/PaymentSelection.js +2 -2
  43. package/dist/cjs/react/web/ui/Bridge/payment-selection/PaymentSelection.js.map +1 -1
  44. package/dist/cjs/react/web/ui/ConnectWallet/Modal/AllWalletsUI.js +2 -6
  45. package/dist/cjs/react/web/ui/ConnectWallet/Modal/AllWalletsUI.js.map +1 -1
  46. package/dist/cjs/react/web/ui/ConnectWallet/Modal/ConnectModalContent.js +1 -1
  47. package/dist/cjs/react/web/ui/ConnectWallet/Modal/ConnectModalContent.js.map +1 -1
  48. package/dist/cjs/react/web/ui/TransactionButton/TransactionModal.js +1 -1
  49. package/dist/cjs/react/web/ui/TransactionButton/TransactionModal.js.map +1 -1
  50. package/dist/cjs/react/web/wallets/in-app/WalletAuth.js +1 -1
  51. package/dist/cjs/react/web/wallets/in-app/WalletAuth.js.map +1 -1
  52. package/dist/cjs/stories/Bridge/BridgeOrchestrator.stories.js +1 -0
  53. package/dist/cjs/stories/Bridge/BridgeOrchestrator.stories.js.map +1 -1
  54. package/dist/cjs/stories/Bridge/PaymentSelection.stories.js +1 -0
  55. package/dist/cjs/stories/Bridge/PaymentSelection.stories.js.map +1 -1
  56. package/dist/cjs/version.js +1 -1
  57. package/dist/cjs/version.js.map +1 -1
  58. package/dist/cjs/wallets/in-app/core/eip7702/minimal-account.js +117 -10
  59. package/dist/cjs/wallets/in-app/core/eip7702/minimal-account.js.map +1 -1
  60. package/dist/esm/extensions/erc7702/__generated__/MinimalAccount/events/Executed.js +4 -2
  61. package/dist/esm/extensions/erc7702/__generated__/MinimalAccount/events/Executed.js.map +1 -1
  62. package/dist/esm/extensions/erc7702/__generated__/MinimalAccount/events/SessionCreated.js +3 -2
  63. package/dist/esm/extensions/erc7702/__generated__/MinimalAccount/events/SessionCreated.js.map +1 -1
  64. package/dist/esm/extensions/erc7702/__generated__/MinimalAccount/events/ValueReceived.js +29 -0
  65. package/dist/esm/extensions/erc7702/__generated__/MinimalAccount/events/ValueReceived.js.map +1 -0
  66. package/dist/esm/extensions/erc7702/__generated__/MinimalAccount/read/eip712Domain.js +7 -7
  67. package/dist/esm/extensions/erc7702/__generated__/MinimalAccount/read/eip712Domain.js.map +1 -1
  68. package/dist/esm/extensions/erc7702/__generated__/MinimalAccount/read/getCallPoliciesForSigner.js +20 -20
  69. package/dist/esm/extensions/erc7702/__generated__/MinimalAccount/read/getCallPoliciesForSigner.js.map +1 -1
  70. package/dist/esm/extensions/erc7702/__generated__/MinimalAccount/read/getSessionExpirationForSigner.js +1 -1
  71. package/dist/esm/extensions/erc7702/__generated__/MinimalAccount/read/getSessionExpirationForSigner.js.map +1 -1
  72. package/dist/esm/extensions/erc7702/__generated__/MinimalAccount/read/getSessionStateForSigner.js +20 -20
  73. package/dist/esm/extensions/erc7702/__generated__/MinimalAccount/read/getSessionStateForSigner.js.map +1 -1
  74. package/dist/esm/extensions/erc7702/__generated__/MinimalAccount/read/getTransferPoliciesForSigner.js +9 -9
  75. package/dist/esm/extensions/erc7702/__generated__/MinimalAccount/read/getTransferPoliciesForSigner.js.map +1 -1
  76. package/dist/esm/extensions/erc7702/__generated__/MinimalAccount/read/isWildcardSigner.js +1 -1
  77. package/dist/esm/extensions/erc7702/__generated__/MinimalAccount/read/isWildcardSigner.js.map +1 -1
  78. package/dist/esm/extensions/erc7702/__generated__/MinimalAccount/write/createSessionWithSig.js +45 -45
  79. package/dist/esm/extensions/erc7702/__generated__/MinimalAccount/write/createSessionWithSig.js.map +1 -1
  80. package/dist/esm/extensions/erc7702/__generated__/MinimalAccount/write/execute.js +14 -14
  81. package/dist/esm/extensions/erc7702/__generated__/MinimalAccount/write/execute.js.map +1 -1
  82. package/dist/esm/extensions/erc7702/__generated__/MinimalAccount/write/executeWithSig.js +18 -18
  83. package/dist/esm/extensions/erc7702/__generated__/MinimalAccount/write/executeWithSig.js.map +1 -1
  84. package/dist/esm/gas/fee-data.js +1 -1
  85. package/dist/esm/gas/fee-data.js.map +1 -1
  86. package/dist/esm/react/core/hooks/pay/useBuyWithFiatQuotesForProviders.js +1 -0
  87. package/dist/esm/react/core/hooks/pay/useBuyWithFiatQuotesForProviders.js.map +1 -1
  88. package/dist/esm/react/core/hooks/transaction/useSendTransaction.js.map +1 -1
  89. package/dist/esm/react/web/hooks/transaction/useSendTransaction.js +1 -1
  90. package/dist/esm/react/web/hooks/transaction/useSendTransaction.js.map +1 -1
  91. package/dist/esm/react/web/ui/Bridge/BridgeOrchestrator.js +2 -2
  92. package/dist/esm/react/web/ui/Bridge/BridgeOrchestrator.js.map +1 -1
  93. package/dist/esm/react/web/ui/Bridge/BuyWidget.js +1 -1
  94. package/dist/esm/react/web/ui/Bridge/BuyWidget.js.map +1 -1
  95. package/dist/esm/react/web/ui/Bridge/CheckoutWidget.js +1 -1
  96. package/dist/esm/react/web/ui/Bridge/CheckoutWidget.js.map +1 -1
  97. package/dist/esm/react/web/ui/Bridge/TransactionWidget.js +1 -1
  98. package/dist/esm/react/web/ui/Bridge/TransactionWidget.js.map +1 -1
  99. package/dist/esm/react/web/ui/Bridge/payment-selection/FiatProviderSelection.js +2 -1
  100. package/dist/esm/react/web/ui/Bridge/payment-selection/FiatProviderSelection.js.map +1 -1
  101. package/dist/esm/react/web/ui/Bridge/payment-selection/PaymentSelection.js +2 -2
  102. package/dist/esm/react/web/ui/Bridge/payment-selection/PaymentSelection.js.map +1 -1
  103. package/dist/esm/react/web/ui/ConnectWallet/Modal/AllWalletsUI.js +2 -6
  104. package/dist/esm/react/web/ui/ConnectWallet/Modal/AllWalletsUI.js.map +1 -1
  105. package/dist/esm/react/web/ui/ConnectWallet/Modal/ConnectModalContent.js +1 -1
  106. package/dist/esm/react/web/ui/ConnectWallet/Modal/ConnectModalContent.js.map +1 -1
  107. package/dist/esm/react/web/ui/TransactionButton/TransactionModal.js +1 -1
  108. package/dist/esm/react/web/ui/TransactionButton/TransactionModal.js.map +1 -1
  109. package/dist/esm/react/web/wallets/in-app/WalletAuth.js +1 -1
  110. package/dist/esm/react/web/wallets/in-app/WalletAuth.js.map +1 -1
  111. package/dist/esm/stories/Bridge/BridgeOrchestrator.stories.js +1 -0
  112. package/dist/esm/stories/Bridge/BridgeOrchestrator.stories.js.map +1 -1
  113. package/dist/esm/stories/Bridge/PaymentSelection.stories.js +1 -0
  114. package/dist/esm/stories/Bridge/PaymentSelection.stories.js.map +1 -1
  115. package/dist/esm/version.js +1 -1
  116. package/dist/esm/version.js.map +1 -1
  117. package/dist/esm/wallets/in-app/core/eip7702/minimal-account.js +117 -10
  118. package/dist/esm/wallets/in-app/core/eip7702/minimal-account.js.map +1 -1
  119. package/dist/types/extensions/erc7702/__generated__/MinimalAccount/events/Executed.d.ts +25 -8
  120. package/dist/types/extensions/erc7702/__generated__/MinimalAccount/events/Executed.d.ts.map +1 -1
  121. package/dist/types/extensions/erc7702/__generated__/MinimalAccount/events/SessionCreated.d.ts +14 -4
  122. package/dist/types/extensions/erc7702/__generated__/MinimalAccount/events/SessionCreated.d.ts.map +1 -1
  123. package/dist/types/extensions/erc7702/__generated__/MinimalAccount/events/ValueReceived.d.ts +54 -0
  124. package/dist/types/extensions/erc7702/__generated__/MinimalAccount/events/ValueReceived.d.ts.map +1 -0
  125. package/dist/types/react/core/hooks/pay/useBuyWithFiatQuotesForProviders.d.ts +4 -0
  126. package/dist/types/react/core/hooks/pay/useBuyWithFiatQuotesForProviders.d.ts.map +1 -1
  127. package/dist/types/react/core/hooks/transaction/useSendTransaction.d.ts +4 -0
  128. package/dist/types/react/core/hooks/transaction/useSendTransaction.d.ts.map +1 -1
  129. package/dist/types/react/web/hooks/transaction/useSendTransaction.d.ts.map +1 -1
  130. package/dist/types/react/web/ui/Bridge/BridgeOrchestrator.d.ts +5 -1
  131. package/dist/types/react/web/ui/Bridge/BridgeOrchestrator.d.ts.map +1 -1
  132. package/dist/types/react/web/ui/Bridge/BuyWidget.d.ts +4 -0
  133. package/dist/types/react/web/ui/Bridge/BuyWidget.d.ts.map +1 -1
  134. package/dist/types/react/web/ui/Bridge/CheckoutWidget.d.ts +4 -0
  135. package/dist/types/react/web/ui/Bridge/CheckoutWidget.d.ts.map +1 -1
  136. package/dist/types/react/web/ui/Bridge/TransactionWidget.d.ts +2 -0
  137. package/dist/types/react/web/ui/Bridge/TransactionWidget.d.ts.map +1 -1
  138. package/dist/types/react/web/ui/Bridge/payment-selection/FiatProviderSelection.d.ts +2 -1
  139. package/dist/types/react/web/ui/Bridge/payment-selection/FiatProviderSelection.d.ts.map +1 -1
  140. package/dist/types/react/web/ui/Bridge/payment-selection/PaymentSelection.d.ts +5 -1
  141. package/dist/types/react/web/ui/Bridge/payment-selection/PaymentSelection.d.ts.map +1 -1
  142. package/dist/types/react/web/ui/ConnectWallet/Modal/AllWalletsUI.d.ts +0 -1
  143. package/dist/types/react/web/ui/ConnectWallet/Modal/AllWalletsUI.d.ts.map +1 -1
  144. package/dist/types/react/web/ui/ConnectWallet/Modal/ConnectModalContent.d.ts.map +1 -1
  145. package/dist/types/react/web/ui/TransactionButton/TransactionModal.d.ts +1 -0
  146. package/dist/types/react/web/ui/TransactionButton/TransactionModal.d.ts.map +1 -1
  147. package/dist/types/react/web/wallets/in-app/WalletAuth.d.ts.map +1 -1
  148. package/dist/types/stories/Bridge/BridgeOrchestrator.stories.d.ts +1 -0
  149. package/dist/types/stories/Bridge/BridgeOrchestrator.stories.d.ts.map +1 -1
  150. package/dist/types/stories/Bridge/PaymentSelection.stories.d.ts +1 -0
  151. package/dist/types/stories/Bridge/PaymentSelection.stories.d.ts.map +1 -1
  152. package/dist/types/version.d.ts +1 -1
  153. package/dist/types/version.d.ts.map +1 -1
  154. package/dist/types/wallets/in-app/core/eip7702/minimal-account.d.ts +64 -0
  155. package/dist/types/wallets/in-app/core/eip7702/minimal-account.d.ts.map +1 -1
  156. package/package.json +1 -1
  157. package/src/extensions/erc7702/__generated__/MinimalAccount/events/Executed.ts +17 -4
  158. package/src/extensions/erc7702/__generated__/MinimalAccount/events/SessionCreated.ts +11 -5
  159. package/src/extensions/erc7702/__generated__/MinimalAccount/events/ValueReceived.ts +47 -0
  160. package/src/extensions/erc7702/__generated__/MinimalAccount/read/eip712Domain.ts +7 -7
  161. package/src/extensions/erc7702/__generated__/MinimalAccount/read/getCallPoliciesForSigner.ts +20 -20
  162. package/src/extensions/erc7702/__generated__/MinimalAccount/read/getSessionExpirationForSigner.ts +1 -1
  163. package/src/extensions/erc7702/__generated__/MinimalAccount/read/getSessionStateForSigner.ts +20 -20
  164. package/src/extensions/erc7702/__generated__/MinimalAccount/read/getTransferPoliciesForSigner.ts +9 -9
  165. package/src/extensions/erc7702/__generated__/MinimalAccount/read/isWildcardSigner.ts +1 -1
  166. package/src/extensions/erc7702/__generated__/MinimalAccount/write/createSessionWithSig.ts +47 -47
  167. package/src/extensions/erc7702/__generated__/MinimalAccount/write/execute.ts +16 -16
  168. package/src/extensions/erc7702/__generated__/MinimalAccount/write/executeWithSig.ts +20 -20
  169. package/src/extensions/erc7702/account/sessionkey.test.ts +2 -4
  170. package/src/gas/fee-data.ts +1 -1
  171. package/src/react/core/hooks/pay/useBuyWithFiatQuotesForProviders.ts +5 -0
  172. package/src/react/core/hooks/transaction/useSendTransaction.ts +4 -0
  173. package/src/react/web/hooks/transaction/useSendTransaction.tsx +1 -0
  174. package/src/react/web/ui/Bridge/BridgeOrchestrator.tsx +7 -0
  175. package/src/react/web/ui/Bridge/BuyWidget.tsx +6 -0
  176. package/src/react/web/ui/Bridge/CheckoutWidget.tsx +6 -0
  177. package/src/react/web/ui/Bridge/TransactionWidget.tsx +4 -0
  178. package/src/react/web/ui/Bridge/payment-selection/FiatProviderSelection.tsx +3 -0
  179. package/src/react/web/ui/Bridge/payment-selection/PaymentSelection.tsx +7 -0
  180. package/src/react/web/ui/ConnectWallet/Modal/AllWalletsUI.tsx +5 -12
  181. package/src/react/web/ui/ConnectWallet/Modal/ConnectModalContent.tsx +0 -1
  182. package/src/react/web/ui/TransactionButton/TransactionModal.tsx +2 -0
  183. package/src/react/web/wallets/in-app/WalletAuth.tsx +0 -1
  184. package/src/stories/Bridge/BridgeOrchestrator.stories.tsx +1 -0
  185. package/src/stories/Bridge/PaymentSelection.stories.tsx +1 -0
  186. package/src/version.ts +1 -1
  187. package/src/wallets/in-app/core/eip7702/minimal-account.ts +149 -10
  188. package/src/wallets/in-app/web/lib/in-app-gateway.test.ts +87 -103
  189. package/src/wallets/in-app/web/lib/in-app-integration.test.ts +1 -2
@@ -81,134 +81,134 @@ export type CreateSessionWithSigParams = WithOverrides<{
81
81
  export const FN_SELECTOR = "0xb5051648" as const;
82
82
  const FN_INPUTS = [
83
83
  {
84
+ type: "tuple",
85
+ name: "sessionSpec",
84
86
  components: [
85
87
  {
86
- name: "signer",
87
88
  type: "address",
89
+ name: "signer",
88
90
  },
89
91
  {
90
- name: "isWildcard",
91
92
  type: "bool",
93
+ name: "isWildcard",
92
94
  },
93
95
  {
94
- name: "expiresAt",
95
96
  type: "uint256",
97
+ name: "expiresAt",
96
98
  },
97
99
  {
100
+ type: "tuple[]",
101
+ name: "callPolicies",
98
102
  components: [
99
103
  {
100
- name: "target",
101
104
  type: "address",
105
+ name: "target",
102
106
  },
103
107
  {
104
- name: "selector",
105
108
  type: "bytes4",
109
+ name: "selector",
106
110
  },
107
111
  {
108
- name: "maxValuePerUse",
109
112
  type: "uint256",
113
+ name: "maxValuePerUse",
110
114
  },
111
115
  {
116
+ type: "tuple",
117
+ name: "valueLimit",
112
118
  components: [
113
119
  {
114
- name: "limitType",
115
120
  type: "uint8",
121
+ name: "limitType",
116
122
  },
117
123
  {
118
- name: "limit",
119
124
  type: "uint256",
125
+ name: "limit",
120
126
  },
121
127
  {
122
- name: "period",
123
128
  type: "uint256",
129
+ name: "period",
124
130
  },
125
131
  ],
126
- name: "valueLimit",
127
- type: "tuple",
128
132
  },
129
133
  {
134
+ type: "tuple[]",
135
+ name: "constraints",
130
136
  components: [
131
137
  {
132
- name: "condition",
133
138
  type: "uint8",
139
+ name: "condition",
134
140
  },
135
141
  {
136
- name: "index",
137
142
  type: "uint64",
143
+ name: "index",
138
144
  },
139
145
  {
140
- name: "refValue",
141
146
  type: "bytes32",
147
+ name: "refValue",
142
148
  },
143
149
  {
150
+ type: "tuple",
151
+ name: "limit",
144
152
  components: [
145
153
  {
146
- name: "limitType",
147
154
  type: "uint8",
155
+ name: "limitType",
148
156
  },
149
157
  {
150
- name: "limit",
151
158
  type: "uint256",
159
+ name: "limit",
152
160
  },
153
161
  {
154
- name: "period",
155
162
  type: "uint256",
163
+ name: "period",
156
164
  },
157
165
  ],
158
- name: "limit",
159
- type: "tuple",
160
166
  },
161
167
  ],
162
- name: "constraints",
163
- type: "tuple[]",
164
168
  },
165
169
  ],
166
- name: "callPolicies",
167
- type: "tuple[]",
168
170
  },
169
171
  {
172
+ type: "tuple[]",
173
+ name: "transferPolicies",
170
174
  components: [
171
175
  {
172
- name: "target",
173
176
  type: "address",
177
+ name: "target",
174
178
  },
175
179
  {
176
- name: "maxValuePerUse",
177
180
  type: "uint256",
181
+ name: "maxValuePerUse",
178
182
  },
179
183
  {
184
+ type: "tuple",
185
+ name: "valueLimit",
180
186
  components: [
181
187
  {
182
- name: "limitType",
183
188
  type: "uint8",
189
+ name: "limitType",
184
190
  },
185
191
  {
186
- name: "limit",
187
192
  type: "uint256",
193
+ name: "limit",
188
194
  },
189
195
  {
190
- name: "period",
191
196
  type: "uint256",
197
+ name: "period",
192
198
  },
193
199
  ],
194
- name: "valueLimit",
195
- type: "tuple",
196
200
  },
197
201
  ],
198
- name: "transferPolicies",
199
- type: "tuple[]",
200
202
  },
201
203
  {
202
- name: "uid",
203
204
  type: "bytes32",
205
+ name: "uid",
204
206
  },
205
207
  ],
206
- name: "sessionSpec",
207
- type: "tuple",
208
208
  },
209
209
  {
210
- name: "signature",
211
210
  type: "bytes",
211
+ name: "signature",
212
212
  },
213
213
  ] as const;
214
214
  const FN_OUTPUTS = [] as const;
@@ -316,23 +316,23 @@ export function createSessionWithSig(
316
316
  });
317
317
 
318
318
  return prepareContractCall({
319
- accessList: async () => (await asyncOptions()).overrides?.accessList,
320
- authorizationList: async () =>
321
- (await asyncOptions()).overrides?.authorizationList,
322
319
  contract: options.contract,
323
- erc20Value: async () => (await asyncOptions()).overrides?.erc20Value,
324
- extraGas: async () => (await asyncOptions()).overrides?.extraGas,
325
- gas: async () => (await asyncOptions()).overrides?.gas,
326
- gasPrice: async () => (await asyncOptions()).overrides?.gasPrice,
327
- maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas,
328
- maxPriorityFeePerGas: async () =>
329
- (await asyncOptions()).overrides?.maxPriorityFeePerGas,
330
320
  method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const,
331
- nonce: async () => (await asyncOptions()).overrides?.nonce,
332
321
  params: async () => {
333
322
  const resolvedOptions = await asyncOptions();
334
323
  return [resolvedOptions.sessionSpec, resolvedOptions.signature] as const;
335
324
  },
336
325
  value: async () => (await asyncOptions()).overrides?.value,
326
+ accessList: async () => (await asyncOptions()).overrides?.accessList,
327
+ gas: async () => (await asyncOptions()).overrides?.gas,
328
+ gasPrice: async () => (await asyncOptions()).overrides?.gasPrice,
329
+ maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas,
330
+ maxPriorityFeePerGas: async () =>
331
+ (await asyncOptions()).overrides?.maxPriorityFeePerGas,
332
+ nonce: async () => (await asyncOptions()).overrides?.nonce,
333
+ extraGas: async () => (await asyncOptions()).overrides?.extraGas,
334
+ erc20Value: async () => (await asyncOptions()).overrides?.erc20Value,
335
+ authorizationList: async () =>
336
+ (await asyncOptions()).overrides?.authorizationList,
337
337
  });
338
338
  }
@@ -26,22 +26,22 @@ export type ExecuteParams = WithOverrides<{
26
26
  export const FN_SELECTOR = "0x3f707e6b" as const;
27
27
  const FN_INPUTS = [
28
28
  {
29
+ type: "tuple[]",
30
+ name: "calls",
29
31
  components: [
30
32
  {
31
- name: "target",
32
33
  type: "address",
34
+ name: "target",
33
35
  },
34
36
  {
35
- name: "value",
36
37
  type: "uint256",
38
+ name: "value",
37
39
  },
38
40
  {
39
- name: "data",
40
41
  type: "bytes",
42
+ name: "data",
41
43
  },
42
44
  ],
43
- name: "calls",
44
- type: "tuple[]",
45
45
  },
46
46
  ] as const;
47
47
  const FN_OUTPUTS = [] as const;
@@ -137,23 +137,23 @@ export function execute(
137
137
  });
138
138
 
139
139
  return prepareContractCall({
140
- accessList: async () => (await asyncOptions()).overrides?.accessList,
141
- authorizationList: async () =>
142
- (await asyncOptions()).overrides?.authorizationList,
143
140
  contract: options.contract,
144
- erc20Value: async () => (await asyncOptions()).overrides?.erc20Value,
145
- extraGas: async () => (await asyncOptions()).overrides?.extraGas,
146
- gas: async () => (await asyncOptions()).overrides?.gas,
147
- gasPrice: async () => (await asyncOptions()).overrides?.gasPrice,
148
- maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas,
149
- maxPriorityFeePerGas: async () =>
150
- (await asyncOptions()).overrides?.maxPriorityFeePerGas,
151
141
  method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const,
152
- nonce: async () => (await asyncOptions()).overrides?.nonce,
153
142
  params: async () => {
154
143
  const resolvedOptions = await asyncOptions();
155
144
  return [resolvedOptions.calls] as const;
156
145
  },
157
146
  value: async () => (await asyncOptions()).overrides?.value,
147
+ accessList: async () => (await asyncOptions()).overrides?.accessList,
148
+ gas: async () => (await asyncOptions()).overrides?.gas,
149
+ gasPrice: async () => (await asyncOptions()).overrides?.gasPrice,
150
+ maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas,
151
+ maxPriorityFeePerGas: async () =>
152
+ (await asyncOptions()).overrides?.maxPriorityFeePerGas,
153
+ nonce: async () => (await asyncOptions()).overrides?.nonce,
154
+ extraGas: async () => (await asyncOptions()).overrides?.extraGas,
155
+ erc20Value: async () => (await asyncOptions()).overrides?.erc20Value,
156
+ authorizationList: async () =>
157
+ (await asyncOptions()).overrides?.authorizationList,
158
158
  });
159
159
  }
@@ -34,36 +34,36 @@ export type ExecuteWithSigParams = WithOverrides<{
34
34
  export const FN_SELECTOR = "0xba61557d" as const;
35
35
  const FN_INPUTS = [
36
36
  {
37
+ type: "tuple",
38
+ name: "wrappedCalls",
37
39
  components: [
38
40
  {
41
+ type: "tuple[]",
42
+ name: "calls",
39
43
  components: [
40
44
  {
41
- name: "target",
42
45
  type: "address",
46
+ name: "target",
43
47
  },
44
48
  {
45
- name: "value",
46
49
  type: "uint256",
50
+ name: "value",
47
51
  },
48
52
  {
49
- name: "data",
50
53
  type: "bytes",
54
+ name: "data",
51
55
  },
52
56
  ],
53
- name: "calls",
54
- type: "tuple[]",
55
57
  },
56
58
  {
57
- name: "uid",
58
59
  type: "bytes32",
60
+ name: "uid",
59
61
  },
60
62
  ],
61
- name: "wrappedCalls",
62
- type: "tuple",
63
63
  },
64
64
  {
65
- name: "signature",
66
65
  type: "bytes",
66
+ name: "signature",
67
67
  },
68
68
  ] as const;
69
69
  const FN_OUTPUTS = [] as const;
@@ -167,23 +167,23 @@ export function executeWithSig(
167
167
  });
168
168
 
169
169
  return prepareContractCall({
170
- accessList: async () => (await asyncOptions()).overrides?.accessList,
171
- authorizationList: async () =>
172
- (await asyncOptions()).overrides?.authorizationList,
173
170
  contract: options.contract,
174
- erc20Value: async () => (await asyncOptions()).overrides?.erc20Value,
175
- extraGas: async () => (await asyncOptions()).overrides?.extraGas,
176
- gas: async () => (await asyncOptions()).overrides?.gas,
177
- gasPrice: async () => (await asyncOptions()).overrides?.gasPrice,
178
- maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas,
179
- maxPriorityFeePerGas: async () =>
180
- (await asyncOptions()).overrides?.maxPriorityFeePerGas,
181
171
  method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const,
182
- nonce: async () => (await asyncOptions()).overrides?.nonce,
183
172
  params: async () => {
184
173
  const resolvedOptions = await asyncOptions();
185
174
  return [resolvedOptions.wrappedCalls, resolvedOptions.signature] as const;
186
175
  },
187
176
  value: async () => (await asyncOptions()).overrides?.value,
177
+ accessList: async () => (await asyncOptions()).overrides?.accessList,
178
+ gas: async () => (await asyncOptions()).overrides?.gas,
179
+ gasPrice: async () => (await asyncOptions()).overrides?.gasPrice,
180
+ maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas,
181
+ maxPriorityFeePerGas: async () =>
182
+ (await asyncOptions()).overrides?.maxPriorityFeePerGas,
183
+ nonce: async () => (await asyncOptions()).overrides?.nonce,
184
+ extraGas: async () => (await asyncOptions()).overrides?.extraGas,
185
+ erc20Value: async () => (await asyncOptions()).overrides?.erc20Value,
186
+ authorizationList: async () =>
187
+ (await asyncOptions()).overrides?.authorizationList,
188
188
  });
189
189
  }
@@ -75,7 +75,7 @@ describe.runIf(process.env.TW_SECRET_KEY)(
75
75
  events: [sessionCreatedEvent()],
76
76
  logs: receipt.logs,
77
77
  });
78
- expect(logs[0]?.args.signer).toBe(TEST_ACCOUNT_A.address);
78
+ expect(logs[0]?.args.newSigner).toBe(TEST_ACCOUNT_A.address);
79
79
  });
80
80
 
81
81
  it("should allow adding granular session keys", async () => {
@@ -124,9 +124,7 @@ describe.runIf(process.env.TW_SECRET_KEY)(
124
124
  events: [sessionCreatedEvent()],
125
125
  logs: receipt.logs,
126
126
  });
127
- expect(logs[0]?.args.signer).toBe(TEST_ACCOUNT_A.address);
128
- expect(logs[0]?.args.sessionSpec.callPolicies).toHaveLength(1);
129
- expect(logs[0]?.args.sessionSpec.transferPolicies).toHaveLength(1);
127
+ expect(logs[0]?.args.newSigner).toBe(TEST_ACCOUNT_A.address);
130
128
  });
131
129
  },
132
130
  );
@@ -242,7 +242,7 @@ function getGasStationUrl(chainId: 137 | 80002): string {
242
242
  case 137:
243
243
  return "https://gasstation.polygon.technology/v2";
244
244
  case 80002:
245
- return "https://gasstation-testnet.polygon.technology/v2";
245
+ return "https://gasstation.polygon.technology/amoy";
246
246
  }
247
247
  }
248
248
 
@@ -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 || ""}
@@ -28,7 +28,6 @@ import { WalletEntryButton } from "../WalletEntryButton.js";
28
28
  function AllWalletsUI(props: {
29
29
  onBack: () => void;
30
30
  onSelect: (wallet: Wallet) => void;
31
- specifiedWallets: Wallet[];
32
31
  size: "compact" | "wide";
33
32
  client: ThirdwebClient;
34
33
  recommendedWallets: Wallet[] | undefined;
@@ -39,17 +38,11 @@ function AllWalletsUI(props: {
39
38
  const setSelectionData = useSetSelectionData();
40
39
 
41
40
  const walletList = useMemo(() => {
42
- return walletInfos
43
- .filter((wallet) => {
44
- return (
45
- props.specifiedWallets.findIndex((x) => x.id === wallet.id) === -1
46
- );
47
- })
48
- .filter(
49
- (info) =>
50
- info.id !== "inApp" && info.id !== "embedded" && info.id !== "smart",
51
- );
52
- }, [props.specifiedWallets]);
41
+ return walletInfos.filter(
42
+ (info) =>
43
+ info.id !== "inApp" && info.id !== "embedded" && info.id !== "smart",
44
+ );
45
+ }, []);
53
46
 
54
47
  const fuseInstance = useMemo(() => {
55
48
  return new Fuse(walletList, {
@@ -173,7 +173,6 @@ export const ConnectModalContent = (props: {
173
173
  onSelect={setScreen}
174
174
  recommendedWallets={props.recommendedWallets}
175
175
  size={props.size}
176
- specifiedWallets={props.wallets}
177
176
  />
178
177
  </Suspense>
179
178
  );
@@ -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}
@@ -104,7 +104,6 @@ export function WalletAuth(props: {
104
104
  }}
105
105
  recommendedWallets={undefined}
106
106
  size={props.size}
107
- specifiedWallets={[]}
108
107
  />
109
108
  </Suspense>
110
109
  );
@@ -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";
1
+ export const version = "5.105.42-nightly-2d76cf904079cc74809f571b67ac746fad7aa04f-20250909000351";