@reown/appkit-utils 1.6.4 → 1.6.5-rc.0.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,5 @@
1
1
  import type UniversalProvider from '@walletconnect/universal-provider';
2
+ import type { W3mFrameProvider } from '@reown/appkit-wallet';
2
3
  export { ConstantsUtil } from '../src/ConstantsUtil.js';
3
4
  export { PresetsUtil } from '../src/PresetsUtil.js';
4
5
  export { HelpersUtil } from '../src/HelpersUtil.js';
@@ -6,7 +7,6 @@ export { ErrorUtil } from '../src/ErrorUtil.js';
6
7
  export { LoggerUtil } from '../src/LoggerUtil.js';
7
8
  export { CaipNetworksUtil } from '../src/CaipNetworkUtil.js';
8
9
  export type { SocialProvider } from '../src/TypeUtil.js';
9
- import type { W3mFrameProvider } from '@reown/appkit-wallet';
10
10
  export { SocialProviderEnum } from '../src/TypeUtil.js';
11
11
  export interface RequestArguments {
12
12
  readonly method: string;
@@ -1,5 +1,5 @@
1
- import type { Address, CombinedProvider, Provider } from './EthersTypesUtil.js';
2
1
  import type { W3mFrameTypes } from '@reown/appkit-wallet';
2
+ import type { Address, CombinedProvider, Provider } from './EthersTypesUtil.js';
3
3
  export type Status = 'reconnecting' | 'connected' | 'disconnected';
4
4
  export interface EthersStoreUtilState {
5
5
  provider?: Provider | CombinedProvider;
@@ -1,6 +1,6 @@
1
- import type { W3mFrameProvider } from '@reown/appkit-wallet';
2
1
  import type { ProviderInterface } from '@coinbase/wallet-sdk';
3
2
  import type UniversalProvider from '@walletconnect/universal-provider';
3
+ import type { W3mFrameProvider } from '@reown/appkit-wallet';
4
4
  import type { SocialProvider } from '../TypeUtil.js';
5
5
  export interface IEthersConfig {
6
6
  providers: ProviderType;
@@ -1,8 +1,10 @@
1
- import type { Connection as SolanaConnection, PublicKey, Transaction as SolanaWeb3Transaction, TransactionSignature, VersionedTransaction, SendOptions } from '@solana/web3.js';
2
1
  import type { SendTransactionOptions } from '@solana/wallet-adapter-base';
3
- import type { CaipNetwork } from '@reown/appkit-common';
2
+ import type { PublicKey, SendOptions, Connection as SolanaConnection, Transaction as SolanaWeb3Transaction, TransactionSignature, VersionedTransaction } from '@solana/web3.js';
3
+ import UniversalProvider from '@walletconnect/universal-provider';
4
+ import type { CaipNetwork, ChainNamespace } from '@reown/appkit-common';
4
5
  import type { ConnectorType } from '@reown/appkit-core';
5
- import type { W3mFrameTypes } from '@reown/appkit-wallet';
6
+ import type { Provider as CoreProvider } from '@reown/appkit-core';
7
+ import type { W3mFrameProvider, W3mFrameTypes } from '@reown/appkit-wallet';
6
8
  export type Connection = SolanaConnection;
7
9
  export interface ISolConfig {
8
10
  providers: ProviderType;
@@ -20,19 +22,29 @@ export interface RequestArguments {
20
22
  readonly method: string;
21
23
  readonly params?: readonly unknown[] | object;
22
24
  }
23
- export interface Provider extends ProviderEventEmitterMethods {
25
+ export interface Provider extends ProviderEventEmitterMethods, Omit<CoreProvider, 'emit' | 'on' | 'removeListener'> {
26
+ id: string;
24
27
  name: string;
25
- publicKey?: PublicKey;
26
- icon?: string;
27
28
  chains: CaipNetwork[];
28
29
  type: ConnectorType;
29
- connect: () => Promise<string>;
30
+ chain: ChainNamespace;
31
+ publicKey?: PublicKey;
32
+ provider: CoreProvider | W3mFrameProvider | UniversalProvider;
33
+ connect: (params?: {
34
+ chainId?: string;
35
+ onUri?: ((uri: string) => void) | undefined;
36
+ }) => Promise<string>;
30
37
  disconnect: () => Promise<void>;
31
38
  signMessage: (message: Uint8Array) => Promise<Uint8Array>;
32
39
  signTransaction: <T extends AnyTransaction>(transaction: T) => Promise<T>;
33
40
  signAndSendTransaction: (transaction: AnyTransaction, options?: SendOptions) => Promise<TransactionSignature>;
34
41
  sendTransaction: (transaction: AnyTransaction, connection: Connection, options?: SendTransactionOptions) => Promise<TransactionSignature>;
35
42
  signAllTransactions: <T extends AnyTransaction[]>(transactions: T) => Promise<T>;
43
+ getAccounts: () => Promise<{
44
+ namespace: 'solana';
45
+ address: string;
46
+ type: 'eoa';
47
+ }[]>;
36
48
  }
37
49
  export interface ProviderEventEmitterMethods {
38
50
  on: <E extends ProviderEventEmitterMethods.Event>(event: E, listener: (data: ProviderEventEmitterMethods.EventParams[E]) => void) => void;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@reown/appkit-utils",
3
- "version": "1.6.4",
3
+ "version": "1.6.5-rc.0.0",
4
4
  "type": "module",
5
5
  "main": "./dist/esm/exports/index.js",
6
6
  "types": "./dist/types/exports/index.d.ts",
@@ -40,10 +40,10 @@
40
40
  "@walletconnect/universal-provider": "2.17.2",
41
41
  "valtio": "1.11.2",
42
42
  "viem": "2.x",
43
- "@reown/appkit-common": "1.6.4",
44
- "@reown/appkit-core": "1.6.4",
45
- "@reown/appkit-polyfills": "1.6.4",
46
- "@reown/appkit-wallet": "1.6.4"
43
+ "@reown/appkit-common": "1.6.5-rc.0.0",
44
+ "@reown/appkit-core": "1.6.5-rc.0.0",
45
+ "@reown/appkit-wallet": "1.6.5-rc.0.0",
46
+ "@reown/appkit-polyfills": "1.6.5-rc.0.0"
47
47
  },
48
48
  "devDependencies": {
49
49
  "@coinbase/wallet-sdk": "4.2.4",