import * as ox__Signature from "ox/Signature"; import type { Chain } from "../chains/types.js"; import type { ThirdwebClient } from "../client/client.js"; import { type ThirdwebContract } from "../contract/contract.js"; import { type Hex } from "../utils/encoding/hex.js"; export type VerifyHashParams = { hash: Hex; signature: string | Uint8Array | ox__Signature.Signature; address: string; client: ThirdwebClient; chain: Chain; accountFactory?: { address: string; verificationCalldata: Hex; }; }; /** * Verify that an address created the provided signature for a given hash using [ERC-6492](https://eips.ethereum.org/EIPS/eip-6492). This function is interoperable with all wallet types, including EOAs. * This function should rarely be used directly, instead use @see {import("./verify-signature.js")} and @see {import("./verify-typed-data.js")}} * * @param {Hex} options.hash The hash that was signed * @param {string | Uint8Array | Signature} options.signature The signature that was signed * @param {string} options.address The address that signed the hash * @param {ThirdwebClient} options.client The Thirdweb client * @param {Chain} options.chain The chain that the address is on. For an EOA, this can be any chain. * @param {string} [options.accountFactory.address] The address of the account factory that created the account if using a smart account with a custom account factory * @param {Hex} [options.accountFactory.verificationCalldata] The calldata that was used to create the account if using a smart account with a custom account factory * * @returns {Promise} A promise that resolves to `true` if the signature is valid, or `false` otherwise. * * @example * ```ts * import { verifyHash } from "thirdweb/utils"; * const isValid = await verifyHash({ * hash: "0x1234", * signature: "0x1234", * address: "0x1234", * client, * chain, * }); * ``` * * @auth */ export declare function verifyHash({ hash, signature, address, client, chain, accountFactory, }: VerifyHashParams): Promise; export declare function verifyEip1271Signature({ hash, signature, contract, }: { hash: Hex; signature: Hex; contract: ThirdwebContract; }): Promise; //# sourceMappingURL=verify-hash.d.ts.map