@@ -3,6 +3,17 @@ import * as Constants from './Constants.ts'
33
44const abiCoder = ethers . AbiCoder . defaultAbiCoder ( )
55
6+ /**
7+ * Verifies a `signature` for a given `address` and `digest`.
8+ *
9+ * @deprecated Use `verifyHash` from `viem/actions` instead.
10+ *
11+ * @param provider - The ethers.AbstractProvider to use for verification.
12+ * @param address - The address of the signer.
13+ * @param digest - The digest to verify.
14+ * @param signature - The signature to verify.
15+ * @returns Whether the signature is valid.
16+ */
617export async function verifyHash (
718 provider : ethers . AbstractProvider ,
819 address : string ,
@@ -23,6 +34,17 @@ export async function verifyHash(
2334 return verifyEcdsa ( address , digest , signature )
2435}
2536
37+ /**
38+ * Verifies a `signature` for a given `address` and `message`.
39+ *
40+ * @deprecated Use `verifyMessage` from `viem/actions` instead.
41+ *
42+ * @param provider - The ethers.AbstractProvider to use for verification.
43+ * @param address - The address of the signer.
44+ * @param message - The message to verify.
45+ * @param signature - The signature to verify.
46+ * @returns Whether the signature is valid.
47+ */
2648export async function verifyMessage (
2749 provider : ethers . AbstractProvider ,
2850 address : string ,
@@ -33,6 +55,19 @@ export async function verifyMessage(
3355 return verifyHash ( provider , address , digest , signature )
3456}
3557
58+ /**
59+ * Verifies a `signature` for a given `address` and `typedData`.
60+ *
61+ * @deprecated Use `verifyTypedData` from `viem/actions` instead.
62+ *
63+ * @param provider - The ethers.AbstractProvider to use for verification.
64+ * @param address - The address of the signer.
65+ * @param domain - The domain of the typed data.
66+ * @param types - The types of the typed data.
67+ * @param value - The value of the typed data.
68+ * @param signature - The signature to verify.
69+ * @returns Whether the signature is valid.
70+ */
3671export async function verifyTypedData (
3772 provider : ethers . AbstractProvider ,
3873 address : string ,
0 commit comments