# z.tempo.SignatureEnvelope.KeychainRpc

RPC keychain signature envelope schema.

## Imports

```ts
import { z } from 'ox/zod'

z.tempo.SignatureEnvelope.KeychainRpc
```

## Definition

```ts
export const KeychainRpc = z
  .object({
    keyId: z.optional(z_Address.Address),
    // `signature` is recursive; type the getter concretely to break the cycle.
    signature: z.lazy(
      (): z.ZodMiniType<core_SignatureEnvelope.SignatureEnvelopeRpc> =>
        Rpc as never,
    ),
    type: z.literal('keychain'),
    userAddress: z_Address.Address,
    version: z.optional(KeychainVersion),
  })
  .check(
    z.refine((value) => {
      try {
        core_SignatureEnvelope.fromRpc(value)
        return true
      } catch {
        return false
      }
    }, 'multisig access keys require keychain V2'),
  )
```

**Source:** [src/zod/tempo/SignatureEnvelope.ts](https://github.com/wevm/ox/blob/main/src/zod/tempo/SignatureEnvelope.ts)
