@reown/appkit-core 1.1.6 → 1.1.8

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.
@@ -46,3 +46,4 @@ 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
48
  export type * from '../src/utils/TypeUtil.js';
49
+ export type * from '../src/utils/SIWXUtil.js';
@@ -10,3 +10,6 @@ export declare function useAppKitAccount(): {
10
10
  isConnected: boolean;
11
11
  status: "reconnecting" | "connected" | "disconnected" | "connecting" | undefined;
12
12
  };
13
+ export declare function useDisconnect(): {
14
+ disconnect: () => Promise<void>;
15
+ };
@@ -10,3 +10,6 @@ export declare function useAppKitAccount(): {
10
10
  isConnected: boolean;
11
11
  status: "reconnecting" | "connected" | "disconnected" | "connecting" | undefined;
12
12
  };
13
+ export declare function useDisconnect(): {
14
+ disconnect: () => Promise<void>;
15
+ };
@@ -70,4 +70,10 @@ export declare const ConnectionController: {
70
70
  setBuffering(buffering: ConnectionControllerState['buffering']): void;
71
71
  setStatus(status: ConnectionControllerState['status']): void;
72
72
  disconnect(): Promise<void>;
73
+ /**
74
+ * @experimental - This is an experimental feature and may be subject to change.
75
+ * Initializes SIWX if available.
76
+ * This is not yet considering One Click Auth.
77
+ */
78
+ initializeSWIXIfAvailable(): Promise<void>;
73
79
  };
@@ -1,4 +1,5 @@
1
1
  import type { CustomWallet, Features, Metadata, ProjectId, SdkVersion, Tokens } from '../utils/TypeUtil.js';
2
+ import type { SWIXConfig } from '../utils/SIWXUtil.js';
2
3
  export interface OptionsControllerStatePublic {
3
4
  /**
4
5
  * A boolean that allows you to add or remove the "All Wallets" button on the modal
@@ -98,6 +99,12 @@ export interface OptionsControllerStatePublic {
98
99
  * @see https://docs.reown.com/appkit/react/core/options#features
99
100
  */
100
101
  features?: Features;
102
+ /**
103
+ * @experimental - This feature is not production ready.
104
+ * Enable Sign In With X (SIWX) feature in your AppKit.
105
+ * @default undefined
106
+ */
107
+ siwx?: SWIXConfig;
101
108
  }
102
109
  export interface OptionsControllerStateInternal {
103
110
  sdkType: 'appkit';
@@ -132,5 +139,6 @@ export declare const OptionsController: {
132
139
  setEnableWalletConnect(enableWalletConnect: OptionsControllerState['enableWalletConnect']): void;
133
140
  setEnableWallets(enableWallets: OptionsControllerState['enableWallets']): void;
134
141
  setHasMultipleAddresses(hasMultipleAddresses: OptionsControllerState['hasMultipleAddresses']): void;
142
+ setSIWX(siwx: OptionsControllerState['siwx']): void;
135
143
  };
136
144
  export {};
@@ -0,0 +1,35 @@
1
+ /**
2
+ * @experimental - This is an experimental feature and it is not production ready
3
+ */
4
+ export interface SWIXConfig {
5
+ createMessage: (chainId: string) => Promise<SIWXMessage>;
6
+ addSession: (session: SIWXSession) => Promise<void>;
7
+ revokeSession: (chainId: string, address: string) => Promise<void>;
8
+ setSessions: (sessions: SIWXSession[]) => Promise<void>;
9
+ getSessions: (chainId: string) => Promise<SIWXSession[]>;
10
+ }
11
+ /**
12
+ * @experimental - This is an experimental feature and it is not production ready
13
+ */
14
+ export interface SIWXSession {
15
+ message: SIWXMessage;
16
+ signature: string;
17
+ }
18
+ /**
19
+ * @experimental - This is an experimental feature and it is not production ready
20
+ */
21
+ export interface SIWXMessage {
22
+ chainId: string;
23
+ domain: string;
24
+ accountAddress: string;
25
+ uri: string;
26
+ version: string;
27
+ nonce: string;
28
+ statement?: string;
29
+ resources?: string[];
30
+ issuedAt?: string;
31
+ expirationTime?: string;
32
+ notBefore?: string;
33
+ requestId?: string;
34
+ toString: () => string;
35
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@reown/appkit-core",
3
- "version": "1.1.6",
3
+ "version": "1.1.8",
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.1.6",
43
- "@reown/appkit-wallet": "1.1.6"
42
+ "@reown/appkit-common": "1.1.8",
43
+ "@reown/appkit-wallet": "1.2.0"
44
44
  },
45
45
  "peerDependencies": {},
46
46
  "devDependencies": {