aboutsummaryrefslogtreecommitdiffstats
path: root/whisper/whisper.go
diff options
context:
space:
mode:
Diffstat (limited to 'whisper/whisper.go')
-rw-r--r--whisper/whisper.go14
1 files changed, 14 insertions, 0 deletions
diff --git a/whisper/whisper.go b/whisper/whisper.go
index 7201062b8..e99950b76 100644
--- a/whisper/whisper.go
+++ b/whisper/whisper.go
@@ -28,6 +28,8 @@ import (
"github.com/ethereum/go-ethereum/logger"
"github.com/ethereum/go-ethereum/logger/glog"
"github.com/ethereum/go-ethereum/p2p"
+ rpc "github.com/ethereum/go-ethereum/rpc/v2"
+
"gopkg.in/fatih/set.v0"
)
@@ -98,6 +100,18 @@ func New() *Whisper {
return whisper
}
+// APIs returns the RPC descriptors the Whisper implementation offers
+func (s *Whisper) APIs() []rpc.API {
+ return []rpc.API{
+ {
+ Namespace: "shh",
+ Version: "1.0",
+ Service: NewPublicWhisperAPI(s),
+ Public: true,
+ },
+ }
+}
+
// Protocols returns the whisper sub-protocols ran by this particular client.
func (self *Whisper) Protocols() []p2p.Protocol {
return []p2p.Protocol{self.protocol}