@funkit/connect 9.24.0 → 9.26.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 (87) hide show
  1. package/CHANGELOG.md +50 -0
  2. package/dist/clients/{chunk-7G3QEQFB.js → chunk-2NBYHUIW.js} +1 -1
  3. package/dist/clients/{chunk-JN6WUYT2.js → chunk-4IWQ2UT5.js} +8 -5
  4. package/dist/clients/{chunk-VJZW3MA3.js → chunk-F4SCUKY6.js} +1 -1
  5. package/dist/clients/{chunk-7UIDHSYG.js → chunk-LUHEVXPD.js} +1 -8
  6. package/dist/clients/chunk-STLOQEN7.js +11 -0
  7. package/dist/clients/chunk-UPZNKPYU.js +27 -0
  8. package/dist/clients/{chunk-MXPZTW2H.js → chunk-VT3ERWXE.js} +4 -2
  9. package/dist/clients/fanatics.js +5 -3
  10. package/dist/clients/lighter.css +0 -5
  11. package/dist/clients/lighter.js +7 -4
  12. package/dist/clients/mallard.d.ts +43 -1
  13. package/dist/clients/mallard.js +112 -3
  14. package/dist/clients/polymarket/PolymarketDepositAccountDropdown.css +0 -5
  15. package/dist/clients/polymarket/PolymarketDepositAccountDropdown.js +7 -5
  16. package/dist/clients/polymarket/createPolymarketDepositConfig.js +2 -2
  17. package/dist/clients/polymarket/index.css +0 -5
  18. package/dist/clients/polymarket/index.js +7 -5
  19. package/dist/clients/polymarket/polymarket.js +1 -1
  20. package/dist/components/FunCheckoutHistory/FunCheckoutHistoryContent.d.ts +1 -2
  21. package/dist/components/FunTransactionSummary/PaymentAmountSummary.d.ts +2 -1
  22. package/dist/domains/clientMetadata.d.ts +21 -0
  23. package/dist/domains/nado.d.ts +9 -0
  24. package/dist/hooks/track/CheckoutModalEvent.d.ts +0 -1
  25. package/dist/hooks/useGetAssetHoldingsFromRpc.d.ts +23 -0
  26. package/dist/hooks/useInjectedAssetHoldings.d.ts +23 -0
  27. package/dist/hooks/useXstockAssetHoldings.d.ts +15 -0
  28. package/dist/hooks/useXstocksWrappedTokenAddress.d.ts +16 -0
  29. package/dist/index.css +0 -5
  30. package/dist/index.js +2740 -2321
  31. package/dist/modals/CheckoutModal/CheckoutComplete/CheckoutComplete.d.ts +1 -1
  32. package/dist/modals/CheckoutModal/FunCheckoutStep.d.ts +0 -1
  33. package/dist/modals/CheckoutModal/InputAmount/useNadoDirectTransfer.d.ts +64 -0
  34. package/dist/modals/CheckoutModal/SelectAsset/SelectAsset.d.ts +1 -1
  35. package/dist/modals/CheckoutModal/SourceChange/FormOfPaymentsList.d.ts +1 -1
  36. package/dist/modals/CheckoutModal/SourceChange/buildSourceGroups.d.ts +2 -2
  37. package/dist/modals/CheckoutModal/stepTransition.d.ts +0 -3
  38. package/dist/modals/WithdrawalModal/RecipientAddress.d.ts +12 -0
  39. package/dist/modals/WithdrawalModal/WithdrawalSwappedIframeController.d.ts +3 -1
  40. package/dist/modals/WithdrawalModal/useFiatWithdrawal.d.ts +40 -0
  41. package/dist/modals/WithdrawalModal/useWithdrawal.d.ts +2 -2
  42. package/dist/providers/FunkitCheckoutContext/types.d.ts +21 -0
  43. package/dist/utils/assets.d.ts +7 -0
  44. package/dist/utils/checkoutHistory.d.ts +1 -5
  45. package/dist/utils/swappedRouteOverride.d.ts +27 -0
  46. package/dist/wagmi/actions.d.ts +1 -1
  47. package/dist/wallets/walletConnectors/bifrostWallet/bifrostWallet.js +2 -2
  48. package/dist/wallets/walletConnectors/bitgetWallet/bitgetWallet.js +2 -2
  49. package/dist/wallets/walletConnectors/bybitWallet/bybitWallet.js +2 -2
  50. package/dist/wallets/walletConnectors/clvWallet/clvWallet.js +2 -2
  51. package/dist/wallets/walletConnectors/coin98Wallet/coin98Wallet.js +2 -2
  52. package/dist/wallets/walletConnectors/coreWallet/coreWallet.js +2 -2
  53. package/dist/wallets/walletConnectors/foxWallet/foxWallet.js +2 -2
  54. package/dist/wallets/walletConnectors/frontierWallet/frontierWallet.js +2 -2
  55. package/dist/wallets/walletConnectors/gateWallet/gateWallet.js +2 -2
  56. package/dist/wallets/walletConnectors/index.js +33 -33
  57. package/dist/wallets/walletConnectors/metaMaskWallet/metaMaskWallet.js +2 -2
  58. package/dist/wallets/walletConnectors/okxWallet/okxWallet.js +2 -2
  59. package/dist/wallets/walletConnectors/rainbowWallet/rainbowWallet.js +2 -2
  60. package/dist/wallets/walletConnectors/roninWallet/roninWallet.js +2 -2
  61. package/dist/wallets/walletConnectors/safepalWallet/safepalWallet.js +2 -2
  62. package/dist/wallets/walletConnectors/subWallet/subWallet.js +2 -2
  63. package/dist/wallets/walletConnectors/tokenPocketWallet/tokenPocketWallet.js +2 -2
  64. package/dist/wallets/walletConnectors/trustWallet/trustWallet.js +2 -2
  65. package/dist/wallets/walletConnectors/zerionWallet/zerionWallet.js +2 -2
  66. package/package.json +4 -4
  67. package/dist/components/FunCheckoutHistory/FunCheckoutHistoryHelp.d.ts +0 -10
  68. package/dist/modals/CheckoutModal/CheckoutHelp/CheckoutHelp.d.ts +0 -9
  69. package/dist/clients/{chunk-ME4OAQIY.js → chunk-O5CTDT3L.js} +0 -0
  70. package/dist/wallets/walletConnectors/{chunk-W2LCLDPX.js → chunk-2VP2F6EK.js} +3 -3
  71. package/dist/wallets/walletConnectors/{chunk-IULPZP2Q.js → chunk-4T6ZSRJF.js} +3 -3
  72. package/dist/wallets/walletConnectors/{chunk-WAHGI5L7.js → chunk-6BW3HLBG.js} +3 -3
  73. package/dist/wallets/walletConnectors/{chunk-YO2K4MBH.js → chunk-CCQV2ZET.js} +3 -3
  74. package/dist/wallets/walletConnectors/{chunk-TKB2OY6G.js → chunk-CPI4TD43.js} +3 -3
  75. package/dist/wallets/walletConnectors/{chunk-OX37G4YT.js → chunk-F5XEEVG6.js} +3 -3
  76. package/dist/wallets/walletConnectors/{chunk-JPN6TWIT.js → chunk-HNRB7KJU.js} +3 -3
  77. package/dist/wallets/walletConnectors/{chunk-WKNQMP4A.js → chunk-HTHAK6XB.js} +3 -3
  78. package/dist/wallets/walletConnectors/{chunk-GUQM4QSL.js → chunk-MIQTHJ6X.js} +3 -3
  79. package/dist/wallets/walletConnectors/{chunk-4NV5BYRP.js → chunk-RB3HR4R2.js} +3 -3
  80. package/dist/wallets/walletConnectors/{chunk-SWFF3TWJ.js → chunk-RVOY537T.js} +3 -3
  81. package/dist/wallets/walletConnectors/{chunk-KI5Y2BBF.js → chunk-STVVP43G.js} +3 -3
  82. package/dist/wallets/walletConnectors/{chunk-OEEGYENV.js → chunk-UK7C2JXW.js} +3 -3
  83. package/dist/wallets/walletConnectors/{chunk-YQFGVZGR.js → chunk-VAPGUPHO.js} +3 -3
  84. package/dist/wallets/walletConnectors/{chunk-XCNHV3HS.js → chunk-VTM6EECM.js} +3 -3
  85. package/dist/wallets/walletConnectors/{chunk-NR2OGDHQ.js → chunk-X6CGV36L.js} +3 -3
  86. package/dist/wallets/walletConnectors/{chunk-AVDUNQUW.js → chunk-YEZM4CK4.js} +3 -3
  87. package/dist/wallets/walletConnectors/{chunk-KCRO2AGO.js → chunk-ZNX4EMPB.js} +3 -3
@@ -10,4 +10,4 @@ export type ConfirmationStepNext = {
10
10
  };
11
11
  export declare const CheckoutCompleteInfo: ModalStepInfo<FunCheckoutStep.CHECKOUT_COMPLETE>;
12
12
  /** A checkout detail component to handle redirecting to the checkout history page */
13
- export declare function CheckoutComplete({ modalState, onClose, onNext, onAnimationComplete, }: ModalStepComponentProps<FunCheckoutStep.CHECKOUT_COMPLETE>): React.JSX.Element;
13
+ export declare function CheckoutComplete({ modalState, onClose, onAnimationComplete, }: ModalStepComponentProps<FunCheckoutStep.CHECKOUT_COMPLETE>): React.JSX.Element;
@@ -5,7 +5,6 @@ export declare enum FunCheckoutStep {
5
5
  CONFIRMATION = "confirmation",
6
6
  SELECT_ASSET = "select_asset",
7
7
  CHECKOUT_COMPLETE = "checkout_complete",
8
- CHECKOUT_HELP = "checkout_help",
9
8
  TRANSFER_TOKEN = "transfer_token",
10
9
  LIGHTNING_INVOICE = "lightning_invoice",
11
10
  CREATE_FIAT_ACCOUNT = "create_fiat_account",
@@ -0,0 +1,64 @@
1
+ /**
2
+ * Nado direct-transfer fast-path: a same-token same-chain deposit is a single
3
+ * ERC-20 transfer to the subaccount DDA (`customRecipient`), bypassing
4
+ * Relay/quoteV2 (which can't price a QQQx → QQQx "route"). Signs the transfer
5
+ * and records a direct execution for history parity. Mirrors `useAaveNativeSupply`.
6
+ */
7
+ import type { Dnum } from 'dnum';
8
+ import { type Hex } from 'viem';
9
+ import { type CheckoutConfirmationError } from '../../../domains/checkoutErrors';
10
+ import type { FunkitCheckoutConfig } from '../../../providers/FunkitCheckoutContext';
11
+ /**
12
+ * Base-unit string for the transfer + DE record. Dnum present → exact;
13
+ * otherwise derive from `assetAmount` + `decimals`. Neither → `'0'` + warn.
14
+ */
15
+ export declare function getTransferAmountBaseUnit(tokenAmountBaseUnit: Dnum | null, fallbackAssetAmount: number | undefined, decimals: number | null): bigint;
16
+ interface UseNadoDirectTransferResult {
17
+ /** Reads the committed amount/source from `checkoutItem` and executes. */
18
+ submit: () => Promise<{
19
+ txHash: Hex;
20
+ } | null>;
21
+ isPending: boolean;
22
+ error: CheckoutConfirmationError | null;
23
+ /**
24
+ * Whether this checkout takes the direct-transfer fast-path. True when all
25
+ * hold: the customer is Nado, `customRecipient` is set, and the selected
26
+ * source token (`checkoutItem.selectedSourceAssetInfo`) is the target token
27
+ * or its wrapper on the same chain. False until a source is selected and,
28
+ * for a wrapper source, until the wrapper address resolves.
29
+ */
30
+ isApplicable: boolean;
31
+ }
32
+ interface NadoDirectTransferContextArgs {
33
+ apiKey: string;
34
+ sourceAsset: {
35
+ chainId: string | number;
36
+ address: string;
37
+ };
38
+ checkoutConfig: Pick<FunkitCheckoutConfig, 'targetChain' | 'targetAsset' | 'customRecipient'>;
39
+ /**
40
+ * The target token's wrapped version (xStocks `wrapperAddressV2`) on the target
41
+ * chain. A held wrapped-token balance (e.g. wSPYx for SPYx) is an equivalent
42
+ * direct-transfer source. Resolved by `useXstocksWrappedTokenAddress`; omit
43
+ * when there's none.
44
+ */
45
+ wrappedTokenAddress?: string;
46
+ }
47
+ /**
48
+ * True when: the customer is Nado, the checkout has an explicit recipient (the
49
+ * subaccount DDA), and the source matches the target token or its wrapper (same
50
+ * chain). When true the deposit is a direct ERC-20 transfer, not a Relay swap.
51
+ *
52
+ * Kept customer-gated (not purely config-driven) to bound blast radius — only
53
+ * Nado should route through the direct-transfer path until it's proven out.
54
+ */
55
+ export declare function isNadoDirectTransferContext({ apiKey, sourceAsset, checkoutConfig, wrappedTokenAddress, }: NadoDirectTransferContextArgs): boolean;
56
+ /**
57
+ * Predicate over a source asset: does it qualify for the Nado direct-transfer fast-path?
58
+ */
59
+ export declare function useIsNadoDirectTransferSource(): (source: {
60
+ chainId: string | number;
61
+ address: string;
62
+ }) => boolean;
63
+ export declare function useNadoDirectTransfer(): UseNadoDirectTransferResult;
64
+ export {};
@@ -15,4 +15,4 @@ export type SelectAssetNext = {
15
15
  };
16
16
  export declare const SelectAssetInfo: ModalStepInfo<FunCheckoutStep.SELECT_ASSET>;
17
17
  export declare function SelectAsset({ modalState, onNext, onClose, }: ModalStepComponentProps<FunCheckoutStep.SELECT_ASSET>): React.JSX.Element;
18
- export declare function isTreatedAsNativeToken(apiKey: string, asset: AssetHoldingsItem, dynamicTargetAssetCandidates: DynamicTargetAssetCandidate[], findDynamicPath: IndexedDynamicRoutingConfig[string]['findPath'], isUserSelected: boolean): boolean;
18
+ export declare function isTreatedAsNativeToken(apiKey: string, asset: AssetHoldingsItem, dynamicTargetAssetCandidates: DynamicTargetAssetCandidate[], findDynamicPath: IndexedDynamicRoutingConfig[string]['findPath'], isUserSelected: boolean, isDirectTokenTransfer?: boolean): boolean;
@@ -11,7 +11,7 @@ interface FormOfPaymentsListProps {
11
11
  }
12
12
  interface FormOfPaymentSection {
13
13
  items: SwappedFormOfPayment[];
14
- labelKey: 'sourceChange.mostPopular' | 'sourceChange.savedPaymentMethods' | 'sourceChange.moreOptions' | 'sourceChange.otherOptions';
14
+ labelKey: 'sourceChange.mostPopular' | 'sourceChange.savedPaymentMethods' | 'sourceChange.moreOptions';
15
15
  }
16
16
  export declare function getFormOfPaymentSections(fopsData: GetFopsResponse, fopPriority: readonly string[]): {
17
17
  primary: FormOfPaymentSection;
@@ -51,8 +51,8 @@ export type BuildSourceGroupsResult = {
51
51
  * `<PayPal />` as the flat footer.)
52
52
  * - `isSwappedEnabled=true` → grouped layout. Same two groups, but
53
53
  * rendered in separate boxes with `showLabels` toggling the section
54
- * headers ("Connected" / "Most popular" / "Other options"). The
55
- * "Other options" header is suppressed when no preferred group
54
+ * headers ("Connected" / "Most popular" / "More options"). The
55
+ * "More options" header is suppressed when no preferred group
56
56
  * precedes it.
57
57
  *
58
58
  * **Aave branch** (per Figma, [ENG-3743](https://linear.app/funxyz/issue/ENG-3743)
@@ -11,7 +11,6 @@ import { type BrokerageTwoFANext, type BrokerageTwoFAState } from './Brokerage/B
11
11
  import { type ConnectExchangeNext, type ConnectExchangeState } from './Brokerage/ConnectExchange';
12
12
  import { type SelectBrokerageNext, type SelectBrokerageState } from './Brokerage/SelectBrokerage';
13
13
  import { type CheckoutCompleteNext, type CheckoutCompleteState } from './CheckoutComplete/CheckoutComplete';
14
- import { type CheckoutHelpState } from './CheckoutHelp/CheckoutHelp';
15
14
  import { type ConfirmationStepNext, type ConfirmationStepState } from './ConfirmationStep/ConfirmationStep';
16
15
  import { FunCheckoutStep } from './FunCheckoutStep';
17
16
  import { type InputAmountNext, type InputAmountState } from './InputAmount/InputAmount';
@@ -102,7 +101,6 @@ export declare const CheckoutModalSteps: {
102
101
  export type CheckoutModalState<S extends FunCheckoutStep = FunCheckoutStep> = {
103
102
  [T in S]: {
104
103
  [FunCheckoutStep.CHECKOUT_COMPLETE]: CheckoutCompleteState;
105
- [FunCheckoutStep.CHECKOUT_HELP]: CheckoutHelpState;
106
104
  [FunCheckoutStep.CONFIRMATION]: ConfirmationStepState;
107
105
  [FunCheckoutStep.INPUT_AMOUNT]: InputAmountState;
108
106
  [FunCheckoutStep.LOADING_ACCOUNT]: LoadingAccountState;
@@ -133,7 +131,6 @@ export type CheckoutModalState<S extends FunCheckoutStep = FunCheckoutStep> = {
133
131
  };
134
132
  }[S];
135
133
  export type NextPayload<S extends FunCheckoutStep = FunCheckoutStep> = {
136
- [FunCheckoutStep.CHECKOUT_HELP]: null;
137
134
  [FunCheckoutStep.CHECKOUT_COMPLETE]: CheckoutCompleteNext;
138
135
  [FunCheckoutStep.CONFIRMATION]: ConfirmationStepNext;
139
136
  [FunCheckoutStep.INPUT_AMOUNT]: InputAmountNext;
@@ -1,5 +1,17 @@
1
1
  import React from 'react';
2
2
  import type { FunkitWithdrawalConfig } from '../../providers/FunkitCheckoutContext';
3
+ /**
4
+ * Whether to offer the "Use connected wallet" recipient shortcut: shown when a
5
+ * wallet is connected and the integrator hasn't set `disableConnectedWallet`.
6
+ * Independent of the withdrawal source address — for connected-wallet
7
+ * withdrawals (e.g. Mallard) the source IS the connected wallet, and
8
+ * withdrawing to it on the destination chain is valid.
9
+ */
10
+ export declare function shouldShowUseConnectedWallet({ disableConnectedWallet, isConnected, connectedWalletAddress, }: {
11
+ disableConnectedWallet: boolean | undefined;
12
+ isConnected: boolean;
13
+ connectedWalletAddress: string | undefined;
14
+ }): boolean;
3
15
  export declare function WithdrawRecipientAddress({ config, recipientAddress, setRecipientAddress, selectedChainId, selectedToken, isValidAddress, isRiskyAddress, }: {
4
16
  config: FunkitWithdrawalConfig;
5
17
  recipientAddress: string;
@@ -1,11 +1,13 @@
1
1
  import type { SwappedFormOfPayment } from '@funkit/api-base';
2
2
  import React from 'react';
3
+ import type { CustomWithdrawalConfig, WalletWithdrawalConfig } from '../../providers/FunkitCheckoutContext';
3
4
  interface WithdrawalSwappedIframeControllerProps {
4
5
  selectedFop: SwappedFormOfPayment;
6
+ activeConfig: WalletWithdrawalConfig | CustomWithdrawalConfig;
5
7
  isError: boolean;
6
8
  onError: () => void;
7
9
  onBack: () => void;
8
10
  onClose: () => void;
9
11
  }
10
- export declare function WithdrawalSwappedIframeController({ selectedFop, isError, onError, onBack, onClose, }: WithdrawalSwappedIframeControllerProps): React.JSX.Element;
12
+ export declare function WithdrawalSwappedIframeController({ selectedFop, activeConfig, isError, onError, onBack, onClose, }: WithdrawalSwappedIframeControllerProps): React.JSX.Element;
11
13
  export {};
@@ -0,0 +1,40 @@
1
+ import { type Address } from 'viem';
2
+ import { type CustomWithdrawalConfig, type FunkitActiveWithdrawalItem, type WalletWithdrawalConfig } from '../../providers/FunkitCheckoutContext';
3
+ /**
4
+ * Provider-agnostic fiat off-ramp order: deliver `amount` of the accepted
5
+ * token to `destinationAddress`. The Swapped controller maps its order payload
6
+ * onto this shape.
7
+ */
8
+ export interface FiatWithdrawalOrder {
9
+ orderId: string;
10
+ destinationAddress: Address;
11
+ /** Amount (human units) of the target/accepted token the provider expects. */
12
+ amount: string;
13
+ /**
14
+ * Provider-reported accepted asset, by name (e.g. `'USDC'` / `'base'`).
15
+ * Informational only — surfaced in the route-decision log for reconciliation,
16
+ * never used to determine routing (routing comes from config + the Statsig
17
+ * source override).
18
+ */
19
+ providerCrypto?: string;
20
+ providerNetwork?: string;
21
+ }
22
+ interface UseFiatWithdrawalParams {
23
+ config: WalletWithdrawalConfig | CustomWithdrawalConfig;
24
+ withdrawalItem: FunkitActiveWithdrawalItem | null;
25
+ /** Invoked for unrecoverable failures (the caller tears down the flow). */
26
+ onError: () => void;
27
+ }
28
+ /**
29
+ * Owns the order → quote → execute pipeline for a fiat off-ramp withdrawal,
30
+ * keeping the iframe controller a thin lifecycle/dispatch shell.
31
+ *
32
+ * Quoting is **EXACT_OUT** — the provider credits fiat on the exact deposited
33
+ * amount, so we deliver exactly what it expects. Execution itself is delegated
34
+ * to {@link useWithdrawal}, which owns preWithdrawalAction + confirmCheckout +
35
+ * error mapping.
36
+ */
37
+ export declare function useFiatWithdrawal({ config, withdrawalItem, onError, }: UseFiatWithdrawalParams): {
38
+ processOrder: (order: FiatWithdrawalOrder) => Promise<void>;
39
+ };
40
+ export {};
@@ -3,7 +3,7 @@ import { type CheckoutConfirmationError } from '../../domains/checkoutErrors';
3
3
  import type { FunkitCheckoutQuoteResult } from '../../domains/quote';
4
4
  import { type FunkitActiveWithdrawalItem, type FunkitWithdrawalConfig } from '../../providers/FunkitCheckoutContext';
5
5
  interface UseWithdrawalResult {
6
- handleWithdrawal: (withdrawal: WithdrawalFormData) => Promise<void>;
6
+ handleWithdrawal: (withdrawal: WithdrawalFormData) => Promise<Hex | null>;
7
7
  isWithdrawing: boolean;
8
8
  withdrawalError: CheckoutConfirmationError | null;
9
9
  stepMessage: string | null;
@@ -22,6 +22,6 @@ export type WithdrawalFormData = {
22
22
  export declare function useWithdrawal({ config, withdrawalItem, onSuccess, }: {
23
23
  config: FunkitWithdrawalConfig;
24
24
  withdrawalItem: FunkitActiveWithdrawalItem | null;
25
- onSuccess: (withdrawal: WithdrawalFormData, txHash: Hex) => void;
25
+ onSuccess?: (withdrawal: WithdrawalFormData, txHash: Hex) => void;
26
26
  }): UseWithdrawalResult;
27
27
  export {};
@@ -257,6 +257,24 @@ export interface WalletWithdrawalConfig extends WithdrawalConfigBase {
257
257
  * by virtue of living on a different config variant.
258
258
  */
259
259
  preWithdrawalAction?: (param: WithdrawalParam) => Promise<WithdrawalTransaction[]>;
260
+ /**
261
+ * Token that Swapped accepts for fiat withdrawal. When set and differs from
262
+ * {@link WithdrawalConfigBase.sourceTokenAddress}, the Swapped controller
263
+ * fetches a Relay quote to swap the source token into this token before
264
+ * sending to Swapped's deposit address.
265
+ */
266
+ swappedTargetTokenAddress?: Address;
267
+ /**
268
+ * Chain ID for the Swapped target token. Defaults to
269
+ * {@link WithdrawalConfigBase.sourceChainId} when omitted.
270
+ */
271
+ swappedTargetChainId?: string;
272
+ /**
273
+ * Symbol of the Swapped target token (e.g. 'USDC'). Recorded against the
274
+ * on-chain movement, which is denominated in the target — not the source —
275
+ * token. Defaults to {@link WithdrawalConfigBase.sourceTokenSymbol}.
276
+ */
277
+ swappedTargetTokenSymbol?: string;
260
278
  }
261
279
  export interface CustomWithdrawalConfig extends WithdrawalConfigBase {
262
280
  /**
@@ -402,6 +420,9 @@ export interface FunkitActiveCheckoutItem extends Omit<ApiCheckoutClientMetadata
402
420
  symbol: string | null;
403
421
  chainId: string;
404
422
  iconSrc: string | null;
423
+ /** Source token decimals, when known — lets later screens reconstruct
424
+ * base-unit amounts. */
425
+ decimals?: number;
405
426
  };
406
427
  /** Time of completion of the active checkout item. For frontend use only. **/
407
428
  completedTimestampMs: number | null;
@@ -1,4 +1,11 @@
1
1
  import type { DynamicTargetAssetCandidate, FunkitCheckoutConfig } from '../providers/FunkitCheckoutContext';
2
2
  export type { AssetHoldingsItem, AssetHoldingsMap, KnownAssetHoldingsItem, } from '../domains/wallet';
3
3
  export declare const getNormalizedTokenBalance: (tokenBalance: bigint | number | string, decimals: number) => number;
4
+ /**
5
+ * The dynamic-target candidate matching the checkout's *active* target token
6
+ * (`targetAsset`/`targetChain`), by token-equivalence. Distinct from
7
+ * `getDefaultDynamicTargetAsset`, which resolves the *default to display* via
8
+ * routingId/ticker/isDefault
9
+ */
10
+ export declare const getActiveDynamicTargetAsset: (checkoutConfig: FunkitCheckoutConfig | undefined) => DynamicTargetAssetCandidate | undefined;
4
11
  export declare const getDefaultDynamicTargetAsset: (checkoutConfig: FunkitCheckoutConfig | undefined) => DynamicTargetAssetCandidate;
@@ -1,11 +1,7 @@
1
1
  import type { CheckoutHistoryItem } from '@funkit/api-base';
2
2
  export declare enum HistoryContentPages {
3
- DETAIL = "detail",
4
- HELP = "help"
3
+ DETAIL = "detail"
5
4
  }
6
- export declare function getLatestReportSubmitTime(): number;
7
- export declare function setLatestReportSubmitTime(timeMs: number): void;
8
- export declare function clearLatestWalletId(): void;
9
5
  /**
10
6
  * Get the checkout completion time in seconds
11
7
  * @param checkout
@@ -0,0 +1,27 @@
1
+ import type { Address } from 'viem';
2
+ /**
3
+ * Operator override (Statsig `swappedwithdrawalsourceoverrides`) pinning a
4
+ * Swapped withdrawal to a known-good accepted asset, keyed on the source asset,
5
+ * for when the config's requested target isn't supported by Swapped. `when`
6
+ * matches the source; `use` is the target the Relay quote delivers.
7
+ */
8
+ export interface SwappedSourceRouteOverride {
9
+ when: {
10
+ chainId: string;
11
+ tokenAddress: string;
12
+ };
13
+ use: {
14
+ chainId: string;
15
+ tokenAddress: Address;
16
+ symbol: string;
17
+ };
18
+ }
19
+ /**
20
+ * First well-formed override whose `when` matches the source asset, or
21
+ * `undefined`. First match wins so ops can order more specific rules ahead of
22
+ * broader ones.
23
+ */
24
+ export declare function findSwappedSourceOverride(overrides: readonly SwappedSourceRouteOverride[] | undefined, source: {
25
+ chainId: string;
26
+ tokenAddress: string;
27
+ }): SwappedSourceRouteOverride | undefined;
@@ -1,6 +1,6 @@
1
1
  import type { Config } from 'wagmi';
2
2
  import { type GetBalanceParameters, type GetBalanceReturnType } from 'wagmi/actions';
3
- export { estimateGas, getGasPrice, getTransaction, getWalletClient, multicall, readContract, waitForTransactionReceipt, } from 'wagmi/actions';
3
+ export { estimateGas, getAccount, getGasPrice, getTransaction, getWalletClient, multicall, readContract, sendTransaction, 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
@@ -4,22 +4,22 @@ import {
4
4
  } from "./chunk-52QXXLDS.js";
5
5
  import {
6
6
  zerionWallet
7
- } from "./chunk-SWFF3TWJ.js";
7
+ } from "./chunk-RVOY537T.js";
8
8
  import {
9
9
  tahoWallet
10
10
  } from "./chunk-7ZYCBDQ4.js";
11
11
  import {
12
12
  talismanWallet
13
13
  } from "./chunk-4DCO3TGL.js";
14
+ import {
15
+ tokenPocketWallet
16
+ } from "./chunk-HTHAK6XB.js";
14
17
  import {
15
18
  tokenaryWallet
16
19
  } from "./chunk-VH3THHJY.js";
17
- import {
18
- tokenPocketWallet
19
- } from "./chunk-WKNQMP4A.js";
20
20
  import {
21
21
  trustWallet
22
- } from "./chunk-KCRO2AGO.js";
22
+ } from "./chunk-ZNX4EMPB.js";
23
23
  import {
24
24
  uniswapWallet
25
25
  } from "./chunk-Z3PPW6NC.js";
@@ -34,28 +34,28 @@ import {
34
34
  } from "./chunk-RB66PKPA.js";
35
35
  import {
36
36
  rainbowWallet
37
- } from "./chunk-W2LCLDPX.js";
37
+ } from "./chunk-2VP2F6EK.js";
38
38
  import {
39
39
  ramperWallet
40
40
  } from "./chunk-OQB55QXP.js";
41
41
  import {
42
42
  roninWallet
43
- } from "./chunk-YQFGVZGR.js";
43
+ } from "./chunk-VAPGUPHO.js";
44
44
  import {
45
45
  safeWallet
46
46
  } from "./chunk-RCY66YHF.js";
47
+ import {
48
+ safepalWallet
49
+ } from "./chunk-VTM6EECM.js";
47
50
  import {
48
51
  safeheronWallet
49
52
  } from "./chunk-76S7R2ND.js";
50
- import {
51
- safepalWallet
52
- } from "./chunk-XCNHV3HS.js";
53
53
  import {
54
54
  subWallet
55
- } from "./chunk-NR2OGDHQ.js";
55
+ } from "./chunk-X6CGV36L.js";
56
56
  import {
57
57
  metaMaskWallet
58
- } from "./chunk-YO2K4MBH.js";
58
+ } from "./chunk-CCQV2ZET.js";
59
59
  import {
60
60
  mewWallet
61
61
  } from "./chunk-MQM45ADF.js";
@@ -64,31 +64,31 @@ import {
64
64
  } from "./chunk-YWOVAU6O.js";
65
65
  import {
66
66
  okxWallet
67
- } from "./chunk-KI5Y2BBF.js";
67
+ } from "./chunk-STVVP43G.js";
68
68
  import {
69
69
  omniWallet
70
70
  } from "./chunk-2CX7LX4J.js";
71
71
  import {
72
72
  oneInchWallet
73
73
  } from "./chunk-QG6ZHI7B.js";
74
- import {
75
- phantomWallet
76
- } from "./chunk-QY53O7WG.js";
77
74
  import {
78
75
  oneKeyWallet
79
76
  } from "./chunk-WVT6BBJH.js";
77
+ import {
78
+ phantomWallet
79
+ } from "./chunk-QY53O7WG.js";
80
80
  import {
81
81
  foxWallet
82
- } from "./chunk-GUQM4QSL.js";
82
+ } from "./chunk-MIQTHJ6X.js";
83
83
  import {
84
84
  frameWallet
85
85
  } from "./chunk-BU3ZAT5X.js";
86
86
  import {
87
87
  frontierWallet
88
- } from "./chunk-AVDUNQUW.js";
88
+ } from "./chunk-YEZM4CK4.js";
89
89
  import {
90
90
  gateWallet
91
- } from "./chunk-JPN6TWIT.js";
91
+ } from "./chunk-HNRB7KJU.js";
92
92
  import {
93
93
  imTokenWallet
94
94
  } from "./chunk-WNAGGFMG.js";
@@ -101,39 +101,39 @@ import {
101
101
  import {
102
102
  ledgerWallet
103
103
  } from "./chunk-RPV27V2Y.js";
104
- import {
105
- bloomWallet
106
- } from "./chunk-PJ7Y57EH.js";
107
104
  import {
108
105
  clvWallet
109
- } from "./chunk-OEEGYENV.js";
106
+ } from "./chunk-UK7C2JXW.js";
110
107
  import {
111
108
  coin98Wallet
112
- } from "./chunk-WAHGI5L7.js";
109
+ } from "./chunk-6BW3HLBG.js";
113
110
  import {
114
111
  coinbaseWallet
115
112
  } from "./chunk-2DLDAZRH.js";
113
+ import {
114
+ braveWallet
115
+ } from "./chunk-DS73TZ6O.js";
116
116
  import {
117
117
  dawnWallet
118
118
  } from "./chunk-G2PHTVL6.js";
119
119
  import {
120
120
  coreWallet
121
- } from "./chunk-4NV5BYRP.js";
121
+ } from "./chunk-RB3HR4R2.js";
122
122
  import {
123
123
  desigWallet
124
124
  } from "./chunk-FW3WZETT.js";
125
125
  import {
126
126
  enkryptWallet
127
127
  } from "./chunk-HBQK5RD5.js";
128
+ import {
129
+ bifrostWallet
130
+ } from "./chunk-4T6ZSRJF.js";
128
131
  import {
129
132
  argentWallet
130
133
  } from "./chunk-NTMBEOR2.js";
131
- import {
132
- bifrostWallet
133
- } from "./chunk-IULPZP2Q.js";
134
134
  import {
135
135
  bitgetWallet
136
- } from "./chunk-TKB2OY6G.js";
136
+ } from "./chunk-CPI4TD43.js";
137
137
  import {
138
138
  bitskiWallet
139
139
  } from "./chunk-7HRFUZFX.js";
@@ -141,13 +141,13 @@ import {
141
141
  bitverseWallet
142
142
  } from "./chunk-NSK6A7TI.js";
143
143
  import {
144
- braveWallet
145
- } from "./chunk-DS73TZ6O.js";
144
+ bloomWallet
145
+ } from "./chunk-PJ7Y57EH.js";
146
146
  import {
147
147
  bybitWallet
148
- } from "./chunk-OX37G4YT.js";
149
- import "./chunk-N4IJLYFY.js";
148
+ } from "./chunk-F5XEEVG6.js";
150
149
  import "./chunk-OLZ7626J.js";
150
+ import "./chunk-N4IJLYFY.js";
151
151
  import "./chunk-IGKXZBTA.js";
152
152
  export {
153
153
  argentWallet,
@@ -1,9 +1,9 @@
1
1
  "use client";
2
2
  import {
3
3
  metaMaskWallet
4
- } from "../chunk-YO2K4MBH.js";
5
- import "../chunk-N4IJLYFY.js";
4
+ } from "../chunk-CCQV2ZET.js";
6
5
  import "../chunk-OLZ7626J.js";
6
+ import "../chunk-N4IJLYFY.js";
7
7
  import "../chunk-IGKXZBTA.js";
8
8
  export {
9
9
  metaMaskWallet
@@ -1,9 +1,9 @@
1
1
  "use client";
2
2
  import {
3
3
  okxWallet
4
- } from "../chunk-KI5Y2BBF.js";
5
- import "../chunk-N4IJLYFY.js";
4
+ } from "../chunk-STVVP43G.js";
6
5
  import "../chunk-OLZ7626J.js";
6
+ import "../chunk-N4IJLYFY.js";
7
7
  import "../chunk-IGKXZBTA.js";
8
8
  export {
9
9
  okxWallet
@@ -1,9 +1,9 @@
1
1
  "use client";
2
2
  import {
3
3
  rainbowWallet
4
- } from "../chunk-W2LCLDPX.js";
5
- import "../chunk-N4IJLYFY.js";
4
+ } from "../chunk-2VP2F6EK.js";
6
5
  import "../chunk-OLZ7626J.js";
6
+ import "../chunk-N4IJLYFY.js";
7
7
  import "../chunk-IGKXZBTA.js";
8
8
  export {
9
9
  rainbowWallet