block

package
v1.48.7 Latest Latest
Warning

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

Go to latest
Published: Jul 16, 2026 License: MIT Imports: 4 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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