aboutsummaryrefslogtreecommitdiffstats
path: root/packages/subproviders
diff options
context:
space:
mode:
authorFabio Berger <me@fabioberger.com>2017-12-06 06:33:18 +0800
committerFabio Berger <me@fabioberger.com>2017-12-06 06:33:18 +0800
commitf6321a8e703b8b91f7043b6b55e0db06bbcd0a74 (patch)
tree5c52552960dde3788180ef55e7fb1fa8b8c1fa84 /packages/subproviders
parent08168c6e7d52711aeb46e27444ba26970e16e244 (diff)
downloaddexon-sol-tools-f6321a8e703b8b91f7043b6b55e0db06bbcd0a74.tar.gz
dexon-sol-tools-f6321a8e703b8b91f7043b6b55e0db06bbcd0a74.tar.zst
dexon-sol-tools-f6321a8e703b8b91f7043b6b55e0db06bbcd0a74.zip
Fix lint issues
Diffstat (limited to 'packages/subproviders')
-rw-r--r--packages/subproviders/src/globals.d.ts2
-rw-r--r--packages/subproviders/src/index.ts8
2 files changed, 9 insertions, 1 deletions
diff --git a/packages/subproviders/src/globals.d.ts b/packages/subproviders/src/globals.d.ts
index 1f9c6e8a6..7fb0fc7e2 100644
--- a/packages/subproviders/src/globals.d.ts
+++ b/packages/subproviders/src/globals.d.ts
@@ -30,7 +30,7 @@ declare module 'ledgerco' {
declare module 'semaphore-async-await' {
class Semaphore {
constructor(permits: number);
- public wait(): void;
+ public wait(): Promise<void>;
public signal(): void;
}
export default Semaphore;
diff --git a/packages/subproviders/src/index.ts b/packages/subproviders/src/index.ts
index 9560c3597..9b7cab3fa 100644
--- a/packages/subproviders/src/index.ts
+++ b/packages/subproviders/src/index.ts
@@ -17,12 +17,20 @@ export {
LedgerCommunicationClient,
} from './types';
+/**
+ * A factory method for creating a LedgerEthereumClient usable in a browser context.
+ * @return LedgerEthereumClient A browser client
+ */
export async function ledgerEthereumBrowserClientFactoryAsync(): Promise<LedgerEthereumClient> {
const ledgerConnection = await LedgerBrowserCommunication.create_async();
const ledgerEthClient = new LedgerEthereumClientFn(ledgerConnection);
return ledgerEthClient;
}
+/**
+ * A factory for creating a LedgerEthereumClient usable in a Node.js context.
+ * @return LedgerEthereumClient A Node.js client
+ */
export async function ledgerEthereumNodeJsClientFactoryAsync(): Promise<LedgerEthereumClient> {
const ledgerConnection = await LedgerNodeCommunication.create_async();
const ledgerEthClient = new LedgerEthereumClientFn(ledgerConnection);