2018-08-02 20:43:09 -04:00
|
|
|
import { BaseProvider } from './base-provider';
|
2018-09-24 16:07:14 -04:00
|
|
|
import { Signer } from '../abstract-signer';
|
2018-07-30 18:59:52 -04:00
|
|
|
import { BigNumber } from '../utils/bignumber';
|
|
|
|
import { Arrayish } from '../utils/bytes';
|
|
|
|
import { Networkish } from '../utils/networks';
|
|
|
|
import { ConnectionInfo } from '../utils/web';
|
|
|
|
import { BlockTag, TransactionRequest, TransactionResponse } from '../providers/abstract-provider';
|
2018-07-23 19:21:42 -04:00
|
|
|
export declare class JsonRpcSigner extends Signer {
|
|
|
|
readonly provider: JsonRpcProvider;
|
2018-08-03 15:26:01 -04:00
|
|
|
private _index;
|
2018-07-23 19:21:42 -04:00
|
|
|
private _address;
|
2018-08-03 15:26:01 -04:00
|
|
|
constructor(constructorGuard: any, provider: JsonRpcProvider, addressOrIndex?: string | number);
|
2018-07-23 19:21:42 -04:00
|
|
|
getAddress(): Promise<string>;
|
|
|
|
getBalance(blockTag?: BlockTag): Promise<BigNumber>;
|
|
|
|
getTransactionCount(blockTag?: BlockTag): Promise<number>;
|
2018-12-14 18:39:46 -05:00
|
|
|
sendUncheckedTransaction(transaction: TransactionRequest): Promise<string>;
|
2018-07-23 19:21:42 -04:00
|
|
|
sendTransaction(transaction: TransactionRequest): Promise<TransactionResponse>;
|
|
|
|
signMessage(message: Arrayish | string): Promise<string>;
|
|
|
|
unlock(password: string): Promise<boolean>;
|
|
|
|
}
|
2018-08-02 20:43:09 -04:00
|
|
|
export declare class JsonRpcProvider extends BaseProvider {
|
2018-07-23 19:21:42 -04:00
|
|
|
readonly connection: ConnectionInfo;
|
|
|
|
private _pendingFilter;
|
|
|
|
constructor(url?: ConnectionInfo | string, network?: Networkish);
|
2018-08-03 15:26:01 -04:00
|
|
|
getSigner(addressOrIndex?: string | number): JsonRpcSigner;
|
2018-07-23 19:21:42 -04:00
|
|
|
listAccounts(): Promise<Array<string>>;
|
|
|
|
send(method: string, params: any): Promise<any>;
|
|
|
|
perform(method: string, params: any): Promise<any>;
|
|
|
|
protected _startPending(): void;
|
|
|
|
protected _stopPending(): void;
|
2018-10-11 16:50:52 -04:00
|
|
|
static hexlifyTransaction(transaction: TransactionRequest, allowExtra?: {
|
|
|
|
[key: string]: boolean;
|
|
|
|
}): {
|
|
|
|
[key: string]: string;
|
|
|
|
};
|
2018-07-23 19:21:42 -04:00
|
|
|
}
|