@ledgerhq/connect-kit 1.1.0-beta.2 → 1.1.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,9 +1,8 @@
1
- import type { CoreTypes } from '@walletconnect/types';
2
1
  import { WalletConnectProviderOptions } from "../providers/WalletConnectEvm";
3
2
  import { WalletConnectLegacyProviderOptions } from '../providers/WalletConnectLegacy';
4
3
  import { SupportedProviders } from "./provider";
5
4
  type CheckSupportCommonOptions = {
6
- version?: number;
5
+ walletConnectVersion?: number;
7
6
  providerType: SupportedProviders;
8
7
  };
9
8
  export type CheckSupportWalletConnectProviderOptions = {
@@ -17,7 +16,6 @@ export type CheckSupportWalletConnectProviderOptions = {
17
16
  rpcMap?: {
18
17
  [chainId: string]: string;
19
18
  };
20
- metadata?: CoreTypes.Metadata;
21
19
  };
22
20
  export type CheckSupportWalletConnectLegacyProviderOptions = {
23
21
  chainId?: number;
@@ -86,8 +86,8 @@ export declare class EthereumProvider implements IEthereumProvider {
86
86
  accounts: string[];
87
87
  signer: InstanceType<typeof UniversalProvider>;
88
88
  chainId: number;
89
- private rpc;
90
- private readonly STORAGE_KEY;
89
+ protected rpc: EthereumRpcConfig;
90
+ protected readonly STORAGE_KEY: string;
91
91
  constructor();
92
92
  static init(opts: EthereumProviderOptions): Promise<EthereumProvider>;
93
93
  request<T = unknown>(args: RequestArguments): Promise<T>;
@@ -103,24 +103,27 @@ export declare class EthereumProvider implements IEthereumProvider {
103
103
  off: IEthereumProviderEvents["off"];
104
104
  get isWalletConnect(): boolean;
105
105
  get session(): any;
106
- private registerEventListeners;
107
- private setHttpProvider;
108
- private isCompatibleChainId;
109
- private formatChainId;
110
- private parseChainId;
111
- private setChainIds;
112
- private setChainId;
113
- private parseAccountId;
114
- private setAccounts;
115
- private getRpcConfig;
116
- private buildRpcMap;
117
- private initialize;
118
- private loadConnectOpts;
119
- private getRpcUrl;
120
- private loadPersistedSession;
121
- private reset;
122
- private persist;
123
- private parseAccounts;
124
- private parseAccount;
106
+ protected registerEventListeners(): void;
107
+ protected setHttpProvider(chainId: number): void;
108
+ protected isCompatibleChainId(chainId: string): boolean;
109
+ protected formatChainId(chainId: number): string;
110
+ protected parseChainId(chainId: string): number;
111
+ protected setChainIds(chains: string[]): void;
112
+ protected setChainId(chain: string): void;
113
+ protected parseAccountId(account: string): {
114
+ chainId: string;
115
+ address: string;
116
+ };
117
+ protected setAccounts(accounts: string[]): void;
118
+ protected getRpcConfig(opts: EthereumProviderOptions): EthereumRpcConfig;
119
+ protected buildRpcMap(chains: number[], projectId: string): EthereumRpcMap;
120
+ protected initialize(opts: EthereumProviderOptions): Promise<void>;
121
+ protected loadConnectOpts(opts?: ConnectOps): void;
122
+ protected getRpcUrl(chainId: number, projectId?: string): string;
123
+ protected loadPersistedSession(): Promise<void>;
124
+ protected reset(): void;
125
+ protected persist(): void;
126
+ protected parseAccounts(payload: string | string[]): string[];
127
+ protected parseAccount: (payload: any) => string;
125
128
  }
126
129
  export default EthereumProvider;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ledgerhq/connect-kit",
3
- "version": "1.1.0-beta.2",
3
+ "version": "1.1.0",
4
4
  "description": "A library for dApps to integrate with the Ledger Extension and Ledger Live",
5
5
  "author": "Ledger SAS <ledger.com>",
6
6
  "license": "MIT",