aboutsummaryrefslogtreecommitdiffstats
path: root/node/node.go
diff options
context:
space:
mode:
authorBas van Kervel <bas@ethdev.com>2015-10-15 22:07:19 +0800
committerBas van Kervel <bas@ethdev.com>2015-12-14 23:34:05 +0800
commiteae81465c1c815c317cd30e4de6bdf4d59df2340 (patch)
treeb6f4b7787967a58416171adb79fd12ac29d89577 /node/node.go
parent8db9d44ca9fb6baf406256cae491c475de2f4989 (diff)
downloaddexon-eae81465c1c815c317cd30e4de6bdf4d59df2340.tar.gz
dexon-eae81465c1c815c317cd30e4de6bdf4d59df2340.tar.zst
dexon-eae81465c1c815c317cd30e4de6bdf4d59df2340.zip
rpc: new RPC implementation with pub/sub support
Diffstat (limited to 'node/node.go')
-rw-r--r--node/node.go10
1 files changed, 10 insertions, 0 deletions
diff --git a/node/node.go b/node/node.go
index 5566bc44b..d6debe123 100644
--- a/node/node.go
+++ b/node/node.go
@@ -27,6 +27,7 @@ import (
"github.com/ethereum/go-ethereum/event"
"github.com/ethereum/go-ethereum/p2p"
+ rpc "github.com/ethereum/go-ethereum/rpc/v2"
)
var (
@@ -264,3 +265,12 @@ func (n *Node) DataDir() string {
func (n *Node) EventMux() *event.TypeMux {
return n.eventmux
}
+
+// RPCAPIs returns the collection of RPC descriptor this node offers
+func (n *Node) RPCAPIs() []rpc.API {
+ var apis []rpc.API
+ for _, api := range n.services {
+ apis = append(apis, api.APIs()...)
+ }
+ return apis
+}