Versions in this module Expand all Collapse all v0 v0.0.2 May 5, 2024 v0.0.1 Apr 8, 2023 Changes in this version + func DisableLog() + func DropAddrIndex(db database.DB, interrupt <-chan struct{}) error + func DropCfIndex(db database.DB, interrupt <-chan struct{}) error + func DropSlpIndex(db database.DB, interrupt <-chan struct{}) error + func DropTxIndex(db database.DB, interrupt <-chan struct{}) error + func TopologicallySortTxs(transactions []*bchutil.Tx) []*wire.MsgTx + func UseLogger(logger bchlog.Logger) + type AddTxIndexEntryHandler func(*wire.MsgTx, v1parser.ParseResult, *chainhash.Hash) error + type AddrIndex struct + func NewAddrIndex(db database.DB, chainParams *chaincfg.Params) *AddrIndex + func (idx *AddrIndex) AddUnconfirmedTx(tx *bchutil.Tx, utxoView *blockchain.UtxoViewpoint) + func (idx *AddrIndex) ConnectBlock(dbTx database.Tx, block *bchutil.Block, stxos []blockchain.SpentTxOut) error + func (idx *AddrIndex) Create(dbTx database.Tx) error + func (idx *AddrIndex) DisconnectBlock(dbTx database.Tx, block *bchutil.Block, stxos []blockchain.SpentTxOut) error + func (idx *AddrIndex) Init() error + func (idx *AddrIndex) Key() []byte + func (idx *AddrIndex) Migrate(db database.DB, interrupt <-chan struct{}) error + func (idx *AddrIndex) Name() string + func (idx *AddrIndex) NeedsInputs() bool + func (idx *AddrIndex) RemoveUnconfirmedTx(hash *chainhash.Hash) + func (idx *AddrIndex) StartBlock() (*chainhash.Hash, int32) + func (idx *AddrIndex) TxRegionsForAddress(dbTx database.Tx, addr bchutil.Address, numToSkip, numRequested uint32, ...) ([]database.BlockRegion, uint32, error) + func (idx *AddrIndex) UnconfirmedTxnsForAddress(addr bchutil.Address) []*bchutil.Tx + type AssertError string + func (e AssertError) Error() string + type BurnedInput struct + Entry *SlpTxEntry + SlpMsg v1parser.ParseResult + Tx *wire.MsgTx + TxInput *wire.TxIn + func CheckSlpTx(tx *wire.MsgTx, getSlpIndexEntry GetSlpIndexEntryHandler, ...) (bool, []*BurnedInput, error) + type CfIndex struct + func NewCfIndex(db database.DB, chainParams *chaincfg.Params) *CfIndex + func (idx *CfIndex) ConnectBlock(dbTx database.Tx, block *bchutil.Block, stxos []blockchain.SpentTxOut) error + func (idx *CfIndex) Create(dbTx database.Tx) error + func (idx *CfIndex) DisconnectBlock(dbTx database.Tx, block *bchutil.Block, _ []blockchain.SpentTxOut) error + func (idx *CfIndex) FilterByBlockHash(h *chainhash.Hash, filterType wire.FilterType) ([]byte, error) + func (idx *CfIndex) FilterHashByBlockHash(h *chainhash.Hash, filterType wire.FilterType) ([]byte, error) + func (idx *CfIndex) FilterHashesByBlockHashes(blockHashes []*chainhash.Hash, filterType wire.FilterType) ([][]byte, error) + func (idx *CfIndex) FilterHeaderByBlockHash(h *chainhash.Hash, filterType wire.FilterType) ([]byte, error) + func (idx *CfIndex) FilterHeadersByBlockHashes(blockHashes []*chainhash.Hash, filterType wire.FilterType) ([][]byte, error) + func (idx *CfIndex) FiltersByBlockHashes(blockHashes []*chainhash.Hash, filterType wire.FilterType) ([][]byte, error) + func (idx *CfIndex) Init() error + func (idx *CfIndex) Key() []byte + func (idx *CfIndex) Migrate(db database.DB, interrupt <-chan struct{}) error + func (idx *CfIndex) Name() string + func (idx *CfIndex) NeedsInputs() bool + func (idx *CfIndex) StartBlock() (*chainhash.Hash, int32) + type GetSlpIndexEntryHandler func(*chainhash.Hash) (*SlpTxEntry, error) + type Indexer interface + ConnectBlock func(database.Tx, *bchutil.Block, []blockchain.SpentTxOut) error + Create func(dbTx database.Tx) error + DisconnectBlock func(database.Tx, *bchutil.Block, []blockchain.SpentTxOut) error + Init func() error + Key func() []byte + Migrate func(db database.DB, interrupt <-chan struct{}) error + Name func() string + StartBlock func() (hash *chainhash.Hash, height int32) + type Manager struct + func NewManager(db database.DB, enabledIndexes []Indexer) *Manager + func (m *Manager) ConnectBlock(dbTx database.Tx, block *bchutil.Block, stxos []blockchain.SpentTxOut) error + func (m *Manager) DisconnectBlock(dbTx database.Tx, block *bchutil.Block, stxo []blockchain.SpentTxOut) error + func (m *Manager) Init(chain *blockchain.BlockChain, interrupt <-chan struct{}) error + type NeedsInputser interface + NeedsInputs func() bool + type SlpCache struct + func InitSlpCache(maxEntries int) *SlpCache + func (s *SlpCache) AddMempoolSlpTxEntry(hash *chainhash.Hash, item SlpTxEntry) + func (s *SlpCache) AddSlpTxEntry(hash *chainhash.Hash, item SlpTxEntry) error + func (s *SlpCache) AddTempTokenMetadata(item TokenMetadata) error + func (s *SlpCache) ForEachMempoolItem(fnc func(hash *chainhash.Hash, entry *SlpTxEntry) error) error + func (s *SlpCache) GetMempoolItem(hash *chainhash.Hash) *SlpTxEntry + func (s *SlpCache) GetSlpTxEntry(hash *chainhash.Hash) (SlpTxEntry, bool) + func (s *SlpCache) GetTokenMetadata(hash *chainhash.Hash) (TokenMetadata, bool) + func (s *SlpCache) MempoolSize() int + func (s *SlpCache) RemoveMempoolSlpTxItems(txs []*bchutil.Tx) + func (s *SlpCache) RemoveTokenMetadata(hash chainhash.Hash) + type SlpConfig struct + AddrPrefix string + MaxCacheSize int + SlpGraphSearchEnabled bool + StartHash *chainhash.Hash + StartHeight int32 + type SlpIndex struct + func NewSlpIndex(db database.DB, cfg *SlpConfig) *SlpIndex + func (idx *SlpIndex) AddGraphSearchTxn(tx *wire.MsgTx) + func (idx *SlpIndex) AddPotentialSlpEntries(dbTx database.Tx, msgTx *wire.MsgTx) (bool, error) + func (idx *SlpIndex) ConnectBlock(dbTx database.Tx, block *bchutil.Block, stxos []blockchain.SpentTxOut) error + func (idx *SlpIndex) Create(dbTx database.Tx) error + func (idx *SlpIndex) DisconnectBlock(dbTx database.Tx, block *bchutil.Block, stxos []blockchain.SpentTxOut) error + func (idx *SlpIndex) GetGraphSearchDb() (*slpgraphsearch.Db, error) + func (idx *SlpIndex) GetSlpIndexEntry(dbTx database.Tx, hash *chainhash.Hash) (*SlpTxEntry, error) + func (idx *SlpIndex) GetTokenMetadata(dbTx database.Tx, entry *SlpTxEntry) (*TokenMetadata, error) + func (idx *SlpIndex) GraphSearchEnabled() bool + func (idx *SlpIndex) Init() error + func (idx *SlpIndex) Key() []byte + func (idx *SlpIndex) LoadSlpGraphSearchDb(fetchTxn func(txnHash *chainhash.Hash) ([]byte, error), initWg *sync.WaitGroup, ...) + func (idx *SlpIndex) Migrate(db database.DB, interrupt <-chan struct{}) error + func (idx *SlpIndex) Name() string + func (idx *SlpIndex) StartBlock() (*chainhash.Hash, int32) + type SlpTxEntry struct + SlpOpReturn []byte + SlpVersionType v1parser.TokenType + TokenID uint32 + TokenIDHash chainhash.Hash + type TokenMetadata struct + MintBatonHash *chainhash.Hash + MintBatonVout uint32 + NftGroupID *chainhash.Hash + SlpVersion v1parser.TokenType + TokenID *chainhash.Hash + type TxIndex struct + func NewTxIndex(db database.DB) *TxIndex + func (idx *TxIndex) ConnectBlock(dbTx database.Tx, block *bchutil.Block, stxos []blockchain.SpentTxOut) error + func (idx *TxIndex) Create(dbTx database.Tx) error + func (idx *TxIndex) DisconnectBlock(dbTx database.Tx, block *bchutil.Block, stxos []blockchain.SpentTxOut) error + func (idx *TxIndex) Init() error + func (idx *TxIndex) Key() []byte + func (idx *TxIndex) Migrate(db database.DB, interrupt <-chan struct{}) error + func (idx *TxIndex) Name() string + func (idx *TxIndex) StartBlock() (*chainhash.Hash, int32) + func (idx *TxIndex) TxBlockRegion(hash *chainhash.Hash) (*database.BlockRegion, error)