2018-08-03 03:43:09 +03:00
|
|
|
import { BaseProvider } from './base-provider';
|
2018-07-31 01:59:52 +03:00
|
|
|
import { Signer } from '../wallet/abstract-signer';
|
|
|
|
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-24 02:21:42 +03:00
|
|
|
export declare class JsonRpcSigner extends Signer {
|
|
|
|
readonly provider: JsonRpcProvider;
|
|
|
|
private _address;
|
2018-07-31 01:59:52 +03:00
|
|
|
constructor(constructorGuard: any, provider: JsonRpcProvider, address?: string);
|
2018-07-24 02:21:42 +03:00
|
|
|
readonly address: string;
|
|
|
|
getAddress(): Promise<string>;
|
|
|
|
getBalance(blockTag?: BlockTag): Promise<BigNumber>;
|
|
|
|
getTransactionCount(blockTag?: BlockTag): Promise<number>;
|
|
|
|
sendTransaction(transaction: TransactionRequest): Promise<TransactionResponse>;
|
|
|
|
signMessage(message: Arrayish | string): Promise<string>;
|
|
|
|
unlock(password: string): Promise<boolean>;
|
|
|
|
}
|
2018-08-03 03:43:09 +03:00
|
|
|
export declare class JsonRpcProvider extends BaseProvider {
|
2018-07-24 02:21:42 +03:00
|
|
|
readonly connection: ConnectionInfo;
|
|
|
|
private _pendingFilter;
|
|
|
|
constructor(url?: ConnectionInfo | string, network?: Networkish);
|
|
|
|
getSigner(address?: string): JsonRpcSigner;
|
|
|
|
listAccounts(): Promise<Array<string>>;
|
|
|
|
send(method: string, params: any): Promise<any>;
|
|
|
|
perform(method: string, params: any): Promise<any>;
|
|
|
|
protected _startPending(): void;
|
|
|
|
protected _stopPending(): void;
|
|
|
|
static hexlifyTransaction(transaction: TransactionRequest): any;
|
|
|
|
}
|