Skip to content

RpcSchema

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

Functions

NameDescription
RpcSchema.fromInstantiates 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 or RpcTransport.fromHttp.

Types

NameDescription
RpcSchema.DefaultType-safe union of all JSON-RPC Methods.
RpcSchema.EthUnion of all JSON-RPC Methods for the eth_ namespace.
RpcSchema.ExtractItemExtracts a schema item from a RpcSchema.Generic or RpcSchema.MethodNameGeneric.
RpcSchema.ExtractMethodNameType-safe union of all JSON-RPC Method Names.
RpcSchema.ExtractParamsExtracts parameters from a RpcSchema.Generic or RpcSchema.MethodNameGeneric.
RpcSchema.ExtractRequestExtracts request from a RpcSchema.Generic or RpcSchema.MethodNameGeneric.
RpcSchema.ExtractReturnTypeExtracts return type from a RpcSchema.Generic or RpcSchema.MethodNameGeneric.
RpcSchema.FromType to define a custom type-safe JSON-RPC Schema.
RpcSchema.GenericGeneric type to define a JSON-RPC Method.
RpcSchema.MethodNameGenericGeneric type to define a JSON-RPC Method Name.
RpcSchema.WalletUnion of all JSON-RPC Methods for the wallet_ namespace.