@ledgerhq/connect-kit 1.0.0 → 1.0.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -7,7 +7,7 @@ declare type DeviceBrowser = {
7
7
  version: string;
8
8
  };
9
9
  declare type DeviceOSName = "Windows Phone" | "Windows" | "macOS" | "iOS" | "Android" | "Linux" | "Chrome OS";
10
- declare type DeviceBrowserName = "Android Browser" | "Chrome" | "Chromium" | "Firefox" | "Microsoft Edge" | "Opera" | "Safari";
10
+ declare type DeviceBrowserName = "Android Browser" | "Chrome" | "Chromium" | "Firefox" | "Microsoft Edge" | "Opera" | "Brave" | "Safari";
11
11
  declare type DeviceType = "desktop" | "mobile" | "tablet";
12
12
  export declare type Device = {
13
13
  os: DeviceOS;
@@ -4,3 +4,8 @@ export declare class ProviderNotFoundError extends Error {
4
4
  export declare class ProviderTypeIsNotSupportedError extends Error {
5
5
  constructor();
6
6
  }
7
+ export declare class UserRejectedRequestError extends Error {
8
+ name: string;
9
+ readonly code: number;
10
+ constructor();
11
+ }
@@ -4,7 +4,6 @@ import { SolanaProvider } from "../providers/Solana";
4
4
  export declare enum ConnectSupportedChains {
5
5
  EthereumMainnet = 1
6
6
  }
7
- export declare function setChainId(chainId: ConnectSupportedChains): void;
8
7
  export declare function isChainIdSupported(chainId: ConnectSupportedChains): boolean;
9
8
  export declare enum SupportedProviders {
10
9
  Ethereum = "Ethereum",
@@ -1,15 +1,19 @@
1
1
  import { ProviderResult } from "../lib/provider";
2
2
  export declare const LEDGER_ETHEREUM_PROVIDER = "ethereum";
3
3
  export declare const LEDGER_CONNECT_ETHEREUM_PROP = "isLedgerConnect";
4
+ export type EthereumRequestPayload = {
5
+ method: string;
6
+ params?: unknown[] | object;
7
+ };
4
8
  export interface EthereumProvider {
5
9
  providers?: EthereumProvider[];
6
- request(...args: unknown[]): Promise<unknown>;
10
+ request(payload: EthereumRequestPayload): Promise<unknown>;
7
11
  disconnect?: {
8
12
  (): Promise<void>;
9
13
  };
10
14
  emit(eventName: string | symbol, ...args: any[]): boolean;
11
- on(...args: unknown[]): void;
12
- removeListener(...args: unknown[]): void;
15
+ on(event: any, listener: any): void;
16
+ removeListener(event: string, listener: any): void;
13
17
  }
14
18
  export interface LedgerConnectProvider extends EthereumProvider {
15
19
  [LEDGER_CONNECT_ETHEREUM_PROP]: boolean;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ledgerhq/connect-kit",
3
- "version": "1.0.0",
3
+ "version": "1.0.2",
4
4
  "description": "A library for dapps to integrate with Ledger Connect and Ledger Live",
5
5
  "author": "Hugo Lopes",
6
6
  "license": "MIT",