@funkit/connect 10.4.0 → 10.6.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 +58 -0
- package/dist/clients/{chunk-RCMAGKMG.js → chunk-3LJQTM37.js} +1 -2
- package/dist/clients/{chunk-APQYFP6X.js → chunk-A4WQS6QG.js} +1 -1
- package/dist/clients/{chunk-HOORQPSY.js → chunk-F6P4CN27.js} +24 -8
- package/dist/clients/{chunk-KNHO756P.js → chunk-FJ6GCMJ4.js} +1 -0
- package/dist/clients/{chunk-M6C7MBQN.js → chunk-TG2AACP2.js} +2 -2
- package/dist/clients/fanatics.js +1 -1
- package/dist/clients/internal/nado/hooks.js +2 -2
- package/dist/clients/internal/nado/products.js +2 -2
- package/dist/clients/internal/nado/withdrawalConfig.d.ts +11 -0
- package/dist/clients/internal/nado/withdrawalConfig.js +18 -0
- package/dist/clients/internal/nado/withdrawalTypes.d.ts +30 -0
- package/dist/clients/internal/nado/withdrawalTypes.js +1 -0
- package/dist/clients/lighter.css +5 -1
- package/dist/clients/lighter.d.ts +1 -0
- package/dist/clients/lighter.js +88 -21
- package/dist/clients/mallard.js +2 -2
- package/dist/clients/polymarket/PolymarketDepositAccountDropdown.css +5 -1
- package/dist/clients/polymarket/PolymarketDepositAccountDropdown.js +3 -3
- package/dist/clients/polymarket/index.css +5 -1
- package/dist/clients/polymarket/index.js +3 -3
- package/dist/components/BottomLinks/BottomLinks.d.ts +3 -1
- package/dist/consts/meld.d.ts +1 -1
- package/dist/hooks/queries/useSwappedDefaultCurrency.d.ts +3 -3
- package/dist/hooks/queries/useWithdrawFops.d.ts +0 -1
- package/dist/hooks/track/useTrack.d.ts +1 -0
- package/dist/hooks/useCheckoutDirectExecutionHistory.d.ts +2 -1
- package/dist/index.css +5 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +2705 -2080
- package/dist/modals/CheckoutModal/ConfirmationStep/CheckoutPrimaryInfo.d.ts +1 -2
- package/dist/modals/CheckoutModal/InputAmount/useCheckoutAmountLimits.d.ts +6 -9
- package/dist/modals/WithdrawalModal/LighterWithdrawal.d.ts +80 -19
- package/dist/modals/WithdrawalModal/WithdrawalContent.d.ts +1 -61
- package/dist/modals/WithdrawalModal/useFiatWithdrawal.d.ts +1 -1
- package/dist/modals/WithdrawalModal/useWithdrawal.d.ts +3 -15
- package/dist/modals/WithdrawalModal/withdrawalFormHelpers.d.ts +53 -0
- package/dist/modals/WithdrawalModal/withdrawalHooks.d.ts +38 -0
- package/dist/providers/FunkitCheckoutContext/types.d.ts +42 -4
- package/dist/providers/FunkitConfigContext.d.ts +9 -2
- package/dist/providers/GeneralWalletProvider.d.ts +1 -4
- package/dist/utils/consts.d.ts +1 -1
- package/dist/utils/customer.d.ts +18 -3
- package/dist/utils/lighter.d.ts +68 -1
- package/dist/utils/purifyCheckoutHistoryItem.d.ts +2 -41
- package/dist/utils/swapped.d.ts +1 -1
- package/dist/utils/userInfo.d.ts +8 -0
- package/dist/utils/withdrawal.d.ts +8 -1
- package/dist/wagmi/actions.d.ts +1 -1
- package/dist/wallets/walletConnectors/index.js +28 -28
- package/package.json +2 -2
|
@@ -1,41 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
import type { Address, Hex } from 'viem';
|
|
4
|
-
import type { MergedMultiStepDirectExecution } from '../domains/checkoutNotifications';
|
|
5
|
-
export type PurifiedCheckoutHistoryItem = {
|
|
6
|
-
depositAddr?: Address;
|
|
7
|
-
directExecution: boolean;
|
|
8
|
-
id: Hex;
|
|
9
|
-
fromAmountBaseUnit: string;
|
|
10
|
-
fromChainId: string;
|
|
11
|
-
fromTokenAddress: Address;
|
|
12
|
-
state: CheckoutState;
|
|
13
|
-
toAmountBaseUnit: string;
|
|
14
|
-
toChainId: string;
|
|
15
|
-
toTokenAddress: Address;
|
|
16
|
-
createdTimeMs: number;
|
|
17
|
-
updatedTimeMs: number;
|
|
18
|
-
additionalActions: ApiFunkitCheckoutActionParams[];
|
|
19
|
-
isWithdrawal: boolean;
|
|
20
|
-
/**
|
|
21
|
-
* Customer-specific, presentation-only metadata. Kept in its own bag so
|
|
22
|
-
* customer concepts don't leak onto the shared top-level shape. Only present
|
|
23
|
-
* when there's something to surface for the item's customer.
|
|
24
|
-
*/
|
|
25
|
-
customerMetadata?: {
|
|
26
|
-
/**
|
|
27
|
-
* For Lighter withdrawal direct executions: which route was used.
|
|
28
|
-
* `'secure'` is Lighter's native bridge to mainnet (recorded as
|
|
29
|
-
* `EXTERNALLY_FULFILLED`); `'fast'` routes through Fun + Relay.
|
|
30
|
-
*/
|
|
31
|
-
lighterWithdrawalType?: 'fast' | 'secure';
|
|
32
|
-
};
|
|
33
|
-
} & ({
|
|
34
|
-
depositAddr: Address;
|
|
35
|
-
directExecution: false;
|
|
36
|
-
} | {
|
|
37
|
-
depositAddr?: never;
|
|
38
|
-
directExecution: true;
|
|
39
|
-
txHashes: Hex[];
|
|
40
|
-
});
|
|
41
|
-
export declare const purifyCheckoutHistoryItem: (item: CheckoutHistoryItem | MergedMultiStepDirectExecution) => PurifiedCheckoutHistoryItem;
|
|
1
|
+
export { purifyCheckoutHistoryItem } from '@funkit/connect-core';
|
|
2
|
+
export type { PurifiedCheckoutHistoryItem } from '@funkit/connect-core';
|
package/dist/utils/swapped.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { SwappedTheme } from '@funkit/connect-core';
|
|
2
2
|
import type { ThemeVars } from '../css/sprinkles.css';
|
|
3
|
-
export { getSavedFormOfPaymentDisplayName, getSavedFormOfPaymentIcon, getSwappedIcon, getSwappedOrigin, isSavedFormOfPaymentType, isSwappedOrigin, SWAPPED_CARD_BRANDS, } from '@funkit/connect-core';
|
|
3
|
+
export { getFormOfPaymentDisplayName, getSavedFormOfPaymentDisplayName, getSavedFormOfPaymentIcon, getSwappedIcon, getSwappedOrigin, isSavedFormOfPaymentType, isSwappedOrigin, SWAPPED_CARD_BRANDS, } from '@funkit/connect-core';
|
|
4
4
|
export type { SwappedTheme };
|
|
5
5
|
export declare function resolveCssValue(value: string): string;
|
|
6
6
|
export declare function resolveObjectCssVars<T extends object>(obj: T): T;
|
package/dist/utils/userInfo.d.ts
CHANGED
|
@@ -16,6 +16,14 @@ export declare function getIsExternalUserIdAddress(apiKey: string, externalUserI
|
|
|
16
16
|
* Currently used by Lighter mobile QR flow where the L1 address is passed via externalUserId.
|
|
17
17
|
*/
|
|
18
18
|
export declare function resolveWalletAddress(address: Address | undefined, externalUserId: string | undefined, isExternalUserIdAddress: boolean): Address | undefined;
|
|
19
|
+
/**
|
|
20
|
+
* Whether the session counts as logged in.
|
|
21
|
+
* Web3 only qualifies once wagmi has resolved an address — `connector` is set
|
|
22
|
+
* as soon as a connection attempt starts (status 'connecting'/'reconnecting'),
|
|
23
|
+
* before `address` exists, so gating on `loginType` alone would flip this true
|
|
24
|
+
* while `effectiveAddress` is still undefined.
|
|
25
|
+
*/
|
|
26
|
+
export declare function resolveIsUserLoggedIn(loginType: LoginType, effectiveAddress: Address | undefined, externalUserId: string | undefined): boolean;
|
|
19
27
|
/**
|
|
20
28
|
* Resolve the userId for the current session.
|
|
21
29
|
*/
|
|
@@ -1,8 +1,15 @@
|
|
|
1
1
|
import type { CustomWithdrawalConfig, FunkitWithdrawalConfig, MultiMethodWithdrawalConfig, WalletWithdrawalConfig } from '../providers/FunkitCheckoutContext';
|
|
2
|
+
/**
|
|
3
|
+
* Deducts a flat fee (in token units) from a withdrawal input amount, clamped
|
|
4
|
+
* at 0. Uses `dnum` fixed-point math so decimal strings straight off the amount
|
|
5
|
+
* field stay exact.
|
|
6
|
+
*/
|
|
7
|
+
export declare function deductFlatFee(inputAmount: string, feeTokens: number): string;
|
|
2
8
|
/**
|
|
3
9
|
* Evaluates the integrator's `withdrawalSourceTokenBalance` callback to a safe
|
|
4
10
|
* numeric string. Returns `'0'` (with a warn) for missing/empty/NaN/negative
|
|
5
|
-
* values. Shared by the withdrawal amount screen and
|
|
11
|
+
* values, or if the callback throws. Shared by the withdrawal amount screen and
|
|
12
|
+
* the Swapped cash cap.
|
|
6
13
|
*/
|
|
7
14
|
export declare function safeEvaluateWithdrawalSourceTokenBalance(fn: (() => string | number) | undefined): string;
|
|
8
15
|
/**
|
package/dist/wagmi/actions.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { Config } from 'wagmi';
|
|
2
2
|
import { type GetBalanceParameters, type GetBalanceReturnType } from 'wagmi/actions';
|
|
3
|
-
export { estimateGas, getAccount, getGasPrice, getTransaction, getWalletClient, multicall, readContract, sendTransaction, switchChain, waitForTransactionReceipt, } from 'wagmi/actions';
|
|
3
|
+
export { estimateGas, getAccount, getGasPrice, getTransaction, getWalletClient, multicall, readContract, sendTransaction, signTypedData, switchChain, waitForTransactionReceipt, } from 'wagmi/actions';
|
|
4
4
|
export type GetBalanceReturnTypeCompat = GetBalanceReturnType & {
|
|
5
5
|
formatted: string;
|
|
6
6
|
};
|
|
@@ -8,15 +8,15 @@ import {
|
|
|
8
8
|
import {
|
|
9
9
|
tahoWallet
|
|
10
10
|
} from "./chunk-7ZYCBDQ4.js";
|
|
11
|
+
import {
|
|
12
|
+
talismanWallet
|
|
13
|
+
} from "./chunk-4DCO3TGL.js";
|
|
11
14
|
import {
|
|
12
15
|
tokenPocketWallet
|
|
13
16
|
} from "./chunk-WKNQMP4A.js";
|
|
14
17
|
import {
|
|
15
18
|
tokenaryWallet
|
|
16
19
|
} from "./chunk-VH3THHJY.js";
|
|
17
|
-
import {
|
|
18
|
-
talismanWallet
|
|
19
|
-
} from "./chunk-4DCO3TGL.js";
|
|
20
20
|
import {
|
|
21
21
|
trustWallet
|
|
22
22
|
} from "./chunk-KCRO2AGO.js";
|
|
@@ -62,12 +62,12 @@ import {
|
|
|
62
62
|
import {
|
|
63
63
|
oktoWallet
|
|
64
64
|
} from "./chunk-YWOVAU6O.js";
|
|
65
|
-
import {
|
|
66
|
-
omniWallet
|
|
67
|
-
} from "./chunk-2CX7LX4J.js";
|
|
68
65
|
import {
|
|
69
66
|
okxWallet
|
|
70
67
|
} from "./chunk-KI5Y2BBF.js";
|
|
68
|
+
import {
|
|
69
|
+
omniWallet
|
|
70
|
+
} from "./chunk-2CX7LX4J.js";
|
|
71
71
|
import {
|
|
72
72
|
oneInchWallet
|
|
73
73
|
} from "./chunk-QG6ZHI7B.js";
|
|
@@ -78,14 +78,14 @@ import {
|
|
|
78
78
|
phantomWallet
|
|
79
79
|
} from "./chunk-QY53O7WG.js";
|
|
80
80
|
import {
|
|
81
|
-
|
|
82
|
-
} from "./chunk-
|
|
83
|
-
import {
|
|
84
|
-
frameWallet
|
|
85
|
-
} from "./chunk-BU3ZAT5X.js";
|
|
81
|
+
enkryptWallet
|
|
82
|
+
} from "./chunk-HBQK5RD5.js";
|
|
86
83
|
import {
|
|
87
84
|
frontierWallet
|
|
88
85
|
} from "./chunk-AVDUNQUW.js";
|
|
86
|
+
import {
|
|
87
|
+
frameWallet
|
|
88
|
+
} from "./chunk-BU3ZAT5X.js";
|
|
89
89
|
import {
|
|
90
90
|
gateWallet
|
|
91
91
|
} from "./chunk-JPN6TWIT.js";
|
|
@@ -102,51 +102,51 @@ import {
|
|
|
102
102
|
ledgerWallet
|
|
103
103
|
} from "./chunk-RPV27V2Y.js";
|
|
104
104
|
import {
|
|
105
|
-
|
|
106
|
-
} from "./chunk-
|
|
105
|
+
bybitWallet
|
|
106
|
+
} from "./chunk-OX37G4YT.js";
|
|
107
|
+
import {
|
|
108
|
+
clvWallet
|
|
109
|
+
} from "./chunk-OEEGYENV.js";
|
|
107
110
|
import {
|
|
108
111
|
coin98Wallet
|
|
109
112
|
} from "./chunk-WAHGI5L7.js";
|
|
110
113
|
import {
|
|
111
114
|
coinbaseWallet
|
|
112
115
|
} from "./chunk-2DLDAZRH.js";
|
|
113
|
-
import {
|
|
114
|
-
clvWallet
|
|
115
|
-
} from "./chunk-OEEGYENV.js";
|
|
116
116
|
import {
|
|
117
117
|
coreWallet
|
|
118
118
|
} from "./chunk-4NV5BYRP.js";
|
|
119
119
|
import {
|
|
120
120
|
desigWallet
|
|
121
121
|
} from "./chunk-FW3WZETT.js";
|
|
122
|
-
import {
|
|
123
|
-
enkryptWallet
|
|
124
|
-
} from "./chunk-HBQK5RD5.js";
|
|
125
122
|
import {
|
|
126
123
|
dawnWallet
|
|
127
124
|
} from "./chunk-G2PHTVL6.js";
|
|
128
125
|
import {
|
|
129
|
-
|
|
130
|
-
} from "./chunk-
|
|
126
|
+
foxWallet
|
|
127
|
+
} from "./chunk-GUQM4QSL.js";
|
|
128
|
+
import {
|
|
129
|
+
argentWallet
|
|
130
|
+
} from "./chunk-NTMBEOR2.js";
|
|
131
131
|
import {
|
|
132
132
|
bitgetWallet
|
|
133
133
|
} from "./chunk-TKB2OY6G.js";
|
|
134
|
-
import {
|
|
135
|
-
bitverseWallet
|
|
136
|
-
} from "./chunk-NSK6A7TI.js";
|
|
137
134
|
import {
|
|
138
135
|
bitskiWallet
|
|
139
136
|
} from "./chunk-7HRFUZFX.js";
|
|
137
|
+
import {
|
|
138
|
+
bifrostWallet
|
|
139
|
+
} from "./chunk-IULPZP2Q.js";
|
|
140
|
+
import {
|
|
141
|
+
bitverseWallet
|
|
142
|
+
} from "./chunk-NSK6A7TI.js";
|
|
140
143
|
import {
|
|
141
144
|
bloomWallet
|
|
142
145
|
} from "./chunk-PJ7Y57EH.js";
|
|
146
|
+
import "./chunk-N4IJLYFY.js";
|
|
143
147
|
import {
|
|
144
148
|
braveWallet
|
|
145
149
|
} from "./chunk-DS73TZ6O.js";
|
|
146
|
-
import {
|
|
147
|
-
bybitWallet
|
|
148
|
-
} from "./chunk-OX37G4YT.js";
|
|
149
|
-
import "./chunk-N4IJLYFY.js";
|
|
150
150
|
import "./chunk-OLZ7626J.js";
|
|
151
151
|
import "./chunk-IGKXZBTA.js";
|
|
152
152
|
export {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@funkit/connect",
|
|
3
|
-
"version": "10.
|
|
3
|
+
"version": "10.6.0",
|
|
4
4
|
"description": "Funkit Connect SDK elevates DeFi apps via web2 sign-ins and one-click checkouts.",
|
|
5
5
|
"files": [
|
|
6
6
|
"dist",
|
|
@@ -108,8 +108,8 @@
|
|
|
108
108
|
"use-debounce": "^10.0.5",
|
|
109
109
|
"uuid": "^11.1.1",
|
|
110
110
|
"@funkit/api-base": "6.0.0",
|
|
111
|
+
"@funkit/connect-core": "2.3.0",
|
|
111
112
|
"@funkit/chains": "2.1.3",
|
|
112
|
-
"@funkit/connect-core": "2.1.0",
|
|
113
113
|
"@funkit/fun-relay": "2.9.0",
|
|
114
114
|
"@funkit/utils": "4.0.0"
|
|
115
115
|
},
|