@funkit/connect 9.20.0 → 9.21.1-next.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 +47 -0
- package/dist/__generated__/default_configs.d.ts +901 -0
- package/dist/__generated__/default_feature_gates.d.ts +20 -0
- package/dist/chunk-36KVHK22.js +252 -0
- package/dist/chunk-4YEAUICE.js +380 -0
- package/dist/chunk-67BKQQNG.js +252 -0
- package/dist/clients/chunk-25ICASD7.js +2371 -0
- package/dist/clients/{chunk-47AQXZQE.js → chunk-4HCOSF4M.js} +1 -1
- package/dist/clients/chunk-7GWX2ZS4.js +69 -0
- package/dist/clients/{chunk-CSONEKIF.js → chunk-7HNGV6JU.js} +1 -1
- package/dist/clients/chunk-EGMA6ATZ.js +2371 -0
- package/dist/clients/chunk-GGXTLJ7J.js +290 -0
- package/dist/clients/chunk-HRWCNZJA.js +230 -0
- package/dist/clients/chunk-JD3FIVZ7.js +69 -0
- package/dist/clients/chunk-JTGKAPID.js +2382 -0
- package/dist/clients/chunk-L7PABCF2.js +54 -0
- package/dist/clients/{chunk-JOM2J5WB.js → chunk-NCUPPJ2Z.js} +21 -10
- package/dist/clients/{chunk-UNCVGPTD.js → chunk-NUJ6ZM5F.js} +1 -1
- package/dist/clients/chunk-OJLDTEKB.js +54 -0
- package/dist/clients/chunk-SSSQQ32F.js +186 -0
- package/dist/clients/chunk-UVWNEQMD.js +186 -0
- package/dist/clients/chunk-YLZ7COFH.js +230 -0
- package/dist/clients/chunk-ZEFHAWRH.js +69 -0
- package/dist/clients/fanatics.css +2891 -2702
- package/dist/clients/fanatics.js +5 -5
- package/dist/clients/lighter.css +2891 -2702
- package/dist/clients/lighter.js +3 -3
- package/dist/clients/nado.d.ts +78 -0
- package/dist/clients/nado.js +107 -0
- package/dist/clients/polymarket/PolymarketDepositAccountDropdown.css +2909 -2717
- package/dist/clients/polymarket/PolymarketDepositAccountDropdown.js +4 -4
- package/dist/clients/polymarket/index.css +2909 -2717
- package/dist/clients/polymarket/index.js +4 -4
- package/dist/clients/polymarket.d.ts +161 -0
- package/dist/clients/polymarket.js +688 -0
- package/dist/components/Box/Box.d.ts +21 -21
- package/dist/components/FunButton/FunButton.css.d.ts +1 -0
- package/dist/components/FunOptionBox/FunOptionBox.css.d.ts +1 -1
- package/dist/css/sprinkles.css.d.ts +33 -21
- package/dist/hooks/useTokenTransferConfig.d.ts +7 -0
- package/dist/index.css +2909 -2717
- package/dist/index.js +227 -349
- package/dist/interfaces/logTransport.d.ts +51 -0
- package/dist/interfaces/swapped-transport.d.ts +78 -0
- package/dist/modals/CheckoutModal/SourceChange/EmptyFormOfPaymentsMessage.d.ts +4 -0
- package/dist/modals/CheckoutModal/SourceChange/useUpdateSourceAssetForCard.d.ts +4 -0
- package/dist/modals/CheckoutModal/SwappedIframe/SwappedErrorMessage.d.ts +6 -0
- package/dist/modals/WithdrawalModal/WithdrawalContent.d.ts +7 -0
- package/dist/providers/FunkitThemeProvider.d.ts +18 -0
- package/dist/themes/baseTheme.d.ts +3 -1
- package/dist/themes/baseTheme.js +1 -1
- package/dist/themes/darkTheme.js +2 -2
- package/dist/themes/lightTheme.js +2 -2
- package/dist/utils/flags/resolver.d.ts +34 -0
- package/dist/utils/tokenTransfer/disabledList.d.ts +1 -14
- package/dist/utils/tokenTransfer/types.d.ts +5 -30
- package/dist/wallets/walletConnectors/chunk-2VP2F6EK.js +70 -0
- package/dist/wallets/walletConnectors/chunk-4T6ZSRJF.js +69 -0
- package/dist/wallets/walletConnectors/chunk-6BW3HLBG.js +96 -0
- package/dist/wallets/walletConnectors/chunk-CCQV2ZET.js +218 -0
- package/dist/wallets/walletConnectors/chunk-CPI4TD43.js +99 -0
- package/dist/wallets/walletConnectors/chunk-F5XEEVG6.js +98 -0
- package/dist/wallets/walletConnectors/chunk-HNRB7KJU.js +92 -0
- package/dist/wallets/walletConnectors/chunk-HTHAK6XB.js +93 -0
- package/dist/wallets/walletConnectors/chunk-MIQTHJ6X.js +66 -0
- package/dist/wallets/walletConnectors/chunk-RB3HR4R2.js +95 -0
- package/dist/wallets/walletConnectors/chunk-RVOY537T.js +100 -0
- package/dist/wallets/walletConnectors/chunk-STVVP43G.js +94 -0
- package/dist/wallets/walletConnectors/chunk-UK7C2JXW.js +87 -0
- package/dist/wallets/walletConnectors/chunk-VAPGUPHO.js +92 -0
- package/dist/wallets/walletConnectors/chunk-VTM6EECM.js +110 -0
- package/dist/wallets/walletConnectors/chunk-X6CGV36L.js +103 -0
- package/dist/wallets/walletConnectors/chunk-YEZM4CK4.js +96 -0
- package/dist/wallets/walletConnectors/chunk-ZNX4EMPB.js +106 -0
- package/dist/wallets/walletConnectors/index.js +54 -54
- package/package.json +3 -3
- package/dist/clients/chunk-JVTKIEOP.js +0 -69
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
/** Severity levels emitted by `FunLogger`. */
|
|
2
|
+
export type LogLevel = 'info' | 'debug' | 'warn' | 'error';
|
|
3
|
+
/** User tracking consent, mirroring the Datadog browser SDK's values. */
|
|
4
|
+
export type TrackingConsent = 'granted' | 'not-granted';
|
|
5
|
+
/**
|
|
6
|
+
* The structured context `FunLogger` assembles for every record: the caller's
|
|
7
|
+
* data plus the logger's resolved user/session fields. Concrete (rather than
|
|
8
|
+
* `object`) so transport implementors get property access and autocomplete.
|
|
9
|
+
*/
|
|
10
|
+
export interface LogContext {
|
|
11
|
+
/** Caller-supplied structured data for this log line, if any. */
|
|
12
|
+
data?: object;
|
|
13
|
+
apiKey: string | null;
|
|
14
|
+
userId: string | null;
|
|
15
|
+
userName: string | null;
|
|
16
|
+
userAddress: string | null;
|
|
17
|
+
userLoginType: string | null;
|
|
18
|
+
typeLabel: string | null;
|
|
19
|
+
sdkVersion: string | null;
|
|
20
|
+
}
|
|
21
|
+
/** A single fully-assembled log record handed to a transport. */
|
|
22
|
+
export interface LogRecord {
|
|
23
|
+
level: LogLevel;
|
|
24
|
+
title: string;
|
|
25
|
+
/** Assembled by `FunLogger` so transports stay dumb sinks. */
|
|
26
|
+
context: LogContext;
|
|
27
|
+
/** Present only for `error`-level records. */
|
|
28
|
+
error?: Error;
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* Platform sink for `FunLogger`. The logger (queueing, env detection, level
|
|
32
|
+
* routing, console fallback, context tracking) is platform-agnostic; everything
|
|
33
|
+
* platform-specific about *emitting* lives behind this interface.
|
|
34
|
+
*
|
|
35
|
+
* Part of the React Native split (see docs/connect-rn-architecture.md): web
|
|
36
|
+
* implements it with `DatadogBrowserLogsTransport`, React Native will implement
|
|
37
|
+
* it with a Datadog React Native transport (`@datadog/mobile-react-native`).
|
|
38
|
+
* Kept free of DOM/`@datadog/browser-logs` types so it can move to
|
|
39
|
+
* `@funkit/connect-core` untouched.
|
|
40
|
+
*/
|
|
41
|
+
export interface LogTransport {
|
|
42
|
+
/** Emit one record to the platform sink. */
|
|
43
|
+
log(record: LogRecord): void;
|
|
44
|
+
/**
|
|
45
|
+
* Reflect the resolved environment (e.g. `'development'` | `'production'`).
|
|
46
|
+
* Optional — sinks that don't segment by environment can omit it.
|
|
47
|
+
*/
|
|
48
|
+
setEnv?(environment: string): void;
|
|
49
|
+
/** Reflect user tracking consent. Optional. */
|
|
50
|
+
setTrackingConsent?(consent: TrackingConsent): void;
|
|
51
|
+
}
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import type { PaymentGroupType } from '@funkit/api-base';
|
|
2
|
+
import type { SwappedTheme } from '../utils/swapped';
|
|
3
|
+
/**
|
|
4
|
+
* Typed contract for the message bridge between the SDK and the embedded
|
|
5
|
+
* Swapped flow. On web this is bridged over an `<iframe>` + `window.postMessage`
|
|
6
|
+
* (see {@link createIframeSwappedTransport}); React Native will bridge the same
|
|
7
|
+
* messages over a `WebView`. Freezing the event catalog here lets both
|
|
8
|
+
* platforms share the `SwappedProvider` state machine and turns any drift in
|
|
9
|
+
* the message shapes into a compile-time error.
|
|
10
|
+
*
|
|
11
|
+
* Reference: the inbound switch in `SwappedIframeController` and the sends in
|
|
12
|
+
* `SwappedProvider`.
|
|
13
|
+
*
|
|
14
|
+
* This module is platform-agnostic and is slated to move to
|
|
15
|
+
* `@funkit/connect-core/interfaces/` during the RN extraction.
|
|
16
|
+
*/
|
|
17
|
+
/**
|
|
18
|
+
* Navigation steps reported by the Swapped embed. Open-ended — the embed may
|
|
19
|
+
* emit steps we don't enumerate, which fall through to the default handler.
|
|
20
|
+
*/
|
|
21
|
+
export type SwappedStep = 'EMPTY' | 'KYC_ADDRESS' | 'KYC_AWAITING_IDENTITY' | 'KYC_IDENTITY' | 'KYC_PERSONAL' | 'KYC_SUMSUB' | 'LOGIN_EMAIL' | 'LOGIN_EMAIL_VERIFICATION' | 'PAYMENT' | 'ORDER_CONFIRMATION' | (string & {});
|
|
22
|
+
/**
|
|
23
|
+
* Opaque payloads — the SDK never introspects these, it only forwards them to
|
|
24
|
+
* analytics via `JSON.stringify`. Typed as `unknown` so callers must stringify
|
|
25
|
+
* rather than read fields.
|
|
26
|
+
*/
|
|
27
|
+
export type SwappedErrorPayload = unknown;
|
|
28
|
+
export type SwappedTxPayload = unknown;
|
|
29
|
+
/** embed → parent */
|
|
30
|
+
export type SwappedInboundMessage = {
|
|
31
|
+
type: 'SWAPPED_READY';
|
|
32
|
+
} | {
|
|
33
|
+
type: 'SWAPPED_GO_BACK';
|
|
34
|
+
} | {
|
|
35
|
+
type: 'SWAPPED_CLOSE';
|
|
36
|
+
} | {
|
|
37
|
+
type: 'SWAPPED_NEW_DEPOSIT';
|
|
38
|
+
} | {
|
|
39
|
+
type: 'SWAPPED_ERROR';
|
|
40
|
+
data?: SwappedErrorPayload;
|
|
41
|
+
} | {
|
|
42
|
+
type: 'SWAPPED_NAVIGATION';
|
|
43
|
+
data?: {
|
|
44
|
+
step?: SwappedStep;
|
|
45
|
+
};
|
|
46
|
+
} | {
|
|
47
|
+
type: 'SWAPPED_ORDER_DATA';
|
|
48
|
+
data?: unknown;
|
|
49
|
+
} | {
|
|
50
|
+
type: 'SWAPPED_TRANSACTION_SUCCESSFUL';
|
|
51
|
+
data?: SwappedTxPayload;
|
|
52
|
+
} | {
|
|
53
|
+
type: 'SWAPPED_LOGOUT';
|
|
54
|
+
};
|
|
55
|
+
/** parent → embed */
|
|
56
|
+
export type SwappedOutboundMessage = {
|
|
57
|
+
type: 'SWAPPED_METHOD';
|
|
58
|
+
method: PaymentGroupType;
|
|
59
|
+
} | {
|
|
60
|
+
type: 'SWAPPED_THEME';
|
|
61
|
+
data: SwappedTheme;
|
|
62
|
+
} | {
|
|
63
|
+
type: 'SWAPPED_FOCUS';
|
|
64
|
+
};
|
|
65
|
+
export interface SwappedTransport {
|
|
66
|
+
/**
|
|
67
|
+
* Send a message to the embed. Returns `true` if the message was dispatched,
|
|
68
|
+
* `false` if the embed isn't reachable yet (so callers can mirror today's
|
|
69
|
+
* behavior of logging only on a successful send).
|
|
70
|
+
*/
|
|
71
|
+
send(msg: SwappedOutboundMessage): boolean;
|
|
72
|
+
/**
|
|
73
|
+
* Subscribe to messages from the embed. The handler is only invoked for
|
|
74
|
+
* messages whose origin has already been validated by the transport. Returns
|
|
75
|
+
* an unsubscribe function.
|
|
76
|
+
*/
|
|
77
|
+
onMessage(handler: (msg: SwappedInboundMessage) => void): () => void;
|
|
78
|
+
}
|
|
@@ -43,6 +43,13 @@ export declare function isValidWithdrawal({ config, checkoutConfig, withdrawalIn
|
|
|
43
43
|
isWithdrawAmountValid: boolean;
|
|
44
44
|
minWithdrawalDisplayValue: number;
|
|
45
45
|
};
|
|
46
|
+
export declare const useFrozenSourceTokenBalance: ({ isWithdrawing, sourceTokenBalance, }: {
|
|
47
|
+
isWithdrawing: boolean;
|
|
48
|
+
sourceTokenBalance: string;
|
|
49
|
+
}) => {
|
|
50
|
+
displayedSourceTokenBalance: string;
|
|
51
|
+
freezeDisplayedSourceTokenBalance(sourceTokenBalance: string): void;
|
|
52
|
+
};
|
|
46
53
|
/**
|
|
47
54
|
* Builds the source-token options list for the Lighter compound input dropdown.
|
|
48
55
|
* Currently returns a single option per config; expands when Lighter exposes
|
|
@@ -140,6 +140,7 @@ export declare const useActiveTheme: () => {
|
|
|
140
140
|
fiatAccountGradientFrom: string;
|
|
141
141
|
fiatAccountGradientTo: string;
|
|
142
142
|
optionBoxBackground: string;
|
|
143
|
+
optionBoxBorderedBackground: string;
|
|
143
144
|
optionBoxBackgroundUninteractive: string;
|
|
144
145
|
optionBoxBorderBase: string;
|
|
145
146
|
optionBoxBorderHover: string;
|
|
@@ -175,6 +176,8 @@ export declare const useActiveTheme: () => {
|
|
|
175
176
|
counterRingColor: string;
|
|
176
177
|
cryptoCashToggleContainerBorderColor: string;
|
|
177
178
|
cryptoCashToggleBackground: string;
|
|
179
|
+
qrCodeBackground: string;
|
|
180
|
+
qrCodeForeground: string;
|
|
178
181
|
withdrawalYouWillReceiveLabel: string;
|
|
179
182
|
withdrawalYouWillReceiveValueCrypto: string;
|
|
180
183
|
withdrawalYouWillReceiveValueUsd: string;
|
|
@@ -536,6 +539,9 @@ export declare const useActiveTheme: () => {
|
|
|
536
539
|
blurs: {
|
|
537
540
|
modalOverlay: string;
|
|
538
541
|
};
|
|
542
|
+
opacities: {
|
|
543
|
+
buttonPrimaryDisabled: string;
|
|
544
|
+
};
|
|
539
545
|
moonpayTheme: string;
|
|
540
546
|
modalZIndex: string;
|
|
541
547
|
};
|
|
@@ -668,6 +674,7 @@ export declare const useActiveTheme: () => {
|
|
|
668
674
|
fiatAccountGradientFrom: string;
|
|
669
675
|
fiatAccountGradientTo: string;
|
|
670
676
|
optionBoxBackground: string;
|
|
677
|
+
optionBoxBorderedBackground: string;
|
|
671
678
|
optionBoxBackgroundUninteractive: string;
|
|
672
679
|
optionBoxBorderBase: string;
|
|
673
680
|
optionBoxBorderHover: string;
|
|
@@ -703,6 +710,8 @@ export declare const useActiveTheme: () => {
|
|
|
703
710
|
counterRingColor: string;
|
|
704
711
|
cryptoCashToggleContainerBorderColor: string;
|
|
705
712
|
cryptoCashToggleBackground: string;
|
|
713
|
+
qrCodeBackground: string;
|
|
714
|
+
qrCodeForeground: string;
|
|
706
715
|
withdrawalYouWillReceiveLabel: string;
|
|
707
716
|
withdrawalYouWillReceiveValueCrypto: string;
|
|
708
717
|
withdrawalYouWillReceiveValueUsd: string;
|
|
@@ -1064,6 +1073,9 @@ export declare const useActiveTheme: () => {
|
|
|
1064
1073
|
blurs: {
|
|
1065
1074
|
modalOverlay: string;
|
|
1066
1075
|
};
|
|
1076
|
+
opacities: {
|
|
1077
|
+
buttonPrimaryDisabled: string;
|
|
1078
|
+
};
|
|
1067
1079
|
moonpayTheme: string;
|
|
1068
1080
|
modalZIndex: string;
|
|
1069
1081
|
} | null | undefined;
|
|
@@ -1194,6 +1206,7 @@ export declare const useActiveTheme: () => {
|
|
|
1194
1206
|
fiatAccountGradientFrom: string;
|
|
1195
1207
|
fiatAccountGradientTo: string;
|
|
1196
1208
|
optionBoxBackground: string;
|
|
1209
|
+
optionBoxBorderedBackground: string;
|
|
1197
1210
|
optionBoxBackgroundUninteractive: string;
|
|
1198
1211
|
optionBoxBorderBase: string;
|
|
1199
1212
|
optionBoxBorderHover: string;
|
|
@@ -1229,6 +1242,8 @@ export declare const useActiveTheme: () => {
|
|
|
1229
1242
|
counterRingColor: string;
|
|
1230
1243
|
cryptoCashToggleContainerBorderColor: string;
|
|
1231
1244
|
cryptoCashToggleBackground: string;
|
|
1245
|
+
qrCodeBackground: string;
|
|
1246
|
+
qrCodeForeground: string;
|
|
1232
1247
|
withdrawalYouWillReceiveLabel: string;
|
|
1233
1248
|
withdrawalYouWillReceiveValueCrypto: string;
|
|
1234
1249
|
withdrawalYouWillReceiveValueUsd: string;
|
|
@@ -1590,6 +1605,9 @@ export declare const useActiveTheme: () => {
|
|
|
1590
1605
|
blurs: {
|
|
1591
1606
|
modalOverlay: string;
|
|
1592
1607
|
};
|
|
1608
|
+
opacities: {
|
|
1609
|
+
buttonPrimaryDisabled: string;
|
|
1610
|
+
};
|
|
1593
1611
|
moonpayTheme: string;
|
|
1594
1612
|
modalZIndex: string;
|
|
1595
1613
|
} | null | undefined;
|
|
@@ -17,6 +17,7 @@ interface BaseThemeOptions {
|
|
|
17
17
|
customBorderRadiuses?: Partial<ThemeVars['radii']>;
|
|
18
18
|
customBorderWidths?: Partial<ThemeVars['borderWidths']>;
|
|
19
19
|
customDimensions?: Partial<ThemeVars['dimensions']>;
|
|
20
|
+
customOpacities?: Partial<ThemeVars['opacities']>;
|
|
20
21
|
customSpacings?: Partial<ThemeVars['spacing']>;
|
|
21
22
|
customTextTransforms?: Partial<ThemeVars['textTransforms']>;
|
|
22
23
|
fontSizing?: FontSizeType;
|
|
@@ -26,7 +27,7 @@ interface BaseThemeOptions {
|
|
|
26
27
|
/** Custom z-index for the modal overlay */
|
|
27
28
|
modalZIndex?: number;
|
|
28
29
|
}
|
|
29
|
-
export declare const baseTheme: ({ borderRadius, fontStack, fontSizing, customFontFamily, customFontWeights, customFontSizings, customBorderWidths, customBorderRadiuses, customDimensions, customSpacings, customTextTransforms, overlayBlur, modalZIndex, }: BaseThemeOptions) => Pick<ThemeVars, "radii" | "dimensions" | "fonts" | "fontWeight" | "fontSize" | "blurs" | "spacing" | "borderWidths" | "textTransforms" | "modalZIndex">;
|
|
30
|
+
export declare const baseTheme: ({ borderRadius, fontStack, fontSizing, customFontFamily, customFontWeights, customFontSizings, customBorderWidths, customBorderRadiuses, customDimensions, customOpacities, customSpacings, customTextTransforms, overlayBlur, modalZIndex, }: BaseThemeOptions) => Pick<ThemeVars, "radii" | "dimensions" | "fonts" | "fontWeight" | "fontSize" | "blurs" | "spacing" | "borderWidths" | "textTransforms" | "modalZIndex" | "opacities">;
|
|
30
31
|
export interface AccentColor {
|
|
31
32
|
accentColor: string;
|
|
32
33
|
accentColorForeground: string;
|
|
@@ -37,5 +38,6 @@ export interface ThemeOptions extends BaseThemeOptions {
|
|
|
37
38
|
accentColorForeground?: string;
|
|
38
39
|
customColors?: Partial<ThemeVars['colors']>;
|
|
39
40
|
customShadows?: Partial<ThemeVars['shadows']>;
|
|
41
|
+
customOpacities?: Partial<ThemeVars['opacities']>;
|
|
40
42
|
}
|
|
41
43
|
export {};
|
package/dist/themes/baseTheme.js
CHANGED
package/dist/themes/darkTheme.js
CHANGED
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
type BaseCondition = {
|
|
2
|
+
type: 'country';
|
|
3
|
+
countryCodes: string[];
|
|
4
|
+
};
|
|
5
|
+
type Condition = BaseCondition | {
|
|
6
|
+
type: 'all';
|
|
7
|
+
conditions: Condition[];
|
|
8
|
+
} | {
|
|
9
|
+
type: 'any';
|
|
10
|
+
conditions: Condition[];
|
|
11
|
+
};
|
|
12
|
+
interface Variant<T> {
|
|
13
|
+
condition?: Condition;
|
|
14
|
+
value: T;
|
|
15
|
+
}
|
|
16
|
+
interface VariantConfig<T> {
|
|
17
|
+
variants: Variant<T>[];
|
|
18
|
+
value: T;
|
|
19
|
+
}
|
|
20
|
+
interface EvaluationContext {
|
|
21
|
+
countryCode?: string;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Type guard to check if a value is a VariantConfig
|
|
25
|
+
* (used to distinguish from simple static configs)
|
|
26
|
+
*/
|
|
27
|
+
export declare function isVariantConfig<T>(value: unknown): value is VariantConfig<T>;
|
|
28
|
+
/**
|
|
29
|
+
* Resolves the appropriate value from a VariantConfig based on runtime context.
|
|
30
|
+
* Evaluates variants in order and returns the first matching variant's value.
|
|
31
|
+
* Falls back to default value if no variants match.
|
|
32
|
+
*/
|
|
33
|
+
export declare function resolveValue<T>(config: VariantConfig<T>, ctx: EvaluationContext): T;
|
|
34
|
+
export {};
|
|
@@ -1,14 +1 @@
|
|
|
1
|
-
|
|
2
|
-
* Keys are chainId strings. Values are arrays of token addresses,
|
|
3
|
-
* or ["*"] to disable the entire chain.
|
|
4
|
-
*/
|
|
5
|
-
export type DisabledChainsAndAssets = Record<string, string[]>;
|
|
6
|
-
/** Returns true if an entire chain is disabled (has ["*"]). */
|
|
7
|
-
export declare function isChainDisabled(disabledConfig: DisabledChainsAndAssets, chainId: number | string): boolean;
|
|
8
|
-
/**
|
|
9
|
-
* Returns true if a specific chain + asset combination is disabled.
|
|
10
|
-
* - If the chain has ["*"], the entire chain (and all its assets) is disabled.
|
|
11
|
-
* - If the chain has specific addresses, only those tokens are disabled.
|
|
12
|
-
* - Address comparison is case-insensitive.
|
|
13
|
-
*/
|
|
14
|
-
export declare function isAssetDisabled(disabledConfig: DisabledChainsAndAssets, chainId: number | string, tokenAddress: string): boolean;
|
|
1
|
+
export { type DisabledChainsAndAssets, isAssetDisabled, isChainDisabled, } from '@funkit/connect-core';
|
|
@@ -1,32 +1,7 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
/**
|
|
6
|
-
showNewBadge?: 'primary' | true;
|
|
7
|
-
}
|
|
8
|
-
/** Resolved asset: API metadata merged with config-driven fields */
|
|
9
|
-
export type ResolvedAssetInfo = SupportedAssetInfo & TokenTransferAssetConfig;
|
|
10
|
-
/** Raw chain entry from the Statsig tokentransferconfig */
|
|
11
|
-
export interface TokenTransferChainConfig {
|
|
12
|
-
readonly chainId: number;
|
|
13
|
-
readonly isDefault?: boolean;
|
|
14
|
-
readonly assets: readonly TokenTransferAssetConfig[];
|
|
15
|
-
}
|
|
16
|
-
/** The full output of useTokenTransferConfig */
|
|
17
|
-
export interface TokenTransferConfig {
|
|
18
|
-
/** Supported assets filtered by config, keyed by [chainId][address] */
|
|
19
|
-
supportedAssets: GetSupportedAssetsResponse;
|
|
20
|
-
/** Backward-compatible Record<number, string[]> (chainId -> symbol[]) */
|
|
21
|
-
symbolsByChainId: Record<number, string[]>;
|
|
22
|
-
/** Chain IDs in config display order */
|
|
23
|
-
chainIdSortOrder: number[];
|
|
24
|
-
/** Default chain ID (from isDefault on chain entry) */
|
|
25
|
-
defaultChainId: number | undefined;
|
|
26
|
-
/** Token symbols to prioritize at the top of the dropdown */
|
|
27
|
-
priorityTokenSymbols: string[];
|
|
28
|
-
/** Token symbols that have a "New" badge. The 'primary' symbol is first. */
|
|
29
|
-
newBadgeSymbols: Set<string>;
|
|
30
|
-
/** True while /assets/supported is still loading */
|
|
1
|
+
import type { TokenTransferConfigResult } from '@funkit/connect-core';
|
|
2
|
+
export type { ResolvedAssetInfo, TokenTransferAssetConfig, TokenTransferChainConfig, TokenTransferConfigResult, } from '@funkit/connect-core';
|
|
3
|
+
/** The full output of useTokenTransferConfig: the resolved config + load state. */
|
|
4
|
+
export interface TokenTransferConfig extends TokenTransferConfigResult {
|
|
5
|
+
/** True while /assets/supported is still loading. */
|
|
31
6
|
isLoading: boolean;
|
|
32
7
|
}
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import {
|
|
3
|
+
getInjectedConnector,
|
|
4
|
+
hasInjectedProvider
|
|
5
|
+
} from "./chunk-OLZ7626J.js";
|
|
6
|
+
import {
|
|
7
|
+
getWalletConnectConnector
|
|
8
|
+
} from "./chunk-N4IJLYFY.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,69 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import {
|
|
3
|
+
getInjectedConnector,
|
|
4
|
+
hasInjectedProvider
|
|
5
|
+
} from "./chunk-OLZ7626J.js";
|
|
6
|
+
import {
|
|
7
|
+
getWalletConnectConnector
|
|
8
|
+
} from "./chunk-N4IJLYFY.js";
|
|
9
|
+
|
|
10
|
+
// src/wallets/walletConnectors/bifrostWallet/bifrostWallet.ts
|
|
11
|
+
import { isAndroid } from "@funkit/utils";
|
|
12
|
+
var bifrostWallet = ({
|
|
13
|
+
projectId,
|
|
14
|
+
walletConnectParameters
|
|
15
|
+
}) => {
|
|
16
|
+
const isBifrostInjected = hasInjectedProvider({ flag: "isBifrost" });
|
|
17
|
+
const shouldUseWalletConnect = !isBifrostInjected;
|
|
18
|
+
const getUri = (uri) => {
|
|
19
|
+
return isAndroid() ? uri : `https://app.bifrostwallet.com/wc?uri=${encodeURIComponent(uri)}`;
|
|
20
|
+
};
|
|
21
|
+
return {
|
|
22
|
+
id: "bifrostWallet",
|
|
23
|
+
name: "Bifrost Wallet",
|
|
24
|
+
iconUrl: async () => (await import("./bifrostWallet-5NQVDZ5P.js")).default,
|
|
25
|
+
iconBackground: "#fff",
|
|
26
|
+
installed: !shouldUseWalletConnect ? isBifrostInjected : void 0,
|
|
27
|
+
downloadUrls: {
|
|
28
|
+
android: "https://play.google.com/store/apps/details?id=com.bifrostwallet.app",
|
|
29
|
+
ios: "https://apps.apple.com/us/app/bifrost-wallet/id1577198351",
|
|
30
|
+
qrCode: "https://bifrostwallet.com/#download-app"
|
|
31
|
+
},
|
|
32
|
+
mobile: {
|
|
33
|
+
getUri: shouldUseWalletConnect ? getUri : void 0
|
|
34
|
+
},
|
|
35
|
+
qrCode: shouldUseWalletConnect ? {
|
|
36
|
+
getUri: (uri) => uri,
|
|
37
|
+
instructions: {
|
|
38
|
+
learnMoreUrl: "https://support.bifrostwallet.com/en/articles/6886814-how-to-use-walletconnect",
|
|
39
|
+
steps: [
|
|
40
|
+
{
|
|
41
|
+
description: "wallet_connectors.bifrost.qr_code.step1.description",
|
|
42
|
+
step: "install",
|
|
43
|
+
title: "wallet_connectors.bifrost.qr_code.step1.title"
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
description: "wallet_connectors.bifrost.qr_code.step2.description",
|
|
47
|
+
step: "create",
|
|
48
|
+
title: "wallet_connectors.bifrost.qr_code.step2.title"
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
description: "wallet_connectors.bifrost.qr_code.step3.description",
|
|
52
|
+
step: "scan",
|
|
53
|
+
title: "wallet_connectors.bifrost.qr_code.step3.title"
|
|
54
|
+
}
|
|
55
|
+
]
|
|
56
|
+
}
|
|
57
|
+
} : void 0,
|
|
58
|
+
createConnector: shouldUseWalletConnect ? getWalletConnectConnector({
|
|
59
|
+
projectId,
|
|
60
|
+
walletConnectParameters
|
|
61
|
+
}) : getInjectedConnector({
|
|
62
|
+
flag: "isBifrost"
|
|
63
|
+
})
|
|
64
|
+
};
|
|
65
|
+
};
|
|
66
|
+
|
|
67
|
+
export {
|
|
68
|
+
bifrostWallet
|
|
69
|
+
};
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import {
|
|
3
|
+
getInjectedConnector,
|
|
4
|
+
hasInjectedProvider
|
|
5
|
+
} from "./chunk-OLZ7626J.js";
|
|
6
|
+
import {
|
|
7
|
+
getWalletConnectConnector
|
|
8
|
+
} from "./chunk-N4IJLYFY.js";
|
|
9
|
+
|
|
10
|
+
// src/wallets/walletConnectors/coin98Wallet/coin98Wallet.ts
|
|
11
|
+
var coin98Wallet = ({
|
|
12
|
+
projectId,
|
|
13
|
+
walletConnectParameters
|
|
14
|
+
}) => {
|
|
15
|
+
const isCoin98WalletInjected = hasInjectedProvider({
|
|
16
|
+
namespace: "coin98.provider",
|
|
17
|
+
flag: "isCoin98"
|
|
18
|
+
});
|
|
19
|
+
const shouldUseWalletConnect = !isCoin98WalletInjected;
|
|
20
|
+
return {
|
|
21
|
+
id: "coin98",
|
|
22
|
+
name: "Coin98 Wallet",
|
|
23
|
+
iconUrl: async () => (await import("./coin98Wallet-I5CP5KYZ.js")).default,
|
|
24
|
+
installed: isCoin98WalletInjected,
|
|
25
|
+
iconAccent: "#CDA349",
|
|
26
|
+
iconBackground: "#fff",
|
|
27
|
+
rdns: "coin98.com",
|
|
28
|
+
downloadUrls: {
|
|
29
|
+
android: "https://play.google.com/store/apps/details?id=coin98.crypto.finance.media",
|
|
30
|
+
ios: "https://apps.apple.com/vn/app/coin98-super-app/id1561969966",
|
|
31
|
+
mobile: "https://coin98.com/wallet",
|
|
32
|
+
qrCode: "https://coin98.com/wallet",
|
|
33
|
+
chrome: "https://chrome.google.com/webstore/detail/coin98-wallet/aeachknmefphepccionboohckonoeemg",
|
|
34
|
+
browserExtension: "https://coin98.com/wallet"
|
|
35
|
+
},
|
|
36
|
+
mobile: {
|
|
37
|
+
getUri: shouldUseWalletConnect ? (uri) => uri : void 0
|
|
38
|
+
},
|
|
39
|
+
qrCode: shouldUseWalletConnect ? {
|
|
40
|
+
getUri: (uri) => uri,
|
|
41
|
+
instructions: {
|
|
42
|
+
learnMoreUrl: "https://coin98.com/wallet",
|
|
43
|
+
steps: [
|
|
44
|
+
{
|
|
45
|
+
description: "wallet_connectors.coin98.qr_code.step1.description",
|
|
46
|
+
step: "install",
|
|
47
|
+
title: "wallet_connectors.coin98.qr_code.step1.title"
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
description: "wallet_connectors.coin98.qr_code.step2.description",
|
|
51
|
+
step: "create",
|
|
52
|
+
title: "wallet_connectors.coin98.qr_code.step2.title"
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
description: "wallet_connectors.coin98.qr_code.step3.description",
|
|
56
|
+
step: "scan",
|
|
57
|
+
title: "wallet_connectors.coin98.qr_code.step3.title"
|
|
58
|
+
}
|
|
59
|
+
]
|
|
60
|
+
}
|
|
61
|
+
} : void 0,
|
|
62
|
+
extension: {
|
|
63
|
+
instructions: {
|
|
64
|
+
learnMoreUrl: "https://coin98.com/wallet",
|
|
65
|
+
steps: [
|
|
66
|
+
{
|
|
67
|
+
description: "wallet_connectors.coin98.extension.step1.description",
|
|
68
|
+
step: "install",
|
|
69
|
+
title: "wallet_connectors.coin98.extension.step1.title"
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
description: "wallet_connectors.coin98.extension.step2.description",
|
|
73
|
+
step: "create",
|
|
74
|
+
title: "wallet_connectors.coin98.extension.step2.title"
|
|
75
|
+
},
|
|
76
|
+
{
|
|
77
|
+
description: "wallet_connectors.coin98.extension.step3.description",
|
|
78
|
+
step: "refresh",
|
|
79
|
+
title: "wallet_connectors.coin98.extension.step3.title"
|
|
80
|
+
}
|
|
81
|
+
]
|
|
82
|
+
}
|
|
83
|
+
},
|
|
84
|
+
createConnector: shouldUseWalletConnect ? getWalletConnectConnector({
|
|
85
|
+
projectId,
|
|
86
|
+
walletConnectParameters
|
|
87
|
+
}) : getInjectedConnector({
|
|
88
|
+
namespace: "coin98Wallet",
|
|
89
|
+
flag: "isCoin98"
|
|
90
|
+
})
|
|
91
|
+
};
|
|
92
|
+
};
|
|
93
|
+
|
|
94
|
+
export {
|
|
95
|
+
coin98Wallet
|
|
96
|
+
};
|