# z.RpcSchema

## Schemas

| Name | Description |
| --- | --- |
| [`Default`](/zod/jsonrpc/RpcSchema/Default) | JSON-RPC method schemas for the `eth_` and `wallet_` namespaces. |
| [`Eth`](/zod/jsonrpc/RpcSchema/Eth) | JSON-RPC method schemas for the `eth_` namespace. |
| [`parse`](/zod/jsonrpc/RpcSchema/parse) | Alias for `RpcSchema.decodeRequest`. |
| [`Wallet`](/zod/jsonrpc/RpcSchema/Wallet) | JSON-RPC method schemas for the `wallet_` namespace. |

## Functions

| Name | Description |
| --- | --- |
| [`decodeParams`](/zod/jsonrpc/RpcSchema/decodeParams) | Decodes (wire → native) the `params` for a method. Use on the receiving side (e.g. a server) to coerce incoming wire params into their native representation. Accepts either a namespace + method name, or a resolved `RpcSchema.Item` (from `parseItem`/`from`). |
| [`decodeParams`](/zod/jsonrpc/RpcSchema/decodeParams) |  |
| [`decodeRequest`](/zod/jsonrpc/RpcSchema/decodeRequest) | Decodes (wire → native) a full JSON-RPC request (`{ method, params }`) against a namespace, dispatching on `method`. |
| [`decodeReturns`](/zod/jsonrpc/RpcSchema/decodeReturns) | Decodes (wire → native) the `returns` value for a method. Use on the receiving side (e.g. a client) to coerce a wire result into its native representation. Accepts either a namespace + method name, or a resolved `RpcSchema.Item` (from `parseItem`/`from`). |
| [`decodeReturns`](/zod/jsonrpc/RpcSchema/decodeReturns) |  |
| [`encodeParams`](/zod/jsonrpc/RpcSchema/encodeParams) | Encodes (native → wire) the `params` for a method. Use on the sending side (e.g. a client) to serialize native params into the wire shape a JSON-RPC endpoint expects. Accepts either a namespace + method name, or a resolved `RpcSchema.Item` (from `parseItem`/`from`). |
| [`encodeParams`](/zod/jsonrpc/RpcSchema/encodeParams) |  |
| [`encodeRequest`](/zod/jsonrpc/RpcSchema/encodeRequest) | Encodes (native → wire) a full JSON-RPC request (`{ method, params }`) against a namespace, dispatching on `method`. |
| [`encodeReturns`](/zod/jsonrpc/RpcSchema/encodeReturns) | Encodes (native → wire) the `returns` value for a method. Use on the sending side (e.g. a server) to serialize a native result into the wire shape. Accepts either a namespace + method name, or a resolved `RpcSchema.Item` (from `parseItem`/`from`). |
| [`encodeReturns`](/zod/jsonrpc/RpcSchema/encodeReturns) |  |
| [`from`](/zod/jsonrpc/RpcSchema/from) | Instantiates JSON-RPC method schema(s) from Zod `params`/`returns` schemas. |
| [`from`](/zod/jsonrpc/RpcSchema/from) |  |
| [`parseItem`](/zod/jsonrpc/RpcSchema/parseItem) | Looks up the `RpcSchema.Item` for a method on a namespace. Resolve a method once and pass the item to the `decode*`/`encode*` codecs to encode params and decode returns without repeating the namespace and method name. |

## Types

| Name | Description |
| --- | --- |
| [`Item`](/zod/jsonrpc/RpcSchema/types#zrpcschemaitem) | A single JSON-RPC method schema. Holds the Zod schemas for a method's `params` and `returns`, plus a derived `request` (`{ method, params }`) schema used to build discriminated-union request envelopes. |
| [`MethodName`](/zod/jsonrpc/RpcSchema/types#zrpcschemamethodname) | Extracts the method names of a `RpcSchema.Namespace`. |
| [`Namespace`](/zod/jsonrpc/RpcSchema/types#zrpcschemanamespace) | A namespace of JSON-RPC method schemas, keyed by method name. |
| [`RequestInput`](/zod/jsonrpc/RpcSchema/types#zrpcschemarequestinput) | Wire (input) request envelope for a namespace. |
| [`RequestOutput`](/zod/jsonrpc/RpcSchema/types#zrpcschemarequestoutput) | Decoded (output) request envelope for a namespace. |

## Errors

| Name | Description |
| --- | --- |
| [`MethodNotFoundError`](/zod/jsonrpc/RpcSchema/errors#zrpcschemamethodnotfounderror) | Thrown when a method does not exist on a namespace. |
