@funkit/connect 8.3.1-next.0 → 8.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (111) hide show
  1. package/CHANGELOG.md +125 -0
  2. package/dist/{chunk-5JRQC2VM.js → chunk-4WY7FNYP.js} +14 -0
  3. package/dist/{chunk-CUWQELX3.js → chunk-UUHLEWAL.js} +4 -2
  4. package/dist/{chunk-VWSYBHAK.js → chunk-Z4QDKBBG.js} +4 -2
  5. package/dist/clients/fanatics.css +4064 -3651
  6. package/dist/clients/fanatics.d.ts +6 -0
  7. package/dist/clients/fanatics.js +118 -43
  8. package/dist/components/Box/Box.d.ts +45 -45
  9. package/dist/components/FunCheckoutHistory/FunDirectExecutionHistoryBottomBar.d.ts +1 -0
  10. package/dist/components/FunCheckoutHistory/FunTxSummarySections.d.ts +7 -0
  11. package/dist/components/FunCheckoutHistory/TotalTimeItem.d.ts +6 -0
  12. package/dist/components/FunCheckoutHistory/YouSendItem.d.ts +6 -0
  13. package/dist/components/FunCheckoutHistory/useCustomStatusAnimationAboveTopbar.d.ts +1 -3
  14. package/dist/components/FunCheckoutModalHeightAnimationWrapper/FunCheckoutModalHeightAnimationWrapper.d.ts +3 -1
  15. package/dist/components/FunInfoBanner/InfoBanner.d.ts +1 -1
  16. package/dist/components/FunPaymentMethodItem/FunPaymentMethodItem.d.ts +1 -0
  17. package/dist/components/FunPayments/FunPaymentMethods.d.ts +7 -0
  18. package/dist/components/Icons/New/CircleBitcoinIcon.d.ts +4 -0
  19. package/dist/components/Icons/New/DollarIcon.d.ts +3 -1
  20. package/dist/components/Tabs/Tabs.d.ts +1 -0
  21. package/dist/consts/customers.d.ts +1 -1
  22. package/dist/consts/layout.d.ts +0 -1
  23. package/dist/css/sprinkles.css.d.ts +91 -45
  24. package/dist/domains/asset.d.ts +1 -1
  25. package/dist/domains/meld.d.ts +0 -6
  26. package/dist/hooks/queries/useFops.d.ts +4 -2
  27. package/dist/hooks/queries/useSwappedDefaultCurrency.d.ts +5 -0
  28. package/dist/hooks/track/CheckoutModalEvent.d.ts +7 -0
  29. package/dist/hooks/useCheckoutDirectExecutionHistory.d.ts +1 -0
  30. package/dist/hooks/useStepQueryReadiness.d.ts +32 -0
  31. package/dist/index.css +4090 -3671
  32. package/dist/index.js +3894 -3058
  33. package/dist/modals/CheckoutModal/ConfirmationStep/useCheckoutConfirmation.d.ts +1 -0
  34. package/dist/modals/CheckoutModal/FunCheckoutStep.d.ts +2 -1
  35. package/dist/modals/CheckoutModal/LoadingAccount.d.ts +1 -1
  36. package/dist/modals/CheckoutModal/MeldQuotes/MeldQuotes.d.ts +1 -1
  37. package/dist/modals/CheckoutModal/SourceChange/CryptoCashToggle.d.ts +5 -1
  38. package/dist/modals/CheckoutModal/SourceChange/FormOfPaymentsList.d.ts +10 -0
  39. package/dist/modals/CheckoutModal/SourceChange/SourceChange.d.ts +10 -0
  40. package/dist/modals/CheckoutModal/SourceChange/SourceChangeLoading.d.ts +4 -0
  41. package/dist/modals/CheckoutModal/SourceChange/{DefaultSourceList.d.ts → SourceList.d.ts} +3 -3
  42. package/dist/modals/CheckoutModal/SourceChange/sourceChange.css.d.ts +2 -1
  43. package/dist/modals/CheckoutModal/stepTransition.d.ts +7 -0
  44. package/dist/providers/FunkitCheckoutContext/index.d.ts +1 -0
  45. package/dist/providers/FunkitConfigContext.d.ts +14 -0
  46. package/dist/providers/FunkitProvider.d.ts +1 -0
  47. package/dist/providers/FunkitThemeProvider.d.ts +69 -0
  48. package/dist/themes/baseTheme.js +1 -1
  49. package/dist/themes/darkTheme.js +2 -2
  50. package/dist/themes/lightTheme.js +2 -2
  51. package/dist/utils/across.d.ts +5 -0
  52. package/dist/utils/depositCutoff.d.ts +9 -0
  53. package/dist/utils/directExecution.d.ts +16 -0
  54. package/dist/utils/flags/config.d.ts +2 -2
  55. package/dist/utils/lighter.d.ts +1 -1
  56. package/dist/utils/sanitizeHtml.d.ts +7 -0
  57. package/dist/utils/sanitizeUrl.d.ts +10 -0
  58. package/dist/utils/tokenIconUrl.d.ts +1 -1
  59. package/dist/utils/transfer.d.ts +2 -1
  60. package/dist/wallets/walletConnectors/index.js +24 -24
  61. package/package.json +4 -4
  62. package/dist/atoms/activeCheckout.d.ts +0 -183
  63. package/dist/atoms/activeWithdrawal.d.ts +0 -21
  64. package/dist/atoms/bridgeProviders/acrossAdapter.d.ts +0 -109
  65. package/dist/atoms/bridgeProviders/index.d.ts +0 -25
  66. package/dist/atoms/bridgeProviders/registry.d.ts +0 -12
  67. package/dist/atoms/bridgeProviders/relayAdapter.d.ts +0 -60
  68. package/dist/atoms/bridgeProviders/types.d.ts +0 -182
  69. package/dist/atoms/checkoutProgress.d.ts +0 -22
  70. package/dist/atoms/directExecution.d.ts +0 -70
  71. package/dist/atoms/funkitCheckout.d.ts +0 -18
  72. package/dist/atoms/funkitProvider/index.d.ts +0 -24
  73. package/dist/atoms/generalWallet.d.ts +0 -45
  74. package/dist/atoms/i18n.d.ts +0 -6
  75. package/dist/atoms/modalState.d.ts +0 -30
  76. package/dist/atoms/quote.d.ts +0 -98
  77. package/dist/atoms/stepTransition.d.ts +0 -6
  78. package/dist/atoms/store.d.ts +0 -1
  79. package/dist/atoms/track/index.d.ts +0 -10
  80. package/dist/atoms/utils.d.ts +0 -2
  81. package/dist/atoms/wagmi.d.ts +0 -4
  82. package/dist/atoms/walletClient.d.ts +0 -15391
  83. package/dist/chunk-A24XIU2M.js +0 -299
  84. package/dist/chunk-CMS4F5PL.js +0 -209
  85. package/dist/chunk-FBCU3TQA.js +0 -204
  86. package/dist/chunk-GRQP5R23.js +0 -209
  87. package/dist/chunk-MGQZMUZ2.js +0 -288
  88. package/dist/chunk-OTMBU2BL.js +0 -204
  89. package/dist/domains/across.d.ts +0 -29
  90. package/dist/domains/track.d.ts +0 -14
  91. package/dist/hooks/useUsableWalletAssetsForCheckout.d.ts +0 -2
  92. package/dist/modals/CheckoutModal/SelectAsset.d.ts +0 -14
  93. package/dist/modals/CheckoutModal/SourceChange/FanaticsSourceList.d.ts +0 -15
  94. package/dist/wallets/walletConnectors/chunk-3ZWIUCOI.js +0 -96
  95. package/dist/wallets/walletConnectors/chunk-4SC3PZVM.js +0 -70
  96. package/dist/wallets/walletConnectors/chunk-5AV2NSL3.js +0 -98
  97. package/dist/wallets/walletConnectors/chunk-5FWURLPF.js +0 -218
  98. package/dist/wallets/walletConnectors/chunk-6677RKVT.js +0 -69
  99. package/dist/wallets/walletConnectors/chunk-75A4Q5E5.js +0 -92
  100. package/dist/wallets/walletConnectors/chunk-ENLR4LXN.js +0 -94
  101. package/dist/wallets/walletConnectors/chunk-FT5BX7TL.js +0 -103
  102. package/dist/wallets/walletConnectors/chunk-GEMN6DM5.js +0 -106
  103. package/dist/wallets/walletConnectors/chunk-GXTI2PZD.js +0 -100
  104. package/dist/wallets/walletConnectors/chunk-LGT6IAXI.js +0 -93
  105. package/dist/wallets/walletConnectors/chunk-N7475PGA.js +0 -110
  106. package/dist/wallets/walletConnectors/chunk-O6YFVGVQ.js +0 -99
  107. package/dist/wallets/walletConnectors/chunk-OCM5YHT5.js +0 -92
  108. package/dist/wallets/walletConnectors/chunk-PRGCIJ7Y.js +0 -87
  109. package/dist/wallets/walletConnectors/chunk-RNIMZDHW.js +0 -95
  110. package/dist/wallets/walletConnectors/chunk-TLOROKED.js +0 -96
  111. package/dist/wallets/walletConnectors/chunk-WNQ3NPHX.js +0 -66
@@ -1,10 +1,10 @@
1
1
  "use client";
2
- import {
3
- zealWallet
4
- } from "./chunk-VU2RNIQG.js";
5
2
  import {
6
3
  zerionWallet
7
4
  } from "./chunk-CZYUE3AR.js";
5
+ import {
6
+ trustWallet
7
+ } from "./chunk-JFHP4YJG.js";
8
8
  import {
9
9
  tahoWallet
10
10
  } from "./chunk-TNZJRXUQ.js";
@@ -18,20 +18,20 @@ import {
18
18
  tokenaryWallet
19
19
  } from "./chunk-M2HGGTFE.js";
20
20
  import {
21
- trustWallet
22
- } from "./chunk-JFHP4YJG.js";
21
+ walletConnectWallet
22
+ } from "./chunk-NP5QGWNL.js";
23
23
  import {
24
24
  uniswapWallet
25
25
  } from "./chunk-LH7BMNFZ.js";
26
- import {
27
- walletConnectWallet
28
- } from "./chunk-NP5QGWNL.js";
29
26
  import {
30
27
  xdefiWallet
31
28
  } from "./chunk-TMFH6GXS.js";
32
29
  import {
33
- rabbyWallet
34
- } from "./chunk-LW6S43RE.js";
30
+ zealWallet
31
+ } from "./chunk-VU2RNIQG.js";
32
+ import {
33
+ phantomWallet
34
+ } from "./chunk-3IYE623P.js";
35
35
  import {
36
36
  rainbowWallet
37
37
  } from "./chunk-77UTBHGP.js";
@@ -75,8 +75,8 @@ import {
75
75
  oneKeyWallet
76
76
  } from "./chunk-35Q4HKAM.js";
77
77
  import {
78
- phantomWallet
79
- } from "./chunk-3IYE623P.js";
78
+ rabbyWallet
79
+ } from "./chunk-LW6S43RE.js";
80
80
  import {
81
81
  foxWallet
82
82
  } from "./chunk-YLJDPTYF.js";
@@ -86,12 +86,12 @@ import {
86
86
  import {
87
87
  frontierWallet
88
88
  } from "./chunk-T5KHVUFR.js";
89
- import {
90
- imTokenWallet
91
- } from "./chunk-COZ7MIQS.js";
92
89
  import {
93
90
  gateWallet
94
91
  } from "./chunk-MRRZOQGZ.js";
92
+ import {
93
+ imTokenWallet
94
+ } from "./chunk-COZ7MIQS.js";
95
95
  import {
96
96
  injectedWallet
97
97
  } from "./chunk-MQSCN4BO.js";
@@ -101,9 +101,6 @@ import {
101
101
  import {
102
102
  ledgerWallet
103
103
  } from "./chunk-BRBKM4PW.js";
104
- import {
105
- bybitWallet
106
- } from "./chunk-5EAOMOTO.js";
107
104
  import {
108
105
  clvWallet
109
106
  } from "./chunk-HPHADOYD.js";
@@ -113,6 +110,9 @@ import {
113
110
  import {
114
111
  coinbaseWallet
115
112
  } from "./chunk-H4IRCEZN.js";
113
+ import {
114
+ bitskiWallet
115
+ } from "./chunk-YMUSFW44.js";
116
116
  import {
117
117
  coreWallet
118
118
  } from "./chunk-VYNVAGSV.js";
@@ -125,12 +125,12 @@ import {
125
125
  import {
126
126
  enkryptWallet
127
127
  } from "./chunk-ABQKUIUD.js";
128
- import {
129
- bifrostWallet
130
- } from "./chunk-R6Y36CMA.js";
131
128
  import {
132
129
  argentWallet
133
130
  } from "./chunk-WSQ2YJO2.js";
131
+ import {
132
+ bifrostWallet
133
+ } from "./chunk-R6Y36CMA.js";
134
134
  import {
135
135
  bitgetWallet
136
136
  } from "./chunk-FA5DTT5R.js";
@@ -140,13 +140,13 @@ import {
140
140
  import {
141
141
  bloomWallet
142
142
  } from "./chunk-S27IADFU.js";
143
- import "./chunk-23WIEY36.js";
144
143
  import {
145
144
  braveWallet
146
145
  } from "./chunk-4ZXII3UA.js";
147
146
  import {
148
- bitskiWallet
149
- } from "./chunk-YMUSFW44.js";
147
+ bybitWallet
148
+ } from "./chunk-5EAOMOTO.js";
149
+ import "./chunk-23WIEY36.js";
150
150
  import "./chunk-ARYAYQ7Z.js";
151
151
  export {
152
152
  argentWallet,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@funkit/connect",
3
- "version": "8.3.1-next.0",
3
+ "version": "8.4.0",
4
4
  "description": "Funkit Connect SDK elevates DeFi apps via web2 sign-ins and one-click checkouts.",
5
5
  "files": [
6
6
  "dist",
@@ -103,10 +103,10 @@
103
103
  "ua-parser-js": "^1.0.37",
104
104
  "use-debounce": "^10.0.5",
105
105
  "uuid": "^9.0.1",
106
- "@funkit/fun-relay": "2.4.1-next.0",
106
+ "@funkit/api-base": "2.2.0",
107
107
  "@funkit/chains": "1.1.0",
108
- "@funkit/api-base": "2.1.3",
109
- "@funkit/utils": "1.2.0"
108
+ "@funkit/fun-relay": "2.5.0",
109
+ "@funkit/utils": "1.2.1"
110
110
  },
111
111
  "repository": {
112
112
  "type": "git",
@@ -1,183 +0,0 @@
1
- import type { DynamicRoutePath } from '@funkit/fun-relay';
2
- import type { Address } from 'viem';
3
- import { type PaymentMethodInfo } from '../domains/paymentMethods';
4
- import type { FunkitCheckoutQuoteResult } from '../domains/quote';
5
- import type { AssetHoldingsItem } from '../domains/wallet';
6
- import type { TrackEventData } from '../hooks/track/useTrack';
7
- import type { FunkitActiveCheckoutItem, FunkitCheckoutActionParams, FunkitCheckoutConfig, UseFunkitCheckoutPropsWithFullConfig } from '../providers/FunkitCheckoutContext';
8
- import type { LoginType } from '../providers/GeneralWalletProvider';
9
- import type { WithdrawalClient } from '../wallets/Wallet';
10
- import type { FunkitDirectExecutionInfo } from './directExecution';
11
- /**
12
- * Write-only atom to set the checkout state.
13
- */
14
- export declare const setCheckoutAtom: import("jotai").WritableAtom<null, [value: FunkitActiveCheckoutItem | null], void> & {
15
- init: null;
16
- };
17
- /**
18
- * Read/write atom for the active checkout.
19
- */
20
- export declare const activeCheckoutAtom: import("jotai").WritableAtom<FunkitActiveCheckoutItem | null, [value: FunkitActiveCheckoutItem | null], void>;
21
- /**
22
- * Partial update atom for the active checkout.
23
- * Accepts either partial data or a function that receives current checkout and returns partial data.
24
- */
25
- export declare const updateCheckoutAtom: import("jotai").WritableAtom<null, [data: Partial<FunkitActiveCheckoutItem> | ((checkoutItem: FunkitActiveCheckoutItem) => Partial<FunkitActiveCheckoutItem>)], void> & {
26
- init: null;
27
- };
28
- /**
29
- * Updates the source asset of a given checkout.
30
- */
31
- export declare const updateSourceAssetAtom: import("jotai").WritableAtom<null, [selectedSource: Omit<AssetHoldingsItem, "amount" | "usdAmount">], void> & {
32
- init: null;
33
- };
34
- /**
35
- * Updates the target asset amount of a given checkout.
36
- * Uses flushSync internally to avoid stale data issues.
37
- */
38
- export declare const updateTargetAssetAmountAtom: import("jotai").WritableAtom<null, [newTargetAssetAmount: number], void> & {
39
- init: null;
40
- };
41
- /**
42
- * Updates the selected payment method info.
43
- */
44
- export declare const updateSelectedPaymentMethodInfoAtom: import("jotai").WritableAtom<null, [newInfo: PaymentMethodInfo], void> & {
45
- init: null;
46
- };
47
- /**
48
- * Resets the checkout state to initial (null).
49
- */
50
- export declare const resetCheckoutAtom: import("jotai").WritableAtom<null, [], void> & {
51
- init: null;
52
- };
53
- /**
54
- * Creates a new checkout object in the frontend. Not yet initialized in backend.
55
- * @returns The new checkoutId
56
- */
57
- export declare const initNewCheckoutAtom: import("jotai").WritableAtom<null, [props: UseFunkitCheckoutPropsWithFullConfig], string> & {
58
- init: null;
59
- };
60
- export declare const setCompletedTimestampAtom: import("jotai").WritableAtom<null, [timestampMs: number], void> & {
61
- init: null;
62
- };
63
- /**
64
- * Updates the target asset of a checkout.
65
- */
66
- export declare const updateTargetAssetAtom: import("jotai").WritableAtom<null, [asset: {
67
- targetAsset: Address;
68
- targetChain: string;
69
- targetAssetTicker: string;
70
- targetAssetMinAmount?: number;
71
- iconSrc: string | undefined;
72
- }], void> & {
73
- init: null;
74
- };
75
- /**
76
- * Applies dynamic routing configuration to the checkout.
77
- */
78
- export declare const applyDynamicRoutingAtom: import("jotai").WritableAtom<null, [path: Omit<DynamicRoutePath, "generateActionsParams" | "getCustomRecipient"> & {
79
- customRecipient?: FunkitCheckoutConfig["customRecipient"];
80
- generateActionsParams?: FunkitCheckoutConfig["generateActionsParams"];
81
- }], void> & {
82
- init: null;
83
- };
84
- /**
85
- * Updates the dynamic routing ID.
86
- */
87
- export declare const updateDynamicRoutingIdAtom: import("jotai").WritableAtom<null, [id: string], void> & {
88
- init: null;
89
- };
90
- /**
91
- * Updates the modal title meta.
92
- */
93
- export declare const updateModalTitleMetaAtom: import("jotai").WritableAtom<null, [newMeta: string], void> & {
94
- init: null;
95
- };
96
- /**
97
- * Updates the custom recipient address.
98
- */
99
- export declare const updateCustomRecipientAtom: import("jotai").WritableAtom<null, [recipient: `0x${string}`], void> & {
100
- init: null;
101
- };
102
- /**
103
- * Updates the withdrawal source asset amount.
104
- */
105
- export declare const updateWithdrawalSourceAssetAmountAtom: import("jotai").WritableAtom<null, [amount: number], void> & {
106
- init: null;
107
- };
108
- /**
109
- * Asserts that a checkout item exists, throws if null.
110
- */
111
- export declare function assertCheckoutItem(checkoutItem: FunkitActiveCheckoutItem | null): FunkitActiveCheckoutItem;
112
- /**
113
- * Mutation atom to cancel/deactivate a checkout using jotai-tanstack-query.
114
- * Use `mutateAsync` to get a promise that resolves to boolean indicating success.
115
- */
116
- export declare const cancelCheckoutAtom: import("jotai").Atom<import("jotai-tanstack-query").AtomWithMutationResult<boolean, unknown, `0x${string}`, unknown>>;
117
- export interface UDAParams {
118
- targetChain: string;
119
- targetAsset: Address;
120
- targetAssetTicker: string;
121
- iconSrc: string;
122
- qrcodeActionType?: string;
123
- defaultTokenSymbol?: string;
124
- defaultChainId?: string;
125
- }
126
- export interface StartDirectExecutionCheckoutParams {
127
- stepMessageSetter: (m: string) => void;
128
- latestQuote: FunkitCheckoutQuoteResult;
129
- sourceOfFund: string;
130
- clientMetadata: object;
131
- actionsParams: FunkitCheckoutActionParams[];
132
- withdrawalClient?: WithdrawalClient;
133
- isPaymentMethodBalance: boolean;
134
- directExecutionInfo: FunkitDirectExecutionInfo;
135
- userId: string;
136
- walletAddress: Address | '';
137
- udaParams?: UDAParams;
138
- logEvent: (event: TrackEventData) => void;
139
- refreshCheckoutHistory: () => void;
140
- setCheckoutProgress: (checkoutId: string, progress: {
141
- step: 1 | 2;
142
- }) => void;
143
- updateActiveCheckout: (update: Partial<FunkitActiveCheckoutItem>) => void;
144
- }
145
- export interface StartRegularCheckoutParams {
146
- stepMessageSetter: (m: string) => void;
147
- latestQuote: FunkitCheckoutQuoteResult;
148
- sourceOfFund: string;
149
- clientMetadata: object;
150
- refreshCheckoutHistory: () => void;
151
- updateActiveCheckout: (update: Partial<FunkitActiveCheckoutItem>) => void;
152
- }
153
- export interface ConfirmCheckoutParams {
154
- latestQuote: FunkitCheckoutQuoteResult;
155
- stepMessageSetter: (m: string) => void;
156
- withdrawalClient?: WithdrawalClient;
157
- getDirectExecutionInfo: (checkoutItem: FunkitActiveCheckoutItem | null) => FunkitDirectExecutionInfo;
158
- getWithdrawalDirectExecution: () => FunkitDirectExecutionInfo;
159
- loginType: LoginType;
160
- userId: string;
161
- walletAddress: Address | '';
162
- udaParams?: UDAParams;
163
- logEvent: (event: TrackEventData) => void;
164
- refreshCheckoutHistory: () => void;
165
- setCheckoutProgress: (checkoutId: string, progress: {
166
- step: 1 | 2;
167
- }) => void;
168
- updateActiveCheckout: (update: Partial<FunkitActiveCheckoutItem>) => void;
169
- }
170
- /**
171
- * Mutation atom to start a direct execution checkout.
172
- * Handles both account balance and other direct execution flows.
173
- */
174
- export declare const startDirectExecutionCheckoutAtom: import("jotai").Atom<import("jotai-tanstack-query").AtomWithMutationResult<`0x${string}`, unknown, StartDirectExecutionCheckoutParams, unknown>>;
175
- /**
176
- * Mutation atom to start a regular (non-direct-execution) checkout.
177
- */
178
- export declare const startRegularCheckoutAtom: import("jotai").Atom<import("jotai-tanstack-query").AtomWithMutationResult<`0x${string}`, unknown, StartRegularCheckoutParams, unknown>>;
179
- /**
180
- * Mutation atom to confirm and initialize a checkout.
181
- * Main entry point that coordinates checkout confirmation.
182
- */
183
- export declare const confirmCheckoutAtom: import("jotai").Atom<import("jotai-tanstack-query").AtomWithMutationResult<`0x${string}`, unknown, ConfirmCheckoutParams, unknown>>;
@@ -1,21 +0,0 @@
1
- import type { FunkitActiveWithdrawalItem, UseFunkitCheckoutPropsWithFullConfig } from '../providers/FunkitCheckoutContext';
2
- /**
3
- * Base atom holding the active withdrawal state.
4
- */
5
- export declare const withdrawalStateAtom: import("jotai").PrimitiveAtom<FunkitActiveWithdrawalItem | null> & {
6
- init: FunkitActiveWithdrawalItem | null;
7
- };
8
- /**
9
- * Write-only atom to set the withdrawal state.
10
- */
11
- export declare const setWithdrawalStateAtom: import("jotai").WritableAtom<null, [value: FunkitActiveWithdrawalItem | null], void> & {
12
- init: null;
13
- };
14
- /**
15
- * Creates a new withdrawal object in the frontend. Not yet initialized in backend.
16
- * Also creates a corresponding checkout item for the withdrawal flow.
17
- * @returns The new withdrawalId
18
- */
19
- export declare const initNewWithdrawalAtom: import("jotai").WritableAtom<null, [props: UseFunkitCheckoutPropsWithFullConfig, checkoutConfig: UseFunkitCheckoutPropsWithFullConfig], string> & {
20
- init: null;
21
- };
@@ -1,109 +0,0 @@
1
- import { type AcrossClient } from '@across-protocol/app-sdk';
2
- import { type Getter } from 'jotai';
3
- import type { Address, Hex } from 'viem';
4
- import type { BridgeExecutionParams, BridgeProviderAdapter, BridgeQuoteRequestParams, BridgeQuoteResult, SelectedRouteInfo } from './types';
5
- /**
6
- * Across quote metadata structure.
7
- * Contains provider-specific data from Across SDK.
8
- */
9
- export interface AcrossQuoteMetadata {
10
- /** The execution chain ID where the deposit transaction occurs */
11
- executionChainId?: number;
12
- /** Across swap quote from the SDK */
13
- acrossSwapQuote?: AcrossSwapQuote;
14
- }
15
- /**
16
- * Across swap quote data from the SDK.
17
- */
18
- export interface AcrossSwapQuote {
19
- /** Swap transaction details */
20
- swapTx?: {
21
- to: Address;
22
- value?: string;
23
- data: Hex;
24
- chainId: number;
25
- };
26
- /** Estimated fill time in seconds */
27
- expectedFillTime?: number;
28
- /** Input amount */
29
- inputAmount?: string;
30
- /** Output amount */
31
- expectedOutputAmount?: string;
32
- /** Approval transactions if needed */
33
- approvalTxns?: Array<{
34
- to: string;
35
- data: string;
36
- chainId: number;
37
- }>;
38
- }
39
- /**
40
- * Extended quote result with Across-specific metadata.
41
- */
42
- export interface AcrossQuote extends BridgeQuoteResult {
43
- metadata?: {
44
- acrossSwapQuote?: AcrossSwapQuote;
45
- };
46
- }
47
- /**
48
- * Atom holding the Across client instance.
49
- * Lazily created when first accessed.
50
- */
51
- export declare const acrossClientAtom: import("jotai").Atom<AcrossClient | null>;
52
- /**
53
- * Mutation atom for getting an Across quote using the SDK.
54
- *
55
- * @example
56
- * ```ts
57
- * const { mutateAsync: getQuote } = useAtomValue(acrossGetQuoteAtom)
58
- * const quote = await getQuote(params)
59
- * ```
60
- */
61
- export declare const acrossGetQuoteAtom: import("jotai").Atom<import("jotai-tanstack-query").AtomWithMutationResult<BridgeQuoteResult | null, unknown, BridgeQuoteRequestParams, unknown>>;
62
- /**
63
- * Mutation atom for executing an Across quote using the SDK.
64
- *
65
- * @example
66
- * ```ts
67
- * const { mutateAsync: execute } = useAtomValue(acrossExecuteAtom)
68
- * const txHash = await execute(params)
69
- * ```
70
- */
71
- export declare const acrossExecuteAtom: import("jotai").Atom<import("jotai-tanstack-query").AtomWithMutationResult<`0x${string}` | null, unknown, BridgeExecutionParams, unknown>>;
72
- /**
73
- * Derived atom for getting the selected route display info.
74
- * Reactively updates when quote or config changes.
75
- *
76
- * @example
77
- * ```ts
78
- * const selectedRoute = useAtomValue(acrossSelectedRouteAtom)
79
- * if (selectedRoute) {
80
- * console.log(selectedRoute.label, selectedRoute.isPassthrough)
81
- * }
82
- * ```
83
- */
84
- export declare const acrossSelectedRouteAtom: import("jotai").Atom<SelectedRouteInfo | null>;
85
- /**
86
- * Derived atom for estimated time from the latest quote.
87
- *
88
- * @example
89
- * ```ts
90
- * const estimatedTime = useAtomValue(acrossEstimatedTimeAtom)
91
- * ```
92
- */
93
- export declare const acrossEstimatedTimeAtom: import("jotai").Atom<number | null>;
94
- /**
95
- * Composed Across adapter atom that implements BridgeProviderAdapter.
96
- * Combines all individual atoms into a unified interface.
97
- *
98
- * @example
99
- * ```ts
100
- * const adapter = useAtomValue(acrossAdapterAtom)
101
- * const quote = await adapter.getQuote(params)
102
- * ```
103
- */
104
- export declare const acrossAdapterAtom: import("jotai").Atom<BridgeProviderAdapter>;
105
- /**
106
- * @deprecated Use `acrossAdapterAtom` instead.
107
- * Creates an Across bridge provider adapter.
108
- */
109
- export declare function createAcrossAdapter(get: Getter): BridgeProviderAdapter;
@@ -1,25 +0,0 @@
1
- /**
2
- * Bridge Provider Adapters
3
- *
4
- * This module provides a standardized interface for bridge providers
5
- * (Relay, Across, etc.) used in the wallet checkout flow.
6
- *
7
- * @example
8
- * ```ts
9
- * import {
10
- * relayAdapterAtom,
11
- * relaySelectedRouteAtom,
12
- * createProviderRegistry,
13
- * type BridgeProviderAdapter,
14
- * } from './bridgeProviders'
15
- *
16
- * // Use the composed adapter
17
- * const adapter = useAtomValue(relayAdapterAtom)
18
- *
19
- * // Or use individual atoms for reactive updates
20
- * const selectedRoute = useAtomValue(relaySelectedRouteAtom)
21
- * ```
22
- */
23
- export type { BridgeProviderAdapter, BridgeProviderRegistry, BridgeQuoteParams, BridgeQuoteExactInParams, BridgeQuoteExactOutParams, BridgeQuoteRequestParams, BridgeQuoteResult, BridgeExecutionParams, BridgeExecutionResult, ChainAsset, ProviderSelectionCriteria, RouteEligibilityParams, SelectedRouteInfo, } from './types';
24
- export { createProviderRegistry } from './registry';
25
- export { relayAdapterAtom, relayGetQuoteAtom, relayExecuteAtom, relaySelectedRouteAtom, relayEstimatedTimeAtom, createRelayAdapter, } from './relayAdapter';
@@ -1,12 +0,0 @@
1
- import type { BridgeProviderAdapter, BridgeProviderRegistry } from './types';
2
- /**
3
- * Creates a simple provider registry with default selection logic.
4
- *
5
- * Selection priority:
6
- * 1. Preferred provider (if specified and supports route)
7
- * 2. First provider that supports the route
8
- *
9
- * @param providers - Array of bridge provider adapters
10
- * @returns A provider registry
11
- */
12
- export declare function createProviderRegistry(providers: BridgeProviderAdapter[]): BridgeProviderRegistry;
@@ -1,60 +0,0 @@
1
- import { type Getter } from 'jotai';
2
- import type { BridgeExecutionParams, BridgeProviderAdapter, BridgeQuoteRequestParams, BridgeQuoteResult, SelectedRouteInfo } from './types';
3
- /**
4
- * Mutation atom for getting a Relay quote.
5
- *
6
- * @example
7
- * ```ts
8
- * const { mutateAsync: getQuote } = useAtomValue(relayGetQuoteAtom)
9
- * const quote = await getQuote(params)
10
- * ```
11
- */
12
- export declare const relayGetQuoteAtom: import("jotai").Atom<import("jotai-tanstack-query").AtomWithMutationResult<BridgeQuoteResult | null, unknown, BridgeQuoteRequestParams, unknown>>;
13
- /**
14
- * Mutation atom for executing a Relay quote.
15
- *
16
- * @example
17
- * ```ts
18
- * const { mutateAsync: execute } = useAtomValue(relayExecuteAtom)
19
- * const txHash = await execute(params)
20
- * ```
21
- */
22
- export declare const relayExecuteAtom: import("jotai").Atom<import("jotai-tanstack-query").AtomWithMutationResult<`0x${string}` | null, unknown, BridgeExecutionParams, unknown>>;
23
- /**
24
- * Derived atom for getting the selected route display info.
25
- * Reactively updates when quote or config changes.
26
- *
27
- * @example
28
- * ```ts
29
- * const selectedRoute = useAtomValue(relaySelectedRouteAtom)
30
- * if (selectedRoute) {
31
- * console.log(selectedRoute.label, selectedRoute.isPassthrough)
32
- * }
33
- * ```
34
- */
35
- export declare const relaySelectedRouteAtom: import("jotai").Atom<SelectedRouteInfo | null>;
36
- /**
37
- * Derived atom for estimated time from the latest quote.
38
- *
39
- * @example
40
- * ```ts
41
- * const estimatedTime = useAtomValue(relayEstimatedTimeAtom)
42
- * ```
43
- */
44
- export declare const relayEstimatedTimeAtom: import("jotai").Atom<number | null>;
45
- /**
46
- * Composed Relay adapter atom that implements BridgeProviderAdapter.
47
- * Combines all individual atoms into a unified interface.
48
- *
49
- * @example
50
- * ```ts
51
- * const adapter = useAtomValue(relayAdapterAtom)
52
- * const quote = await adapter.getQuote(params)
53
- * ```
54
- */
55
- export declare const relayAdapterAtom: import("jotai").Atom<BridgeProviderAdapter>;
56
- /**
57
- * @deprecated Use `relayAdapterAtom` instead.
58
- * Creates a Relay bridge provider adapter.
59
- */
60
- export declare function createRelayAdapter(get: Getter): BridgeProviderAdapter;