Documentation ¶
Overview ¶
Package rpc contains RPC handler methods, namespaces and utilities to start Ethermint's Web3-compatible JSON-RPC server.
The list of available namespaces are:
* `rpc/namespaces/eth`: `eth` namespace. Exposes the `PublicEthereumAPI` and the `PublicFilterAPI`. * `rpc/namespaces/personal`: `personal` namespace. Exposes the `PrivateAccountAPI`. * `rpc/namespaces/net`: `net` namespace. Exposes the `PublicNetAPI`. * `rpc/namespaces/web3`: `web3` namespace. Exposes the `PublicWeb3API`
Index ¶
Constants ¶
const ( Web3Namespace = "web3" EthNamespace = "eth" PersonalNamespace = "personal" NetNamespace = "net" TxpoolNamespace = "txpool" DebugNamespace = "debug" )
RPC namespaces and API version
const ( FlagWebsocket = "wsport" FlagPersonalAPI = "personal-api" FlagDebugAPI = "debug-api" FlagRateLimitAPI = "rpc.rate-limit-api" FlagRateLimitCount = "rpc.rate-limit-count" FlagRateLimitBurst = "rpc.rate-limit-burst" FlagDisableAPI = "rpc.disable-api" FlagKafkaAddr = "pendingtx.kafka-addr" FlagKafkaTopic = "pendingtx.kafka-topic" FlagNacosTmrpcUrls = "rpc.tmrpc_nacos_urls" FlagNacosTmrpcNamespaceID = "rpc.tmrpc_nacos_namespace_id" FlagNacosTmrpcAppName = "rpc.tmrpc_application_name" FlagRpcExternalAddr = "rpc.external_laddr" FlagRestApplicationName = "rest.application_name" FlagRestNacosUrls = "rest.nacos_urls" FlagRestNacosNamespaceId = "rest.nacos_namespace_id" FlagExternalListenAddr = "rest.external_laddr" )
Variables ¶
This section is empty.
Functions ¶
func CloseEthBackend ¶
func CloseEthBackend()
func GetAPIs ¶
func GetAPIs(clientCtx context.CLIContext, log log.Logger, keys ...ethsecp256k1.PrivKey) []rpc.API
GetAPIs returns the list of all APIs from the Ethereum namespaces
func RegisterRoutes ¶
func RegisterRoutes(rs *lcd.RestServer)
RegisterRoutes creates a new server and registers the `/rpc` endpoint. Rpc calls are enabled based on their associated module (eg. "eth").
func ServeCmd ¶
func ServeCmd(cdc *codec.CodecProxy, reg types.InterfaceRegistry) *cobra.Command
ServeCmd creates a CLI command to start Cosmos REST server with web3 RPC API and Cosmos rest-server endpoints
Types ¶
This section is empty.