@reown/appkit-controllers 1.8.17-fetchwallets-networkids.0 → 1.8.17-headless-deeplink-improvements-0.2.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/react.js +144 -11
- package/dist/esm/exports/react.js.map +1 -1
- package/dist/esm/src/controllers/ApiController.js +4 -6
- package/dist/esm/src/controllers/ApiController.js.map +1 -1
- package/dist/esm/src/utils/ConnectionControllerUtil.js +8 -3
- package/dist/esm/src/utils/ConnectionControllerUtil.js.map +1 -1
- package/dist/esm/tests/controllers/ApiController.test.js +0 -76
- package/dist/esm/tests/controllers/ApiController.test.js.map +1 -1
- package/dist/esm/tests/hooks/react.test.js +0 -69
- package/dist/esm/tests/hooks/react.test.js.map +1 -1
- package/dist/esm/tsconfig.tsbuildinfo +1 -1
- package/dist/types/exports/react.d.ts +13 -7
- package/dist/types/src/controllers/ApiController.d.ts +3 -9
- package/package.json +3 -3
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type
|
|
1
|
+
import { type ChainNamespace, type Connection } from '@reown/appkit-common';
|
|
2
2
|
import { type WalletItem } from '../src/utils/ConnectUtil.js';
|
|
3
3
|
import type { UseAppKitAccountReturn, UseAppKitNetworkReturn } from '../src/utils/TypeUtil.js';
|
|
4
4
|
export type { Connection } from '@reown/appkit-common';
|
|
@@ -25,11 +25,6 @@ interface DeleteRecentConnectionProps {
|
|
|
25
25
|
address: string;
|
|
26
26
|
connectorId: string;
|
|
27
27
|
}
|
|
28
|
-
interface FetchWalletsProps {
|
|
29
|
-
page?: number;
|
|
30
|
-
query?: string;
|
|
31
|
-
caipNetworkIds?: CaipNetworkId[];
|
|
32
|
-
}
|
|
33
28
|
export declare function useAppKitProvider<T>(chainNamespace: ChainNamespace): {
|
|
34
29
|
walletProvider: T;
|
|
35
30
|
walletProviderType: import("./index.js").ConnectorType | undefined;
|
|
@@ -125,7 +120,10 @@ export interface UseAppKitWalletsReturn {
|
|
|
125
120
|
* @param options.page - Page number to fetch (default: 1)
|
|
126
121
|
* @param options.query - Search query to filter wallets (default: '')
|
|
127
122
|
*/
|
|
128
|
-
fetchWallets: (options?:
|
|
123
|
+
fetchWallets: (options?: {
|
|
124
|
+
page?: number;
|
|
125
|
+
query?: string;
|
|
126
|
+
}) => Promise<void>;
|
|
129
127
|
/**
|
|
130
128
|
* Function to connect to a wallet.
|
|
131
129
|
* - For WalletConnect wallets: initiates WC connection and returns the URI with the `wcUri` state.
|
|
@@ -140,6 +138,14 @@ export interface UseAppKitWalletsReturn {
|
|
|
140
138
|
* Function to reset the WC URI. Useful to keep `connectingWallet` state sync with the WC URI. Can be called when the QR code is closed.
|
|
141
139
|
*/
|
|
142
140
|
resetWcUri: () => void;
|
|
141
|
+
/**
|
|
142
|
+
* Whether a deeplink is ready and waiting for user action (shows "Open" button).
|
|
143
|
+
*/
|
|
144
|
+
deeplinkReady: boolean;
|
|
145
|
+
/**
|
|
146
|
+
* Opens the deeplink for the currently connecting wallet.
|
|
147
|
+
*/
|
|
148
|
+
openDeeplink: () => void;
|
|
143
149
|
}
|
|
144
150
|
/**
|
|
145
151
|
* Headless hook for wallet connection.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { ChainNamespace } from '@reown/appkit-common';
|
|
2
2
|
import { FetchUtil } from '../utils/FetchUtil.js';
|
|
3
3
|
import type { ApiGetWalletsRequest, ProjectLimits, Tier, WcWallet } from '../utils/TypeUtil.js';
|
|
4
4
|
export declare const api: FetchUtil;
|
|
@@ -35,12 +35,6 @@ interface PrefetchParameters {
|
|
|
35
35
|
fetchNetworkImages?: boolean;
|
|
36
36
|
fetchWalletRanks?: boolean;
|
|
37
37
|
}
|
|
38
|
-
interface SearchWalletParams extends Pick<ApiGetWalletsRequest, 'search' | 'badge'> {
|
|
39
|
-
caipNetworkIds?: CaipNetworkId[];
|
|
40
|
-
}
|
|
41
|
-
interface FetchWalletsByPageParams extends Pick<ApiGetWalletsRequest, 'page'> {
|
|
42
|
-
caipNetworkIds?: CaipNetworkId[];
|
|
43
|
-
}
|
|
44
38
|
type StateKey = keyof ApiControllerState;
|
|
45
39
|
export declare const ApiController: {
|
|
46
40
|
state: ApiControllerState;
|
|
@@ -77,11 +71,11 @@ export declare const ApiController: {
|
|
|
77
71
|
prefetchWalletRanks(): Promise<void>;
|
|
78
72
|
fetchFeaturedWallets(): Promise<void>;
|
|
79
73
|
fetchRecommendedWallets(): Promise<void>;
|
|
80
|
-
fetchWalletsByPage({ page
|
|
74
|
+
fetchWalletsByPage({ page }: Pick<ApiGetWalletsRequest, "page">): Promise<void>;
|
|
81
75
|
initializeExcludedWallets({ ids }: {
|
|
82
76
|
ids: string[];
|
|
83
77
|
}): Promise<void>;
|
|
84
|
-
searchWallet({ search, badge
|
|
78
|
+
searchWallet({ search, badge }: Pick<ApiGetWalletsRequest, "search" | "badge">): Promise<void>;
|
|
85
79
|
initPromise(key: string, fetchFn: () => Promise<void>): Promise<unknown>;
|
|
86
80
|
prefetch({ fetchConnectorImages, fetchFeaturedWallets, fetchRecommendedWallets, fetchNetworkImages, fetchWalletRanks }?: PrefetchParameters): Promise<PromiseSettledResult<unknown>[]>;
|
|
87
81
|
prefetchAnalyticsConfig(): void;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@reown/appkit-controllers",
|
|
3
|
-
"version": "1.8.17-
|
|
3
|
+
"version": "1.8.17-headless-deeplink-improvements-0.2.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.1",
|
|
57
57
|
"valtio": "2.1.7",
|
|
58
58
|
"viem": ">=2.37.9",
|
|
59
|
-
"@reown/appkit-common": "1.8.17-
|
|
60
|
-
"@reown/appkit-wallet": "1.8.17-
|
|
59
|
+
"@reown/appkit-common": "1.8.17-headless-deeplink-improvements-0.2.0",
|
|
60
|
+
"@reown/appkit-wallet": "1.8.17-headless-deeplink-improvements-0.2.0"
|
|
61
61
|
},
|
|
62
62
|
"devDependencies": {
|
|
63
63
|
"@vitest/coverage-v8": "2.1.9",
|