aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--packages/subproviders/src/globals.d.ts2
-rw-r--r--packages/subproviders/src/index.ts8
-rw-r--r--yarn.lock10
3 files changed, 11 insertions, 9 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);
diff --git a/yarn.lock b/yarn.lock
index 23b1323ac..5e1e43882 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -149,7 +149,7 @@
dependencies:
"@types/node" "*"
-"@types/mocha@^2.2.41", "@types/mocha@^2.2.42":
+"@types/mocha@^2.2.41", "@types/mocha@^2.2.42", "@types/mocha@^2.2.44":
version "2.2.44"
resolved "https://registry.yarnpkg.com/@types/mocha/-/mocha-2.2.44.tgz#1d4a798e53f35212fd5ad4d04050620171cd5b5e"
@@ -1355,7 +1355,7 @@ bn.js@4.11.7:
version "4.11.7"
resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-4.11.7.tgz#ddb048e50d9482790094c13eb3fcfc833ce7ab46"
-bn.js@4.11.8, bn.js@^4.0.0, bn.js@^4.1.0, bn.js@^4.1.1, bn.js@^4.10.0, bn.js@^4.11.3, bn.js@^4.11.6, bn.js@^4.11.7, bn.js@^4.4.0, bn.js@^4.8.0:
+bn.js@4.11.8, bn.js@^4.0.0, bn.js@^4.1.0, bn.js@^4.1.1, bn.js@^4.10.0, bn.js@^4.11.3, bn.js@^4.11.6, bn.js@^4.11.7, bn.js@^4.11.8, bn.js@^4.4.0, bn.js@^4.8.0:
version "4.11.8"
resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-4.11.8.tgz#2cde09eb5ee341f484746bb0309b3253b1b1442f"
@@ -8750,12 +8750,6 @@ web3-typescript-typings@^0.7.2:
dependencies:
bignumber.js "^4.0.2"
-web3-typescript-typings@^0.7.2:
- version "0.7.2"
- resolved "https://registry.yarnpkg.com/web3-typescript-typings/-/web3-typescript-typings-0.7.2.tgz#5312bb786936a9c91381eee7af3d02ac21cf13b3"
- dependencies:
- bignumber.js "^4.0.2"
-
web3-utils@^1.0.0-beta.26:
version "1.0.0-beta.26"
resolved "https://registry.yarnpkg.com/web3-utils/-/web3-utils-1.0.0-beta.26.tgz#f04ad8c144b1781c6b20c2818e0532cb9e6dca15"