ethers.js/packages/hash/src.ts/id.ts

7 lines
194 B
TypeScript
Raw Permalink Normal View History

2022-04-11 17:09:17 -04:00
import { keccak256 } from "@ethersproject/crypto";
import { toUtf8Bytes } from "@ethersproject/strings";
export function id(value: string): string {
return keccak256(toUtf8Bytes(value));
}