Skip to content

ECDSA Signer

The ECDSA signer signs with a single ECDSA key, specifically with the secp256k1 curve, which is the same algorithm that EOAs use.

API

import { toECDSASigner } from "@zerodev/permissions/signers"
 
// Use any Viem account
const signer = privateKeyToAccount(generatePrivateKey())
 
const ecdsaSigner = await toECDSASigner({
  signer,
})
 
const validator = toPermissionValidator(publicClient, {
  entryPoint,
  kernelVersion,
  signer: ecdsaSigner,
  policies: [
    // ...
  ],
})