@funkit/connect 5.5.20 → 6.0.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 +30 -0
- package/dist/{chunk-ES634CAR.js → chunk-IOMUPAAW.js} +1 -1
- package/dist/{chunk-OV3P5HQK.js → chunk-IVQ57535.js} +5 -3
- package/dist/{chunk-K4APSFTL.js → chunk-N6UWLAUQ.js} +1 -1
- package/dist/components/Box/Box.d.ts +17 -17
- package/dist/components/Dialog/Dialog.css.d.ts +2 -1
- package/dist/components/Dialog/DialogContent.css.d.ts +1 -0
- package/dist/components/FunBottomBar/FunBottomBar.css.d.ts +0 -1
- package/dist/components/FunButton/FunButton.d.ts +3 -1
- package/dist/components/FunCheckoutHistory/FunCheckoutStatus.css.d.ts +0 -2
- package/dist/components/FunCheckoutHistory/FunCheckoutStatus.d.ts +1 -12
- package/dist/components/FunCheckoutHistory/FunDirectExecutionStatus.d.ts +1 -1
- package/dist/components/FunCountdown/FunCountdown.d.ts +1 -4
- package/dist/components/Icons/SpinnerIcon.d.ts +4 -2
- package/dist/components/Icons/StatusIcons.css.d.ts +16 -0
- package/dist/components/Icons/StatusIcons.d.ts +8 -8
- package/dist/components/ReceiveAmount/ReceiveAmount.d.ts +5 -3
- package/dist/components/TransactionStatus/TransactionStatus.d.ts +10 -0
- package/dist/consts/customers.d.ts +1 -0
- package/dist/css/sprinkles.css.d.ts +23 -19
- package/dist/hooks/useCheckoutDirectExecution.d.ts +1 -0
- package/dist/index.css +2802 -2761
- package/dist/index.js +3124 -2738
- package/dist/modals/CheckoutModal/ConfirmationStep/useCheckoutConfirmation.d.ts +2 -1
- package/dist/providers/FunkitCheckoutContext.d.ts +6 -0
- package/dist/providers/FunkitConfigContext.d.ts +1 -0
- package/dist/providers/FunkitThemeProvider.d.ts +9 -3
- package/dist/providers/ModalSizeContext.d.ts +1 -1
- package/dist/themes/baseTheme.js +1 -1
- package/dist/themes/darkTheme.js +2 -2
- package/dist/themes/lightTheme.js +2 -2
- package/dist/utils/checkout.d.ts +9 -1
- package/dist/utils/flags/config.d.ts +19 -2
- package/dist/utils/signature.d.ts +1 -0
- package/dist/wallets/walletConnectors/index.js +32 -32
- package/package.json +6 -6
|
@@ -8,7 +8,8 @@ export declare enum ConfirmationErrorCode {
|
|
|
8
8
|
QUOTE_EXPIRED = "QUOTE_EXPIRED",
|
|
9
9
|
GENERIC_ERROR = "GENERIC_ERROR",
|
|
10
10
|
RISK_ERROR = "RISK_ERROR",
|
|
11
|
-
SIGNATURE_DENIED = "SIGNATURE_DENIED"
|
|
11
|
+
SIGNATURE_DENIED = "SIGNATURE_DENIED",
|
|
12
|
+
SWITCH_CHAIN_ERROR = "SWITCH_CHAIN_ERROR"
|
|
12
13
|
}
|
|
13
14
|
interface UseCheckoutConfirmationOptions {
|
|
14
15
|
onError(error: CheckoutConfirmationError): void;
|
|
@@ -160,6 +160,8 @@ export interface FunkitActiveWithdrawalItem {
|
|
|
160
160
|
}
|
|
161
161
|
interface FunkitCheckoutContextInterface {
|
|
162
162
|
checkoutItem: FunkitActiveCheckoutItem | null;
|
|
163
|
+
getCheckoutProgress(checkoutId: string): CheckoutProgress | undefined;
|
|
164
|
+
setCheckoutProgress(checkoutId: string, progress: CheckoutProgress): void;
|
|
163
165
|
initNewCheckout(initSettings: UseFunkitCheckoutPropsWithFullConfig): string;
|
|
164
166
|
updateModalTitleMeta(newMeta: string): void;
|
|
165
167
|
updateSourceAsset(selectedSource: Omit<AssetHoldingsItem, 'amount' | 'usdAmount' | 'chainSymbolKey'>): void;
|
|
@@ -182,6 +184,10 @@ interface FunkitCheckoutContextInterface {
|
|
|
182
184
|
initNewWithdrawal(initSettings: Partial<UseFunkitCheckoutPropsWithFullConfig>): string;
|
|
183
185
|
updateWithdrawalSourceAssetAmount(newSourceAmount: number): void;
|
|
184
186
|
}
|
|
187
|
+
export type CheckoutProgressStep = 1 | 2;
|
|
188
|
+
export type CheckoutProgress = {
|
|
189
|
+
step: CheckoutProgressStep;
|
|
190
|
+
};
|
|
185
191
|
export declare function FunkitCheckoutProvider({ children }: {
|
|
186
192
|
children: ReactNode;
|
|
187
193
|
}): React.JSX.Element;
|
|
@@ -44,6 +44,7 @@ export interface FunkitUiCustomizationsConfig {
|
|
|
44
44
|
/** Whether paying by card is a payment method the users can use - defaults to true */
|
|
45
45
|
isCardEnabled?: boolean;
|
|
46
46
|
};
|
|
47
|
+
callToActionsUppercase?: boolean;
|
|
47
48
|
}
|
|
48
49
|
export declare const DEFAULT_TEXT_CUSTOMIZATIONS: FunkitTextCustomizationsConfig;
|
|
49
50
|
interface FunkitLoginOptionsConfig {
|
|
@@ -136,6 +136,7 @@ export declare const useActiveTheme: () => {
|
|
|
136
136
|
bold: string;
|
|
137
137
|
heavy: string;
|
|
138
138
|
modalTopbarTitle: string;
|
|
139
|
+
modalBottomBarButtonText: string;
|
|
139
140
|
};
|
|
140
141
|
fontSize: {
|
|
141
142
|
'10': {
|
|
@@ -222,7 +223,8 @@ export declare const useActiveTheme: () => {
|
|
|
222
223
|
spacing: {
|
|
223
224
|
modalBaseHorizontalPadding: string;
|
|
224
225
|
modalBottomHorizontalPadding: string;
|
|
225
|
-
|
|
226
|
+
modalPaddingBottomUpper: string;
|
|
227
|
+
modalPaddingBottomLower: string;
|
|
226
228
|
modalTopBarVerticalTextSpacing: string;
|
|
227
229
|
};
|
|
228
230
|
blurs: {
|
|
@@ -348,6 +350,7 @@ export declare const useActiveTheme: () => {
|
|
|
348
350
|
bold: string;
|
|
349
351
|
heavy: string;
|
|
350
352
|
modalTopbarTitle: string;
|
|
353
|
+
modalBottomBarButtonText: string;
|
|
351
354
|
};
|
|
352
355
|
fontSize: {
|
|
353
356
|
'10': {
|
|
@@ -434,7 +437,8 @@ export declare const useActiveTheme: () => {
|
|
|
434
437
|
spacing: {
|
|
435
438
|
modalBaseHorizontalPadding: string;
|
|
436
439
|
modalBottomHorizontalPadding: string;
|
|
437
|
-
|
|
440
|
+
modalPaddingBottomUpper: string;
|
|
441
|
+
modalPaddingBottomLower: string;
|
|
438
442
|
modalTopBarVerticalTextSpacing: string;
|
|
439
443
|
};
|
|
440
444
|
blurs: {
|
|
@@ -558,6 +562,7 @@ export declare const useActiveTheme: () => {
|
|
|
558
562
|
bold: string;
|
|
559
563
|
heavy: string;
|
|
560
564
|
modalTopbarTitle: string;
|
|
565
|
+
modalBottomBarButtonText: string;
|
|
561
566
|
};
|
|
562
567
|
fontSize: {
|
|
563
568
|
'10': {
|
|
@@ -644,7 +649,8 @@ export declare const useActiveTheme: () => {
|
|
|
644
649
|
spacing: {
|
|
645
650
|
modalBaseHorizontalPadding: string;
|
|
646
651
|
modalBottomHorizontalPadding: string;
|
|
647
|
-
|
|
652
|
+
modalPaddingBottomUpper: string;
|
|
653
|
+
modalPaddingBottomLower: string;
|
|
648
654
|
modalTopBarVerticalTextSpacing: string;
|
|
649
655
|
};
|
|
650
656
|
blurs: {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import React, { type ReactNode } from 'react';
|
|
2
2
|
export declare const ModalSizeOptions: {
|
|
3
3
|
readonly COMPACT: "compact";
|
|
4
|
-
readonly WIDE: "wide";
|
|
5
4
|
readonly MEDIUM: "medium";
|
|
5
|
+
readonly WIDE: "wide";
|
|
6
6
|
};
|
|
7
7
|
export type ModalSizes = (typeof ModalSizeOptions)[keyof typeof ModalSizeOptions];
|
|
8
8
|
export declare const ModalSizeContext: React.Context<ModalSizes>;
|
package/dist/themes/baseTheme.js
CHANGED
package/dist/themes/darkTheme.js
CHANGED
package/dist/utils/checkout.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type CheckoutHistoryItem, type CheckoutRefundState, CheckoutState, type DirectExecution } from '@funkit/api-base';
|
|
2
|
-
import { type CheckoutQuoteResponse } from '@funkit/utils';
|
|
2
|
+
import { type ApiFunkitCheckoutQuoteResult, type CheckoutQuoteResponse } from '@funkit/utils';
|
|
3
3
|
import { type Config } from '@wagmi/core';
|
|
4
4
|
import { type Address, type Hex } from 'viem';
|
|
5
5
|
import type { UseConfigReturnType } from 'wagmi';
|
|
@@ -78,6 +78,14 @@ export type TokenInfo = {
|
|
|
78
78
|
export declare function decorateTokenList(tokensChainMap: Record<string, Set<string>>, targetChainId: string, apiKey: string): Promise<TokenInfo[]>;
|
|
79
79
|
export declare function formatTokenAmountForMoonpay(amount: number, mpCurrencyCode: string): string;
|
|
80
80
|
export declare function getTimeFromNowSeconds(startTimeMs: number, durationMs: number): number;
|
|
81
|
+
export declare function getCheckoutReceivedAmount({ config, quote, }: {
|
|
82
|
+
config: FunkitCheckoutConfig | ServerCheckoutConfig;
|
|
83
|
+
quote: ApiFunkitCheckoutQuoteResult | null;
|
|
84
|
+
}): number;
|
|
85
|
+
export declare function getCheckoutReceivedAmountFormatted({ config, quote, }: {
|
|
86
|
+
config: FunkitCheckoutConfig | ServerCheckoutConfig;
|
|
87
|
+
quote: ApiFunkitCheckoutQuoteResult | null;
|
|
88
|
+
}): string;
|
|
81
89
|
/**
|
|
82
90
|
* Given a checkout config, returns the display string for the checkout item.
|
|
83
91
|
* Arbitrary action checkouts: Display the targetAssetAmount
|
|
@@ -34,14 +34,31 @@ export declare const flagConfig: {
|
|
|
34
34
|
enable_token_transfer: {
|
|
35
35
|
type: "boolean";
|
|
36
36
|
default_value: false;
|
|
37
|
-
overrides: {
|
|
37
|
+
overrides: ({
|
|
38
38
|
if_any: {
|
|
39
39
|
key: "apiKey";
|
|
40
40
|
type: "isAnyOf";
|
|
41
41
|
values: string[];
|
|
42
42
|
}[];
|
|
43
43
|
value: true;
|
|
44
|
-
|
|
44
|
+
if_all?: undefined;
|
|
45
|
+
} | {
|
|
46
|
+
if_all: ({
|
|
47
|
+
key: "userId";
|
|
48
|
+
type: "isAnyOf";
|
|
49
|
+
values: string[];
|
|
50
|
+
} | {
|
|
51
|
+
key: "apiKey";
|
|
52
|
+
type: "isAnyOf";
|
|
53
|
+
values: string[];
|
|
54
|
+
})[];
|
|
55
|
+
if_any: {
|
|
56
|
+
key: "userId";
|
|
57
|
+
type: "pctRollout";
|
|
58
|
+
pct: number;
|
|
59
|
+
}[];
|
|
60
|
+
value: true;
|
|
61
|
+
})[];
|
|
45
62
|
};
|
|
46
63
|
enable_fiat_deposit: {
|
|
47
64
|
type: "boolean";
|
|
@@ -2,24 +2,24 @@
|
|
|
2
2
|
import {
|
|
3
3
|
xdefiWallet
|
|
4
4
|
} from "./chunk-BOU4WKRZ.js";
|
|
5
|
-
import {
|
|
6
|
-
zealWallet
|
|
7
|
-
} from "./chunk-RNBEDQHF.js";
|
|
8
5
|
import {
|
|
9
6
|
zerionWallet
|
|
10
7
|
} from "./chunk-SULRQO27.js";
|
|
11
8
|
import {
|
|
12
|
-
|
|
13
|
-
} from "./chunk-
|
|
9
|
+
zealWallet
|
|
10
|
+
} from "./chunk-RNBEDQHF.js";
|
|
11
|
+
import {
|
|
12
|
+
talismanWallet
|
|
13
|
+
} from "./chunk-DRO6WYMM.js";
|
|
14
14
|
import {
|
|
15
15
|
tahoWallet
|
|
16
16
|
} from "./chunk-ZZZRUXZE.js";
|
|
17
|
+
import {
|
|
18
|
+
safeheronWallet
|
|
19
|
+
} from "./chunk-RZIO5TFF.js";
|
|
17
20
|
import {
|
|
18
21
|
tokenPocketWallet
|
|
19
22
|
} from "./chunk-2L43XSW3.js";
|
|
20
|
-
import {
|
|
21
|
-
talismanWallet
|
|
22
|
-
} from "./chunk-DRO6WYMM.js";
|
|
23
23
|
import {
|
|
24
24
|
tokenaryWallet
|
|
25
25
|
} from "./chunk-D6AOOO5F.js";
|
|
@@ -33,11 +33,8 @@ import {
|
|
|
33
33
|
walletConnectWallet
|
|
34
34
|
} from "./chunk-NP5QGWNL.js";
|
|
35
35
|
import {
|
|
36
|
-
|
|
37
|
-
} from "./chunk-
|
|
38
|
-
import {
|
|
39
|
-
rainbowWallet
|
|
40
|
-
} from "./chunk-2KUBG3S6.js";
|
|
36
|
+
oneKeyWallet
|
|
37
|
+
} from "./chunk-SHBUZ7U7.js";
|
|
41
38
|
import {
|
|
42
39
|
rabbyWallet
|
|
43
40
|
} from "./chunk-BBOM42DL.js";
|
|
@@ -45,47 +42,50 @@ import {
|
|
|
45
42
|
ramperWallet
|
|
46
43
|
} from "./chunk-BYXPFMI7.js";
|
|
47
44
|
import {
|
|
48
|
-
|
|
49
|
-
} from "./chunk-
|
|
45
|
+
phantomWallet
|
|
46
|
+
} from "./chunk-362NXNTM.js";
|
|
50
47
|
import {
|
|
51
48
|
roninWallet
|
|
52
49
|
} from "./chunk-NWIQNBJU.js";
|
|
53
50
|
import {
|
|
54
|
-
|
|
55
|
-
} from "./chunk-
|
|
51
|
+
safeWallet
|
|
52
|
+
} from "./chunk-BQQQL6UD.js";
|
|
56
53
|
import {
|
|
57
54
|
safepalWallet
|
|
58
55
|
} from "./chunk-NT2HYJKW.js";
|
|
59
56
|
import {
|
|
60
|
-
|
|
61
|
-
} from "./chunk-
|
|
57
|
+
subWallet
|
|
58
|
+
} from "./chunk-JWFF4AAL.js";
|
|
62
59
|
import {
|
|
63
60
|
metaMaskWallet
|
|
64
61
|
} from "./chunk-2HYNUNAS.js";
|
|
62
|
+
import {
|
|
63
|
+
mewWallet
|
|
64
|
+
} from "./chunk-OL5ZO7E4.js";
|
|
65
|
+
import {
|
|
66
|
+
ledgerWallet
|
|
67
|
+
} from "./chunk-BRBKM4PW.js";
|
|
65
68
|
import {
|
|
66
69
|
oktoWallet
|
|
67
70
|
} from "./chunk-ADIXAKUL.js";
|
|
68
|
-
import {
|
|
69
|
-
okxWallet
|
|
70
|
-
} from "./chunk-TDIEHTMB.js";
|
|
71
71
|
import {
|
|
72
72
|
omniWallet
|
|
73
73
|
} from "./chunk-7CUY5G6R.js";
|
|
74
74
|
import {
|
|
75
|
-
|
|
76
|
-
} from "./chunk-
|
|
75
|
+
okxWallet
|
|
76
|
+
} from "./chunk-TDIEHTMB.js";
|
|
77
77
|
import {
|
|
78
78
|
oneInchWallet
|
|
79
79
|
} from "./chunk-OESTDX6I.js";
|
|
80
80
|
import {
|
|
81
|
-
|
|
82
|
-
} from "./chunk-
|
|
83
|
-
import {
|
|
84
|
-
frameWallet
|
|
85
|
-
} from "./chunk-IFON7E6U.js";
|
|
81
|
+
rainbowWallet
|
|
82
|
+
} from "./chunk-2KUBG3S6.js";
|
|
86
83
|
import {
|
|
87
84
|
foxWallet
|
|
88
85
|
} from "./chunk-7QONTUXT.js";
|
|
86
|
+
import {
|
|
87
|
+
frameWallet
|
|
88
|
+
} from "./chunk-IFON7E6U.js";
|
|
89
89
|
import {
|
|
90
90
|
frontierWallet
|
|
91
91
|
} from "./chunk-TCAGNB4B.js";
|
|
@@ -131,12 +131,12 @@ import {
|
|
|
131
131
|
import {
|
|
132
132
|
bifrostWallet
|
|
133
133
|
} from "./chunk-A5N6B5UW.js";
|
|
134
|
-
import {
|
|
135
|
-
bitskiWallet
|
|
136
|
-
} from "./chunk-HS3C7OQV.js";
|
|
137
134
|
import {
|
|
138
135
|
bitgetWallet
|
|
139
136
|
} from "./chunk-TDAVGY5F.js";
|
|
137
|
+
import {
|
|
138
|
+
bitskiWallet
|
|
139
|
+
} from "./chunk-HS3C7OQV.js";
|
|
140
140
|
import {
|
|
141
141
|
bloomWallet
|
|
142
142
|
} from "./chunk-S27IADFU.js";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@funkit/connect",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "6.0.1",
|
|
4
4
|
"description": "Funkit Connect SDK elevates DeFi apps via web2 sign-ins and one-click checkouts.",
|
|
5
5
|
"files": [
|
|
6
6
|
"dist",
|
|
@@ -89,12 +89,12 @@
|
|
|
89
89
|
"ua-parser-js": "^1.0.37",
|
|
90
90
|
"use-debounce": "^10.0.5",
|
|
91
91
|
"uuid": "^9.0.1",
|
|
92
|
-
"@funkit/api-base": "1.9.9",
|
|
93
92
|
"@funkit/chains": "0.3.6",
|
|
94
|
-
"@funkit/
|
|
95
|
-
"@funkit/
|
|
96
|
-
"@funkit/
|
|
97
|
-
"@funkit/wagmi-tools": "3.0.
|
|
93
|
+
"@funkit/api-base": "1.9.10",
|
|
94
|
+
"@funkit/utils": "1.1.8",
|
|
95
|
+
"@funkit/core": "2.3.34",
|
|
96
|
+
"@funkit/wagmi-tools": "3.0.56",
|
|
97
|
+
"@funkit/fun-relay": "0.1.12"
|
|
98
98
|
},
|
|
99
99
|
"repository": {
|
|
100
100
|
"type": "git",
|