@reown/appkit-controllers 1.8.15 → 1.8.16

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.
Files changed (53) hide show
  1. package/dist/esm/exports/react.js +20 -20
  2. package/dist/esm/exports/react.js.map +1 -1
  3. package/dist/esm/src/controllers/AdapterController/ChainAdapterBlueprint.js.map +1 -1
  4. package/dist/esm/src/controllers/AlertController.js +18 -2
  5. package/dist/esm/src/controllers/AlertController.js.map +1 -1
  6. package/dist/esm/src/controllers/BlockchainApiController.js +2 -2
  7. package/dist/esm/src/controllers/BlockchainApiController.js.map +1 -1
  8. package/dist/esm/src/controllers/ConnectionController.js +3 -0
  9. package/dist/esm/src/controllers/ConnectionController.js.map +1 -1
  10. package/dist/esm/src/controllers/ConnectorController.js +48 -2
  11. package/dist/esm/src/controllers/ConnectorController.js.map +1 -1
  12. package/dist/esm/src/controllers/RouterController.js.map +1 -1
  13. package/dist/esm/src/controllers/SwapController.js +5 -1
  14. package/dist/esm/src/controllers/SwapController.js.map +1 -1
  15. package/dist/esm/src/utils/AssetUtil.js +37 -1
  16. package/dist/esm/src/utils/AssetUtil.js.map +1 -1
  17. package/dist/esm/src/utils/BalanceUtil.js +10 -7
  18. package/dist/esm/src/utils/BalanceUtil.js.map +1 -1
  19. package/dist/esm/src/utils/ChainControllerUtil.js +8 -0
  20. package/dist/esm/src/utils/ChainControllerUtil.js.map +1 -1
  21. package/dist/esm/src/utils/ConnectorUtil.js +27 -0
  22. package/dist/esm/src/utils/ConnectorUtil.js.map +1 -1
  23. package/dist/esm/src/utils/CoreHelperUtil.js +13 -0
  24. package/dist/esm/src/utils/CoreHelperUtil.js.map +1 -1
  25. package/dist/esm/src/utils/SwapApiUtil.js +5 -1
  26. package/dist/esm/src/utils/SwapApiUtil.js.map +1 -1
  27. package/dist/esm/tests/controllers/AlertController.test.js +62 -9
  28. package/dist/esm/tests/controllers/AlertController.test.js.map +1 -1
  29. package/dist/esm/tests/controllers/ChainController.test.js +1 -0
  30. package/dist/esm/tests/controllers/ChainController.test.js.map +1 -1
  31. package/dist/esm/tests/controllers/ConnectionController.test.js +2 -0
  32. package/dist/esm/tests/controllers/ConnectionController.test.js.map +1 -1
  33. package/dist/esm/tests/utils/BalanceUtil.test.js +0 -5
  34. package/dist/esm/tests/utils/BalanceUtil.test.js.map +1 -1
  35. package/dist/esm/tests/utils/ConnectorUtil.test.js +83 -0
  36. package/dist/esm/tests/utils/ConnectorUtil.test.js.map +1 -0
  37. package/dist/esm/tsconfig.tsbuildinfo +1 -1
  38. package/dist/types/src/controllers/AdapterController/ChainAdapterBlueprint.d.ts +15 -1
  39. package/dist/types/src/controllers/BlockchainApiController.d.ts +1 -1
  40. package/dist/types/src/controllers/ConnectionController.d.ts +3 -1
  41. package/dist/types/src/controllers/ConnectorController.d.ts +14 -3
  42. package/dist/types/src/controllers/OptionsController.d.ts +1 -1
  43. package/dist/types/src/controllers/RouterController.d.ts +1 -1
  44. package/dist/types/src/utils/AssetUtil.d.ts +14 -0
  45. package/dist/types/src/utils/BalanceUtil.d.ts +6 -1
  46. package/dist/types/src/utils/ChainControllerUtil.d.ts +7 -1
  47. package/dist/types/src/utils/ConnectorUtil.d.ts +16 -0
  48. package/dist/types/src/utils/ConstantsUtil.d.ts +1 -1
  49. package/dist/types/src/utils/CoreHelperUtil.d.ts +1 -0
  50. package/dist/types/src/utils/TypeUtil.d.ts +13 -0
  51. package/dist/types/src/utils/ViemUtil.d.ts +53 -53
  52. package/dist/types/tests/utils/ConnectorUtil.test.d.ts +1 -0
  53. package/package.json +5 -5
@@ -1,7 +1,7 @@
1
1
  import UniversalProvider from '@walletconnect/universal-provider';
2
2
  import { type Address, type CaipAddress, type CaipNetwork, type ChainNamespace, type Connection, type Hex, type ParsedCaipAddress } from '@reown/appkit-common';
3
3
  import type { W3mFrameProvider } from '@reown/appkit-wallet';
4
- import type { AccountType, Connector as AppKitConnector, CombinedProvider, Provider, Tokens, WriteContractArgs } from '../../utils/TypeUtil.js';
4
+ import type { AccountType, Connector as AppKitConnector, CombinedProvider, Provider, SolanaTransactionRequest, Tokens, WriteContractArgs } from '../../utils/TypeUtil.js';
5
5
  import { type AccountState } from '../ChainController.js';
6
6
  import type { WalletConnectConnector } from './WalletConnectConnector.js';
7
7
  import type { ChainAdapterConnector } from './types.js';
@@ -206,6 +206,12 @@ export declare abstract class AdapterBlueprint<Connector extends ChainAdapterCon
206
206
  * @returns {Promise<AdapterBlueprint.WriteContractResult>} Object containing the transaction hash
207
207
  */
208
208
  abstract writeContract(params: AdapterBlueprint.WriteContractParams): Promise<AdapterBlueprint.WriteContractResult>;
209
+ /**
210
+ * Writes a solana contract transaction.
211
+ * @param {AdapterBlueprint.WriteContractParams} params - Parameters including receiver address, token amount, token address, from address, method, and ABI
212
+ * @returns {Promise<AdapterBlueprint.WriteContractResult>} Object containing the transaction hash
213
+ */
214
+ abstract writeSolanaTransaction(params: AdapterBlueprint.WriteSolanaTransactionParams): Promise<AdapterBlueprint.WriteSolanaTransactionResult>;
209
215
  /**
210
216
  * Parses a decimal string value into a bigint with the specified number of decimals.
211
217
  * @param {AdapterBlueprint.ParseUnitsParams} params - Parameters including value and decimals
@@ -372,9 +378,17 @@ export declare namespace AdapterBlueprint {
372
378
  provider?: AppKitConnector['provider'];
373
379
  caipAddress: CaipAddress;
374
380
  };
381
+ type WriteSolanaTransactionParams = SolanaTransactionRequest & {
382
+ caipNetwork: CaipNetwork;
383
+ provider?: AppKitConnector['provider'];
384
+ caipAddress: CaipAddress;
385
+ };
375
386
  type WriteContractResult = {
376
387
  hash: string;
377
388
  };
389
+ type WriteSolanaTransactionResult = {
390
+ hash: string;
391
+ };
378
392
  type ParseUnitsParams = {
379
393
  value: string;
380
394
  decimals: number;
@@ -29,7 +29,7 @@ export declare const BlockchainApiController: {
29
29
  fetchSwapQuote({ amount, userAddress, from, to, gasPrice }: BlockchainApiSwapQuoteRequest): Promise<BlockchainApiSwapQuoteResponse>;
30
30
  fetchSwapTokens({ chainId }: BlockchainApiSwapTokensRequest): Promise<BlockchainApiSwapTokensResponse>;
31
31
  getAddressBalance({ caipNetworkId, address }: BlockchainApiGetAddressBalanceRequest): Promise<string>;
32
- fetchTokenPrice({ addresses }: BlockchainApiTokenPriceRequest): Promise<BlockchainApiTokenPriceResponse>;
32
+ fetchTokenPrice({ addresses, caipNetworkId }: BlockchainApiTokenPriceRequest): Promise<BlockchainApiTokenPriceResponse>;
33
33
  fetchSwapAllowance({ tokenAddress, userAddress }: BlockchainApiSwapAllowanceRequest): Promise<{
34
34
  allowance: string;
35
35
  }>;
@@ -1,6 +1,6 @@
1
1
  import { type CaipAddress, type CaipNetwork, type ChainNamespace, type Connection, type Hex } from '@reown/appkit-common';
2
2
  import type { W3mFrameTypes } from '@reown/appkit-wallet';
3
- import type { ChainAdapter, Connector, EstimateGasTransactionArgs, SendTransactionArgs, WalletGetAssetsParams, WalletGetAssetsResponse, WcWallet, WriteContractArgs } from '../utils/TypeUtil.js';
3
+ import type { ChainAdapter, Connector, EstimateGasTransactionArgs, SendTransactionArgs, WalletGetAssetsParams, WalletGetAssetsResponse, WcWallet, WriteContractArgs, WriteSolanaTransactionArgs } from '../utils/TypeUtil.js';
4
4
  import { type ChainControllerState } from './ChainController.js';
5
5
  interface SwitchConnectionParams {
6
6
  connection: Connection;
@@ -73,6 +73,7 @@ export interface ConnectionControllerClient {
73
73
  reconnectExternal?: (options: ConnectExternalOptions) => Promise<void>;
74
74
  checkInstalled?: (ids?: string[]) => boolean;
75
75
  writeContract: (args: WriteContractArgs) => Promise<`0x${string}` | null>;
76
+ writeSolanaTransaction: (args: WriteSolanaTransactionArgs) => Promise<string | null>;
76
77
  getEnsAddress: (value: string) => Promise<false | string>;
77
78
  getEnsAvatar: (value: string) => Promise<false | string>;
78
79
  grantPermissions: (params: readonly unknown[] | object) => Promise<unknown>;
@@ -132,6 +133,7 @@ export declare const ConnectionController: {
132
133
  walletGetAssets(params: WalletGetAssetsParams): Promise<WalletGetAssetsResponse>;
133
134
  estimateGas(args: EstimateGasTransactionArgs): Promise<bigint | undefined>;
134
135
  writeContract(args: WriteContractArgs): Promise<`0x${string}` | null | undefined>;
136
+ writeSolanaTransaction(args: WriteSolanaTransactionArgs): Promise<string | null | undefined>;
135
137
  getEnsAddress(value: string): Promise<string | false | undefined>;
136
138
  getEnsAvatar(value: string): Promise<string | false | undefined>;
137
139
  checkInstalled(ids?: string[]): boolean;
@@ -1,4 +1,4 @@
1
- import { type ChainNamespace } from '@reown/appkit-common';
1
+ import { type CaipAddress, type ChainNamespace } from '@reown/appkit-common';
2
2
  import type { AuthConnector, Connector, ConnectorWithProviders, WcWallet } from '../utils/TypeUtil.js';
3
3
  export interface ConnectorControllerState {
4
4
  allConnectors: Connector[];
@@ -9,6 +9,9 @@ export interface ConnectorControllerState {
9
9
  activeConnectorIds: Record<ChainNamespace, string | undefined>;
10
10
  }
11
11
  type StateKey = keyof ConnectorControllerState;
12
+ export interface ConnectParameters {
13
+ namespace?: ChainNamespace;
14
+ }
12
15
  export declare const ConnectorController: {
13
16
  state: ConnectorControllerState;
14
17
  subscribe(callback: (value: ConnectorControllerState) => void): () => void;
@@ -29,11 +32,11 @@ export declare const ConnectorController: {
29
32
  addConnector(connector: Connector | AuthConnector): void;
30
33
  getAuthConnector(chainNamespace?: ChainNamespace): AuthConnector | undefined;
31
34
  getAnnouncedConnectorRdns(): (string | undefined)[];
32
- getConnectorById(id: string): Connector | undefined;
35
+ getConnectorById(id: string): ConnectorWithProviders | undefined;
33
36
  getConnector({ id, namespace }: {
34
37
  id: string;
35
38
  namespace: ChainNamespace;
36
- }): Connector | undefined;
39
+ }): ConnectorWithProviders | undefined;
37
40
  syncIfAuthConnector(connector: Connector | AuthConnector): void;
38
41
  /**
39
42
  * Returns the connectors filtered by namespace.
@@ -60,5 +63,13 @@ export declare const ConnectorController: {
60
63
  isConnected(namespace?: ChainNamespace): boolean;
61
64
  resetConnectorIds(): void;
62
65
  extendConnectorsWithExplorerWallets(explorerWallets: WcWallet[]): void;
66
+ /**
67
+ * Opens the connect modal and waits until the user connects their wallet.
68
+ * @param params - Connection parameters.
69
+ * @returns Promise resolving to the connected wallet's CAIP address.
70
+ */
71
+ connect(params?: ConnectParameters): Promise<{
72
+ caipAddress: CaipAddress;
73
+ }>;
63
74
  };
64
75
  export {};
@@ -1726,7 +1726,7 @@ export declare const OptionsController: {
1726
1726
  */
1727
1727
  | undefined;
1728
1728
  readonly defaultAccountTypes: {
1729
- readonly eip155?: "eoa" | "smartAccount" | undefined;
1729
+ readonly eip155?: "smartAccount" | "eoa" | undefined;
1730
1730
  readonly solana?: "eoa" | undefined;
1731
1731
  readonly bip122?: "payment" | "ordinal" | "stx" | undefined;
1732
1732
  readonly polkadot?: "eoa" | undefined;
@@ -17,7 +17,7 @@ type TransactionAction = {
17
17
  onError?: () => void;
18
18
  };
19
19
  export interface RouterControllerState {
20
- view: 'Account' | 'AccountSettings' | 'AllWallets' | 'ApproveTransaction' | 'BuyInProgress' | 'WalletCompatibleNetworks' | 'ChooseAccountName' | 'Connect' | 'Create' | 'ConnectingExternal' | 'ConnectingFarcaster' | 'ConnectingWalletConnect' | 'ConnectingWalletConnectBasic' | 'ConnectingSiwe' | 'ConnectingSocial' | 'ConnectSocials' | 'ConnectWallets' | 'DataCapture' | 'DataCaptureOtpConfirm' | 'Downloads' | 'EmailLogin' | 'EmailVerifyOtp' | 'EmailVerifyDevice' | 'GetWallet' | 'Networks' | 'OnRampFiatSelect' | 'OnRampProviders' | 'OnRampTokenSelect' | 'ProfileWallets' | 'RegisterAccountName' | 'RegisterAccountNameSuccess' | 'SwitchNetwork' | 'Transactions' | 'UnsupportedChain' | 'UpdateEmailWallet' | 'UpdateEmailPrimaryOtp' | 'UpdateEmailSecondaryOtp' | 'UpgradeEmailWallet' | 'WalletReceive' | 'WalletSend' | 'WalletSendPreview' | 'WalletSendSelectToken' | 'WalletSendConfirmed' | 'WhatIsANetwork' | 'WhatIsAWallet' | 'WhatIsABuy' | 'Swap' | 'SwapSelectToken' | 'SwapPreview' | 'ConnectingMultiChain' | 'SwitchActiveChain' | 'SmartSessionCreated' | 'SmartSessionList' | 'SIWXSignMessage' | 'Pay' | 'PayLoading' | 'FundWallet' | 'PayWithExchange' | 'PayWithExchangeSelectAsset' | 'UsageExceeded' | 'SmartAccountSettings';
20
+ view: 'Account' | 'AccountSettings' | 'AllWallets' | 'ApproveTransaction' | 'BuyInProgress' | 'WalletCompatibleNetworks' | 'ChooseAccountName' | 'Connect' | 'Create' | 'ConnectingExternal' | 'ConnectingFarcaster' | 'ConnectingWalletConnect' | 'ConnectingWalletConnectBasic' | 'ConnectingSiwe' | 'ConnectingSocial' | 'ConnectSocials' | 'ConnectWallets' | 'DataCapture' | 'DataCaptureOtpConfirm' | 'Downloads' | 'EmailLogin' | 'EmailVerifyOtp' | 'EmailVerifyDevice' | 'GetWallet' | 'Networks' | 'OnRampFiatSelect' | 'OnRampProviders' | 'OnRampTokenSelect' | 'ProfileWallets' | 'RegisterAccountName' | 'RegisterAccountNameSuccess' | 'SwitchNetwork' | 'Transactions' | 'UnsupportedChain' | 'UpdateEmailWallet' | 'UpdateEmailPrimaryOtp' | 'UpdateEmailSecondaryOtp' | 'UpgradeEmailWallet' | 'WalletReceive' | 'WalletSend' | 'WalletSendPreview' | 'WalletSendSelectToken' | 'WalletSendConfirmed' | 'WhatIsANetwork' | 'WhatIsAWallet' | 'WhatIsABuy' | 'Swap' | 'SwapSelectToken' | 'SwapPreview' | 'ConnectingMultiChain' | 'SwitchActiveChain' | 'SmartSessionCreated' | 'SmartSessionList' | 'SIWXSignMessage' | 'Pay' | 'PayLoading' | 'PayQuote' | 'FundWallet' | 'PayWithExchange' | 'PayWithExchangeSelectAsset' | 'UsageExceeded' | 'SmartAccountSettings';
21
21
  history: RouterControllerState['view'][];
22
22
  data?: {
23
23
  connector?: Connector;
@@ -2,10 +2,17 @@ import type { CaipNetwork, ChainNamespace } from '@reown/appkit-common';
2
2
  import type { Connector, WcWallet } from './TypeUtil.js';
3
3
  export interface AssetUtilState {
4
4
  networkImagePromises: Record<string, Promise<void>>;
5
+ tokenImagePromises: Record<string, Promise<void>>;
5
6
  }
6
7
  export declare const AssetUtil: {
7
8
  fetchWalletImage(imageId?: string): Promise<string | undefined>;
8
9
  fetchNetworkImage(imageId?: string): Promise<string | undefined>;
10
+ /**
11
+ * Fetches the token image for the given image ID.
12
+ * @param imageId - The image id of the token.
13
+ * @returns The token image.
14
+ */
15
+ fetchTokenImage(imageId?: string): Promise<string | undefined>;
9
16
  getWalletImageById(imageId?: string): string | undefined;
10
17
  getWalletImage(wallet?: WcWallet): string | undefined;
11
18
  getNetworkImage(network?: CaipNetwork): string | undefined;
@@ -31,4 +38,11 @@ export declare const AssetUtil: {
31
38
  * @returns The image URL for the chain namespace.
32
39
  */
33
40
  getChainNamespaceImageUrl(chainNamespace: ChainNamespace): string;
41
+ /**
42
+ * Get the image id for the given token and namespace.
43
+ * @param token - The token address or 'native' to get the image id for.
44
+ * @param namespace - The namespace to get the image id for.
45
+ * @returns The image URL for the token.
46
+ */
47
+ getImageByToken(token: string, namespace: ChainNamespace): Promise<string | undefined>;
34
48
  };
@@ -5,6 +5,11 @@ interface FetchER20BalanceParams {
5
5
  assetAddress: string;
6
6
  caipNetwork: CaipNetwork;
7
7
  }
8
+ interface GetMyTokensWithBalanceParams {
9
+ forceUpdate?: string;
10
+ caipNetwork?: CaipNetwork;
11
+ address?: string;
12
+ }
8
13
  export declare const BalanceUtil: {
9
14
  /**
10
15
  * Get the balances of the user's tokens. If user connected with Auth provider or and on the EIP155 network,
@@ -12,7 +17,7 @@ export declare const BalanceUtil: {
12
17
  * @param forceUpdate - If true, the balances will be fetched from the server
13
18
  * @returns The balances of the user's tokens
14
19
  */
15
- getMyTokensWithBalance(forceUpdate?: string): Promise<BlockchainApiBalanceResponse["balances"]>;
20
+ getMyTokensWithBalance(params?: GetMyTokensWithBalanceParams): Promise<BlockchainApiBalanceResponse["balances"]>;
16
21
  /**
17
22
  * Get the balances of the user's tokens on the EIP155 network using native `wallet_getAssets` and `wallet_getCapabilities` calls
18
23
  * @param address - The address of the user
@@ -12,12 +12,18 @@ export declare function getChainsToDisconnect(namespace?: ChainNamespace): [Chai
12
12
  * @returns The active network token address
13
13
  */
14
14
  export declare function getActiveNetworkTokenAddress(): string;
15
+ /**
16
+ * Get the native token address for a given namespace
17
+ * @param namespace - The namespace of the native token
18
+ * @returns The native token address
19
+ */
20
+ export declare function getNativeTokenAddress(namespace: ChainNamespace): "So11111111111111111111111111111111111111111" | "0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee" | "0x";
15
21
  /**
16
22
  * Get the preferred account type for a given namespace
17
23
  * @param namespace - The namespace of the account
18
24
  * @returns The preferred account type
19
25
  */
20
- export declare function getPreferredAccountType(namespace: ChainNamespace | undefined): "eoa" | "smartAccount" | "payment" | "ordinal" | "stx" | undefined;
26
+ export declare function getPreferredAccountType(namespace: ChainNamespace | undefined): "payment" | "ordinal" | "stx" | "smartAccount" | "eoa" | undefined;
21
27
  /**
22
28
  * Get the active CAIP network for a given chain namespace, if no namespace is provided, it returns the active CAIP network
23
29
  * @param chainNamespace - The chain namespace to get the active CAIP network for
@@ -33,6 +33,22 @@ export declare const ConnectorUtil: {
33
33
  */
34
34
  getConnectorTypeOrder({ recommended, featured, custom, recent, announced, injected, multiChain, external, overriddenConnectors }: GetConnectorTypeOrderParameters): string[];
35
35
  sortConnectorsByExplorerWallet(connectors: ConnectorWithProviders[]): ConnectorWithProviders[];
36
+ /**
37
+ * Returns the priority of a connector. Base Account has highest priority, followed by Coinbase then the rest.
38
+ *
39
+ * This is needed because Base Account and Coinbase share the same explorer wallet ID.
40
+ * Without prioritization, selecting Base Account could incorrectly trigger the Coinbase Wallet extension.
41
+ *
42
+ * @param connector - The connector to get the priority of.
43
+ * @returns The priority of the connector.
44
+ */
45
+ getPriority(connector: ConnectorWithProviders): 1 | 0 | 2;
46
+ /**
47
+ * Sorts connectors by priority.
48
+ * @param connectors - The connectors to sort.
49
+ * @returns Sorted connectors.
50
+ */
51
+ sortConnectorsByPriority(connectors: ConnectorWithProviders[]): ConnectorWithProviders[];
36
52
  getAuthName({ email, socialUsername, socialProvider }: {
37
53
  email: string;
38
54
  socialUsername?: string | null;
@@ -76,7 +76,7 @@ export declare const ConstantsUtil: {
76
76
  receive: true;
77
77
  send: true;
78
78
  emailShowWallets: true;
79
- connectorTypeOrder: ("custom" | "walletConnect" | "recent" | "injected" | "featured" | "external" | "recommended")[];
79
+ connectorTypeOrder: ("walletConnect" | "recent" | "injected" | "featured" | "custom" | "external" | "recommended")[];
80
80
  analytics: true;
81
81
  allWallets: true;
82
82
  legalCheckbox: false;
@@ -65,5 +65,6 @@ export declare const CoreHelperUtil: {
65
65
  isMac(): boolean;
66
66
  formatTelegramSocialLoginUrl(url: string): string;
67
67
  injectIntoUrl(url: string, key: string, appendString: string): string;
68
+ isNumber(value: unknown): boolean;
68
69
  };
69
70
  export {};
@@ -227,6 +227,7 @@ export interface BlockchainApiSwapQuoteResponse {
227
227
  }[];
228
228
  }
229
229
  export interface BlockchainApiTokenPriceRequest {
230
+ caipNetworkId?: CaipNetworkId;
230
231
  currency?: 'usd' | 'eur' | 'gbp' | 'aud' | 'cad' | 'inr' | 'jpy' | 'btc' | 'eth';
231
232
  addresses: string[];
232
233
  }
@@ -1002,6 +1003,17 @@ export type EstimateGasTransactionArgs = {
1002
1003
  } | {
1003
1004
  chainNamespace: 'solana';
1004
1005
  };
1006
+ export type SolanaTransactionRequest = {
1007
+ instructions: Array<{
1008
+ keys: Array<{
1009
+ pubkey: string;
1010
+ isSigner: boolean;
1011
+ isWritable: boolean;
1012
+ }>;
1013
+ programId: string;
1014
+ data: string;
1015
+ }>;
1016
+ };
1005
1017
  export interface WriteContractArgs {
1006
1018
  tokenAddress: Address;
1007
1019
  fromAddress: Address;
@@ -1010,6 +1022,7 @@ export interface WriteContractArgs {
1010
1022
  args: unknown[];
1011
1023
  chainNamespace: ChainNamespace;
1012
1024
  }
1025
+ export type WriteSolanaTransactionArgs = SolanaTransactionRequest;
1013
1026
  export type AdapterNetworkState = {
1014
1027
  supportsAllNetworks: boolean;
1015
1028
  isUnsupportedChain?: boolean;
@@ -308,8 +308,8 @@ export declare const ViemUtil: {
308
308
  getBlobBaseFee: () => Promise<import("viem").GetBlobBaseFeeReturnType>;
309
309
  getBlock: <includeTransactions extends boolean = false, blockTag extends import("viem").BlockTag = "latest">(args?: import("viem").GetBlockParameters<includeTransactions, blockTag> | undefined) => Promise<{
310
310
  number: blockTag extends "pending" ? null : bigint;
311
- hash: blockTag extends "pending" ? null : `0x${string}`;
312
311
  timestamp: bigint;
312
+ hash: blockTag extends "pending" ? null : `0x${string}`;
313
313
  nonce: blockTag extends "pending" ? null : `0x${string}`;
314
314
  logsBloom: blockTag extends "pending" ? null : `0x${string}`;
315
315
  baseFeePerGas: bigint | null;
@@ -335,23 +335,23 @@ export declare const ViemUtil: {
335
335
  withdrawalsRoot?: `0x${string}` | undefined;
336
336
  transactions: includeTransactions extends true ? ({
337
337
  value: bigint;
338
+ chainId?: number | undefined;
338
339
  type: "legacy";
340
+ from: import("viem").Address;
341
+ to: import("viem").Address | null;
342
+ gasPrice: bigint;
339
343
  hash: import("viem").Hash;
340
344
  input: import("viem").Hex;
341
- chainId?: number | undefined;
342
- yParity?: undefined | undefined;
343
- from: import("viem").Address;
344
345
  gas: bigint;
346
+ yParity?: undefined | undefined;
345
347
  nonce: number;
346
348
  r: import("viem").Hex;
347
349
  s: import("viem").Hex;
348
- to: import("viem").Address | null;
349
350
  typeHex: import("viem").Hex | null;
350
351
  v: bigint;
351
352
  accessList?: undefined | undefined;
352
353
  authorizationList?: undefined | undefined;
353
354
  blobVersionedHashes?: undefined | undefined;
354
- gasPrice: bigint;
355
355
  maxFeePerBlobGas?: undefined | undefined;
356
356
  maxFeePerGas?: undefined | undefined;
357
357
  maxPriorityFeePerGas?: undefined | undefined;
@@ -360,23 +360,23 @@ export declare const ViemUtil: {
360
360
  transactionIndex: (blockTag extends "pending" ? true : false) extends infer T_2 ? T_2 extends (blockTag extends "pending" ? true : false) ? T_2 extends true ? null : number : never : never;
361
361
  } | {
362
362
  value: bigint;
363
+ chainId: number;
363
364
  type: "eip2930";
365
+ from: import("viem").Address;
366
+ to: import("viem").Address | null;
367
+ gasPrice: bigint;
364
368
  hash: import("viem").Hash;
365
369
  input: import("viem").Hex;
366
- chainId: number;
367
- yParity: number;
368
- from: import("viem").Address;
369
370
  gas: bigint;
371
+ yParity: number;
370
372
  nonce: number;
371
373
  r: import("viem").Hex;
372
374
  s: import("viem").Hex;
373
- to: import("viem").Address | null;
374
375
  typeHex: import("viem").Hex | null;
375
376
  v: bigint;
376
377
  accessList: import("viem").AccessList;
377
378
  authorizationList?: undefined | undefined;
378
379
  blobVersionedHashes?: undefined | undefined;
379
- gasPrice: bigint;
380
380
  maxFeePerBlobGas?: undefined | undefined;
381
381
  maxFeePerGas?: undefined | undefined;
382
382
  maxPriorityFeePerGas?: undefined | undefined;
@@ -385,23 +385,23 @@ export declare const ViemUtil: {
385
385
  transactionIndex: (blockTag extends "pending" ? true : false) extends infer T_5 ? T_5 extends (blockTag extends "pending" ? true : false) ? T_5 extends true ? null : number : never : never;
386
386
  } | {
387
387
  value: bigint;
388
+ chainId: number;
388
389
  type: "eip1559";
390
+ from: import("viem").Address;
391
+ to: import("viem").Address | null;
392
+ gasPrice?: undefined | undefined;
389
393
  hash: import("viem").Hash;
390
394
  input: import("viem").Hex;
391
- chainId: number;
392
- yParity: number;
393
- from: import("viem").Address;
394
395
  gas: bigint;
396
+ yParity: number;
395
397
  nonce: number;
396
398
  r: import("viem").Hex;
397
399
  s: import("viem").Hex;
398
- to: import("viem").Address | null;
399
400
  typeHex: import("viem").Hex | null;
400
401
  v: bigint;
401
402
  accessList: import("viem").AccessList;
402
403
  authorizationList?: undefined | undefined;
403
404
  blobVersionedHashes?: undefined | undefined;
404
- gasPrice?: undefined | undefined;
405
405
  maxFeePerBlobGas?: undefined | undefined;
406
406
  maxFeePerGas: bigint;
407
407
  maxPriorityFeePerGas: bigint;
@@ -410,23 +410,23 @@ export declare const ViemUtil: {
410
410
  transactionIndex: (blockTag extends "pending" ? true : false) extends infer T_8 ? T_8 extends (blockTag extends "pending" ? true : false) ? T_8 extends true ? null : number : never : never;
411
411
  } | {
412
412
  value: bigint;
413
+ chainId: number;
413
414
  type: "eip4844";
415
+ from: import("viem").Address;
416
+ to: import("viem").Address | null;
417
+ gasPrice?: undefined | undefined;
414
418
  hash: import("viem").Hash;
415
419
  input: import("viem").Hex;
416
- chainId: number;
417
- yParity: number;
418
- from: import("viem").Address;
419
420
  gas: bigint;
421
+ yParity: number;
420
422
  nonce: number;
421
423
  r: import("viem").Hex;
422
424
  s: import("viem").Hex;
423
- to: import("viem").Address | null;
424
425
  typeHex: import("viem").Hex | null;
425
426
  v: bigint;
426
427
  accessList: import("viem").AccessList;
427
428
  authorizationList?: undefined | undefined;
428
429
  blobVersionedHashes: readonly import("viem").Hex[];
429
- gasPrice?: undefined | undefined;
430
430
  maxFeePerBlobGas: bigint;
431
431
  maxFeePerGas: bigint;
432
432
  maxPriorityFeePerGas: bigint;
@@ -435,23 +435,23 @@ export declare const ViemUtil: {
435
435
  transactionIndex: (blockTag extends "pending" ? true : false) extends infer T_11 ? T_11 extends (blockTag extends "pending" ? true : false) ? T_11 extends true ? null : number : never : never;
436
436
  } | {
437
437
  value: bigint;
438
+ chainId: number;
438
439
  type: "eip7702";
440
+ from: import("viem").Address;
441
+ to: import("viem").Address | null;
442
+ gasPrice?: undefined | undefined;
439
443
  hash: import("viem").Hash;
440
444
  input: import("viem").Hex;
441
- chainId: number;
442
- yParity: number;
443
- from: import("viem").Address;
444
445
  gas: bigint;
446
+ yParity: number;
445
447
  nonce: number;
446
448
  r: import("viem").Hex;
447
449
  s: import("viem").Hex;
448
- to: import("viem").Address | null;
449
450
  typeHex: import("viem").Hex | null;
450
451
  v: bigint;
451
452
  accessList: import("viem").AccessList;
452
453
  authorizationList: import("viem").SignedAuthorizationList;
453
454
  blobVersionedHashes?: undefined | undefined;
454
- gasPrice?: undefined | undefined;
455
455
  maxFeePerBlobGas?: undefined | undefined;
456
456
  maxFeePerGas: bigint;
457
457
  maxPriorityFeePerGas: bigint;
@@ -539,23 +539,23 @@ export declare const ViemUtil: {
539
539
  getStorageAt: (args: import("viem").GetStorageAtParameters) => Promise<import("viem").GetStorageAtReturnType>;
540
540
  getTransaction: <blockTag extends import("viem").BlockTag = "latest">(args: import("viem").GetTransactionParameters<blockTag>) => Promise<{
541
541
  value: bigint;
542
+ chainId?: number | undefined;
542
543
  type: "legacy";
544
+ from: import("viem").Address;
545
+ to: import("viem").Address | null;
546
+ gasPrice: bigint;
543
547
  hash: import("viem").Hash;
544
548
  input: import("viem").Hex;
545
- chainId?: number | undefined;
546
- yParity?: undefined | undefined;
547
- from: import("viem").Address;
548
549
  gas: bigint;
550
+ yParity?: undefined | undefined;
549
551
  nonce: number;
550
552
  r: import("viem").Hex;
551
553
  s: import("viem").Hex;
552
- to: import("viem").Address | null;
553
554
  typeHex: import("viem").Hex | null;
554
555
  v: bigint;
555
556
  accessList?: undefined | undefined;
556
557
  authorizationList?: undefined | undefined;
557
558
  blobVersionedHashes?: undefined | undefined;
558
- gasPrice: bigint;
559
559
  maxFeePerBlobGas?: undefined | undefined;
560
560
  maxFeePerGas?: undefined | undefined;
561
561
  maxPriorityFeePerGas?: undefined | undefined;
@@ -564,23 +564,23 @@ export declare const ViemUtil: {
564
564
  transactionIndex: (blockTag extends "pending" ? true : false) extends infer T_2 ? T_2 extends (blockTag extends "pending" ? true : false) ? T_2 extends true ? null : number : never : never;
565
565
  } | {
566
566
  value: bigint;
567
+ chainId: number;
567
568
  type: "eip2930";
569
+ from: import("viem").Address;
570
+ to: import("viem").Address | null;
571
+ gasPrice: bigint;
568
572
  hash: import("viem").Hash;
569
573
  input: import("viem").Hex;
570
- chainId: number;
571
- yParity: number;
572
- from: import("viem").Address;
573
574
  gas: bigint;
575
+ yParity: number;
574
576
  nonce: number;
575
577
  r: import("viem").Hex;
576
578
  s: import("viem").Hex;
577
- to: import("viem").Address | null;
578
579
  typeHex: import("viem").Hex | null;
579
580
  v: bigint;
580
581
  accessList: import("viem").AccessList;
581
582
  authorizationList?: undefined | undefined;
582
583
  blobVersionedHashes?: undefined | undefined;
583
- gasPrice: bigint;
584
584
  maxFeePerBlobGas?: undefined | undefined;
585
585
  maxFeePerGas?: undefined | undefined;
586
586
  maxPriorityFeePerGas?: undefined | undefined;
@@ -589,23 +589,23 @@ export declare const ViemUtil: {
589
589
  transactionIndex: (blockTag extends "pending" ? true : false) extends infer T_5 ? T_5 extends (blockTag extends "pending" ? true : false) ? T_5 extends true ? null : number : never : never;
590
590
  } | {
591
591
  value: bigint;
592
+ chainId: number;
592
593
  type: "eip1559";
594
+ from: import("viem").Address;
595
+ to: import("viem").Address | null;
596
+ gasPrice?: undefined | undefined;
593
597
  hash: import("viem").Hash;
594
598
  input: import("viem").Hex;
595
- chainId: number;
596
- yParity: number;
597
- from: import("viem").Address;
598
599
  gas: bigint;
600
+ yParity: number;
599
601
  nonce: number;
600
602
  r: import("viem").Hex;
601
603
  s: import("viem").Hex;
602
- to: import("viem").Address | null;
603
604
  typeHex: import("viem").Hex | null;
604
605
  v: bigint;
605
606
  accessList: import("viem").AccessList;
606
607
  authorizationList?: undefined | undefined;
607
608
  blobVersionedHashes?: undefined | undefined;
608
- gasPrice?: undefined | undefined;
609
609
  maxFeePerBlobGas?: undefined | undefined;
610
610
  maxFeePerGas: bigint;
611
611
  maxPriorityFeePerGas: bigint;
@@ -614,23 +614,23 @@ export declare const ViemUtil: {
614
614
  transactionIndex: (blockTag extends "pending" ? true : false) extends infer T_8 ? T_8 extends (blockTag extends "pending" ? true : false) ? T_8 extends true ? null : number : never : never;
615
615
  } | {
616
616
  value: bigint;
617
+ chainId: number;
617
618
  type: "eip4844";
619
+ from: import("viem").Address;
620
+ to: import("viem").Address | null;
621
+ gasPrice?: undefined | undefined;
618
622
  hash: import("viem").Hash;
619
623
  input: import("viem").Hex;
620
- chainId: number;
621
- yParity: number;
622
- from: import("viem").Address;
623
624
  gas: bigint;
625
+ yParity: number;
624
626
  nonce: number;
625
627
  r: import("viem").Hex;
626
628
  s: import("viem").Hex;
627
- to: import("viem").Address | null;
628
629
  typeHex: import("viem").Hex | null;
629
630
  v: bigint;
630
631
  accessList: import("viem").AccessList;
631
632
  authorizationList?: undefined | undefined;
632
633
  blobVersionedHashes: readonly import("viem").Hex[];
633
- gasPrice?: undefined | undefined;
634
634
  maxFeePerBlobGas: bigint;
635
635
  maxFeePerGas: bigint;
636
636
  maxPriorityFeePerGas: bigint;
@@ -639,23 +639,23 @@ export declare const ViemUtil: {
639
639
  transactionIndex: (blockTag extends "pending" ? true : false) extends infer T_11 ? T_11 extends (blockTag extends "pending" ? true : false) ? T_11 extends true ? null : number : never : never;
640
640
  } | {
641
641
  value: bigint;
642
+ chainId: number;
642
643
  type: "eip7702";
644
+ from: import("viem").Address;
645
+ to: import("viem").Address | null;
646
+ gasPrice?: undefined | undefined;
643
647
  hash: import("viem").Hash;
644
648
  input: import("viem").Hex;
645
- chainId: number;
646
- yParity: number;
647
- from: import("viem").Address;
648
649
  gas: bigint;
650
+ yParity: number;
649
651
  nonce: number;
650
652
  r: import("viem").Hex;
651
653
  s: import("viem").Hex;
652
- to: import("viem").Address | null;
653
654
  typeHex: import("viem").Hex | null;
654
655
  v: bigint;
655
656
  accessList: import("viem").AccessList;
656
657
  authorizationList: import("viem").SignedAuthorizationList;
657
658
  blobVersionedHashes?: undefined | undefined;
658
- gasPrice?: undefined | undefined;
659
659
  maxFeePerBlobGas?: undefined | undefined;
660
660
  maxFeePerGas: bigint;
661
661
  maxPriorityFeePerGas: bigint;
@@ -4243,7 +4243,7 @@ export declare const ViemUtil: {
4243
4243
  authorizationList: import("viem").TransactionSerializableEIP7702["authorizationList"];
4244
4244
  } ? "eip7702" : never) | (request["type"] extends string | undefined ? Extract<request["type"], string> : never)>) ? T_25 extends "eip7702" ? import("viem").TransactionRequestEIP7702 : never : never : never)>> & {
4245
4245
  chainId?: number | undefined;
4246
- }, (request["parameters"] extends readonly import("viem").PrepareTransactionRequestParameterType[] ? request["parameters"][number] : "fees" | "type" | "chainId" | "gas" | "nonce" | "blobVersionedHashes") extends infer T_26 ? T_26 extends (request["parameters"] extends readonly import("viem").PrepareTransactionRequestParameterType[] ? request["parameters"][number] : "fees" | "type" | "chainId" | "gas" | "nonce" | "blobVersionedHashes") ? T_26 extends "fees" ? "gasPrice" | "maxFeePerGas" | "maxPriorityFeePerGas" : T_26 : never : never> & (unknown extends request["kzg"] ? {} : Pick<request, "kzg">) extends infer T ? { [K in keyof T]: (import("viem").UnionRequiredBy<Extract<import("viem").UnionOmit<import("viem").ExtractChainFormatterParameters<import("viem").DeriveChain<{
4246
+ }, (request["parameters"] extends readonly import("viem").PrepareTransactionRequestParameterType[] ? request["parameters"][number] : "fees" | "chainId" | "type" | "gas" | "nonce" | "blobVersionedHashes") extends infer T_26 ? T_26 extends (request["parameters"] extends readonly import("viem").PrepareTransactionRequestParameterType[] ? request["parameters"][number] : "fees" | "chainId" | "type" | "gas" | "nonce" | "blobVersionedHashes") ? T_26 extends "fees" ? "gasPrice" | "maxFeePerGas" | "maxPriorityFeePerGas" : T_26 : never : never> & (unknown extends request["kzg"] ? {} : Pick<request, "kzg">) extends infer T ? { [K in keyof T]: (import("viem").UnionRequiredBy<Extract<import("viem").UnionOmit<import("viem").ExtractChainFormatterParameters<import("viem").DeriveChain<{
4247
4247
  blockExplorers?: {
4248
4248
  [key: string]: {
4249
4249
  name: string;
@@ -7657,7 +7657,7 @@ export declare const ViemUtil: {
7657
7657
  authorizationList: import("viem").TransactionSerializableEIP7702["authorizationList"];
7658
7658
  } ? "eip7702" : never) | (request["type"] extends string | undefined ? Extract<request["type"], string> : never)>) ? T_12 extends "eip7702" ? import("viem").TransactionRequestEIP7702 : never : never : never)>> & {
7659
7659
  chainId?: number | undefined;
7660
- }, (request["parameters"] extends readonly import("viem").PrepareTransactionRequestParameterType[] ? request["parameters"][number] : "fees" | "type" | "chainId" | "gas" | "nonce" | "blobVersionedHashes") extends infer T_13 ? T_13 extends (request["parameters"] extends readonly import("viem").PrepareTransactionRequestParameterType[] ? request["parameters"][number] : "fees" | "type" | "chainId" | "gas" | "nonce" | "blobVersionedHashes") ? T_13 extends "fees" ? "gasPrice" | "maxFeePerGas" | "maxPriorityFeePerGas" : T_13 : never : never> & (unknown extends request["kzg"] ? {} : Pick<request, "kzg">))[K]; } : never>;
7660
+ }, (request["parameters"] extends readonly import("viem").PrepareTransactionRequestParameterType[] ? request["parameters"][number] : "fees" | "chainId" | "type" | "gas" | "nonce" | "blobVersionedHashes") extends infer T_13 ? T_13 extends (request["parameters"] extends readonly import("viem").PrepareTransactionRequestParameterType[] ? request["parameters"][number] : "fees" | "chainId" | "type" | "gas" | "nonce" | "blobVersionedHashes") ? T_13 extends "fees" ? "gasPrice" | "maxFeePerGas" | "maxPriorityFeePerGas" : T_13 : never : never> & (unknown extends request["kzg"] ? {} : Pick<request, "kzg">))[K]; } : never>;
7661
7661
  readContract: <const abi extends import("viem").Abi | readonly unknown[], functionName extends import("viem").ContractFunctionName<abi, "pure" | "view">, const args extends import("viem").ContractFunctionArgs<abi, "pure" | "view", functionName>>(args: import("viem").ReadContractParameters<abi, functionName, args>) => Promise<import("viem").ReadContractReturnType<abi, functionName, args>>;
7662
7662
  sendRawTransaction: (args: import("viem").SendRawTransactionParameters) => Promise<import("viem").SendRawTransactionReturnType>;
7663
7663
  simulate: <const calls extends readonly unknown[]>(args: import("viem").SimulateBlocksParameters<calls>) => Promise<import("viem").SimulateBlocksReturnType<calls>>;
@@ -0,0 +1 @@
1
+ export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@reown/appkit-controllers",
3
- "version": "1.8.15",
3
+ "version": "1.8.16",
4
4
  "sideEffects": false,
5
5
  "type": "module",
6
6
  "main": "./dist/esm/exports/index.js",
@@ -53,11 +53,11 @@
53
53
  }
54
54
  },
55
55
  "dependencies": {
56
- "@walletconnect/universal-provider": "2.23.0",
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.15",
60
- "@reown/appkit-wallet": "1.8.15"
59
+ "@reown/appkit-common": "1.8.16",
60
+ "@reown/appkit-wallet": "1.8.16"
61
61
  },
62
62
  "devDependencies": {
63
63
  "@vitest/coverage-v8": "2.1.9",
@@ -67,7 +67,7 @@
67
67
  "@types/react-dom": "19.1.9",
68
68
  "react": "19.1.2",
69
69
  "react-dom": "19.1.2",
70
- "@walletconnect/types": "2.23.0"
70
+ "@walletconnect/types": "2.23.1"
71
71
  },
72
72
  "author": "Reown (https://discord.gg/reown)",
73
73
  "license": "SEE LICENSE IN LICENSE.md",