explorerutil

package
v0.0.0-...-9bc7f68 Latest Latest
Warning

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

Go to latest
Published: Jan 20, 2023 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type HashStore

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

func NewHashStore

func NewHashStore(dir string) (*HashStore, error)

NewHashStore returns a new HashStore.

func (*HashStore) Commit

func (hs *HashStore) Commit() error

Commit implements explorer.HashStore.

func (*HashStore) MerkleProof

func (hs *HashStore) MerkleProof(leafIndex uint64) ([]types.Hash256, error)

MerkleProof implements explorer.HashStore.

func (*HashStore) ModifyLeaf

func (hs *HashStore) ModifyLeaf(elem types.StateElement) error

ModifyLeaf overwrites hashes in the tree with the proof hashes in the provided element.

func (*HashStore) Size

func (hs *HashStore) Size() (uint64, error)

Size implements explorer.HashStore.

type SQLiteStore

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

SQLiteStore implements explorer.Store using a SQLite database.

func NewEphemeralStore

func NewEphemeralStore() *SQLiteStore

NewEphemeralStore returns a new in-memory SQLiteStore.

func NewStore

func NewStore(path string) (*SQLiteStore, error)

NewStore creates a new SQLiteStore for storing explorer data.

func (*SQLiteStore) AddChainStats

func (s *SQLiteStore) AddChainStats(index types.ChainIndex, cs explorer.ChainStats)

AddChainStats implements explorer.Store.

func (*SQLiteStore) AddFileContractElement

func (s *SQLiteStore) AddFileContractElement(fce types.FileContractElement)

AddFileContractElement implements explorer.Store.

func (*SQLiteStore) AddSiacoinElement

func (s *SQLiteStore) AddSiacoinElement(sce types.SiacoinElement)

AddSiacoinElement implements explorer.Store.

func (*SQLiteStore) AddSiafundElement

func (s *SQLiteStore) AddSiafundElement(sfe types.SiafundElement)

AddSiafundElement implements explorer.Store.

func (*SQLiteStore) AddState

func (s *SQLiteStore) AddState(index types.ChainIndex, context consensus.State)

AddState implements explorer.Store.

func (*SQLiteStore) AddTransaction

func (s *SQLiteStore) AddTransaction(txn types.Transaction, addresses []types.Address, block types.ChainIndex)

AddTransaction implements explorer.Store.

func (*SQLiteStore) AddUnspentSiacoinElement

func (s *SQLiteStore) AddUnspentSiacoinElement(address types.Address, id types.ElementID)

AddUnspentSiacoinElement implements explorer.Store.

func (*SQLiteStore) AddUnspentSiafundElement

func (s *SQLiteStore) AddUnspentSiafundElement(address types.Address, id types.ElementID)

AddUnspentSiafundElement implements explorer.Store.

func (*SQLiteStore) ChainStats

func (s *SQLiteStore) ChainStats(index types.ChainIndex) (cs explorer.ChainStats, err error)

ChainStats implements explorer.Store.

func (*SQLiteStore) Commit

func (s *SQLiteStore) Commit() (err error)

Commit implements explorer.Store.

func (*SQLiteStore) FileContractElement

func (s *SQLiteStore) FileContractElement(id types.ElementID) (fce types.FileContractElement, err error)

FileContractElement implements explorer.Store.

func (*SQLiteStore) RemoveElement

func (s *SQLiteStore) RemoveElement(id types.ElementID)

RemoveElement implements explorer.Store.

func (*SQLiteStore) RemoveUnspentSiacoinElement

func (s *SQLiteStore) RemoveUnspentSiacoinElement(address types.Address, id types.ElementID)

RemoveUnspentSiacoinElement implements explorer.Store.

func (*SQLiteStore) RemoveUnspentSiafundElement

func (s *SQLiteStore) RemoveUnspentSiafundElement(address types.Address, id types.ElementID)

RemoveUnspentSiafundElement implements explorer.Store.

func (*SQLiteStore) SiacoinElement

func (s *SQLiteStore) SiacoinElement(id types.ElementID) (sce types.SiacoinElement, err error)

SiacoinElement implements explorer.Store.

func (*SQLiteStore) SiafundElement

func (s *SQLiteStore) SiafundElement(id types.ElementID) (sfe types.SiafundElement, err error)

SiafundElement implements explorer.Store.

func (*SQLiteStore) Size

func (s *SQLiteStore) Size() (uint64, error)

Size implements explorer.Store.

func (*SQLiteStore) State

func (s *SQLiteStore) State(index types.ChainIndex) (context consensus.State, err error)

State implements explorer.Store.

func (*SQLiteStore) Transaction

func (s *SQLiteStore) Transaction(id types.TransactionID) (txn types.Transaction, err error)

Transaction implements explorer.Store.

func (*SQLiteStore) Transactions

func (s *SQLiteStore) Transactions(address types.Address, amount, offset int) ([]types.TransactionID, error)

Transactions implements explorer.Store.

func (*SQLiteStore) UnspentSiacoinElements

func (s *SQLiteStore) UnspentSiacoinElements(address types.Address) ([]types.ElementID, error)

UnspentSiacoinElements implements explorer.Store.

func (*SQLiteStore) UnspentSiafundElements

func (s *SQLiteStore) UnspentSiafundElements(address types.Address) ([]types.ElementID, error)

UnspentSiafundElements implements explorer.Store.

Jump to

Keyboard shortcuts

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