- camelcase fields dont play nice with otto value magic: JsonRpc -> Jsonrpc, ID -> Id
- jeth: ethereum.js rpc transport provider direct bridge between js and ethereumApi via otto jsre
This commit is contained in:
zelig
2015-03-15 13:21:54 +07:00
parent 31ffca6d8a
commit 16ecb1e2ea
3 changed files with 56 additions and 13 deletions

View File

@ -83,21 +83,21 @@ func NewValidationError(param string, msg string) error {
}
type RpcRequest struct {
ID interface{} `json:"id"`
JsonRpc string `json:"jsonrpc"`
Id interface{} `json:"id"`
Jsonrpc string `json:"jsonrpc"`
Method string `json:"method"`
Params json.RawMessage `json:"params"`
}
type RpcSuccessResponse struct {
ID interface{} `json:"id"`
JsonRpc string `json:"jsonrpc"`
Id interface{} `json:"id"`
Jsonrpc string `json:"jsonrpc"`
Result interface{} `json:"result"`
}
type RpcErrorResponse struct {
ID interface{} `json:"id"`
JsonRpc string `json:"jsonrpc"`
Id interface{} `json:"id"`
Jsonrpc string `json:"jsonrpc"`
Error *RpcErrorObject `json:"error"`
}