> **Can't find what you're looking for?** Use `search_docs` on the docs MCP server at `https://ensforge.com/api/mcp` to find what you need.

# verifyHcaSignature

Validate a signature; RPC failures remain errors.

## Import

```ts
import { Ensforge } from "@ensforge/sdk";
```

## Usage

Use the digest and encoded signature returned by your HCA signer in `signed-message.ts`.

:::code-group
```ts [index.ts]
import { sdk } from "./client";
import { signedMessage } from "./signed-message";

const result = await sdk.hca.verifyHcaSignature({
  hca: "0x1234567890123456789012345678901234567890",
  hash: signedMessage.hash,
  signature: signedMessage.signature,
});
```

```ts [client.ts]
// [!include ~/snippets/hca/client.ts]
```
:::

## Parameters

```ts
import type { HcaReadParameters } from "@ensforge/sdk/hca";
```

### hca

`` `0x${string}` ``

HCA address to inspect or operate on.

### hash

`` `0x${string}` ``

Digest to inspect or verify.

### signature

`` `0x${string}` ``

Encoded signature to validate.

### sender

`` `0x${string}` | undefined ``

Caller address used during signature verification.

### blockNumber

`bigint | undefined`

Block number to read. Cannot be combined with blockTag.

### blockTag

`BlockTag | undefined`

Named block state to read. Cannot be combined with blockNumber.

## Return Type

```ts
type VerifyHcaSignatureResult = Awaited<ReturnType<typeof sdk.hca.verifyHcaSignature>>;
```

Returns `boolean`.

## Effect

Use `.effect` when composing the method in an Effect program. The success and error channels remain
fully typed.

```ts
import { Effect } from "effect";

const program = sdk.hca.verifyHcaSignature.effect({
  hca: "0x1234567890123456789012345678901234567890",
  hash: signedMessage.hash,
  signature: signedMessage.signature,
});

type Success = Effect.Success<typeof program>;
type Failure = Effect.Error<typeof program>;

const result = await Effect.runPromise(program);
```

## Request

Use `.request` to describe the read without executing it, then include it in a typed
[read batch](/core/guides/batching).

```ts
const request = sdk.hca.verifyHcaSignature.request({
  hca: "0x1234567890123456789012345678901234567890",
  hash: signedMessage.hash,
  signature: signedMessage.signature,
});
```

## Error

The method rejects with the corresponding Core action errors. Use `.effect` to keep those failures
in the typed Effect error channel.

See [Error Handling](/sdk/guides/error-handling).

## Action

* [`verifyHcaSignature`](/core/api/actions/hca/verify-hca-signature)
* [Guide](/core/guides/hca)
