@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.
- package/CHANGELOG.md +1 -1
- package/README.md +2 -1
- package/dist/umd/components/ConnectWithLedgerLiveModal/ConnectWithLedgerLiveModal.d.ts +7 -0
- package/dist/umd/components/ConnectWithLedgerLiveModal/ConnectWithLedgerLiveModal.styles.d.ts +3 -0
- package/dist/umd/components/ConnectWithLedgerLiveModal/index.d.ts +1 -0
- package/dist/umd/components/ExtensionUnavailableModal/ExtensionUnavailableModal.d.ts +3 -0
- package/dist/umd/components/ExtensionUnavailableModal/ExtensionUnavailableModal.styles.d.ts +1 -0
- package/dist/umd/components/ExtensionUnavailableModal/index.d.ts +1 -0
- package/dist/umd/components/Modal/Backdrop.styles.d.ts +1 -0
- package/dist/umd/components/Modal/Modal.d.ts +8 -0
- package/dist/umd/components/Modal/Modal.styles.d.ts +18 -0
- package/dist/umd/components/Modal/index.d.ts +1 -0
- package/dist/umd/components/NeedALedgerSection/NeedALedgerSection.d.ts +4 -0
- package/dist/umd/components/NeedALedgerSection/NeedALedgerSection.styles.d.ts +5 -0
- package/dist/umd/components/NeedALedgerSection/index.d.ts +1 -0
- package/dist/umd/components/PlatformNotSupportedModal/PlatformNotSupportedModal.d.ts +3 -0
- package/dist/umd/components/PlatformNotSupportedModal/PlatformNotSupportedModal.styles.d.ts +2 -0
- package/dist/umd/components/PlatformNotSupportedModal/index.d.ts +1 -0
- package/dist/umd/components/index.d.ts +3 -0
- package/dist/umd/index.d.ts +53 -0
- package/dist/umd/index.js +62 -0
- package/dist/umd/index.js.map +1 -0
- package/dist/umd/lib/browser.d.ts +18 -0
- package/dist/umd/lib/connectSupport.d.ts +2 -0
- package/dist/umd/lib/errors.d.ts +6 -0
- package/dist/umd/lib/logger.d.ts +4 -0
- package/dist/umd/lib/modal.d.ts +4 -0
- package/dist/umd/lib/provider.d.ts +20 -0
- package/dist/umd/lib/support.d.ts +20 -0
- package/dist/umd/providers/Ethereum.d.ts +13 -0
- package/dist/umd/providers/Solana.d.ts +12 -0
- package/dist/umd/providers/WalletConnect.d.ts +12 -0
- package/package.json +5 -4
package/CHANGELOG.md
CHANGED
package/README.md
CHANGED
@@ -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 @@
|
|
1
|
+
export { default } from "./ConnectWithLedgerLiveModal";
|
@@ -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,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 @@
|
|
1
|
+
export { default } 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 };
|