Documentation ¶
Index ¶
- type AccountResponse
- type BlockByNumberResponse
- type BlockNumberResponse
- type EphemeralRequest
- type RPCRequest
- func (rpc *RPCRequest) Base64Hash(userSelectedChainId *int) (hash string)
- func (rpc *RPCRequest) Hash(userSelectedChainId *int) (hash []byte)
- func (rpc *RPCRequest) IsAfterFinalCacheable() (resp bool)
- func (rpc *RPCRequest) IsCacheable() (resp bool)
- func (rpc *RPCRequest) IsEnvCacheable() (resp bool)
- func (rpc *RPCRequest) IsResultFinal(resp string) (final bool)
- func (rpc *RPCRequest) IsTimelyCacheable() (resp bool)
- func (rpc *RPCRequest) ToByte(userSelectedChainId *int) (data []byte)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AccountResponse ¶
type AccountResponse struct { Jsonrpc string `json:"jsonrpc"` ID int `json:"id"` Result []string `json:"result"` }
func (*AccountResponse) ToString ¶
func (ar *AccountResponse) ToString() string
type BlockByNumberResponse ¶
type BlockByNumberResponse struct { Jsonrpc string `json:"jsonrpc"` ID int `json:"id"` Result struct { BaseFeePerGas string `json:"baseFeePerGas"` Difficulty string `json:"difficulty"` ExtraData string `json:"extraData"` GasLimit string `json:"gasLimit"` GasUsed string `json:"gasUsed"` Hash string `json:"hash"` LogsBloom string `json:"logsBloom"` Miner string `json:"miner"` MixHash string `json:"mixHash"` Nonce string `json:"nonce"` Number string `json:"number"` ParentHash string `json:"parentHash"` ReceiptsRoot string `json:"receiptsRoot"` Sha3Uncles string `json:"sha3Uncles"` Size string `json:"size"` StateRoot string `json:"stateRoot"` Timestamp string `json:"timestamp"` TotalDifficulty string `json:"totalDifficulty"` Transactions []struct { AccessList []interface{} `json:"accessList,omitempty"` BlockHash string `json:"blockHash"` BlockNumber string `json:"blockNumber"` ChainID string `json:"chainId"` From string `json:"from"` Gas string `json:"gas"` GasPrice string `json:"gasPrice"` Hash string `json:"hash"` Input string `json:"input"` MaxFeePerGas string `json:"maxFeePerGas,omitempty"` MaxPriorityFeePerGas string `json:"maxPriorityFeePerGas,omitempty"` Nonce string `json:"nonce"` R string `json:"r"` S string `json:"s"` To string `json:"to"` TransactionIndex string `json:"transactionIndex"` Type string `json:"type"` V string `json:"v"` Value string `json:"value"` } `json:"transactions"` TransactionsRoot string `json:"transactionsRoot"` Uncles []interface{} `json:"uncles"` Withdrawals []struct { Address string `json:"address"` Amount string `json:"amount"` Index string `json:"index"` ValidatorIndex string `json:"validatorIndex"` } `json:"withdrawals"` WithdrawalsRoot string `json:"withdrawalsRoot"` } `json:"result"` }
type BlockNumberResponse ¶
type EphemeralRequest ¶
type EphemeralRequest struct { Base64Hash []byte Request RPCRequest Response string BlockNumber uint64 When int64 }
func (*EphemeralRequest) IsStillValid ¶
func (erpc *EphemeralRequest) IsStillValid() (ok bool)
type RPCRequest ¶
type RPCRequest struct { JsonRpcVersion string `json:"jsonrpc"` Method string `json:"method"` Params []any `json:"params"` ID int `json:"id"` }
func (*RPCRequest) Base64Hash ¶
func (rpc *RPCRequest) Base64Hash(userSelectedChainId *int) (hash string)
func (*RPCRequest) Hash ¶
func (rpc *RPCRequest) Hash(userSelectedChainId *int) (hash []byte)
func (*RPCRequest) IsAfterFinalCacheable ¶
func (rpc *RPCRequest) IsAfterFinalCacheable() (resp bool)
func (*RPCRequest) IsCacheable ¶
func (rpc *RPCRequest) IsCacheable() (resp bool)
func (*RPCRequest) IsEnvCacheable ¶
func (rpc *RPCRequest) IsEnvCacheable() (resp bool)
func (*RPCRequest) IsResultFinal ¶
func (rpc *RPCRequest) IsResultFinal(resp string) (final bool)
func (*RPCRequest) IsTimelyCacheable ¶
func (rpc *RPCRequest) IsTimelyCacheable() (resp bool)
func (*RPCRequest) ToByte ¶
func (rpc *RPCRequest) ToByte(userSelectedChainId *int) (data []byte)
Click to show internal directories.
Click to hide internal directories.