Versions in this module Expand all Collapse all v0 v0.0.10 Mar 17, 2021 Changes in this version + type BalanceStorageHandler struct + func (h *BalanceStorageHandler) AccountsReconciled(ctx context.Context, dbTx database.Transaction, count int) error + func (h *BalanceStorageHandler) AccountsSeen(ctx context.Context, dbTx database.Transaction, count int) error + func (h *BalanceStorageHandler) BlockAdded(ctx context.Context, block *types.Block, changes []*parser.BalanceChange) error + func (h *BalanceStorageHandler) BlockRemoved(ctx context.Context, block *types.Block, changes []*parser.BalanceChange) error + type BalanceStorageHelper struct + func (h *BalanceStorageHelper) AccountBalance(ctx context.Context, account *types.AccountIdentifier, ...) (*types.Amount, error) + func (h *BalanceStorageHelper) AccountsReconciled(ctx context.Context, dbTx database.Transaction) (*big.Int, error) + func (h *BalanceStorageHelper) AccountsSeen(ctx context.Context, dbTx database.Transaction) (*big.Int, error) + func (h *BalanceStorageHelper) Asserter() *asserter.Asserter + func (h *BalanceStorageHelper) BalanceExemptions() []*types.BalanceExemption + func (h *BalanceStorageHelper) ExemptFunc() parser.ExemptOperation + type Client interface + GetRawBlock func(context.Context, *types.PartialBlockIdentifier) (*defichain.Block, []string, error) + GetRawTransaction func(ctx context.Context, txid, blockhash string) (*defichain.Transaction, error) + GetTransaction func(ctx context.Context, txid string) ([]byte, error) + NetworkStatus func(context.Context) (*types.NetworkStatusResponse, error) + ParseBlock func(context.Context, *defichain.Block, map[string]*types.AccountCoin) (*types.Block, error) + PruneBlockchain func(context.Context, int64) (int64, error) + type CoinStorageHelper struct + func (h *CoinStorageHelper) CurrentBlockIdentifier(ctx context.Context, transaction database.Transaction) (*types.BlockIdentifier, error) + type Indexer struct + func Initialize(ctx context.Context, cancel context.CancelFunc, ...) (*Indexer, error) + func (i *Indexer) Block(ctx context.Context, network *types.NetworkIdentifier, ...) (*types.Block, error) + func (i *Indexer) BlockAdded(ctx context.Context, block *types.Block) error + func (i *Indexer) BlockRemoved(ctx context.Context, blockIdentifier *types.BlockIdentifier) error + func (i *Indexer) BlockSeen(ctx context.Context, block *types.Block) error + func (i *Indexer) CloseDatabase(ctx context.Context) + func (i *Indexer) GetBalance(ctx context.Context, accountIdentifier *types.AccountIdentifier, ...) (*types.Amount, *types.BlockIdentifier, error) + func (i *Indexer) GetBlockLazy(ctx context.Context, blockIdentifier *types.PartialBlockIdentifier) (*types.BlockResponse, error) + func (i *Indexer) GetBlockTransaction(ctx context.Context, blockIdentifier *types.BlockIdentifier, ...) (*types.Transaction, error) + func (i *Indexer) GetCoins(ctx context.Context, accountIdentifier *types.AccountIdentifier) ([]*types.Coin, *types.BlockIdentifier, error) + func (i *Indexer) GetScriptPubKeys(ctx context.Context, coins []*types.Coin) ([]*defichain.ScriptPubKey, error) + func (i *Indexer) NetworkStatus(ctx context.Context, network *types.NetworkIdentifier) (*types.NetworkStatusResponse, error) + func (i *Indexer) Prune(ctx context.Context) error + func (i *Indexer) Sync(ctx context.Context) error