7 lines
195 B
TypeScript
Raw Permalink Normal View History

2024-10-15 23:05:53 +03:00
import { keccak256 } from "@ethersproject/keccak256";
import { toUtf8Bytes } from "@ethersproject/strings";
export function id(text: string): string {
return keccak256(toUtf8Bytes(text));
}