@ledgerhq/connect-kit 1.1.0 → 1.1.1
Sign up to get free protection for your applications and to get access to all the features.
- package/CHANGELOG.md +13 -0
- package/dist/umd/hooks/useAnalytics.d.ts +11 -0
- package/dist/umd/index.d.ts +3 -11
- package/dist/umd/index.js +819 -45
- package/dist/umd/index.js.map +1 -1
- package/dist/umd/lib/modal.d.ts +7 -0
- package/dist/umd/lib/provider.d.ts +5 -2
- package/dist/umd/lib/supportOptions.d.ts +1 -0
- package/dist/umd/providers/ExtensionEvm.d.ts +1 -1
- package/dist/umd/support/EthereumProvider/EthereumProvider.d.ts +5 -1
- package/package.json +10 -5
- package/dist/umd/providers/ExtensionSolana.d.ts +0 -15
package/CHANGELOG.md
CHANGED
@@ -7,6 +7,19 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
7
7
|
|
8
8
|
## Unreleased
|
9
9
|
|
10
|
+
## 1.1.1 - 2023-08-01
|
11
|
+
Nothing changed from the last version
|
12
|
+
|
13
|
+
## 1.1.1-beta.0 - 2023-08-01
|
14
|
+
### Changed
|
15
|
+
- Use WalletConnect's default list of optional methods and events.
|
16
|
+
- Add analytics support so that we can better understand usage.
|
17
|
+
- Handle display_uri event only once when calling eth_requestAccounts.
|
18
|
+
- Update WalletConnect package versions.
|
19
|
+
- Switch to the correct chain when connecting with the Extension.
|
20
|
+
- Expose provider.chainId.
|
21
|
+
- Remove unfinished Solana support.
|
22
|
+
|
10
23
|
## 1.1.0 - 2023-06-22
|
11
24
|
Connect Kit now supports WalletConnect v2.
|
12
25
|
|
@@ -0,0 +1,11 @@
|
|
1
|
+
import { Plugin } from "@segment/analytics-next";
|
2
|
+
type UseAnalyticsReturn = {
|
3
|
+
track: (eventName: string, eventProperties?: Record<string, unknown>) => Promise<void>;
|
4
|
+
page: (pageName: string, eventProperties?: Record<string, unknown>) => Promise<void>;
|
5
|
+
init: (globalProperties?: Record<string, unknown>, globalOptions?: Record<string, unknown>) => Promise<void>;
|
6
|
+
addStepToFlow: (step: string) => void;
|
7
|
+
sendUserFlow: () => void;
|
8
|
+
};
|
9
|
+
export declare const debug: Plugin;
|
10
|
+
export declare function useAnalytics(): UseAnalyticsReturn;
|
11
|
+
export {};
|
package/dist/umd/index.d.ts
CHANGED
@@ -9,6 +9,7 @@ interface EthereumProvider {
|
|
9
9
|
providers?: EthereumProvider[];
|
10
10
|
connector?: unknown;
|
11
11
|
session?: unknown;
|
12
|
+
chainId: string | number;
|
12
13
|
request<T = unknown>(args: EthereumRequestPayload): Promise<T>;
|
13
14
|
disconnect?: {
|
14
15
|
(): Promise<void>;
|
@@ -17,16 +18,6 @@ interface EthereumProvider {
|
|
17
18
|
removeListener(event: string, listener: any): void;
|
18
19
|
}
|
19
20
|
|
20
|
-
declare const EXTENSION_SOLANA_PROP = "isLedgerConnect";
|
21
|
-
interface SolanaProvider {
|
22
|
-
[EXTENSION_SOLANA_PROP]: boolean;
|
23
|
-
signTransaction(...args: unknown[]): Promise<unknown>;
|
24
|
-
signAllTransactions(...args: unknown[]): Promise<unknown>;
|
25
|
-
signAndSendTransaction(...args: unknown[]): Promise<unknown>;
|
26
|
-
connect(): Promise<void>;
|
27
|
-
disconnect(): Promise<void>;
|
28
|
-
}
|
29
|
-
|
30
21
|
declare enum SupportedProviders {
|
31
22
|
Ethereum = "Ethereum",
|
32
23
|
Solana = "Solana"
|
@@ -35,7 +26,7 @@ declare enum SupportedProviderImplementations {
|
|
35
26
|
LedgerConnect = "LedgerConnect",
|
36
27
|
WalletConnect = "WalletConnect"
|
37
28
|
}
|
38
|
-
type ProviderResult = EthereumProvider
|
29
|
+
type ProviderResult = EthereumProvider;
|
39
30
|
/**
|
40
31
|
* Gets a provider instance based on the implementation set earlier.
|
41
32
|
*/
|
@@ -56,6 +47,7 @@ type CheckSupportWalletConnectProviderOptions = {
|
|
56
47
|
rpcMap?: {
|
57
48
|
[chainId: string]: string;
|
58
49
|
};
|
50
|
+
relayUrl?: string;
|
59
51
|
};
|
60
52
|
type CheckSupportWalletConnectLegacyProviderOptions = {
|
61
53
|
chainId?: number;
|