@ledgerhq/connect-kit 1.0.2 → 1.0.4

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,4 +1,3 @@
1
- import WalletConnectProvider from "@walletconnect/ethereum-provider/dist/esm";
2
1
  import { EthereumProvider } from "../providers/Ethereum";
3
2
  import { SolanaProvider } from "../providers/Solana";
4
3
  export declare enum ConnectSupportedChains {
@@ -13,7 +12,7 @@ export declare enum SupportedProviderImplementations {
13
12
  LedgerConnect = "LedgerConnect",
14
13
  WalletConnect = "WalletConnect"
15
14
  }
16
- export type ProviderResult = EthereumProvider | SolanaProvider | WalletConnectProvider;
15
+ export type ProviderResult = EthereumProvider | SolanaProvider;
17
16
  export declare function setProviderType(providerType: SupportedProviders): void;
18
17
  export declare function setProviderImplementation(providerImplementation: SupportedProviderImplementations): void;
19
18
  export declare function getProvider(): Promise<ProviderResult>;
@@ -1,4 +1,3 @@
1
- import { ProviderResult } from "../lib/provider";
2
1
  export declare const LEDGER_ETHEREUM_PROVIDER = "ethereum";
3
2
  export declare const LEDGER_CONNECT_ETHEREUM_PROP = "isLedgerConnect";
4
3
  export type EthereumRequestPayload = {
@@ -7,7 +6,7 @@ export type EthereumRequestPayload = {
7
6
  };
8
7
  export interface EthereumProvider {
9
8
  providers?: EthereumProvider[];
10
- request(payload: EthereumRequestPayload): Promise<unknown>;
9
+ request<T = unknown>(args: EthereumRequestPayload): Promise<T>;
11
10
  disconnect?: {
12
11
  (): Promise<void>;
13
12
  };
@@ -18,4 +17,4 @@ export interface EthereumProvider {
18
17
  export interface LedgerConnectProvider extends EthereumProvider {
19
18
  [LEDGER_CONNECT_ETHEREUM_PROP]: boolean;
20
19
  }
21
- export declare function getEthereumProvider(): ProviderResult;
20
+ export declare function getEthereumProvider(): EthereumProvider;
@@ -7,6 +7,7 @@ export interface initWalletConnectProviderOptions {
7
7
  [chainId: number]: string;
8
8
  };
9
9
  }
10
- export declare function initWalletConnectProvider(options: initWalletConnectProviderOptions): void;
10
+ export declare function setWalletConnectOptions(options: initWalletConnectProviderOptions): void;
11
+ export declare function initWalletConnectProvider(): Promise<void>;
11
12
  export declare function isWalletConnectProviderConnected(): boolean;
12
13
  export declare function getWalletConnectProvider(): Promise<EthereumProvider>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ledgerhq/connect-kit",
3
- "version": "1.0.2",
3
+ "version": "1.0.4",
4
4
  "description": "A library for dapps to integrate with Ledger Connect and Ledger Live",
5
5
  "author": "Hugo Lopes",
6
6
  "license": "MIT",