@reown/appkit-core 1.1.8 → 1.2.1-638deddc0.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.
@@ -42,6 +42,7 @@ export interface ConnectionControllerState {
42
42
  recentWallet?: WcWallet;
43
43
  buffering: boolean;
44
44
  status?: 'connecting' | 'connected' | 'disconnected';
45
+ manualControl?: boolean;
45
46
  }
46
47
  export declare const ConnectionController: {
47
48
  state: ConnectionControllerState;
@@ -64,6 +65,7 @@ export declare const ConnectionController: {
64
65
  getEnsAvatar(value: string): Promise<string | false>;
65
66
  checkInstalled(ids?: string[], chain?: ChainNamespace): boolean;
66
67
  resetWcConnection(): void;
68
+ setUri(uri: string): void;
67
69
  setWcLinking(wcLinking: ConnectionControllerState['wcLinking']): void;
68
70
  setWcError(wcError: ConnectionControllerState['wcError']): void;
69
71
  setRecentWallet(wallet: ConnectionControllerState['recentWallet']): void;
@@ -1,5 +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
+ import type { SIWXConfig } from '../utils/SIWXUtil.js';
3
3
  export interface OptionsControllerStatePublic {
4
4
  /**
5
5
  * A boolean that allows you to add or remove the "All Wallets" button on the modal
@@ -104,7 +104,7 @@ export interface OptionsControllerStatePublic {
104
104
  * Enable Sign In With X (SIWX) feature in your AppKit.
105
105
  * @default undefined
106
106
  */
107
- siwx?: SWIXConfig;
107
+ siwx?: SIWXConfig;
108
108
  }
109
109
  export interface OptionsControllerStateInternal {
110
110
  sdkType: 'appkit';
@@ -24,7 +24,7 @@ type TransactionAction = {
24
24
  onCancel?: () => void;
25
25
  };
26
26
  export interface RouterControllerState {
27
- view: 'Account' | 'AccountSettings' | 'SelectAddresses' | 'AllWallets' | 'ApproveTransaction' | 'BuyInProgress' | 'WalletCompatibleNetworks' | 'ChooseAccountName' | 'Connect' | 'Create' | 'ConnectingExternal' | 'ConnectingFarcaster' | 'ConnectingWalletConnect' | 'ConnectingSiwe' | 'ConnectingSocial' | 'ConnectSocials' | 'ConnectWallets' | 'Downloads' | 'EmailVerifyOtp' | 'EmailVerifyDevice' | 'GetWallet' | 'Networks' | 'OnRampActivity' | 'OnRampFiatSelect' | 'OnRampProviders' | 'OnRampTokenSelect' | 'Profile' | 'RegisterAccountName' | 'RegisterAccountNameSuccess' | 'SwitchNetwork' | 'SwitchAddress' | 'Transactions' | 'UnsupportedChain' | 'UpdateEmailWallet' | 'UpdateEmailPrimaryOtp' | 'UpdateEmailSecondaryOtp' | 'UpgradeEmailWallet' | 'UpgradeToSmartAccount' | 'WalletReceive' | 'WalletSend' | 'WalletSendPreview' | 'WalletSendSelectToken' | 'WhatIsANetwork' | 'WhatIsAWallet' | 'WhatIsABuy' | 'Swap' | 'SwapSelectToken' | 'SwapPreview' | 'ConnectingMultiChain' | 'SwitchActiveChain' | 'SmartSessionCreated' | 'SmartSessionList';
27
+ view: 'Account' | 'AccountSettings' | 'AllWallets' | 'ApproveTransaction' | 'BuyInProgress' | 'WalletCompatibleNetworks' | 'ChooseAccountName' | 'Connect' | 'Create' | 'ConnectingExternal' | 'ConnectingFarcaster' | 'ConnectingWalletConnect' | 'ConnectingWalletConnectBasic' | 'ConnectingSiwe' | 'ConnectingSocial' | 'ConnectSocials' | 'ConnectWallets' | 'Downloads' | 'EmailVerifyOtp' | 'EmailVerifyDevice' | 'GetWallet' | 'Networks' | 'OnRampActivity' | 'OnRampFiatSelect' | 'OnRampProviders' | 'OnRampTokenSelect' | 'Profile' | 'RegisterAccountName' | 'RegisterAccountNameSuccess' | 'SwitchNetwork' | 'SwitchAddress' | 'Transactions' | 'UnsupportedChain' | 'UpdateEmailWallet' | 'UpdateEmailPrimaryOtp' | 'UpdateEmailSecondaryOtp' | 'UpgradeEmailWallet' | 'UpgradeToSmartAccount' | 'WalletReceive' | 'WalletSend' | 'WalletSendPreview' | 'WalletSendSelectToken' | 'WhatIsANetwork' | 'WhatIsAWallet' | 'WhatIsABuy' | 'Swap' | 'SwapSelectToken' | 'SwapPreview' | 'ConnectingMultiChain' | 'SwitchActiveChain' | 'SmartSessionCreated' | 'SmartSessionList';
28
28
  history: RouterControllerState['view'][];
29
29
  data?: {
30
30
  connector?: Connector;
@@ -1,12 +1,13 @@
1
+ import type { CaipNetworkId } from '@reown/appkit-common';
1
2
  /**
2
3
  * @experimental - This is an experimental feature and it is not production ready
3
4
  */
4
- export interface SWIXConfig {
5
- createMessage: (chainId: string) => Promise<SIWXMessage>;
5
+ export interface SIWXConfig {
6
+ createMessage: (input: SIWXMessageInput) => Promise<SIWXMessage>;
6
7
  addSession: (session: SIWXSession) => Promise<void>;
7
8
  revokeSession: (chainId: string, address: string) => Promise<void>;
8
9
  setSessions: (sessions: SIWXSession[]) => Promise<void>;
9
- getSessions: (chainId: string) => Promise<SIWXSession[]>;
10
+ getSessions: (chainId: CaipNetworkId) => Promise<SIWXSession[]>;
10
11
  }
11
12
  /**
12
13
  * @experimental - This is an experimental feature and it is not production ready
@@ -18,18 +19,42 @@ export interface SIWXSession {
18
19
  /**
19
20
  * @experimental - This is an experimental feature and it is not production ready
20
21
  */
21
- export interface SIWXMessage {
22
+ export interface SIWXMessage extends SIWXMessageInput, SIWXMessageMetadata, SIWXMessageIdentifier, SIWXMessageMethods {
23
+ }
24
+ /**
25
+ * @experimental - This is an experimental feature and it is not production ready
26
+ */
27
+ export interface SIWXMessageInput {
28
+ accountAddress: string;
22
29
  chainId: string;
30
+ notBefore?: SIWXMessageTimestamp;
31
+ }
32
+ /**
33
+ * @experimental - This is an experimental feature and it is not production ready
34
+ */
35
+ export interface SIWXMessageMetadata {
23
36
  domain: string;
24
- accountAddress: string;
25
37
  uri: string;
26
38
  version: string;
27
39
  nonce: string;
28
40
  statement?: string;
29
41
  resources?: string[];
30
- issuedAt?: string;
31
- expirationTime?: string;
32
- notBefore?: string;
42
+ }
43
+ /**
44
+ * @experimental - This is an experimental feature and it is not production ready
45
+ */
46
+ export interface SIWXMessageIdentifier {
33
47
  requestId?: string;
48
+ issuedAt?: SIWXMessageTimestamp;
49
+ expirationTime?: SIWXMessageTimestamp;
50
+ }
51
+ /**
52
+ * @experimental - This is an experimental feature and it is not production ready
53
+ */
54
+ export interface SIWXMessageMethods {
34
55
  toString: () => string;
35
56
  }
57
+ /**
58
+ * @experimental - This is an experimental feature and it is not production ready
59
+ */
60
+ export type SIWXMessageTimestamp = string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@reown/appkit-core",
3
- "version": "1.1.8",
3
+ "version": "1.2.1-638deddc0.0",
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.8",
43
- "@reown/appkit-wallet": "1.2.0"
42
+ "@reown/appkit-common": "1.2.1-638deddc0.0",
43
+ "@reown/appkit-wallet": "1.2.1-638deddc0.0"
44
44
  },
45
45
  "peerDependencies": {},
46
46
  "devDependencies": {