@funkit/connect 9.15.1 → 9.17.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 +63 -0
- package/dist/__generated__/default_feature_gates.d.ts +1 -0
- package/dist/{chunk-76E6MOLR.js → chunk-C2DLTEP2.js} +1 -0
- package/dist/{chunk-AVVB5AIE.js → chunk-PPNE44RL.js} +1 -0
- package/dist/clients/aave.d.ts +15 -0
- package/dist/clients/aave.js +29 -4
- package/dist/clients/{chunk-H6F75ULR.js → chunk-3QHYYLVM.js} +59 -39
- package/dist/clients/chunk-JOBMGIG4.js +290 -0
- package/dist/clients/fanatics.css +3458 -3395
- package/dist/clients/fanatics.js +3 -3
- package/dist/clients/lighter.css +3458 -3395
- package/dist/clients/lighter.js +10 -4
- package/dist/clients/polymarket.js +2 -1
- package/dist/components/ApprovalMethodToggle/ApprovalMethodToggle.d.ts +3 -6
- package/dist/components/Box/Box.d.ts +21 -21
- package/dist/components/CopyAddress/CopyAddressButton.d.ts +1 -1
- package/dist/components/CopyAddress/OldCopyAddressButton.d.ts +1 -1
- package/dist/components/Dialog/Dialog.d.ts +11 -1
- package/dist/components/Dropdown/BaseActiveDropdownItem.d.ts +7 -1
- package/dist/components/Dropdown/BaseDropdown.d.ts +1 -1
- package/dist/components/FunCheckoutHistory/AddTokenToWalletButton.css.d.ts +1 -0
- package/dist/components/FunCheckoutHistory/AddTokenToWalletButton.d.ts +47 -0
- package/dist/components/FunCheckoutHistory/FunDirectExecutionHistoryDetail.d.ts +1 -1
- package/dist/components/FunInfoBanner/ChainInfoBanners.d.ts +1 -1
- package/dist/components/FunOptionBox/FunOptionBox.css.d.ts +1 -1
- package/dist/components/FunTransactionSummary/DestinationYieldRows.d.ts +16 -0
- package/dist/components/FunTransactionSummary/PaymentMethodSummary.d.ts +7 -1
- package/dist/components/Icons/CaretDownIcon.d.ts +6 -1
- package/dist/components/ModalErrorState/ModalErrorState.d.ts +24 -0
- package/dist/consts/funkit.d.ts +0 -4
- package/dist/css/sprinkles.css.d.ts +32 -21
- package/dist/domains/checkoutNotifications.d.ts +46 -0
- package/dist/domains/meld.d.ts +0 -2
- package/dist/hooks/queries/useLightningQuote.d.ts +21 -0
- package/dist/hooks/queries/useRecentCheckouts.d.ts +0 -1
- package/dist/hooks/queries/useRecentDeposits.d.ts +0 -21
- package/dist/hooks/track/CheckoutModalEvent.d.ts +5 -1
- package/dist/hooks/useAssetPrice.d.ts +9 -3
- package/dist/hooks/useCheckoutDirectExecutionHistory.d.ts +1 -1
- package/dist/hooks/useIsCheckoutComplete.d.ts +13 -0
- package/dist/index.css +3547 -3466
- package/dist/index.d.ts +1 -1
- package/dist/index.js +4304 -3398
- package/dist/interfaces/identity.d.ts +41 -0
- package/dist/interfaces/logTransport.d.ts +51 -0
- package/dist/interfaces/swapped-transport.d.ts +78 -0
- package/dist/modals/CheckoutModal/CheckoutModalPrefetchedHooks.d.ts +7 -0
- package/dist/modals/CheckoutModal/FunCheckoutStep.d.ts +1 -0
- package/dist/modals/CheckoutModal/InputAmount/InputAmountLoaded.d.ts +1 -1
- package/dist/modals/CheckoutModal/InputAmount/useAaveNativeSupply.d.ts +77 -9
- package/dist/modals/CheckoutModal/InputAmount/useMeld.d.ts +3 -5
- package/dist/modals/CheckoutModal/LightningInvoice/LightningInvoice.d.ts +9 -0
- package/dist/modals/CheckoutModal/LightningInvoice/LightningInvoiceQrCode.d.ts +8 -0
- package/dist/modals/CheckoutModal/SelectAsset/SelectAsset.d.ts +4 -0
- package/dist/modals/CheckoutModal/SourceChange/SourceChange.d.ts +7 -2
- package/dist/modals/CheckoutModal/SourceChange/SourceChangeLoading.d.ts +1 -1
- package/dist/modals/CheckoutModal/TransferToken/CheckoutNotifications.d.ts +0 -6
- package/dist/modals/CheckoutModal/TransferToken/DirectExecutionNotification.d.ts +1 -1
- package/dist/modals/CheckoutModal/TransferToken/types.d.ts +2 -2
- package/dist/modals/CheckoutModal/selectSuccessScreenBackground.d.ts +29 -0
- package/dist/modals/CheckoutModal/stepTransition.d.ts +3 -0
- package/dist/modals/ProfileDetails/FunProfileViews/Home/HomeCheckoutDisplayRow.css.d.ts +1 -1
- package/dist/providers/FunkitCheckoutContext/types.d.ts +41 -0
- package/dist/providers/FunkitConfigContext.d.ts +9 -2
- package/dist/providers/FunkitHistoryContext.d.ts +1 -1
- package/dist/providers/FunkitQuoteContext.d.ts +17 -1
- package/dist/providers/FunkitThemeProvider.d.ts +3 -0
- package/dist/providers/GeneralWalletProvider.d.ts +18 -0
- package/dist/providers/SwappedProvider.d.ts +2 -0
- package/dist/themes/darkTheme.js +1 -1
- package/dist/themes/lightTheme.js +1 -1
- package/dist/transports/iframeSwappedTransport.d.ts +16 -0
- package/dist/utils/address.d.ts +5 -0
- package/dist/utils/assets.d.ts +0 -7
- package/dist/utils/datadogBrowserLogsTransport.d.ts +17 -0
- package/dist/utils/directExecution.d.ts +1 -2
- package/dist/utils/funLogger.d.ts +8 -2
- package/dist/utils/purifyCheckoutHistoryItem.d.ts +15 -1
- package/dist/utils/swapped.d.ts +14 -1
- package/dist/wagmi/chains.d.ts +1 -1
- package/dist/wagmi/hooks.d.ts +1 -1
- package/dist/wallets/walletConnectors/argentWallet/argentWallet.js +3 -3
- package/dist/wallets/walletConnectors/bifrostWallet/bifrostWallet.js +4 -4
- package/dist/wallets/walletConnectors/bitgetWallet/bitgetWallet.js +4 -4
- package/dist/wallets/walletConnectors/bitskiWallet/bitskiWallet.js +3 -3
- package/dist/wallets/walletConnectors/bitverseWallet/bitverseWallet.js +3 -3
- package/dist/wallets/walletConnectors/bloomWallet/bloomWallet.js +3 -3
- package/dist/wallets/walletConnectors/braveWallet/braveWallet.js +3 -3
- package/dist/wallets/walletConnectors/bybitWallet/bybitWallet.js +4 -4
- package/dist/wallets/walletConnectors/{chunk-G3RQSCYR.js → chunk-2CX7LX4J.js} +1 -1
- package/dist/wallets/walletConnectors/{chunk-OUM6H3WU.js → chunk-2DLDAZRH.js} +1 -1
- package/dist/wallets/walletConnectors/{chunk-AZYMJ4C6.js → chunk-2VP2F6EK.js} +4 -4
- package/dist/wallets/walletConnectors/{chunk-O7ZCUI2Y.js → chunk-3FCWJRI4.js} +1 -1
- package/dist/wallets/walletConnectors/{chunk-T3VMQBBI.js → chunk-4DCO3TGL.js} +1 -1
- package/dist/wallets/walletConnectors/{chunk-OD6B2ISG.js → chunk-4T6ZSRJF.js} +4 -4
- package/dist/wallets/walletConnectors/{chunk-A5EZBNME.js → chunk-52QXXLDS.js} +1 -1
- package/dist/wallets/walletConnectors/{chunk-RZQ4B4Z7.js → chunk-6BW3HLBG.js} +4 -4
- package/dist/wallets/walletConnectors/{chunk-AM5MSNVQ.js → chunk-76S7R2ND.js} +1 -1
- package/dist/wallets/walletConnectors/{chunk-Y36HPFB3.js → chunk-7HRFUZFX.js} +1 -1
- package/dist/wallets/walletConnectors/{chunk-KS5MJNGD.js → chunk-7ZYCBDQ4.js} +1 -1
- package/dist/wallets/walletConnectors/{chunk-MTJIPVYB.js → chunk-BU3ZAT5X.js} +1 -1
- package/dist/wallets/walletConnectors/{chunk-IRHK6SOW.js → chunk-CCQV2ZET.js} +4 -4
- package/dist/wallets/walletConnectors/{chunk-IMNI4AGV.js → chunk-CPI4TD43.js} +4 -4
- package/dist/wallets/walletConnectors/{chunk-XVH4JIXB.js → chunk-DS73TZ6O.js} +1 -1
- package/dist/wallets/walletConnectors/{chunk-7IEUTLHY.js → chunk-F5XEEVG6.js} +4 -4
- package/dist/wallets/walletConnectors/{chunk-TNVLCMJD.js → chunk-FW3WZETT.js} +1 -1
- package/dist/wallets/walletConnectors/{chunk-PARFRRNI.js → chunk-G2PHTVL6.js} +1 -1
- package/dist/wallets/walletConnectors/{chunk-2DKNXOPL.js → chunk-HBQK5RD5.js} +1 -1
- package/dist/wallets/walletConnectors/{chunk-LEAZMT5Y.js → chunk-HNRB7KJU.js} +4 -4
- package/dist/wallets/walletConnectors/{chunk-UYW6MV74.js → chunk-HTHAK6XB.js} +4 -4
- package/dist/wallets/walletConnectors/{chunk-3K2MFXCO.js → chunk-IGKXZBTA.js} +1 -0
- package/dist/wallets/walletConnectors/{chunk-KSNA53EX.js → chunk-JN5I3DNC.js} +1 -1
- package/dist/wallets/walletConnectors/{chunk-YGMU5VWD.js → chunk-MIQTHJ6X.js} +4 -4
- package/dist/wallets/walletConnectors/{chunk-DP5ICBEB.js → chunk-MQM45ADF.js} +1 -1
- package/dist/wallets/walletConnectors/{chunk-FMVNQKZL.js → chunk-N4IJLYFY.js} +1 -1
- package/dist/wallets/walletConnectors/{chunk-RZH4FSX7.js → chunk-NSK6A7TI.js} +1 -1
- package/dist/wallets/walletConnectors/{chunk-XTD6OMZP.js → chunk-NTMBEOR2.js} +1 -1
- package/dist/wallets/walletConnectors/{chunk-YYYRPQHB.js → chunk-OLZ7626J.js} +1 -1
- package/dist/wallets/walletConnectors/{chunk-P4E2ZFQB.js → chunk-OQB55QXP.js} +1 -1
- package/dist/wallets/walletConnectors/{chunk-S6R4B763.js → chunk-PJ7Y57EH.js} +1 -1
- package/dist/wallets/walletConnectors/{chunk-EUMOVTRQ.js → chunk-QG6ZHI7B.js} +1 -1
- package/dist/wallets/walletConnectors/{chunk-57GN4W23.js → chunk-QY53O7WG.js} +1 -1
- package/dist/wallets/walletConnectors/{chunk-55VS2NKG.js → chunk-RB3HR4R2.js} +4 -4
- package/dist/wallets/walletConnectors/{chunk-7PVUEV4M.js → chunk-RB66PKPA.js} +1 -1
- package/dist/wallets/walletConnectors/{chunk-BHAPTB57.js → chunk-RCY66YHF.js} +1 -1
- package/dist/wallets/walletConnectors/{chunk-O4IDLNBH.js → chunk-RICTB3FA.js} +1 -1
- package/dist/wallets/walletConnectors/{chunk-V4EXM3KB.js → chunk-RPV27V2Y.js} +1 -1
- package/dist/wallets/walletConnectors/{chunk-UFYNHHDU.js → chunk-RVOY537T.js} +4 -4
- package/dist/wallets/walletConnectors/{chunk-ZL6XCMV5.js → chunk-STVVP43G.js} +4 -4
- package/dist/wallets/walletConnectors/{chunk-HPUEYLLS.js → chunk-T6LGKC3F.js} +1 -1
- package/dist/wallets/walletConnectors/{chunk-3ZJN3PXP.js → chunk-UK7C2JXW.js} +4 -4
- package/dist/wallets/walletConnectors/{chunk-OSOB6QYX.js → chunk-VAPGUPHO.js} +4 -4
- package/dist/wallets/walletConnectors/{chunk-R7X5RIO7.js → chunk-VH3THHJY.js} +1 -1
- package/dist/wallets/walletConnectors/{chunk-VMMROPXK.js → chunk-VTM6EECM.js} +4 -4
- package/dist/wallets/walletConnectors/{chunk-BWLMNATA.js → chunk-WNAGGFMG.js} +1 -1
- package/dist/wallets/walletConnectors/{chunk-E3NZE4UP.js → chunk-WVT6BBJH.js} +1 -1
- package/dist/wallets/walletConnectors/{chunk-ZJJWGKB6.js → chunk-X6CGV36L.js} +4 -4
- package/dist/wallets/walletConnectors/{chunk-J3PJOMO7.js → chunk-YEZM4CK4.js} +4 -4
- package/dist/wallets/walletConnectors/{chunk-BBPTPMH7.js → chunk-YWOVAU6O.js} +1 -1
- package/dist/wallets/walletConnectors/{chunk-UKSIXGWC.js → chunk-Z3PPW6NC.js} +1 -1
- package/dist/wallets/walletConnectors/{chunk-FWM4KTOV.js → chunk-ZNX4EMPB.js} +4 -4
- package/dist/wallets/walletConnectors/clvWallet/clvWallet.js +4 -4
- package/dist/wallets/walletConnectors/coin98Wallet/coin98Wallet.js +4 -4
- package/dist/wallets/walletConnectors/coinbaseWallet/coinbaseWallet.js +2 -2
- package/dist/wallets/walletConnectors/coreWallet/coreWallet.js +4 -4
- package/dist/wallets/walletConnectors/dawnWallet/dawnWallet.js +3 -3
- package/dist/wallets/walletConnectors/desigWallet/desigWallet.js +3 -3
- package/dist/wallets/walletConnectors/enkryptWallet/enkryptWallet.js +3 -3
- package/dist/wallets/walletConnectors/foxWallet/foxWallet.js +4 -4
- package/dist/wallets/walletConnectors/frameWallet/frameWallet.js +3 -3
- package/dist/wallets/walletConnectors/frontierWallet/frontierWallet.js +4 -4
- package/dist/wallets/walletConnectors/gateWallet/gateWallet.js +4 -4
- package/dist/wallets/walletConnectors/imTokenWallet/imTokenWallet.js +3 -3
- package/dist/wallets/walletConnectors/index.js +77 -77
- package/dist/wallets/walletConnectors/injectedWallet/injectedWallet.js +3 -3
- package/dist/wallets/walletConnectors/kresusWallet/kresusWallet.js +3 -3
- package/dist/wallets/walletConnectors/ledgerWallet/ledgerWallet.js +3 -3
- package/dist/wallets/walletConnectors/metaMaskWallet/metaMaskWallet.js +4 -4
- package/dist/wallets/walletConnectors/mewWallet/mewWallet.js +3 -3
- package/dist/wallets/walletConnectors/oktoWallet/oktoWallet.js +3 -3
- package/dist/wallets/walletConnectors/okxWallet/okxWallet.js +4 -4
- package/dist/wallets/walletConnectors/omniWallet/omniWallet.js +3 -3
- package/dist/wallets/walletConnectors/oneInchWallet/oneInchWallet.js +3 -3
- package/dist/wallets/walletConnectors/oneKeyWallet/oneKeyWallet.js +3 -3
- package/dist/wallets/walletConnectors/phantomWallet/phantomWallet.js +3 -3
- package/dist/wallets/walletConnectors/rabbyWallet/rabbyWallet.js +3 -3
- package/dist/wallets/walletConnectors/rainbowWallet/rainbowWallet.js +4 -4
- package/dist/wallets/walletConnectors/ramperWallet/ramperWallet.js +3 -3
- package/dist/wallets/walletConnectors/roninWallet/roninWallet.js +4 -4
- package/dist/wallets/walletConnectors/safeWallet/safeWallet.js +2 -2
- package/dist/wallets/walletConnectors/safeheronWallet/safeheronWallet.js +3 -3
- package/dist/wallets/walletConnectors/safepalWallet/safepalWallet.js +4 -4
- package/dist/wallets/walletConnectors/subWallet/subWallet.js +4 -4
- package/dist/wallets/walletConnectors/tahoWallet/tahoWallet.js +3 -3
- package/dist/wallets/walletConnectors/talismanWallet/talismanWallet.js +3 -3
- package/dist/wallets/walletConnectors/tokenPocketWallet/tokenPocketWallet.js +4 -4
- package/dist/wallets/walletConnectors/tokenaryWallet/tokenaryWallet.js +3 -3
- package/dist/wallets/walletConnectors/trustWallet/trustWallet.js +4 -4
- package/dist/wallets/walletConnectors/uniswapWallet/uniswapWallet.js +3 -3
- package/dist/wallets/walletConnectors/walletConnectWallet/walletConnectWallet.js +3 -3
- package/dist/wallets/walletConnectors/xdefiWallet/xdefiWallet.js +3 -3
- package/dist/wallets/walletConnectors/zealWallet/zealWallet.js +3 -3
- package/dist/wallets/walletConnectors/zerionWallet/zerionWallet.js +4 -4
- package/package.json +5 -6
- package/dist/clients/chunk-PLDXBAAH.js +0 -290
- package/dist/modals/CheckoutModal/SourceChange/EmptyFormOfPaymentsMessage.d.ts +0 -4
- package/dist/modals/CheckoutModal/SourceChange/useUpdateSourceAssetForCard.d.ts +0 -4
- package/dist/modals/CheckoutModal/SwappedIframe/SwappedErrorMessage.d.ts +0 -6
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { AssetBalanceInfo } from '@funkit/api-base';
|
|
2
2
|
import React, { type ReactNode } from 'react';
|
|
3
3
|
import type { Address } from 'viem';
|
|
4
|
+
import type { IdentityProvider } from '../interfaces/identity';
|
|
4
5
|
import { type UseDisconnectReturnType, type UseReconnectReturnType } from '../wagmi/hooks';
|
|
5
6
|
import { type FunkitUserInfo } from '../consts/funkit';
|
|
6
7
|
import { LoginType } from '../utils/userInfo';
|
|
@@ -22,6 +23,23 @@ export declare function GeneralWalletProvider({ children }: {
|
|
|
22
23
|
children: ReactNode;
|
|
23
24
|
}): React.JSX.Element;
|
|
24
25
|
export declare const useGeneralWallet: () => GeneralWalletContextProps;
|
|
26
|
+
/**
|
|
27
|
+
* Web implementation of the {@link IdentityProvider} contract: exposes the
|
|
28
|
+
* connected-wallet **user** identity (`GeneralWalletProvider`) as the
|
|
29
|
+
* platform-agnostic {@link FunkitIdentity} consumed by core hooks. React Native
|
|
30
|
+
* supplies its own implementation from host props.
|
|
31
|
+
*
|
|
32
|
+
* Customer identity (`apiKey`) is deliberately *not* included — it lives on
|
|
33
|
+
* `useFunkitConfig` so user identity and customer identity stay separable.
|
|
34
|
+
*
|
|
35
|
+
* `userId` is `userInfo.id` (not `userInfo.address`). `walletAddress` is the
|
|
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).
|
|
41
|
+
*/
|
|
42
|
+
export declare const useIdentity: IdentityProvider['useIdentity'];
|
|
25
43
|
/**
|
|
26
44
|
* Replacement for wagmi's `useAccount`
|
|
27
45
|
*/
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { type FormOfPaymentType } from '@funkit/api-base';
|
|
2
2
|
import React from 'react';
|
|
3
|
+
import type { SwappedTransport } from '../interfaces/swapped-transport';
|
|
3
4
|
import { type SwappedTheme } from '../utils/swapped';
|
|
4
5
|
interface SwappedContextValue {
|
|
5
6
|
iframeUrl: string | null;
|
|
@@ -12,6 +13,7 @@ interface SwappedContextValue {
|
|
|
12
13
|
setIframeRef: (el: HTMLIFrameElement | null) => void;
|
|
13
14
|
focusAmountInput: () => void;
|
|
14
15
|
swappedTheme: SwappedTheme;
|
|
16
|
+
swappedTransport: SwappedTransport;
|
|
15
17
|
}
|
|
16
18
|
export declare function SwappedProvider({ children }: {
|
|
17
19
|
children: React.ReactNode;
|
package/dist/themes/darkTheme.js
CHANGED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { SwappedTransport } from '../interfaces/swapped-transport';
|
|
2
|
+
interface IframeSwappedTransportOptions {
|
|
3
|
+
/** The embed's content window, or `null` if it isn't mounted/loaded yet. */
|
|
4
|
+
getContentWindow: () => Window | null;
|
|
5
|
+
/** The validated target origin for `postMessage`, or `null` if unavailable. */
|
|
6
|
+
getTargetOrigin: () => string | null;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* Web {@link SwappedTransport}: bridges the typed Swapped message contract over
|
|
10
|
+
* an `<iframe>` + `window.postMessage`. React Native ships a `WebView`-backed
|
|
11
|
+
* equivalent against the same interface. The DOM-bound pieces (`window`,
|
|
12
|
+
* `postMessage`, the `message` event) live here so the contract and the
|
|
13
|
+
* provider state machine stay platform-agnostic.
|
|
14
|
+
*/
|
|
15
|
+
export declare function createIframeSwappedTransport({ getContentWindow, getTargetOrigin, }: IframeSwappedTransportOptions): SwappedTransport;
|
|
16
|
+
export {};
|
package/dist/utils/address.d.ts
CHANGED
|
@@ -7,3 +7,8 @@ export declare function isWithdrawalAddressSupported(address: string): boolean;
|
|
|
7
7
|
* Supports EVM, Solana, and Tron chains for withdrawal.
|
|
8
8
|
*/
|
|
9
9
|
export declare function isAddressCompatibleWithChain(address: string, chainId: number): boolean;
|
|
10
|
+
/**
|
|
11
|
+
* True for any positive-integer (string-encoded) chain id that isn't a known
|
|
12
|
+
* non-EVM chain. Used to gate EVM-only flows (EIP-747, etc.).
|
|
13
|
+
*/
|
|
14
|
+
export declare function isEvmChainId(chainId: string): boolean;
|
package/dist/utils/assets.d.ts
CHANGED
|
@@ -1,11 +1,4 @@
|
|
|
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
|
-
*
|
|
6
|
-
* @param {FunkitCheckoutConfig} checkoutConfig
|
|
7
|
-
* @param mockedChains optional array of additional chains we want to replace with FALLBACK_CHAIN_ID
|
|
8
|
-
* @returns targetChain either from the provided config or Base chainId for non-evm chains processed with evm tech
|
|
9
|
-
*/
|
|
10
|
-
export declare const getMockedTargetChainId: ({ targetChain }: FunkitCheckoutConfig, mockedChains?: string[]) => string;
|
|
11
4
|
export declare const getDefaultDynamicTargetAsset: (checkoutConfig: FunkitCheckoutConfig | undefined) => DynamicTargetAssetCandidate;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { LogRecord, LogTransport, TrackingConsent } from '../interfaces/logTransport';
|
|
2
|
+
/**
|
|
3
|
+
* Web `LogTransport` backed by `@datadog/browser-logs`. Owns Datadog
|
|
4
|
+
* initialization, global-context/consent wiring, and the browser-only emit.
|
|
5
|
+
*
|
|
6
|
+
* This is the platform half of the logger that stays in `@funkit/connect` when
|
|
7
|
+
* `FunLogger` moves to `@funkit/connect-core`; React Native ships a Datadog
|
|
8
|
+
* React Native transport (`@datadog/mobile-react-native`) instead. Constructing
|
|
9
|
+
* it runs `datadogLogs.init` once (the global singleton does this on import,
|
|
10
|
+
* matching prior behavior).
|
|
11
|
+
*/
|
|
12
|
+
export declare class DatadogBrowserLogsTransport implements LogTransport {
|
|
13
|
+
constructor();
|
|
14
|
+
setEnv(environment: string): void;
|
|
15
|
+
setTrackingConsent(consent: TrackingConsent): void;
|
|
16
|
+
log({ level, title, context, error }: LogRecord): void;
|
|
17
|
+
}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import type { DirectExecution } from '@funkit/api-base';
|
|
2
2
|
import type { WalletClient } from 'viem';
|
|
3
|
-
import type { MergedMultiStepDirectExecution } from '../hooks/queries/useRecentDeposits';
|
|
4
3
|
export declare function getDirectExecutionCreatedTimeMs(directExecution: DirectExecution): number;
|
|
5
4
|
export declare function getDirectExecutionUpdatedTimeMs(directExecution: DirectExecution): number;
|
|
6
5
|
/**
|
|
@@ -10,7 +9,7 @@ export declare function getDirectExecutionUpdatedTimeMs(directExecution: DirectE
|
|
|
10
9
|
* changes but triggeringTxHash stays the same. Preferring triggeringTxHash keeps
|
|
11
10
|
* the identity stable across that swap, avoiding a flash/remount of the notification.
|
|
12
11
|
*/
|
|
13
|
-
export declare function getDirectExecutionNotificationKey(item:
|
|
12
|
+
export declare function getDirectExecutionNotificationKey(item: DirectExecution): string;
|
|
14
13
|
export declare function getDirectExecutionRunTimeSeconds(directExecution: DirectExecution): number;
|
|
15
14
|
/**
|
|
16
15
|
* Resolves the completion transaction chain, hash, and explorer URL for a direct execution.
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { LogTransport } from '../interfaces/logTransport';
|
|
1
2
|
declare class FunLogger {
|
|
2
3
|
protected apiKey: string | null;
|
|
3
4
|
protected isDebugMode: boolean;
|
|
@@ -11,9 +12,11 @@ declare class FunLogger {
|
|
|
11
12
|
private isConfigured;
|
|
12
13
|
private logQueue;
|
|
13
14
|
private disableLogging;
|
|
14
|
-
|
|
15
|
+
private readonly transport;
|
|
16
|
+
constructor(transport: LogTransport);
|
|
15
17
|
private getFunLogEnv;
|
|
16
|
-
|
|
18
|
+
/** Merge caller data with the logger's resolved context for the transport. */
|
|
19
|
+
private buildLogContext;
|
|
17
20
|
private processLog;
|
|
18
21
|
private onDebug;
|
|
19
22
|
private onInfo;
|
|
@@ -43,5 +46,8 @@ declare class FunLogger {
|
|
|
43
46
|
getL2Address(): string | null;
|
|
44
47
|
setUserInfo(userId: string, userAddress: string, userName: string, userLoginType: string, typeLabel: string, l2Address?: string): void;
|
|
45
48
|
}
|
|
49
|
+
/**===============================
|
|
50
|
+
* INITIALIZATION
|
|
51
|
+
*================================*/
|
|
46
52
|
declare const logger: FunLogger;
|
|
47
53
|
export { logger, FunLogger };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { type CheckoutHistoryItem, type CheckoutState } from '@funkit/api-base';
|
|
2
2
|
import type { ApiFunkitCheckoutActionParams } from '@funkit/utils';
|
|
3
3
|
import type { Address, Hex } from 'viem';
|
|
4
|
-
import type { MergedMultiStepDirectExecution } from '../
|
|
4
|
+
import type { MergedMultiStepDirectExecution } from '../domains/checkoutNotifications';
|
|
5
5
|
export type PurifiedCheckoutHistoryItem = {
|
|
6
6
|
depositAddr?: Address;
|
|
7
7
|
directExecution: boolean;
|
|
@@ -16,6 +16,20 @@ export type PurifiedCheckoutHistoryItem = {
|
|
|
16
16
|
createdTimeMs: number;
|
|
17
17
|
updatedTimeMs: number;
|
|
18
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
|
+
};
|
|
19
33
|
} & ({
|
|
20
34
|
depositAddr: Address;
|
|
21
35
|
directExecution: false;
|
package/dist/utils/swapped.d.ts
CHANGED
|
@@ -42,10 +42,23 @@ export declare function getSwappedOrigin(url: string): string | null;
|
|
|
42
42
|
export declare function isSwappedOrigin(origin: string): boolean;
|
|
43
43
|
export declare function resolveCssValue(value: string): string;
|
|
44
44
|
export declare function resolveObjectCssVars<T extends object>(obj: T): T;
|
|
45
|
+
/**
|
|
46
|
+
* Builds the SwappedTheme payload from a ThemeVars object. Pure — it does not
|
|
47
|
+
* touch the DOM, so it is safe to share across platforms. The returned values
|
|
48
|
+
* may still contain `var(...)` / `calc(var(...))` references: web callers must
|
|
49
|
+
* resolve them with {@link resolveObjectCssVars} before sending to the Swapped
|
|
50
|
+
* embed, while RN passes already-concrete values from `useFunkitTheme()`.
|
|
51
|
+
*/
|
|
45
52
|
export declare function buildSwappedTheme(theme: ThemeVars & {
|
|
46
53
|
customFontFamily?: {
|
|
47
54
|
primary?: string;
|
|
48
55
|
secondary?: string;
|
|
49
56
|
};
|
|
50
57
|
}, isDarkMode: boolean): SwappedTheme;
|
|
51
|
-
|
|
58
|
+
/**
|
|
59
|
+
* Maps a *resolved* ThemeVars into Swapped's theme query params. Pure — it does
|
|
60
|
+
* not touch the DOM. Web callers must pass a theme whose CSS vars are already
|
|
61
|
+
* resolved (via {@link resolveObjectCssVars}) so colors are concrete hex and the
|
|
62
|
+
* leading `#` can be stripped; RN passes concrete values from `useFunkitTheme()`.
|
|
63
|
+
*/
|
|
64
|
+
export declare function buildSwappedThemeQueryParams(resolvedTheme: ThemeVars): Record<string, string>;
|
package/dist/wagmi/chains.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { arbitrum, base, mainnet, optimism, polygon, zora
|
|
1
|
+
export { arbitrum, base, mainnet, optimism, polygon, zora } from 'wagmi/chains';
|
|
2
2
|
export type { Chain } from 'wagmi/chains';
|
package/dist/wagmi/hooks.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { useAccount, useAccountEffect, useBalance, useConfig, useConnect, useDisconnect, useEnsAvatar, useEnsName, useGasPrice, useReconnect, useSendTransaction, useSwitchChain, useWalletClient, useWriteContract, } from 'wagmi';
|
|
1
|
+
export { useAccount, useAccountEffect, useBalance, useConfig, useConnect, useDisconnect, useEnsAvatar, useEnsName, useGasPrice, useReconnect, useSendTransaction, useSwitchChain, useWalletClient, useWatchAsset, useWriteContract, } from 'wagmi';
|
|
2
2
|
export { WagmiProvider } from 'wagmi';
|
|
3
3
|
export { createConfig, createConnector, http } from 'wagmi';
|
|
4
4
|
export type { Config, Connector, CreateConfigParameters, CreateConnectorFn, UseAccountReturnType, UseConfigReturnType, UseDisconnectReturnType, UseReconnectReturnType, WagmiProviderProps, } from 'wagmi';
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import {
|
|
3
3
|
argentWallet
|
|
4
|
-
} from "../chunk-
|
|
5
|
-
import "../chunk-
|
|
6
|
-
import "../chunk-
|
|
4
|
+
} from "../chunk-NTMBEOR2.js";
|
|
5
|
+
import "../chunk-N4IJLYFY.js";
|
|
6
|
+
import "../chunk-IGKXZBTA.js";
|
|
7
7
|
export {
|
|
8
8
|
argentWallet
|
|
9
9
|
};
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import {
|
|
3
3
|
bifrostWallet
|
|
4
|
-
} from "../chunk-
|
|
5
|
-
import "../chunk-
|
|
6
|
-
import "../chunk-
|
|
7
|
-
import "../chunk-
|
|
4
|
+
} from "../chunk-4T6ZSRJF.js";
|
|
5
|
+
import "../chunk-OLZ7626J.js";
|
|
6
|
+
import "../chunk-N4IJLYFY.js";
|
|
7
|
+
import "../chunk-IGKXZBTA.js";
|
|
8
8
|
export {
|
|
9
9
|
bifrostWallet
|
|
10
10
|
};
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import {
|
|
3
3
|
bitgetWallet
|
|
4
|
-
} from "../chunk-
|
|
5
|
-
import "../chunk-
|
|
6
|
-
import "../chunk-
|
|
7
|
-
import "../chunk-
|
|
4
|
+
} from "../chunk-CPI4TD43.js";
|
|
5
|
+
import "../chunk-OLZ7626J.js";
|
|
6
|
+
import "../chunk-N4IJLYFY.js";
|
|
7
|
+
import "../chunk-IGKXZBTA.js";
|
|
8
8
|
export {
|
|
9
9
|
bitgetWallet
|
|
10
10
|
};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import {
|
|
3
3
|
bitskiWallet
|
|
4
|
-
} from "../chunk-
|
|
5
|
-
import "../chunk-
|
|
6
|
-
import "../chunk-
|
|
4
|
+
} from "../chunk-7HRFUZFX.js";
|
|
5
|
+
import "../chunk-OLZ7626J.js";
|
|
6
|
+
import "../chunk-IGKXZBTA.js";
|
|
7
7
|
export {
|
|
8
8
|
bitskiWallet
|
|
9
9
|
};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import {
|
|
3
3
|
bitverseWallet
|
|
4
|
-
} from "../chunk-
|
|
5
|
-
import "../chunk-
|
|
6
|
-
import "../chunk-
|
|
4
|
+
} from "../chunk-NSK6A7TI.js";
|
|
5
|
+
import "../chunk-N4IJLYFY.js";
|
|
6
|
+
import "../chunk-IGKXZBTA.js";
|
|
7
7
|
export {
|
|
8
8
|
bitverseWallet
|
|
9
9
|
};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import {
|
|
3
3
|
bloomWallet
|
|
4
|
-
} from "../chunk-
|
|
5
|
-
import "../chunk-
|
|
6
|
-
import "../chunk-
|
|
4
|
+
} from "../chunk-PJ7Y57EH.js";
|
|
5
|
+
import "../chunk-N4IJLYFY.js";
|
|
6
|
+
import "../chunk-IGKXZBTA.js";
|
|
7
7
|
export {
|
|
8
8
|
bloomWallet
|
|
9
9
|
};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import {
|
|
3
3
|
braveWallet
|
|
4
|
-
} from "../chunk-
|
|
5
|
-
import "../chunk-
|
|
6
|
-
import "../chunk-
|
|
4
|
+
} from "../chunk-DS73TZ6O.js";
|
|
5
|
+
import "../chunk-OLZ7626J.js";
|
|
6
|
+
import "../chunk-IGKXZBTA.js";
|
|
7
7
|
export {
|
|
8
8
|
braveWallet
|
|
9
9
|
};
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import {
|
|
3
3
|
bybitWallet
|
|
4
|
-
} from "../chunk-
|
|
5
|
-
import "../chunk-
|
|
6
|
-
import "../chunk-
|
|
7
|
-
import "../chunk-
|
|
4
|
+
} from "../chunk-F5XEEVG6.js";
|
|
5
|
+
import "../chunk-OLZ7626J.js";
|
|
6
|
+
import "../chunk-N4IJLYFY.js";
|
|
7
|
+
import "../chunk-IGKXZBTA.js";
|
|
8
8
|
export {
|
|
9
9
|
bybitWallet
|
|
10
10
|
};
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import {
|
|
3
|
-
getWalletConnectConnector
|
|
4
|
-
} from "./chunk-FMVNQKZL.js";
|
|
5
2
|
import {
|
|
6
3
|
getInjectedConnector,
|
|
7
4
|
hasInjectedProvider
|
|
8
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-OLZ7626J.js";
|
|
6
|
+
import {
|
|
7
|
+
getWalletConnectConnector
|
|
8
|
+
} from "./chunk-N4IJLYFY.js";
|
|
9
9
|
|
|
10
10
|
// src/wallets/walletConnectors/rainbowWallet/rainbowWallet.ts
|
|
11
11
|
import { isAndroid, isIOS } from "@funkit/utils";
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import {
|
|
3
|
-
getWalletConnectConnector
|
|
4
|
-
} from "./chunk-FMVNQKZL.js";
|
|
5
2
|
import {
|
|
6
3
|
getInjectedConnector,
|
|
7
4
|
hasInjectedProvider
|
|
8
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-OLZ7626J.js";
|
|
6
|
+
import {
|
|
7
|
+
getWalletConnectConnector
|
|
8
|
+
} from "./chunk-N4IJLYFY.js";
|
|
9
9
|
|
|
10
10
|
// src/wallets/walletConnectors/bifrostWallet/bifrostWallet.ts
|
|
11
11
|
import { isAndroid } from "@funkit/utils";
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import {
|
|
3
|
-
getWalletConnectConnector
|
|
4
|
-
} from "./chunk-FMVNQKZL.js";
|
|
5
2
|
import {
|
|
6
3
|
getInjectedConnector,
|
|
7
4
|
hasInjectedProvider
|
|
8
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-OLZ7626J.js";
|
|
6
|
+
import {
|
|
7
|
+
getWalletConnectConnector
|
|
8
|
+
} from "./chunk-N4IJLYFY.js";
|
|
9
9
|
|
|
10
10
|
// src/wallets/walletConnectors/coin98Wallet/coin98Wallet.ts
|
|
11
11
|
var coin98Wallet = ({
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import {
|
|
3
|
-
getWalletConnectConnector
|
|
4
|
-
} from "./chunk-FMVNQKZL.js";
|
|
5
2
|
import {
|
|
6
3
|
getInjectedConnector,
|
|
7
4
|
hasInjectedProvider
|
|
8
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-OLZ7626J.js";
|
|
6
|
+
import {
|
|
7
|
+
getWalletConnectConnector
|
|
8
|
+
} from "./chunk-N4IJLYFY.js";
|
|
9
9
|
|
|
10
10
|
// src/wallets/walletConnectors/metaMaskWallet/metaMaskWallet.ts
|
|
11
11
|
import { isAndroid, isIOS } from "@funkit/utils";
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import {
|
|
3
|
-
getWalletConnectConnector
|
|
4
|
-
} from "./chunk-FMVNQKZL.js";
|
|
5
2
|
import {
|
|
6
3
|
getInjectedConnector,
|
|
7
4
|
hasInjectedProvider
|
|
8
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-OLZ7626J.js";
|
|
6
|
+
import {
|
|
7
|
+
getWalletConnectConnector
|
|
8
|
+
} from "./chunk-N4IJLYFY.js";
|
|
9
9
|
|
|
10
10
|
// src/wallets/walletConnectors/bitgetWallet/bitgetWallet.ts
|
|
11
11
|
import { isAndroid } from "@funkit/utils";
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import {
|
|
3
|
-
getWalletConnectConnector
|
|
4
|
-
} from "./chunk-FMVNQKZL.js";
|
|
5
2
|
import {
|
|
6
3
|
getInjectedConnector,
|
|
7
4
|
hasInjectedProvider
|
|
8
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-OLZ7626J.js";
|
|
6
|
+
import {
|
|
7
|
+
getWalletConnectConnector
|
|
8
|
+
} from "./chunk-N4IJLYFY.js";
|
|
9
9
|
|
|
10
10
|
// src/wallets/walletConnectors/bybitWallet/bybitWallet.ts
|
|
11
11
|
var bybitWallet = ({
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import {
|
|
3
|
-
getWalletConnectConnector
|
|
4
|
-
} from "./chunk-FMVNQKZL.js";
|
|
5
2
|
import {
|
|
6
3
|
getInjectedConnector,
|
|
7
4
|
hasInjectedProvider
|
|
8
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-OLZ7626J.js";
|
|
6
|
+
import {
|
|
7
|
+
getWalletConnectConnector
|
|
8
|
+
} from "./chunk-N4IJLYFY.js";
|
|
9
9
|
|
|
10
10
|
// src/wallets/walletConnectors/gateWallet/gateWallet.ts
|
|
11
11
|
import { isAndroid } from "@funkit/utils";
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import {
|
|
3
|
-
getWalletConnectConnector
|
|
4
|
-
} from "./chunk-FMVNQKZL.js";
|
|
5
2
|
import {
|
|
6
3
|
getInjectedConnector,
|
|
7
4
|
hasInjectedProvider
|
|
8
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-OLZ7626J.js";
|
|
6
|
+
import {
|
|
7
|
+
getWalletConnectConnector
|
|
8
|
+
} from "./chunk-N4IJLYFY.js";
|
|
9
9
|
|
|
10
10
|
// src/wallets/walletConnectors/tokenPocketWallet/tokenPocketWallet.ts
|
|
11
11
|
import { isMobile } from "@funkit/utils";
|