@reown/appkit-controllers 1.8.17-fetchwallets-networkids.0 → 1.8.17-headless-deeplink-improvement-0.1.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.
@@ -1,4 +1,4 @@
1
- import { type CaipNetworkId, type ChainNamespace, type Connection } from '@reown/appkit-common';
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?: FetchWalletsProps) => Promise<void>;
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,26 @@ 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
+ * Status of the last mobile deeplink attempt.
143
+ */
144
+ deeplinkStatus: 'idle' | 'pending' | 'success' | 'failed';
145
+ /**
146
+ * Error reason for the last deeplink attempt (best-effort heuristic).
147
+ */
148
+ deeplinkError?: 'timeout';
149
+ /**
150
+ * Clears the last deeplink status and error.
151
+ */
152
+ resetDeeplinkStatus: () => void;
153
+ /**
154
+ * Whether a deeplink is ready and waiting for user action.
155
+ */
156
+ deeplinkReady: boolean;
157
+ /**
158
+ * Opens the deeplink for the currently connecting wallet.
159
+ */
160
+ openDeeplink: () => void;
143
161
  }
144
162
  /**
145
163
  * Headless hook for wallet connection.
@@ -1,4 +1,4 @@
1
- import type { CaipNetworkId, ChainNamespace } from '@reown/appkit-common';
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, caipNetworkIds }: FetchWalletsByPageParams): Promise<void>;
74
+ fetchWalletsByPage({ page }: Pick<ApiGetWalletsRequest, "page">): Promise<void>;
81
75
  initializeExcludedWallets({ ids }: {
82
76
  ids: string[];
83
77
  }): Promise<void>;
84
- searchWallet({ search, badge, caipNetworkIds }: SearchWalletParams): Promise<void>;
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-fetchwallets-networkids.0",
3
+ "version": "1.8.17-headless-deeplink-improvement-0.1.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-fetchwallets-networkids.0",
60
- "@reown/appkit-wallet": "1.8.17-fetchwallets-networkids.0"
59
+ "@reown/appkit-common": "1.8.17-headless-deeplink-improvement-0.1.0",
60
+ "@reown/appkit-wallet": "1.8.17-headless-deeplink-improvement-0.1.0"
61
61
  },
62
62
  "devDependencies": {
63
63
  "@vitest/coverage-v8": "2.1.9",