explorer

package
v0.5.1-beta Latest Latest
Warning

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

Go to latest
Published: Jan 28, 2016 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

The explorer module 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
}

Basic structure to store the blockchain. Metadata may also be stored here in the future

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 a file contract, 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

FileContractIDs returns all of the transactions that contain the input file contract id. An empty set indicates that the file contract id does not appear in the blockchain.

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 will return the siacoin output associated with the input id.

func (*Explorer) SiacoinOutputID

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

SiacoinOutputID returns all of the transactions that contain the input 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 will return the siafund output associated with the input id.

func (*Explorer) SiafundOutputID

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

SiafundOutputID returns all of the transactions that contain the input 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