@ledgerhq/connect-kit 1.0.0-beta.1 → 1.0.0-beta.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (33) hide show
  1. package/CHANGELOG.md +1 -1
  2. package/README.md +2 -1
  3. package/dist/umd/components/ConnectWithLedgerLiveModal/ConnectWithLedgerLiveModal.d.ts +7 -0
  4. package/dist/umd/components/ConnectWithLedgerLiveModal/ConnectWithLedgerLiveModal.styles.d.ts +3 -0
  5. package/dist/umd/components/ConnectWithLedgerLiveModal/index.d.ts +1 -0
  6. package/dist/umd/components/ExtensionUnavailableModal/ExtensionUnavailableModal.d.ts +3 -0
  7. package/dist/umd/components/ExtensionUnavailableModal/ExtensionUnavailableModal.styles.d.ts +1 -0
  8. package/dist/umd/components/ExtensionUnavailableModal/index.d.ts +1 -0
  9. package/dist/umd/components/Modal/Backdrop.styles.d.ts +1 -0
  10. package/dist/umd/components/Modal/Modal.d.ts +8 -0
  11. package/dist/umd/components/Modal/Modal.styles.d.ts +18 -0
  12. package/dist/umd/components/Modal/index.d.ts +1 -0
  13. package/dist/umd/components/NeedALedgerSection/NeedALedgerSection.d.ts +4 -0
  14. package/dist/umd/components/NeedALedgerSection/NeedALedgerSection.styles.d.ts +5 -0
  15. package/dist/umd/components/NeedALedgerSection/index.d.ts +1 -0
  16. package/dist/umd/components/PlatformNotSupportedModal/PlatformNotSupportedModal.d.ts +3 -0
  17. package/dist/umd/components/PlatformNotSupportedModal/PlatformNotSupportedModal.styles.d.ts +2 -0
  18. package/dist/umd/components/PlatformNotSupportedModal/index.d.ts +1 -0
  19. package/dist/umd/components/index.d.ts +3 -0
  20. package/dist/umd/index.d.ts +53 -0
  21. package/dist/umd/index.js +62 -0
  22. package/dist/umd/index.js.map +1 -0
  23. package/dist/umd/lib/browser.d.ts +18 -0
  24. package/dist/umd/lib/connectSupport.d.ts +2 -0
  25. package/dist/umd/lib/errors.d.ts +6 -0
  26. package/dist/umd/lib/logger.d.ts +4 -0
  27. package/dist/umd/lib/modal.d.ts +4 -0
  28. package/dist/umd/lib/provider.d.ts +20 -0
  29. package/dist/umd/lib/support.d.ts +20 -0
  30. package/dist/umd/providers/Ethereum.d.ts +13 -0
  31. package/dist/umd/providers/Solana.d.ts +12 -0
  32. package/dist/umd/providers/WalletConnect.d.ts +12 -0
  33. package/package.json +5 -4
package/CHANGELOG.md CHANGED
@@ -7,7 +7,7 @@ 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-beta.1 - 2022-10-28
10
+ ## 1.0.0-beta.2 - 2022-10-28
11
11
  This is the first public version of the package.
12
12
 
13
13
  ### Added
package/README.md CHANGED
@@ -1,3 +1,4 @@
1
1
  # Ledger Connect Kit
2
2
 
3
- Please read the information available on the [connect-kit-loader](/packages/connect-kit-loader) package.
3
+ Please use Connect Kit Loader, read the information available on the
4
+ [connect-kit-loader](../connect-kit-loader) package.
@@ -0,0 +1,7 @@
1
+ /// <reference types="react" />
2
+ export declare let setWalletConnectUri: (uri: string) => void;
3
+ export declare type ConnectWithLedgerLiveModalProps = {
4
+ withQrCode?: boolean;
5
+ };
6
+ declare const ConnectWithLedgerLiveModal: ({ withQrCode }: ConnectWithLedgerLiveModalProps) => JSX.Element;
7
+ export default ConnectWithLedgerLiveModal;
@@ -0,0 +1,3 @@
1
+ import { QRCodeSVG } from "qrcode.react";
2
+ export declare const QrCode: import("styled-components").StyledComponent<typeof QRCodeSVG, any, {}, never>;
3
+ export declare const QrCodeSection: import("styled-components").StyledComponent<"div", any, {}, never>;
@@ -0,0 +1 @@
1
+ export { default } from "./ConnectWithLedgerLiveModal";
@@ -0,0 +1,3 @@
1
+ /// <reference types="react" />
2
+ declare const ExtensionUnavailableModal: () => JSX.Element;
3
+ export default ExtensionUnavailableModal;
@@ -0,0 +1 @@
1
+ export declare const ConnectFeature: import("styled-components").StyledComponent<"div", any, {}, never>;
@@ -0,0 +1 @@
1
+ export { default } from "./ExtensionUnavailableModal";
@@ -0,0 +1 @@
1
+ export declare const Backdrop: import("styled-components").StyledComponent<"div", any, {}, never>;
@@ -0,0 +1,8 @@
1
+ import { ReactElement } from "react";
2
+ export declare let setIsModalOpen: (isModalOpen: boolean) => void;
3
+ interface ModalProps {
4
+ isOpen?: boolean;
5
+ children: ReactElement | null;
6
+ }
7
+ export declare const Modal: ({ children }: ModalProps) => JSX.Element | null;
8
+ export default Modal;
@@ -0,0 +1,18 @@
1
+ export declare const ModalWrapper: import("styled-components").StyledComponent<"div", any, {}, never>;
2
+ export declare const ModalContent: import("styled-components").StyledComponent<"div", any, {}, never>;
3
+ export declare const CloseButton: import("styled-components").StyledComponent<"button", any, {}, never>;
4
+ export declare const ModalHeader: import("styled-components").StyledComponent<"div", any, {}, never>;
5
+ export declare const ModalSection: import("styled-components").StyledComponent<"div", any, {}, never>;
6
+ export declare const ModalTitle: import("styled-components").StyledComponent<"h2", any, {}, never>;
7
+ export declare const ModalSubtitle: import("styled-components").StyledComponent<"h3", any, {}, never>;
8
+ export declare const ModalText: import("styled-components").StyledComponent<"p", any, {}, never>;
9
+ export declare type VariantOptions = {
10
+ variant?: string;
11
+ };
12
+ export declare const ModalButton: import("styled-components").StyledComponent<"button", any, {
13
+ variant: string;
14
+ }, never>;
15
+ export declare const Stack: import("styled-components").StyledComponent<"div", any, {
16
+ direction: "row" | "column";
17
+ gap: number;
18
+ }, never>;
@@ -0,0 +1 @@
1
+ export { default } from "./Modal";
@@ -0,0 +1,4 @@
1
+ /// <reference types="react" />
2
+ import { VariantOptions } from "../Modal/Modal.styles";
3
+ declare const NeedALedgerCard: ({ variant }: VariantOptions) => JSX.Element;
4
+ export default NeedALedgerCard;
@@ -0,0 +1,5 @@
1
+ export declare const CustomBackground: import("styled-components").StyledComponent<"div", any, {}, never>;
2
+ export declare const ContentWrapper: import("styled-components").StyledComponent<"div", any, {}, never>;
3
+ export declare const BuyNowButton: import("styled-components").StyledComponent<"button", any, {
4
+ variant: string;
5
+ }, never>;
@@ -0,0 +1 @@
1
+ export { default } from "./NeedALedgerSection";
@@ -0,0 +1,3 @@
1
+ /// <reference types="react" />
2
+ declare const PlatformNotSupportedModal: () => JSX.Element;
3
+ export default PlatformNotSupportedModal;
@@ -0,0 +1,2 @@
1
+ export declare const BrowserList: import("styled-components").StyledComponent<"div", any, {}, never>;
2
+ export declare const BrowserListItem: import("styled-components").StyledComponent<"div", any, {}, never>;
@@ -0,0 +1 @@
1
+ export { default } from "./PlatformNotSupportedModal";
@@ -0,0 +1,3 @@
1
+ export { default as ExtensionUnavailableModal } from "./ExtensionUnavailableModal";
2
+ export { default as ConnectWithLedgerLiveModal } from "./ConnectWithLedgerLiveModal";
3
+ export { default as PlatformNotSupportedModal } from "./PlatformNotSupportedModal";
@@ -0,0 +1,53 @@
1
+ import WalletConnectProvider from '@walletconnect/ethereum-provider/dist/esm';
2
+
3
+ interface EthereumProvider {
4
+ providers?: EthereumProvider[];
5
+ request(...args: unknown[]): Promise<unknown>;
6
+ on(...args: unknown[]): void;
7
+ removeListener(...args: unknown[]): void;
8
+ }
9
+
10
+ declare const LEDGER_CONNECT_SOLANA_PROP = "isLedgerConnect";
11
+ interface SolanaProvider {
12
+ [LEDGER_CONNECT_SOLANA_PROP]: boolean;
13
+ signTransaction(...args: unknown[]): Promise<unknown>;
14
+ signAllTransactions(...args: unknown[]): Promise<unknown>;
15
+ signAndSendTransaction(...args: unknown[]): Promise<unknown>;
16
+ connect(): Promise<void>;
17
+ disconnect(): Promise<void>;
18
+ }
19
+
20
+ declare enum ConnectSupportedChains {
21
+ EthereumMainnet = 1
22
+ }
23
+ declare enum SupportedProviders {
24
+ Ethereum = "Ethereum",
25
+ Solana = "Solana"
26
+ }
27
+ declare enum SupportedProviderImplementations {
28
+ LedgerConnect = "LedgerConnect",
29
+ WalletConnect = "WalletConnect"
30
+ }
31
+ declare type ProviderResult = EthereumProvider | SolanaProvider | WalletConnectProvider;
32
+ declare function getProvider(): Promise<ProviderResult>;
33
+
34
+ declare type CheckSupportOptions = {
35
+ providerType: SupportedProviders;
36
+ chainId?: ConnectSupportedChains;
37
+ bridge?: string;
38
+ infuraId?: string;
39
+ rpc: {
40
+ [chainId: number]: string;
41
+ };
42
+ };
43
+ declare type CheckSupportResult = {
44
+ isLedgerConnectSupported?: boolean;
45
+ isLedgerConnectEnabled?: boolean;
46
+ isChainIdSupported?: boolean;
47
+ providerImplementation: SupportedProviderImplementations;
48
+ };
49
+ declare function checkSupport(options: CheckSupportOptions): CheckSupportResult;
50
+
51
+ declare const enableDebugLogs: () => void;
52
+
53
+ export { checkSupport, enableDebugLogs, getProvider };