From 44abf283ec80cbb33f0b6aad12cd1a7dc657debd Mon Sep 17 00:00:00 2001 From: Leonid Logvinov Date: Tue, 3 Oct 2017 15:50:25 +0300 Subject: Add keccak256 on web3_wrapper --- src/web3_wrapper.ts | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/web3_wrapper.ts') diff --git a/src/web3_wrapper.ts b/src/web3_wrapper.ts index 653205988..7576f3d40 100644 --- a/src/web3_wrapper.ts +++ b/src/web3_wrapper.ts @@ -112,6 +112,10 @@ export class Web3Wrapper { const logs = await this.sendRawPayloadAsync(payload); return logs; } + public keccak256(data: string): string { + const hash = this.web3.sha3(data); + return hash; + } private getContractInstance(abi: Web3.ContractAbi, address: string): A { const web3ContractInstance = this.web3.eth.contract(abi).at(address); const contractInstance = new Contract(web3ContractInstance, this.defaults) as any as A; -- cgit