aboutsummaryrefslogtreecommitdiffstats
path: root/rpc/message.go
diff options
context:
space:
mode:
Diffstat (limited to 'rpc/message.go')
-rw-r--r--rpc/message.go28
1 files changed, 28 insertions, 0 deletions
diff --git a/rpc/message.go b/rpc/message.go
index 7983e003d..b5b852f54 100644
--- a/rpc/message.go
+++ b/rpc/message.go
@@ -342,3 +342,31 @@ func (req *RpcRequest) ToWhisperHasIdentityArgs() (string, error) {
rpclogger.DebugDetailf("%T %v", args, args)
return args, nil
}
+
+func (req *RpcRequest) ToRegisterArgs() (string, error) {
+ if len(req.Params) < 1 {
+ return "", NewErrorResponse(ErrorArguments)
+ }
+
+ var args string
+ err := json.Unmarshal(req.Params[0], &args)
+ if err != nil {
+ return "", err
+ }
+ rpclogger.DebugDetailf("%T %v", args, args)
+ return args, nil
+}
+
+func (req *RpcRequest) ToWatchTxArgs() (string, error) {
+ if len(req.Params) < 1 {
+ return "", NewErrorResponse(ErrorArguments)
+ }
+
+ var args string
+ err := json.Unmarshal(req.Params[0], &args)
+ if err != nil {
+ return "", err
+ }
+ rpclogger.DebugDetailf("%T %v", args, args)
+ return args, nil
+}