removed old rpc structure and added new inproc api client
This commit is contained in:
@ -9,16 +9,32 @@ import (
|
||||
"github.com/ethereum/go-ethereum/rpc/api"
|
||||
"github.com/ethereum/go-ethereum/rpc/codec"
|
||||
"github.com/ethereum/go-ethereum/rpc/shared"
|
||||
"strings"
|
||||
)
|
||||
|
||||
const (
|
||||
jsonrpcver = "2.0"
|
||||
maxHttpSizeReqLength = 1024 * 1024 // 1MB
|
||||
)
|
||||
|
||||
var (
|
||||
// List with all API's which are offered over the in proc interface by default
|
||||
DefaultInProcApis = api.AllApis
|
||||
|
||||
// List with all API's which are offered over the IPC interface by default
|
||||
DefaultIpcApis = api.AllApis
|
||||
|
||||
// List with API's which are offered over thr HTTP/RPC interface by default
|
||||
DefaultHttpRpcApis = strings.Join([]string{
|
||||
api.DbApiName, api.EthApiName, api.NetApiName, api.Web3ApiName,
|
||||
}, ",")
|
||||
)
|
||||
|
||||
type EthereumClient interface {
|
||||
// Close underlaying connection
|
||||
Close()
|
||||
// Send request
|
||||
Send(interface{}) error
|
||||
// Receive response
|
||||
Recv() (interface{}, error)
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user