# RpcSchema

Utility types for working with Ethereum JSON-RPC namespaces & schemas.

## Functions

| Name                | Description                         |
| ------------------- | ----------------------------------- |
| [`RpcSchema.from`](/api/RpcSchema/from) | Instantiates a statically typed Schema. This is a runtime-noop function, and is purposed to be used as a type-level tag to be used with [`Provider.from`](/api/Provider/from) or [`RpcTransport.fromHttp`](/api/RpcTransport/fromHttp). |

## Types

| Name                | Description                         |
| ------------------- | ----------------------------------- |
| [`RpcSchema.Default`](/api/RpcSchema/types#rpcschemadefault) | Type-safe union of all JSON-RPC Methods. |
| [`RpcSchema.Eth`](/api/RpcSchema/types#rpcschemaeth) | Union of all JSON-RPC Methods for the `eth_` namespace. |
| [`RpcSchema.ExtractItem`](/api/RpcSchema/types#rpcschemaextractitem) | Extracts a schema item from a [`RpcSchema.Generic`](/api/RpcSchema/types#generic) or [`RpcSchema.MethodNameGeneric`](/api/RpcSchema/types#methodnamegeneric). |
| [`RpcSchema.ExtractMethodName`](/api/RpcSchema/types#rpcschemaextractmethodname) | Type-safe union of all JSON-RPC Method Names. |
| [`RpcSchema.ExtractParams`](/api/RpcSchema/types#rpcschemaextractparams) | Extracts parameters from a [`RpcSchema.Generic`](/api/RpcSchema/types#generic) or [`RpcSchema.MethodNameGeneric`](/api/RpcSchema/types#methodnamegeneric). |
| [`RpcSchema.ExtractRequest`](/api/RpcSchema/types#rpcschemaextractrequest) | Extracts request from a [`RpcSchema.Generic`](/api/RpcSchema/types#generic) or [`RpcSchema.MethodNameGeneric`](/api/RpcSchema/types#methodnamegeneric). |
| [`RpcSchema.ExtractReturnType`](/api/RpcSchema/types#rpcschemaextractreturntype) | Extracts return type from a [`RpcSchema.Generic`](/api/RpcSchema/types#generic) or [`RpcSchema.MethodNameGeneric`](/api/RpcSchema/types#methodnamegeneric). |
| [`RpcSchema.From`](/api/RpcSchema/types#rpcschemafrom) | Type to define a custom type-safe JSON-RPC Schema. |
| [`RpcSchema.FromViem`](/api/RpcSchema/types#rpcschemafromviem) | Converts a [Viem-compatible RPC schema](https://viem.sh) (tuple of `{ Method, Parameters, ReturnType }`) to an Ox [`RpcSchema.Generic`](/api/RpcSchema/types#generic) (union of `{ Request, ReturnType }`). |
| [`RpcSchema.Generic`](/api/RpcSchema/types#rpcschemageneric) | Generic type to define a JSON-RPC Method. |
| [`RpcSchema.MethodNameGeneric`](/api/RpcSchema/types#rpcschemamethodnamegeneric) | Generic type to define a JSON-RPC Method Name. |
| [`RpcSchema.ToViem`](/api/RpcSchema/types#rpcschematoviem) | Converts an Ox [`RpcSchema.Generic`](/api/RpcSchema/types#generic) (union of `{ Request, ReturnType }`) to a [Viem-compatible RPC schema](https://viem.sh) (tuple of `{ Method, Parameters, ReturnType }`). |
| [`RpcSchema.Wallet`](/api/RpcSchema/types#rpcschemawallet) | Union of all JSON-RPC Methods for the `wallet_` namespace. |
