rpc
- 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:
@ -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"`
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user