import { Schema } from 'effect'; import { Address } from 'viem'; declare const baseEIP712: Schema.Struct<{ domain: Schema.Struct<{ chainId: typeof Schema.BigInt; name: typeof Schema.String; version: typeof Schema.String; verifyingContract: Schema.optional>; }>; primaryType: typeof Schema.String; types: Schema.Record$>>; }>; type BaseEIP712 = typeof baseEIP712.Type; /** * An EIP-712 typed data payload with a generic `message` field. * * Extends the base EIP-712 structure (domain, primaryType, types) with * a strongly-typed `message` object for signing. * * @typeParam Message - The shape of the application-specific message to sign. */ export interface EIP712 extends BaseEIP712 { message: Message; } /** * Creates an EIP-712 typed data payload for user signing. * * Used to verify the user controls the private key corresponding to the ephemeral * public key embedded in the payload. The `message` keys must exactly match the * `name` values in `primaryTypeFields`. * * @typeParam PrimaryType - The EIP-712 primary type name. * @typeParam Message - The shape of the message to sign. * @param params.chainId - The chain ID for the EIP-712 domain. * @param params.primaryType - The primary type name (e.g. `"Reencrypt"`). * @param params.primaryTypeFields - The field definitions for the primary type. * @param params.message - The message object to sign (must match `primaryTypeFields`). * @param params.verifyingContract - Optional verifying contract address for the domain. * @param params.domainName - Human-readable name for the EIP-712 domain. * @param params.domainVersion - Version string for the EIP-712 domain. * @returns A complete {@link EIP712} payload ready for signing. * @throws If message keys do not match `primaryTypeFields` names. */ export declare function createEIP712Payload({ chainId, primaryType, primaryTypeFields, message, verifyingContract, domainName, domainVersion, }: { chainId: bigint; primaryType: PrimaryType; primaryTypeFields: BaseEIP712['types'][PrimaryType]; message: Message; verifyingContract?: Address; domainName: string; domainVersion: string; }): EIP712; export {};