@funkit/connect 12.12.1 → 12.14.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/clients/{chunk-GPI6LBBB.js → chunk-5GX6G7JR.js} +1 -1
- package/dist/clients/{chunk-JDQK4VQB.js → chunk-I75AI3N7.js} +5 -5
- package/dist/clients/{chunk-JN52EBYV.js → chunk-P6UM36G5.js} +64 -0
- package/dist/clients/{chunk-RBMOSICG.js → chunk-YMBIRJQF.js} +1 -1
- package/dist/clients/{chunk-WXHSEFYH.js → chunk-ZOQQL2QX.js} +1 -1
- package/dist/clients/fanatics.js +2 -2
- package/dist/clients/internal/nado/withdrawalCallback.js +3 -3
- package/dist/clients/internal/nado/withdrawalErrors.js +2 -2
- package/dist/clients/internal/nado/withdrawalForm.js +3 -3
- package/dist/clients/internal/nado/withdrawalStatus.js +3 -3
- package/dist/clients/lighter.css +225 -225
- package/dist/clients/lighter.js +3 -3
- package/dist/clients/mallard.js +2 -2
- package/dist/clients/nado.js +3 -3
- package/dist/components/FunTransactionSummary/PaymentFeesSummary.d.ts +6 -1
- package/dist/components/LargeAmountInput/LargeAmountInput.css.d.ts +8 -0
- package/dist/components/LargeAmountInput/LargeAmountInput.d.ts +26 -0
- package/dist/components/SwapDirectionButton/SwapDirectionButton.d.ts +12 -0
- package/dist/components/TokenSwapWidget/AmountUnitToggle/AmountUnitToggle.d.ts +13 -0
- package/dist/components/TokenSwapWidget/AmountUnitToggle/useAmountUnitToggle.d.ts +46 -0
- package/dist/components/TokenSwapWidget/TokenSelectButton/TokenSelectButton.d.ts +17 -0
- package/dist/components/TokenSwapWidget/TokenSwapCard/TokenSwapCard.d.ts +24 -0
- package/dist/components/TokenSwapWidget/TokenSwapWidget.css.d.ts +5 -0
- package/dist/components/TokenSwapWidget/TokenSwapWidget.d.ts +36 -0
- package/dist/consts/animation.d.ts +8 -0
- package/dist/domains/asset.d.ts +2 -3
- package/dist/domains/checkoutTransfer.d.ts +8 -0
- package/dist/domains/savedFopsCache.d.ts +15 -0
- package/dist/domains/tokenAddress.d.ts +7 -0
- package/dist/hooks/queries/useHasSavedFops.d.ts +2 -1
- package/dist/hooks/useAnimatedNavigation.d.ts +2 -2
- package/dist/hooks/useCheckoutTransferInit.d.ts +3 -3
- package/dist/index.d.ts +1 -1
- package/dist/index.js +44918 -44727
- package/dist/modals/WithdrawalModal/useWithdrawalExtraFeeItems.d.ts +8 -0
- package/dist/providers/FunkitCheckoutContext/types.d.ts +33 -4
- package/dist/utils/hypercoreRelayWallet.d.ts +12 -0
- package/dist/wallets/walletConnectors/index.js +38 -38
- package/package.json +5 -5
- package/dist/clients/internal/nado/withdrawalForm.css +0 -17587
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { FeeItem } from '../../components/FunTransactionSummary/PaymentFeesSummary';
|
|
2
|
+
import type { WithdrawalConfigBase, WithdrawalFeeItemContext } from '../../providers/FunkitCheckoutContext';
|
|
3
|
+
export declare const MAX_WITHDRAWAL_FEE_ITEMS = 3;
|
|
4
|
+
/**
|
|
5
|
+
* Resolves integrator rows for the withdrawal transaction breakdown.
|
|
6
|
+
* - Integrator code, so a throw hides the rows rather than the screen.
|
|
7
|
+
*/
|
|
8
|
+
export declare function useWithdrawalExtraFeeItems(resolveWithdrawalFeeItems: WithdrawalConfigBase['resolveWithdrawalFeeItems'], ctx: WithdrawalFeeItemContext): FeeItem[] | undefined;
|
|
@@ -194,11 +194,11 @@ export interface FunkitCheckoutConfig extends Omit<ApiFunkitCheckoutConfig, 'gen
|
|
|
194
194
|
* Return `null` or `[]` to omit rows; only the first 3 are shown.
|
|
195
195
|
*
|
|
196
196
|
* @example
|
|
197
|
-
* resolveDestinationLineItems: ({
|
|
197
|
+
* resolveDestinationLineItems: ({ targetAssetAmount }) => [
|
|
198
198
|
* {
|
|
199
199
|
* id: 'initial-margin-usage',
|
|
200
200
|
* label: { text: 'Initial Margin Usage', tooltip: 'Collateral required to open positions.' },
|
|
201
|
-
* value: { text: projectInitialMargin(
|
|
201
|
+
* value: { text: projectInitialMargin(targetAssetAmount), color: 'success' },
|
|
202
202
|
* },
|
|
203
203
|
* ]
|
|
204
204
|
*/
|
|
@@ -339,6 +339,35 @@ export interface WithdrawalConfigBase {
|
|
|
339
339
|
* {@link WalletWithdrawalConfig.preWithdrawalAction}.
|
|
340
340
|
*/
|
|
341
341
|
onBeforeSign?: () => Promise<void> | void;
|
|
342
|
+
/**
|
|
343
|
+
* Additional rows rendered first in the withdrawal screen's transaction
|
|
344
|
+
* breakdown. Called synchronously whenever live amounts change.
|
|
345
|
+
* Text is displayed as provided, without translation, and never changes the total.
|
|
346
|
+
* Return `null` or `[]` to omit rows; only the first 3 are shown.
|
|
347
|
+
*
|
|
348
|
+
* @example
|
|
349
|
+
* resolveWithdrawalFeeItems: ({ sourceAmount }) => [
|
|
350
|
+
* { id: 'margin-after', label: 'Margin after withdrawal', value: projectMargin(sourceAmount) },
|
|
351
|
+
* ]
|
|
352
|
+
*/
|
|
353
|
+
resolveWithdrawalFeeItems?: (ctx: WithdrawalFeeItemContext) => WithdrawalFeeItem[] | null;
|
|
354
|
+
}
|
|
355
|
+
/** Display-only row rendered in the withdrawal transaction breakdown. See `resolveWithdrawalFeeItems`. */
|
|
356
|
+
export interface WithdrawalFeeItem {
|
|
357
|
+
id: string;
|
|
358
|
+
label: string;
|
|
359
|
+
value: string;
|
|
360
|
+
tooltip?: string;
|
|
361
|
+
}
|
|
362
|
+
/** Live withdrawal amounts handed to `resolveWithdrawalFeeItems`. */
|
|
363
|
+
export interface WithdrawalFeeItemContext {
|
|
364
|
+
/** Amount being quoted, in source-token units, after any fee the SDK deducts before quoting. */
|
|
365
|
+
sourceAmount: string;
|
|
366
|
+
sourceTokenSymbol: string;
|
|
367
|
+
sourceChainId: string;
|
|
368
|
+
receiveAmount: string | null;
|
|
369
|
+
receiveTokenSymbol: string | null;
|
|
370
|
+
destinationChainId: string | null;
|
|
342
371
|
}
|
|
343
372
|
export interface WalletWithdrawalConfig extends WithdrawalConfigBase {
|
|
344
373
|
/** Wallet instance used to execute the quote */
|
|
@@ -674,8 +703,8 @@ export interface DestinationLineItem {
|
|
|
674
703
|
}
|
|
675
704
|
/** Live checkout amounts handed to `resolveDestinationLineItems`. */
|
|
676
705
|
export interface DestinationLineItemContext {
|
|
677
|
-
/**
|
|
678
|
-
|
|
706
|
+
/** Target asset amount in token units (e.g. "1.5" for 1.5 USDC), matching the "You receive" row. */
|
|
707
|
+
targetAssetAmount: string;
|
|
679
708
|
/** Token the user is paying with. `null` fields when no source is selected yet. */
|
|
680
709
|
sourceTokenSymbol: string | null;
|
|
681
710
|
sourceTokenAddress: Address | null;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { HypercoreWallet } from '@funkit/fun-relay';
|
|
2
|
+
import type { WalletClient } from 'viem';
|
|
3
|
+
/**
|
|
4
|
+
* The connected EVM wallet as a relay wallet for a HyperCore-source deposit, or
|
|
5
|
+
* undefined for any other source. HyperCore accounts are the EVM key itself, so
|
|
6
|
+
* no chain switch: relay signs EIP-712 under whatever chain the wallet is on.
|
|
7
|
+
*/
|
|
8
|
+
export declare function resolveHypercoreRelayWallet({ sourceChainId, walletClient, logPrefix, }: {
|
|
9
|
+
sourceChainId: string;
|
|
10
|
+
walletClient: WalletClient | undefined;
|
|
11
|
+
logPrefix: string;
|
|
12
|
+
}): HypercoreWallet | undefined;
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import {
|
|
3
|
-
xdefiWallet
|
|
4
|
-
} from "./chunk-HXX4PRE2.js";
|
|
5
2
|
import {
|
|
6
3
|
zealWallet
|
|
7
4
|
} from "./chunk-GLX5FULK.js";
|
|
5
|
+
import {
|
|
6
|
+
xdefiWallet
|
|
7
|
+
} from "./chunk-HXX4PRE2.js";
|
|
8
8
|
import {
|
|
9
9
|
zerionWallet
|
|
10
10
|
} from "./chunk-34B7OJNT.js";
|
|
11
|
-
import {
|
|
12
|
-
subWallet
|
|
13
|
-
} from "./chunk-XODA5ESL.js";
|
|
14
11
|
import {
|
|
15
12
|
tahoWallet
|
|
16
13
|
} from "./chunk-U74RFZOL.js";
|
|
14
|
+
import {
|
|
15
|
+
subWallet
|
|
16
|
+
} from "./chunk-XODA5ESL.js";
|
|
17
17
|
import {
|
|
18
18
|
talismanWallet
|
|
19
19
|
} from "./chunk-IAYYWCVB.js";
|
|
@@ -23,12 +23,12 @@ import {
|
|
|
23
23
|
import {
|
|
24
24
|
tokenaryWallet
|
|
25
25
|
} from "./chunk-TPM5PUJD.js";
|
|
26
|
-
import {
|
|
27
|
-
trustWallet
|
|
28
|
-
} from "./chunk-SR5CZR3L.js";
|
|
29
26
|
import {
|
|
30
27
|
uniswapWallet
|
|
31
28
|
} from "./chunk-UNDWHCDH.js";
|
|
29
|
+
import {
|
|
30
|
+
trustWallet
|
|
31
|
+
} from "./chunk-SR5CZR3L.js";
|
|
32
32
|
import {
|
|
33
33
|
walletConnectWallet
|
|
34
34
|
} from "./chunk-DUX4XCDV.js";
|
|
@@ -47,24 +47,24 @@ import {
|
|
|
47
47
|
import {
|
|
48
48
|
roninWallet
|
|
49
49
|
} from "./chunk-IA5432IR.js";
|
|
50
|
-
import {
|
|
51
|
-
safeWallet
|
|
52
|
-
} from "./chunk-IR3PJMVM.js";
|
|
53
50
|
import {
|
|
54
51
|
safeheronWallet
|
|
55
52
|
} from "./chunk-UN3ONVNC.js";
|
|
53
|
+
import {
|
|
54
|
+
safeWallet
|
|
55
|
+
} from "./chunk-IR3PJMVM.js";
|
|
56
56
|
import {
|
|
57
57
|
safepalWallet
|
|
58
58
|
} from "./chunk-BBB2J3US.js";
|
|
59
59
|
import {
|
|
60
|
-
|
|
61
|
-
} from "./chunk-
|
|
62
|
-
import {
|
|
63
|
-
metaMaskWallet
|
|
64
|
-
} from "./chunk-RXRYHMRI.js";
|
|
60
|
+
injectedWallet
|
|
61
|
+
} from "./chunk-M75V7OL3.js";
|
|
65
62
|
import {
|
|
66
63
|
mewWallet
|
|
67
64
|
} from "./chunk-DSPQXAB2.js";
|
|
65
|
+
import {
|
|
66
|
+
metaMaskWallet
|
|
67
|
+
} from "./chunk-RXRYHMRI.js";
|
|
68
68
|
import {
|
|
69
69
|
oktoWallet
|
|
70
70
|
} from "./chunk-V4M3SNPS.js";
|
|
@@ -80,6 +80,9 @@ import {
|
|
|
80
80
|
import {
|
|
81
81
|
oneKeyWallet
|
|
82
82
|
} from "./chunk-KN32ITJ7.js";
|
|
83
|
+
import {
|
|
84
|
+
enkryptWallet
|
|
85
|
+
} from "./chunk-Z6LDN2AN.js";
|
|
83
86
|
import {
|
|
84
87
|
foxWallet
|
|
85
88
|
} from "./chunk-U52QO5HF.js";
|
|
@@ -96,17 +99,11 @@ import {
|
|
|
96
99
|
imTokenWallet
|
|
97
100
|
} from "./chunk-YY2JA23M.js";
|
|
98
101
|
import {
|
|
99
|
-
|
|
100
|
-
} from "./chunk-
|
|
101
|
-
import {
|
|
102
|
-
injectedWallet
|
|
103
|
-
} from "./chunk-M75V7OL3.js";
|
|
102
|
+
kresusWallet
|
|
103
|
+
} from "./chunk-V77ATGZT.js";
|
|
104
104
|
import {
|
|
105
105
|
ledgerWallet
|
|
106
106
|
} from "./chunk-BL4OC2EJ.js";
|
|
107
|
-
import {
|
|
108
|
-
bybitWallet
|
|
109
|
-
} from "./chunk-BBDNB5TQ.js";
|
|
110
107
|
import {
|
|
111
108
|
clvWallet
|
|
112
109
|
} from "./chunk-4FHNLTR3.js";
|
|
@@ -119,37 +116,40 @@ import {
|
|
|
119
116
|
import {
|
|
120
117
|
coreWallet
|
|
121
118
|
} from "./chunk-TRZDAXCQ.js";
|
|
119
|
+
import {
|
|
120
|
+
bitverseWallet
|
|
121
|
+
} from "./chunk-5AEWIKRA.js";
|
|
122
122
|
import {
|
|
123
123
|
dawnWallet
|
|
124
124
|
} from "./chunk-LV6YV3DE.js";
|
|
125
|
+
import {
|
|
126
|
+
desigWallet
|
|
127
|
+
} from "./chunk-DFHP75HV.js";
|
|
125
128
|
import {
|
|
126
129
|
customWallet
|
|
127
130
|
} from "./chunk-VKM5M5UK.js";
|
|
128
|
-
import {
|
|
129
|
-
enkryptWallet
|
|
130
|
-
} from "./chunk-Z6LDN2AN.js";
|
|
131
131
|
import {
|
|
132
132
|
argentWallet
|
|
133
133
|
} from "./chunk-XSDTNMQY.js";
|
|
134
|
-
import {
|
|
135
|
-
bifrostWallet
|
|
136
|
-
} from "./chunk-ALGPGI6V.js";
|
|
137
|
-
import {
|
|
138
|
-
bloomWallet
|
|
139
|
-
} from "./chunk-PNHDOC77.js";
|
|
140
|
-
import {
|
|
141
|
-
bitverseWallet
|
|
142
|
-
} from "./chunk-5AEWIKRA.js";
|
|
143
134
|
import {
|
|
144
135
|
bitgetWallet
|
|
145
136
|
} from "./chunk-HOCKAU5H.js";
|
|
146
|
-
import "./chunk-AALSJCUR.js";
|
|
147
137
|
import {
|
|
148
138
|
bitskiWallet
|
|
149
139
|
} from "./chunk-NPITCCJE.js";
|
|
140
|
+
import {
|
|
141
|
+
bifrostWallet
|
|
142
|
+
} from "./chunk-ALGPGI6V.js";
|
|
143
|
+
import {
|
|
144
|
+
bloomWallet
|
|
145
|
+
} from "./chunk-PNHDOC77.js";
|
|
150
146
|
import {
|
|
151
147
|
braveWallet
|
|
152
148
|
} from "./chunk-U2XXV45G.js";
|
|
149
|
+
import {
|
|
150
|
+
bybitWallet
|
|
151
|
+
} from "./chunk-BBDNB5TQ.js";
|
|
152
|
+
import "./chunk-AALSJCUR.js";
|
|
153
153
|
import "./chunk-EYWGX5LT.js";
|
|
154
154
|
import "./chunk-B454LLKJ.js";
|
|
155
155
|
export {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@funkit/connect",
|
|
3
|
-
"version": "12.
|
|
3
|
+
"version": "12.14.0",
|
|
4
4
|
"description": "Funkit Connect SDK elevates DeFi apps via web2 sign-ins and one-click checkouts.",
|
|
5
5
|
"files": [
|
|
6
6
|
"dist",
|
|
@@ -119,11 +119,11 @@
|
|
|
119
119
|
"ua-parser-js": "^1.0.37",
|
|
120
120
|
"use-debounce": "^10.0.5",
|
|
121
121
|
"uuid": "^11.1.1",
|
|
122
|
-
"@funkit/
|
|
123
|
-
"@funkit/connect-core": "8.
|
|
124
|
-
"@funkit/api-base": "8.5.3",
|
|
122
|
+
"@funkit/api-base": "8.7.0",
|
|
123
|
+
"@funkit/connect-core": "8.7.0",
|
|
125
124
|
"@funkit/utils": "5.0.2",
|
|
126
|
-
"@funkit/
|
|
125
|
+
"@funkit/fun-relay": "3.1.3",
|
|
126
|
+
"@funkit/chains": "2.5.0"
|
|
127
127
|
},
|
|
128
128
|
"repository": {
|
|
129
129
|
"type": "git",
|