Skip to content

Commit

Permalink
web3-provider types
Browse files Browse the repository at this point in the history
  • Loading branch information
joshstevens19 committed Mar 15, 2019
1 parent c39854a commit eb1d5d4
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions packages/web3-providers/types/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export class BatchRequest {

add(method: AbstractMethod): void;

execute(): Promise<{methods: AbstractMethod[], response: object[]}|Error[]>;
execute(): Promise<{methods: AbstractMethod[]; response: any[]} | Error[]>;
}

export class ProviderDetector {
Expand All @@ -56,9 +56,9 @@ export class HttpProvider {
host: string;
connected: boolean;

send(method: string, parameters: any[]): Promise<object>;
send(method: string, parameters: any[]): Promise<any>;

sendBatch(methods: AbstractMethod[], moduleInstance: AbstractWeb3Module): Promise<object[]>;
sendBatch(methods: AbstractMethod[], moduleInstance: AbstractWeb3Module): Promise<any[]>;

disconnect(): boolean;
}
Expand All @@ -71,15 +71,15 @@ export class AbstractSocketProvider {

registerEventListeners(): void;

send(method: string, parameters: any[]): Promise<object>;
send(method: string, parameters: any[]): Promise<any>;

sendBatch(methods: AbstractMethod[], moduleInstance: AbstractWeb3Module): Promise<object[]>;
sendBatch(methods: AbstractMethod[], moduleInstance: AbstractWeb3Module): Promise<any[]>;

subscribe(subscribeMethod: string, subscriptionMethod: string, parameters: any[]): Promise<string>;

unsubscribe(subscriptionId: string, unsubscribeMethod: string): Promise<boolean>;

clearSubscriptions(unsubscribeMethod: string): Promise<boolean>
clearSubscriptions(unsubscribeMethod: string): Promise<boolean>;

on(type: string, callback: () => void): void;

Expand All @@ -89,7 +89,7 @@ export class AbstractSocketProvider {

reset(): void;

reconnect(): void
reconnect(): void;

disconnect(code: number, reason: string): void;
}
Expand All @@ -110,15 +110,15 @@ export class EthereumProvider {
host: string;
registerEventListeners(): void;

send(method: string, parameters: any[]): Promise<object>;
send(method: string, parameters: any[]): Promise<any>;

sendBatch(methods: AbstractMethod[], moduleInstance: AbstractWeb3Module): Promise<object[]>;
sendBatch(methods: AbstractMethod[], moduleInstance: AbstractWeb3Module): Promise<any[]>;

subscribe(subscribeMethod: string, subscriptionMethod: string, parameters: any[]): Promise<string>;

unsubscribe(subscriptionId: string, unsubscribeMethod: string): Promise<boolean>;

clearSubscriptions(unsubscribeMethod: string): Promise<boolean>
clearSubscriptions(unsubscribeMethod: string): Promise<boolean>;

on(type: string, callback: () => void): void;

Expand Down

0 comments on commit eb1d5d4

Please sign in to comment.