transactions

package
v0.33.21-fix-get-highe... Latest Latest
Warning

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

Go to latest
Published: May 13, 2024 License: AGPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BlockData

type BlockData struct {
	BlockID     flow.Identifier   `json:"block_id"`
	Height      uint64            `json:"height"`
	Collections []*CollectionData `json:"collections"`
}

type CollectionData

type CollectionData struct {
	Index        int            `json:"index"`
	Transactions []*Transaction `json:"transactions"`
}

func FindBlockTransactions

func FindBlockTransactions(
	payloads storage.Payloads,
	collections storage.Collections,
	blockID flow.Identifier,
) ([]*CollectionData, error)

type Finder

type Finder struct {
	State       protocol.State
	Payloads    storage.Payloads
	Collections storage.Collections
}

func (*Finder) GetByHeightRange

func (f *Finder) GetByHeightRange(startHeight uint64, endHeight uint64) ([]*BlockData, error)

func (*Finder) RunByHeightRange

func (f *Finder) RunByHeightRange(startHeight uint64, endHeight uint64, run func(*BlockData) error) error

startHeight and endHeight defines the range to iterate through and find transactions for each height, the run function is to process the queried transactions for each height, most common use case is to use run to export the given block data to json.

type Transaction

type Transaction struct {
	TxID   string `json:"tx_id"`
	Index  int    `json:"tx_index"`
	Script string `json:"script"`
	Payer  string `json:"payer_address"`
}

Jump to

Keyboard shortcuts

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