# Secp256k1 Errors

## `Secp256k1.InvalidInputError`

Thrown when libsecp256k1 rejects a key or recovered signature.

### Examples

```ts twoslash
import { Secp256k1 } from 'ox/wasm'

try {
  const engine = await Secp256k1.engine()
  engine.getPublicKey(new Uint8Array(32))
} catch (error) {
  if (error instanceof Secp256k1.InvalidInputError)
    console.error(error.message)
}
```

**Source:** [src/wasm/Secp256k1.ts](https://github.com/wevm/ox/blob/main/src/wasm/Secp256k1.ts#L242)

## `Secp256k1.MemoryError`

Thrown when a WASM module cannot grow its memory to the required size.

**Source:** [src/wasm/internal/instantiate.ts](https://github.com/wevm/ox/blob/main/src/wasm/internal/instantiate.ts#L143)
