@funkit/connect 9.19.0 → 9.19.1
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 +24 -0
- package/dist/clients/{chunk-GSK3TMI5.js → chunk-TFZV2HO4.js} +1 -1
- package/dist/clients/chunk-UUHGOBKZ.js +51 -0
- package/dist/clients/fanatics.js +2 -2
- package/dist/clients/lighter.js +2 -2
- package/dist/clients/polymarket.js +3 -23
- package/dist/consts/customers.d.ts +13 -0
- package/dist/consts/funkit.d.ts +2 -0
- package/dist/consts/polymarket.d.ts +9 -0
- package/dist/domains/paymentMethods.d.ts +8 -0
- package/dist/hooks/statsig/useDynamicConfig.d.ts +2 -5
- package/dist/hooks/statsig/useExperiment.d.ts +1 -33
- package/dist/hooks/statsig/useFeatureGate.d.ts +1 -4
- package/dist/hooks/useCheckoutTransferInit.d.ts +2 -17
- package/dist/hooks/useTokenTransfer.d.ts +3 -8
- package/dist/hooks/useUDAParams.d.ts +2 -10
- package/dist/index.css +6 -6
- package/dist/index.js +1012 -2493
- package/dist/modals/CheckoutModal/InputAmount/QuickOptions.d.ts +1 -0
- package/dist/modals/CheckoutModal/InputAmount/state.d.ts +25 -1
- package/dist/modals/CheckoutModal/InputAmount/useCheckoutAmountLimits.d.ts +17 -0
- package/dist/providers/SwappedProvider.d.ts +1 -1
- package/dist/transports/iframeSwappedTransport.d.ts +1 -1
- package/dist/utils/consts.d.ts +1 -2
- package/dist/utils/datadogBrowserLogsTransport.d.ts +1 -1
- package/dist/utils/funLogger.d.ts +1 -51
- package/dist/utils/statsig/checkFeatureGate.d.ts +1 -1
- package/dist/utils/swapped.d.ts +2 -2
- package/dist/wallets/walletConnectors/bifrostWallet/bifrostWallet.js +2 -2
- package/dist/wallets/walletConnectors/bitgetWallet/bitgetWallet.js +2 -2
- package/dist/wallets/walletConnectors/bybitWallet/bybitWallet.js +2 -2
- package/dist/wallets/walletConnectors/clvWallet/clvWallet.js +2 -2
- package/dist/wallets/walletConnectors/coin98Wallet/coin98Wallet.js +2 -2
- package/dist/wallets/walletConnectors/coreWallet/coreWallet.js +2 -2
- package/dist/wallets/walletConnectors/foxWallet/foxWallet.js +2 -2
- package/dist/wallets/walletConnectors/frontierWallet/frontierWallet.js +2 -2
- package/dist/wallets/walletConnectors/gateWallet/gateWallet.js +2 -2
- package/dist/wallets/walletConnectors/index.js +56 -56
- package/dist/wallets/walletConnectors/metaMaskWallet/metaMaskWallet.js +2 -2
- package/dist/wallets/walletConnectors/okxWallet/okxWallet.js +2 -2
- package/dist/wallets/walletConnectors/rainbowWallet/rainbowWallet.js +2 -2
- package/dist/wallets/walletConnectors/roninWallet/roninWallet.js +2 -2
- package/dist/wallets/walletConnectors/safepalWallet/safepalWallet.js +2 -2
- package/dist/wallets/walletConnectors/subWallet/subWallet.js +2 -2
- package/dist/wallets/walletConnectors/tokenPocketWallet/tokenPocketWallet.js +2 -2
- package/dist/wallets/walletConnectors/trustWallet/trustWallet.js +2 -2
- package/dist/wallets/walletConnectors/zerionWallet/zerionWallet.js +2 -2
- package/package.json +3 -3
- package/dist/__generated__/default_configs.d.ts +0 -901
- package/dist/__generated__/default_feature_gates.d.ts +0 -20
- package/dist/clients/chunk-3QHYYLVM.js +0 -240
- package/dist/interfaces/logTransport.d.ts +0 -51
- package/dist/interfaces/swapped-transport.d.ts +0 -78
- package/dist/utils/flags/resolver.d.ts +0 -34
- package/dist/wallets/walletConnectors/{chunk-RB3HR4R2.js → chunk-4NV5BYRP.js} +3 -3
- package/dist/wallets/walletConnectors/{chunk-YEZM4CK4.js → chunk-AVDUNQUW.js} +3 -3
- package/dist/wallets/walletConnectors/{chunk-MIQTHJ6X.js → chunk-GUQM4QSL.js} +3 -3
- package/dist/wallets/walletConnectors/{chunk-4T6ZSRJF.js → chunk-IULPZP2Q.js} +3 -3
- package/dist/wallets/walletConnectors/{chunk-HNRB7KJU.js → chunk-JPN6TWIT.js} +3 -3
- package/dist/wallets/walletConnectors/{chunk-ZNX4EMPB.js → chunk-KCRO2AGO.js} +3 -3
- package/dist/wallets/walletConnectors/{chunk-STVVP43G.js → chunk-KI5Y2BBF.js} +3 -3
- package/dist/wallets/walletConnectors/{chunk-X6CGV36L.js → chunk-NR2OGDHQ.js} +3 -3
- package/dist/wallets/walletConnectors/{chunk-UK7C2JXW.js → chunk-OEEGYENV.js} +3 -3
- package/dist/wallets/walletConnectors/{chunk-F5XEEVG6.js → chunk-OX37G4YT.js} +3 -3
- package/dist/wallets/walletConnectors/{chunk-RVOY537T.js → chunk-SWFF3TWJ.js} +3 -3
- package/dist/wallets/walletConnectors/{chunk-CPI4TD43.js → chunk-TKB2OY6G.js} +3 -3
- package/dist/wallets/walletConnectors/{chunk-2VP2F6EK.js → chunk-W2LCLDPX.js} +3 -3
- package/dist/wallets/walletConnectors/{chunk-6BW3HLBG.js → chunk-WAHGI5L7.js} +3 -3
- package/dist/wallets/walletConnectors/{chunk-HTHAK6XB.js → chunk-WKNQMP4A.js} +3 -3
- package/dist/wallets/walletConnectors/{chunk-VTM6EECM.js → chunk-XCNHV3HS.js} +3 -3
- package/dist/wallets/walletConnectors/{chunk-CCQV2ZET.js → chunk-YO2K4MBH.js} +3 -3
- package/dist/wallets/walletConnectors/{chunk-VAPGUPHO.js → chunk-YQFGVZGR.js} +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,29 @@
|
|
|
1
1
|
# @funkit/connect
|
|
2
2
|
|
|
3
|
+
## 9.19.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 879c9bb: fix: balance-less rails (Card, Bitcoin Lightning) no longer show a false "Insufficient balance.
|
|
8
|
+
- 29f38c1: Move the platform-agnostic `FunLogger` class and the `LogTransport` interface (`LogLevel`, `LogContext`, `LogRecord`, `TrackingConsent`) into `@funkit/connect-core`. `@funkit/connect` keeps the `logger` singleton — constructed by injecting the web-only `DatadogBrowserLogsTransport` (which owns `@datadog/browser-logs`) — and re-exports `FunLogger` so existing `~/utils/funLogger` importers are unchanged. React Native will inject its own Datadog transport into the same `FunLogger`. No public API or behavior change.
|
|
9
|
+
- 871af19: Move the Statsig wrapper hooks, `__generated__` fallbacks, and the variant-config resolver into `@funkit/connect-core` so web and React Native share them. `@funkit/connect` keeps re-export façades; no public API or behavior change.
|
|
10
|
+
- fcc566b: Move the `SwappedTransport` interface + message contract into `@funkit/connect-core` so web and React Native share the typed Swapped bridge. The DOM-bound `SwappedProvider` / iframe transport stay in `@funkit/connect` and import the contract from core; no public API or behavior change.
|
|
11
|
+
- 5b94ae0: Extract the platform-agnostic token-transfer param helpers into `@funkit/connect-core` (thin-core): `getCheckoutTokenTransferParams` (with the Polymarket destination-token override lifted out into an injected `targetAssetOverride` so the builder stays customer-agnostic), the `CheckoutTokenTransferConfig` + `UDAConfig` types, and `getMinTransferValueForChain` + `MinTransferConfig`. The hooks that consume them (`useCheckoutTransferInit`, `useTokenTransfer`, `useUDAParams`) stay in `@funkit/connect` — they read web providers and carry customer/i18n branches — and re-export the moved symbols as façades. Web resolves the Polymarket override via `getPolymarketPerpsTargetAssetOverride` and injects it at both call sites. No public API or behavior change.
|
|
12
|
+
- 3377b2f: fix(connect): fix font-variant-numeric input width calc
|
|
13
|
+
- 2505ed2: Lighter spot deposits now open the amount screen in token entry when paying with the same asset (including native ETH into the ETH Spot market); perps deposits and all other checkouts keep the existing fiat default.
|
|
14
|
+
- efa7902: feat: add btc lightning limit
|
|
15
|
+
- 860ca5e: test(connect): add Rolly deposit actions coverage
|
|
16
|
+
- 45e4d09: feat: enable bitcoin lightning quick options and default input amount
|
|
17
|
+
- 553aae3: feat: remove fee breakdown from lightning invoice screen
|
|
18
|
+
- d2d487a: feat: minor qr code optimization for btc lightning
|
|
19
|
+
- Updated dependencies [29f38c1]
|
|
20
|
+
- Updated dependencies [871af19]
|
|
21
|
+
- Updated dependencies [fcc566b]
|
|
22
|
+
- Updated dependencies [5b94ae0]
|
|
23
|
+
- Updated dependencies [c11cbb9]
|
|
24
|
+
- @funkit/connect-core@0.3.0
|
|
25
|
+
- @funkit/chains@2.1.0
|
|
26
|
+
|
|
3
27
|
## 9.19.0
|
|
4
28
|
|
|
5
29
|
### Minor Changes
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
// src/utils/funLogger.ts
|
|
4
|
+
import { FunLogger } from "@funkit/connect-core";
|
|
5
|
+
|
|
6
|
+
// src/utils/datadogBrowserLogsTransport.ts
|
|
7
|
+
import { datadogLogs } from "@datadog/browser-logs";
|
|
8
|
+
var DDOG_CLIENT_TOKEN = "pub4f86c6be8c792cb48dc156a8c17d9a47";
|
|
9
|
+
var DatadogBrowserLogsTransport = class {
|
|
10
|
+
constructor() {
|
|
11
|
+
datadogLogs.init({
|
|
12
|
+
clientToken: DDOG_CLIENT_TOKEN,
|
|
13
|
+
site: "datadoghq.com",
|
|
14
|
+
forwardErrorsToLogs: false,
|
|
15
|
+
sessionSampleRate: 100,
|
|
16
|
+
service: "connect-sdk"
|
|
17
|
+
});
|
|
18
|
+
}
|
|
19
|
+
setEnv(environment) {
|
|
20
|
+
datadogLogs.setGlobalContextProperty("env", environment);
|
|
21
|
+
}
|
|
22
|
+
setTrackingConsent(consent) {
|
|
23
|
+
datadogLogs.setTrackingConsent(consent);
|
|
24
|
+
}
|
|
25
|
+
log({ level, title, context, error }) {
|
|
26
|
+
if (typeof window === "undefined") {
|
|
27
|
+
return;
|
|
28
|
+
}
|
|
29
|
+
switch (level) {
|
|
30
|
+
case "info":
|
|
31
|
+
datadogLogs.logger.info(title, context);
|
|
32
|
+
break;
|
|
33
|
+
case "debug":
|
|
34
|
+
datadogLogs.logger.debug(title, context);
|
|
35
|
+
break;
|
|
36
|
+
case "warn":
|
|
37
|
+
datadogLogs.logger.warn(title, context);
|
|
38
|
+
break;
|
|
39
|
+
case "error":
|
|
40
|
+
datadogLogs.logger.error(title, context, error);
|
|
41
|
+
break;
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
};
|
|
45
|
+
|
|
46
|
+
// src/utils/funLogger.ts
|
|
47
|
+
var logger = new FunLogger(new DatadogBrowserLogsTransport());
|
|
48
|
+
|
|
49
|
+
export {
|
|
50
|
+
logger
|
|
51
|
+
};
|
package/dist/clients/fanatics.js
CHANGED
|
@@ -4,8 +4,8 @@ import {
|
|
|
4
4
|
Box,
|
|
5
5
|
preloadRemoteImages,
|
|
6
6
|
useFunkitTranslation
|
|
7
|
-
} from "./chunk-
|
|
8
|
-
import "./chunk-
|
|
7
|
+
} from "./chunk-TFZV2HO4.js";
|
|
8
|
+
import "./chunk-UUHGOBKZ.js";
|
|
9
9
|
|
|
10
10
|
// src/clients/fanatics.tsx
|
|
11
11
|
import React5, { useEffect, useMemo } from "react";
|
package/dist/clients/lighter.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import {
|
|
3
3
|
logger
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-UUHGOBKZ.js";
|
|
5
5
|
|
|
6
6
|
// src/clients/polymarket.tsx
|
|
7
7
|
import {
|
|
@@ -342,6 +342,7 @@ function generateClientMetadataForTokenTransfer() {
|
|
|
342
342
|
}
|
|
343
343
|
|
|
344
344
|
// src/utils/statsig/checkFeatureGate.ts
|
|
345
|
+
import { defaultFeatureGates as fallbackFeatureGates } from "@funkit/connect-core";
|
|
345
346
|
import { StatsigClient } from "@statsig/react-bindings";
|
|
346
347
|
|
|
347
348
|
// src/providers/FunkitStatsigProvider.tsx
|
|
@@ -355,34 +356,13 @@ import {
|
|
|
355
356
|
import React8, { useEffect } from "react";
|
|
356
357
|
var STATSIG_CLIENT_KEY = "client-UmFd8WIJljA7cLmZuDqs3X25M8sKd5WIQP4BSC2bRbM";
|
|
357
358
|
|
|
358
|
-
// src/__generated__/default_feature_gates.ts
|
|
359
|
-
var default_feature_gates_default = {
|
|
360
|
-
"compliance-review-blocker": false,
|
|
361
|
-
"enable-across-wallet-flow": false,
|
|
362
|
-
"enable-add-token-to-wallet": false,
|
|
363
|
-
"enable-checkout-success-screen-background": false,
|
|
364
|
-
"enable-empty-withdrawal-selection": false,
|
|
365
|
-
"enable-free-usdc-banner": false,
|
|
366
|
-
"enable-permit-toggle": false,
|
|
367
|
-
"enable-polymarket-wallet-withdrawal": false,
|
|
368
|
-
"enable-swapped-exchanges": false,
|
|
369
|
-
"exact-in": false,
|
|
370
|
-
"faster-notifications": false,
|
|
371
|
-
"new-token-transfer-config": false,
|
|
372
|
-
"new-withdrawal-config": false,
|
|
373
|
-
"saved-card-defaults-to-fiat-tab": false,
|
|
374
|
-
"test-feature-gate": false,
|
|
375
|
-
"wallet-flow-enable-exact-input-with-actions": false,
|
|
376
|
-
"you-receive-remove-swap-impact": false
|
|
377
|
-
};
|
|
378
|
-
|
|
379
359
|
// src/utils/statsig/checkFeatureGate.ts
|
|
380
360
|
function checkFeatureGate(name) {
|
|
381
361
|
try {
|
|
382
362
|
return StatsigClient.instance(STATSIG_CLIENT_KEY).checkGate(name);
|
|
383
363
|
} catch (err) {
|
|
384
364
|
logger.warn("checkFeatureGate:error", { name, err });
|
|
385
|
-
return
|
|
365
|
+
return fallbackFeatureGates[name];
|
|
386
366
|
}
|
|
387
367
|
}
|
|
388
368
|
|
|
@@ -21,4 +21,17 @@ export declare function isAaveCustomer(apiKey: string): apiKey is "EWzSv8tWnQ7Uc
|
|
|
21
21
|
*/
|
|
22
22
|
export declare function isCustomerNativeFastPathEnabled(apiKey: string): apiKey is "EWzSv8tWnQ7UcZ2IsDqFw1dYo3Df56FX6KBJ5ztS";
|
|
23
23
|
export declare function isLighterEthSpot(apiKey: string, checkoutConfig: FunkitCheckoutConfig | undefined): boolean | undefined;
|
|
24
|
+
/**
|
|
25
|
+
* Whether a Lighter checkout targets a spot asset (as opposed to a perps
|
|
26
|
+
* deposit). Lighter's spot routes encode "SPOT" in their `dynamicRoutingId`
|
|
27
|
+
* (`LIGHTER_ETH_SPOT`, `LIGHTER_USDC_SPOT_NEW_USER`, …) while perps routes
|
|
28
|
+
* encode "PERPS" (`LIGHTER_USDC_PERPS`, …). The active `dynamicRoutingId`
|
|
29
|
+
* tracks the selected target candidate, so this distinguishes spot from perps
|
|
30
|
+
* even when they share the same target token (the mainnet USDC new-user routes).
|
|
31
|
+
*
|
|
32
|
+
* Used to scope the token-entry-by-default treatment to spot deposits only —
|
|
33
|
+
* perps deposits always open in fiat. A route without a recognisable spot id
|
|
34
|
+
* is treated as non-spot (the safe, fiat default).
|
|
35
|
+
*/
|
|
36
|
+
export declare function isLighterSpot(apiKey: string, checkoutConfig: Pick<FunkitCheckoutConfig, 'dynamicRoutingId'> | undefined): boolean;
|
|
24
37
|
export declare function isLighterSlowDeposit(apiKey: string, checkoutConfig: Pick<FunkitCheckoutConfig, 'targetChain'> | undefined): boolean;
|
package/dist/consts/funkit.d.ts
CHANGED
|
@@ -4,6 +4,8 @@ import type { Address } from 'viem';
|
|
|
4
4
|
* e.g. on Base it is ETH, but on Polygon it is MATIC/POL. It is not one specific real token address.
|
|
5
5
|
**/
|
|
6
6
|
export declare const NATIVE_TOKEN = "0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee";
|
|
7
|
+
/** WETH on Ethereum mainnet (checksummed). */
|
|
8
|
+
export declare const WETH_MAINNET_ADDRESS: Address;
|
|
7
9
|
export declare const FUN_ORG_NAME = "Fun.xyz";
|
|
8
10
|
export declare const FUN_TERMS_URL = "https://fun.xyz/terms";
|
|
9
11
|
export interface FunkitUserInfoBase {
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { type Address } from 'viem';
|
|
1
2
|
/** Action type signalling a Polymarket Perps deposit (USDC.e → pUSD → Perps). */
|
|
2
3
|
export declare const POLYMARKET_PERPS_DEPOSIT_ACTION_TYPE = "POLYMARKET_PERPS_DEPOSIT";
|
|
3
4
|
/**
|
|
@@ -5,3 +6,11 @@ export declare const POLYMARKET_PERPS_DEPOSIT_ACTION_TYPE = "POLYMARKET_PERPS_DE
|
|
|
5
6
|
* QR/UDA transfers for the deposit action target this address.
|
|
6
7
|
*/
|
|
7
8
|
export declare const POLYMARKET_PUSD_ADDRESS: `0x${string}`;
|
|
9
|
+
/**
|
|
10
|
+
* Customer-scoped destination-token override for the token-transfer param
|
|
11
|
+
* builder. Polymarket Perps deposits must target pUSD on-chain regardless of
|
|
12
|
+
* the configured target asset. Lives here (not in the now-core
|
|
13
|
+
* `getCheckoutTokenTransferParams`) so the shared param builder stays
|
|
14
|
+
* customer-agnostic — web resolves the override and injects it.
|
|
15
|
+
*/
|
|
16
|
+
export declare function getPolymarketPerpsTargetAssetOverride(qrcodeActionType: string | undefined): Address | undefined;
|
|
@@ -35,6 +35,14 @@ export interface PaymentMethodVirtualBankInfo extends PaymentMethodVirtualBankIn
|
|
|
35
35
|
}
|
|
36
36
|
export type ConnectablePaymentMethodInfo = PaymentMethodAccountInfo | PaymentMethodBrokerageInfo | PaymentMethodVirtualBankInfo;
|
|
37
37
|
export declare function isConnectablePaymentMethodInfo(value: unknown): value is ConnectablePaymentMethodInfo;
|
|
38
|
+
/**
|
|
39
|
+
* Balance-less rails: checkout methods with no on-chain source holding (Card,
|
|
40
|
+
* Bitcoin Lightning, etc) where "available balance" is not a meaningful concept,
|
|
41
|
+
* so balance/min/max validation is skipped. Only ACCOUNT_BALANCE and BROKERAGE
|
|
42
|
+
* carry a measurable holding. Typed to PaymentMethodInfo's methods, not the full
|
|
43
|
+
* PaymentMethod enum (which also carries Swapped's iframe-only rails).
|
|
44
|
+
*/
|
|
45
|
+
export declare function isBalanceLessPaymentMethod(paymentMethod: PaymentMethodInfo['paymentMethod']): boolean;
|
|
38
46
|
export type PaymentMethodInfo = PaymentMethodCardInfo | PaymentMethodBrokerageInfo | PaymentMethodAccountInfo | PaymentMethodTokenTransferInfo | PaymentMethodBitcoinLightningInfo | PaymentMethodVirtualBankIncompleteInfo;
|
|
39
47
|
interface CardPaymentMethodParams {
|
|
40
48
|
paymentMethod: PaymentMethod.CARD;
|
|
@@ -1,8 +1,5 @@
|
|
|
1
|
-
import
|
|
2
|
-
type
|
|
3
|
-
type DynamicConfigName = keyof FallbackDynamicConfigs;
|
|
4
|
-
export type DynamicConfigValue<Name extends DynamicConfigName> = FallbackDynamicConfigs[Name]['value'];
|
|
1
|
+
import { type DynamicConfigName, type DynamicConfigValue } from '@funkit/connect-core';
|
|
2
|
+
export type { DynamicConfigName, DynamicConfigValue };
|
|
5
3
|
export declare const useDynamicConfig: <Name extends DynamicConfigName>(name: Name, options?: {
|
|
6
4
|
bypassCountryCode?: boolean;
|
|
7
5
|
}) => DynamicConfigValue<Name>;
|
|
8
|
-
export {};
|
|
@@ -1,33 +1 @@
|
|
|
1
|
-
|
|
2
|
-
* Hook for accessing Statsig experiments with type-safe fallback values.
|
|
3
|
-
*
|
|
4
|
-
* Unlike feature gates and dynamic configs, experiments don't have a base configuration
|
|
5
|
-
* with overrides. Instead, they have multiple horizontal variations. Because of this,
|
|
6
|
-
* you must provide a fallback value and can optionally specify the return type.
|
|
7
|
-
*
|
|
8
|
-
* @example
|
|
9
|
-
* // Basic usage (returns string by default)
|
|
10
|
-
* const buttonColor = useExperiment('button-color-test', 'value', 'blue')
|
|
11
|
-
*
|
|
12
|
-
* @example
|
|
13
|
-
* // With explicit type parameter
|
|
14
|
-
* interface ButtonConfig {
|
|
15
|
-
* color: string
|
|
16
|
-
* size: 'small' | 'medium' | 'large'
|
|
17
|
-
* }
|
|
18
|
-
* const config = useExperiment<ButtonConfig>(
|
|
19
|
-
* 'button-experiment',
|
|
20
|
-
* 'config',
|
|
21
|
-
* { color: 'blue', size: 'medium' }
|
|
22
|
-
* )
|
|
23
|
-
*
|
|
24
|
-
* @example
|
|
25
|
-
* // Getting a specific parameter
|
|
26
|
-
* const variant = useExperiment('checkout-flow-test', 'variant', 'control')
|
|
27
|
-
*
|
|
28
|
-
* @param experimentName - The name of the experiment in Statsig
|
|
29
|
-
* @param parameterName - The name of the parameter to get from the experiment
|
|
30
|
-
* @param fallback - The fallback value to use when the experiment/parameter is not available
|
|
31
|
-
* @returns The experiment parameter value with the specified type
|
|
32
|
-
*/
|
|
33
|
-
export declare function useExperiment<T = string>(experimentName: string, parameterName: string, fallback: T): T;
|
|
1
|
+
export { useExperiment } from '@funkit/connect-core';
|
|
@@ -1,4 +1 @@
|
|
|
1
|
-
|
|
2
|
-
type FeatureGateName = keyof typeof fallbackFeatureGates;
|
|
3
|
-
export declare const useFeatureGate: (name: FeatureGateName) => boolean;
|
|
4
|
-
export {};
|
|
1
|
+
export { useFeatureGate } from '@funkit/connect-core';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type CheckoutInitTokenTransferAddressParams, type CheckoutInitTokenTransferResponse, type FunAddress } from '@funkit/api-base';
|
|
2
|
-
import {
|
|
3
|
-
|
|
2
|
+
import { getCheckoutTokenTransferParams } from '@funkit/connect-core';
|
|
3
|
+
export { getCheckoutTokenTransferParams };
|
|
4
4
|
interface UseCheckoutTransferInitResponse {
|
|
5
5
|
transferInit: CheckoutInitTokenTransferResponse | undefined;
|
|
6
6
|
recipientAddr: FunAddress;
|
|
@@ -9,20 +9,6 @@ interface UseCheckoutTransferInitResponse {
|
|
|
9
9
|
}
|
|
10
10
|
type CheckoutTokenTransferParams = Omit<CheckoutInitTokenTransferAddressParams, 'logger' | 'clientMetadata'>;
|
|
11
11
|
export declare function checkoutTransferFetch(params: CheckoutTokenTransferParams): Promise<CheckoutInitTokenTransferResponse>;
|
|
12
|
-
export declare function getCheckoutTokenTransferParams({ checkoutConfig, userId, recipientAddr, apiKey, udaParams, }: {
|
|
13
|
-
checkoutConfig: FunkitCheckoutConfig | undefined;
|
|
14
|
-
userId: string;
|
|
15
|
-
recipientAddr: FunAddress;
|
|
16
|
-
apiKey: string;
|
|
17
|
-
udaParams?: UDAConfig | undefined;
|
|
18
|
-
}): {
|
|
19
|
-
toChainId: string;
|
|
20
|
-
toTokenAddress: `0x${string}`;
|
|
21
|
-
actionType: string | undefined;
|
|
22
|
-
userId: string;
|
|
23
|
-
apiKey: string;
|
|
24
|
-
recipientAddr: FunAddress;
|
|
25
|
-
} | undefined;
|
|
26
12
|
export declare function useIsQRCodeTransferEnabled(): {
|
|
27
13
|
enabled: boolean;
|
|
28
14
|
comingSoon: boolean;
|
|
@@ -32,4 +18,3 @@ export declare function useIsQRCodeTransferEnabled(): {
|
|
|
32
18
|
* creates QR code transfer EOA
|
|
33
19
|
*/
|
|
34
20
|
export declare const useCheckoutTransferInit: (enabled?: boolean) => UseCheckoutTransferInitResponse;
|
|
35
|
-
export {};
|
|
@@ -1,15 +1,12 @@
|
|
|
1
1
|
import type { FunAddress } from '@funkit/api-base';
|
|
2
|
+
import { type MinTransferConfig, getMinTransferValueForChain } from '@funkit/connect-core';
|
|
2
3
|
import { type QRCodeUri } from '../utils/transfer';
|
|
3
4
|
export type FeeValue = {
|
|
4
5
|
label: string;
|
|
5
6
|
value: number;
|
|
6
7
|
};
|
|
7
|
-
export
|
|
8
|
-
|
|
9
|
-
chains: {
|
|
10
|
-
[chainId: string]: number;
|
|
11
|
-
};
|
|
12
|
-
}
|
|
8
|
+
export type { MinTransferConfig };
|
|
9
|
+
export { getMinTransferValueForChain };
|
|
13
10
|
interface UseTokenTransferResult {
|
|
14
11
|
/** where money goes to first */
|
|
15
12
|
depositAddress: FunAddress | undefined;
|
|
@@ -27,7 +24,5 @@ interface UseTokenTransferResult {
|
|
|
27
24
|
blockchain: 'ethereum' | 'solana' | 'bitcoin' | 'tron';
|
|
28
25
|
}
|
|
29
26
|
export declare const useTokenTransfer: (selectedChainId: number | undefined, selectedToken: string | undefined, chainIds?: number[]) => UseTokenTransferResult;
|
|
30
|
-
export declare function getMinTransferValueForChain(chainId: number, limits: MinTransferConfig): number;
|
|
31
27
|
export declare const useMinTransferValueUsd: (selectedChainId: number | undefined) => number;
|
|
32
28
|
export declare const useMinTransferValueEur: (selectedChainId: number | undefined) => number;
|
|
33
|
-
export {};
|
|
@@ -1,11 +1,3 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
export
|
|
3
|
-
targetChain: string;
|
|
4
|
-
targetAsset: Address;
|
|
5
|
-
targetAssetTicker: string;
|
|
6
|
-
iconSrc: string;
|
|
7
|
-
qrcodeActionType?: string;
|
|
8
|
-
defaultTokenSymbol?: string;
|
|
9
|
-
defaultChainId?: string;
|
|
10
|
-
}
|
|
1
|
+
import type { UDAConfig } from '@funkit/connect-core';
|
|
2
|
+
export type { UDAConfig };
|
|
11
3
|
export declare const useUDAParams: (_dynamicRoutingId?: string) => UDAConfig | undefined;
|
package/dist/index.css
CHANGED
|
@@ -15830,12 +15830,6 @@
|
|
|
15830
15830
|
opacity: var(--animation-opacity, 0);
|
|
15831
15831
|
}
|
|
15832
15832
|
|
|
15833
|
-
/* vanilla-extract-css-ns:src/components/FunFeatureList/FunFeatureList.css.ts.vanilla.css?source=Ll8xMDQ1cXI3MSB7CiAgb3V0bGluZS1jb2xvcjogdmFyKC0tcmstY29sb3JzLWFjdGlvbkNvbG9yRGlzYWJsZWQpOwogIHRyYW5zaXRpb246IGFsbCAxNTBtcyBjdWJpYy1iZXppZXIoMC4zLCAwLCAwLjA2LCAxKTsKfQ== */
|
|
15834
|
-
[data-rk] ._1045qr71 {
|
|
15835
|
-
outline-color: var(--rk-colors-actionColorDisabled);
|
|
15836
|
-
transition: all 150ms cubic-bezier(0.3, 0, 0.06, 1);
|
|
15837
|
-
}
|
|
15838
|
-
|
|
15839
15833
|
/* vanilla-extract-css-ns:src/components/Tabs/tabs.css.ts.vanilla.css?source=#H4sIAAAAAAAAA82SwU7EIBCG732KuZjsJtJA166RXvYxvNIW1okFGqDR1fTdTWmM3UZrD5r0AkOY/+fjz5ye5UU5oaUHeX7CLFB4TwDoTdwAghPGK+s0H8tGBPm4Y8f2dV/EBtuKCsOFAx3OfQLA6C9qOpeyUdonpzkNW0Pzk98KFLLwk29wsjU4S55/m87hn9NZDCcdGe6igzCoRUBrSN25WHBgOdW+uLoMqNGciepMNfZUXYkVKeUbSrejaZbfAk3ZsAwl21/LFTYN0baWHJR1L8LVM38jtOSfg1x8QeZbhWQTyONWIbMJ5P1WIQ8TyIcI2VqP47Oi9LbpghzUaLwMcYz7D6L02Hb8BAAA */
|
|
15840
15834
|
@keyframes eghi2t0 {
|
|
15841
15835
|
0% {
|
|
@@ -15906,6 +15900,12 @@
|
|
|
15906
15900
|
inset: 0;
|
|
15907
15901
|
}
|
|
15908
15902
|
|
|
15903
|
+
/* vanilla-extract-css-ns:src/components/FunFeatureList/FunFeatureList.css.ts.vanilla.css?source=Ll8xMDQ1cXI3MSB7CiAgb3V0bGluZS1jb2xvcjogdmFyKC0tcmstY29sb3JzLWFjdGlvbkNvbG9yRGlzYWJsZWQpOwogIHRyYW5zaXRpb246IGFsbCAxNTBtcyBjdWJpYy1iZXppZXIoMC4zLCAwLCAwLjA2LCAxKTsKfQ== */
|
|
15904
|
+
[data-rk] ._1045qr71 {
|
|
15905
|
+
outline-color: var(--rk-colors-actionColorDisabled);
|
|
15906
|
+
transition: all 150ms cubic-bezier(0.3, 0, 0.06, 1);
|
|
15907
|
+
}
|
|
15908
|
+
|
|
15909
15909
|
/* vanilla-extract-css-ns:src/modals/ProfileDetails/FunProfileViews/Home/Home.css.ts.vanilla.css?source=QGtleWZyYW1lcyBfMjZobXdzMCB7CiAgMCUgewogICAgb3BhY2l0eTogMC4yOwogIH0KICAxMDAlIHsKICAgIG9wYWNpdHk6IDE7CiAgfQp9CkBrZXlmcmFtZXMgXzI2aG13czEgewogIDAlIHsKICAgIG9wYWNpdHk6IDE7CiAgfQogIDkwJSB7CiAgICBvcGFjaXR5OiAwLjI7CiAgfQogIDEwMCUgewogICAgb3BhY2l0eTogMDsKICB9Cn0KQGtleWZyYW1lcyBfMjZobXdzNCB7CiAgMCUgewogICAgaGVpZ2h0OiA3MCU7CiAgICB0cmFuc2Zvcm06IHNjYWxlKDAuNyk7CiAgICBvcGFjaXR5OiAwLjI7CiAgfQogIDEwMCUgewogICAgaGVpZ2h0OiAxMDAlOwogICAgdHJhbnNmb3JtOiBzY2FsZSgxKTsKICAgIG9wYWNpdHk6IDE7CiAgfQp9Ci5fMjZobXdzMiB7CiAgYW5pbWF0aW9uLWR1cmF0aW9uOiAzMDBtczsKICBhbmltYXRpb24tdGltaW5nLWZ1bmN0aW9uOiBsaW5lYXI7CiAgYW5pbWF0aW9uLWZpbGwtbW9kZTogZm9yd2FyZHM7CiAgYW5pbWF0aW9uLW5hbWU6IF8yNmhtd3MwOwp9Ci5fMjZobXdzMyB7CiAgYW5pbWF0aW9uLWR1cmF0aW9uOiA3NW1zOwogIGFuaW1hdGlvbi10aW1pbmctZnVuY3Rpb246IGxpbmVhcjsKICBhbmltYXRpb24tZmlsbC1tb2RlOiBmb3J3YXJkczsKICBhbmltYXRpb24tbmFtZTogXzI2aG13czE7Cn0KLl8yNmhtd3M1IHsKICAmID4gZGl2IHsKICAgIGFuaW1hdGlvbi1kdXJhdGlvbjogNzVtczsKICAgIGFuaW1hdGlvbi10aW1pbmctZnVuY3Rpb246IGxpbmVhcjsKICAgIGFuaW1hdGlvbi1maWxsLW1vZGU6IGZvcndhcmRzOwogICAgYW5pbWF0aW9uLW5hbWU6IF8yNmhtd3M0OwogIH0KfQouXzI2aG13czY6Zm9jdXMtdmlzaWJsZSB7CiAgb3V0bGluZTogMXB4IHNvbGlkOwogIG91dGxpbmUtY29sb3I6IHZhcigtLXJrLWNvbG9ycy10ZXJ0aWFyeVRleHQpOwp9 */
|
|
15910
15910
|
@keyframes _26hmws0 {
|
|
15911
15911
|
0% {
|