forked from cerc-io/laconicd-deprecated
284c2a0333
- Introduces rpc command to cli (rest-server) - Moves server/rpc to rpc/ - Enables module selection (eg. "web3" or "eth" or "web3,eth"), however there is no CLI flag to configure these (See #74) - Adds CLI context to eth API
25 lines
524 B
Go
25 lines
524 B
Go
// Package rpc contains RPC handler methods and utilities to start
|
|
// Ethermint's Web3-compatibly JSON-RPC server.
|
|
package rpc
|
|
|
|
import (
|
|
"github.com/cosmos/cosmos-sdk/client/context"
|
|
"github.com/ethereum/go-ethereum/rpc"
|
|
)
|
|
|
|
// GetRPCAPIs returns the list of all APIs
|
|
func GetRPCAPIs(cliCtx context.CLIContext) []rpc.API {
|
|
return []rpc.API{
|
|
{
|
|
Namespace: "web3",
|
|
Version: "1.0",
|
|
Service: NewPublicWeb3API(),
|
|
},
|
|
{
|
|
Namespace: "eth",
|
|
Version: "1.0",
|
|
Service: NewPublicEthAPI(cliCtx),
|
|
},
|
|
}
|
|
}
|