explorer

package
v1.3.3 Latest Latest
Warning

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

Go to latest
Published: Jun 12, 2018 License: MIT Imports: 10 Imported by: 0

Documentation

Overview

Package explorer provides a glimpse into what the Sia network currently looks like.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Explorer

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

An Explorer contains a more comprehensive view of the blockchain, including various statistics and metrics.

func New

func New(cs modules.ConsensusSet, persistDir string) (*Explorer, error)

New creates the internal data structures, and subscribes to consensus for changes to the blockchain

func (*Explorer) Block

Block takes a block ID and finds the corresponding block, provided that the block is in the consensus set.

func (*Explorer) BlockFacts

func (e *Explorer) BlockFacts(height types.BlockHeight) (modules.BlockFacts, bool)

BlockFacts returns a set of statistics about the blockchain as they appeared at a given block height, and a bool indicating whether facts exist for the given height.

func (*Explorer) Close

func (e *Explorer) Close() error

Close closes the explorer.

func (*Explorer) FileContractHistory

func (e *Explorer) FileContractHistory(id types.FileContractID) (fc types.FileContract, fcrs []types.FileContractRevision, fcE bool, spE bool)

FileContractHistory returns the history associated with the specified file contract ID, which includes the file contract itself and all of the revisions that have been submitted to the blockchain. The first bool indicates whether the file contract exists, and the second bool indicates whether a storage proof was successfully submitted for the file contract.

func (*Explorer) FileContractID

func (e *Explorer) FileContractID(id types.FileContractID) []types.TransactionID

FileContractID returns all transactions that contain the specified file contract ID. An empty set indicates that the file contract ID does not appear in the blockchain.

func (*Explorer) FileContractPayouts added in v1.3.0

func (e *Explorer) FileContractPayouts(id types.FileContractID) ([]types.SiacoinOutput, error)

FileContractPayouts returns all of the spendable siacoin outputs which are the result of a FileContract. An empty set indicates that the file contract is still open

func (*Explorer) LatestBlockFacts added in v1.0.3

func (e *Explorer) LatestBlockFacts() modules.BlockFacts

LatestBlockFacts returns a set of statistics about the blockchain as they appeared at the latest block height in the explorer's consensus set.

func (*Explorer) ProcessConsensusChange

func (e *Explorer) ProcessConsensusChange(cc modules.ConsensusChange)

ProcessConsensusChange follows the most recent changes to the consensus set, including parsing new blocks and updating the utxo sets.

func (*Explorer) SiacoinOutput

func (e *Explorer) SiacoinOutput(id types.SiacoinOutputID) (types.SiacoinOutput, bool)

SiacoinOutput returns the siacoin output associated with the specified ID.

func (*Explorer) SiacoinOutputID

func (e *Explorer) SiacoinOutputID(id types.SiacoinOutputID) []types.TransactionID

SiacoinOutputID returns all of the transactions that contain the specified siacoin output ID. An empty set indicates that the siacoin output ID does not appear in the blockchain.

func (*Explorer) SiafundOutput

func (e *Explorer) SiafundOutput(id types.SiafundOutputID) (types.SiafundOutput, bool)

SiafundOutput returns the siafund output associated with the specified ID.

func (*Explorer) SiafundOutputID

func (e *Explorer) SiafundOutputID(id types.SiafundOutputID) []types.TransactionID

SiafundOutputID returns all of the transactions that contain the specified siafund output ID. An empty set indicates that the siafund output ID does not appear in the blockchain.

func (*Explorer) Transaction

func (e *Explorer) Transaction(id types.TransactionID) (types.Block, types.BlockHeight, bool)

Transaction takes a transaction ID and finds the block containing the transaction. Because of the miner payouts, the transaction ID might be a block ID. To find the transaction, iterate through the block.

func (*Explorer) UnlockHash

func (e *Explorer) UnlockHash(uh types.UnlockHash) []types.TransactionID

UnlockHash returns the IDs of all the transactions that contain the unlock hash. An empty set indicates that the unlock hash does not appear in the blockchain.

Jump to

Keyboard shortcuts

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