2
0
mirror of synced 2025-02-24 20:18:07 +00:00

10 lines
211 B
TypeScript
Raw Normal View History

2019-05-14 18:25:46 -04:00
"use strict";
2019-06-24 21:12:54 -04:00
import sha3 from "js-sha3";
2019-05-14 18:25:46 -04:00
import { arrayify, BytesLike } from "@ethersproject/bytes";
export function keccak256(data: BytesLike): string {
return '0x' + sha3.keccak_256(arrayify(data));
}