@mintmoney/react 0.1.0-alpha.32 → 0.1.0-alpha.34

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 (184) hide show
  1. package/dist/css/styles.css +41 -13
  2. package/dist/esm/api/generated.js +31 -0
  3. package/dist/esm/api/generated.js.map +1 -1
  4. package/dist/esm/api/index.js +1 -0
  5. package/dist/esm/api/index.js.map +1 -1
  6. package/dist/esm/api/payments.js +39 -0
  7. package/dist/esm/api/payments.js.map +1 -1
  8. package/dist/esm/checkout/index.js +22 -18
  9. package/dist/esm/checkout/index.js.map +1 -1
  10. package/dist/esm/checkout/modal.js +24 -4
  11. package/dist/esm/checkout/modal.js.map +1 -1
  12. package/dist/esm/checkout/providers/wagmi-config.js +108 -0
  13. package/dist/esm/checkout/providers/wagmi-config.js.map +1 -0
  14. package/dist/esm/checkout/providers/wallet-connect-resume.js +129 -0
  15. package/dist/esm/checkout/providers/wallet-connect-resume.js.map +1 -0
  16. package/dist/esm/checkout/resume-state.js +82 -0
  17. package/dist/esm/checkout/resume-state.js.map +1 -0
  18. package/dist/esm/checkout/surplus-refund.js +38 -0
  19. package/dist/esm/checkout/surplus-refund.js.map +1 -0
  20. package/dist/esm/checkout/views/back.js +2 -2
  21. package/dist/esm/checkout/views/back.js.map +1 -1
  22. package/dist/esm/checkout/views/crypto-intent/direct-details.js +941 -102
  23. package/dist/esm/checkout/views/crypto-intent/direct-details.js.map +1 -1
  24. package/dist/esm/checkout/views/crypto-intent/methods.js +153 -31
  25. package/dist/esm/checkout/views/crypto-intent/methods.js.map +1 -1
  26. package/dist/esm/checkout/views/crypto-intent/processing.js +51 -3
  27. package/dist/esm/checkout/views/crypto-intent/processing.js.map +1 -1
  28. package/dist/esm/checkout/views/crypto-intent/success.js +60 -9
  29. package/dist/esm/checkout/views/crypto-intent/success.js.map +1 -1
  30. package/dist/esm/checkout/views/crypto-intent/wallet-payment-options.js +848 -222
  31. package/dist/esm/checkout/views/crypto-intent/wallet-payment-options.js.map +1 -1
  32. package/dist/esm/checkout/views/crypto-intent/wallet-select.js +151 -20
  33. package/dist/esm/checkout/views/crypto-intent/wallet-select.js.map +1 -1
  34. package/dist/esm/checkout/views/failed.js +83 -1
  35. package/dist/esm/checkout/views/failed.js.map +1 -1
  36. package/dist/esm/checkout/views/initial.js +61 -6
  37. package/dist/esm/checkout/views/initial.js.map +1 -1
  38. package/dist/esm/checkout/views/method-select.js +16 -4
  39. package/dist/esm/checkout/views/method-select.js.map +1 -1
  40. package/dist/esm/checkout/views/restart.js +1 -1
  41. package/dist/esm/checkout/views/restart.js.map +1 -1
  42. package/dist/esm/components/buttons/index.js +4 -1
  43. package/dist/esm/components/buttons/index.js.map +1 -1
  44. package/dist/esm/components/icons/clock.js +4 -0
  45. package/dist/esm/components/icons/clock.js.map +1 -0
  46. package/dist/esm/components/icons/edit.js +6 -0
  47. package/dist/esm/components/icons/edit.js.map +1 -0
  48. package/dist/esm/components/icons/index.js +4 -0
  49. package/dist/esm/components/icons/index.js.map +1 -1
  50. package/dist/esm/components/icons/log-out.js +6 -0
  51. package/dist/esm/components/icons/log-out.js.map +1 -0
  52. package/dist/esm/components/icons/send.js +6 -0
  53. package/dist/esm/components/icons/send.js.map +1 -0
  54. package/dist/esm/components/index.js +1 -0
  55. package/dist/esm/components/index.js.map +1 -1
  56. package/dist/esm/components/modals/modal-with-views.js +5 -2
  57. package/dist/esm/components/modals/modal-with-views.js.map +1 -1
  58. package/dist/esm/components/modals/modal.js +1 -1
  59. package/dist/esm/components/modals/modal.js.map +1 -1
  60. package/dist/esm/components/modals/use-modal-with-views.js +0 -1
  61. package/dist/esm/components/modals/use-modal-with-views.js.map +1 -1
  62. package/dist/esm/components/quote-expiry/index.js +2 -0
  63. package/dist/esm/components/quote-expiry/index.js.map +1 -0
  64. package/dist/esm/components/quote-expiry/quote-expiry-countdown.js +35 -0
  65. package/dist/esm/components/quote-expiry/quote-expiry-countdown.js.map +1 -0
  66. package/dist/esm/components/quote-expiry/styles.js +109 -0
  67. package/dist/esm/components/quote-expiry/styles.js.map +1 -0
  68. package/dist/esm/components/quote-expiry/tiers.js +31 -0
  69. package/dist/esm/components/quote-expiry/tiers.js.map +1 -0
  70. package/dist/esm/components/wallet-selector/component.js +3 -5
  71. package/dist/esm/components/wallet-selector/component.js.map +1 -1
  72. package/dist/esm/components/wallet-selector/provider.js +1 -1
  73. package/dist/esm/components/wallet-selector/provider.js.map +1 -1
  74. package/dist/esm/components/wallet-selector/wallets/wagmi/index.js.map +1 -1
  75. package/dist/esm/config.js.map +1 -1
  76. package/dist/esm/index.js +2 -1
  77. package/dist/esm/index.js.map +1 -1
  78. package/dist/esm/integrations/lifi.js +52 -34
  79. package/dist/esm/integrations/lifi.js.map +1 -1
  80. package/dist/esm/refund/index.js +791 -0
  81. package/dist/esm/refund/index.js.map +1 -0
  82. package/dist/esm/state/checkout/payment-attempt.js +3 -0
  83. package/dist/esm/state/checkout/payment-attempt.js.map +1 -1
  84. package/dist/esm/state/checkout/payment-lifecycle.js +43 -35
  85. package/dist/esm/state/checkout/payment-lifecycle.js.map +1 -1
  86. package/dist/esm/state/checkout/store.js +318 -198
  87. package/dist/esm/state/checkout/store.js.map +1 -1
  88. package/dist/esm/state/checkout/wallet-payment-options.js +44 -0
  89. package/dist/esm/state/checkout/wallet-payment-options.js.map +1 -0
  90. package/dist/esm/themes/default.js +6 -0
  91. package/dist/esm/themes/default.js.map +1 -1
  92. package/dist/esm/utils/string.js +1 -0
  93. package/dist/esm/utils/string.js.map +1 -1
  94. package/dist/esm/utils/wallet-errors.js +15 -0
  95. package/dist/esm/utils/wallet-errors.js.map +1 -0
  96. package/dist/types/api/generated.d.ts +207 -4
  97. package/dist/types/api/generated.d.ts.map +1 -1
  98. package/dist/types/api/index.d.ts +2 -1
  99. package/dist/types/api/index.d.ts.map +1 -1
  100. package/dist/types/api/payments.d.ts +36 -1
  101. package/dist/types/api/payments.d.ts.map +1 -1
  102. package/dist/types/api/types.d.ts +4 -0
  103. package/dist/types/api/types.d.ts.map +1 -1
  104. package/dist/types/checkout/index.d.ts +4 -1
  105. package/dist/types/checkout/index.d.ts.map +1 -1
  106. package/dist/types/checkout/modal.d.ts.map +1 -1
  107. package/dist/types/checkout/providers/wagmi-config.d.ts +18 -0
  108. package/dist/types/checkout/providers/wagmi-config.d.ts.map +1 -0
  109. package/dist/types/checkout/providers/wallet-connect-resume.d.ts +9 -0
  110. package/dist/types/checkout/providers/wallet-connect-resume.d.ts.map +1 -0
  111. package/dist/types/checkout/resume-state.d.ts +13 -0
  112. package/dist/types/checkout/resume-state.d.ts.map +1 -0
  113. package/dist/types/checkout/surplus-refund.d.ts +10 -0
  114. package/dist/types/checkout/surplus-refund.d.ts.map +1 -0
  115. package/dist/types/checkout/views/back.d.ts +2 -1
  116. package/dist/types/checkout/views/back.d.ts.map +1 -1
  117. package/dist/types/checkout/views/crypto-intent/direct-details.d.ts +10 -1
  118. package/dist/types/checkout/views/crypto-intent/direct-details.d.ts.map +1 -1
  119. package/dist/types/checkout/views/crypto-intent/methods.d.ts.map +1 -1
  120. package/dist/types/checkout/views/crypto-intent/processing.d.ts.map +1 -1
  121. package/dist/types/checkout/views/crypto-intent/success.d.ts.map +1 -1
  122. package/dist/types/checkout/views/crypto-intent/wallet-payment-options.d.ts.map +1 -1
  123. package/dist/types/checkout/views/crypto-intent/wallet-select.d.ts.map +1 -1
  124. package/dist/types/checkout/views/failed.d.ts.map +1 -1
  125. package/dist/types/checkout/views/initial.d.ts +4 -0
  126. package/dist/types/checkout/views/initial.d.ts.map +1 -1
  127. package/dist/types/checkout/views/method-select.d.ts +2 -0
  128. package/dist/types/checkout/views/method-select.d.ts.map +1 -1
  129. package/dist/types/components/buttons/index.d.ts.map +1 -1
  130. package/dist/types/components/icons/clock.d.ts +6 -0
  131. package/dist/types/components/icons/clock.d.ts.map +1 -0
  132. package/dist/types/components/icons/edit.d.ts +6 -0
  133. package/dist/types/components/icons/edit.d.ts.map +1 -0
  134. package/dist/types/components/icons/index.d.ts +4 -0
  135. package/dist/types/components/icons/index.d.ts.map +1 -1
  136. package/dist/types/components/icons/log-out.d.ts +6 -0
  137. package/dist/types/components/icons/log-out.d.ts.map +1 -0
  138. package/dist/types/components/icons/send.d.ts +6 -0
  139. package/dist/types/components/icons/send.d.ts.map +1 -0
  140. package/dist/types/components/index.d.ts +1 -0
  141. package/dist/types/components/index.d.ts.map +1 -1
  142. package/dist/types/components/modals/modal-with-views.d.ts +1 -0
  143. package/dist/types/components/modals/modal-with-views.d.ts.map +1 -1
  144. package/dist/types/components/modals/modal.d.ts.map +1 -1
  145. package/dist/types/components/modals/use-modal-with-views.d.ts.map +1 -1
  146. package/dist/types/components/quote-expiry/index.d.ts +2 -0
  147. package/dist/types/components/quote-expiry/index.d.ts.map +1 -0
  148. package/dist/types/components/quote-expiry/quote-expiry-countdown.d.ts +15 -0
  149. package/dist/types/components/quote-expiry/quote-expiry-countdown.d.ts.map +1 -0
  150. package/dist/types/components/quote-expiry/styles.d.ts +22 -0
  151. package/dist/types/components/quote-expiry/styles.d.ts.map +1 -0
  152. package/dist/types/components/quote-expiry/tiers.d.ts +10 -0
  153. package/dist/types/components/quote-expiry/tiers.d.ts.map +1 -0
  154. package/dist/types/components/wallet-selector/component.d.ts +1 -2
  155. package/dist/types/components/wallet-selector/component.d.ts.map +1 -1
  156. package/dist/types/components/wallet-selector/domain.d.ts +3 -2
  157. package/dist/types/components/wallet-selector/domain.d.ts.map +1 -1
  158. package/dist/types/components/wallet-selector/provider.d.ts +3 -3
  159. package/dist/types/components/wallet-selector/provider.d.ts.map +1 -1
  160. package/dist/types/components/wallet-selector/wallets/wagmi/index.d.ts +41 -5
  161. package/dist/types/components/wallet-selector/wallets/wagmi/index.d.ts.map +1 -1
  162. package/dist/types/config.d.ts +3 -0
  163. package/dist/types/config.d.ts.map +1 -1
  164. package/dist/types/index.d.ts +2 -1
  165. package/dist/types/index.d.ts.map +1 -1
  166. package/dist/types/integrations/lifi.d.ts.map +1 -1
  167. package/dist/types/refund/index.d.ts +82 -0
  168. package/dist/types/refund/index.d.ts.map +1 -0
  169. package/dist/types/state/checkout/payment-attempt.d.ts.map +1 -1
  170. package/dist/types/state/checkout/payment-lifecycle.d.ts +27 -10
  171. package/dist/types/state/checkout/payment-lifecycle.d.ts.map +1 -1
  172. package/dist/types/state/checkout/store.d.ts +35 -16
  173. package/dist/types/state/checkout/store.d.ts.map +1 -1
  174. package/dist/types/state/checkout/wallet-payment-options.d.ts +24 -0
  175. package/dist/types/state/checkout/wallet-payment-options.d.ts.map +1 -0
  176. package/dist/types/themes/default.d.ts.map +1 -1
  177. package/dist/types/themes/types.d.ts +11 -0
  178. package/dist/types/themes/types.d.ts.map +1 -1
  179. package/dist/types/utils/string.d.ts +1 -0
  180. package/dist/types/utils/string.d.ts.map +1 -1
  181. package/dist/types/utils/wallet-errors.d.ts +2 -0
  182. package/dist/types/utils/wallet-errors.d.ts.map +1 -0
  183. package/package.json +25 -18
  184. package/LICENSE +0 -21
@@ -1,10 +1,10 @@
1
1
  import { Connector, Config } from "@wagmi/core";
2
2
  import { JsonRpcSigner } from "ethers";
3
3
  import React from "react";
4
- import type { Address, Transfer, WalletInterface } from "../../domain.js";
4
+ import type { Address, BaseUnitAmount, Transfer, WalletInterface } from "../../domain.js";
5
5
  import type { Account, Chain, Client, Transport } from "viem";
6
- export declare const transferNativeCoin: (wagmiConfig: Config, address: string, amount: number) => Promise<`0x${string}`>;
7
- export declare const transferCoins: (wagmiConfig: Config, address: string, amount: number, contractAddress: string, currency: string) => Promise<`0x${string}`>;
6
+ export declare const transferNativeCoin: (wagmiConfig: Config, address: string, amount: BaseUnitAmount) => Promise<`0x${string}`>;
7
+ export declare const transferCoins: (wagmiConfig: Config, address: string, amount: BaseUnitAmount, contractAddress: string, currency: string) => Promise<`0x${string}`>;
8
8
  export declare function clientToSigner(client: Client<Transport, Chain, Account>): JsonRpcSigner;
9
9
  export declare class WagmiWalletInterface implements WalletInterface {
10
10
  connector: Connector;
@@ -16,7 +16,7 @@ export declare class WagmiWalletInterface implements WalletInterface {
16
16
  connect(networkId?: number): Promise<`0x${string}`>;
17
17
  signMessage(message: string): Promise<`0x${string}`>;
18
18
  getAddress(): Promise<`0x${string}` | null>;
19
- approveTokenTransfer(amount: number, spenderAddress: string, currencyAddress: string): Promise<`0x${string}` | undefined>;
19
+ approveTokenTransfer(amount: BaseUnitAmount, spenderAddress: string, currencyAddress: string): Promise<`0x${string}` | undefined>;
20
20
  executeTransfer(transfer: Transfer): Promise<`0x${string}`>;
21
21
  switchChain(chainId: number): Promise<void>;
22
22
  getWalletClient(): Promise<{
@@ -29,6 +29,8 @@ export declare class WagmiWalletInterface implements WalletInterface {
29
29
  request?: (parameters: import("viem").CcipRequestParameters) => Promise<`0x${string}`>;
30
30
  } | undefined;
31
31
  chain: Chain;
32
+ dataSuffix?: import("viem").DataSuffix | undefined;
33
+ experimental_blockTag?: import("viem").BlockTag | undefined;
32
34
  key: string;
33
35
  name: string;
34
36
  pollingInterval: number;
@@ -83,6 +85,13 @@ export declare class WagmiWalletInterface implements WalletInterface {
83
85
  Method: "eth_estimateGas";
84
86
  Parameters: [transaction: import("viem").RpcTransactionRequest] | [transaction: import("viem").RpcTransactionRequest, block: import("viem").RpcBlockNumber | import("viem").BlockTag] | [transaction: import("viem").RpcTransactionRequest, block: import("viem").RpcBlockNumber | import("viem").BlockTag, stateOverride: import("viem").RpcStateOverride];
85
87
  ReturnType: import("viem").Quantity;
88
+ }, {
89
+ Method: "eth_fillTransaction";
90
+ Parameters: [transaction: import("viem").RpcTransactionRequest];
91
+ ReturnType: {
92
+ raw: import("viem").Hex;
93
+ tx: import("viem").RpcTransaction;
94
+ };
86
95
  }, {
87
96
  Method: "eth_feeHistory";
88
97
  Parameters: [blockCount: import("viem").Quantity, newestBlock: import("viem").RpcBlockNumber | import("viem").BlockTag, rewardPercentiles: number[] | undefined];
@@ -158,6 +167,10 @@ export declare class WagmiWalletInterface implements WalletInterface {
158
167
  Method: "eth_getTransactionByHash";
159
168
  Parameters: [hash: import("viem").Hash];
160
169
  ReturnType: import("viem").RpcTransaction | null;
170
+ }, {
171
+ Method: "eth_getTransactionBySenderAndNonce";
172
+ Parameters: [sender: import("viem").Address, nonce: import("viem").Quantity];
173
+ ReturnType: import("viem").RpcTransaction | null;
161
174
  }, {
162
175
  Method: "eth_getTransactionCount";
163
176
  Parameters: [address: import("viem").Address, block: import("viem").RpcBlockNumber | import("viem").BlockTag | import("viem").RpcBlockIdentifier];
@@ -211,6 +224,10 @@ export declare class WagmiWalletInterface implements WalletInterface {
211
224
  Method: "eth_sendRawTransaction";
212
225
  Parameters: [signedTransaction: import("viem").Hex];
213
226
  ReturnType: import("viem").Hash;
227
+ }, {
228
+ Method: "eth_sendRawTransactionSync";
229
+ Parameters: [signedTransaction: import("viem").Hex] | [signedTransaction: import("viem").Hex, timeout: number];
230
+ ReturnType: import("viem").RpcTransactionReceipt;
214
231
  }, {
215
232
  Method: "eth_simulateV1";
216
233
  Parameters: [{
@@ -252,6 +269,13 @@ export declare class WagmiWalletInterface implements WalletInterface {
252
269
  Method: "eth_estimateGas";
253
270
  Parameters: [transaction: import("viem").RpcTransactionRequest] | [transaction: import("viem").RpcTransactionRequest, block: import("viem").RpcBlockNumber | import("viem").BlockTag] | [transaction: import("viem").RpcTransactionRequest, block: import("viem").RpcBlockNumber | import("viem").BlockTag, stateOverride: import("viem").RpcStateOverride];
254
271
  ReturnType: import("viem").Quantity;
272
+ }, {
273
+ Method: "eth_fillTransaction";
274
+ Parameters: [transaction: import("viem").RpcTransactionRequest];
275
+ ReturnType: {
276
+ raw: import("viem").Hex;
277
+ tx: import("viem").RpcTransaction;
278
+ };
255
279
  }, {
256
280
  Method: "eth_requestAccounts";
257
281
  Parameters?: undefined;
@@ -264,6 +288,10 @@ export declare class WagmiWalletInterface implements WalletInterface {
264
288
  Method: "eth_sendRawTransaction";
265
289
  Parameters: [signedTransaction: import("viem").Hex];
266
290
  ReturnType: import("viem").Hash;
291
+ }, {
292
+ Method: "eth_sendRawTransactionSync";
293
+ Parameters: [signedTransaction: import("viem").Hex] | [signedTransaction: import("viem").Hex, timeout: number];
294
+ ReturnType: import("viem").RpcTransactionReceipt;
267
295
  }, {
268
296
  Method: "eth_sign";
269
297
  Parameters: [address: import("viem").Address, data: import("viem").Hex];
@@ -331,6 +359,10 @@ export declare class WagmiWalletInterface implements WalletInterface {
331
359
  Method: "wallet_disconnect";
332
360
  Parameters?: undefined;
333
361
  ReturnType: void;
362
+ }, {
363
+ Method: "wallet_getAssets";
364
+ Parameters?: [import("viem").WalletGetAssetsParameters];
365
+ ReturnType: import("viem").WalletGetAssetsReturnType;
334
366
  }, {
335
367
  Method: "wallet_getCallsStatus";
336
368
  Parameters?: [string];
@@ -444,6 +476,8 @@ export declare class WagmiWalletInterface implements WalletInterface {
444
476
  cacheTime?: undefined;
445
477
  ccipRead?: undefined;
446
478
  chain?: undefined;
479
+ dataSuffix?: undefined;
480
+ experimental_blockTag?: undefined;
447
481
  key?: undefined;
448
482
  name?: undefined;
449
483
  pollingInterval?: undefined;
@@ -451,13 +485,15 @@ export declare class WagmiWalletInterface implements WalletInterface {
451
485
  transport?: undefined;
452
486
  type?: undefined;
453
487
  uid?: undefined;
454
- } & import("viem").ExactPartial<Pick<import("viem").PublicActions<import("@wagmi/core").Transport<string, Record<string, any>, import("viem").EIP1193RequestFn>, Chain, Account>, "getChainId" | "call" | "createContractEventFilter" | "createEventFilter" | "estimateContractGas" | "estimateGas" | "getBlock" | "getBlockNumber" | "getContractEvents" | "getEnsText" | "getFilterChanges" | "getGasPrice" | "getLogs" | "getTransaction" | "getTransactionCount" | "getTransactionReceipt" | "prepareTransactionRequest" | "readContract" | "sendRawTransaction" | "simulateContract" | "uninstallFilter" | "watchBlockNumber" | "watchContractEvent"> & Pick<import("viem").WalletActions<Chain, Account>, "sendTransaction" | "writeContract">>>(fn: (client: Client<import("@wagmi/core").Transport<string, Record<string, any>, import("viem").EIP1193RequestFn>, Chain, Account, undefined, {
488
+ } & import("viem").ExactPartial<Pick<import("viem").PublicActions<import("@wagmi/core").Transport<string, Record<string, any>, import("viem").EIP1193RequestFn>, Chain, Account>, "prepareTransactionRequest" | "estimateGas" | "getChainId" | "call" | "createContractEventFilter" | "createEventFilter" | "estimateContractGas" | "getBlock" | "getBlockNumber" | "getContractEvents" | "getEnsText" | "getFilterChanges" | "getGasPrice" | "getLogs" | "getTransaction" | "getTransactionCount" | "getTransactionReceipt" | "readContract" | "sendRawTransaction" | "simulateContract" | "uninstallFilter" | "watchBlockNumber" | "watchContractEvent"> & Pick<import("viem").WalletActions<Chain, Account>, "sendTransaction" | "writeContract">>>(fn: (client: Client<import("@wagmi/core").Transport<string, Record<string, any>, import("viem").EIP1193RequestFn>, Chain, Account, undefined, {
455
489
  [x: string]: unknown;
456
490
  account?: undefined;
457
491
  batch?: undefined;
458
492
  cacheTime?: undefined;
459
493
  ccipRead?: undefined;
460
494
  chain?: undefined;
495
+ dataSuffix?: undefined;
496
+ experimental_blockTag?: undefined;
461
497
  key?: undefined;
462
498
  name?: undefined;
463
499
  pollingInterval?: undefined;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/components/wallet-selector/wallets/wagmi/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,SAAS,EAWT,MAAM,EACP,MAAM,aAAa,CAAC;AACrB,OAAO,EAAmB,aAAa,EAAE,MAAM,QAAQ,CAAC;AACxD,OAAO,KAAK,MAAM,OAAO,CAAC;AAS1B,OAAO,KAAK,EAAE,OAAO,EAAE,QAAQ,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAC1E,OAAO,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,MAAM,CAAC;AAE9D,eAAO,MAAM,kBAAkB,GAC7B,aAAa,MAAM,EACnB,SAAS,MAAM,EACf,QAAQ,MAAM,2BAiBZ,CAAC;AA8EL,eAAO,MA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AyD,CAAC;;;;;;;;;;;;;;;;;;;;;;;kCAAynE,CAAC;yBAA2D,CAAC;kCAA6F,CAAC;;sCAA2F,CAAC;8BAAqD,CAAC;0BAAiD,CAAC;;;;yBAA+K,CAAC;4BAA4B,CAAC;;;;wBAA6I,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2BAAm3oB,CAAC;;;;2BAAmJ,CAAC;;;;;;;;;uBAA+R,CAAC;2BAA8C,CAAC;;;;;4BAAyZ,CAAC;;;;;;gCAA2M,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;uBAA353C,CAAC;;wBAAsD,CAAC;;uBAAoE,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IA7Dt7J,UAAU,CAAC,OAAO,EAAE,OAAO,EAAE,YAAY,CAAC,EAAE,OAAO;;;;;IAcnD,SAAS;CAKhB;AAED,eAAO,MAAM,YAAY,GAErB,QAAQ,MAAM,EACd,cAAc;IACZ,kBAAkB,CAAC,EAAE,eAAe,EAAE,CAAC;IACvC,cAAc,CAAC,EAAE,MAAM,EAAE,CAAC;IAC1B,eAAe,CAAC,EAAE,MAAM,EAAE,CAAC;IAC3B,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,KAAK,CAAC,SAAS,CAAC,CAAC;CACjD,KACA,CAAC,MAAM,eAAe,EAAE,CA8B1B,CAAC"}
@@ -1,5 +1,6 @@
1
1
  import { Checkout, CryptoCurrency, CryptoPaymentAttempt, Payment, PaymentStatus } from "./api/types.js";
2
2
  import { ThemeConfig } from "./themes/types.js";
3
+ import type { SurplusRefundMinimum } from "./checkout/surplus-refund.js";
3
4
  export type WalletPaymentOption = {
4
5
  id: string;
5
6
  label: string;
@@ -67,6 +68,8 @@ export type WalletPaymentState = {
67
68
  export type CryptoCheckoutConfig = {
68
69
  numBlockConfirmations: number;
69
70
  paymentConfirmationStatus: PaymentStatus;
71
+ directPaymentSources?: CryptoCurrency[];
72
+ surplusRefundMinimums?: SurplusRefundMinimum[];
70
73
  };
71
74
  export type Config = {
72
75
  publicKey: string;
@@ -1 +1 @@
1
- {"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../src/config.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,QAAQ,EACR,cAAc,EACd,oBAAoB,EACpB,OAAO,EACP,aAAa,EACd,MAAM,gBAAgB,CAAC;AAExB,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAEhD,MAAM,MAAM,mBAAmB,GAAG;IAChC,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,SAAS,EAAE,MAAM,CAAC;IAClB,aAAa,EAAE,MAAM,CAAC;IACtB,SAAS,EAAE,MAAM,CAAC;IAClB,aAAa,EAAE,MAAM,CAAC;IACtB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,gBAAgB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACjC,gBAAgB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACjC,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,wBAAwB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACzC,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB,IAAI,EAAE,QAAQ,GAAG,MAAM,GAAG,QAAQ,CAAC;IACnC,GAAG,CAAC,EAAE,OAAO,CAAC;CACf,CAAC;AAEF,MAAM,MAAM,6BAA6B,GAAG;IAC1C,QAAQ,EAAE,QAAQ,CAAC;IACnB,OAAO,EA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,kBAAkB,GAAG,IAAI,CAAC;IACjC,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;CACtB,CAAC;AAEF,MAAM,MAAM,oBAAoB,GAAG;IACjC,qBAAqB,EAAE,MAAM,CAAC;IAC9B,yBAAyB,EAAE,aAAa,CAAC;IACzC,oBAAoB,CAAC,EAAE,cAAc,EAAE,CAAC;IACxC,qBAAqB,CAAC,EAAE,oBAAoB,EAAE,CAAC;CAChD,CAAC;AAEF,MAAM,MAAM,MAAM,GAAG;IACnB,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,MAAM,CAAC;IACnB,MAAM,EAAE,MAAM,CAAC;IACf,oBAAoB,EAAE,oBAAoB,CAAC;IAC3C,KAAK,EAAE,WAAW,CAAC;CACpB,CAAC;AAEF,KAAK,aAAa,GAAG;IACnB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,UAAU,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,OAAO,CAAC,WAAW,CAAC,CAAC;IAC7B,oBAAoB,CAAC,EAAE,oBAAoB,CAAC;CAC7C,CAAC;AAIF,eAAO,MAAM,YAAY,GACvB,WAAW,MAAM,EACjB,UAAU,aAAa,KACtB,MAiBF,CAAC"}
@@ -1,8 +1,9 @@
1
1
  export * from "./checkout/index.js";
2
2
  export * from "./components/index.js";
3
+ export * from "./refund/index.js";
3
4
  export * from "./api/index.js";
4
5
  export * from "./themes/index.js";
5
6
  export * from "./integrations/index.js";
6
- export { getPaymentById } from "./api/payments.js";
7
+ export { getPaymentById, getPaymentRefundStatus } from "./api/payments.js";
7
8
  export { createConfig } from "./config.js";
8
9
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,qBAAqB,CAAC;AACpC,cAAc,uBAAuB,CAAC;AACtC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,mBAAmB,CAAC;AAClC,cAAc,yBAAyB,CAAC;AACxC,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACnD,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,qBAAqB,CAAC;AACpC,cAAc,uBAAuB,CAAC;AACtC,cAAc,mBAAmB,CAAC;AAClC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,mBAAmB,CAAC;AAClC,cAAc,yBAAyB,CAAC;AACxC,OAAO,EAAE,cAAc,EAAE,sBAAsB,EAAE,MAAM,mBAAmB,CAAC;AAC3E,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"lifi.d.ts","sourceRoot":"","sources":["../../../src/integrations/lifi.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,eAAe,EAAE,MAAM,yCAAyC,CAAC;AAC1E,OAAO,EACL,oBAAoB,EACpB,6BAA6B,EAC7B,4BAA4B,EAC5B,mBAAmB,EACnB,kBAAkB,EACnB,MAAM,cAAc,CAAC;AA+GtB,wBAAsB,wBAAwB,CAC5C,OAAO,EAAE,6BAA6B,GACrC,OAAO,CAAC,mBAAmB,EAAE,CAAC,CA4ChC;AAED,wBAAsB,uBAAuB,CAAC,IAAI,EAAE;IAClD,MAAM,EAAE,mBAAmB,CAAC;IAC5B,OAAO,EAAE,oBAAoB,CAAC;CAC/B,GAAG,OAAO,CAAC,kBAAkB,CAAC,CAyF9B;AAED,wBAAsB,0BAA0B,CAAC,IAAI,EAAE;IACrD,MAAM,EAAE,mBAAmB,CAAC;IAC5B,MAAM,EAAE,eAAe,CAAC;IACxB,OAAO,EAAE,oBAAoB,CAAC;IAC9B,KAAK,CAAC,EAAE,kBAAkB,GAAG,IAAI,CAAC;CACnC,GAAG,OAAO,CAAC,4BAA4B,GAAG,IAAI,CAAC,CAyC/C"}
1
+ {"version":3,"file":"lifi.d.ts","sourceRoot":"","sources":["../../../src/integrations/lifi.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,eAAe,EAAE,MAAM,yCAAyC,CAAC;AAC1E,OAAO,EACL,oBAAoB,EACpB,6BAA6B,EAC7B,4BAA4B,EAC5B,mBAAmB,EACnB,kBAAkB,EACnB,MAAM,cAAc,CAAC;AA0HtB,wBAAsB,wBAAwB,CAC5C,OAAO,EAAE,6BAA6B,GACrC,OAAO,CAAC,mBAAmB,EAAE,CAAC,CA4ChC;AAED,wBAAsB,uBAAuB,CAAC,IAAI,EAAE;IAClD,MAAM,EAAE,mBAAmB,CAAC;IAC5B,OAAO,EAAE,oBAAoB,CAAC;CAC/B,GAAG,OAAO,CAAC,kBAAkB,CAAC,CA2G9B;AAED,wBAAsB,0BAA0B,CAAC,IAAI,EAAE;IACrD,MAAM,EAAE,mBAAmB,CAAC;IAC5B,MAAM,EAAE,eAAe,CAAC;IACxB,OAAO,EAAE,oBAAoB,CAAC;IAC9B,KAAK,CAAC,EAAE,kBAAkB,GAAG,IAAI,CAAC;CACnC,GAAG,OAAO,CAAC,4BAA4B,GAAG,IAAI,CAAC,CAqD/C"}
@@ -0,0 +1,82 @@
1
+ import { type Config as WagmiConfig } from "@wagmi/core";
2
+ import { type CheckoutWagmiConfig } from "../checkout/providers/wagmi-config.js";
3
+ import type { PaymentsCryptoPayRefundDetailData } from "../api/generated.js";
4
+ type RefundStatus = PaymentsCryptoPayRefundDetailData["data"];
5
+ type TronTransaction = {
6
+ txID?: string;
7
+ txid?: string;
8
+ transaction?: unknown;
9
+ result?: {
10
+ result?: boolean;
11
+ code?: string;
12
+ message?: string;
13
+ };
14
+ };
15
+ type TronBroadcast = {
16
+ result?: boolean;
17
+ txid?: string;
18
+ txID?: string;
19
+ code?: string;
20
+ message?: string;
21
+ };
22
+ type TronTransactionInfo = {
23
+ id?: string;
24
+ blockNumber?: number;
25
+ result?: "FAILED";
26
+ receipt?: {
27
+ result?: string;
28
+ };
29
+ contractResult?: string[];
30
+ resMessage?: string;
31
+ };
32
+ type TronWebLike = {
33
+ ready?: boolean;
34
+ defaultAddress?: {
35
+ base58?: string;
36
+ };
37
+ transactionBuilder: {
38
+ triggerSmartContract: (contractAddress: string, functionSelector: string, options: Record<string, unknown>, parameters: unknown[], issuerAddress: string) => Promise<TronTransaction>;
39
+ };
40
+ trx: {
41
+ sign: (transaction: unknown) => Promise<unknown>;
42
+ sendRawTransaction: (transaction: unknown) => Promise<TronBroadcast>;
43
+ getTransactionInfo?: (transactionHash: string) => Promise<TronTransactionInfo>;
44
+ };
45
+ };
46
+ type TronProviderLike = {
47
+ tronWeb?: TronWebLike | false;
48
+ request?: (args: {
49
+ method: string;
50
+ params?: unknown;
51
+ }) => Promise<unknown>;
52
+ disconnect?: () => Promise<void>;
53
+ };
54
+ declare global {
55
+ interface Window {
56
+ tron?: TronProviderLike;
57
+ tronLink?: TronProviderLike;
58
+ tronWeb?: TronWebLike;
59
+ }
60
+ }
61
+ export type RefundClaimProps = {
62
+ paymentId: string;
63
+ attemptId?: string;
64
+ apiUrl?: string;
65
+ className?: string;
66
+ };
67
+ export type RefundClaimPageProps = RefundClaimProps & {
68
+ logoSrc?: string;
69
+ wagmiConfig?: CheckoutWagmiConfig;
70
+ walletConnectProjectId?: string;
71
+ };
72
+ export type ClaimPaymentRefundResult = {
73
+ transactionHash: string;
74
+ };
75
+ export declare function claimPaymentRefund(refundStatus: RefundStatus, { address, wagmiConfig, }: {
76
+ address: string;
77
+ wagmiConfig: WagmiConfig;
78
+ }): Promise<ClaimPaymentRefundResult>;
79
+ export declare function RefundClaim({ paymentId, attemptId, apiUrl, className, }: RefundClaimProps): import("react/jsx-runtime").JSX.Element;
80
+ export declare function RefundClaimPage({ logoSrc, wagmiConfig, walletConnectProjectId, ...props }: RefundClaimPageProps): import("react/jsx-runtime").JSX.Element;
81
+ export {};
82
+ //# sourceMappingURL=index.d.ts.map
@@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AM,MAAM,oBAAoB,GAAG,gBAAgB,GAAG;IACpD,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,WAAW,CAAC,EAAE,mBAAmB,CAAC;IAClC,sBAAsB,CAAC,EAAE,MAAM,CAAC;CACjC,CAAC;AAEF,MAAM,MAAM,wBAAwB,GAAG;IACrC,eAAe,EAAE,MAAM,CAAC;CACzB,CAAC;AAkcF,wBAAsB,kBAAkB,CACtC,YAAY,EAAE,YAAY,EAC1B,EACE,OAAO,EACP,WAAW,GACZ,EAAE;IACD,OAAO,EAAE,MAAM,CAAC;IAChB,WAAW,EAAE,WAAW,CAAC;CAC1B,GACA,OAAO,CAAC,wBAAwB,CAAC,CA8CnC;AAuGD,wBAAgB,WAAW,CAAC,EAC1B,SAAS,EACT,SAAS,EACT,MAAM,EACN,SAAS,GACV,EAAE,gBAAgB,2CAyelB;AAED,wBAAgB,eAAe,CAAC,EAC9B,OAAqB,EACrB,WAAW,EACX,sBAAsB,EACtB,GAAG,KAAK,EACT,EAAE,oBAAoB,2CAgCtB"}
@@ -1 +1 @@
1
- {"version":3,"file":"payment-attempt.d.ts","sourceRoot":"","sources":["../../../../src/state/checkout/payment-attempt.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,8BAA8B,EAAE,MAAM,wBAAwB,CAAC;AAC7E,OAAO,KAAK,EAAE,mBAAmB,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AAE/E,wBAAgB,gCAAgC,CAAC,IAAI,EAAE;IACrD,MAAM,EAAE,mBAAmB,CAAC;IAC5B,cAAc,EAAE,MAAM,CAAC;IACvB,KAAK,CAAC,EAAE,kBAAkB,GAAG,IAAI,CAAC;IAClC,qBAAqB,CAAC,EAAE,MAAM,CAAC;CAChC,GAAG,8BAA8B,CA6CjC"}
1
+ {"version":3,"file":"payment-attempt.d.ts","sourceRoot":"","sources":["../../../../src/state/checkout/payment-attempt.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,8BAA8B,EAAE,MAAM,wBAAwB,CAAC;AAC7E,OAAO,KAAK,EAAE,mBAAmB,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AAE/E,wBAAgB,gCAAgC,CAAC,IAAI,EAAE;IACrD,MAAM,EAAE,mBAAmB,CAAC;IAC5B,cAAc,EAAE,MAAM,CAAC;IACvB,KAAK,CAAC,EAAE,kBAAkB,GAAG,IAAI,CAAC;IAClC,qBAAqB,CAAC,EAAE,MAAM,CAAC;CAChC,GAAG,8BAA8B,CAgDjC"}
@@ -1,20 +1,37 @@
1
1
  import { Payment, PaymentStatus } from "../../api/types.js";
2
2
  type AttemptLike = {
3
3
  expires_at?: string | null;
4
+ provider_expires_at?: string | null;
5
+ created_at?: string | null;
6
+ updated_at?: string | null;
4
7
  } | null;
5
- export type AttemptFreshnessStatus = "idle" | "fresh" | "stale";
6
- export declare const parseExpiryTime: (value?: string | null) => number | null;
7
- export declare const getAttemptExpiryTime: (attempt?: AttemptLike) => number | null;
8
- export declare const getAttemptRemainingMs: (attempt?: AttemptLike) => number | null;
9
- export declare const hasExpiredAttempt: (attempt?: AttemptLike) => boolean;
10
- export declare const isPaymentComplete: (payment?: Payment | null, confirmationStatus?: PaymentStatus | string) => boolean;
11
- export declare const isPaymentRetryable: (payment?: Payment | null) => boolean;
12
- export declare const canCreateFreshAttempt: (payment?: Payment | null) => boolean;
13
- export declare const getAttemptFreshnessStatus: (payment?: Payment | null, attempt?: AttemptLike) => {
14
- status: AttemptFreshnessStatus;
8
+ /**
9
+ * Earliest moment the current quote stops being payable — the sooner of the
10
+ * displayed window and any provider (e.g. Relay) window. `null` when the
11
+ * attempt carries no expiry at all.
12
+ */
13
+ export declare const getAttemptExpiry: (attempt?: AttemptLike) => number | null;
14
+ export declare const getAttemptQuoteTiming: (attempt?: AttemptLike) => {
15
15
  expiresAt: number | null;
16
16
  remainingMs: number | null;
17
+ totalDurationMs: number | null;
17
18
  };
19
+ /**
20
+ * A quote is stale once its address/route window has passed. Staleness is never
21
+ * terminal — it only means "fetch a fresh payable amount", so this answers
22
+ * whether we should refresh, nothing about failure.
23
+ */
24
+ export declare const isAttemptStale: (attempt?: AttemptLike) => boolean;
25
+ export declare const isPaymentSettled: (payment?: Payment | null) => boolean;
26
+ export declare const isPaymentProcessing: (payment?: Payment | null, confirmationStatus?: PaymentStatus | string) => boolean;
27
+ export declare const isPaymentFailed: (payment?: Payment | null) => boolean;
28
+ /**
29
+ * A fresh attempt can be issued whenever the payment is still open. The backend
30
+ * re-quotes and resets the window for an expired attempt, so neither the FX
31
+ * quote nor the attempt expiry is a wall — only a settled or in-flight payment
32
+ * is closed to new attempts.
33
+ */
34
+ export declare const canCreateFreshAttempt: (payment?: Payment | null) => boolean;
18
35
  export declare const formatRemainingTime: (remainingMs: number | null) => string | null;
19
36
  export {};
20
37
  //# sourceMappingURL=payment-lifecycle.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"payment-lifecycle.d.ts","sourceRoot":"","sources":["../../../../src/state/checkout/payment-lifecycle.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAE5D,KAAK,WAAW,GAAG;IACjB,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CAC5B,GAAG,IAAI,CAAC;AAET,MAAM,MAAM,sBAAsB,GAAG,MAAM,GAAG,OAAO,GAAG,OAAO,CAAC;AAEhE,eAAO,MAAM,eAAe,GAAI,QAAQ,MAAM,GAAG,IAAI,kBAIpD,CAAC;AAEF,eAAO,MAAM,oBAAoB,GAAI,UAAU,WAAW,kBAEzD,CAAC;AAEF,eAAO,MAAM,qBAAqB,GAAI,UAAU,WAAW,kBAI1D,CAAC;AAEF,eAAO,MAAM,iBAAiB,GAAI,UAAU,WAAW,YAGtD,CAAC;AAEF,eAAO,MAAM,iBAAiB,GAC5B,UAAU,OAAO,GAAG,IAAI,EACxB,qBAAqB,aAAa,GAAG,MAAM,YAO5C,CAAC;AAEF,eAA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,CAAC;AAEzC,eAAO,MAAM,mBAAmB,GAC9B,UAAU,OAAO,GAAG,IAAI,EACxB,qBAAoB,aAAa,GAAG,MAAyC,YAGvC,CAAC;AAEzC,eAAO,MAAM,eAAe,GAAI,UAAU,OAAO,GAAG,IAAI,YACd,CAAC;AAE3C;;;;;GAKG;AACH,eAAO,MAAM,qBAAqB,GAAI,UAAU,OAAO,GAAG,IAAI,YAM7D,CAAC;AAEF,eAAO,MAAM,mBAAmB,GAAI,aAAa,MAAM,GAAG,IAAI,kBAQ7D,CAAC"}
@@ -2,7 +2,6 @@ import { FiatPaymentMethod, FiatPaymentAttempt } from "../../api/payments.js";
2
2
  import { Checkout, CheckoutMethod, CryptoCurrency, Payment, CryptoPaymentAttempt, PaymentStatus } from "../../api/types.js";
3
3
  import { WalletInterface, Transfer } from "../../components/wallet-selector/domain.js";
4
4
  import { WalletPaymentOption, WalletPaymentQuote, WalletPaymentState } from "../../config.js";
5
- import { type AttemptFreshnessStatus } from "./payment-lifecycle.js";
6
5
  export declare enum ACTIONS {
7
6
  GET_CHECKOUT_CONFIG = "GET_CHECKOUT_CONFIG",
8
7
  GET_CRYPTO_CURRENCIES = "GET_CRYPTO_CURRENCIES",
@@ -26,15 +25,19 @@ interface PollingState {
26
25
  pollCount: number;
27
26
  lastPollTime: number | null;
28
27
  }
29
- interface AttemptFreshnessState {
30
- status: AttemptFreshnessStatus;
28
+ /**
29
+ * The payable-quote lifecycle a checkout view renders:
30
+ * - idle: no live quote yet (choosing a method / source / option)
31
+ * - ready: a fresh address/route is shown and payable
32
+ * - refreshing: fetching a fresh payable amount (the quote was stale or missing)
33
+ * - failed: the refresh could not complete — the payer can retry
34
+ */
35
+ interface QuoteState {
36
+ status: "idle" | "refreshing" | "ready" | "failed";
37
+ error: string | null;
31
38
  expiresAt: number | null;
32
39
  remainingMs: number | null;
33
- }
34
- interface AttemptRefreshState {
35
- mode: "none" | "manual" | "wallet";
36
- status: "idle" | "refreshing" | "failed";
37
- error: string | null;
40
+ totalDurationMs: number | null;
38
41
  }
39
42
  interface CheckoutState {
40
43
  checkoutId: string | null;
@@ -52,22 +55,39 @@ interface CheckoutState {
52
55
  processing: boolean;
53
56
  transfer: TransferState;
54
57
  polling: PollingState;
55
- attemptFreshness: AttemptFreshnessState;
56
- attemptRefresh: AttemptRefreshState;
58
+ quote: QuoteState;
57
59
  walletPayment: WalletPaymentState;
58
60
  }
59
61
  export declare const useCheckoutStore: import("zustand").UseBoundStore<Omit<import("zustand").StoreApi<CheckoutState>, "setState"> & {
60
62
  setState(nextStateOrUpdater: CheckoutState | Partial<CheckoutState> | ((state: import("immer").WritableDraft<CheckoutState>) => void), shouldReplace?: false): void;
61
63
  setState(nextStateOrUpdater: CheckoutState | ((state: import("immer").WritableDraft<CheckoutState>) => void), shouldReplace: true): void;
62
64
  }>;
63
- export declare const syncCheckoutAttemptFreshness: (payment: Payment | null, attempt?: CryptoPaymentAttempt | null) => void;
64
- export declare const configureWalletAttemptRefresh: (walletAddress: string | null) => void;
65
- export declare const configureManualAttemptRefresh: () => void;
66
- export declare const clearAttemptRefreshContext: () => void;
65
+ /**
66
+ * Fetch a fresh payable amount for the active flow. Driven both by the silent
67
+ * expiry timer and by the payer's explicit "Try again" — a stale or missing
68
+ * quote is always recoverable, never terminal.
69
+ */
70
+ export declare const refreshQuote: () => Promise<void>;
71
+ /**
72
+ * Re-sync the quote lifecycle whenever the payment snapshot or active attempt
73
+ * changes. A fresh attempt arms the expiry refresh timer; a stale or missing
74
+ * one triggers an immediate refresh. This is the only entrypoint used
75
+ * after loading a payment, creating an attempt, or configuring a refresh mode.
76
+ */
77
+ export declare const syncQuote: (payment: Payment | null, attempt?: CryptoPaymentAttempt | null) => void;
78
+ export declare const configureWalletQuoteRefresh: (walletAddress: string | null) => void;
79
+ export declare const prepareWalletQuoteReplacement: (walletAddress?: string | null) => void;
80
+ export declare const configureManualQuoteRefresh: () => void;
81
+ export declare const clearQuoteRefresh: (options?: {
82
+ preserveWalletAddress?: boolean;
83
+ }) => void;
67
84
  export declare const clearErrors: () => void;
68
85
  export declare const initialiseStore: (payment: Payment) => Promise<void>;
69
86
  export declare const createWalletOptionPaymentAttempt: (option: WalletPaymentOption, sendingAddress: string, quote?: WalletPaymentQuote | null) => Promise<CryptoPaymentAttempt>;
70
- export declare const createManualDirectPaymentAttempt: (sendingAddress?: string, confirmations?: number) => Promise<CryptoPaymentAttempt>;
87
+ export declare const createManualDirectPaymentAttempt: (sendingAddress?: string, confirmations?: number, refundTo?: string | null, options?: {
88
+ source?: Pick<CryptoCurrency, "asset" | "chain"> | null;
89
+ mode?: "wallet" | "relay_deposit";
90
+ }) => Promise<CryptoPaymentAttempt>;
71
91
  export declare const createSuccessfulTestPaymentAttempt: () => Promise<void>;
72
92
  export declare const createFailedTestPaymentAttempt: () => Promise<void>;
73
93
  export declare const createCheckoutFiatPaymentAttempt: (method: FiatPaymentMethod) => Promise<void>;
@@ -82,7 +102,6 @@ interface TransferWalletInterface {
82
102
  export declare const executeTransfer: (wallet: TransferWalletInterface) => Promise<string>;
83
103
  export declare const checkChainStatus: (wallet: WalletInterface) => Promise<void>;
84
104
  export declare const resetTransfer: () => void;
85
- export declare const executeConnectedWalletPayment: (wallet: WalletInterface) => Promise<void>;
86
105
  export declare const startPaymentPolling: (onPaymentStatusChange: (status: PaymentStatus) => void, confirmationStatus?: PaymentStatus) => {
87
106
  stop: () => void;
88
107
  };
@@ -1 +1 @@
1
- {"version":3,"file":"store.d.ts","sourceRoot":"","sources":["../../../../src/state/checkout/store.ts"],"names":[],"mappings":"AAKA,OAAO,EAML,iBAAiB,EACjB,kBAAkB,EACnB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EACL,QAAQ,EACR,cAAc,EACd,cAAc,EACd,OAAO,EACP,oBAAoB,EACpB,aAAa,EACd,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EACL,eAAe,EACf,QAAQ,EACT,MAAM,4CAA4C,CAAC;AAEpD,OAAO,EACL,mBAAmB,EACnB,kBA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AAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAAC;IAC1D,WAAW,CAAC,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CAC9C;AAED,eAAO,MAAM,eAAe,GAAU,QAAQ,uBAAuB,oBAmEpE,CAAC;AAEF,eAAO,MAAM,gBAAgB,GAAU,QAAQ,eAAe,kBAsD7D,CAAC;AAEF,eAAO,MAAM,aAAa,YASzB,CAAC;AAEF,eAAO,MAAM,mBAAmB,GAC9B,uBAAuB,CAAC,MAAM,EAAE,aAAa,KAAK,IAAI,EACtD,qBAAoB,aAAkC;;CAoEvD,CAAC;AAEF,eAAO,MAAM,kBAAkB,YAO9B,CAAC;AAEF,eAAO,MAAM,kBAAkB,YAuC9B,CAAC;AAEF,eAAO,MAAM,4BAA4B,YA+CxC,CAAC;AAEF,eAAO,MAAM,iBAAiB,GAAI,QAAQ,cAAc,SAIvD,CAAC;AAEF,eAAO,MAAM,aAAa,GAAI,YAAY,OAAO,SAIhD,CAAC;AAEF,eAAO,MAAM,aAAa,eAEzB,CAAC;AAEF,eAAO,MAAM,mBAAmB,GAAI,UAAU,cAAc,GAAG,IAAI,SAIlE,CAAC;AAEF,eAAO,MAAM,UAAU,QAAO,OAQ7B,CAAC;AAEF,eAAO,MAAM,qBAAqB,GAAI,QAAQ,OAAO,CAAC,kBAAkB,CAAC,SAIxE,CAAC;AAEF,eAAO,MAAM,uBAAuB,YAInC,CAAC"}
@@ -0,0 +1,24 @@
1
+ import type { WalletPaymentOption, WalletPaymentState } from "../../config.js";
2
+ export declare const NO_WALLET_PAYMENT_OPTIONS_TITLE = "No supported tokens here";
3
+ export declare const NO_WALLET_PAYMENT_OPTIONS_DESCRIPTION = "Try a different wallet or payment method.";
4
+ export declare function buildWalletPaymentOptionsReadyState(args: {
5
+ walletAddress: string;
6
+ options: WalletPaymentOption[];
7
+ }): Pick<WalletPaymentState, "status" | "walletAddress" | "options" | "selectedOptionId" | "error">;
8
+ export declare function buildWalletPaymentOptionsLoadKey(args: {
9
+ paymentId: string | null | undefined;
10
+ settlementChain: string | null | undefined;
11
+ settlementAsset: string | null | undefined;
12
+ walletAddress: string | null | undefined;
13
+ }): string | null;
14
+ export declare function buildWalletQuoteLoadKey(args: {
15
+ paymentId: string | null | undefined;
16
+ paymentAmount: string | number | null | undefined;
17
+ paymentCurrency: string | null | undefined;
18
+ paymentExpiresAt: string | null | undefined;
19
+ settlementChain: string | null | undefined;
20
+ settlementAsset: string | null | undefined;
21
+ walletAddress: string | null | undefined;
22
+ option: Pick<WalletPaymentOption, "id" | "kind" | "fromChain" | "fromToken"> | null;
23
+ }): string | null;
24
+ //# sourceMappingURL=wallet-payment-options.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"wallet-payment-options.d.ts","sourceRoot":"","sources":["../../../../src/state/checkout/wallet-payment-options.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AAE/E,eAAO,MAAM,+BAA+B,6BAA6B,CAAC;AAE1E,eAAO,MAAM,qCAAqC,8CACL,CAAC;AAE9C,wBAAgB,mCAAmC,CAAC,IAAI,EAAE;IACxD,aAAa,EAAE,MAAM,CAAC;IACtB,OAAO,EAAE,mBAAmB,EAAE,CAAC;CAChC,GAAG,IAAI,CACN,kBAAkB,EAClB,QAAQ,GAAG,eAAe,GAAG,SAAS,GAAG,kBAAkB,GAAG,OAAO,CACtE,CAQA;AAED,wBAAgB,gCAAgC,CAAC,IAAI,EAAE;IACrD,SAAS,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IACrC,eAAe,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IAC3C,eAAe,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IAC3C,aAAa,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;CAC1C,iBAgBA;AAED,wBAAgB,uBAAuB,CAAC,IAAI,EAAE;IAC5C,SAAS,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IACrC,aAAa,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IAClD,eAAe,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IAC3C,gBAAgB,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IAC5C,eAAe,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IAC3C,eAAe,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IAC3C,aAAa,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IACzC,MAAM,EAAE,IAAI,CACV,mBAAmB,EACnB,IAAI,GAAG,MAAM,GAAG,WAAW,GAAG,WAAW,CAC1C,GAAG,IAAI,CAAC;CACV,iBAkBA"}
@@ -1 +1 @@
1
- {"version":3,"file":"default.d.ts","sourceRoot":"","sources":["../../../src/themes/default.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAEjD,eAAO,MAAM,YAAY,EAAE,YAoG1B,CAAC"}
1
+ {"version":3,"file":"default.d.ts","sourceRoot":"","sources":["../../../src/themes/default.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAEjD,eAAO,MAAM,YAAY,EAAE,YA0G1B,CAAC"}
@@ -13,6 +13,16 @@ export type SvgIconOptions = {
13
13
  strokeColor: string;
14
14
  color: string;
15
15
  };
16
+ export type W3mThemeOptions = {
17
+ accent?: string;
18
+ colorMix?: string;
19
+ colorMixStrength?: number;
20
+ fontFamily?: string;
21
+ fontSizeMaster?: string;
22
+ borderRadiusMaster?: string;
23
+ zIndex?: number;
24
+ qrColor?: string;
25
+ };
16
26
  export type ThemeConfig = {
17
27
  font: {
18
28
  color: {
@@ -34,6 +44,7 @@ export type ThemeConfig = {
34
44
  link: SvgIconOptions;
35
45
  alert: SvgIconOptions;
36
46
  };
47
+ w3m?: W3mThemeOptions;
37
48
  };
38
49
  declare module "styled-components" {
39
50
  interface DefaultTheme extends ThemeConfig {
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/themes/types.ts"],"names":[],"mappings":"AAAA,OAAO,mBAAmB,CAAC;AAE3B,MAAM,MAAM,eAAe,GAAG;IAC5B,eAAe,EAAE,MAAM,CAAC;IACxB,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,EAAE,MAAM,CAAC;CACnB,CAAC;AAEF,MAAM,MAAM,UAAU,GAAG;IACvB,OAAO,EAAE,eAAe,CAAC;IACzB,KAAK,EAAE,eAAe,CAAC;IACvB,QAAQ,EAAE,eAAe,CAAC;CAC3B,CAAC;AAEF,MAAM,MAAM,cAAc,GAAG;IAC3B,WAAW,EAAE,MAAM,CAAC;IACpB,KAAK,EAAE,MAAM,CAAC;CACf,CAAC;AAEF,MAAM,MAAM,WAAW,GAAG;IACxB,IAAI,EAAE;QACJ,KAAK,EAAE;YACL,OAAO,EAAE,MAAM,CAAC;YAChB,SAAS,EAAE,MAAM,CAAC;YAClB,QAAQ,EAAE,MAAM,CAAC;SAClB,CAAC;KACH,CAAC;IACF,GAAG,EAAE;QACH,OAAO,EAAE,UAAU,CAAC;QACpB,SAAS,EAAE,UAAU,CAAC;QACtB,OAAO,EAAE,UAAU,CAAC;QACpB,KAAK,EAAE,UAAU,CAAC;KACnB,CAAC;IACF,IAAI,EAAE;QACJ,MAAM,EAAE,cAAc,CAAC;QACvB,KAAK,EAAE,cAAc,CAAC;QACtB,KAAK,EAAE,cAAc,CAAC;QACtB,IAAI,EAAE,cAAc,CAAC;QACrB,KAAK,EAAE,cAAc,CAAC;KACvB,CAAC;CACH,CAAC;AAGF,OAAO,QAAQ,mBAAmB,CAAC;IACjC,UAAU,YAAa,SAAQ,WAAW;KAAG;CAC9C"}
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/them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KAAK,EAAE,cAAc,CAAC;KACvB,CAAC;IACF,GAAG,CAAC,EAAE,eAAe,CAAC;CACvB,CAAC;AAGF,OAAO,QAAQ,mBAAmB,CAAC;IACjC,UAAU,YAAa,SAAQ,WAAW;KAAG;CAC9C"}
@@ -20,4 +20,5 @@
20
20
  * 1234.56 → 1234.56
21
21
  */
22
22
  export declare const formatAmountForDisplay: (amount: string) => string;
23
+ export declare const formatAddress: (address: string) => string;
23
24
  //# sourceMappingURL=string.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"string.d.ts","sourceRoot":"","sources":["../../../src/utils/string.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,eAAO,MAAM,sBAAsB,GAAI,QAAQ,MAAM,WAOpD,CAAC"}
1
+ {"version":3,"file":"string.d.ts","sourceRoot":"","sources":["../../../src/utils/string.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,eAAO,MAAM,sBAAsB,GAAI,QAAQ,MAAM,WAOpD,CAAC;AAEF,eAAO,MAAM,aAAa,GAAI,SAAS,MAAM,KAAG,MACC,CAAC"}
@@ -0,0 +1,2 @@
1
+ export declare const messageForWalletError: (error: unknown, fallback: string) => string;
2
+ //# sourceMappingURL=wallet-errors.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"wallet-errors.d.ts","sourceRoot":"","sources":["../../../src/utils/wallet-errors.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,qBAAqB,GAChC,OAAO,OAAO,EACd,UAAU,MAAM,KACf,MAgBF,CAAC"}