@funkit/connect 5.5.21 → 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 +15 -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/FunBottomBar/FunBottomBar.css.d.ts +0 -1
- package/dist/components/FunButton/FunButton.d.ts +2 -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 +2778 -2745
- package/dist/index.js +3053 -2720
- package/dist/providers/FunkitCheckoutContext.d.ts +6 -0
- package/dist/providers/FunkitThemeProvider.d.ts +9 -3
- 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/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 +53 -53
- 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 +5 -5
|
@@ -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;
|
|
@@ -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: {
|
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
|
|
@@ -1,100 +1,100 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import {
|
|
3
|
-
|
|
4
|
-
} from "./chunk-
|
|
3
|
+
xdefiWallet
|
|
4
|
+
} from "./chunk-BOU4WKRZ.js";
|
|
5
|
+
import {
|
|
6
|
+
zerionWallet
|
|
7
|
+
} from "./chunk-SULRQO27.js";
|
|
5
8
|
import {
|
|
6
9
|
zealWallet
|
|
7
10
|
} from "./chunk-RNBEDQHF.js";
|
|
8
11
|
import {
|
|
9
|
-
|
|
10
|
-
} from "./chunk-
|
|
11
|
-
import {
|
|
12
|
-
safepalWallet
|
|
13
|
-
} from "./chunk-EC6CHBSZ.js";
|
|
12
|
+
talismanWallet
|
|
13
|
+
} from "./chunk-DRO6WYMM.js";
|
|
14
14
|
import {
|
|
15
15
|
tahoWallet
|
|
16
16
|
} from "./chunk-ZZZRUXZE.js";
|
|
17
17
|
import {
|
|
18
|
-
|
|
19
|
-
} from "./chunk-
|
|
18
|
+
safeheronWallet
|
|
19
|
+
} from "./chunk-RZIO5TFF.js";
|
|
20
20
|
import {
|
|
21
21
|
tokenPocketWallet
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-2L43XSW3.js";
|
|
23
23
|
import {
|
|
24
24
|
tokenaryWallet
|
|
25
25
|
} from "./chunk-D6AOOO5F.js";
|
|
26
|
+
import {
|
|
27
|
+
trustWallet
|
|
28
|
+
} from "./chunk-VYBAYMP3.js";
|
|
26
29
|
import {
|
|
27
30
|
uniswapWallet
|
|
28
31
|
} from "./chunk-LH7BMNFZ.js";
|
|
29
32
|
import {
|
|
30
|
-
|
|
31
|
-
} from "./chunk-
|
|
33
|
+
walletConnectWallet
|
|
34
|
+
} from "./chunk-NP5QGWNL.js";
|
|
32
35
|
import {
|
|
33
|
-
|
|
34
|
-
} from "./chunk-
|
|
36
|
+
oneKeyWallet
|
|
37
|
+
} from "./chunk-SHBUZ7U7.js";
|
|
35
38
|
import {
|
|
36
39
|
rabbyWallet
|
|
37
40
|
} from "./chunk-BBOM42DL.js";
|
|
41
|
+
import {
|
|
42
|
+
ramperWallet
|
|
43
|
+
} from "./chunk-BYXPFMI7.js";
|
|
38
44
|
import {
|
|
39
45
|
phantomWallet
|
|
40
46
|
} from "./chunk-362NXNTM.js";
|
|
41
47
|
import {
|
|
42
48
|
roninWallet
|
|
43
|
-
} from "./chunk-
|
|
44
|
-
import {
|
|
45
|
-
rainbowWallet
|
|
46
|
-
} from "./chunk-3CICVJUN.js";
|
|
47
|
-
import {
|
|
48
|
-
ramperWallet
|
|
49
|
-
} from "./chunk-BYXPFMI7.js";
|
|
49
|
+
} from "./chunk-NWIQNBJU.js";
|
|
50
50
|
import {
|
|
51
51
|
safeWallet
|
|
52
52
|
} from "./chunk-BQQQL6UD.js";
|
|
53
53
|
import {
|
|
54
|
-
|
|
55
|
-
} from "./chunk-
|
|
54
|
+
safepalWallet
|
|
55
|
+
} from "./chunk-NT2HYJKW.js";
|
|
56
56
|
import {
|
|
57
57
|
subWallet
|
|
58
|
-
} from "./chunk-
|
|
59
|
-
import {
|
|
60
|
-
ledgerWallet
|
|
61
|
-
} from "./chunk-BRBKM4PW.js";
|
|
58
|
+
} from "./chunk-JWFF4AAL.js";
|
|
62
59
|
import {
|
|
63
60
|
metaMaskWallet
|
|
64
|
-
} from "./chunk-
|
|
61
|
+
} from "./chunk-2HYNUNAS.js";
|
|
65
62
|
import {
|
|
66
63
|
mewWallet
|
|
67
64
|
} from "./chunk-OL5ZO7E4.js";
|
|
65
|
+
import {
|
|
66
|
+
ledgerWallet
|
|
67
|
+
} from "./chunk-BRBKM4PW.js";
|
|
68
68
|
import {
|
|
69
69
|
oktoWallet
|
|
70
70
|
} from "./chunk-ADIXAKUL.js";
|
|
71
|
-
import {
|
|
72
|
-
okxWallet
|
|
73
|
-
} from "./chunk-AFXHGWBH.js";
|
|
74
71
|
import {
|
|
75
72
|
omniWallet
|
|
76
73
|
} from "./chunk-7CUY5G6R.js";
|
|
74
|
+
import {
|
|
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-
|
|
81
|
+
rainbowWallet
|
|
82
|
+
} from "./chunk-2KUBG3S6.js";
|
|
83
83
|
import {
|
|
84
84
|
foxWallet
|
|
85
|
-
} from "./chunk-
|
|
85
|
+
} from "./chunk-7QONTUXT.js";
|
|
86
86
|
import {
|
|
87
87
|
frameWallet
|
|
88
88
|
} from "./chunk-IFON7E6U.js";
|
|
89
89
|
import {
|
|
90
90
|
frontierWallet
|
|
91
|
-
} from "./chunk-
|
|
91
|
+
} from "./chunk-TCAGNB4B.js";
|
|
92
|
+
import {
|
|
93
|
+
gateWallet
|
|
94
|
+
} from "./chunk-FKJJQNKX.js";
|
|
92
95
|
import {
|
|
93
96
|
imTokenWallet
|
|
94
97
|
} from "./chunk-COZ7MIQS.js";
|
|
95
|
-
import {
|
|
96
|
-
gateWallet
|
|
97
|
-
} from "./chunk-CJGUM55H.js";
|
|
98
98
|
import {
|
|
99
99
|
injectedWallet
|
|
100
100
|
} from "./chunk-XWUJE7MW.js";
|
|
@@ -102,20 +102,20 @@ import {
|
|
|
102
102
|
kresusWallet
|
|
103
103
|
} from "./chunk-MJXPRJZT.js";
|
|
104
104
|
import {
|
|
105
|
-
|
|
106
|
-
} from "./chunk-
|
|
105
|
+
bybitWallet
|
|
106
|
+
} from "./chunk-2STUC6QL.js";
|
|
107
107
|
import {
|
|
108
108
|
clvWallet
|
|
109
|
-
} from "./chunk-
|
|
109
|
+
} from "./chunk-M3NZ6R2E.js";
|
|
110
110
|
import {
|
|
111
111
|
coin98Wallet
|
|
112
|
-
} from "./chunk-
|
|
112
|
+
} from "./chunk-OBOVHCEI.js";
|
|
113
113
|
import {
|
|
114
114
|
coinbaseWallet
|
|
115
115
|
} from "./chunk-H4IRCEZN.js";
|
|
116
116
|
import {
|
|
117
117
|
coreWallet
|
|
118
|
-
} from "./chunk-
|
|
118
|
+
} from "./chunk-VR4TBQ6S.js";
|
|
119
119
|
import {
|
|
120
120
|
dawnWallet
|
|
121
121
|
} from "./chunk-HWPKCIBE.js";
|
|
@@ -128,15 +128,12 @@ import {
|
|
|
128
128
|
import {
|
|
129
129
|
argentWallet
|
|
130
130
|
} from "./chunk-WSQ2YJO2.js";
|
|
131
|
-
import {
|
|
132
|
-
bitgetWallet
|
|
133
|
-
} from "./chunk-5W7VDOCL.js";
|
|
134
|
-
import {
|
|
135
|
-
bitverseWallet
|
|
136
|
-
} from "./chunk-3HZRRP4Y.js";
|
|
137
131
|
import {
|
|
138
132
|
bifrostWallet
|
|
139
|
-
} from "./chunk-
|
|
133
|
+
} from "./chunk-A5N6B5UW.js";
|
|
134
|
+
import {
|
|
135
|
+
bitgetWallet
|
|
136
|
+
} from "./chunk-TDAVGY5F.js";
|
|
140
137
|
import {
|
|
141
138
|
bitskiWallet
|
|
142
139
|
} from "./chunk-HS3C7OQV.js";
|
|
@@ -144,10 +141,13 @@ import {
|
|
|
144
141
|
bloomWallet
|
|
145
142
|
} from "./chunk-S27IADFU.js";
|
|
146
143
|
import {
|
|
147
|
-
|
|
148
|
-
} from "./chunk-
|
|
149
|
-
import "./chunk-DNSG5Q7V.js";
|
|
144
|
+
bitverseWallet
|
|
145
|
+
} from "./chunk-3HZRRP4Y.js";
|
|
150
146
|
import "./chunk-23WIEY36.js";
|
|
147
|
+
import {
|
|
148
|
+
braveWallet
|
|
149
|
+
} from "./chunk-BPZ2XJO2.js";
|
|
150
|
+
import "./chunk-DNSG5Q7V.js";
|
|
151
151
|
export {
|
|
152
152
|
argentWallet,
|
|
153
153
|
bifrostWallet,
|
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.10",
|
|
93
|
-
"@funkit/core": "2.3.34",
|
|
94
|
-
"@funkit/fun-relay": "0.1.12",
|
|
95
92
|
"@funkit/chains": "0.3.6",
|
|
93
|
+
"@funkit/api-base": "1.9.10",
|
|
96
94
|
"@funkit/utils": "1.1.8",
|
|
97
|
-
"@funkit/
|
|
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",
|