aboutsummaryrefslogtreecommitdiffstats
path: root/packages/subproviders/src
diff options
context:
space:
mode:
Diffstat (limited to 'packages/subproviders/src')
-rw-r--r--packages/subproviders/src/subproviders/eth_lightwallet_subprovider.ts5
-rw-r--r--packages/subproviders/src/subproviders/ganache.ts2
-rw-r--r--packages/subproviders/src/subproviders/redundant_subprovider.ts2
-rw-r--r--packages/subproviders/src/subproviders/rpc_subprovider.ts6
-rw-r--r--packages/subproviders/src/subproviders/subprovider.ts6
5 files changed, 18 insertions, 3 deletions
diff --git a/packages/subproviders/src/subproviders/eth_lightwallet_subprovider.ts b/packages/subproviders/src/subproviders/eth_lightwallet_subprovider.ts
index 454dae58e..17fe59368 100644
--- a/packages/subproviders/src/subproviders/eth_lightwallet_subprovider.ts
+++ b/packages/subproviders/src/subproviders/eth_lightwallet_subprovider.ts
@@ -14,6 +14,11 @@ import { PrivateKeyWalletSubprovider } from './private_key_wallet';
export class EthLightwalletSubprovider extends BaseWalletSubprovider {
private readonly _keystore: lightwallet.keystore;
private readonly _pwDerivedKey: Uint8Array;
+ /**
+ *
+ * @param keystore The EthLightWallet keystore you wish to use
+ * @param pwDerivedKey The password derived key to use
+ */
constructor(keystore: lightwallet.keystore, pwDerivedKey: Uint8Array) {
super();
this._keystore = keystore;
diff --git a/packages/subproviders/src/subproviders/ganache.ts b/packages/subproviders/src/subproviders/ganache.ts
index 986094dba..2b8544f8b 100644
--- a/packages/subproviders/src/subproviders/ganache.ts
+++ b/packages/subproviders/src/subproviders/ganache.ts
@@ -24,7 +24,7 @@ export class GanacheSubprovider extends Subprovider {
* It is called internally by the ProviderEngine when it is this subproviders
* turn to handle a JSON RPC request.
* @param payload JSON RPC payload
- * @param next Callback to call if this subprovider decides not to handle the request
+ * @param _next Callback to call if this subprovider decides not to handle the request
* @param end Callback to call if subprovider handled the request and wants to pass back the request.
*/
// tslint:disable-next-line:prefer-function-over-method async-suffix
diff --git a/packages/subproviders/src/subproviders/redundant_subprovider.ts b/packages/subproviders/src/subproviders/redundant_subprovider.ts
index 7aa6226d5..59a2986f8 100644
--- a/packages/subproviders/src/subproviders/redundant_subprovider.ts
+++ b/packages/subproviders/src/subproviders/redundant_subprovider.ts
@@ -34,7 +34,7 @@ export class RedundantSubprovider extends Subprovider {
}
/**
* Instantiates a new RedundantSubprovider
- * @param endpoints JSON RPC endpoints to attempt. Attempts are made in the order of the endpoints.
+ * @param subproviders Subproviders to attempt the request with
*/
constructor(subproviders: Subprovider[]) {
super();
diff --git a/packages/subproviders/src/subproviders/rpc_subprovider.ts b/packages/subproviders/src/subproviders/rpc_subprovider.ts
index d874c6f05..18d6da307 100644
--- a/packages/subproviders/src/subproviders/rpc_subprovider.ts
+++ b/packages/subproviders/src/subproviders/rpc_subprovider.ts
@@ -15,6 +15,10 @@ import { Subprovider } from './subprovider';
export class RPCSubprovider extends Subprovider {
private readonly _rpcUrl: string;
private readonly _requestTimeoutMs: number;
+ /**
+ * @param rpcUrl URL to the backing Ethereum node to which JSON RPC requests should be sent
+ * @param requestTimeoutMs Amount of miliseconds to wait before timing out the JSON RPC request
+ */
constructor(rpcUrl: string, requestTimeoutMs: number = 20000) {
super();
assert.isString('rpcUrl', rpcUrl);
@@ -27,7 +31,7 @@ export class RPCSubprovider extends Subprovider {
* It is called internally by the ProviderEngine when it is this subproviders
* turn to handle a JSON RPC request.
* @param payload JSON RPC payload
- * @param next Callback to call if this subprovider decides not to handle the request
+ * @param _next Callback to call if this subprovider decides not to handle the request
* @param end Callback to call if subprovider handled the request and wants to pass back the request.
*/
// tslint:disable-next-line:prefer-function-over-method async-suffix
diff --git a/packages/subproviders/src/subproviders/subprovider.ts b/packages/subproviders/src/subproviders/subprovider.ts
index 5dc273569..53a3d07ea 100644
--- a/packages/subproviders/src/subproviders/subprovider.ts
+++ b/packages/subproviders/src/subproviders/subprovider.ts
@@ -32,6 +32,11 @@ export abstract class Subprovider {
// 16 digits
return datePart + extraPart;
}
+ /**
+ * @param payload JSON RPC request payload
+ * @param next A callback to pass the request to the next subprovider in the stack
+ * @param end A callback called once the subprovider is done handling the request
+ */
// tslint:disable-next-line:async-suffix
public abstract async handleRequest(
payload: JSONRPCRequestPayload,
@@ -55,6 +60,7 @@ export abstract class Subprovider {
* Set's the subprovider's engine to the ProviderEngine it is added to.
* This is only called within the ProviderEngine source code, do not call
* directly.
+ * @param engine The ProviderEngine this subprovider is added to
*/
public setEngine(engine: Provider): void {
this.engine = engine;