Merge branch 'v2-prototype' of https://github.com/0xProject/0x-monorepo into feature/web3-wrapper/unexport-marshaller

This commit is contained in:
fragosti
2018-07-25 10:33:13 -07:00
177 changed files with 4719 additions and 4047 deletions

View File

@@ -14,6 +14,7 @@ import {
Provider,
RawLogEntry,
TraceParams,
Transaction,
TransactionReceipt,
TransactionReceiptWithDecodedLogs,
TransactionTrace,
@@ -220,6 +221,19 @@ export class Web3Wrapper {
}
return transactionReceipt;
}
/**
* Retrieves the transaction data for a given transaction
* @param txHash Transaction hash
* @returns The raw transaction data
*/
public async getTransactionByHashAsync(txHash: string): Promise<Transaction> {
assert.isHexString('txHash', txHash);
const transaction = await this._sendRawPayloadAsync<Transaction>({
method: 'eth_getTransactionByHash',
params: [txHash],
});
return transaction;
}
/**
* Retrieves an accounts Ether balance in wei
* @param owner Account whose balance you wish to check
@@ -291,7 +305,6 @@ export class Web3Wrapper {
* @returns Signature string (might be VRS or RSV depending on the Signer)
*/
public async signMessageAsync(address: string, message: string): Promise<string> {
assert.isETHAddressHex('address', address);
assert.isETHAddressHex('address', address);
assert.isString('message', message); // TODO: Should this be stricter? Hex string?
const signData = await this._sendRawPayloadAsync<string>({