Documentation
¶
Index ¶
Constants ¶
View Source
const ( CelestiaBlockQueryPath = "" CelestiaBlockQueryPayLoad = `{ "jsonrpc":"2.0", "id":1, "method":"header.LocalHead", "params":[] }` )
ref; https://node-rpc-docs.celestia.org/?version=v0.17.1#header.LocalHead
View Source
const ( CosmosBlockQueryPath = "/status" CosmosBlockQueryPayload = "" )
View Source
const ( EthereumBlockQueryPath = "" EthereumBlockQueryPayLoad = `` /* 126-byte string literal not displayed */ )
Variables ¶
View Source
var (
SupportedChainTypes = []string{"cosmos", "ethereum", "celestia"}
)
NOTE: SupportedChainTypes = []string{"cosmos", "ethereum", "aptos", "sui", "avalanche", "celestia", "polkadot", "aleo"}
Functions ¶
This section is empty.
Types ¶
type CelestiaBlockResponse ¶
type CelestiaBlockResponse struct { JsonRPC string `json:"jsonrpc"` ID int `json:"id"` Result struct { Header struct { Version interface{} `json:"-"` ChainID string `json:"chain_id"` Height string `json:"height"` Time time.Time `json:"time"` LastBlockID interface{} `json:"-"` LastCommitHash string `json:"last_commit_hash"` DataHash string `json:"data_hash"` ValidatorsHash string `json:"validators_hash"` NextValidatorsHash string `json:"next_validators_hash"` ConsensusHash string `json:"consensus_hash"` AppHash string `json:"app_hash"` LastResultsHash string `json:"last_results_hash"` EvidenceHash string `json:"evidence_hash"` ProposerAddress string `json:"proposer_address"` } `json:"header"` ValidatorSet interface{} `json:"-"` Commit interface{} `json:"-"` Dah interface{} `json:"-"` } }
type CommonBlock ¶
type CosmosV34BlockResponse ¶
type CosmosV34BlockResponse struct { JsonRPC string `json:"jsonrpc" validate:"required"` ID int `json:"id" validate:"required"` Result struct { NodeInfo map[string]any `json:"node_info"` SyncInfo struct { LatestBlockHash string `json:"latest_block_hash"` LatestAppHash string `json:"latest_app_hash"` LatestBlockHeight string `json:"latest_block_height"` LatestBlockTime time.Time `json:"latest_block_time"` EarliestBlockHash string `json:"earliest_block_hash"` EarliestAppHash string `json:"earliest_app_hash"` EarliestBlcokHeight string `json:"earliest_block_height"` EarliestBlockTime time.Time `json:"earliest_block_time"` CatchingUp bool `json:"catching_up"` } `json:"sync_info"` ValidatorInfo map[string]any `json:"validator_info"` } `json:"result" validate:"required"` }
type CosmosV37BlockResponse ¶
type CosmosV37BlockResponse struct { NodeInfo map[string]any `json:"node_info"` SyncInfo struct { LatestBlockHash string `json:"latest_block_hash"` LatestAppHash string `json:"latest_app_hash"` LatestBlockHeight string `json:"latest_block_height"` LatestBlockTime time.Time `json:"latest_block_time"` EarliestBlockHash string `json:"earliest_block_hash"` EarliestAppHash string `json:"earliest_app_hash"` EarliestBlcokHeight string `json:"earliest_block_height"` EarliestBlockTime time.Time `json:"earliest_block_time"` CatchingUp bool `json:"catching_up"` } `json:"sync_info" validate:"required"` ValidatorInfo map[string]any `json:"validator_info"` }
type EthereumBlockResponse ¶
type EthereumBlockResponse 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"` MinHash 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 []string `json:"transactions"` TransactionRoot string `json:"transactionsRoot"` Uncles []string `json:"uncles"` } `json:"result"` }
Click to show internal directories.
Click to hide internal directories.