diff options
Diffstat (limited to 'node/node.go')
-rw-r--r-- | node/node.go | 30 |
1 files changed, 27 insertions, 3 deletions
diff --git a/node/node.go b/node/node.go index d6debe123..5d7b5869c 100644 --- a/node/node.go +++ b/node/node.go @@ -266,9 +266,33 @@ 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 +// APIs returns the collection of RPC descriptor this node offers. This method +// is just a quick placeholder passthrough for the RPC update, which in the next +// step will be fully integrated into the node itself. +func (n *Node) APIs() []rpc.API { + // Define all the APIs owned by the node itself + apis := []rpc.API{ + { + Namespace: "admin", + Version: "1.0", + Service: NewPrivateAdminAPI(n), + }, { + Namespace: "admin", + Version: "1.0", + Service: NewPublicAdminAPI(n), + Public: true, + }, { + Namespace: "debug", + Version: "1.0", + Service: NewPrivateDebugAPI(n), + }, { + Namespace: "debug", + Version: "1.0", + Service: NewPublicDebugAPI(n), + Public: true, + }, + } + // Inject all the APIs owned by various services for _, api := range n.services { apis = append(apis, api.APIs()...) } |