ethers.js/packages/hash/src.ts/id.ts
2022-04-11 17:09:17 -04:00

7 lines
194 B
TypeScript

import { keccak256 } from "@ethersproject/crypto";
import { toUtf8Bytes } from "@ethersproject/strings";
export function id(value: string): string {
return keccak256(toUtf8Bytes(value));
}