Commit 1fe617fa authored by Bas van Kervel's avatar Bas van Kervel Committed by Bas van Kervel

added net API

parent 87dace1f
...@@ -7,6 +7,10 @@ import ( ...@@ -7,6 +7,10 @@ import (
"github.com/ethereum/go-ethereum/xeth" "github.com/ethereum/go-ethereum/xeth"
) )
const (
NetApiVersion = "1.0"
)
var ( var (
// mapping between methods and handlers // mapping between methods and handlers
netMapping = map[string]nethandler{ netMapping = map[string]nethandler{
...@@ -62,6 +66,10 @@ func (self *netApi) Name() string { ...@@ -62,6 +66,10 @@ func (self *netApi) Name() string {
return NetApiName return NetApiName
} }
func (self *netApi) ApiVersion() string {
return NetApiVersion
}
// Network version // Network version
func (self *netApi) Version(req *shared.Request) (interface{}, error) { func (self *netApi) Version(req *shared.Request) (interface{}, error) {
return self.xeth.NetworkVersion(), nil return self.xeth.NetworkVersion(), nil
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment