@funkit/connect 7.0.0 → 7.0.3-next.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 +41 -0
- package/dist/{chunk-DN7UTQK5.js → chunk-5GV4UXWB.js} +3 -3
- package/dist/{chunk-OVMNR35O.js → chunk-IVO7KGHT.js} +3 -3
- package/dist/components/FunPoweredTagline/FunPoweredTagline.css.d.ts +1 -0
- package/dist/components/FunPoweredTagline/FunPoweredTagline.d.ts +4 -1
- package/dist/consts/customers.d.ts +2 -0
- package/dist/consts/funkit.d.ts +0 -17
- package/dist/domains/asset.d.ts +2 -1
- package/dist/domains/feeEstimate.d.ts +1 -1
- package/dist/hooks/useCheckoutDirectExecution.d.ts +1 -0
- package/dist/hooks/useCheckoutTransferInit.d.ts +1 -0
- package/dist/hooks/usePaymentSources.d.ts +1 -1
- package/dist/index.css +16 -0
- package/dist/index.d.ts +2 -3
- package/dist/index.js +1336 -800
- package/dist/locales/index.d.ts +1 -1
- package/dist/modals/CheckoutModal/ConfirmationStep/useAccountBalanceTransfer.d.ts +1 -1
- package/dist/modals/CheckoutModal/SourceChange/SourceChange.d.ts +1 -1
- package/dist/providers/FunkitConfigContext.d.ts +0 -18
- package/dist/themes/darkTheme.js +1 -1
- package/dist/themes/lightTheme.js +1 -1
- package/dist/utils/checkout.d.ts +1 -34
- package/dist/utils/flags/config.d.ts +3 -3
- package/dist/utils/lighter.d.ts +4 -0
- package/dist/wallets/walletConnectors/index.js +13 -13
- package/package.json +5 -6
package/dist/locales/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export type Locale = 'en' | 'zh' | 'ko' | 'ja' | 'tr' | 'es' | 'ru' | 'buy_en';
|
|
1
|
+
export type Locale = 'en' | 'zh' | 'ko' | 'ja' | 'tr' | 'es' | 'ru' | 'fr' | 'buy_en';
|
|
2
2
|
export { default as i18n, localeMapping } from './i18n';
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import type
|
|
1
|
+
import { type Address } from 'viem';
|
|
2
2
|
export declare function useAccountBalancePostCheckout(setPostCheckoutStepMessage: (s: string) => void): (depositAddress: Address) => Promise<void>;
|
|
@@ -27,4 +27,4 @@ export type SourceChangeNext = {
|
|
|
27
27
|
paymentMethodInfo: ConnectablePaymentMethodInfo;
|
|
28
28
|
};
|
|
29
29
|
export declare const SourceChangeInfo: ModalStepInfo<FunCheckoutStep.SOURCE_CHANGE>;
|
|
30
|
-
export declare function SourceChange({ modalState, onNext,
|
|
30
|
+
export declare function SourceChange({ modalState, onNext, setModalState, }: ModalStepComponentProps<FunCheckoutStep.SOURCE_CHANGE>): React.JSX.Element;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { type ReactNode } from 'react';
|
|
2
|
-
import { type FunkitPrioritizedLoginType, FunkitSocialLoginMethod } from '../consts/funkit';
|
|
3
2
|
export interface FunkitTextCustomizationsConfig {
|
|
4
3
|
virtualFiat: string;
|
|
5
4
|
brokerageOrExchange: string;
|
|
@@ -69,21 +68,6 @@ export type FunkitUiCustomizationsConfigInternal = Required<FunkitUiCustomizatio
|
|
|
69
68
|
};
|
|
70
69
|
export declare const DEFAULT_TEXT_CUSTOMIZATIONS: FunkitTextCustomizationsConfig;
|
|
71
70
|
export declare const DEFAULT_UI_CUSTOMIZATIONS: FunkitUiCustomizationsConfigInternal;
|
|
72
|
-
interface FunkitLoginOptionsConfig {
|
|
73
|
-
/** @deprecated **/
|
|
74
|
-
web2: boolean;
|
|
75
|
-
/** @deprecated **/
|
|
76
|
-
web3: boolean;
|
|
77
|
-
/** @deprecated **/
|
|
78
|
-
prioritizedLogin: FunkitPrioritizedLoginType;
|
|
79
|
-
/** @deprecated Enables social logins. Each type requires configuration in your app's privy dashboard. Please ensure to do so before enabling any. **/
|
|
80
|
-
web2SocialLogins: {
|
|
81
|
-
[FunkitSocialLoginMethod.GOOGLE]?: boolean;
|
|
82
|
-
[FunkitSocialLoginMethod.TWITTER]?: boolean;
|
|
83
|
-
[FunkitSocialLoginMethod.APPLE]?: boolean;
|
|
84
|
-
[FunkitSocialLoginMethod.FARCASTER]?: boolean;
|
|
85
|
-
};
|
|
86
|
-
}
|
|
87
71
|
export type FunkitConfig = {
|
|
88
72
|
/** Funkit api key **/
|
|
89
73
|
apiKey: string;
|
|
@@ -93,8 +77,6 @@ export type FunkitConfig = {
|
|
|
93
77
|
textCustomizations?: Partial<FunkitTextCustomizationsConfig>;
|
|
94
78
|
/** UI customizations across all widgets **/
|
|
95
79
|
uiCustomizations?: FunkitUiCustomizationsConfig;
|
|
96
|
-
/** @deprecated Login modal configuration **/
|
|
97
|
-
loginConfig?: Partial<FunkitLoginOptionsConfig>;
|
|
98
80
|
/** used to link funkit users to your own user system */
|
|
99
81
|
externalUserId?: string;
|
|
100
82
|
};
|
package/dist/themes/darkTheme.js
CHANGED
package/dist/utils/checkout.d.ts
CHANGED
|
@@ -37,46 +37,12 @@ export declare const hasSufficientBalance: (wagmiConfig: UseConfigReturnType, wa
|
|
|
37
37
|
tokenTicker: null;
|
|
38
38
|
}>;
|
|
39
39
|
export declare const hasGasToken: (wagmiConfig: UseConfigReturnType, walletAddress: string, chainId: string) => Promise<boolean>;
|
|
40
|
-
/**
|
|
41
|
-
* Generates an env config for checkout estimation
|
|
42
|
-
* So that batch operation creation will not fail even if FW has insufficient funds to pass the estimation.
|
|
43
|
-
*/
|
|
44
|
-
export declare function getFunkitEnvForCheckoutEstimation({ chainId, bypassWalletInit, }: {
|
|
45
|
-
chainId: string;
|
|
46
|
-
bypassWalletInit: boolean;
|
|
47
|
-
}): {
|
|
48
|
-
chain: string;
|
|
49
|
-
gasSponsor: {
|
|
50
|
-
useCheckoutSponsor: boolean;
|
|
51
|
-
sponsorAddress: any;
|
|
52
|
-
token?: string;
|
|
53
|
-
usePermit?: boolean;
|
|
54
|
-
};
|
|
55
|
-
bypassInit: boolean;
|
|
56
|
-
apiKey?: string;
|
|
57
|
-
nonce?: bigint | undefined;
|
|
58
|
-
fee?: {
|
|
59
|
-
token?: string;
|
|
60
|
-
amount?: number;
|
|
61
|
-
gasPercent?: number;
|
|
62
|
-
recipient: Address;
|
|
63
|
-
} | undefined;
|
|
64
|
-
skipDBAction?: boolean | undefined;
|
|
65
|
-
logger?: import("@funkit/api-base").Logger | undefined;
|
|
66
|
-
};
|
|
67
40
|
export type TokenInfo = {
|
|
68
41
|
symbol: string;
|
|
69
42
|
tokenAddress: null | Address;
|
|
70
43
|
tokenUnitPriceUsd: null | number;
|
|
71
44
|
pickedChainId: string;
|
|
72
45
|
};
|
|
73
|
-
/**
|
|
74
|
-
* Decorates a list of token strings with their chainId-specific tokenAddress and pickedChainId
|
|
75
|
-
* @param tokensChainMap Map of token strings e.g. ['ETH', 'MATIC', ...]
|
|
76
|
-
* @param targetChainId The targetChain identifier of the checkout
|
|
77
|
-
* @returns List of tokenItem objects
|
|
78
|
-
*/
|
|
79
|
-
export declare function decorateTokenList(tokensChainMap: Record<string, Set<string>>, targetChainId: string, apiKey: string): Promise<TokenInfo[]>;
|
|
80
46
|
export declare function getTimeFromNowSeconds(startTimeMs: number, durationMs: number): number;
|
|
81
47
|
export declare function getCheckoutReceivedAmount({ config, quote, }: {
|
|
82
48
|
config: FunkitCheckoutConfig | ServerCheckoutConfig;
|
|
@@ -129,6 +95,7 @@ export declare function getQuoteExchangeRate(config: FunkitCheckoutConfig, baseQ
|
|
|
129
95
|
*/
|
|
130
96
|
export declare function getMaxTargetAssetAmountEstimate(sourceAssetBalance: number, config: FunkitCheckoutConfig, quoteResult: FunkitCheckoutQuoteResult): number;
|
|
131
97
|
export declare function getTokenDecimals(wagmiConfig: Config, chainId: string, tokenAddress: Address): Promise<number>;
|
|
98
|
+
export declare function getLighterTickSize(wagmiConfig: Config, chainId: string, assetIndex: number): Promise<bigint>;
|
|
132
99
|
export declare function evaluateCheckoutGenerateActionsParams(config: FunkitCheckoutConfig): Promise<FunkitCheckoutActionParams[]>;
|
|
133
100
|
export declare function isCheckoutCrFlow(config: FunkitCheckoutConfig): boolean;
|
|
134
101
|
/**
|
|
@@ -7,7 +7,7 @@ export declare const flagConfig: {
|
|
|
7
7
|
readonly if_any: [{
|
|
8
8
|
readonly key: "apiKey";
|
|
9
9
|
readonly type: "isAnyOf";
|
|
10
|
-
readonly values: ["Y53dikxXdT4E3afI1l8BMBSWgyhKvf65k6Dut1k6", "OXLUmejkh9PlNDS4gSvi9gcEWacOpTz2KUVepVf4", "lUzTaIRxs95iin3pCAafB1ChA5akBiuQ1tjhXnau", "di9ZSqn1Ya68Y2XpBPUV1rCtNGXh8Xe5MGWzb1Xe"];
|
|
10
|
+
readonly values: ["Y53dikxXdT4E3afI1l8BMBSWgyhKvf65k6Dut1k6", "OXLUmejkh9PlNDS4gSvi9gcEWacOpTz2KUVepVf4", "lUzTaIRxs95iin3pCAafB1ChA5akBiuQ1tjhXnau", "di9ZSqn1Ya68Y2XpBPUV1rCtNGXh8Xe5MGWzb1Xe", "cGlmpTmNh657m8TiV5RFdwna6FG5pxM6ajiNHvw3"];
|
|
11
11
|
}];
|
|
12
12
|
readonly value: "";
|
|
13
13
|
}];
|
|
@@ -49,7 +49,7 @@ export declare const flagConfig: {
|
|
|
49
49
|
readonly if_any: [{
|
|
50
50
|
readonly key: "apiKey";
|
|
51
51
|
readonly type: "isAnyOf";
|
|
52
|
-
readonly values: ["6TUi99Tq3O9MWj1IFX8Pv6spmPXzcvhy9NvBoeW2", "vWe20Dfyui2ouvfOhtSTY3Czeo8lFdbo5xXQBALZ", "clDebbfo9edXq1GydZ0CahSAfSimPj616lFa9p8e", "57G91zNoew4nYxIoqSCpS1vWr8JT3gGVasNqMwgG", "BPVeP8zThG467vVIYzuiu5aVWAkS9KiR6tT1TdTP", "M3uox3cw0u8YCPV9cIREA6AugUMvPFTk6qOpm4um", "cGlmpTmNh657m8TiV5RFdwna6FG5pxM6ajiNHvw3", "1QxzeJ4XKT78ba86whLct6sc7dW60Dl461UVWFdw", "pLQBJsA6zS9tg990rbdBD6UdABkWRv5O60vlrVcW", "lUzTaIRxs95iin3pCAafB1ChA5akBiuQ1tjhXnau", "di9ZSqn1Ya68Y2XpBPUV1rCtNGXh8Xe5MGWzb1Xe", "53OWivH0fK2VIAuMZTycr52EnSEnPWj97Jy3Dpiz", "AH7lRIhbsL167nptv6eub9xDJXVHnYUm2vL7FLjK", "OXLUmejkh9PlNDS4gSvi9gcEWacOpTz2KUVepVf4", "i6e1I8cfX625TTwRJlD2DshKyAoaUtO8aeoaR4i2", "i6e1I8cfX625TTwRJlD2DshKyAoaUtO8aeoaR4i2", "1cRIX8XoWP801OILra02i13IJ08IARBP5B6ydcnp", "2hicPxo2vy2NMHcg2cEU9crOeKtDpc14NEfMCthc", "2SrxurU07T2XPDxCAItjj4yYEMXlwV8K2kJB78AX", "SMbBD7DS9b3EPcyBVg4a8az1rRWR9xB068chHoUN", "wQDLu86Qab61vbtru7thf8Yj0xaeqVUH4ohoXESu", "Y53dikxXdT4E3afI1l8BMBSWgyhKvf65k6Dut1k6", "iMTsSsgDdI2FC0FjeEejS9LMxuJgDhFO3OHlwVjT", "HKHvPSPDezaxsTohFgDuG4WpKW6hB4SFYyztm9vc", "5UzOrcAE2F3rcuMX2EeIlaYv5VUcDe6Lyh0PeZX2"];
|
|
52
|
+
readonly values: ["6TUi99Tq3O9MWj1IFX8Pv6spmPXzcvhy9NvBoeW2", "vWe20Dfyui2ouvfOhtSTY3Czeo8lFdbo5xXQBALZ", "clDebbfo9edXq1GydZ0CahSAfSimPj616lFa9p8e", "57G91zNoew4nYxIoqSCpS1vWr8JT3gGVasNqMwgG", "BPVeP8zThG467vVIYzuiu5aVWAkS9KiR6tT1TdTP", "M3uox3cw0u8YCPV9cIREA6AugUMvPFTk6qOpm4um", "cGlmpTmNh657m8TiV5RFdwna6FG5pxM6ajiNHvw3", "1QxzeJ4XKT78ba86whLct6sc7dW60Dl461UVWFdw", "pLQBJsA6zS9tg990rbdBD6UdABkWRv5O60vlrVcW", "lUzTaIRxs95iin3pCAafB1ChA5akBiuQ1tjhXnau", "di9ZSqn1Ya68Y2XpBPUV1rCtNGXh8Xe5MGWzb1Xe", "53OWivH0fK2VIAuMZTycr52EnSEnPWj97Jy3Dpiz", "AH7lRIhbsL167nptv6eub9xDJXVHnYUm2vL7FLjK", "OXLUmejkh9PlNDS4gSvi9gcEWacOpTz2KUVepVf4", "i6e1I8cfX625TTwRJlD2DshKyAoaUtO8aeoaR4i2", "i6e1I8cfX625TTwRJlD2DshKyAoaUtO8aeoaR4i2", "1cRIX8XoWP801OILra02i13IJ08IARBP5B6ydcnp", "2hicPxo2vy2NMHcg2cEU9crOeKtDpc14NEfMCthc", "2SrxurU07T2XPDxCAItjj4yYEMXlwV8K2kJB78AX", "SMbBD7DS9b3EPcyBVg4a8az1rRWR9xB068chHoUN", "wQDLu86Qab61vbtru7thf8Yj0xaeqVUH4ohoXESu", "Y53dikxXdT4E3afI1l8BMBSWgyhKvf65k6Dut1k6", "iMTsSsgDdI2FC0FjeEejS9LMxuJgDhFO3OHlwVjT", "HKHvPSPDezaxsTohFgDuG4WpKW6hB4SFYyztm9vc", "5UzOrcAE2F3rcuMX2EeIlaYv5VUcDe6Lyh0PeZX2", "AiXTqs1RO13a47tS5vjqA1UdRggx0tzJ3xKrrNH6"];
|
|
53
53
|
}];
|
|
54
54
|
readonly value: true;
|
|
55
55
|
}];
|
|
@@ -94,7 +94,7 @@ export declare const flagConfig: {
|
|
|
94
94
|
readonly if_any: [{
|
|
95
95
|
readonly key: "apiKey";
|
|
96
96
|
readonly type: "isAnyOf";
|
|
97
|
-
readonly values: ["Y53dikxXdT4E3afI1l8BMBSWgyhKvf65k6Dut1k6"];
|
|
97
|
+
readonly values: ["Y53dikxXdT4E3afI1l8BMBSWgyhKvf65k6Dut1k6", "clDebbfo9edXq1GydZ0CahSAfSimPj616lFa9p8e", "pLQBJsA6zS9tg990rbdBD6UdABkWRv5O60vlrVcW"];
|
|
98
98
|
}];
|
|
99
99
|
readonly value: string;
|
|
100
100
|
}];
|
|
@@ -23,15 +23,15 @@ import {
|
|
|
23
23
|
import {
|
|
24
24
|
uniswapWallet
|
|
25
25
|
} from "./chunk-LH7BMNFZ.js";
|
|
26
|
-
import {
|
|
27
|
-
walletConnectWallet
|
|
28
|
-
} from "./chunk-NP5QGWNL.js";
|
|
29
26
|
import {
|
|
30
27
|
xdefiWallet
|
|
31
28
|
} from "./chunk-BOU4WKRZ.js";
|
|
32
29
|
import {
|
|
33
|
-
|
|
34
|
-
} from "./chunk-
|
|
30
|
+
walletConnectWallet
|
|
31
|
+
} from "./chunk-NP5QGWNL.js";
|
|
32
|
+
import {
|
|
33
|
+
phantomWallet
|
|
34
|
+
} from "./chunk-362NXNTM.js";
|
|
35
35
|
import {
|
|
36
36
|
rainbowWallet
|
|
37
37
|
} from "./chunk-2KUBG3S6.js";
|
|
@@ -62,12 +62,12 @@ import {
|
|
|
62
62
|
import {
|
|
63
63
|
oktoWallet
|
|
64
64
|
} from "./chunk-ADIXAKUL.js";
|
|
65
|
-
import {
|
|
66
|
-
omniWallet
|
|
67
|
-
} from "./chunk-7CUY5G6R.js";
|
|
68
65
|
import {
|
|
69
66
|
okxWallet
|
|
70
67
|
} from "./chunk-TDIEHTMB.js";
|
|
68
|
+
import {
|
|
69
|
+
omniWallet
|
|
70
|
+
} from "./chunk-7CUY5G6R.js";
|
|
71
71
|
import {
|
|
72
72
|
oneInchWallet
|
|
73
73
|
} from "./chunk-OESTDX6I.js";
|
|
@@ -75,8 +75,8 @@ import {
|
|
|
75
75
|
oneKeyWallet
|
|
76
76
|
} from "./chunk-SHBUZ7U7.js";
|
|
77
77
|
import {
|
|
78
|
-
|
|
79
|
-
} from "./chunk-
|
|
78
|
+
rabbyWallet
|
|
79
|
+
} from "./chunk-BBOM42DL.js";
|
|
80
80
|
import {
|
|
81
81
|
foxWallet
|
|
82
82
|
} from "./chunk-7QONTUXT.js";
|
|
@@ -92,12 +92,12 @@ import {
|
|
|
92
92
|
import {
|
|
93
93
|
imTokenWallet
|
|
94
94
|
} from "./chunk-COZ7MIQS.js";
|
|
95
|
-
import {
|
|
96
|
-
kresusWallet
|
|
97
|
-
} from "./chunk-MJXPRJZT.js";
|
|
98
95
|
import {
|
|
99
96
|
injectedWallet
|
|
100
97
|
} from "./chunk-XWUJE7MW.js";
|
|
98
|
+
import {
|
|
99
|
+
kresusWallet
|
|
100
|
+
} from "./chunk-MJXPRJZT.js";
|
|
101
101
|
import {
|
|
102
102
|
ledgerWallet
|
|
103
103
|
} from "./chunk-BRBKM4PW.js";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@funkit/connect",
|
|
3
|
-
"version": "7.0.0",
|
|
3
|
+
"version": "7.0.3-next.0",
|
|
4
4
|
"description": "Funkit Connect SDK elevates DeFi apps via web2 sign-ins and one-click checkouts.",
|
|
5
5
|
"files": [
|
|
6
6
|
"dist",
|
|
@@ -100,11 +100,10 @@
|
|
|
100
100
|
"ua-parser-js": "^1.0.37",
|
|
101
101
|
"use-debounce": "^10.0.5",
|
|
102
102
|
"uuid": "^9.0.1",
|
|
103
|
-
"@funkit/api-base": "1.12.
|
|
104
|
-
"@funkit/chains": "0.5.0",
|
|
105
|
-
"@funkit/
|
|
106
|
-
"@funkit/
|
|
107
|
-
"@funkit/utils": "1.1.20"
|
|
103
|
+
"@funkit/api-base": "1.12.21",
|
|
104
|
+
"@funkit/chains": "0.5.2-next.0",
|
|
105
|
+
"@funkit/fun-relay": "2.1.16-next.0",
|
|
106
|
+
"@funkit/utils": "1.1.21"
|
|
108
107
|
},
|
|
109
108
|
"repository": {
|
|
110
109
|
"type": "git",
|