quartz/wallet/node_modules/@ethersproject/hash/src.ts/id.ts
2022-03-04 20:05:23 +08:00

7 lines
195 B
TypeScript

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