package
Version:
v0.1.6
Opens a new window with list of versions in this module.
Published: Jan 5, 2024
License: MIT
Opens a new window with license information.
Imports: 3
Opens a new window with list of imports.
Imported by: 5
Opens a new window with list of known importers.
Documentation
¶
Package rpc provides a parser for the RPC API requests.
IsBatch determines if a request is batch. This method's implementation is borrowed from
rpc/json.go in ethereum-go where it is unexported.
type Request struct {
ID int `json:"id"`
Method string `json:"method"`
Params []json.RawMessage `json:"params"`
}
Request is a raw rpc request format.
Requests is a list or rpc requests.
ParseRPCPayload parses a raw rpc request body and returns a list of rpc requests.
ByID will get an rpc requet by the id.
Method returns the method of the rpc request.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.