@funkit/connect 10.4.0 → 10.5.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 (71) hide show
  1. package/CHANGELOG.md +23 -0
  2. package/dist/clients/{chunk-APQYFP6X.js → chunk-A4WQS6QG.js} +1 -1
  3. package/dist/clients/{chunk-HOORQPSY.js → chunk-F6P4CN27.js} +24 -8
  4. package/dist/clients/{chunk-KNHO756P.js → chunk-FJ6GCMJ4.js} +1 -0
  5. package/dist/clients/{chunk-M6C7MBQN.js → chunk-QHS5N7GP.js} +2 -2
  6. package/dist/clients/{chunk-RCMAGKMG.js → chunk-WRS7AFM2.js} +1 -1
  7. package/dist/clients/fanatics.js +1 -1
  8. package/dist/clients/internal/nado/hooks.js +2 -2
  9. package/dist/clients/internal/nado/products.js +2 -2
  10. package/dist/clients/internal/nado/withdrawalConfig.d.ts +11 -0
  11. package/dist/clients/internal/nado/withdrawalConfig.js +17 -0
  12. package/dist/clients/internal/nado/withdrawalTypes.d.ts +30 -0
  13. package/dist/clients/internal/nado/withdrawalTypes.js +1 -0
  14. package/dist/clients/lighter.d.ts +1 -0
  15. package/dist/clients/lighter.js +88 -20
  16. package/dist/clients/mallard.js +2 -2
  17. package/dist/clients/polymarket/PolymarketDepositAccountDropdown.js +3 -3
  18. package/dist/clients/polymarket/index.js +3 -3
  19. package/dist/hooks/useCheckoutDirectExecutionHistory.d.ts +2 -1
  20. package/dist/index.d.ts +1 -1
  21. package/dist/index.js +1637 -1308
  22. package/dist/modals/WithdrawalModal/LighterWithdrawal.d.ts +46 -2
  23. package/dist/modals/WithdrawalModal/useFiatWithdrawal.d.ts +1 -1
  24. package/dist/modals/WithdrawalModal/useWithdrawal.d.ts +3 -15
  25. package/dist/providers/FunkitCheckoutContext/types.d.ts +42 -4
  26. package/dist/providers/FunkitConfigContext.d.ts +7 -0
  27. package/dist/providers/GeneralWalletProvider.d.ts +1 -4
  28. package/dist/utils/lighter.d.ts +68 -1
  29. package/dist/utils/purifyCheckoutHistoryItem.d.ts +2 -41
  30. package/dist/utils/swapped.d.ts +1 -1
  31. package/dist/utils/userInfo.d.ts +8 -0
  32. package/dist/utils/withdrawal.d.ts +2 -1
  33. package/dist/wagmi/actions.d.ts +1 -1
  34. package/dist/wallets/walletConnectors/bifrostWallet/bifrostWallet.js +2 -2
  35. package/dist/wallets/walletConnectors/bitgetWallet/bitgetWallet.js +2 -2
  36. package/dist/wallets/walletConnectors/bybitWallet/bybitWallet.js +2 -2
  37. package/dist/wallets/walletConnectors/clvWallet/clvWallet.js +2 -2
  38. package/dist/wallets/walletConnectors/coin98Wallet/coin98Wallet.js +2 -2
  39. package/dist/wallets/walletConnectors/coreWallet/coreWallet.js +2 -2
  40. package/dist/wallets/walletConnectors/foxWallet/foxWallet.js +2 -2
  41. package/dist/wallets/walletConnectors/frontierWallet/frontierWallet.js +2 -2
  42. package/dist/wallets/walletConnectors/gateWallet/gateWallet.js +2 -2
  43. package/dist/wallets/walletConnectors/index.js +39 -39
  44. package/dist/wallets/walletConnectors/metaMaskWallet/metaMaskWallet.js +2 -2
  45. package/dist/wallets/walletConnectors/okxWallet/okxWallet.js +2 -2
  46. package/dist/wallets/walletConnectors/rainbowWallet/rainbowWallet.js +2 -2
  47. package/dist/wallets/walletConnectors/roninWallet/roninWallet.js +2 -2
  48. package/dist/wallets/walletConnectors/safepalWallet/safepalWallet.js +2 -2
  49. package/dist/wallets/walletConnectors/subWallet/subWallet.js +2 -2
  50. package/dist/wallets/walletConnectors/tokenPocketWallet/tokenPocketWallet.js +2 -2
  51. package/dist/wallets/walletConnectors/trustWallet/trustWallet.js +2 -2
  52. package/dist/wallets/walletConnectors/zerionWallet/zerionWallet.js +2 -2
  53. package/package.json +2 -2
  54. package/dist/wallets/walletConnectors/{chunk-W2LCLDPX.js → chunk-2VP2F6EK.js} +3 -3
  55. package/dist/wallets/walletConnectors/{chunk-IULPZP2Q.js → chunk-4T6ZSRJF.js} +3 -3
  56. package/dist/wallets/walletConnectors/{chunk-WAHGI5L7.js → chunk-6BW3HLBG.js} +3 -3
  57. package/dist/wallets/walletConnectors/{chunk-YO2K4MBH.js → chunk-CCQV2ZET.js} +3 -3
  58. package/dist/wallets/walletConnectors/{chunk-TKB2OY6G.js → chunk-CPI4TD43.js} +3 -3
  59. package/dist/wallets/walletConnectors/{chunk-OX37G4YT.js → chunk-F5XEEVG6.js} +3 -3
  60. package/dist/wallets/walletConnectors/{chunk-JPN6TWIT.js → chunk-HNRB7KJU.js} +3 -3
  61. package/dist/wallets/walletConnectors/{chunk-WKNQMP4A.js → chunk-HTHAK6XB.js} +3 -3
  62. package/dist/wallets/walletConnectors/{chunk-GUQM4QSL.js → chunk-MIQTHJ6X.js} +3 -3
  63. package/dist/wallets/walletConnectors/{chunk-4NV5BYRP.js → chunk-RB3HR4R2.js} +3 -3
  64. package/dist/wallets/walletConnectors/{chunk-SWFF3TWJ.js → chunk-RVOY537T.js} +3 -3
  65. package/dist/wallets/walletConnectors/{chunk-KI5Y2BBF.js → chunk-STVVP43G.js} +3 -3
  66. package/dist/wallets/walletConnectors/{chunk-OEEGYENV.js → chunk-UK7C2JXW.js} +3 -3
  67. package/dist/wallets/walletConnectors/{chunk-YQFGVZGR.js → chunk-VAPGUPHO.js} +3 -3
  68. package/dist/wallets/walletConnectors/{chunk-XCNHV3HS.js → chunk-VTM6EECM.js} +3 -3
  69. package/dist/wallets/walletConnectors/{chunk-NR2OGDHQ.js → chunk-X6CGV36L.js} +3 -3
  70. package/dist/wallets/walletConnectors/{chunk-AVDUNQUW.js → chunk-YEZM4CK4.js} +3 -3
  71. package/dist/wallets/walletConnectors/{chunk-KCRO2AGO.js → chunk-ZNX4EMPB.js} +3 -3
@@ -3,9 +3,10 @@
3
3
  *
4
4
  * Extracted from WithdrawalContent.tsx to keep Lighter-specific logic isolated.
5
5
  */
6
- import type { LighterAccountIndex } from '@funkit/api-base';
6
+ import { type LighterAccountIndex } from '@funkit/api-base';
7
7
  import React from 'react';
8
- import type { Address } from 'viem';
8
+ import { type Address, type Hex } from 'viem';
9
+ import { type CheckoutConfirmationError } from '../../domains/checkoutErrors';
9
10
  import type { CustomWithdrawalConfig, LighterRouteType, WalletWithdrawalConfig } from '../../providers/FunkitCheckoutContext';
10
11
  import type { LighterShare } from '../../utils/customer';
11
12
  import type { SourceTokenOption } from './WithdrawAmountInput';
@@ -142,6 +143,42 @@ export declare function useLighterWithdrawal(config: FunkitWithdrawalConfig, set
142
143
  lighterFastUnstakedFee: number;
143
144
  invalidateLighterAccount: () => void;
144
145
  };
146
+ /**
147
+ * Lighter Secure L1 on-chain withdrawal fallback.
148
+ *
149
+ * When the gasless L2 withdraw is rate-limited (error 23004), the user can
150
+ * withdraw directly on-chain via `zkLighter.withdraw`. This is a distinct,
151
+ * gas-paying, wallet-signed path — offered explicitly, never automatic.
152
+ *
153
+ * Availability latches on the first rate-limit error (the transient
154
+ * `withdrawalError` auto-clears after ~10s) and resets when the user edits the
155
+ * amount or source token, so a fresh attempt can retry the L2 path.
156
+ */
157
+ export declare function useLighterL1Fallback({ isLighterSecure, withdrawalError, connectedAddress, resetKey, }: {
158
+ isLighterSecure: boolean;
159
+ withdrawalError: CheckoutConfirmationError | null;
160
+ connectedAddress: Address | undefined;
161
+ /** Changes when the user edits amount/token — resets the latched offer. */
162
+ resetKey: string;
163
+ }): {
164
+ isL1FallbackAvailable: boolean;
165
+ submitL1Withdrawal: ({ assetIndex, routeType, amountTokenUnits, recipientAddr, tokenSymbol, mainnetTokenAddress, withdrawalUSD, onConfirmed, }: {
166
+ assetIndex: number;
167
+ routeType: LighterRouteType;
168
+ amountTokenUnits: string;
169
+ /** Connected wallet — L1 owner of the Lighter account (tracking userId). */
170
+ recipientAddr: Address;
171
+ /** Source-token symbol (may carry a ` (Spot)` suffix) — for tracking. */
172
+ tokenSymbol: string;
173
+ /** Mainnet ERC-20 the withdrawal lands as. */
174
+ mainnetTokenAddress: Address;
175
+ /** USD value (token amount × spot) — for tracking attribution. */
176
+ withdrawalUSD: string;
177
+ onConfirmed: (txHash: Hex) => void;
178
+ }) => Promise<void>;
179
+ isSubmittingL1: boolean;
180
+ l1FallbackError: CheckoutConfirmationError | null;
181
+ };
145
182
  /**
146
183
  * Resolves the source-token dropdown options for a Lighter customer.
147
184
  * Returns `undefined` for non-Lighter customers (no dropdown needed).
@@ -172,6 +209,13 @@ export declare function LighterSecureReceiveAmountValue({ amount, tokenSymbol: r
172
209
  amount: string;
173
210
  tokenSymbol: string;
174
211
  }): React.JSX.Element;
212
+ /**
213
+ * Lighter Secure: immediate success screen (no loading spinner).
214
+ *
215
+ * Unlike the standard `PendingSuccessScreen` that polls for relay status,
216
+ * Lighter Secure calls Lighter's API directly and runs outside of the
217
+ * FunKit relay system. This component shows an immediate success state.
218
+ */
175
219
  export declare function LighterSecureWithdrawalSuccess({ onClose, onNewWithdrawal, amount, tokenSymbol: rawTokenSymbol, txHash, }: {
176
220
  onClose: () => void;
177
221
  onNewWithdrawal: () => void;
@@ -1,4 +1,4 @@
1
- import { type Address } from 'viem';
1
+ import type { Address } from 'viem';
2
2
  import { type CustomWithdrawalConfig, type FunkitActiveWithdrawalItem, type WalletWithdrawalConfig } from '../../providers/FunkitCheckoutContext';
3
3
  /**
4
4
  * Provider-agnostic fiat off-ramp order: deliver `amount` of the accepted
@@ -1,27 +1,15 @@
1
- import type { Address, Hex } from 'viem';
1
+ import type { Hex } from 'viem';
2
2
  import { type CheckoutConfirmationError } from '../../domains/checkoutErrors';
3
- import type { FunkitCheckoutQuoteResult } from '../../domains/quote';
4
- import { type FunkitActiveWithdrawalItem, type FunkitWithdrawalConfig, type WithdrawalCustomerData } from '../../providers/FunkitCheckoutContext';
3
+ import { type FunkitActiveWithdrawalItem, type FunkitWithdrawalConfig, type WithdrawalFormData } from '../../providers/FunkitCheckoutContext';
5
4
  interface UseWithdrawalResult {
6
5
  handleWithdrawal: (withdrawal: WithdrawalFormData) => Promise<Hex | null>;
7
6
  isWithdrawing: boolean;
8
7
  withdrawalError: CheckoutConfirmationError | null;
9
8
  stepMessage: string | null;
10
9
  }
11
- export type WithdrawalFormData = {
12
- destinationAddress: Address;
13
- withdrawalUSD: string;
14
- tokenSymbol: string;
15
- tokenAddress: Address;
16
- chainId: number;
17
- quote?: FunkitCheckoutQuoteResult;
18
- /** Customer-specific data for quoteless flows (e.g. Lighter Secure). */
19
- customerData?: WithdrawalCustomerData;
20
- userInputAmount: string;
21
- };
10
+ export type { WithdrawalFormData };
22
11
  export declare function useWithdrawal({ config, withdrawalItem, onSuccess, }: {
23
12
  config: FunkitWithdrawalConfig;
24
13
  withdrawalItem: FunkitActiveWithdrawalItem | null;
25
14
  onSuccess?: (withdrawal: WithdrawalFormData, txHash: Hex) => void;
26
15
  }): UseWithdrawalResult;
27
- export {};
@@ -2,6 +2,7 @@ import type { FunAddress } from '@funkit/api-base';
2
2
  import type { ApiCheckoutClientMetadata, ApiFunkitCheckoutActionParams, ApiFunkitCheckoutConfig } from '@funkit/utils';
3
3
  import type { ReactNode } from 'react';
4
4
  import type { Address } from 'viem';
5
+ import type { NadoWithdrawalCustomerConfig, NadoWithdrawalCustomerData } from '../../clients/internal/nado/withdrawalTypes';
5
6
  import type { PaymentMethodInfo } from '../../domains/paymentMethods';
6
7
  import type { CheckoutBlockedReason } from '../../modals/CheckoutModal/CheckoutBlockedReason';
7
8
  import type { WithdrawalClient, WithdrawalTransaction } from '../../wallets/Wallet';
@@ -280,6 +281,12 @@ export interface CustomWithdrawalConfig extends WithdrawalConfigBase {
280
281
  * success screen can display and link to the transaction.
281
282
  */
282
283
  withdrawCallback: (param: WithdrawalParam) => Promise<undefined | string>;
284
+ /**
285
+ * Config-level customer-specific data, discriminated by `customerName`.
286
+ * Populated by a client hook (e.g. `use{Customer}WithdrawalConfig`), not hand-set —
287
+ * the `customerConfig` counterpart to the per-submission {@link WithdrawalCustomerData}.
288
+ */
289
+ customerConfig?: WithdrawalCustomerConfig;
283
290
  }
284
291
  /** Lighter L2 route type: 0 = perps (USDC collateral), 1 = spot. */
285
292
  export type LighterRouteType = 0 | 1;
@@ -298,7 +305,13 @@ export interface LighterWithdrawalCustomerData {
298
305
  * by `customerName` so future customers extend the union instead of adding
299
306
  * top-level params.
300
307
  */
301
- export type WithdrawalCustomerData = LighterWithdrawalCustomerData;
308
+ export type WithdrawalCustomerData = LighterWithdrawalCustomerData | NadoWithdrawalCustomerData;
309
+ /**
310
+ * Config-level customer-specific data, discriminated by `customerName`. The
311
+ * `customerConfig` counterpart to {@link WithdrawalCustomerData}.
312
+ */
313
+ export type WithdrawalCustomerConfig = NadoWithdrawalCustomerConfig;
314
+ export type { NadoWithdrawalCustomerConfig, NadoWithdrawalCustomerData };
302
315
  export interface WithdrawalParam {
303
316
  quoteId: string;
304
317
  funQuote: unknown;
@@ -316,6 +329,23 @@ export interface WithdrawalParam {
316
329
  */
317
330
  withdrawalUSD?: string;
318
331
  }
332
+ /**
333
+ * Form data for an in-flight withdrawal, passed as the second argument of
334
+ * `onWithdrawalConfirmation` (see {@link UseFunkitCheckoutProps}).
335
+ * `chainId` / `tokenAddress` / `tokenSymbol` describe the destination
336
+ * (receive) side the user selected in the modal.
337
+ */
338
+ export type WithdrawalFormData = {
339
+ destinationAddress: Address;
340
+ withdrawalUSD: string;
341
+ tokenSymbol: string;
342
+ tokenAddress: Address;
343
+ chainId: number;
344
+ quote?: FunkitCheckoutQuoteResult;
345
+ /** Customer-specific data for quoteless flows (e.g. Lighter Secure). */
346
+ customerData?: WithdrawalCustomerData;
347
+ userInputAmount: string;
348
+ };
319
349
  /**
320
350
  * A single entry in a {@link MultiMethodWithdrawalConfig}.
321
351
  *
@@ -422,8 +452,16 @@ interface UseFunkitCheckoutBaseProps {
422
452
  interface CashierFormFactorProps {
423
453
  formFactor: 'cashier';
424
454
  withdrawalConfig: FunkitWithdrawalConfig;
425
- /** @optional fires when a withdrawal is confirmed with the funkit server. Returns the newly created withdrawalId. **/
426
- onWithdrawalConfirmation?: (withdrawalId: string) => void;
455
+ /**
456
+ * @optional fires once the withdrawal has been submitted — after the wallet
457
+ * transaction is sent or the custom withdrawCallback resolves. `formData`
458
+ * carries the resolved destination chain/token
459
+ * ({@link WithdrawalFormData}) so integrators can track cross-chain
460
+ * withdrawals (e.g. security flows). The first argument is kept for
461
+ * backwards compatibility: the destination address on wallet flows, the
462
+ * quoteId on custom-callback flows.
463
+ */
464
+ onWithdrawalConfirmation?: (withdrawalId: string, formData: WithdrawalFormData) => void;
427
465
  /** @optional fires if the withdrawal fails at any point **/
428
466
  onWithdrawalError?: (result: FunkitCheckoutResult) => void;
429
467
  }
@@ -446,7 +484,7 @@ export interface UseFunkitCheckoutPropsWithFullConfig extends UseFunkitCheckoutB
446
484
  config: FunkitCheckoutConfig;
447
485
  formFactor?: 'cashier' | 'checkout';
448
486
  withdrawalConfig?: FunkitWithdrawalConfig;
449
- onWithdrawalConfirmation?: (withdrawalId: string) => void;
487
+ onWithdrawalConfirmation?: (withdrawalId: string, formData: WithdrawalFormData) => void;
450
488
  onWithdrawalError?: (result: FunkitCheckoutResult) => void;
451
489
  }
452
490
  /**
@@ -273,6 +273,13 @@ export type FunkitConfig = {
273
273
  prefillFiatEmail?: string;
274
274
  /** Disable Datadog logging - defaults to false (logging enabled) */
275
275
  disableLogging?: boolean;
276
+ /**
277
+ * Source used to attribute your onchain activity — should be a domain (e.g.
278
+ * `'yourapp.com'`). Applied once at provider init. When omitted, a source is
279
+ * derived automatically, which may log a console warning; set this to
280
+ * attribute activity explicitly and silence it.
281
+ */
282
+ source?: string;
276
283
  };
277
284
  interface FinalFunkitConfigInternal extends FunkitConfig {
278
285
  textCustomizations: FunkitTextCustomizationsConfig;
@@ -34,10 +34,7 @@ export declare const useGeneralWallet: () => GeneralWalletContextProps;
34
34
  *
35
35
  * `userId` is `userInfo.id` (not `userInfo.address`). `walletAddress` is the
36
36
  * resolved `effectiveAddress` from context, normalized to the contract's `''`
37
- * sentinel when absent — `GeneralWalletProvider` types the field `Address | ''`
38
- * but leaks `undefined` for guests via a `@ts-expect-error`, so we coalesce
39
- * here to keep web aligned with the contract (and with the eventual React
40
- * Native implementation).
37
+ * sentinel when absent.
41
38
  */
42
39
  export declare const useIdentity: IdentityProvider['useIdentity'];
43
40
  /**
@@ -1,7 +1,74 @@
1
- import { type Address } from 'viem';
1
+ import { type Address, type Hex } from 'viem';
2
2
  export declare const LIGHTER_DEPOSIT_ADDRESS: Address;
3
3
  export declare const LIGHTER_SLOW_DEPOSIT_TIME_ESTIMATE_SECONDS: number;
4
4
  export declare const LIGHTER_DELAYED_AUTO_TRIGGER_CUTOFF: number;
5
+ /**
6
+ * zkLighter L1 `withdraw` ABI — selector `0xd20191bd`, non-payable, on the same
7
+ * contract as deposits. `amount` is in Lighter base units (see
8
+ * {@link lighterWithdrawBaseUnits}).
9
+ */
10
+ export declare const LIGHTER_WITHDRAW_ABI: readonly [{
11
+ readonly type: "function";
12
+ readonly name: "withdraw";
13
+ readonly stateMutability: "nonpayable";
14
+ readonly inputs: readonly [{
15
+ readonly name: "accountIndex";
16
+ readonly type: "uint48";
17
+ }, {
18
+ readonly name: "assetIndex";
19
+ readonly type: "uint16";
20
+ }, {
21
+ readonly name: "routeType";
22
+ readonly type: "uint8";
23
+ }, {
24
+ readonly name: "amount";
25
+ readonly type: "uint64";
26
+ }];
27
+ readonly outputs: readonly [];
28
+ }];
29
+ /** Strips fractional digits beyond `decimals` (string-based, no float math). */
30
+ export declare function truncateToDecimals(amount: string, decimals: number): string;
31
+ /**
32
+ * Converts a token-unit amount to Lighter L1 `withdraw` base units.
33
+ *
34
+ * Uses the L2 convention — USDC (asset index 3) = 6 decimals, all other assets
35
+ * = 8 — NOT the mainnet ERC-20 decimals (LIT/ETH would be 18). Confirmed on
36
+ * chain: 1 USDC → `1_000_000`, 1 LIT → `100_000_000`.
37
+ */
38
+ export declare function lighterWithdrawBaseUnits(assetIndex: number, amountTokenUnits: string): bigint;
39
+ /**
40
+ * Builds the on-chain `withdraw` transaction for the L1 fallback. `value` is 0
41
+ * (no protocol fee — the user pays gas only).
42
+ */
43
+ export declare function buildLighterL1WithdrawTransaction(params: {
44
+ accountIndex: number;
45
+ assetIndex: number;
46
+ routeType: number;
47
+ amountBaseUnit: bigint;
48
+ }): {
49
+ to: Address;
50
+ data: Hex;
51
+ value: bigint;
52
+ };
53
+ /**
54
+ * Explorer link for a Lighter Secure withdrawal tx. The L1 on-chain fallback
55
+ * produces a canonical 32-byte mainnet tx hash → Etherscan; L2 Secure hashes
56
+ * are Lighter's own (non-EVM) format → Lighter explorer. Detecting the EVM hash
57
+ * keeps L1-vs-L2 routing self-contained (no extra state threaded through the
58
+ * modal step machine).
59
+ */
60
+ export declare function resolveLighterWithdrawalExplorerUrl(txHash: string): string;
61
+ /**
62
+ * True when an error is Lighter's **L2 (Secure) withdrawal** rate limit —
63
+ * codes 23004 / 23005, e.g. "Too Many L2 Withdrawal Requests!: L2 withdrawal
64
+ * rate limit exceeded. Only 3 withdrawals allowed per 2 hours". Used to offer
65
+ * the on-chain L1 fallback (Secure withdrawals only).
66
+ *
67
+ * The L2 SDK usually surfaces this as a plain string (the numeric code isn't
68
+ * always preserved), so we match message content — plus the structured `code`
69
+ * field when the error carries one.
70
+ */
71
+ export declare function isLighterWithdrawalRateLimitError(error: unknown): boolean;
5
72
  export declare const LIGHTER_DYNAMIC_ROUTING_ID: {
6
73
  ETH_SPOT: string;
7
74
  USDC_PERPS: string;
@@ -1,41 +1,2 @@
1
- import { type CheckoutHistoryItem, type CheckoutState } from '@funkit/api-base';
2
- import type { ApiFunkitCheckoutActionParams } from '@funkit/utils';
3
- import type { Address, Hex } from 'viem';
4
- import type { MergedMultiStepDirectExecution } from '../domains/checkoutNotifications';
5
- export type PurifiedCheckoutHistoryItem = {
6
- depositAddr?: Address;
7
- directExecution: boolean;
8
- id: Hex;
9
- fromAmountBaseUnit: string;
10
- fromChainId: string;
11
- fromTokenAddress: Address;
12
- state: CheckoutState;
13
- toAmountBaseUnit: string;
14
- toChainId: string;
15
- toTokenAddress: Address;
16
- createdTimeMs: number;
17
- updatedTimeMs: number;
18
- additionalActions: ApiFunkitCheckoutActionParams[];
19
- isWithdrawal: boolean;
20
- /**
21
- * Customer-specific, presentation-only metadata. Kept in its own bag so
22
- * customer concepts don't leak onto the shared top-level shape. Only present
23
- * when there's something to surface for the item's customer.
24
- */
25
- customerMetadata?: {
26
- /**
27
- * For Lighter withdrawal direct executions: which route was used.
28
- * `'secure'` is Lighter's native bridge to mainnet (recorded as
29
- * `EXTERNALLY_FULFILLED`); `'fast'` routes through Fun + Relay.
30
- */
31
- lighterWithdrawalType?: 'fast' | 'secure';
32
- };
33
- } & ({
34
- depositAddr: Address;
35
- directExecution: false;
36
- } | {
37
- depositAddr?: never;
38
- directExecution: true;
39
- txHashes: Hex[];
40
- });
41
- export declare const purifyCheckoutHistoryItem: (item: CheckoutHistoryItem | MergedMultiStepDirectExecution) => PurifiedCheckoutHistoryItem;
1
+ export { purifyCheckoutHistoryItem } from '@funkit/connect-core';
2
+ export type { PurifiedCheckoutHistoryItem } from '@funkit/connect-core';
@@ -1,6 +1,6 @@
1
1
  import type { SwappedTheme } from '@funkit/connect-core';
2
2
  import type { ThemeVars } from '../css/sprinkles.css';
3
- export { getSavedFormOfPaymentDisplayName, getSavedFormOfPaymentIcon, getSwappedIcon, getSwappedOrigin, isSavedFormOfPaymentType, isSwappedOrigin, SWAPPED_CARD_BRANDS, } from '@funkit/connect-core';
3
+ export { getFormOfPaymentDisplayName, getSavedFormOfPaymentDisplayName, getSavedFormOfPaymentIcon, getSwappedIcon, getSwappedOrigin, isSavedFormOfPaymentType, isSwappedOrigin, SWAPPED_CARD_BRANDS, } from '@funkit/connect-core';
4
4
  export type { SwappedTheme };
5
5
  export declare function resolveCssValue(value: string): string;
6
6
  export declare function resolveObjectCssVars<T extends object>(obj: T): T;
@@ -16,6 +16,14 @@ export declare function getIsExternalUserIdAddress(apiKey: string, externalUserI
16
16
  * Currently used by Lighter mobile QR flow where the L1 address is passed via externalUserId.
17
17
  */
18
18
  export declare function resolveWalletAddress(address: Address | undefined, externalUserId: string | undefined, isExternalUserIdAddress: boolean): Address | undefined;
19
+ /**
20
+ * Whether the session counts as logged in.
21
+ * Web3 only qualifies once wagmi has resolved an address — `connector` is set
22
+ * as soon as a connection attempt starts (status 'connecting'/'reconnecting'),
23
+ * before `address` exists, so gating on `loginType` alone would flip this true
24
+ * while `effectiveAddress` is still undefined.
25
+ */
26
+ export declare function resolveIsUserLoggedIn(loginType: LoginType, effectiveAddress: Address | undefined, externalUserId: string | undefined): boolean;
19
27
  /**
20
28
  * Resolve the userId for the current session.
21
29
  */
@@ -2,7 +2,8 @@ import type { CustomWithdrawalConfig, FunkitWithdrawalConfig, MultiMethodWithdra
2
2
  /**
3
3
  * Evaluates the integrator's `withdrawalSourceTokenBalance` callback to a safe
4
4
  * numeric string. Returns `'0'` (with a warn) for missing/empty/NaN/negative
5
- * values. Shared by the withdrawal amount screen and the Swapped cash cap.
5
+ * values, or if the callback throws. Shared by the withdrawal amount screen and
6
+ * the Swapped cash cap.
6
7
  */
7
8
  export declare function safeEvaluateWithdrawalSourceTokenBalance(fn: (() => string | number) | undefined): string;
8
9
  /**
@@ -1,6 +1,6 @@
1
1
  import type { Config } from 'wagmi';
2
2
  import { type GetBalanceParameters, type GetBalanceReturnType } from 'wagmi/actions';
3
- export { estimateGas, getAccount, getGasPrice, getTransaction, getWalletClient, multicall, readContract, sendTransaction, switchChain, waitForTransactionReceipt, } from 'wagmi/actions';
3
+ export { estimateGas, getAccount, getGasPrice, getTransaction, getWalletClient, multicall, readContract, sendTransaction, signTypedData, switchChain, waitForTransactionReceipt, } from 'wagmi/actions';
4
4
  export type GetBalanceReturnTypeCompat = GetBalanceReturnType & {
5
5
  formatted: string;
6
6
  };
@@ -1,9 +1,9 @@
1
1
  "use client";
2
2
  import {
3
3
  bifrostWallet
4
- } from "../chunk-IULPZP2Q.js";
5
- import "../chunk-N4IJLYFY.js";
4
+ } from "../chunk-4T6ZSRJF.js";
6
5
  import "../chunk-OLZ7626J.js";
6
+ import "../chunk-N4IJLYFY.js";
7
7
  import "../chunk-IGKXZBTA.js";
8
8
  export {
9
9
  bifrostWallet
@@ -1,9 +1,9 @@
1
1
  "use client";
2
2
  import {
3
3
  bitgetWallet
4
- } from "../chunk-TKB2OY6G.js";
5
- import "../chunk-N4IJLYFY.js";
4
+ } from "../chunk-CPI4TD43.js";
6
5
  import "../chunk-OLZ7626J.js";
6
+ import "../chunk-N4IJLYFY.js";
7
7
  import "../chunk-IGKXZBTA.js";
8
8
  export {
9
9
  bitgetWallet
@@ -1,9 +1,9 @@
1
1
  "use client";
2
2
  import {
3
3
  bybitWallet
4
- } from "../chunk-OX37G4YT.js";
5
- import "../chunk-N4IJLYFY.js";
4
+ } from "../chunk-F5XEEVG6.js";
6
5
  import "../chunk-OLZ7626J.js";
6
+ import "../chunk-N4IJLYFY.js";
7
7
  import "../chunk-IGKXZBTA.js";
8
8
  export {
9
9
  bybitWallet
@@ -1,9 +1,9 @@
1
1
  "use client";
2
2
  import {
3
3
  clvWallet
4
- } from "../chunk-OEEGYENV.js";
5
- import "../chunk-N4IJLYFY.js";
4
+ } from "../chunk-UK7C2JXW.js";
6
5
  import "../chunk-OLZ7626J.js";
6
+ import "../chunk-N4IJLYFY.js";
7
7
  import "../chunk-IGKXZBTA.js";
8
8
  export {
9
9
  clvWallet
@@ -1,9 +1,9 @@
1
1
  "use client";
2
2
  import {
3
3
  coin98Wallet
4
- } from "../chunk-WAHGI5L7.js";
5
- import "../chunk-N4IJLYFY.js";
4
+ } from "../chunk-6BW3HLBG.js";
6
5
  import "../chunk-OLZ7626J.js";
6
+ import "../chunk-N4IJLYFY.js";
7
7
  import "../chunk-IGKXZBTA.js";
8
8
  export {
9
9
  coin98Wallet
@@ -1,9 +1,9 @@
1
1
  "use client";
2
2
  import {
3
3
  coreWallet
4
- } from "../chunk-4NV5BYRP.js";
5
- import "../chunk-N4IJLYFY.js";
4
+ } from "../chunk-RB3HR4R2.js";
6
5
  import "../chunk-OLZ7626J.js";
6
+ import "../chunk-N4IJLYFY.js";
7
7
  import "../chunk-IGKXZBTA.js";
8
8
  export {
9
9
  coreWallet
@@ -1,9 +1,9 @@
1
1
  "use client";
2
2
  import {
3
3
  foxWallet
4
- } from "../chunk-GUQM4QSL.js";
5
- import "../chunk-N4IJLYFY.js";
4
+ } from "../chunk-MIQTHJ6X.js";
6
5
  import "../chunk-OLZ7626J.js";
6
+ import "../chunk-N4IJLYFY.js";
7
7
  import "../chunk-IGKXZBTA.js";
8
8
  export {
9
9
  foxWallet
@@ -1,9 +1,9 @@
1
1
  "use client";
2
2
  import {
3
3
  frontierWallet
4
- } from "../chunk-AVDUNQUW.js";
5
- import "../chunk-N4IJLYFY.js";
4
+ } from "../chunk-YEZM4CK4.js";
6
5
  import "../chunk-OLZ7626J.js";
6
+ import "../chunk-N4IJLYFY.js";
7
7
  import "../chunk-IGKXZBTA.js";
8
8
  export {
9
9
  frontierWallet
@@ -1,9 +1,9 @@
1
1
  "use client";
2
2
  import {
3
3
  gateWallet
4
- } from "../chunk-JPN6TWIT.js";
5
- import "../chunk-N4IJLYFY.js";
4
+ } from "../chunk-HNRB7KJU.js";
6
5
  import "../chunk-OLZ7626J.js";
6
+ import "../chunk-N4IJLYFY.js";
7
7
  import "../chunk-IGKXZBTA.js";
8
8
  export {
9
9
  gateWallet