block

package
v1.36.0 Latest Latest
Warning

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

Go to latest
Published: Feb 24, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Query

Types

type BitcoinBlock

type BitcoinBlock struct {
	// BitcoinBlockHeight
	BitcoinBlockHeight int64  `json:"bitcoinBlockHeight"`
	BitcoinBlockHash   string `json:"bitcoinBlockHash"`
	// We don't care about this
	// BitcoinBlockConfirmations     int64  `json:"bitcoinBlockConfirmations"`
	BitcoinBlockStrippedSize      int64  `json:"bitcoinBlockStrippedSize"`
	BitcoinBlockSize              int64  `json:"bitcoinBlockSize"`
	BitcoinBlockWeight            int64  `json:"bitcoinBlockWeight"`
	BitcoinBlockVersion           int64  `json:"bitcoinBlockVersion"`
	BitcoinBlockVersionHex        string `json:"bitcoinBlockVersionHex"`
	BitcoinBlockMerkleroot        string `json:"bitcoinBlockMerkleroot"`
	BitcoinBlockTime              int64  `json:"bitcoinBlockTime"`
	BitcoinBlockMedianTime        int64  `json:"bitcoinBlockMedianTime"`
	BitcoinBlockNonce             int64  `json:"bitcoinBlockNonce"`
	BitcoinBlockBits              string `json:"bitcoinBlockBits"`
	BitcoinBlockDifficulty        int64  `json:"bitcoinBlockDifficulty"`
	BitcoinBlockChainwork         string `json:"bitcoinBlockChainwork"`
	BitcoinBlockPreviousBlockHash string `json:"bitcoinBlockPreviousBlockHash"`
}

type Block

type Block struct {
	mixin.Model[Block]

	BitcoinBlock
	EthereumBlock

	Type Type `json:"type"`

	// Status        ProcessStatus `json:"status"`
	Confirmations int64 `json:"confirmations"`
}

func New

func New(db *datastore.Datastore) *Block

type EthereumBlock

type EthereumBlock struct {
	EthereumBlockNumber           int64     `json:"ethereumBlockNumber"`
	EthereumBlockHash             string    `json:"ethereumBlockHash"`
	EthereumBlockParentHash       string    `json:"ethereumBlockParentHash"`
	EthereumBlockNonce            string    `json:"ethereumBlockNonce"`
	EthereumBlockSha3Uncles       string    `json:"ethereumBlockSha3Uncles"`
	EthereumBlockLogsBloom        string    `json:"ethereumBlockLogsBloom"`
	EthereumBlockTransactionsRoot string    `json:"ethereumBlockTransactionsRoot"`
	EthereumBlockStateRoot        string    `json:"ethereumBlockStateRoot"`
	EthereumBlockMiner            string    `json:"ethereumBlockMiner"`
	EthereumBlockDifficulty       BigNumber `json:"ethereumBlockDifficulty"`
	EthereumBlockTotalDifficulty  BigNumber `json:"ethereumBlockTotalDifficulty"`
	EthereumBlockExtraData        string    `json:"ethereumBlockExtraData"`
	EthereumBlockSize             int64     `json:"ethereumBlockSize"`
	EthereumBlockGasLimit         int64     `json:"ethereumBlockGasLimit"`
	EthereumBlockGasUsed          int64     `json:"ethereumBlockGasUsed"`
	EthereumBlockTimeStamp        int64     `json:"ethereumBlockTimestamp"`
	EthereumBlockUncles           []string  `json:"ethereumBlockUncles"`
}

Jump to

Keyboard shortcuts

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