From eae81465c1c815c317cd30e4de6bdf4d59df2340 Mon Sep 17 00:00:00 2001 From: Bas van Kervel Date: Thu, 15 Oct 2015 16:07:19 +0200 Subject: rpc: new RPC implementation with pub/sub support --- node/node.go | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'node/node.go') 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 +} -- cgit v1.2.3