@reown/appkit-core 1.4.1 → 1.5.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.
@@ -45,5 +45,6 @@ export { CoreHelperUtil } from '../src/utils/CoreHelperUtil.js';
45
45
  export { StorageUtil } from '../src/utils/StorageUtil.js';
46
46
  export { RouterUtil } from '../src/utils/RouterUtil.js';
47
47
  export { OptionsUtil } from '../src/utils/OptionsUtil.js';
48
+ export { SIWXUtil } from '../src/utils/SIWXUtil.js';
48
49
  export type * from '../src/utils/TypeUtil.js';
49
50
  export type * from '../src/utils/SIWXUtil.js';
@@ -24,7 +24,6 @@ export interface AccountControllerState {
24
24
  farcasterUrl?: string;
25
25
  provider?: UniversalProvider | Provider | CombinedProvider;
26
26
  status?: 'reconnecting' | 'connected' | 'disconnected' | 'connecting';
27
- siweStatus?: 'uninitialized' | 'ready' | 'loading' | 'success' | 'rejected' | 'error';
28
27
  lastRetry?: number;
29
28
  }
30
29
  export declare const AccountController: {
@@ -54,5 +53,4 @@ export declare const AccountController: {
54
53
  setFarcasterUrl(farcasterUrl: AccountControllerState['farcasterUrl'], chain: ChainNamespace | undefined): void;
55
54
  fetchTokenBalance(): Promise<void>;
56
55
  resetAccount(chain: ChainNamespace): void;
57
- setSiweStatus(status: AccountControllerState['siweStatus']): void;
58
56
  };
@@ -74,10 +74,4 @@ export declare const ConnectionController: {
74
74
  setBuffering(buffering: ConnectionControllerState['buffering']): void;
75
75
  setStatus(status: ConnectionControllerState['status']): void;
76
76
  disconnect(): Promise<void>;
77
- /**
78
- * @experimental - This is an experimental feature and may be subject to change.
79
- * Initializes SIWX if available.
80
- * This is not yet considering One Click Auth.
81
- */
82
- initializeSWIXIfAvailable(): Promise<void>;
83
77
  };
@@ -18,6 +18,6 @@ export declare const SnackController: {
18
18
  _showMessage({ message, svg, variant }: {
19
19
  message: SnackControllerState['message'];
20
20
  svg?: SnackControllerState['svg'];
21
- variant?: "loading" | "success" | "error" | undefined;
21
+ variant?: "error" | "success" | "loading" | undefined;
22
22
  }): void;
23
23
  };
@@ -1,4 +1,22 @@
1
1
  import type { CaipNetworkId } from '@reown/appkit-common';
2
+ import UniversalProvider from '@walletconnect/universal-provider';
3
+ export declare const SIWXUtil: {
4
+ getSIWX(): SIWXConfig | undefined;
5
+ initializeIfEnabled(): Promise<void>;
6
+ requestSignMessage(): Promise<void>;
7
+ cancelSignMessage(): Promise<void>;
8
+ getSessions(): Promise<SIWXSession[]>;
9
+ isSIWXCloseDisabled(): Promise<boolean>;
10
+ universalProviderAuthenticate({ universalProvider, chains, methods }: {
11
+ universalProvider: UniversalProvider;
12
+ chains: CaipNetworkId[];
13
+ methods: string[];
14
+ }): Promise<boolean>;
15
+ getSIWXEventProperties(): {
16
+ network: string;
17
+ isSmartAccount: boolean;
18
+ };
19
+ };
2
20
  /**
3
21
  * @experimental - This is an experimental feature and it is not production ready
4
22
  */
@@ -34,7 +52,7 @@ export declare namespace SIWXMessage {
34
52
  */
35
53
  interface Input {
36
54
  accountAddress: string;
37
- chainId: string;
55
+ chainId: CaipNetworkId;
38
56
  notBefore?: Timestamp;
39
57
  }
40
58
  /**
@@ -18,7 +18,7 @@ export declare const SwapApiUtil: {
18
18
  fast: string | undefined;
19
19
  instant: string | undefined;
20
20
  } | null>;
21
- fetchSwapAllowance({ tokenAddress, userAddress, sourceTokenAmount, sourceTokenDecimals }: Pick<BlockchainApiSwapAllowanceRequest, "userAddress" | "tokenAddress"> & {
21
+ fetchSwapAllowance({ tokenAddress, userAddress, sourceTokenAmount, sourceTokenDecimals }: Pick<BlockchainApiSwapAllowanceRequest, "tokenAddress" | "userAddress"> & {
22
22
  sourceTokenAmount: string;
23
23
  sourceTokenDecimals: number;
24
24
  }): Promise<boolean>;
@@ -359,14 +359,14 @@ export type Event = {
359
359
  };
360
360
  } | {
361
361
  type: 'track';
362
- event: 'CLICK_SIGN_SIWE_MESSAGE';
362
+ event: 'CLICK_SIGN_SIWX_MESSAGE';
363
363
  properties: {
364
364
  network: string;
365
365
  isSmartAccount: boolean;
366
366
  };
367
367
  } | {
368
368
  type: 'track';
369
- event: 'CLICK_CANCEL_SIWE';
369
+ event: 'CLICK_CANCEL_SIWX';
370
370
  properties: {
371
371
  network: string;
372
372
  isSmartAccount: boolean;
@@ -376,14 +376,14 @@ export type Event = {
376
376
  event: 'CLICK_NETWORKS';
377
377
  } | {
378
378
  type: 'track';
379
- event: 'SIWE_AUTH_SUCCESS';
379
+ event: 'SIWX_AUTH_SUCCESS';
380
380
  properties: {
381
381
  network: string;
382
382
  isSmartAccount: boolean;
383
383
  };
384
384
  } | {
385
385
  type: 'track';
386
- event: 'SIWE_AUTH_ERROR';
386
+ event: 'SIWX_AUTH_ERROR';
387
387
  properties: {
388
388
  network: string;
389
389
  isSmartAccount: boolean;
@@ -712,7 +712,6 @@ export type AdapterAccountState = {
712
712
  socialWindow?: Window;
713
713
  farcasterUrl?: string;
714
714
  status?: 'reconnecting' | 'connected' | 'disconnected' | 'connecting';
715
- siweStatus?: 'uninitialized' | 'ready' | 'loading' | 'success' | 'rejected' | 'error';
716
715
  };
717
716
  export type ChainAdapter = {
718
717
  connectionControllerClient?: ConnectionControllerClient;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@reown/appkit-core",
3
- "version": "1.4.1",
3
+ "version": "1.5.1",
4
4
  "type": "module",
5
5
  "main": "./dist/esm/exports/index.js",
6
6
  "types": "./dist/types/exports/index.d.ts",
@@ -39,8 +39,8 @@
39
39
  "@walletconnect/universal-provider": "2.17.0",
40
40
  "valtio": "1.11.2",
41
41
  "viem": "2.x",
42
- "@reown/appkit-common": "1.4.1",
43
- "@reown/appkit-wallet": "1.4.1"
42
+ "@reown/appkit-common": "1.5.1",
43
+ "@reown/appkit-wallet": "1.5.1"
44
44
  },
45
45
  "peerDependencies": {},
46
46
  "devDependencies": {