laconicd-deprecated/rpc/apis.go
Dustin Brickwood a61f3b892d
Filtering for eth_getLogs (#120)
* Filtered logs based param criteria
* addded PublicFilterAPI
* added filter logs func to filter based on params
* added Unmarshal func from go-ethereum

* Linted

* made requested changes
2019-10-07 22:32:28 -05:00

41 lines
936 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"
emintcrypto "github.com/cosmos/ethermint/crypto"
"github.com/ethereum/go-ethereum/rpc"
)
// GetRPCAPIs returns the list of all APIs
func GetRPCAPIs(cliCtx context.CLIContext, key emintcrypto.PrivKeySecp256k1) []rpc.API {
nonceLock := new(AddrLocker)
return []rpc.API{
{
Namespace: "web3",
Version: "1.0",
Service: NewPublicWeb3API(),
Public: true,
},
{
Namespace: "eth",
Version: "1.0",
Service: NewPublicEthAPI(cliCtx, nonceLock, key),
Public: true,
},
{
Namespace: "personal",
Version: "1.0",
Service: NewPersonalEthAPI(cliCtx, nonceLock),
Public: false,
},
{
Namespace: "eth",
Version: "1.0",
Service: NewPublicFilterAPI(cliCtx),
Public: true,
},
}
}