RPCRequest.Params can be map[string]interface{} or []interface{}

This commit is contained in:
Ethan Buchman
2017-04-12 13:42:19 -04:00
parent 9d18cbe74e
commit c3295f4878
2 changed files with 36 additions and 16 deletions

View File

@ -9,10 +9,10 @@ import (
)
type RPCRequest struct {
JSONRPC string `json:"jsonrpc"`
ID string `json:"id"`
Method string `json:"method"`
Params map[string]interface{} `json:"params"`
JSONRPC string `json:"jsonrpc"`
ID string `json:"id"`
Method string `json:"method"`
Params interface{} `json:"params"` // must be map[string]interface{} or []interface{}
}
func NewRPCRequest(id string, method string, params map[string]interface{}) RPCRequest {