@ledgerhq/connect-kit 1.0.0-beta.7 → 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
package/CHANGELOG.md CHANGED
@@ -7,10 +7,17 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## Unreleased
9
9
 
10
+ ## 1.0.0 - 2022-11-17
11
+
10
12
  ## 1.0.0-beta.4-5 - 2022-11-01
11
13
  ### Changed
12
14
  - Release workflow changes.
13
15
 
16
+ ## 1.0.0-beta.8 - 2022-11-15
17
+ ### Changed
18
+ - Make disconnect on EthereumProvider optional since it is only available on
19
+ WalletConnect.
20
+
14
21
  ## 1.0.0-beta.7 - 2022-11-14
15
22
  ### Changed
16
23
  - Added disconnect and emit to the EthereumProvider interface to implement
@@ -1,6 +1,6 @@
1
1
  /// <reference types="react" />
2
2
  export declare let setWalletConnectUri: (uri: string) => void;
3
- export declare type ConnectWithLedgerLiveModalProps = {
3
+ export type ConnectWithLedgerLiveModalProps = {
4
4
  withQrCode?: boolean;
5
5
  };
6
6
  declare const ConnectWithLedgerLiveModal: ({ withQrCode }: ConnectWithLedgerLiveModalProps) => JSX.Element;
@@ -6,7 +6,7 @@ export declare const ModalSection: import("styled-components").StyledComponent<"
6
6
  export declare const ModalTitle: import("styled-components").StyledComponent<"h2", any, {}, never>;
7
7
  export declare const ModalSubtitle: import("styled-components").StyledComponent<"h3", any, {}, never>;
8
8
  export declare const ModalText: import("styled-components").StyledComponent<"p", any, {}, never>;
9
- export declare type VariantOptions = {
9
+ export type VariantOptions = {
10
10
  variant?: string;
11
11
  };
12
12
  export declare const ModalButton: import("styled-components").StyledComponent<"button", any, {
@@ -3,7 +3,9 @@ import WalletConnectProvider from '@walletconnect/ethereum-provider/dist/esm';
3
3
  interface EthereumProvider {
4
4
  providers?: EthereumProvider[];
5
5
  request(...args: unknown[]): Promise<unknown>;
6
- disconnect(): Promise<void>;
6
+ disconnect?: {
7
+ (): Promise<void>;
8
+ };
7
9
  emit(eventName: string | symbol, ...args: any[]): boolean;
8
10
  on(...args: unknown[]): void;
9
11
  removeListener(...args: unknown[]): void;
@@ -27,10 +29,10 @@ declare enum SupportedProviderImplementations {
27
29
  LedgerConnect = "LedgerConnect",
28
30
  WalletConnect = "WalletConnect"
29
31
  }
30
- declare type ProviderResult = EthereumProvider | SolanaProvider | WalletConnectProvider;
32
+ type ProviderResult = EthereumProvider | SolanaProvider | WalletConnectProvider;
31
33
  declare function getProvider(): Promise<ProviderResult>;
32
34
 
33
- declare type CheckSupportOptions = {
35
+ type CheckSupportOptions = {
34
36
  providerType: SupportedProviders;
35
37
  chainId?: number;
36
38
  bridge?: string;
@@ -39,7 +41,7 @@ declare type CheckSupportOptions = {
39
41
  [chainId: number]: string;
40
42
  };
41
43
  };
42
- declare type CheckSupportResult = {
44
+ type CheckSupportResult = {
43
45
  isLedgerConnectSupported?: boolean;
44
46
  isLedgerConnectEnabled?: boolean;
45
47
  isChainIdSupported?: boolean;
@@ -1,4 +1,4 @@
1
- export declare type Logger = (message: string, ...others: unknown[]) => void;
1
+ export type Logger = (message: string, ...others: unknown[]) => void;
2
2
  export declare const getDebugLogger: (context: string) => Logger;
3
3
  export declare const getErrorLogger: (context: string) => Logger;
4
4
  export declare const enableDebugLogs: () => void;
@@ -1,4 +1,4 @@
1
1
  import { ConnectWithLedgerLiveModalProps } from "../components/ConnectWithLedgerLiveModal/ConnectWithLedgerLiveModal";
2
- declare type ModalType = 'ConnectWithLedgerLiveModal' | 'PlatformNotSupportedModal' | 'ExtensionUnavailableModal';
2
+ type ModalType = 'ConnectWithLedgerLiveModal' | 'PlatformNotSupportedModal' | 'ExtensionUnavailableModal';
3
3
  export declare function showModal(modalType: ModalType, props?: ConnectWithLedgerLiveModalProps): void;
4
4
  export {};
@@ -14,7 +14,7 @@ export declare enum SupportedProviderImplementations {
14
14
  LedgerConnect = "LedgerConnect",
15
15
  WalletConnect = "WalletConnect"
16
16
  }
17
- export declare type ProviderResult = EthereumProvider | SolanaProvider | WalletConnectProvider;
17
+ export type ProviderResult = EthereumProvider | SolanaProvider | WalletConnectProvider;
18
18
  export declare function setProviderType(providerType: SupportedProviders): void;
19
19
  export declare function setProviderImplementation(providerImplementation: SupportedProviderImplementations): void;
20
20
  export declare function getProvider(): Promise<ProviderResult>;
@@ -1,5 +1,5 @@
1
1
  import { ConnectSupportedChains, SupportedProviders, SupportedProviderImplementations } from "./provider";
2
- export declare type CheckSupportOptions = {
2
+ export type CheckSupportOptions = {
3
3
  providerType: SupportedProviders;
4
4
  chainId?: number;
5
5
  bridge?: string;
@@ -8,13 +8,13 @@ export declare type CheckSupportOptions = {
8
8
  [chainId: number]: string;
9
9
  };
10
10
  };
11
- export declare type CheckSupportResult = {
11
+ export type CheckSupportResult = {
12
12
  isLedgerConnectSupported?: boolean;
13
13
  isLedgerConnectEnabled?: boolean;
14
14
  isChainIdSupported?: boolean;
15
15
  providerImplementation: SupportedProviderImplementations;
16
16
  };
17
17
  export declare function checkSupport(options: CheckSupportOptions): CheckSupportResult;
18
- export declare type CheckEthereumSupportOptions = CheckSupportOptions & {
18
+ export type CheckEthereumSupportOptions = CheckSupportOptions & {
19
19
  chainId: ConnectSupportedChains;
20
20
  };
@@ -4,7 +4,9 @@ export declare const LEDGER_CONNECT_ETHEREUM_PROP = "isLedgerConnect";
4
4
  export interface EthereumProvider {
5
5
  providers?: EthereumProvider[];
6
6
  request(...args: unknown[]): Promise<unknown>;
7
- disconnect(): Promise<void>;
7
+ disconnect?: {
8
+ (): Promise<void>;
9
+ };
8
10
  emit(eventName: string | symbol, ...args: any[]): boolean;
9
11
  on(...args: unknown[]): void;
10
12
  removeListener(...args: unknown[]): void;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ledgerhq/connect-kit",
3
- "version": "1.0.0-beta.7",
3
+ "version": "1.0.0",
4
4
  "description": "A library for dapps to integrate with Ledger Connect and Ledger Live",
5
5
  "author": "Hugo Lopes",
6
6
  "license": "MIT",