@funkit/connect 5.1.4 → 5.2.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 +48 -0
- package/dist/{chunk-IDAA2OY6.js → chunk-3LR6KLPU.js} +5 -4
- package/dist/{chunk-A7G4HZZY.js → chunk-CRPOYQ6X.js} +39 -4
- package/dist/{chunk-L55ALBJE.js → chunk-QMPPK7HO.js} +5 -4
- package/dist/components/Box/Box.d.ts +29 -29
- package/dist/components/Dropdown/BaseDropdown.css.d.ts +1 -1
- package/dist/components/Dropdown/ReceiveTokenDropdown.d.ts +3 -3
- package/dist/components/FunBadge/FunBadge.d.ts +3 -3
- package/dist/components/FunButton/FunRedirectButton.d.ts +6 -0
- package/dist/components/FunInput/FunTwoFaInput.d.ts +2 -2
- package/dist/components/FunNotification/FunNotification.d.ts +2 -6
- package/dist/components/NewTokenDepositAlert/NewTokenDepositAlert.d.ts +7 -0
- package/dist/components/YouPayYouReceive/YouPayYouReceive.d.ts +2 -1
- package/dist/config/getDefaultConfig.d.ts +291 -150
- package/dist/consts/funkit.d.ts +0 -6
- package/dist/css/sprinkles.css.d.ts +51 -35
- package/dist/domains/quote.d.ts +4 -10
- package/dist/domains/relay.d.ts +18 -0
- package/dist/hooks/useCheckoutDirectExecution.d.ts +22 -0
- package/dist/hooks/useCheckoutTimeEstimate.d.ts +2 -1
- package/dist/hooks/useRelayBypass.d.ts +16 -0
- package/dist/index.css +2513 -2423
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1369 -1144
- package/dist/modals/CheckoutModal/ConfirmationStep/useQuoteRefresh.d.ts +5 -1
- package/dist/providers/FunkitCheckoutContext.d.ts +2 -2
- package/dist/providers/FunkitThemeProvider.d.ts +33 -9
- package/dist/providers/GeneralWalletProvider.d.ts +10 -74
- 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 +11 -16
- package/dist/utils/consts.d.ts +1 -0
- package/dist/utils/flags/config.d.ts +42 -4
- package/dist/utils/flags/types.d.ts +7 -0
- package/dist/utils/tokenIconUrl.d.ts +2 -0
- package/dist/wallets/walletConnectors/chunk-2UCNRD7H.js +70 -0
- package/dist/wallets/walletConnectors/chunk-3S2U24BJ.js +96 -0
- package/dist/wallets/walletConnectors/chunk-4WEHDI4Y.js +94 -0
- package/dist/wallets/walletConnectors/chunk-63YLN6R5.js +92 -0
- package/dist/wallets/walletConnectors/chunk-6ONTSPEY.js +98 -0
- package/dist/wallets/walletConnectors/chunk-A5APNTGL.js +99 -0
- package/dist/wallets/walletConnectors/chunk-AD2KIJB6.js +103 -0
- package/dist/wallets/walletConnectors/chunk-AXWP3GD4.js +100 -0
- package/dist/wallets/walletConnectors/chunk-DTRYS3MO.js +96 -0
- package/dist/wallets/walletConnectors/chunk-G73C6P5P.js +146 -0
- package/dist/wallets/walletConnectors/chunk-GSOYKKIS.js +92 -0
- package/dist/wallets/walletConnectors/chunk-HBA36GW3.js +95 -0
- package/dist/wallets/walletConnectors/chunk-IDKVN5CF.js +93 -0
- package/dist/wallets/walletConnectors/chunk-ISIBREBO.js +106 -0
- package/dist/wallets/walletConnectors/chunk-KR6JBW5E.js +87 -0
- package/dist/wallets/walletConnectors/chunk-LMZMXEXL.js +66 -0
- package/dist/wallets/walletConnectors/chunk-MSFKSQBY.js +110 -0
- package/dist/wallets/walletConnectors/chunk-W6N74MS3.js +69 -0
- package/dist/wallets/walletConnectors/funkitConnectWallet/funkitConnectWallet.js +0 -23
- package/dist/wallets/walletConnectors/index.js +51 -51
- package/package.json +10 -8
- package/dist/components/SolanaDepositAlert/SolanaDepositAlert.d.ts +0 -6
|
@@ -4,6 +4,10 @@ interface UseQuoteRefreshOptions {
|
|
|
4
4
|
* Freeze the latest quote state, e.g. so we do not change the quote mid-confirmation
|
|
5
5
|
*/
|
|
6
6
|
isOnHold: boolean;
|
|
7
|
+
/**
|
|
8
|
+
* Controls in what interval to refresh the quote data in case of a hard refresh, in case of pre-loading it controls when to set the data, should be more than `BEFORE_COUNTDOWN_ENDS_SEC` by at least 10 seconds to provide the API the time needed to complete the call
|
|
9
|
+
*/
|
|
10
|
+
refreshIntervalSeconds: number;
|
|
7
11
|
}
|
|
8
12
|
interface UseQuoteRefreshResult {
|
|
9
13
|
/** Quoting state indicated a bit in advance for UX reasons */
|
|
@@ -15,5 +19,5 @@ interface UseQuoteRefreshResult {
|
|
|
15
19
|
/** Safe to call asynchronously */
|
|
16
20
|
refreshQuote(ignorePreloaded?: boolean): Promise<void>;
|
|
17
21
|
}
|
|
18
|
-
export declare function useQuoteRefresh({ isOnHold, }: UseQuoteRefreshOptions): UseQuoteRefreshResult;
|
|
22
|
+
export declare function useQuoteRefresh({ isOnHold, refreshIntervalSeconds, }: UseQuoteRefreshOptions): UseQuoteRefreshResult;
|
|
19
23
|
export {};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type ApiCheckoutClientMetadata, type ApiFunkitCheckoutActionParams, type ApiFunkitCheckoutConfig, type FunAddress } from '@funkit/api-base';
|
|
2
2
|
import React, { type ReactNode } from 'react';
|
|
3
|
-
import {
|
|
3
|
+
import type { Address } from 'viem';
|
|
4
4
|
import type { AssetHoldingsItem } from '~/utils/assets';
|
|
5
5
|
import { type PaymentMethodInfo } from '../domains/paymentMethods';
|
|
6
6
|
import { type FunkitCheckoutQuoteResult } from './FunkitHistoryContext';
|
|
@@ -19,7 +19,7 @@ export interface FunkitCheckoutConfig extends Omit<ApiFunkitCheckoutConfig, 'gen
|
|
|
19
19
|
generateActionsParams?: (targetAssetAmount: number, config?: {
|
|
20
20
|
targetAsset: Address;
|
|
21
21
|
targetChain: string;
|
|
22
|
-
}) => FunkitCheckoutActionParams[]
|
|
22
|
+
}) => Promise<FunkitCheckoutActionParams[]>;
|
|
23
23
|
/** Custom recipient address of the checkout. If specified, a different checkout flow will be executed. It is not recommended to set this unless the Fun.xyz team advises it. **/
|
|
24
24
|
customRecipient?: FunAddress;
|
|
25
25
|
/** ****************************************
|
|
@@ -78,6 +78,7 @@ export declare const useActiveTheme: () => {
|
|
|
78
78
|
buttonBackground: string;
|
|
79
79
|
buttonBackgroundHover: string;
|
|
80
80
|
buttonBackgroundDisabled: string;
|
|
81
|
+
buttonBorderHover: string;
|
|
81
82
|
buttonTextSecondaryDisabled: string;
|
|
82
83
|
buttonTextSecondary: string;
|
|
83
84
|
buttonIconBackgroundHover: string;
|
|
@@ -88,9 +89,9 @@ export declare const useActiveTheme: () => {
|
|
|
88
89
|
badgeBackgroundSuccess: string;
|
|
89
90
|
badgeBorderSuccess: string;
|
|
90
91
|
badgeTextSuccess: string;
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
92
|
+
newBadgeBackground: string;
|
|
93
|
+
newBadgeBorder: string;
|
|
94
|
+
newBadgeText: string;
|
|
94
95
|
inputAmountQuickOptionBaseBackground: string;
|
|
95
96
|
inputAmountQuickOptionHoverBackground: string;
|
|
96
97
|
inputAmountQuickOptionActiveBackground: string;
|
|
@@ -169,6 +170,13 @@ export declare const useActiveTheme: () => {
|
|
|
169
170
|
modalActionButton: string;
|
|
170
171
|
modalActionButtonMobile: string;
|
|
171
172
|
summaryBox: string;
|
|
173
|
+
youPayYouReceive: string;
|
|
174
|
+
inputAmountSwitcher: string;
|
|
175
|
+
qrCode: string;
|
|
176
|
+
skeleton: string;
|
|
177
|
+
tooltip: string;
|
|
178
|
+
dropdown: string;
|
|
179
|
+
dropdownItem: string;
|
|
172
180
|
};
|
|
173
181
|
shadows: {
|
|
174
182
|
connectButton: string;
|
|
@@ -246,6 +254,7 @@ export declare const useActiveTheme: () => {
|
|
|
246
254
|
buttonBackground: string;
|
|
247
255
|
buttonBackgroundHover: string;
|
|
248
256
|
buttonBackgroundDisabled: string;
|
|
257
|
+
buttonBorderHover: string;
|
|
249
258
|
buttonTextSecondaryDisabled: string;
|
|
250
259
|
buttonTextSecondary: string;
|
|
251
260
|
buttonIconBackgroundHover: string;
|
|
@@ -256,9 +265,9 @@ export declare const useActiveTheme: () => {
|
|
|
256
265
|
badgeBackgroundSuccess: string;
|
|
257
266
|
badgeBorderSuccess: string;
|
|
258
267
|
badgeTextSuccess: string;
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
268
|
+
newBadgeBackground: string;
|
|
269
|
+
newBadgeBorder: string;
|
|
270
|
+
newBadgeText: string;
|
|
262
271
|
inputAmountQuickOptionBaseBackground: string;
|
|
263
272
|
inputAmountQuickOptionHoverBackground: string;
|
|
264
273
|
inputAmountQuickOptionActiveBackground: string;
|
|
@@ -337,6 +346,13 @@ export declare const useActiveTheme: () => {
|
|
|
337
346
|
modalActionButton: string;
|
|
338
347
|
modalActionButtonMobile: string;
|
|
339
348
|
summaryBox: string;
|
|
349
|
+
youPayYouReceive: string;
|
|
350
|
+
inputAmountSwitcher: string;
|
|
351
|
+
qrCode: string;
|
|
352
|
+
skeleton: string;
|
|
353
|
+
tooltip: string;
|
|
354
|
+
dropdown: string;
|
|
355
|
+
dropdownItem: string;
|
|
340
356
|
};
|
|
341
357
|
shadows: {
|
|
342
358
|
connectButton: string;
|
|
@@ -412,6 +428,7 @@ export declare const useActiveTheme: () => {
|
|
|
412
428
|
buttonBackground: string;
|
|
413
429
|
buttonBackgroundHover: string;
|
|
414
430
|
buttonBackgroundDisabled: string;
|
|
431
|
+
buttonBorderHover: string;
|
|
415
432
|
buttonTextSecondaryDisabled: string;
|
|
416
433
|
buttonTextSecondary: string;
|
|
417
434
|
buttonIconBackgroundHover: string;
|
|
@@ -422,9 +439,9 @@ export declare const useActiveTheme: () => {
|
|
|
422
439
|
badgeBackgroundSuccess: string;
|
|
423
440
|
badgeBorderSuccess: string;
|
|
424
441
|
badgeTextSuccess: string;
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
442
|
+
newBadgeBackground: string;
|
|
443
|
+
newBadgeBorder: string;
|
|
444
|
+
newBadgeText: string;
|
|
428
445
|
inputAmountQuickOptionBaseBackground: string;
|
|
429
446
|
inputAmountQuickOptionHoverBackground: string;
|
|
430
447
|
inputAmountQuickOptionActiveBackground: string;
|
|
@@ -503,6 +520,13 @@ export declare const useActiveTheme: () => {
|
|
|
503
520
|
modalActionButton: string;
|
|
504
521
|
modalActionButtonMobile: string;
|
|
505
522
|
summaryBox: string;
|
|
523
|
+
youPayYouReceive: string;
|
|
524
|
+
inputAmountSwitcher: string;
|
|
525
|
+
qrCode: string;
|
|
526
|
+
skeleton: string;
|
|
527
|
+
tooltip: string;
|
|
528
|
+
dropdown: string;
|
|
529
|
+
dropdownItem: string;
|
|
506
530
|
};
|
|
507
531
|
shadows: {
|
|
508
532
|
connectButton: string;
|
|
@@ -2,7 +2,7 @@ import type { AssetBalanceInfo } from '@funkit/api-base';
|
|
|
2
2
|
import { Auth, FunWallet } from '@funkit/core';
|
|
3
3
|
import React, { type ReactNode } from 'react';
|
|
4
4
|
import type { Address } from 'viem';
|
|
5
|
-
import { type Config } from 'wagmi';
|
|
5
|
+
import { type Config, type UseDisconnectReturnType, type UseReconnectReturnType } from 'wagmi';
|
|
6
6
|
import type { SwitchChainVariables } from 'wagmi/query';
|
|
7
7
|
import { type FunkitUserInfo } from '../consts/funkit';
|
|
8
8
|
/** AssetBalanceInfo with known price and totalUsdValue */
|
|
@@ -86,82 +86,18 @@ export declare const useFunkitAccount: () => {
|
|
|
86
86
|
status: "connecting";
|
|
87
87
|
};
|
|
88
88
|
export declare const useFunkitUserInfo: () => FunkitUserInfo;
|
|
89
|
+
export type FunkitDisconnectReturnType = UseDisconnectReturnType & {
|
|
90
|
+
disconnect: () => Promise<void> | void;
|
|
91
|
+
disconnectAsync: () => Promise<void> | void;
|
|
92
|
+
};
|
|
89
93
|
/**
|
|
90
94
|
* Replacement for wagmi's `disconnect` from `useDisconnect`
|
|
91
95
|
*/
|
|
92
|
-
export declare const useFunkitDisconnect: () =>
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
data: undefined;
|
|
98
|
-
status: "idle";
|
|
99
|
-
isError: false;
|
|
100
|
-
isPending: false;
|
|
101
|
-
isSuccess: false;
|
|
102
|
-
failureCount: number;
|
|
103
|
-
failureReason: import("@wagmi/core").DisconnectErrorType | null;
|
|
104
|
-
isPaused: boolean;
|
|
105
|
-
variables: undefined;
|
|
106
|
-
isIdle: true;
|
|
107
|
-
context: unknown;
|
|
108
|
-
submittedAt: number;
|
|
109
|
-
connectors: readonly import("wagmi").Connector[];
|
|
110
|
-
} | {
|
|
111
|
-
disconnect: () => void;
|
|
112
|
-
disconnectAsync: () => void;
|
|
113
|
-
reset: () => void;
|
|
114
|
-
error: null;
|
|
115
|
-
data: undefined;
|
|
116
|
-
status: "pending";
|
|
117
|
-
isError: false;
|
|
118
|
-
isPending: true;
|
|
119
|
-
isSuccess: false;
|
|
120
|
-
failureCount: number;
|
|
121
|
-
failureReason: import("@wagmi/core").DisconnectErrorType | null;
|
|
122
|
-
isPaused: boolean;
|
|
123
|
-
variables: import("wagmi/query").DisconnectVariables;
|
|
124
|
-
isIdle: false;
|
|
125
|
-
context: unknown;
|
|
126
|
-
submittedAt: number;
|
|
127
|
-
connectors: readonly import("wagmi").Connector[];
|
|
128
|
-
} | {
|
|
129
|
-
disconnect: () => void;
|
|
130
|
-
disconnectAsync: () => void;
|
|
131
|
-
reset: () => void;
|
|
132
|
-
error: import("@wagmi/core").DisconnectErrorType;
|
|
133
|
-
data: undefined;
|
|
134
|
-
status: "error";
|
|
135
|
-
isError: true;
|
|
136
|
-
isPending: false;
|
|
137
|
-
isSuccess: false;
|
|
138
|
-
failureCount: number;
|
|
139
|
-
failureReason: import("@wagmi/core").DisconnectErrorType | null;
|
|
140
|
-
isPaused: boolean;
|
|
141
|
-
variables: import("wagmi/query").DisconnectVariables;
|
|
142
|
-
isIdle: false;
|
|
143
|
-
context: unknown;
|
|
144
|
-
submittedAt: number;
|
|
145
|
-
connectors: readonly import("wagmi").Connector[];
|
|
146
|
-
} | {
|
|
147
|
-
disconnect: () => void;
|
|
148
|
-
disconnectAsync: () => void;
|
|
149
|
-
reset: () => void;
|
|
150
|
-
error: null;
|
|
151
|
-
data: void;
|
|
152
|
-
status: "success";
|
|
153
|
-
isError: false;
|
|
154
|
-
isPending: false;
|
|
155
|
-
isSuccess: true;
|
|
156
|
-
failureCount: number;
|
|
157
|
-
failureReason: import("@wagmi/core").DisconnectErrorType | null;
|
|
158
|
-
isPaused: boolean;
|
|
159
|
-
variables: import("wagmi/query").DisconnectVariables;
|
|
160
|
-
isIdle: false;
|
|
161
|
-
context: unknown;
|
|
162
|
-
submittedAt: number;
|
|
163
|
-
connectors: readonly import("wagmi").Connector[];
|
|
164
|
-
};
|
|
96
|
+
export declare const useFunkitDisconnect: () => FunkitDisconnectReturnType;
|
|
97
|
+
/**
|
|
98
|
+
* Replacement for wagmi's `useReconnect`
|
|
99
|
+
*/
|
|
100
|
+
export declare const useFunkitReconnect: () => UseReconnectReturnType;
|
|
165
101
|
/**
|
|
166
102
|
* Replacement for wagmi's useSwitchChains
|
|
167
103
|
*/
|
package/dist/themes/baseTheme.js
CHANGED
package/dist/themes/darkTheme.js
CHANGED
package/dist/utils/checkout.d.ts
CHANGED
|
@@ -4,26 +4,27 @@ import { type Address } from 'viem';
|
|
|
4
4
|
import type { UseConfigReturnType } from 'wagmi';
|
|
5
5
|
import type { ServerCheckoutConfig } from '~/domains/clientMetadata';
|
|
6
6
|
import type { FunkitCheckoutQuoteResult } from '~/domains/quote';
|
|
7
|
-
import type {
|
|
7
|
+
import type { FunkitCheckoutActionParams, FunkitCheckoutConfig } from '../providers/FunkitCheckoutContext';
|
|
8
8
|
export declare const MOONPAY_TIME_ESTIMATE_MS = 120000;
|
|
9
9
|
export declare const MESH_TIME_ESTIMATE_MS = 300000;
|
|
10
10
|
export declare const DUMMY_TRANSFER_PARAMS: {
|
|
11
11
|
toAddress: "0x000000000000000000000000000000000000dEaD";
|
|
12
12
|
tokenAmount: number;
|
|
13
13
|
};
|
|
14
|
-
|
|
15
|
-
* Validates the checkout configuration.
|
|
16
|
-
* @param config - The checkout configuration to validate.
|
|
17
|
-
* @returns An object indicating whether the configuration is valid and a message if it is not.
|
|
18
|
-
*/
|
|
19
|
-
export declare function validateCheckoutConfig(config: Partial<FunkitCheckoutConfig>): {
|
|
14
|
+
type ValidateCheckoutConfigReturn = Promise<{
|
|
20
15
|
config: FunkitCheckoutConfig;
|
|
21
16
|
isValid: true;
|
|
22
17
|
message: string;
|
|
23
18
|
} | {
|
|
24
19
|
isValid: false;
|
|
25
20
|
message: string;
|
|
26
|
-
}
|
|
21
|
+
}>;
|
|
22
|
+
/**
|
|
23
|
+
* Validates the checkout configuration.
|
|
24
|
+
* @param config - The checkout configuration to validate.
|
|
25
|
+
* @returns An object indicating whether the configuration is valid and a message if it is not.
|
|
26
|
+
*/
|
|
27
|
+
export declare function validateCheckoutConfig(config: Partial<FunkitCheckoutConfig>): ValidateCheckoutConfigReturn;
|
|
27
28
|
export declare const hasSufficientBalance: (wagmiConfig: UseConfigReturnType, walletAddress: string, tokenAddress: string, tokenChainId: string, requiredAssetAmount: number) => Promise<{
|
|
28
29
|
balance: number;
|
|
29
30
|
result: boolean;
|
|
@@ -112,7 +113,7 @@ export declare function getCheckoutItemDisplay({ checkoutConfig, hideAmount, }:
|
|
|
112
113
|
*/
|
|
113
114
|
export declare function getMaxTargetAssetAmountEstimate(sourceAssetBalance: number, config: FunkitCheckoutConfig, quoteResult: FunkitCheckoutQuoteResult): number;
|
|
114
115
|
export declare function getTokenDecimals(wagmiConfig: Config, chainId: string, tokenAddress: Address): Promise<number>;
|
|
115
|
-
export declare function evaluateCheckoutGenerateActionsParams(config: FunkitCheckoutConfig | ServerCheckoutConfig): FunkitCheckoutActionParams[]
|
|
116
|
+
export declare function evaluateCheckoutGenerateActionsParams(config: FunkitCheckoutConfig | ServerCheckoutConfig): Promise<FunkitCheckoutActionParams[]>;
|
|
116
117
|
export declare function isCheckoutCrFlow(config: FunkitCheckoutConfig): boolean;
|
|
117
118
|
/**
|
|
118
119
|
* @param config can be either be a config from live checkoutItem OR from checkout history's clientMetadata
|
|
@@ -122,11 +123,5 @@ export declare function isCheckoutPostActionRequired(config: FunkitCheckoutConfi
|
|
|
122
123
|
* @returns whether we should show the checkout to the user (ie. supported in current sdk version & not cancelled)
|
|
123
124
|
*/
|
|
124
125
|
export declare const isCheckoutValid: (checkout: CheckoutHistoryItem) => boolean;
|
|
125
|
-
/**
|
|
126
|
-
* @returns true if the source and target are the same, a post action is required, is wallet balance, and is for vertex (for now)
|
|
127
|
-
*/
|
|
128
|
-
export declare const isDirectExecutionFlow: ({ checkoutItem, apiKey, }: {
|
|
129
|
-
checkoutItem: FunkitActiveCheckoutItem | null;
|
|
130
|
-
apiKey: string;
|
|
131
|
-
}) => boolean;
|
|
132
126
|
export declare const isCheckoutHistoryDirectExecution: (checkoutId: string) => boolean;
|
|
127
|
+
export {};
|
package/dist/utils/consts.d.ts
CHANGED
|
@@ -58,6 +58,20 @@ export declare const flagConfig: {
|
|
|
58
58
|
token_transfer_source_chains_and_assets: {
|
|
59
59
|
type: "string";
|
|
60
60
|
default_value: string;
|
|
61
|
+
overrides: {
|
|
62
|
+
if_any: ({
|
|
63
|
+
key: "userId";
|
|
64
|
+
type: "pctRollout";
|
|
65
|
+
pct: number;
|
|
66
|
+
values?: undefined;
|
|
67
|
+
} | {
|
|
68
|
+
key: "userId";
|
|
69
|
+
type: "isAnyOf";
|
|
70
|
+
values: string[];
|
|
71
|
+
pct?: undefined;
|
|
72
|
+
})[];
|
|
73
|
+
value: string;
|
|
74
|
+
}[];
|
|
61
75
|
};
|
|
62
76
|
enable_token_transfer_universal_deposit_address: {
|
|
63
77
|
type: "boolean";
|
|
@@ -117,15 +131,19 @@ export declare const flagConfig: {
|
|
|
117
131
|
show_info_banner: {
|
|
118
132
|
type: "string";
|
|
119
133
|
default_value: string;
|
|
134
|
+
overrides: {
|
|
135
|
+
if_any: {
|
|
136
|
+
key: "apiKey";
|
|
137
|
+
type: "isAnyOf";
|
|
138
|
+
values: string[];
|
|
139
|
+
}[];
|
|
140
|
+
value: string;
|
|
141
|
+
}[];
|
|
120
142
|
};
|
|
121
143
|
checkout_notifications_refresh_interval: {
|
|
122
144
|
type: "string";
|
|
123
145
|
default_value: string;
|
|
124
146
|
};
|
|
125
|
-
enable_vertex_swap_bypass: {
|
|
126
|
-
type: "boolean";
|
|
127
|
-
default_value: true;
|
|
128
|
-
};
|
|
129
147
|
display_solana_new_badge: {
|
|
130
148
|
type: "boolean";
|
|
131
149
|
default_value: true;
|
|
@@ -134,4 +152,24 @@ export declare const flagConfig: {
|
|
|
134
152
|
type: "boolean";
|
|
135
153
|
default_value: true;
|
|
136
154
|
};
|
|
155
|
+
token_transfer_new_tokens: {
|
|
156
|
+
type: "string";
|
|
157
|
+
default_value: string;
|
|
158
|
+
};
|
|
159
|
+
new_token_asset_selection_banner: {
|
|
160
|
+
type: "string";
|
|
161
|
+
default_value: string;
|
|
162
|
+
};
|
|
163
|
+
is_relay_bypass_enabled: {
|
|
164
|
+
type: "boolean";
|
|
165
|
+
default_value: false;
|
|
166
|
+
};
|
|
167
|
+
relay_bypass_source_chains_and_assets: {
|
|
168
|
+
type: "string";
|
|
169
|
+
default_value: string;
|
|
170
|
+
};
|
|
171
|
+
relay_bypass_target_chains_and_assets: {
|
|
172
|
+
type: "string";
|
|
173
|
+
default_value: string;
|
|
174
|
+
};
|
|
137
175
|
};
|
|
@@ -36,4 +36,11 @@ export type Condition = {
|
|
|
36
36
|
values: string[];
|
|
37
37
|
};
|
|
38
38
|
export type AbstractFlags = Record<string, FlagConfig>;
|
|
39
|
+
export type AssetSelectionBannerConfig = {
|
|
40
|
+
chainId: number;
|
|
41
|
+
symbol: string;
|
|
42
|
+
name: string;
|
|
43
|
+
isChainNew?: boolean;
|
|
44
|
+
};
|
|
45
|
+
export type TokenTransferNewBadgeConfig = Record<number, string[]>;
|
|
39
46
|
export {};
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import {
|
|
3
|
+
getWalletConnectConnector
|
|
4
|
+
} from "./chunk-23WIEY36.js";
|
|
5
|
+
import {
|
|
6
|
+
getInjectedConnector,
|
|
7
|
+
hasInjectedProvider
|
|
8
|
+
} from "./chunk-WRA2DVJ7.js";
|
|
9
|
+
|
|
10
|
+
// src/wallets/walletConnectors/rainbowWallet/rainbowWallet.ts
|
|
11
|
+
import { isAndroid, isIOS } from "@funkit/utils";
|
|
12
|
+
var rainbowWallet = ({
|
|
13
|
+
projectId,
|
|
14
|
+
walletConnectParameters
|
|
15
|
+
}) => {
|
|
16
|
+
const isRainbowInjected = hasInjectedProvider({ flag: "isRainbow" });
|
|
17
|
+
const shouldUseWalletConnect = !isRainbowInjected;
|
|
18
|
+
const getUri = (uri) => {
|
|
19
|
+
return isAndroid() ? uri : isIOS() ? `rainbow://wc?uri=${encodeURIComponent(uri)}&connector=rainbowkit` : `https://rnbwapp.com/wc?uri=${encodeURIComponent(
|
|
20
|
+
uri
|
|
21
|
+
)}&connector=rainbowkit`;
|
|
22
|
+
};
|
|
23
|
+
return {
|
|
24
|
+
id: "rainbow",
|
|
25
|
+
name: "Rainbow",
|
|
26
|
+
rdns: "me.rainbow",
|
|
27
|
+
iconUrl: async () => (await import("./rainbowWallet-MFJQCICF.js")).default,
|
|
28
|
+
iconBackground: "#0c2f78",
|
|
29
|
+
installed: !shouldUseWalletConnect ? isRainbowInjected : void 0,
|
|
30
|
+
downloadUrls: {
|
|
31
|
+
android: "https://play.google.com/store/apps/details?id=me.rainbow&referrer=utm_source%3Drainbowkit&utm_source=rainbowkit",
|
|
32
|
+
ios: "https://apps.apple.com/app/apple-store/id1457119021?pt=119997837&ct=rainbowkit&mt=8",
|
|
33
|
+
mobile: "https://rainbow.download?utm_source=rainbowkit",
|
|
34
|
+
qrCode: "https://rainbow.download?utm_source=rainbowkit&utm_medium=qrcode",
|
|
35
|
+
browserExtension: "https://rainbow.me/extension?utm_source=rainbowkit"
|
|
36
|
+
},
|
|
37
|
+
mobile: { getUri: shouldUseWalletConnect ? getUri : void 0 },
|
|
38
|
+
qrCode: shouldUseWalletConnect ? {
|
|
39
|
+
getUri,
|
|
40
|
+
instructions: {
|
|
41
|
+
learnMoreUrl: "https://learn.rainbow.me/connect-to-a-website-or-app?utm_source=rainbowkit&utm_medium=connector&utm_campaign=learnmore",
|
|
42
|
+
steps: [
|
|
43
|
+
{
|
|
44
|
+
description: "wallet_connectors.rainbow.qr_code.step1.description",
|
|
45
|
+
step: "install",
|
|
46
|
+
title: "wallet_connectors.rainbow.qr_code.step1.title"
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
description: "wallet_connectors.rainbow.qr_code.step2.description",
|
|
50
|
+
step: "create",
|
|
51
|
+
title: "wallet_connectors.rainbow.qr_code.step2.title"
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
description: "wallet_connectors.rainbow.qr_code.step3.description",
|
|
55
|
+
step: "scan",
|
|
56
|
+
title: "wallet_connectors.rainbow.qr_code.step3.title"
|
|
57
|
+
}
|
|
58
|
+
]
|
|
59
|
+
}
|
|
60
|
+
} : void 0,
|
|
61
|
+
createConnector: shouldUseWalletConnect ? getWalletConnectConnector({
|
|
62
|
+
projectId,
|
|
63
|
+
walletConnectParameters
|
|
64
|
+
}) : getInjectedConnector({ flag: "isRainbow" })
|
|
65
|
+
};
|
|
66
|
+
};
|
|
67
|
+
|
|
68
|
+
export {
|
|
69
|
+
rainbowWallet
|
|
70
|
+
};
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import {
|
|
3
|
+
getWalletConnectConnector
|
|
4
|
+
} from "./chunk-23WIEY36.js";
|
|
5
|
+
import {
|
|
6
|
+
getInjectedConnector,
|
|
7
|
+
hasInjectedProvider
|
|
8
|
+
} from "./chunk-WRA2DVJ7.js";
|
|
9
|
+
|
|
10
|
+
// src/wallets/walletConnectors/frontierWallet/frontierWallet.ts
|
|
11
|
+
import { isAndroid } from "@funkit/utils";
|
|
12
|
+
var frontierWallet = ({
|
|
13
|
+
projectId,
|
|
14
|
+
walletConnectParameters
|
|
15
|
+
}) => {
|
|
16
|
+
const isFrontierInjected = hasInjectedProvider({
|
|
17
|
+
namespace: "frontier.ethereum",
|
|
18
|
+
flag: "isFrontier"
|
|
19
|
+
});
|
|
20
|
+
const shouldUseWalletConnect = !isFrontierInjected;
|
|
21
|
+
return {
|
|
22
|
+
id: "frontier",
|
|
23
|
+
name: "Frontier Wallet",
|
|
24
|
+
rdns: "xyz.frontier.wallet",
|
|
25
|
+
installed: isFrontierInjected,
|
|
26
|
+
iconUrl: async () => (await import("./frontierWallet-5QV7ZACT.js")).default,
|
|
27
|
+
iconBackground: "#CC703C",
|
|
28
|
+
downloadUrls: {
|
|
29
|
+
android: "https://play.google.com/store/apps/details?id=com.frontierwallet",
|
|
30
|
+
ios: "https://apps.apple.com/us/app/frontier-crypto-defi-wallet/id1482380988",
|
|
31
|
+
qrCode: "https://www.frontier.xyz/download",
|
|
32
|
+
chrome: "https://chrome.google.com/webstore/detail/frontier-wallet/kppfdiipphfccemcignhifpjkapfbihd",
|
|
33
|
+
browserExtension: "https://www.frontier.xyz/download"
|
|
34
|
+
},
|
|
35
|
+
mobile: {
|
|
36
|
+
getUri: shouldUseWalletConnect ? (uri) => {
|
|
37
|
+
return isAndroid() ? `frontier://wc?uri=${encodeURIComponent(uri)}` : uri;
|
|
38
|
+
} : void 0
|
|
39
|
+
},
|
|
40
|
+
qrCode: shouldUseWalletConnect ? {
|
|
41
|
+
getUri: (uri) => {
|
|
42
|
+
return isAndroid() ? `frontier://wc?uri=${encodeURIComponent(uri)}` : uri;
|
|
43
|
+
},
|
|
44
|
+
instructions: {
|
|
45
|
+
learnMoreUrl: "https://help.frontier.xyz/en/",
|
|
46
|
+
steps: [
|
|
47
|
+
{
|
|
48
|
+
description: "wallet_connectors.im_token.qr_code.step1.description",
|
|
49
|
+
step: "install",
|
|
50
|
+
title: "wallet_connectors.im_token.qr_code.step1.title"
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
description: "wallet_connectors.im_token.qr_code.step2.description",
|
|
54
|
+
step: "create",
|
|
55
|
+
title: "wallet_connectors.im_token.qr_code.step2.title"
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
description: "wallet_connectors.im_token.qr_code.step3.description",
|
|
59
|
+
step: "scan",
|
|
60
|
+
title: "wallet_connectors.im_token.qr_code.step3.title"
|
|
61
|
+
}
|
|
62
|
+
]
|
|
63
|
+
}
|
|
64
|
+
} : void 0,
|
|
65
|
+
extension: {
|
|
66
|
+
instructions: {
|
|
67
|
+
learnMoreUrl: "https://help.frontier.xyz/en/articles/6967236-setting-up-frontier-on-your-device",
|
|
68
|
+
steps: [
|
|
69
|
+
{
|
|
70
|
+
description: "wallet_connectors.frontier.extension.step1.description",
|
|
71
|
+
step: "install",
|
|
72
|
+
title: "wallet_connectors.frontier.extension.step1.title"
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
description: "wallet_connectors.frontier.extension.step2.description",
|
|
76
|
+
step: "create",
|
|
77
|
+
title: "wallet_connectors.frontier.extension.step2.title"
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
description: "wallet_connectors.frontier.extension.step3.description",
|
|
81
|
+
step: "refresh",
|
|
82
|
+
title: "wallet_connectors.frontier.extension.step3.title"
|
|
83
|
+
}
|
|
84
|
+
]
|
|
85
|
+
}
|
|
86
|
+
},
|
|
87
|
+
createConnector: shouldUseWalletConnect ? getWalletConnectConnector({ projectId, walletConnectParameters }) : getInjectedConnector({
|
|
88
|
+
namespace: "frontier.ethereum",
|
|
89
|
+
flag: "isFrontier"
|
|
90
|
+
})
|
|
91
|
+
};
|
|
92
|
+
};
|
|
93
|
+
|
|
94
|
+
export {
|
|
95
|
+
frontierWallet
|
|
96
|
+
};
|