2018-06-13 15:39:39 -04:00
|
|
|
'use strict';
|
|
|
|
|
|
|
|
import sha3 = require('js-sha3');
|
|
|
|
|
2018-07-16 03:27:49 -04:00
|
|
|
import { arrayify } from './bytes';
|
|
|
|
|
2018-07-30 18:59:52 -04:00
|
|
|
// Imported Types
|
|
|
|
import { Arrayish } from './bytes';
|
2018-06-13 15:39:39 -04:00
|
|
|
|
|
|
|
export function keccak256(data: Arrayish): string {
|
|
|
|
return '0x' + sha3.keccak_256(arrayify(data));
|
|
|
|
}
|
|
|
|
|
|
|
|
//export default keccak256;
|