aboutsummaryrefslogtreecommitdiffstats
path: root/rpc/api/api.go
diff options
context:
space:
mode:
authorBas van Kervel <bas@ethdev.com>2015-06-22 18:47:32 +0800
committerBas van Kervel <bas@ethdev.com>2015-06-22 18:47:32 +0800
commit2e0b56a72b3eafc89938003da29c06496ac9ad4e (patch)
treeeba3eb3a822da0ba7de98d9c7b6dc8601a63db0a /rpc/api/api.go
parent2737baa6577a337f33f020d587af100c9bda3585 (diff)
downloadgo-tangerine-2e0b56a72b3eafc89938003da29c06496ac9ad4e.tar
go-tangerine-2e0b56a72b3eafc89938003da29c06496ac9ad4e.tar.gz
go-tangerine-2e0b56a72b3eafc89938003da29c06496ac9ad4e.tar.bz2
go-tangerine-2e0b56a72b3eafc89938003da29c06496ac9ad4e.tar.lz
go-tangerine-2e0b56a72b3eafc89938003da29c06496ac9ad4e.tar.xz
go-tangerine-2e0b56a72b3eafc89938003da29c06496ac9ad4e.tar.zst
go-tangerine-2e0b56a72b3eafc89938003da29c06496ac9ad4e.zip
added RPC start/stop support
Diffstat (limited to 'rpc/api/api.go')
-rw-r--r--rpc/api/api.go43
1 files changed, 1 insertions, 42 deletions
diff --git a/rpc/api/api.go b/rpc/api/api.go
index 10b448594..ca1ccb9a5 100644
--- a/rpc/api/api.go
+++ b/rpc/api/api.go
@@ -1,51 +1,10 @@
package api
import (
- "strings"
-
"github.com/ethereum/go-ethereum/rpc/shared"
)
-const (
- AdminApiName = "admin"
- EthApiName = "eth"
- DbApiName = "db"
- DebugApiName = "debug"
- MergedApiName = "merged"
- MinerApiName = "miner"
- NetApiName = "net"
- ShhApiName = "shh"
- TxPoolApiName = "txpool"
- PersonalApiName = "personal"
- Web3ApiName = "web3"
-
- JsonRpcVersion = "2.0"
-)
-
-var (
- // All API's
- AllApis = strings.Join([]string{
- AdminApiName, DbApiName, EthApiName, DebugApiName, MinerApiName, NetApiName,
- ShhApiName, TxPoolApiName, PersonalApiName, Web3ApiName,
- }, ",")
-)
-
-// Ethereum RPC API interface
-type EthereumApi interface {
- // API identifier
- Name() string
-
- // API version
- ApiVersion() string
-
- // Execute the given request and returns the response or an error
- Execute(*shared.Request) (interface{}, error)
-
- // List of supported RCP methods this API provides
- Methods() []string
-}
-
// Merge multiple API's to a single API instance
-func Merge(apis ...EthereumApi) EthereumApi {
+func Merge(apis ...shared.EthereumApi) shared.EthereumApi {
return newMergedApi(apis...)
}