blocks

package
v0.0.7 Latest Latest
Warning

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

Go to latest
Published: Jan 28, 2025 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const MaxUint32 = 1<<32 - 1

Variables

This section is empty.

Functions

This section is empty.

Types

type Blocks

type Blocks struct {
	// contains filtered or unexported fields
}

func New

func New(chain *chain.Chain) *Blocks

func (*Blocks) Mount

func (b *Blocks) Mount(root *mux.Router, pathPrefix string)

type CommitteeMember

type CommitteeMember struct {
	Index uint32 `json:"index"`
	// Name    string `json:"name"`
	NetAddr string `json:"netAddr"`
	PubKey  string `json:"pubKey"`
}

type JSONBlockSummary

type JSONBlockSummary struct {
	Number     uint32            `json:"number"`
	ID         types.Bytes32     `json:"id"`
	Size       uint32            `json:"size"`
	ParentID   types.Bytes32     `json:"parentID"`
	Timestamp  uint64            `json:"timestamp"`
	TxsRoot    cmtbytes.HexBytes `json:"txsRoot"`
	LastKBlock uint32            `json:"lastKBlock"`
	QC         *QC               `json:"qc"`
	Nonce      uint64            `json:"nonce"`
	Epoch      uint64            `json:"epoch"`
}

type JSONClause

type JSONClause struct {
	To    *common.Address      `json:"to"`
	Value math.HexOrDecimal256 `json:"value"`
	Token uint32               `json:"token"`
	Data  string               `json:"data"`
}

type JSONCollapsedBlock

type JSONCollapsedBlock struct {
	*JSONBlockSummary
	Transactions []string `json:"transactions"`
}

type JSONEmbeddedTx

type JSONEmbeddedTx struct {
	Hash string `json:"hash"`
	Raw  string `json:"chainTag"`
}

type JSONEpoch

type JSONEpoch struct {
	Epoch  uint64 `json:"epoch"`
	Number uint32 `json:"number"`
	Nonce  uint64 `json:"nonce"`
}

type JSONEvent

type JSONEvent struct {
	Address common.Address  `json:"address"`
	Topics  []types.Bytes32 `json:"topics"`
	Data    string          `json:"data"`
}

type JSONExpandedBlock

type JSONExpandedBlock struct {
	*JSONBlockSummary
	Transactions []*JSONEmbeddedTx `json:"transactions"`
}

type JSONOutput

type JSONOutput struct {
	ContractAddress *common.Address `json:"contractAddress"`
	Events          []*JSONEvent    `json:"events"`
	Transfers       []*JSONTransfer `json:"transfers"`
}

type JSONTransfer

type JSONTransfer struct {
	Sender    common.Address        `json:"sender"`
	Recipient common.Address        `json:"recipient"`
	Amount    *math.HexOrDecimal256 `json:"amount"`
	Token     uint32                `json:"token"`
}

type QC

type QC struct {
	Epoch            uint64 `json:"height"`
	Round            uint32 `json:"round"`
	BlockID          string `json:"blockID"`
	VoterBitArrayStr string `json:"voterBitArrayStr"`
}

type QCWithRaw

type QCWithRaw struct {
	Epoch            uint64 `json:"height"`
	Round            uint32 `json:"round"`
	BlockID          string `json:"blockID"`
	VoterBitArrayStr string `json:"voterBitArrayStr"`
	Raw              string `json:"raw"`
}

Jump to

Keyboard shortcuts

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