rpc

package
v0.19.11 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 13, 2021 License: Apache-2.0 Imports: 35 Imported by: 0

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

View Source
const (
	Web3Namespace     = "web3"
	EthNamespace      = "eth"
	PersonalNamespace = "personal"
	NetNamespace      = "net"
	TxpoolNamespace   = "txpool"
)

RPC namespaces and API version

View Source
const (
	FlagPersonalAPI    = "personal-api"
	FlagRateLimitAPI   = "rpc.rate-limit-api"
	FlagRateLimitCount = "rpc.rate-limit-count"
	FlagRateLimitBurst = "rpc.rate-limit-burst"
	FlagEnableMonitor  = "rpc.enable-monitor"
	FlagDisableAPI     = "rpc.disable-api"
	FlagKafkaAddr      = "pendingtx.kafka-addr"
	FlagKafkaTopic     = "pendingtx.kafka-topic"

	MetricsNamespace = "x"
	// MetricsSubsystem is a subsystem shared by all metrics exposed by this package.
	MetricsSubsystem = "rpc"

	MetricsFieldName = "Metrics"
)

Variables

This section is empty.

Functions

func CloseEthBackend added in v0.19.9

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.Codec) *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.

Directories

Path Synopsis
namespaces
eth
net

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL