aboutsummaryrefslogtreecommitdiffstats
path: root/packages/web3-wrapper/src/web3_wrapper.ts
diff options
context:
space:
mode:
authorFabio Berger <me@fabioberger.com>2018-07-24 23:13:21 +0800
committerFabio Berger <me@fabioberger.com>2018-07-24 23:13:21 +0800
commit56f21f4bab2fd844961eb3f8366a421660d04706 (patch)
tree287b86096263641b9d0c3e7441dfdeb85e1ebb93 /packages/web3-wrapper/src/web3_wrapper.ts
parent9a36e73f4ed62871b2c39d129de0ac2c04aeba2b (diff)
parenta05b14e4d9659be1cc495ee33fd8962ce773f87f (diff)
downloaddexon-sol-tools-56f21f4bab2fd844961eb3f8366a421660d04706.tar
dexon-sol-tools-56f21f4bab2fd844961eb3f8366a421660d04706.tar.gz
dexon-sol-tools-56f21f4bab2fd844961eb3f8366a421660d04706.tar.bz2
dexon-sol-tools-56f21f4bab2fd844961eb3f8366a421660d04706.tar.lz
dexon-sol-tools-56f21f4bab2fd844961eb3f8366a421660d04706.tar.xz
dexon-sol-tools-56f21f4bab2fd844961eb3f8366a421660d04706.tar.zst
dexon-sol-tools-56f21f4bab2fd844961eb3f8366a421660d04706.zip
Merge v2-prototype
Diffstat (limited to 'packages/web3-wrapper/src/web3_wrapper.ts')
-rw-r--r--packages/web3-wrapper/src/web3_wrapper.ts14
1 files changed, 14 insertions, 0 deletions
diff --git a/packages/web3-wrapper/src/web3_wrapper.ts b/packages/web3-wrapper/src/web3_wrapper.ts
index 883a99bb4..dd35e2094 100644
--- a/packages/web3-wrapper/src/web3_wrapper.ts
+++ b/packages/web3-wrapper/src/web3_wrapper.ts
@@ -14,6 +14,7 @@ import {
Provider,
RawLogEntry,
TraceParams,
+ Transaction,
TransactionReceipt,
TransactionReceiptWithDecodedLogs,
TransactionTrace,
@@ -221,6 +222,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
* @returns Balance in wei