import { type Hex } from 'viem'; import { Address } from '../types/ContractTypes'; /** * https://github.com/ethereum/EIPs/blob/master/EIPS/eip-712.md * */ interface LinkedWalletValue { message: string; userID: Address; nonce: bigint; } interface TypedDataField { name: string; type: string; } interface TypedDataDomain { name?: string; version?: string; chainId?: number | bigint; verifyingContract?: Address; } interface Eip712LinkedWalletArgs { domain: TypedDataDomain; nonce: bigint; userID: Address; message: string; } export declare function createEip712LinkedWalletdData({ domain, userID, nonce, message, }: Eip712LinkedWalletArgs): { types: Record; domain: TypedDataDomain; value: LinkedWalletValue; }; export declare function getDomainSeparator(domain: TypedDataDomain): Hex; export declare function toLinkedWalletHash(message: string, address: string, nonce: bigint): Hex; /** * @dev Returns the keccak256 digest of an EIP-712 typed data (EIP-191 version `0x01`). * * The digest is calculated from a `domainSeparator` and a `structHash`, by prefixing them with * `0x1901` and hashing the result. It corresponds to the hash signed by the * https://eips.ethereum.org/EIPS/eip-712[`eth_signTypedData`] JSON-RPC method as part of EIP-712. * * See {ECDSA-recover}. */ export declare function toTypedDataHash(domain: TypedDataDomain, structHash: Hex): Hex; export {}; //# sourceMappingURL=EIP-712.d.ts.map