@funkit/connect 9.4.3 → 9.5.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 +15 -0
- package/dist/domains/quoteMode/exactIn.d.ts +2 -0
- package/dist/domains/quoteMode/exactOut.d.ts +2 -0
- package/dist/domains/quoteMode/gasEstimate.d.ts +15 -0
- package/dist/domains/quoteMode/index.d.ts +9 -0
- package/dist/domains/quoteMode/oneToOne.d.ts +21 -0
- package/dist/domains/quoteMode/resolveQuoteMode.d.ts +19 -0
- package/dist/domains/quoteMode/types.d.ts +125 -0
- package/dist/hooks/queries/useFops.d.ts +1 -0
- package/dist/hooks/queries/useWithdrawFops.d.ts +9 -0
- package/dist/hooks/track/WithdrawModalEvent.d.ts +3 -0
- package/dist/hooks/useCheckoutTransferInit.d.ts +1 -0
- package/dist/index.css +205 -205
- package/dist/index.js +2742 -2532
- package/dist/modals/WithdrawalModal/WithdrawalMethodSelect.d.ts +8 -0
- package/dist/modals/WithdrawalModal/types.d.ts +1 -0
- package/dist/utils/tokenMath.d.ts +38 -0
- package/dist/wallets/walletConnectors/index.js +37 -37
- package/package.json +4 -3
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { SwappedFormOfPayment } from '@funkit/api-base';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
interface WithdrawalMethodSelectProps {
|
|
4
|
+
onCryptoSelect: () => void;
|
|
5
|
+
onCashFopSelect: (fop: SwappedFormOfPayment) => void;
|
|
6
|
+
}
|
|
7
|
+
export declare function WithdrawalMethodSelect({ onCryptoSelect, onCashFopSelect, }: WithdrawalMethodSelectProps): React.JSX.Element;
|
|
8
|
+
export {};
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import type { Dnum } from 'dnum';
|
|
2
|
+
/**
|
|
3
|
+
* Multiply a token amount by a float price, returning the result
|
|
4
|
+
* as a Dnum in `resultDecimals` precision. Uses floor rounding so the
|
|
5
|
+
* displayed value never exceeds the real value.
|
|
6
|
+
*
|
|
7
|
+
* @example
|
|
8
|
+
* // 6.999920 USDC (6 dec) × $1.00 → Dnum representing $6.99 (2 dec, floored)
|
|
9
|
+
* mulByPriceRoundedDown(dnum.from(6.99992, 6), 1.0, 2) // → Dnum [699n, 2]
|
|
10
|
+
*/
|
|
11
|
+
export declare function mulByPriceRoundedDown(amount: Dnum, price: number, resultDecimals: number): Dnum;
|
|
12
|
+
/**
|
|
13
|
+
* Convert a human-readable number to a Dnum.
|
|
14
|
+
* Uses truncation (not rounding) so the result never exceeds the input.
|
|
15
|
+
*/
|
|
16
|
+
export declare function toBaseUnits(amount: number, decimals: number): Dnum;
|
|
17
|
+
/**
|
|
18
|
+
* Like `toBaseUnits` but rounds up instead of truncating.
|
|
19
|
+
* Use for minimum amounts where going below the input would be incorrect.
|
|
20
|
+
*/
|
|
21
|
+
export declare function toBaseUnitsCeil(amount: number, decimals: number): Dnum;
|
|
22
|
+
/**
|
|
23
|
+
* Convert a Dnum to a human-readable number.
|
|
24
|
+
* **Use only at the display boundary** — the result is lossy.
|
|
25
|
+
*/
|
|
26
|
+
export declare function toDisplayNumber(amount: Dnum): number;
|
|
27
|
+
/**
|
|
28
|
+
* Floor a number to the given decimal places.
|
|
29
|
+
* Replaces inlined `Math.floor(x * 100) / 100` patterns.
|
|
30
|
+
*
|
|
31
|
+
* @example floorToDecimals(6.999, 2) → 6.99
|
|
32
|
+
*/
|
|
33
|
+
export declare function floorToDecimals(value: number, decimals: number): number;
|
|
34
|
+
/**
|
|
35
|
+
* Compare two token amounts. Returns true if a > b.
|
|
36
|
+
* Handles different decimal representations.
|
|
37
|
+
*/
|
|
38
|
+
export declare function tokenGreaterThan(a: Dnum, b: Dnum): boolean;
|
|
@@ -1,19 +1,25 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import {
|
|
3
|
-
|
|
4
|
-
} from "./chunk-
|
|
3
|
+
zealWallet
|
|
4
|
+
} from "./chunk-HE2LMIPD.js";
|
|
5
5
|
import {
|
|
6
|
-
|
|
7
|
-
} from "./chunk-
|
|
6
|
+
zerionWallet
|
|
7
|
+
} from "./chunk-TTHM3WUR.js";
|
|
8
|
+
import {
|
|
9
|
+
tahoWallet
|
|
10
|
+
} from "./chunk-4BMUFNMT.js";
|
|
8
11
|
import {
|
|
9
12
|
tokenPocketWallet
|
|
10
13
|
} from "./chunk-4C7ER452.js";
|
|
14
|
+
import {
|
|
15
|
+
talismanWallet
|
|
16
|
+
} from "./chunk-6MFOL6EB.js";
|
|
17
|
+
import {
|
|
18
|
+
trustWallet
|
|
19
|
+
} from "./chunk-KO56HCTI.js";
|
|
11
20
|
import {
|
|
12
21
|
tokenaryWallet
|
|
13
22
|
} from "./chunk-34LO6Q7A.js";
|
|
14
|
-
import {
|
|
15
|
-
safepalWallet
|
|
16
|
-
} from "./chunk-IICWJWGZ.js";
|
|
17
23
|
import {
|
|
18
24
|
uniswapWallet
|
|
19
25
|
} from "./chunk-NHLG5PVD.js";
|
|
@@ -24,35 +30,32 @@ import {
|
|
|
24
30
|
xdefiWallet
|
|
25
31
|
} from "./chunk-O7RSASRH.js";
|
|
26
32
|
import {
|
|
27
|
-
|
|
28
|
-
} from "./chunk-
|
|
33
|
+
rabbyWallet
|
|
34
|
+
} from "./chunk-WFNPWKU3.js";
|
|
29
35
|
import {
|
|
30
|
-
|
|
31
|
-
} from "./chunk-
|
|
36
|
+
rainbowWallet
|
|
37
|
+
} from "./chunk-GSHSWVEG.js";
|
|
32
38
|
import {
|
|
33
39
|
ramperWallet
|
|
34
40
|
} from "./chunk-R4S234FL.js";
|
|
35
41
|
import {
|
|
36
42
|
roninWallet
|
|
37
43
|
} from "./chunk-PKMAPNN6.js";
|
|
38
|
-
import {
|
|
39
|
-
oneKeyWallet
|
|
40
|
-
} from "./chunk-HE5J5T7X.js";
|
|
41
44
|
import {
|
|
42
45
|
safeWallet
|
|
43
46
|
} from "./chunk-YKVWTGU7.js";
|
|
44
47
|
import {
|
|
45
48
|
safeheronWallet
|
|
46
49
|
} from "./chunk-4R4AARTG.js";
|
|
50
|
+
import {
|
|
51
|
+
safepalWallet
|
|
52
|
+
} from "./chunk-IICWJWGZ.js";
|
|
47
53
|
import {
|
|
48
54
|
subWallet
|
|
49
55
|
} from "./chunk-XBLHZICW.js";
|
|
50
56
|
import {
|
|
51
|
-
|
|
52
|
-
} from "./chunk-
|
|
53
|
-
import {
|
|
54
|
-
talismanWallet
|
|
55
|
-
} from "./chunk-6MFOL6EB.js";
|
|
57
|
+
metaMaskWallet
|
|
58
|
+
} from "./chunk-HETS3KKI.js";
|
|
56
59
|
import {
|
|
57
60
|
mewWallet
|
|
58
61
|
} from "./chunk-HKVDCVCG.js";
|
|
@@ -68,60 +71,57 @@ import {
|
|
|
68
71
|
import {
|
|
69
72
|
oneInchWallet
|
|
70
73
|
} from "./chunk-RVWLP4IM.js";
|
|
74
|
+
import {
|
|
75
|
+
oneKeyWallet
|
|
76
|
+
} from "./chunk-HE5J5T7X.js";
|
|
71
77
|
import {
|
|
72
78
|
phantomWallet
|
|
73
79
|
} from "./chunk-XMNVOYSJ.js";
|
|
74
|
-
import {
|
|
75
|
-
rabbyWallet
|
|
76
|
-
} from "./chunk-WFNPWKU3.js";
|
|
77
|
-
import {
|
|
78
|
-
rainbowWallet
|
|
79
|
-
} from "./chunk-GSHSWVEG.js";
|
|
80
80
|
import {
|
|
81
81
|
foxWallet
|
|
82
82
|
} from "./chunk-53VYSPXK.js";
|
|
83
83
|
import {
|
|
84
84
|
frontierWallet
|
|
85
85
|
} from "./chunk-CJJT7LMT.js";
|
|
86
|
+
import {
|
|
87
|
+
frameWallet
|
|
88
|
+
} from "./chunk-WDTNOIMF.js";
|
|
86
89
|
import {
|
|
87
90
|
gateWallet
|
|
88
91
|
} from "./chunk-7OARWILZ.js";
|
|
89
92
|
import {
|
|
90
93
|
imTokenWallet
|
|
91
94
|
} from "./chunk-IUVO4IN3.js";
|
|
92
|
-
import {
|
|
93
|
-
frameWallet
|
|
94
|
-
} from "./chunk-WDTNOIMF.js";
|
|
95
95
|
import {
|
|
96
96
|
injectedWallet
|
|
97
97
|
} from "./chunk-W6MXINYY.js";
|
|
98
|
+
import {
|
|
99
|
+
kresusWallet
|
|
100
|
+
} from "./chunk-G4V5B6YC.js";
|
|
98
101
|
import {
|
|
99
102
|
ledgerWallet
|
|
100
103
|
} from "./chunk-WKCCLGHJ.js";
|
|
101
|
-
import {
|
|
102
|
-
metaMaskWallet
|
|
103
|
-
} from "./chunk-HETS3KKI.js";
|
|
104
104
|
import {
|
|
105
105
|
clvWallet
|
|
106
106
|
} from "./chunk-GVOQTORD.js";
|
|
107
107
|
import {
|
|
108
108
|
coin98Wallet
|
|
109
109
|
} from "./chunk-6YO27XOM.js";
|
|
110
|
-
import {
|
|
111
|
-
coinbaseWallet
|
|
112
|
-
} from "./chunk-RZXMOPIV.js";
|
|
113
110
|
import {
|
|
114
111
|
bitgetWallet
|
|
115
112
|
} from "./chunk-HOPH3TQ3.js";
|
|
113
|
+
import {
|
|
114
|
+
coinbaseWallet
|
|
115
|
+
} from "./chunk-RZXMOPIV.js";
|
|
116
116
|
import {
|
|
117
117
|
coreWallet
|
|
118
118
|
} from "./chunk-GH4M6FTK.js";
|
|
119
|
-
import {
|
|
120
|
-
desigWallet
|
|
121
|
-
} from "./chunk-JYVLYSH3.js";
|
|
122
119
|
import {
|
|
123
120
|
dawnWallet
|
|
124
121
|
} from "./chunk-TFVCCI2D.js";
|
|
122
|
+
import {
|
|
123
|
+
desigWallet
|
|
124
|
+
} from "./chunk-JYVLYSH3.js";
|
|
125
125
|
import {
|
|
126
126
|
enkryptWallet
|
|
127
127
|
} from "./chunk-W6TXXLCO.js";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@funkit/connect",
|
|
3
|
-
"version": "9.
|
|
3
|
+
"version": "9.5.0",
|
|
4
4
|
"description": "Funkit Connect SDK elevates DeFi apps via web2 sign-ins and one-click checkouts.",
|
|
5
5
|
"files": [
|
|
6
6
|
"dist",
|
|
@@ -94,6 +94,7 @@
|
|
|
94
94
|
"@vanilla-extract/dynamic": "2.1.0",
|
|
95
95
|
"@vanilla-extract/sprinkles": "1.6.1",
|
|
96
96
|
"clsx": "2.1.1",
|
|
97
|
+
"dnum": "2.17.0",
|
|
97
98
|
"i18next": "25.6.2",
|
|
98
99
|
"motion": "^12.0.11",
|
|
99
100
|
"qrcode": "1.5.3",
|
|
@@ -103,10 +104,10 @@
|
|
|
103
104
|
"ua-parser-js": "^1.0.37",
|
|
104
105
|
"use-debounce": "^10.0.5",
|
|
105
106
|
"uuid": "^9.0.1",
|
|
106
|
-
"@funkit/api-base": "3.0.4",
|
|
107
107
|
"@funkit/chains": "1.1.2",
|
|
108
108
|
"@funkit/fun-relay": "2.6.5",
|
|
109
|
-
"@funkit/utils": "1.2.
|
|
109
|
+
"@funkit/utils": "1.2.7",
|
|
110
|
+
"@funkit/api-base": "3.0.5"
|
|
110
111
|
},
|
|
111
112
|
"repository": {
|
|
112
113
|
"type": "git",
|