ethrpc

package
v0.0.5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 12, 2022 License: BSD-3-Clause Imports: 3 Imported by: 0

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL