Documentation ¶
Index ¶
Constants ¶
View Source
const ( BlockByHash = "eth_getBlockByHash" BlockNumber = "eth_blockNumber" TransactionReceipt = "eth_getTransactionReceipt" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type JsonrpcMessage ¶
type JsonrpcMessage struct { Version string `json:"jsonrpc,omitempty"` ID json.RawMessage `json:"id,omitempty"` Method string `json:"method,omitempty"` Params json.RawMessage `json:"params,omitempty"` Error *jsonError `json:"error,omitempty"` Result json.RawMessage `json:"result,omitempty"` }
func Unmarshall ¶
func Unmarshall(data json.RawMessage) (*JsonrpcMessage, error)
func (*JsonrpcMessage) BlockNumber ¶
func (j *JsonrpcMessage) BlockNumber() (uint64, error)
func (*JsonrpcMessage) GetID ¶ added in v0.0.3
func (j *JsonrpcMessage) GetID() (uint64, error)
func (*JsonrpcMessage) Marshall ¶
func (j *JsonrpcMessage) Marshall() (json.RawMessage, error)
func (*JsonrpcMessage) SetBlockNumber ¶
func (j *JsonrpcMessage) SetBlockNumber(n uint64) error
Click to show internal directories.
Click to hide internal directories.