types

package
v0.0.0-...-57b907f Latest Latest
Warning

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

Go to latest
Published: Apr 6, 2025 License: MIT Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BlockTag

type BlockTag string
const (
	// EARLIEST Genesis Block
	EARLIEST BlockTag = "earliest"

	// LATEST proposed blocks
	LATEST BlockTag = "latest"

	// SAFE The latest and safest header block
	SAFE BlockTag = "safe"

	// FINALIZED Latest finalized block
	FINALIZED BlockTag = "finalized"

	// PENDING status/Transaction
	PENDING BlockTag = "pending"
)

type RPCMethod

type RPCMethod string
const (
	GetBlockByNumber                 RPCMethod = "eth_getBlockByNumber"
	GetBlockByHash                   RPCMethod = "eth_getBlockByHash"
	GetBlockNumber                   RPCMethod = "eth_blockNumber"
	GetBlockTransactionCountByHash   RPCMethod = "eth_getBlockTransactionCountByHash"
	GetBlockTransactionCountByNumber RPCMethod = "eth_getBlockTransactionCountByNumber"
	FeeHistory                       RPCMethod = "eth_feeHistory"
	GetUncleByBlockHashAndIndex      RPCMethod = "eth_getUncleByBlockHashAndIndex"
	GetUncleByBlockNumberAndIndex    RPCMethod = "eth_getUncleByBlockNumberAndIndex"
	GetUncleCountByBlockHash         RPCMethod = "eth_getUncleCountByBlockHash"
	GetUncleCountByBlockNumber       RPCMethod = "eth_getUncleCountByBlockNumber"

	WatchBlocks      RPCMethod = "eth_watchBlocks"
	WatchBlockNumber RPCMethod = "eth_watchBlockNumber"

	SimulateCall   RPCMethod = "eth_simulateCall"
	SimulateBlocks RPCMethod = "eth_simulateBlocks"
)

Block api

const (
	GetTransactionCount                 RPCMethod = "eth_getTransactionCount"
	GetTransactionByHash                RPCMethod = "eth_getTransactionByHash"
	GetTransactionByBlockHashAndIndex   RPCMethod = "eth_getTransactionByBlockHashAndIndex"
	GetTransactionByBlockNumberAndIndex RPCMethod = "eth_getTransactionByBlockNumberAndIndex"
	GetTransactionReceipt               RPCMethod = "eth_getTransactionReceipt"
	SendRawTransaction                  RPCMethod = "eth_sendRawTransaction"
	PendingTransactions                 RPCMethod = "eth_pendingTransactions"
	GetBlockReceipts                    RPCMethod = "eth_getBlockReceipts"
)

Transaction API

const (
	GetBalance   RPCMethod = "eth_getBalance"
	GetChainID   RPCMethod = "eth_chainId"
	GetCode      RPCMethod = "eth_getCode"
	GetStorageAt RPCMethod = "eth_getStorageAt"
	Call         RPCMethod = "eth_call"
	EstimateGas  RPCMethod = "eth_estimateGas"
	Accounts     RPCMethod = "eth_accounts"
	Coinbase     RPCMethod = "eth_coinbase"
)

account / contract API

const (
	CreateAccessList RPCMethod = "eth_createAccessList"
	GasPrice         RPCMethod = "eth_gasPrice"
	Syncing          RPCMethod = "eth_syncing"
	ProtocolVersion  RPCMethod = "eth_protocolVersion"
)

chain API / other API

const (
	NetVersion   RPCMethod = "net_version"
	NetListening RPCMethod = "net_listening"
	NetPeerCount RPCMethod = "net_peerCount"
)

net api

const (
	Web3ClientVersion RPCMethod = "web3_clientVersion"
	Web3Sha3          RPCMethod = "web3_sha3"
)

Web3 api

const (
	GetLogs                RPCMethod = "eth_getLogs"
	GetLogByHash           RPCMethod = "eth_getLogByHash"
	TransactionSubscribe   RPCMethod = "eth_subscribe"
	TransactionUnsubscribe RPCMethod = "eth_unsubscribe"
)

logs / event API

Jump to

Keyboard shortcuts

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