@reown/appkit-controllers 1.8.14-pre-appkit-headless-0.0 → 1.8.14-rc2.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/dist/esm/exports/index.js.map +1 -1
- package/dist/esm/exports/react.js +1 -78
- package/dist/esm/exports/react.js.map +1 -1
- package/dist/esm/src/controllers/ApiController.js +1 -0
- package/dist/esm/src/controllers/ApiController.js.map +1 -1
- package/dist/esm/src/controllers/ConnectionController.js +12 -6
- package/dist/esm/src/controllers/ConnectionController.js.map +1 -1
- package/dist/esm/src/controllers/ConnectorController.js +17 -7
- package/dist/esm/src/controllers/ConnectorController.js.map +1 -1
- package/dist/esm/src/controllers/OptionsController.js +0 -3
- package/dist/esm/src/controllers/OptionsController.js.map +1 -1
- package/dist/esm/src/utils/AssetUtil.js +0 -42
- package/dist/esm/src/utils/AssetUtil.js.map +1 -1
- package/dist/esm/src/utils/ConstantsUtil.js +2 -4
- package/dist/esm/src/utils/ConstantsUtil.js.map +1 -1
- package/dist/esm/tests/controllers/ConnectionController.test.js +106 -2
- package/dist/esm/tests/controllers/ConnectionController.test.js.map +1 -1
- package/dist/esm/tests/controllers/ConnectorController.test.js +137 -8
- package/dist/esm/tests/controllers/ConnectorController.test.js.map +1 -1
- package/dist/esm/tsconfig.tsbuildinfo +1 -1
- package/dist/types/exports/index.d.ts +1 -1
- package/dist/types/exports/react.d.ts +0 -53
- package/dist/types/src/controllers/ConnectionController.d.ts +0 -1
- package/dist/types/src/controllers/ConnectorController.d.ts +9 -4
- package/dist/types/src/controllers/OptionsController.d.ts +0 -13
- package/dist/types/src/utils/AssetUtil.d.ts +0 -18
- package/dist/types/src/utils/ConstantsUtil.d.ts +0 -2
- package/dist/types/src/utils/TypeUtil.d.ts +3 -13
- package/package.json +3 -3
- package/dist/esm/src/utils/ConnectUtil.js +0 -77
- package/dist/esm/src/utils/ConnectUtil.js.map +0 -1
- package/dist/types/src/utils/ConnectUtil.d.ts +0 -38
|
@@ -19,7 +19,7 @@ export type { ConnectionControllerClient, ConnectionControllerState } from '../s
|
|
|
19
19
|
export type { ConnectExternalOptions } from '../src/controllers/ConnectionController.js';
|
|
20
20
|
export { ConnectorController } from '../src/controllers/ConnectorController.js';
|
|
21
21
|
export { ConnectorControllerUtil } from '../src/utils/ConnectorControllerUtil.js';
|
|
22
|
-
export type { ConnectorControllerState } from '../src/controllers/ConnectorController.js';
|
|
22
|
+
export type { ConnectorControllerState, ConnectorWithProviders } from '../src/controllers/ConnectorController.js';
|
|
23
23
|
export { SnackController } from '../src/controllers/SnackController.js';
|
|
24
24
|
export type { SnackControllerState } from '../src/controllers/SnackController.js';
|
|
25
25
|
export { ApiController } from '../src/controllers/ApiController.js';
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { type ChainNamespace, type Connection } from '@reown/appkit-common';
|
|
2
|
-
import { type WalletItem } from '../src/utils/ConnectUtil.js';
|
|
3
2
|
import type { UseAppKitAccountReturn, UseAppKitNetworkReturn } from '../src/utils/TypeUtil.js';
|
|
4
3
|
export type { Connection } from '@reown/appkit-common';
|
|
5
4
|
interface DisconnectParams {
|
|
@@ -76,55 +75,3 @@ export declare function useAppKitConnection({ namespace, onSuccess, onError }: U
|
|
|
76
75
|
switchConnection: ({ connection: _connection, address }: SwitchConnectionParams) => Promise<void>;
|
|
77
76
|
deleteConnection: ({ address, connectorId }: DeleteRecentConnectionProps) => void;
|
|
78
77
|
};
|
|
79
|
-
export interface UseAppKitWalletsReturn {
|
|
80
|
-
/**
|
|
81
|
-
* List of all wallets (injected wallets and WalletConnect wallets combined)
|
|
82
|
-
*/
|
|
83
|
-
data: WalletItem[];
|
|
84
|
-
/**
|
|
85
|
-
* Boolean that indicates if WalletConnect wallets are being fetched.
|
|
86
|
-
*/
|
|
87
|
-
isFetchingWallets: boolean;
|
|
88
|
-
/**
|
|
89
|
-
* Boolean that indicates if a WalletConnect URI is being fetched.
|
|
90
|
-
*/
|
|
91
|
-
isFetchingWcUri: boolean;
|
|
92
|
-
/**
|
|
93
|
-
* The current WalletConnect URI for QR code display.
|
|
94
|
-
* This is set when connecting to a WalletConnect wallet.
|
|
95
|
-
*/
|
|
96
|
-
wcUri?: string;
|
|
97
|
-
/**
|
|
98
|
-
* The current page number.
|
|
99
|
-
*/
|
|
100
|
-
page: number;
|
|
101
|
-
/**
|
|
102
|
-
* The total number of available wallets.
|
|
103
|
-
*/
|
|
104
|
-
count: number;
|
|
105
|
-
/**
|
|
106
|
-
* Function to fetch WalletConnect wallets from the explorer API.
|
|
107
|
-
* This is useful for pagination or initial load.
|
|
108
|
-
* @param options - Options for fetching wallets
|
|
109
|
-
* @param options.page - Page number to fetch (default: 1)
|
|
110
|
-
*/
|
|
111
|
-
fetchWallets: (options?: {
|
|
112
|
-
page?: number;
|
|
113
|
-
query?: string;
|
|
114
|
-
}) => Promise<void>;
|
|
115
|
-
/**
|
|
116
|
-
* Function to connect to a wallet.
|
|
117
|
-
* - For WalletConnect wallets: initiates WC connection and returns the URI in the onSuccess callback
|
|
118
|
-
* - For injected connectors: triggers the extension/wallet directly
|
|
119
|
-
*
|
|
120
|
-
* @param wallet - The wallet item to connect to
|
|
121
|
-
* @param callbacks - Success and error callbacks
|
|
122
|
-
* @returns Promise that resolves when connection completes or rejects on error
|
|
123
|
-
*/
|
|
124
|
-
connect: (wallet: WalletItem, namespace?: ChainNamespace) => Promise<void>;
|
|
125
|
-
}
|
|
126
|
-
/**
|
|
127
|
-
* Headless hook for wallet connection.
|
|
128
|
-
* Provides all the data and functions needed to build a custom connect UI.
|
|
129
|
-
*/
|
|
130
|
-
export declare function useAppKitWallets(): UseAppKitWalletsReturn;
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import { type ChainNamespace } from '@reown/appkit-common';
|
|
2
|
-
import type { AuthConnector, Connector,
|
|
2
|
+
import type { AuthConnector, Connector, WcWallet } from '../utils/TypeUtil.js';
|
|
3
|
+
export interface ConnectorWithProviders extends Connector {
|
|
4
|
+
connectors?: Connector[];
|
|
5
|
+
}
|
|
3
6
|
export interface ConnectorControllerState {
|
|
4
7
|
allConnectors: Connector[];
|
|
5
8
|
connectors: ConnectorWithProviders[];
|
|
@@ -30,9 +33,10 @@ export declare const ConnectorController: {
|
|
|
30
33
|
getAuthConnector(chainNamespace?: ChainNamespace): AuthConnector | undefined;
|
|
31
34
|
getAnnouncedConnectorRdns(): (string | undefined)[];
|
|
32
35
|
getConnectorById(id: string): Connector | undefined;
|
|
33
|
-
getConnector({ id, namespace }: {
|
|
34
|
-
id
|
|
35
|
-
|
|
36
|
+
getConnector({ id, rdns, namespace }: {
|
|
37
|
+
id?: string;
|
|
38
|
+
rdns?: string | null;
|
|
39
|
+
namespace?: ChainNamespace;
|
|
36
40
|
}): Connector | undefined;
|
|
37
41
|
syncIfAuthConnector(connector: Connector | AuthConnector): void;
|
|
38
42
|
/**
|
|
@@ -59,5 +63,6 @@ export declare const ConnectorController: {
|
|
|
59
63
|
getConnectorId(namespace: ChainNamespace | undefined): string | undefined;
|
|
60
64
|
isConnected(namespace?: ChainNamespace): boolean;
|
|
61
65
|
resetConnectorIds(): void;
|
|
66
|
+
extendConnectorsWithExplorerWallets(explorerWallets: WcWallet[]): void;
|
|
62
67
|
};
|
|
63
68
|
export {};
|
|
@@ -85,11 +85,6 @@ export interface OptionsControllerStatePublic {
|
|
|
85
85
|
* @default true
|
|
86
86
|
*/
|
|
87
87
|
enableCoinbase?: boolean;
|
|
88
|
-
/**
|
|
89
|
-
* Enable or disable the AppKit Headless mode to build custom connect user interfaces.
|
|
90
|
-
* @default true
|
|
91
|
-
*/
|
|
92
|
-
enableHeadless?: boolean;
|
|
93
88
|
/**
|
|
94
89
|
* Enable or disable the Injected wallet.
|
|
95
90
|
* @default true
|
|
@@ -231,7 +226,6 @@ export declare const OptionsController: {
|
|
|
231
226
|
setAllowUnsupportedChain(allowUnsupportedChain: OptionsControllerState["allowUnsupportedChain"]): void;
|
|
232
227
|
setManualWCControl(manualWCControl: OptionsControllerState["manualWCControl"]): void;
|
|
233
228
|
setEnableNetworkSwitch(enableNetworkSwitch: OptionsControllerState["enableNetworkSwitch"]): void;
|
|
234
|
-
setEnableHeadless(enableHeadless: OptionsControllerState["enableHeadless"]): void;
|
|
235
229
|
setEnableMobileFullScreen(enableMobileFullScreen: OptionsControllerState["enableMobileFullScreen"]): void;
|
|
236
230
|
setEnableReconnect(enableReconnect: OptionsControllerState["enableReconnect"]): void;
|
|
237
231
|
setCoinbasePreference(coinbasePreference: OptionsControllerState["coinbasePreference"]): void;
|
|
@@ -1635,12 +1629,6 @@ export declare const OptionsController: {
|
|
|
1635
1629
|
*/
|
|
1636
1630
|
| undefined;
|
|
1637
1631
|
readonly enableCoinbase?: boolean
|
|
1638
|
-
/**
|
|
1639
|
-
* Enable or disable the AppKit Headless mode to build custom connect user interfaces.
|
|
1640
|
-
* @default true
|
|
1641
|
-
*/
|
|
1642
|
-
| undefined;
|
|
1643
|
-
readonly enableHeadless?: boolean
|
|
1644
1632
|
/**
|
|
1645
1633
|
* Enable or disable the Injected wallet.
|
|
1646
1634
|
* @default true
|
|
@@ -1796,7 +1784,6 @@ export declare const OptionsController: {
|
|
|
1796
1784
|
readonly payWithExchange?: boolean | undefined;
|
|
1797
1785
|
readonly payments?: boolean | undefined;
|
|
1798
1786
|
readonly onramp?: false | readonly "meld"[] | undefined;
|
|
1799
|
-
readonly headless?: boolean | undefined;
|
|
1800
1787
|
} | undefined;
|
|
1801
1788
|
};
|
|
1802
1789
|
};
|
|
@@ -13,22 +13,4 @@ export declare const AssetUtil: {
|
|
|
13
13
|
getConnectorImage(connector?: Connector): string | undefined;
|
|
14
14
|
getChainImage(chain: ChainNamespace): string | undefined;
|
|
15
15
|
getTokenImage(symbol?: string): string | undefined;
|
|
16
|
-
/**
|
|
17
|
-
* Get the explorer wallet's image URL for the given image ID.
|
|
18
|
-
* @param imageId - The image id of the wallet.
|
|
19
|
-
* @returns The image URL for the wallet.
|
|
20
|
-
*/
|
|
21
|
-
getWalletImageUrl(imageId: string | undefined): string;
|
|
22
|
-
/**
|
|
23
|
-
* Get the public asset's image URL with the given image ID.
|
|
24
|
-
* @param imageId - The image id of the asset.
|
|
25
|
-
* @returns The image URL for the asset.
|
|
26
|
-
*/
|
|
27
|
-
getAssetImageUrl(imageId: string | undefined): string;
|
|
28
|
-
/**
|
|
29
|
-
* Get the image URL for the given chain namespace.
|
|
30
|
-
* @param chainNamespace - The chain namespace to get the image URL for.
|
|
31
|
-
* @returns The image URL for the chain namespace.
|
|
32
|
-
*/
|
|
33
|
-
getChainNamespaceImageUrl(chainNamespace: ChainNamespace): string;
|
|
34
16
|
};
|
|
@@ -58,7 +58,6 @@ export declare const ConstantsUtil: {
|
|
|
58
58
|
payWithExchange: boolean;
|
|
59
59
|
payments: boolean;
|
|
60
60
|
reownAuthentication: boolean;
|
|
61
|
-
headless: boolean;
|
|
62
61
|
};
|
|
63
62
|
DEFAULT_REMOTE_FEATURES_DISABLED: {
|
|
64
63
|
readonly email: false;
|
|
@@ -69,7 +68,6 @@ export declare const ConstantsUtil: {
|
|
|
69
68
|
readonly reownBranding: false;
|
|
70
69
|
readonly emailCapture: false;
|
|
71
70
|
readonly reownAuthentication: false;
|
|
72
|
-
readonly headless: false;
|
|
73
71
|
};
|
|
74
72
|
DEFAULT_FEATURES: {
|
|
75
73
|
receive: true;
|
|
@@ -71,9 +71,6 @@ export type Connector = {
|
|
|
71
71
|
connectors?: Connector[];
|
|
72
72
|
explorerWallet?: WcWallet;
|
|
73
73
|
};
|
|
74
|
-
export interface ConnectorWithProviders extends Connector {
|
|
75
|
-
connectors?: Connector[];
|
|
76
|
-
}
|
|
77
74
|
export interface AuthConnector extends Connector {
|
|
78
75
|
provider: W3mFrameProvider;
|
|
79
76
|
socials?: SocialProvider[];
|
|
@@ -98,7 +95,6 @@ export interface WcWallet {
|
|
|
98
95
|
id: string;
|
|
99
96
|
name: string;
|
|
100
97
|
badge_type?: BadgeType;
|
|
101
|
-
description?: string;
|
|
102
98
|
chains?: CaipNetworkId[];
|
|
103
99
|
homepage?: string;
|
|
104
100
|
image_id?: string;
|
|
@@ -117,6 +113,7 @@ export interface WcWallet {
|
|
|
117
113
|
injected_id?: string;
|
|
118
114
|
}[] | null;
|
|
119
115
|
display_index?: number;
|
|
116
|
+
supports_wc?: boolean;
|
|
120
117
|
}
|
|
121
118
|
export interface ApiGetWalletsRequest {
|
|
122
119
|
page: number;
|
|
@@ -1070,7 +1067,6 @@ export type RemoteFeatures = {
|
|
|
1070
1067
|
payWithExchange?: boolean;
|
|
1071
1068
|
payments?: boolean;
|
|
1072
1069
|
onramp?: OnRampProvider[] | false;
|
|
1073
|
-
headless?: boolean;
|
|
1074
1070
|
};
|
|
1075
1071
|
export type Features = {
|
|
1076
1072
|
/**
|
|
@@ -1200,13 +1196,13 @@ export type ConnectionStatus = 'connected' | 'disconnected' | 'connecting' | 're
|
|
|
1200
1196
|
export type PreferredAccountTypes = {
|
|
1201
1197
|
[Key in keyof NamespaceTypeMap]?: NamespaceTypeMap[Key];
|
|
1202
1198
|
};
|
|
1203
|
-
export type FeatureID = 'multi_wallet' | 'activity' | 'onramp' | 'swap' | 'social_login' | 'reown_branding' | 'email_capture' | 'fund_from_exchange' | 'payments' | 'reown_authentication'
|
|
1199
|
+
export type FeatureID = 'multi_wallet' | 'activity' | 'onramp' | 'swap' | 'social_login' | 'reown_branding' | 'email_capture' | 'fund_from_exchange' | 'payments' | 'reown_authentication';
|
|
1204
1200
|
export interface BaseFeature<T extends FeatureID, C extends string[] | null> {
|
|
1205
1201
|
id: T;
|
|
1206
1202
|
isEnabled: boolean;
|
|
1207
1203
|
config: C;
|
|
1208
1204
|
}
|
|
1209
|
-
export type TypedFeatureConfig = BaseFeature<'activity', null | []> | BaseFeature<'onramp', OnRampProvider[]> | BaseFeature<'swap', SwapProvider[]> | BaseFeature<'social_login', (SocialProvider | 'email')[]> | BaseFeature<'reown_branding', null | []> | BaseFeature<'multi_wallet', null | []> | BaseFeature<'email_capture', EmailCaptureOptions[]
|
|
1205
|
+
export type TypedFeatureConfig = BaseFeature<'activity', null | []> | BaseFeature<'onramp', OnRampProvider[]> | BaseFeature<'swap', SwapProvider[]> | BaseFeature<'social_login', (SocialProvider | 'email')[]> | BaseFeature<'reown_branding', null | []> | BaseFeature<'multi_wallet', null | []> | BaseFeature<'email_capture', EmailCaptureOptions[]>;
|
|
1210
1206
|
export type ApiGetProjectConfigResponse = {
|
|
1211
1207
|
features: TypedFeatureConfig[];
|
|
1212
1208
|
};
|
|
@@ -1282,12 +1278,6 @@ export type FeatureConfigMap = {
|
|
|
1282
1278
|
returnType: boolean;
|
|
1283
1279
|
isLegacy: false;
|
|
1284
1280
|
};
|
|
1285
|
-
headless: {
|
|
1286
|
-
apiFeatureName: 'headless';
|
|
1287
|
-
localFeatureName: 'headless';
|
|
1288
|
-
returnType: boolean;
|
|
1289
|
-
isLegacy: false;
|
|
1290
|
-
};
|
|
1291
1281
|
};
|
|
1292
1282
|
export type FeatureKey = keyof FeatureConfigMap;
|
|
1293
1283
|
export type Tier = 'none' | 'starter' | 'pro' | 'enteprise';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@reown/appkit-controllers",
|
|
3
|
-
"version": "1.8.14-
|
|
3
|
+
"version": "1.8.14-rc2.0",
|
|
4
4
|
"sideEffects": false,
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/esm/exports/index.js",
|
|
@@ -56,8 +56,8 @@
|
|
|
56
56
|
"@walletconnect/universal-provider": "2.23.0",
|
|
57
57
|
"valtio": "2.1.7",
|
|
58
58
|
"viem": ">=2.37.9",
|
|
59
|
-
"@reown/appkit-common": "1.8.14-
|
|
60
|
-
"@reown/appkit-wallet": "1.8.14-
|
|
59
|
+
"@reown/appkit-common": "1.8.14-rc2.0",
|
|
60
|
+
"@reown/appkit-wallet": "1.8.14-rc2.0"
|
|
61
61
|
},
|
|
62
62
|
"devDependencies": {
|
|
63
63
|
"@vitest/coverage-v8": "2.1.9",
|
|
@@ -1,77 +0,0 @@
|
|
|
1
|
-
import { ConnectorController } from '../controllers/ConnectorController.js';
|
|
2
|
-
import { AssetUtil } from './AssetUtil.js';
|
|
3
|
-
export const ConnectUtil = {
|
|
4
|
-
/**
|
|
5
|
-
* Transforms connectors and wallets into a unified list of wallet items
|
|
6
|
-
*/
|
|
7
|
-
getUnifiedWalletList(params) {
|
|
8
|
-
const connectors = ConnectorController.state.connectors;
|
|
9
|
-
const items = [];
|
|
10
|
-
const wallets = params.search?.length > 0 ? params.search : params.wcWallets;
|
|
11
|
-
const wcConnector = connectors.find(c => c.id === 'walletConnect');
|
|
12
|
-
const filteredConnectors = connectors.filter(c => c.type !== 'AUTH' && c.name !== 'Browser Wallet' && c.id !== wcConnector?.id);
|
|
13
|
-
filteredConnectors.forEach(connector => {
|
|
14
|
-
const hasMultipleConnectors = connector.connectors?.length;
|
|
15
|
-
const connectors = hasMultipleConnectors
|
|
16
|
-
? connector.connectors?.map(c => ({
|
|
17
|
-
id: c.id,
|
|
18
|
-
chain: c.chain,
|
|
19
|
-
chainImageUrl: AssetUtil.getChainNamespaceImageUrl(c.chain)
|
|
20
|
-
})) || []
|
|
21
|
-
: [
|
|
22
|
-
{
|
|
23
|
-
id: connector.id,
|
|
24
|
-
chain: connector.chain,
|
|
25
|
-
chainImageUrl: AssetUtil.getChainNamespaceImageUrl(connector.chain)
|
|
26
|
-
}
|
|
27
|
-
];
|
|
28
|
-
items.push({
|
|
29
|
-
id: connector.id,
|
|
30
|
-
connectors,
|
|
31
|
-
name: connector.name,
|
|
32
|
-
imageUrl: connector.imageUrl || '',
|
|
33
|
-
isInjected: true,
|
|
34
|
-
isRecent: false,
|
|
35
|
-
walletInfo: {
|
|
36
|
-
supportedNamespaces: connectors?.map(c => c.chain) || []
|
|
37
|
-
}
|
|
38
|
-
});
|
|
39
|
-
});
|
|
40
|
-
if (wcConnector) {
|
|
41
|
-
items.push({
|
|
42
|
-
id: wcConnector.id,
|
|
43
|
-
connectors: [],
|
|
44
|
-
name: wcConnector.name,
|
|
45
|
-
imageUrl: AssetUtil.getAssetImageUrl(wcConnector.imageId),
|
|
46
|
-
isInjected: false,
|
|
47
|
-
isRecent: false,
|
|
48
|
-
walletInfo: {}
|
|
49
|
-
});
|
|
50
|
-
}
|
|
51
|
-
wallets.forEach(w => {
|
|
52
|
-
items.push({
|
|
53
|
-
id: w.id,
|
|
54
|
-
connectors: [],
|
|
55
|
-
name: w.name,
|
|
56
|
-
imageUrl: AssetUtil.getWalletImageUrl(w.image_id),
|
|
57
|
-
isInjected: false,
|
|
58
|
-
isRecent: false,
|
|
59
|
-
walletInfo: {
|
|
60
|
-
description: w.description,
|
|
61
|
-
supportedChains: w.chains,
|
|
62
|
-
website: w.homepage,
|
|
63
|
-
installationLinks: {
|
|
64
|
-
appStore: w.app_store,
|
|
65
|
-
playStore: w.play_store,
|
|
66
|
-
chromeStore: w.chrome_store,
|
|
67
|
-
desktopLink: w.desktop_link
|
|
68
|
-
},
|
|
69
|
-
deepLink: w.mobile_link,
|
|
70
|
-
isCertified: w.badge_type === 'certified'
|
|
71
|
-
}
|
|
72
|
-
});
|
|
73
|
-
});
|
|
74
|
-
return items;
|
|
75
|
-
}
|
|
76
|
-
};
|
|
77
|
-
//# sourceMappingURL=ConnectUtil.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ConnectUtil.js","sourceRoot":"","sources":["../../../../src/utils/ConnectUtil.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,mBAAmB,EAAE,MAAM,uCAAuC,CAAA;AAC3E,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAA;AAgC1C,MAAM,CAAC,MAAM,WAAW,GAAG;IACzB;;OAEG;IACH,oBAAoB,CAAC,MAAqD;QACxE,MAAM,UAAU,GAAG,mBAAmB,CAAC,KAAK,CAAC,UAAU,CAAA;QACvD,MAAM,KAAK,GAAiB,EAAE,CAAA;QAC9B,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,WAAW;iBAC1C;aACF,CAAC,CAAA;QACJ,CAAC,CAAC,CAAA;QAEF,OAAO,KAAK,CAAA;IACd,CAAC;CACF,CAAA"}
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
import type { ChainNamespace } from '@reown/appkit-common';
|
|
2
|
-
import type { WcWallet } from './TypeUtil.js';
|
|
3
|
-
export type WalletItem = {
|
|
4
|
-
id: string;
|
|
5
|
-
name: string;
|
|
6
|
-
imageUrl: string;
|
|
7
|
-
connectors: {
|
|
8
|
-
id: string;
|
|
9
|
-
rdns?: string;
|
|
10
|
-
chain: ChainNamespace;
|
|
11
|
-
chainImageUrl?: string;
|
|
12
|
-
}[];
|
|
13
|
-
walletInfo: {
|
|
14
|
-
description?: WcWallet['description'];
|
|
15
|
-
supportedChains?: WcWallet['chains'];
|
|
16
|
-
supportedNamespaces?: ChainNamespace[];
|
|
17
|
-
website?: WcWallet['homepage'];
|
|
18
|
-
installationLinks?: {
|
|
19
|
-
appStore?: WcWallet['app_store'];
|
|
20
|
-
playStore?: WcWallet['play_store'];
|
|
21
|
-
chromeStore?: WcWallet['chrome_store'];
|
|
22
|
-
desktopLink?: WcWallet['desktop_link'];
|
|
23
|
-
};
|
|
24
|
-
deepLink?: WcWallet['mobile_link'];
|
|
25
|
-
isCertified?: boolean;
|
|
26
|
-
};
|
|
27
|
-
isInjected: boolean;
|
|
28
|
-
isRecent: boolean;
|
|
29
|
-
};
|
|
30
|
-
export declare const ConnectUtil: {
|
|
31
|
-
/**
|
|
32
|
-
* Transforms connectors and wallets into a unified list of wallet items
|
|
33
|
-
*/
|
|
34
|
-
getUnifiedWalletList(params: {
|
|
35
|
-
wcWallets: WcWallet[];
|
|
36
|
-
search: WcWallet[];
|
|
37
|
-
}): WalletItem[];
|
|
38
|
-
};
|