import type { Struct } from "@metamask/superstruct"; import type { Hex } from "@metamask/utils"; /** * Validates address format, checks user eth_accounts permissions. * * @param address - The Ethereum address to validate and normalize. * @param origin - The origin string for permission checking. * @param getPermittedAccountsForOrigin - Function to retrieve permitted accounts for the origin. * @returns A normalized (lowercase) hex address if valid and authorized. * @throws JsonRpcError with unauthorized error if the requester doesn't have permission to access the address. * @throws JsonRpcError with invalid params if the address format is invalid. */ export declare function validateAndNormalizeAddress(address: Hex, origin: string, getPermittedAccountsForOrigin: (origin: string) => Promise): Promise; /** * Validates parameters against a Superstruct schema and throws an error if validation fails. * * @param value - The value to validate against the struct schema. * @param struct - The Superstruct schema to validate against. * @throws JsonRpcError with invalid params if the value doesn't match the struct schema. */ export declare function validateParams(value: unknown | ParamsType, struct: Struct): asserts value is ParamsType; //# sourceMappingURL=utils.d.cts.map