restructured eth rpc API

This commit is contained in:
Bas van Kervel
2015-06-08 10:23:54 +02:00
committed by Bas van Kervel
parent 7e41d7ac51
commit 348f1562e2
3 changed files with 122 additions and 0 deletions

View File

@ -11,6 +11,10 @@ import (
"github.com/ethereum/go-ethereum/xeth"
)
const (
EthApiVersion = "1.0"
)
// eth api provider
// See https://github.com/ethereum/wiki/wiki/JSON-RPC
type ethApi struct {
@ -97,6 +101,10 @@ func (self *ethApi) Name() string {
return EthApiName
}
func (self *ethApi) ApiVersion() string {
return EthApiVersion
}
func (self *ethApi) Accounts(req *shared.Request) (interface{}, error) {
return self.xeth.Accounts(), nil
}