@funkit/connect 9.19.1 → 9.20.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.
- package/CHANGELOG.md +38 -0
- package/dist/clients/argentWallet-2WSTOUAO.js +7 -0
- package/dist/clients/bifrostWallet-5NQVDZ5P.js +7 -0
- package/dist/clients/bitgetWallet-CBQAJOIK.js +7 -0
- package/dist/clients/bitskiWallet-OLIYN3IU.js +7 -0
- package/dist/clients/bitverseWallet-AQMAJ2NN.js +7 -0
- package/dist/clients/bloomWallet-MJRQJYSG.js +7 -0
- package/dist/clients/braveWallet-T76TVZA6.js +7 -0
- package/dist/clients/bybitWallet-GOPAS32Q.js +7 -0
- package/dist/clients/chunk-4752IYY6.js +94 -0
- package/dist/clients/chunk-47AQXZQE.js +230 -0
- package/dist/clients/chunk-CSONEKIF.js +54 -0
- package/dist/clients/chunk-JOM2J5WB.js +2371 -0
- package/dist/clients/{chunk-TFZV2HO4.js → chunk-JVTKIEOP.js} +2 -223
- package/dist/clients/{polymarket.js → chunk-MOUTRRN3.js} +12 -4
- package/dist/clients/chunk-MRBN4XCA.js +96 -0
- package/dist/clients/chunk-UNCVGPTD.js +186 -0
- package/dist/clients/clvWallet-VVMLP7BK.js +7 -0
- package/dist/clients/coin98Wallet-I5CP5KYZ.js +7 -0
- package/dist/clients/coinbaseWallet-ICYEIYQD.js +7 -0
- package/dist/clients/coreWallet-RFVUHOVE.js +7 -0
- package/dist/clients/dawnWallet-QBFTQLS4.js +7 -0
- package/dist/clients/desigWallet-IBKYOHSY.js +7 -0
- package/dist/clients/enkryptWallet-ZVUZMI7H.js +7 -0
- package/dist/clients/fanatics.js +41 -82
- package/dist/clients/foxWallet-I7D5KIW4.js +7 -0
- package/dist/clients/frameWallet-UDD4OVZX.js +7 -0
- package/dist/clients/frontierWallet-5QV7ZACT.js +7 -0
- package/dist/clients/gateWallet-CJNGQQCV.js +7 -0
- package/dist/clients/imTokenWallet-UPA7ADZ2.js +7 -0
- package/dist/clients/injectedWallet-OIRJSVBZ.js +7 -0
- package/dist/clients/kresusWallet-7ROCNWAU.js +7 -0
- package/dist/clients/ledgerWallet-3FCEIKPD.js +7 -0
- package/dist/clients/lighter.js +9 -179
- package/dist/clients/metaMaskWallet-RMHEKBDR.js +7 -0
- package/dist/clients/mewWallet-ANFGVCZT.js +7 -0
- package/dist/clients/oktoWallet-Q5XCEOTD.js +7 -0
- package/dist/clients/okxWallet-GJMKZIND.js +7 -0
- package/dist/clients/omniWallet-YH4FEL6J.js +7 -0
- package/dist/clients/oneInchWallet-4S73ZPPN.js +7 -0
- package/dist/clients/oneKeyWallet-YVJDPHJS.js +7 -0
- package/dist/clients/phantomWallet-LZDJJ5XR.js +7 -0
- package/dist/clients/polymarket/PolymarketDepositAccountDropdown.css +17293 -0
- package/dist/clients/polymarket/PolymarketDepositAccountDropdown.d.ts +30 -0
- package/dist/clients/polymarket/PolymarketDepositAccountDropdown.js +14 -0
- package/dist/clients/polymarket/createPolymarketDepositConfig.d.ts +54 -0
- package/dist/clients/polymarket/createPolymarketDepositConfig.js +15 -0
- package/dist/clients/polymarket/index.css +17293 -0
- package/dist/clients/polymarket/index.d.ts +8 -0
- package/dist/clients/polymarket/index.js +42 -0
- package/dist/clients/{polymarket.d.ts → polymarket/polymarket.d.ts} +59 -2
- package/dist/clients/polymarket/polymarket.js +24 -0
- package/dist/clients/polymarket/usePolymarketAccountBalances.d.ts +66 -0
- package/dist/clients/polymarket/usePolymarketAccountBalances.js +12 -0
- package/dist/clients/rabbyWallet-TYX2JDHU.js +7 -0
- package/dist/clients/rainbowWallet-MFJQCICF.js +7 -0
- package/dist/clients/ramperWallet-Q2XAH4WA.js +7 -0
- package/dist/clients/rolly.d.ts +2 -0
- package/dist/clients/rolly.js +6 -2
- package/dist/clients/roninWallet-SAB5ESVK.js +7 -0
- package/dist/clients/safeWallet-Y3VPODK2.js +7 -0
- package/dist/clients/safeheronWallet-MCFXLKO5.js +7 -0
- package/dist/clients/safepalWallet-7YULGM2L.js +7 -0
- package/dist/clients/subWallet-5WUZ4IIO.js +7 -0
- package/dist/clients/tahoWallet-U2VWWO76.js +7 -0
- package/dist/clients/talismanWallet-ZYTPIANG.js +7 -0
- package/dist/clients/tokenPocketWallet-FLFG3JUQ.js +7 -0
- package/dist/clients/tokenaryWallet-S3JS2IGK.js +7 -0
- package/dist/clients/trustWallet-2N5TZJGC.js +7 -0
- package/dist/clients/uniswapWallet-NJQBP5VM.js +7 -0
- package/dist/clients/walletConnectWallet-E4OQJ4DC.js +7 -0
- package/dist/clients/xdefiWallet-ZKBEFEOH.js +7 -0
- package/dist/clients/zealWallet-7VO3C4PM.js +7 -0
- package/dist/clients/zerionWallet-SEPREHKH.js +7 -0
- package/dist/components/Dropdown/AccountSelectDropdown.d.ts +45 -0
- package/dist/components/Dropdown/BaseDropdownItem.d.ts +3 -1
- package/dist/components/FreeUsdcBanner/FreeUsdcBanner.css.d.ts +15 -0
- package/dist/components/FreeUsdcBanner/FreeUsdcBanner.d.ts +5 -5
- package/dist/components/ModalHeightAnimationLayer/ModalHeightAnimationLayer.d.ts +8 -0
- package/dist/domains/aave.d.ts +28 -0
- package/dist/domains/dynamicRouting.d.ts +13 -1
- package/dist/domains/quote.d.ts +2 -2
- package/dist/hooks/track/CheckoutModalEvent.d.ts +1 -0
- package/dist/hooks/useExchangeOptions.d.ts +11 -2
- package/dist/hooks/useTokenAndChainDropdown.d.ts +1 -1
- package/dist/index.css +1325 -88
- package/dist/index.js +4291 -3258
- package/dist/modals/CheckoutModal/FunCheckoutStep.d.ts +2 -1
- package/dist/modals/CheckoutModal/InputAmount/aaveClient.d.ts +3 -7
- package/dist/modals/CheckoutModal/InputAmount/useAaveNativeSupply.d.ts +2 -19
- package/dist/modals/CheckoutModal/SourceChange/SourceChange.d.ts +1 -1
- package/dist/modals/CheckoutModal/SourceChange/useSourceChangeLayout.d.ts +10 -0
- package/dist/modals/CheckoutModal/stepTransition.d.ts +27 -1
- package/dist/modals/PolymarketPerpsTransfer/DirectionSwapButton.d.ts +17 -0
- package/dist/modals/PolymarketPerpsTransfer/PerpsTransferBottomBar.d.ts +11 -0
- package/dist/modals/PolymarketPerpsTransfer/PerpsTransferRows.d.ts +10 -0
- package/dist/modals/PolymarketPerpsTransfer/PerpsTransferStep.d.ts +11 -0
- package/dist/modals/PolymarketPerpsTransfer/PolymarketPerpsTransferScreen.d.ts +52 -0
- package/dist/modals/PolymarketPerpsTransfer/TransferActionButton.d.ts +34 -0
- package/dist/modals/PolymarketPerpsTransfer/TransferAmountRow.css.d.ts +13 -0
- package/dist/modals/PolymarketPerpsTransfer/TransferAmountRow.d.ts +27 -0
- package/dist/modals/PolymarketPerpsTransfer/usePerpsTransferForm.d.ts +66 -0
- package/dist/providers/FunkitCheckoutContext/index.d.ts +10 -1
- package/dist/providers/FunkitCheckoutContext/types.d.ts +63 -3
- package/dist/providers/FunkitConfigContext.d.ts +13 -2
- package/dist/providers/FunkitQuoteContext.d.ts +16 -0
- package/dist/utils/freeUsdcBanner.d.ts +3 -0
- package/dist/utils/tokenMath.d.ts +6 -0
- package/dist/wallets/walletConnectors/index.js +43 -43
- package/package.json +7 -6
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Aave native-supply domain logic: pure constants and predicates shared by
|
|
3
|
+
* the InputAmount fast-path hook and `FunkitQuoteContext` (toggle gating).
|
|
4
|
+
* The `@aave/client` SDK singleton stays in
|
|
5
|
+
* `~/modals/CheckoutModal/InputAmount/aaveClient.ts` — importing it here
|
|
6
|
+
* would run SDK init for every consumer of this module.
|
|
7
|
+
*/
|
|
8
|
+
import type { Address } from 'viem';
|
|
9
|
+
import type { FunkitCheckoutConfig } from '../providers/FunkitCheckoutContext';
|
|
10
|
+
export declare const AAVE_MARKET_ADDRESS_BY_CHAIN: Record<string, Address>;
|
|
11
|
+
interface AaveNativeSupplyContextArgs {
|
|
12
|
+
apiKey: string;
|
|
13
|
+
sourceAsset: {
|
|
14
|
+
chainId: string | number;
|
|
15
|
+
address: string;
|
|
16
|
+
};
|
|
17
|
+
checkoutConfig: Pick<FunkitCheckoutConfig, 'targetChain' | 'targetAsset'>;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* True when the customer has the Aave native fast-path enabled, the
|
|
21
|
+
* checkout's target chain has an Aave market configured (membership in
|
|
22
|
+
* AAVE_MARKET_ADDRESS_BY_CHAIN is the single source of truth for "Aave
|
|
23
|
+
* supported here"), and the source asset matches the target asset
|
|
24
|
+
* (same chain, same token address). Decoupled from the hook so callers
|
|
25
|
+
* can branch their UI before mounting the hook.
|
|
26
|
+
*/
|
|
27
|
+
export declare function isAaveNativeSupplyContext({ apiKey, sourceAsset, checkoutConfig, }: AaveNativeSupplyContextArgs): boolean;
|
|
28
|
+
export {};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { DynamicRoutePath } from '@funkit/fun-relay';
|
|
2
|
-
import type { FunkitCheckoutConfig } from '../providers/FunkitCheckoutContext';
|
|
2
|
+
import type { DynamicTargetAssetCandidate, FunkitCheckoutConfig } from '../providers/FunkitCheckoutContext';
|
|
3
3
|
/**
|
|
4
4
|
* The path shape accepted by {@link mergeDynamicRoutingIntoConfig} /
|
|
5
5
|
* `applyDynamicRouting`. It is a {@link DynamicRoutePath} with the
|
|
@@ -22,3 +22,15 @@ export type ApplyDynamicRoutingPath = Omit<DynamicRoutePath, 'getCustomRecipient
|
|
|
22
22
|
* route when the target asset/chain is rebound.
|
|
23
23
|
*/
|
|
24
24
|
export declare function mergeDynamicRoutingIntoConfig(config: FunkitCheckoutConfig, path: ApplyDynamicRoutingPath): FunkitCheckoutConfig;
|
|
25
|
+
/**
|
|
26
|
+
* Merge a selected {@link DynamicTargetAssetCandidate} into a checkout config —
|
|
27
|
+
* the pure core of `applyDynamicTargetAssetCandidate`. Rebinds the target token
|
|
28
|
+
* fields and, in lockstep, the `dynamicRoutingId`; when the candidate carries a
|
|
29
|
+
* `customRecipient` (account-style candidates such as Polymarket
|
|
30
|
+
* Predictions/Perps) it also repoints the recipient, otherwise the existing
|
|
31
|
+
* recipient and routing id are preserved.
|
|
32
|
+
*
|
|
33
|
+
* Shared by the SourceChange target-asset dropdown and customer account pickers
|
|
34
|
+
* so destination selection has a single, tested code path.
|
|
35
|
+
*/
|
|
36
|
+
export declare function mergeDynamicTargetAssetCandidateIntoConfig(config: FunkitCheckoutConfig, candidate: DynamicTargetAssetCandidate): FunkitCheckoutConfig;
|
package/dist/domains/quote.d.ts
CHANGED
|
@@ -18,8 +18,8 @@ export declare function getCheckoutBaseQuote(checkoutItem: FunkitActiveCheckoutI
|
|
|
18
18
|
* User-driven preference for the source-side authorization step. Forwarded
|
|
19
19
|
* to the direct-execution branch (`getDirectExecutionQuote` →
|
|
20
20
|
* `getCheckoutQuoteV2`) where Relay's `usePermit` flag actually flows. The
|
|
21
|
-
* legacy `getApiCheckoutQuote` branch ignores this
|
|
22
|
-
*
|
|
21
|
+
* legacy `getApiCheckoutQuote` branch ignores this. On the Aave native
|
|
22
|
+
* fast path it drives `shouldUsePermitForSupply` instead of flowing here.
|
|
23
23
|
*/
|
|
24
24
|
usePermit?: boolean): Promise<CheckoutQuoteResponse>;
|
|
25
25
|
/**
|
|
@@ -25,6 +25,7 @@ export declare enum CheckoutModalEvent {
|
|
|
25
25
|
NAVIGATE_BROKERAGE_TWO_FA = "fc::navigate::brokerage_two_fa",
|
|
26
26
|
NAVIGATE_BROKERAGE_SUCCESS = "fc::navigate::brokerage_success",
|
|
27
27
|
NAVIGATE_SWAPPED_IFRAME = "fc::navigate::swapped_iframe",
|
|
28
|
+
NAVIGATE_PERPS_TRANSFER = "fc::navigate::perps_transfer",
|
|
28
29
|
READY_CONFIRMATION = "fc::ready::confirmation",
|
|
29
30
|
READY_INPUT_AMOUNT = "fc::ready::input_amount",
|
|
30
31
|
READY_SELECT_ASSET = "fc::ready::select_asset",
|
|
@@ -5,6 +5,15 @@ import { type BrokerageOption } from '../consts/bluvo';
|
|
|
5
5
|
* payment-method preview row. Live entries come first; ComingSoon (and
|
|
6
6
|
* FOPs that came back without an embeddedFlowUrl) follow.
|
|
7
7
|
*/
|
|
8
|
-
export declare function useExchangeOptions({ iconSize
|
|
8
|
+
export declare function useExchangeOptions({ iconSize }: {
|
|
9
9
|
iconSize: number;
|
|
10
|
-
}):
|
|
10
|
+
}): {
|
|
11
|
+
options: BrokerageOption[];
|
|
12
|
+
/**
|
|
13
|
+
* True while the Swapped FOPs are stale placeholder data (kept visible during
|
|
14
|
+
* a refetch triggered by a recipient/destination change). Callers that act on
|
|
15
|
+
* a selection should gate Swapped options on this, since a stale FOP's
|
|
16
|
+
* embedded flow URL may still target the previous recipient.
|
|
17
|
+
*/
|
|
18
|
+
isPlaceholderData: boolean;
|
|
19
|
+
};
|
|
@@ -19,7 +19,7 @@ interface UseTokenChainResult {
|
|
|
19
19
|
export interface UseTokenAndChainDropdownOptions {
|
|
20
20
|
transferInit?: CheckoutInitTokenTransferResponse;
|
|
21
21
|
defaultValues?: TransferTokenDefault;
|
|
22
|
-
/** When true,
|
|
22
|
+
/** When true, resolves the withdrawal Statsig config instead of the token-transfer one. Defaults to false. */
|
|
23
23
|
isWithdrawal?: boolean;
|
|
24
24
|
/** When true, starts with no chain/token pre-selected (user must pick both). Defaults to false. */
|
|
25
25
|
noDefaultSelection?: boolean;
|