eip-712
Version:
Tiny library with utility functions that can help with signing and verifying EIP-712 based messages
11 lines (10 loc) • 555 B
TypeScript
/**
* Hashes the data with the optional encoding specified. If no encoding is specified, it is assumed that the data is
* already a Buffer.
*/
export declare const keccak256: (data: string | Uint8Array, encoding?: "utf8" | "hex" | undefined) => Uint8Array;
/**
* Get a string as Buffer, with the optional encoding specified. If no encoding is specified, it is assumed that the
* data is a hexadecimal string. The string can optionally contain the 0x prefix.
*/
export declare const toBuffer: (data: string, encoding?: 'utf8' | 'hex') => Uint8Array;