@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.
- package/CHANGELOG.md +15 -0
- package/dist/umd/components/ConnectWithLedgerLiveModal/ConnectWithLedgerLiveModal.d.ts +2 -1
- package/dist/umd/components/Modal/Modal.d.ts +2 -1
- package/dist/umd/index.d.ts +7 -3
- package/dist/umd/index.js +6 -6
- package/dist/umd/index.js.map +1 -1
- package/dist/umd/lib/browser.d.ts +1 -1
- package/dist/umd/lib/errors.d.ts +5 -0
- package/dist/umd/lib/provider.d.ts +0 -1
- package/dist/umd/providers/Ethereum.d.ts +7 -3
- package/package.json +1 -1
@@ -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;
|
package/dist/umd/lib/errors.d.ts
CHANGED
@@ -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(
|
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(
|
12
|
-
removeListener(
|
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;
|